Difference between revisions of "Talk:MSX emulators"

From Emulation General Wiki
Jump to navigation Jump to search
(Added exposition on fMSX's 'x' for Turbo R support.)
(No difference)

Revision as of 10:51, 6 November 2018

Proof that fMSX does not emulate the Turbo R

Responding to 212.252.97.163's recent edit to shift fMSX's support for the Turbo R from 'x' to '~' (i.e. from 'no' to 'no comment'):

One of the determinative differences of the Turbo R is a new CPU, the R800. Amongst other things, it introduces new operations. Amongst those are MULU[B/W] which have encodings ED C1, ED C3 and ED F3.

Get the fMSX source code from https://fms.komkon.org/fMSX/#Downloads. Open it up. The only CPU emulation included is named 'Z80' and is in its own top-level folder. Open that up. Open Z80.c and scroll to line 331. Note that no special meaning is ascribed to operations C1, C3 or F3 — they've merely named with the boilerplate DB_C1, DB_C3 and DB_F3.

Open CodesED.h to see all implemented ED instruction codes. Notice that DB_C1, _C3 and _F3 are not implemented; multiplies are not implemented at all.

Switch back to Z80.c and check out the function CodesED on 415, which is the dispatcher for instructions starting in ED. Notice that anything not implemented in CodesED.h ends up in a trap for bad operations.

The R800 also performs all the Z80 instructions, but with different numbers of clock cycles compared to the Z80.

Being a very primitive emulator, fMSX processes instructions atomically and advances time according to a list of the cycle lengths of each instruction. You'll find those from line 16 of Tables.h. Notice that there are no alternative tables for the R800.

So, fMSX:

  • does not implement the R800's extra instructions; and
  • does not have any means to vary instruction lengths in order to act a bit more like an R800.

Therefore: fMSX does not emulate the R800 CPU.

Therefore: fMSX does not implement the Turbo R.

Which isn't a problem, because it doesn't claim to.

There's no ambiguity here, no need to claim otherwise in the article.

Tommy (talk) 10:51, 6 November 2018 (EST)