From 1f169022c332245e218b3e55a48d9e23667faaa8 Mon Sep 17 00:00:00 2001 From: Marko Lukat Date: Thu, 21 Apr 2016 07:45:26 +0200 Subject: [PATCH] [kuroneko] implement auto-wrap for full list --- SID.badge/!RunImage.spin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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