mirror of
https://github.com/Pecusx/dino-game.git
synced 2026-05-21 21:33:48 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd95eab62f | |||
| 49ba83f111 | |||
| 57248e8675 | |||
| cedbfca387 | |||
| d0acb58131 | |||
| 666168f60b | |||
| e2fc8e2eae |
@@ -1,16 +1,22 @@
|
|||||||
Technical Difficulties No Internet (aka The Dino Crisis)
|
# Technical Difficulties No Internet (aka The Dino Crisis)
|
||||||
Warsaw, Miami 2024
|
Warsaw, Miami 2024
|
||||||
|
|
||||||
A very small entry to (SV2K24SE)[https://sillyventure.eu/en/].
|
A very small entry to [SV2K24SE](https://sillyventure.eu/en/).
|
||||||
|
|
||||||
Code: [Pecus](https://github.com/Pecusx) and [pirx](https://github.com/pkali)
|
Code: [Pecus](https://github.com/Pecusx) and [pirx](https://github.com/pkali)
|
||||||
|
|
||||||
Msx: Alex and Jochen Hippel
|
Msx: Alex and Jochen Hippel
|
||||||
|
|
||||||
Used portions of LZSS player by [DMSC](https://github.com/dmsc/lzss-sap)
|
Used portions of LZSS player by [dmsc](https://github.com/dmsc/lzss-sap)
|
||||||
|
|
||||||
Assembly:
|
Assembly:
|
||||||
`mads dino.asm -o:dino_.xex -d:ALONE=0`
|
```
|
||||||
`mads intro/tech_diff.asm -o:tech_diff.xex`
|
mads dino.asm -o:dino_.xex -d:ALONE=0
|
||||||
`cat intro/tech_diff.xex dino_.xex > tdc.xex; rm dino_.xex`
|
mads intro/tech_diff.asm -o:tech_diff.xex
|
||||||
|
cat intro/tech_diff.xex dino_.xex > tdc.xex; rm dino_.xex
|
||||||
|
```
|
||||||
|
|
||||||
Stand-alone game (no intro):
|
Stand-alone game (no intro):
|
||||||
`mads dino.asm -o:dino.xex -d:ALONE=1`
|
```
|
||||||
|
mads dino.asm -o:dino.xex -d:ALONE=1
|
||||||
|
```
|
||||||
|
|||||||
+4
-3
@@ -142,10 +142,11 @@ ShapesTableH
|
|||||||
.by >ground_1
|
.by >ground_1
|
||||||
.by >ground_2
|
.by >ground_2
|
||||||
diff_object_gap ; min distance between obstacles by difficulty level
|
diff_object_gap ; min distance between obstacles by difficulty level
|
||||||
.by 18,17,15,13,11,9,8,7,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5
|
.by 24,22,20,18,16,14,12,11,10,9,8,8,8,8,8,8,8,8,8,8,8,8,8
|
||||||
|
;.by 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
|
||||||
;----------vars----------
|
;----------vars----------
|
||||||
CloudHpos .by 0,0,0,0
|
CloudHpos .by 0,0,0,0
|
||||||
diff_level .ds 1
|
diff_level .ds 1
|
||||||
DinoJumpTr .by 1,2,3,4,4,3,2,1
|
DinoJumpTr .by 1,2,3,4,4,4,3,2,1
|
||||||
JumpLen = 7
|
JumpLen = 8
|
||||||
.endif ; .IF *>0
|
.endif ; .IF *>0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
SCR_HEIGHT = 8
|
SCR_HEIGHT = 8
|
||||||
WORLD_LENGTH = 64
|
WORLD_LENGTH = 48
|
||||||
DIFF_LEVELS = 20
|
DIFF_LEVELS = 20
|
||||||
.IFNDEF ALONE
|
.IFNDEF ALONE
|
||||||
.def ALONE = 1 ; standalone version
|
.def ALONE = 1 ; standalone version
|
||||||
@@ -25,16 +25,17 @@ swap_table=$0600 ; table for swap bytes in left characters :)
|
|||||||
.zpvar Hit .byte
|
.zpvar Hit .byte
|
||||||
.zpvar Level .byte
|
.zpvar Level .byte
|
||||||
.zpvar play_flag .byte
|
.zpvar play_flag .byte
|
||||||
|
.zpvar NTSCounter .byte
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
icl 'lib/ATARISYS.ASM'
|
icl 'lib/ATARISYS.ASM'
|
||||||
icl 'lib/MACRO.ASM'
|
icl 'lib/MACRO.ASM'
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.IF ALONE =1
|
.IF ALONE =1
|
||||||
; dark screean and BASIC off
|
|
||||||
org $2000
|
org $2000
|
||||||
PLAYER
|
PLAYER
|
||||||
icl 'music/playlzs16.asm' ; Music Player
|
icl 'music/playlzs16.asm' ; Music Player
|
||||||
ORG $3000
|
ORG $3000
|
||||||
|
; dark screean and BASIC off
|
||||||
mva #0 dmactls ; dark screen
|
mva #0 dmactls ; dark screen
|
||||||
mva #$ff portb
|
mva #$ff portb
|
||||||
; and wait one frame :)
|
; and wait one frame :)
|
||||||
@@ -72,12 +73,12 @@ status_line_addr
|
|||||||
:4 .byte SKIP8
|
:4 .byte SKIP8
|
||||||
.byte MODE2
|
.byte MODE2
|
||||||
|
|
||||||
.byte SKIP8,SKIP8 ; empty lines
|
.byte SKIP8,SKIP8,SKIP8 ; empty lines
|
||||||
|
|
||||||
.rept SCR_HEIGHT, #
|
.rept SCR_HEIGHT-1, #
|
||||||
.byte MODE2+LMS+SCH ; gr.0+LMS+HSCRL
|
.byte MODE2+LMS+SCH ; gr.0+LMS+HSCRL
|
||||||
line:1_addr
|
line:1_addr
|
||||||
.word screen+$100*#
|
.word screen+$100*(#+1)
|
||||||
.endr
|
.endr
|
||||||
.byte JVB
|
.byte JVB
|
||||||
.word GameDL
|
.word GameDL
|
||||||
@@ -127,6 +128,10 @@ WorldTable
|
|||||||
:WORLD_LENGTH+1 .byte 0 ; ground
|
:WORLD_LENGTH+1 .byte 0 ; ground
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
FirstSTART
|
FirstSTART
|
||||||
|
mva #0 dmactls ; dark screen
|
||||||
|
mva #$ff portb
|
||||||
|
; and wait one frame :)
|
||||||
|
waitRTC ; or waitRTC ?
|
||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
jsr GenerateCharsets
|
jsr GenerateCharsets
|
||||||
jsr GenerateClouds
|
jsr GenerateClouds
|
||||||
@@ -137,6 +142,7 @@ NewGame
|
|||||||
jsr SetStatusToR
|
jsr SetStatusToR
|
||||||
jsr SetStart
|
jsr SetStart
|
||||||
jsr WorldToScreen
|
jsr WorldToScreen
|
||||||
|
mva #>font4 chbas
|
||||||
jsr FadeColorsIN
|
jsr FadeColorsIN
|
||||||
jsr PlayInGameMusic
|
jsr PlayInGameMusic
|
||||||
jsr GameR
|
jsr GameR
|
||||||
@@ -148,6 +154,7 @@ NewGame
|
|||||||
jsr SetStatusToL
|
jsr SetStatusToL
|
||||||
jsr SetStart
|
jsr SetStart
|
||||||
jsr WorldToScreen
|
jsr WorldToScreen
|
||||||
|
mva #>font4l chbas
|
||||||
jsr FadeColorsIN
|
jsr FadeColorsIN
|
||||||
jsr PlayInGameMusic
|
jsr PlayInGameMusic
|
||||||
jsr GameL
|
jsr GameL
|
||||||
@@ -398,18 +405,19 @@ SwapLoop
|
|||||||
bpl @-
|
bpl @-
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
;-----------------------------------------------
|
||||||
.proc ClearScreen
|
.proc ClearScreen
|
||||||
ldy #44 ; visible screen len
|
ldy #44 ; visible screen len
|
||||||
lda #0
|
lda #0
|
||||||
ClearLoop
|
ClearLoop
|
||||||
sta screen+$0700,y
|
;sta screen+$0700,y
|
||||||
sta screen+$0600,y
|
sta screen+$0600,y
|
||||||
sta screen+$0500,y
|
sta screen+$0500,y
|
||||||
sta screen+$0400,y
|
sta screen+$0400,y
|
||||||
sta screen+$0300,y
|
sta screen+$0300,y
|
||||||
sta screen+$0200,y
|
sta screen+$0200,y
|
||||||
sta screen+$0100,y
|
sta screen+$0100,y
|
||||||
sta screen+$0000,y
|
;sta screen+$0000,y
|
||||||
dey
|
dey
|
||||||
bne ClearLoop
|
bne ClearLoop
|
||||||
rts
|
rts
|
||||||
@@ -1322,6 +1330,7 @@ pressed
|
|||||||
.proc PrepareMusicPlayer
|
.proc PrepareMusicPlayer
|
||||||
jsr StopMusic
|
jsr StopMusic
|
||||||
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
||||||
|
mva #0 NTSCounter
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
.proc PlayInGameMusic
|
.proc PlayInGameMusic
|
||||||
@@ -1346,9 +1355,23 @@ pressed
|
|||||||
.endp
|
.endp
|
||||||
.proc VBLinterrupt
|
.proc VBLinterrupt
|
||||||
lda play_flag
|
lda play_flag
|
||||||
beq @+
|
beq NoMusic
|
||||||
|
; music - PAL/NTSC check
|
||||||
|
lda PAL
|
||||||
|
and #%00001110
|
||||||
|
beq IsPAL
|
||||||
|
; NTSC ...
|
||||||
|
inc NTSCounter
|
||||||
|
lda NTSCounter
|
||||||
|
cmp #5
|
||||||
|
bne PlayMusic
|
||||||
|
mva #0 NTSCounter
|
||||||
|
beq NoMusic
|
||||||
|
PlayMusic
|
||||||
|
IsPAL
|
||||||
jsr PLAYER
|
jsr PLAYER
|
||||||
@ pla
|
NoMusic
|
||||||
|
pla
|
||||||
tay
|
tay
|
||||||
pla
|
pla
|
||||||
tax
|
tax
|
||||||
|
|||||||
+38
-10
@@ -8,6 +8,7 @@
|
|||||||
.zpvar temp_b .byte
|
.zpvar temp_b .byte
|
||||||
.zpvar temp_w2 .word
|
.zpvar temp_w2 .word
|
||||||
.zpvar temp_w3 .word
|
.zpvar temp_w3 .word
|
||||||
|
.zpvar NTSCounter .byte
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
icl '../lib/ATARISYS.ASM'
|
icl '../lib/ATARISYS.ASM'
|
||||||
icl '../lib/MACRO.ASM'
|
icl '../lib/MACRO.ASM'
|
||||||
@@ -22,8 +23,11 @@
|
|||||||
ini $3000
|
ini $3000
|
||||||
org $2000
|
org $2000
|
||||||
PLAYER
|
PLAYER
|
||||||
icl '../music/playlzs16.asm' ; Music Player
|
icl '../music/playlzs16.asm' ; Music Player, dmsc lzss
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
leet_screen = $a000 ; further than samples
|
||||||
|
leet_screen_end = leet_screen + 32*9
|
||||||
|
|
||||||
ORG $2c00
|
ORG $2c00
|
||||||
start1
|
start1
|
||||||
mva #$ff portb
|
mva #$ff portb
|
||||||
@@ -84,6 +88,18 @@ next_letter
|
|||||||
jmp @-
|
jmp @-
|
||||||
|
|
||||||
leet_end
|
leet_end
|
||||||
|
; normal (not leeted) text back
|
||||||
|
mwa #pre_screen temp_w
|
||||||
|
mwa #leet_screen temp_w3
|
||||||
|
ldy #0
|
||||||
|
@
|
||||||
|
lda (temp_w),y
|
||||||
|
sta (temp_w3),y
|
||||||
|
inw temp_w
|
||||||
|
inw temp_w3
|
||||||
|
cpw temp_w #pre_screen_end
|
||||||
|
bne @-
|
||||||
|
|
||||||
jsr StopMusic
|
jsr StopMusic
|
||||||
jsr wait_for_releasing_keyz
|
jsr wait_for_releasing_keyz
|
||||||
rts
|
rts
|
||||||
@@ -152,6 +168,7 @@ leet_speeks_h
|
|||||||
mwa #MUSIC_DATA_END song_end_ptr
|
mwa #MUSIC_DATA_END song_end_ptr
|
||||||
jsr init_song
|
jsr init_song
|
||||||
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
VMAIN VBLinterrupt,7 ; jsr SetVBL
|
||||||
|
mva #0 NTSCounter
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
.proc StopMusic
|
.proc StopMusic
|
||||||
@@ -166,12 +183,23 @@ leet_speeks_h
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
.proc VBLinterrupt
|
.proc VBLinterrupt
|
||||||
|
; music - PAL/NTSC check
|
||||||
|
lda PAL
|
||||||
|
and #%00001110
|
||||||
|
beq IsPAL
|
||||||
|
; NTSC ...
|
||||||
|
inc NTSCounter
|
||||||
|
lda NTSCounter
|
||||||
|
cmp #5
|
||||||
|
bne PlayMusic
|
||||||
|
mva #0 NTSCounter
|
||||||
|
beq NoMusic
|
||||||
|
PlayMusic
|
||||||
|
IsPAL
|
||||||
jsr PLAYER
|
jsr PLAYER
|
||||||
|
NoMusic
|
||||||
jmp XITVBV
|
jmp XITVBV
|
||||||
.endp
|
.endp
|
||||||
leet_screen
|
|
||||||
.ds 32*9
|
|
||||||
leet_screen_end
|
|
||||||
.align $100
|
.align $100
|
||||||
MUSIC_DATA
|
MUSIC_DATA
|
||||||
ins '../music/title.lzss' ; title music
|
ins '../music/title.lzss' ; title music
|
||||||
@@ -181,8 +209,6 @@ MUSIC_DATA_END
|
|||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
|
||||||
org $3000
|
org $3000
|
||||||
screen
|
|
||||||
ins 'difficulties.bmp',+62
|
|
||||||
DL
|
DL
|
||||||
:13 .by SKIP8
|
:13 .by SKIP8
|
||||||
.by MODEF+LMS
|
.by MODEF+LMS
|
||||||
@@ -289,9 +315,8 @@ exit_tech_diff
|
|||||||
lda #$40
|
lda #$40
|
||||||
sta $d40e ; NMI On
|
sta $d40e ; NMI On
|
||||||
cli ; IRQ on
|
cli ; IRQ on
|
||||||
mva #0 DMACTLS
|
|
||||||
sta dmactl
|
;jmp quiet ; rts ; POZOR PREMATURE OTTIMIZZAZIONE
|
||||||
;jmp quiet ; rts
|
|
||||||
|
|
||||||
.proc quiet
|
.proc quiet
|
||||||
ldx #8
|
ldx #8
|
||||||
@@ -367,4 +392,7 @@ samples_end_h
|
|||||||
.by >sample_end2
|
.by >sample_end2
|
||||||
.by >sample_end4
|
.by >sample_end4
|
||||||
finito
|
finito
|
||||||
|
org $b000 ; empty space I hope
|
||||||
|
screen
|
||||||
|
ins 'difficulties.bmp',+62
|
||||||
ini start
|
ini start
|
||||||
|
|||||||
Binary file not shown.
+7
-7
@@ -45,7 +45,12 @@ bit_data .ds 1
|
|||||||
; Song Initialization - this runs in the first tick:
|
; Song Initialization - this runs in the first tick:
|
||||||
;
|
;
|
||||||
.proc init_song
|
.proc init_song
|
||||||
|
;POKEY_INIT
|
||||||
|
mva #0 AUDCTL
|
||||||
|
sta AUDCTL+$10
|
||||||
|
mva #3 SKSTAT
|
||||||
|
sta SKSTAT+$10
|
||||||
|
|
||||||
;clear buffers
|
;clear buffers
|
||||||
lda #0
|
lda #0
|
||||||
tax
|
tax
|
||||||
@@ -54,12 +59,6 @@ bit_data .ds 1
|
|||||||
inx
|
inx
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
;clear pokey_save
|
|
||||||
ldx #8
|
|
||||||
@ sta pokey_save,x
|
|
||||||
dex
|
|
||||||
bpl @-
|
|
||||||
|
|
||||||
mva #1 bit_data
|
mva #1 bit_data
|
||||||
|
|
||||||
; here initializes song pointer:
|
; here initializes song pointer:
|
||||||
@@ -73,6 +72,7 @@ clear
|
|||||||
; Read just init value and store into buffer and POKEY
|
; Read just init value and store into buffer and POKEY
|
||||||
jsr get_byte
|
jsr get_byte
|
||||||
sta POKEY, x
|
sta POKEY, x
|
||||||
|
sta pokey_save,x
|
||||||
sty chn_copy, x
|
sty chn_copy, x
|
||||||
cbuf
|
cbuf
|
||||||
sta buffers + 255
|
sta buffers + 255
|
||||||
|
|||||||
Reference in New Issue
Block a user