From cc29e5caa7bb1c2cd3c406a3d0dc84b3d746e80b Mon Sep 17 00:00:00 2001 From: Pecusx Date: Mon, 12 Aug 2024 11:28:09 +0200 Subject: [PATCH] New charsets for left --- dino.asm | 121 +++++++++++++++++++++++++++++++++++++++++++++- dino.asm.bak | 134 ++++++++++++++++++++++++++++++++++++++++++++++++--- dino.xex | Bin 5871 -> 6130 bytes 3 files changed, 247 insertions(+), 8 deletions(-) diff --git a/dino.asm b/dino.asm index b32f9b9..d46411e 100644 --- a/dino.asm +++ b/dino.asm @@ -6,6 +6,8 @@ DIFF_LEVELS = 16 ;--------------------------------------------------- OPT r+ +swap_table=$0600 ; table for swap bytes in left characters :) + ;--------------------------------------------------- ; Zpage variables .zpvar temp_w .word = $80 @@ -40,7 +42,13 @@ font3 = font2+$400 ins 'artwork/dino3.fnt' ; 3 charset font4 = font3+$400 ins 'artwork/dino4.fnt' ; 4 charset - org font4+$400 +; and 4 charsets for left game :) +font1l=font4+$400 +font2l=font1l+$400 +font3l=font2l+$400 +font4l=font3l+$400 + + org font4l+$400 ; screen data ; SCR_HEIGHT lines 256bytes each screen @@ -65,6 +73,7 @@ status_line dta d" l-hi 00000 r-hi 00000 00000 " score=status_line+33 rhiscore=status_line+19 +lhiscore=status_line+7 ;--------------------------------------------------- ; World table without dino WorldTable @@ -115,21 +124,89 @@ EndGame ; copy charset 1 to 2,3 and 4 (but not dino chars) ldy #0 CopyLoop + ; no dino characters lda font1,y sta font2,y sta font3,y sta font4,y + sta font1l,y + sta font2l,y + sta font3l,y + sta font4l,y lda font1+$200,y sta font2+$200,y sta font3+$200,y sta font4+$200,y + sta font1l+$200,y + sta font2l+$200,y + sta font3l+$200,y + sta font4l+$200,y lda font1+$300,y sta font2+$300,y sta font3+$300,y sta font4+$300,y + sta font1l+$300,y + sta font2l+$300,y + sta font3l+$300,y + sta font4l+$300,y + ; dino characters - only to 'left' charsets + lda font1+$100,y + sta font1l+$100,y + lda font2+$100,y + sta font2l+$100,y + lda font3+$100,y + sta font3l+$100,y + lda font4+$100,y + sta font4l+$100,y iny bne CopyLoop - + ; create table for swapping + ldy #0 +@ sty temp_b + .REPT 8 + rol temp_b + ror @ + .ENDR + sta swap_table,y + iny + bne @- + ; swap bits in bharacters + ldy #0 +SwapLoop + lda font1+$100,y + tax + lda swap_table,x + sta font1l+$100,y + lda font2+$100,y + tax + lda swap_table,x + sta font2l+$100,y + lda font3+$100,y + tax + lda swap_table,x + sta font3l+$100,y + lda font4+$100,y + tax + lda swap_table,x + sta font4l+$100,y + lda font1+$200,y + tax + lda swap_table,x + sta font1l+$200,y + lda font2+$200,y + tax + lda swap_table,x + sta font2l+$200,y + lda font3+$200,y + tax + lda swap_table,x + sta font3l+$200,y + lda font4+$200,y + tax + lda swap_table,x + sta font4l+$200,y + iny + bne SwapLoop rts .endp ;----------------------------------------------- @@ -629,6 +706,46 @@ higher5 rts .endp ;----------------------------------------------- +.proc HiScoreL + lda lhiscore + cmp score + bcc higher1 + bne lower + lda lhiscore+1 + cmp score+1 + bcc higher2 + bne lower + lda lhiscore+2 + cmp score+2 + bcc higher3 + bne lower + lda lhiscore+3 + cmp score+3 + bcc higher4 + bne lower + lda lhiscore+4 + cmp score+4 + bcc higher5 +lower + rts +higher1 + lda score + sta lhiscore +higher2 + lda score+1 + sta lhiscore+1 +higher3 + lda score+2 + sta lhiscore+2 +higher4 + lda score+3 + sta lhiscore+3 +higher5 + lda score+4 + sta lhiscore+4 + rts +.endp +;----------------------------------------------- .proc FadeColors ldy #0 sty COLOR1 diff --git a/dino.asm.bak b/dino.asm.bak index fabba0a..57a6858 100644 --- a/dino.asm.bak +++ b/dino.asm.bak @@ -6,6 +6,8 @@ DIFF_LEVELS = 16 ;--------------------------------------------------- OPT r+ +swap_table=$0600 ; table for swap bytes in left characters :) + ;--------------------------------------------------- ; Zpage variables .zpvar temp_w .word = $80 @@ -40,7 +42,13 @@ font3 = font2+$400 ins 'artwork/dino3.fnt' ; 3 charset font4 = font3+$400 ins 'artwork/dino4.fnt' ; 4 charset - org font4+$400 +; and 4 charsets for left game :) +font1l=font4+$400 +font2l=font1l+$400 +font3l=font2l+$400 +font4l=font3l+$400 + + org font4l+$400 ; screen data ; SCR_HEIGHT lines 256bytes each screen @@ -65,6 +73,7 @@ status_line dta d" l-hi 00000 r-hi 00000 00000 " score=status_line+33 rhiscore=status_line+19 +lhiscore=status_line+7 ;--------------------------------------------------- ; World table without dino WorldTable @@ -86,18 +95,18 @@ EndLoop ;lda #$5f ;sta COLBAK jsr CheckJoy - mva #>font2 chbas + mva #>font2l chbas waitRTC ; or waitRTC ? mva #3 hscrol - mva #>font3 chbas + mva #>font3l chbas waitRTC ; or waitRTC ? mva #2 hscrol jsr WorldShift ; better place (flickering) - mva #>font4 chbas + mva #>font4l chbas waitRTC ; or waitRTC ? mva #1 hscrol jsr Animate - mva #>font1 chbas + mva #>font1l chbas waitRTC ; or waitRTC ? mva #4 hscrol jmp EndLoop @@ -115,21 +124,89 @@ EndGame ; copy charset 1 to 2,3 and 4 (but not dino chars) ldy #0 CopyLoop + ; no dino characters lda font1,y sta font2,y sta font3,y sta font4,y + sta font1l,y + sta font2l,y + sta font3l,y + sta font4l,y lda font1+$200,y sta font2+$200,y sta font3+$200,y sta font4+$200,y + sta font1l+$200,y + sta font2l+$200,y + sta font3l+$200,y + sta font4l+$200,y lda font1+$300,y sta font2+$300,y sta font3+$300,y sta font4+$300,y + sta font1l+$300,y + sta font2l+$300,y + sta font3l+$300,y + sta font4l+$300,y + ; dino characters - only to 'left' charsets + lda font1+$100,y + sta font1l+$100,y + lda font2+$100,y + sta font2l+$100,y + lda font3+$100,y + sta font3l+$100,y + lda font4+$100,y + sta font4l+$100,y iny bne CopyLoop - + ; create table for swapping + ldy #0 +@ sty temp_b + .REPT 8 + rol temp_b + ror @ + .ENDR + sta swap_table,y + iny + bne @- + ; swap bits in bharacters + ldy #0 +SwapLoop + lda font1+$100,y + tax + lda swap_table,x + sta font1l+$100,y + lda font2+$100,y + tax + lda swap_table,x + sta font2l+$100,y + lda font3+$100,y + tax + lda swap_table,x + sta font3l+$100,y + lda font4+$100,y + tax + lda swap_table,x + sta font4l+$100,y + lda font1+$200,y + tax + lda swap_table,x + sta font1l+$200,y + lda font2+$200,y + tax + lda swap_table,x + sta font2l+$200,y + lda font3+$200,y + tax + lda swap_table,x + sta font3l+$200,y + lda font4+$200,y + tax + lda swap_table,x + sta font4l+$200,y + iny + bne SwapLoop rts .endp ;----------------------------------------------- @@ -593,18 +670,23 @@ Down lda rhiscore cmp score bcc higher1 + bne lower lda rhiscore+1 cmp score+1 bcc higher2 + bne lower lda rhiscore+2 cmp score+2 bcc higher3 + bne lower lda rhiscore+3 cmp score+3 bcc higher4 + bne lower lda rhiscore+4 cmp score+4 bcc higher5 +lower rts higher1 lda score @@ -624,6 +706,46 @@ higher5 rts .endp ;----------------------------------------------- +.proc HiScoreL + lda lhiscore + cmp score + bcc higher1 + bne lower + lda lhiscore+1 + cmp score+1 + bcc higher2 + bne lower + lda lhiscore+2 + cmp score+2 + bcc higher3 + bne lower + lda lhiscore+3 + cmp score+3 + bcc higher4 + bne lower + lda lhiscore+4 + cmp score+4 + bcc higher5 +lower + rts +higher1 + lda score + sta lhiscore +higher2 + lda score+1 + sta lhiscore+1 +higher3 + lda score+2 + sta lhiscore+2 +higher4 + lda score+3 + sta lhiscore+3 +higher5 + lda score+4 + sta lhiscore+4 + rts +.endp +;----------------------------------------------- .proc FadeColors ldy #0 sty COLOR1 diff --git a/dino.xex b/dino.xex index 221dd1981e15ca3ff59900e02325353cd3289840..2505a0d807b43d74e3fc1a75050451f2ea7bcb1a 100644 GIT binary patch delta 1498 zcmbu8Z)h839LImT{4uN5#+bQU6t22uOV_R4`q$~2zioesNiGdl6yKchw!I4Ci-E#j z(_SgcVekZbghCi*G=&?PXvcva^@Wmvfrl~hZABSXAq(Qfih|EwwzQ$XaQJZW{Qlg1 ze&647zvu3$UxzBkJwy0~klVi^gP6-gC=1~%M6wXgLM#i@S(wSfY#2~`)pO}co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