19 lines
643 B
Z80 Assembly
19 lines
643 B
Z80 Assembly
TV_Static_FX:
|
|
;this code runs every time the game boy finishes drawing one row of pixels, unless the interrupt is disabled as described above.
|
|
push hl
|
|
push af
|
|
ld hl,(COSINE_INDEX)
|
|
inc (hl)
|
|
ld a,(hl)
|
|
|
|
callpoint:
|
|
call cos ;<--- SMC, gets changed to "CALL SIN" by main game loop when bit 4 of frametimer equals 0, and back to
|
|
;"CALL COS" when bit 4 of frametimer equals 1.
|
|
; returns cos(A) into A
|
|
|
|
LD (&FF43),A ;output cos(frametimer) to horizontal scroll register
|
|
done_TV_Static_FX:
|
|
pop af
|
|
pop hl
|
|
reti ;return to main program
|
|
TV_Static_FX_End:
|