Implemented Custom Goal Framework

This commit is contained in:
codemann8
2025-10-29 00:08:16 -05:00
parent a9ef09e2d0
commit 2ffcb1c3bd
6 changed files with 339 additions and 203 deletions

View File

@@ -520,3 +520,20 @@ AuxPaletteCheck:
REP #$30
PLX
RTS
CountBits:
; In: A - value to count bits set in
; Out: A - number of bits set
; Flexible to use with 8 or 16-bit mode
PHX : TAX
PHY : PHP
SEP #$20
LDA.b 1,S : BIT.b #$20 : BNE +
PLP : TXA : LDX.w #$000F : LDY.w #$0000
BRA ++
+ PLP : TXA : LDX.b #$07 : LDY.b #$00
++ - LSR : BCC +
INY
+ DEX : BPL -
TYA : PLY : PLX
RTL