Rekai Nyangadzayi Musuka
fe6fc0e517
feat: add system information window
2023-02-23 17:27:42 -06:00
Rekai Nyangadzayi Musuka
5e94cbfbea
feat: add imgui support using zgui
2023-02-23 17:27:42 -06:00
Rekai Nyangadzayi Musuka
01f5410180
feat: allow gui and gdbstub to run in parallel
2023-02-23 02:40:24 -06:00
Rekai Nyangadzayi Musuka
49706842af
fix: run more than just the CPU when stepping via gdb
2023-02-23 02:40:24 -06:00
Rekai Nyangadzayi Musuka
518b868249
feat: respond to API changes for software bkpts
2023-02-23 02:40:24 -06:00
Rekai Nyangadzayi Musuka
755115660b
feat: allow gdb writes to certain mem regions
2023-02-23 02:40:24 -06:00
Rekai Nyangadzayi Musuka
1f3cdd9513
feat: add gdb support to zba
2023-02-23 02:40:24 -06:00
Rekai Nyangadzayi Musuka
024151a5c1
chore: update to latest zig master
2023-02-22 14:46:46 -06:00
Rekai Nyangadzayi Musuka
e380af7056
chore: use a more efficient decimal->bcd algorithm
...
This will not improve perf in any way because this code only gets run
one time a second orz
2023-02-21 23:22:42 -06:00
Rekai Nyangadzayi Musuka
c0e583d20d
fix: resolve off-by-one error in `str` addr when r15 is involved
...
I seem to have made up this rule (I was thinking about when r15 was
a source register). `rn` is the destination register.... whoops
2023-01-29 08:58:41 -06:00
Rekai Nyangadzayi Musuka
ae3bb94036
fix(ppu): draw file select sprites in amazing mirror
2023-01-08 01:36:58 -06:00
Rekai Nyangadzayi Musuka
ddc54e2977
fix: ignore missing opengl proc addresses
...
is this really a fix? the error never happens with mach-glfw
2023-01-01 15:56:18 -06:00
Rekai Nyangadzayi Musuka
59baa14bde
Merge branch 'main' of ssh://musuka.dev:2222/paoda/zba
2022-12-30 19:47:24 -06:00
Rekai Nyangadzayi Musuka
6bf1c44961
chore: refactor sprite rendering code
2022-12-30 19:47:01 -06:00
Rekai Nyangadzayi Musuka
0f148507e4
fix: respond to `@addWithOverflow` changes in latest zig
2022-12-28 15:20:44 -06:00
Rekai Nyangadzayi Musuka
0cec779545
chore: misc style changes
2022-12-28 07:29:07 -06:00
Rekai Nyangadzayi Musuka
1ecbbc7d29
chore: cleanup BIOS struct init code
2022-12-27 06:42:06 -06:00
Rekai Nyangadzayi Musuka
caaa60d1a8
fix: rotate unaligned reads on BIOS open-bus
2022-12-27 06:25:12 -06:00
Rekai Nyangadzayi Musuka
4326ae7a0a
fix: resolve broken affine bg in mario kart
2022-12-18 08:59:19 -04:00
Rekai Nyangadzayi Musuka
905c4448d0
feat: kind-of account for 1/4th of obj mode
2022-12-18 08:35:14 -04:00
Rekai Nyangadzayi Musuka
0de44835e5
fix: properly implement black/white blending for sprites
...
There's unique rules to handle for BLDY w/r/t sprites, I didn't know
about them (shown in bld_demo.gba). I'm sure I haven't ironed out every
rule but bld_demo.gba now *actually* passes
2022-12-18 07:44:01 -04:00
Rekai Nyangadzayi Musuka
5aac04faf5
tmp: disable buggy window emulation
...
I'd like to merge my affine sprite impl into main, which will require
merging a lot of the rewrites I did in this branch. My plan is to
merge the buggy ppu window impl to main, but keep it disabled.
This is technically a regression but the current impl barely worked
anyways so....
2022-12-17 09:58:15 -04:00
Rekai Nyangadzayi Musuka
f98a1700e0
feat: implement affine sprites
2022-12-17 09:47:10 -04:00
Rekai Nyangadzayi Musuka
acdb270793
chore: reimplement alpha blending
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
4ceed382ed
chore(ppu): use @ptrCast in drawTextMode
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
52ce4f3d20
chore(ppu): reimplement modes 3, 4, and 5
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
c1c8cac6e4
style(ppu): move text mode drawing to unique fn
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
be7a34f719
fix(window): proper inRange impl for window
...
window wrap now works (it's pretty slow though?)
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
f7a94634f9
chore: improve readability of sprite drawing code a bit
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
7d4ab6db2c
style: remove unused imports
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
0a78587d8e
chore: dont allocate not-small ?Sprite array on stack
...
use memset like most other allocations in this emu
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
b753ceef8e
chore: move FrameBuffer struct to util.zig
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
8963fe205b
chore: move OAM, PALRAM and VRAM structs to separate files
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
e906506e16
fix: 8-bit writes to WIN PPU registers
...
Advance Wars depends on these registers similar to Mario Kart's 8-bit
writes to Affine Background registers:
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
3195a45e3d
chore: refactor window
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
6aad911985
chore: crude background window impl (no affine)
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
e3b45ef794
chore: rename function (misspelt until now somehow)
2022-12-16 22:16:37 -04:00
Rekai Nyangadzayi Musuka
8e1a539e70
chore: debug read takes advantage of fastmem
...
deduplicate slowmem backup read handler
2022-12-15 23:18:54 -04:00
Rekai Nyangadzayi Musuka
bf95eee3f1
fix(apu): resolve bug in NR10 obscure behaviour
2022-12-05 11:08:04 -04:00
Rekai Nyangadzayi Musuka
240fbcb1df
chore: update dependencies
2022-12-01 13:23:09 -04:00
Rekai Nyangadzayi Musuka
26db340077
fix(input): implement atomic for KeyInput
2022-11-30 00:42:20 -04:00
Rekai Nyangadzayi Musuka
20f611b7b5
chore: be more intentional in atomic ordering use
2022-11-30 00:21:02 -04:00
Rekai Nyangadzayi Musuka
f9aefedf60
chore: cal glDeleteTextures on program exit
2022-11-29 23:35:13 -04:00
Rekai Nyangadzayi Musuka
d7e3d34726
fix(platform): ensure that title char* is null terminated
2022-11-29 23:21:57 -04:00
Rekai Nyangadzayi Musuka
4af86e1cb3
style: replace meta.Tuple calls with new tuple syntax
2022-11-29 23:01:06 -04:00
Rekai Nyangadzayi Musuka
9fcbbe7d57
chore: cleanup OpenGL vertex array + buffers
2022-11-29 22:53:37 -04:00
Rekai Nyangadzayi Musuka
c3f67e38a1
chore: exit early on shader compile failure
2022-11-29 22:25:04 -04:00
Rekai Nyangadzayi Musuka
46e29245b7
fix(apu): disable APU writes when APU is disabled
2022-11-26 12:20:42 -04:00
Rekai Nyangadzayi Musuka
66db2e6049
Revert "chore: refactor flash impl"
...
This reverts commit 96a9ae2ca5
.
2022-11-20 21:46:40 -04:00
Rekai Nyangadzayi Musuka
c5cf471912
fix(timer): removing cascade when TIM aleady enabled shouldn't reset counter
2022-11-20 19:13:49 -04:00
Rekai Nyangadzayi Musuka
4ed4f8e143
fix(dma): implement obscure behaviour for DMAs from ROM
2022-11-20 17:49:26 -04:00
Rekai Nyangadzayi Musuka
f31699d921
fix(log): logged improper second opcode for THUMB BL
2022-11-20 15:36:40 -04:00
Rekai Nyangadzayi Musuka
96a9ae2ca5
chore: refactor flash impl
2022-11-17 10:47:19 -04:00
Rekai Nyangadzayi Musuka
558c03b12b
style: changes to cpu.zig
2022-11-16 10:21:40 -04:00
Rekai Nyangadzayi Musuka
7d8fbbb086
fix(bus): resolve off-by-one error
2022-11-14 01:59:43 -04:00
Rekai Nyangadzayi Musuka
5d7cf3a8a2
chore: remove util fn for stdlib equivalent
2022-11-11 13:02:51 -04:00
Rekai Nyangadzayi Musuka
1230aa1e91
fix(cpu): remove miscompilation workaround
2022-11-11 03:56:49 -04:00
Rekai Nyangadzayi Musuka
429676ad43
feat(config): write config.toml to config dir, not data dir
2022-11-03 09:45:57 -03:00
Rekai Nyangadzayi Musuka
986bc9448e
fix(bus): account for read_table being the first table when freeing
2022-11-03 07:50:12 -03:00
Rekai Nyangadzayi Musuka
d34893ba72
fix(bus): fix confusion about which fastmem write table is for which write type
2022-11-02 08:21:59 -03:00
Rekai Nyangadzayi Musuka
b8a5fb95c1
fix(io): account for read-only bit in WAITCNT
2022-11-02 08:06:19 -03:00
Rekai Nyangadzayi Musuka
102b2c946b
fix(io): respect read-only bits in DISPSTAT
...
Superstar Saga now renders correctly
2022-11-02 07:54:06 -03:00
Rekai Nyangadzayi Musuka
505b1b9608
fix(bus): resolve simple oversights
2022-11-01 09:00:25 -03:00
Rekai Nyangadzayi Musuka
2851c140ea
fix(cpu): use LUT for ARM condition codes
2022-11-01 08:29:42 -03:00
Rekai Nyangadzayi Musuka
637d81ce44
chore(bus): only perform one allocation for fastmem tables
2022-11-01 07:04:42 -03:00
Rekai Nyangadzayi Musuka
bc52461f0f
fix(bus): replace write table with two tables for u32/u8 and u8 writes
2022-11-01 07:00:07 -03:00
Rekai Nyangadzayi Musuka
c395c04a6e
feat(bus): implement fastmem
...
+100 fps in Pokemon Emerald lol
2022-11-01 06:18:12 -03:00
Rekai Nyangadzayi Musuka
af8ec4db5b
chore: go through TODOs and FIXMEs
...
mainly deleting / rewording those that no longer apply
2022-10-31 06:17:09 -03:00
Rekai Nyangadzayi Musuka
5d47e5d167
fix(io): force-align all i/o reads
...
Of course, backups being the exception due to flash or sram quirks,
I don't remember lol
2022-10-31 05:50:27 -03:00
Rekai Nyangadzayi Musuka
5101fbd809
feat(io): pass all suite.gba i/o read tests
2022-10-31 05:22:11 -03:00
Rekai Nyangadzayi Musuka
472457b9f3
chore: make use of comptime control flow when working with tuples
2022-10-31 05:14:20 -03:00
Rekai Nyangadzayi Musuka
2ef4bb7dcc
revert(apu): switch from f32 44.1kHz to u16 32.768kHz
2022-10-31 05:14:20 -03:00
Rekai Nyangadzayi Musuka
9a732ea6f8
chore(i/o): ensure interrupt i/o exists
2022-10-31 05:14:20 -03:00
Rekai Nyangadzayi Musuka
f80799a593
fix(util): resolve bug in setHalf function
...
introduced in 472215b4c2
2022-10-30 04:12:58 -03:00
Rekai Nyangadzayi Musuka
ca67ca3183
fix(apu): only enable dma sound fifo after manual write
2022-10-30 03:48:12 -03:00
Rekai Nyangadzayi Musuka
47fc49deb6
fix(audio): add asserts where I assume audio format
2022-10-30 03:25:49 -03:00
Rekai Nyangadzayi Musuka
472215b4c2
feat(ppu): implement all i/o writes
2022-10-30 03:11:04 -03:00
Rekai Nyangadzayi Musuka
c9a423d094
fix(ppu): resolve mistakes in ppu i/o reads
2022-10-30 02:15:26 -03:00
Rekai Nyangadzayi Musuka
1d163fa56f
feat(apu): implement all apu i/o writes
2022-10-30 02:02:23 -03:00
Rekai Nyangadzayi Musuka
13710a3236
feat(timer): implement all timer i/o writes
2022-10-30 01:18:46 -03:00
Rekai Nyangadzayi Musuka
6154585e77
feat(dma): implement all dma i/o writes
2022-10-30 01:04:22 -03:00
Rekai Nyangadzayi Musuka
7debdc490d
fix(io): resovle off-by-one errors in i/o register ranges
2022-10-29 05:23:05 -03:00
Rekai Nyangadzayi Musuka
58375795bf
fix(ppu): apply proper masks to ppu i/o
...
Refactor Window, and bldcnt, bldalpha, bldy
2022-10-29 05:18:53 -03:00
Rekai Nyangadzayi Musuka
f0dca29836
fix(dma): apply proper masks to dma i/o
2022-10-29 04:53:21 -03:00
Rekai Nyangadzayi Musuka
c75682dbd4
fix(apu): some invalid i/o registers should read 0x0000
2022-10-29 04:29:44 -03:00
Rekai Nyangadzayi Musuka
36832ba1fb
feat(apu): impelement all apu i/o reads
2022-10-29 04:24:06 -03:00
Rekai Nyangadzayi Musuka
647bd83224
chore(io): rewrite certain error messages
...
We can do this now that we know that it won't be because of any
unimplemented feature in some circumstances
2022-10-29 02:37:54 -03:00
Rekai Nyangadzayi Musuka
c831f67d1a
feat(timer): implemeant all timer i/o reads
2022-10-29 01:37:28 -03:00
Rekai Nyangadzayi Musuka
268961262d
feat(dma): implement all dma i/o reads
2022-10-29 01:30:12 -03:00
Rekai Nyangadzayi Musuka
3e62feacba
feat(ppu): implement all ppu i/o reads
2022-10-29 01:29:27 -03:00
Rekai Nyangadzayi Musuka
d859cee365
style: get rid of unnecessary type coersion
2022-10-29 00:06:08 -03:00
Rekai Nyangadzayi Musuka
371cf4cc12
style(i/o, ppu): refactor ppu i/o
2022-10-28 23:45:54 -03:00
Rekai Nyangadzayi Musuka
10aec67ee0
emu: implement thread sleep in granular steps
2022-10-28 21:58:55 -03:00
Rekai Nyangadzayi Musuka
4eb715a138
doc(emu): properly document + simply constants
2022-10-28 21:57:30 -03:00
Rekai Nyangadzayi Musuka
14b24787ab
style: remove unnecessary imports
2022-10-28 21:56:55 -03:00
Rekai Nyangadzayi Musuka
eb7ffa29f4
fix(apu): pause device on mute instead of writing silence
2022-10-27 09:11:08 -03:00
Rekai Nyangadzayi Musuka
4b8ed3cebb
fix(io): resolve embarrasingly simple regression
...
introduced in 21eddac31e
2022-10-23 04:39:31 -03:00
Rekai Nyangadzayi Musuka
928ce674d9
fix(cpu): fix obscure LDRSH behaviour
2022-10-22 22:12:41 -03:00
Rekai Nyangadzayi Musuka
945dbec013
fix(open-bus): don't rotate result
...
Rotating misaligned reads is the responsibility of the CPU
2022-10-22 21:32:36 -03:00
Rekai Nyangadzayi Musuka
a2868dfe9e
feat(dma): Implement DMA Latch
2022-10-22 20:52:02 -03:00