Rekai Nyangadzayi Musuka
407774d798
chore(gitignore): update .gitignore
2022-10-21 04:40:55 -03:00
Rekai Nyangadzayi Musuka
16f8f4c953
feat: write default config.toml if it doesn't exist
...
also resolves panic on missing /zba or /zba/save directory by ensuring
those directories exist as soon as we know the data directory
2022-10-21 04:39:16 -03:00
Rekai Nyangadzayi Musuka
143ffd95f7
chore: update README
2022-10-21 02:59:43 -03:00
Rekai Nyangadzayi Musuka
250ff25ed7
Merge pull request 'Configure SDL2 to use OpenGL' ( #4 ) from opengl into main
...
Reviewed-on: #4
2022-10-20 01:41:50 +00:00
Rekai Nyangadzayi Musuka
eff52ac1bb
fix(opengl): properly control whether vsync is enabled
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
e60b556f72
chore(ppu): remove BGR555 -> RGBA888 LUT
...
LUT probably couldn't fit in CPU cache anyways.
TODO: Consider whether LUTs for separate channels (size 32 * 3 * 3
instead of std.math.maxInt(u15))
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
3a3e6acc6a
chore: replace OpenGL 4.5 bindings with OpenGL 3.3
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
4b4bc7f894
chore: remove unnecessary ptr cast
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
325208d460
feat: implement better Colour Emulation
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
f44a1a49fd
fix: lower required OpenGL version + resolve offset bug
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
1575f517a9
feat: use opengl
...
TODO:
- Texture isn't scaling properly
- I need to reverse the colours in the frag shader
2022-10-17 20:31:42 -03:00
Rekai Nyangadzayi Musuka
26dba16789
chore(gpio): add missing errdefer
2022-10-17 20:01:50 -03:00
Rekai Nyangadzayi Musuka
b133880064
chore(main): report errors slightly better
2022-10-17 18:30:40 -03:00
Rekai Nyangadzayi Musuka
2474daa3ae
chore(config): add log message
2022-10-17 17:39:02 -03:00
Rekai Nyangadzayi Musuka
fc53a40b3c
feat(config): add option to skip BIOS
2022-10-17 17:31:07 -03:00
Rekai Nyangadzayi Musuka
7097e21361
feat(cli): Add option to skip BIOS
2022-10-17 17:25:04 -03:00
Rekai Nyangadzayi Musuka
a9fe24b1b4
chore: Update README.md
2022-10-17 17:00:54 -03:00
Rekai Nyangadzayi Musuka
f38c840d32
Merge pull request 'Draft: Implement Instruction Pipeline' ( #3 ) from pipeline into main
...
Reviewed-on: #3
2022-10-17 19:42:42 +00:00
Rekai Nyangadzayi Musuka
19e70c39d1
feat(config): add config option to mute ZBA
2022-10-13 00:54:15 -03:00
Rekai Nyangadzayi Musuka
5a72a8e7f3
chore(config): add example config file
2022-10-13 00:46:18 -03:00
Rekai Nyangadzayi Musuka
7b146ad7ca
fix(bios): set addr_latch even if bios is skipped
2022-10-13 00:35:22 -03:00
Rekai Nyangadzayi Musuka
822eed1f3a
fix(bus): make open bus impl aware of CPU pipeline
2022-10-13 00:35:22 -03:00
Rekai Nyangadzayi Musuka
b37a14900c
style(bus): cpu ptr doesn't need to be optional
2022-10-13 00:35:22 -03:00
Rekai Nyangadzayi Musuka
f5bd20bc2a
style: code cleanup
2022-10-13 00:35:22 -03:00
Rekai Nyangadzayi Musuka
d3514b14f3
fix: resolve timing regressions
...
make sure to use fetch timings when fetching instructions
2022-10-13 00:35:20 -03:00
Rekai Nyangadzayi Musuka
06c60dad74
fix: rename Pipline to Pipeline
2022-10-13 00:34:18 -03:00
Rekai Nyangadzayi Musuka
870e991862
feat: working pipeline implementation
2022-10-13 00:34:18 -03:00
Rekai Nyangadzayi Musuka
5bb5bdf389
chore: refactor ARM/THUMB data processing instructions
2022-10-13 00:34:18 -03:00
Rekai Nyangadzayi Musuka
a3996cbc58
fix: don't flush pipeline when reloading CPSR in ARM Data Processing
2022-10-13 00:34:18 -03:00
Rekai Nyangadzayi Musuka
a948c6f900
chore: don't write to CPSR + swap with SPSR at the same time
2022-10-13 00:34:18 -03:00
Rekai Nyangadzayi Musuka
014180cbd0
chore: update README.md
2022-10-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
e4451738b5
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-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
48b81c8e7a
chore: dump pipeline state on cpu panic
2022-10-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
3cf1bf54e9
fix: reimpl THUMB.5 instructions
...
pipeline branch now passes arm.gba and thumb.gba again
(TODO: Stop rewriting my commits away)
2022-10-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
1f9eeedfe8
fix: impl workaround for stage2 miscompilation
2022-10-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
72a63eeb98
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-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
2799c3f202
fix: reimpl handleInterrupt code
2022-10-13 00:33:13 -03:00
Rekai Nyangadzayi Musuka
b3ada64e64
feat: implement basic pipeline
...
passes arm.gba, thumb.gb and armwrestler, fails in actual games
TODO: run FuzzARM debug specific titles
2022-10-13 00:33:11 -03:00
Rekai Nyangadzayi Musuka
62162ba492
feat: resolve off-by-{word, halfword} errors when printing debug info
2022-10-13 00:31:47 -03:00
Rekai Nyangadzayi Musuka
aa100de581
feat: reimplement cpu logging
2022-10-13 00:31:47 -03:00
Rekai Nyangadzayi Musuka
7142831284
Merge pull request 'Add TOML Support' ( #2 ) from toml into main
...
Reviewed-on: #2
2022-10-13 03:30:26 +00:00
Rekai Nyangadzayi Musuka
97f48c730e
chore(emu): refactor code
2022-10-13 00:29:51 -03:00
Rekai Nyangadzayi Musuka
293fbd9f55
feat(config): add support for (and read from) TOML config file
2022-10-13 00:29:48 -03:00
Rekai Nyangadzayi Musuka
622f479e07
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-13 00:27:18 -03:00
Rekai Nyangadzayi Musuka
0204eb6f94
chore: add zig-toml dependency
2022-10-13 00:27:18 -03:00
Rekai Nyangadzayi Musuka
86d2224cfc
chore: update dependencies
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
21eddac31e
style: improve code quality
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
785135a074
feat: rewrite device ticks
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
fd38fd6506
style(scheduler): rename scheduler event handlers
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
bcacac64df
style: code refactoring
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
dc7cad9691
style(apu): split apu.zig into multiple files + refactor
2022-10-13 00:23:58 -03:00
Rekai Nyangadzayi Musuka
b5d8a65e69
style(backup): refactor code
2022-10-10 12:01:49 -03:00
Rekai Nyangadzayi Musuka
8028394105
style(flash): move flash code into it's own file
2022-10-10 12:01:49 -03:00
Rekai Nyangadzayi Musuka
cb0eb67e4b
style(eeprom): move eeprom code to it's own file
2022-10-10 12:00:45 -03:00
Rekai Nyangadzayi Musuka
13f6ee8ec4
style(bus): refactor several hardware abstractions
2022-10-10 11:57:57 -03:00
Rekai Nyangadzayi Musuka
c71e954748
chore: SDL2.zig expects target to be set before link() is called
2022-09-25 18:59:55 -03:00
Rekai Nyangadzayi Musuka
c697dec716
chore: update dependencies
2022-09-23 07:21:46 -03:00
Rekai Nyangadzayi Musuka
92cfc763c0
chore: move util.zig
2022-09-19 16:07:19 -03:00
Rekai Nyangadzayi Musuka
e192c6712f
chore: disable audio sync by default
...
forgot SDL2 AudioStream doesn't work well for my use-case
2022-09-18 09:20:01 -03:00
Rekai Nyangadzayi Musuka
3466bf6c0a
chore: change default settings
2022-09-18 06:30:39 -03:00
Rekai Nyangadzayi Musuka
fbe3de0eb3
chore: reimpl util.escape
...
should make use of stdlib when I can
2022-09-18 06:23:30 -03:00
Rekai Nyangadzayi Musuka
4af144fca2
fix: Detect FRAM ROMs
2022-09-18 06:19:05 -03:00
Rekai Nyangadzayi Musuka
9a8aaba1ab
chore: improve util and Gui API
2022-09-18 05:55:15 -03:00
Rekai Nyangadzayi Musuka
fa3b9c21b9
chore: move Gpio and Clock structs to separate file
2022-09-18 00:37:45 -03:00
Rekai Nyangadzayi Musuka
d3efa432fa
Merge pull request 'Implement RTC' ( #1 ) from rtc into main
...
Reviewed-on: #1
2022-09-17 23:36:34 +00:00
Rekai Nyangadzayi Musuka
50adb5fbac
feat: add option to force-enable RTC
2022-09-17 20:27:17 -03:00
Rekai Nyangadzayi Musuka
19d78b9292
feat: auto-detect RTC in commercial ROMS
2022-09-17 20:23:49 -03:00
Rekai Nyangadzayi Musuka
a2e702c366
fix: account for lateness in RTC scheduler event
2022-09-17 09:07:31 -03:00
Rekai Nyangadzayi Musuka
12c138364d
fix: RTC day is 6 bits wide, not 3
2022-09-16 10:59:41 -03:00
Rekai Nyangadzayi Musuka
7783c11fac
feat: put RTC Sync on Scheduler
...
TODO: Database to see what games have what GPIO devices
2022-09-16 10:39:02 -03:00
Rekai Nyangadzayi Musuka
3fc3366c8a
chore: import datetime library + default time for RTC
2022-09-16 10:39:02 -03:00
Rekai Nyangadzayi Musuka
d6b182f245
fix: ignore RTC Time/DateTime writes
...
this falls in-line with better emulators
2022-09-16 10:39:02 -03:00
Rekai Nyangadzayi Musuka
3857c44e68
chore: use Clock.Writer for Command parsing, delete Clock.Command
2022-09-16 10:39:02 -03:00
Rekai Nyangadzayi Musuka
089c5fa025
feat: implement RTC Read/Writes
2022-09-16 10:39:02 -03:00
Rekai Nyangadzayi Musuka
c977f3f965
feat: implement force irqs for GPIO/RTC
2022-09-16 10:38:51 -03:00
Rekai Nyangadzayi Musuka
92417025e9
fix: properly resovle stack UAF
2022-09-16 02:10:41 -03:00
Rekai Nyangadzayi Musuka
1c52c0bf91
chore: shorten `orelse @panic` to `.?`
2022-09-16 02:10:41 -03:00
Rekai Nyangadzayi Musuka
617f7f4690
fix: update GpioData extern union
...
u4's are no longer supported in extern unions :\
2022-09-16 02:10:41 -03:00
Rekai Nyangadzayi Musuka
434a0dfac9
tmp: incomplete impl of GPIO + RTC
2022-09-16 02:10:41 -03:00
Rekai Nyangadzayi Musuka
4ec8dab460
chore: Guilty Gear X expects these I/O Registers
2022-09-14 11:38:26 -03:00
Rekai Nyangadzayi Musuka
59c9ff910e
feat: implement open bus for unmapped i/o
2022-09-12 23:18:29 -03:00
Rekai Nyangadzayi Musuka
0027d3f8a3
chore: comment open bus impl
2022-09-11 07:38:55 -03:00
Rekai Nyangadzayi Musuka
9f45888910
chore: update dependencies
2022-09-11 06:59:10 -03:00
Rekai Nyangadzayi Musuka
bf442d5a40
chore: Update README.md
2022-09-10 07:34:52 -03:00
Rekai Nyangadzayi Musuka
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
Rekai Nyangadzayi Musuka
fa862f095a
chore: move arm/thumb lut idx functions
2022-09-06 23:58:24 -03:00
Rekai Nyangadzayi Musuka
f3c05b6fe6
chore: update dependencies
2022-09-05 22:52:07 -03:00
Rekai Nyangadzayi Musuka
3fb7f2f814
chore: better conform to zig idioms
2022-09-03 18:30:48 -03:00
Rekai Nyangadzayi Musuka
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
Rekai Nyangadzayi Musuka
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
Rekai Nyangadzayi Musuka
5f8c6833f4
chore: improve init/deinit methods
2022-08-29 01:07:25 -05:00
Rekai Nyangadzayi Musuka
aa52bb5917
chore: reorganize some code
2022-08-26 14:13:49 -05:00
Rekai Nyangadzayi Musuka
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
Rekai Nyangadzayi Musuka
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
Rekai Nyangadzayi Musuka
2ab8769b7a
feat: Get ZBA working on Zig's new stage2/stage3 compiler
2022-08-21 12:28:31 -05:00
Rekai Nyangadzayi Musuka
3c3c0d32dd
chore: move window scale const to emu.zig
2022-08-08 11:03:23 +02:00
Rekai Nyangadzayi Musuka
739db99c83
fix: reimpl debug reads w/out throwing away *const Self
2022-08-07 05:11:29 -05:00
Rekai Nyangadzayi Musuka
5a18b1dcc7
chore: update dependencies:
2022-08-06 08:28:30 -05:00
Rekai Nyangadzayi Musuka
2c8616f610
feat: reimplement cpu logging
2022-07-27 14:50:28 -03:00
Rekai Nyangadzayi Musuka
53eec5c3ff
chore: don't init bus in Arm7tdmi init
2022-07-27 13:44:24 -03:00
Rekai Nyangadzayi Musuka
c397b7069d
feat: move arm instr decoding to module
2022-07-27 13:23:29 -03:00
Rekai Nyangadzayi Musuka
9d037fdc3e
feat: move thumb instr decoding to module
2022-07-27 13:10:58 -03:00
Rekai Nyangadzayi Musuka
53191b0eeb
chore: change directory structure
2022-07-22 21:11:19 -03:00
Rekai Nyangadzayi Musuka
c7c4a90948
fix: reimplement halt fast-forwarding
2022-07-21 11:25:49 -03:00
Rekai Nyangadzayi Musuka
03ded099d2
chore: move audio sync, video sync variables
2022-07-21 11:05:49 -03:00
Rekai Nyangadzayi Musuka
5d9a57c7eb
chore: update README.md
2022-07-12 18:28:11 -03:00
Rekai Nyangadzayi Musuka
769fad8996
chore: update SDL.zig
2022-07-12 18:11:32 -03:00
Rekai Nyangadzayi Musuka
3b3eb52c48
feat: impl WININ, WINOUT, WIN{N}H and WIN{N}V
2022-06-29 14:56:48 -03:00
Rekai Nyangadzayi Musuka
d798aea6ea
fix: force align DMA transfers
2022-06-29 04:31:02 -03:00
Rekai Nyangadzayi Musuka
5d37c212e2
fix: resolve bugs in VRAM unpredictable read/writes
2022-06-29 03:59:14 -03:00
Rekai Nyangadzayi Musuka
887bd89668
fix: don't start HDMA in vblank
2022-06-23 05:45:52 -03:00
Rekai Nyangadzayi Musuka
81c669fe64
feat: implement brightness increase/decrease
2022-06-23 04:50:04 -03:00
Rekai Nyangadzayi Musuka
265234ee97
feat: implement object blending
2022-06-23 02:49:56 -03:00
Rekai Nyangadzayi Musuka
02534c5c19
feat: implement background alpha blending
2022-06-19 22:10:56 -03:00
Rekai Nyangadzayi Musuka
5e4fb7b952
feat: implement BLDCNT, BLDALPHA, BLDY
2022-06-19 01:27:14 -03:00
Rekai Nyangadzayi Musuka
7e15e83d38
chore: update README
2022-06-19 00:02:33 -03:00
Rekai Nyangadzayi Musuka
c9ea80e03b
chore: rename + remove some code
2022-06-18 22:01:17 -03:00
Rekai Nyangadzayi Musuka
4cd722e447
fix: properly fire DMA IRQs
...
This resolves Sound DMA Timing issues present in DOOM
2022-06-18 21:13:12 -03:00
Rekai Nyangadzayi Musuka
adfb23fab4
chore: rename Dma.active to Dma.in_progress
2022-06-18 19:15:34 -03:00
Rekai Nyangadzayi Musuka
5bbbdc3469
chore: rewrite info log message
2022-06-18 18:46:40 -03:00
Rekai Nyangadzayi Musuka
47adc0c5ae
feat: implement NR10 obscure behaviour
2022-06-18 18:16:29 -03:00
Rekai Nyangadzayi Musuka
601b0b2aae
feat: handle all I/O when using Cult-Of-GBA BIOS
2022-06-18 17:50:11 -03:00
Rekai Nyangadzayi Musuka
3becd790cf
chore: 32-bit reads for PSG audio
2022-06-18 17:35:52 -03:00
Rekai Nyangadzayi Musuka
460f8308a7
chore: implement more than just 1 cycle per mem access
2022-06-16 22:35:42 -03:00
Rekai Nyangadzayi Musuka
cc8c1c1e21
fix: implement register reads for Yoshi's Island
2022-06-16 02:32:31 -03:00
Rekai Nyangadzayi Musuka
f5e401a4ee
fix: reimplement DMA ticking
2022-06-16 01:46:37 -03:00
Rekai Nyangadzayi Musuka
dba8873f76
chore(cpu): add inline fn isHalted()
2022-06-16 00:49:37 -03:00
Rekai Nyangadzayi Musuka
db08edbdb9
chore: attempt to debug Rhythm Heaven
2022-06-16 00:03:51 -03:00
Rekai Nyangadzayi Musuka
35dba63b94
fix: impl BG?{X,Y} RefPoint write behaviour outside of Vblank
...
With this fix Mode 7-like games now properly render their backgrounds
2022-06-15 01:34:34 -03:00
Rekai Nyangadzayi Musuka
a753912cb5
chore: change priority of some logs
2022-06-15 01:18:45 -03:00
Rekai Nyangadzayi Musuka
7441af9582
chore: mess with debug statements + mask APU I/O reads
2022-06-15 01:08:43 -03:00
Rekai Nyangadzayi Musuka
708f64035f
chore: move timer, apu and dma i/o addr matching outside of io.zig
2022-06-15 00:05:36 -03:00
Rekai Nyangadzayi Musuka
e4bbd33a49
chore: separate render code for affine sprites
2022-06-04 20:07:20 -03:00
Rekai Nyangadzayi Musuka
25d13722f7
chore: reimplement object rendering
...
TODO: implement affine sprites
2022-06-04 13:55:31 -03:00
Rekai Nyangadzayi Musuka
4eb0d469b3
chore: small changes to normal background drawing code
2022-06-04 10:21:03 -03:00
Rekai Nyangadzayi Musuka
ce2271100b
feat: implement affine backgrounds
2022-06-04 09:49:34 -03:00
Rekai Nyangadzayi Musuka
e226a59a2f
chore: stub 8-bit window registers
2022-06-04 09:48:59 -03:00
Rekai Nyangadzayi Musuka
7ff5f3b8e7
chore: remove code that pretends to remove DC offset
2022-06-04 09:47:58 -03:00
Rekai Nyangadzayi Musuka
b6f5517c89
fix: replace affine bg register bitfields with signed integers
2022-06-03 19:26:52 -03:00
Rekai Nyangadzayi Musuka
2dc3864dca
chore: use stdlib endian-aware integer read/write functions
2022-06-03 13:26:55 -03:00
Rekai Nyangadzayi Musuka
deff74d804
chore: update zig version in README.md
2022-05-28 15:28:52 -03:00
Rekai Nyangadzayi Musuka
4f93f3e454
chore: update SDL.zig
2022-05-28 15:25:37 -03:00
Rekai Nyangadzayi Musuka
38afb567b9
chore: misc style improvements
2022-05-27 22:09:15 -03:00
Rekai Nyangadzayi Musuka
4006888629
chore: rename method in FpsTracker
2022-05-27 21:50:16 -03:00
Rekai Nyangadzayi Musuka
e7faa9713b
chore: update README.md
2022-05-27 21:27:19 -03:00
Rekai Nyangadzayi Musuka
413ff02ad9
fix(backup): resolve banking issue in flash impl
2022-05-27 21:17:50 -03:00
Rekai Nyangadzayi Musuka
517ed7a835
chore: remove awful ptr casts in backup.zig and bios.zig
2022-05-27 20:24:09 -03:00
Rekai Nyangadzayi Musuka
d4bc1f2cd0
feat: pass jsmolka's bios.gba
2022-05-27 20:08:09 -03:00
Rekai Nyangadzayi Musuka
c6ce810afe
fix: play right samples in right channel
2022-05-27 18:47:34 -03:00
Rekai Nyangadzayi Musuka
1170673447
fix: resolve issue when handling event sooner than expected
2022-05-26 17:11:02 -03:00
Rekai Nyangadzayi Musuka
c007bf4d8e
fix: remove DC offset from audio output
2022-05-26 17:10:10 -03:00
Rekai Nyangadzayi Musuka
697ec46cf1
chore: add debug keybinds for scheduler capacity + event count
2022-05-25 15:13:57 -03:00
Rekai Nyangadzayi Musuka
41ee32b118
perf: don't check scheduler every iteration of runFrame loop
...
~20fps gain in Pokemon Emerald, nice
2022-05-25 14:17:44 -03:00
Rekai Nyangadzayi Musuka
8f5d054195
chore: simplify 4bpp palette code
2022-05-25 10:10:57 -03:00
Rekai Nyangadzayi Musuka
c907552864
perf: convert BGR555 to RGBA8888 at compile-time, access w/ lookup table
...
Compile speed isn't slowed down by that much + there's a ~20fps gain in
Pokemon emerald, though this isn't anything exact
2022-05-24 13:55:50 -03:00
Rekai Nyangadzayi Musuka
ff3f79801c
chore: modify type signature of util.sext
2022-05-23 14:48:52 -03:00
Rekai Nyangadzayi Musuka
f130d1991c
chore: cleanup main
2022-05-23 12:50:01 -03:00
Rekai Nyangadzayi Musuka
24a8905c29
chore: emu audio sync code to emu.zig
2022-05-23 12:05:57 -03:00
Rekai Nyangadzayi Musuka
e70fe73899
chore: redo apu sampling
2022-05-23 11:25:28 -03:00
Rekai Nyangadzayi Musuka
a2d2a84850
chore: implement apu u16 reads
2022-05-21 15:09:32 -03:00
Rekai Nyangadzayi Musuka
109561310e
fix: clean up frequency timer implementations
2022-05-21 14:21:50 -03:00
Rekai Nyangadzayi Musuka
5164aa961d
Revert "fix: resolve off-by-one errors when scheduling freq timer expirations"
...
This reverts commit c9b0030b4b
.
2022-05-21 13:46:46 -03:00
Rekai Nyangadzayi Musuka
c9b0030b4b
fix: resolve off-by-one errors when scheduling freq timer expirations
2022-05-21 13:34:14 -03:00
Rekai Nyangadzayi Musuka
af2ad6c924
chore: improve APU accuracy + scheduler refactoring
2022-05-20 16:01:12 -03:00
Rekai Nyangadzayi Musuka
e7777737b3
chore: update SDL.zig
2022-05-20 12:34:22 -03:00
Rekai Nyangadzayi Musuka
c40cc2ba30
feat: stub Affine BG registers
2022-05-18 15:50:40 -03:00
Rekai Nyangadzayi Musuka
8dddb865cc
fix: resolve out-of-bounds error with 8bpp tall / horizontal sprites
...
Boot ROM is now enabled by default as well
2022-05-17 12:16:30 -03:00
Rekai Nyangadzayi Musuka
2e821ab79c
chore: improve audio accuracy
2022-05-17 11:28:05 -03:00
Rekai Nyangadzayi Musuka
a667269d26
chore: reintroduce thread sleeping + simplify fps counter
2022-05-17 08:55:23 -03:00
Rekai Nyangadzayi Musuka
daf977ef06
feat: implement double buffering
2022-05-17 06:53:37 -03:00
Rekai Nyangadzayi Musuka
660c8a2d62
chore: clean up DMA code
2022-05-05 22:36:11 -03:00
Rekai Nyangadzayi Musuka
9d590b099a
feat: handle DMA IRQs (maybe?)
2022-05-05 22:04:59 -03:00
Rekai Nyangadzayi Musuka
d5443d9c2f
chore: contain Timers in a tuple rather than a struct
2022-05-05 20:09:00 -03:00
Rekai Nyangadzayi Musuka
f0ce39230b
chore: contain DMA Controllers in a tuple rather than a struct
2022-05-05 19:53:12 -03:00
Rekai Nyangadzayi Musuka
c0e026b9a8
chore: update git submodules
2022-05-05 18:21:59 -03:00
Rekai Nyangadzayi Musuka
208e88e869
chore: resolve incorrect memory mirror in VRAM
...
+ stub GPIO registers on ROM Write
2022-05-05 16:44:48 -03:00
Rekai Nyangadzayi Musuka
5df023fb41
chore: stub a few I/O registers
2022-05-03 22:41:05 -03:00
Rekai Nyangadzayi Musuka
46ac1542a6
chore: allow 8-bit IO to BG0CNT and BG1CNT
...
BG0CNT and and BG1CNT now work properly in mario kart
2022-05-01 20:41:00 -03:00
Rekai Nyangadzayi Musuka
c2f55e0bfb
chore: define affine sprite attributes
2022-05-01 19:15:56 -03:00
Rekai Nyangadzayi Musuka
12f9bb51c1
feat: stub mode 1 and 2
2022-05-01 18:53:11 -03:00
Rekai Nyangadzayi Musuka
41558c9103
feat: implement mode 5
...
I wonder which obscure game makes heavy use of this mode
2022-05-01 18:10:52 -03:00
Rekai Nyangadzayi Musuka
68012f84d3
chore: comment ARM MSR code + Audio issues
2022-04-30 22:17:34 -05:00
Rekai Nyangadzayi Musuka
640b1f7c5d
chore: pass destoer's cond_invalid test
2022-04-30 20:42:47 -05:00
Rekai Nyangadzayi Musuka
f2f4bb205a
chore: misc print message improvements
2022-04-29 12:41:05 -05:00
Rekai Nyangadzayi Musuka
6c88a0aec2
chore: improvements to APU accuracy
2022-04-29 12:19:31 -05:00
Rekai Nyangadzayi Musuka
002287ecfe
fix: incorrect order-of-operations in ARM BL impl
2022-04-27 23:15:39 -05:00
Rekai Nyangadzayi Musuka
a87b46898b
chore: special case saving for ROMS without titles
2022-04-27 18:08:44 -05:00
Rekai Nyangadzayi Musuka
417810581b
chore: update README
2022-04-26 10:52:56 -05:00
Rekai Nyangadzayi Musuka
bc2950916f
chore: update most recent zig version
2022-04-26 09:57:26 -05:00
Rekai Nyangadzayi Musuka
d9c9105449
feat: pass DenSinH's eeprom-test
2022-04-25 17:20:43 -05:00
Rekai Nyangadzayi Musuka
05a432f1c1
feat: implement EEPROM
2022-04-25 16:23:24 -05:00
Rekai Nyangadzayi Musuka
f4a48d536c
chore: implement I/O regsister for Minish Cap
2022-04-25 08:01:34 -05:00
Rekai Nyangadzayi Musuka
81db06d2fc
chore: change default window scale to 4x
2022-04-24 08:33:28 -04:00
Rekai Nyangadzayi Musuka
1812fb8008
chore: write more debug log messages for unimplemented registers
2022-04-22 22:19:26 -03:00
Rekai Nyangadzayi Musuka
762494453f
chore: only sync to audio for now
2022-04-22 20:56:52 -03:00
Rekai Nyangadzayi Musuka
e3553bcbd6
feat: panic on unimplemented I/O in ReleaseSafe/Debug but not ReleaseFast
2022-04-22 20:56:52 -03:00
Rekai Nyangadzayi Musuka
9cce4d9859
chore: misc improvements
2022-04-21 10:15:52 -03:00
Rekai Nyangadzayi Musuka
75ba9a4bf9
fix: improper lifetime for *Arm7tdmi ptr in Bus
...
*Arm7tdmi ptr is now assigned one scope up so that it lives as least
as long as Bus does
2022-04-21 07:56:17 -03:00
Rekai Nyangadzayi Musuka
85e8ca9146
feat: implement Noise
...
Kirby & The Amazing Mirror crashes only in ReleaseSafe / ReleaseBug.
TODO: Figure out why
2022-04-21 02:40:02 -03:00
Rekai Nyangadzayi Musuka
2f07c18f0b
feat: implement ch3
2022-04-21 00:21:55 -03:00
Rekai Nyangadzayi Musuka
ed3d275974
feat: implement ch2
2022-04-20 21:33:46 -03:00
Rekai Nyangadzayi Musuka
0184ec3e5e
feat: implement ch1
...
TODO: It's really loud
2022-04-20 20:52:50 -03:00
Rekai Nyangadzayi Musuka
97a689ab55
chore: broken impl of ch1
2022-04-20 09:39:12 -03:00
Rekai Nyangadzayi Musuka
c3611a0f00
feat: add audio resampler
...
Also implement extremely naive audio sync
2022-04-20 06:27:06 -03:00
Rekai Nyangadzayi Musuka
d270ec711f
chore: calculate apu sample rate a bit better
2022-04-20 02:36:32 -03:00
Rekai Nyangadzayi Musuka
172a59aefb
feat: schedule audio sampling on scheduler
...
DMA sound in games like Pokemon Emerald, Chobits, Love Hina, and Kirby:
Nightmare in Dream Land sound great save for conerns about resampling
2022-04-14 05:58:32 -03:00
Rekai Nyangadzayi Musuka
92cabd248b
chore: improve timer behaviour
2022-04-14 01:58:40 -03:00
Rekai Nyangadzayi Musuka
6b09250a56
chore: move some init code to functions
2022-04-14 00:52:21 -03:00
Rekai Nyangadzayi Musuka
f6d746e810
feat: impelemt THUMB open bus
2022-04-14 00:21:49 -03:00
Rekai Nyangadzayi Musuka
9b9b6c0d6f
feat: implement ARM read open bus
2022-04-13 23:28:14 -03:00
Rekai Nyangadzayi Musuka
6d5c30ac25
fix: remove accidental rotation in ldrsh instructions
2022-04-13 22:59:32 -03:00
Rekai Nyangadzayi Musuka
c1b74d556a
chore: move log statement
2022-04-13 21:45:15 -03:00
Rekai Nyangadzayi Musuka
dfe94fb931
chore: remove magic numbers
2022-04-13 21:39:35 -03:00
Rekai Nyangadzayi Musuka
ffbb31c767
chore: remove unnecessary 32MB allocation
2022-04-13 21:25:41 -03:00
Rekai Nyangadzayi Musuka
714209565b
chore: define more I/O read/writes
2022-04-12 00:50:44 -03:00
Rekai Nyangadzayi Musuka
643cd13952
chore: update README
2022-04-11 23:14:44 -03:00
Rekai Nyangadzayi Musuka
2c763e9772
feat: pass jsmolka memory.gba
2022-04-11 22:52:17 -03:00
Rekai Nyangadzayi Musuka
ad1f5ea8b8
chore: ignore instead of logging errors for perf reasons
2022-04-10 23:10:06 -03:00
Rekai Nyangadzayi Musuka
76b4d56ca6
feat: Initial Implementation of DMA Audio
2022-04-10 04:50:09 -03:00
Rekai Nyangadzayi Musuka
c100d64fcb
chore: tick scheduler on memory access
2022-04-09 19:43:27 -03:00
Rekai Nyangadzayi Musuka
5da84aff36
chore: log error on open bus in page 0x00 and 0x01
2022-04-09 18:01:17 -03:00
Rekai Nyangadzayi Musuka
76789aa8bc
chore: rewrite I/O read/writes
2022-04-08 17:07:36 -03:00
Rekai Nyangadzayi Musuka
80e714e2eb
chore: reimplement bus read/writes
2022-04-08 16:48:43 -03:00
Rekai Nyangadzayi Musuka
37a360ec07
fix: force align reads/writes in memory bus rather than in CPU
2022-04-08 15:17:31 -03:00
Rekai Nyangadzayi Musuka
a976a5769e
fix: pass none.gba and kind of sram.gba from jsmolka test suite
2022-04-08 14:38:35 -03:00
Rekai Nyangadzayi Musuka
6df55c2d86
feat: implement GamePak out-of-bounds reads
2022-04-08 02:34:08 -03:00
Rekai Nyangadzayi Musuka
a1008738d2
chore: run zigfmt
2022-04-08 02:13:58 -03:00
Rekai Nyangadzayi Musuka
11a034658a
chore: change implementation of rotr
2022-04-08 02:13:41 -03:00
Rekai Nyangadzayi Musuka
aac01b0bfe
chore: rewrite read/write methods for remainig Bus devices
2022-04-08 02:08:26 -03:00
Rekai Nyangadzayi Musuka
5310c12669
chore: mirror VRAM
2022-04-08 01:10:12 -03:00
Rekai Nyangadzayi Musuka
9b9de11e0c
chore: write generic read/write for VRAM
2022-04-08 00:44:52 -03:00
Rekai Nyangadzayi Musuka
f8018854be
Merge branch 'main' of ssh://musuka.dev:2222/paoda/zba
2022-04-07 17:23:22 -03:00
Rekai Nyangadzayi Musuka
fae4b430ab
chore: update dependencies
2022-04-07 17:23:07 -03:00
Rekai Nyangadzayi Musuka
1bb3659df6
chore: update README
2022-03-29 18:52:09 -03:00
Rekai Nyangadzayi Musuka
3046e6243a
chore: don't assume 1cpi when stepping by a frame
2022-03-29 09:06:26 -03:00
Rekai Nyangadzayi Musuka
e127669549
Revert "chore: tick on memory access instead of 1cpi"
...
This reverts commit 7f555095f2
.
2022-03-29 08:58:57 -03:00
Rekai Nyangadzayi Musuka
7f555095f2
chore: tick on memory access instead of 1cpi
2022-03-29 08:50:12 -03:00
Rekai Nyangadzayi Musuka
29da7b294e
feat: implement Flash backup cartrige kinds
2022-03-28 19:41:22 -03:00
Rekai Nyangadzayi Musuka
bf7b533b3c
chore: stub more apu I/O addresses
2022-03-28 19:40:47 -03:00
Rekai Nyangadzayi Musuka
37c039fb92
fix: don't create un-needed save file
...
If we don't know if we support a game's save type yet, avoid
creating a file for it.
2022-03-22 15:03:05 -03:00
Rekai Nyangadzayi Musuka
4c172cff70
fix: account for subset of disallowed chars in save file names
2022-03-22 14:55:08 -03:00
Rekai Nyangadzayi Musuka
bd54cba8a0
feat: implement SRAM saving and loading
2022-03-22 14:41:18 -03:00
Rekai Nyangadzayi Musuka
da4bb17782
chore: properly deallocate OAM buffer
2022-03-22 11:41:17 -03:00
Rekai Nyangadzayi Musuka
5dd69500ca
fix: speed percentage in title is now accurate
...
We now properly account for full speed being 59.97Hz not, 59Hz or 60Hz
2022-03-22 10:39:42 -03:00
Rekai Nyangadzayi Musuka
eff25a0ab2
chore: make some variables const
2022-03-19 02:00:53 -03:00
Rekai Nyangadzayi Musuka
1901a471e4
feat: minor performance improvements
2022-03-18 09:49:49 -03:00
Rekai Nyangadzayi Musuka
3d61c0dba4
feat: switch from BGR555 to RGBA8888
2022-03-18 07:52:54 -03:00
Rekai Nyangadzayi Musuka
39ab363afa
fix: improve perf of instructions w/ rotr
2022-03-16 22:56:37 -03:00
Rekai Nyangadzayi Musuka
1921218c7b
fix: improve frame limiting and fps counting
2022-03-16 21:25:32 -03:00
Rekai Nyangadzayi Musuka
40968f0990
fix: implement proper SRAM mirroring and stub Flash
2022-03-15 21:54:55 -03:00
Rekai Nyangadzayi Musuka
04d54ec97a
chore: move DMA and Timers from io to bus
2022-03-15 08:25:26 -03:00
Rekai Nyangadzayi Musuka
1fd80c1c23
feat: define APU registers
2022-03-15 08:09:07 -03:00
Rekai Nyangadzayi Musuka
48679fa4ca
fix: move code in scheduler to ppu
2022-03-15 08:09:07 -03:00
Rekai Nyangadzayi Musuka
bdea19f280
chore: create different types of emuloops
2022-03-15 03:46:33 -03:00
Rekai Nyangadzayi Musuka
5579643d65
fix: resolve relative sprite priority issues
2022-03-15 00:37:29 -03:00
Rekai Nyangadzayi Musuka
c6e6b42869
chore: improve accuracy of frame limiter
2022-03-14 20:38:29 -03:00
Rekai Nyangadzayi Musuka
3623362f72
chore: improve accuracy of thread sleep in emu thread
2022-03-14 08:54:48 -03:00
Rekai Nyangadzayi Musuka
c538079ad4
feat: implement video sync
2022-03-14 05:16:02 -03:00
Rekai Nyangadzayi Musuka
8e3f48837d
chore: organize io switch statements
2022-03-13 07:50:19 -03:00
Rekai Nyangadzayi Musuka
025f295c08
fix: mirror SRAM
...
SRAM is mirrored in 64K chunks
TODO: According to GBATEK SRAM chips are 32K and mirrored
2022-03-13 05:53:32 -03:00
Rekai Nyangadzayi Musuka
017ec407f5
chore: don't panic on unknown bus and io writes/reads
...
This will lead to emulation bugs due to devices I've yet to implement but by
doing this a lot of games become playable "by default" such as Doom or
Kirby: Nightmare in Dream Land.
When implementing feature and/or debuggin make sure to set:
panic_on_und_bus and panic_on_und_io to true so that the emu crashes
on unknown reads/writes
2022-03-13 05:39:09 -03:00
Rekai Nyangadzayi Musuka
4a76611fca
feat: implement Timers
2022-03-13 05:35:01 -03:00
Rekai Nyangadzayi Musuka
cb10dfbdfd
fix: implement sprite coord overflow behaviour
2022-03-12 03:46:41 -04:00
Rekai Nyangadzayi Musuka
0c50ef1e6d
fix: resolve issues with sprite mirroring
2022-03-11 23:52:56 -04:00
Rekai Nyangadzayi Musuka
05e67da181
feat: Implement MVP of Mode 0 Sprites
2022-03-11 01:43:47 -04:00
Rekai Nyangadzayi Musuka
f1df3d6615
chore: clean up io
2022-03-04 22:55:04 -04:00
Rekai Nyangadzayi Musuka
c5b4b51ae0
feat: fix tile flipping issue
2022-03-03 03:08:35 -04:00
Rekai Nyangadzayi Musuka
2e4854c2ff
chore: add some type definitions for sprites
2022-03-03 02:10:33 -04:00
Rekai Nyangadzayi Musuka
85f0b13f4a
feat: improve DMA Transfer support
2022-03-03 02:10:29 -04:00
Rekai Nyangadzayi Musuka
dccd00782b
chore(ppu): resolve integer overflow regression
2022-03-02 23:15:10 -04:00
Rekai Nyangadzayi Musuka
3d8c944bcc
feat(ppu): implement bg priority and transparency
2022-03-02 01:39:05 -04:00
Rekai Nyangadzayi Musuka
90302d1c52
chore: update README.md
2022-03-01 21:30:29 -04:00
Rekai Nyangadzayi Musuka
cb4d3a9a51
chore: replace unnecessarily complex sign extension implementation
2022-02-28 20:38:50 -04:00
Rekai Nyangadzayi Musuka
ddb68a7952
feat: pass beeg yoshi
2022-02-28 18:24:24 -04:00
Rekai Nyangadzayi Musuka
97de5d1a96
fix: palette id is a u16 not a u8
2022-02-28 17:32:10 -04:00
Rekai Nyangadzayi Musuka
d6ef53fd67
feat: DMA Transfer MVP
2022-02-28 12:34:00 -06:00
Rekai Nyangadzayi Musuka
b65f833b28
feat(ppu): implement transparency + backdrop in mode 0
2022-02-26 18:33:16 -06:00
Rekai Nyangadzayi Musuka
ac0486be1b
chore(io): replace some bitfields with enums
2022-02-24 17:20:23 -06:00
Rekai Nyangadzayi Musuka
441ebc38c7
fix: better emulate behaviour of IO reads
2022-02-24 17:20:20 -06:00
Rekai Nyangadzayi Musuka
be2dfb379a
chore: document select unimplmented I/O registers
...
These registers are written to / read from Kirby: Nightmare in Dream Land
2022-02-22 17:14:30 -06:00
Rekai Nyangadzayi Musuka
bc66be6c06
feat: impelement a barebones SRAM
2022-02-22 17:14:26 -06:00
Rekai Nyangadzayi Musuka
5368ff912d
feat: pass retAddr.gba
2022-02-21 15:34:46 -06:00
Rekai Nyangadzayi Musuka
c2cf2d2965
feat: implement Hblank and Vcount Interrupts
...
Also implemented unique behaviour when writing to IF
2022-02-21 14:45:47 -06:00
Rekai Nyangadzayi Musuka
e5ab8b51a9
chore: improve Bus log + panic messages
2022-02-19 11:48:43 -05:00
Rekai Nyangadzayi Musuka
c767e88e8d
chore: improve io.zig
2022-02-19 11:48:17 -05:00
Rekai Nyangadzayi Musuka
9e2e8c3d1a
feat: implement mirroring for IWRAM EWRAM, OAM and PALRAM
...
Also realized I confused IWRAM and EWRAM. This is also fixed
TODO: Implemnt Mirroring for VRRAM
2022-02-19 10:08:31 -05:00
Rekai Nyangadzayi Musuka
e426f2459e
fix: resolve integer overflow in BG0 Drawing
2022-02-19 06:55:30 -04:00
Rekai Nyangadzayi Musuka
3746cf6025
chore: don't panic on 32-bit I/O
2022-02-19 06:45:39 -04:00
Rekai Nyangadzayi Musuka
f6c8d7ca07
chore: stub CPU HALTing
2022-02-17 00:27:34 -04:00
Rekai Nyangadzayi Musuka
07343efdf3
chore: correct logic errors in map size 1 and 3
2022-02-16 23:49:08 -04:00
Rekai Nyangadzayi Musuka
4018f3875b
chore: properly write to VOFS and HOFS in 32-bit bus
2022-02-16 23:23:41 -04:00
Rekai Nyangadzayi Musuka
034f2e8d1d
feat: implement hofs and vofs on io bus
2022-02-16 04:29:04 -04:00
Rekai Nyangadzayi Musuka
d275a4890f
feat: implement scrolling
2022-02-16 03:37:25 -04:00
Rekai Nyangadzayi Musuka
ce97a52868
feat: add support for multiple BGs in Mode 0
2022-02-16 03:27:06 -04:00
Rekai Nyangadzayi Musuka
d2d4667f7b
feat: document mode 0
2022-02-16 03:05:19 -04:00
Rekai Nyangadzayi Musuka
5835b509e4
feat: Mode 0 MVP
2022-02-16 02:27:15 -04:00
Rekai Nyangadzayi Musuka
338122ed43
chore: use zig slices for fun
2022-02-13 05:28:56 -04:00
Rekai Nyangadzayi Musuka
e5a76a3c02
chore: give DISPCNT DISPSTAT and VCOUNT to PPU struct
2022-02-13 04:28:15 -04:00
Rekai Nyangadzayi Musuka
31fa06ac4a
chore: give io read/write functions access to the entire Bus
2022-02-13 04:13:06 -04:00
Rekai Nyangadzayi Musuka
ec25a9aae4
feat: implement BG Scrolling Registers
2022-02-13 04:04:10 -04:00
Rekai Nyangadzayi Musuka
b238a3e8f3
feat: impelemnt BG0,1,2CNT and IF
2022-02-13 03:23:09 -04:00
Rekai Nyangadzayi Musuka
aca7fc9a60
feat: implement OAM
2022-02-13 02:30:02 -04:00
Rekai Nyangadzayi Musuka
d2740e30d9
chore: squash bugs preventing swi_demo.gba from working
2022-02-13 02:29:53 -04:00
Rekai Nyangadzayi Musuka
8ab7a178c1
chore(cpu): reimplement bank switching logic
2022-02-12 04:33:32 -04:00
Rekai Nyangadzayi Musuka
d897c2fdcc
fix: don't mask away MSB in THUMB.5 add
2022-02-12 03:23:55 -04:00
Rekai Nyangadzayi Musuka
783706193b
fix: properly decode format 11 instructions
2022-02-12 03:13:38 -04:00
Rekai Nyangadzayi Musuka
b93bd53529
chore: make use of scoped logging
2022-02-11 01:33:33 -04:00
Rekai Nyangadzayi Musuka
f9013cf9db
Merge branch 'main' of ssh://musuka.dev:2222/paoda/zba
2022-02-10 23:02:35 -04:00
Rekai Nyangadzayi Musuka
eaac49cebb
chore: update README
2022-02-10 21:21:34 -04:00
Rekai Nyangadzayi Musuka
ee27053db3
chore: remove TODOs and some useless imports
2022-02-06 19:07:23 -04:00
Rekai Nyangadzayi Musuka
7441dd151c
fix: improper condition check and initialization of register
2022-02-06 18:41:16 -04:00
Rekai Nyangadzayi Musuka
bbd4447734
fix(cpu): force align thumb and arm block data transfers
2022-02-06 17:08:12 -04:00
Rekai Nyangadzayi Musuka
225c0f7d55
feat: pass arm.gba
2022-02-06 05:06:25 -04:00
Rekai Nyangadzayi Musuka
fcde905ae1
chore: reimplement ARM LDM/STM
2022-02-06 04:34:45 -04:00
Rekai Nyangadzayi Musuka
798987eba0
chore: improve arm ldm/stm
2022-02-05 23:29:34 -04:00
Rekai Nyangadzayi Musuka
adfd501fc4
fix(cpu): force-align SWP reads and writes
2022-02-05 23:18:23 -04:00
Rekai Nyangadzayi Musuka
9581e3b3cb
fix: force-align ARM STRH reads
2022-02-05 23:09:13 -04:00
Rekai Nyangadzayi Musuka
1b9ab1f1d7
fix: implement the same LDRSH logic as THUMB LDRSH
2022-02-05 23:09:02 -04:00
Rekai Nyangadzayi Musuka
c52dc5adb1
fix: PC is 12 ahead when it is rd in str and strb
2022-02-05 21:42:04 -04:00
Rekai Nyangadzayi Musuka
7bfb87a859
fix: listen to my past self
...
By deleting this line I go from test 234 to test 355 in arm.gba
2022-02-05 21:35:26 -04:00
Rekai Nyangadzayi Musuka
aec189ac6a
chore: update SDL.zig
2022-02-05 21:07:15 -04:00
Rekai Nyangadzayi Musuka
0aece06107
chore: dont use std.mem.bytesToValue
...
the stdlib accounts for endianness, which isn't something we want.
2022-02-05 21:05:08 -04:00
Rekai Nyangadzayi Musuka
2842345111
chore: remove unnecessary @as calls
2022-02-05 21:01:39 -04:00
Rekai Nyangadzayi Musuka
aa6f3c7a92
feat: pass thumb.gba
2022-02-05 20:39:15 -04:00
Rekai Nyangadzayi Musuka
3ae24d6977
chore: account for empty rlist in THUMB LDM/STM
2022-02-05 18:03:39 -04:00
Rekai Nyangadzayi Musuka
0a22730479
fix(cpu): handle edge case in LDRSH
2022-02-05 17:12:25 -04:00
Rekai Nyangadzayi Musuka
166bc6fc6d
chore: specify which compiler this project is built with
2022-02-05 16:28:06 -04:00
Rekai Nyangadzayi Musuka
bf4207ba8c
chore: reorganize util.zig
2022-02-05 15:55:12 -04:00
Rekai Nyangadzayi Musuka
78080b4682
fix: zero initialize all allocated memory
2022-02-05 15:54:53 -04:00
Rekai Nyangadzayi Musuka
9159270e87
chore: don't commit *.sh files
2022-02-05 15:53:30 -04:00
Rekai Nyangadzayi Musuka
428eff1468
Revert "fix: allow for 32-bit reads to KEYINPUT"
...
This reverts commit 3a51707280
.
2022-02-05 14:52:49 -04:00
Rekai Nyangadzayi Musuka
5ec8d4b0a5
fix: resolve decoding mixup in THUMB format 8 instructions
2022-02-05 14:50:34 -04:00
Rekai Nyangadzayi Musuka
3a51707280
fix: allow for 32-bit reads to KEYINPUT
2022-02-05 13:47:05 -04:00
Rekai Nyangadzayi Musuka
b4d20fb264
chore: refactor ARMv4 decoding
2022-02-05 13:46:55 -04:00
Rekai Nyangadzayi Musuka
746158043d
chore: add more debug information to CPU panic method
2022-02-05 13:46:24 -04:00
Rekai Nyangadzayi Musuka
25300c8a9f
chore: give more descriptive panic messages when changing mode fails
2022-02-04 16:54:57 -04:00
Rekai Nyangadzayi Musuka
27d0ba8c7e
chore: clean up THUMB instruction decoding
2022-02-04 15:57:46 -04:00
Rekai Nyangadzayi Musuka
2f74b61f2e
feat: parse cartridge header
2022-02-04 05:54:06 -04:00
Rekai Nyangadzayi Musuka
b233981a34
feat: rename ARM and THUMB SWI functions
2022-02-04 04:34:47 -04:00
Rekai Nyangadzayi Musuka
1b8db0c427
chore: group THUMB and select ARM instructions together (same file)
2022-02-04 04:18:20 -04:00
Rekai Nyangadzayi Musuka
3e4f9eddb2
feat: integrate zig-clap with ZBA
2022-02-04 03:12:35 -04:00
Rekai Nyangadzayi Musuka
6ab4610a81
fix(cpu): properly decode format 7 and 8
2022-02-03 01:29:18 -04:00
Rekai Nyangadzayi Musuka
91384a7c68
fix(cpu): resolve edge cases in THUMB Format 5
2022-02-03 00:55:57 -04:00
Rekai Nyangadzayi Musuka
c6bb4bf8e1
fix(cpu): allow for select values to overflow
...
FuzzARM found these operations which panicked, when they should
have overflowed. These are now fixed
n = 8000
2022-02-02 22:49:33 -04:00
Rekai Nyangadzayi Musuka
800ed6f1a7
feat(cpu): implement format 13
...
While bugs do exist, at this point all THUMB and ARMv4 instructions
have been implemented! Yay!
2022-02-02 22:31:21 -04:00
Rekai Nyangadzayi Musuka
027e4fb57b
feat(cpu): implement THUMB format 17
2022-02-02 22:31:08 -04:00
Rekai Nyangadzayi Musuka
1378c809e6
feat(cpu): implement THUMB format11
2022-02-02 22:30:46 -04:00
Rekai Nyangadzayi Musuka
33399e9517
chore: update to latest zig nightly
2022-02-02 21:26:12 -04:00
Rekai Nyangadzayi Musuka
99492a6782
chore: progress towards passing ldr/str thumb in armwrestler
2022-02-02 21:14:46 -04:00
Rekai Nyangadzayi Musuka
8b574efe85
fix(cpu): properly negate in NEG
2022-02-02 20:12:20 -04:00
Rekai Nyangadzayi Musuka
9fd03d2a92
fix(cpu): reimplement THUMB offset shifts
2022-02-02 20:12:07 -04:00
Rekai Nyangadzayi Musuka
9affe01da8
fix(cpu): op == 0b00 decodes to add in format 5
2022-02-02 18:58:06 -04:00
Rekai Nyangadzayi Musuka
784bc81a4a
fix(cpu): account for overflow in THUMB alu MUL
2022-02-02 18:57:33 -04:00
Rekai Nyangadzayi Musuka
045c98de1f
chore: use if-else when decoding THUMB instructions
2022-02-02 18:48:47 -04:00
Rekai Nyangadzayi Musuka
c2901ee0d8
fix(cpu): account for rn in rlist in block data transfer
2022-02-02 17:35:33 -04:00
Rekai Nyangadzayi Musuka
d95efa5b12
feat: implement LDM/STM behaviour when S is set
2022-02-02 16:12:47 -04:00
Rekai Nyangadzayi Musuka
237beb9caa
feat(cpu): Pass all LDR/STR ARMwrestler tests
2022-02-02 14:07:18 -04:00
Rekai Nyangadzayi Musuka
30bad76e44
feat(cpu): decode and implement all necessary ARM CPU instructions
2022-02-02 12:06:41 -04:00
Rekai Nyangadzayi Musuka
c34c2ee6eb
feat(cpu): implement ARM SWP and SWPB
2022-02-02 08:44:33 -04:00
Rekai Nyangadzayi Musuka
6c7934be70
fix: resolve off by n * 2 when accessing Palette during BG Mode 4
2022-02-01 22:56:53 -04:00
Rekai Nyangadzayi Musuka
48017b45f5
feat(cpu): Implement Multiply Long ARM instructions
2022-02-01 22:09:38 -04:00
Rekai Nyangadzayi Musuka
28c81f79ae
fix: no buttons are pressed by default
2022-02-01 20:52:01 -04:00
Rekai Nyangadzayi Musuka
a80600156d
feat(cpu): implement format 18 THUMB instructions
2022-02-01 19:12:01 -04:00
Rekai Nyangadzayi Musuka
0d7600ed7a
chore: more detailed panic message
2022-02-01 19:11:56 -04:00
Rekai Nyangadzayi Musuka
ca41f6a85c
feat(cpu): implement format 10 THUMB instructions
2022-02-01 17:56:11 -04:00
Rekai Nyangadzayi Musuka
85927a943f
feat(cpu): implement SWP
2022-02-01 16:30:55 -04:00
Rekai Nyangadzayi Musuka
b27bf4a85c
fix(cpu): perform MUL with u64s, throw away upper 32 bits
2022-02-01 16:15:08 -04:00
Rekai Nyangadzayi Musuka
b07eb22b86
feat: implement keyboard input
2022-02-01 16:11:59 -04:00
Rekai Nyangadzayi Musuka
f6e4b4931f
chore: don't panic on unsupported BG mode
2022-01-30 02:43:11 -04:00
Rekai Nyangadzayi Musuka
e35d81eeb8
chore: tempoarily disable fps counter
2022-01-30 02:42:01 -04:00
Rekai Nyangadzayi Musuka
8c248ffb11
chore: zero-initialize VRAM
2022-01-30 02:39:16 -04:00
Rekai Nyangadzayi Musuka
b0332e6eb8
chore: stub KeyInput I/O register
2022-01-30 02:38:29 -04:00
Rekai Nyangadzayi Musuka
dd632975f8
fix(cpu): properly decode multiply instructions
2022-01-30 02:16:12 -04:00
Rekai Nyangadzayi Musuka
a459d4b433
feat(cpu): implement ARM multiply instructions
2022-01-30 02:04:24 -04:00
Rekai Nyangadzayi Musuka
6c008ce950
fix: allow 32-bit writes to DISPCNT
2022-01-30 01:42:54 -04:00
Rekai Nyangadzayi Musuka
8d1df7ae43
fix(cpu): properly decode ldm stm thumb instructions
2022-01-30 01:12:34 -04:00
Rekai Nyangadzayi Musuka
6ffaf12804
fix(cpu): properly decode THUMB PUSH and POP at comptime
2022-01-30 00:16:13 -04:00
Rekai Nyangadzayi Musuka
dc6931639f
fix(cpu): don't ignore 11th bit of THUMB BL offset
2022-01-29 23:53:40 -04:00
Rekai Nyangadzayi Musuka
e18f10126e
feat(cpu): implement thumb push / pop and stub format 13 thumb instrs
2022-01-29 23:22:10 -04:00
Rekai Nyangadzayi Musuka
0598ba402d
feat(cpu): implement THUMB format 9 loads / stores
2022-01-29 22:34:40 -04:00
Rekai Nyangadzayi Musuka
b8a9aaee86
fix(cpu): resolve issues with unexpected PC value in THUMB
2022-01-29 22:07:36 -04:00
Rekai Nyangadzayi Musuka
00058f6094
feat(cpu): implement THUMB ldmia stmia
2022-01-29 21:10:14 -04:00
Rekai Nyangadzayi Musuka
2dde47318c
chore: implement THUMB format 4 instructions
2022-01-29 20:42:13 -04:00
Rekai Nyangadzayi Musuka
ae4023e51c
chore: dedup code in THUMB instructions
2022-01-29 20:05:27 -04:00
Rekai Nyangadzayi Musuka
bce067557f
chore: refactor and genericize ARM data processing calculations
2022-01-29 19:40:58 -04:00
Rekai Nyangadzayi Musuka
e0acabf050
chore: relocate barrel_shifter zig file
2022-01-29 18:52:16 -04:00
Rekai Nyangadzayi Musuka
599e068c7e
feat(cpu): implement format2 THUMB instructions
2022-01-29 18:46:27 -04:00
Rekai Nyangadzayi Musuka
4ca65caef0
feat(cpu): implement format19 THUMB instructions
2022-01-29 18:25:50 -04:00
Rekai Nyangadzayi Musuka
0c49bf2288
chore: account for THUMB BL instruction when mimicking mGBA logs
2022-01-29 18:14:00 -04:00
Rekai Nyangadzayi Musuka
44dbdba48c
feat(cpu): implement format16 THUMB instructions
2022-01-29 17:44:04 -04:00
Rekai Nyangadzayi Musuka
d85e0c8d05
feat(cpu): implement format 1 THUMB instructions
2022-01-29 17:29:30 -04:00
Rekai Nyangadzayi Musuka
995633e9e8
fix: dont close file handle early
2022-01-29 01:18:45 -04:00
Rekai Nyangadzayi Musuka
cfbd292edc
feat(cpu): implement format 6 THUMB instructions
2022-01-29 01:18:41 -04:00
Rekai Nyangadzayi Musuka
95efb3f35d
chore: rename title
2022-01-28 23:27:03 -04:00
Rekai Nyangadzayi Musuka
6a6dccf4d8
chore: refactor GBA Display Timings
...
This change should reflect that the Hblank bit of DISPSTAT is toggled on all scanlines
while also ensuring that the Vblank bit is set on all Vblank scanlines
2022-01-28 22:58:19 -04:00
Rekai Nyangadzayi Musuka
ad1db4dc2e
chore: move a single statement lol
2022-01-28 22:57:48 -04:00
Rekai Nyangadzayi Musuka
19359f7ee4
chore: mark indexing methods as inline
2022-01-28 17:11:29 -04:00
Rekai Nyangadzayi Musuka
24f0922f86
feat: create emulator thread
2022-01-28 16:33:38 -04:00
Rekai Nyangadzayi Musuka
b1cc985230
chore: disable logging by default
2022-01-25 18:20:30 -04:00
Rekai Nyangadzayi Musuka
e5c8f0ce07
chore: revert fastboot changes
2022-01-25 18:20:01 -04:00
Rekai Nyangadzayi Musuka
fbc5b309b0
chore: binary logging + file logging + DP chanes + fastBoot changes
2022-01-25 18:18:52 -04:00
Rekai Nyangadzayi Musuka
899a9ead76
chore: ignore .bin files
2022-01-25 12:58:25 -04:00
Rekai Nyangadzayi Musuka
540fbf739a
chore: rename skipBios to fastBoot
2022-01-25 11:15:17 -04:00
Rekai Nyangadzayi Musuka
0546b1c308
chore: set correct values for select banked registers on fast boot
2022-01-25 11:14:15 -04:00
Rekai Nyangadzayi Musuka
997dc1314c
feat(cpu): implement SWI
2022-01-25 10:34:21 -04:00
Rekai Nyangadzayi Musuka
1456d0f317
chore(bios): allow reading from BIOS
2022-01-25 10:32:28 -04:00
Rekai Nyangadzayi Musuka
6257418405
fix(cpu): interim solution to weird program counter behaviour on illegal tst instruction
2022-01-25 09:23:32 -04:00
Rekai Nyangadzayi Musuka
985fefb9f6
chore(cpu): implement behaviour for undefined test instruction
2022-01-25 08:05:42 -04:00
Rekai Nyangadzayi Musuka
95dd3e3df8
fix(cpu): fix PC offset when barrel shifter and bit 4 of DP is set
2022-01-24 17:52:01 -04:00
Rekai Nyangadzayi Musuka
038c0a9283
chore: remove reccomended extension
2022-01-23 23:13:16 -04:00
Rekai Nyangadzayi Musuka
702ff288d8
fix(cpu): implement S set + rd == 15 case for data processing
2022-01-19 07:46:49 -04:00
Rekai Nyangadzayi Musuka
bf36a23722
feat(cpu): implement banked registers
2022-01-19 07:29:49 -04:00
Rekai Nyangadzayi Musuka
fc5a3460dd
fix(cpu): improve MRS and MSR instructions
2022-01-18 20:17:00 -04:00
Rekai Nyangadzayi Musuka
6177927049
feat(cpu): implement CMN
2022-01-18 15:09:25 -04:00
Rekai Nyangadzayi Musuka
903b75c7c4
fix(barrel_shifter): fix PC being 1 word ahead in barrel shifter
2022-01-18 15:08:29 -04:00
Rekai Nyangadzayi Musuka
8d786cbe25
feat(cpu): Implement RSC
2022-01-18 14:46:57 -04:00
Rekai Nyangadzayi Musuka
212bc9e11d
feat(cpu): implement RSB
2022-01-18 14:36:03 -04:00
Rekai Nyangadzayi Musuka
63a57ac954
feat(cpu): implement BIC
2022-01-18 14:28:47 -04:00
Rekai Nyangadzayi Musuka
85dae5e1d7
feat(cpu): implement EOR
2022-01-18 14:27:07 -04:00
Rekai Nyangadzayi Musuka
6189bf0315
feat(cpu): implement ADD
2022-01-18 14:25:29 -04:00
Rekai Nyangadzayi Musuka
2f3213f693
feat(cpu): implement fix for ADC and implement SBC
2022-01-18 14:20:01 -04:00
Rekai Nyangadzayi Musuka
a62cd9aa40
chore(barrel_shifter): remove panic from ASR
2022-01-18 14:19:58 -04:00
Rekai Nyangadzayi Musuka
25c57a4cc7
fix(barrel_shifter): should not modify cpsr when amount == 0
2022-01-18 13:30:41 -04:00
Rekai Nyangadzayi Musuka
a7a44c4463
chore(cpu): refactor the barrel shifter once again
2022-01-17 15:55:55 -04:00
Rekai Nyangadzayi Musuka
d4d2fedfbe
feat(cpu): implement ADC
...
ADC interacting w/ the Barrel Shifter is not working though
2022-01-17 14:29:34 -04:00
Rekai Nyangadzayi Musuka
483e149b32
feat(cpu): implement RRX for Barrel Shifter
2022-01-17 14:19:40 -04:00
Rekai Nyangadzayi Musuka
85ffdf44f5
feat(cpu): implement SUB in THUMB format 3
2022-01-17 11:36:02 -04:00
Rekai Nyangadzayi Musuka
9098a55ae3
feat(cpu): implement ARM SUB in data processing
2022-01-17 11:35:41 -04:00
Rekai Nyangadzayi Musuka
c0d956ea95
feat(cpu): implement MVN
2022-01-17 11:30:59 -04:00
Rekai Nyangadzayi Musuka
1025500407
chore(cpu): refactor barrel shifter
2022-01-17 11:17:04 -04:00
Rekai Nyangadzayi Musuka
d05a924420
fix(cpu): use barrel shifter in data processing immediates
2022-01-17 11:02:34 -04:00
Rekai Nyangadzayi Musuka
2a416fb2c6
feat(cpu): implement format 12 thumb instructions
2022-01-17 10:07:50 -04:00
Rekai Nyangadzayi Musuka
ea5f0ce552
feat(cpu): implement some already decoded format 3 instructions
2022-01-17 09:29:11 -04:00
Rekai Nyangadzayi Musuka
e55d2dc323
feat(cpu): implement THUMB format 5 instructions
2022-01-17 09:28:46 -04:00
Rekai Nyangadzayi Musuka
3037407ebe
chore: mgba log now supports printing THUMB instructions
2022-01-17 07:18:44 -04:00
Rekai Nyangadzayi Musuka
1915d98bdd
feat(cpu): implement like 1 THUMB instruction
2022-01-16 12:46:59 -04:00
Rekai Nyangadzayi Musuka
4606a1ab25
chore: distinguish between undefined ARM and THUMB instr
2022-01-14 05:30:32 -04:00
Rekai Nyangadzayi Musuka
0cf052838d
chore(cpu): lay groundwork for THUMB instruction decoding and execution
2022-01-14 05:23:16 -04:00
Rekai Nyangadzayi Musuka
ae37b1218b
chore(cpu): refactor ARM functions to make room for THUMB
2022-01-14 04:26:09 -04:00
Rekai Nyangadzayi Musuka
070322064d
fix(cpu): fix conditions for GT cond
2022-01-14 04:19:54 -04:00
Rekai Nyangadzayi Musuka
37bd6758fb
fix(cpu): fix imm value calculation in MSR
2022-01-14 04:08:04 -04:00
Rekai Nyangadzayi Musuka
7f6ab626d9
fix(cpu): resolve off-by-one error when executing LDM
2022-01-14 03:43:03 -04:00
Rekai Nyangadzayi Musuka
77dba68a0b
feat(cpu): implement branch and exchange
...
If I want to continue with armwrestler, I'll have to implement
THUMB instructions now
2022-01-12 07:20:24 -04:00
Rekai Nyangadzayi Musuka
7adc7c8802
fix(cpu): make Data Processing instructions r15-aware
2022-01-12 07:20:24 -04:00
Rekai Nyangadzayi Musuka
229f7c3388
fix(cpu): make LDRH and STRH aware of r15
2022-01-12 07:20:21 -04:00
Rekai Nyangadzayi Musuka
5812b9713c
fix(cpu): account for r15 in LDR and STR instructions
2022-01-12 06:16:59 -04:00
Rekai Nyangadzayi Musuka
98c5803208
fix(cpu): flip two branches in PSR Transfer execution
2022-01-12 06:16:34 -04:00
Rekai Nyangadzayi Musuka
74abd3df4d
feat(cpu): implement MSR and MRS
2022-01-12 04:48:57 -04:00
Rekai Nyangadzayi Musuka
7531af7f2b
feat(cpu): stub PSR Transfer instructions
2022-01-12 03:40:51 -04:00
Rekai Nyangadzayi Musuka
1c173eb4b8
chore(io): implement IE and IME
2022-01-12 02:19:26 -04:00
Rekai Nyangadzayi Musuka
769c67b9d4
chore: remove some magic constants
2022-01-12 00:46:20 -04:00
Rekai Nyangadzayi Musuka
3596caf106
Merge branch 'main' of ssh://musuka.dev:2222/paoda/zba
2022-01-11 02:36:37 -04:00
Rekai Nyangadzayi Musuka
3be084cb82
chore: ignores for building on windows
2022-01-11 01:42:26 -04:00
Rekai Nyangadzayi Musuka
c1be53bcb2
fix(bus): remove accidental recursion
2022-01-10 21:25:45 -04:00
Rekai Nyangadzayi Musuka
072a66cfdb
fix(cpu): write results of ORR to destination register
2022-01-10 10:56:41 -04:00
Rekai Nyangadzayi Musuka
ed3bdd90fb
feat(cpu): implement TEQ
2022-01-10 08:09:02 -04:00
Rekai Nyangadzayi Musuka
e9c1c94cae
feat(cpu): Implement ORR
2022-01-10 08:06:00 -04:00
Rekai Nyangadzayi Musuka
0f08ad05be
feat(bus): implement IWRAM and EWRAM
2022-01-10 07:59:21 -04:00
Rekai Nyangadzayi Musuka
fd5006b29d
fix(ppu): properly access Mode 4 palette
2022-01-10 07:23:54 -04:00
Rekai Nyangadzayi Musuka
22b95b2a74
feat(cpu): refactor LDM/STM
2022-01-10 06:51:32 -04:00
Rekai Nyangadzayi Musuka
7d79a0bee2
feat(cpu): implement LDM/STM
2022-01-10 06:27:36 -04:00
Rekai Nyangadzayi Musuka
6c0651ca08
chore(io): DISPSTAT bits 3 and 4 better match GBATEK documentation
2022-01-10 06:26:42 -04:00
Rekai Nyangadzayi Musuka
0d8c5e6882
fix(cpu): fix off-by-word bug in BL
2022-01-10 06:26:02 -04:00
Rekai Nyangadzayi Musuka
89a8fe403b
feat(bus): have VCOUNT be addressable on the bus
2022-01-10 03:35:28 -04:00
Rekai Nyangadzayi Musuka
7c5d2d2389
feat(ppu): implement Mode 4
...
Implementation is not tested. Pending on LDM and STM so that I can
run beeg.gba
2022-01-10 03:35:24 -04:00
Rekai Nyangadzayi Musuka
2467b94dbd
chore(io): rename some io bitfield fields
2022-01-10 02:13:25 -04:00
Rekai Nyangadzayi Musuka
0d4c850218
chore: remove premature inlines
2022-01-10 01:24:14 -04:00
Rekai Nyangadzayi Musuka
bbe2ecfa53
chore: add FPS counter
2022-01-10 01:22:55 -04:00
Rekai Nyangadzayi Musuka
c54145ce3c
chore: improve code clarity
2022-01-09 23:34:33 -04:00
Rekai Nyangadzayi Musuka
ead6d1ce49
feat(ppu): improve timings + implement BG mode 3 bitmap
2022-01-09 22:16:34 -04:00
Rekai Nyangadzayi Musuka
581285a434
fix: allocate framebuf on heap
2022-01-08 20:30:57 -04:00
Rekai Nyangadzayi Musuka
0d203543ca
chore: add code for heap alloc of white texture
2022-01-08 18:52:11 -04:00
Rekai Nyangadzayi Musuka
eb6c00f0ac
chore(gui): switch from RGBA8888 to BGR5555 to match BG Mode 3
2022-01-08 04:54:39 -04:00
Rekai Nyangadzayi Musuka
da7f21f47e
feat: draw white texture using SDL2
2022-01-07 22:46:17 -04:00
Rekai Nyangadzayi Musuka
8fb666624f
fix(ppu): deallocate palette RAM on cleanup
2022-01-07 22:27:08 -04:00
Rekai Nyangadzayi Musuka
568c374131
chore: code cleanup
2022-01-07 20:00:42 -04:00
Rekai Nyangadzayi Musuka
910745f442
chore(bus): refactor bus.zig
2022-01-07 19:49:58 -04:00
Rekai Nyangadzayi Musuka
f8c6af3247
chore: refactor instruction exec code
2022-01-07 19:44:48 -04:00
Rekai Nyangadzayi Musuka
a407671de2
chore(io): alias @This() to Self in io.zig
2022-01-07 19:34:54 -04:00
Rekai Nyangadzayi Musuka
e9ec124e33
chore: refactor bios.zig and pak.zig
2022-01-07 19:33:49 -04:00
Rekai Nyangadzayi Musuka
9f64804763
fix: by convention deinit() should not take pointers to self
2022-01-07 19:16:23 -04:00
Rekai Nyangadzayi Musuka
c6123d8a6d
feat: implement PPU Timings in Scheduler
2022-01-05 21:18:33 -04:00
Rekai Nyangadzayi Musuka
f709458638
feat(sched): add HBlank and VBlank events to the scheduler
2022-01-05 17:34:59 -05:00
Rekai Nyangadzayi Musuka
5037b8f0cc
feat: implement S (when rd != 15) for several data processing instructions
2022-01-05 15:45:52 -05:00
Rekai Nyangadzayi Musuka
28a70d0112
feat: implement dedicated Barrel Shifter SHL and SHR
2022-01-05 13:58:11 -05:00
Rekai Nyangadzayi Musuka
7473ffedc7
chore: stub TST
2022-01-04 04:08:02 -06:00
Rekai Nyangadzayi Musuka
172f3e8efe
chore: comment-out logging by default
2022-01-04 03:58:11 -06:00
Rekai Nyangadzayi Musuka
28bb410dfd
fix(cpu): improve LDR/STR write-back logic
2022-01-04 03:55:41 -06:00
Rekai Nyangadzayi Musuka
5ea888f68c
feat(bus): implement Palette RAM and DISPSTAT
2022-01-04 03:29:56 -06:00
Rekai Nyangadzayi Musuka
8b9a80b279
fix(bus): restrict Game ROM and VRAM to a 16-bit bus
2022-01-04 03:08:12 -06:00
Rekai Nyangadzayi Musuka
ed9c1413b1
fix(cpu): properly implement SUB/CMP CSPSR carry bit condition
2022-01-04 03:08:08 -06:00
Rekai Nyangadzayi Musuka
8cabcd8901
fix(cpu): resolve reversed if statement + write back on W = 0
2022-01-04 01:57:37 -06:00
Rekai Nyangadzayi Musuka
8d8cedea59
chore: add mgba compatible (minus disasm) log function
2022-01-04 01:11:53 -06:00
Rekai Nyangadzayi Musuka
0f827fca96
chore: rename CPSR u32 from val to raw
2022-01-03 22:25:11 -06:00
Rekai Nyangadzayi Musuka
1fefd4de5c
chore: remove print statements
2022-01-03 21:30:08 -06:00
Rekai Nyangadzayi Musuka
3aa680ab8c
chore: remove all memory leaks
2022-01-03 20:08:55 -06:00
Rekai Nyangadzayi Musuka
8257a3899a
feat(ppu): implement VRAM
2022-01-03 19:52:10 -06:00
Rekai Nyangadzayi Musuka
1d4ba2e2b3
fix(emu): prevent infinite loop when advancing scheduler
2022-01-03 19:51:55 -06:00
Rekai Nyangadzayi Musuka
c9f0e1632c
fix(io): fix DISPCNT is at wrong IO address
2022-01-03 17:49:15 -06:00
Rekai Nyangadzayi Musuka
44d52d8137
feat(cpu): properly implement STR STRH and STRB
2022-01-03 17:48:43 -06:00
Rekai Nyangadzayi Musuka
dee0e113d8
feat(cpu): implement skipBios method
2022-01-02 14:58:39 -06:00
Rekai Nyangadzayi Musuka
eb37d73cb2
chore: panic on read from BIOS
...
GBA Bios requires a lot of implemented features, so we're ignoring it
for now
2022-01-02 14:57:59 -06:00
Rekai Nyangadzayi Musuka
1c42d1795a
feat(bus): add Io Struct
...
Also, add more information to all panic messages
2022-01-02 14:40:49 -06:00
Rekai Nyangadzayi Musuka
01d6399dfb
chore: rename consturctors to fit convention
2022-01-02 13:58:57 -06:00
Rekai Nyangadzayi Musuka
f09f814dc3
chore: move bitfield library to lib director
...
I'd presonally prefer to use a git submodule here but It doesn't quite
seem like git submodules are possible for individual files. I'll have to
check with FlorenceOS every once and a while to ensure that there are no
lingering soundness issues with the library.
Thanks to @N00byEdge for this wonderful library!
2022-01-02 13:19:09 -06:00
Rekai Nyangadzayi Musuka
de9045fba3
chore: use bitfield library
2022-01-02 13:01:11 -06:00
Rekai Nyangadzayi Musuka
e144261e07
feat(bus): emu is now able to read from user-provided BIOS
2022-01-02 03:16:03 -06:00
Rekai Nyangadzayi Musuka
65c3dd722c
feat(bus): implement Gameboy Advance MMIO
2022-01-02 02:36:06 -06:00
Rekai Nyangadzayi Musuka
b63eb2dabc
feat: implement ROM CLI argument
2022-01-01 23:37:21 -06:00
Rekai Nyangadzayi Musuka
52e367d24a
fix(cpu): purposely overflow when calculating PC during branch
2022-01-01 21:57:52 -06:00
Rekai Nyangadzayi Musuka
cc7e42efd8
feat(cpu): implement condition field behaviour
2022-01-01 21:56:58 -06:00
Rekai Nyangadzayi Musuka
c40a1af534
chore: conform to zig style guides
2022-01-01 21:08:47 -06:00
Rekai Nyangadzayi Musuka
f2cc0721c7
chore: run zig fmt
2022-01-01 03:42:20 -06:00
Rekai Nyangadzayi Musuka
92a06e49c3
chore(cpu): iron out some false assumptions
2022-01-01 03:41:50 -06:00
Rekai Nyangadzayi Musuka
c660ca8922
feat: implement LDR STR
2021-12-29 17:16:32 -06:00
Rekai Nyangadzayi Musuka
7cc3f40a85
chore: run zig fmt
2021-12-29 15:13:50 -06:00
Rekai Nyangadzayi Musuka
ff7bf4eaa7
chore: add reccomended vscode extensions
2021-12-29 15:11:30 -06:00