Commit Graph

651 Commits

Author SHA1 Message Date
Adrian Conlon
8823bb6610 Refactor the *EndianProcessor classes, such that their implementation is no longer in header files.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 22:51:56 +01:00
Adrian Conlon
3a4235f651 Whoops: The NMI line needs to be powered on by individual processors now it's no longer part of the Processor base class.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 22:50:18 +01:00
Adrian Conlon
ab78ba5db0 Start adding definition of BA/BS flags.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 14:55:57 +01:00
Adrian Conlon
1212e8d4f0 Tidy some processor virtual specifications.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 13:35:53 +01:00
Adrian Conlon
535346dede Whoops: missed UNLIKELY specifier on the 6502 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 13:17:14 +01:00
Adrian Conlon
ae66b39dac Add a couple of LIKELY/UNLIKELY specifications to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 12:51:43 +01:00
Adrian Conlon
c105ee37bf Have a stab at sorting out processor pin handling.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 12:09:26 +01:00
Adrian Conlon
17c46264e9 Match the GameBoy code to the updated handling of reset (etc.) interrupts.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 01:57:22 +01:00
Adrian Conlon
6d4223c368 Start moving towards reset being just another style of interrupt.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-25 01:34:30 +01:00
Adrian Conlon
bca7977a23 Whoops: correctly generalise DAA code on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 13:05:29 +01:00
Adrian Conlon
f8097af5a4 Whoops: correct overly enthusiastic shift on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 12:57:04 +01:00
Adrian Conlon
0649796575 Small code tidy in the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 12:36:25 +01:00
Adrian Conlon
adb6433737 Easier to read flag handling in the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 12:30:16 +01:00
Adrian Conlon
21e8360dc1 First stab at interrupt handling on the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 12:14:14 +01:00
Adrian Conlon
1eb59279a8 Remove unneeded powerOn override from the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 10:54:16 +01:00
Adrian Conlon
57928602d5 Tidy instruction prefixing in the 6809, such that executed/ing instruction events fire correctly.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 10:49:13 +01:00
Adrian Conlon
a43b1109bc Add TST instruction to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 00:33:18 +01:00
Adrian Conlon
c7ca555995 Add various SUB/SBC instructions to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-24 00:14:44 +01:00
Adrian Conlon
595a9a0af7 Tidy the formatting within the 6809 processor code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 23:22:14 +01:00
Adrian Conlon
722e7b89c2 Add implementation of ST instruction for the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 23:09:19 +01:00
Adrian Conlon
1e32514e1d Implement SEX/SWI/SWI2/SWI3/SYNC/TFR instructions for the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 14:09:46 +01:00
Adrian Conlon
e555fe335f Whoops: correct return values of 6809 branch helpers.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 09:32:37 +01:00
Adrian Conlon
6af8641b45 Tidy instruction comments a little on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 09:22:17 +01:00
Adrian Conlon
224c254223 Add stubs for any remaining instruction sin the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-23 00:43:56 +01:00
Adrian Conlon
4703b89a42 First stab at 6809 branching
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 23:06:36 +01:00
Adrian Conlon
90fb124bd7 Whoops: RTI is 3B in the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 10:24:12 +01:00
Adrian Conlon
10684a02f4 Add RTI/RTS instructions to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 10:21:22 +01:00
Adrian Conlon
07248972bf Add implementations of ROL/ROR for the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 09:11:02 +01:00
Adrian Conlon
6f6e88f003 Tidy up instruction timing for the PUL/PSH instructions on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 08:45:38 +01:00
Adrian Conlon
117f03cbd1 Whoops: Correct PULS/PSHU/PULU instructions on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 08:19:44 +01:00
Adrian Conlon
1556e82313 Whoops: CWAI has to flag that the entire range of registers has been saved. (6809)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 01:03:54 +01:00
Adrian Conlon
86c9ade43f Add PSH/PUL instructions to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-22 00:34:16 +01:00
Adrian Conlon
905e7d3d44 Whoops: Correct cycle counts for the OR instruction on the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 23:09:04 +01:00
Adrian Conlon
551c26bb3c Add OR instruction to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 23:07:22 +01:00
Adrian Conlon
06f4300c38 Added MUL instruction to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 22:45:33 +01:00
Adrian Conlon
c571956377 Add LSR implementation to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 21:59:25 +01:00
Adrian Conlon
05ca4166c7 Add LEA instruction to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 20:50:43 +01:00
Adrian Conlon
a917fb0d4c Add LD instructions to the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 18:57:20 +01:00
Adrian Conlon
2a3b0a5291 Add JMP and JSR instructions to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 18:10:38 +01:00
Adrian Conlon
d44718ed22 Add INC instruction to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 17:01:20 +01:00
Adrian Conlon
8c8c02f4b7 Add EXG instruction to the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 14:51:56 +01:00
Adrian Conlon
f1f64dad93 Add DEC and EOR instructions to the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 13:29:52 +01:00
Adrian Conlon
00ca20dbe4 Add DAA to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 12:25:58 +01:00
Adrian Conlon
0882513762 Add CWAI command to the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 09:52:03 +01:00
Adrian Conlon
b4abd7c739 Add COM instruction to the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-21 09:01:15 +01:00
Adrian Conlon
aa1a461db7 Whoops: missed a couple bad type conversions in the 6809 processor
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-20 22:20:24 +01:00
Adrian Conlon
90805e76bf Try to share more flag adjustments in the 6809 implementation
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-20 22:18:41 +01:00
Adrian Conlon
9122b5aa76 Whoops: missed carry adjustment for the 6809
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-20 12:54:01 +01:00
Adrian Conlon
dad5ee8926 Add CMP implementations for the 6809 (tricky!)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-20 11:52:09 +01:00
Adrian Conlon
fc31ae84d5 Add 6809 CLR instructions.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-19 17:03:32 +01:00