I wanted to make this a bit more modular, so it's easier in theory to
write external crates that can reuse bits, and selectively compile in
bits, such as adding new systems or new cpu implementations
There are still some failures on the SBCD, but the logic is identical
to other emulator's calculations, but the test case doesn't seem to be
the way it should behave, so I'll leave it for now
In order to more accurately emulate the VDP, the main draw loop is
now going through each pixel on the screen and calculates the various
cells that should be displayed, gets the exact pixel data, and then
draws lines them all up in priority-order, and whichever is the first
non-mask pixel colour gets put into the frame buffer. It's rather
verbose and duplicative, but I'll fix it up now that I have something
working
The hscroll table was multiplying by 2 (because scroll a and b values
are next to each other) but it should have multiplied by 4 because
each value is also 2 bytes and the array is of u8.
I added hscroll by-line support by using a different function for the
line scroll vs the cell or whole screen scrolling. There are still
a bunch of glitches in scroll b's scroll values that I need to fix
It's better than it was but there are still minor drop outs due to
a buffer underrun I think (could be other timing issues related to
the update loop or something else). Right now, the audio chips
just have some code to produce sine waves for testing.
There is also a breakpoint error, so that if a read-only memory
location is written to, it will escape to the debugger rather than
exiting the program.
Previously the m68k wasn't masking interrupts with an equal priorty.
I also modified how they work, such that the cpus will check the
controller rather than wait for the notification call
Machine definitions are now in their own module and can be
optionally compiled in, and there is now a console and soon
to be gui version of the compiled binary, with individual
binaries for each machine