diff options
author | Lunar Journal <md.node.0@gmail.com> | 2023-09-06 17:45:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 17:45:27 +0200 |
commit | 5aab219d1964f15bf998e69bae2a228aa073f684 (patch) | |
tree | 9719ddab8d552688c60179b85e87eef5bbf30200 | |
parent | fbb05e8465f60bd5c357b792630980323c2cb222 (diff) | |
download | emu8910-5aab219d1964f15bf998e69bae2a228aa073f684.tar.gz emu8910-5aab219d1964f15bf998e69bae2a228aa073f684.zip |
emu8910: parser: Update parser
General parser updates.
-rw-r--r-- | parser.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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);
|