[hatari-devel] Wotanoid problem : final fix before commit ?
Thomas Huth
huth at users.berlios.de
Sun Jan 24 21:12:20 CET 2010
On Sun, 24 Jan 2010 20:44:45 +0100
Laurent Sallafranque <laurent.sallafranque at free.fr> wrote:
> But in Wotanoid, the instruction is :
>
> move.l #-1,D0
>
Having another look at the disassembly that you've posted, I think I
might have another explanation for this problem. After moving -1 to D0,
you basically have this code here:
move.l D0,D2 ; -1 will be stored in D2
move.w #2,-(SP)
move.l A0,-(SP)
move.w #$3D,-(SP)
trap #1 ;Fopen
addq.l #8,SP
move.w D0,handle2
move.l A2,-(SP)
move.l D2,-(SP) ; D2 will be pushed on stack
move.w D0,-(SP)
move.w #$3F,-(SP)
trap #1 ;Fread
adda.l #12,SP
BUT: According to http://toshyp.atari.org/005001.htm, the GEMDOS does
not preserve the registers D0 - D2 during the trap, so D2 might have
been altered to another value during the Fopen !
So this load function might just work by accident on a real Falcon.
I suggest you try the following:
1) Create an IDE hard disk image and copy the game on it
2) Check wether it works from IDE disk now after you modified
ioMemTabFalcon.c
3) Add a breakpoint right before the above Fread trap to look at D2
when you've loaded the game from IDE disk.
4) Add a breakpoint right after the above Fread trap to look at D0
when you've loaded the game from IDE disk... maybe this helps to
understand the details of this problem.
Thomas
More information about the hatari-devel
mailing list