Commit Graph

375 Commits

Author SHA1 Message Date
transistor a3fbcc7c16 Fixed some DIV tests 2022-09-14 21:52:24 -07:00
transistor 2a9ca9beae Fixed LINK instruction 2022-09-14 20:09:07 -07:00
transistor d074b7fc5e Test after fixing MULS 2022-09-13 22:18:22 -07:00
transistor 099b2fcb55 Copied over test results 2022-09-13 22:01:54 -07:00
transistor 42ca95ef5a Minor changes 2022-09-13 22:00:34 -07:00
transistor 575501599a Fixed MULS tests
DIVS tests are no better
2022-09-13 20:56:19 -07:00
transistor 96e79329e7 Added ability to exclude only extended exceptions 2022-09-13 18:42:49 -07:00
transistor a39557e233 Minor fixes 2022-09-13 16:57:56 -07:00
transistor c161fe5eb9 Fixed command line arguments after upgrading to clap 3.2.20 2022-09-12 22:43:55 -07:00
transistor 873741846c Implemented the CHK and NEGX instructions 2022-09-12 22:19:01 -07:00
transistor 9ff528c463 Fixed some AddressError tests
Adjusted the PC value stored when an Address Error fault occurs to
use the size of the access operation.

I also flipped the IN bit in the word that's written to the top of
the stack on an AddressError, even though that's opposite of what
the docs say.  It seems to pass the tests.  I probably have something
else going wrong, but it shouldn't be an important bit either way.
2022-09-12 21:47:36 -07:00
transistor 42bfabb743 Added test results 2022-09-11 21:52:29 -07:00
transistor 1a098bde6f Fixed various m68k bugs
Added support for RTR and RESET.
Fixed flags behavior for ASd
Added function to set PC, and fixed some instruction's handling of
an address fault a bit better
2022-09-11 21:27:29 -07:00
transistor d9a1295dda Fixed ADDX/SUBX instructions 2022-09-11 20:08:29 -07:00
transistor c4a99245e3 Added option to exclude or only run tests that involve an exception 2022-09-11 18:52:19 -07:00
transistor 03f4e11e3b Added proper AddressError handling to m68k
Also a few fixes, such as correcting a decode error in ADDX
2022-09-11 17:42:54 -07:00
transistor 34bdd86772 Added address mask to memory accesses from the tests 2022-09-11 14:51:58 -07:00
transistor aa39b4b11f Modified to use SR mask so that certain bits in SR are always 0 2022-09-11 14:50:37 -07:00
transistor 0582625b5e Fixed some issue with m68k
Some debug code was enabled that prevented illegal instructions
from being handled normally with a processor exception

The brief instruction word decoding could cause an illegal instruction
if it didn't match the docs, but the actual implementation would not
complain in those cases, so I modified it to not perform validation
for <=MC68010

Increment and Decrement addressing modes, when using the stack pointer,
will always inc/dec by at least 2 bytes, even if it's a byte operation,
to keep the stack aligned to the nearest word boundary
2022-09-10 21:09:35 -07:00
transistor 27f71b0f33 Added test results 2022-09-10 20:49:26 -07:00
transistor 1a3d8cc0c5 Fixed issue with Inc/Dec addressing modes
For instructions that use an operand twice, where it called
get_target_value and set_target_value, if the addressing mode was
one where it would increment or decrement a pointer, it was
causing a double inc/dec because of the two calls to get/set target.
I added an argument to let the functions know if they will be called
twice, in which case it assumes that get will be the first and set
will be the second, and inc/decs only once in the appropriate function
for whether it pre-incs or post-decs
2022-09-10 14:27:19 -07:00
transistor c53253c050 Added more options to run select tests to harte test runner 2022-09-10 14:08:01 -07:00
transistor f3a177489e Fixed the percentage summary for the harte tests 2022-09-09 23:43:06 -07:00
transistor c57c8f87b4 Added test running for Tom Harte's ProcessorTests test suite 2022-09-09 23:17:33 -07:00
transistor 8060f7179b Fixed some warnings 2022-09-09 22:31:55 -07:00
transistor 2c2b8e58b4 WIP 2022-09-08 19:51:29 -07:00
transistor 62a484d317 Modified the parser to work on the entire input
Previously it was going line by line, but that makes it hard to
properly parse multiline comments, so I modified it to include line
terminators in the token stream.  I also added parsing of /* */
and | \n comment types.  There is still a problem with line numbers
in the post-parsing phases, but they seem correct in the parser/lexer
stage.  It's still not able to parse the syscall.s file from Computie
but it's mostly just issues with named constants preceeded by a
"#" or "-" character.  As for the encoding stage, it has a problem
with a move instruction that uses a label.
2022-05-15 20:44:36 -07:00
transistor 586a16509f Added an assembler for the m68k
It can encode some basic instructions but not the more complicated
addressing modes or special instructions.  It can keep track of
labels and patch the displacement addresses after assembling the
output data, but it doesn't check for duplicates or that a label
has been declared before it appears.  It also doesn't take into
account the origin yet.  To run it, there is an m68kas command
that will take a file and print the data:
```
cargo run -p moa --bin m68kas <filename>
```

It's not yet tied into the rest of the system, but could be used in
the debugger to allow insertion of new code into a running system.
2022-05-12 21:53:34 -07:00
transistor 061c13fdc7 Updated sn76489 2022-01-26 19:15:46 -08:00
transistor 54bf7a3085 Renamed moa-ym2612 to moa-synth, and put CircularBuffer into its own file 2022-01-26 11:14:52 -08:00
transistor f464bfa1e0 Fixed audio glitch (but haven't cleaned up code) 2022-01-26 11:12:09 -08:00
transistor 749a9d2250 Added binary to test simple synth sounds for ym2612 2022-01-18 20:24:18 -08:00
transistor 8cf8c07082 Added frequency setting to ym2612 2022-01-16 21:42:07 -08:00
transistor 1413225463 Minor fix 2022-01-16 10:56:32 -08:00
transistor a60e72fc04 Fixed controllers in Earthworm Jim (but not Mortal Kombat 1) 2022-01-16 10:39:57 -08:00
transistor d21e2c4d6a Updated dev.to link in part3 post 2022-01-14 10:17:16 -08:00
transistor a8b59fd668 Updated part3 of Emulating the Genesis 2022-01-13 15:53:40 -08:00
transistor 867f41b77f Added dev.to link to part 2 post 2022-01-12 10:55:43 -08:00
transistor 878bad0b26 Updated part 2 of the Emulating the Genesis series 2022-01-12 10:37:50 -08:00
transistor 22aca270c0 Added dev.to links to posts 2022-01-10 10:00:26 -08:00
transistor 2b51dd3fdd Added part 3 of the Emulating the Genesis series 2022-01-09 21:19:13 -08:00
transistor 2e9a9aa8d9 Minor fixes 2022-01-09 21:18:11 -08:00
transistor 3fc1f6270b Added part 2 of the Emulating the Genesis series 2022-01-09 15:43:41 -08:00
transistor 90d4f0f526 Updated readme 2022-01-09 15:38:21 -08:00
transistor dac7ff259e Minor fixes 2022-01-09 15:35:15 -08:00
transistor 7a185846ed Added part 1 of the Emulating The Genesis series 2022-01-09 12:38:40 -08:00
transistor ba298fad64 Minor refactoring 2022-01-08 19:48:04 -08:00
transistor b8906fdbb1 Minor fixes 2022-01-06 23:40:22 -08:00
transistor c6eeed03ff Added hackish H/V counter for YM7101 2022-01-02 15:44:41 -08:00
transistor ba1dc78ff1 Added video demo to README 2021-12-31 14:49:26 -08:00