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 SCR_HEIGHT = 8
WORLD_LENGTH = 64 WORLD_LENGTH = 64
DIFF_LEVELS = 20 DIFF_LEVELS = 20
.IFNDEF ALONE
.def ALONE = 1 ; standalone version
.ENDIF
.IFNDEF TARGET
.def TARGET = 800 ; 5200
.ENDIF
;---------------------------------------------------
; No internet ; No internet
;--------------------------------------------------- ;---------------------------------------------------
OPT r+ OPT r+
@@ -10,27 +16,29 @@ swap_table=$0600 ; table for swap bytes in left characters :)
;--------------------------------------------------- ;---------------------------------------------------
; Zpage variables ; Zpage variables
.zpvar temp_w .word = $80 .zpvar temp_w .word = $80
.zpvar temp_b .byte .zpvar temp_b .byte
.zpvar temp_b2 .byte .zpvar temp_b2 .byte
.zpvar DinoWalkPhase .byte .zpvar DinoWalkPhase .byte
.zpvar DinoState .byte ; 0/1 - walk, 2/3 - crouch, 4... - jump .zpvar DinoState .byte ; 0/1 - walk, 2/3 - crouch, 4... - jump
.zpvar JumpPhase .byte .zpvar JumpPhase .byte
.zpvar Hit .byte .zpvar Hit .byte
.zpvar Level .byte .zpvar Level .byte
;--------------------------------------------------- ;---------------------------------------------------
icl 'lib/ATARISYS.ASM' icl 'lib/ATARISYS.ASM'
icl 'lib/MACRO.ASM' icl 'lib/MACRO.ASM'
;--------------------------------------------------- ;---------------------------------------------------
; dark screean and BASIC off .IF ALONE =1
ORG $2000 ; dark screean and BASIC off
mva #0 dmactls ; dark screen ORG $2000
mva #$ff portb mva #0 dmactls ; dark screen
; and wait one frame :) mva #$ff portb
waitRTC ; or waitRTC ? ; and wait one frame :)
mva #$ff portb ; BASIC off waitRTC ; or waitRTC ?
rts mva #$ff portb ; BASIC off
ini $2000 rts
ini $2000
.ENDIF
;--------------------------------------------------- ;---------------------------------------------------
org $2000 org $2000
@@ -44,17 +52,6 @@ font3 = font2+$400
ins 'artwork/dino3.fnt' ; 3 charset ins 'artwork/dino3.fnt' ; 3 charset
font4 = font3+$400 font4 = font3+$400
ins 'artwork/dino4.fnt' ; 4 charset 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 ; display list
GameDL GameDL
:13 .byte SKIP8 ; empty lines :13 .byte SKIP8 ; empty lines
@@ -298,8 +295,7 @@ ToScreenLoop
tay tay
jsr ShowObject jsr ShowObject
NothingToDraw NothingToDraw
inc temp_b inc:ldx temp_b
ldx temp_b
cpx #WORLD_LENGTH cpx #WORLD_LENGTH
bne ToScreenLoop bne ToScreenLoop
rts rts
@@ -319,8 +315,7 @@ ToScreenLoop
jsr ShowObjectL jsr ShowObjectL
NothingToDraw NothingToDraw
dec temp_b2 dec temp_b2
inc temp_b inc:ldx temp_b
ldx temp_b
cpx #WORLD_LENGTH cpx #WORLD_LENGTH
bne ToScreenLoop bne ToScreenLoop
rts rts
@@ -380,7 +375,7 @@ NoBirds
AddBirds AddBirds
randomize 7 12 ; cactuses and hole randomize 7 12 ; cactuses and hole
Drawn Drawn
cmp #7 ; if bird then selec one shape from 3 cmp #7 ; if bird then select one shape from 3
bne NoBird bne NoBird
randomize 2 7 randomize 2 7
and #%11111110 and #%11111110
@@ -395,29 +390,29 @@ noInsert
.proc ScoreUp .proc ScoreUp
inc score+4 inc score+4
lda score+4 lda score+4
cmp #$1a ; 9+1 character code cmp #"9"+1 ; 9+1 character code
bne ScoreReady bne ScoreReady
lda #$10 ; 0 character code lda #"0" ; 0 character code
sta score+4 sta score+4
inc score+3 inc score+3
lda score+3 lda score+3
cmp #$1a ; 9+1 character code cmp #"9"+1 ; 9+1 character code
bne ScoreReady bne ScoreReady
lda #$10 ; 0 character code lda #"0" ; 0 character code
sta score+3 sta score+3
; if score gets next 100 - level up ; if score gets next 100 - level up
inc diff_level inc diff_level
inc score+2 inc score+2
lda score+2 lda score+2
cmp #$1a ; 9+1 character code cmp #"9"+1 ; 9+1 character code
bne ScoreReady bne ScoreReady
lda #$10 ; 0 character code lda #"0" ; 0 character code
sta score+2 sta score+2
inc score+1 inc score+1
lda score+1 lda score+1
cmp #$1a ; 9+1 character code cmp #"9"+1 ; 9+1 character code
bne ScoreReady bne ScoreReady
lda #$10 ; 0 character code lda #"0" ; 0 character code
sta score+1 sta score+1
inc score inc score
ScoreReady ScoreReady
@@ -496,21 +491,17 @@ NoJump
ldy #0 ldy #0
ObjectLoop ObjectLoop
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$400,x
sta screen+$400,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$500,x
sta screen+$500,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$600,x
sta screen+$600,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$700,x
sta screen+$700,x sbw temp_w #6
@ sbw temp_w #6
inx inx
iny iny
cpy #2 ; object width cpy #2 ; object width
@@ -530,21 +521,17 @@ ObjectLoop
ldy #1 ; object widrh-1 ldy #1 ; object widrh-1
ObjectLoop ObjectLoop
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$400,x
sta screen+$400,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$500,x
sta screen+$500,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$600,x
sta screen+$600,x adw temp_w #2
@ adw temp_w #2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$700,x
sta screen+$700,x sbw temp_w #6
@ sbw temp_w #6
inx inx
dey dey
bpl ObjectLoop bpl ObjectLoop
@@ -593,9 +580,8 @@ Hit0c
sta screen+$600,x sta screen+$600,x
@ adw temp_w #5 @ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$700,x
sta screen+$700,x sbw temp_w #10
@ sbw temp_w #10
inx inx
iny iny
cpy #5 ; dino width cpy #5 ; dino width
@@ -658,9 +644,8 @@ jPhase2
ldy #0 ldy #0
DinoLoop2 DinoLoop2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$300,x
sta screen+$300,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ bmi @+
lda screen+$400,x ; check obstacle lda screen+$400,x ; check obstacle
@@ -722,17 +707,14 @@ jPhase4
ldy #0 ldy #0
DinoLoop4 DinoLoop4
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$100,x
sta screen+$100,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$200,x
sta screen+$200,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$300,x
sta screen+$300,x sbw temp_w #10
@ sbw temp_w #10
inx inx
iny iny
cpy #5 ; dino width cpy #5 ; dino width
@@ -782,9 +764,8 @@ Hit0c
sta screen+$600,x sta screen+$600,x
@ adw temp_w #5 @ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$700,x
sta screen+$700,x sbw temp_w #10
@ sbw temp_w #10
inx inx
dey dey
bpl DinoLoop bpl DinoLoop
@@ -845,9 +826,8 @@ jPhase2
ldy #4 ; dino width-1 ldy #4 ; dino width-1
DinoLoop2 DinoLoop2
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$300,x
sta screen+$300,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ bmi @+
lda screen+$400,x ; check obstacle lda screen+$400,x ; check obstacle
@@ -880,13 +860,11 @@ jPhase3
ldy #4 ; dinowidth-1 ldy #4 ; dinowidth-1
DinoLoop3 DinoLoop3
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$200,x
sta screen+$200,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$300,x
sta screen+$300,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ bmi @+
lda screen+$400,x ; check obstacle lda screen+$400,x ; check obstacle
@@ -907,17 +885,14 @@ jPhase4
ldy #4 ; dino width-1 ldy #4 ; dino width-1
DinoLoop4 DinoLoop4
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$100,x
sta screen+$100,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$200,x
sta screen+$200,x adw temp_w #5
@ adw temp_w #5
lda (temp_w),y lda (temp_w),y
bmi @+ smi:sta screen+$300,x
sta screen+$300,x sbw temp_w #10
@ sbw temp_w #10
inx inx
dey dey
bpl DinoLoop4 bpl DinoLoop4
@@ -967,17 +942,12 @@ Down
sta diff_level sta diff_level
sta Hit sta Hit
; clear score ; clear score
lda #$10 lda #"0"
sta score ldx #4
sta score+1 @ sta score,x
sta score+2 sta scorel,x
sta score+3 dex
sta score+4 bpl @-
sta scorel
sta scorel+1
sta scorel+2
sta scorel+3
sta scorel+4
rts rts
.endp .endp
;----------------------------------------------- ;-----------------------------------------------
@@ -1109,7 +1079,7 @@ FadeColor
;----------------------------------------------- ;-----------------------------------------------
.proc SetGameScreen .proc SetGameScreen
mwa #GameDL dlptrs 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 sta dmactls
mva #>font1 chbas mva #>font1 chbas
rts rts
@@ -1117,5 +1087,19 @@ FadeColor
;-------------------------------------------------- ;--------------------------------------------------
icl 'artwork/shapes.asm' 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 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 ; Zpage variables
.zpvar temp_w .word = $80 .zpvar temp_w .word = $80
.zpvar temp_b .byte .zpvar temp_b .byte
.zpvar temp_w2 .word
.zpvar temp_w3 .word
;--------------------------------------------------- ;---------------------------------------------------
icl '../lib/ATARISYS.ASM' icl '../lib/ATARISYS.ASM'
icl '../lib/MACRO.ASM' icl '../lib/MACRO.ASM'
;--------------------------------------------------- ;---------------------------------------------------
; dark screean and BASIC off ; BASIC off
ORG $2000 ORG $2000
mva #0 dmactls ; dark screen
mva #$ff portb mva #$ff portb
; and wait one frame :) mwa #DL_pre dlptrs
seq:wait ; or waitRTC ? lda #@dmactl(narrow|dma) ; narrow screen width, DL on
mva #$ff portb ; BASIC off 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 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 ini $2000
;--------------------------------------------------- ;---------------------------------------------------
org $2000 org $3000
screen screen
ins 'difficulties.bmp',+62 ins 'difficulties.bmp',+62
DL DL
@@ -34,7 +123,7 @@ DL
start start
mwa #DL dlptrs 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 sta dmactls
mva #0 COLOR2 mva #0 COLOR2
sta COLBAK sta COLBAK
@@ -42,8 +131,8 @@ start
POKEY_INIT POKEY_INIT
pause 3 pause 3
lda #0 lda #0
sta $d40e ; wylaczamy NMI sta $d40e ; NMI OFF
sei ; oraz IRQ sei ; IRQ OFF
;-----playa-da-sampla----- ;-----playa-da-sampla-----
@@ -69,7 +158,9 @@ please_wait_loop
sta AUDC2 sta AUDC2
sta AUDC3 sta AUDC3
;sta AUDC4 ;sta AUDC4
:3 sta wsync sta wsync
sta wsync
sta wsync
tya tya
and #$0F and #$0F
ora #$10 ora #$10
@@ -168,5 +259,5 @@ samples_end_h
.by >sample_end4 .by >sample_end4
.by >sample_end2 .by >sample_end2
.by >sample_end6 .by >sample_end6
finito
ini start 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.