[hatari-devel] Union demo abort with new EmuTOS?

Eero Tamminen oak at helsinkinet.fi
Fri Nov 11 00:18:30 CET 2011


Hi,

On perjantai 11 marraskuu 2011, Thomas Huth wrote:
> Am Thu, 10 Nov 2011 23:20:50 +0200
> schrieb Eero Tamminen <oak at helsinkinet.fi>:
> > > > Hatari can avoid the abort by checking that VDI_OldPC is valid
> > > > (see attached patch), but how I can make it to raise illegal
> > > > instruction exception if it isn't?
> > > 
> > > I'd rather suggest to chech m68k_getpc() being within the cartridge
> > > memory region when OpCode_VDI has been called.

How/where one would get the cartridge memory area?


> > Any particular reason why it should be done like that?   IMHO checking
> > VDI_OldPC is cleaner, as that must anyway be valid when this is
> > called.
> 
> Well, VDI_OldPC does not seem to get cleared during reset yet.

Good point.

> So when you first run with VDI mode enabled, then disable it, your test
> will fail.

Only if reset would be done during the real VDI trap call _and_
emulation runs into illegal VDI_OPCODE instruction before calling
any other VDI trap functions (after the reset).

Of course that needs to be handled too, but it seems a rather rare
case.  This was first time I encountered illegal VDI_OPCODE in
a program, and getting these additional two conditions to happen
also sounds pretty unlikely. :-)


> Of course that could also be fixed easily, in that case your test
> should be working fine, too.


	- Eero



More information about the hatari-devel mailing list