mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
LYOverrides in main.asm
This commit is contained in:
parent
64bb7d2253
commit
651e0a4245
32
main.asm
32
main.asm
@ -249,11 +249,12 @@ Function547: ; 547
|
|||||||
cp rSCX & $ff
|
cp rSCX & $ff
|
||||||
ret nz
|
ret nz
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [$d100]
|
ld a, [LYOverrides]
|
||||||
ld [$ff00+c], a
|
ld [$ff00+c], a
|
||||||
ret
|
ret
|
||||||
; 552
|
; 552
|
||||||
|
|
||||||
|
|
||||||
LCD: ; 552
|
LCD: ; 552
|
||||||
push af
|
push af
|
||||||
ld a, [hLCDStatCustom]
|
ld a, [hLCDStatCustom]
|
||||||
@ -264,7 +265,7 @@ LCD: ; 552
|
|||||||
push bc
|
push bc
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $d100 >> 8
|
ld b, LYOverrides >> 8
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hLCDStatCustom]
|
ld a, [hLCDStatCustom]
|
||||||
@ -279,7 +280,6 @@ LCD: ; 552
|
|||||||
; 568
|
; 568
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DisableLCD: ; 568
|
DisableLCD: ; 568
|
||||||
; Turn the LCD off
|
; Turn the LCD off
|
||||||
|
|
||||||
@ -71436,11 +71436,9 @@ StartTitleScreen: ; 10ed67
|
|||||||
|
|
||||||
; LY/SCX trickery starts here
|
; LY/SCX trickery starts here
|
||||||
|
|
||||||
; Save WRAM bank
|
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
; WRAM bank 5
|
ld a, 5 ; BANK(LYOverrides)
|
||||||
ld a, 5
|
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
; Make alternating lines come in from opposite sides
|
; Make alternating lines come in from opposite sides
|
||||||
@ -71448,28 +71446,27 @@ StartTitleScreen: ; 10ed67
|
|||||||
; ( This part is actually totally pointless, you can't
|
; ( This part is actually totally pointless, you can't
|
||||||
; see anything until these values are overwritten! )
|
; see anything until these values are overwritten! )
|
||||||
|
|
||||||
ld b, 40 ; alternate for 80 lines
|
ld b, 80 / 2 ; alternate for 80 lines
|
||||||
ld hl, $d100 ; LY buffer
|
ld hl, LYOverrides
|
||||||
.loop
|
.loop
|
||||||
; $00 is the middle position
|
; $00 is the middle position
|
||||||
ld [hl], $70 ; coming from the left
|
ld [hl], +112 ; coming from the left
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], $90 ; coming from the right
|
ld [hl], -112 ; coming from the right
|
||||||
inc hl
|
inc hl
|
||||||
dec b
|
dec b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
; Make sure the rest of the buffer is empty
|
; Make sure the rest of the buffer is empty
|
||||||
ld hl, $d150
|
ld hl, LYOverrides + 80
|
||||||
xor a
|
xor a
|
||||||
ld bc, $0040
|
ld bc, LYOverridesEnd - (LYOverrides + 80)
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
; Let LCD Stat know we're messing around with SCX
|
; Let LCD Stat know we're messing around with SCX
|
||||||
ld a, rSCX - rJOYP
|
ld a, rSCX - rJOYP
|
||||||
ld [hLCDStatCustom], a
|
ld [hLCDStatCustom], a
|
||||||
|
|
||||||
; Restore WRAM bank
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
@ -71483,14 +71480,13 @@ StartTitleScreen: ; 10ed67
|
|||||||
set 2, a
|
set 2, a
|
||||||
ld [rLCDC], a
|
ld [rLCDC], a
|
||||||
|
|
||||||
;
|
ld a, +112
|
||||||
ld a, $70
|
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
ld a, $8
|
ld a, 8
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld a, $7
|
ld a, 7
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, -112
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
Loading…
Reference in New Issue
Block a user