Commit graph

74 commits

Author SHA1 Message Date
Michel Heily eb2a1a02fe Implement background scrolling!
tonc's brin_demo.gba now works as intended :)


Former-commit-id: 596c063c5968534f42e42f52203c85262b9c6fa2
2019-07-31 00:52:46 +03:00
Michel Heily f862209911 Support axis flip for tiles
Former-commit-id: daefb380ab2dfcee600297690dcc0c7c1a37f911
2019-07-29 09:46:12 +03:00
Michel Heily 90edebbe82 Align to halfword for thumb branch long instructions
Former-commit-id: f75e4baf003dcb7c535db3692383cc95575dfd81
2019-07-29 01:55:16 +03:00
Michel Heily e962150aaf Start working on Interrupts.
it kinda works now, but needs testing.


Former-commit-id: 8510314cce248a737d492d935cf5b48f86d920ed
2019-07-29 01:28:22 +03:00
Michel Heily 66a484e3ae Fix mode0 calculation of tile map entries.
tonc's hello.gba demo now works correctly :)


Former-commit-id: ead3a01e810f69503abbe8bddd0853433862549b
2019-07-27 23:28:00 +03:00
Michel Heily f39095a03b Fix thumb conditional branch offset
Former-commit-id: b42f233b7f2ca5d427b0e36860a305f7e1a26a1d
2019-07-27 21:30:27 +03:00
Michel Heily df48f307f0 armwrestler-fix: Fix post indexed LDR_STR when rd==rn
Former-commit-id: b886c969c2d570fbb831eeeddc0f65ad575cfccb
2019-07-27 21:28:43 +03:00
Michel Heily 477b4f45fd Fix thumb MUL not setting the flags
Former-commit-id: b43e35a7fa2894fcc5cef7eeae9d74123e40219b
2019-07-27 20:25:59 +03:00
Michel Heily 44426b5f0e Impl arm SWP
Also ran some rustfmt


Former-commit-id: 30480e79d7f2926d5a5f15db20427179a672a78c
2019-07-27 20:20:58 +03:00
Michel Heily e06c77b6fd armwrestler-fix: Fix MULL_MLAL instructions
Also fix disassembly for MULL_MLAL


Former-commit-id: f535b2db7edb5d056160699436dbeb0c15e61388
2019-07-27 18:57:20 +03:00
Michel Heily 7429236471 Fix mistake in UMLAL
Former-commit-id: 6fe9bdf5471b71b58dcf9ee9ffa03c41b24e6301
2019-07-26 17:55:50 +03:00
Michel Heily 1b5626a1a7 armwrestler-fix: Refactor barrel shifter and fix ALU carry flag, hopefully for good.
Passing most of armwrestler ALU tests (still have bugs in UMULL and
SMULL)


Former-commit-id: 3c57ca9b5360b5c9bba74b00a5bede5a8cc496af
2019-07-26 17:55:50 +03:00
Michel Heily 24483456ed armwrestler-fix: Fix writeback for LDR where rd==rn
Instead of returning an Err, the writeback should just be disabled.


Former-commit-id: 91636a4eeaf76d0dbd11d250202671fcf8aaa4e6
2019-07-22 20:33:31 +03:00
Michel Heily 009e46f6d5 armwrestler-fix: Properly handle misaligned addresses LDR/LDRH/LDRSH
Former-commit-id: 742a7c2b8413fa9d45df1575a0b14b8d1ab697c4
2019-07-22 20:25:40 +03:00
Michel Heily 2a66e525b1 Fix thumb disassembly of LDMIA/STMIA
Former-commit-id: b04b07f181fff82869503671dd0f500a6c3e5fb1
2019-07-22 09:31:35 +03:00
Michel Heily 2fb6f3c884 Implement (psr / usr bank) transfers for LDM_STM
Former-commit-id: 140e6a6c75f65f08f645b1a0ff2ca7c065438ce4
2019-07-22 09:21:49 +03:00
Michel Heily 0b5902c52e Implement special MRS
Former-commit-id: 1af358887ef71344987f72d65612095c72565f43
2019-07-22 09:21:45 +03:00
Michel Heily c0d437b1a1 Fix exceptions and dataprocess mode change
Former-commit-id: 5892131496904b621398212b9dfc077242fa9557
2019-07-22 01:16:48 +03:00
Michel Heily 7501adfd12 Implement thumb17 (Swi)
Former-commit-id: 62d7e14e9b84e74d9236e1f0a5e961ae805f861c
2019-07-22 01:15:58 +03:00
Michel Heily eea26d2393 thumb: Change ordering when decoding thumb instruction.
This fixes a bug where "swi" instructions are decoded as conditional
branches.

The order really matters here, because Swi instructions are actually
conditional branch with illegal condition code.


Former-commit-id: 0024a8b53386a510dd321c157391c99a2af29223
2019-07-22 00:25:26 +03:00
Michel Heily 387e26fad9 Add support for BGMode3 (tonc first.gba example now working)
Former-commit-id: 52ac773ee2c3542ff3b046c3ea33fde02e804492
2019-07-22 00:09:44 +03:00
Michel Heily 7e9c0e31da Add minifb backend - Armwrestler now plays !
Former-commit-id: d72ea9139e04624322cf3bc4a8ab330f6bb133a4
2019-07-20 23:02:18 +03:00
Michel Heily 61e1f055f1 Model the keypad
Former-commit-id: 4f38fa754e3ee809a7386351297decb2d7f1451f
2019-07-20 22:58:29 +03:00
Michel Heily 53115a9a58 Refactor core functionality into a separate module
Former-commit-id: 5d55b9eb0b63ed7c61465b4e814782165caa5002
2019-07-20 16:46:00 +03:00