Commit Graph

507 Commits

Author SHA1 Message Date
Rekai Nyangadzayi Musuka 44b2e9be88 chore(gpio): add missing errdefer 2022-10-21 05:13:11 -03:00
Rekai Nyangadzayi Musuka 5103fdf646 chore(main): report errors slightly better 2022-10-21 05:13:11 -03:00
Rekai Nyangadzayi Musuka 40062d4dfe chore(config): add log message 2022-10-21 05:13:10 -03:00
Rekai Nyangadzayi Musuka 1c91b497bc feat(config): add option to skip BIOS 2022-10-21 05:13:10 -03:00
Rekai Nyangadzayi Musuka e3286a9872 feat(cli): Add option to skip BIOS 2022-10-21 05:13:10 -03:00
Rekai Nyangadzayi Musuka ddb0e2f928 chore: Update README.md 2022-10-21 05:13:10 -03:00
Rekai Nyangadzayi Musuka d927ee6c90 Merge pull request 'Draft: Implement Instruction Pipeline' (#3) from pipeline into main
Reviewed-on: #3
2022-10-21 05:13:10 -03:00
Rekai Nyangadzayi Musuka 011f105bee feat(config): add config option to mute ZBA 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 2c88f9bbce fix(bios): set addr_latch even if bios is skipped 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 30c5fafec1 chore(config): add example config file 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 3b144e581a fix(bus): make open bus impl aware of CPU pipeline 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 0117a52f4d style(bus): cpu ptr doesn't need to be optional 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 3cf7c83269 style: code cleanup 2022-10-21 05:13:09 -03:00
Rekai Nyangadzayi Musuka 85d4690c56 fix: resolve timing regressions
make sure to use fetch timings when fetching instructions
2022-10-21 05:13:08 -03:00
Rekai Nyangadzayi Musuka 130d40bc7f fix: rename Pipline to Pipeline 2022-10-21 05:13:08 -03:00
Rekai Nyangadzayi Musuka 2c928eafec feat: working pipeline implementation 2022-10-21 05:13:08 -03:00
Rekai Nyangadzayi Musuka dcbeeee7cc chore: refactor ARM/THUMB data processing instructions 2022-10-21 05:13:08 -03:00
Rekai Nyangadzayi Musuka 84ccb7224b fix: don't flush pipeline when reloading CPSR in ARM Data Processing 2022-10-21 05:13:08 -03:00
Rekai Nyangadzayi Musuka dd4bb4ff03 chore: don't write to CPSR + swap with SPSR at the same time 2022-10-21 05:13:07 -03:00
Rekai Nyangadzayi Musuka ecbfe67b27 chore: update README.md 2022-10-21 05:13:07 -03:00
Rekai Nyangadzayi Musuka 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
Rekai Nyangadzayi Musuka d8c397248f chore: dump pipeline state on cpu panic 2022-10-21 05:13:07 -03:00
Rekai Nyangadzayi Musuka 64aed01869 fix: reimpl THUMB.5 instructions
pipeline branch now passes arm.gba and thumb.gba again

(TODO: Stop rewriting my commits away)
2022-10-21 05:13:07 -03:00
Rekai Nyangadzayi Musuka 29f2a0288f fix: impl workaround for stage2 miscompilation 2022-10-21 05:13:07 -03:00
Rekai Nyangadzayi Musuka 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
Rekai Nyangadzayi Musuka ad1cec58e7 fix: reimpl handleInterrupt code 2022-10-21 05:13:06 -03:00
Rekai Nyangadzayi Musuka 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
Rekai Nyangadzayi Musuka 39f56e6d8a feat: resolve off-by-{word, halfword} errors when printing debug info 2022-10-21 05:13:06 -03:00
Rekai Nyangadzayi Musuka f0014e7179 feat: reimplement cpu logging 2022-10-21 05:13:06 -03:00
Rekai Nyangadzayi Musuka 8a804ea05e Merge pull request 'Add TOML Support' (#2) from toml into main
Reviewed-on: #2
2022-10-21 05:13:05 -03:00
Rekai Nyangadzayi Musuka efce1a6dce chore(emu): refactor code 2022-10-21 05:13:05 -03:00
Rekai Nyangadzayi Musuka 8b9ab6f4b5 feat(config): add support for (and read from) TOML config file 2022-10-21 05:13:05 -03:00
Rekai Nyangadzayi Musuka d21c860eb5 feat: parse config.toml in data folder
Also took the chance to rework parts of the logic that determines
ZBA's save path
2022-10-21 05:13:05 -03:00
Rekai Nyangadzayi Musuka 85e670a1d7 chore: add zig-toml dependency 2022-10-21 05:13:05 -03:00
Rekai Nyangadzayi Musuka 4f823217bd chore: update dependencies 2022-10-21 05:13:04 -03:00
Rekai Nyangadzayi Musuka 207a99edbe style: improve code quality 2022-10-21 05:13:04 -03:00
Rekai Nyangadzayi Musuka 3c5b30dece feat: rewrite device ticks 2022-10-21 05:13:04 -03:00
Rekai Nyangadzayi Musuka 739d38533a style(scheduler): rename scheduler event handlers 2022-10-21 05:13:04 -03:00
Rekai Nyangadzayi Musuka ae6b8e2f03 style: code refactoring 2022-10-21 05:13:04 -03:00
Rekai Nyangadzayi Musuka 208f4b522d style(apu): split apu.zig into multiple files + refactor 2022-10-21 05:13:03 -03:00
Rekai Nyangadzayi Musuka bd54700103 style(backup): refactor code 2022-10-21 05:13:03 -03:00
Rekai Nyangadzayi Musuka 08d27520e0 style(flash): move flash code into it's own file 2022-10-21 05:13:03 -03:00
Rekai Nyangadzayi Musuka bfe97c671e style(eeprom): move eeprom code to it's own file 2022-10-21 05:13:03 -03:00
Rekai Nyangadzayi Musuka 9baadadba2 style(bus): refactor several hardware abstractions 2022-10-21 05:13:03 -03:00
Rekai Nyangadzayi Musuka 68a87e0a54 chore: SDL2.zig expects target to be set before link() is called 2022-10-21 05:13:02 -03:00
Rekai Nyangadzayi Musuka 1d7dfe71ca chore: update dependencies 2022-10-21 05:13:02 -03:00
Rekai Nyangadzayi Musuka 1acc5e35e9 chore: move util.zig 2022-10-21 05:13:02 -03:00
Rekai Nyangadzayi Musuka df73cdbecc chore: disable audio sync by default
forgot SDL2 AudioStream doesn't work well for my use-case
2022-10-21 05:13:02 -03:00
Rekai Nyangadzayi Musuka 6738dfac85 chore: change default settings 2022-10-21 05:13:02 -03:00
Rekai Nyangadzayi Musuka 11985f4019 chore: reimpl util.escape
should make use of stdlib when I can
2022-10-21 05:13:02 -03:00