English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 19 February 2013, 09:47   #1
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,742
Question 68000 & 68020 comparaison ? (for GhostsNGhosts temporary freeze)

Hi guys,

I am working on Ghosts N Goblins whdload's patch.

It seems a problem appears on 68020 running the game on real amiga.

On winuae problem can be reproduct just switching CPU between 68000 and 68020 during execution of game.

I think it's caused by some differences between both CPU and perhaps:
- some 68000 instructions missing on 68020 and >
- some code without effect on 68000 but cause new instructions on 68020
- cpu interuption managment a bit different...

So have you a documentation or table to compare instruction and/or interupt management between 68000 and 68020?

regards,
Bertrand/CFou!

Last edited by CFOU!; 20 February 2013 at 18:39. Reason: more prescsions
CFOU! is offline  
Old 19 February 2013, 14:20   #2
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,062
did you check if it's an instruction cache issue?

otherwise, some instructions allowed in user mode on the 000 are only allowed in supervisor mode on 010+

Last edited by CFOU!; 19 February 2013 at 17:11.
hooverphonique is offline  
Old 19 February 2013, 17:40   #3
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,742
Quote:
Originally Posted by hooverphonique View Post
did you check if it's an instruction cache issue?
Quote:
Originally Posted by hooverphonique View Post

otherwise, some instructions allowed in user mode on the 000 are only allowed in supervisor mode on 010+


I don't think it's my problem.

I thought at self-modifying code in music player code but problem are same if instruction cache are disabled...

The problem is either a sync or freezes on a wait loop interuption because it seems the music player code does not start or started too late the interuption.

I think it may be in music player that 68000 CPU instructions are not understood by the 68020 ... I am looking for ..


For information:
code freezes sometimes on loop:
INTREQR (dff01e) is readed and compared to $200 (bits 9):
->audio channel 2 finished

if equal game continue to run

So code of 68000 music player seems corrupt on 68020+... perhaps by SMC or instruction 68000 badly executed on 68020....

It's for this reason i need instructions & interuptions docs which compare 68000& 68020
CFOU! is offline  
Old 19 February 2013, 17:56   #4
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,062
what if more int requests happen at the "same time" ? you should "and" the value of intreqr with $200 and check for non-zero instead, otherwise you may loop forever under certain circumstances.. don't know if that's the problem, however..

Code:
loop:
move.w $dff01e,d0
and.w #$200,d0
beq loop
also remember to clear the request afterwards..
hooverphonique is offline  
Old 19 February 2013, 18:39   #5
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,742
Quote:
Originally Posted by hooverphonique View Post
what if more int requests happen at the "same time" ? you should "and" the value of intreqr with $200 and check for non-zero instead, otherwise you may loop forever under certain circumstances.. don't know if that's the problem, however..

Code:
loop:
move.w $dff01e,d0
and.w #$200,d0
beq loop
also remember to clear the request afterwards..

yes it seems problem, it's loop forever but only on 68020 if on winuae i set 68000 cpu indead of 68020 temporary freezes disappear...

but exact code is:
l:
Move.w $1e(a2),d1 ; rem: a2= $dff000
and.w D4,d1 ;rem: D4=$200 in general during freeze..
beq l
CFOU! is offline  
Old 19 February 2013, 19:03   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Sounds like you're looking for the 68000 Family Programmer's Reference Manual, and the 68000 and 68020 User Manuals. You can find them on freescale.com.
Leffmann is offline  
Old 20 February 2013, 01:19   #7
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,742
Quote:
Originally Posted by Leffmann View Post
Sounds like you're looking for the 68000 Family Programmer's Reference Manual, and the 68000 and 68020 User Manuals. You can find them on freescale.com.
thanx
CFOU! is offline  
Old 20 February 2013, 11:35   #8
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 46
Posts: 2,742
I think I found the solution but it is a little obscure

apparently three times the query was requested audio interuption (whereas no interest) to the CPU via DMA register INTREQ before going on the waiting loop interuption (to indicate that the wave to be completed play)

suddenly without me really understand yet why, the interupt was not activated when the sound stop and so game freezed on loop waiting interuption...

The CPU seemed disturbed by unnecessary two interupt requests ....

The most amazing is that I have already seen this type of code useless without freeze ...

But it is true that it is Gng is particularly well coded and fully works in 'multitask' with the interuptions (one could even say that it is improper is multitasking)

user mode it nothing happens.

just

t:
bra t:

everything else is multitasking and awaits an interrupt

the main code is in the interuption to address $ 60

in D0 is the value of the function is executed

I hope I was clear ...

what is your opinion about it?

Last edited by CFOU!; 20 February 2013 at 13:00.
CFOU! is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AlienBash I & II - Original Coder Contacted - Help Needed in Rescuing 68000 Source!! Heavy Stylus support.Games 241 11 August 2015 14:16
"16-32BIT Microprocessors: 68000/68010/68020" RedskullDC Coders. General 5 21 June 2008 23:59
Winuae: Sound & CPU Problems... + resulting PC Freeze Problem Zapp_Brannigan support.WinUAE 24 23 April 2008 16:50
Dream17: Temporary downtime squirminator2k Amiga scene 2 18 March 2008 11:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.07109 seconds with 15 queries