Previously it would show a dump of whatever device was next scheduled
to step, if it was Debuggable, but now each debuggable device has a
flag for whether that device is being debugging, and a system flag
to disable it entirely. When the system flag is set, it will try
to enable debugging on the device labelled "cpu". I need to also add
a way of setting a breakpoint on a named device, which will enable
debugging of that device
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.
I've added skeleton devices for the sound chips, and added the bank
register and banked area of ram mapped to the Z80's bus. Sonic1 will
now run (if the ym2612 device's size is set to 0x1000 instead of 0x04)
Previously it was storing data in the registers, which was an array
of u8, but now it's storing eg. full addresses for the scroll tables
so that they don't need to be fetched from the register values and
converted every rendering. I was thinking this would maybe make
DMA debugging easier, in particular.
The controller th count was starting at 1 instead of 0 which caused
inputs to be read incorrectly, as well as the fact that inputs are
inverted.
The sprite fix now draws them in the right order so that ComradeOj's
sprite test renders correctly, but games still render them broken
because of some other bug yet to be found
For systems that legitimately use 0 for black, this causes a
problem, so I instead use 0xFFFFFFFF for the mask colour which
corresponds to transparent white in ARGB format, which minifb
doesn't support anyways
It was previously decrementing addresses if the direction was from
registers to memory, but that's incorrect. It should increment the
address always when using an addressing mode other than the ARecDec
mode. I also added a memory location to the test cases to test the
MOVEM instruction by comparing what memory was read/written (but it's
only one u32 because that's the minimum we need)
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
The BusPort is created before the CPU and is passed to it. It can
have an offset, limit the address sizes, and break up bus request
beyond a certain number of bytes into multiple requests
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
We were trying to decode the effective address before fetching the
second instruction word for bitfield instructions, which was causing
it to use the wrong word for the offset:width information, which was
preventing the shell from printing to the screen after boot