Commit Graph

614 Commits

Author SHA1 Message Date
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 63fa972afa chore: update dependencies
in response to zig master deprecations
2022-12-14 22:57:51 -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 2294dc8832 chore: add minimum zig version 2022-11-29 23:10:29 -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 002e33b48b fix: properly render table in README 2022-11-24 08:22:58 -04:00
Rekai Nyangadzayi Musuka 5bb25fe214 chore: update dependencies 2022-11-23 21:57:53 -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 ee1c0bb313 chore: update README 2022-11-16 10:55:33 -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 9fd405a896 chore(ci): update CI dependency 2022-11-11 13:25:56 -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 accecb3350 chore(ci): rename CI workflow 2022-11-10 11:58:47 -04:00
Rekai Nyangadzayi Musuka 1e0ade8f55 chore: update depdendencies 2022-11-07 00:54:35 -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 ef39d9a7b8 chore(ci): only run for .zig files, name workflow
Also enabled workflow dispatch
2022-11-03 08:56:14 -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