Matthew Laux
88dfbf7409
fix stack=d000, update HDMA to use the new timing code
2026-08-19 23:33:55 -05:00
Matthew Laux
9395b336e9
make wram_base and hram_base required, make dmg_new take RAM arrays, simplify and de-hack stack paths
2026-08-12 19:49:00 -05:00
Matthew Laux
8bfb3cf5bd
clean up unused code and stale comments
2026-08-08 00:44:56 -05:00
Matthew Laux
9142963262
migrate to 4k page size - bank switch optimization pt 2
2026-08-07 20:06:24 -05:00
Matthew Laux
ceeb2a6cc7
asm version of bg tile inner loop, optimize multiplies in audio
2026-07-24 22:03:40 -05:00
Matthew Laux
4029b832bc
shift optimization on page table lookup, replace all fixed branch targets with patching
2026-07-14 18:37:59 -05:00
Matthew Laux
71bb51ec88
instruction optimization round 1
2026-07-14 17:52:49 -05:00
Matthew Laux
a778e8a79b
track cycles in the block then count them at the end. kind of a wash?
2026-07-14 14:27:49 -05:00
Matthew Laux
00de54b442
add slow path for call/ret/rst (fixes SML2)
2026-07-12 23:38:46 -05:00
Matthew Laux
a48ae61a82
SP correctness fixes
2026-07-12 19:40:34 -05:00
Matthew Laux
5089339121
optimize memory usage by reclaiming unused block bytes
2026-07-12 18:48:03 -05:00
Matthew Laux
f6a9a1fd56
host side runner (gb6run) with tests from mooneye/blargg/games
2026-07-11 22:04:11 -05:00
Matthew Laux
7610d3ce96
biased page tables, scaled index on 68020+, interrupt fixes (that may or may not have actually improved compatibility)
2026-07-08 20:12:32 -05:00
Tanner Fokkens
4decd1de16
Fix ld sp,hl/imm16 to use page table for switchable WRAM banks
...
ld sp,hl and ld sp,imm16 computed the native SP pointer using a fixed
base (dmg->main_ram), which always resolved to WRAM bank 1 for the
$D000-$DFFF range. On CGB, this range is switchable (banks 1-7 via
SVBK). Games like Pokemon Crystal that use the SP trick to bulk-copy
data from switchable WRAM to VRAM would read from the wrong bank,
causing VRAM tile corruption.
Use the read page table at runtime instead, which is kept in sync with
the current WRAM bank by cgb_update_wram_bank().
2026-02-06 13:08:37 -08:00
Matthew Laux
882ace0d13
make LY read faster, revert wack HALT change
2026-01-25 20:53:56 -06:00
Matthew Laux
ebb343cdbd
support stack in HRAM (fixes DK '94)
2026-01-25 19:03:28 -06:00
Matthew Laux
8e17d86cfc
use git sha for version info
2026-01-22 01:18:46 -06:00
Matthew Laux
d627b7265b
re-add SP range detection, avoid copying lcd pixels twice
2026-01-21 21:20:42 -06:00
Matthew Laux
e9000a3c84
rewrite stack for the millionth time
2026-01-15 21:09:57 -06:00
Matthew Laux
814a9ccf0b
dmg_write16 instead of two dmg_write for stack ops
2026-01-13 23:40:28 -06:00
Matthew Laux
9f91bd7526
add 1x scale, audio refactor and fix wave frequency issue, remove crazy SP detection and always go through dmg_read/write
2026-01-13 21:47:25 -06:00
Matthew Laux
f472ce46bd
use 68k ccr instead of GB flag format. it's getting crashy
2026-01-09 00:42:26 -06:00
Matthew Laux
9969a0b483
split out stack funcs to separate file, start on key mappings dialog
2026-01-07 23:27:33 -06:00