diff --git a/SID.badge/!RunImage.spin b/SID.badge/!RunImage.spin index cd753de..2269f8c 100644 --- a/SID.badge/!RunImage.spin +++ b/SID.badge/!RunImage.spin @@ -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 @@ -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 @@ -284,4 +284,4 @@ s_init byte $A9, $00 ' lda #0 s_play byte $20, word $0000 ' jsr init/play byte ESC ' invalid -DAT \ No newline at end of file +DAT