[hatari-devel] Memory, Falcon and TT (24 vs 32 bits computers)

Thomas Huth huth at users.berlios.de
Wed Jan 19 19:59:22 CET 2011


Am Wed, 19 Jan 2011 11:33:51 +0100 (CET)
schrieb LAURENT SALLAFRANQUE <laurent.sallafranque at arkea.com>:

> Hi,
> 
> While trying to let run hatari's new core, I see that for 68020 and
> upper CPUs the memory it taken into account in 32 bits and not 24
> bits.
> 
> A quick look at iomem, ioMemTabFalcon, ioMemTabTT, and probably some
> other parts of the code shows me that all addresses are coded in 24
> bits ($FF8000 instead of $FFFF8000).
> 
> There's also a variable for taking this into account in WinUae CPU :
> currprefs.address_space_24. 
> 
> There's also a mask : regs.address_space_mask = 0xffffffff (32 bits)
> or regs.address_space_mask = 0x00ffffff (24 bits)
> 
> 
> I think we'll need to adapt the actual uae-cpu code to take this into
> account if we want to be able to keep the 2 CPU's in the same branch.
> 
> At least, changing all the IOmemTab... addresses to have all of them
> in 32 bits (also for the ST ?) and apply the memory mask for each
> memory call ?
> 
> 
> Any advise ? 

I don't think that you've got to change here much. The old UAE core
already has the address_space_24 configuration variable, which should
theoretically be able to switch between 24 and 32 bit mode. 
The magic is here only done in uae-cpu/memory.c: When in 24 bit mode
(which is the only working mode in Hatari right now), the same address
banks are mapped multiple times already, so that it does not matter
which byte has been put in the highest 8 bits of the the address.

I think you've only got the change both memory.c files a little bit if
you want to support Fast-RAM (beyond the 16 MB barrier) emulation.

 Thomas



More information about the hatari-devel mailing list