From 429904fe4dfa541c92f2403ef8aab1c8a626f769 Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Fri, 27 Sep 2024 16:22:44 +0100 Subject: [PATCH] voice disassembly continues --- plugin/ic29.cpp | 1812 ++++++++++------------------------------------- 1 file changed, 391 insertions(+), 1421 deletions(-) diff --git a/plugin/ic29.cpp b/plugin/ic29.cpp index ab96229..d8017cd 100644 --- a/plugin/ic29.cpp +++ b/plugin/ic29.cpp @@ -1,37 +1,44 @@ ///Disassembly of voice.bin, 8192 bytes [0x0 to 0x1fff] // 0000: 54 80 02 JMP $0280 -// 0003: 00 NOP +// 0003: 00 NOP + +// NMI ISR // 0004: aa EI // 0005: 62 RETI // 0006: 00 NOP // 0007: 00 NOP -// 0008: aa EI -// 0009: 62 RETI -// 000a: fe JR $0009 -// 000b: fd JR $0009 -// 000c: fb JR $0008 -// 000d: f7 JR $0005 -// 000e: ef JR $FFFE -// 000f: df JR $002F +// +// bitmask lookup table +// 0008: fe fd fb f7 ef df + +// External INT1/2 ISR // 0010: aa EI -// 0011: 62 RETI -// 0012: 01 02 LDAW $FF02 -// 0014: 04 08 10 LXI SP,$1008 -// 0017: 20 aa INRW $FFAA +// 0011: 62 RETI + +// bitmask lookup table +// 0012: 01 02 04 08 10 20 + + +// Timer/Counter INTE0/1 ISR +// 0018: aa EI // 0019: 62 RETI // 001a: 00 NOP // 001b: 00 NOP // 001c: 00 NOP // 001d: 00 NOP // 001e: 00 NOP -// 001f: 00 NOP +// 001f: 00 NOP + +// Timer/Counter/ADC ISR // 0020: 4e 4e JRE $0070 // 0022: 00 NOP // 0023: 00 NOP // 0024: 00 NOP // 0025: 00 NOP // 0026: 00 NOP -// 0027: 00 NOP +// 0027: 00 NOP + +// Serial ISR // 0028: 4e 64 JRE $008E // 002a: 00 NOP // 002b: 00 NOP @@ -86,7 +93,9 @@ // 005c: 00 NOP // 005d: 00 NOP // 005e: 00 NOP -// 005f: 00 NOP +// 005f: 00 NOP + +// SWI ISR // 0060: aa EI // 0061: 62 RETI // 0062: 00 NOP @@ -102,7 +111,9 @@ // 006c: 00 NOP // 006d: 00 NOP // 006e: 00 NOP -// 006f: 00 NOP +// 006f: 00 NOP + +// AD Converter ISR // 0070: 10 EXA // 0071: 11 EXX // 0072: 4c c8 MOV A,ANM @@ -121,196 +132,217 @@ // 008a: 10 EXA // 008b: 11 EXX // 008c: aa EI -// 008d: 62 RETI +// 008d: 62 RETI + +// serial interrupt handler // 008e: 10 EXA // 008f: 11 EXX -// 0090: 4c d9 MOV A,RXB -// 0092: 47 80 ONI A,$80 -// 0094: 4e 2e JRE $00C4 -// 0096: 63 36 STAW $FF36_cmdByte -// 0098: 37 88 LTI A,$88 -// 009a: 4e 6d JRE $0109 -// 009c: 37 86 LTI A,$86 -// 009e: d8 JR $00B7 -// 009f: 66 76 SUI A,$76 -// 00a1: 1f MOV L,A -// 00a2: 6e 00 MVI H,$00 -// 00a4: 2b LDAX (HL) -// 00a5: 74 88 10 ANAW $FF10_noteHeld -// 00a8: 63 10 STAW $FF10_noteHeld -// 00aa: 55 1e 01 OFFIW $FF1E_flags1,$01 +// 0090: 4c d9 MOV A,RXB // fetch the received byte +// 0092: 47 80 ONI A,$80 // is it a command byte +// 0094: 4e 2e JRE $00C4 // yes +// 0096: 63 36 STAW $FF36_cmdByte // store it as the current command byte +// 0098: 37 88 LTI A,$88 // less than $88 (voice off, sustain on/off message) +// 009a: 4e 6d JRE $0109_retSerialIsr // no +// 009c: 37 86 LTI A,$86 // less than $86 (voice off) +// 009e: d8 JR $00B7 // no +// 009f: 66 76 SUI A,$76 // get voice number +// 00a1: 1f MOV L,A +// 00a2: 6e 00 MVI H,$00 // hl now points to the inverted mask table +// 00a4: 2b LDAX (HL) // fetch mask in A +// 00a5: 74 88 10 ANAW $FF10_noteHeld // AND it with the note flags +// 00a8: 63 10 STAW $FF10_noteHeld // save it back +// 00aa: 55 1e 01 OFFIW $FF1E_flags1,$01 // sustain? // 00ad: 4e 9a JRE $0149 -// 00af: 2b LDAX (HL) -// 00b0: 74 88 33 ANAW $FF33 -// 00b3: 63 33 STAW $FF33 +// 00af: 2b LDAX (HL) // do the same to these flags +// 00b0: 74 88 33 ANAW $FF33_rlsPhase +// 00b3: 63 33 STAW $FF33_rlsPhase // 00b5: 4e 92 JRE $0149 -// 00b7: 77 86 EQI A,$86 -// 00b9: c5 JR $00BF -// 00ba: 15 1e 01 ORIW $FF1E_flags1,$01 -// 00bd: 4e 4a JRE $0109 -// 00bf: 05 1e fe ANIW $FF1E_flags1,$FE -// 00c2: 4e 45 JRE $0109 + +// handle a sustain message +// 00b7: 77 86 EQI A,$86 // sustain on +// 00b9: c5 JR $00BF // no, do sustain off +// 00ba: 15 1e 01 ORIW $FF1E_flags1,$01 // yes, set flag +// 00bd: 4e 4a JRE $0109_retSerialIsr +// 00bf: 05 1e fe ANIW $FF1E_flags1,$FE // mask off sustain bit +// 00c2: 4e 45 JRE $0109_retSerialIsr + +// handle a value byte // 00c4: 1c MOV D,A -// 00c5: 01 36 LDAW $FF36_cmdByte -// 00c7: 27 87 GTI A,$87 -// 00c9: 4e 3e JRE $0109 -// 00cb: 37 a4 LTI A,$A4 -// 00cd: 4e 3a JRE $0109 -// 00cf: 27 8d GTI A,$8D -// 00d1: 4e 3a JRE $010D -// 00d3: 66 8e SUI A,$8E -// 00d5: 48 25 SLL A +// 00c5: 01 36 LDAW $FF36_cmdByte // fetch command byte +// 00c7: 27 87 GTI A,$87 // voice off and sustain messages don't take a parameter so return +// 00c9: 4e 3e JRE $0109_retSerialIsr +// 00cb: 37 a4 LTI A,$A4 // no commands above $A4 so return +// 00cd: 4e 3a JRE $0109_retSerialIsr +// 00cf: 27 8d GTI A,$8D // $88-$8d are voice on, greater? +// 00d1: 4e 3a JRE $010d_voiceOn // no, handle voice on +// 00d3: 66 8e SUI A,$8E // yes, get the control value +// 00d5: 48 25 SLL A // double it +// okay the next two instructions are fun +// TABLE will return the value at PC + A + 1 in BC +// JB will then jump to BC // 00d7: 48 a8 TABLE -// 00d9: 21 JB -// 00da: 4f 01 JRE $FFDD -// 00dc: 84 CALT ($0088) -// 00dd: 01 98 LDAW $FF98 -// 00df: 01 00 LDAW $FF00_resetVoiceBits -// 00e1: 02 INX SP -// 00e2: 3a STAX (DE) -// 00e3: 02 INX SP -// 00e4: ab 01 LDAX (DE+$01) -// 00e6: c8 JR $00EF -// 00e7: 01 cc LDAW $FFCC -// 00e9: 01 d0 LDAW $FFD0 -// 00eb: 01 af LDAW $FFAF -// 00ed: 01 b3 LDAW $FFB3 -// 00ef: 01 b7 LDAW $FFB7 -// 00f1: 01 d4 LDAW $FFD4 -// 00f3: 01 e2 LDAW $FFE2 -// 00f5: 01 ed LDAW $FFED -// 00f7: 01 c4 LDAW $FFC4 -// 00f9: 01 e9 LDAW $FFE9 -// 00fb: 01 c0 LDAW $FFC0 -// 00fd: 01 23 LDAW $FF23 -// 00ff: 02 INX SP -// 0100: 27 02 GTI A,$02 -// 0102: a7 DMOV EA,HL -// 0103: 01 46 LDAW $FF46_ic40Latch -// 0105: 02 INX SP +// 00d9: 21 JB +// +// this table then holds the addresses of the routines to handle incoming parameter values +// these are in the same order they appear in sysex, which makes life easier +// 00da: 014f 0184 0198 +// 00e0: 0200 023a 01ab 01c8 01cc 01d0 01af 01b3 +// 00f0: 01b7 01d4 01e2 01ed 01c4 01e9 01c0 0223 +// 0100 0227 01a7 0246 +// +// return from interrupt after handling value +// this increments the command byte implementing a kind of "running status" +// so we can just blast patch values at the voice CPU and have it update them all +// or send an individual single value // 0106: 20 36 INRW $FF36_cmdByte -// 0108: 00 NOP +// 0108: 00 NOP // INRW might skip // 0109: 10 EXA // 010a: 11 EXX // 010b: aa EI // 010c: 62 RETI -// 010d: 1a MOV B,A -// 010e: 66 76 SUI A,$76 + +// voice on commands +// command in A, note value in D +// 010d: 1a MOV B,A // save command +// 010e: 66 76 SUI A,$76 // form offset to bitmask table // 0110: 1f MOV L,A -// 0111: 6e 00 MVI H,$00 -// 0113: 2b LDAX (HL) -// 0114: 1d MOV E,A -// 0115: 74 98 10 ORAW $FF10_noteHeld -// 0118: 63 10 STAW $FF10_noteHeld -// 011a: 0d MOV A,E -// 011b: 74 98 07 ORAW $FF07_atkPhase -// 011e: 63 07 STAW $FF07_atkPhase -// 0120: 0a MOV A,B -// 0121: 66 88 SUI A,$88 -// 0123: 1a MOV B,A -// 0124: 34 09 ff LXI HL,$FF09_voice1Note -// 0127: ad LDAX (HL+B) -// 0128: 60 ec NEA A,D -// 012a: d9 JR $0144 -// 012b: 0c MOV A,D -// 012c: bd STAX (HL+B) -// 012d: 0d MOV A,E -// 012e: 74 c8 11 ONAW $FF11 -// 0131: cc JR $013E -// 0132: 74 c8 33 ONAW $FF33 -// 0135: d3 JR $0149 -// 0136: 16 ff XRI A,$FF -// 0138: 74 88 33 ANAW $FF33 -// 013b: 63 33 STAW $FF33 -// 013d: cb JR $0149 +// 0111: 6e 00 MVI H,$00 +// 0113: 2b LDAX (HL) // bit for voice +// 0114: 1d MOV E,A // save +// 0115: 74 98 10 ORAW $FF10_noteHeld // OR it into voice on table +// 0118: 63 10 STAW $FF10_noteHeld +// 011a: 0d MOV A,E // fetch the bit again +// 011b: 74 98 07 ORAW $FF07_atkPhase // enable attack phase +// 011e: 63 07 STAW $FF07_atkPhase +// 0120: 0a MOV A,B // get the command back +// 0121: 66 88 SUI A,$88 // work out the voice number +// 0123: 1a MOV B,A // to get the existing note value +// 0124: 34 09 ff LXI HL,$FF09_voice1Note +// 0127: ad LDAX (HL+B) // read the note value +// 0128: 60 ec NEA A,D // is it the same note number +// 012a: d9 JR $0144 // yes +// 012b: 0c MOV A,D // no +// 012c: bd STAX (HL+B) // store it in the voice note table +// 012d: 0d MOV A,E // fetch the bit again +// 012e: 74 c8 11 ONAW $FF11 // is the bit on in these flags +// 0131: cc JR $013E // no +// 0132: 74 c8 33 ONAW $FF33_rlsPhase // yes, is the voice in release +// 0135: d3 JR $0149 // no +// 0136: 16 ff XRI A,$FF // invert the bit +// 0138: 74 88 33 ANAW $FF33_rlsPhase // mask off release flag +// 013b: 63 33 STAW $FF33_rlsPhase +// 013d: cb JR $0149 // 013e: 74 98 00 ORAW $FF00_resetVoiceBits // 0141: 63 00 STAW $FF00_resetVoiceBits // 0143: c5 JR $0149 -// 0144: 0d MOV A,E -// 0145: 74 d8 11 OFFAW $FF11 -// 0148: e9 JR $0132 -// 0149: 04 ff ff LXI SP,$FFFF -// 014c: 54 eb 02 JMP $02EB -// 014f: 0c MOV A,D -// 0150: 63 7f STAW $FF7F_switch1 -// 0152: 07 10 ANI A,$10 +// same note +// 0144: 0d MOV A,E // get voice bit back +// 0145: 74 d8 11 OFFAW $FF11 // off in this flag +// 0148: e9 JR $0132 // no, jump back and check for release +// clobber stack return +// 0149: 04 ff ff LXI SP,$FFFF // clobber the stack +// 014c: 54 eb 02 JMP $02EB // jump ahead + +// handle voice parameters +// +// switch 1 values +// 014f: 0c MOV A,D // save value +// 0150: 63 7f STAW $FF7F_switch1 // save raw value in RAM +// 0152: 07 10 ANI A,$10 // saw off/on // 0154: 1a MOV B,A -// 0155: 01 46 LDAW $FF46_ic40Latch -// 0157: 07 0c ANI A,$0C -// 0159: 60 9a ORA A,B -// 015b: 5d 7f BIT 5,$FF7F_switch1 -// 015d: 17 01 ORI A,$01 -// 015f: 74 5c 40 OFFI D,$40 -// 0162: 17 02 ORI A,$02 -// 0164: 63 46 STAW $FF46_ic40Latch -// 0166: 15 1e 40 ORIW $FF1E_flags1,$40 // sqr off/on -// 0169: 74 5c 08 OFFI D,$08 -// 016c: 05 1e bf ANIW $FF1E_flags1,$BF -// 016f: 74 5c 04 OFFI D,$04 +// 0155: 01 46 LDAW $FF46_ic40Latch // fetch stored value for latch +// 0157: 07 0c ANI A,$0C // mask off HPF bits +// 0159: 60 9a ORA A,B // OR in saw on/off +// 015b: 5d 7f BIT 5,$FF7F_switch1 // chorus on/off +// 015d: 17 01 ORI A,$01 // bit 0 turns on chorus +// 015f: 74 5c 40 OFFI D,$40 // chorus fast/slow +// 0162: 17 02 ORI A,$02 // OR it in +// 0164: 63 46 STAW $FF46_ic40Latch // store this to be latched into IC40 +// 0166: 15 1e 40 ORIW $FF1E_flags1,$40 // sqr on +// 0169: 74 5c 08 OFFI D,$08 // is it off in the command +// 016c: 05 1e bf ANIW $FF1E_flags1,$BF // turn sqr off +// 016f: 74 5c 04 OFFI D,$04 // convert lower three bits to divider value // 0172: c4 JR $0177 -// 0173: 64 05 c0 MVI PF,$C0 +// 0173: 64 05 c0 MVI PF,$C0 // upper two bits of PF set ratio // 0176: cb JR $0182 // 0177: 74 5c 02 OFFI D,$02 // 017a: c4 JR $017F // 017b: 64 05 40 MVI PF,$40 // 017e: c3 JR $0182 // 017f: 64 05 00 MVI PF,$00 -// 0182: 4f 82 JRE $0106 +// 0182: 4f 82 JRE $0106_retSerialValue + +// switch 2 values +// only the HPF bits need special consideration // 0184: 0c MOV A,D -// 0185: 63 37 STAW $FF37_switch2_switch2 -// 0187: 16 18 XRI A,$18 -// 0189: 07 18 ANI A,$18 -// 018b: 48 21 SLR A -// 018d: 1a MOV B,A -// 018e: 01 46 LDAW $FF46_ic40Latch -// 0190: 07 f3 ANI A,$F3 -// 0192: 60 9a ORA A,B -// 0194: 63 46 STAW $FF46_ic40Latch -// 0196: 4f 6e JRE $0106 +// 0185: 63 37 STAW $FF37_switch2 // save value +// 0187: 16 18 XRI A,$18 // invert the HPF bits +// 0189: 07 18 ANI A,$18 // get only the HPF bits +// 018b: 48 21 SLR A // shift right ($18 >> 1 = $0c) +// 018d: 1a MOV B,A +// 018e: 01 46 LDAW $FF46_ic40Latch // fetch stored value for latch +// 0190: 07 f3 ANI A,$F3 // mask out HPF bits +// 0192: 60 9a ORA A,B // OR them in +// 0194: 63 46 STAW $FF46_ic40Latch // save it back +// 0196: 4f 6e JRE $0106_retSerialValue + +// LFO rate // 0198: 0c MOV A,D -// 0199: 48 25 SLL A +// 0199: 48 25 SLL A // 2-byte values // 019b: 34 60 0c LXI HL,$0C60_lfoSpeedTbl -// 019e: 24 4b ff LXI DE,$FF4B_lfoRate -// 01a1: 48 8c LDEAX (HL+A) -// 01a3: 48 92 STEAX (DE) -// 01a5: 4f 5f JRE $0106 -// 01a7: 34 63 ff LXI HL,$FF63 -// 01aa: cf JR $01BA +// 019e: 24 4b ff LXI DE,$FF4B_lfoRateCoeff +// 01a1: 48 8c LDEAX (HL+A) // look up LFO coefficient +// 01a3: 48 92 STEAX (DE) // save +// 01a5: 4f 5f JRE $0106_retSerialValue + +// these values are simply doubled to go from 0-127 to 0-254 +// and then saved as single bytes +// 01a7: 34 63 ff LXI HL,$FF63 // unsure what this is +// 01aa: cf JR $01BA_storeDoubled // store // 01ab: 34 47 ff LXI HL,$FF47_pwmDepth -// 01ae: cb JR $01BA +// 01ae: cb JR $01BA_storeDoubled // store // 01af: 34 41 ff LXI HL,$FF41 -// 01b2: c7 JR $01BA +// 01b2: c7 JR $01BA_storeDoubled // 01b3: 34 48 ff LXI HL,$FF48_lfoToVcf -// 01b6: c3 JR $01BA -// 01b7: 34 42 ff LXI HL,$FF42 -// 01ba: 0c MOV A,D +// 01b6: c3 JR $01BA_storeDoubled +// 01b7: 34 42 ff LXI HL,$FF42_vcfKeyTrack + +// 01BA_storeDoubled: 0c MOV A,D // 01bb: 48 25 SLL A // 01bd: 3b STAX (HL) -// 01be: 4f 46 JRE $0106 -// 01c0: 34 3b ff LXI HL,$FF3B -// 01c3: d3 JR $01D7 -// 01c4: 34 23 ff LXI HL,$FF23 -// 01c7: cf JR $01D7 -// 01c8: 34 39 ff LXI HL,$FF39 -// 01cb: cb JR $01D7 -// 01cc: 34 3d ff LXI HL,$FF3D -// 01cf: c7 JR $01D7 +// 01be: 4f 46 JRE $0106_retSerialValue + +// these values are converted to a 16-bit value +// they change from 0-127 to 0-$3f80 +// 01c0: 34 3b ff LXI HL,$FF3B_subOscLev +// 01c3: d3 JR $01D7_store16Bit +// 01c4: 34 23 ff LXI HL,$FF23_envSustainLev +// 01c7: cf JR $01D7_store16Bit +// 01c8: 34 39 ff LXI HL,$FF39_noiseLevel +// 01cb: cb JR $01D7_store16Bit +// 01cc: 34 3d ff LXI HL,$FF3D_vcfCutoff +// 01cf: c7 JR $01D7_store16Bit // 01d0: 34 3f ff LXI HL,$FF3F_vcfReso -// 01d3: c3 JR $01D7 +// 01d3: c3 JR $01D7_store16Bit // 01d4: 34 43 ff LXI HL,$FF43_vcaMaster_vcaMaster -// 01d7: 44 00 00 LXI EA,$0000 +// 01D7_store16Bit: 44 00 00 LXI EA,$0000 // 01da: 0c MOV A,D // 01db: 18 MOV EAH,A // 01dc: 48 a0 DSLR EA // 01de: 48 93 STEAX (HL) -// 01e0: 4f 24 JRE $0106 -// 01e2: 34 45 ff LXI HL,$FF45 +// 01e0: 4f 24 JRE $0106_retSerialValue + +// attack is just saved as an 8-bit value +// it is looked up later +// 01e2: 34 45 ff LXI HL,$FF45_envAtkVal // 01e5: 0c MOV A,D // 01e6: 3b STAX (HL) -// 01e7: 4f 1d JRE $0106 -// 01e9: 34 25 ff LXI HL,$FF25 +// 01e7: 4f 1d JRE $0106_retSerialValue + +// release and decay are looked up in a table +// 01e9: 34 25 ff LXI HL,$FF25_envRlsCoeff // 01ec: c3 JR $01F0 -// 01ed: 34 21 ff LXI HL,$FF21 +// 01ed: 34 21 ff LXI HL,$FF21_envDcyCoeff // 01f0: 0c MOV A,D // 01f1: 48 25 SLL A // 01f3: 44 60 0d LXI EA,$0D60_envDecRelTbl @@ -318,7 +350,9 @@ // 01f8: b6 DMOV DE,EA // 01f9: 48 82 LDEAX (DE) // 01fb: 48 93 STEAX (HL) -// 01fd: 54 06 01 JMP $0106 +// 01fd: 54 06 01 JMP $0106_retSerialValue + +// LFO Delay requires a bit of special attention // 0200: 0c MOV A,D // 0201: 48 21 SLR A // 0203: 48 21 SLR A @@ -326,40 +360,48 @@ // 0207: 07 0e ANI A,$0E // 0209: 34 30 0b LXI HL,$0B30_lfoDelayTbl1 // 020c: 48 8c LDEAX (HL+A) -// 020e: 34 6c ff LXI HL,$FF6C +// 020e: 34 6c ff LXI HL,$FF6C_lfoHoldoffCoeff // 0211: 48 93 STEAX (HL) // 0213: 0c MOV A,D // 0214: 48 25 SLL A // 0216: 34 60 0b LXI HL,$0B60_envAtkTbl // 0219: 48 8c LDEAX (HL+A) -// 021b: 24 58 ff LXI DE,$FF58_lfoDelayAmt +// 021b: 24 58 ff LXI DE,$FF58_lfoDelayCoeff // 021e: 48 92 STEAX (DE) -// 0220: 54 06 01 JMP $0106 -// 0223: 05 1e ef ANIW $FF1E_flags1,$EF // bend positive +// 0220: 54 06 01 JMP $0106_retSerialValue + +// negative bend value +// 0223: 05 1e ef ANIW $FF1E_flags1,$EF // bend negative // 0226: c3 JR $022A +// positive bend value // 0227: 15 1e 10 ORIW $FF1E_flags1,$10 // bend positive // 022a: 0c MOV A,D -// 022b: 67 00 NEI A,$00 -// 022d: c4 JR $0232 -// 022e: 48 2b STC -// 0230: 48 35 RLL A +// 022b: 67 00 NEI A,$00 // bend is zero? +// 022d: c4 JR $0232 // yes +// 022e: 48 2b STC +// 0230: 48 35 RLL A // double it and add 1 // 0232: 63 62 STAW $FF62_midiBendAmt // 0234: 71 05 01 MVIW $FF05_bendPolarity,$01 -// 0237: 54 06 01 JMP $0106 +// 0237: 54 06 01 JMP $0106_retSerialValue + +// DCO LFO depth is looked up in a table of 8-bit values // 023a: 0c MOV A,D // 023b: 34 80 0a LXI HL,$0A80_lfoDepthTbl // 023e: 24 49 ff LXI DE,$FF49_lfoToPitchScaler // 0241: ac LDAX (HL+A) // 0242: 3a STAX (DE) -// 0243: 54 06 01 JMP $0106 +// 0243: 54 06 01 JMP $0106_retSerialValue + +// Set DAC to Zero command for test mode // 0246: 5e 37 BIT 6,$FF37_switch2 -// 0248: 54 09 01 JMP $0109 +// 0248: 54 09 01 JMP $0109_retSerialIsr // test mode not armed // 024b: 0c MOV A,D -// 024c: 63 01 STAW $FF01 +// 024c: 63 01 STAW $FF01 // set test mode flag // 024e: 10 EXA // 024f: 11 EXX // 0250: aa EI // 0251: 54 b8 07 JMP $07B8 + // 0254: 00 NOP // 0255: 00 NOP // 0256: 00 NOP @@ -404,6 +446,8 @@ // 027d: 00 NOP // 027e: 00 NOP // 027f: 00 NOP + +// cold start // 0280: 69 0e MVI A,$0E // 0282: 4d d0 MOV MM,A // 0284: 68 ff MVI V,$FF @@ -416,10 +460,10 @@ // 0292: 4d d4 MOV MC,A // 0294: 4d d7 MOV MF,A // 0296: 4d c8 MOV ANM,A -// 0298: 34 00 ff LXI HL,$FF00_resetVoiceBits +// 0298: 34 00 ff LXI HL,$FF00 // bottom of RAM // 029b: 3d STAX (HL+) // 029c: 74 7f 00 EQI L,$00 -// 029f: fb JR $029B +// 029f: fb JR $029B // loop around until RAM is cleared // 02a0: 69 02 MVI A,$02 // 02a2: 4d d1 MOV MCC,A // 02a4: 69 4e MVI A,$4E @@ -427,33 +471,35 @@ // 02a8: 69 0a MVI A,$0A // 02aa: 4d c9 MOV SMH,A // 02ac: 34 09 ff LXI HL,$FF09_voice1Note -// 02af: 6b 05 MVI C,$05 -// 02b1: 69 3c MVI A,$3C -// 02b3: 3d STAX (HL+) +// 02af: 6b 05 MVI C,$05 // six voices +// 02b1: 69 3c MVI A,$3C // Middle C +// 02b3: 3d STAX (HL+) // initialise Note setting // 02b4: 53 DCR C -// 02b5: fd JR $02B3 -// 02b6: 64 05 40 MVI PF,$40 +// 02b5: fd JR $02B3 // loop around +// 02b6: 64 05 40 MVI PF,$40 // 8' divider // 02b9: 71 1e 40 MVIW $FF1E_flags1,$40 // sqr off/on // 02bc: 71 46 15 MVIW $FF46_ic40Latch,$15 // 02bf: 71 37 06 MVIW $FF37_switch2,$06 -// 02c2: 14 80 3f LXI BC,$3F80 -// 02c5: 70 1e 23 ff SBCD $FF23 -// 02c9: 70 1e 3d ff SBCD $FF3D -// 02cd: 14 00 20 LXI BC,$2000 +// 02c2: 14 80 3f LXI BC,$3F80 // env, cutoff to maximum +// 02c5: 70 1e 23 ff SBCD $FF23_envSustainLev +// 02c9: 70 1e 3d ff SBCD $FF3D_vcfCutoff +// 02cd: 14 00 20 LXI BC,$2000 // VCA about half way up // 02d0: 70 1e 43 ff SBCD $FF43_vcaMaster -// 02d4: 14 00 02 LXI BC,$0200 -// 02d7: 70 1e 4b ff SBCD $FF4B_lfoRate -// 02db: 34 00 23 LXI HL,$2300 +// 02d4: 14 00 02 LXI BC,$0200 // LFO rate slow +// 02d7: 70 1e 4b ff SBCD $FF4B_lfoRateCoeff +// 02db: 34 00 23 LXI HL,$2300 // program dividers // 02de: 78 25 CALF $0825_setModeWord // 02e0: 34 00 13 LXI HL,$1300 // 02e3: 78 25 CALF $0825_setModeWord // 02e5: 48 48 SKIT FAD // 02e7: 00 NOP // 02e8: 64 06 04 MVI MKH,$04 -// 02eb: aa EI +// 02eb: aa EI + +// here's the main loop // 02ec: 01 46 LDAW $FF46_ic40Latch -// 02ee: 70 79 00 30 MOV ($3000),A -// 02f2: 58 1e BIT 0,$FF1E_flags1 +// 02ee: 70 79 00 30 MOV ($3000),A // set chorus and HPF outputs +// 02f2: 58 1e BIT 0,$FF1E_flags1 // sustained? // 02f4: c8 JR $02FD // 02f5: 01 11 LDAW $FF11 // 02f7: 74 98 10 ORAW $FF10_noteHeld @@ -466,12 +512,12 @@ // 0306: 69 06 MVI A,$06 // 0308: 78 2f CALF $082F_setDacOut // 030a: 64 08 bf ANI PA,$BF -// 030d: 45 11 3f ONIW $FF11,$3F -// 0310: 4e 59 JRE $036B -// 0312: 5b 1e BIT 3,$FF1E_flags1 +// 030d: 45 11 3f ONIW $FF11,$3F // are any voices started +// 0310: 4e 59 JRE $036B // no +// 0312: 5b 1e BIT 3,$FF1E_flags1 // yes but we've already started the LFO delay // 0314: ce JR $0323 -// 0315: 14 00 00 LXI BC,$0000 -// 0318: 70 1e 56 ff SBCD $FF56_lfoHoldOff +// 0315: 14 00 00 LXI BC,$0000 // no +// 0318: 70 1e 56 ff SBCD $FF56_lfoHoldOff // zero out the holdoff time and envelope // 031c: 70 1e 5a ff SBCD $FF5A_lfoDelayEnv // 0320: 05 1e f1 ANIW $FF1E_flags1,$F1 // clear LFO delay bits // 0323: 59 1e BIT 1,$FF1E_flags1 // LFO holdoff time @@ -517,7 +563,7 @@ // 036e: 4f b3 JRE $0323 // 0370: 24 56 ff LXI DE,$FF56_lfoHoldOff // 0373: 48 82 LDEAX (DE) -// 0375: 70 1f 58 ff LBCD $FF58_lfoDelayAmt +// 0375: 70 1f 58 ff LBCD $FF58_lfoDelayCoeff // 0379: 74 c5 DADD EA,BC // 037b: 48 92 STEAX (DE) // 037d: 08 MOV A,EAH @@ -528,7 +574,7 @@ // 0385: 15 1e 02 ORIW $FF1E_flags1,$02 // 0388: 34 5a ff LXI HL,$FF5A_lfoDelayEnv // 038b: 48 83 LDEAX (HL) -// 038d: 70 1f 6c ff LBCD $FF6C +// 038d: 70 1f 6c ff LBCD $FF6C_lfoHoldoffCoeff // 0391: 74 a5 DADDNC EA,BC // 0393: c6 JR $039A // 0394: 48 93 STEAX (HL) @@ -593,7 +639,7 @@ // 0405: a5 DMOV EA,BC // 0406: e5 JR $03EC // 0407: 69 06 MVI A,$06 -// 0409: 34 3b ff LXI HL,$FF3B +// 0409: 34 3b ff LXI HL,$FF3B_subOscLev // 040c: 48 83 LDEAX (HL) // 040e: 78 2f CALF $082F_setDacOut // 0410: 64 08 ef ANI PA,$EF @@ -702,7 +748,7 @@ // 04d0: 71 6a 00 MVIW $FF6A_vcfUnderflow1,$00 // 04d3: 4e 21 JRE $04F6 // 04d5: 71 6a 00 MVIW $FF6A_vcfUnderflow1,$00 -// 04d8: 70 1f 3d ff LBCD $FF3D +// 04d8: 70 1f 3d ff LBCD $FF3D_vcfCutoff // 04dc: a5 DMOV EA,BC // 04dd: 70 1f 53 ff LBCD $FF53 // 04e1: 59 4a BIT 1,$FF4A_lfoPol // polarity @@ -718,29 +764,29 @@ // 04f7: 71 0f 00 MVIW $FF0F_voicePtr,$00 // 04fa: 71 34 01 MVIW $FF34,$01 // 04fd: 34 71 ff LXI HL,$FF71_notePitchFrac -// 0500: 24 25 ff LXI DE,$FF25 +// 0500: 24 25 ff LXI DE,$FF25_envRlsCoeff // 0503: b3 PUSH HL // 0504: 48 8b 02 LDEAX (DE+$02) // 0507: 01 34 LDAW $FF34 // 0509: 74 c8 11 ONAW $FF11 // 050c: 4e 2a JRE $0538 -// 050e: 74 c8 33 ONAW $FF33 +// 050e: 74 c8 33 ONAW $FF33_rlsPhase // 0511: 4e 50 JRE $0563 // 0513: 74 c8 07 ONAW $FF07_atkPhase // 0516: c7 JR $051E // 0517: 16 ff XRI A,$FF // 0519: 74 88 07 ANAW $FF07_atkPhase // 051c: 63 07 STAW $FF07_atkPhase -// 051e: 70 1f 23 ff LBCD $FF23 +// 051e: 70 1f 23 ff LBCD $FF23_envSustainLev // 0522: 74 ad DGT EA,BC // 0524: a5 DMOV EA,BC // 0525: 74 e5 DSUB EA,BC // 0527: b5 DMOV BC,EA // 0528: 01 22 LDAW $FF22 // 052a: 63 35 STAW $FF35 -// 052c: 01 21 LDAW $FF21 +// 052c: 01 21 LDAW $FF21_envDcyCoeff // 052e: 78 3d CALF $083D -// 0530: 70 1f 23 ff LBCD $FF23 +// 0530: 70 1f 23 ff LBCD $FF23_envSustainLev // 0534: 74 c5 DADD EA,BC // 0536: 4e 58 JRE $0590 // 0538: 74 c8 07 ONAW $FF07_atkPhase @@ -754,22 +800,22 @@ // 0549: 0a MOV A,B // 054a: 16 ff XRI A,$FF // 054c: 1a MOV B,A -// 054d: 74 88 33 ANAW $FF33 -// 0550: 63 33 STAW $FF33 +// 054d: 74 88 33 ANAW $FF33_rlsPhase +// 0550: 63 33 STAW $FF33_rlsPhase // 0552: 0a MOV A,B // 0553: 74 88 08 ANAW $FF08_dcyPhase // 0556: 63 08 STAW $FF08_dcyPhase // 0558: b5 DMOV BC,EA // 0559: 01 26 LDAW $FF26 // 055b: 63 35 STAW $FF35 -// 055d: 01 25 LDAW $FF25 +// 055d: 01 25 LDAW $FF25_envRlsCoeff // 055f: 78 3d CALF $083D // 0561: 4e 2d JRE $0590 // 0563: 01 34 LDAW $FF34 // 0565: 16 ff XRI A,$FF // 0567: 74 88 08 ANAW $FF08_dcyPhase // 056a: 63 08 STAW $FF08_dcyPhase -// 056c: 01 45 LDAW $FF45 +// 056c: 01 45 LDAW $FF45_envAtkVal // 056e: 48 25 SLL A // 0570: 34 60 0b LXI HL,$0B60_envAtkTbl // 0573: 48 8c LDEAX (HL+A) @@ -781,8 +827,8 @@ // 057e: d1 JR $0590 // 057f: 44 ff 3f LXI EA,$3FFF // 0582: 01 34 LDAW $FF34 -// 0584: 74 98 33 ORAW $FF33 -// 0587: 63 33 STAW $FF33 +// 0584: 74 98 33 ORAW $FF33_rlsPhase +// 0587: 63 33 STAW $FF33_rlsPhase // 0589: 01 34 LDAW $FF34 // 058b: 74 98 08 ORAW $FF08_dcyPhase // 058e: 63 08 STAW $FF08_dcyPhase @@ -840,11 +886,11 @@ // 05f1: 4e 2d JRE $0620 // 05f3: 74 e5 DSUB EA,BC // 05f5: b5 DMOV BC,EA -// 05f6: 01 42 LDAW $FF42 +// 05f6: 01 42 LDAW $FF42_vcfKeyTrack // 05f8: 48 2f MUL C // 05fa: 08 MOV A,EAH // 05fb: 1b MOV C,A -// 05fc: 01 42 LDAW $FF42 +// 05fc: 01 42 LDAW $FF42_vcfKeyTrack // 05fe: 48 2e MUL B // 0600: 70 43 EADD EA,C // 0602: b5 DMOV BC,EA @@ -865,11 +911,11 @@ // 0621: 44 80 16 LXI EA,$1680 // 0624: 74 e5 DSUB EA,BC // 0626: b5 DMOV BC,EA -// 0627: 01 42 LDAW $FF42 +// 0627: 01 42 LDAW $FF42_vcfKeyTrack // 0629: 48 2f MUL C // 062b: 08 MOV A,EAH // 062c: 1b MOV C,A -// 062d: 01 42 LDAW $FF42 +// 062d: 01 42 LDAW $FF42_vcfKeyTrack // 062f: 48 2e MUL B // 0631: 70 43 EADD EA,C // 0633: b5 DMOV BC,EA @@ -1015,7 +1061,7 @@ // 074b: 64 08 bf ANI PA,$BF // 074e: 34 4d ff LXI HL,$FF4D_lfoVal // 0751: 48 83 LDEAX (HL) -// 0753: 70 1f 4b ff LBCD $FF4B_lfoRate +// 0753: 70 1f 4b ff LBCD $FF4B_lfoRateCoeff // 0757: 58 4a BIT 0,$FF4A_lfoPol // rise/fall // 0759: 4e 30 JRE $078B // 075b: 74 b5 DSUBNB EA,BC @@ -1058,7 +1104,7 @@ // 07a2: 14 00 20 LXI BC,$2000 // 07a5: 74 c5 DADD EA,BC // 07a7: 4f c2 JRE $076B -// 07a9: 34 39 ff LXI HL,$FF39 +// 07a9: 34 39 ff LXI HL,$FF39_noiseLevel // 07ac: 48 83 LDEAX (HL) // 07ae: 69 07 MVI A,$07 // 07b0: 78 2f CALF $082F_setDacOut @@ -1581,1201 +1627,125 @@ // 09fc: 00 NOP // 09fd: 00 NOP // 09fe: 00 NOP -// 09ff: 00 NOP -// 0A00_portCoeffTbl: 00 NOP -// 0a01: ff JR $0A01 -// 0a02: f7 JR $09FA -// 0a03: ef JR $09F3 -// 0a04: e7 JR $09EC -// 0a05: df JR $0A25 -// 0a06: d7 JR $0A1E -// 0a07: cf JR $0A17 -// 0a08: c7 JR $0A10 -// 0a09: bf b7 STAX (HL+$B7) -// 0a0b: af a7 LDAX (HL+$A7) -// 0a0d: 9f CALT ($00BE) -// 0a0e: 97 CALT ($00AE) -// 0a0f: 8f CALT ($009E) -// 0a10: 87 CALT ($008E) -// 0a11: 7f 77 CALF $0F77 -// 0a13: 6f 67 MVI L,$67 -// 0a15: 5f 57 BIT 7,$FF57 -// 0a17: 4f 47 JRE $0960 -// 0a19: 3f STAX (HL-) -// 0a1a: 3d STAX (HL+) -// 0a1b: 3b STAX (HL) -// 0a1c: 39 STAX (BC) -// 0a1d: 37 35 LTI A,$35 -// 0a1f: 33 DCX HL -// 0a20: 31 BLOCK -// 0a21: 2f LDAX (HL-) -// 0a22: 2d LDAX (HL+) -// 0a23: 2b LDAX (HL) -// 0a24: 29 LDAX (BC) -// 0a25: 27 25 GTI A,$25 -// 0a27: 23 DCX DE -// 0a28: 21 JB -// 0a29: 1f MOV L,A -// 0a2a: 1d MOV E,A -// 0a2b: 1b MOV C,A -// 0a2c: 19 MOV EAL,A -// 0a2d: 17 15 ORI A,$15 -// 0a2f: 13 DCX BC -// 0a30: 12 INX BC -// 0a31: 11 EXX -// 0a32: 10 EXA -// 0a33: 10 EXA -// 0a34: 10 EXA -// 0a35: 10 EXA -// 0a36: 0f MOV A,L -// 0a37: 0f MOV A,L -// 0a38: 0f MOV A,L -// 0a39: 0f MOV A,L -// 0a3a: 0e MOV A,H -// 0a3b: 0e MOV A,H -// 0a3c: 0e MOV A,H -// 0a3d: 0e MOV A,H -// 0a3e: 0d MOV A,E -// 0a3f: 0d MOV A,E -// 0a40: 0d MOV A,E -// 0a41: 0d MOV A,E -// 0a42: 0d MOV A,E -// 0a43: 0c MOV A,D -// 0a44: 0c MOV A,D -// 0a45: 0c MOV A,D -// 0a46: 0c MOV A,D -// 0a47: 0c MOV A,D -// 0a48: 0b MOV A,C -// 0a49: 0b MOV A,C -// 0a4a: 0b MOV A,C -// 0a4b: 0b MOV A,C -// 0a4c: 0b MOV A,C -// 0a4d: 0a MOV A,B -// 0a4e: 0a MOV A,B -// 0a4f: 0a MOV A,B -// 0a50: 0a MOV A,B -// 0a51: 0a MOV A,B -// 0a52: 09 MOV A,EAL -// 0a53: 09 MOV A,EAL -// 0a54: 09 MOV A,EAL -// 0a55: 09 MOV A,EAL -// 0a56: 09 MOV A,EAL -// 0a57: 08 MOV A,EAH -// 0a58: 08 MOV A,EAH -// 0a59: 08 MOV A,EAH -// 0a5a: 08 MOV A,EAH -// 0a5b: 08 MOV A,EAH -// 0a5c: 07 07 ANI A,$07 -// 0a5e: 07 07 ANI A,$07 -// 0a60: 07 06 ANI A,$06 -// 0a62: 06 illegal -// 0a63: 06 illegal -// 0a64: 06 illegal -// 0a65: 06 illegal -// 0a66: 05 05 05 ANIW $FF05_bendPolarity,$05 -// 0a69: 05 05 04 ANIW $FF05_bendPolarity,$04 -// 0a6c: 04 04 04 LXI SP,$0404 -// 0a6f: 04 03 03 LXI SP,$0303 -// 0a72: 03 DCX SP -// 0a73: 03 DCX SP -// 0a74: 03 DCX SP -// 0a75: 02 INX SP -// 0a76: 02 INX SP -// 0a77: 02 INX SP -// 0a78: 02 INX SP -// 0a79: 02 INX SP -// 0a7a: 01 01 LDAW $FF01 -// 0a7c: 01 01 LDAW $FF01 -// 0a7e: 01 01 LDAW $FF01 -// 0A80_lfoDepthTbl: 00 NOP -// 0a81: 00 NOP -// 0a82: 00 NOP -// 0a83: 01 02 LDAW $FF02 -// 0a85: 03 DCX SP -// 0a86: 04 05 06 LXI SP,$0605 -// 0a89: 07 08 ANI A,$08 -// 0a8b: 09 MOV A,EAL -// 0a8c: 0a MOV A,B -// 0a8d: 0b MOV A,C -// 0a8e: 0c MOV A,D -// 0a8f: 0d MOV A,E -// 0a90: 0e MOV A,H -// 0a91: 0f MOV A,L -// 0a92: 10 EXA -// 0a93: 11 EXX -// 0a94: 12 INX BC -// 0a95: 13 DCX BC -// 0a96: 14 15 16 LXI BC,$1615 -// 0a99: 17 18 ORI A,$18 -// 0a9b: 19 MOV EAL,A -// 0a9c: 1a MOV B,A -// 0a9d: 1b MOV C,A -// 0a9e: 1c MOV D,A -// 0a9f: 1d MOV E,A -// 0aa0: 1e MOV H,A -// 0aa1: 1f MOV L,A -// 0aa2: 20 21 INRW $FF21 -// 0aa4: 22 INX DE -// 0aa5: 23 DCX DE -// 0aa6: 24 25 26 LXI DE,$2625 -// 0aa9: 27 28 GTI A,$28 -// 0aab: 29 LDAX (BC) -// 0aac: 2a LDAX (DE) -// 0aad: 2b LDAX (HL) -// 0aae: 2c LDAX (DE+) -// 0aaf: 2d LDAX (HL+) -// 0ab0: 2e LDAX (DE-) -// 0ab1: 2f LDAX (HL-) -// 0ab2: 30 31 DCRW $FF31 -// 0ab4: 32 INX HL -// 0ab5: 33 DCX HL -// 0ab6: 34 35 36 LXI HL,$3635 -// 0ab9: 37 38 LTI A,$38 -// 0abb: 39 STAX (BC) -// 0abc: 3a STAX (DE) -// 0abd: 3b STAX (HL) -// 0abe: 3c STAX (DE+) -// 0abf: 3d STAX (HL+) -// 0ac0: 3e STAX (DE-) -// 0ac1: 40 42 44 CALL $4442 -// 0ac4: 46 48 ADI A,$48 -// 0ac6: 4a 4c MVIX DE,$4C -// 0ac8: 4e 50 JRE $0B1A -// 0aca: 52 DCR B -// 0acb: 54 56 58 JMP $5856 -// 0ace: 5a 5c BIT 2,$FF5C -// 0ad0: 5e 60 BIT 6,$FF60 -// 0ad2: 62 RETI -// 0ad3: 64 66 68 SUI MKH,$68 -// 0ad6: 6a 6c MVI B,$6C -// 0ad8: 6e 70 MVI H,$70 -// 0ada: 72 SOFTI -// 0adb: 74 76 78 SBI H,$78 -// 0ade: 7a 7c CALF $0A7C -// 0ae0: 80 CALT ($0080) -// 0ae1: 84 CALT ($0088) -// 0ae2: 88 CALT ($0090) -// 0ae3: 8c CALT ($0098) -// 0ae4: 90 CALT ($00A0) -// 0ae5: 94 CALT ($00A8) -// 0ae6: 98 CALT ($00B0) -// 0ae7: 9c CALT ($00B8) -// 0ae8: a0 POP VA -// 0ae9: a4 POP EA -// 0aea: a8 INX EA -// 0aeb: ac LDAX (HL+A) -// 0aec: b0 PUSH VA -// 0aed: b4 PUSH EA -// 0aee: b8 RET -// 0aef: bc STAX (HL+A) -// 0af0: c0 JR $0AF1 -// 0af1: c4 JR $0AF6 -// 0af2: c8 JR $0AFB -// 0af3: cc JR $0B00 -// 0af4: d0 JR $0B05 -// 0af5: d4 JR $0B0A -// 0af6: d8 JR $0B0F -// 0af7: dc JR $0B14 -// 0af8: e0 JR $0AD9 -// 0af9: e4 JR $0ADE -// 0afa: e8 JR $0AE3 -// 0afb: ec JR $0AE8 -// 0afc: f0 JR $0AED -// 0afd: f8 JR $0AF6 -// 0afe: ff JR $0AFE -// 0aff: ff JR $0AFF -// 0b00: 00 NOP -// 0b01: 00 NOP -// 0b02: 00 NOP -// 0b03: 00 NOP -// 0b04: 00 NOP -// 0b05: 00 NOP -// 0b06: 00 NOP -// 0b07: 00 NOP -// 0b08: 00 NOP -// 0b09: 00 NOP -// 0b0a: 00 NOP -// 0b0b: 00 NOP -// 0b0c: 00 NOP -// 0b0d: 00 NOP -// 0b0e: 00 NOP -// 0b0f: 00 NOP -// 0b10: 00 NOP -// 0b11: 00 NOP -// 0b12: 00 NOP -// 0b13: 00 NOP -// 0b14: 00 NOP -// 0b15: 00 NOP -// 0b16: 00 NOP -// 0b17: 00 NOP -// 0b18: 00 NOP -// 0b19: 00 NOP -// 0b1a: 00 NOP -// 0b1b: 00 NOP -// 0b1c: 00 NOP -// 0b1d: 00 NOP -// 0b1e: 00 NOP -// 0b1f: 00 NOP -// 0b20: 00 NOP -// 0b21: 00 NOP -// 0b22: 00 NOP -// 0b23: 00 NOP -// 0b24: 00 NOP -// 0b25: 00 NOP -// 0b26: 00 NOP -// 0b27: 00 NOP -// 0b28: 00 NOP -// 0b29: 00 NOP -// 0b2a: 00 NOP -// 0b2b: 00 NOP -// 0b2c: 00 NOP -// 0b2d: 00 NOP -// 0b2e: 00 NOP -// 0b2f: 00 NOP -// 0B30_lfoDelayTbl1: ff JR $0B30_lfoDelayTbl1 -// 0b31: ff JR $0B31 -// 0b32: 19 MOV EAL,A -// 0b33: 04 0c 02 LXI SP,$020C -// 0b36: 5e 01 BIT 6,$FF01 -// 0b38: 00 NOP -// 0b39: 01 00 LDAW $FF00_resetVoiceBits -// 0b3b: 01 00 LDAW $FF00_resetVoiceBits -// 0b3d: 01 00 LDAW $FF00_resetVoiceBits -// 0b3f: 01 00 LDAW $FF00_resetVoiceBits -// 0b41: 00 NOP -// 0b42: 00 NOP -// 0b43: 00 NOP -// 0b44: 00 NOP -// 0b45: 00 NOP -// 0b46: 00 NOP -// 0b47: 00 NOP -// 0b48: 00 NOP -// 0b49: 00 NOP -// 0b4a: 00 NOP -// 0b4b: 00 NOP -// 0b4c: 00 NOP -// 0b4d: 00 NOP -// 0b4e: 00 NOP -// 0b4f: 00 NOP -// 0b50: 20 21 INRW $FF21 -// 0b52: 22 INX DE -// 0b53: 10 EXA -// 0b54: 11 EXX -// 0b55: 12 INX BC -// 0b56: 36 76 SUINB A,$76 -// 0b58: b6 DMOV DE,EA -// 0b59: 36 76 SUINB A,$76 -// 0b5b: b6 DMOV DE,EA -// 0b5c: 00 NOP -// 0b5d: 00 NOP -// 0b5e: 00 NOP -// 0b5f: 00 NOP -// 0B60_envAtkTbl: 00 NOP -// 0b61: 40 00 20 CALL $2000 -// 0b64: 00 NOP -// 0b65: 10 EXA -// 0b66: aa EI -// 0b67: 0a MOV A,B -// 0b68: 00 NOP -// 0b69: 08 MOV A,EAH -// 0b6a: 66 06 SUI A,$06 -// 0b6c: 55 05 92 OFFIW $FF05_bendPolarity,$92 -// 0b6f: 04 00 04 LXI SP,$0400 -// 0b72: 8e CALT ($009C) -// 0b73: 03 DCX SP -// 0b74: 33 DCX HL -// 0b75: 03 DCX SP -// 0b76: e9 JR $0B60_envAtkTbl -// 0b77: 02 INX SP -// 0b78: ab 02 LDAX (DE+$02) -// 0b7a: 76 02 SBI A,$02 -// 0b7c: 49 02 MVIX BC,$02 -// 0b7e: 22 INX DE -// 0b7f: 02 INX SP -// 0b80: 00 NOP -// 0b81: 02 INX SP -// 0b82: e2 JR $0B65 -// 0b83: 01 c7 LDAW $FFC7 -// 0b85: 01 af LDAW $FFAF -// 0b87: 01 99 LDAW $FF99 -// 0b89: 01 86 LDAW $FF86 -// 0b8b: 01 74 LDAW $FF74 -// 0b8d: 01 64 LDAW $FF64_lfoModToPitch -// 0b8f: 01 55 LDAW $FF55 -// 0b91: 01 48 LDAW $FF48_lfoToVcf -// 0b93: 01 3b LDAW $FF3B -// 0b95: 01 2f LDAW $FF2F -// 0b97: 01 24 LDAW $FF24 -// 0b99: 01 1a LDAW $FF1A -// 0b9b: 01 11 LDAW $FF11 -// 0b9d: 01 08 LDAW $FF08_dcyPhase -// 0b9f: 01 00 LDAW $FF00_resetVoiceBits -// 0ba1: 01 f8 LDAW $FFF8 -// 0ba3: 00 NOP -// 0ba4: f1 JR $0B96 -// 0ba5: 00 NOP -// 0ba6: ea JR $0B91 -// 0ba7: 00 NOP -// 0ba8: e4 JR $0B8D -// 0ba9: 00 NOP -// 0baa: dd JR $0BC8 -// 0bab: 00 NOP -// 0bac: d8 JR $0BC5 -// 0bad: 00 NOP -// 0bae: d2 JR $0BC1 -// 0baf: 00 NOP -// 0bb0: cd JR $0BBE -// 0bb1: 00 NOP -// 0bb2: c8 JR $0BBB -// 0bb3: 00 NOP -// 0bb4: c3 JR $0BB8 -// 0bb5: 00 NOP -// 0bb6: bf 00 STAX (HL+$00) -// 0bb8: ba DI -// 0bb9: 00 NOP -// 0bba: b6 DMOV DE,EA -// 0bbb: 00 NOP -// 0bbc: b2 PUSH DE -// 0bbd: 00 NOP -// 0bbe: ae LDAX (HL+EA) -// 0bbf: 00 NOP -// 0bc0: ab 00 LDAX (DE+$00) -// 0bc2: a7 DMOV EA,HL -// 0bc3: 00 NOP -// 0bc4: a4 POP EA -// 0bc5: 00 NOP -// 0bc6: a1 POP BC -// 0bc7: 00 NOP -// 0bc8: 9e CALT ($00BC) -// 0bc9: 00 NOP -// 0bca: 9b CALT ($00B6) -// 0bcb: 00 NOP -// 0bcc: 98 CALT ($00B0) -// 0bcd: 00 NOP -// 0bce: 95 CALT ($00AA) -// 0bcf: 00 NOP -// 0bd0: 92 CALT ($00A4) -// 0bd1: 00 NOP -// 0bd2: 90 CALT ($00A0) -// 0bd3: 00 NOP -// 0bd4: 8d CALT ($009A) -// 0bd5: 00 NOP -// 0bd6: 8b CALT ($0096) -// 0bd7: 00 NOP -// 0bd8: 89 CALT ($0092) -// 0bd9: 00 NOP -// 0bda: 86 CALT ($008C) -// 0bdb: 00 NOP -// 0bdc: 84 CALT ($0088) -// 0bdd: 00 NOP -// 0bde: 82 CALT ($0084) -// 0bdf: 00 NOP -// 0be0: 7f 00 CALF $0F00 -// 0be2: 7d 00 CALF $0D00 -// 0be4: 7a 00 CALF $0A00_portCoeffTbl -// 0be6: 77 00 EQI A,$00 -// 0be8: 74 00 illegal -// 0bea: 72 SOFTI -// 0beb: 00 NOP -// 0bec: 6f 00 MVI L,$00 -// 0bee: 6c 00 MVI D,$00 -// 0bf0: 69 00 MVI A,$00 -// 0bf2: 67 00 NEI A,$00 -// 0bf4: 64 00 61 MVI PA,$61 -// 0bf7: 00 NOP -// 0bf8: 5e 00 BIT 6,$FF00_resetVoiceBits -// 0bfa: 5c 00 BIT 4,$FF00_resetVoiceBits -// 0bfc: 59 00 BIT 1,$FF00_resetVoiceBits -// 0bfe: 56 00 ACI A,$00 -// 0c00: 53 DCR C -// 0c01: 00 NOP -// 0c02: 50 EXH -// 0c03: 00 NOP -// 0c04: 4e 00 JRE $0C06 -// 0c06: 4b 00 MVIX HL,$00 -// 0c08: 48 00 illegal -// 0c0a: 45 00 42 ONIW $FF00_resetVoiceBits,$42 -// 0c0d: 00 NOP -// 0c0e: 40 00 3f CALL $3F00 -// 0c11: 00 NOP -// 0c12: 3d STAX (HL+) -// 0c13: 00 NOP -// 0c14: 3c STAX (DE+) -// 0c15: 00 NOP -// 0c16: 3a STAX (DE) -// 0c17: 00 NOP -// 0c18: 39 STAX (BC) -// 0c19: 00 NOP -// 0c1a: 37 00 LTI A,$00 -// 0c1c: 36 00 SUINB A,$00 -// 0c1e: 34 00 33 LXI HL,$3300 -// 0c21: 00 NOP -// 0c22: 31 BLOCK -// 0c23: 00 NOP -// 0c24: 30 00 DCRW $FF00_resetVoiceBits -// 0c26: 2e LDAX (DE-) -// 0c27: 00 NOP -// 0c28: 2d LDAX (HL+) -// 0c29: 00 NOP -// 0c2a: 2b LDAX (HL) -// 0c2b: 00 NOP -// 0c2c: 2a LDAX (DE) -// 0c2d: 00 NOP -// 0c2e: 28 illegal -// 0c2f: 00 NOP -// 0c30: 27 00 GTI A,$00 -// 0c32: 25 00 24 GTIW $FF00_resetVoiceBits,$24 -// 0c35: 00 NOP -// 0c36: 22 INX DE -// 0c37: 00 NOP -// 0c38: 21 JB -// 0c39: 00 NOP -// 0c3a: 21 JB -// 0c3b: 00 NOP -// 0c3c: 20 00 INRW $FF00_resetVoiceBits -// 0c3e: 20 00 INRW $FF00_resetVoiceBits -// 0c40: 1f MOV L,A -// 0c41: 00 NOP -// 0c42: 1f MOV L,A -// 0c43: 00 NOP -// 0c44: 1e MOV H,A -// 0c45: 00 NOP -// 0c46: 1e MOV H,A -// 0c47: 00 NOP -// 0c48: 1d MOV E,A -// 0c49: 00 NOP -// 0c4a: 1d MOV E,A -// 0c4b: 00 NOP -// 0c4c: 1c MOV D,A -// 0c4d: 00 NOP -// 0c4e: 1c MOV D,A -// 0c4f: 00 NOP -// 0c50: 1b MOV C,A -// 0c51: 00 NOP -// 0c52: 1b MOV C,A -// 0c53: 00 NOP -// 0c54: 1a MOV B,A -// 0c55: 00 NOP -// 0c56: 19 MOV EAL,A -// 0c57: 00 NOP -// 0c58: 18 MOV EAH,A -// 0c59: 00 NOP -// 0c5a: 17 00 ORI A,$00 -// 0c5c: 16 00 XRI A,$00 -// 0c5e: 15 00 05 ORIW $FF00_resetVoiceBits,$05 -// 0c61: 00 NOP -// 0c62: 0f MOV A,L -// 0c63: 00 NOP -// 0c64: 19 MOV EAL,A -// 0c65: 00 NOP -// 0c66: 28 illegal -// 0c67: 00 NOP -// 0c68: 37 00 LTI A,$00 -// 0c6a: 46 00 ADI A,$00 -// 0c6c: 50 EXH -// 0c6d: 00 NOP -// 0c6e: 5a 00 BIT 2,$FF00_resetVoiceBits -// 0c70: 64 00 6e MVI PA,$6E -// 0c73: 00 NOP -// 0c74: 78 00 CALF $0800 -// 0c76: 82 CALT ($0084) -// 0c77: 00 NOP -// 0c78: 8c CALT ($0098) -// 0c79: 00 NOP -// 0c7a: 96 CALT ($00AC) -// 0c7b: 00 NOP -// 0c7c: a0 POP VA -// 0c7d: 00 NOP -// 0c7e: aa EI -// 0c7f: 00 NOP -// 0c80: b4 PUSH EA -// 0c81: 00 NOP -// 0c82: be STAX (HL+EA) -// 0c83: 00 NOP -// 0c84: c8 JR $0C8D -// 0c85: 00 NOP -// 0c86: d2 JR $0C99 -// 0c87: 00 NOP -// 0c88: dc JR $0CA5 -// 0c89: 00 NOP -// 0c8a: e6 JR $0C71 -// 0c8b: 00 NOP -// 0c8c: f0 JR $0C7D -// 0c8d: 00 NOP -// 0c8e: fa JR $0C89 -// 0c8f: 00 NOP -// 0c90: 04 01 0e LXI SP,$0E01 -// 0c93: 01 18 LDAW $FF18 -// 0c95: 01 22 LDAW $FF22 -// 0c97: 01 2c LDAW $FF2C -// 0c99: 01 36 LDAW $FF36_cmdByte -// 0c9b: 01 40 LDAW $FF40 -// 0c9d: 01 4a LDAW $FF4A -// 0c9f: 01 54 LDAW $FF54 -// 0ca1: 01 5e LDAW $FF5E -// 0ca3: 01 68 LDAW $FF68 -// 0ca5: 01 72 LDAW $FF72 -// 0ca7: 01 7c LDAW $FF7C -// 0ca9: 01 86 LDAW $FF86 -// 0cab: 01 90 LDAW $FF90 -// 0cad: 01 9a LDAW $FF9A -// 0caf: 01 a4 LDAW $FFA4 -// 0cb1: 01 ae LDAW $FFAE -// 0cb3: 01 b8 LDAW $FFB8 -// 0cb5: 01 c2 LDAW $FFC2 -// 0cb7: 01 cc LDAW $FFCC -// 0cb9: 01 d6 LDAW $FFD6 -// 0cbb: 01 e0 LDAW $FFE0 -// 0cbd: 01 ea LDAW $FFEA -// 0cbf: 01 f4 LDAW $FFF4 -// 0cc1: 01 fe LDAW $FFFE -// 0cc3: 01 08 LDAW $FF08_dcyPhase -// 0cc5: 02 INX SP -// 0cc6: 12 INX BC -// 0cc7: 02 INX SP -// 0cc8: 1c MOV D,A -// 0cc9: 02 INX SP -// 0cca: 26 02 ADINC A,$02 -// 0ccc: 30 02 DCRW $FF02 -// 0cce: 3a STAX (DE) -// 0ccf: 02 INX SP -// 0cd0: 44 02 4e LXI EA,$4E02 -// 0cd3: 02 INX SP -// 0cd4: 58 02 BIT 0,$FF02 -// 0cd6: 62 RETI -// 0cd7: 02 INX SP -// 0cd8: 6c 02 MVI D,$02 -// 0cda: 76 02 SBI A,$02 -// 0cdc: 80 CALT ($0080) -// 0cdd: 02 INX SP -// 0cde: 8a CALT ($0094) -// 0cdf: 02 INX SP -// 0ce0: 9a CALT ($00B4) -// 0ce1: 02 INX SP -// 0ce2: aa EI -// 0ce3: 02 INX SP -// 0ce4: ba DI -// 0ce5: 02 INX SP -// 0ce6: ca JR $0CF1 -// 0ce7: 02 INX SP -// 0ce8: da JR $0D03 -// 0ce9: 02 INX SP -// 0cea: ea JR $0CD5 -// 0ceb: 02 INX SP -// 0cec: fa JR $0CE7 -// 0ced: 02 INX SP -// 0cee: 0a MOV A,B -// 0cef: 03 DCX SP -// 0cf0: 1a MOV B,A -// 0cf1: 03 DCX SP -// 0cf2: 2a LDAX (DE) -// 0cf3: 03 DCX SP -// 0cf4: 3a STAX (DE) -// 0cf5: 03 DCX SP -// 0cf6: 4a 03 MVIX DE,$03 -// 0cf8: 5a 03 BIT 2,$FF03 -// 0cfa: 6a 03 MVI B,$03 -// 0cfc: 7a 03 CALF $0A03 -// 0cfe: 8a CALT ($0094) -// 0cff: 03 DCX SP -// 0d00: 9a CALT ($00B4) -// 0d01: 03 DCX SP -// 0d02: aa EI -// 0d03: 03 DCX SP -// 0d04: ba DI -// 0d05: 03 DCX SP -// 0d06: ca JR $0D11 -// 0d07: 03 DCX SP -// 0d08: da JR $0D23 -// 0d09: 03 DCX SP -// 0d0a: ea JR $0CF5 -// 0d0b: 03 DCX SP -// 0d0c: fa JR $0D07 -// 0d0d: 03 DCX SP -// 0d0e: 0a MOV A,B -// 0d0f: 04 1a 04 LXI SP,$041A -// 0d12: 2a LDAX (DE) -// 0d13: 04 3a 04 LXI SP,$043A -// 0d16: 4a 04 MVIX DE,$04 -// 0d18: 5a 04 BIT 2,$FF04 -// 0d1a: 6a 04 MVI B,$04 -// 0d1c: 7a 04 CALF $0A04 -// 0d1e: 8a CALT ($0094) -// 0d1f: 04 be 04 LXI SP,$04BE -// 0d22: f2 JR $0D15 -// 0d23: 04 26 05 LXI SP,$0526 -// 0d26: 5a 05 BIT 2,$FF05_bendPolarity -// 0d28: 8e CALT ($009C) -// 0d29: 05 c2 05 ANIW $FFC2,$05 -// 0d2c: f6 JR $0D23 -// 0d2d: 05 2c 06 ANIW $FF2C,$06 -// 0d30: 72 SOFTI -// 0d31: 06 illegal -// 0d32: b8 RET -// 0d33: 06 illegal -// 0d34: 08 MOV A,EAH -// 0d35: 07 58 ANI A,$58 -// 0d37: 07 a8 ANI A,$A8 -// 0d39: 07 f8 ANI A,$F8 -// 0d3b: 07 5c ANI A,$5C -// 0d3d: 08 MOV A,EAH -// 0d3e: c0 JR $0D3F -// 0d3f: 08 MOV A,EAH -// 0d40: 24 09 88 LXI DE,$8809 -// 0d43: 09 MOV A,EAL -// 0d44: ec JR $0D31 -// 0d45: 09 MOV A,EAL -// 0d46: 50 EXH -// 0d47: 0a MOV A,B -// 0d48: b4 PUSH EA -// 0d49: 0a MOV A,B -// 0d4a: 18 MOV EAH,A -// 0d4b: 0b MOV A,C -// 0d4c: 7c 0b CALF $0C0B -// 0d4e: e0 JR $0D2F -// 0d4f: 0b MOV A,C -// 0d50: 58 0c BIT 0,$FF0C -// 0d52: d0 JR $0D63 -// 0d53: 0c MOV A,D -// 0d54: 48 0d illegal -// 0d56: de JR $0D75 -// 0d57: 0d MOV A,E -// 0d58: 74 0e 0a ANI H,$0A -// 0d5b: 0f MOV A,L -// 0d5c: a0 POP VA -// 0d5d: 0f MOV A,L -// 0d5e: 00 NOP -// 0d5f: 10 EXA -// 0D60_envDecRelTbl: 00 NOP -// 0d61: 10 EXA -// 0d62: 00 NOP -// 0d63: 30 00 DCRW $FF00_resetVoiceBits -// 0d65: 50 EXH -// 0d66: 00 NOP -// 0d67: 70 00 illegal -// 0d69: 90 CALT ($00A0) -// 0d6a: 00 NOP -// 0d6b: a0 POP VA -// 0d6c: 00 NOP -// 0d6d: a8 INX EA -// 0d6e: 00 NOP -// 0d6f: b0 PUSH VA -// 0d70: 00 NOP -// 0d71: b8 RET -// 0d72: 00 NOP -// 0d73: c0 JR $0D74 -// 0d74: 00 NOP -// 0d75: c8 JR $0D7E -// 0d76: 00 NOP -// 0d77: d0 JR $0D88 -// 0d78: 00 NOP -// 0d79: d8 JR $0D92 -// 0d7a: 00 NOP -// 0d7b: e0 JR $0D5C -// 0d7c: 00 NOP -// 0d7d: e8 JR $0D66 -// 0d7e: 00 NOP -// 0d7f: f0 JR $0D70 -// 0d80: 80 CALT ($0080) -// 0d81: f0 JR $0D72 -// 0d82: 00 NOP -// 0d83: f1 JR $0D75 -// 0d84: 80 CALT ($0080) -// 0d85: f1 JR $0D77 -// 0d86: 00 NOP -// 0d87: f2 JR $0D7A -// 0d88: 80 CALT ($0080) -// 0d89: f2 JR $0D7C -// 0d8a: 00 NOP -// 0d8b: f3 JR $0D7F -// 0d8c: 80 CALT ($0080) -// 0d8d: f3 JR $0D81 -// 0d8e: 00 NOP -// 0d8f: f4 JR $0D84 -// 0d90: 80 CALT ($0080) -// 0d91: f4 JR $0D86 -// 0d92: 00 NOP -// 0d93: f5 JR $0D89 -// 0d94: 80 CALT ($0080) -// 0d95: f5 JR $0D8B -// 0d96: 00 NOP -// 0d97: f6 JR $0D8E -// 0d98: 80 CALT ($0080) -// 0d99: f6 JR $0D90 -// 0d9a: 00 NOP -// 0d9b: f7 JR $0D93 -// 0d9c: 80 CALT ($0080) -// 0d9d: f7 JR $0D95 -// 0d9e: 00 NOP -// 0d9f: f8 JR $0D98 -// 0da0: 80 CALT ($0080) -// 0da1: f8 JR $0D9A -// 0da2: 00 NOP -// 0da3: f9 JR $0D9D -// 0da4: 80 CALT ($0080) -// 0da5: f9 JR $0D9F -// 0da6: 00 NOP -// 0da7: fa JR $0DA2 -// 0da8: 80 CALT ($0080) -// 0da9: fa JR $0DA4 -// 0daa: 00 NOP -// 0dab: fb JR $0DA7 -// 0dac: 80 CALT ($0080) -// 0dad: fb JR $0DA9 -// 0dae: 00 NOP -// 0daf: fc JR $0DAC -// 0db0: 80 CALT ($0080) -// 0db1: fc JR $0DAE -// 0db2: 00 NOP -// 0db3: fd JR $0DB1 -// 0db4: 80 CALT ($0080) -// 0db5: fd JR $0DB3 -// 0db6: 00 NOP -// 0db7: fe JR $0DB6 -// 0db8: 0c MOV A,D -// 0db9: fe JR $0DB8 -// 0dba: 18 MOV EAH,A -// 0dbb: fe JR $0DBA -// 0dbc: 24 fe 30 LXI DE,$30FE -// 0dbf: fe JR $0DBE -// 0dc0: 3c STAX (DE+) -// 0dc1: fe JR $0DC0 -// 0dc2: 48 fe illegal -// 0dc4: 54 fe 60 JMP $60FE -// 0dc7: fe JR $0DC6 -// 0dc8: 6c fe MVI D,$FE -// 0dca: 78 fe CALF $08FE -// 0dcc: 84 CALT ($0088) -// 0dcd: fe JR $0DCC -// 0dce: 90 CALT ($00A0) -// 0dcf: fe JR $0DCE -// 0dd0: 9c CALT ($00B8) -// 0dd1: fe JR $0DD0 -// 0dd2: a8 INX EA -// 0dd3: fe JR $0DD2 -// 0dd4: b4 PUSH EA -// 0dd5: fe JR $0DD4 -// 0dd6: c0 JR $0DD7 -// 0dd7: fe JR $0DD6 -// 0dd8: cc JR $0DE5 -// 0dd9: fe JR $0DD8 -// 0dda: d8 JR $0DF3 -// 0ddb: fe JR $0DDA -// 0ddc: e4 JR $0DC1 -// 0ddd: fe JR $0DDC -// 0dde: f0 JR $0DCF -// 0ddf: fe JR $0DDE -// 0de0: fc JR $0DDD -// 0de1: fe JR $0DE0 -// 0de2: 08 MOV A,EAH -// 0de3: ff JR $0DE3 -// 0de4: 0c MOV A,D -// 0de5: ff JR $0DE5 -// 0de6: 10 EXA -// 0de7: ff JR $0DE7 -// 0de8: 14 ff 18 LXI BC,$18FF -// 0deb: ff JR $0DEB -// 0dec: 1c MOV D,A -// 0ded: ff JR $0DED -// 0dee: 20 ff INRW $FFFF -// 0df0: 24 ff 28 LXI DE,$28FF -// 0df3: ff JR $0DF3 -// 0df4: 2c LDAX (DE+) -// 0df5: ff JR $0DF5 -// 0df6: 30 ff DCRW $FFFF -// 0df8: 34 ff 38 LXI HL,$38FF -// 0dfb: ff JR $0DFB -// 0dfc: 3c STAX (DE+) -// 0dfd: ff JR $0DFD -// 0dfe: 40 ff 44 CALL $44FF -// 0e01: ff JR $0E01 -// 0e02: 48 ff illegal -// 0e04: 4c ff illegal -// 0e06: 50 EXH -// 0e07: ff JR $0E07 -// 0e08: 54 ff 58 JMP $58FF -// 0e0b: ff JR $0E0B -// 0e0c: 5c ff BIT 4,$FFFF -// 0e0e: 60 ff EQA A,L -// 0e10: 64 ff 68 illegal -// 0e13: ff JR $0E13 -// 0e14: 6c ff MVI D,$FF -// 0e16: 70 ff EQAX (HL-) -// 0e18: 74 ff DEQ EA,HL -// 0e1a: 78 ff CALF $08FF -// 0e1c: 7c ff CALF $0CFF -// 0e1e: 80 CALT ($0080) -// 0e1f: ff JR $0E1F -// 0e20: 84 CALT ($0088) -// 0e21: ff JR $0E21 -// 0e22: 88 CALT ($0090) -// 0e23: ff JR $0E23 -// 0e24: 8c CALT ($0098) -// 0e25: ff JR $0E25 -// 0e26: 90 CALT ($00A0) -// 0e27: ff JR $0E27 -// 0e28: 94 CALT ($00A8) -// 0e29: ff JR $0E29 -// 0e2a: 98 CALT ($00B0) -// 0e2b: ff JR $0E2B -// 0e2c: 9c CALT ($00B8) -// 0e2d: ff JR $0E2D -// 0e2e: a0 POP VA -// 0e2f: ff JR $0E2F -// 0e30: a4 POP EA -// 0e31: ff JR $0E31 -// 0e32: a8 INX EA -// 0e33: ff JR $0E33 -// 0e34: ac LDAX (HL+A) -// 0e35: ff JR $0E35 -// 0e36: b0 PUSH VA -// 0e37: ff JR $0E37 -// 0e38: b4 PUSH EA -// 0e39: ff JR $0E39 -// 0e3a: b8 RET -// 0e3b: ff JR $0E3B -// 0e3c: bc STAX (HL+A) -// 0e3d: ff JR $0E3D -// 0e3e: c0 JR $0E3F -// 0e3f: ff JR $0E3F -// 0e40: c4 JR $0E45 -// 0e41: ff JR $0E41 -// 0e42: c8 JR $0E4B -// 0e43: ff JR $0E43 -// 0e44: cc JR $0E51 -// 0e45: ff JR $0E45 -// 0e46: d0 JR $0E57 -// 0e47: ff JR $0E47 -// 0e48: d4 JR $0E5D -// 0e49: ff JR $0E49 -// 0e4a: d8 JR $0E63 -// 0e4b: ff JR $0E4B -// 0e4c: dc JR $0E69 -// 0e4d: ff JR $0E4D -// 0e4e: e0 JR $0E2F -// 0e4f: ff JR $0E4F -// 0e50: e4 JR $0E35 -// 0e51: ff JR $0E51 -// 0e52: e8 JR $0E3B -// 0e53: ff JR $0E53 -// 0e54: ec JR $0E41 -// 0e55: ff JR $0E55 -// 0e56: f0 JR $0E47 -// 0e57: ff JR $0E57 -// 0e58: f1 JR $0E4A -// 0e59: ff JR $0E59 -// 0e5a: f2 JR $0E4D -// 0e5b: ff JR $0E5B -// 0e5c: f3 JR $0E50 -// 0e5d: ff JR $0E5D -// 0e5e: f4 JR $0E53 -// 0e5f: ff JR $0E5F -// 0E60_noteCvDacTbl: 20 00 INRW $FF00_resetVoiceBits -// 0e62: 22 INX DE -// 0e63: 00 NOP -// 0e64: 24 00 26 LXI DE,$2600 -// 0e67: 00 NOP -// 0e68: 28 illegal -// 0e69: 00 NOP -// 0e6a: 2b LDAX (HL) -// 0e6b: 00 NOP -// 0e6c: 2d LDAX (HL+) -// 0e6d: 00 NOP -// 0e6e: 30 00 DCRW $FF00_resetVoiceBits -// 0e70: 33 DCX HL -// 0e71: 00 NOP -// 0e72: 36 00 SUINB A,$00 -// 0e74: 39 STAX (BC) -// 0e75: 00 NOP -// 0e76: 3c STAX (DE+) -// 0e77: 00 NOP -// 0e78: 40 00 44 CALL $4400 -// 0e7b: 00 NOP -// 0e7c: 48 00 illegal -// 0e7e: 4c 00 illegal -// 0e80: 50 EXH -// 0e81: 00 NOP -// 0e82: 55 00 5a OFFIW $FF00_resetVoiceBits,$5A -// 0e85: 00 NOP -// 0e86: 5f 00 BIT 7,$FF00_resetVoiceBits -// 0e88: 65 00 6b NEIW $FF00_resetVoiceBits,$6B -// 0e8b: 00 NOP -// 0e8c: 72 SOFTI -// 0e8d: 00 NOP -// 0e8e: 79 00 CALF $0900 -// 0e90: 80 CALT ($0080) -// 0e91: 00 NOP -// 0e92: 87 CALT ($008E) -// 0e93: 00 NOP -// 0e94: 8f CALT ($009E) -// 0e95: 00 NOP -// 0e96: 98 CALT ($00B0) -// 0e97: 00 NOP -// 0e98: a1 POP BC -// 0e99: 00 NOP -// 0e9a: ab 00 LDAX (DE+$00) -// 0e9c: b5 DMOV BC,EA -// 0e9d: 00 NOP -// 0e9e: c0 JR $0E9F -// 0e9f: 00 NOP -// 0ea0: cb JR $0EAC -// 0ea1: 00 NOP -// 0ea2: d7 JR $0EBA -// 0ea3: 00 NOP -// 0ea4: e4 JR $0E89 -// 0ea5: 00 NOP -// 0ea6: f2 JR $0E99 -// 0ea7: 00 NOP -// 0ea8: 00 NOP -// 0ea9: 01 0f LDAW $FF0F_voicePtr -// 0eab: 01 1f LDAW $FF1F -// 0ead: 01 30 LDAW $FF30 -// 0eaf: 01 42 LDAW $FF42 -// 0eb1: 01 56 LDAW $FF56_lfoHoldOff -// 0eb3: 01 6a LDAW $FF6A_vcfUnderflow1 -// 0eb5: 01 7f LDAW $FF7F_switch1 -// 0eb7: 01 96 LDAW $FF96 -// 0eb9: 01 ae LDAW $FFAE -// 0ebb: 01 c8 LDAW $FFC8 -// 0ebd: 01 e3 LDAW $FFE3 -// 0ebf: 01 00 LDAW $FF00_resetVoiceBits -// 0ec1: 02 INX SP -// 0ec2: 1e MOV H,A -// 0ec3: 02 INX SP -// 0ec4: 3e STAX (DE-) -// 0ec5: 02 INX SP -// 0ec6: 61 DAA -// 0ec7: 02 INX SP -// 0ec8: 85 CALT ($008A) -// 0ec9: 02 INX SP -// 0eca: ab 02 LDAX (DE+$02) -// 0ecc: d4 JR $0EE1 -// 0ecd: 02 INX SP -// 0ece: ff JR $0ECE -// 0ecf: 02 INX SP -// 0ed0: 2d LDAX (HL+) -// 0ed1: 03 DCX SP -// 0ed2: 5d 03 BIT 5,$FF03 -// 0ed4: 90 CALT ($00A0) -// 0ed5: 03 DCX SP -// 0ed6: c7 JR $0EDE -// 0ed7: 03 DCX SP -// 0ed8: 00 NOP -// 0ed9: 04 3d 04 LXI SP,$043D -// 0edc: 7d 04 CALF $0D04 -// 0ede: c2 JR $0EE1 -// 0edf: 04 0a 05 LXI SP,$050A -// 0ee2: 57 05 OFFI A,$05 -// 0ee4: a9 DCX EA -// 0ee5: 05 fe 05 ANIW $FFFE,$05 -// 0ee8: 59 06 BIT 1,$FF06 -// 0eea: ba DI -// 0eeb: 06 illegal -// 0eec: 21 JB -// 0eed: 07 8d ANI A,$8D -// 0eef: 07 00 ANI A,$00 -// 0ef1: 08 MOV A,EAH -// 0ef2: 79 08 CALF $0908 -// 0ef4: fb JR $0EF0 -// 0ef5: 08 MOV A,EAH -// 0ef6: 84 CALT ($0088) -// 0ef7: 09 MOV A,EAL -// 0ef8: 15 0a ae ORIW $FF0A,$AE -// 0efb: 0a MOV A,B -// 0efc: 51 DCR A -// 0efd: 0b MOV A,C -// 0efe: fc JR $0EFB -// 0eff: 0b MOV A,C -// 0f00: b2 PUSH DE -// 0f01: 0c MOV A,D -// 0f02: 74 0d 42 ANI E,$42 -// 0f05: 0e MOV A,H -// 0f06: 1b MOV C,A -// 0f07: 0f MOV A,L -// 0f08: ff JR $0F08 -// 0f09: 0f MOV A,L -// 0f0a: ff JR $0F0A -// 0f0b: 0f MOV A,L -// 0f0c: ff JR $0F0C -// 0f0d: 0f MOV A,L -// 0f0e: ff JR $0F0E -// 0f0f: 0f MOV A,L -// 0f10: ff JR $0F10 -// 0f11: 0f MOV A,L -// 0f12: ff JR $0F12 -// 0f13: 0f MOV A,L -// 0f14: ff JR $0F14 -// 0f15: 0f MOV A,L -// 0f16: ff JR $0F16 -// 0f17: 0f MOV A,L -// 0f18: ff JR $0F18 -// 0f19: 0f MOV A,L -// 0f1a: ff JR $0F1A -// 0f1b: 0f MOV A,L -// 0f1c: ff JR $0F1C -// 0f1d: 0f MOV A,L -// 0f1e: ff JR $0F1E -// 0f1f: 0f MOV A,L -// 0f20: ff JR $0F20 -// 0f21: 0f MOV A,L -// 0f22: ff JR $0F22 -// 0f23: 0f MOV A,L -// 0f24: ff JR $0F24 -// 0f25: 0f MOV A,L -// 0f26: ff JR $0F26 -// 0f27: 0f MOV A,L -// 0f28: ff JR $0F28 -// 0f29: 0f MOV A,L -// 0f2a: ff JR $0F2A -// 0f2b: 0f MOV A,L -// 0f2c: ff JR $0F2C -// 0f2d: 0f MOV A,L -// 0f2e: ff JR $0F2E -// 0f2f: 0f MOV A,L -// 0F30_noteClkDivTbl: 6e f0 MVI H,$F0 -// 0f32: e9 JR $0F1C -// 0f33: e2 JR $0F16 -// 0f34: 1f MOV L,A -// 0f35: d6 JR $0F4C -// 0f36: 18 MOV EAH,A -// 0f37: ca JR $0F42 -// 0f38: ba DI -// 0f39: be STAX (HL+EA) -// 0f3a: 04 b4 e0 LXI SP,$E0B4 -// 0f3d: a9 DCX EA -// 0f3e: 52 DCR B -// 0f3f: a0 POP VA -// 0f40: 4f 97 JRE $0ED9 -// 0f42: cc JR $0F4F -// 0f43: 8e CALT ($009C) -// 0f44: c5 JR $0F4A -// 0f45: 86 CALT ($008C) -// 0f46: 33 DCX HL -// 0f47: 7f 0f CALF $0F0F -// 0f49: 78 51 CALF $0851 -// 0f4b: 71 ef 6a MVIW $FFEF,$6A -// 0f4e: ee JR $0F3D -// 0f4f: 64 42 5f ADI PC,$5F -// 0f52: e9 JR $0F3C -// 0f53: 59 d9 BIT 1,$FFD9 -// 0f55: 54 15 50 JMP $5015 -// 0f58: 95 CALT ($00AA) -// 0f59: 4b 54 MVIX HL,$54 -// 0f5b: 47 53 ONI A,$53 -// 0f5d: 43 INR C -// 0f5e: 8d CALT ($009A) -// 0f5f: 3f STAX (HL-) -// 0f60: fc JR $0F5D -// 0f61: 3b STAX (HL) -// 0f62: 9e CALT ($00BC) -// 0f63: 38 illegal -// 0f64: 6e 35 MVI H,$35 -// 0f66: 6e 32 MVI H,$32 -// 0f68: 99 CALT ($00B2) -// 0f69: 2f LDAX (HL-) -// 0f6a: ed JR $0F58 -// 0f6b: 2c LDAX (DE+) -// 0f6c: 66 2a SUI A,$2A -// 0f6e: 05 28 c5 ANIW $FF28,$C5 -// 0f71: 25 a5 23 GTIW $FFA5,$23 -// 0f74: a5 DMOV EA,BC -// 0f75: 21 JB -// 0f76: c3 JR $0F7A -// 0f77: 1f MOV L,A -// 0f78: fb JR $0F74 -// 0f79: 1d MOV E,A -// 0f7a: 4c 1c illegal -// 0f7c: b4 PUSH EA -// 0f7d: 1a MOV B,A -// 0f7e: 34 19 ca LXI HL,$CA19 -// 0f81: 17 74 ORI A,$74 -// 0f83: 16 31 XRI A,$31 -// 0f85: 15 01 14 ORIW $FF01,$14 -// 0f88: e1 JR $0F6A -// 0f89: 12 INX BC -// 0f8a: d1 JR $0F9C -// 0f8b: 11 EXX -// 0f8c: d1 JR $0F9E -// 0f8d: 10 EXA -// 0f8e: e1 JR $0F70 -// 0f8f: 0f MOV A,L -// 0f90: fd JR $0F8E -// 0f91: 0e MOV A,H -// 0f92: 25 0e 59 GTIW $FF0E,$59 -// 0f95: 0d MOV A,E -// 0f96: 99 CALT ($00B2) -// 0f97: 0c MOV A,D -// 0f98: e4 JR $0F7D -// 0f99: 0b MOV A,C -// 0f9a: 39 STAX (BC) -// 0f9b: 0b MOV A,C -// 0f9c: 98 CALT ($00B0) -// 0f9d: 0a MOV A,B -// 0f9e: 00 NOP -// 0f9f: 0a MOV A,B -// 0fa0: 70 09 illegal -// 0fa2: e8 JR $0F8B -// 0fa3: 08 MOV A,EAH -// 0fa4: 68 08 MVI V,$08 -// 0fa6: f0 JR $0F97 -// 0fa7: 07 7e ANI A,$7E -// 0fa9: 07 12 ANI A,$12 -// 0fab: 07 ac ANI A,$AC -// 0fad: 06 illegal -// 0fae: 4c 06 illegal -// 0fb0: f2 JR $0FA3 -// 0fb1: 05 9c 05 ANIW $FF9C,$05 -// 0fb4: 4c 05 illegal -// 0fb6: 00 NOP -// 0fb7: 05 b8 04 ANIW $FFB8,$04 -// 0fba: 74 04 illegal -// 0fbc: 34 04 f8 LXI HL,$F804 -// 0fbf: 03 DCX SP -// 0fc0: bf 03 STAX (HL+$03) -// 0fc2: 89 CALT ($0092) -// 0fc3: 03 DCX SP -// 0fc4: 56 03 ACI A,$03 -// 0fc6: 26 03 ADINC A,$03 -// 0fc8: f9 JR $0FC2 -// 0fc9: 02 INX SP -// 0fca: ce JR $0FD9 -// 0fcb: 02 INX SP -// 0fcc: a6 DMOV EA,DE -// 0fcd: 02 INX SP -// 0fce: 80 CALT ($0080) -// 0fcf: 02 INX SP -// 0fd0: 5c 02 BIT 4,$FF02 -// 0fd2: 3a STAX (DE) -// 0fd3: 02 INX SP -// 0fd4: 1a MOV B,A -// 0fd5: 02 INX SP -// 0fd6: fc JR $0FD3 -// 0fd7: 01 df LDAW $FFDF -// 0fd9: 01 c4 LDAW $FFC4 -// 0fdb: 01 ab LDAW $FFAB -// 0fdd: 01 93 LDAW $FF93 -// 0fdf: 01 7c LDAW $FF7C -// 0fe1: 01 67 LDAW $FF67 -// 0fe3: 01 53 LDAW $FF53 -// 0fe5: 01 40 LDAW $FF40 -// 0fe7: 01 2e LDAW $FF2E -// 0fe9: 01 1d LDAW $FF1D -// 0feb: 01 0d LDAW $FF0D -// 0fed: 01 fe LDAW $FFFE -// 0fef: 00 NOP -// 0ff0: f0 JR $0FE1 -// 0ff1: 00 NOP -// 0ff2: e2 JR $0FD5 -// 0ff3: 00 NOP -// 0ff4: d5 JR $100A -// 0ff5: 00 NOP -// 0ff6: c9 JR $1000 -// 0ff7: 00 NOP -// 0ff8: be STAX (HL+EA) -// 0ff9: 00 NOP -// 0ffa: b3 PUSH HL -// 0ffb: 00 NOP -// 0ffc: a9 DCX EA -// 0ffd: 00 NOP -// 0ffe: a0 POP VA -// 0fff: 00 NOP +// 09ff: 00 NOP +// +// Lookup tables for the various controls +// +// 0A00_portCoeffTbl: +// 0a00: 00 ff f7 ef e7 df d7 cf c7 bf b7 af a7 9f 97 8f +// 0a10: 87 7f 77 6f 67 5f 57 4f 47 3f 3d 3b 39 37 35 33 +// 0a20: 31 2f 2d 2b 29 27 25 23 21 1f 1d 1b 19 17 15 13 +// 0a30: 12 11 10 10 10 10 0f 0f 0f 0f 0e 0e 0e 0e 0d 0d +// 0a40: 0d 0d 0d 0c 0c 0c 0c 0c 0b 0b 0b 0b 0b 0a 0a 0a +// 0a50: 0a 0a 09 09 09 09 09 08 08 08 08 08 07 07 07 07 +// 0a60: 07 06 06 06 06 06 05 05 05 05 05 04 04 04 04 04 +// 0a70: 03 03 03 03 03 02 02 02 02 02 01 01 01 01 01 01 +// 0a80: 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d +// 0a90: 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d +// 0aa0: 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d +// 0ab0: 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d +// 0ac0: 3e 40 42 44 46 48 4a 4c 4e 50 52 54 56 58 5a 5c +// 0ad0: 5e 60 62 64 66 68 6a 6c 6e 70 72 74 76 78 7a 7c +// 0ae0: 80 84 88 8c 90 94 98 9c a0 a4 a8 ac b0 b4 b8 bc +// 0af0: c0 c4 c8 cc d0 d4 d8 dc e0 e4 e8 ec f0 f8 ff ff +/// +// not used, 0x30 bytes of 0 +// 0b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +// 0b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +// 0b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +// +// 0B30_lfoDelayTbl1: +// 0b30: ffff 0419 020c 015e 0100 0100 0100 0100 + +// voice to clock address lookup table +// 0b50: 20 21 22 10 11 12 + +// CTC programming command for clock chip +// 0b56: 36 76 b6 36 76 b6 + +// 0b5c: 00 00 00 00 + + +// 0b60_envAtkTbl: +// 0b60: 4000 2000 1000 0aaa 0800 0666 0555 0492 +// 0b70: 0400 038e 0333 02e9 02ab 0276 0249 0222 +// 0b80: 0200 01e2 01c7 01af 0199 0186 0174 0164 +// 0b90: 0155 0148 013b 012f 0124 011a 0111 0108 +// 0ba0: 0100 00f8 00f1 00ea 00e4 00dd 00d8 00d2 +// 0bb0: 00cd 00c8 00c3 00bf 00ba 00b6 00b2 00ae +// 0bc0: 00ab 00a7 00a4 00a1 009e 009b 0098 0095 +// 0bd0: 0092 0090 008d 008b 0089 0086 0084 0082 +// 0be0: 007f 007d 007a 0077 0074 0072 006f 006c +// 0bf0: 0069 0067 0064 0061 005e 005c 0059 0056 +// 0c00: 0053 0050 004e 004b 0048 0045 0042 0040 +// 0c10: 003f 003d 003c 003a 0039 0037 0036 0034 +// 0c20: 0033 0031 0030 002e 002d 002b 002a 0028 +// 0c30: 0027 0025 0024 0022 0021 0021 0020 0020 +// 0c40: 001f 001f 001e 001e 001d 001d 001c 001c +// 0c50: 001b 001b 001a 0019 0018 0017 0016 0015 + +// 0c60_lfoSpeedTbl: +// 0c60: 0005 000f 0019 0028 0037 0046 0050 005a +// 0c70: 0064 006e 0078 0082 008c 0096 00a0 00aa +// 0c80: 00b4 00be 00c8 00d2 00dc 00e6 00f0 00fa +// 0c90: 0104 010e 0118 0122 012c 0136 0140 014a +// 0ca0: 0154 015e 0168 0172 017c 0186 0190 019a +// 0cb0: 01a4 01ae 01b8 01c2 01cc 01d6 01e0 01ea +// 0cc0: 01f4 01fe 0208 0212 021c 0226 0230 023a +// 0cd0: 0244 024e 0258 0262 026c 0276 0280 028a +// 0ce0: 029a 02aa 02ba 02ca 02da 02ea 02fa 030a +// 0cf0: 031a 032a 033a 034a 035a 036a 037a 038a +// 0d00: 039a 03aa 03ba 03ca 03da 03ea 03fa 040a +// 0d10: 041a 042a 043a 044a 045a 046a 047a 048a +// 0d20: 04be 04f2 0526 055a 058e 05c2 05f6 062c +// 0d30: 0672 06b8 0708 0758 07a8 07f8 085c 08c0 +// 0d40: 0924 0988 09ec 0a50 0ab4 0b18 0b7c 0be0 +// 0d50: 0c58 0cd0 0d48 0dde 0e74 0f0a 0fa0 1000 +// 0d60: 1000 3000 5000 7000 9000 a000 a800 b000 + +// 0D60_envDecRelTbl: +// 0d70: b800 c000 c800 d000 d800 e000 e800 f000 +// 0d80: f080 f100 f180 f200 f280 f300 f380 f400 +// 0d90: f480 f500 f580 f600 f680 f700 f780 f800 +// 0da0: f880 f900 f980 fa00 fa80 fb00 fb80 fc00 +// 0db0: fc80 fd00 fd80 fe00 fe0c fe18 fe24 fe30 +// 0dc0: fe3c fe48 fe54 fe60 fe6c fe78 fe84 fe90 +// 0dd0: fe9c fea8 feb4 fec0 fecc fed8 fee4 fef0 +// 0de0: fefc ff08 ff0c ff10 ff14 ff18 ff1c ff20 +// 0df0: ff24 ff28 ff2c ff30 ff34 ff38 ff3c ff40 +// 0e00: ff44 ff48 ff4c ff50 ff54 ff58 ff5c ff60 +// 0e10: ff64 ff68 FF6C ff70 ff74 ff78 ff7c ff80 +// 0e20: ff84 ff88 ff8c ff90 ff94 ff98 ff9c ffa0 +// 0e30: ffa4 ffa8 ffac ffb0 ffb4 ffb8 ffbc ffc0 +// 0e40: ffc4 ffc8 ffcc ffd0 ffd4 ffd8 ffdc ffe0 +// 0e50: ffe4 ffe8 ffec fff0 fff1 fff2 fff3 fff4 + +// 0E60_noteCvDacTbl: +// 0e60: 0020 0022 0024 0026 0028 002b 002d 0030 +// 0e70: 0033 0036 0039 003c 0040 0044 0048 004c +// 0e80: 0050 0055 005a 005f 0065 006b 0072 0079 +// 0e90: 0080 0087 008f 0098 00a1 00ab 00b5 00c0 +// 0ea0: 00cb 00d7 00e4 00f2 0100 010f 011f 0130 +// 0eb0: 0142 0156 016a 017f 0196 01ae 01c8 01e3 +// 0ec0: 0200 021e 023e 0261 0285 02ab 02d4 02ff +// 0ed0: 032d 035d 0390 03c7 0400 043d 047d 04c2 +// 0ee0: 050a 0557 05a9 05fe 0659 06ba 0721 078d +// 0ef0: 0800 0879 08fb 0984 0a15 0aae 0b51 0bfc +// 0f00: 0cb2 0d74 0e42 0f1b 0fff 0fff 0fff 0fff +// 0f10: 0fff 0fff 0fff 0fff 0fff 0fff 0fff 0fff +// 0f20: 0fff 0fff 0fff 0fff 0fff 0fff 0fff 0fff + +// 0F30_noteClkDivTbl: +// 0f30: f06e e2e9 d61f ca18 beba b404 a9e0 a052 +// 0f40: 974f 8ecc 86c5 7f33 780f 7151 6aef 64ee +// 0f50: 5f42 59e9 54d9 5015 4b95 4754 4353 3f8d +// 0f60: 3bfc 389e 356e 326e 2f99 2ced 2a66 2805 +// 0f70: 25c5 23a5 21a5 1fc3 1dfb 1c4c 1ab4 1934 +// 0f80: 17ca 1674 1531 1401 12e1 11d1 10d1 0fe1 +// 0f90: 0efd 0e25 0d59 0c99 0be4 0b39 0a98 0a00 +// 0fa0: 0970 08e8 0868 07f0 077e 0712 06ac 064c +// 0fb0: 05f2 059c 054c 0500 04b8 0474 0434 03f8 +// 0fc0: 03bf 0389 0356 0326 02f9 02ce 02a6 0280 +// 0fd0: 025c 023a 021a 01fc 01df 01c4 01ab 0193 +// 0fe0: 017c 0167 0153 0140 012e 011d 010d 00fe +// 0ff0: 00f0 00e2 00d5 00c9 00be 00b3 00a9 00a0 \ No newline at end of file