diff --git a/.gitignore b/.gitignore index b64b77c..1fa6408 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /beebtrk backup1.6502 /beebtrk backup2.6502 +compile.txt diff --git a/beebtrk.6502 b/beebtrk.6502 index 0d26ac8..3dec698 100644 --- a/beebtrk.6502 +++ b/beebtrk.6502 @@ -54,10 +54,11 @@ INCLUDE "lib/beebtracker.h.6502" \ * Start address to be saved \ ****************************************************************** -LARGEST_VGM_SIZE = 20837 - 256 ; minus size of title screen file "loader_volume1.bin.exo" +LARGEST_VGM_SIZE = 20837 ; minus size of title screen file "loader_volume1.bin.exo" +SPLASH_SCREEN_SIZE = 256 ORG CODE_ORIGIN ; code origin - assume standard BBC Micro -GUARD MODE7_base_addr-LARGEST_VGM_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory +GUARD MODE7_base_addr-LARGEST_VGM_SIZE+SPLASH_SCREEN_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory .start @@ -97,19 +98,13 @@ INCLUDE "lib/beebtracker.s.6502" JSR show_intro \\ Run the tracker demo - JSR tracker_main + JMP tracker_main \\ ***** Exit app entirely ***** \\ \\ Credits / Outro screen goes here \\ - \\ Exit cleanly - tidy up anything else here! - LDA #12: JSR oswrch - \\ Would be nice to clear escape state and issue BASIC NEW to avoid "Bad Program" error - - .return - RTS } \\ *** Show loading screen *** @@ -127,7 +122,6 @@ INCLUDE "lib/beebtracker.s.6502" LDY #&7c JSR exo_unpack - \\ wait for keypress within 2 secs LDA#&81:LDX#200:LDY#0:JSR osbyte RTS @@ -160,9 +154,9 @@ SET_TELETEXT_FONT_CHAR_MAP ;EQUB 0 \\ Long text blows out the 200KB disk size - removed one tune -EQUS " Welcome to the Bitshifters Battle of the Bits BeebTracker Demo... Showcasing 26 awesome VGM chiptune music files converted from other 8 bit platforms to work on your BBC Micro. They have been retuned to 4Mhz and resampled at 50Hz" -EQUS " so can be played back on your SN76489 sound chip. You have never heard chiptunes like this before on the Beeb and not an ENVELOPE in sight! Press Escape to bring up the menu. Use the up and down arrow keys and return to select a new track." -EQUS " Released at the ABUG South Meet Up in Cambridge on 27 August 2016. This production was brought to you by Kieran and Henley. Find the full source to this demo and more at bitshifters.github.io. Come join the Collective...! " +EQUS " Welcome to the Bitshifters Battle of the Bits BeebTracker Demo.. Showcasing 26 awesome VGM chiptunes converted from other 8 bit platforms to work on your BBC Micro. Retuned to 4Mhz and resampled at 50Hz" +EQUS " for your SN76489 sound chip. You have never heard music like this before on the Beeb and not an ENVELOPE in sight! Press Escape to toggle the menu. Up and down arrow keys and return to select a new track." +EQUS " Released 27 August 2016 at the ABUG South Meet Up in Cambridge. This prod was brought to you by Kieran and Henley. Full source at bitshifters.github.io. Come join the Collective..!" EQUB 0 .load_message @@ -176,6 +170,12 @@ EQUS "Loading... ", 0 RESET_MAPCHAR +\\ ** MOVED EXO SCRATCH SPACE HERE TO AVOID NMI AT PAGE &D00 ** \\ +.exo_tabl_bi +PRINT "Spare bytes=",(MODE7_base_addr-LARGEST_VGM_SIZE)-exo_tabl_bi +SKIP EXO_TABL_SIZE +exo_tabl_lo = exo_tabl_bi + 52 +exo_tabl_hi = exo_tabl_bi + 104 \ ****************************************************************** diff --git a/beebtrk.ssd b/beebtrk.ssd index e50e0f7..b58b266 100644 Binary files a/beebtrk.ssd and b/beebtrk.ssd differ diff --git a/beebtrk2.6502 b/beebtrk2.6502 index e1a8939..74a9e54 100644 --- a/beebtrk2.6502 +++ b/beebtrk2.6502 @@ -55,10 +55,11 @@ INCLUDE "lib/beebtracker.h.6502" \ * Start address to be saved \ ****************************************************************** -LARGEST_VGM_SIZE = 20560 - 266 ; less size of splash screen "loader_volume2.bin.exo" +LARGEST_VGM_SIZE = 20560 ; less size of splash screen "loader_volume2.bin.exo" +SPLASH_SCREEN_SIZE = 266 ORG CODE_ORIGIN ; code origin - assume standard BBC Micro -GUARD MODE7_base_addr-LARGEST_VGM_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory +GUARD MODE7_base_addr-LARGEST_VGM_SIZE+SPLASH_SCREEN_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory .start @@ -296,9 +297,9 @@ SET_TELETEXT_FONT_CHAR_MAP .scrolltext_start .demo_message -EQUS " Welcome to the Bitshifters Ninja Gaiden BeebTracker Demo... 17 awesome VGM chiptune music files ported from Sega Master System to your BBC Micro. They have been retuned to 4Mhz and resampled at 50Hz" -EQUS " so can be played back on your SN76489 sound chip. Enjoy the soundtrack! Press Escape to bring up the menu. Use the up and down arrow keys and return to select a new track." -EQUS " Released at the ABUG South Meet Up in Cambridge on 27 August 2016. This production was brought to you by Kieran and Henley. Find the full source to this demo and more at bitshifters.github.io. Come join the Collective...! " +EQUS " Welcome to the Bitshifters Ninja Gaiden BeebTracker Demo... 17 awesome VGM chiptunes ported from the Sega Master System to your BBC Micro. Retuned to 4Mhz and resampled at 50Hz" +EQUS " to play back on your SN76489 sound chip. Enjoy the soundtrack! Press Escape to bring up the menu. Use the up and down arrow keys and return to select a new track." +EQUS " Released at the ABUG South Meet Up in Cambridge on 27 August 2016. This production was brought to you by Kieran and Henley. Find the full source to this demo and more at bitshifters.github.io. Come join the Collective...!" EQUB 0 .load_message @@ -312,6 +313,12 @@ EQUS "Loading... ", 0 RESET_MAPCHAR +\\ ** MOVED EXO SCRATCH SPACE HERE TO AVOID NMI AT PAGE &D00 ** \\ +.exo_tabl_bi +PRINT "Spare bytes=",(MODE7_base_addr-LARGEST_VGM_SIZE)-exo_tabl_bi +SKIP EXO_TABL_SIZE +exo_tabl_lo = exo_tabl_bi + 52 +exo_tabl_hi = exo_tabl_bi + 104 \ ****************************************************************** diff --git a/beebtrk2.ssd b/beebtrk2.ssd index 2a8fe6f..367a943 100644 Binary files a/beebtrk2.ssd and b/beebtrk2.ssd differ diff --git a/beebtrk3.6502 b/beebtrk3.6502 index 2641190..66f0496 100644 --- a/beebtrk3.6502 +++ b/beebtrk3.6502 @@ -55,10 +55,11 @@ INCLUDE "lib/beebtracker.h.6502" \ * Start address to be saved \ ****************************************************************** -LARGEST_VGM_SIZE = 13249 - 266 ; less size of splash screen "loader_volume2.bin.exo" +LARGEST_VGM_SIZE = 13249 ; less size of splash screen "loader_volume3.bin.exo" +SPLASH_SCREEN_SIZE = 259 ORG CODE_ORIGIN ; code origin - assume standard BBC Micro -GUARD MODE7_base_addr-LARGEST_VGM_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory +GUARD MODE7_base_addr-LARGEST_VGM_SIZE+SPLASH_SCREEN_SIZE ; ensure code size plus size of largest VGM file doesn't hit start of screen memory .start @@ -318,6 +319,12 @@ EQUS "Loading... ", 0 RESET_MAPCHAR +\\ ** MOVED EXO SCRATCH SPACE HERE TO AVOID NMI AT PAGE &D00 ** \\ +.exo_tabl_bi +PRINT "Spare bytes=",(MODE7_base_addr-LARGEST_VGM_SIZE)-exo_tabl_bi +SKIP EXO_TABL_SIZE +exo_tabl_lo = exo_tabl_bi + 52 +exo_tabl_hi = exo_tabl_bi + 104 \ ****************************************************************** @@ -388,34 +395,34 @@ EQUS "C.E", 13 .menu_entries EQUS " 1. Title Screen " -EQUS " 3. Green Hill Zone " -EQUS " 4. Invincible " -EQUS " 5. Bridge Zone " -EQUS " 7. Jungle Zone " -EQUS " 8. Bonus Zone " -EQUS " 9. Labyrinth Zone " -EQUS "10. Act Complete " -EQUS "11. Scrap Brain Zone " -EQUS "12. Sky Base Zone " -EQUS "13. Boss Theme " -EQUS "14. Death " -EQUS "15. Ending " -EQUS "16. Marble Zone (Bonus) " - -EQUS "17. Sonic Chaos Intro " -EQUS "18. Sonic Chaos Title Screen " -EQUS "19. Sonic Chaos Select Player " -EQUS "20. Sonic Chaos Turquoise Hill " -EQUS "21. Sonic Chaos Boss " -EQUS "22. Sonic Chaos Gigalopolis Zone" -EQUS "23. Sonic Chaos Sleeping Egg Zn " -EQUS "24. Sonic Chaos Special Stage " -EQUS "25. Sonic Chaos Mecha Green Hill" -EQUS "26. Sonic Chaos Aqua Planet Zone" -EQUS "27. Sonic Chaos Special Stage 2 " -EQUS "28. Sonic Chaos Electric Egg Zn " -EQUS "29. Sonic Chaos Final Boss " -EQUS "30. Sonic Chaos Ending " +EQUS " 2. Green Hill Zone " +EQUS " 3. Invincible " +EQUS " 4. Bridge Zone " +EQUS " 5. Jungle Zone " +EQUS " 6. Bonus Zone " +EQUS " 7. Labyrinth Zone " +EQUS " 8. Act Complete " +EQUS " 9. Scrap Brain Zone " +EQUS "10. Sky Base Zone " +EQUS "11. Boss Theme " +EQUS "12. Death " +EQUS "13. Ending " +EQUS "14. Marble Zone (Bonus) " + +EQUS "15. Sonic Chaos Intro " +EQUS "16. Sonic Chaos Title Screen " +EQUS "17. Sonic Chaos Select Player " +EQUS "18. Sonic Chaos Turquoise Hill " +EQUS "19. Sonic Chaos Boss " +EQUS "20. Sonic Chaos Gigalopolis Zone" +EQUS "21. Sonic Chaos Sleeping Egg Zn " +EQUS "22. Sonic Chaos Special Stage " +EQUS "23. Sonic Chaos Mecha Green Hill" +EQUS "24. Sonic Chaos Aqua Planet Zone" +EQUS "25. Sonic Chaos Special Stage 2 " +EQUS "26. Sonic Chaos Electric Egg Zn " +EQUS "27. Sonic Chaos Final Boss " +EQUS "28. Sonic Chaos Ending " IF COMPILE_OPTION_EXIT diff --git a/beebtrk3.ssd b/beebtrk3.ssd index 35c8c9f..d3a6e39 100644 Binary files a/beebtrk3.ssd and b/beebtrk3.ssd differ diff --git a/lib/exomiser.h.6502 b/lib/exomiser.h.6502 index ec03ec3..f056bae 100644 --- a/lib/exomiser.h.6502 +++ b/lib/exomiser.h.6502 @@ -31,9 +31,10 @@ EXO_buffer_end = EXO_buffer_start + EXO_buffer_len ; ------------------------------------------------------------------- EXO_TABL_SIZE = 156 -exo_tabl_bi = &0d9f - EXO_TABL_SIZE -exo_tabl_lo = exo_tabl_bi + 52 -exo_tabl_hi = exo_tabl_bi + 104 +; can't use NMI workspace with TurboMMC :S +;exo_tabl_bi = &0d9f - EXO_TABL_SIZE +;exo_tabl_lo = exo_tabl_bi + 52 +;exo_tabl_hi = exo_tabl_bi + 104 \\ Declare ZP vars diff --git a/lib/exomiser.s.6502 b/lib/exomiser.s.6502 index c95de80..fdf1440 100644 --- a/lib/exomiser.s.6502 +++ b/lib/exomiser.s.6502 @@ -89,7 +89,7 @@ EXO_crunch_byte_hi = exo_get_crunched_byte + 2 inx tya and #$0f - beq _init_shortcut ; starta på ny sekvens + beq _init_shortcut ; starta p� ny sekvens txa ; this clears reg a lsr a ; and sets the carry flag diff --git a/lib/vgmplayer.s.6502 b/lib/vgmplayer.s.6502 index 7bbd991..03845ed 100644 --- a/lib/vgmplayer.s.6502 +++ b/lib/vgmplayer.s.6502 @@ -5,6 +5,8 @@ VGM_PLAYER_ORG = * +VGM_TRIGGER_BEAT_ON_VOLUME = FALSE ; currently incompatible with memory changes (it's that tight!) + ORG &0380 GUARD &03E0 @@ -350,6 +352,19 @@ PSG_STROBE_CLI_INSN = psg_strobe + 25 LDA #SN_VOL_MAX SBC vgm_player_reg_vals,Y STA vgm_player_reg_vals,Y + + \\ Trigger beat on volume + IF VGM_TRIGGER_BEAT_ON_VOLUME + TAX + TYA:LSR A:TAY ; channel is register / 2 + TXA + CMP #9 + BCC set_beat_vol + LDA #9 + .set_beat_vol + STA vgm_chan_array, Y + ENDIF + JMP return \\ Frequency / tone data diff --git a/make.bat b/make.bat index 9773ce7..ebdf47f 100644 --- a/make.bat +++ b/make.bat @@ -1,6 +1,4 @@ @echo off -..\..\Bin\beebasm.exe -i beebtrk.6502 -do beebtrk.ssd -opt 2 -v -pause -..\..\Bin\beebasm.exe -i beebtrk2.6502 -do beebtrk2.ssd -opt 2 -v -pause -..\..\Bin\beebasm.exe -i beebtrk3.6502 -do beebtrk3.ssd -opt 2 -v +..\..\Bin\beebasm.exe -i beebtrk.6502 -do beebtrk.ssd -opt 2 -v > compile.txt +..\..\Bin\beebasm.exe -i beebtrk2.6502 -do beebtrk2.ssd -opt 2 -v >> compile.txt +..\..\Bin\beebasm.exe -i beebtrk3.6502 -do beebtrk3.ssd -opt 2 -v >> compile.txt diff --git a/run.bat b/run.bat index a6b2e79..6e5686b 100644 --- a/run.bat +++ b/run.bat @@ -1 +1 @@ -"..\..\Tools\B-emV2.2Win\B-em.exe" beebtrk3.ssd +"..\..\Tools\B-emV2.2Win\B-em.exe" beebtrk.ssd