1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2026-04-19 08:27:40 +00:00

c64: updated music player, sid macros

This commit is contained in:
Steven Hugg
2023-11-03 14:54:27 -05:00
parent 2de919a225
commit 99f7ff41bb
3 changed files with 184 additions and 28 deletions
+179 -19
View File
File diff suppressed because one or more lines are too long
+4 -8
View File
@@ -18,12 +18,12 @@
SID.amp = (volume) | ((filters)<<4);
// stop voice
#define SID_STOP(voice) \
SID.voice.ctrl &= ~SID_GATE;
#define SID_STOP(voice, options) \
SID.voice.ctrl = options & ~SID_GATE;
// start voice
#define SID_START(voice) \
SID.voice.ctrl |= SID_GATE;
#define SID_START(voice, options) \
SID.voice.ctrl = options | SID_GATE;
// set ADSR envelope
#define SID_ADSR(voice,attack,decay,sustain,release) \
@@ -38,10 +38,6 @@
#define SID_PULSEWIDTH(voice,_pw) \
SID.voice.pw = (_pw);
// set wave shape and options
#define SID_WAVE(voice,options) \
SID.voice.ctrl = (SID.voice.ctrl & 1) | (options)
// play a quick square wave pulse
#define SID_PULSE_DECAY(voice, freq) \
SID_STOP(voice) \
+1 -1
View File
@@ -29,7 +29,7 @@ export class C64_WASMMachine extends BaseWASMMachine
loadBIOS(srcArray: Uint8Array) {
var patch1ofs = 0xea24 - 0xe000 + 0x3000;
/*if (srcArray[patch1ofs] == 0x02)*/ srcArray[patch1ofs] = 0x60; // cursor move, KIL -> RTS
if (srcArray[patch1ofs] == 0xc4) srcArray[patch1ofs] = 0x60; // cursor move, KIL -> RTS
super.loadBIOS(srcArray);
}
reset() {