summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLunar Journal <md.node.0@gmail.com>2023-09-06 17:45:27 +0200
committerGitHub <noreply@github.com>2023-09-06 17:45:27 +0200
commit5aab219d1964f15bf998e69bae2a228aa073f684 (patch)
tree9719ddab8d552688c60179b85e87eef5bbf30200
parentfbb05e8465f60bd5c357b792630980323c2cb222 (diff)
downloademu8910-5aab219d1964f15bf998e69bae2a228aa073f684.tar.gz
emu8910-5aab219d1964f15bf998e69bae2a228aa073f684.zip
emu8910: parser: Update parser
General parser updates.
-rw-r--r--parser.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/parser.js b/parser.js
index 304cb0f..88efd2d 100644
--- a/parser.js
+++ b/parser.js
@@ -1,13 +1,14 @@
var song;
var emu8910 = new PSG49(YM_CLOCK_ZX, 50);
+ var currentSong = 0;
var songs = [
- "18_soundliner.fym",
+ "200km_nik-o.fym",
"01_scalesmannmisfire.fym"
];
- var currentSong = 0;
+
loadAndPlay = function() {
emu8910.driver.device.resume()
@@ -51,6 +52,10 @@
emu8910.interrupt.routine = updateState;
emu8910.clock.frequency = song.getClockRate()
emu8910.interrupt.frequency = song.getFrameRate()
+ currentSong++
+ if(currentSong >= songs.length){
+ currentSong = 0;
+ }
}
document.addEventListener('click', loadAndPlay, false);