mirror of
https://github.com/Pecusx/dino-game.git
synced 2026-05-20 22:33:23 +02:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a6478ae361 | |||
| fe0e9640af | |||
| 8a789527b1 | |||
| 5d39d86ea1 | |||
| 5f2bd3130d | |||
| 6ff92bb0da | |||
| cc878e35a6 | |||
| fd95eab62f | |||
| 49ba83f111 | |||
| 57248e8675 |
@@ -7,7 +7,7 @@ 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:
|
||||||
```
|
```
|
||||||
@@ -18,4 +18,5 @@ 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
|
||||||
|
```
|
||||||
|
|||||||
Binary file not shown.
+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 = 44
|
||||||
DIFF_LEVELS = 20
|
DIFF_LEVELS = 20
|
||||||
.IFNDEF ALONE
|
.IFNDEF ALONE
|
||||||
.def ALONE = 1 ; standalone version
|
.def ALONE = 1 ; standalone version
|
||||||
@@ -24,7 +24,9 @@ swap_table=$0600 ; table for swap bytes in left characters :)
|
|||||||
.zpvar JumpPhase .byte
|
.zpvar JumpPhase .byte
|
||||||
.zpvar Hit .byte
|
.zpvar Hit .byte
|
||||||
.zpvar Level .byte
|
.zpvar Level .byte
|
||||||
|
.zpvar PaddleState .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'
|
||||||
@@ -72,12 +74,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 +129,12 @@ 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 Check2button ; reset JoyB2+ state
|
||||||
|
sta PaddleState
|
||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
jsr GenerateCharsets
|
jsr GenerateCharsets
|
||||||
jsr GenerateClouds
|
jsr GenerateClouds
|
||||||
@@ -400,18 +408,19 @@ SwapLoop
|
|||||||
bpl @-
|
bpl @-
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
;-----------------------------------------------
|
||||||
.proc ClearScreen
|
.proc ClearScreen
|
||||||
ldy #44 ; visible screen len
|
ldy #WORLD_LENGTH ; 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
|
||||||
@@ -437,7 +446,7 @@ NothingToDraw
|
|||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
ldx #0 ; start position (world)
|
ldx #0 ; start position (world)
|
||||||
stx temp_b
|
stx temp_b
|
||||||
lda #42 ; start position (screen)
|
lda #WORLD_LENGTH-1 ; start position (screen)
|
||||||
sta temp_b2
|
sta temp_b2
|
||||||
ToScreenLoop
|
ToScreenLoop
|
||||||
lda WorldTable,x
|
lda WorldTable,x
|
||||||
@@ -446,10 +455,9 @@ ToScreenLoop
|
|||||||
ldx temp_b2
|
ldx temp_b2
|
||||||
jsr ShowObjectL
|
jsr ShowObjectL
|
||||||
NothingToDraw
|
NothingToDraw
|
||||||
dec temp_b2
|
|
||||||
inc:ldx temp_b
|
inc:ldx temp_b
|
||||||
cpx #WORLD_LENGTH
|
dec temp_b2
|
||||||
bne ToScreenLoop
|
bpl ToScreenLoop
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-----------------------------------------------
|
;-----------------------------------------------
|
||||||
@@ -1074,6 +1082,8 @@ DinoLoop4
|
|||||||
beq Up
|
beq Up
|
||||||
lda TRIG0 ; Fire = Up
|
lda TRIG0 ; Fire = Up
|
||||||
beq Up
|
beq Up
|
||||||
|
jsr Check2button ; 2nd button = down
|
||||||
|
bcc Down
|
||||||
; check keyboard
|
; check keyboard
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$f7 ; SHIFT
|
cmp #$f7 ; SHIFT
|
||||||
@@ -1321,9 +1331,17 @@ pressed
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
Check2button
|
||||||
|
lda PADDL0
|
||||||
|
and #$c0
|
||||||
|
eor #$C0
|
||||||
|
cmp PaddleState
|
||||||
|
rts
|
||||||
|
;--------------------------------------------------
|
||||||
.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
|
||||||
@@ -1348,9 +1366,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
|
||||||
@@ -1392,9 +1424,11 @@ screen
|
|||||||
.align $100
|
.align $100
|
||||||
MUSIC1_DATA
|
MUSIC1_DATA
|
||||||
ins 'music/InGame.lzss' ; ingame music
|
ins 'music/InGame.lzss' ; ingame music
|
||||||
|
.ds 1
|
||||||
MUSIC1_DATA_END
|
MUSIC1_DATA_END
|
||||||
.align $100
|
.align $100
|
||||||
MUSIC2_DATA
|
MUSIC2_DATA
|
||||||
ins 'music/GameOver.lzss' ; game over music
|
ins 'music/GameOver.lzss' ; game over music
|
||||||
|
.ds 1
|
||||||
MUSIC2_DATA_END
|
MUSIC2_DATA_END
|
||||||
run FirstSTART
|
run FirstSTART
|
||||||
|
|||||||
+37
-9
@@ -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.
Reference in New Issue
Block a user