easter: working better now

This commit is contained in:
Vince Weaver
2025-04-19 22:13:12 -04:00
parent e0d5c0fc4e
commit 1758132e15
8 changed files with 253 additions and 61 deletions

View File

@@ -129,6 +129,8 @@ music.inc: generate_common MUSIC
./generate_common -a 0xd000 -s hgr_vertical_scroll_up_aux music.lst >> music.inc
./generate_common -a 0xd000 -s slow_copy_main music.lst >> music.inc
./generate_common -a 0xd000 -s slow_copy_aux music.lst >> music.inc
./generate_common -a 0xd000 -s slow_copy_A0_main music.lst >> music.inc
./generate_common -a 0xd000 -s slow_copy_A0_aux music.lst >> music.inc
####

View File

@@ -116,11 +116,16 @@ skip:
jsr clear_dhgr_screens
lda #$20
sta DRAW_PAGE
restart_scroll:
;================================
; set up initial graphics
;================================
prep_for_scroll:
prep_for_scroll_up:
.if 1
;=================================
; copy full bottom graphic to off-screen page1
@@ -158,10 +163,10 @@ prep_for_scroll:
jsr hgr_page_flip
;==================
; scroll a bit
;========================
; scroll DOWN 2 screens
lda #192
lda #191
sta SCROLL_COUNT
scroll_down_loop:
@@ -169,35 +174,146 @@ scroll_down_loop:
; scroll
jsr hgr_vertical_scroll_down_main ; scroll draw page down 2
.if 0
ldx #0
ldy #2
lda SCROLL_COUNT
jsr slow_copy_main
.endif
jsr hgr_vertical_scroll_down_aux
.if 0
ldx #0
ldy #2
lda SCROLL_COUNT
jsr slow_copy_aux
.endif
jsr slow_copy_A0_main
jsr hgr_vertical_scroll_down_aux
ldx #0
ldy #2
lda SCROLL_COUNT
jsr slow_copy_A0_aux
jsr wait_vblank
jsr hgr_page_flip
dec SCROLL_COUNT
lda SCROLL_COUNT
cmp #$FF
bne scroll_down_loop
; wait a bit
lda #1
jsr wait_seconds
.endif
; jsr clear_dhgr_screens
;=========================================
;=========================================
;=========================================
;=========================================
;=========================================
;==============================
; scroll down
;==============================
; assume DRAW page is at location 0
prep_for_scroll_down:
;========================
;========================
; setup graphics for location 0 again
lda #0 ; from $A000 (top)
ldx #0 ; to DRAW_PAGE+0
ldy #192 ; lines to copy
jsr slow_copy_A0_main ; to MAIN
lda #0 ; from $A000 (top)
ldx #0 ; to DRAW_PAGE+0
ldy #192 ; lines to copy
jsr slow_copy_A0_aux ; to AUX
jsr wait_vblank
jsr hgr_page_flip
; showing SCROLL=0
; drawing SCROLL=1
;==================================================
; copy full bottom graphic+1 to DRAW_PAGE
; from $A000+1 to DRAW_PAGE
lda #1 ; from $A000+1
ldx #0 ; to DRAW_PAGE+0
ldy #191 ; 191 lines
jsr slow_copy_A0_main
lda #1 ; from $A000+1
ldx #0 ; to DRAW_PAGE+0
ldy #191 ; 191 lines
jsr slow_copy_A0_aux
; bottom line from next
lda #0 ; from $8000 (bottom)
ldx #191 ; to DRAW_PAGE+191
ldy #1 ; 1 line
jsr slow_copy_main
lda #0
ldx #191
ldy #1
jsr slow_copy_aux
jsr wait_vblank
jsr hgr_page_flip
;======================
; show scroll=1
; draw scroll=2
;========================
; scroll UP 2 screens
lda #0
sta SCROLL_COUNT
scroll_up_loop:
; scroll
jsr hgr_vertical_scroll_up_main ; scroll up by 2
; from $8000+start+offset - $2000/$4000+offset
; X = start Y = len A=offset
lda SCROLL_COUNT ; from $8000+SCROLL_COUNT (bottom)
ldx #190 ; to DRAW_PAGE+190
ldy #2 ; length
jsr slow_copy_main
jsr hgr_vertical_scroll_up_aux
lda SCROLL_COUNT ; from $8000+SCROLL_COUNT (bottom)
ldx #190 ; to DRAW_PAGE+190
ldy #2 ; length
jsr slow_copy_aux
jsr wait_vblank
jsr hgr_page_flip
inc SCROLL_COUNT
lda SCROLL_COUNT
cmp #191
bne scroll_up_loop
; wait a bit
lda #1
jsr wait_seconds
jmp restart_scroll
rts

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,8 @@
seek = $1126
driveon = $119D
driveoff = $1122
load_new = $11AB
load_address=$11C4
load_track=load_address+1
load_sector=load_address+2
load_length=load_address+3

View File

@@ -1,59 +1,128 @@
; copy from $8000+start : $8000+end to $2000/$4000
;==================================================================
; copy from $8000+offset to $8000+offset+len to $2000/$4000+start
; X=start
; X=start/index
; Y=len
; A=offset
; A=output/offset
slow_copy_aux:
sta WRAUX
sta RDAUX
sta WRAUX ; set write to AUX
sta RDAUX ; set read from AUX
slow_copy_main:
slow_copy:
sty LENGTH
sta OFFSET
sty LENGTH ; store length
sta OFFSET ; store src line output
slow_copy_outer_loop:
stx INDEX
txa
stx INDEX ; save dest line index
ldx OFFSET
lda hposn_low,X
sta slow_copy_smc1+1 ; low addr of src row addr
lda hposn_high,X ; high addr of src
clc
adc OFFSET
tax
adc #$60 ; adjust up to $80
sta slow_copy_smc1+2 ; high addr of src row addr
lda hposn_low,X ; copy src
sta slow_copy_smc1+1
lda hposn_high,X
clc
adc #$60 ; to $80
sta slow_copy_smc1+2
; destination is INDEX (start)
ldx INDEX ; restore index
ldx INDEX ; restore dest line index
lda hposn_low,X ; copy dest
sta slow_copy_smc2+1
lda hposn_low,X
sta slow_copy_smc2+1 ; low addr of src row addr
lda hposn_high,X
clc
adc DRAW_PAGE
sta slow_copy_smc2+2
sta slow_copy_smc2+2 ; high addr of src row addr
ldy #39
slow_copy_loop:
slow_copy_smc1:
lda $A000,Y
lda $A000,Y ; load from src
slow_copy_smc2:
sta $2000,Y
sta $2000,Y ; store to dest
dey
bpl slow_copy_loop
inx
inc OFFSET ; move to next src line
inx ; move to next dest line
dec LENGTH
bne slow_copy_outer_loop
sta RDMAIN
sta WRMAIN
sta RDMAIN ; read from MAIN
sta WRMAIN ; write to MAIN
rts
;==========================================================
; copy from $A000+offset to $A000+offset+len to $2000/$4000+start
; A=src offset line ($a000+line A)
; X=destination (DRAW_PAGE+line X)
; Y=len
slow_copy_A0_aux:
sta WRAUX ; set write to AUX
sta RDAUX ; set read from AUX
slow_copy_A0_main:
slow_copy_A0:
sty LENGTH ; store length
sta OFFSET ; store source line offset
slow_copy_A0_outer_loop:
stx INDEX ; store destination line index
ldx OFFSET ; source line offset
lda hposn_low,X
sta slow_copy_A0_smc1+1 ; low value of src row addr
lda hposn_high,X
clc
adc #$80 ; to $A0
sta slow_copy_A0_smc1+2 ; high value of src row addr
ldx INDEX ; restore dest line offset
lda hposn_low,X
sta slow_copy_A0_smc2+1 ; low value of dest row addr
lda hposn_high,X
clc
adc DRAW_PAGE
sta slow_copy_A0_smc2+2 ; high value of dest row addr
ldy #39
slow_copy_A0_loop:
slow_copy_A0_smc1:
lda $A000,Y ; load byte from src
slow_copy_A0_smc2:
sta $2000,Y ; store byte to dest
dey ; work backwards
bpl slow_copy_A0_loop
inc OFFSET ; increment source line
inx ; increment destination line
dec LENGTH
bne slow_copy_A0_outer_loop
sta RDMAIN ; read from MAIN
sta WRMAIN ; write to MAIN
rts

View File

@@ -211,9 +211,7 @@ start_message: ;01234567890123456789012345678901234567890
message_type_offset:
.byte " ",0
.byte 0,10,"MUSIC: SPRING (2001) BY IVAN ROSCHIN",0
.byte 0,12,"GRAPHICS BY GUINEA PIG GIRL 24",0
; .byte 0,13," ATARI XL DEMO",0
; .byte 0,14," BY NEW GENERATION, RADIANCE, ZELAX",0
.byte 0,12,"GRAPHICS BY GUINEAGIRL2424",0
.byte 0,16,"FAST DISK LOAD BY QKUMBA",0
.byte 0,17,"ZX02 DECOMPRESSION BY DMSC",0
.byte 0,18,"EVERYTHING ELSE BY DEATER",0

View File

@@ -29,7 +29,7 @@ hgr_page1_vscroll_down:
ldy #39
hgr_page1_vscroll_down_loop:
.if 0
.if 1
lda $37D0,Y ; 189 -> 191
sta $3FD0,Y
lda $33D0,Y ; 188 -> 190
@@ -430,8 +430,7 @@ hgr_page2_vscroll_down:
ldy #39
hgr_page2_vscroll_down_loop:
.if 0
.if 1
lda $57D0,Y ; 189 -> 191
sta $5FD0,Y
lda $53D0,Y ; 188 -> 190

View File

@@ -345,7 +345,7 @@ hgr_page1_vscroll_up_loop:
sta $31D0,Y
lda $3DD0,Y ; 159 -> 157
sta $35D0,Y
.if 0
.if 1
lda $2250,Y ; 160 -> 158
sta $39D0,Y
lda $2650,Y ; 161 -> 159
@@ -410,10 +410,10 @@ hgr_page1_vscroll_up_loop:
sta $33D0,Y
lda $3FD0,Y ; 191 -> 189
sta $37D0,Y
lda $0000,Y ; 192 -> 190
sta $3BD0,Y
lda $0000,Y ; 193 -> 191
sta $3FD0,Y
; lda $0000,Y ; 192 -> 190
; sta $3BD0,Y
; lda $0000,Y ; 193 -> 191
; sta $3FD0,Y
.endif
dey
@@ -750,7 +750,7 @@ hgr_page2_vscroll_up_loop:
sta $51D0,Y
lda $5DD0,Y ; 159 -> 157
sta $55D0,Y
.if 0
.if 1
lda $4250,Y ; 160 -> 158
sta $59D0,Y
lda $4650,Y ; 161 -> 159
@@ -815,10 +815,10 @@ hgr_page2_vscroll_up_loop:
sta $53D0,Y
lda $5FD0,Y ; 191 -> 189
sta $57D0,Y
lda $2000,Y ; 192 -> 190
sta $5BD0,Y
lda $2000,Y ; 193 -> 191
sta $5FD0,Y
; lda $2000,Y ; 192 -> 190
; sta $5BD0,Y
; lda $2000,Y ; 193 -> 191
; sta $5FD0,Y
.endif
dey