diff --git a/028.bs/Makefile b/028.bs/Makefile index 863d5ba..8d4bbce 100644 --- a/028.bs/Makefile +++ b/028.bs/Makefile @@ -168,7 +168,7 @@ out/falling.raw: assets/falling.wav sox assets/falling.wav -b 8 -c 1 -r 8000 out/falling.raw out/jump.raw: assets/jump.wav - sox assets/jump.wav -c 1 -r 13000 -b 8 out/jump.raw + sox -v 0.98 assets/jump.wav -c 1 -r 13000 -b 8 out/jump.raw out/main.o: $(IMAGEDATA) out/background-map.s out/foreground-map.s Makefile link.script.x out/playarea_fade.s out/flags_fade.s out/panelFade.s out/tileFade.s out/jump.raw out/falling.raw diff --git a/028.bs/game1.s b/028.bs/game1.s index 1555b0e..6b94bf9 100644 --- a/028.bs/game1.s +++ b/028.bs/game1.s @@ -46,15 +46,6 @@ Entry: lea Level3InterruptHandler,a3 move.l a3,LVL3_INT_VECTOR - - if 0 - lea Level4InterruptHandler,a3 - move.l a3,LVL4_INT_VECTOR - endif - - - ;; move.w #(INTF_SETCLR|INTF_VERTB|INTF_INTEN),INTENA(a6) - jsr StartMusic jsr ShowSplash jsr BlueFill @@ -75,14 +66,12 @@ Entry: lea panel,a1 jsr PokePanelBitplanePointers - lea mpanelCopperListBpl1Ptr,a0 lea mpanel,a1 jsr PokePanelBitplanePointers bsr ShowMessagePanel - jsr Init ; enable the playfield jsr InstallSpriteColorPalette @@ -192,7 +181,7 @@ GameLoop: jsr WaitVerticalBlank - MOVE.W #2,AUD3LEN(a6) ;Set length in words + move.w #2,AUD3LEN(a6) ; set the empty sound for the next sample to be played move.l #emptySound,AUD3LCH(a6) if TIMING_TEST=1 @@ -213,10 +202,6 @@ GameLoop: .s2: jsr ProcessJoystick - if 0 - btst.b #0,joystick - bne .setMoving - endif cmp.w #PLAYER_INITIAL_X+16*3,spriteX bge .setMoving addq.w #1,movingCounter @@ -232,6 +217,7 @@ GameLoop: bsr Update + jsr CheckPlayerMiss bsr RenderNextForegroundFrame jsr RenderNextBackgroundFrame @@ -246,17 +232,6 @@ GameLoop: jsr RenderPathway .dontRenderPathway: - - - if 0 - move.w pathwayYIndex,d6 - cmp.w #0,d6 - beq .dontRenderMapTile - move.w pathwayXIndex,d5 - bsr RenderMapTile -.dontRenderMapTile: - endif - if TIMING_TEST=1 move.w #$f00,COLOR00(a6) move.w #$f00,COLOR02(a6) @@ -300,7 +275,7 @@ Update: jsr InstallNextPathwayColor .dontInstallNextPathwayColor: add.w #1,pathwayFadeCount - jsr CheckPlayerMiss + ;; jsr CheckPlayerMiss rts @@ -667,13 +642,10 @@ PostMissedTile: BigBang: - jsr PlayFalling - move.l #10,d0 -.loop: + jsr PlayFallingSound jsr WaitVerticalBlank - dbra d0,.loop - - MOVE.W #2,AUD3LEN(a6) ;Set length in words + + move.w #2,AUD3LEN(a6) ; set the empty sound for the next sample to be played move.l #emptySound,AUD3LCH(a6) jsr ResetItems @@ -813,42 +785,6 @@ Level3InterruptHandler: rte - if 0 -Level4InterruptHandler: - movem.l d0-a6,-(sp) - lea CUSTOM,a6 -.checkVerticalBlank: - move.w INTREQR(a6),d0 - and.w #INTF_AUD0,d0 - beq .interruptComplete - - move.l #1000,d0 -.loop: - dbra d0,.loop - - move.w #INTF_AUD0,INTREQ(a6) ; clear interrupt bit - MOVE.W #2,AUD0LEN(a6) ;Set length in words - move.l #jump,AUD0LCH(a6) - move.w #INTF_AUD0,INTENA(a6) - - if 0 - move.w #DMAF_AUD0,DMACON(a6) - - lea verticalBlankCounterText,a0 - bsr IncrementCounter - - if 0 - MOVE.W #1,AUD0PER(a6) - MOVE.W #0,AUD0VOL(a6) ;Use maximum volume - MOVE.W #2,AUD0LEN(a6) ;Set length in words - endif - endif -.interruptComplete: - - movem.l (sp)+,d0-a6 - rte - endif - Message: ;; a0 - bitplane ;; a1 - text diff --git a/028.bs/player.s b/028.bs/player.s index f805cfb..9416733 100644 --- a/028.bs/player.s +++ b/028.bs/player.s @@ -157,22 +157,22 @@ ProcessJoystick: cmp.b #3,joystickpos bne .notRight move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteR - jsr PlaySound + jsr PlayJumpSound .notRight: cmp.b #1,joystickpos bne .notUp move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteU - jsr PlaySound + jsr PlayJumpSound .notUp: cmp.b #5,joystickpos bne .notDown move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteD - jsr PlaySound + jsr PlayJumpSound .notDown: cmp.b #7,joystickpos bne .notLeft move.w #PLAYER_JUMP_PIXELS+PLAYER_PAUSE_PIXELS,spriteL - jsr PlaySound + jsr PlayJumpSound .notLeft: .skip: rts diff --git a/028.bs/sound.s b/028.bs/sound.s index 96cd3fd..d20540b 100644 --- a/028.bs/sound.s +++ b/028.bs/sound.s @@ -1,32 +1,23 @@ include "includes.i" - xdef PlaySound - xdef PlayFalling + xdef PlayJumpSound + xdef PlayFallingSound -PlaySound: - LEA jump(pc),a1 ;Address of data to - MOVE.L a1,AUD3LCH(a6) ;The 680x0 writes this as though it were a - MOVE.W #123,AUD3PER(a6) - MOVE.W #64,AUD3VOL(a6) ;Use maximum volume - MOVE.W #(endJump-jump)/2,AUD3LEN(a6) ;Set length in words +PlayJumpSound: + lea jump(pc),a1 + move.l a1,AUD3LCH(a6) + move.w #123,AUD3PER(a6) + move.w #64,AUD3VOL(a6) + move.w #(endJump-jump)/2,AUD3LEN(a6) ;Set length in words move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6) - - if 0 - move.l #1000,d0 -.loop: - dbra d0,.loop - - MOVE.W #2,AUD3LEN(a6) ;Set length in words - move.l #jump,AUD3LCH(a6) - endif rts -PlayFalling: - LEA falling(pc),a1 ;Address of data to - MOVE.L a1,AUD3LCH(a6) ;The 680x0 writes this as though it were a - MOVE.W #256,AUD3PER(a6) - MOVE.W #25,AUD3VOL(a6) ;Use maximum volume - MOVE.W #(endFalling-falling)/4,AUD3LEN(a6) ;Set length in words +PlayFallingSound: + lea falling(pc),a1 + move.l a1,AUD3LCH(a6) + move.w #256,AUD3PER(a6) + move.w #25,AUD3VOL(a6) + move.w #(endFalling-falling)/4,AUD3LEN(a6) ;Set length in words move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6) rts diff --git a/doc/BuildingCrossDev.md b/doc/BuildingCrossDev.md index 4e71c02..6443c9f 100644 --- a/doc/BuildingCrossDev.md +++ b/doc/BuildingCrossDev.md @@ -128,3 +128,12 @@ Notes: # /Applications/CMake.app/Contents/bin/cmake .. # make install ``` + +11. SOX + ``` + # git clone git://sox.git.sourceforge.net/gitroot/sox/sox + # cd sox + # autoreconf -i + # ./configure --prefix=/usr/local + # make install +```