mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-22 12:30:01 +00:00
c64: updated music player, sid macros
This commit is contained in:
parent
2de919a225
commit
99f7ff41bb
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) \
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user