Skip to content

Commit

Permalink
[kuroneko] implement auto-wrap for full list
Browse files Browse the repository at this point in the history
  • Loading branch information
konimaru committed Apr 21, 2016
1 parent 8d956ba commit 1f16902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SID.badge/!RunImage.spin
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ PRI SID_task : now | delta, cold ' audio background task
repeat
SID_load(song[sidx]|$8000) ' load song
cold := warm

now := cnt
repeat
SID_exec(@s_play) ' play song
Expand All @@ -224,7 +224,7 @@ PRI SID_task : now | delta, cold ' audio background task
waitcnt(now += (delta * word[$7D04]) >> 8) ' finish this cycle
sidcog.resetRegisters ' then silence

ifnot song[++sidx] ' next song available?
ifnot song[sidx := (sidx +1) & 31] ' next song available?
sidx := 0 ' wrap

PRI SID_load(name) : load | addr, size, pcnt ' stream loader
Expand Down Expand Up @@ -284,4 +284,4 @@ s_init byte $A9, $00 ' lda #0
s_play byte $20, word $0000 ' jsr init/play
byte ESC ' invalid

DAT
DAT

0 comments on commit 1f16902

Please sign in to comment.