On 2011-02-16 23:45:37 -0500, sicklittlemonkey said:
On Feb 17, 1:52�pm, "Michael J. Mahon" <mjma...@aol.com> wrote:Sather has a good table of when in each instruction the bus data is sampled.Yeah, those tables are gold. I've often thought about writing a "micro-coded" CPU emulation, say 3 extra bits to the cycle count, so 8 switch cases per instruction (I think that's enough cycles) and then only fetch the video data on the final data bus read (if any).
I don't think that's really necessary for this purpose, but it might be useful to implement the CPU emulation as a cycle-by-cycle state machine for other emulation purposes. For example, that's the best way I can think of right now to switch video modes at the exactly correct cycle. It would also let you correctly implement some of the weird effects you see when switch video modes in the middle of the displayed portion of a scanline.