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