[hatari-devel] Twelve demo bombs with fast-forward and freezes on Falcon?

Nicolas Pomarède npomarede at corp.free.fr
Wed Jun 1 00:56:55 CEST 2011


Le 01/06/2011 00:41, Laurent Sallafranque a écrit :
> I've commented the IoMem_bput line, and I don't get anymore the M68000
> Bus Error writing at address $ff8901.
> (tested with voice.prg). Of course, without this line, it doesn't work
> well, as sound continues to play.
>
>
> Should I use something else than IoMem_bput here (IoMem_WriteByte for
> example) ?
>
> What's the difference between these to memory acces ?

Use the source :)

IoMem_bput in ioMem.c is checking that the cpu is not doing a bus error 
(supervisor mode set, correct access size, ...)

IoMem_WriteByte in include/ioMem.h is modifying the memory without any 
check.

So, basically IoMem_bput should be called when emulating the cpu and you 
want to emulate all the checks done on a real hardware when memory is 
accessed by the cpu.

IoMem_WriteByte is when you want to modify the Atari's memory by just 
changing some byte without doing any checks.

-> In your case where you want to directly modify memory, you must 
always use IoMem_WriteByte


Nicolas



More information about the hatari-devel mailing list