On Thu, Sep 20, 2001 at 01:39:41PM +0200, [EMAIL PROTECTED] wrote:
>
>
>
> Ladies and Gents,
>
> I have two small technical questions for ya'll.
> (1) How can I check in my program if it is running on an emulator or on 'the
> real thing'?
On a real good emulator you can not test that.
On the more imperfect emulators you could test flag behaviour of some Z80 codes.
Especcially the 'not used' bits in F register could give an indication
The only real good test I can think of now is using a loop and see how long the
horizontal retrace can be read from the status registers in the VDP.
Or more complicated to emulate correctly (but also to program as a test...) do some
VDP command that copies the VRAM in the sprite area to some other spriteVRAM area
(while the sprites are turned on) during this command write via the out ports other
values in the source vram. Since this vram is often used (by the vdp-command,the
displaylogic and the out-commands) the real msx-vdp sometimes doesn't have a change to
write the value from it's buffer to the vram before your cpu places a new value in
this internal writebuffer. Afterwards check if all values you have written are in fact
in the vram. If they always are perfectly there, then you are probably running on an
emulator.
> (2) Which emulators support (all) undocumented Z80 instructions?
I shouldn't be surprissed Sean has patched the Z80 in the MAME/MESS project
fMSX definietly doesn't have them.
Besides if they are undocument then they are rather hard to implementate :-)
>
> Regards,
>
> Jeroen Smael
>
>
> --
> For info, see http://www.stack.nl/~wynke/MSX/listinfo.html
>
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html