summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLunar Journal <md.node.0@gmail.com>2023-09-07 09:23:43 +0200
committerGitHub <noreply@github.com>2023-09-07 09:23:43 +0200
commitb6fa12a1bd8b4a69882ec970b50a89cad109a39d (patch)
tree08fcc1506c9979783e477ead978407ecf0e797a8
parent9d5e8750eb649ebc424bea2093b28f56564dc653 (diff)
downloademu8910-b6fa12a1bd8b4a69882ec970b50a89cad109a39d.tar.gz
emu8910-b6fa12a1bd8b4a69882ec970b50a89cad109a39d.zip
emu8910: readme: update readme
Update readme with additional info.
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9881ce1..ab0cea6 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,34 @@ FIR filter data generated using:
Compile with `tsc emu8910.ts`.
+To use simply create a PSG49 object as follows:
+```
+var emu8910 = new PSG49(YM_CLOCK_ZX, 50);
+```
+
+Which sets the default clock speed and interrupt frequency.
+
+To play a FYM module:
+```
+song = new FYMReader(<BUFFER>);
+emu8910.interrupt.routine = <ISR_FUNC>
+emu8910.clock.frequency = song.getClockRate()
+emu8910.interrupt.frequency = song.getFrameRate()
+```
+
+This sets the ISR function, clock and interrupt frequency for a specific song.
+
+To stop playback:
+```
+emu8910.driver.device.suspend()
+emu8910.interrupt.frequency = 0
+```
+To resume:
+```
+emu8910.driver.device.resume()
+emu8910.interrupt.frequency = song.getFrameRate()
+```
+
Files:
* src/emu8910.ts - Core emulator implementation