Re: [hatari-devel] add support for TT ram -> problem with HD emulation and DTA

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 17/12/2014 00:53, Nicolas Pomarède a écrit :

Some updates, I found an issue between TT ram and HD gemdos emulation.

If you boot TOS 3.06 with HD gemdos emulation, you will get some messages :

GEMDOS Fsfirst() failed due to invalid DTA address 0x121c00e0

And you can't access c: or whatever letter your HD has been assigned.

After tracing various calls, the problem is in gemdos.c where basically all code that does HD interception expect the DTA to be in standard RAM, not in valid TT RAM :(

In GemDOS_SFirst() :

        nDTA = STMemory_ReadLong(STMemory_ReadLong(act_pd)+32);

act_pd = $771e, and the content of $771e is $0100000e.

But STMemory_ReadLong only handles RAM, so this reads at $0000000e instead of 0100000e, and everything goes wrong after that :(

I will update the STMemory_Read/_Write functions to work with any kind of memory, and hopefully this sould fix this issue.

There's also another problem when saving/restoring snapshot :

                Addr = ((Uint8 *)pDTA - STRam);
                MemorySnapShot_Store(&Addr,sizeof(Addr));

This also assumes pDTA is in RAM, which is not the case when TT RAM is enabled. To fix this, instead of using pDTA which points to the host's memory where DTA is, I will store the DTA value (in Atari's memory) and dereference it only when needed with STMemory_STAddrToPointer()


So, only solution for now to have extra TT RAM and HD is to use a direct HD image, not the HD gemdos emulation.

Nicolas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/