sonico a musica nueva

This commit is contained in:
2022-06-25 18:02:50 -04:00
parent 42facad64e
commit 1ea62798c8
7 changed files with 63 additions and 12 deletions
+9
View File
@@ -171,3 +171,12 @@ sfx_keyclick = $18 ;y
sfx_shoot = $19 ;z
sfx_seppuku = $1a ;1
sfx_liquid_dirt = $1b ;2
sfx_battery = $1c ;3
sfx_white_flag = $1d ;4
;--------------------------------
; RMT songs (lines)
;--------------------------------
song_silencio = $00
song_end_round = $02
song_ingame = $06
song_game_over = $0b
+21 -9
View File
@@ -167,7 +167,8 @@ MainGameLoop
; Results are number of other deaths
; before the player dies itself
lda #song_end_round
jsr RmtSongSelect
jsr DisplayResults
;check demo mode
@@ -240,6 +241,7 @@ skipzeroing
inc CurrentRoundNr
mva #0 dmactl ; issue #72
jsr RmtSongSelect
mva #sfx_silencer sfx_effect
jmp MainGameLoop
@@ -254,6 +256,9 @@ skipzeroing
; the shooting angle is randomized
; of course gains an looses are zeroed
lda #song_ingame
jsr RmtSongSelect
lda #0
tax
@ sta singleRoundVars,x
@@ -908,10 +913,8 @@ ClearResults
lda #$ff ;initial value
sta sfx_effect
;
ldx #<MODUL ;low byte of RMT module to X reg
ldy #>MODUL ;hi byte of RMT module to Y reg
lda #0 ;starting song line 0-255 to A reg
jsr RASTERMUSICTRACKER ;Init
lda #0
jsr RmtSongSelect
;
VMAIN VBLinterrupt,6 ;jsr SetVBL
@@ -971,14 +974,16 @@ itsPAL
; pressTimer is trigger tick counter. always 50 ticks / s
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
; ------- RMT -------
lda sfx_effect
bmi lab2
asl @ ; * 2
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module)
lda #0 ;A = 12 note (0..60)
jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
lda #0 ;A = 0 note (0..60)
bit noSfx
smi:jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
lda #$ff
sta sfx_effect ;reinit value
@@ -1312,7 +1317,14 @@ getkeyend
rts
.endp
;--------------------------------------------------
.proc RmtSongSelect
;--------------------------------------------------
; starting song line 0-255 to A reg
ldx #<MODUL ;low byte of RMT module to X reg
ldy #>MODUL ;hi byte of RMT module to Y reg
jmp RASTERMUSICTRACKER ;Init, :RTS
.endp
;----------------------------------------------
icl 'weapons.asm'
;----------------------------------------------
@@ -1342,7 +1354,7 @@ TankFont
MODUL equ $b000 ;address of RMT module
opt h- ;RMT module is standard Atari binary file already
ins "artwork/sfx/scorch_trial0e_stripped.rmt" ;include music RMT module
ins "artwork/sfx/scorch_trial0f_stripped.rmt" ;include music RMT module
opt h+
;
;
BIN
View File
Binary file not shown.
+4 -1
View File
@@ -788,6 +788,7 @@ invSelectDef
cmp #ind_Battery________
bne NotBattery
; if activate battery, we do it differently
mva #sfx_battery sfx_effect
mva #99 Energy,x
bne DecreaseDefensive ; bypass activation
NotBattery
@@ -795,6 +796,7 @@ NotBattery
bne NotWhiteFlag
cmp ActiveDefenceWeapon,x
bne NoDeactivateWhiteFlag
mva #sfx_white_flag sfx_effect
lda #$00 ; if try to activate activated White Flag then deactivate Defence
sta ActiveDefenceWeapon,x
sta ShieldEnergy,x
@@ -1601,7 +1603,6 @@ quit_seppuku
;displays results of the round
;using 4x4 font
mva #sfx_smoke_cloud sfx_effect
mva #1 plot4x4color
;centering the result screen
@@ -1631,6 +1632,8 @@ quit_seppuku
beq @+ ;unconditional jump, because TypeLine4x4 ends with beq
GameOver4x4
lda #song_game_over
jsr RmtSongSelect
mwa #LineGameOver LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
mva ResultY LineYdraw
+2
View File
@@ -19,6 +19,8 @@ seppukuVal .by 75
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
.DS [MaxPlayers]
;----------------------------------------------------
noMusic .by 0 ; 0 - play music, $ff - do not play music
noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX
; 4x4 text buffer
ResultLineBuffer
dta d" ", $ff
+27 -2
View File
@@ -1078,6 +1078,10 @@ jumpFromStick
jeq pressedSpace
cmp #$2c
jeq pressedTAB
cmp #$25 ; M
jeq pressedM
cmp #$3e ; S
jeq pressedS
jmp notpressed
checkJoy
;------------JOY-------------
@@ -1235,6 +1239,26 @@ CTRLpressedTAB
jsr WaitForKeyRelease
jmp BeforeFire
pressedM
; have you tried turning the music off and on again?
lda #$ff
eor:sta noMusic
bmi silencioMusico
lda #song_ingame
bne @+
silencioMusico
lda #song_silencio
@ jsr RmtSongSelect
jsr WaitForKeyRelease
jmp BeforeFire
pressedS
; have you tried turning sfx off and on again?
lda #$ff
eor:sta noSfx
jsr WaitForKeyRelease
jmp BeforeFire
pressedSpace
;=================================
@@ -2349,11 +2373,12 @@ MIRValreadyAll
; and replaces Shoot and Flight routines
; X and TankNr - index of shooting tank
; -------------------------------------------------
mva #sfx_sandhog sfx_effect
ldy #0 ; byte counter (from 0 to 39)
NextColumn
; big loop - we repat internal loops for each column of bytes
sty magic
ldx #60 ; line counter (from 0 to 60 )
ldx #120 ; line counter (from 0 to 60 )
; first loop - inverse column of bytes for a while
ldy magic
NextLine1
@@ -2364,7 +2389,7 @@ NextLine1
;
wait ; wait uses A and Y
; second loop - inverse again and put random "snow" to column of bytes
ldx #60
ldx #120
ldy magic
mva #$55 magic+1
NextLine2