Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	beebtrk.6502
#	beebtrk.ssd
#	lib/beebtracker.s.6502
  • Loading branch information
simondotm committed Jul 6, 2016
2 parents a14e1a2 + 530e1f9 commit 6b395bb
Show file tree
Hide file tree
Showing 21 changed files with 3,522 additions and 0 deletions.
385 changes: 385 additions & 0 deletions temp/beebtrk.6502
Original file line number Diff line number Diff line change
@@ -0,0 +1,385 @@
\ ******************************************************************
\ * Beeb Tracker
\ * Music player & visualiser in MODE 7
\ * Kieran Connell & Simon Morris
\ * Demo team name TBD! :)
\ ******************************************************************

\\ Common global defines
INCLUDE "lib/bbc.h.6502"

\ ******************************************************************
\ * Define compilation flags
\ ******************************************************************

CODE_ORIGIN = &1100 ; assuming standard BBC Micro DFS this is safe!
_DEBUG = FALSE ; include extra stuff for debugging

COMPILE_OPTION_EXIT = FALSE ; enable "Exit" in selection menu



\ ******************************************************************
\ * Define global constants
\ ******************************************************************




\ ******************************************************************
\ * Define app constants
\ ******************************************************************

\\ Number of entries in our file table
NUM_vgm_files = 27


\ ******************************************************************
\ * Define fast (zero page) runtime variables
\ ******************************************************************

\\ Our own app variables
ORG &00
GUARD &9F ; user ZP + econet ZP


\\ Any includes here can declare ZP vars from the pool using SKIP
INCLUDE "lib/exomiser.h.6502"
INCLUDE "lib/vgmplayer.h.6502"
INCLUDE "lib/beebtracker.h.6502"



\ ******************************************************************
\ * Start address to be saved
\ ******************************************************************

LARGEST_VGM_SIZE = 20837

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

.start


\ ******************************************************************
\ * Code entry
\ ******************************************************************

INCLUDE "lib/exomiser.s.6502"
INCLUDE "lib/vgmplayer.s.6502"
INCLUDE "lib/beebtracker.s.6502"

\ ******************************************************************
\ * Main loop including high-level state machine
\ ******************************************************************

.main
{
\\ ***** System initialise ***** \\

\\ *FX 200,3 - clear memory on break as we use OS memory areas and can cause nasty effects
LDA #200
LDX #3
JSR osbyte

\\ Set MODE 7
LDA #22: JSR oswrch
LDA #7: JSR oswrch

\\ Turn off cursor by directly poking crtc
SEI
LDA #10: STA &FE00
LDA #32: STA &FE01
CLI




JSR 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
}



.code_end


\ ******************************************************************
\ * Stored data
\ ******************************************************************

.data_start
<<<<<<< HEAD


.menu_data_filename EQUS "BeebDat", 13
.loadscreen_data_filename EQUS "LSCREEN", 13

\\ Need to put this macro last as I don't know how to undo the character map!
\\
SET_TELETEXT_FONT_CHAR_MAP

\\ Scrolltext messages stored as font glyph byte offsets
.scrolltext_start

.demo_message
EQUS " Welcome to the Bitshifters Battle of the Bits BeebTracker Demo... Showcasing 27 awesome VGM chiptune music files that have been converted from other platforms to work on your 4Mhz BBC Micro and replayed on your SN76489 programmable sound chip! " ;You've never heard chip tunes like this before! This production was brought to you by Kieran and Scrubbly ", 0

.load_message
EQUS "Loading... ", 0

\\ ** ANY EQUS LINES AFTER THIS POINT WILL STILL CONTAIN REMAPPED CHARACTERS ** \\

.scrolltext_end

\\ Clear character mappings
RESET_MAPCHAR




\ ******************************************************************
\ * EXO VGM data file
\ * This must be compressed using the following flags:
\ * exomizer.exe raw -c -m 1024 <file.raw> -o <file.exo>
\ ******************************************************************

.VGM_stream_data
\\ Now loaded at run-time so don't know end of data!
INCBIN "data/loader_volume1.bin.exo"


\ ******************************************************************
\ * End address to be saved
\ ******************************************************************

.end

ORG &0900
GUARD &0CFF

=======
>>>>>>> origin/master
.menu_data_start

\\ No longer require loading_table but each entry must be exactly 8 bytes
\\ Does not have to be aligned but entries have to be fixed size
\\ This isn't actually any smaller than using pointer tables but fewer things to type I suppose :)

.vgm_filenames
EQUS "V.A", 13,0,0,0,0
EQUS "V.BB", 13,0,0,0
EQUS "V.C", 13,0,0,0,0
EQUS "V.D", 13,0,0,0,0
EQUS "V.E", 13,0,0,0,0
EQUS "V.F", 13,0,0,0,0
EQUS "V.G", 13,0,0,0,0
EQUS "V.H", 13,0,0,0,0
EQUS "V.I", 13,0,0,0,0
EQUS "V.J", 13,0,0,0,0
EQUS "V.K", 13,0,0,0,0
EQUS "V.L", 13,0,0,0,0
EQUS "V.M", 13,0,0,0,0
EQUS "V.N", 13,0,0,0,0
EQUS "V.O", 13,0,0,0,0
EQUS "V.P", 13,0,0,0,0
EQUS "V.Q", 13,0,0,0,0
EQUS "V.R", 13,0,0,0,0
EQUS "V.S", 13,0,0,0,0
EQUS "V.T", 13,0,0,0,0
EQUS "V.U", 13,0,0,0,0
EQUS "V.V", 13,0,0,0,0
EQUS "V.W", 13,0,0,0,0
EQUS "V.X", 13,0,0,0,0
EQUS "V.Y", 13,0,0,0,0
EQUS "V.Z", 13,0,0,0,0
EQUS "V.ZZ", 13,0,0,0




\\ No longer require pointer table but each entry must be exactly 32 bytes
\\ Does not have to be aligned but entries have to be fixed size
\\ Code to multiple by 32 probably takes up as much space as the previous pointer tables!

.menu_entries
EQUS " 1. Master Tracker "
EQUS " 2. Exception "
EQUS " 3. Fluid Dynamics "
EQUS " 4. Bonus Zone "
EQUS " 5. MisSioN 76489 "
EQUS " 6. LOL I am late Sorry "
EQUS " 7. Sonic Enters a Dance Club "
EQUS " 8. I Can Haz D00ty "
EQUS " 9. Infiltration Mission "
EQUS "10. Overcast "
EQUS "11. iNTeNSiTY "
EQUS "12. Kill Chipsters on Sight! "
EQUS "13. Nintendo Entertainment Samba"
EQUS "14. Happy Fun Times "
EQUS "15. Pinky Plinky Thingy "
EQUS "16. Reg "
EQUS "17. Masks Revenge "
EQUS "18. Gost Haus "
EQUS "19. Adrenaline Lift "
EQUS "20. The Long Goodbye "
EQUS "21. Chilled Out Princess "
EQUS "22. The Circus Is In Town "
EQUS "23. Frozen Dancehall o/t Pharoah"
EQUS "24. PSG Strut "
EQUS "25. My Mission "
EQUS "26. My New Used Car "
EQUS "27. Run Under Fire "

IF COMPILE_OPTION_EXIT
EQUS "Exit "
ENDIF




.menu_data_end


\ ******************************************************************
\ * End address to be saved
\ ******************************************************************

.end



\ ******************************************************************
\ * EXO VGM data file
\ * This must be compressed using the following flags:
\ * exomizer.exe raw -c -m 1024 <file.raw> -o <file.exo>
\ ******************************************************************

.VGM_stream_data
\\ Now loaded at run-time so don't know end of data!
.VGM_end_of_data


\ ******************************************************************
\ * Print out code & data metrics
\ ******************************************************************

D_MENU_SIZE = menu_data_end-menu_data_start
D_LOOKUP_SIZE = lookup_tables_end-lookup_tables_start
D_NOTES_SIZE = note_tables_end-note_tables_start
D_SCROLLTEXT_SIZE = scrolltext_end-scrolltext_start
D_SCREENS_SIZE = mode7_data_end-mode7_data_start
D_EXO_CODE_SIZE = exo_end-exo_start
D_VGM_PLAYER_CODE_SIZE = vgm_player_end-vgm_player_start


PRINT "------------------------------------------------------------"
PRINT "Code origin = ", ~CODE_ORIGIN

PRINT "Code size =", end-start-D_MENU_SIZE-D_LOOKUP_SIZE-D_NOTES_SIZE-D_SCROLLTEXT_SIZE-D_SCREENS_SIZE
PRINT " menu data size =",D_MENU_SIZE
PRINT " lookup tables size =",D_LOOKUP_SIZE
PRINT " note tables size =",D_NOTES_SIZE
PRINT " scrolltext size =",D_SCROLLTEXT_SIZE
PRINT " MODE 7 screen size =", D_SCREENS_SIZE
PRINT " VGM Player code size = ", D_VGM_PLAYER_CODE_SIZE
PRINT " EXO code size = ", D_EXO_CODE_SIZE
PRINT "Run-time vars (above origin) =", VGM_stream_data-end
PRINT "------------------------------------------------------------"
PRINT "Total size (disk) =", end-start
PRINT "Total size (code + data + vars above origin) =", VGM_stream_data-start
PRINT "Available memory (above origin) =", &7C00 - CODE_ORIGIN
PRINT "Max song size =", &7C00 - VGM_stream_data
PRINT "------------------------------------------------------------"


\ ******************************************************************
\ * Save the code
\ ******************************************************************

<<<<<<< HEAD

SAVE "!Boot", start, end, main
SAVE "BeebDat", menu_data_start, menu_data_end

PUTFILE "vgm_botb/BotB 7832 MasterTracker.raw.exo", "V.0", 0
PUTFILE "vgm_botb/BotB 7383 exception.raw.exo", "V.1", 0 ; V.B fails for some wierd reason?
PUTFILE "vgm_botb/BotB 16433 Slimeball - Fluid Dynamics.raw.exo", "V.2", 0
PUTFILE "vgm_botb/BonusZone.raw.exo", "V.3", 0
PUTFILE "vgm_botb/MISSION76496.raw.exo", "V.4", 0
PUTFILE "vgm_botb/BotB 7639 lol i am late sorry.raw.exo", "V.5", 0
PUTFILE "vgm_botb/BotB 4406 sonic_enters_a_dance_club.raw.exo", "V.6", 0
PUTFILE "vgm_botb/BotB 1643 flashbob - I can haz d00ty caiclz plz.raw.exo", "V.7", 0
PUTFILE "vgm_botb/BotB 1819 Kulor - Snofer Apostrophy S Infiltration Mission.raw.exo", "V.8", 0
PUTFILE "vgm_botb/BotB 2310 chunter - overcast.raw.exo", "V.9", 0
PUTFILE "vgm_botb/BotB 5106 null1024 - iNTeNSiTY.raw.exo", "V.A", 0
PUTFILE "vgm_botb/BotB 5135 b00daw - kill chipsters on sight!.raw.exo", "V.C", 0
PUTFILE "vgm_botb/BotB 5181 Kulor - Nintendo Entertainment Samba.raw.exo", "V.D", 0
PUTFILE "vgm_botb/BotB 7637 happyfuntimes.raw.exo", "V.E", 0
PUTFILE "vgm_botb/BotB 8493 null1024 - pinky plinky thingy.raw.exo", "V.F", 0
PUTFILE "vgm_botb/BotB 9302 reg.raw.exo", "V.G", 0
PUTFILE "vgm_botb/BotB 10995 masks revenge.raw.exo", "V.H", 0
PUTFILE "vgm_botb/BotB 10996 gost haus.raw.exo", "V.I", 0
PUTFILE "vgm_botb/BotB 11925 Interrobang Pie - Adrenaline Lift.raw.exo", "V.J", 0
PUTFILE "vgm_botb/BotB 12143 DimWiddy - The Long Goodbye.raw.exo", "V.K", 0
PUTFILE "vgm_botb/BotB 14648 chilled out princess.raw.exo", "V.L", 0
PUTFILE "vgm_botb/BotB 16712 stewboy - The Circus is in Town.raw.exo", "V.M", 0
PUTFILE "vgm_botb/BotB 16439 Chip Champion - frozen dancehall of the pharaoh.raw.exo", "V.N", 0
PUTFILE "vgm_botb/BotB 20609 Jredd - PSG Strut.raw.exo", "V.O", 0
PUTFILE "vgm_botb/my_mission.raw.exo", "V.P", 0
PUTFILE "vgm_botb/my_new_used_car.raw.exo", "V.Q", 0
PUTFILE "vgm_botb/run_under_fire.raw.exo", "V.R", 0
;PUTFILE "data/loader_volume1.bin", "LSCREEN", 0
=======
SAVE "BeebTrk", start, end, main

PUTFILE "vgm_botb/BotB 7832 MasterTracker.raw.exo", "V.A", 0
PUTFILE "vgm_botb/BotB 7383 exception.raw.exo", "V.BB", 0 ; V.B fails for some wierd reason?
PUTFILE "vgm_botb/BotB 16433 Slimeball - Fluid Dynamics.raw.exo", "V.C", 0
PUTFILE "vgm_botb/BonusZone.raw.exo", "V.D", 0
PUTFILE "vgm_botb/MISSION76496.raw.exo", "V.E", 0
PUTFILE "vgm_botb/BotB 7639 lol i am late sorry.raw.exo", "V.F", 0
PUTFILE "vgm_botb/BotB 4406 sonic_enters_a_dance_club.raw.exo", "V.G", 0
PUTFILE "vgm_botb/BotB 1643 flashbob - I can haz d00ty caiclz plz.raw.exo", "V.H", 0
PUTFILE "vgm_botb/BotB 1819 Kulor - Snofer Apostrophy S Infiltration Mission.raw.exo", "V.I", 0
PUTFILE "vgm_botb/BotB 2310 chunter - overcast.raw.exo", "V.J", 0
PUTFILE "vgm_botb/BotB 5106 null1024 - iNTeNSiTY.raw.exo", "V.K", 0
PUTFILE "vgm_botb/BotB 5135 b00daw - kill chipsters on sight!.raw.exo", "V.L", 0
PUTFILE "vgm_botb/BotB 5181 Kulor - Nintendo Entertainment Samba.raw.exo", "V.M", 0
PUTFILE "vgm_botb/BotB 7637 happyfuntimes.raw.exo", "V.N", 0
PUTFILE "vgm_botb/BotB 8493 null1024 - pinky plinky thingy.raw.exo", "V.O", 0
PUTFILE "vgm_botb/BotB 9302 reg.raw.exo", "V.P", 0
PUTFILE "vgm_botb/BotB 10995 masks revenge.raw.exo", "V.Q", 0
PUTFILE "vgm_botb/BotB 10996 gost haus.raw.exo", "V.R", 0
PUTFILE "vgm_botb/BotB 11925 Interrobang Pie - Adrenaline Lift.raw.exo", "V.S", 0
PUTFILE "vgm_botb/BotB 12143 DimWiddy - The Long Goodbye.raw.exo", "V.T", 0
PUTFILE "vgm_botb/BotB 14648 chilled out princess.raw.exo", "V.U", 0
PUTFILE "vgm_botb/BotB 16712 stewboy - The Circus is in Town.raw.exo", "V.V", 0
PUTFILE "vgm_botb/BotB 16439 Chip Champion - frozen dancehall of the pharaoh.raw.exo", "V.W", 0
PUTFILE "vgm_botb/BotB 20609 Jredd - PSG Strut.raw.exo", "V.X", 0
PUTFILE "vgm_botb/my_mission.raw.exo", "V.Y", 0
PUTFILE "vgm_botb/my_new_used_car.raw.exo", "V.Z", 0
PUTFILE "vgm_botb/run_under_fire.raw.exo", "V.ZZ", 0

>>>>>>> origin/master



IF _DEBUG ; only needed for debug purposes
PUTFILE "data/screen3.mode7", "screen", &7C00
PUTFILE "data/font_5x5.mode7", "font", &7C00
PUTFILE "data/font_5x5_shifted.mode7", "font2", &7C00
PUTFILE "data/menu_overlay.mode7", "menu", &7C00
ENDIF
Binary file added temp/beebtrk.ssd
Binary file not shown.
5 changes: 5 additions & 0 deletions temp/data/Mode7 Font.url
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
IDList=
URL=http://edit.tf/#0:LuFjB4sYOFiR4sYPFiR4sSOFiRogaLHiRAgaNMCRogQdMDQu3Rte_NJl4MOvBL35sG6FBl5NW6Nrw6sMnBK3UsOvBg1QtS_RA0cLGDxYwcLGDxYwcLEix4kaIGjRA0aIGmTAkyYEizYkLtVLXLwSt0aDK5Yt1bDlzSIGqDLwSqnSB6pauFLBA1QeOLAu42MMDRAsWMFixhg2IHixI4WIFmxI4WMHCxgsWMEDRAgQIC-3il49W
5 changes: 5 additions & 0 deletions temp/data/Mode7 Layout.url
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
IDList=
URL=http://edit.tf/#0:NEUDD_vaf16X-vS_97Rf_X6n_3Q_-6H_3U1_6n6_U_-oGCA0TzNf-5j_WIP6xB_3MUH9Bq-99T3_qaoNT1jqepNT3ug7pDRJAh__kv_40__Gn_8lQf0Gpr_1Nf6r6_1Nf-r781Nf6BCgQIEFPfuzug0Lf0hIKGjD0QTMufLuyIN-ZB00ZUFDRh5b1y5BB69NG_k6DQtOzZ5QQt-Lnr8oEyDpoyoO-HTsy8uaDJlXLi_hYsWLF
Loading

0 comments on commit 6b395bb

Please sign in to comment.