Re: [hatari-devel] GemDOS_Write too restrictive

[ Thread Index | Date Index | More Archives ]

Am Thu, 5 Jul 2018 17:40:44 +0200
schrieb Miro Kropáček <miro.kropacek@xxxxxxxxx>:

> Hi all,
> today I tested one of my testing tools (a ROM dump) in Hatari and to
> my surprise, it didn't work. Why? Because Fwrite's counter-part,
> GemDOS_Write, puts its nose where it shouldn't and refuses to access
> the ROM area.
> Is there any reason why? IMHO the function should save whatever area I
> want, even if it's hardware.

Hatari has to check that the emulated code only accesses valid ST memory
here, otherwise it could happen that the 68k code gets access to the
host memory (e.g. if you try to call Fwrite with an address > 0x1000000
or if you try to use an address between the RAM size and 0xe00000 if
ENABLE_SMALL_MEM has been set).

But yes, we should also allow access to the ROM area here. Does it work
if you replace the 

 if ( !STMemory_CheckAreaType ( Addr, Size, ABFLAG_RAM ) )


 if ( !STMemory_CheckAreaType ( Addr, Size, ABFLAG_RAM | ABFLAG_ROM ) )

in that GemDOS_Write function?


Mail converted by MHonArc 2.6.19+