Skip to content

Commit

Permalink
Fixed exomiser unpacker to start at exact address instead of 1 byte b…
Browse files Browse the repository at this point in the history
…efore
  • Loading branch information
simondotm committed Jul 6, 2016
1 parent ad54d57 commit d176445
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions beebtrk.6502
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ INCLUDE "lib/beebtracker.s.6502"
\\ Initialize compressed data stream
\\ the title screen is an included binary at the VGM_stream_data memory address
\\ (later overwritten by loaded VGMs)
LDX #LO(VGM_stream_data-1)
LDY #HI(VGM_stream_data-1)
LDX #LO(VGM_stream_data)
LDY #HI(VGM_stream_data)
JSR exo_init_decruncher

\\ unpack to screen
Expand Down
Binary file modified beebtrk.ssd
Binary file not shown.
4 changes: 2 additions & 2 deletions lib/beebtracker.s.6502
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@

\\ Initialise music player - pass in VGM_stream_data address
\\ parses header from stream
LDX #LO(VGM_stream_data - 1)
LDY #HI(VGM_stream_data - 1)
LDX #LO(VGM_stream_data)
LDY #HI(VGM_stream_data)
JSR vgm_init_stream

\\ Copy meta data to screen
Expand Down
15 changes: 9 additions & 6 deletions lib/exomiser.s.6502
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,26 @@
; flag will just mess things up.
.exo_get_crunched_byte
{
INC _byte_lo
bne _byte_skip_hi
INC _byte_hi ; forward decrunch
._byte_skip_hi:

._byte
lda &ffff ; EXO data stream address ; **SELF-MODIFIED CODE**
_byte_lo = _byte + 1
_byte_hi = _byte + 2

\\ advance input stream memory address
INC _byte_lo
bne _byte_skip_hi
INC _byte_hi ; forward decrunch
._byte_skip_hi:

rts ; decrunch_file is called.
}

; -------------------------------------------------------------------


EXO_crunch_byte_lo = exo_get_crunched_byte + 9
EXO_crunch_byte_hi = exo_get_crunched_byte + 10
EXO_crunch_byte_lo = exo_get_crunched_byte + 1
EXO_crunch_byte_hi = exo_get_crunched_byte + 2



Expand Down

0 comments on commit d176445

Please sign in to comment.