proper intro

This commit is contained in:
giomba 2021-04-14 00:30:42 +02:00
parent 05ed319d93
commit a41ae70993
5 changed files with 167 additions and 5 deletions

View File

@ -28,6 +28,10 @@ ST_INTRO1 = 1
ST_INTRO2 = 2 ST_INTRO2 = 2
ST_INTRO3 = 3 ST_INTRO3 = 3
ST_INTRO4 = 4 ST_INTRO4 = 4
ST_INTRO5 = 5
ST_INTRO6 = 6
ST_INTRO7 = 7
ST_INTRO8 = 8
ST_MENURESET = 64 ST_MENURESET = 64
ST_MENU = 65 ST_MENU = 65
ST_LEVEL_TITLE = 128 ST_LEVEL_TITLE = 128
@ -107,6 +111,15 @@ introStringA2:
introStringA3: introStringA3:
BYTE "GIOMBA" BYTE "GIOMBA"
BYTE #$0 BYTE #$0
introStringA4:
BYTE "PRESENT"
BYTE #$0
introStringA5:
BYTE "A COMMODORE 64"
BYTE #$0
introStringA6:
BYTE "VIDEOGAME"
BYTE #$0
; Levels ; Levels
; ---------------------------------------------------------------------- ; ----------------------------------------------------------------------

View File

@ -245,12 +245,119 @@ statusIntro4 SUBROUTINE
jsr printString jsr printString
lda counter lda counter
cmp #$86 cmp #$08
bne .end bne .end
lda counter + 1 lda counter + 1
cmp #$01 cmp #$02
bne .end bne .end
lda #ST_INTRO4
lda #$80
ldy #$0
.loop:
sta $540,y
iny
cpy #200
bne .loop
lda #ST_INTRO5
sta status
.end:
rts
statusIntro5 SUBROUTINE
jsr setupMagicInterrupt
; "PRESENT"
lda #<introStringA4
sta srcStringPointer
lda #>introStringA4
sta srcStringPointer + 1
lda #$50
sta dstScreenPointer
lda #$05
sta dstScreenPointer + 1
jsr printString
lda counter
cmp #$80
bne .end
lda counter + 1
cmp #$02
bne .end
lda #ST_INTRO6
sta status
.end:
rts
statusIntro6 SUBROUTINE
jsr setupMagicInterrupt
; "A COMMODORE 64"
lda #<introStringA5
sta srcStringPointer
lda #>introStringA5
sta srcStringPointer + 1
lda #$9d
sta dstScreenPointer
lda #$05
sta dstScreenPointer + 1
jsr printString
lda counter
cmp #$08
bne .end
lda counter + 1
cmp #$03
bne .end
lda #ST_INTRO7
sta status
.end:
rts
statusIntro7 SUBROUTINE
jsr setupMagicInterrupt
; "VIDEOGAME"
lda #<introStringA6
sta srcStringPointer
lda #>introStringA6
sta srcStringPointer + 1
lda #$ef
sta dstScreenPointer
lda #$05
sta dstScreenPointer + 1
jsr printString
lda counter
cmp #$80
bne .end
lda counter + 1
cmp #$03
bne .end
lda #ST_INTRO8
sta status
.end:
rts
statusIntro8 SUBROUTINE
jsr setupMagicInterrupt
; blank wait
lda counter
cmp #$16
bne .end
lda counter + 1
cmp #$04
bne .end
lda #ST_MENURESET
sta status sta status
.end: .end:
@ -269,6 +376,14 @@ statusMenuReset SUBROUTINE
cpx #$ff cpx #$ff
bne .colorShadeLoop bne .colorShadeLoop
lda #$05
ldy #$0
.lastlineColorLoop:
sta $db98,y
iny
cpy #80
bne .lastlineColorLoop
; Print website ; Print website
lda #<intro2string ; lsb of string address lda #<intro2string ; lsb of string address
sta srcStringPointer ; put into lsb of source pointer sta srcStringPointer ; put into lsb of source pointer

View File

@ -17,6 +17,7 @@ introreset SUBROUTINE
lda #14 lda #14
sta introYscroll sta introYscroll
; for "GLGPROGRAMS" at the beginning
ldx #$78 ldx #$78
stx dstPointer stx dstPointer
ldy #$04 ldy #$04
@ -25,6 +26,16 @@ introreset SUBROUTINE
lda #68+19 lda #68+19
sta rasterLineInt sta rasterLineInt
lda #$01
ldy #$0
.colorLoop:
sta $d800,y
sta $d900,y
sta $da00,y
sta $db00,y
dey
bne .colorLoop
#if DEBUG = 1 #if DEBUG = 1
ldy #$00 ldy #$00
.charsetLoop: .charsetLoop:
@ -33,6 +44,7 @@ introreset SUBROUTINE
iny iny
bne .charsetLoop bne .charsetLoop
#endif #endif
rts
#if VERBOSE = 1 #if VERBOSE = 1
ECHO "introreset.asm @ ",LASTINIT,"len:",(. - LASTINIT) ECHO "introreset.asm @ ",LASTINIT,"len:",(. - LASTINIT)

View File

@ -4,6 +4,7 @@ LASTINIT SET .
; load new level on the screen ; load new level on the screen
statusLevelTitle SUBROUTINE statusLevelTitle SUBROUTINE
jsr multicolorOff
jsr clearScreen jsr clearScreen
; Print "Next Level" ; Print "Next Level"
@ -57,6 +58,7 @@ statusLevelTitle SUBROUTINE
rts rts
statusLevelLoad SUBROUTINE statusLevelLoad SUBROUTINE
jsr multicolorOn
; Upper bar -- fill with spaces, color yellow ; Upper bar -- fill with spaces, color yellow
ldx #39 ldx #39
.loop: .loop:

View File

@ -73,7 +73,7 @@ menu SUBROUTINE
beq .printCounter ; if yes, print current counter beq .printCounter ; if yes, print current counter
#endif #endif
cmp #$51 ; Is it Q? cmp #$51 ; Is it Q?
bne .menu ; If not, keep looping here, bne .menu ; If not, keep looping here,
jmp $fce2 ; else, reset the computer jmp $fce2 ; else, reset the computer
#if DEBUG = 1 #if DEBUG = 1
@ -184,9 +184,29 @@ checkStatusIntro3:
jmp checkEndStatus jmp checkEndStatus
checkStatusIntro4: checkStatusIntro4:
cmp #ST_INTRO4 cmp #ST_INTRO4
bne checkStatusMenuReset bne checkStatusIntro5
jsr statusIntro4 jsr statusIntro4
jmp checkEndStatus jmp checkEndStatus
checkStatusIntro5:
cmp #ST_INTRO5
bne checkStatusIntro6
jsr statusIntro5
jmp checkEndStatus
checkStatusIntro6:
cmp #ST_INTRO6
bne checkStatusIntro7
jsr statusIntro6
jmp checkEndStatus
checkStatusIntro7:
cmp #ST_INTRO7
bne checkStatusIntro8
jsr statusIntro7
jmp checkEndStatus
checkStatusIntro8:
cmp #ST_INTRO8
bne checkStatusMenuReset
jsr statusIntro8
jmp checkEndStatus
checkStatusMenuReset: checkStatusMenuReset:
cmp #ST_MENURESET cmp #ST_MENURESET
bne checkStatusMenu bne checkStatusMenu