Updated BG scroll latch behaviour
This commit is contained in:
@@ -650,17 +650,22 @@ reg210Cw:
|
|||||||
|
|
||||||
; BG1 horizontal scroll register
|
; BG1 horizontal scroll register
|
||||||
reg210Dw:
|
reg210Dw:
|
||||||
mov bl,byte[bg1scrolx+1]
|
xor ebx,ebx
|
||||||
mov byte[bg1scrolx],bl
|
mov byte[bg1scrolx],al
|
||||||
mov byte[bg1scrolx+1],al
|
shl word[bg1scrolx],8
|
||||||
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg1scrolx],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; BG1 vertical scroll register
|
; BG1 vertical scroll register
|
||||||
reg210Ew:
|
reg210Ew:
|
||||||
mov bl,byte[bg1scroly+1]
|
xor ebx,ebx
|
||||||
add bl,[bgscroltemp]
|
mov byte[bg1scroly],al
|
||||||
mov byte[bg1scroly],bl
|
shl word[bg1scroly],8
|
||||||
mov byte[bg1scroly+1],al
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg1scroly],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SECTION .bss
|
SECTION .bss
|
||||||
@@ -669,47 +674,67 @@ SECTION .text
|
|||||||
|
|
||||||
; BG2 horizontal scroll register
|
; BG2 horizontal scroll register
|
||||||
reg210Fw:
|
reg210Fw:
|
||||||
mov bl,byte[bg2scrolx+1]
|
xor ebx,ebx
|
||||||
mov byte[bg2scrolx],bl
|
mov byte[bg2scrolx],al
|
||||||
mov byte[bg2scrolx+1],al
|
shl word[bg2scrolx],8
|
||||||
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg2scrolx],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; BG2 vertical scroll register
|
; BG2 vertical scroll register
|
||||||
reg2110w:
|
reg2110w:
|
||||||
mov bl,byte[bg2scroly+1]
|
xor ebx,ebx
|
||||||
add bl,[bgscroltemp]
|
mov byte[bg2scroly],al
|
||||||
mov byte[bg2scroly],bl
|
shl word[bg2scroly],8
|
||||||
mov byte[bg2scroly+1],al
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg2scroly],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; BG3 horizontal scroll register
|
; BG3 horizontal scroll register
|
||||||
reg2111w:
|
reg2111w:
|
||||||
mov bl,byte[bg3scrolx+1]
|
xor ebx,ebx
|
||||||
mov byte[bg3scrolx],bl
|
mov byte[bg3scrolx],al
|
||||||
mov byte[bg3scrolx+1],al
|
shl word[bg3scrolx],8
|
||||||
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg3scrolx],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
section .data
|
||||||
|
NEWSYM latchbg3, db 0
|
||||||
|
|
||||||
|
section .text
|
||||||
|
|
||||||
; BG3 vertical scroll register
|
; BG3 vertical scroll register
|
||||||
reg2112w:
|
reg2112w:
|
||||||
mov bl,byte[bg3scroly+1]
|
xor ebx,ebx
|
||||||
add bl,[bgscroltemp]
|
mov byte[bg3scroly],al
|
||||||
mov byte[bg3scroly],bl
|
shl word[bg3scroly],8
|
||||||
mov byte[bg3scroly+1],al
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg3scroly],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; BG4 horizontal scroll register
|
; BG4 horizontal scroll register
|
||||||
reg2113w:
|
reg2113w:
|
||||||
mov bl,byte[bg4scrolx+1]
|
xor ebx,ebx
|
||||||
mov byte[bg4scrolx],bl
|
mov byte[bg4scrolx],al
|
||||||
mov byte[bg4scrolx+1],al
|
shl word[bg4scrolx],8
|
||||||
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg4scrolx],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; BG4 vertical scroll register
|
; BG4 vertical scroll register
|
||||||
reg2114w:
|
reg2114w:
|
||||||
mov bl,byte[bg4scroly+1]
|
xor ebx,ebx
|
||||||
add bl,[bgscroltemp]
|
mov byte[bg4scroly],al
|
||||||
mov byte[bg4scroly],bl
|
shl word[bg4scroly],8
|
||||||
mov byte[bg4scroly+1],al
|
mov bl,[bgscroltemp]
|
||||||
|
add word[bg4scroly],bx
|
||||||
|
mov byte[bgscroltemp],al
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; Video port control
|
; Video port control
|
||||||
|
|||||||
Reference in New Issue
Block a user