mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
$ffcf $ffd0 -> hSCX hSCY
This commit is contained in:
parent
b66bac8a44
commit
df21dbccb7
@ -86,10 +86,10 @@ VBlank0: ; 2b1
|
|||||||
ld [$ff8a], a
|
ld [$ff8a], a
|
||||||
|
|
||||||
; scroll x
|
; scroll x
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
ld [rSCX], a
|
ld [rSCX], a
|
||||||
; scroll y
|
; scroll y
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
ld [rSCY], a
|
ld [rSCY], a
|
||||||
; window y
|
; window y
|
||||||
ld a, [hWY]
|
ld a, [hWY]
|
||||||
@ -215,11 +215,11 @@ VBlank1: ; 337
|
|||||||
ld [$ff8a], a
|
ld [$ff8a], a
|
||||||
|
|
||||||
; scroll x
|
; scroll x
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
ld [rSCX], a
|
ld [rSCX], a
|
||||||
|
|
||||||
; scroll y
|
; scroll y
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
ld [rSCY], a
|
ld [rSCY], a
|
||||||
|
|
||||||
; time-sensitive fns
|
; time-sensitive fns
|
||||||
@ -323,10 +323,10 @@ VBlank3: ; 396
|
|||||||
ld [$ff8a], a
|
ld [$ff8a], a
|
||||||
|
|
||||||
; scroll x
|
; scroll x
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
ld [rSCX], a
|
ld [rSCX], a
|
||||||
; scroll y
|
; scroll y
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
ld [rSCY], a
|
ld [rSCY], a
|
||||||
|
|
||||||
; any pals to update?
|
; any pals to update?
|
||||||
@ -455,7 +455,7 @@ VBlank5: ; 400
|
|||||||
ld [$ff8a], a
|
ld [$ff8a], a
|
||||||
|
|
||||||
; scroll x
|
; scroll x
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
ld [rSCX], a
|
ld [rSCX], a
|
||||||
|
|
||||||
; if we can update pals, skip this part
|
; if we can update pals, skip this part
|
||||||
|
106
main.asm
106
main.asm
@ -153,8 +153,8 @@ Init: ; 17d
|
|||||||
call Function4031
|
call Function4031
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [$ffde], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld [rJOYP], a
|
ld [rJOYP], a
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [rSTAT], a
|
ld [rSTAT], a
|
||||||
@ -17961,8 +17961,8 @@ Function620b: ; 620b
|
|||||||
call Function3200
|
call Function3200
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom], a
|
ld [hLCDStatCustom], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@ -18060,11 +18060,11 @@ TitleScreenEntrance: ; 62bc
|
|||||||
|
|
||||||
; Animate the logo:
|
; Animate the logo:
|
||||||
; Move each line by 4 pixels until our count hits 0.
|
; Move each line by 4 pixels until our count hits 0.
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
sub 4
|
sub 4
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
|
|
||||||
; Lay out a base (all lines scrolling together).
|
; Lay out a base (all lines scrolling together).
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -18292,8 +18292,8 @@ Function642e: ; 642e
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld [hJoyDown], a
|
ld [hJoyDown], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -18351,8 +18351,8 @@ Function6473: ; 6473
|
|||||||
ld a, $98
|
ld a, $98
|
||||||
ld [$d153], a
|
ld [$d153], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Function5958
|
call Function5958
|
||||||
ret
|
ret
|
||||||
; 64b9
|
; 64b9
|
||||||
@ -26361,8 +26361,8 @@ Function11915: ; 11915
|
|||||||
callab Function8cf53
|
callab Function8cf53
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 11940
|
; 11940
|
||||||
@ -26458,9 +26458,9 @@ Function11c51: ; 11c51
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], $7e
|
ld [hl], $7e
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld [$c3bf], a
|
ld [$c3bf], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$c3c0], a
|
ld [$c3c0], a
|
||||||
ld [$cf63], a
|
ld [$cf63], a
|
||||||
ld [$cf64], a
|
ld [$cf64], a
|
||||||
@ -48345,7 +48345,7 @@ Function3fb6c: ; 3fb6c
|
|||||||
call Function3fbd6
|
call Function3fbd6
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [$ffde], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
ld [rWY], a
|
ld [rWY], a
|
||||||
@ -48374,7 +48374,7 @@ Function3fb6c: ; 3fb6c
|
|||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ret
|
ret
|
||||||
; 3fbd6
|
; 3fbd6
|
||||||
|
|
||||||
@ -48611,7 +48611,7 @@ Function40000: ; 40000
|
|||||||
ld a, [hWY]
|
ld a, [hWY]
|
||||||
ld h, a
|
ld h, a
|
||||||
push hl
|
push hl
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
push af
|
push af
|
||||||
ld hl, Options
|
ld hl, Options
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -48652,7 +48652,7 @@ Function40000: ; 40000
|
|||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
pop af
|
pop af
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
pop hl
|
pop hl
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
@ -53352,8 +53352,8 @@ Function4e881: ; 4e881
|
|||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
ld hl, $68bd
|
ld hl, $68bd
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -53390,8 +53390,8 @@ Function4e8c2: ; 4e8c2
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .asm_4e8ee
|
jr nz, .asm_4e8ee
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
call Function3200
|
call Function3200
|
||||||
call Function32f9
|
call Function32f9
|
||||||
@ -53439,7 +53439,7 @@ Function4e980: ; 4e980
|
|||||||
Function4e998: ; 4e998
|
Function4e998: ; 4e998
|
||||||
call Function4e9e5
|
call Function4e9e5
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
ld de, $e4e4
|
ld de, $e4e4
|
||||||
@ -53459,7 +53459,7 @@ Function4e9ab: ; 4e9ab
|
|||||||
cp $60
|
cp $60
|
||||||
jr c, .asm_4e9b3
|
jr c, .asm_4e9b3
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call Function4e9f1
|
call Function4e9f1
|
||||||
inc e
|
inc e
|
||||||
inc e
|
inc e
|
||||||
@ -57755,9 +57755,9 @@ Function865b5: ; 865b5
|
|||||||
ld a, $13
|
ld a, $13
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $d0
|
ld a, $d0
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -57776,30 +57776,30 @@ Function865b5: ; 865b5
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Function86643
|
call Function86643
|
||||||
ret
|
ret
|
||||||
; 86635
|
; 86635
|
||||||
|
|
||||||
Function86635: ; 86635
|
Function86635: ; 86635
|
||||||
.asm_86635
|
.asm_86635
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
cp $70
|
cp $70
|
||||||
ret z
|
ret z
|
||||||
add $4
|
add $4
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .asm_86635
|
jr .asm_86635
|
||||||
; 86643
|
; 86643
|
||||||
|
|
||||||
Function86643: ; 86643
|
Function86643: ; 86643
|
||||||
.asm_86643
|
.asm_86643
|
||||||
ld a, [$ffcf]
|
ld a, [hSCX]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
dec a
|
dec a
|
||||||
dec a
|
dec a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .asm_86643
|
jr .asm_86643
|
||||||
; 86650
|
; 86650
|
||||||
@ -57940,9 +57940,9 @@ Function86810: ; 86810
|
|||||||
ld a, $13
|
ld a, $13
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $d0
|
ld a, $d0
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -57967,11 +57967,11 @@ Function86810: ; 86810
|
|||||||
ld a, $13
|
ld a, $13
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $c0
|
ld a, $c0
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Function86643
|
call Function86643
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -62668,7 +62668,7 @@ Function97ebc: ; 97ebc
|
|||||||
; 97ec3
|
; 97ec3
|
||||||
|
|
||||||
Function97ec3: ; 97ec3
|
Function97ec3: ; 97ec3
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
ld hl, $0004
|
ld hl, $0004
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -62686,24 +62686,24 @@ Function97ecd: ; 97ecd
|
|||||||
jr z, .asm_97ee4
|
jr z, .asm_97ee4
|
||||||
ld hl, $0002
|
ld hl, $0002
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97ee4
|
.asm_97ee4
|
||||||
ld hl, $0002
|
ld hl, $0002
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [$ffd0]
|
ld a, [hSCY]
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_97eee
|
.asm_97eee
|
||||||
ld hl, $0004
|
ld hl, $0004
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Function97e72
|
call Function97e72
|
||||||
ret
|
ret
|
||||||
; 97ef9
|
; 97ef9
|
||||||
@ -65436,8 +65436,8 @@ Functioncc11c: ; cc11c
|
|||||||
call Functioncc8a4
|
call Functioncc8a4
|
||||||
call Functioncc1e2
|
call Functioncc1e2
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Functioncc1fb
|
call Functioncc1fb
|
||||||
call Functioncc1bb
|
call Functioncc1bb
|
||||||
|
|
||||||
@ -65752,8 +65752,8 @@ Functioncc8f6: ; cc8f6
|
|||||||
ld de, $e4e4
|
ld de, $e4e4
|
||||||
call DmgToCgbObjPals
|
call DmgToCgbObjPals
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
call Functioncc1fb
|
call Functioncc1fb
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -66971,8 +66971,8 @@ Functione4579: ; e4579
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld [hJoyDown], a
|
ld [hJoyDown], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -67060,8 +67060,8 @@ Functione45e8: ; e45e8
|
|||||||
ld [$cf63], a
|
ld [$cf63], a
|
||||||
ld [$cf64], a
|
ld [$cf64], a
|
||||||
ld [$cf65], a
|
ld [$cf65], a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@ -67129,8 +67129,8 @@ Functione48ac: ; e48ac
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
xor a
|
xor a
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@ -72331,9 +72331,9 @@ StartTitleScreen: ; 10ed67
|
|||||||
|
|
||||||
;
|
;
|
||||||
ld a, $70
|
ld a, $70
|
||||||
ld [$ffcf], a
|
ld [hSCX], a
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd0], a
|
ld [hSCY], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
|
Loading…
Reference in New Issue
Block a user