[hatari-devel] IoMem question :
Nicolas Pomarède
npomarede at corp.free.fr
Tue Feb 1 23:55:53 CET 2011
Le 01/02/2011 23:03, Laurent Sallafranque a écrit :
> Hi,
>
> Address 0xff8006 is read only.
> So, if I don't want a program to be able to write at this address,
> should I declare the write part as WriteWithoutInterception or
> IoMem_VoidWrite) ?
>
> This value is hardware fixed, it is fixed in STMemory_SetDefaultConfig
> STMemory_WriteByte(0xff8006, nFalcSysCntrl);
IoMem_VoidWrite is for region where there's no IO reg specified and no
bus error on access (for example $ff820b doesn't "exist" on STF/STE)
IoMem_WriteWithoutInterception is for region where there's an IO reg
defined, but you don't care about emulating it.
So, in your case ff8006 is really defined, so you should use
IoMem_WriteWithoutInterception for better consistency.
Note that this doesn't prevent a program from writing at this address,
it just doesn't call a specific emulation's handler for this byte. The
byte will be written anyway in ff8006, it's just that if you don't do
anything with it in the emulation, it will be ignored.
If writing to this address doesn't give a bus error on a real hardware,
then you don't want to block the write, you just need to ignore it by
not using the content of IoMem[0xff8006].
Nicolas
More information about the hatari-devel
mailing list