mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Fade In/Out in manuals
This commit is contained in:
+102
-38
@@ -22,6 +22,13 @@ STEREOMODE equ 0
|
|||||||
.zpvar temp .word
|
.zpvar temp .word
|
||||||
|
|
||||||
start
|
start
|
||||||
|
lda #0
|
||||||
|
sta dmactls ; screen off
|
||||||
|
ldx #3
|
||||||
|
@ sta COLOR0-1,x
|
||||||
|
dex
|
||||||
|
bpl @-
|
||||||
|
jsr WaitOneFrame
|
||||||
jsr CheckPALorNTSC
|
jsr CheckPALorNTSC
|
||||||
ldx #<MODUL ;low byte of RMT module to X reg
|
ldx #<MODUL ;low byte of RMT module to X reg
|
||||||
ldy #>MODUL ;hi byte of RMT module to Y reg
|
ldy #>MODUL ;hi byte of RMT module to Y reg
|
||||||
@@ -46,46 +53,29 @@ start
|
|||||||
|
|
||||||
vmain VBLANK,7
|
vmain VBLANK,7
|
||||||
|
|
||||||
|
jsr MakeScreenCopy
|
||||||
|
|
||||||
|
lda #@dmactl(standard|dma) ; standard screen width, DL on, P/M off
|
||||||
|
sta dmactls
|
||||||
|
jsr WaitOneFrame
|
||||||
|
jsr FadeIn
|
||||||
|
|
||||||
main_loop
|
main_loop
|
||||||
bit escflag
|
bit escflag
|
||||||
spl:rts ; EXIT THIS WAY --->
|
bpl NoEscape
|
||||||
mwa top_src src
|
; EXIT THIS WAY --->
|
||||||
mwa #screen dest
|
jsr FadeOut
|
||||||
|
VMAIN XITVBV,7 ; jsr SetVBL (off user proc)
|
||||||
ldx #screen_height-1
|
LDA #%01000000 ; DLI off
|
||||||
screen_copy
|
STA NMIEN
|
||||||
mwa top_src start_address
|
lda #0 ; screen off
|
||||||
ldy #0
|
sta dmactls
|
||||||
@
|
sta escflag
|
||||||
lda (src),y
|
jsr WaitOneFrame
|
||||||
cmp #$ff ; end of line marker
|
; exit
|
||||||
bne not_eol
|
jmp start
|
||||||
sty next_line_begin
|
NoEscape
|
||||||
lda #$00
|
jsr MakeScreenCopy
|
||||||
@ sta (dest),y
|
|
||||||
iny
|
|
||||||
cpy #screen_width
|
|
||||||
bne @-
|
|
||||||
jmp next_line
|
|
||||||
|
|
||||||
not_eol
|
|
||||||
sta (dest),y
|
|
||||||
iny
|
|
||||||
cpy #screen_width
|
|
||||||
bne @-1
|
|
||||||
mva #screen_width-1 next_line_begin
|
|
||||||
next_line
|
|
||||||
adw dest #screen_width
|
|
||||||
; adw src #screen_width
|
|
||||||
inc next_line_begin
|
|
||||||
clc
|
|
||||||
lda src
|
|
||||||
adc next_line_begin
|
|
||||||
sta src
|
|
||||||
scc:inc src+1
|
|
||||||
|
|
||||||
dex
|
|
||||||
bpl screen_copy
|
|
||||||
; save the current end of the printed text source
|
; save the current end of the printed text source
|
||||||
mwa src end_address
|
mwa src end_address
|
||||||
|
|
||||||
@@ -137,6 +127,74 @@ scroll_up
|
|||||||
scs:mwa #man_text top_src
|
scs:mwa #man_text top_src
|
||||||
jmp main_loop
|
jmp main_loop
|
||||||
|
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc MakeScreenCopy
|
||||||
|
mwa top_src src
|
||||||
|
mwa #screen dest
|
||||||
|
|
||||||
|
ldx #screen_height-1
|
||||||
|
screen_copy
|
||||||
|
mwa top_src start_address
|
||||||
|
ldy #0
|
||||||
|
@
|
||||||
|
lda (src),y
|
||||||
|
cmp #$ff ; end of line marker
|
||||||
|
bne not_eol
|
||||||
|
sty next_line_begin
|
||||||
|
lda #$00
|
||||||
|
@ sta (dest),y
|
||||||
|
iny
|
||||||
|
cpy #screen_width
|
||||||
|
bne @-
|
||||||
|
jmp next_line
|
||||||
|
|
||||||
|
not_eol
|
||||||
|
sta (dest),y
|
||||||
|
iny
|
||||||
|
cpy #screen_width
|
||||||
|
bne @-1
|
||||||
|
mva #screen_width-1 next_line_begin
|
||||||
|
next_line
|
||||||
|
adw dest #screen_width
|
||||||
|
; adw src #screen_width
|
||||||
|
inc next_line_begin
|
||||||
|
clc
|
||||||
|
lda src
|
||||||
|
adc next_line_begin
|
||||||
|
sta src
|
||||||
|
scc:inc src+1
|
||||||
|
|
||||||
|
dex
|
||||||
|
bpl screen_copy
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc FadeIn
|
||||||
|
ldy #15
|
||||||
|
FirstLoop
|
||||||
|
lda COLOR1
|
||||||
|
cmp #13
|
||||||
|
beq ColorOK
|
||||||
|
inc COLOR1
|
||||||
|
ColorOK
|
||||||
|
jsr WaitOneFrame
|
||||||
|
dey
|
||||||
|
bpl FirstLoop
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
|
.proc FadeOut
|
||||||
|
ldy #15
|
||||||
|
FirstLoop
|
||||||
|
lda COLOR1
|
||||||
|
beq ColorOK
|
||||||
|
dec COLOR1
|
||||||
|
ColorOK
|
||||||
|
jsr WaitOneFrame
|
||||||
|
dey
|
||||||
|
bpl FirstLoop
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc GetKey
|
.proc GetKey
|
||||||
@@ -240,6 +298,12 @@ VBLANKEND
|
|||||||
jmp XITVBV
|
jmp XITVBV
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
.proc WaitOneFrame
|
||||||
|
;--------------------------------------------------
|
||||||
|
waitRTC ; or wait ?
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
;--------------------------------------------------
|
||||||
.proc CheckPALorNTSC
|
.proc CheckPALorNTSC
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda $d014 ;http://www.myatari.com/nirdary.html
|
lda $d014 ;http://www.myatari.com/nirdary.html
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user