Commit Graph

68 Commits

Author SHA1 Message Date
transistor
941c793523 Added pixel encoding, requested by frontend
The hope was that this would reduce the amount of copying and bit
shifting required by the frontend to get the data on screen, but
it doesn't seem to offer much advantage, surprisingly.  I'll leave
it in though.  There are a few other minor tweaks included here to
try to improve the performance a bit
2023-03-25 10:51:46 -07:00
transistor
0ac3f48b64 Minor changes 2023-03-05 13:32:45 -08:00
transistor
ea2fc95905 Cleanup 2022-10-13 20:22:29 -07:00
transistor
cd89a4c57d Minor tweaks to the update loop to keep it more realtime 2022-10-11 22:36:49 -07:00
transistor
0b27ac04e7 Minor fixes to audio 2022-10-11 10:28:59 -07:00
transistor
925a4e0750 Added log crate 2022-10-09 09:40:20 -07:00
transistor
721162684b Updated todo 2022-10-08 13:25:28 -07:00
transistor
a9b8633531 Added mouse support, but it's not used yet 2022-10-02 20:39:02 -07:00
transistor
a9d51fb919 Added DAC to ym2612 and changed mixing method 2022-10-02 10:29:34 -07:00
transistor
5278c301ef Added .smd file decoding 2022-09-30 11:24:11 -07:00
transistor
da980b8ae8 Fixed regression when fixing interrupt handling in 68k
Mortal Kombat 2 was working but somewhere while getting the harte
tests to work, I fixed interrupts to change the flags before they're
pushed to the stack, in order to match the expected behaviour from
the tests when an address error occurs (sr is changed and the stack
push causes the error).  I correctly saved the state of sr in the
function for group0 interrupts, to push to the stack later, but the
normal interrupts was saving sr *after* the flags were changed...
Now it saves sr beforehand

I also included some changes to the gfx interface to allow taking
frames, to fix a compile error introduced by the last commit.
2022-09-29 20:21:00 -07:00
transistor
083f3607ba Major reorganization into crates
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
2022-09-24 23:14:03 -07:00
transistor
eea8840483 Fixed the ABCD/SBCD/NBCD instructions (almost)
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
2022-09-18 20:34:04 -07:00
transistor
96e79329e7 Added ability to exclude only extended exceptions 2022-09-13 18:42:49 -07:00
transistor
c161fe5eb9 Fixed command line arguments after upgrading to clap 3.2.20 2022-09-12 22:43:55 -07:00
transistor
8cf8c07082 Added frequency setting to ym2612 2022-01-16 21:42:07 -08:00
transistor
a60e72fc04 Fixed controllers in Earthworm Jim (but not Mortal Kombat 1) 2022-01-16 10:39:57 -08:00
transistor
ec461a61c0 Added support for window in Genesis 2021-12-31 11:40:13 -08:00
transistor
8c58903f73 Rewrote the Genesis/YM7101 draw loop to work pixel-by-pixel
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
2021-12-30 22:46:57 -08:00
transistor
aee956f2fa Refactored ym7101 (Genesis VDP) code
The memory handling and DMA transfer code is separate from the
drawing code, but it's still a bit clumsy so I'll probably change
it more eventually
2021-12-30 11:27:50 -08:00
transistor
5d6af61531 Incomplete addition of shadow/highlight mode for Genesis 2021-12-29 10:54:43 -08:00
transistor
1534644409 Added command line arg to adjust the speed of simulation 2021-12-28 22:36:52 -08:00
transistor
188717e228 Added option to ignore reads/writes to unmapped bus areas 2021-12-25 16:30:07 -08:00
transistor
5c415da3c3 Minor fixes 2021-12-21 21:02:55 -08:00
transistor
18e54f4a44 Added line-based hscroll and fixed an hscroll bug
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
2021-12-20 20:11:43 -08:00
transistor
1b6cbfa831 Fixed some decoder bugs in m68k 2021-12-14 16:06:34 -08:00
transistor
148b4dcf2c Cleaned up warnings 2021-12-13 12:00:24 -08:00
transistor
39068fec2a Added audio support
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.
2021-12-12 15:20:09 -08:00
transistor
8db32ab9b3 Modified frame/frameswapper a bit 2021-12-08 13:52:11 -08:00
transistor
6dbae9620d Renamed SharedData to HostData 2021-12-07 14:29:38 -08:00
transistor
e41970391e Added LDI, LDD, and LDDR instructions for Z80 2021-12-06 20:44:44 -08:00
transistor
d274186388 Added Macintosh 128k/512k work in progress 2021-12-06 15:04:08 -08:00
transistor
9464e4c75a Renamed joystick to controller in host traits 2021-12-02 15:04:41 -08:00
transistor
03f23da544 Added A and F instructions to m68k 2021-11-23 11:45:11 -08:00
transistor
812f6800a8 Minor fixes 2021-11-18 08:46:41 -08:00
transistor
1d8065026d Minor fixes 2021-11-15 20:51:33 -08:00
transistor
a00d7b2f26 Fixed warnings 2021-11-13 11:39:20 -08:00
transistor
9d799e308d Added command line options for minifb and TRS-80 2021-11-11 09:52:18 -08:00
transistor
7e999d4c3a Changed the way frontend works and added keyboard support 2021-11-06 21:44:25 -07:00
transistor
b6cccea437 Added read only memory and debugger numbered continuations
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.
2021-11-03 15:33:22 -07:00
transistor
e0ef1d8fd9 Added start of Z80 decoder 2021-11-01 22:06:40 -07:00
transistor
58fc9ac827 Moved the debugger out of m68k 2021-11-01 16:51:45 -07:00
transistor
8fe76334af Added joystick host adapter 2021-10-31 11:00:14 -07:00
transistor
a02d8e5241 Fixed graphics finally for YM7101 scrolls 2021-10-30 16:17:28 -07:00
transistor
93c080eae6 Fixed interrupts
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
2021-10-29 22:02:29 -07:00
transistor
c1ca666aa4 Simplified event queue 2021-10-29 20:06:15 -07:00
transistor
250c0e83d2 Minor fixes 2021-10-29 15:05:41 -07:00
transistor
109ae4db55 Added minifb frontend with very WIP genesis peripherals 2021-10-27 21:01:18 -07:00
transistor
8bbffbe34c Modified the read interface yet again 2021-10-26 17:33:23 -07:00
transistor
1ad7ad1807 Added Debuggable trait and added tests 2021-10-26 12:17:59 -07:00