faster way of counting bits set. 12 => 11VBLs
This commit is contained in:
@@ -40,8 +40,7 @@ AddLiveNeighbors: MACRO
|
|||||||
and a, b
|
and a, b
|
||||||
|
|
||||||
; count bits set
|
; count bits set
|
||||||
ld de, BitsSet
|
ld d, HIGH(BitsSet)
|
||||||
add a, e
|
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
|
|
||||||
@@ -643,7 +642,7 @@ TilesLeft: ds 1 ; number of tiles left to render in current line
|
|||||||
Video: ds 2 ; progressing pointer in tilemap (VRAM)
|
Video: ds 2 ; progressing pointer in tilemap (VRAM)
|
||||||
Rendered: ds 2 ; progressing pointer in old buffer
|
Rendered: ds 2 ; progressing pointer in old buffer
|
||||||
|
|
||||||
SECTION "Bits Set", ROM0, ALIGN[4]
|
SECTION "Bits Set", ROM0, ALIGN[8]
|
||||||
BitsSet:
|
BitsSet:
|
||||||
db 0; 0 = 0000
|
db 0; 0 = 0000
|
||||||
db 1; 1 = 0001
|
db 1; 1 = 0001
|
||||||
|
|||||||
Reference in New Issue
Block a user