WIP intro

This commit is contained in:
2024-08-12 22:47:59 -04:00
parent 892589ae8d
commit 443cedeed7
10 changed files with 200 additions and 125 deletions
+97 -113
View File
@@ -1,7 +1,13 @@
SCR_HEIGHT = 8
WORLD_LENGTH = 64
DIFF_LEVELS = 20
.IFNDEF ALONE
.def ALONE = 1 ; standalone version
.ENDIF
.IFNDEF TARGET
.def TARGET = 800 ; 5200
.ENDIF
;---------------------------------------------------
; No internet
;---------------------------------------------------
OPT r+
@@ -10,27 +16,29 @@ swap_table=$0600 ; table for swap bytes in left characters :)
;---------------------------------------------------
; Zpage variables
.zpvar temp_w .word = $80
.zpvar temp_b .byte
.zpvar temp_b2 .byte
.zpvar temp_w .word = $80
.zpvar temp_b .byte
.zpvar temp_b2 .byte
.zpvar DinoWalkPhase .byte
.zpvar DinoState .byte ; 0/1 - walk, 2/3 - crouch, 4... - jump
.zpvar JumpPhase .byte
.zpvar Hit .byte
.zpvar Level .byte
.zpvar DinoState .byte ; 0/1 - walk, 2/3 - crouch, 4... - jump
.zpvar JumpPhase .byte
.zpvar Hit .byte
.zpvar Level .byte
;---------------------------------------------------
icl 'lib/ATARISYS.ASM'
icl 'lib/MACRO.ASM'
;---------------------------------------------------
; dark screean and BASIC off
ORG $2000
mva #0 dmactls ; dark screen
mva #$ff portb
; and wait one frame :)
waitRTC ; or waitRTC ?
mva #$ff portb ; BASIC off
rts
ini $2000
.IF ALONE =1
; dark screean and BASIC off
ORG $2000
mva #0 dmactls ; dark screen
mva #$ff portb
; and wait one frame :)
waitRTC ; or waitRTC ?
mva #$ff portb ; BASIC off
rts
ini $2000
.ENDIF
;---------------------------------------------------
org $2000
@@ -44,17 +52,6 @@ font3 = font2+$400
ins 'artwork/dino3.fnt' ; 3 charset
font4 = font3+$400
ins 'artwork/dino4.fnt' ; 4 charset
; 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
.ds $100*SCR_HEIGHT
; display list
GameDL
:13 .byte SKIP8 ; empty lines
@@ -298,8 +295,7 @@ ToScreenLoop
tay
jsr ShowObject
NothingToDraw
inc temp_b
ldx temp_b
inc:ldx temp_b
cpx #WORLD_LENGTH
bne ToScreenLoop
rts
@@ -319,8 +315,7 @@ ToScreenLoop
jsr ShowObjectL
NothingToDraw
dec temp_b2
inc temp_b
ldx temp_b
inc:ldx temp_b
cpx #WORLD_LENGTH
bne ToScreenLoop
rts
@@ -380,7 +375,7 @@ NoBirds
AddBirds
randomize 7 12 ; cactuses and hole
Drawn
cmp #7 ; if bird then selec one shape from 3
cmp #7 ; if bird then select one shape from 3
bne NoBird
randomize 2 7
and #%11111110
@@ -395,29 +390,29 @@ noInsert
.proc ScoreUp
inc score+4
lda score+4
cmp #$1a ; 9+1 character code
cmp #"9"+1 ; 9+1 character code
bne ScoreReady
lda #$10 ; 0 character code
lda #"0" ; 0 character code
sta score+4
inc score+3
lda score+3
cmp #$1a ; 9+1 character code
cmp #"9"+1 ; 9+1 character code
bne ScoreReady
lda #$10 ; 0 character code
lda #"0" ; 0 character code
sta score+3
; if score gets next 100 - level up
inc diff_level
inc score+2
lda score+2
cmp #$1a ; 9+1 character code
cmp #"9"+1 ; 9+1 character code
bne ScoreReady
lda #$10 ; 0 character code
lda #"0" ; 0 character code
sta score+2
inc score+1
lda score+1
cmp #$1a ; 9+1 character code
cmp #"9"+1 ; 9+1 character code
bne ScoreReady
lda #$10 ; 0 character code
lda #"0" ; 0 character code
sta score+1
inc score
ScoreReady
@@ -496,21 +491,17 @@ NoJump
ldy #0
ObjectLoop
lda (temp_w),y
bmi @+
sta screen+$400,x
@ adw temp_w #2
smi:sta screen+$400,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$500,x
@ adw temp_w #2
smi:sta screen+$500,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$600,x
@ adw temp_w #2
smi:sta screen+$600,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$700,x
@ sbw temp_w #6
smi:sta screen+$700,x
sbw temp_w #6
inx
iny
cpy #2 ; object width
@@ -530,21 +521,17 @@ ObjectLoop
ldy #1 ; object widrh-1
ObjectLoop
lda (temp_w),y
bmi @+
sta screen+$400,x
@ adw temp_w #2
smi:sta screen+$400,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$500,x
@ adw temp_w #2
smi:sta screen+$500,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$600,x
@ adw temp_w #2
smi:sta screen+$600,x
adw temp_w #2
lda (temp_w),y
bmi @+
sta screen+$700,x
@ sbw temp_w #6
smi:sta screen+$700,x
sbw temp_w #6
inx
dey
bpl ObjectLoop
@@ -593,9 +580,8 @@ Hit0c
sta screen+$600,x
@ adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$700,x
@ sbw temp_w #10
smi:sta screen+$700,x
sbw temp_w #10
inx
iny
cpy #5 ; dino width
@@ -658,9 +644,8 @@ jPhase2
ldy #0
DinoLoop2
lda (temp_w),y
bmi @+
sta screen+$300,x
@ adw temp_w #5
smi:sta screen+$300,x
adw temp_w #5
lda (temp_w),y
bmi @+
lda screen+$400,x ; check obstacle
@@ -722,17 +707,14 @@ jPhase4
ldy #0
DinoLoop4
lda (temp_w),y
bmi @+
sta screen+$100,x
@ adw temp_w #5
smi:sta screen+$100,x
adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$200,x
@ adw temp_w #5
smi:sta screen+$200,x
adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$300,x
@ sbw temp_w #10
smi:sta screen+$300,x
sbw temp_w #10
inx
iny
cpy #5 ; dino width
@@ -782,9 +764,8 @@ Hit0c
sta screen+$600,x
@ adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$700,x
@ sbw temp_w #10
smi:sta screen+$700,x
sbw temp_w #10
inx
dey
bpl DinoLoop
@@ -845,9 +826,8 @@ jPhase2
ldy #4 ; dino width-1
DinoLoop2
lda (temp_w),y
bmi @+
sta screen+$300,x
@ adw temp_w #5
smi:sta screen+$300,x
adw temp_w #5
lda (temp_w),y
bmi @+
lda screen+$400,x ; check obstacle
@@ -880,13 +860,11 @@ jPhase3
ldy #4 ; dinowidth-1
DinoLoop3
lda (temp_w),y
bmi @+
sta screen+$200,x
@ adw temp_w #5
smi:sta screen+$200,x
adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$300,x
@ adw temp_w #5
smi:sta screen+$300,x
adw temp_w #5
lda (temp_w),y
bmi @+
lda screen+$400,x ; check obstacle
@@ -907,17 +885,14 @@ jPhase4
ldy #4 ; dino width-1
DinoLoop4
lda (temp_w),y
bmi @+
sta screen+$100,x
@ adw temp_w #5
smi:sta screen+$100,x
adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$200,x
@ adw temp_w #5
smi:sta screen+$200,x
adw temp_w #5
lda (temp_w),y
bmi @+
sta screen+$300,x
@ sbw temp_w #10
smi:sta screen+$300,x
sbw temp_w #10
inx
dey
bpl DinoLoop4
@@ -967,17 +942,12 @@ Down
sta diff_level
sta Hit
; clear score
lda #$10
sta score
sta score+1
sta score+2
sta score+3
sta score+4
sta scorel
sta scorel+1
sta scorel+2
sta scorel+3
sta scorel+4
lda #"0"
ldx #4
@ sta score,x
sta scorel,x
dex
bpl @-
rts
.endp
;-----------------------------------------------
@@ -1109,7 +1079,7 @@ FadeColor
;-----------------------------------------------
.proc SetGameScreen
mwa #GameDL dlptrs
lda #%00111110 ; normal screen width, DL on, P/M on
lda #@dmactl(standard|dma|players|missiles|lineX1) ; normal screen width, DL on, P/M on
sta dmactls
mva #>font1 chbas
rts
@@ -1117,5 +1087,19 @@ FadeColor
;--------------------------------------------------
icl 'artwork/shapes.asm'
;--------------------------------------------------
.ALIGN $400
; and 4 charsets for left game :)
font1l
.ds $400
font2l
.ds $400
font3l
.ds $400
font4l
.ds $400
; screen data
; SCR_HEIGHT lines 256bytes each
screen
.ds $100*SCR_HEIGHT
run FirstSTART
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+102 -11
View File
@@ -6,22 +6,111 @@
; Zpage variables
.zpvar temp_w .word = $80
.zpvar temp_b .byte
.zpvar temp_w2 .word
.zpvar temp_w3 .word
;---------------------------------------------------
icl '../lib/ATARISYS.ASM'
icl '../lib/MACRO.ASM'
;---------------------------------------------------
; dark screean and BASIC off
; BASIC off
ORG $2000
mva #0 dmactls ; dark screen
mva #$ff portb
; and wait one frame :)
seq:wait ; or waitRTC ?
mva #$ff portb ; BASIC off
mwa #DL_pre dlptrs
lda #@dmactl(narrow|dma) ; narrow screen width, DL on
sta dmactls
mva #0 COLOR2
sta COLBAK
mva #15 COLOR1
leet_anim
; test for going further
lda CONSOL
cmp #7
bne leet_end
mwa #pre_screen temp_w
mwa #leet_screen temp_w3
ldy #0
@
lda (temp_w),y
beq next_letter ; ignore zeroes
;is the letter leetable?
cmp #"a"
bcc next_letter
cmp #"z"
bcs next_letter
;letter is leetable
sec
sbc #"a"
tay ;save the letter
lda RANDOM
and #%00000011 ; 0-3
tax
lda leet_speeks_l,x
sta temp_w2
lda leet_speeks_h,x
sta temp_w2+1
lda (temp_w2),y
next_letter
ldy #0
sta (temp_w3),y
inw temp_w
inw temp_w3
cpw temp_w #pre_screen_end
beq leet_anim
jmp @-
leet_end
rts
DL_pre
:8 .by SKIP8
.by LMS+MODE2
.wo leet_screen
.by SKIP1, MODE2
.by SKIP8
.by SKIP1, MODE2
.by SKIP8
:6 .by SKIP1, MODE2
.by JVB
.wo DL_pre
pre_screen
; 01234567890123456789012345678901"
dta "this little game was created in "
dta " four evenings before SV2K24SE "
dta "sorry for technical difficulties"
dta "code: "
dta " pecus & pirx "
dta "sound: "
dta " alex, jochen hippel "
dta "gfx: "
dta " alphabet, inc. "
pre_screen_end
leet_speek1
dta "abcdefghijklmnopqrstuvwxyz"
leet_speek2
dta "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
leet_speek3
dta "4&[]eF9-|jk_mn0p@r57uvw*y2"
leet_speek4
;dta "^b([E "
dta "^b(]",$5b,$41,"gh1",$4c+$80,"k",$4b+$80,"M\",$54,$49+$80,"q",$51,"s",$57,"uvwxyz"
leet_speeks_l
.by <leet_speek1
.by <leet_speek2
.by <leet_speek3
.by <leet_speek4
leet_speeks_h
.by >leet_speek1
.by >leet_speek2
.by >leet_speek3
.by >leet_speek4
leet_screen
.ds 32*9
ini $2000
;---------------------------------------------------
org $2000
org $3000
screen
ins 'difficulties.bmp',+62
DL
@@ -34,7 +123,7 @@ DL
start
mwa #DL dlptrs
lda #%00111110 ; normal screen width, DL on, P/M on
lda #@dmactl(standard|dma|players|missiles|lineX1) ; normal screen width, DL on, P/M on
sta dmactls
mva #0 COLOR2
sta COLBAK
@@ -42,8 +131,8 @@ start
POKEY_INIT
pause 3
lda #0
sta $d40e ; wylaczamy NMI
sei ; oraz IRQ
sta $d40e ; NMI OFF
sei ; IRQ OFF
;-----playa-da-sampla-----
@@ -69,7 +158,9 @@ please_wait_loop
sta AUDC2
sta AUDC3
;sta AUDC4
:3 sta wsync
sta wsync
sta wsync
sta wsync
tya
and #$0F
ora #$10
@@ -168,5 +259,5 @@ samples_end_h
.by >sample_end4
.by >sample_end2
.by >sample_end6
finito
ini start
Binary file not shown.
+1 -1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.