Michel Heily
5bc4c79d6e
arm: Implement MRS
...
Former-commit-id: 8c1528b2bcd08096f929c4ee940f1a1f5eac2911
2019-07-10 23:54:45 +03:00
Michel Heily
5f625b2209
Add special case for MSR immediate
...
Former-commit-id: f9fabb3c0d7c05243866b712096c2c82cf41672d
2019-07-10 23:48:14 +03:00
Michel Heily
a9bf2d25e0
arm: Implement Arm MSR_FLAGS
...
Former-commit-id: 64d2cf255304ecca02dadc55266d22bc1f92bb4c
2019-07-10 22:35:40 +03:00
Michel Heily
50086a8715
Fix word alignment for arm BX
...
Former-commit-id: 9223259793cd8ecccb02b40c428d32315c632bff
2019-07-10 22:35:40 +03:00
Michel Heily
2864f83681
Arm: Partially implement MUL
...
Former-commit-id: 3b37f5cbe327e15be4cee56572c2230dbda48082
2019-07-10 22:35:40 +03:00
Michel Heily
65de0c4e9d
Thumb 4 - Take care of "neg" case.
...
I overlooked it :/
Former-commit-id: 360eb755bcf343cddd98807e9faeff007c94cf64
2019-07-09 01:30:24 +03:00
Michel Heily
f7b2b48e5d
Refactor ALU code into its own module, and fix things.
...
* Fix overflow flag being ignored
* Fix barrel shifter misimplementations
* Rustfmt fixes
Former-commit-id: a14d50372f7850a04b204accf4e5d8b924e4b48e
2019-07-08 20:57:58 +03:00
Michel Heily
6eab76d52f
Impose a minimum length of 4MB for the gamepak memory
...
Former-commit-id: 08e66bff0bc39968e572b941da84c155a45f31c8
2019-07-07 23:33:47 +03:00
Michel Heily
d36da30618
arm: Impl LDR_STR_HS
...
Former-commit-id: 2baa0f2fb8cf855cb4626fbb1937e17f4e7d3035
2019-07-07 23:10:17 +03:00
Michel Heily
45f3bd6264
arm: Fix STR use of R15 as the base register (Rd)
...
Former-commit-id: 696733731a9996ebb90b7d4acf3341facc1ed228
2019-07-07 22:57:21 +03:00
Michel Heily
c2685c14d7
Impl more thumb, Fix more things, the usual
...
Former-commit-id: 02f1898bfd8dd50519f103bb367e358fc55c46e7
2019-07-06 23:38:08 +03:00
Michel Heily
8dc169d25d
fix: bug in some ALU opcodes
...
Former-commit-id: 7e05a11a709ad7f834916afa82ec5460068363f9
2019-07-06 18:47:42 +03:00
Michel Heily
600bebc9d2
Partially Impl Arm LDM_STM (give me a break)
...
Manually testing seems to work, too lazy to write any tests now,
Will do it after all instructions are complete, buggy or not.
Former-commit-id: 0f36c81d6451c706408dd3c4815bfb3abea1ff44
2019-07-05 18:39:10 +03:00
Michel Heily
4da863da9b
Fix carry flag on barrel shifter ops
...
Former-commit-id: 31cf2166d97fcdcca0dd9c59591f5e28b5b5f6cc
2019-07-05 18:31:08 +03:00
Michel Heily
d4b6952411
Impl Thumb 19, fix warnings and rustfmt
...
Former-commit-id: 8690aa25b1aa343b344776716b6213596bd1459a
2019-07-05 15:34:52 +03:00
Michel Heily
fb0d3acb14
Impl Thumb Format 1 untested
...
Former-commit-id: e80617fd415ba951310a42c79b6ca37251d0e250
2019-07-05 14:09:04 +03:00
Michel Heily
be9499c76d
Move cycle counting to CPU Core
...
This isn't accurate, I'm probably missing something but at least it'll
make the instruction implementation more clean for now..
Former-commit-id: de24b15e1a51e1998207e5ea96fc8543f2553a26
2019-07-05 13:08:07 +03:00
Michel Heily
984b17fa39
Fix arm mode STR insn
...
Former-commit-id: 80903a9054e9b0dac07a5e2bb3cff7b0e722d438
2019-07-04 01:56:11 +03:00
Michel Heily
eaf972de93
Implement thumb format 6 (PC-Relative Load) and test it.
...
Former-commit-id: ae161edb0c8968913d2ef72a14053c118c6f7692
2019-07-03 02:15:16 +03:00
Michel Heily
b82874809f
Implement thumb format3 instruction and add a test for it.
...
Former-commit-id: 8cf6664027dc3d5dbeb6d2ca3d089820baac2709
2019-07-03 01:26:48 +03:00
Michel Heily
4011911cca
Pass around "Bus" instead of "SysBus"
...
Former-commit-id: c20dae7dd3ddcb3bd8f671a16fd67a241bd6c459
2019-07-03 01:22:36 +03:00
Michel Heily
6f81c236a6
Mega Commit #2 - Add some thumb decoding and disassembly
...
Former-commit-id: e3a89ac681a8d6f6f0bee85b32f64d181e11242f
2019-07-03 00:03:35 +03:00
Michel Heily
cbddeffd91
arm: Implement MSR_REG and fix some prefetching errors
...
Former-commit-id: 177b8966159ed86472b0d4d031363df72d46807a
2019-07-02 16:53:29 +03:00
Michel Heily
70179984d0
cpu: arm: Fix alu_add_update_carry function
...
Woopsie
Former-commit-id: 2da74e4bfd4b59a2885519a99f4b2c3d83031ee2
2019-07-01 19:25:42 +03:00
Michel Heily
2081b70ee2
cpu: arm: Fix R14 for branch with link instruction
...
Former-commit-id: bc927d86e5a170b0e4568b4ceeb7832d23ad309c
2019-07-01 19:24:52 +03:00
Michel Heily
ea8c4f2a60
Refactor ArmInstructionFormat => ArmFormat
...
Former-commit-id: 0ba6e1e6efedad55b2716b3f2ab5a2a629dd18a5
2019-07-01 17:51:07 +03:00
Michel Heily
6b225d776d
Implement all memory mappings. Reformat many files.
...
Former-commit-id: c0a62b610e62d2db2a4daf4aeef40068820daa52
2019-07-01 17:45:29 +03:00
Michel Heily
bd053354cb
Implement LDR/STR (not tested) and add cycle counting
...
Former-commit-id: ec9e6bfc2a94291e47d41ff7d839007879d3d694
2019-06-30 16:59:37 +03:00
Michel Heily
967ccca8dd
Mega commit - model CPU pipelining.
...
I except many bugs to arise..
Former-commit-id: bcc6ea57af803f783b0dd548b50956b3ccda2b1a
2019-06-29 22:23:12 +03:00
Michel Heily
bd7fd472cf
arm: Add tests for ldr/str
...
And also test disassembling while at it..
2019-06-28 12:36:19 +03:00
Michel Heily
d11620e65b
cpu: Add SWI instruction
...
Also cleanup code, and add a test for swi decoding
2019-06-28 11:46:36 +03:00
Michel Heily
1a0725f1a3
cpu: Model exceptions
2019-06-27 15:13:38 +03:00
Michel Heily
6552329310
cpu: Kinda implement data processing instructions
...
When I say "Kinda", I mean that it is not tested well.
2019-06-27 13:16:00 +03:00
Michel Heily
e5d93f689f
Work..
...
Refactor disassembler to a struct.
Implement more commands;
2019-06-27 13:15:34 +03:00
Michel Heily
22a915ec85
Add continue command
2019-06-27 13:15:34 +03:00