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:
+179
-19
File diff suppressed because one or more lines are too long
@@ -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
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user