20 Commits

Author SHA1 Message Date
f601bec0c4 fix: advance r15, even when the pipeline is reloaded from the scheduler
The PC would fall behind whenever an IRQ was called because the pipeline
was reloaded (+8 to PC), however that was never actually done by any code

Now, the PC is always incremented when the pipeline is reloaded
2022-08-26 23:59:59 -05:00
2c0c3a8ac4 chore: dump pipeline state on cpu panic 2022-08-26 21:45:35 -05:00
20d9f0a7f4 fix: reimpl THUMB.5 instructions
pipeline branch now passes arm.gba and thumb.gba again

(TODO: Stop rewriting my commits away)
2022-08-26 20:44:26 -05:00
6919322c8c fix: impl workaround for stage2 miscompilation 2022-08-26 19:23:50 -05:00
affd89c6d6 chore: instantly refill the pipeline on flush
I believe this to be necessary in order to get hardware interrupts
working.

thumb.gba test 108 fails but I'm committing anyways (despite the
regression) because this is kind of rebase/merge hell and I have
something that at least sort of works rn
2022-08-26 14:29:49 -05:00
5c334057b5 fix: reimpl handleInterrupt code 2022-08-26 14:29:49 -05:00
cec0e7f072 feat: implement basic pipeline
passes arm.gba, thumb.gb and armwrestler, fails in actual games
TODO: run FuzzARM debug specific titles
2022-08-26 14:29:49 -05:00
442e90e24d feat: resolve off-by-{word, halfword} errors when printing debug info 2022-08-26 14:29:49 -05:00
960683a1f5 feat: reimplement cpu logging 2022-08-26 14:29:49 -05:00
aa52bb5917 chore: reorganize some code 2022-08-26 14:13:49 -05:00
e57f918856 chore: pass the allocator as an argument more often
As of right now, I think the only cases where I shouldn't explicitly pass an allocator
are in read/write functions and deinits
2022-08-26 13:54:38 -05:00
e5b7441740 fix: resolve use-afer-free in backup.zig
This worked fine on stage1, and works fine in debug in stage3.
However, stage3 ReleaseSafe would panic due to what I assume must
have been an undefined behaviour optimization.

While I'm happy that I was quickly made aware of the issue thanks to
the safety checks in ReleaseSafe I do wish that this issue showed itself
in Debug, since I *am* using the GPA
2022-08-26 13:04:09 -05:00
2ab8769b7a feat: Get ZBA working on Zig's new stage2/stage3 compiler 2022-08-21 12:28:31 -05:00
3c3c0d32dd chore: move window scale const to emu.zig 2022-08-08 11:03:23 +02:00
739db99c83 fix: reimpl debug reads w/out throwing away *const Self 2022-08-07 05:11:29 -05:00
2c8616f610 feat: reimplement cpu logging 2022-07-27 14:50:28 -03:00
53eec5c3ff chore: don't init bus in Arm7tdmi init 2022-07-27 13:44:24 -03:00
c397b7069d feat: move arm instr decoding to module 2022-07-27 13:23:29 -03:00
9d037fdc3e feat: move thumb instr decoding to module 2022-07-27 13:10:58 -03:00
53191b0eeb chore: change directory structure 2022-07-22 21:11:19 -03:00