21 Commits

Author SHA1 Message Date
2c88f9bbce fix(bios): set addr_latch even if bios is skipped 2022-10-21 05:13:09 -03:00
85d4690c56 fix: resolve timing regressions
make sure to use fetch timings when fetching instructions
2022-10-21 05:13:08 -03:00
130d40bc7f fix: rename Pipline to Pipeline 2022-10-21 05:13:08 -03:00
2c928eafec feat: working pipeline implementation 2022-10-21 05:13:08 -03:00
e29c20019d 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-10-21 05:13:07 -03:00
d8c397248f chore: dump pipeline state on cpu panic 2022-10-21 05:13:07 -03:00
29f2a0288f fix: impl workaround for stage2 miscompilation 2022-10-21 05:13:07 -03:00
27ada16377 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-10-21 05:13:06 -03:00
ad1cec58e7 fix: reimpl handleInterrupt code 2022-10-21 05:13:06 -03:00
97d9edab93 feat: implement basic pipeline
passes arm.gba, thumb.gb and armwrestler, fails in actual games
TODO: run FuzzARM debug specific titles
2022-10-21 05:13:06 -03:00
8b9ab6f4b5 feat(config): add support for (and read from) TOML config file 2022-10-21 05:13:05 -03:00
1acc5e35e9 chore: move util.zig 2022-10-21 05:13:02 -03:00
b2386a6a2b chore: move arm/thumb lut idx functions 2022-10-21 05:12:57 -03:00
4cf58f1faa chore: improve init/deinit methods 2022-10-21 05:12:56 -03:00
4b6897aedf feat: Get ZBA working on Zig's new stage2/stage3 compiler 2022-10-21 05:12:55 -03:00
7488fd7fd5 fix: reimpl debug reads w/out throwing away *const Self 2022-10-21 05:12:55 -03:00
3f760fccaf feat: reimplement cpu logging 2022-10-21 05:12:55 -03:00
f833de765c chore: don't init bus in Arm7tdmi init 2022-10-21 05:12:55 -03:00
aa19ef5f71 feat: move arm instr decoding to module 2022-10-21 05:12:54 -03:00
f0284107f9 feat: move thumb instr decoding to module 2022-10-21 05:12:54 -03:00
91c94fe528 chore: change directory structure 2022-10-21 05:12:54 -03:00