Skip to content

Commit

Permalink
Menu data now relocated to free up main ram and loaded at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
simondotm committed Jun 29, 2016
1 parent 57240ab commit 2631177
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 17 deletions.
44 changes: 27 additions & 17 deletions beebtrk.6502
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,31 @@ INCLUDE "lib/beebtracker.s.6502"
.data_start


.menu_data_filename EQUS "BeebDat", 13



\ ******************************************************************
\ * 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!



ORG &0808
GUARD &0CFF

.menu_data_start

Expand Down Expand Up @@ -216,23 +241,6 @@ EQUS "Loading... ", 0

.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!



\ ******************************************************************
Expand Down Expand Up @@ -273,7 +281,9 @@ PRINT "------------------------------------------------------------"
\ * Save the code
\ ******************************************************************


SAVE "BeebTrk", 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?
Expand Down
Binary file modified beebtrk.ssd
Binary file not shown.
28 changes: 28 additions & 0 deletions lib/beebtracker.s.6502
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
\\ Debounce
LDA #&FF
STA menu_key_held

\\ Install the menu data
JSR load_menu_data

\\ Load first file in our list
LDA #0
Expand Down Expand Up @@ -598,6 +601,31 @@
\ ******************************************************************
\ * File loading routines
\ ******************************************************************
.load_menu_data
{
\\ Set osfile param block
LDA #LO(menu_data_filename)
STA osfile_params + 0
LDA #HI(menu_data_filename)
ADC #0
STA osfile_params + 1

LDA #LO(menu_data_start)
STA osfile_params + 2
LDA #HI(menu_data_start)
STA osfile_params + 3

LDA #0
STA osfile_params + 6

\\ Issue osfile call
LDX #LO(osfile_params)
LDY #HI(osfile_params)
LDA #&FF
JSR osfile
RTS
}


.load_file_from_table ; flle_no = index into our table
{
Expand Down

0 comments on commit 2631177

Please sign in to comment.