Talk:Master System emulators

From Emulation General Wiki
Revision as of 03:01, 3 March 2019 by Tommy (talk | contribs) (TwoMBit is not cycle accurate: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

TwoMBit is not cycle accurate

It claims to be, but most likely predates the latest VDP discoveries. In particular:

See the documentation by Mask of Destiny here. The VDP has a certain number of 'external slots' per line — these are when it will permit a CPU-directed memory access to occur. The net timing cost for the CPU to put a byte into video memory is: (i) a fixed delay; plus (ii) the variable amount of time until the next external slot. It *is not a fixed amount*.

However, check out TwoMBit's VDP.cpp: the one-two of initDelay() and updateDelay(), initiated by write_port_BE(...), apply a fixed cost to memory accesses of the worst-case access time.

TwoMBit therefore does not accurately model the real hardware.

Any one deviation is sufficient to establish the point, but I note also just from a cursory glance that it doesn't calculate sprite overflow as the raster runs, so will set that flag at the wrong time.

For these reasons, I have demoted its table entry from 'cycle' accurate to 'very high' accuracy. — Tommy (talk) 22:01, 2 March 2019 (EST)