Commit Graph
11 Commits
Author SHA1 Message Date
Matthew Laux efae2406d0 remove fused branches, complexity wasn't worth it 2026-07-14 14:46:12 -05:00
Tanner Fokkens c0a30de0b2 Fix inc/dec clobbering carry flag, breaking Pokemon Crystal menus
The GB inc/dec instructions must preserve the carry flag and only
modify Z. The JIT was capturing both Z and C from the 68k CCR,
causing dec to incorrectly set carry on borrow (e.g. 0-1=FF).

This broke Pokemon Crystal's xor_a_dec_a helper which returns with
C=0 to signal "no action". The corrupted C=1 caused the scrolling
menu to exit prematurely when pressing down past CANCEL, showing
phantom items and garbage prices.

Fix compile_set_z_flag to merge new Z with old C, and
compile_set_c_flag to merge new C with old Z. Move and/or/xor
immediates to compile_set_zc_flags since they should clear C.
2026-02-06 17:11:15 -08: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 c611c553ca fix flag bugs (wow that was hard to find), make DIV better, add color icons 2026-01-12 19:24:03 -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 b69b784bd7 fully remove N and H support 2026-01-08 22:57:37 -06:00
Matthew Laux eab85d0205 optimize ldh 2026-01-08 22:30:28 -06:00
Matthew Laux 698fe41688 more efficient context switch into JIT, remove old compiler files, fix vblank flag bug 2026-01-04 17:45:52 -06:00
Matthew Laux 90a3ad1386 fix add -> adc carry (fixes tetris sprite positioning bug) 2025-12-30 03:02:57 -06:00
Matthew Laux 1c13db1253 about to try mac vblank thing 2025-12-19 23:17:57 -06:00
Matthew Laux 28e5bc5c93 add basic compiler support to system6 version, xor a, split a bunch of stuff into different files 2025-12-17 23:28:17 -06:00