24 Commits

Author SHA1 Message Date
e496f830f6 fix: reimpl THUMB.5 instructions
pipeline branch now passes arm.gba and thumb.gba again

(TODO: Stop rewriting my commits away)
2022-09-09 05:20:24 -03:00
5211f0ca70 fix: impl workaround for stage2 miscompilation 2022-09-09 05:20:24 -03:00
b6e91cbca1 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-09-09 05:20:24 -03:00
323753e77a fix: reimpl handleInterrupt code 2022-09-09 05:20:24 -03:00
4aa63e318b feat: implement basic pipeline
passes arm.gba, thumb.gb and armwrestler, fails in actual games
TODO: run FuzzARM debug specific titles
2022-09-09 05:20:20 -03:00
5b75844d88 feat: resolve off-by-{word, halfword} errors when printing debug info 2022-09-09 05:17:30 -03:00
c97abea94a feat: reimplement cpu logging 2022-09-09 05:17:30 -03:00
65cfc97f28 feat: reimplement audio sync
APU will now drop samples if the Audio Queue is already full, therefore
creating a "sped-up" effect when the emulator runs faster than 100%
2022-09-08 20:38:42 -03:00
fa862f095a chore: move arm/thumb lut idx functions 2022-09-06 23:58:24 -03:00
3fb7f2f814 chore: better conform to zig idioms 2022-09-03 18:30:48 -03:00
59669ba3a5 chore: rename arm7tdmi variables to just cpu
Less verbose, specifying arm7tdmi doesn't really do much when there's
no other CPU in the system
2022-09-03 17:56:37 -03:00
6a798d2c9d chore: allocate sprite array on heap
Each Sprite optional is 10 bytes meaning I'm allocating 1.28Kb on the
stack which isn't necessary.
2022-08-29 01:07:25 -05:00
5f8c6833f4 chore: improve init/deinit methods 2022-08-29 01:07:25 -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