WIP sky scroller #2

This commit is contained in:
Natt Akuma 2025-11-23 05:55:00 +07:00
parent 71b2d5a0e0
commit 356aecb926
3 changed files with 65 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

@ -82,7 +82,7 @@ copy_start:
sei
lda #$35
sta $01
jmp part_9
jmp CODE_START_ADDR
.res loadraw - *
.incbin "../../build/loader-c64.prg", 2
@ -168,7 +168,7 @@ code_start:
;sta frame_delay
;jsr wait_loop
jsr intro
; jsr intro
lda #$0b
sta $d011
@ -200,6 +200,7 @@ code_start:
jsr init_2x
lda #$0b
sta $d011
jmp part_9 ; TEMP
jsr clr_txt
ldx #<story_writ
@ -507,6 +508,45 @@ code_start:
part_9:
jsr init_bmp
; set up sprites to cover scrolling
lda #$ff
ldx #0
: sta $2000,x
sta $4000,x
inx
bne :-
.repeat 4, I
ldx #I*48+$58
stx $d000+I*2
stx $d008+I*2
.endrepeat
ldx #6
:
lda #$42
sta $d001,x
lda #$d7
sta $d009,x
dex
dex
bpl :-
ldx #7
:
lda #$80
sta $0ff8,x
lda #0
sta $63f8,x
sta $d027,x
dex
bpl :-
stx $d01d
stx $d015
inx
stx $d010
stx $d017
stx $d01b
stx $d01c
stx frame
ldx #<skyscrname
ldy #>skyscrname
lda #$70
@ -566,8 +606,14 @@ part_9:
bpl :-
:
stx $d020
inx
lda #2
sta frame_delay
jsr wait_loop_2x
lda frame
and #7
ora #$38
sta $d011
inc frame
jmp :-
jmp *
@ -717,13 +763,27 @@ init_2x:
lda #$00
sta $d012
:
bit $d011
bpl :-
:
bit $d011
bmi :-
lda #51
:
cmp $d012
bne :-
lda #0
sta $d01a
sta $dc0e
lda #$63; <(985248/100)
sta $dc04
lda #$26;>(985248/100)
lda #$26; >(985248/100)
sta $dc05
lda #$11
sta $dc0e
lda $dc0d
and #$81