diff --git a/docs/DSP/DSP_UC_AXWii.txt b/docs/DSP/DSP_UC_AXWii.txt deleted file mode 100644 index 07a3d938f0..0000000000 --- a/docs/DSP/DSP_UC_AXWii.txt +++ /dev/null @@ -1,3339 +0,0 @@ -// Memory map: -// 0x0C00: current AXList - - -// Voice PB structure: -// the current PB is stored at 0x02D0 -// offsets and sizes are counted in words -// -// Offset Size Desription -// 0x000 2 Address of the next PB -// 0x002 2 Address of this PB -// 0x004 1 Sample rate converter (0-2) -// 0x005 1 Coef select (0-2: 0x1000, 0x1200, 0x1400) -// 0x006 2 Selects entries in 4 tables (19 bits used) -// 0x008 1 Play/stop flag (1=play, 0=stop) -// 0x022 1 Initial time delay enable -// 0x023 2 Initial time delay data - - - 0000 0000 nop - 0001 0000 nop - -// Exception jump table - 0002 029f 0f3c jmp 0x0f3c - 0004 029f 0f48 jmp 0x0f48 - 0006 029f 0f4d jmp 0x0f4d - 0008 029f 0f5c jmp 0x0f5c - 000a 029f 0f61 jmp 0x0f61 - 000c 029f 0f8d jmp 0x0f8d - 000e 029f 0f92 jmp 0x0f92 - -// Entry point -void 0010_Entry() { - 0010 1302 sbset #0x02 - 0011 1303 sbset #0x03 - 0012 1204 sbclr #0x04 - 0013 1305 sbset #0x05 - 0014 1306 sbset #0x06 - 0015 8e00 set16 - 0016 8c00 clr15 - 0017 8b00 m0 - 0018 0092 00ff lri $CR, #0x00ff - 001a 009e 8000 lri $AC0.M, #0x8000 - 001c 00fe 0ce5 sr @0x0ce5, $AC0.M - 001e 009e 8000 lri $AC0.M, #0x8000 - 0020 00fe 0ce6 sr @0x0ce6, $AC0.M - 0022 00fe 0ce7 sr @0x0ce7, $AC0.M - 0024 00fe 0ce8 sr @0x0ce8, $AC0.M - 0026 8100 clr $ACC0 - 0027 00fe 0ce9 sr @0x0ce9, $AC0.M - 0029 8900 clr $ACC1 - 002a 16fc dcd1 si @DMBH, #0xdcd1 - 002c 16fd 0000 si @DMBL, #0x0000 - 002e 16fb 0001 si @DIRQ, #0x0001 // send a 0xDCD10000 and trigger an IRQ - 0030 26fc lrs $AC0.M, @DMBH - 0031 02a0 8000 andf $AC0.M, #0x8000 - 0033 029c 0030 jlnz 0x0030 // wait until the mail is received by CPU - 0035 029f 004c jmp 0x004c // enter the main loop -} - -void 0037_Unk_Restart() { - 0037 1302 sbset #0x02 - 0038 1303 sbset #0x03 - 0039 1204 sbclr #0x04 - 003a 1305 sbset #0x05 - 003b 1306 sbset #0x06 - 003c 8e00 set16 - 003d 8c00 clr15 - 003e 8b00 m0 - 003f 0092 00ff lri $CR, #0x00ff - 0041 16fc dcd1 si @DMBH, #0xdcd1 - 0043 16fd 0001 si @DMBL, #0x0001 - 0045 16fb 0001 si @DIRQ, #0x0001 // send a 0xDCD10001 and trigger an IRQ - 0047 26fc lrs $AC0.M, @DMBH - 0048 02a0 8000 andf $AC0.M, #0x8000 - 004a 029c 0047 jlnz 0x0047 // wait until the mail is received by CPU - -// main loop - 004c 8e00 set16 - 004d 8100 clr $ACC0 - 004e 8900 clr $ACC1 - 004f 009f babe lri $AC1.M, #0xbabe - 0051 26fe lrs $AC0.M, @CMBH - 0052 02c0 8000 andcf $AC0.M, #0x8000 - 0054 029c 0051 jlnz 0x0051 // wait until we get a new mail from CPU - 0056 8200 cmp - 0057 0294 0051 jnz 0x0051 // discard it if it's not a 0xBABE---- (AXList begin) - 0059 23ff lrs $AX1.H, @CMBL // AX1.H = low part of 0xBABE---- mail = length of list in bytes - 005a 8100 clr $ACC0 - 005b 26fe lrs $AC0.M, @CMBH - 005c 02c0 8000 andcf $AC0.M, #0x8000 - 005e 029c 005b jlnz 0x005b // wait until the next mail - 0060 27ff lrs $AC1.M, @CMBL - 0061 0240 7fff andi $AC0.M, #0x7fff // AC0.M = address high part, AC1.M = address low part - 0063 2ece srs @DSMAH, $AC0.M - 0064 2fcf srs @DSMAL, $AC1.M - 0065 16cd 0c00 si @DSPA, #0x0c00 - 0067 8100 clr $ACC0 - 0068 2ec9 srs @DSCR, $AC0.M - 0069 1ffb mrr $AC1.M, $AX1.H // Transfer the AXList (DMA) - 006a 2fcb srs @DSBL, $AC1.M // DMA transfer from main memory (addr = second mail) to 0x0C00, len = low part of first mail - 006b 02bf 0084 call 0084_WaitForDMACompletion() - 006d 0080 0c00 lri $AR0, #0x0c00 // AR0 = 0x0C00 -} // continues into next function - -void 006f_MailHandler() { - 006f 8e00 set16 - 0070 8100 clr $ACC0 - 0071 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0072 b100 tst $ACC0 - 0073 0291 0080 jl 0x0080 - 0075 0a0e lris $AX0.H, #0x0e - 0076 c100 cmpar $ACC0, $AX0.H - 0077 0292 0080 jg 0x0080 // die if command number is higher than 0xE - 0079 009f 0d04 lri $AC1.M, #0x0d04 - 007b 4c00 add $ACC0, $ACC1 - 007c 1c7e mrr $AR3, $AC0.M - 007d 0213 ilrr $AC0.M, @$AR3 - 007e 1c7e mrr $AR3, $AC0.M // func at [0x0D04 + cmd_num] - 007f 176f jmpr $AR3 // Jump to command func: AR0 = 0x0C01. Okay. - AC0.M = - AC1.M = 0x0D04. Not interesting either. -} - -void 0080_Die() { - 0080 16fc baad si @DMBH, #0xbaad - 0082 2efd srs @DMBL, $AC0.M - 0083 0021 halt -} - -void 0084_WaitForDMACompletion() { - 0084 26c9 lrs $AC0.M, @DSCR - 0085 02a0 0004 andf $AC0.M, #0x0004 - 0087 029c 0084 jlnz 0x0084 - 0089 02df ret -} - -void 008a_Cmd_0() { - 008a 8100 clr $ACC0 - 008b 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 008c 8e78 set16'l : $AC1.M, @$AR0 - 008d 2ece srs @DSMAH, $AC0.M - 008e 2fcf srs @DSMAL, $AC1.M - 008f 16cd 0d08 si @DSPA, #0x0d08 - 0091 16c9 0000 si @DSCR, #0x0000 - 0093 16cb 0078 si @DSBL, #0x0078 - 0095 0081 0d08 lri $AR1, #0x0d08 - 0097 0082 0000 lri $AR2, #0x0000 - 0099 009b 005f lri $AX1.H, #0x005f - 009b 009a 00c0 lri $AX0.H, #0x00c0 - 009d 8100 clr $ACC0 - 009e 8900 clr $ACC1 - 009f 8f00 set40 - 00a0 02bf 0084 call 0084_WaitForDMACompletion() - 00a2 193e lrri $AC0.M, @$AR1 - 00a3 193c lrri $AC0.L, @$AR1 - 00a4 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 00a5 0294 00ab jnz 0x00ab - 00a7 005a loop $AX0.H - 00a8 1b5e srri @$AR2, $AC0.M - 00a9 029f 00b3 jmp 0x00b3 - 00ab 9900 asr16 $ACC1 - 00ac 1b5e srri @$AR2, $AC0.M - 00ad 1b5c srri @$AR2, $AC0.L - 00ae 007b 00b2 bloop $AX1.H, 0x00b2 - 00b0 4c00 add $ACC0, $ACC1 - 00b1 1b5e srri @$AR2, $AC0.M - 00b2 1b5c srri @$AR2, $AC0.L - 00b3 0082 00c0 lri $AR2, #0x00c0 - 00b5 193e lrri $AC0.M, @$AR1 - 00b6 193c lrri $AC0.L, @$AR1 - 00b7 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 00b8 0294 00be jnz 0x00be - 00ba 005a loop $AX0.H - 00bb 1b5e srri @$AR2, $AC0.M - 00bc 029f 00c6 jmp 0x00c6 - 00be 9900 asr16 $ACC1 - 00bf 1b5e srri @$AR2, $AC0.M - 00c0 1b5c srri @$AR2, $AC0.L - 00c1 007b 00c5 bloop $AX1.H, 0x00c5 - 00c3 4c00 add $ACC0, $ACC1 - 00c4 1b5e srri @$AR2, $AC0.M - 00c5 1b5c srri @$AR2, $AC0.L - 00c6 0082 0180 lri $AR2, #0x0180 - 00c8 193e lrri $AC0.M, @$AR1 - 00c9 193c lrri $AC0.L, @$AR1 - 00ca b179 tst'l $ACC0 : $AC1.M, @$AR1 - 00cb 0294 00d1 jnz 0x00d1 - 00cd 005a loop $AX0.H - 00ce 1b5e srri @$AR2, $AC0.M - 00cf 029f 00d9 jmp 0x00d9 - 00d1 9900 asr16 $ACC1 - 00d2 1b5e srri @$AR2, $AC0.M - 00d3 1b5c srri @$AR2, $AC0.L - 00d4 007b 00d8 bloop $AX1.H, 0x00d8 - 00d6 4c00 add $ACC0, $ACC1 - 00d7 1b5e srri @$AR2, $AC0.M - 00d8 1b5c srri @$AR2, $AC0.L - 00d9 0082 0400 lri $AR2, #0x0400 - 00db 193e lrri $AC0.M, @$AR1 - 00dc 193c lrri $AC0.L, @$AR1 - 00dd b179 tst'l $ACC0 : $AC1.M, @$AR1 - 00de 0294 00e4 jnz 0x00e4 - 00e0 005a loop $AX0.H - 00e1 1b5e srri @$AR2, $AC0.M - 00e2 029f 00ec jmp 0x00ec - 00e4 9900 asr16 $ACC1 - 00e5 1b5e srri @$AR2, $AC0.M - 00e6 1b5c srri @$AR2, $AC0.L - 00e7 007b 00eb bloop $AX1.H, 0x00eb - 00e9 4c00 add $ACC0, $ACC1 - 00ea 1b5e srri @$AR2, $AC0.M - 00eb 1b5c srri @$AR2, $AC0.L - 00ec 0082 04c0 lri $AR2, #0x04c0 - 00ee 193e lrri $AC0.M, @$AR1 - 00ef 193c lrri $AC0.L, @$AR1 - 00f0 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 00f1 0294 00f7 jnz 0x00f7 - 00f3 005a loop $AX0.H - 00f4 1b5e srri @$AR2, $AC0.M - 00f5 029f 00ff jmp 0x00ff - 00f7 9900 asr16 $ACC1 - 00f8 1b5e srri @$AR2, $AC0.M - 00f9 1b5c srri @$AR2, $AC0.L - 00fa 007b 00fe bloop $AX1.H, 0x00fe - 00fc 4c00 add $ACC0, $ACC1 - 00fd 1b5e srri @$AR2, $AC0.M - 00fe 1b5c srri @$AR2, $AC0.L - 00ff 0082 0580 lri $AR2, #0x0580 - 0101 193e lrri $AC0.M, @$AR1 - 0102 193c lrri $AC0.L, @$AR1 - 0103 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0104 0294 010a jnz 0x010a - 0106 005a loop $AX0.H - 0107 1b5e srri @$AR2, $AC0.M - 0108 029f 0112 jmp 0x0112 - 010a 9900 asr16 $ACC1 - 010b 1b5e srri @$AR2, $AC0.M - 010c 1b5c srri @$AR2, $AC0.L - 010d 007b 0111 bloop $AX1.H, 0x0111 - 010f 4c00 add $ACC0, $ACC1 - 0110 1b5e srri @$AR2, $AC0.M - 0111 1b5c srri @$AR2, $AC0.L - 0112 0082 0640 lri $AR2, #0x0640 - 0114 193e lrri $AC0.M, @$AR1 - 0115 193c lrri $AC0.L, @$AR1 - 0116 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0117 0294 011d jnz 0x011d - 0119 005a loop $AX0.H - 011a 1b5e srri @$AR2, $AC0.M - 011b 029f 0125 jmp 0x0125 - 011d 9900 asr16 $ACC1 - 011e 1b5e srri @$AR2, $AC0.M - 011f 1b5c srri @$AR2, $AC0.L - 0120 007b 0124 bloop $AX1.H, 0x0124 - 0122 4c00 add $ACC0, $ACC1 - 0123 1b5e srri @$AR2, $AC0.M - 0124 1b5c srri @$AR2, $AC0.L - 0125 0082 0700 lri $AR2, #0x0700 - 0127 193e lrri $AC0.M, @$AR1 - 0128 193c lrri $AC0.L, @$AR1 - 0129 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 012a 0294 0130 jnz 0x0130 - 012c 005a loop $AX0.H - 012d 1b5e srri @$AR2, $AC0.M - 012e 029f 0138 jmp 0x0138 - 0130 9900 asr16 $ACC1 - 0131 1b5e srri @$AR2, $AC0.M - 0132 1b5c srri @$AR2, $AC0.L - 0133 007b 0137 bloop $AX1.H, 0x0137 - 0135 4c00 add $ACC0, $ACC1 - 0136 1b5e srri @$AR2, $AC0.M - 0137 1b5c srri @$AR2, $AC0.L - 0138 0082 07c0 lri $AR2, #0x07c0 - 013a 193e lrri $AC0.M, @$AR1 - 013b 193c lrri $AC0.L, @$AR1 - 013c b179 tst'l $ACC0 : $AC1.M, @$AR1 - 013d 0294 0143 jnz 0x0143 - 013f 005a loop $AX0.H - 0140 1b5e srri @$AR2, $AC0.M - 0141 029f 014b jmp 0x014b - 0143 9900 asr16 $ACC1 - 0144 1b5e srri @$AR2, $AC0.M - 0145 1b5c srri @$AR2, $AC0.L - 0146 007b 014a bloop $AX1.H, 0x014a - 0148 4c00 add $ACC0, $ACC1 - 0149 1b5e srri @$AR2, $AC0.M - 014a 1b5c srri @$AR2, $AC0.L - 014b 0082 0880 lri $AR2, #0x0880 - 014d 193e lrri $AC0.M, @$AR1 - 014e 193c lrri $AC0.L, @$AR1 - 014f b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0150 0294 0156 jnz 0x0156 - 0152 005a loop $AX0.H - 0153 1b5e srri @$AR2, $AC0.M - 0154 029f 015e jmp 0x015e - 0156 9900 asr16 $ACC1 - 0157 1b5e srri @$AR2, $AC0.M - 0158 1b5c srri @$AR2, $AC0.L - 0159 007b 015d bloop $AX1.H, 0x015d - 015b 4c00 add $ACC0, $ACC1 - 015c 1b5e srri @$AR2, $AC0.M - 015d 1b5c srri @$AR2, $AC0.L - 015e 0082 0940 lri $AR2, #0x0940 - 0160 193e lrri $AC0.M, @$AR1 - 0161 193c lrri $AC0.L, @$AR1 - 0162 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0163 0294 0169 jnz 0x0169 - 0165 005a loop $AX0.H - 0166 1b5e srri @$AR2, $AC0.M - 0167 029f 0171 jmp 0x0171 - 0169 9900 asr16 $ACC1 - 016a 1b5e srri @$AR2, $AC0.M - 016b 1b5c srri @$AR2, $AC0.L - 016c 007b 0170 bloop $AX1.H, 0x0170 - 016e 4c00 add $ACC0, $ACC1 - 016f 1b5e srri @$AR2, $AC0.M - 0170 1b5c srri @$AR2, $AC0.L - 0171 0082 0a00 lri $AR2, #0x0a00 - 0173 193e lrri $AC0.M, @$AR1 - 0174 193c lrri $AC0.L, @$AR1 - 0175 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0176 0294 017c jnz 0x017c - 0178 005a loop $AX0.H - 0179 1b5e srri @$AR2, $AC0.M - 017a 029f 0184 jmp 0x0184 - 017c 9900 asr16 $ACC1 - 017d 1b5e srri @$AR2, $AC0.M - 017e 1b5c srri @$AR2, $AC0.L - 017f 007b 0183 bloop $AX1.H, 0x0183 - 0181 4c00 add $ACC0, $ACC1 - 0182 1b5e srri @$AR2, $AC0.M - 0183 1b5c srri @$AR2, $AC0.L - 0184 009b 0011 lri $AX1.H, #0x0011 - 0186 009a 0024 lri $AX0.H, #0x0024 - 0188 0082 0240 lri $AR2, #0x0240 - 018a 193e lrri $AC0.M, @$AR1 - 018b 193c lrri $AC0.L, @$AR1 - 018c b179 tst'l $ACC0 : $AC1.M, @$AR1 - 018d 0294 0193 jnz 0x0193 - 018f 005a loop $AX0.H - 0190 1b5e srri @$AR2, $AC0.M - 0191 029f 019b jmp 0x019b - 0193 9900 asr16 $ACC1 - 0194 1b5e srri @$AR2, $AC0.M - 0195 1b5c srri @$AR2, $AC0.L - 0196 007b 019a bloop $AX1.H, 0x019a - 0198 4c00 add $ACC0, $ACC1 - 0199 1b5e srri @$AR2, $AC0.M - 019a 1b5c srri @$AR2, $AC0.L - 019b 0082 0ac0 lri $AR2, #0x0ac0 - 019d 193e lrri $AC0.M, @$AR1 - 019e 193c lrri $AC0.L, @$AR1 - 019f b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01a0 0294 01a6 jnz 0x01a6 - 01a2 005a loop $AX0.H - 01a3 1b5e srri @$AR2, $AC0.M - 01a4 029f 01ae jmp 0x01ae - 01a6 9900 asr16 $ACC1 - 01a7 1b5e srri @$AR2, $AC0.M - 01a8 1b5c srri @$AR2, $AC0.L - 01a9 007b 01ad bloop $AX1.H, 0x01ad - 01ab 4c00 add $ACC0, $ACC1 - 01ac 1b5e srri @$AR2, $AC0.M - 01ad 1b5c srri @$AR2, $AC0.L - 01ae 0082 0264 lri $AR2, #0x0264 - 01b0 193e lrri $AC0.M, @$AR1 - 01b1 193c lrri $AC0.L, @$AR1 - 01b2 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01b3 0294 01b9 jnz 0x01b9 - 01b5 005a loop $AX0.H - 01b6 1b5e srri @$AR2, $AC0.M - 01b7 029f 01c1 jmp 0x01c1 - 01b9 9900 asr16 $ACC1 - 01ba 1b5e srri @$AR2, $AC0.M - 01bb 1b5c srri @$AR2, $AC0.L - 01bc 007b 01c0 bloop $AX1.H, 0x01c0 - 01be 4c00 add $ACC0, $ACC1 - 01bf 1b5e srri @$AR2, $AC0.M - 01c0 1b5c srri @$AR2, $AC0.L - 01c1 0082 0ae4 lri $AR2, #0x0ae4 - 01c3 193e lrri $AC0.M, @$AR1 - 01c4 193c lrri $AC0.L, @$AR1 - 01c5 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01c6 0294 01cc jnz 0x01cc - 01c8 005a loop $AX0.H - 01c9 1b5e srri @$AR2, $AC0.M - 01ca 029f 01d4 jmp 0x01d4 - 01cc 9900 asr16 $ACC1 - 01cd 1b5e srri @$AR2, $AC0.M - 01ce 1b5c srri @$AR2, $AC0.L - 01cf 007b 01d3 bloop $AX1.H, 0x01d3 - 01d1 4c00 add $ACC0, $ACC1 - 01d2 1b5e srri @$AR2, $AC0.M - 01d3 1b5c srri @$AR2, $AC0.L - 01d4 0082 0288 lri $AR2, #0x0288 - 01d6 193e lrri $AC0.M, @$AR1 - 01d7 193c lrri $AC0.L, @$AR1 - 01d8 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01d9 0294 01df jnz 0x01df - 01db 005a loop $AX0.H - 01dc 1b5e srri @$AR2, $AC0.M - 01dd 029f 01e7 jmp 0x01e7 - 01df 9900 asr16 $ACC1 - 01e0 1b5e srri @$AR2, $AC0.M - 01e1 1b5c srri @$AR2, $AC0.L - 01e2 007b 01e6 bloop $AX1.H, 0x01e6 - 01e4 4c00 add $ACC0, $ACC1 - 01e5 1b5e srri @$AR2, $AC0.M - 01e6 1b5c srri @$AR2, $AC0.L - 01e7 0082 0b08 lri $AR2, #0x0b08 - 01e9 193e lrri $AC0.M, @$AR1 - 01ea 193c lrri $AC0.L, @$AR1 - 01eb b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01ec 0294 01f2 jnz 0x01f2 - 01ee 005a loop $AX0.H - 01ef 1b5e srri @$AR2, $AC0.M - 01f0 029f 01fa jmp 0x01fa - 01f2 9900 asr16 $ACC1 - 01f3 1b5e srri @$AR2, $AC0.M - 01f4 1b5c srri @$AR2, $AC0.L - 01f5 007b 01f9 bloop $AX1.H, 0x01f9 - 01f7 4c00 add $ACC0, $ACC1 - 01f8 1b5e srri @$AR2, $AC0.M - 01f9 1b5c srri @$AR2, $AC0.L - 01fa 0082 02ac lri $AR2, #0x02ac - 01fc 193e lrri $AC0.M, @$AR1 - 01fd 193c lrri $AC0.L, @$AR1 - 01fe b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01ff 0294 0205 jnz 0x0205 - 0201 005a loop $AX0.H - 0202 1b5e srri @$AR2, $AC0.M - 0203 029f 020d jmp 0x020d - 0205 9900 asr16 $ACC1 - 0206 1b5e srri @$AR2, $AC0.M - 0207 1b5c srri @$AR2, $AC0.L - 0208 007b 020c bloop $AX1.H, 0x020c - 020a 4c00 add $ACC0, $ACC1 - 020b 1b5e srri @$AR2, $AC0.M - 020c 1b5c srri @$AR2, $AC0.L - 020d 0082 0b2c lri $AR2, #0x0b2c - 020f 193e lrri $AC0.M, @$AR1 - 0210 193c lrri $AC0.L, @$AR1 - 0211 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 0212 0294 0218 jnz 0x0218 - 0214 005a loop $AX0.H - 0215 1b5e srri @$AR2, $AC0.M - 0216 029f 0220 jmp 0x0220 - 0218 9900 asr16 $ACC1 - 0219 1b5e srri @$AR2, $AC0.M - 021a 1b5c srri @$AR2, $AC0.L - 021b 007b 021f bloop $AX1.H, 0x021f - 021d 4c00 add $ACC0, $ACC1 - 021e 1b5e srri @$AR2, $AC0.M - 021f 1b5c srri @$AR2, $AC0.L - 0220 029f 006f jmp 006f_MailHandler() -} - -void 0222_Cmd_1() { - 0222 8100 clr $ACC0 - 0223 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0224 8e60 set16'l : $AC0.L, @$AR0 - 0225 2ece srs @DSMAH, $AC0.M - 0226 2ccf srs @DSMAL, $AC0.L - 0227 16cd 0d08 si @DSPA, #0x0d08 - 0229 16c9 0000 si @DSCR, #0x0000 - 022b 16cb 0180 si @DSBL, #0x0180 - 022d 1cc0 mrr $IX2, $AR0 - 022e 0080 0000 lri $AR0, #0x0000 - 0230 0083 00c0 lri $AR3, #0x00c0 - 0232 0081 0d08 lri $AR1, #0x0d08 - 0234 0084 ffff lri $IX0, #0xffff - 0236 1ce4 mrr $IX3, $IX0 - 0237 02bf 0084 call 0084_WaitForDMACompletion() - 0239 8f00 set40 - 023a 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 023b 80c9 nx'ldm : $AX0.L, $AX1.L, @$AR1 - 023c 6800 movax $ACC0, $AX0.L - 023d 4a00 addax $ACC0, $AX1.L - 023e 191b lrri $AX1.H, @$AR0 - 023f 6994 movax'lsn $ACC1, $AX0.L : $AX1.L, $AC0.M - 0240 4b23 addax's $ACC1, $AX1.L : @$AR3, $AC0.L - 0241 115f 0249 bloopi #0x5f, 0x0249 - 0243 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0244 80c9 nx'ldm : $AX0.L, $AX1.L, @$AR1 - 0245 6838 movax's $ACC0, $AX0.L : @$AR0, $AC1.M - 0246 4a28 addax's $ACC0, $AX1.L : @$AR0, $AC1.L - 0247 191b lrri $AX1.H, @$AR0 - 0248 6994 movax'lsn $ACC1, $AX0.L : $AX1.L, $AC0.M - 0249 4b23 addax's $ACC1, $AX1.L : @$AR3, $AC0.L - 024a 1b1f srri @$AR0, $AC1.M - 024b 1b1d srri @$AR0, $AC1.L - 024c 1c06 mrr $AR0, $IX2 - 024d 029f 006f jmp 006f_MailHandler() -} - -void 024f_Cmd_2() { - 024f 8100 clr $ACC0 - 0250 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0251 8e60 set16'l : $AC0.L, @$AR0 - 0252 2ece srs @DSMAH, $AC0.M - 0253 2ccf srs @DSMAL, $AC0.L - 0254 16cd 0d08 si @DSPA, #0x0d08 - 0256 16c9 0000 si @DSCR, #0x0000 - 0258 16cb 0180 si @DSBL, #0x0180 - 025a 1cc0 mrr $IX2, $AR0 - 025b 0080 0000 lri $AR0, #0x0000 - 025d 0083 00c0 lri $AR3, #0x00c0 - 025f 0081 0d08 lri $AR1, #0x0d08 - 0261 0084 ffff lri $IX0, #0xffff - 0263 1ce4 mrr $IX3, $IX0 - 0264 02bf 0084 call 0084_WaitForDMACompletion() - 0266 8f00 set40 - 0267 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0268 80c9 nx'ldm : $AX0.L, $AX1.L, @$AR1 - 0269 6800 movax $ACC0, $AX0.L - 026a 4a00 addax $ACC0, $AX1.L - 026b 191b lrri $AX1.H, @$AR0 - 026c 6994 movax'lsn $ACC1, $AX0.L : $AX1.L, $AC0.M - 026d 7d00 neg $ACC1 - 026e 4b23 addax's $ACC1, $AX1.L : @$AR3, $AC0.L - 026f 115f 0278 bloopi #0x5f, 0x0278 - 0271 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0272 80c9 nx'ldm : $AX0.L, $AX1.L, @$AR1 - 0273 6838 movax's $ACC0, $AX0.L : @$AR0, $AC1.M - 0274 4a28 addax's $ACC0, $AX1.L : @$AR0, $AC1.L - 0275 191b lrri $AX1.H, @$AR0 - 0276 6994 movax'lsn $ACC1, $AX0.L : $AX1.L, $AC0.M - 0277 7d00 neg $ACC1 - 0278 4b23 addax's $ACC1, $AX1.L : @$AR3, $AC0.L - 0279 1b1f srri @$AR0, $AC1.M - 027a 1b1d srri @$AR0, $AC1.L - 027b 1c06 mrr $AR0, $IX2 - 027c 029f 006f jmp 006f_MailHandler() -} - -// Command 0x4 - Mixer -// Parameters: AR0 -> 0x0C01 -// AXList data: command (2), PBs address (4) -// Stores 0x140 bytes of data from the PBs address to 0x02D0. Suspicious. - -void 027e_Cmd_4_SetPBsAddress() { - 027e 8100 clr $ACC0 // ACC0 = 0, ACC1 = 0 - 027f 8970 clr'l $ACC1 : $AC0.M, @$AR0 // ACC0 = mem32[0x0C01] (the new PBs address is there) - 0280 8e60 set16'l : $AC0.L, @$AR0 // - 0281 00e0 0cd2 sr @0x0cd2, $AR0 // mem16[0x0CD2] = 0x0C03; - - -// Mixing loop - stops when the pointer to the next PB in the current PB is NULL - 0283 2ece srs @DSMAH, $AC0.M - 0284 2ccf srs @DSMAL, $AC0.L - 0285 16cd 02d0 si @DSPA, #0x02d0 - 0287 16c9 0000 si @DSCR, #0x0000 - 0289 16cb 0140 si @DSBL, #0x0140 // transfer 0x140 bytes from the current PB address to 0x02D0. aka Transfer the current PB - 028b 02bf 0084 call 0084_WaitForDMACompletion() - -// Load some values to memory [0x0CDX / 0x0CEX] - 028d 8100 clr $ACC0 - 028e 8900 clr $ACC1 - 028f 00de 02d4 lr $AC0.M, @0x02d4 // - 0291 009f 0db7 lri $AC1.M, #0x0db7 - 0293 4c00 add $ACC0, $ACC1 // mem16[0x02D4] + 0xDB7; - 0294 1c7e mrr $AR3, $AC0.M - 0295 0213 ilrr $AC0.M, @$AR3 // Sample rate converter - 0296 00fe 0cdf sr @0x0cdf, $AC0.M // mem16[0x0CDF] = iram16[0x0DB7 + mem16[0x02D4]]; - 0298 00de 02d5 lr $AC0.M, @0x02d5 - 029a 009f 0dba lri $AC1.M, #0x0dba - 029c 4c00 add $ACC0, $ACC1 - 029d 1c7e mrr $AR3, $AC0.M - 029e 0213 ilrr $AC0.M, @$AR3 // Coef select - 029f 00fe 0ce0 sr @0x0ce0, $AC0.M // mem16[0x0CE0] = iram16[0x0DBA + mem16[0x02D5]]; - 02a1 009a 001f lri $AX0.H, #0x001f - 02a3 00de 02d7 lr $AC0.M, @0x02d7 - 02a5 009f 0d13 lri $AC1.M, #0x0d13 - 02a7 3400 andr $AC0.M, $AX0.H - 02a8 4c00 add $ACC0, $ACC1 - 02a9 1c7e mrr $AR3, $AC0.M - 02aa 0213 ilrr $AC0.M, @$AR3 // probably a volume coef table - 02ab 00fe 0cd3 sr @0x0cd3, $AC0.M // mem16[0x0CD3] = iram16[0x0D13 + (mem16[0x02D7] & 0x001F)]; (5 bits) - 02ad 00de 02d6 lr $AC0.M, @0x02d6 - 02af 009f 0d33 lri $AC1.M, #0x0d33 - 02b1 3400 andr $AC0.M, $AX0.H - 02b2 4c00 add $ACC0, $ACC1 - 02b3 1c7e mrr $AR3, $AC0.M - 02b4 0213 ilrr $AC0.M, @$AR3 // probably a volume coef table - 02b5 00fe 0cd4 sr @0x0cd4, $AC0.M // mem16[0x0CD4] = iram16[0x0D33 + (mem16[0x02D6] & 0x001F)]; (5 bits) - 02b7 00de 02d6 lr $AC0.M, @0x02d6 - 02b9 009f 0d53 lri $AC1.M, #0x0d53 - 02bb 14fb asr $ACC0, #-5 - 02bc 3400 andr $AC0.M, $AX0.H - 02bd 4c00 add $ACC0, $ACC1 - 02be 1c7e mrr $AR3, $AC0.M - 02bf 0213 ilrr $AC0.M, @$AR3 // probably a volume coef table - 02c0 00fe 0cd5 sr @0x0cd5, $AC0.M // mem16[0x0CD5] = iram16[0x0D53 + ((mem16[0x02D6] >> 5) & 0x001F)]; (5 bits) - 02c2 00de 02d6 lr $AC0.M, @0x02d6 - 02c4 009f 0d73 lri $AC1.M, #0x0d73 - 02c6 14f6 asr $ACC0, #-10 - 02c7 4c00 add $ACC0, $ACC1 - 02c8 1c7e mrr $AR3, $AC0.M - 02c9 0213 ilrr $AC0.M, @$AR3 // probably a volume coef table - 02ca 00fe 0cd6 sr @0x0cd6, $AC0.M // mem16[0x0CD6] = iram16[0x0D73 + (mem16[0x02D6] >> 10)]; (6 bits) - 02cc 8100 clr $ACC0 - 02cd 00de 033c lr $AC0.M, @0x033c - 02cf 009a 0003 lri $AX0.H, #0x0003 - 02d1 009b 0db3 lri $AX1.H, #0x0db3 - 02d3 1ffe mrr $AC1.M, $AC0.M - 02d4 3500 andr $AC1.M, $AX0.H - 02d5 4700 addr $ACC1, $AX1.H - 02d6 1c7f mrr $AR3, $AC1.M - 02d7 0313 ilrr $AC1.M, @$AR3 - 02d8 00ff 0cd7 sr @0x0cd7, $AC1.M // mem16[0x0CD7] = iram16[0x0DB3 + (mem16[0x033C] & 0x0003)]; - 02da 147e lsr $ACC0, #-2 - 02db 1ffe mrr $AC1.M, $AC0.M - 02dc 3500 andr $AC1.M, $AX0.H - 02dd 4700 addr $ACC1, $AX1.H - 02de 1c7f mrr $AR3, $AC1.M - 02df 0313 ilrr $AC1.M, @$AR3 - 02e0 00ff 0cd8 sr @0x0cd8, $AC1.M // mem16[0x0CD8] = iram16[0x0DB3 + ((mem16[0x033C] >> 2) & 0x0003)]; - 02e2 147e lsr $ACC0, #-2 - 02e3 1ffe mrr $AC1.M, $AC0.M - 02e4 3500 andr $AC1.M, $AX0.H - 02e5 4700 addr $ACC1, $AX1.H - 02e6 1c7f mrr $AR3, $AC1.M - 02e7 0313 ilrr $AC1.M, @$AR3 - 02e8 00ff 0cd9 sr @0x0cd9, $AC1.M // mem16[0x0CD9] = iram16[0x0DB3 + ((mem16[0x033C] >> 4) & 0x0003)]; - 02ea 147e lsr $ACC0, #-2 - 02eb 1ffe mrr $AC1.M, $AC0.M - 02ec 3500 andr $AC1.M, $AX0.H - 02ed 4700 addr $ACC1, $AX1.H - 02ee 1c7f mrr $AR3, $AC1.M - 02ef 0313 ilrr $AC1.M, @$AR3 - 02f0 00ff 0cda sr @0x0cda, $AC1.M // mem16[0x0CDA] = iram16[0x0DB3 + ((mem16[0x033C] >> 6) & 0x0003)]; - 02f2 147e lsr $ACC0, #-2 - 02f3 1ffe mrr $AC1.M, $AC0.M - 02f4 3500 andr $AC1.M, $AX0.H - 02f5 4700 addr $ACC1, $AX1.H - 02f6 1c7f mrr $AR3, $AC1.M - 02f7 0313 ilrr $AC1.M, @$AR3 - 02f8 00ff 0cdb sr @0x0cdb, $AC1.M // mem16[0x0CDB] = iram16[0x0DB3 + ((mem16[0x033C] >> 8) & 0x0003)]; - 02fa 147e lsr $ACC0, #-2 - 02fb 1ffe mrr $AC1.M, $AC0.M - 02fc 3500 andr $AC1.M, $AX0.H - 02fd 4700 addr $ACC1, $AX1.H - 02fe 1c7f mrr $AR3, $AC1.M - 02ff 0313 ilrr $AC1.M, @$AR3 - 0300 00ff 0cdc sr @0x0cdc, $AC1.M // mem16[0x0CDC] = iram16[0x0DB3 + ((mem16[0x033C] >> 10) & 0x0003)]; - 0302 147e lsr $ACC0, #-2 - 0303 1ffe mrr $AC1.M, $AC0.M - 0304 3500 andr $AC1.M, $AX0.H - 0305 4700 addr $ACC1, $AX1.H - 0306 1c7f mrr $AR3, $AC1.M - 0307 0313 ilrr $AC1.M, @$AR3 - 0308 00ff 0cdd sr @0x0cdd, $AC1.M // mem16[0x0CDD] = iram16[0x0DB3 + ((mem16[0x033C] >> 12) & 0x0003)]; - 030a 147e lsr $ACC0, #-2 - 030b 1ffe mrr $AC1.M, $AC0.M - 030c 3500 andr $AC1.M, $AX0.H - 030d 4700 addr $ACC1, $AX1.H - 030e 1c7f mrr $AR3, $AC1.M - 030f 0313 ilrr $AC1.M, @$AR3 - 0310 00ff 0cde sr @0x0cde, $AC1.M // mem16[0x0CDE] = iram16[0x0DB3 + (mem16[0x033C] >> 14)]; - - 0312 8100 clr $ACC0 - 0313 00de 02f2 lr $AC0.M, @0x02f2 - 0315 b100 tst $ACC0 - 0316 0295 0339 jz 0x0339 - - // Initial time delay - aka echo aka reverb - // The buffer is 64 bytes - // That thing may be hard to implement in HLE because the HLE sound buffer size is variable - if (mem16[0x02F2] != 0) - { - 0318 8900 clr $ACC1 - 0319 00df 02f5 lr $AC1.M, @0x02f5 - 031b 0300 0c40 addi $AC1.M, #0x0c40 - 031d 00ff 0ce2 sr @0x0ce2, $AC1.M - 031f 00df 02f6 lr $AC1.M, @0x02f6 - 0321 0300 0c40 addi $AC1.M, #0x0c40 - 0323 00ff 0ce3 sr @0x0ce3, $AC1.M - 0325 009f 0c60 lri $AC1.M, #0x0c60 - 0327 00ff 0ce1 sr @0x0ce1, $AC1.M - 0329 00de 02f3 lr $AC0.M, @0x02f3 - 032b 2ece srs @DSMAH, $AC0.M - 032c 00de 02f4 lr $AC0.M, @0x02f4 - 032e 2ecf srs @DSMAL, $AC0.M - 032f 16cd 0c40 si @DSPA, #0x0c40 - 0331 16c9 0000 si @DSCR, #0x0000 - 0333 16cb 0040 si @DSBL, #0x0040 - 0335 02bf 0084 call 0084_WaitForDMACompletion() // so yet another DMA... from mem32[0x02F3] to 0x0C40, 64 bytes - 0337 029f 0341 jmp 0x0341 - } - else - { - 0339 009f 0c60 lri $AC1.M, #0x0c60 - 033b 00ff 0ce2 sr @0x0ce2, $AC1.M - 033d 00ff 0ce3 sr @0x0ce3, $AC1.M - 033f 00ff 0ce1 sr @0x0ce1, $AC1.M - } - - 0341 8c00 clr15 - 0342 8b00 m0 - 0343 8100 clr $ACC0 - 0344 00de 02d8 lr $AC0.M, @0x02d8 - 0346 0601 cmpis $ACC0, #0x01 - 0347 0294 046a jnz 0x046a - -if (mem16[0x02D8] == 1) // if the voice is playing -{ - 0349 00c3 0cdf lr $AR3, @0x0cdf - 034b 177f callr $AR3 // call the sample rate converter - 034c 8a00 m2 // MULTIPLICATION x2 MODE ENABLED! - 034d 8100 clr $ACC0 - 034e 8900 clr $ACC1 - 034f 00de 0306 lr $AC0.M, @0x0306 // pb[0x36] - 0351 00df 0305 lr $AC1.M, @0x0305 // pb[0x35] - 0353 1f1f mrr $AX0.L, $AC1.M - 0354 4d00 add $ACC1, $ACC0 - 0355 1481 asl $ACC0, #1 - 0356 8d1e set15'mv : $AX1.H, $AC0.M - 0357 1fd8 mrr $AC0.M, $AX0.L - 0358 0098 8000 lri $AX0.L, #0x8000 - 035a 0080 0d08 lri $AR0, #0x0d08 - 035c a830 mulx's $AX0.L, $AX1.H : @$AR0, $AC0.M - 035d 112f 0360 bloopi #0x2f, 0x0360 - 035f ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0360 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0361 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0362 00fe 0305 sr @0x0305, $AC0.M - 0364 8f00 set40 - 0365 0080 0d08 lri $AR0, #0x0d08 - 0367 00c1 0ce1 lr $AR1, @0x0ce1 - 0369 1c61 mrr $AR3, $AR1 - 036a 193a lrri $AX0.H, @$AR1 - 036b 1919 lrri $AX1.L, @$AR0 - 036c b051 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR1 - 036d 1919 lrri $AX1.L, @$AR0 - 036e 115e 0371 bloopi #0x5e, 0x0371 - 0370 b651 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR1 - 0371 8090 nx'ls : $AX1.L, $AC0.M - 0372 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0373 6e33 movp's $ACC0 : @$AR3, $AC0.M - 0374 1b7e srri @$AR3, $AC0.M - 0375 00de 032d lr $AC0.M, @0x032d - 0377 b100 tst $ACC0 - 0378 0295 0381 jz 0x0381 - 037a 00c0 0ce1 lr $AR0, @0x0ce1 - 037c 1c20 mrr $AR1, $AR0 - 037d 0083 032e lri $AR3, #0x032e - 037f 02bf 06ab call 0x06ab - 0381 00de 0331 lr $AC0.M, @0x0331 - 0383 b100 tst $ACC0 - 0384 0295 038d jz 0x038d - 0386 0080 0332 lri $AR0, #0x0332 - 0388 00c1 0ce1 lr $AR1, @0x0ce1 - 038a 1c41 mrr $AR2, $AR1 - 038b 02bf 06c3 call 06c3_Unknown() - 038d 0080 02f9 lri $AR0, #0x02f9 - 038f 8100 clr $ACC0 - 0390 100c loopi #0x0c - 0391 1b1e srri @$AR0, $AC0.M // zero out the updates field - 0392 0080 034d lri $AR0, #0x034d - 0394 1008 loopi #0x08 - 0395 1b1e srri @$AR0, $AC0.M - 0396 00c3 0cd3 lr $AR3, @0x0cd3 // perform volume stuff - 0398 177f callr $AR3 // what a complicated volume control! - 0399 00c3 0cd4 lr $AR3, @0x0cd4 - 039b 177f callr $AR3 - 039c 00c3 0cd5 lr $AR3, @0x0cd5 - 039e 177f callr $AR3 - 039f 00c3 0cd6 lr $AR3, @0x0cd6 - 03a1 177f callr $AR3 - - 03a2 00de 033b lr $AC0.M, @0x033b - 03a4 b100 tst $ACC0 - 03a5 0295 0447 jz 0x0447 - if (mem16[0x033B] != 0) - { - 03a7 00de 035a lr $AC0.M, @0x035a - 03a9 b100 tst $ACC0 - 03aa 0295 03c4 jz 0x03c4 - if (mem16[0x035A] != 0) - { - 03ac 0a02 lris $AX0.H, #0x02 - 03ad c100 cmpar $ACC0, $AX0.H - 03ae 0294 03ba jnz 0x03ba - 03b0 0080 035b lri $AR0, #0x035b - 03b2 00c1 0ce1 lr $AR1, @0x0ce1 - 03b4 0082 0d0c lri $AR2, #0x0d0c - 03b6 02bf 06c3 call 06c3_Unknown() - 03b8 029f 03cc jmp 0x03cc - 03ba 0080 0d0c lri $AR0, #0x0d0c - 03bc 00c1 0ce1 lr $AR1, @0x0ce1 - 03be 0083 035b lri $AR3, #0x035b - 03c0 02bf 06ab call 0x06ab - 03c2 029f 03cc jmp 0x03cc - } - else - { - 03c4 0080 0d0c lri $AR0, #0x0d0c - 03c6 00c1 0ce1 lr $AR1, @0x0ce1 - 03c8 1160 03cb bloopi #0x60, 0x03cb - 03ca 193f lrri $AC1.M, @$AR1 - 03cb 1b1f srri @$AR0, $AC1.M - } - 03cc 0082 0355 lri $AR2, #0x0355 - 03ce 8c00 clr15 - 03cf 8100 clr $ACC0 - 03d0 195c lrri $AC0.L, @$AR2 - 03d1 009b 0005 lri $AX1.H, #0x0005 - 03d3 0099 5555 lri $AX1.L, #0x5555 - 03d5 0080 0d08 lri $AR0, #0x0d08 - 03d7 1104 03da bloopi #0x04, 0x03da - 03d9 195f lrri $AC1.M, @$AR2 - 03da 1b1f srri @$AR0, $AC1.M - 03db 0081 0cc0 lri $AR1, #0x0cc0 - 03dd 0084 0d08 lri $IX0, #0x0d08 - 03df 0087 1000 lri $IX3, #0x1000 - 03e1 1112 03f2 bloopi #0x12, 0x03f2 - 03e3 4a00 addax $ACC0, $AX1.L - 03e4 1c1e mrr $AR0, $AC0.M - 03e5 0010 addarn $AR0, $IX0 - 03e6 8900 clr $ACC1 - 03e7 1fbc mrr $AC1.L, $AC0.L - 03e8 1577 lsr $ACC1, #-9 - 03e9 1512 lsl $ACC1, #18 - 03ea 1c7f mrr $AR3, $AC1.M - 03eb 001f addarn $AR3, $IX3 - 03ec 80c3 nx'ld : $AX0.L, $AX1.L, @$AR3 - 03ed 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 03ee 97c3 mulmv'ld $AX0.L, $AX0.H, $ACC1 : $AX0.L, $AX1.L, @$AR3 - 03ef 95c3 mulac'ld $AX0.L, $AX0.H, $ACC1 : $AX0.L, $AX1.L, @$AR3 - 03f0 9500 mulac $AX0.L, $AX0.H, $ACC1 - 03f1 4f00 addp $ACC1 - 03f2 1b3f srri @$AR1, $AC1.M - 03f3 0004 dar $AR0 - 03f4 0006 dar $AR2 - 03f5 189f lrrd $AC1.M, @$AR0 - 03f6 1adf srrd @$AR2, $AC1.M - 03f7 189f lrrd $AC1.M, @$AR0 - 03f8 1adf srrd @$AR2, $AC1.M - 03f9 189f lrrd $AC1.M, @$AR0 - 03fa 1adf srrd @$AR2, $AC1.M - 03fb 189f lrrd $AC1.M, @$AR0 - 03fc 1adf srrd @$AR2, $AC1.M - 03fd 1adc srrd @$AR2, $AC0.L - 03fe 8d00 set15 - 03ff 0081 033d lri $AR1, #0x033d - 0401 0082 0240 lri $AR2, #0x0240 - 0403 00c3 0cd7 lr $AR3, @0x0cd7 - 0405 177f callr $AR3 - 0406 00f8 034d sr @0x034d, $AX0.L - 0408 0081 033f lri $AR1, #0x033f - 040a 0082 0ac0 lri $AR2, #0x0ac0 - 040c 00c3 0cd8 lr $AR3, @0x0cd8 - 040e 177f callr $AR3 - 040f 00f8 0351 sr @0x0351, $AX0.L - 0411 0081 0341 lri $AR1, #0x0341 - 0413 0082 0264 lri $AR2, #0x0264 - 0415 00c3 0cd9 lr $AR3, @0x0cd9 - 0417 177f callr $AR3 - 0418 00f8 034e sr @0x034e, $AX0.L - 041a 0081 0343 lri $AR1, #0x0343 - 041c 0082 0ae4 lri $AR2, #0x0ae4 - 041e 00c3 0cda lr $AR3, @0x0cda - 0420 177f callr $AR3 - 0421 00f8 0352 sr @0x0352, $AX0.L - 0423 0081 0345 lri $AR1, #0x0345 - 0425 0082 0288 lri $AR2, #0x0288 - 0427 00c3 0cdb lr $AR3, @0x0cdb - 0429 177f callr $AR3 - 042a 00f8 034f sr @0x034f, $AX0.L - 042c 0081 0347 lri $AR1, #0x0347 - 042e 0082 0b08 lri $AR2, #0x0b08 - 0430 00c3 0cdc lr $AR3, @0x0cdc - 0432 177f callr $AR3 - 0433 00f8 0353 sr @0x0353, $AX0.L - 0435 0081 0349 lri $AR1, #0x0349 - 0437 0082 02ac lri $AR2, #0x02ac - 0439 00c3 0cdd lr $AR3, @0x0cdd - 043b 177f callr $AR3 - 043c 00f8 0350 sr @0x0350, $AX0.L - 043e 0081 034b lri $AR1, #0x034b - 0440 0082 0b2c lri $AR2, #0x0b2c - 0442 00c3 0cde lr $AR3, @0x0cde - 0444 177f callr $AR3 - 0445 00f8 0354 sr @0x0354, $AX0.L - } - 0447 00de 02f2 lr $AC0.M, @0x02f2 - 0449 b100 tst $ACC0 - 044a 0295 046a jz 0x046a - 044c 00de 02f5 lr $AC0.M, @0x02f5 - 044e 00df 02f7 lr $AC1.M, @0x02f7 - 0450 8200 cmp - 0451 0293 0456 jle 0x0456 - 0453 7800 decm $AC0.M - 0454 029f 0459 jmp 0x0459 - 0456 0295 0459 jz 0x0459 - 0458 7400 incm $AC0.M - 0459 00fe 02f5 sr @0x02f5, $AC0.M - 045b 00de 02f6 lr $AC0.M, @0x02f6 - 045d 00df 02f8 lr $AC1.M, @0x02f8 - 045f 8200 cmp - 0460 0293 0465 jle 0x0465 - 0462 7800 decm $AC0.M - 0463 029f 0468 jmp 0x0468 - 0465 0295 0468 jz 0x0468 - 0467 7400 incm $AC0.M - - 0468 00fe 02f6 sr @0x02f6, $AC0.M - 046a 8e00 set16 -} - - 046b 8100 clr $ACC0 - 046c 00de 02f2 lr $AC0.M, @0x02f2 - 046e b100 tst $ACC0 - 046f 0295 047f jz 0x047f - 0471 00de 02f3 lr $AC0.M, @0x02f3 - 0473 00dc 02f4 lr $AC0.L, @0x02f4 - 0475 2ece srs @DSMAH, $AC0.M - 0476 2ccf srs @DSMAL, $AC0.L - 0477 16cd 0ca0 si @DSPA, #0x0ca0 - 0479 16c9 0001 si @DSCR, #0x0001 - 047b 16cb 0040 si @DSBL, #0x0040 - 047d 02bf 0084 call 0084_WaitForDMACompletion() // from 0x0CA0 to mem32[0x02F3], 64 bytes - - 047f 8100 clr $ACC0 - 0480 8900 clr $ACC1 - 0481 00de 02d2 lr $AC0.M, @0x02d2 - 0483 00df 02d3 lr $AC1.M, @0x02d3 - 0485 2ece srs @DSMAH, $AC0.M - 0486 2fcf srs @DSMAL, $AC1.M - 0487 16cd 02d0 si @DSPA, #0x02d0 - 0489 16c9 0001 si @DSCR, #0x0001 - 048b 16cb 0140 si @DSBL, #0x0140 - 048d 02bf 0084 call 0084_WaitForDMACompletion() // from 0x02D0 to mem32[0x02D2], 0x140 bytes - 048f 8100 clr $ACC0 - 0490 00de 02d0 lr $AC0.M, @0x02d0 - 0492 00dc 02d1 lr $AC0.L, @0x02d1 - 0494 b100 tst $ACC0 - 0495 0294 0283 jnz 0x0283 // if (mem32[0x02D0] != 0) do the whole thing again; - - 0497 00c0 0cd2 lr $AR0, @0x0cd2 // restore AR0; - 0499 029f 006f jmp 006f_MailHandler() -} - - -void 049b_Cmd_5() { - 049b 8e00 set16 - 049c 00c4 0ce6 lr $IX0, @0x0ce6 - 049e 1905 lrri $IX1, @$AR0 - 049f 00e5 0ce6 sr @0x0ce6, $IX1 - 04a1 0086 0400 lri $IX2, #0x0400 - 04a3 8100 clr $ACC0 - 04a4 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 04a5 191c lrri $AC0.L, @$AR0 - 04a6 2ece srs @DSMAH, $AC0.M - 04a7 2ccf srs @DSMAL, $AC0.L - 04a8 1fc6 mrr $AC0.M, $IX2 - 04a9 2ecd srs @DSPA, $AC0.M - 04aa 16c9 0001 si @DSCR, #0x0001 - 04ac 16cb 0480 si @DSBL, #0x0480 - 04ae 02bf 0084 call 0084_WaitForDMACompletion() - 04b0 02bf 04e6 call 0x04e6 - 04b2 029f 006f jmp 006f_MailHandler() -} - -void 04b4_Cmd_6() { - 04b4 8e00 set16 - 04b5 00c4 0ce7 lr $IX0, @0x0ce7 - 04b7 1905 lrri $IX1, @$AR0 - 04b8 00e5 0ce7 sr @0x0ce7, $IX1 - 04ba 0086 0640 lri $IX2, #0x0640 - 04bc 8100 clr $ACC0 - 04bd 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 04be 191c lrri $AC0.L, @$AR0 - 04bf 2ece srs @DSMAH, $AC0.M - 04c0 2ccf srs @DSMAL, $AC0.L - 04c1 1fc6 mrr $AC0.M, $IX2 - 04c2 2ecd srs @DSPA, $AC0.M - 04c3 16c9 0001 si @DSCR, #0x0001 - 04c5 16cb 0480 si @DSBL, #0x0480 - 04c7 02bf 0084 call 0084_WaitForDMACompletion() - 04c9 02bf 04e6 call 0x04e6 - 04cb 029f 006f jmp 006f_MailHandler() -} - -// Command #7 - Set output buffer address -// AXList data: -// - command (2) -// - something (2) -// - Left/Right(?) output buffer address (4) -// - Right/Left(?) output buffer address (4) -// -void 04cd_Cmd_7() { - 04cd 8e00 set16 - 04ce 00c4 0ce8 lr $IX0, @0x0ce8 - 04d0 1905 lrri $IX1, @$AR0 - 04d1 00e5 0ce8 sr @0x0ce8, $IX1 // mem16[0x0CE8] = mem16[0x0C01]; - 04d3 0086 0880 lri $IX2, #0x0880 - 04d5 8100 clr $ACC0 - 04d6 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 04d7 191c lrri $AC0.L, @$AR0 - 04d8 2ece srs @DSMAH, $AC0.M - 04d9 2ccf srs @DSMAL, $AC0.L - 04da 1fc6 mrr $AC0.M, $IX2 - 04db 2ecd srs @DSPA, $AC0.M - 04dc 16c9 0001 si @DSCR, #0x0001 - 04de 16cb 0480 si @DSBL, #0x0480 // dma from 0x0880 to mem32[0x0C02], 1152 bytes. - 04e0 02bf 0084 call 0084_WaitForDMACompletion() - 04e2 02bf 04e6 call 0x04e6 - 04e4 029f 006f jmp 006f_MailHandler() -} - -void 04e6_Unk() { - 04e6 8b00 m0 - 04e7 8100 clr $ACC0 - 04e8 1fc4 mrr $AC0.M, $IX0 - 04e9 1fe5 mrr $AC1.M, $IX1 - 04ea 5d00 sub $ACC1, $ACC0 - 04eb 009a 02ab lri $AX0.H, #0x02ab - 04ed 009b 02aa lri $AX1.H, #0x02aa - 04ef 0081 0d08 lri $AR1, #0x0d08 - 04f1 d000 mulc $AC1.M, $AX0.H - 04f2 d400 mulcac $AC1.M, $AX0.H, $ACC0 - 04f3 111f 04f7 bloopi #0x1f, 0x04f7 - 04f5 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 04f6 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 04f7 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 04f8 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 04f9 4e31 addp's $ACC0 : @$AR1, $AC0.M - 04fa 1b25 srri @$AR1, $IX1 - 04fb 8e00 set16 - 04fc 191f lrri $AC1.M, @$AR0 - 04fd 191d lrri $AC1.L, @$AR0 - 04fe 2fce srs @DSMAH, $AC1.M - 04ff 2dcf srs @DSMAL, $AC1.L - 0500 8900 clr $ACC1 - 0501 1fa6 mrr $AC1.L, $IX2 - 0502 2dcd srs @DSPA, $AC1.L - 0503 16c9 0000 si @DSCR, #0x0000 - 0505 16cb 0480 si @DSBL, #0x0480 - 0507 02bf 0084 call 0084_WaitForDMACompletion() - 0509 00e0 0cd2 sr @0x0cd2, $AR0 - 050b 8f00 set40 - 050c 8d00 set15 - 050d 8a00 m2 - 050e 0080 0d08 lri $AR0, #0x0d08 - 0510 0081 0000 lri $AR1, #0x0000 - 0512 1c41 mrr $AR2, $AR1 - 0513 1c66 mrr $AR3, $IX2 - 0514 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0515 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0516 a000 mulx $AX0.L, $AX1.L - 0517 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0518 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0519 4e00 addp $ACC0 - 051a 4800 addax $ACC0, $AX0.L - 051b 112f 052a bloopi #0x2f, 0x052a - 051d 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 051e 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 051f a000 mulx $AX0.L, $AX1.L - 0520 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0521 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0522 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0523 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0524 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0525 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0526 a000 mulx $AX0.L, $AX1.L - 0527 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0528 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0529 4e3a addp's $ACC0 : @$AR2, $AC1.M - 052a 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 052b 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 052c 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 052d a000 mulx $AX0.L, $AX1.L - 052e af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 052f 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0530 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0531 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0532 1b5f srri @$AR2, $AC1.M - 0533 1b5d srri @$AR2, $AC1.L - 0534 0080 0d08 lri $AR0, #0x0d08 - 0536 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0537 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0538 a000 mulx $AX0.L, $AX1.L - 0539 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 053a 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 053b 4e00 addp $ACC0 - 053c 4800 addax $ACC0, $AX0.L - 053d 112f 054c bloopi #0x2f, 0x054c - 053f 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0540 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0541 a000 mulx $AX0.L, $AX1.L - 0542 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0543 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0544 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0545 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0546 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0547 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0548 a000 mulx $AX0.L, $AX1.L - 0549 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 054a 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 054b 4e3a addp's $ACC0 : @$AR2, $AC1.M - 054c 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 054d 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 054e 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 054f a000 mulx $AX0.L, $AX1.L - 0550 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0551 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0552 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0553 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0554 1b5f srri @$AR2, $AC1.M - 0555 1b5d srri @$AR2, $AC1.L - 0556 0080 0d08 lri $AR0, #0x0d08 - 0558 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0559 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 055a a000 mulx $AX0.L, $AX1.L - 055b ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 055c 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 055d 4e00 addp $ACC0 - 055e 4800 addax $ACC0, $AX0.L - 055f 112f 056e bloopi #0x2f, 0x056e - 0561 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0562 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0563 a000 mulx $AX0.L, $AX1.L - 0564 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0565 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0566 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0567 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0568 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0569 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 056a a000 mulx $AX0.L, $AX1.L - 056b ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 056c 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 056d 4e3a addp's $ACC0 : @$AR2, $AC1.M - 056e 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 056f 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0570 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0571 a000 mulx $AX0.L, $AX1.L - 0572 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0573 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0574 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0575 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0576 1b5f srri @$AR2, $AC1.M - 0577 1b5d srri @$AR2, $AC1.L - 0578 00c0 0cd2 lr $AR0, @0x0cd2 - 057a 02df ret -} - -void 057b_Cmd_A() { - 057b 8d00 set15 - 057c 8f00 set40 - 057d 8a00 m2 - 057e 8900 clr $ACC1 - 057f 8168 clr'l $ACC0 : $AC1.L, @$AR0 - 0580 0098 0000 lri $AX0.L, #0x0000 - 0582 0099 0001 lri $AX1.L, #0x0001 - 0584 0081 0000 lri $AR1, #0x0000 - 0586 193e lrri $AC0.M, @$AR1 - 0587 193c lrri $AC0.L, @$AR1 - 0588 1160 0593 bloopi #0x60, 0x0593 - 058a a100 tstaxl $ACC0 - 058b 8271 cmp'l : $AC0.M, @$AR1 - 058c 0277 ifc - 058d 1f19 mrr $AX0.L, $AX1.L - 058e 193c lrri $AC0.L, @$AR1 - 058f a100 tstaxl $ACC0 - 0590 8271 cmp'l : $AC0.M, @$AR1 - 0591 0277 ifc - 0592 1f19 mrr $AX0.L, $AX1.L - 0593 193c lrri $AC0.L, @$AR1 - 0594 1fd8 mrr $AC0.M, $AX0.L - 0595 b100 tst $ACC0 - 0596 0294 05c0 jnz 0x05c0 - 0598 00de 0ce4 lr $AC0.M, @0x0ce4 - 059a b100 tst $ACC0 - 059b 0294 05a2 jnz 0x05a2 - 059d 191c lrri $AC0.L, @$AR0 - 059e 191c lrri $AC0.L, @$AR0 - 059f 191c lrri $AC0.L, @$AR0 - 05a0 029f 006f jmp 006f_MailHandler() - 05a2 8b00 m0 - 05a3 7a00 dec $ACC0 - 05a4 00fe 0ce4 sr @0x0ce4, $AC0.M - 05a6 8400 clrp - 05a7 0099 00c0 lri $AX1.L, #0x00c0 - 05a9 1f1e mrr $AX0.L, $AC0.M - 05aa a000 mulx $AX0.L, $AX1.L - 05ab 191e lrri $AC0.M, @$AR0 - 05ac 191e lrri $AC0.M, @$AR0 - 05ad 191c lrri $AC0.L, @$AR0 - 05ae 00e0 0cd2 sr @0x0cd2, $AR0 - 05b0 009a 0000 lri $AX0.H, #0x0000 - 05b2 0098 0840 lri $AX0.L, #0x0840 - 05b4 4e00 addp $ACC0 - 05b5 4800 addax $ACC0, $AX0.L - 05b6 2ece srs @DSMAH, $AC0.M - 05b7 2ccf srs @DSMAL, $AC0.L - 05b8 16cd 0d08 si @DSPA, #0x0d08 - 05ba 16c9 0000 si @DSCR, #0x0000 - 05bc 16cb 00c0 si @DSBL, #0x00c0 - 05be 029f 05d6 jmp 0x05d6 - 05c0 8b00 m0 - 05c1 00d8 0ce4 lr $AX0.L, @0x0ce4 - 05c3 0099 00c0 lri $AX1.L, #0x00c0 - 05c5 a000 mulx $AX0.L, $AX1.L - 05c6 191e lrri $AC0.M, @$AR0 - 05c7 00fe 0ce4 sr @0x0ce4, $AC0.M - 05c9 191e lrri $AC0.M, @$AR0 - 05ca 191c lrri $AC0.L, @$AR0 - 05cb 00e0 0cd2 sr @0x0cd2, $AR0 - 05cd 4e00 addp $ACC0 - 05ce 2ece srs @DSMAH, $AC0.M - 05cf 2ccf srs @DSMAL, $AC0.L - 05d0 16cd 0d08 si @DSPA, #0x0d08 - 05d2 16c9 0000 si @DSCR, #0x0000 - 05d4 16cb 00c0 si @DSBL, #0x00c0 - 05d6 02bf 0084 call 0084_WaitForDMACompletion() - 05d8 8a48 m2'l : $AX1.L, @$AR0 - 05d9 0083 0d08 lri $AR3, #0x0d08 - 05db 0080 0000 lri $AR0, #0x0000 - 05dd 0081 0000 lri $AR1, #0x0000 - 05df 1979 lrri $AX1.L, @$AR3 - 05e0 193a lrri $AX0.H, @$AR1 - 05e1 b041 mulx'l $AX0.H, $AX1.L : $AX0.L, @$AR1 - 05e2 a64b mulxmv'l $AX0.L, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 05e3 f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 05e4 b441 mulxac'l $AX0.H, $AX1.L, $ACC0 : $AX0.L, @$AR1 - 05e5 9100 asr16 $ACC0 - 05e6 1130 05ef bloopi #0x30, 0x05ef - 05e8 a792 mulxmv'sl $AX0.L, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 05e9 f151 lsl16'l $ACC1 : $AX0.H, @$AR1 - 05ea b520 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR0, $AC0.L - 05eb 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 05ec a693 mulxmv'sl $AX0.L, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 05ed f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 05ee b428 mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC1.L - 05ef 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 05f0 0083 0d08 lri $AR3, #0x0d08 - 05f2 0080 00c0 lri $AR0, #0x00c0 - 05f4 0081 00c0 lri $AR1, #0x00c0 - 05f6 1979 lrri $AX1.L, @$AR3 - 05f7 193a lrri $AX0.H, @$AR1 - 05f8 b041 mulx'l $AX0.H, $AX1.L : $AX0.L, @$AR1 - 05f9 a64b mulxmv'l $AX0.L, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 05fa f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 05fb b441 mulxac'l $AX0.H, $AX1.L, $ACC0 : $AX0.L, @$AR1 - 05fc 9100 asr16 $ACC0 - 05fd 1130 0606 bloopi #0x30, 0x0606 - 05ff a792 mulxmv'sl $AX0.L, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 0600 f151 lsl16'l $ACC1 : $AX0.H, @$AR1 - 0601 b520 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR0, $AC0.L - 0602 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0603 a693 mulxmv'sl $AX0.L, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 0604 f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 0605 b428 mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC1.L - 0606 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0607 00c0 0cd2 lr $AR0, @0x0cd2 - 0609 029f 006f jmp 006f_MailHandler() -} - -void 060b_Cmd_B() { - 060b 8e48 set16'l : $AX1.L, @$AR0 - 060c 8b70 m0'l : $AC0.M, @$AR0 - 060d 8960 clr'l $ACC1 : $AC0.L, @$AR0 - 060e 00e0 0cd2 sr @0x0cd2, $AR0 - 0610 2ece srs @DSMAH, $AC0.M - 0611 2ccf srs @DSMAL, $AC0.L - 0612 16cd 0180 si @DSPA, #0x0180 - 0614 16c9 0001 si @DSCR, #0x0001 - 0616 16cb 0180 si @DSBL, #0x0180 - 0618 8100 clr $ACC0 - 0619 00de 0ce5 lr $AC0.M, @0x0ce5 - 061b 1ff9 mrr $AC1.M, $AX1.L - 061c 5d00 sub $ACC1, $ACC0 - 061d 00f9 0ce5 sr @0x0ce5, $AX1.L - 061f 009a 02ab lri $AX0.H, #0x02ab - 0621 009b 02aa lri $AX1.H, #0x02aa - 0623 0081 0d08 lri $AR1, #0x0d08 - 0625 d000 mulc $AC1.M, $AX0.H - 0626 d400 mulcac $AC1.M, $AX0.H, $ACC0 - 0627 111f 062b bloopi #0x1f, 0x062b - 0629 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 062a d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 062b d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 062c dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 062d 4e31 addp's $ACC0 : @$AR1, $AC0.M - 062e 1b39 srri @$AR1, $AX1.L - 062f 02bf 0084 call 0084_WaitForDMACompletion() - 0631 8f00 set40 - 0632 8d00 set15 - 0633 8a00 m2 - 0634 0080 0d08 lri $AR0, #0x0d08 - 0636 0081 0400 lri $AR1, #0x0400 - 0638 0083 0000 lri $AR3, #0x0000 - 063a 0082 00c0 lri $AR2, #0x00c0 - 063c 1918 lrri $AX0.L, @$AR0 - 063d 195b lrri $AX1.H, @$AR2 - 063e 1959 lrri $AX1.L, @$AR2 - 063f a000 mulx $AX0.L, $AX1.L - 0640 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0641 9100 asr16 $ACC0 - 0642 4e5b addp'l $ACC0 : $AX1.H, @$AR3 - 0643 f04b lsl16'l $ACC0 : $AX1.L, @$AR3 - 0644 115f 064f bloopi #0x5f, 0x064f - 0646 a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 0647 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0648 9140 asr16'l $ACC0 : $AX0.L, @$AR0 - 0649 4e5a addp'l $ACC0 : $AX1.H, @$AR2 - 064a f04a lsl16'l $ACC0 : $AX1.L, @$AR2 - 064b a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 064c ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 064d 9100 asr16 $ACC0 - 064e 4e5b addp'l $ACC0 : $AX1.H, @$AR3 - 064f f04b lsl16'l $ACC0 : $AX1.L, @$AR3 - 0650 a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 0651 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0652 9100 asr16 $ACC0 - 0653 4e00 addp $ACC0 - 0654 f000 lsl16 $ACC0 - 0655 1b3e srri @$AR1, $AC0.M - 0656 8e00 set16 - 0657 00c0 0cd2 lr $AR0, @0x0cd2 - 0659 191e lrri $AC0.M, @$AR0 - 065a 191c lrri $AC0.L, @$AR0 - 065b 2ece srs @DSMAH, $AC0.M - 065c 2ccf srs @DSMAL, $AC0.L - 065d 16cd 0400 si @DSPA, #0x0400 - 065f 16c9 0001 si @DSCR, #0x0001 - 0661 16cb 0180 si @DSBL, #0x0180 - 0663 02bf 0084 call 0084_WaitForDMACompletion() - 0665 16fc dcd1 si @DMBH, #0xdcd1 <--------------!!! - 0667 16fd 0004 si @DMBL, #0x0004 <--------------!!! - 0669 16fb 0001 si @DIRQ, #0x0001 <--------------!!! - 066b 26fc lrs $AC0.M, @DMBH - 066c 02a0 8000 andf $AC0.M, #0x8000 - 066e 029c 066b jlnz 0x066b - 0670 029f 006f jmp 006f_MailHandler() -} - -// Command 0xE - AXList end -void 0672_Cmd_E() { - 0672 16fc dcd1 si @DMBH, #0xdcd1 - 0674 16fd 0002 si @DMBL, #0x0002 - 0676 16fb 0001 si @DIRQ, #0x0001 // send a 0xDCD10002 and trigger an IRQ - 0678 029f 0f9b jmp 0x0f9b - 067a 029f 004c jmp 0x004c -} - -void 067c_Cmd_D() { - 067c 8c00 clr15 - 067d 8a00 m2 - 067e 8f00 set40 - 067f 0081 0ac0 lri $AR1, #0x0ac0 - 0681 0082 0240 lri $AR2, #0x0240 - 0683 1fa1 mrr $AC1.L, $AR1 - 0684 1112 0689 bloopi #0x12, 0x0689 - 0686 195e lrri $AC0.M, @$AR2 - 0687 195c lrri $AC0.L, @$AR2 - 0688 f000 lsl16 $ACC0 - 0689 1b3e srri @$AR1, $AC0.M - 068a 191e lrri $AC0.M, @$AR0 - 068b 191c lrri $AC0.L, @$AR0 - 068c 2ece srs @DSMAH, $AC0.M - 068d 2ccf srs @DSMAL, $AC0.L - 068e 2dcd srs @DSPA, $AC1.L - 068f 1103 06a2 bloopi #0x03, 0x06a2 - 0691 16c9 0001 si @DSCR, #0x0001 - 0693 16cb 0024 si @DSBL, #0x0024 - 0695 1fa1 mrr $AC1.L, $AR1 - 0696 1112 069b bloopi #0x12, 0x069b - 0698 195e lrri $AC0.M, @$AR2 - 0699 195c lrri $AC0.L, @$AR2 - 069a f000 lsl16 $ACC0 - 069b 1b3e srri @$AR1, $AC0.M - 069c 02bf 0084 call 0084_WaitForDMACompletion() - 069e 191e lrri $AC0.M, @$AR0 - 069f 191c lrri $AC0.L, @$AR0 - 06a0 2ece srs @DSMAH, $AC0.M - 06a1 2ccf srs @DSMAL, $AC0.L - 06a2 2dcd srs @DSPA, $AC1.L - 06a3 16c9 0001 si @DSCR, #0x0001 - 06a5 16cb 0024 si @DSBL, #0x0024 - 06a7 02bf 0084 call 0084_WaitForDMACompletion() - 06a9 029f 006f jmp 006f_MailHandler() -} - -void 06ab_unknown() { - 06ab 0087 ffff lri $IX3, #0xffff - 06ad 1c83 mrr $IX0, $AR3 - 06ae 197e lrri $AC0.M, @$AR3 - 06af 80e1 nx'ld : $AX0.H, $AX1.L, @$AR1 - 06b0 b04f mulx'ln $AX0.H, $AX1.L : $AX1.L, @$AR3 - 06b1 1f5e mrr $AX0.H, $AC0.M - 06b2 e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 06b3 b64f mulxmv'ln $AX0.H, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 06b4 1f5e mrr $AX0.H, $AC0.M - 06b5 e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 06b6 112f 06bd bloopi #0x2f, 0x06bd - 06b8 b79a mulxmv'slm $AX0.H, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 06b9 1f5f mrr $AX0.H, $AC1.M - 06ba e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 06bb b69b mulxmv'slm $AX0.H, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 06bc 1f5e mrr $AX0.H, $AC0.M - 06bd e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 06be 6f30 movp's $ACC1 : @$AR0, $AC0.M - 06bf 1b1f srri @$AR0, $AC1.M - 06c0 1c64 mrr $AR3, $IX0 - 06c1 1b7f srri @$AR3, $AC1.M - 06c2 02df ret -} - -void 06c3_Unknown() { - 06c3 8c00 clr15 - 06c4 8b00 m0 - 06c5 1ca0 mrr $IX1, $AR0 - 06c6 0083 0370 lri $AR3, #0x0370 - 06c8 191a lrri $AX0.H, @$AR0 - 06c9 1918 lrri $AX0.L, @$AR0 - 06ca 1b7a srri @$AR3, $AX0.H - 06cb 1b78 srri @$AR3, $AX0.L - 06cc 1919 lrri $AX1.L, @$AR0 - 06cd 191b lrri $AX1.H, @$AR0 - 06ce 0083 0d03 lri $AR3, #0x0d03 - 06d0 1105 06d3 bloopi #0x05, 0x06d3 - 06d2 191a lrri $AX0.H, @$AR0 - 06d3 1b7a srri @$AR3, $AX0.H - 06d4 0080 0d03 lri $AR0, #0x0d03 - 06d6 0088 0004 lri $WR0, #0x0004 - 06d8 0083 0370 lri $AR3, #0x0370 - 06da 008b 0001 lri $WR3, #0x0001 - 06dc 0087 0000 lri $IX3, #0x0000 - 06de 193f lrri $AC1.M, @$AR1 - 06df 191a lrri $AX0.H, @$AR0 - 06e0 d0c3 mulc'ld $AC1.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06e1 f2cb madd'ldm $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06e2 f2a9 madd'lsm $AX0.L, $AX0.H : $AX0.H, $AC1.M - 06e3 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 06e4 e379 maddx'l $AX0.H, $AX1.H : $AC1.M, @$AR1 - 06e5 6e50 movp'l $ACC0 : $AX0.H, @$AR0 - 06e6 1482 asl $ACC0, #2 - 06e7 fc00 clrl $AC1.L - 06e8 1f7e mrr $AX1.H, $AC0.M - 06e9 1b5e srri @$AR2, $AC0.M - 06ea 112f 06ff bloopi #0x2f, 0x06ff - 06ec d0c3 mulc'ld $AC1.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06ed f2cb madd'ldm $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06ee f2a9 madd'lsm $AX0.L, $AX0.H : $AX0.H, $AC1.M - 06ef e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 06f0 e279 maddx'l $AX0.H, $AX1.L : $AC1.M, @$AR1 - 06f1 6e50 movp'l $ACC0 : $AX0.H, @$AR0 - 06f2 1482 asl $ACC0, #2 - 06f3 fc00 clrl $AC1.L - 06f4 1f3e mrr $AX1.L, $AC0.M - 06f5 1b5e srri @$AR2, $AC0.M - 06f6 d0c3 mulc'ld $AC1.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06f7 f2cb madd'ldm $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 06f8 f2a9 madd'lsm $AX0.L, $AX0.H : $AX0.H, $AC1.M - 06f9 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 06fa e379 maddx'l $AX0.H, $AX1.H : $AC1.M, @$AR1 - 06fb 6e50 movp'l $ACC0 : $AX0.H, @$AR0 - 06fc 1482 asl $ACC0, #2 - 06fd fc00 clrl $AC1.L - 06fe 1f7e mrr $AX1.H, $AC0.M - 06ff 1b5e srri @$AR2, $AC0.M - 0700 d0c3 mulc'ld $AC1.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0701 f2cb madd'ldm $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0702 f2a9 madd'lsm $AX0.L, $AX0.H : $AX0.H, $AC1.M - 0703 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0704 e200 maddx $AX0.H, $AX1.L - 0705 6e00 movp $ACC0 - 0706 1482 asl $ACC0, #2 - 0707 fc00 clrl $AC1.L - 0708 1f3e mrr $AX1.L, $AC0.M - 0709 1b5e srri @$AR2, $AC0.M - 070a 0088 ffff lri $WR0, #0xffff - 070c 008b ffff lri $WR3, #0xffff - 070e 1c05 mrr $AR0, $IX1 - 070f 0083 0370 lri $AR3, #0x0370 - 0711 197a lrri $AX0.H, @$AR3 - 0712 1978 lrri $AX0.L, @$AR3 - 0713 1b1a srri @$AR0, $AX0.H - 0714 1b18 srri @$AR0, $AX0.L - 0715 1b19 srri @$AR0, $AX1.L - 0716 1b1b srri @$AR0, $AX1.H - 0717 8d00 set15 - 0718 8a00 m2 - 0719 02df ret -} - -// Sample rate converter #0 - None -// - 071a 02bf 07e6 call 0x07e6_SetupAccelerator() - 071c 8c00 clr15 - 071d 8a00 m2 - 071e 8f00 set40 - // Read ratio - 071f 195b lrri $AX1.H, @$AR2 - 0720 1959 lrri $AX1.L, @$AR2 - 0721 8100 clr $ACC0 - // Read cur_addr fractional part - 0722 195c lrri $AC0.L, @$AR2 - 0723 0080 0d08 lri $AR0, #0x0d08 - 0725 0088 0003 lri $WR0, #0x0003 - // Read the last samples, copy them to 0x0D08 - 0727 195f lrri $AC1.M, @$AR2 - 0728 1b1f srri @$AR0, $AC1.M - 0729 195f lrri $AC1.M, @$AR2 - 072a 1b1f srri @$AR0, $AC1.M - 072b 195f lrri $AC1.M, @$AR2 - 072c 1b1f srri @$AR0, $AC1.M - 072d 195f lrri $AC1.M, @$AR2 - 072e 1b1f srri @$AR0, $AC1.M - - 072f 0081 0c60 lri $AR1, #0x0c60 - 0731 0082 ffdd lri $AR2, #0xffdd - 0733 00c7 0ce0 lr $IX3, @0x0ce0 - 0735 4a00 addax $ACC0, $AX1.L - 0736 1160 074a bloopi #0x60, 0x074a - 0738 8912 clr'mv $ACC1 : $AX0.L, $AC0.M - 0739 1fbc mrr $AC1.L, $AC0.L - 073a 1577 lsr $ACC1, #-9 - 073b 1512 lsl $ACC1, #18 - 073c 1c7f mrr $AR3, $AC1.M - 073d 001f addarn $AR3, $IX3 - 073e 0078 0743 bloop $AX0.L, 0x0743 - 0740 185a lrr $AX0.H, @$AR2 - 0741 1b1a srri @$AR0, $AX0.H - 0742 5000 subr $ACC0, $AX0.L - 0743 1f1d mrr $AX0.L, $AC1.L - 0744 4ac3 addax'ld $ACC0, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0745 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0746 97c3 mulmv'ld $AX0.L, $AX0.H, $ACC1 : $AX0.L, $AX1.L, @$AR3 - 0747 95c3 mulac'ld $AX0.L, $AX0.H, $ACC1 : $AX0.L, $AX1.L, @$AR3 - 0748 9500 mulac $AX0.L, $AX0.H, $ACC1 - 0749 4f00 addp $ACC1 - 074a 1b3f srri @$AR1, $AC1.M - 074b 5a00 subax $ACC0, $AX1.L - 074c 0004 dar $AR0 - 074d 0082 0329 lri $AR2, #0x0329 - 074f 189f lrrd $AC1.M, @$AR0 - 0750 1adf srrd @$AR2, $AC1.M - 0751 189f lrrd $AC1.M, @$AR0 - 0752 1adf srrd @$AR2, $AC1.M - 0753 189f lrrd $AC1.M, @$AR0 - 0754 1adf srrd @$AR2, $AC1.M - 0755 189f lrrd $AC1.M, @$AR0 - 0756 1adf srrd @$AR2, $AC1.M - 0757 0088 ffff lri $WR0, #0xffff - 0759 1adc srrd @$AR2, $AC0.L - 075a 0082 0322 lri $AR2, #0x0322 - 075c 27dc lrs $AC1.M, @yn2 - 075d 1adf srrd @$AR2, $AC1.M - 075e 27db lrs $AC1.M, @yn1 - 075f 1adf srrd @$AR2, $AC1.M - 0760 27da lrs $AC1.M, @pred_scale - 0761 1adf srrd @$AR2, $AC1.M - 0762 0082 030e lri $AR2, #0x030e - 0764 27d9 lrs $AC1.M, @ACCAL - 0765 1adf srrd @$AR2, $AC1.M - 0766 27d8 lrs $AC1.M, @ACCAH - 0767 1adf srrd @$AR2, $AC1.M - 0768 8e00 set16 - 0769 8b00 m0 - 076a 02df ret - -// Sample rate converter #1 - ? -// - 076b 02bf 07e6 call 0x07e6_SetupAccelerator() - 076d 8d00 set15 - 076e 8b00 m0 - 076f 8f00 set40 - 0770 195b lrri $AX1.H, @$AR2 - 0771 1945 lrri $IX1, @$AR2 - 0772 8100 clr $ACC0 - 0773 195c lrri $AC0.L, @$AR2 - 0774 0080 0d08 lri $AR0, #0x0d08 - 0776 0088 0003 lri $WR0, #0x0003 - 0778 0084 0003 lri $IX0, #0x0003 - 077a 195f lrri $AC1.M, @$AR2 - 077b 1b1f srri @$AR0, $AC1.M - 077c 195f lrri $AC1.M, @$AR2 - 077d 1b1f srri @$AR0, $AC1.M - 077e 195f lrri $AC1.M, @$AR2 - 077f 1b1f srri @$AR0, $AC1.M - 0780 195f lrri $AC1.M, @$AR2 - 0781 1b1f srri @$AR0, $AC1.M - 0782 0081 0c60 lri $AR1, #0x0c60 - 0784 0082 ffdd lri $AR2, #0xffdd - 0786 1f25 mrr $AX1.L, $IX1 - 0787 4a00 addax $ACC0, $AX1.L - 0788 1160 079f bloopi #0x60, 0x079f - 078a 8912 clr'mv $ACC1 : $AX0.L, $AC0.M - 078b 0078 0790 bloop $AX0.L, 0x0790 - 078d 185a lrr $AX0.H, @$AR2 - 078e 1b1a srri @$AR0, $AX0.H - 078f 5000 subr $ACC0, $AX0.L - 0790 1f1f mrr $AX0.L, $AC1.M - 0791 7c00 neg $ACC0 - 0792 b114 tst'mv $ACC0 : $AX1.L, $AC0.L - 0793 0294 0799 jnz 0x0799 - 0795 191f lrri $AC1.M, @$AR0 - 0796 0010 addarn $AR0, $IX0 - 0797 029f 079e jmp 0x079e - 0799 7c50 neg'l $ACC0 : $AX0.H, @$AR0 - 079a b014 mulx'mv $AX0.H, $AX1.L : $AX1.L, $AC0.L - 079b 199a lrrn $AX0.H, @$AR0 - 079c b700 mulxmv $AX0.H, $AX1.L, $ACC1 - 079d 4f00 addp $ACC1 - 079e 1f25 mrr $AX1.L, $IX1 - 079f 4a39 addax's $ACC0, $AX1.L : @$AR1, $AC1.M - 07a0 5a00 subax $ACC0, $AX1.L - 07a1 0004 dar $AR0 - 07a2 0082 0329 lri $AR2, #0x0329 - 07a4 189f lrrd $AC1.M, @$AR0 - 07a5 1adf srrd @$AR2, $AC1.M - 07a6 189f lrrd $AC1.M, @$AR0 - 07a7 1adf srrd @$AR2, $AC1.M - 07a8 189f lrrd $AC1.M, @$AR0 - 07a9 1adf srrd @$AR2, $AC1.M - 07aa 189f lrrd $AC1.M, @$AR0 - 07ab 1adf srrd @$AR2, $AC1.M - 07ac 0088 ffff lri $WR0, #0xffff - 07ae 1adc srrd @$AR2, $AC0.L - 07af 0082 0322 lri $AR2, #0x0322 - 07b1 27dc lrs $AC1.M, @yn2 - 07b2 1adf srrd @$AR2, $AC1.M - 07b3 27db lrs $AC1.M, @yn1 - 07b4 1adf srrd @$AR2, $AC1.M - 07b5 27da lrs $AC1.M, @pred_scale - 07b6 1adf srrd @$AR2, $AC1.M - 07b7 0082 030e lri $AR2, #0x030e - 07b9 27d9 lrs $AC1.M, @ACCAL - 07ba 1adf srrd @$AR2, $AC1.M - 07bb 27d8 lrs $AC1.M, @ACCAH - 07bc 1adf srrd @$AR2, $AC1.M - 07bd 8e00 set16 - 07be 8c00 clr15 - 07bf 02df ret - -// Sample rate converter #2 - No sample rate conversion -// Just copies 96 bytes of data to the output buffer -// - 07c0 02bf 07e6 call 0x07e6_SetupAccelerator() - 07c2 0080 0c60 lri $AR0, #0x0c60 - 07c4 0082 ffdd lri $AR2, #0xffdd // 0xFFDD: ACDAT - 07c6 1160 07cb bloopi #0x60, 0x07cb - 07c8 1844 lrr $IX0, @$AR2 // Load a sample from accelerator - 07c9 1b04 srri @$AR0, $IX0 // and store it to 0x0C60+ - 07ca 0000 nop - 07cb 0000 nop - 07cc 0004 dar $AR0 - // Save the 4 last samples in the PB - 07cd 0082 0329 lri $AR2, #0x0329 - 07cf 189f lrrd $AC1.M, @$AR0 - 07d0 1adf srrd @$AR2, $AC1.M - 07d1 189f lrrd $AC1.M, @$AR0 - 07d2 1adf srrd @$AR2, $AC1.M - 07d3 189f lrrd $AC1.M, @$AR0 - 07d4 1adf srrd @$AR2, $AC1.M - 07d5 189f lrrd $AC1.M, @$AR0 - 07d6 1adf srrd @$AR2, $AC1.M - // Save the accelerator regs in the PB - 07d7 0082 0322 lri $AR2, #0x0322 - // YN1 and YN2 - 07d9 27dc lrs $AC1.M, @yn2 - 07da 1adf srrd @$AR2, $AC1.M - 07db 27db lrs $AC1.M, @yn1 - 07dc 1adf srrd @$AR2, $AC1.M - // Pred scale - 07dd 27da lrs $AC1.M, @pred_scale - 07de 1adf srrd @$AR2, $AC1.M - 07df 0082 030e lri $AR2, #0x030e - // Current address - 07e1 27d9 lrs $AC1.M, @ACCAL - 07e2 1adf srrd @$AR2, $AC1.M - 07e3 27d8 lrs $AC1.M, @ACCAH - 07e4 1adf srrd @$AR2, $AC1.M - 07e5 02df ret - -// Called by the three sample rate converters above. -// Sets up the accelerator so that it can be used to -// read the audio data. -// The accelerator area is set to be the same length -// as the sound data being played, so that looping -// will be handled by exception vector #5 (ACCOV). -// Parameters: None -// Return: AR0 = 0x0328 -// -07e6_SetupAccelerator() -{ - // Set the accelerator regs from the PB - 07e6 0082 0308 lri $AR2, #0x0308 - // Sample format - 07e8 195e lrri $AC0.M, @$AR2 - 07e9 2ed1 srs @SampleFormat, $AC0.M - // Start address - 07ea 195e lrri $AC0.M, @$AR2 - 07eb 2ed4 srs @ACSAH, $AC0.M - 07ec 195e lrri $AC0.M, @$AR2 - 07ed 2ed5 srs @ACSAL, $AC0.M - // End address - 07ee 195e lrri $AC0.M, @$AR2 - 07ef 2ed6 srs @ACEAH, $AC0.M - 07f0 195e lrri $AC0.M, @$AR2 - 07f1 2ed7 srs @ACEAL, $AC0.M - // Current address - 07f2 195e lrri $AC0.M, @$AR2 - 07f3 2ed8 srs @ACCAH, $AC0.M - 07f4 195e lrri $AC0.M, @$AR2 - 07f5 2ed9 srs @ACCAL, $AC0.M - // 16 coefs - 07f6 195e lrri $AC0.M, @$AR2 - 07f7 2ea0 srs @COEF_A1_0, $AC0.M - 07f8 195e lrri $AC0.M, @$AR2 - 07f9 2ea1 srs @COEF_A2_0, $AC0.M - 07fa 195e lrri $AC0.M, @$AR2 - 07fb 2ea2 srs @COEF_A1_1, $AC0.M - 07fc 195e lrri $AC0.M, @$AR2 - 07fd 2ea3 srs @COEF_A2_1, $AC0.M - 07fe 195e lrri $AC0.M, @$AR2 - 07ff 2ea4 srs @COEF_A1_2, $AC0.M - 0800 195e lrri $AC0.M, @$AR2 - 0801 2ea5 srs @COEF_A2_2, $AC0.M - 0802 195e lrri $AC0.M, @$AR2 - 0803 2ea6 srs @COEF_A1_3, $AC0.M - 0804 195e lrri $AC0.M, @$AR2 - 0805 2ea7 srs @COEF_A2_3, $AC0.M - 0806 195e lrri $AC0.M, @$AR2 - 0807 2ea8 srs @COEF_A1_4, $AC0.M - 0808 195e lrri $AC0.M, @$AR2 - 0809 2ea9 srs @COEF_A2_4, $AC0.M - 080a 195e lrri $AC0.M, @$AR2 - 080b 2eaa srs @COEF_A1_5, $AC0.M - 080c 195e lrri $AC0.M, @$AR2 - 080d 2eab srs @COEF_A2_5, $AC0.M - 080e 195e lrri $AC0.M, @$AR2 - 080f 2eac srs @COEF_A1_6, $AC0.M - 0810 195e lrri $AC0.M, @$AR2 - 0811 2ead srs @COEF_A2_6, $AC0.M - 0812 195e lrri $AC0.M, @$AR2 - 0813 2eae srs @COEF_A1_7, $AC0.M - 0814 195e lrri $AC0.M, @$AR2 - 0815 2eaf srs @COEF_A2_7, $AC0.M - // Gain - 0816 195e lrri $AC0.M, @$AR2 - 0817 2ede srs @GAIN, $AC0.M - // Pred scale - 0818 195e lrri $AC0.M, @$AR2 - 0819 2eda srs @pred_scale, $AC0.M - // YN1 and YN2 - 081a 195e lrri $AC0.M, @$AR2 - 081b 2edb srs @yn1, $AC0.M - 081c 195e lrri $AC0.M, @$AR2 - 081d 2edc srs @yn2, $AC0.M - 081e 02df ret -} - -// Volume_0_0 - 081f 02df ret - -// Volume_0_1 - 0820 00c0 0ce2 lr $AR0, @0x0ce2 - 0822 0081 02da lri $AR1, #0x02da - 0824 0082 0000 lri $AR2, #0x0000 - 0826 1c62 mrr $AR3, $AR2 - 0827 02bf 0bd1 call 0bd1_ApplyVolume1(mem16[0x0ce2], 0x02da, 0x0000, 0x0000) - 0829 00f8 02f9 sr @0x02f9, $AX0.L // uh? the last is saved in updates field? - 082b 02df ret - - 082c 00c0 0ce3 lr $AR0, @0x0ce3 - 082e 0081 02dc lri $AR1, #0x02dc - 0830 0082 00c0 lri $AR2, #0x00c0 - 0832 1c62 mrr $AR3, $AR2 - 0833 02bf 0bd1 call 0bd1_Unknown() - 0835 00f8 02fd sr @0x02fd, $AX0.L - 0837 02df ret - - 0838 00c0 0ce2 lr $AR0, @0x0ce2 - 083a 0081 02da lri $AR1, #0x02da - 083c 0082 0000 lri $AR2, #0x0000 - 083e 1c62 mrr $AR3, $AR2 - 083f 00c4 0ce3 lr $IX0, @0x0ce3 - 0841 0085 00c0 lri $IX1, #0x00c0 - 0843 02bf 0beb call 0x0beb - 0845 00f8 02f9 sr @0x02f9, $AX0.L - 0847 00fb 02fd sr @0x02fd, $AX1.H - 0849 02df ret - - 084a 00c0 0ce2 lr $AR0, @0x0ce2 - 084c 0081 02da lri $AR1, #0x02da - 084e 0082 0000 lri $AR2, #0x0000 - 0850 0083 0d08 lri $AR3, #0x0d08 - 0852 00c4 0ce3 lr $IX0, @0x0ce3 - 0854 0085 00c0 lri $IX1, #0x00c0 - 0856 02bf 0c51 call 0x0c51 - 0858 00f8 02f9 sr @0x02f9, $AX0.L - 085a 00fb 02fd sr @0x02fd, $AX1.H - 085c 02df ret - - 085d 00c0 0ce1 lr $AR0, @0x0ce1 - 085f 0081 02ea lri $AR1, #0x02ea - 0861 0082 0180 lri $AR2, #0x0180 - 0863 1c62 mrr $AR3, $AR2 - 0864 02bf 0bd1 call 0bd1_Unknown() - 0866 00f8 0301 sr @0x0301, $AX0.L - 0868 02df ret - - 0869 00c0 0ce1 lr $AR0, @0x0ce1 - 086b 0081 02ea lri $AR1, #0x02ea - 086d 0082 0180 lri $AR2, #0x0180 - 086f 1c62 mrr $AR3, $AR2 - 0870 02bf 0bd1 call 0bd1_Unknown() - 0872 00f8 0301 sr @0x0301, $AX0.L - 0874 029f 0820 jmp 0x0820 - 0876 00c0 0ce1 lr $AR0, @0x0ce1 - 0878 0081 02ea lri $AR1, #0x02ea - 087a 0082 0180 lri $AR2, #0x0180 - 087c 1c62 mrr $AR3, $AR2 - 087d 02bf 0bd1 call 0bd1_Unknown() - 087f 00f8 0301 sr @0x0301, $AX0.L - 0881 029f 082c jmp 0x082c - 0883 00c0 0ce1 lr $AR0, @0x0ce1 - 0885 0081 02ea lri $AR1, #0x02ea - 0887 0082 0180 lri $AR2, #0x0180 - 0889 1c62 mrr $AR3, $AR2 - 088a 02bf 0bd1 call 0bd1_Unknown() - 088c 00f8 0301 sr @0x0301, $AX0.L - 088e 029f 0838 jmp 0x0838 - 0890 00c0 0ce1 lr $AR0, @0x0ce1 - 0892 0081 02ea lri $AR1, #0x02ea - 0894 0082 0180 lri $AR2, #0x0180 - 0896 1c62 mrr $AR3, $AR2 - 0897 02bf 0bd1 call 0bd1_Unknown() - 0899 00f8 0301 sr @0x0301, $AX0.L - 089b 029f 084a jmp 0x084a - 089d 00c0 0ce1 lr $AR0, @0x0ce1 - 089f 0081 02ea lri $AR1, #0x02ea - 08a1 0082 0180 lri $AR2, #0x0180 - 08a3 0083 0d08 lri $AR3, #0x0d08 - 08a5 02bf 0c21 call 0c21_Unknown() - 08a7 00f8 0301 sr @0x0301, $AX0.L - 08a9 02df ret - - 08aa 00c0 0ce1 lr $AR0, @0x0ce1 - 08ac 0081 02ea lri $AR1, #0x02ea - 08ae 0082 0180 lri $AR2, #0x0180 - 08b0 0083 0d08 lri $AR3, #0x0d08 - 08b2 02bf 0c21 call 0c21_Unknown() - 08b4 00f8 0301 sr @0x0301, $AX0.L - 08b6 029f 0820 jmp 0x0820 - 08b8 00c0 0ce1 lr $AR0, @0x0ce1 - 08ba 0081 02ea lri $AR1, #0x02ea - 08bc 0082 0180 lri $AR2, #0x0180 - 08be 0083 0d08 lri $AR3, #0x0d08 - 08c0 02bf 0c21 call 0c21_Unknown() - 08c2 00f8 0301 sr @0x0301, $AX0.L - 08c4 029f 082c jmp 0x082c - 08c6 00c0 0ce1 lr $AR0, @0x0ce1 - 08c8 0081 02ea lri $AR1, #0x02ea - 08ca 0082 0180 lri $AR2, #0x0180 - 08cc 0083 0d08 lri $AR3, #0x0d08 - 08ce 02bf 0c21 call 0c21_Unknown() - 08d0 00f8 0301 sr @0x0301, $AX0.L - 08d2 029f 0838 jmp 0x0838 - 08d4 00c0 0ce1 lr $AR0, @0x0ce1 - 08d6 0081 02ea lri $AR1, #0x02ea - 08d8 0082 0180 lri $AR2, #0x0180 - 08da 0083 0d08 lri $AR3, #0x0d08 - 08dc 02bf 0c21 call 0c21_Unknown() - 08de 00f8 0301 sr @0x0301, $AX0.L - 08e0 029f 084a jmp 0x084a - 08e2 00c0 0ce2 lr $AR0, @0x0ce2 - 08e4 0081 02de lri $AR1, #0x02de - 08e6 0082 0400 lri $AR2, #0x0400 - 08e8 1c62 mrr $AR3, $AR2 - 08e9 02bf 0bd1 call 0bd1_Unknown() - 08eb 00f8 02fa sr @0x02fa, $AX0.L - 08ed 02df ret - - 08ee 00c0 0ce3 lr $AR0, @0x0ce3 - 08f0 0081 02e0 lri $AR1, #0x02e0 - 08f2 0082 04c0 lri $AR2, #0x04c0 - 08f4 1c62 mrr $AR3, $AR2 - 08f5 02bf 0bd1 call 0bd1_Unknown() - 08f7 00f8 02fe sr @0x02fe, $AX0.L - 08f9 02df ret - - 08fa 00c0 0ce2 lr $AR0, @0x0ce2 - 08fc 0081 02de lri $AR1, #0x02de - 08fe 0082 0400 lri $AR2, #0x0400 - 0900 1c62 mrr $AR3, $AR2 - 0901 00c4 0ce3 lr $IX0, @0x0ce3 - 0903 0085 04c0 lri $IX1, #0x04c0 - 0905 02bf 0beb call 0x0beb - 0907 00f8 02fa sr @0x02fa, $AX0.L - 0909 00fb 02fe sr @0x02fe, $AX1.H - 090b 02df ret - - 090c 00c0 0ce2 lr $AR0, @0x0ce2 - 090e 0081 02de lri $AR1, #0x02de - 0910 0082 0400 lri $AR2, #0x0400 - 0912 0083 0d08 lri $AR3, #0x0d08 - 0914 00c4 0ce3 lr $IX0, @0x0ce3 - 0916 0085 04c0 lri $IX1, #0x04c0 - 0918 02bf 0c51 call 0x0c51 - 091a 00f8 02fa sr @0x02fa, $AX0.L - 091c 00fb 02fe sr @0x02fe, $AX1.H - 091e 02df ret - - 091f 00c0 0ce1 lr $AR0, @0x0ce1 - 0921 0081 02ec lri $AR1, #0x02ec - 0923 0082 0580 lri $AR2, #0x0580 - 0925 1c62 mrr $AR3, $AR2 - 0926 02bf 0bd1 call 0bd1_Unknown() - 0928 00f8 0302 sr @0x0302, $AX0.L - 092a 02df ret - - 092b 00c0 0ce1 lr $AR0, @0x0ce1 - 092d 0081 02ec lri $AR1, #0x02ec - 092f 0082 0580 lri $AR2, #0x0580 - 0931 1c62 mrr $AR3, $AR2 - 0932 02bf 0bd1 call 0bd1_Unknown() - 0934 00f8 0302 sr @0x0302, $AX0.L - 0936 029f 08e2 jmp 0x08e2 - 0938 00c0 0ce1 lr $AR0, @0x0ce1 - 093a 0081 02ec lri $AR1, #0x02ec - 093c 0082 0580 lri $AR2, #0x0580 - 093e 1c62 mrr $AR3, $AR2 - 093f 02bf 0bd1 call 0bd1_Unknown() - 0941 00f8 0302 sr @0x0302, $AX0.L - 0943 029f 08ee jmp 0x08ee - 0945 00c0 0ce1 lr $AR0, @0x0ce1 - 0947 0081 02ec lri $AR1, #0x02ec - 0949 0082 0580 lri $AR2, #0x0580 - 094b 1c62 mrr $AR3, $AR2 - 094c 02bf 0bd1 call 0bd1_Unknown() - 094e 00f8 0302 sr @0x0302, $AX0.L - 0950 029f 08fa jmp 0x08fa - 0952 00c0 0ce1 lr $AR0, @0x0ce1 - 0954 0081 02ec lri $AR1, #0x02ec - 0956 0082 0580 lri $AR2, #0x0580 - 0958 1c62 mrr $AR3, $AR2 - 0959 02bf 0bd1 call 0bd1_Unknown() - 095b 00f8 0302 sr @0x0302, $AX0.L - 095d 029f 090c jmp 0x090c - 095f 00c0 0ce1 lr $AR0, @0x0ce1 - 0961 0081 02ec lri $AR1, #0x02ec - 0963 0082 0580 lri $AR2, #0x0580 - 0965 0083 0d08 lri $AR3, #0x0d08 - 0967 02bf 0c21 call 0c21_Unknown() - 0969 00f8 0302 sr @0x0302, $AX0.L - 096b 02df ret - - 096c 00c0 0ce1 lr $AR0, @0x0ce1 - 096e 0081 02ec lri $AR1, #0x02ec - 0970 0082 0580 lri $AR2, #0x0580 - 0972 0083 0d08 lri $AR3, #0x0d08 - 0974 02bf 0c21 call 0c21_Unknown() - 0976 00f8 0302 sr @0x0302, $AX0.L - 0978 029f 08e2 jmp 0x08e2 - 097a 00c0 0ce1 lr $AR0, @0x0ce1 - 097c 0081 02ec lri $AR1, #0x02ec - 097e 0082 0580 lri $AR2, #0x0580 - 0980 0083 0d08 lri $AR3, #0x0d08 - 0982 02bf 0c21 call 0c21_Unknown() - 0984 00f8 0302 sr @0x0302, $AX0.L - 0986 029f 08ee jmp 0x08ee - 0988 00c0 0ce1 lr $AR0, @0x0ce1 - 098a 0081 02ec lri $AR1, #0x02ec - 098c 0082 0580 lri $AR2, #0x0580 - 098e 0083 0d08 lri $AR3, #0x0d08 - 0990 02bf 0c21 call 0c21_Unknown() - 0992 00f8 0302 sr @0x0302, $AX0.L - 0994 029f 08fa jmp 0x08fa - 0996 00c0 0ce1 lr $AR0, @0x0ce1 - 0998 0081 02ec lri $AR1, #0x02ec - 099a 0082 0580 lri $AR2, #0x0580 - 099c 0083 0d08 lri $AR3, #0x0d08 - 099e 02bf 0c21 call 0c21_Unknown() - 09a0 00f8 0302 sr @0x0302, $AX0.L - 09a2 029f 090c jmp 0x090c - 09a4 00c0 0ce2 lr $AR0, @0x0ce2 - 09a6 0081 02e2 lri $AR1, #0x02e2 - 09a8 0082 0640 lri $AR2, #0x0640 - 09aa 1c62 mrr $AR3, $AR2 - 09ab 02bf 0bd1 call 0bd1_Unknown() - 09ad 00f8 02fb sr @0x02fb, $AX0.L - 09af 02df ret - - 09b0 00c0 0ce3 lr $AR0, @0x0ce3 - 09b2 0081 02e4 lri $AR1, #0x02e4 - 09b4 0082 0700 lri $AR2, #0x0700 - 09b6 1c62 mrr $AR3, $AR2 - 09b7 02bf 0bd1 call 0bd1_Unknown() - 09b9 00f8 02ff sr @0x02ff, $AX0.L - 09bb 02df ret - - 09bc 00c0 0ce2 lr $AR0, @0x0ce2 - 09be 0081 02e2 lri $AR1, #0x02e2 - 09c0 0082 0640 lri $AR2, #0x0640 - 09c2 1c62 mrr $AR3, $AR2 - 09c3 00c4 0ce3 lr $IX0, @0x0ce3 - 09c5 0085 0700 lri $IX1, #0x0700 - 09c7 02bf 0beb call 0x0beb - 09c9 00f8 02fb sr @0x02fb, $AX0.L - 09cb 00fb 02ff sr @0x02ff, $AX1.H - 09cd 02df ret - - 09ce 00c0 0ce2 lr $AR0, @0x0ce2 - 09d0 0081 02e2 lri $AR1, #0x02e2 - 09d2 0082 0640 lri $AR2, #0x0640 - 09d4 0083 0d08 lri $AR3, #0x0d08 - 09d6 00c4 0ce3 lr $IX0, @0x0ce3 - 09d8 0085 0700 lri $IX1, #0x0700 - 09da 02bf 0c51 call 0x0c51 - 09dc 00f8 02fb sr @0x02fb, $AX0.L - 09de 00fb 02ff sr @0x02ff, $AX1.H - 09e0 02df ret - - 09e1 00c0 0ce1 lr $AR0, @0x0ce1 - 09e3 0081 02ee lri $AR1, #0x02ee - 09e5 0082 07c0 lri $AR2, #0x07c0 - 09e7 1c62 mrr $AR3, $AR2 - 09e8 02bf 0bd1 call 0bd1_Unknown() - 09ea 00f8 0303 sr @0x0303, $AX0.L - 09ec 02df ret - - 09ed 00c0 0ce1 lr $AR0, @0x0ce1 - 09ef 0081 02ee lri $AR1, #0x02ee - 09f1 0082 07c0 lri $AR2, #0x07c0 - 09f3 1c62 mrr $AR3, $AR2 - 09f4 02bf 0bd1 call 0bd1_Unknown() - 09f6 00f8 0303 sr @0x0303, $AX0.L - 09f8 029f 09a4 jmp 0x09a4 - 09fa 00c0 0ce1 lr $AR0, @0x0ce1 - 09fc 0081 02ee lri $AR1, #0x02ee - 09fe 0082 07c0 lri $AR2, #0x07c0 - 0a00 1c62 mrr $AR3, $AR2 - 0a01 02bf 0bd1 call 0bd1_Unknown() - 0a03 00f8 0303 sr @0x0303, $AX0.L - 0a05 029f 09b0 jmp 0x09b0 - 0a07 00c0 0ce1 lr $AR0, @0x0ce1 - 0a09 0081 02ee lri $AR1, #0x02ee - 0a0b 0082 07c0 lri $AR2, #0x07c0 - 0a0d 1c62 mrr $AR3, $AR2 - 0a0e 02bf 0bd1 call 0bd1_Unknown() - 0a10 00f8 0303 sr @0x0303, $AX0.L - 0a12 029f 09bc jmp 0x09bc - 0a14 00c0 0ce1 lr $AR0, @0x0ce1 - 0a16 0081 02ee lri $AR1, #0x02ee - 0a18 0082 07c0 lri $AR2, #0x07c0 - 0a1a 1c62 mrr $AR3, $AR2 - 0a1b 02bf 0bd1 call 0bd1_Unknown() - 0a1d 00f8 0303 sr @0x0303, $AX0.L - 0a1f 029f 09ce jmp 0x09ce - 0a21 00c0 0ce1 lr $AR0, @0x0ce1 - 0a23 0081 02ee lri $AR1, #0x02ee - 0a25 0082 07c0 lri $AR2, #0x07c0 - 0a27 0083 0d08 lri $AR3, #0x0d08 - 0a29 02bf 0c21 call 0c21_Unknown() - 0a2b 00f8 0303 sr @0x0303, $AX0.L - 0a2d 02df ret - - 0a2e 00c0 0ce1 lr $AR0, @0x0ce1 - 0a30 0081 02ee lri $AR1, #0x02ee - 0a32 0082 07c0 lri $AR2, #0x07c0 - 0a34 0083 0d08 lri $AR3, #0x0d08 - 0a36 02bf 0c21 call 0c21_Unknown() - 0a38 00f8 0303 sr @0x0303, $AX0.L - 0a3a 029f 09a4 jmp 0x09a4 - 0a3c 00c0 0ce1 lr $AR0, @0x0ce1 - 0a3e 0081 02ee lri $AR1, #0x02ee - 0a40 0082 07c0 lri $AR2, #0x07c0 - 0a42 0083 0d08 lri $AR3, #0x0d08 - 0a44 02bf 0c21 call 0c21_Unknown() - 0a46 00f8 0303 sr @0x0303, $AX0.L - 0a48 029f 09b0 jmp 0x09b0 - 0a4a 00c0 0ce1 lr $AR0, @0x0ce1 - 0a4c 0081 02ee lri $AR1, #0x02ee - 0a4e 0082 07c0 lri $AR2, #0x07c0 - 0a50 0083 0d08 lri $AR3, #0x0d08 - 0a52 02bf 0c21 call 0c21_Unknown() - 0a54 00f8 0303 sr @0x0303, $AX0.L - 0a56 029f 09bc jmp 0x09bc - 0a58 00c0 0ce1 lr $AR0, @0x0ce1 - 0a5a 0081 02ee lri $AR1, #0x02ee - 0a5c 0082 07c0 lri $AR2, #0x07c0 - 0a5e 0083 0d08 lri $AR3, #0x0d08 - 0a60 02bf 0c21 call 0c21_Unknown() - 0a62 00f8 0303 sr @0x0303, $AX0.L - 0a64 029f 09ce jmp 0x09ce - 0a66 00c0 0ce2 lr $AR0, @0x0ce2 - 0a68 0081 02e6 lri $AR1, #0x02e6 - 0a6a 0082 0880 lri $AR2, #0x0880 - 0a6c 1c62 mrr $AR3, $AR2 - 0a6d 02bf 0bd1 call 0bd1_Unknown() - 0a6f 00f8 02fc sr @0x02fc, $AX0.L - 0a71 02df ret - - 0a72 00c0 0ce3 lr $AR0, @0x0ce3 - 0a74 0081 02e8 lri $AR1, #0x02e8 - 0a76 0082 0940 lri $AR2, #0x0940 - 0a78 1c62 mrr $AR3, $AR2 - 0a79 02bf 0bd1 call 0bd1_Unknown() - 0a7b 00f8 0300 sr @0x0300, $AX0.L - 0a7d 02df ret - - 0a7e 00c0 0ce2 lr $AR0, @0x0ce2 - 0a80 0081 02e6 lri $AR1, #0x02e6 - 0a82 0082 0880 lri $AR2, #0x0880 - 0a84 1c62 mrr $AR3, $AR2 - 0a85 00c4 0ce3 lr $IX0, @0x0ce3 - 0a87 0085 0940 lri $IX1, #0x0940 - 0a89 02bf 0beb call 0x0beb - 0a8b 00f8 02fc sr @0x02fc, $AX0.L - 0a8d 00fb 0300 sr @0x0300, $AX1.H - 0a8f 02df ret - - 0a90 00c0 0ce2 lr $AR0, @0x0ce2 - 0a92 0081 02e6 lri $AR1, #0x02e6 - 0a94 0082 0880 lri $AR2, #0x0880 - 0a96 0083 0d08 lri $AR3, #0x0d08 - 0a98 00c4 0ce3 lr $IX0, @0x0ce3 - 0a9a 0085 0940 lri $IX1, #0x0940 - 0a9c 02bf 0c51 call 0x0c51 - 0a9e 00f8 02fc sr @0x02fc, $AX0.L - 0aa0 00fb 0300 sr @0x0300, $AX1.H - 0aa2 02df ret - 0aa3 00c0 0ce1 lr $AR0, @0x0ce1 - 0aa5 0081 02f0 lri $AR1, #0x02f0 - 0aa7 0082 0a00 lri $AR2, #0x0a00 - 0aa9 1c62 mrr $AR3, $AR2 - 0aaa 02bf 0bd1 call 0bd1_Unknown() - 0aac 00f8 0304 sr @0x0304, $AX0.L - 0aae 02df ret - - 0aaf 00c0 0ce1 lr $AR0, @0x0ce1 - 0ab1 0081 02f0 lri $AR1, #0x02f0 - 0ab3 0082 0a00 lri $AR2, #0x0a00 - 0ab5 1c62 mrr $AR3, $AR2 - 0ab6 02bf 0bd1 call 0bd1_Unknown() - 0ab8 00f8 0304 sr @0x0304, $AX0.L - 0aba 029f 0a66 jmp 0x0a66 - 0abc 00c0 0ce1 lr $AR0, @0x0ce1 - 0abe 0081 02f0 lri $AR1, #0x02f0 - 0ac0 0082 0a00 lri $AR2, #0x0a00 - 0ac2 1c62 mrr $AR3, $AR2 - 0ac3 02bf 0bd1 call 0bd1_Unknown() - 0ac5 00f8 0304 sr @0x0304, $AX0.L - 0ac7 029f 0a72 jmp 0x0a72 - 0ac9 00c0 0ce1 lr $AR0, @0x0ce1 - 0acb 0081 02f0 lri $AR1, #0x02f0 - 0acd 0082 0a00 lri $AR2, #0x0a00 - 0acf 1c62 mrr $AR3, $AR2 - 0ad0 02bf 0bd1 call 0bd1_Unknown() - 0ad2 00f8 0304 sr @0x0304, $AX0.L - 0ad4 029f 0a7e jmp 0x0a7e - 0ad6 00c0 0ce1 lr $AR0, @0x0ce1 - 0ad8 0081 02f0 lri $AR1, #0x02f0 - 0ada 0082 0a00 lri $AR2, #0x0a00 - 0adc 1c62 mrr $AR3, $AR2 - 0add 02bf 0bd1 call 0bd1_Unknown() - 0adf 00f8 0304 sr @0x0304, $AX0.L - 0ae1 029f 0a90 jmp 0x0a90 - 0ae3 00c0 0ce1 lr $AR0, @0x0ce1 - 0ae5 0081 02f0 lri $AR1, #0x02f0 - 0ae7 0082 0a00 lri $AR2, #0x0a00 - 0ae9 0083 0d08 lri $AR3, #0x0d08 - 0aeb 02bf 0c21 call 0c21_Unknown() - 0aed 00f8 0304 sr @0x0304, $AX0.L - 0aef 02df ret - - 0af0 00c0 0ce1 lr $AR0, @0x0ce1 - 0af2 0081 02f0 lri $AR1, #0x02f0 - 0af4 0082 0a00 lri $AR2, #0x0a00 - 0af6 0083 0d08 lri $AR3, #0x0d08 - 0af8 02bf 0c21 call 0c21_Unknown() - 0afa 00f8 0304 sr @0x0304, $AX0.L - 0afc 029f 0a66 jmp 0x0a66 - 0afe 00c0 0ce1 lr $AR0, @0x0ce1 - 0b00 0081 02f0 lri $AR1, #0x02f0 - 0b02 0082 0a00 lri $AR2, #0x0a00 - 0b04 0083 0d08 lri $AR3, #0x0d08 - 0b06 02bf 0c21 call 0c21_Unknown() - 0b08 00f8 0304 sr @0x0304, $AX0.L - 0b0a 029f 0a72 jmp 0x0a72 - 0b0c 00c0 0ce1 lr $AR0, @0x0ce1 - 0b0e 0081 02f0 lri $AR1, #0x02f0 - 0b10 0082 0a00 lri $AR2, #0x0a00 - 0b12 0083 0d08 lri $AR3, #0x0d08 - 0b14 02bf 0c21 call 0c21_Unknown() - 0b16 00f8 0304 sr @0x0304, $AX0.L - 0b18 029f 0a7e jmp 0x0a7e - 0b1a 00c0 0ce1 lr $AR0, @0x0ce1 - 0b1c 0081 02f0 lri $AR1, #0x02f0 - 0b1e 0082 0a00 lri $AR2, #0x0a00 - 0b20 0083 0d08 lri $AR3, #0x0d08 - 0b22 02bf 0c21 call 0c21_Unknown() - 0b24 00f8 0304 sr @0x0304, $AX0.L - 0b26 029f 0a90 jmp 0x0a90 - 0b28 00c0 0ce1 lr $AR0, @0x0ce1 - 0b2a 0081 02e6 lri $AR1, #0x02e6 - 0b2c 0082 0880 lri $AR2, #0x0880 - 0b2e 1c62 mrr $AR3, $AR2 - 0b2f 02bf 0bd1 call 0bd1_Unknown() - 0b31 00f8 02fc sr @0x02fc, $AX0.L - 0b33 02df ret - - 0b34 00c0 0ce1 lr $AR0, @0x0ce1 - 0b36 0081 02e8 lri $AR1, #0x02e8 - 0b38 0082 0940 lri $AR2, #0x0940 - 0b3a 1c62 mrr $AR3, $AR2 - 0b3b 02bf 0bd1 call 0bd1_Unknown() - 0b3d 00f8 0300 sr @0x0300, $AX0.L - 0b3f 02df ret - - 0b40 00c0 0ce1 lr $AR0, @0x0ce1 - 0b42 0081 02e6 lri $AR1, #0x02e6 - 0b44 0082 0880 lri $AR2, #0x0880 - 0b46 1c62 mrr $AR3, $AR2 - 0b47 00c4 0ce1 lr $IX0, @0x0ce1 - 0b49 0085 0940 lri $IX1, #0x0940 - 0b4b 02bf 0beb call 0x0beb - 0b4d 00f8 02fc sr @0x02fc, $AX0.L - 0b4f 00fb 0300 sr @0x0300, $AX1.H - 0b51 02df ret - -void 0b52_Maybe_Mixer() { - 0b52 00c0 0ce1 lr $AR0, @0x0ce1 - 0b54 0081 02e6 lri $AR1, #0x02e6 - 0b56 0082 0880 lri $AR2, #0x0880 - 0b58 0083 0d08 lri $AR3, #0x0d08 - 0b5a 00c4 0ce1 lr $IX0, @0x0ce1 - 0b5c 0085 0940 lri $IX1, #0x0940 - 0b5e 02bf 0c51 call 0x0c51 - 0b60 00f8 02fc sr @0x02fc, $AX0.L - 0b62 00fb 0300 sr @0x0300, $AX1.H - 0b64 02df ret - 0b65 00c0 0ce1 lr $AR0, @0x0ce1 - 0b67 0081 02f0 lri $AR1, #0x02f0 - 0b69 0082 0a00 lri $AR2, #0x0a00 - 0b6b 1c62 mrr $AR3, $AR2 - 0b6c 02bf 0bd1 call 0bd1_Unknown() - 0b6e 00f8 0304 sr @0x0304, $AX0.L - 0b70 029f 0b28 jmp 0x0b28 - 0b72 00c0 0ce1 lr $AR0, @0x0ce1 - 0b74 0081 02f0 lri $AR1, #0x02f0 - 0b76 0082 0a00 lri $AR2, #0x0a00 - 0b78 1c62 mrr $AR3, $AR2 - 0b79 02bf 0bd1 call 0bd1_Unknown() - 0b7b 00f8 0304 sr @0x0304, $AX0.L - 0b7d 029f 0b34 jmp 0x0b34 - 0b7f 00c0 0ce1 lr $AR0, @0x0ce1 - 0b81 0081 02f0 lri $AR1, #0x02f0 - 0b83 0082 0a00 lri $AR2, #0x0a00 - 0b85 1c62 mrr $AR3, $AR2 - 0b86 02bf 0bd1 call 0bd1_Unknown() - 0b88 00f8 0304 sr @0x0304, $AX0.L - 0b8a 029f 0b40 jmp 0x0b40 - 0b8c 00c0 0ce1 lr $AR0, @0x0ce1 - 0b8e 0081 02f0 lri $AR1, #0x02f0 - 0b90 0082 0a00 lri $AR2, #0x0a00 - 0b92 1c62 mrr $AR3, $AR2 - 0b93 02bf 0bd1 call 0bd1_Unknown() - 0b95 00f8 0304 sr @0x0304, $AX0.L - 0b97 029f 0b52 jmp 0x0b52 - 0b99 00c0 0ce1 lr $AR0, @0x0ce1 - 0b9b 0081 02f0 lri $AR1, #0x02f0 - 0b9d 0082 0a00 lri $AR2, #0x0a00 - 0b9f 0083 0d08 lri $AR3, #0x0d08 - 0ba1 02bf 0c21 call 0c21_Unknown() - 0ba3 00f8 0304 sr @0x0304, $AX0.L - 0ba5 029f 0b28 jmp 0x0b28 - 0ba7 00c0 0ce1 lr $AR0, @0x0ce1 - 0ba9 0081 02f0 lri $AR1, #0x02f0 - 0bab 0082 0a00 lri $AR2, #0x0a00 - 0bad 0083 0d08 lri $AR3, #0x0d08 - 0baf 02bf 0c21 call 0c21_Unknown() - 0bb1 00f8 0304 sr @0x0304, $AX0.L - 0bb3 029f 0b34 jmp 0x0b34 - 0bb5 00c0 0ce1 lr $AR0, @0x0ce1 - 0bb7 0081 02f0 lri $AR1, #0x02f0 - 0bb9 0082 0a00 lri $AR2, #0x0a00 - 0bbb 0083 0d08 lri $AR3, #0x0d08 - 0bbd 02bf 0c21 call 0c21_Unknown() - 0bbf 00f8 0304 sr @0x0304, $AX0.L - 0bc1 029f 0b40 jmp 0x0b40 - 0bc3 00c0 0ce1 lr $AR0, @0x0ce1 - 0bc5 0081 02f0 lri $AR1, #0x02f0 - 0bc7 0082 0a00 lri $AR2, #0x0a00 - 0bc9 0083 0d08 lri $AR3, #0x0d08 - 0bcb 02bf 0c21 call 0c21_Unknown() - 0bcd 00f8 0304 sr @0x0304, $AX0.L - 0bcf 029f 0b52 jmp 0x0b52 -} - -// Volume -// AR0: factor table? -// AR1: factor -// AR2: input -// AR3: output -// returns: last in AX0.L (16 highest bits) -// -// basically: -// for (i = 0; i < 96; i++) -// out[i] = ((in[i*2+1] << 16) + (ar0[i] * factor)) >> 16; -// -// so that you don't bang your head against your keyboard trying to figure -// out those awful pipelined loops (I had to get myself a new head to finish -// this one). :P -// -void 0bd1_ApplyVolume1() { - 0bd1 191a lrri $AX0.H, @$AR0 // ax0.h = mem[ar0++] - 0bd2 1939 lrri $AX1.L, @$AR1 // ax1.l = mem[ar1++] - 0bd3 b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 // = ax0.h * ax1.l; ac0.m = mem[ar2++] - 0bd4 195c lrri $AC0.L, @$AR2 // ac0.l = mem[ar2++] - 0bd5 f07a lsl16'l $ACC0 : $AC1.M, @$AR2 // acc0 <<= 16; ac1.m = mem[ar2++] - 0bd6 191a lrri $AX0.H, @$AR0 // ax0.h = mem[ar0++] - 0bd7 b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 // acc0 += ; = ax0.h * ax1.l; ac1.l = mem[ar2++] - 0bd8 9100 asr16 $ACC0 // acc0 >>= 16 - 0bd9 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M // acc1 <<= 16; ax0.h = mem[ar0++]; mem[ar3++] = ac0.m - 0bda 112f 0be3 bloopi #0x2f, 0x0be3 // for (i = 0; i < 0x2f; i++) - 0bdc b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L // acc1 += ; = ax0.h * ax1.l; mem[ar3++] = ac0.l; - 0bdd 9972 asr16'l $ACC1 : $AC0.M, @$AR2 // acc1 >>= 16; ac0.m = mem[ar2++] - 0bde 195c lrri $AC0.L, @$AR2 // ac0.l = mem[ar2++]; - 0bdf f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M // acc0 <<= 16; ax0.h = mem[ar0++]; mem[ar3++] = ac1.m - 0be0 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L // acc0 += ; = ax0.h * ax1.l; mem[ar3++] = ac1.l; - 0be1 917a asr16'l $ACC0 : $AC1.M, @$AR2 // acc0 >>= 16; ac1.m = mem[ar2++] - 0be2 195d lrri $AC1.L, @$AR2 // ac1.l = mem[ar2++]; - 0be3 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M // acc1 <<= 16; ax0.h = mem[ar0++]; mem[ar3++] = ac0.m - 0be4 1b7c srri @$AR3, $AC0.L // mem[ar3++] = ac0.l; - 0be5 6e00 movp $ACC0 // acc0 = ; - 0be6 4f12 addp'mv $ACC1 : $AX0.L, $AC0.M // acc1 += ; ax0.l = ac0.m; - 0be7 9900 asr16 $ACC1 // acc1 >>= 16; - 0be8 1b7f srri @$AR3, $AC1.M // mem[ar3++] = ac1.m; - 0be9 812b clr's $ACC0 : @$AR3, $AC1.L // acc0 = 0; mem[ar3++] = ac1.l; - 0bea 02df ret -} - - 0beb 191a lrri $AX0.H, @$AR0 - 0bec 1939 lrri $AX1.L, @$AR1 - 0bed b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 - 0bee 195c lrri $AC0.L, @$AR2 - 0bef f07a lsl16'l $ACC0 : $AC1.M, @$AR2 - 0bf0 191a lrri $AX0.H, @$AR0 - 0bf1 b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 - 0bf2 9100 asr16 $ACC0 - 0bf3 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0bf4 112f 0bfd bloopi #0x2f, 0x0bfd - 0bf6 b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0bf7 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0bf8 195c lrri $AC0.L, @$AR2 - 0bf9 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0bfa b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0bfb 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0bfc 195d lrri $AC1.L, @$AR2 - 0bfd f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0bfe 1b7c srri @$AR3, $AC0.L - 0bff 6e00 movp $ACC0 - 0c00 4f12 addp'mv $ACC1 : $AX0.L, $AC0.M - 0c01 9909 asr16'ir $ACC1 : $AR1 - 0c02 1b7f srri @$AR3, $AC1.M - 0c03 1b7d srri @$AR3, $AC1.L - 0c04 1c04 mrr $AR0, $IX0 - 0c05 1c45 mrr $AR2, $IX1 - 0c06 1c62 mrr $AR3, $AR2 - 0c07 191a lrri $AX0.H, @$AR0 - 0c08 1939 lrri $AX1.L, @$AR1 - 0c09 b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 - 0c0a 195c lrri $AC0.L, @$AR2 - 0c0b f07a lsl16'l $ACC0 : $AC1.M, @$AR2 - 0c0c 191a lrri $AX0.H, @$AR0 - 0c0d b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 - 0c0e 9100 asr16 $ACC0 - 0c0f f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c10 112f 0c19 bloopi #0x2f, 0x0c19 - 0c12 b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0c13 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0c14 195c lrri $AC0.L, @$AR2 - 0c15 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0c16 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0c17 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0c18 195d lrri $AC1.L, @$AR2 - 0c19 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c1a 1b7c srri @$AR3, $AC0.L - 0c1b 6e00 movp $ACC0 - 0c1c 4f1e addp'mv $ACC1 : $AX1.H, $AC0.M - 0c1d 9900 asr16 $ACC1 - 0c1e 1b7f srri @$AR3, $AC1.M - 0c1f 1b7d srri @$AR3, $AC1.L - 0c20 02df ret - -void 0c21_Unknown() { - 0c21 1ce3 mrr $IX3, $AR3 - 0c22 8e00 set16 - 0c23 8100 clr $ACC0 - 0c24 8971 clr'l $ACC1 : $AC0.M, @$AR1 - 0c25 18bf lrrd $AC1.M, @$AR1 - 0c26 1b7e srri @$AR3, $AC0.M - 0c27 4c00 add $ACC0, $ACC1 - 0c28 1b7e srri @$AR3, $AC0.M - 0c29 112f 0c2e bloopi #0x2f, 0x0c2e - 0c2b 4c00 add $ACC0, $ACC1 - 0c2c 1b7e srri @$AR3, $AC0.M - 0c2d 4c00 add $ACC0, $ACC1 - 0c2e 1b7e srri @$AR3, $AC0.M - 0c2f 4c00 add $ACC0, $ACC1 - 0c30 1b3e srri @$AR1, $AC0.M - 0c31 1c27 mrr $AR1, $IX3 - 0c32 1c62 mrr $AR3, $AR2 - 0c33 8f50 set40'l : $AX0.H, @$AR0 - 0c34 1939 lrri $AX1.L, @$AR1 - 0c35 b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 - 0c36 195c lrri $AC0.L, @$AR2 - 0c37 f07a lsl16'l $ACC0 : $AC1.M, @$AR2 - 0c38 191a lrri $AX0.H, @$AR0 - 0c39 1939 lrri $AX1.L, @$AR1 - 0c3a b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 - 0c3b 9100 asr16 $ACC0 - 0c3c f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c3d 1939 lrri $AX1.L, @$AR1 - 0c3e 112f 0c49 bloopi #0x2f, 0x0c49 - 0c40 b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0c41 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0c42 195c lrri $AC0.L, @$AR2 - 0c43 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0c44 1939 lrri $AX1.L, @$AR1 - 0c45 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0c46 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0c47 195d lrri $AC1.L, @$AR2 - 0c48 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c49 1939 lrri $AX1.L, @$AR1 - 0c4a 1b7c srri @$AR3, $AC0.L - 0c4b 6e00 movp $ACC0 - 0c4c 4f12 addp'mv $ACC1 : $AX0.L, $AC0.M - 0c4d 9900 asr16 $ACC1 - 0c4e 1b7f srri @$AR3, $AC1.M - 0c4f 1b7d srri @$AR3, $AC1.L - 0c50 02df ret - 0c51 1ce3 mrr $IX3, $AR3 - 0c52 8e00 set16 - 0c53 8100 clr $ACC0 - 0c54 8971 clr'l $ACC1 : $AC0.M, @$AR1 - 0c55 18bf lrrd $AC1.M, @$AR1 - 0c56 1b7e srri @$AR3, $AC0.M - 0c57 4c00 add $ACC0, $ACC1 - 0c58 1b7e srri @$AR3, $AC0.M - 0c59 112f 0c5e bloopi #0x2f, 0x0c5e - 0c5b 4c00 add $ACC0, $ACC1 - 0c5c 1b7e srri @$AR3, $AC0.M - 0c5d 4c00 add $ACC0, $ACC1 - 0c5e 1b7e srri @$AR3, $AC0.M - 0c5f 4c00 add $ACC0, $ACC1 - 0c60 1b3e srri @$AR1, $AC0.M - 0c61 0009 iar $AR1 - 0c62 8100 clr $ACC0 - 0c63 8971 clr'l $ACC1 : $AC0.M, @$AR1 - 0c64 18bf lrrd $AC1.M, @$AR1 - 0c65 1b7e srri @$AR3, $AC0.M - 0c66 4c00 add $ACC0, $ACC1 - 0c67 1b7e srri @$AR3, $AC0.M - 0c68 112f 0c6d bloopi #0x2f, 0x0c6d - 0c6a 4c00 add $ACC0, $ACC1 - 0c6b 1b7e srri @$AR3, $AC0.M - 0c6c 4c00 add $ACC0, $ACC1 - 0c6d 1b7e srri @$AR3, $AC0.M - 0c6e 4c00 add $ACC0, $ACC1 - 0c6f 1b3e srri @$AR1, $AC0.M - 0c70 1c27 mrr $AR1, $IX3 - 0c71 1c62 mrr $AR3, $AR2 - 0c72 8f50 set40'l : $AX0.H, @$AR0 - 0c73 1939 lrri $AX1.L, @$AR1 - 0c74 b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 - 0c75 195c lrri $AC0.L, @$AR2 - 0c76 f07a lsl16'l $ACC0 : $AC1.M, @$AR2 - 0c77 191a lrri $AX0.H, @$AR0 - 0c78 1939 lrri $AX1.L, @$AR1 - 0c79 b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 - 0c7a 9100 asr16 $ACC0 - 0c7b f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c7c 1939 lrri $AX1.L, @$AR1 - 0c7d 112f 0c88 bloopi #0x2f, 0x0c88 - 0c7f b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0c80 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0c81 195c lrri $AC0.L, @$AR2 - 0c82 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0c83 1939 lrri $AX1.L, @$AR1 - 0c84 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0c85 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0c86 195d lrri $AC1.L, @$AR2 - 0c87 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c88 1939 lrri $AX1.L, @$AR1 - 0c89 1b7c srri @$AR3, $AC0.L - 0c8a 6e00 movp $ACC0 - 0c8b 4f12 addp'mv $ACC1 : $AX0.L, $AC0.M - 0c8c 9905 asr16'dr $ACC1 : $AR1 - 0c8d 1b7f srri @$AR3, $AC1.M - 0c8e 1b7d srri @$AR3, $AC1.L - 0c8f 1c04 mrr $AR0, $IX0 - 0c90 1c45 mrr $AR2, $IX1 - 0c91 1c62 mrr $AR3, $AR2 - 0c92 191a lrri $AX0.H, @$AR0 - 0c93 1939 lrri $AX1.L, @$AR1 - 0c94 b072 mulx'l $AX0.H, $AX1.L : $AC0.M, @$AR2 - 0c95 195c lrri $AC0.L, @$AR2 - 0c96 f07a lsl16'l $ACC0 : $AC1.M, @$AR2 - 0c97 191a lrri $AX0.H, @$AR0 - 0c98 1939 lrri $AX1.L, @$AR1 - 0c99 b46a mulxac'l $AX0.H, $AX1.L, $ACC0 : $AC1.L, @$AR2 - 0c9a 9100 asr16 $ACC0 - 0c9b f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0c9c 1939 lrri $AX1.L, @$AR1 - 0c9d 112f 0ca8 bloopi #0x2f, 0x0ca8 - 0c9f b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0ca0 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0ca1 195c lrri $AC0.L, @$AR2 - 0ca2 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0ca3 1939 lrri $AX1.L, @$AR1 - 0ca4 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0ca5 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0ca6 195d lrri $AC1.L, @$AR2 - 0ca7 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0ca8 1939 lrri $AX1.L, @$AR1 - 0ca9 1b7c srri @$AR3, $AC0.L - 0caa 6e00 movp $ACC0 - 0cab 4f1e addp'mv $ACC1 : $AX1.H, $AC0.M - 0cac 9900 asr16 $ACC1 - 0cad 1b7f srri @$AR3, $AC1.M - 0cae 1b7d srri @$AR3, $AC1.L - 0caf 02df ret - 0cb0 0098 0000 lri $AX0.L, #0x0000 - 0cb2 02df ret -} - - 0cb3 0080 0cc0 lri $AR0, #0x0cc0 - 0cb5 1c62 mrr $AR3, $AR2 - 0cb6 1939 lrri $AX1.L, @$AR1 - 0cb7 191a lrri $AX0.H, @$AR0 - 0cb8 b000 mulx $AX0.H, $AX1.L - 0cb9 195e lrri $AC0.M, @$AR2 - 0cba 195c lrri $AC0.L, @$AR2 - 0cbb f050 lsl16'l $ACC0 : $AX0.H, @$AR0 - 0cbc b400 mulxac $AX0.H, $AX1.L, $ACC0 - 0cbd 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0cbe 195d lrri $AC1.L, @$AR2 - 0cbf f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0cc0 1108 0cc9 bloopi #0x08, 0x0cc9 - 0cc2 b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0cc3 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0cc4 195c lrri $AC0.L, @$AR2 - 0cc5 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0cc6 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0cc7 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0cc8 195d lrri $AC1.L, @$AR2 - 0cc9 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0cca 4f23 addp's $ACC1 : @$AR3, $AC0.L - 0ccb 9900 asr16 $ACC1 - 0ccc 1b7f srri @$AR3, $AC1.M - 0ccd 6e2b movp's $ACC0 : @$AR3, $AC1.L - 0cce 1f1e mrr $AX0.L, $AC0.M - 0ccf 02df ret - 0cd0 0080 0cc0 lri $AR0, #0x0cc0 - 0cd2 0083 0d08 lri $AR3, #0x0d08 - 0cd4 1ce3 mrr $IX3, $AR3 - 0cd5 8e00 set16 - 0cd6 8100 clr $ACC0 - 0cd7 8971 clr'l $ACC1 : $AC0.M, @$AR1 - 0cd8 18bf lrrd $AC1.M, @$AR1 - 0cd9 1b7e srri @$AR3, $AC0.M - 0cda 4c00 add $ACC0, $ACC1 - 0cdb 1b7e srri @$AR3, $AC0.M - 0cdc 1108 0ce1 bloopi #0x08, 0x0ce1 - 0cde 4c00 add $ACC0, $ACC1 - 0cdf 1b7e srri @$AR3, $AC0.M - 0ce0 4c00 add $ACC0, $ACC1 - 0ce1 1b7e srri @$AR3, $AC0.M - 0ce2 4c00 add $ACC0, $ACC1 - 0ce3 1b3e srri @$AR1, $AC0.M - 0ce4 1c27 mrr $AR1, $IX3 - 0ce5 1c62 mrr $AR3, $AR2 - 0ce6 8f50 set40'l : $AX0.H, @$AR0 - 0ce7 1939 lrri $AX1.L, @$AR1 - 0ce8 b000 mulx $AX0.H, $AX1.L - 0ce9 195e lrri $AC0.M, @$AR2 - 0cea 195c lrri $AC0.L, @$AR2 - 0ceb f050 lsl16'l $ACC0 : $AX0.H, @$AR0 - 0cec 1939 lrri $AX1.L, @$AR1 - 0ced b400 mulxac $AX0.H, $AX1.L, $ACC0 - 0cee 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0cef 195d lrri $AC1.L, @$AR2 - 0cf0 f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0cf1 1939 lrri $AX1.L, @$AR1 - 0cf2 1108 0cfd bloopi #0x08, 0x0cfd - 0cf4 b523 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR3, $AC0.L - 0cf5 9972 asr16'l $ACC1 : $AC0.M, @$AR2 - 0cf6 195c lrri $AC0.L, @$AR2 - 0cf7 f0a1 lsl16'ls $ACC0 : $AX0.H, $AC1.M - 0cf8 1939 lrri $AX1.L, @$AR1 - 0cf9 b42b mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR3, $AC1.L - 0cfa 917a asr16'l $ACC0 : $AC1.M, @$AR2 - 0cfb 195d lrri $AC1.L, @$AR2 - 0cfc f1a0 lsl16'ls $ACC1 : $AX0.H, $AC0.M - 0cfd 1939 lrri $AX1.L, @$AR1 - 0cfe 4f23 addp's $ACC1 : @$AR3, $AC0.L - 0cff 9900 asr16 $ACC1 - 0d00 1b7f srri @$AR3, $AC1.M - 0d01 6e2b movp's $ACC0 : @$AR3, $AC1.L - 0d02 1f1e mrr $AX0.L, $AC0.M - 0d03 02df ret - -// Command jump table - 0d04 008a // 0x0 - ??? - 0d05 0222 // 0x1 - ??? - 0d06 024f // 0x2 - ??? - 0d07 0e83 // 0x3 - ??? - 0d08 027e // 0x4 - set PBs address - 0d09 049b // 0x5 - ??? - 0d0a 04b4 // 0x6 - ??? - 0d0b 04cd // 0x7 - set output buffers - 0d0c 0dbd // 0x8 - ??? - 0d0d 0ddf // 0x9 - ??? - 0d0e 057b // 0xA - set compressor table - 0d0f 060b // 0xB - ??? - 0d10 0ec6 // 0xC - ??? - 0d11 067c // 0xD - ??? - 0d12 0672 // 0xE - The End - -// Table #1 - entry selected by PB[0x007] bits 0-4 - 0d13 081f lris $AX0.L, #0x1f // 0: Do nothing - 0d14 0820 lris $AX0.L, #0x20 - 0d15 082c lris $AX0.L, #0x2c - 0d16 0838 lris $AX0.L, #0x38 - 0d17 084a lris $AX0.L, #0x4a - 0d18 084a lris $AX0.L, #0x4a - 0d19 084a lris $AX0.L, #0x4a - 0d1a 084a lris $AX0.L, #0x4a - 0d1b 085d lris $AX0.L, #0x5d - 0d1c 0869 lris $AX0.L, #0x69 - 0d1d 0876 lris $AX0.L, #0x76 - 0d1e 0883 lris $AX0.L, #0x83 - 0d1f 0890 lris $AX0.L, #0x90 - 0d20 0890 lris $AX0.L, #0x90 - 0d21 0890 lris $AX0.L, #0x90 - 0d22 0890 lris $AX0.L, #0x90 - 0d23 089d lris $AX0.L, #0x9d - 0d24 08aa lris $AX0.L, #0xaa - 0d25 08b8 lris $AX0.L, #0xb8 - 0d26 08c6 lris $AX0.L, #0xc6 - 0d27 08d4 lris $AX0.L, #0xd4 - 0d28 08d4 lris $AX0.L, #0xd4 - 0d29 08d4 lris $AX0.L, #0xd4 - 0d2a 08d4 lris $AX0.L, #0xd4 - 0d2b 089d lris $AX0.L, #0x9d - 0d2c 08aa lris $AX0.L, #0xaa - 0d2d 08b8 lris $AX0.L, #0xb8 - 0d2e 08c6 lris $AX0.L, #0xc6 - 0d2f 08d4 lris $AX0.L, #0xd4 - 0d30 08d4 lris $AX0.L, #0xd4 - 0d31 08d4 lris $AX0.L, #0xd4 - 0d32 08d4 lris $AX0.L, #0xd4 - -// Table #2 - entry selected by PB[0x006] bits 0-4 - 0d33 081f lris $AX0.L, #0x1f // 0: Do nothing - 0d34 08e2 lris $AX0.L, #0xe2 - 0d35 08ee lris $AX0.L, #0xee - 0d36 08fa lris $AX0.L, #0xfa - 0d37 090c lris $AX1.L, #0x0c - 0d38 090c lris $AX1.L, #0x0c - 0d39 090c lris $AX1.L, #0x0c - 0d3a 090c lris $AX1.L, #0x0c - 0d3b 091f lris $AX1.L, #0x1f - 0d3c 092b lris $AX1.L, #0x2b - 0d3d 0938 lris $AX1.L, #0x38 - 0d3e 0945 lris $AX1.L, #0x45 - 0d3f 0952 lris $AX1.L, #0x52 - 0d40 0952 lris $AX1.L, #0x52 - 0d41 0952 lris $AX1.L, #0x52 - 0d42 0952 lris $AX1.L, #0x52 - 0d43 095f lris $AX1.L, #0x5f - 0d44 096c lris $AX1.L, #0x6c - 0d45 097a lris $AX1.L, #0x7a - 0d46 0988 lris $AX1.L, #0x88 - 0d47 0996 lris $AX1.L, #0x96 - 0d48 0996 lris $AX1.L, #0x96 - 0d49 0996 lris $AX1.L, #0x96 - 0d4a 0996 lris $AX1.L, #0x96 - 0d4b 095f lris $AX1.L, #0x5f - 0d4c 096c lris $AX1.L, #0x6c - 0d4d 097a lris $AX1.L, #0x7a - 0d4e 0988 lris $AX1.L, #0x88 - 0d4f 0996 lris $AX1.L, #0x96 - 0d50 0996 lris $AX1.L, #0x96 - 0d51 0996 lris $AX1.L, #0x96 - 0d52 0996 lris $AX1.L, #0x96 - -// Table #3 - entry selected by PB[0x006] bits 5-9 - 0d53 081f lris $AX0.L, #0x1f // 0: Do nothing - 0d54 09a4 lris $AX1.L, #0xa4 - 0d55 09b0 lris $AX1.L, #0xb0 - 0d56 09bc lris $AX1.L, #0xbc - 0d57 09ce lris $AX1.L, #0xce - 0d58 09ce lris $AX1.L, #0xce - 0d59 09ce lris $AX1.L, #0xce - 0d5a 09ce lris $AX1.L, #0xce - 0d5b 09e1 lris $AX1.L, #0xe1 - 0d5c 09ed lris $AX1.L, #0xed - 0d5d 09fa lris $AX1.L, #0xfa - 0d5e 0a07 lris $AX0.H, #0x07 - 0d5f 0a14 lris $AX0.H, #0x14 - 0d60 0a14 lris $AX0.H, #0x14 - 0d61 0a14 lris $AX0.H, #0x14 - 0d62 0a14 lris $AX0.H, #0x14 - 0d63 0a21 lris $AX0.H, #0x21 - 0d64 0a2e lris $AX0.H, #0x2e - 0d65 0a3c lris $AX0.H, #0x3c - 0d66 0a4a lris $AX0.H, #0x4a - 0d67 0a58 lris $AX0.H, #0x58 - 0d68 0a58 lris $AX0.H, #0x58 - 0d69 0a58 lris $AX0.H, #0x58 - 0d6a 0a58 lris $AX0.H, #0x58 - 0d6b 0a21 lris $AX0.H, #0x21 - 0d6c 0a2e lris $AX0.H, #0x2e - 0d6d 0a3c lris $AX0.H, #0x3c - 0d6e 0a4a lris $AX0.H, #0x4a - 0d6f 0a58 lris $AX0.H, #0x58 - 0d70 0a58 lris $AX0.H, #0x58 - 0d71 0a58 lris $AX0.H, #0x58 - 0d72 0a58 lris $AX0.H, #0x58 - -// Table #4 - entry selected by PB[0x006] bits 10-15 -// (twice longer than the three previous ones!) - 0d73 081f lris $AX0.L, #0x1f // 0: Do nothing - 0d74 0a66 lris $AX0.H, #0x66 - 0d75 0a72 lris $AX0.H, #0x72 - 0d76 0a7e lris $AX0.H, #0x7e - 0d77 0a90 lris $AX0.H, #0x90 - 0d78 0a90 lris $AX0.H, #0x90 - 0d79 0a90 lris $AX0.H, #0x90 - 0d7a 0a90 lris $AX0.H, #0x90 - 0d7b 0aa3 lris $AX0.H, #0xa3 - 0d7c 0aaf lris $AX0.H, #0xaf - 0d7d 0abc lris $AX0.H, #0xbc - 0d7e 0ac9 lris $AX0.H, #0xc9 - 0d7f 0ad6 lris $AX0.H, #0xd6 - 0d80 0ad6 lris $AX0.H, #0xd6 - 0d81 0ad6 lris $AX0.H, #0xd6 - 0d82 0ad6 lris $AX0.H, #0xd6 - 0d83 0ae3 lris $AX0.H, #0xe3 - 0d84 0af0 lris $AX0.H, #0xf0 - 0d85 0afe lris $AX0.H, #0xfe - 0d86 0b0c lris $AX1.H, #0x0c - 0d87 0b1a lris $AX1.H, #0x1a - 0d88 0b1a lris $AX1.H, #0x1a - 0d89 0b1a lris $AX1.H, #0x1a - 0d8a 0b1a lris $AX1.H, #0x1a - 0d8b 0ae3 lris $AX0.H, #0xe3 - 0d8c 0af0 lris $AX0.H, #0xf0 - 0d8d 0afe lris $AX0.H, #0xfe - 0d8e 0b0c lris $AX1.H, #0x0c - 0d8f 0b1a lris $AX1.H, #0x1a - 0d90 0b1a lris $AX1.H, #0x1a - 0d91 0b1a lris $AX1.H, #0x1a - 0d92 0b1a lris $AX1.H, #0x1a - 0d93 081f lris $AX0.L, #0x1f - 0d94 0b28 lris $AX1.H, #0x28 - 0d95 0b34 lris $AX1.H, #0x34 - 0d96 0b40 lris $AX1.H, #0x40 - 0d97 0b52 lris $AX1.H, #0x52 - 0d98 0b52 lris $AX1.H, #0x52 - 0d99 0b52 lris $AX1.H, #0x52 - 0d9a 0b52 lris $AX1.H, #0x52 - 0d9b 0aa3 lris $AX0.H, #0xa3 - 0d9c 0b65 lris $AX1.H, #0x65 - 0d9d 0b72 lris $AX1.H, #0x72 - 0d9e 0b7f lris $AX1.H, #0x7f - 0d9f 0b8c lris $AX1.H, #0x8c - 0da0 0b8c lris $AX1.H, #0x8c - 0da1 0b8c lris $AX1.H, #0x8c - 0da2 0b8c lris $AX1.H, #0x8c - 0da3 0ae3 lris $AX0.H, #0xe3 - 0da4 0b99 lris $AX1.H, #0x99 - 0da5 0ba7 lris $AX1.H, #0xa7 - 0da6 0bb5 lris $AX1.H, #0xb5 - 0da7 0bc3 lris $AX1.H, #0xc3 - 0da8 0bc3 lris $AX1.H, #0xc3 - 0da9 0bc3 lris $AX1.H, #0xc3 - 0daa 0bc3 lris $AX1.H, #0xc3 - 0dab 0ae3 lris $AX0.H, #0xe3 - 0dac 0b99 lris $AX1.H, #0x99 - 0dad 0ba7 lris $AX1.H, #0xa7 - 0dae 0bb5 lris $AX1.H, #0xb5 - 0daf 0bc3 lris $AX1.H, #0xc3 - 0db0 0bc3 lris $AX1.H, #0xc3 - 0db1 0bc3 lris $AX1.H, #0xc3 - 0db2 0bc3 lris $AX1.H, #0xc3 - - - 0db3 0cb0 lris $AC0.L, #0xb0 - 0db4 0cb3 lris $AC0.L, #0xb3 - 0db5 0cd0 lris $AC0.L, #0xd0 - 0db6 0cd0 lris $AC0.L, #0xd0 - -// Jump table for sample rate converters - 0db7 071a cmpis $ACC1, #0x1a // none - 0db8 076b cmpis $ACC1, #0x6b // ? - 0db9 07c0 cmpis $ACC1, #0xc0 // linear - -// Table for coef_select -// addresses into COEF ROM - 0dba 1000 loopi #0x00 - 0dbb 1200 sbclr #0x00 - 0dbc 1400 lsl $ACC0, #0 - -void 0dbd_Cmd_8() { - 0dbd 8e00 set16 - 0dbe 00c4 0ce6 lr $IX0, @0x0ce6 - 0dc0 1905 lrri $IX1, @$AR0 - 0dc1 00e5 0ce6 sr @0x0ce6, $IX1 - 0dc3 0086 0400 lri $IX2, #0x0400 - 0dc5 191e lrri $AC0.M, @$AR0 - 0dc6 191c lrri $AC0.L, @$AR0 - 0dc7 2ece srs @DSMAH, $AC0.M - 0dc8 2ccf srs @DSMAL, $AC0.L - 0dc9 16cd 0400 si @DSPA, #0x0400 - 0dcb 16c9 0001 si @DSCR, #0x0001 - 0dcd 16cb 0480 si @DSBL, #0x0480 - 0dcf 02bf 0084 call 0084_WaitForDMACompletion() - 0dd1 191e lrri $AC0.M, @$AR0 - 0dd2 191c lrri $AC0.L, @$AR0 - 0dd3 2ece srs @DSMAH, $AC0.M - 0dd4 2ccf srs @DSMAL, $AC0.L - 0dd5 16cd 0940 si @DSPA, #0x0940 - 0dd7 16c9 0001 si @DSCR, #0x0001 - 0dd9 16cb 0180 si @DSBL, #0x0180 - 0ddb 02bf 0084 call 0084_WaitForDMACompletion() - 0ddd 029f 0e01 jmp 0e01_Unk() -} - -void 0ddf_Cmd_9() { - 0ddf 8e00 set16 - 0de0 00c4 0ce7 lr $IX0, @0x0ce7 - 0de2 1905 lrri $IX1, @$AR0 - 0de3 00e5 0ce7 sr @0x0ce7, $IX1 - 0de5 0086 0640 lri $IX2, #0x0640 - 0de7 191e lrri $AC0.M, @$AR0 - 0de8 191c lrri $AC0.L, @$AR0 - 0de9 2ece srs @DSMAH, $AC0.M - 0dea 2ccf srs @DSMAL, $AC0.L - 0deb 16cd 0640 si @DSPA, #0x0640 - 0ded 16c9 0001 si @DSCR, #0x0001 - 0def 16cb 0480 si @DSBL, #0x0480 - 0df1 02bf 0084 call 0084_WaitForDMACompletion() - 0df3 191e lrri $AC0.M, @$AR0 - 0df4 191c lrri $AC0.L, @$AR0 - 0df5 2ece srs @DSMAH, $AC0.M - 0df6 2ccf srs @DSMAL, $AC0.L - 0df7 16cd 0a00 si @DSPA, #0x0a00 - 0df9 16c9 0001 si @DSCR, #0x0001 - 0dfb 16cb 0180 si @DSBL, #0x0180 - 0dfd 02bf 0084 call 0084_WaitForDMACompletion() - 0dff 029f 0e01 jmp 0e01_Unk() -} - -void 0e01_Unk() { - 0e01 8b00 m0 - 0e02 8100 clr $ACC0 - 0e03 8900 clr $ACC1 - 0e04 1fc4 mrr $AC0.M, $IX0 - 0e05 1fe5 mrr $AC1.M, $IX1 - 0e06 5d00 sub $ACC1, $ACC0 - 0e07 009a 02ab lri $AX0.H, #0x02ab - 0e09 009b 02aa lri $AX1.H, #0x02aa - 0e0b 0081 0d08 lri $AR1, #0x0d08 - 0e0d d000 mulc $AC1.M, $AX0.H - 0e0e d400 mulcac $AC1.M, $AX0.H, $ACC0 - 0e0f 111f 0e13 bloopi #0x1f, 0x0e13 - 0e11 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e12 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e13 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e14 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e15 4e31 addp's $ACC0 : @$AR1, $AC0.M - 0e16 1b25 srri @$AR1, $IX1 - 0e17 191e lrri $AC0.M, @$AR0 - 0e18 191c lrri $AC0.L, @$AR0 - 0e19 2ece srs @DSMAH, $AC0.M - 0e1a 2ccf srs @DSMAL, $AC0.L - 0e1b 00e6 ffcd sr @DSPA, $IX2 - 0e1d 16c9 0000 si @DSCR, #0x0000 - 0e1f 16cb 0180 si @DSBL, #0x0180 - 0e21 0081 0000 lri $AR1, #0x0000 - 0e23 1c41 mrr $AR2, $AR1 - 0e24 02bf 0084 call 0084_WaitForDMACompletion() - 0e26 02bf 0e57 call 0x0e57 - 0e28 191e lrri $AC0.M, @$AR0 - 0e29 191c lrri $AC0.L, @$AR0 - 0e2a 2ece srs @DSMAH, $AC0.M - 0e2b 2ccf srs @DSMAL, $AC0.L - 0e2c 00e6 ffcd sr @DSPA, $IX2 - 0e2e 16c9 0000 si @DSCR, #0x0000 - 0e30 16cb 0180 si @DSBL, #0x0180 - 0e32 02bf 0084 call 0084_WaitForDMACompletion() - 0e34 02bf 0e57 call 0x0e57 - 0e36 191e lrri $AC0.M, @$AR0 - 0e37 191c lrri $AC0.L, @$AR0 - 0e38 2ece srs @DSMAH, $AC0.M - 0e39 2ccf srs @DSMAL, $AC0.L - 0e3a 00e6 ffcd sr @DSPA, $IX2 - 0e3c 16c9 0000 si @DSCR, #0x0000 - 0e3e 16cb 0180 si @DSBL, #0x0180 - 0e40 02bf 0084 call 0084_WaitForDMACompletion() - 0e42 02bf 0e57 call 0x0e57 - 0e44 191e lrri $AC0.M, @$AR0 - 0e45 191c lrri $AC0.L, @$AR0 - 0e46 2ece srs @DSMAH, $AC0.M - 0e47 2ccf srs @DSMAL, $AC0.L - 0e48 00e6 ffcd sr @DSPA, $IX2 - 0e4a 16c9 0000 si @DSCR, #0x0000 - 0e4c 16cb 0180 si @DSBL, #0x0180 - 0e4e 0081 0880 lri $AR1, #0x0880 - 0e50 1c41 mrr $AR2, $AR1 - 0e51 02bf 0084 call 0084_WaitForDMACompletion() - 0e53 02bf 0e57 call 0x0e57 - 0e55 029f 006f jmp 006f_MailHandler() -} - - 0e57 8f00 set40 - 0e58 8d00 set15 - 0e59 8a00 m2 - 0e5a 00e0 0cd2 sr @0x0cd2, $AR0 - 0e5c 0080 0d08 lri $AR0, #0x0d08 - 0e5e 1c66 mrr $AR3, $IX2 - 0e5f 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0e60 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e61 a000 mulx $AX0.L, $AX1.L - 0e62 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0e63 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0e64 4e00 addp $ACC0 - 0e65 4800 addax $ACC0, $AX0.L - 0e66 112f 0e75 bloopi #0x2f, 0x0e75 - 0e68 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0e69 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e6a a000 mulx $AX0.L, $AX1.L - 0e6b af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0e6c 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0e6d 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0e6e 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0e6f 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0e70 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e71 a000 mulx $AX0.L, $AX1.L - 0e72 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0e73 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0e74 4e3a addp's $ACC0 : @$AR2, $AC1.M - 0e75 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 0e76 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0e77 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e78 a000 mulx $AX0.L, $AX1.L - 0e79 af00 mulxmv $AX0.L, $AX1.H, $ACC1 - 0e7a 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0e7b 4f32 addp's $ACC1 : @$AR2, $AC0.M - 0e7c 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0e7d 1b5f srri @$AR2, $AC1.M - 0e7e 1b5d srri @$AR2, $AC1.L - 0e7f 00c0 0cd2 lr $AR0, @0x0cd2 - 0e81 8e00 set16 - 0e82 02df ret - -void 0e83_Cmd_3() { - 0e83 8e00 set16 - 0e84 191f lrri $AC1.M, @$AR0 - 0e85 191d lrri $AC1.L, @$AR0 - 0e86 2fce srs @DSMAH, $AC1.M - 0e87 2dcf srs @DSMAL, $AC1.L - 0e88 16cd 0d08 si @DSPA, #0x0d08 - 0e8a 16c9 0000 si @DSCR, #0x0000 - 0e8c 16cb 0300 si @DSBL, #0x0300 - 0e8e 02bf 0084 call 0084_WaitForDMACompletion() - 0e90 1c80 mrr $IX0, $AR0 - 0e91 8f00 set40 - 0e92 0080 0d08 lri $AR0, #0x0d08 - 0e94 0083 0000 lri $AR3, #0x0000 - 0e96 1c43 mrr $AR2, $AR3 - 0e97 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0e98 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e99 6a00 movax $ACC0, $AX1.L - 0e9a 4800 addax $ACC0, $AX0.L - 0e9b 112f 0ea4 bloopi #0x2f, 0x0ea4 - 0e9d 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0e9e 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0e9f 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0ea0 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0ea1 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0ea2 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0ea3 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 0ea4 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 0ea5 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0ea6 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0ea7 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0ea8 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0ea9 1b5f srri @$AR2, $AC1.M - 0eaa 1b5d srri @$AR2, $AC1.L - 0eab 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0eac 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0ead 6800 movax $ACC0, $AX0.L - 0eae 7c00 neg $ACC0 - 0eaf 4a00 addax $ACC0, $AX1.L - 0eb0 112f 0ebb bloopi #0x2f, 0x0ebb - 0eb2 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0eb3 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0eb4 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0eb5 7d00 neg $ACC1 - 0eb6 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0eb7 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0eb8 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0eb9 683a movax's $ACC0, $AX0.L : @$AR2, $AC1.M - 0eba 7c00 neg $ACC0 - 0ebb 4a2a addax's $ACC0, $AX1.L : @$AR2, $AC1.L - 0ebc 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0ebd 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0ebe 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0ebf 7d00 neg $ACC1 - 0ec0 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0ec1 1b5f srri @$AR2, $AC1.M - 0ec2 1b5d srri @$AR2, $AC1.L - 0ec3 1c04 mrr $AR0, $IX0 - 0ec4 029f 006f jmp 006f_MailHandler() -} - -void 0ec6_Cmd_C() { - 0ec6 8e48 set16'l : $AX1.L, @$AR0 - 0ec7 8b78 m0'l : $AC1.M, @$AR0 - 0ec8 8168 clr'l $ACC0 : $AC1.L, @$AR0 - 0ec9 00e0 0cd2 sr @0x0cd2, $AR0 - 0ecb 2fce srs @DSMAH, $AC1.M - 0ecc 2dcf srs @DSMAL, $AC1.L - 0ecd 16cd 0180 si @DSPA, #0x0180 - 0ecf 16c9 0001 si @DSCR, #0x0001 - 0ed1 16cb 0180 si @DSBL, #0x0180 - 0ed3 02bf 0084 call 0084_WaitForDMACompletion() - 0ed5 8100 clr $ACC0 - 0ed6 009c 0180 lri $AC0.L, #0x0180 - 0ed8 4d00 add $ACC1, $ACC0 - 0ed9 2fce srs @DSMAH, $AC1.M - 0eda 2dcf srs @DSMAL, $AC1.L - 0edb 16cd 0880 si @DSPA, #0x0880 - 0edd 16c9 0001 si @DSCR, #0x0001 - 0edf 16cb 0180 si @DSBL, #0x0180 - 0ee1 8100 clr $ACC0 - 0ee2 8900 clr $ACC1 - 0ee3 00de 0ce5 lr $AC0.M, @0x0ce5 - 0ee5 1ff9 mrr $AC1.M, $AX1.L - 0ee6 5d00 sub $ACC1, $ACC0 - 0ee7 00f9 0ce5 sr @0x0ce5, $AX1.L - 0ee9 009a 02ab lri $AX0.H, #0x02ab - 0eeb 009b 02aa lri $AX1.H, #0x02aa - 0eed 0081 0d08 lri $AR1, #0x0d08 - 0eef d000 mulc $AC1.M, $AX0.H - 0ef0 d400 mulcac $AC1.M, $AX0.H, $ACC0 - 0ef1 111f 0ef5 bloopi #0x1f, 0x0ef5 - 0ef3 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ef4 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0ef5 d431 mulcac's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0ef6 dc31 mulcac's $AC1.M, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ef7 4e31 addp's $ACC0 : @$AR1, $AC0.M - 0ef8 1b39 srri @$AR1, $AX1.L - 0ef9 02bf 0084 call 0084_WaitForDMACompletion() - 0efb 8f00 set40 - 0efc 8d00 set15 - 0efd 8a00 m2 - 0efe 0080 0d08 lri $AR0, #0x0d08 - 0f00 0081 0400 lri $AR1, #0x0400 - 0f02 0083 0000 lri $AR3, #0x0000 - 0f04 0082 00c0 lri $AR2, #0x00c0 - 0f06 1918 lrri $AX0.L, @$AR0 - 0f07 195b lrri $AX1.H, @$AR2 - 0f08 1959 lrri $AX1.L, @$AR2 - 0f09 a000 mulx $AX0.L, $AX1.L - 0f0a ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0f0b 9100 asr16 $ACC0 - 0f0c 4e5b addp'l $ACC0 : $AX1.H, @$AR3 - 0f0d f04b lsl16'l $ACC0 : $AX1.L, @$AR3 - 0f0e 115f 0f19 bloopi #0x5f, 0x0f19 - 0f10 a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 0f11 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0f12 9140 asr16'l $ACC0 : $AX0.L, @$AR0 - 0f13 4e5a addp'l $ACC0 : $AX1.H, @$AR2 - 0f14 f04a lsl16'l $ACC0 : $AX1.L, @$AR2 - 0f15 a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 0f16 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0f17 9100 asr16 $ACC0 - 0f18 4e5b addp'l $ACC0 : $AX1.H, @$AR3 - 0f19 f04b lsl16'l $ACC0 : $AX1.L, @$AR3 - 0f1a a031 mulx's $AX0.L, $AX1.L : @$AR1, $AC0.M - 0f1b ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0f1c 9100 asr16 $ACC0 - 0f1d 4e00 addp $ACC0 - 0f1e f000 lsl16 $ACC0 - 0f1f 1b3e srri @$AR1, $AC0.M - 0f20 8e00 set16 - 0f21 00c0 0cd2 lr $AR0, @0x0cd2 - 0f23 191e lrri $AC0.M, @$AR0 - 0f24 191c lrri $AC0.L, @$AR0 - 0f25 2ece srs @DSMAH, $AC0.M - 0f26 2ccf srs @DSMAL, $AC0.L - 0f27 16cd 0400 si @DSPA, #0x0400 - 0f29 16c9 0001 si @DSCR, #0x0001 - 0f2b 16cb 0180 si @DSBL, #0x0180 - 0f2d 02bf 0084 call 0084_WaitForDMACompletion() - 0f2f 16fc dcd1 si @DMBH, #0xdcd1 <-------------- !!! - 0f31 16fd 0004 si @DMBL, #0x0004 <-------------- !!! - 0f33 16fb 0001 si @DIRQ, #0x0001 <-------------- !!! - 0f35 26fc lrs $AC0.M, @DMBH - 0f36 02a0 8000 andf $AC0.M, #0x8000 - 0f38 029c 0f35 jlnz 0x0f35 - 0f3a 029f 006f jmp 006f_MailHandler() -} - -void 0f3c_Int1_Handler() { - 0f3c 8e00 set16 - 0f3d 1fcc mrr $AC0.M, $ST0 - 0f3e 1d9e mrr $ST0, $AC0.M - 0f3f 16fc ecc0 si @DMBH, #0xecc0 - 0f41 2efd srs @DMBL, $AC0.M - 0f42 26fc lrs $AC0.M, @DMBH - 0f43 02a0 8000 andf $AC0.M, #0x8000 - 0f45 029c 0f42 jlnz 0x0f42 - 0f47 02ff rti -} - -void 0f48_Int2_Handler() { - 0f48 0000 nop - 0f49 0000 nop - 0f4a 0000 nop - 0f4b 0000 nop - 0f4c 02ff rti -} - -void 0f4d_Int3_Handler() { - 0f4d 8e00 set16 - 0f4e 1dbc mrr $ST1, $AC0.L - 0f4f 1dbe mrr $ST1, $AC0.M - 0f50 8100 clr $ACC0 - 0f51 00de 0307 lr $AC0.M, @0x0307 - 0f53 0601 cmpis $ACC0, #0x01 - 0f54 0295 0f59 jz 0x0f59 - 0f56 0e00 lris $AC0.M, #0x00 - 0f57 00fe 02d8 sr @0x02d8, $AC0.M - 0f59 1fcd mrr $AC0.M, $ST1 - 0f5a 1f8d mrr $AC0.L, $ST1 - 0f5b 02ff rti -} - -void 0f5c_Int4_Handler() { - 0f5c 0000 nop - 0f5d 0000 nop - 0f5e 0000 nop - 0f5f 0000 nop - 0f60 02ff rti -} - -// Handles ACCOV exception -// ACCOV exception will be triggered when a sound being played -// reaches end and needs to be reloaded or stopped. -// -void 0f61_Int5_Handler() -{ - 0f61 8e00 set16 - 0f62 1dbc mrr $ST1, $AC0.L - 0f63 1dbe mrr $ST1, $AC0.M - 0f64 8100 clr $ACC0 - 0f65 00de 0307 lr $AC0.M, @0x0307 - 0f67 0601 cmpis $ACC0, #0x01 - 0f68 0295 0f72 jz 0x0f72 // if (mem16[0x0307] == 1) handle looping; - 0f6a 0e00 lris $AC0.M, #0x00 - 0f6b 00fe 02d8 sr @0x02d8, $AC0.M // else stop the sound; - 0f6d 0082 0ce9 lri $AR2, #0x0ce9 - 0f6f 1fcd mrr $AC0.M, $ST1 - 0f70 1f8d mrr $AC0.L, $ST1 - 0f71 02ff rti - - // Looping handling - 0f72 00de 02d9 lr $AC0.M, @0x02d9 - 0f74 0601 cmpis $ACC0, #0x01 - 0f75 0295 0f83 jz 0x0f83 // if (mem16[0x02D9] == 1) handle stream; - // reload pred scale, yn1 and yn2 from the PB - // the address will be automatically reloaded by the accelerator - 0f77 00de 032a lr $AC0.M, @0x032a - 0f79 2eda srs @pred_scale, $AC0.M - 0f7a 00de 032b lr $AC0.M, @0x032b - 0f7c 2edb srs @yn1, $AC0.M - 0f7d 00de 032c lr $AC0.M, @0x032c - 0f7f 2edc srs @yn2, $AC0.M - 0f80 1fcd mrr $AC0.M, $ST1 - 0f81 1f8d mrr $AC0.L, $ST1 - 0f82 02ff rti - - // Stream handling - // reload pred_scale from the PB - 0f83 00de 032a lr $AC0.M, @0x032a - 0f85 2eda srs @pred_scale, $AC0.M - // ??? - reload the yn1 and yn2 from... themselves - 0f86 26db lrs $AC0.M, @yn1 - 0f87 2edb srs @yn1, $AC0.M - 0f88 26dc lrs $AC0.M, @yn2 - 0f89 2edc srs @yn2, $AC0.M - 0f8a 1fcd mrr $AC0.M, $ST1 - 0f8b 1f8d mrr $AC0.L, $ST1 - 0f8c 02ff rti -} - -void 0f8d_Int6_Handler() { - 0f8d 0000 nop - 0f8e 0000 nop - 0f8f 0000 nop - 0f90 0000 nop - 0f91 02ff rti -} - -void 0f92_Int7_Handler() { - 0f92 0000 nop - 0f93 0000 nop - 0f94 0000 nop - 0f95 0000 nop - 0f96 02ff rti -} - -// action jump table - 0f97 0fa9 // Action 0 - restart - 0f98 0fac // Action 1 - dump DRAM and jump into iROM where new IRAM and DRAM can be uploaded - 0f99 0fe4 // Action 2 - soft reset - 0f9a 0fe7 // Action 3 - jump back to main loop - -// called at AXList end; wait for a last mail and take an action -// Note: the same thing can be found in Zelda ucode. It's called after DsyncFrame. -// Probably debugging stuff. -{ - 0f9b 8e00 set16 - 0f9c 8100 clr $ACC0 - 0f9d 8900 clr $ACC1 - 0f9e 02bf 0fea call 0x0fea // wait for the mail; the high part is likely 0xCDD1 as for Zelda - 0fa0 27ff lrs $AC1.M, @CMBL // the low part of the mail tells the action to take - 0fa1 009e 0f97 lri $AC0.M, #0x0f97 - 0fa3 4c00 add $ACC0, $ACC1 - 0fa4 1c7e mrr $AR3, $AC0.M - 0fa5 0313 ilrr $AC1.M, @$AR3 - 0fa6 1c7f mrr $AR3, $AC1.M - 0fa7 176f jmpr $AR3 // take the action! - 0fa8 0021 halt -} - -//ACTION 0 (0xCDD10000) -{ - 0fa9 029f 0037 jmp 0037_Unk_Restart() - 0fab 0021 halt -} - -//ACTION 1 (0xCDD10001) -{ - 0fac 8100 clr $ACC0 - 0fad 8900 clr $ACC1 - 0fae 02bf 0fea call 0x0fea - 0fb0 24ff lrs $AC0.L, @CMBL - 0fb1 02bf 0ff0 call 0x0ff0 - 0fb3 25ff lrs $AC1.L, @CMBL - 0fb4 02bf 0ff0 call 0x0ff0 - 0fb6 27ff lrs $AC1.M, @CMBL - 0fb7 2ece srs @DSMAH, $AC0.M - 0fb8 2ccf srs @DSMAL, $AC0.L - 0fb9 16c9 0001 si @DSCR, #0x0001 // DMEM->CPU - 0fbb 2fcd srs @DSPA, $AC1.M - 0fbc 2dcb srs @DSBL, $AC1.L - 0fbd 8100 clr $ACC0 - 0fbe 8900 clr $ACC1 - 0fbf 02bf 0fea call 0x0fea -//prepare addr-s/length/dsp-PC for new IRAM/DRAM - 0fc1 24ff lrs $AC0.L, @CMBL - 0fc2 1c9e mrr $IX0, $AC0.M - 0fc3 1cbc mrr $IX1, $AC0.L - 0fc4 02bf 0ff0 call 0x0ff0 - 0fc6 25ff lrs $AC1.L, @CMBL - 0fc7 02bf 0ff0 call 0x0ff0 - 0fc9 27ff lrs $AC1.M, @CMBL - 0fca 1cdf mrr $IX2, $AC1.M - 0fcb 1cfd mrr $IX3, $AC1.L - 0fcc 8100 clr $ACC0 - 0fcd 02bf 0fea call 0x0fea - 0fcf 26ff lrs $AC0.M, @CMBL - 0fd0 1c1e mrr $AR0, $AC0.M - 0fd1 8900 clr $ACC1 - 0fd2 02bf 0ff0 call 0x0ff0 - 0fd4 20ff lrs $AX0.L, @CMBL - 0fd5 1f5f mrr $AX0.H, $AC1.M - 0fd6 02bf 0fea call 0x0fea - 0fd8 21ff lrs $AX1.L, @CMBL - 0fd9 02bf 0fea call 0x0fea - 0fdb 23ff lrs $AX1.H, @CMBL -// - 0fdc 26c9 lrs $AC0.M, @DSCR - 0fdd 02a0 0004 andf $AC0.M, #0x0004 - 0fdf 029c 0fdc jlnz 0x0fdc - 0fe1 029f 80b5 jmp 0x80b5 // 80b5_BootUcode() - 0fe3 0021 halt -} - -//ACTION 2 (0xCDD10002) -{ - 0fe4 029f 8000 jmp 0x8000 - 0fe6 0021 halt -} - -//ACTION 3 (0xCDD10003) -{ - 0fe7 029f 004c jmp 0x004c - 0fe9 0021 halt -} - -{ - 0fea 26fe lrs $AC0.M, @CMBH - 0feb 02c0 8000 andcf $AC0.M, #0x8000 - 0fed 029c 0fea jlnz 0x0fea - 0fef 02df ret -} - -{ - 0ff0 27fe lrs $AC1.M, @CMBH - 0ff1 03c0 8000 andcf $AC1.M, #0x8000 - 0ff3 029c 0ff0 jlnz 0x0ff0 - 0ff5 02df ret -} - - 0ff6 0000 nop - 0ff7 0000 nop - 0ff8 0000 nop - 0ff9 0000 nop - 0ffa 0000 nop - 0ffb 0000 nop - 0ffc 0000 nop - 0ffd 0000 nop - 0ffe 0000 nop - 0fff 0000 nop diff --git a/docs/DSP/DSP_UC_AX_DD7E72D5.txt b/docs/DSP/DSP_UC_AX_DD7E72D5.txt deleted file mode 100644 index d985232bb7..0000000000 --- a/docs/DSP/DSP_UC_AX_DD7E72D5.txt +++ /dev/null @@ -1,3467 +0,0 @@ -// This document was previously called "DSP_UC_AX1.txt" and "Crazy Taxi.txt" -// CR is set to #FF all the time in this ucode, so srs/lrs always operate on hw registers. - -////////////////////////////////////////////////////////////////////////// -// Known addresses in DRAM -Addr Name Description/Notes - -// Buffers -0x0000 Main Right -0x0140 Main Left -0x0280 -0x0400 -0x0540 -0x0680 -0x07c0 -0x0900 -0x0a40 - -0x03c0 update_block Contains pairs to update current PB with - -0x0b80 pb Current pb, length = 0xc0 - -0x0e04 ms_remaining Milliseconds remaining to process for current voice -0x0e05 pUpdate_block Pointer to update_block -0x0e06 pUpdates_this_ms Pointer to number of updates - -// Pointers to buffers -0x0e08 0x0000 See buffers at 0x0000 -0x0e09 0x0140 -0x0e0a 0x0280 -0x0e0b 0x0400 -0x0e0c 0x0540 -0x0e0d 0x0680 -0x0e0e 0x07c0 -0x0e0f 0x0900 -0x0e10 0x0a40 - -// Func pointers -0x0e14 selectedMixCtrl -0x0e15 selectedSRC -0x0e16 selectedCoef Points into DROM - -// ITD -0x0e40 -0x0e41 -0x0e42 -0x0e43 -////////////////////////////////////////////////////////////////////////// - -// Good ol' exception table -0000 0000 nop -0001 0000 nop // 0 Reset falls through, kinda wierd... -0002 029f 0c10 jmp 0x0c10 // 1 Stack U/O flow -0004 029f 0c1f jmp 0x0c1f // 2 -0006 029f 0c3b jmp 0x0c3b // 3 -0008 029f 0c4a jmp 0x0c4a // 4 ? empty -000a 029f 0c50 jmp 0x0c50 // 5 accelerator address overflow -000c 029f 0c82 jmp 0x0c82 // 6 ? empty -000e 029f 0c88 jmp 0x0c88 // 7 ? empty - -// Entry point -void Task_Init() { - // AX operates in this context all the time - // 0010 1302 sbset #0x02 - // 0011 1303 sbset #0x03 - // 0012 1204 sbclr #0x04 - // 0013 1305 sbset #0x05 - // 0014 1306 sbset #0x06 - // 0015 8e00 set16 - // 0016 8c00 clr15 - // 0017 8b00 m0 - // 0018 0092 00ff lri $CR, #0x00ff - - // 001a 8100 clr $ACC0 - // 001b 8900 clr $ACC1 - // 001c 009e 0e80 lri $AC0.M, #0x0e80 - // 001e 00fe 0e1b sr @0x0e1b, $AC0.M - // 0020 8100 clr $ACC0 - // 0021 00fe 0e31 sr @0x0e31, $AC0.M - ACC0 = ACC1 = 0 - *0x0e1b = 0xe80 // Used in Cmd8 - *0x0e31 = 0 - - // Send DSP_INIT mail - // 0023 16fc dcd1 si @DMBH, #0xdcd1 - // 0025 16fd 0000 si @DMBL, #0x0000 - // 0027 16fb 0001 si @DIRQ, #0x0001 - DMB = 0xdcd10000 - // 0029 26fc lrs $AC0.M, @DMBH - // 002a 02a0 8000 andf $AC0.M, #0x8000 - // 002c 029c 0029 jlnz 0x0029 - while (@DMBH & 0x8000 == 0); - - // 002e 029f 0045 jmp 0x0045 - goto GetNextCmdBlock; -} - -void Task_Resume() { - // Ensure sane context - // 0030 1302 sbset #0x02 - // 0031 1303 sbset #0x03 - // 0032 1204 sbclr #0x04 - // 0033 1305 sbset #0x05 - // 0034 1306 sbset #0x06 - // 0035 8e00 set16 - // 0036 8c00 clr15 - // 0037 8b00 m0 - // 0038 0092 00ff lri $CR, #0x00ff - - // Send DSP_RESUME mail - // 003a 16fc dcd1 si @DMBH, #0xdcd1 - // 003c 16fd 0001 si @DMBL, #0x0001 - // 003e 16fb 0001 si @DIRQ, #0x0001 - DMB = 0xdcd10001 - // 0040 26fc lrs $AC0.M, @DMBH - // 0041 02a0 8000 andf $AC0.M, #0x8000 - // 0043 029c 0040 jlnz 0x0040 - while (@DMBH & 0x8000 == 0); - -GetNextCmdBlock: - 0045 8e00 set16 - 0046 8100 clr $ACC0 - 0047 8900 clr $ACC1 - 0048 009f babe lri $AC1.M, #0xbabe - - // Wait for 0xbabexxxx mail from cpu - do { - // 004a 26fe lrs $AC0.M, @CMBH - // 004b 02c0 8000 andcf $AC0.M, #0x8000 - // 004d 029c 004a jlnz 0x004a - while (@CMBH & 0x8000 == 0); - - // 004f 8200 cmp - // 0050 0294 004a jnz 0x004a - } while (@CMBH != 0xbabe); - - // Save the low 16bits of the mail - // 0052 23ff lrs $AX1.H, @CMBL - u16 length = @CMBL - - // Get next mail - // 0053 8100 clr $ACC0 - // 0054 26fe lrs $AC0.M, @CMBH - // 0055 02c0 8000 andcf $AC0.M, #0x8000 - // 0057 029c 0054 jlnz 0x0054 - while (@CMBH & 0x8000 == 0); - - // 0059 27ff lrs $AC1.M, @CMBL - // 005a 0240 7fff andi $AC0.M, #0x7fff - // 005c 2ece srs @DSMAH, $AC0.M - // 005d 2fcf srs @DSMAL, $AC1.M - // 005e 16cd 0c00 si @DSPA, #0x0c00 - // 0060 8100 clr $ACC0 - // 0061 2ec9 srs @DSCR, $AC0.M - // 0062 1ffb mrr $AC1.M, $AX1.H - // 0063 2fcb srs @DSBL, $AC1.M - // DMA in the CmdBlock - static u16* CmdBlockBuf = 0x0c00 - DSMA = (@CMBH & ~0x8000) << 16 | @CMBL - DSPA = CmdBlockBuf - DSCR = 0 // CPU -> DMEM - DSBL = length - - // 0064 02bf 055c call 0x055c - WaitDMA(); - - // Init the CmdBlock pointer - 0066 0080 0c00 lri $AR0, #0x0c00 - -DoNextCommand: - // 0068 8e00 set16 - // 0069 8100 clr $ACC0 - // 006a 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 006b b100 tst $ACC0 - // 006c 0291 007e jl 0x007e - u16 Cmd = *(CmdBlockBuf++) - if (Cmd < 0) // How could this be possible? 'l is 16bit load... - Die_InvalidCmd(); - - // 006e 0a12 lris $AX0.H, #0x12 - // 006f c100 cmpar $ACC0, $AX0.H - // 0070 0292 007e jg 0x007e - if (Cmd > 0x12) - Die_InvalidCmd(); - - // 0072 009f 0aff lri $AC1.M, #0x0aff - // 0074 4c00 add $ACC0, $ACC1 - // 0075 1c7e mrr $AR3, $AC0.M - // 0076 0213 ilrr $AC0.M, @$AR3 - // 0077 1c7e mrr $AR3, $AC0.M - // 0078 176f jmpr $AR3 - switch (Cmd) { - case 0: Cmd_0(); break; // 0082 - case 1: Cmd_1(); break; // 013e - case 2: Cmd_2(); break; // 01bc - case 3: Cmd_3(); break; // 0248 - case 4: Cmd_4(); break; // 0413 - case 5: Cmd_5(); break; // 0427 - case 6: Cmd_6(); break; // 0165 - case 7: Cmd_7(); break; // 0574 - case 8: Cmd_8(); break; // 0b37 - case 9: Cmd_9(); break; // 015f - case 0xa: Cmd_a(); break; // 0478 - case 0xb: Cmd_b(); break; // 0474 - case 0xc: Cmd_c(); break; // 0476 - case 0xd: Cmd_d(); break; // 01a9 - case 0xe: Cmd_e(); break; // 043b - case 0xf: Cmd_f(); break; // 047a - case 0x10: Cmd_10(); break; // 0bb1 - case 0x11: Cmd_11(); break; // 0175 - } - - // Somehow we've passed the cmd proccessor; DIE!! - // 0079 16fc fbad si @DMBH, #0xfbad - // 007b 16fd 8080 si @DMBL, #0x8080 - DMB = 0xfbad8080 - 007d 0021 halt -} - -// Die and conveniently tell the cpu which cmd was baad -void Die_InvalidCmd() { - 007e 16fc baad si @DMBH, #0xbaad - 0080 2efd srs @DMBL, $AC0.M - 0081 0021 halt -} - -// Executes the same operation 3 times on buffers: (0, 0x0400, 0x07c0) -void Cmd_0() { - // 0082 8100 clr $ACC0 - // 0083 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 0084 8e78 set16'l : $AC1.M, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 0085 2ece srs @DSMAH, $AC0.M - // 0086 2fcf srs @DSMAL, $AC1.M - // 0087 009e 0e44 lri $AC0.M, #0x0e44 - // 0089 2ecd srs @DSPA, $AC0.M - // 008a 0e00 lris $AC0.M, #0x00 - // 008b 2ec9 srs @DSCR, $AC0.M - // 008c 009e 0040 lri $AC0.M, #0x0040 - // 008e 2ecb srs @DSBL, $AC0.M - - // DMA 0x0040bytes to DRAM @ 0x0e44 from CPU @ maddr - - 008f 0081 0e44 lri $AR1, #0x0e44 // source - 0091 0082 0000 lri $AR2, #0x0000 // destination - - 0093 009b 009f lri $AX1.H, #0x009f - 0095 009a 0140 lri $AX0.H, #0x0140 // loop length if !ACC0 - - 0097 8100 clr $ACC0 - 0098 8900 clr $ACC1 - - 0099 8f00 set40 - - // 009a 02bf 055c call 0x055c - WaitDMA(); - - 009c 193e lrri $AC0.M, @$AR1 - 009d 193c lrri $AC0.L, @$AR1 - 009e b100 tst $ACC0 - 009f 193f lrri $AC1.M, @$AR1 // added to ACC0 in confusing ways - // 00a0 0294 00a6 jnz 0x00a6 - if (!$ACC0) { - 00a2 005a loop $AX0.H - 00a3 1b5e srri @$AR2, $AC0.M - - // 00a4 029f 00ae jmp 0x00ae - } else { - 00a6 9900 asr16 $ACC1 - 00a7 1b5e srri @$AR2, $AC0.M - 00a8 1b5c srri @$AR2, $AC0.L - 00a9 007b 00ad bloop $AX1.H, 0x00ad - 00ab 4c00 add $ACC0, $ACC1 - 00ac 1b5e srri @$AR2, $AC0.M - 00ad 1b5c srri @$AR2, $AC0.L - - } - - // same code block as above...epic fail? - 00ae 193e lrri $AC0.M, @$AR1 - 00af 193c lrri $AC0.L, @$AR1 - 00b0 b100 tst $ACC0 - 00b1 193f lrri $AC1.M, @$AR1 - // 00b2 0294 00b8 jnz 0x00b8 - if (!$ACC0) { - 00b4 005a loop $AX0.H - 00b5 1b5e srri @$AR2, $AC0.M - - // 00b6 029f 00c0 jmp 0x00c0 - } else { - 00b8 9900 asr16 $ACC1 - 00b9 1b5e srri @$AR2, $AC0.M - 00ba 1b5c srri @$AR2, $AC0.L - 00bb 007b 00bf bloop $AX1.H, 0x00bf - 00bd 4c00 add $ACC0, $ACC1 - 00be 1b5e srri @$AR2, $AC0.M - 00bf 1b5c srri @$AR2, $AC0.L - - } - - // ...and again! wtf - 00c0 193e lrri $AC0.M, @$AR1 - 00c1 193c lrri $AC0.L, @$AR1 - 00c2 b100 tst $ACC0 - 00c3 193f lrri $AC1.M, @$AR1 - // 00c4 0294 00ca jnz 0x00ca - if (!$ACC0) { - 00c6 005a loop $AX0.H - 00c7 1b5e srri @$AR2, $AC0.M - - // 00c8 029f 00d2 jmp 0x00d2 - } else { - 00ca 9900 asr16 $ACC1 - 00cb 1b5e srri @$AR2, $AC0.M - 00cc 1b5c srri @$AR2, $AC0.L - 00cd 007b 00d1 bloop $AX1.H, 0x00d1 - 00cf 4c00 add $ACC0, $ACC1 - 00d0 1b5e srri @$AR2, $AC0.M - 00d1 1b5c srri @$AR2, $AC0.L - - } - - // set to next buffer - 00d2 0082 0400 lri $AR2, #0x0400 - - // same code block, uses tst'l in one place...otherwise the same - 00d4 193e lrri $AC0.M, @$AR1 - 00d5 193c lrri $AC0.L, @$AR1 - 00d6 b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 00d7 0294 00dd jnz 0x00dd - if (!$ACC0) { - 00d9 005a loop $AX0.H - 00da 1b5e srri @$AR2, $AC0.M - // 00db 029f 00e5 jmp 0x00e5 - } else { - 00dd 9900 asr16 $ACC1 - 00de 1b5e srri @$AR2, $AC0.M - 00df 1b5c srri @$AR2, $AC0.L - 00e0 007b 00e4 bloop $AX1.H, 0x00e4 - 00e2 4c00 add $ACC0, $ACC1 - 00e3 1b5e srri @$AR2, $AC0.M - 00e4 1b5c srri @$AR2, $AC0.L - } - - // same code block, using tst'l again...wonder if it actually changes behavior? - 00e5 193e lrri $AC0.M, @$AR1 - 00e6 193c lrri $AC0.L, @$AR1 - 00e7 b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 00e8 0294 00ee jnz 0x00ee - if (!$ACC0) { - 00ea 005a loop $AX0.H - 00eb 1b5e srri @$AR2, $AC0.M - // 00ec 029f 00f6 jmp 0x00f6 - } else { - 00ee 9900 asr16 $ACC1 - 00ef 1b5e srri @$AR2, $AC0.M - 00f0 1b5c srri @$AR2, $AC0.L - 00f1 007b 00f5 bloop $AX1.H, 0x00f5 - 00f3 4c00 add $ACC0, $ACC1 - 00f4 1b5e srri @$AR2, $AC0.M - 00f5 1b5c srri @$AR2, $AC0.L - } - - // see comments above - 00f6 193e lrri $AC0.M, @$AR1 - 00f7 193c lrri $AC0.L, @$AR1 - 00f8 b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 00f9 0294 00ff jnz 0x00ff - if (!$ACC0) { - 00fb 005a loop $AX0.H - 00fc 1b5e srri @$AR2, $AC0.M - // 00fd 029f 0107 jmp 0x0107 - } else { - 00ff 9900 asr16 $ACC1 - 0100 1b5e srri @$AR2, $AC0.M - 0101 1b5c srri @$AR2, $AC0.L - 0102 007b 0106 bloop $AX1.H, 0x0106 - 0104 4c00 add $ACC0, $ACC1 - 0105 1b5e srri @$AR2, $AC0.M - 0106 1b5c srri @$AR2, $AC0.L - } - - // set to next buffer - 0107 0082 07c0 lri $AR2, #0x07c0 - - // see comments above - 0109 193e lrri $AC0.M, @$AR1 - 010a 193c lrri $AC0.L, @$AR1 - 010b b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 010c 0294 0112 jnz 0x0112 - if (!$ACC0) { - 010e 005a loop $AX0.H - 010f 1b5e srri @$AR2, $AC0.M - // 0110 029f 011a jmp 0x011a - } else { - 0112 9900 asr16 $ACC1 - 0113 1b5e srri @$AR2, $AC0.M - 0114 1b5c srri @$AR2, $AC0.L - 0115 007b 0119 bloop $AX1.H, 0x0119 - 0117 4c00 add $ACC0, $ACC1 - 0118 1b5e srri @$AR2, $AC0.M - 0119 1b5c srri @$AR2, $AC0.L - } - - // see comments above - 011a 193e lrri $AC0.M, @$AR1 - 011b 193c lrri $AC0.L, @$AR1 - 011c b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 011d 0294 0123 jnz 0x0123 - if (!$ACC0) { - 011f 005a loop $AX0.H - 0120 1b5e srri @$AR2, $AC0.M - // 0121 029f 012b jmp 0x012b - } else { - 0123 9900 asr16 $ACC1 - 0124 1b5e srri @$AR2, $AC0.M - 0125 1b5c srri @$AR2, $AC0.L - 0126 007b 012a bloop $AX1.H, 0x012a - 0128 4c00 add $ACC0, $ACC1 - 0129 1b5e srri @$AR2, $AC0.M - 012a 1b5c srri @$AR2, $AC0.L - } - - // see comments above - 012b 193e lrri $AC0.M, @$AR1 - 012c 193c lrri $AC0.L, @$AR1 - 012d b179 tst'l $ACC0 : $AC1.M, @$AR1 - // 012e 0294 0134 jnz 0x0134 - if (!$ACC0) { - 0130 005a loop $AX0.H - 0131 1b5e srri @$AR2, $AC0.M - // 0132 029f 013c jmp 0x013c - } else { - 0134 9900 asr16 $ACC1 - 0135 1b5e srri @$AR2, $AC0.M - 0136 1b5c srri @$AR2, $AC0.L - 0137 007b 013b bloop $AX1.H, 0x013b - 0139 4c00 add $ACC0, $ACC1 - 013a 1b5e srri @$AR2, $AC0.M - 013b 1b5c srri @$AR2, $AC0.L - } - - // 013c 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_1() { - 013e 0085 ffff lri $IX1, #0xffff // -1 - - // 0140 8150 clr'l $ACC0 : $AX0.H, @$AR0 - // 0141 8940 clr'l $ACC1 : $AX0.L, @$AR0 - // 0142 8e48 set16'l : $AX1.L, @$AR0 - // 0143 00fa 0e17 sr @0x0e17, $AX0.H - // 0145 00f8 0e18 sr @0x0e18, $AX0.L - // 0147 0081 0000 lri $AR1, #0x0000 - // 0149 02bf 04f1 call 0x04f1 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - u16 unkForMulBuffer1 = *(CmdBlockBuf++) - u16 unkForMulBuffer2 = 0 // a buffer in dram - Unk(maddrh << 16 | maddrl, unkForMulBuffer1, unkForMulBuffer2) - - // 014b 00da 0e17 lr $AX0.H, @0x0e17 - // 014d 00d8 0e18 lr $AX0.L, @0x0e18 - // 014f 8948 clr'l $ACC1 : $AX1.L, @$AR0 - // 0150 0081 0400 lri $AR1, #0x0400 - // 0152 02bf 04f1 call 0x04f1 - unkForMulBuffer1 = *(CmdBlockBuf++) - unkForMulBuffer2 = 0x0400 - Unk(maddrh << 16 | maddrl, unkForMulBuffer1, unkForMulBuffer2) - - // 0154 00da 0e17 lr $AX0.H, @0x0e17 - // 0156 00d8 0e18 lr $AX0.L, @0x0e18 - // 0158 8948 clr'l $ACC1 : $AX1.L, @$AR0 - // 0159 0081 07c0 lri $AR1, #0x07c0 - // 015b 02bf 04f1 call 0x04f1 - unkForMulBuffer1 = *(CmdBlockBuf++) - unkForMulBuffer2 = 0x07c0 - Unk(maddrh << 16 | maddrl, unkForMulBuffer1, unkForMulBuffer2) - - // 015d 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_9() { - 015f 0086 07c0 lri $IX2, #0x07c0 // often used buffer in dram - - 0161 02bf 0484 call 0x0484 - - // 0163 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_6() { - 0165 8100 clr $ACC0 - 0166 8e00 set16 - - // 0167 191e lrri $AC0.M, @$AR0 - // 0168 191c lrri $AC0.L, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 0169 2ece srs @DSMAH, $AC0.M - // 016a 2ccf srs @DSMAL, $AC0.L - // 016b 16cd 0000 si @DSPA, #0x0000 - // 016d 16c9 0001 si @DSCR, #0x0001 - // 016f 16cb 0780 si @DSBL, #0x0780 - - // DMA 0x780bytes to CPU @ maddr from DMEM @ 0 - - // 0171 02bf 055c call 0x055c - WaitDMA(); - - // 0173 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_11() { - // 0175 8100 clr $ACC0 - // 0176 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 0177 8e60 set16'l : $AC0.L, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 0178 2ece srs @DSMAH, $AC0.M - // 0179 2ccf srs @DSMAL, $AC0.L - // 017a 16cd 0e44 si @DSPA, #0x0e44 - // 017c 16c9 0000 si @DSCR, #0x0000 - // 017e 8900 clr $ACC1 - // 017f 0d20 lris $AC1.L, #0x20 - // 0180 2dcb srs @DSBL, $AC1.L - - // DMA 0x20bytes to DRAM @ 0x0e44 from CPU @ maddr - - u16 length_of_0e44 = 0x20 - - // 0181 4c00 add $ACC0, $ACC1 - maddr += length_of_0e44 - - // Save CmdBlockBuf - // 0182 1c80 mrr $IX0, $AR0 - - // 0183 0080 0280 lri $AR0, #0x0280 - // 0185 0081 0000 lri $AR1, #0x0000 - // 0187 0082 0140 lri $AR2, #0x0140 - // 0189 0083 0e44 lri $AR3, #0x0e44 - // 018b 0a00 lris $AX0.H, #0x00 - - // 018c 27c9 lrs $AC1.M, @DSCR - // 018d 03a0 0004 andf $AC1.M, #0x0004 - // 018f 029c 018c jlnz 0x018c - while (@DSCR & 4); - - // 0191 2ece srs @DSMAH, $AC0.M - // 0192 2ccf srs @DSMAL, $AC0.L - // 0193 16cd 0e54 si @DSPA, #0x0e54 - // 0195 16c9 0000 si @DSCR, #0x0000 - // 0197 16cb 0260 si @DSBL, #0x0260 - - // DMA 0x0260bytes to DRAM @ 0x0e54 from CPU @ maddr - - // 0199 009f 00a0 lri $AC1.M, #0x00a0 - // 019b 8f00 set40 - // 019c 007f 01a5 bloop $AC1.M, 0x01a5 - // 019e 197e lrri $AC0.M, @$AR3 - // 019f 1b1a srri @$AR0, $AX0.H - // 01a0 197c lrri $AC0.L, @$AR3 - // 01a1 1b1a srri @$AR0, $AX0.H - // 01a2 1b5e srri @$AR2, $AC0.M - // 01a3 7c22 neg's $ACC0 : @$AR2, $AC0.L - // 01a4 1b3e srri @$AR1, $AC0.M - // 01a5 1b3c srri @$AR1, $AC0.L - - // high reg will only be sign bits, and it's never stored, so we can use s32 here - s32* buffer_source = 0x0e44 - s32* buffer_dest = 0x0140 - s32* buffer_to_zero = 0x0280 - s32* buffer_dest_neg = 0x0000 - for (i = 0x00a0; i > 0; i--) { - s32 thing = *(buffer_source++) - *(buffer_to_zero++) = 0 - *(buffer_dest++) = thing - *(buffer_dest_neg++) = ~thing - } - - // Restore CmdBlockBuf - 01a6 1c04 mrr $AR0, $IX0 - - // 01a7 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -// Interesting, DMAs in new CmdBlock and starts executing it -void Cmd_D() { - // 01a9 8e70 set16'l : $AC0.M, @$AR0 - // 01aa 8960 clr'l $ACC1 : $AC0.L, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 01ab 191f lrri $AC1.M, @$AR0 - u16 numbytes = *(CmdBlockBuf++) - - // 01ac 2ece srs @DSMAH, $AC0.M - // 01ad 2ccf srs @DSMAL, $AC0.L - // 01ae 16cd 0c00 si @DSPA, #0x0c00 - // 01b0 16c9 0000 si @DSCR, #0x0000 - // 01b2 0503 addis $AC1.M, #0x03 - // 01b3 0340 fff0 andi $AC1.M, #0xfff0 - // 01b5 2fcb srs @DSBL, $AC1.M - - // DMA ((numbytes + 3) & 0xfff0)bytes to DMEM @ 0x0c00 from CPU @ maddr - - // 01b6 02bf 055c call 0x055c - WaitDMA(); - - // 01b8 0080 0c00 lri $AR0, #0x0c00 - CmdBlockBuf = 0x0c00 - - // 01ba 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -// DMAs in a new PB and inits values (itd, func pointers, etc) -// DMAs in new update_block, but doesn't apply it -void Cmd_2() { - 01bc 8100 clr $ACC0 - - // 01bd 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 01be 8e78 set16'l : $AC1.M, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 01bf 2ece srs @DSMAH, $AC0.M - // 01c0 2fcf srs @DSMAL, $AC1.M - // 01c1 16cd 0b80 si @DSPA, #0x0b80 - // 01c3 16c9 0000 si @DSCR, #0x0000 - // 01c5 16cb 00c0 si @DSBL, #0x00c0 - - // DMA 0x00c0bytes to DMEM @ 0x0b80 from CPU @ maddr - - // 01c7 0082 0e08 lri $AR2, #0x0e08 - // 01c9 009f 0000 lri $AC1.M, #0x0000 - // 01cb 1b5f srri @$AR2, $AC1.M - // 01cc 009f 0140 lri $AC1.M, #0x0140 - // 01ce 1b5f srri @$AR2, $AC1.M - // 01cf 009f 0280 lri $AC1.M, #0x0280 - // 01d1 1b5f srri @$AR2, $AC1.M - // 01d2 009f 0400 lri $AC1.M, #0x0400 - // 01d4 1b5f srri @$AR2, $AC1.M - // 01d5 009f 0540 lri $AC1.M, #0x0540 - // 01d7 1b5f srri @$AR2, $AC1.M - // 01d8 009f 0680 lri $AC1.M, #0x0680 - // 01da 1b5f srri @$AR2, $AC1.M - // 01db 009f 07c0 lri $AC1.M, #0x07c0 - // 01dd 1b5f srri @$AR2, $AC1.M - // 01de 009f 0900 lri $AC1.M, #0x0900 - // 01e0 1b5f srri @$AR2, $AC1.M - // 01e1 009f 0a40 lri $AC1.M, #0x0a40 - // 01e3 1b5f srri @$AR2, $AC1.M - *0x0e08 = 0x0000 - *0x0e09 = 0x0140 - *0x0e0a = 0x0280 - *0x0e0b = 0x0400 - *0x0e0c = 0x0540 - *0x0e0d = 0x0680 - *0x0e0e = 0x07c0 - *0x0e0f = 0x0900 - *0x0e10 = 0x0a40 - - // 01e4 02bf 055c call 0x055c - WaitDMA(); - - // 01e6 00de 0ba7 lr $AC0.M, @0x0ba7 - // 01e8 00df 0ba8 lr $AC1.M, @0x0ba8 - // 01ea 2ece srs @DSMAH, $AC0.M - // 01eb 2fcf srs @DSMAL, $AC1.M - // 01ec 16cd 03c0 si @DSPA, #0x03c0 - // 01ee 16c9 0000 si @DSCR, #0x0000 - // 01f0 16cb 0080 si @DSBL, #0x0080 - - // DMA 0x80bytes from CPU @ ((pb.update.dataHi << 16) | pb.update.dataLo) to DRAM @ 0x03c0 - - // 01f2 8100 clr $ACC0 - // 01f3 8900 clr $ACC1 - - // 01f4 00de 0b84 lr $AC0.M, @0x0b84 - // 01f6 009f 0b31 lri $AC1.M, #0x0b31 - // 01f8 4c00 add $ACC0, $ACC1 - // 01f9 1c7e mrr $AR3, $AC0.M - // 01fa 0213 ilrr $AC0.M, @$AR3 - // 01fb 00fe 0e15 sr @0x0e15, $AC0.M - *0x0e15 = *(0x0b31 + pb.srcSelect) // func ptr for src - - // 01fd 00de 0b85 lr $AC0.M, @0x0b85 - // 01ff 009f 0b34 lri $AC1.M, #0x0b34 - // 0201 4c00 add $ACC0, $ACC1 - // 0202 1c7e mrr $AR3, $AC0.M - // 0203 0213 ilrr $AC0.M, @$AR3 - // 0204 00fe 0e16 sr @0x0e16, $AC0.M - *0x0e16 = *(0x0b34 + pb.coefSelect) // ptr to coef table - - // 0206 00de 0b86 lr $AC0.M, @0x0b86 - // 0208 009f 0b11 lri $AC1.M, #0x0b11 - // 020a 4c00 add $ACC0, $ACC1 - // 020b 1c7e mrr $AR3, $AC0.M - // 020c 0213 ilrr $AC0.M, @$AR3 - // 020d 00fe 0e14 sr @0x0e14, $AC0.M - *0x0e14 = *(0x0b11 + pb.mixerCtrl) // func ptr for mixer - - // 020f 8100 clr $ACC0 - // 0210 00de 0b9b lr $AC0.M, @0x0b9b - // 0212 b100 tst $ACC0 - // 0213 0295 023a jz 0x023a - if (pb.itd.flag != AX_PB_ITD_OFF) { - // 0215 8900 clr $ACC1 - // 0216 00df 0b9e lr $AC1.M, @0x0b9e - // 0218 0300 0cc0 addi $AC1.M, #0x0cc0 - // 021a 00ff 0e40 sr @0x0e40, $AC1.M - *0x0e40 = 0x0cc0 + pb.itd.shiftL - - // 021c 00df 0b9f lr $AC1.M, @0x0b9f - // 021e 0300 0cc0 addi $AC1.M, #0x0cc0 - // 0220 00ff 0e41 sr @0x0e41, $AC1.M - *0x0e41 = 0x0cc0 + pb.itd.shiftR - - // 0222 009f 0ce0 lri $AC1.M, #0x0ce0 - // 0224 00ff 0e42 sr @0x0e42, $AC1.M - // 0226 00ff 0e43 sr @0x0e43, $AC1.M - *0x0e42 = 0x0ce0 - *0x0e43 = 0x0ce0 - - // 0228 02bf 055c call 0x055c - WaitDMA(); - - // 022a 00de 0b9c lr $AC0.M, @0x0b9c - // 022c 2ece srs @DSMAH, $AC0.M - // 022d 00de 0b9d lr $AC0.M, @0x0b9d - // 022f 2ecf srs @DSMAL, $AC0.M - // 0230 16cd 0cc0 si @DSPA, #0x0cc0 - // 0232 16c9 0000 si @DSCR, #0x0000 - // 0234 16cb 0040 si @DSBL, #0x0040 - - // DMA 0x0040bytes to DMEM @ 0x0cc0 from CPU @ (pb.itd.bufferHi << 16) | pb.itd.bufferLo - - // 0236 02bf 055c call 0x055c - WaitDMA(); - - // 0238 029f 0068 jmp 0x0068 - goto DoNextCommand; - - } else { - - // 023a 009f 0ce0 lri $AC1.M, #0x0ce0 - // 023c 00ff 0e42 sr @0x0e42, $AC1.M - // 023e 00ff 0e40 sr @0x0e40, $AC1.M - // 0240 00ff 0e41 sr @0x0e41, $AC1.M - // 0242 00ff 0e43 sr @0x0e43, $AC1.M - *0x0e42 = 0x0ce0 - *0x0e40 = 0x0ce0 - *0x0e41 = 0x0ce0 - *0x0e43 = 0x0ce0 - - // 0244 02bf 055c call 0x055c - WaitDMA(); - - // 0246 029f 0068 jmp 0x0068 - goto DoNextCommand; - } -} - -// Function calls itself until there are no more linked PBs -void Cmd_3() { - 0248 8e00 set16 - - // Save CmdBlockBuf ptr - 0249 00e0 0e07 sr @0x0e07, $AR0 - - // Processes pb.update.updNum[0] to pb.update.updNum[5] - // Applies specified number of updates for every millisecond of voice frame (5 millisecs) - // first millisec's updates are ignored <- not proven, yet - - // 024b 0080 0ba2 lri $AR0, #0x0ba2 // pb.update.updNum[0] - // 024d 0081 03c0 lri $AR1, #0x03c0 - // 024f 0e05 lris $AC0.M, #0x05 - // 0250 00fe 0e04 sr @0x0e04, $AC0.M // counter to decrement - // 0252 8900 clr $ACC1 - u16* pUpdates_this_ms = 0x0ba2 - u16* pUpdate_block = 0x03c0 - u16 ms_remaining = 5 - -NextMillisecUpd: - // 0253 8150 clr'l $ACC0 : $AX0.H, @$AR0 - // 0254 009f 0b80 lri $AC1.M, #0x0b80 - // 0256 007a 025b bloop $AX0.H, 0x025b - // 0258 193e lrri $AC0.M, @$AR1 - // 0259 4c49 add'l $ACC0, $ACC1 : $AX1.L, @$AR1 - // 025a 1c5e mrr $AR2, $AC0.M - // 025b 1a59 srr @$AR2, $AX1.L // AR2 isn't changed till updates are done - - // Write updates from update_block to pb in dram - for (int i = 0; i < *pUpdates_this_ms; i+=2) { - // Looks like 0x03c0 is a struct of pairs to write into PB - *(0x0b80 + *(pUpdate_block + i)) = *(pUpdate_block + i + 1) - } - pUpdates_this_ms++ - - // 025c 0083 0e05 lri $AR3, #0x0e05 - // 025e 1b61 srri @$AR3, $AR1 - // 025f 1b60 srri @$AR3, $AR0 - *0x0e05 = pUpdate_block - *0x0e06 = pUpdates_this_ms - // They are restored before jmping back to NextMillisecUpd - - // 0260 00de 0b87 lr $AC0.M, @0x0b87 - // 0262 0601 cmpis $AC0.M, #0x01 - // 0263 0295 0267 jz 0x0267 - // 0265 029f 0332 jmp 0x0332 - if (pb.state == AX_PB_STATE_RUN) { - - // 0267 00de 0e42 lr $AC0.M, @0x0e42 - // 0269 00fe 0e1c sr @0x0e1c, $AC0.M - *0x0e1c = *0x0e42 - - // 026b 00c3 0e15 lr $AR3, @0x0e15 - // 026d 177f callr $AR3 - DoSelectedSRC() - - // Volume Envelope Processing - // 026e 8e00 set16 - // 026f 8a00 m2 - // 0270 8100 clr $ACC0 - // 0271 8900 clr $ACC1 - // 0272 00de 0bb3 lr $AC0.M, @0x0bb3 // currentDelta (s16) - // 0274 00df 0bb2 lr $AC1.M, @0x0bb2 // currentVolume (u16) - // 0276 1f1f mrr $AX0.L, $AC1.M - // 0277 4d00 add $ACC1, $ACC0 - // 0278 1481 asl $ACC0, #1 - // 0279 8d1e set15'mv : $AX1.H, $AC0.M // unsigned mulx, - // 027a 1fd8 mrr $AC0.M, $AX0.L - // 027b 0098 8000 lri $AX0.L, #0x8000 - // 027d 0080 0e44 lri $AR0, #0x0e44 - // 027f a830 mulx's $AX0.L, $AX1.H : @$AR0, $AC0.M - // 0280 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0281 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0282 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0283 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0284 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0285 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0286 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0287 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0288 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0289 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 028a ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 028b ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 028c ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 028d ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 028e ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 028f ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0290 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0291 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0292 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0293 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0294 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0295 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0296 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0297 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 0298 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 0299 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 029a ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 029b ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 029c ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 029d ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - // 029e ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - // 029f 00fe 0bb2 sr @0x0bb2, $AC0.M - - u40 temp1 = pb.ve.currentVolume << 16 - u40 temp2 = (pb.ve.currentVolume + pb.ve.currentDelta) << 16 - *0x0e44 = temp1 >> 16 - *0x0e45 = temp2 >> 16 - - u40 PROD = (u16)0x8000 * (u16)(pb.ve.currentDelta << 1) * 2 - for (u16* i = 0x0e46; i < 0x0e46 + 30; i+=2) { - temp1 += PROD - temp2 += PROD - - *i = temp1 >> 16 - *(i + 1) = temp2 >> 16 - } - temp1 += PROD - pb.ve.currentVolume = temp1 >> 16 - - // 02a1 8f00 set40 - // 02a2 0080 0e44 lri $AR0, #0x0e44 - // 02a4 00c1 0e43 lr $AR1, @0x0e43 - // 02a6 1c61 mrr $AR3, $AR1 - // 02a7 193a lrri $AX0.H, @$AR1 - // 02a8 1918 lrri $AX0.L, @$AR0 - // 02a9 9059 mul'l $AX0.L, $AX0.H : $AX1.H, @$AR1 - // 02aa 1919 lrri $AX1.L, @$AR0 - // 02ab 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02ac 8080 nx'ls : $AX0.L, $AC0.M - // 02ad 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02ae 8091 nx'ls : $AX1.L, $AC1.M - // 02af 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02b0 8080 nx'ls : $AX0.L, $AC0.M - // 02b1 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02b2 8091 nx'ls : $AX1.L, $AC1.M - // 02b3 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02b4 8080 nx'ls : $AX0.L, $AC0.M - // 02b5 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02b6 8091 nx'ls : $AX1.L, $AC1.M - // 02b7 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02b8 8080 nx'ls : $AX0.L, $AC0.M - // 02b9 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02ba 8091 nx'ls : $AX1.L, $AC1.M - // 02bb 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02bc 8080 nx'ls : $AX0.L, $AC0.M - // 02bd 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02be 8091 nx'ls : $AX1.L, $AC1.M - // 02bf 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02c0 8080 nx'ls : $AX0.L, $AC0.M - // 02c1 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02c2 8091 nx'ls : $AX1.L, $AC1.M - // 02c3 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02c4 8080 nx'ls : $AX0.L, $AC0.M - // 02c5 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02c6 8091 nx'ls : $AX1.L, $AC1.M - // 02c7 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02c8 8080 nx'ls : $AX0.L, $AC0.M - // 02c9 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02ca 8091 nx'ls : $AX1.L, $AC1.M - // 02cb 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02cc 8080 nx'ls : $AX0.L, $AC0.M - // 02cd 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02ce 8091 nx'ls : $AX1.L, $AC1.M - // 02cf 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02d0 8080 nx'ls : $AX0.L, $AC0.M - // 02d1 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02d2 8091 nx'ls : $AX1.L, $AC1.M - // 02d3 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02d4 8080 nx'ls : $AX0.L, $AC0.M - // 02d5 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02d6 8091 nx'ls : $AX1.L, $AC1.M - // 02d7 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02d8 8080 nx'ls : $AX0.L, $AC0.M - // 02d9 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02da 8091 nx'ls : $AX1.L, $AC1.M - // 02db 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02dc 8080 nx'ls : $AX0.L, $AC0.M - // 02dd 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02de 8091 nx'ls : $AX1.L, $AC1.M - // 02df 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02e0 8080 nx'ls : $AX0.L, $AC0.M - // 02e1 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02e2 8091 nx'ls : $AX1.L, $AC1.M - // 02e3 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - // 02e4 8080 nx'ls : $AX0.L, $AC0.M - // 02e5 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - // 02e6 8091 nx'ls : $AX1.L, $AC1.M - // 02e7 9e00 mulmv $AX1.L, $AX1.H, $ACC0 - // 02e8 6f33 movp's $ACC1 : @$AR3, $AC0.M - // 02e9 1b7f srri @$AR3, $AC1.M - - u16* dst = *0x0e43 - u16* temp1 = 0x0e44 - - for (x = 0; x < 0x20; x++) { - *(dst + x) = ((u16)*(temp1 + x) * (u16)*(dst + x) * 2) >> 16 - } - - // 02ea 00c3 0e14 lr $AR3, @0x0e14 - // 02ec 8f00 set40 - // 02ed 8d00 set15 - // 02ee 8a00 m2 - // 02ef 177f callr $AR3 - // Keep in mind: 40bit, unsigned, *2 - DoSelectedMixer() - - // Note: 40bit, unsigned, *2 not changed till 0x0332 - - // 02f0 8100 clr $ACC0 - // 02f1 00de 0b9b lr $AC0.M, @0x0b9b - // 02f3 b100 tst $ACC0 - // 02f4 0295 032a jz 0x032a - if (pb.itd.flag != AX_PB_ITD_OFF) { - // 02f6 00de 0e42 lr $AC0.M, @0x0e42 - // 02f8 00fe 0e43 sr @0x0e43, $AC0.M - *0x0e43 = *0x0e42 - - // 02fa 8100 clr $ACC0 - // 02fb 8900 clr $ACC1 - // 02fc 00de 0b9e lr $AC0.M, @0x0b9e - // 02fe 00df 0ba0 lr $AC1.M, @0x0ba0 - // 0300 8200 cmp - // 0301 0293 0306 jle 0x0306 - if (pb.itd.shiftL > pb.itd.targetShiftL) { - // 0303 7800 decm $AC0.M - // 0304 029f 0309 jmp 0x0309 - pb.itd.shiftL-- - } else if (pb.itd.shiftL < pb.itd.targetShiftL) { - // 0306 0295 0309 jz 0x0309 - // 0308 7400 incm $AC0.M - pb.itd.shiftL++ - } - // 0309 00fe 0b9e sr @0x0b9e, $AC0.M // Store pb.itd.shiftL - - // 030b 00df 0e43 lr $AC1.M, @0x0e43 - // 030d 05e0 addis $AC1.M, #0xe0 - // 030e 4c00 add $ACC0, $ACC1 - // 030f 00fe 0e40 sr @0x0e40, $AC0.M - *0x0e40 = *0x0e43 - 32 - - // 0311 8100 clr $ACC0 - // 0312 8900 clr $ACC1 - // 0313 00de 0b9f lr $AC0.M, @0x0b9f - // 0315 00df 0ba1 lr $AC1.M, @0x0ba1 - // 0317 8200 cmp - // 0318 0293 031d jle 0x031d - if (pb.itd.shiftR > pb.itd.targetShiftR) { - // 031a 7800 decm $AC0.M - // 031b 029f 0320 jmp 0x0320 - pb.itd.shiftR-- - } else if (pb.itd.shiftR < pb.itd.targetShiftR) { - // 031d 0295 0320 jz 0x0320 - // 031f 7400 incm $AC0.M - pb.itd.shiftR++ - } - // 0320 00fe 0b9f sr @0x0b9f, $AC0.M // Store pb.itd.shiftR - - // 0322 00df 0e43 lr $AC1.M, @0x0e43 - // 0324 05e0 addis $AC1.M, #0xe0 - // 0325 4c00 add $ACC0, $ACC1 - // 0326 00fe 0e41 sr @0x0e41, $AC0.M - *0x0e41 = *0x0e43 - 32 - - 0328 029f 0332 jmp 0x0332 - - } else { // pb.itd.flag == AX_PB_ITD_OFF - - // 032a 00de 0e42 lr $AC0.M, @0x0e42 - // 032c 00fe 0e40 sr @0x0e40, $AC0.M - // 032e 00fe 0e41 sr @0x0e41, $AC0.M - // 0330 00fe 0e43 sr @0x0e43, $AC0.M - *0x0e40 = *0x0e42 - *0x0e41 = *0x0e42 - *0x0e43 = *0x0e42 - } - } - - - // 0332 8100 clr $ACC0 - // 0333 8e00 set16 - // 0334 8400 clrp - // 0335 8900 clr $ACC1 - // 0336 1efe mrr $PROD.M2, $AC0.M - // 0337 0e40 lris $AC0.M, #0x40 - // 0338 1ebe mrr $PROD.M1, $AC0.M - // 0339 0083 0e08 lri $AR3, #0x0e08 - // 033b 1c03 mrr $AR0, $AR3 - // 033c 1ff5 mrr $AC1.M, $PROD.M1 - // 033d 191a lrri $AX0.H, @$AR0 - // 033e f858 addpaxz'l $ACC0, $AX0.H : $AX1.H, @$AR0 - // 033f fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - // 0340 f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - // 0341 fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - // 0342 f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - // 0343 fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - // 0344 f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - // 0345 fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - // 0346 f83b addpaxz's $ACC0, $AX0.H : @$AR3, $AC1.M - // 0347 1b7e srri @$AR3, $AC0.M - - for (u16* i = 0x0e08; i <= 0x0e10; i++) { - *i = (u16)( (0xff00400000 + (u40)(*i << 16)) >> 16 ) - } - - // 0348 0083 0e04 lri $AR3, #0x0e04 - // 034a 8100 clr $ACC0 - // 034b 8973 clr'l $ACC1 : $AC0.M, @$AR3 - // 034c 1961 lrri $AR1, @$AR3 // 0x0e05 - // 034d 1960 lrri $AR0, @$AR3 // 0x0e06 - // 034e 7800 decm $AC0.M - // 034f 00fe 0e04 sr @0x0e04, $AC0.M - // 0351 0294 0253 jnz 0x0253 - ms_remaining-- - if (ms_remaining) - goto NextMillisecUpd - - // 0353 8e00 set16 - // 0354 8100 clr $ACC0 - // 0355 00de 0b9b lr $AC0.M, @0x0b9b - // 0357 b100 tst $ACC0 - // 0358 0295 036a jz 0x036a - if (pb.itd.flag != AX_PB_ITD_OFF) { - - // 035a 00de 0b9c lr $AC0.M, @0x0b9c - // 035c 00dc 0b9d lr $AC0.L, @0x0b9d - // 035e 2ece srs @DSMAH, $AC0.M - // 035f 2ccf srs @DSMAL, $AC0.L - // 0360 8100 clr $ACC0 - // 0361 00de 0e1c lr $AC0.M, @0x0e1c - // 0363 2ecd srs @DSPA, $AC0.M - // 0364 16c9 0001 si @DSCR, #0x0001 - // 0366 16cb 0040 si @DSBL, #0x0040 - - // DMA 0x40bytes from DRAM @ (*0x0e1c) to CPU @ ((pb.itd.bufferHi << 16) | pb.itd.bufferLo) - - // 0368 02bf 055c call 0x055c - WaitDMA(); - } - - // 036a 8100 clr $ACC0 - // 036b 8900 clr $ACC1 - // 036c 00de 0b82 lr $AC0.M, @0x0b82 - // 036e 00df 0b83 lr $AC1.M, @0x0b83 - u16 maddrh = pb.currHi - u16 maddrl = pb.currLo - - // This writes back the whole PB to mram from dsp - // 0370 2ece srs @DSMAH, $AC0.M - // 0371 2fcf srs @DSMAL, $AC1.M - // 0372 16cd 0b80 si @DSPA, #0x0b80 - // 0374 16c9 0001 si @DSCR, #0x0001 - // 0376 16cb 00c0 si @DSBL, #0x00c0 - - // DMA 0xc0bytes from DRAM @ 0x0b80 to CPU @ maddr - - // 0378 02bf 055c call 0x055c - WaitDMA(); - - // 037a 8100 clr $ACC0 - // 037b 00de 0b80 lr $AC0.M, @0x0b80 - // 037d 00dc 0b81 lr $AC0.L, @0x0b81 - // 037f b100 tst $ACC0 - // 0380 0294 0386 jnz 0x0386 - if (((pb.nextHi << 16) | pb.nextLo) == 0) { - // No more PBs! - - // Restore CmdBlockBuf ptr - 0382 00c0 0e07 lr $AR0, @0x0e07 - // 0384 029f 0068 jmp 0x0068 - goto DoNextCommand; - } - - // DMA in the next PB - // From here on out, it's the same as Cmd2, except it calls itself to process the PB it just loaded - - // 0386 2ece srs @DSMAH, $AC0.M - // 0387 2ccf srs @DSMAL, $AC0.L - // 0388 16cd 0b80 si @DSPA, #0x0b80 - // 038a 16c9 0000 si @DSCR, #0x0000 - // 038c 16cb 00c0 si @DSBL, #0x00c0 - - // DMA 0xc0bytes from CPU @ ((pb.nextHi << 16) | pb.nextLo) to DRAM @ 0x0b80 - - // 038e 0082 0e08 lri $AR2, #0x0e08 - // 0390 009f 0000 lri $AC1.M, #0x0000 - // 0392 1b5f srri @$AR2, $AC1.M - // 0393 009f 0140 lri $AC1.M, #0x0140 - // 0395 1b5f srri @$AR2, $AC1.M - // 0396 009f 0280 lri $AC1.M, #0x0280 - // 0398 1b5f srri @$AR2, $AC1.M - // 0399 009f 0400 lri $AC1.M, #0x0400 - // 039b 1b5f srri @$AR2, $AC1.M - // 039c 009f 0540 lri $AC1.M, #0x0540 - // 039e 1b5f srri @$AR2, $AC1.M - // 039f 009f 0680 lri $AC1.M, #0x0680 - // 03a1 1b5f srri @$AR2, $AC1.M - // 03a2 009f 07c0 lri $AC1.M, #0x07c0 - // 03a4 1b5f srri @$AR2, $AC1.M - // 03a5 009f 0900 lri $AC1.M, #0x0900 - // 03a7 1b5f srri @$AR2, $AC1.M - // 03a8 009f 0a40 lri $AC1.M, #0x0a40 - // 03aa 1b5f srri @$AR2, $AC1.M - *0x0e08 = 0x0000 - *0x0e09 = 0x0140 - *0x0e0a = 0x0280 - *0x0e0b = 0x0400 - *0x0e0c = 0x0540 - *0x0e0d = 0x0680 - *0x0e0e = 0x07c0 - *0x0e0f = 0x0900 - *0x0e10 = 0x0a40 - - // 03ab 02bf 055c call 0x055c - WaitDMA(); - - // 03ad 00de 0ba7 lr $AC0.M, @0x0ba7 - // 03af 00df 0ba8 lr $AC1.M, @0x0ba8 - // 03b1 2ece srs @DSMAH, $AC0.M - // 03b2 2fcf srs @DSMAL, $AC1.M - // 03b3 16cd 03c0 si @DSPA, #0x03c0 - // 03b5 16c9 0000 si @DSCR, #0x0000 - // 03b7 16cb 0080 si @DSBL, #0x0080 - - // DMA 0x80bytes from CPU @ ((pb.update.dataHi << 16) | pb.update.dataLo) to DRAM @ 0x03c0 - - // 03b9 8100 clr $ACC0 - // 03ba 8900 clr $ACC1 - - // 03bb 00de 0b84 lr $AC0.M, @0x0b84 - // 03bd 009f 0b31 lri $AC1.M, #0x0b31 - // 03bf 4c00 add $ACC0, $ACC1 - // 03c0 1c7e mrr $AR3, $AC0.M - // 03c1 0213 ilrr $AC0.M, @$AR3 - // 03c2 00fe 0e15 sr @0x0e15, $AC0.M - *0x0e15 = *(0x0b31 + pb.srcSelect) // func ptr for src - - // 03c4 00de 0b85 lr $AC0.M, @0x0b85 - // 03c6 009f 0b34 lri $AC1.M, #0x0b34 - // 03c8 4c00 add $ACC0, $ACC1 - // 03c9 1c7e mrr $AR3, $AC0.M - // 03ca 0213 ilrr $AC0.M, @$AR3 - // 03cb 00fe 0e16 sr @0x0e16, $AC0.M - *0x0e16 = *(0x0b34 + pb.coefSelect) // ptr to coef table - - // 03cd 00de 0b86 lr $AC0.M, @0x0b86 - // 03cf 009f 0b11 lri $AC1.M, #0x0b11 - // 03d1 4c00 add $ACC0, $ACC1 - // 03d2 1c7e mrr $AR3, $AC0.M - // 03d3 0213 ilrr $AC0.M, @$AR3 - // 03d4 00fe 0e14 sr @0x0e14, $AC0.M - *0x0e14 = *(0x0b11 + pb.mixerCtrl) // func ptr for mixer - - // 03d6 8100 clr $ACC0 - // 03d7 00de 0b9b lr $AC0.M, @0x0b9b - // 03d9 b100 tst $ACC0 - // 03da 0295 0403 jz 0x0403 - if (pb.itd.flag != AX_PB_ITD_OFF) { - // 03dc 8900 clr $ACC1 - // 03dd 00df 0b9e lr $AC1.M, @0x0b9e - // 03df 0300 0cc0 addi $AC1.M, #0x0cc0 - // 03e1 00ff 0e40 sr @0x0e40, $AC1.M - *0x0e40 = 0x0cc0 + pb.itd.shiftL - - // 03e3 00df 0b9f lr $AC1.M, @0x0b9f - // 03e5 0300 0cc0 addi $AC1.M, #0x0cc0 - // 03e7 00ff 0e41 sr @0x0e41, $AC1.M - *0x0e41 = 0x0cc0 + pb.itd.shiftR - - // 03e9 009f 0ce0 lri $AC1.M, #0x0ce0 - // 03eb 00ff 0e42 sr @0x0e42, $AC1.M - // 03ed 00ff 0e43 sr @0x0e43, $AC1.M - *0x0e42 = 0x0ce0 - *0x0e43 = 0x0ce0 - - // 03ef 02bf 055c call 0x055c - WaitDMA(); - - // 03f1 00de 0b9c lr $AC0.M, @0x0b9c - // 03f3 2ece srs @DSMAH, $AC0.M - // 03f4 00de 0b9d lr $AC0.M, @0x0b9d - // 03f6 2ecf srs @DSMAL, $AC0.M - // 03f7 16cd 0cc0 si @DSPA, #0x0cc0 - // 03f9 16c9 0000 si @DSCR, #0x0000 - // 03fb 16cb 0040 si @DSBL, #0x0040 - - // DMA 0x0040bytes to DMEM @ 0x0cc0 from CPU @ (pb.itd.bufferHi << 16) | pb.itd.bufferLo - - // 03fd 02bf 055c call 0x055c - WaitDMA(); - - // Restore CmdBlockBuf ptr - 03ff 00c0 0e07 lr $AR0, @0x0e07 - // 0401 029f 0248 jmp 0x0248 - goto Cmd_3() // Calls itself till there are no more PBs linked - - } else { - - // 0403 009f 0ce0 lri $AC1.M, #0x0ce0 - // 0405 00ff 0e42 sr @0x0e42, $AC1.M - // 0407 00ff 0e40 sr @0x0e40, $AC1.M - // 0409 00ff 0e41 sr @0x0e41, $AC1.M - // 040b 00ff 0e43 sr @0x0e43, $AC1.M - *0x0e42 = 0x0ce0 - *0x0e40 = 0x0ce0 - *0x0e41 = 0x0ce0 - *0x0e43 = 0x0ce0 - - // 040d 02bf 055c call 0x055c - WaitDMA(); - - // Restore CmdBlockBuf ptr - 040f 00c0 0e07 lr $AR0, @0x0e07 - // 0411 029f 0248 jmp 0x0248 - goto Cmd_3() // Calls itself till there are no more PBs linked - } -} - -void Cmd_4() { - 0413 8e00 set16 - - 0414 0086 0400 lri $IX2, #0x0400 // buffer in dram - - // 0416 8100 clr $ACC0 - // 0417 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 0418 191c lrri $AC0.L, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 0419 2ece srs @DSMAH, $AC0.M - // 041a 2ccf srs @DSMAL, $AC0.L - // 041b 1fc6 mrr $AC0.M, $IX2 - // 041c 2ecd srs @DSPA, $AC0.M - // 041d 16c9 0001 si @DSCR, #0x0001 - // 041f 16cb 0780 si @DSBL, #0x0780 - - // DMA 0x0780bytes from DRAM @ 0x0400 to CPU @ maddr - - // 0421 02bf 055c call 0x055c - WaitDMA(); - - 0423 02bf 0484 call 0x0484 - - // 0425 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_5() { - 0427 8e00 set16 - - 0428 0086 07c0 lri $IX2, #0x07c0 - - 042a 8100 clr $ACC0 - 042b 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 042c 191c lrri $AC0.L, @$AR0 - 042d 2ece srs @DSMAH, $AC0.M - 042e 2ccf srs @DSMAL, $AC0.L - 042f 1fc6 mrr $AC0.M, $IX2 - 0430 2ecd srs @DSPA, $AC0.M - 0431 16c9 0001 si @DSCR, #0x0001 - 0433 16cb 0780 si @DSBL, #0x0780 - - // 0435 02bf 055c call 0x055c - WaitDMA(); - - 0437 02bf 0484 call 0x0484 - - // 0439 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_E() { - 043b 8c00 clr15 - 043c 8a00 m2 - 043d 8100 clr $ACC0 - 043e 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 043f 191f lrri $AC1.M, @$AR0 - 0440 2ece srs @DSMAH, $AC0.M - 0441 2fcf srs @DSMAL, $AC1.M - 0442 16cd 0280 si @DSPA, #0x0280 - 0444 16c9 0001 si @DSCR, #0x0001 // DMEM -> CPU - 0446 16cb 0280 si @DSBL, #0x0280 - - 0448 8f50 set40'l : $AX0.H, @$AR0 - 0449 8140 clr'l $ACC0 : $AX0.L, @$AR0 - 044a 0081 0400 lri $AR1, #0x0400 - 044c 0083 0000 lri $AR3, #0x0000 - 044e 0082 0140 lri $AR2, #0x0140 - 0450 0099 0080 lri $AX1.L, #0x0080 - - // 0452 02bf 055c call 0x055c - WaitDMA(); - - 0454 1105 046c bloopi #0x05, 0x046c - 0456 1f61 mrr $AX1.H, $AR1 - - 0457 1120 045e bloopi #0x20, 0x045e - 0459 8972 clr'l $ACC1 : $AC0.M, @$AR2 - 045a 195c lrri $AC0.L, @$AR2 - 045b f07b lsl16'l $ACC0 : $AC1.M, @$AR3 - 045c 197d lrri $AC1.L, @$AR3 - 045d f131 lsl16's $ACC1 : @$AR1, $AC0.M - 045e 8139 clr's $ACC0 : @$AR1, $AC1.M - - 045f 8900 clr $ACC1 - 0460 6800 movax $ACC0, $AX0 - 0461 2ece srs @DSMAH, $AC0.M - 0462 2ccf srs @DSMAL, $AC0.L - 0463 1ffb mrr $AC1.M, $AX1.H - 0464 2fcd srs @DSPA, $AC1.M - 0465 0f01 lris $AC1.M, #0x01 - 0466 2fc9 srs @DSCR, $AC1.M - 0467 1ff9 mrr $AC1.M, $AX1.L - 0468 2fcb srs @DSBL, $AC1.M - 0469 7200 addaxl $ACC0, $AX1.L - 046a 1f5e mrr $AX0.H, $AC0.M - 046b 1f1c mrr $AX0.L, $AC0.L - 046c 8100 clr $ACC0 - - // 046d 26c9 lrs $AC0.M, @DSCR - // 046e 02a0 0004 andf $AC0.M, #0x0004 - // 0470 029c 046d jlnz 0x046d - while (@DSCR & 4); - - // 0472 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void UnimplimentedCmd_B() { - // 0474 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void UnimplimentedCmd_C() { - // 0476 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void UnimplimentedCmd_A() { - // 0478 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Task_Yield() { - // Send DSP_YIELD mail - // 047a 16fc dcd1 si @DMBH, #0xdcd1 - // 047c 16fd 0002 si @DMBL, #0x0002 - DMB = 0xdcd10002 - // 047e 16fb 0001 si @DIRQ, #0x0001 - - 0480 029f 0c91 jmp 0x0c91 -} - - // Unused? - // 0482 029f 0045 jmp 0x0045 - goto GetNextCmdBlock; - -// Called by cmds 4 5 9 -// IX2 is always modified before calling... -void UnkFunc() { - 0484 8e00 set16 - 0485 191f lrri $AC1.M, @$AR0 - 0486 191d lrri $AC1.L, @$AR0 - 0487 1f5f mrr $AX0.H, $AC1.M - 0488 1f1d mrr $AX0.L, $AC1.L - 0489 2fce srs @DSMAH, $AC1.M - 048a 2dcf srs @DSMAL, $AC1.L - 048b 8900 clr $ACC1 - 048c 1fa6 mrr $AC1.L, $IX2 - 048d 2dcd srs @DSPA, $AC1.L - 048e 0e00 lris $AC0.M, #0x00 - 048f 2ec9 srs @DSCR, $AC0.M - 0490 8100 clr $ACC0 - 0491 009c 00c0 lri $AC0.L, #0x00c0 - 0493 2ccb srs @DSBL, $AC0.L - 0494 1ca0 mrr $IX1, $AR0 - 0495 0081 0e44 lri $AR1, #0x0e44 - 0497 4800 addax $ACC0, $AX0 - 0498 1b3e srri @$AR1, $AC0.M - 0499 1b3c srri @$AR1, $AC0.L - 049a 0b00 lris $AX1.H, #0x00 - 049b 0099 0060 lri $AX1.L, #0x0060 - 049d 4b00 addax $ACC1, $AX1 - 049e 1b3d srri @$AR1, $AC1.L - 049f 0081 0e44 lri $AR1, #0x0e44 - 04a1 1c06 mrr $AR0, $IX2 - 04a2 0083 0000 lri $AR3, #0x0000 - 04a4 1c43 mrr $AR2, $AR3 - - 04a5 27c9 lrs $AC1.M, @DSCR - 04a6 03a0 0004 andf $AC1.M, #0x0004 - 04a8 029c 04a5 jlnz 0x04a5 - - 04aa 1109 04da bloopi #0x09, 0x04da - 04ac 8e00 set16 - 04ad 193a lrri $AX0.H, @$AR1 - 04ae 1938 lrri $AX0.L, @$AR1 - 04af 6900 movax $ACC1, $AX0 - 04b0 2fce srs @DSMAH, $AC1.M - 04b1 2dcf srs @DSMAL, $AC1.L - 04b2 8900 clr $ACC1 - 04b3 193d lrri $AC1.L, @$AR1 - 04b4 2dcd srs @DSPA, $AC1.L - 04b5 16c9 0000 si @DSCR, #0x0000 - 04b7 8100 clr $ACC0 - 04b8 009c 00c0 lri $AC0.L, #0x00c0 - 04ba 2ccb srs @DSBL, $AC0.L - 04bb 0081 0e44 lri $AR1, #0x0e44 - 04bd 4800 addax $ACC0, $AX0 - 04be 1b3e srri @$AR1, $AC0.M - 04bf 1b3c srri @$AR1, $AC0.L - 04c0 0b00 lris $AX1.H, #0x00 - 04c1 0960 lris $AX1.L, #0x60 - 04c2 4b00 addax $ACC1, $AX1 - 04c3 1b3d srri @$AR1, $AC1.L - 04c4 0081 0e44 lri $AR1, #0x0e44 - 04c6 8f00 set40 - 04c7 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04c8 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04c9 6a00 movax $ACC0, $AX1 - 04ca 4800 addax $ACC0, $AX0 - 04cb 1117 04d4 bloopi #0x17, 0x04d4 - 04cd 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04ce 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04cf 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 04d0 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 04d1 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04d2 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04d3 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 04d4 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 04d5 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04d6 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04d7 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 04d8 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 04d9 1b5f srri @$AR2, $AC1.M - 04da 1b5d srri @$AR2, $AC1.L - - 04db 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04dc 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04dd 6a00 movax $ACC0, $AX1 - 04de 4800 addax $ACC0, $AX0 - - 04df 1117 04e8 bloopi #0x17, 0x04e8 - 04e1 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04e2 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04e3 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 04e4 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 04e5 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04e6 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04e7 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 04e8 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - - 04e9 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 04ea 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 04eb 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 04ec 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 04ed 1b5f srri @$AR2, $AC1.M - 04ee 1b5d srri @$AR2, $AC1.L - 04ef 1c05 mrr $AR0, $IX1 - 04f0 02df ret -} - -// Only called by Command 1 -// AX0 = maddr -// AX1.L = unkForMulBuffer1 -// AR1 = unkForMulBuffer2 -void Unk(maddr, unkForMulBuffer1, unkForMulBuffer2) { - 04f1 8e00 set16 - - // 04f2 009b 0e44 lri $AX1.H, #0x0e44 - // 04f4 009d 00c0 lri $AC1.L, #0x00c0 - // 04f6 02bf 0541 call 0x0541 - u16 daddr = 0x0e44 - const u16 dma_len = 0x00c0 - DMA_CPUToDMEM(maddr, daddr, dma_len); - - // 04f8 4900 addax $ACC1, $AX0 - // 04f9 00ff 0e1d sr @0x0e1d, $AC1.M - // 04fb 00fd 0e1e sr @0x0e1e, $AC1.L - // 04fd 8900 clr $ACC1 - maddr += dma_len - - // 04fe 02bf 055c call 0x055c - WaitDMA(); - - // 0500 1104 052c bloopi #0x04, 0x052c - for (u8 i = 0; i < 4; i++) { - // 0502 00da 0e1d lr $AX0.H, @0x0e1d // restore - // 0504 00d8 0e1e lr $AX0.L, @0x0e1e // restore - // 0506 009b 0ea4 lri $AX1.H, #0x0ea4 // buffer 2 - // 0508 009d 00c0 lri $AC1.L, #0x00c0 // restore - // 050a 02bf 0541 call 0x0541 - daddr = 0x0ea4 - DMA_CPUToDMEM(maddr, daddr, dma_len); - - // 050c 4900 addax $ACC1, $AX0 - // 050d 00ff 0e1d sr @0x0e1d, $AC1.M // update - // 050f 00fd 0e1e sr @0x0e1e, $AC1.L - maddr += dma_len - - // 0511 0083 0e44 lri $AR3, #0x0e44 - // 0513 02bf 054c call 0x054c - UnknownMulBuffer(0x0e44); - - // 0515 8900 clr $ACC1 - // 0516 00da 0e1d lr $AX0.H, @0x0e1d // restore - // 0518 00d8 0e1e lr $AX0.L, @0x0e1e // restore - // 051a 009b 0e44 lri $AX1.H, #0x0e44 // buffer 1 - // 051c 009d 00c0 lri $AC1.L, #0x00c0 // restore - // 051e 02bf 0541 call 0x0541 - daddr = 0x0e44 - DMA_CPUToDMEM(maddr, daddr, dma_len); - - // 0520 4900 addax $ACC1, $AX0 - // 0521 00ff 0e1d sr @0x0e1d, $AC1.M // update - // 0523 00fd 0e1e sr @0x0e1e, $AC1.L - maddr += dma_len - - // 0525 0083 0ea4 lri $AR3, #0x0ea4 // buffer 2 - // 0527 02bf 054c call 0x054c - UnknownMulBuffer(0x0ea4); - - // 0529 0000 nop - // 052a 0000 nop - // 052b 8e00 set16 // restore - // 052c 8900 clr $ACC1 - } - - // 052d 00da 0e1d lr $AX0.H, @0x0e1d // restore - // 052f 00d8 0e1e lr $AX0.L, @0x0e1e // restore - // 0531 009b 0ea4 lri $AX1.H, #0x0ea4 // buffer 2 - // 0533 009d 00c0 lri $AC1.L, #0x00c0 // restore - // 0535 02bf 0541 call 0x0541 - DMA_CPUToDMEM(maddr, daddr, dma_len); - - // 0537 4900 addax $ACC1, $AX0 - maddr += dma_len - - // 0538 0083 0e44 lri $AR3, #0x0e44 // buffer 1 - // 053a 02bf 054c call 0x054c - UnknownMulBuffer(0x0e44); - - // 053c 0083 0ea4 lri $AR3, #0x0ea4 // buffer 2 - // 053e 02bf 054c call 0x054c - UnknownMulBuffer(0x0ea4); - - 0540 02df ret -} - -// u32 maddr = AX0 -// u16 daddr = AX1.H -// u16 len = AC1.L -// Only transfers from CPU -> DMEM -void DMA_CPUToDMEM() { - 0541 8e00 set16 - 0542 00fa ffce sr @DSMAH, $AX0.H - 0544 00f8 ffcf sr @DSMAL, $AX0.L - 0546 00fb ffcd sr @DSPA, $AX1.H - 0548 16c9 0000 si @DSCR, #0x0000 - 054a 2dcb srs @DSBL, $AC1.L - 054b 02df ret -} - -// IX1 = 0xffff -// AX1.L = unkForMulBuffer1 (next value in cmd block) -// AR1 = unkForMulBuffer2 (0, 0x0400, then 0x07c0) -// AR3 is some buffer, either 0x0e44 or 0x0ea4 -void UnknownMulBuffer() { - 054c 8f00 set40 // Loaded ACx.M values extend to the entire ACC - 054d 8d00 set15 // multiplicands unsigned - 054e 8a00 m2 // mul results doubled - - // 054f 197a lrri $AX0.H, @$AR3 - // 0550 1978 lrri $AX0.L, @$AR3 - AX0.H = *(AR3++) - AX0.L = *(AR3++) - - // 0551 a000 mulx $AX0.L, $AX1.L - // 0552 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - ACC0 = (u16)AX0.L * (u16)unkForMulBuffer1 * 2 - PROD = (u16)AX0.H * (u16)unkForMulBuffer1 * 2 - - // 0553 1130 055a bloopi #0x30, 0x055a - for (int i=0; i<48; i++) { - // 0555 9179 asr16'l $ACC0 : $AC1.M, @$AR1 - ACC0 >>= 16 - AC1.M = *(unkForMulBuffer2++) - - // 0556 4e6d addp'ln $ACC0 : $AC1.L, @$AR1 - ACC0 += PROD - AC1.L = *unkForMulBuffer2 - unkForMulBuffer2 -= 1 - - // 0557 197a lrri $AX0.H, @$AR3 - AX0.H = *(AR3++) - - // 0558 4d43 add'l $ACC1, $ACC0 : $AX0.L, @$AR3 - ACC1 += ACC0 - AX0.L = *(AR3++) - - // 0559 a039 mulx's $AX0.L, $AX1.L : @$AR1, $AC1.M - // 055a b629 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR1, $AC1.L - ACC0 = (u16)AX0.L * (u16)unkForMulBuffer1 * 2 - *(unkForMulBuffer2++) = AC1.M - PROD = (u16)AX0.H * (u16)unkForMulBuffer1 * 2 - *(unkForMulBuffer2++) = AC1.L - } - - 055b 02df ret -} - -void WaitDMA() { - // 055c 26c9 lrs $AC0.M, @DSCR - // 055d 02a0 0004 andf $AC0.M, #0x0004 - // 055f 029c 055c jlnz 0x055c - while (@DSCR & 4); - - // 0561 02df ret - return; -} - -// All apparently unused? -void WaitForCPUMailbox() { - 0562 26fe lrs $AC0.M, @CMBH - 0563 02c0 8000 andcf $AC0.M, #0x8000 - 0565 029c 0562 jlnz 0x0562 - 0567 02df ret -} -void WaitForDSPMailbox1() { - 0568 26fc lrs $AC0.M, @DMBH - 0569 02a0 8000 andf $AC0.M, #0x8000 - 056b 029c 0568 jlnz 0x0568 - 056d 02df ret -} -void WaitForDSPMailbox2() { - 056e 26fc lrs $AC0.M, @DMBH - 056f 02a0 8000 andf $AC0.M, #0x8000 - 0571 029c 056e jlnz 0x056e - 0573 02df ret -} - -void Cmd_7() { - // 0574 8100 clr $ACC0 - // 0575 8970 clr'l $ACC1 : $AC0.M, @$AR0 - // 0576 8e60 set16'l : $AC0.L, @$AR0 - u16 maddrh = *(CmdBlockBuf++) - u16 maddrl = *(CmdBlockBuf++) - - // 0577 2ece srs @DSMAH, $AC0.M - // 0578 2ccf srs @DSMAL, $AC0.L - // 0579 16cd 0e44 si @DSPA, #0x0e44 - // 057b 16c9 0000 si @DSCR, #0x0000 - // 057d 8900 clr $ACC1 - // 057e 0d20 lris $AC1.L, #0x20 - u16 dma_len = 32 - - // 057f 2dcb srs @DSBL, $AC1.L - // DMA 32bytes from CPU @ maddr -> DMEM @ 0x0e44 - - // 0580 4c00 add $ACC0, $ACC1 - maddr += dma_len - - // Push CmdBlockBuf ptr - 0581 1c80 mrr $IX0, $AR0 - - // 0582 0080 0280 lri $AR0, #0x0280 - // 0584 0081 0000 lri $AR1, #0x0000 - // 0586 0082 0140 lri $AR2, #0x0140 - // 0588 0083 0e44 lri $AR3, #0x0e44 - u16* unk_buf1 = 0x0280 - u16* unk_buf2 = 0x0000 - u16* unk_buf3 = 0x0140 - u16* dmem_buf = 0x0e44 - - // 058a 0a00 lris $AX0.H, #0x00 - const u16 null = 0 // Guess is that it's faster to use AXx instead of imm value? - - // 058b 27c9 lrs $AC1.M, @DSCR - // 058c 03a0 0004 andf $AC1.M, #0x0004 - // 058e 029c 058b jlnz 0x058b - while (@DSCR & 4); // Wait for DMA completion - - // 0590 2ece srs @DSMAH, $AC0.M - // 0591 2ccf srs @DSMAL, $AC0.L - // 0592 16cd 0e54 si @DSPA, #0x0e54 - // 0594 16c9 0000 si @DSCR, #0x0000 - // 0596 16cb 0260 si @DSBL, #0x0260 - - // DMA 0x0260bytes from CPU @ maddr -> DMEM @ 0x0e54 - // No waiting for DMA - - // 0598 009f 00a0 lri $AC1.M, #0x00a0 - u16 size = 0x00a0 - - // accum loads in the loop are 40bit - // 059a 8f00 set40 - - // 059b 007f 05a4 bloop $AC1.M, 0x05a4 - for (int i = 0; i < size; i++) { - // !!! Doesn't make sense with current understanding of set40 - 059d 197e lrri $AC0.M, @$AR3 - 059e 1b1a srri @$AR0, $AX0.H - 059f 197c lrri $AC0.L, @$AR3 - 05a0 1b1a srri @$AR0, $AX0.H - 05a1 1b5e srri @$AR2, $AC0.M - 05a2 1b5c srri @$AR2, $AC0.L - 05a3 1b3e srri @$AR1, $AC0.M - 05a4 1b3c srri @$AR1, $AC0.L - } - - // Pop CmdBlockBuf ptr - 05a5 1c04 mrr $AR0, $IX0 - - // 05a6 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -# Following 3 funcs are the SRCs to select from, in order - -void SRC_Polyphase() { - // Copy pb's data [pb.addr.format to pb.adpm.yn2] to corresponding hw regs - // 05a8 0082 0bb8 lri $AR2, #0x0bb8 - // 05aa 195e lrri $AC0.M, @$AR2 - // 05ab 2ed1 srs @SampleFormat, $AC0.M - // 05ac 195e lrri $AC0.M, @$AR2 - // 05ad 2ed4 srs @ACSAH, $AC0.M - // 05ae 195e lrri $AC0.M, @$AR2 - // 05af 2ed5 srs @ACSAL, $AC0.M - // 05b0 195e lrri $AC0.M, @$AR2 - // 05b1 2ed6 srs @ACEAH, $AC0.M - // 05b2 195e lrri $AC0.M, @$AR2 - // 05b3 2ed7 srs @ACEAL, $AC0.M - // 05b4 195e lrri $AC0.M, @$AR2 - // 05b5 2ed8 srs @ACCAH, $AC0.M - // 05b6 195e lrri $AC0.M, @$AR2 - // 05b7 2ed9 srs @ACCAL, $AC0.M - // 05b8 195e lrri $AC0.M, @$AR2 - // 05b9 2ea0 srs @COEF_A1_0, $AC0.M - // 05ba 195e lrri $AC0.M, @$AR2 - // 05bb 2ea1 srs @COEF_A2_0, $AC0.M - // 05bc 195e lrri $AC0.M, @$AR2 - // 05bd 2ea2 srs @COEF_A1_1, $AC0.M - // 05be 195e lrri $AC0.M, @$AR2 - // 05bf 2ea3 srs @COEF_A2_1, $AC0.M - // 05c0 195e lrri $AC0.M, @$AR2 - // 05c1 2ea4 srs @COEF_A1_2, $AC0.M - // 05c2 195e lrri $AC0.M, @$AR2 - // 05c3 2ea5 srs @COEF_A2_2, $AC0.M - // 05c4 195e lrri $AC0.M, @$AR2 - // 05c5 2ea6 srs @COEF_A1_3, $AC0.M - // 05c6 195e lrri $AC0.M, @$AR2 - // 05c7 2ea7 srs @COEF_A2_3, $AC0.M - // 05c8 195e lrri $AC0.M, @$AR2 - // 05c9 2ea8 srs @COEF_A1_4, $AC0.M - // 05ca 195e lrri $AC0.M, @$AR2 - // 05cb 2ea9 srs @COEF_A2_4, $AC0.M - // 05cc 195e lrri $AC0.M, @$AR2 - // 05cd 2eaa srs @COEF_A1_5, $AC0.M - // 05ce 195e lrri $AC0.M, @$AR2 - // 05cf 2eab srs @COEF_A2_5, $AC0.M - // 05d0 195e lrri $AC0.M, @$AR2 - // 05d1 2eac srs @COEF_A1_6, $AC0.M - // 05d2 195e lrri $AC0.M, @$AR2 - // 05d3 2ead srs @COEF_A2_6, $AC0.M - // 05d4 195e lrri $AC0.M, @$AR2 - // 05d5 2eae srs @COEF_A1_7, $AC0.M - // 05d6 195e lrri $AC0.M, @$AR2 - // 05d7 2eaf srs @COEF_A2_7, $AC0.M - // 05d8 195e lrri $AC0.M, @$AR2 - // 05d9 2ede srs @GAIN, $AC0.M - // 05da 195e lrri $AC0.M, @$AR2 - // 05db 2eda srs @scale, $AC0.M - // 05dc 195e lrri $AC0.M, @$AR2 - // 05dd 2edb srs @yn1, $AC0.M - // 05de 195e lrri $AC0.M, @$AR2 - // 05df 2edc srs @yn2, $AC0.M - - 05e0 8c00 clr15 - 05e1 8a00 m2 - 05e2 8e00 set16 - 05e3 00d8 0e16 lr $AX0.L, @0x0e16 - 05e5 195b lrri $AX1.H, @$AR2 - 05e6 1959 lrri $AX1.L, @$AR2 - 05e7 8100 clr $ACC0 - 05e8 195c lrri $AC0.L, @$AR2 - 05e9 0080 0e44 lri $AR0, #0x0e44 - 05eb 195f lrri $AC1.M, @$AR2 - 05ec 1b1f srri @$AR0, $AC1.M - 05ed 195f lrri $AC1.M, @$AR2 - 05ee 1b1f srri @$AR0, $AC1.M - 05ef 195f lrri $AC1.M, @$AR2 - 05f0 1b1f srri @$AR0, $AC1.M - 05f1 185f lrr $AC1.M, @$AR2 - 05f2 1b1f srri @$AR0, $AC1.M - 05f3 6b00 movax $ACC1, $AX1 - 05f4 1505 lsl $ACC1, #5 - 05f5 4d00 add $ACC1, $ACC0 - 05f6 157e lsr $ACC1, #-2 - 05f7 1c9f mrr $IX0, $AC1.M - 05f8 1cbd mrr $IX1, $AC1.L - 05f9 05e0 addis $AC1.M, #0xe0 - 05fa 9900 asr16 $ACC1 - 05fb 7d00 neg $ACC1 - 05fc 1cdd mrr $IX2, $AC1.L - 05fd 8900 clr $ACC1 - 05fe 1fa5 mrr $AC1.L, $IX1 - 05ff 1502 lsl $ACC1, #2 - 0600 1cbf mrr $IX1, $AC1.M - 0601 009a 01fc lri $AX0.H, #0x01fc - 0603 009e 0e44 lri $AC0.M, #0x0e44 - 0605 0081 ffdd lri $AR1, #0xffdd - 0607 0083 0d80 lri $AR3, #0x0d80 - 0609 0064 061a bloop $IX0, 0x061a - 060b 1827 lrr $IX3, @$AR1 - 060c 1b07 srri @$AR0, $IX3 - 060d 4a00 addax $ACC0, $AX1 - 060e 1ffc mrr $AC1.M, $AC0.L - 060f 1827 lrr $IX3, @$AR1 - 0610 1b07 srri @$AR0, $IX3 - 0611 1579 lsr $ACC1, #-7 - 0612 3500 andr $AC1.M, $AX0.H - 0613 1827 lrr $IX3, @$AR1 - 0614 1b07 srri @$AR0, $IX3 - 0615 4100 addr $ACC1, $AX0.L - 0616 1b7e srri @$AR3, $AC0.M - 0617 1827 lrr $IX3, @$AR1 - 0618 1b07 srri @$AR0, $IX3 - 0619 1b7f srri @$AR3, $AC1.M - 061a 0000 nop - - 061b 0065 0620 bloop $IX1, 0x0620 - 061d 1827 lrr $IX3, @$AR1 - 061e 1b07 srri @$AR0, $IX3 - 061f 0000 nop - 0620 0000 nop - - 0621 0007 dar $AR3 - 0622 187f lrr $AC1.M, @$AR3 - 0623 0066 0629 bloop $IX2, 0x0629 - 0625 4a3b addax's $ACC0, $AX1.L : @$AR3, $AC1.M - 0626 1ffc mrr $AC1.M, $AC0.L - 0627 1579 lsr $ACC1, #-7 - 0628 3533 andr's $AC1.M, $AX0.H : @$AR3, $AC0.M - 0629 4100 addr $ACC1, $AX0.L - - 062a 1b7f srri @$AR3, $AC1.M - 062b 0004 dar $AR0 - 062c 189f lrrd $AC1.M, @$AR0 - 062d 1adf srrd @$AR2, $AC1.M - 062e 189f lrrd $AC1.M, @$AR0 - 062f 1adf srrd @$AR2, $AC1.M - 0630 189f lrrd $AC1.M, @$AR0 - 0631 1adf srrd @$AR2, $AC1.M - 0632 189f lrrd $AC1.M, @$AR0 - 0633 1adf srrd @$AR2, $AC1.M - 0634 1adc srrd @$AR2, $AC0.L - 0635 0082 0bd2 lri $AR2, #0x0bd2 - 0637 27dc lrs $AC1.M, @yn2 - 0638 1adf srrd @$AR2, $AC1.M - 0639 27db lrs $AC1.M, @yn1 - 063a 1adf srrd @$AR2, $AC1.M - 063b 27da lrs $AC1.M, @scale - 063c 1adf srrd @$AR2, $AC1.M - 063d 0082 0bbe lri $AR2, #0x0bbe - 063f 27d9 lrs $AC1.M, @ACCAL - 0640 1adf srrd @$AR2, $AC1.M - 0641 27d8 lrs $AC1.M, @ACCAH - 0642 1adf srrd @$AR2, $AC1.M - 0643 8f00 set40 - 0644 00c1 0e42 lr $AR1, @0x0e42 - 0646 0082 0d80 lri $AR2, #0x0d80 - 0648 1940 lrri $AR0, @$AR2 - 0649 1943 lrri $AR3, @$AR2 - 064a 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 064b b8c0 mulx'ld $AX0.H, $AX1.H : $AX0.L, $AX1.L, @$AR0 - 064c 111f 0654 bloopi #0x1f, 0x0654 - 064e a6f0 mulxmv'ld $AX0.L, $AX1.L, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 064f bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0650 1940 lrri $AR0, @$AR2 - 0651 1943 lrri $AR3, @$AR2 - 0652 bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0653 4ec0 addp'ld $ACC0 : $AX0.L, $AX1.L, @$AR0 - 0654 b831 mulx's $AX0.H, $AX1.H : @$AR1, $AC0.M - - 0655 a6f0 mulxmv'ld $AX0.L, $AX1.L, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0656 bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0657 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0658 4e00 addp $ACC0 - 0659 1b3e srri @$AR1, $AC0.M - 065a 00e1 0e42 sr @0x0e42, $AR1 - - 065c 02df ret -} - -void SRC_Linear() { - // Copy pb's data [pb.addr.format to pb.adpm.yn2] to corresponding hw regs - // 065d 0082 0bb8 lri $AR2, #0x0bb8 - // 065f 195e lrri $AC0.M, @$AR2 - // 0660 2ed1 srs @SampleFormat, $AC0.M - // 0661 195e lrri $AC0.M, @$AR2 - // 0662 2ed4 srs @ACSAH, $AC0.M - // 0663 195e lrri $AC0.M, @$AR2 - // 0664 2ed5 srs @ACSAL, $AC0.M - // 0665 195e lrri $AC0.M, @$AR2 - // 0666 2ed6 srs @ACEAH, $AC0.M - // 0667 195e lrri $AC0.M, @$AR2 - // 0668 2ed7 srs @ACEAL, $AC0.M - // 0669 195e lrri $AC0.M, @$AR2 - // 066a 2ed8 srs @ACCAH, $AC0.M - // 066b 195e lrri $AC0.M, @$AR2 - // 066c 2ed9 srs @ACCAL, $AC0.M - // 066d 195e lrri $AC0.M, @$AR2 - // 066e 2ea0 srs @COEF_A1_0, $AC0.M - // 066f 195e lrri $AC0.M, @$AR2 - // 0670 2ea1 srs @COEF_A2_0, $AC0.M - // 0671 195e lrri $AC0.M, @$AR2 - // 0672 2ea2 srs @COEF_A1_1, $AC0.M - // 0673 195e lrri $AC0.M, @$AR2 - // 0674 2ea3 srs @COEF_A2_1, $AC0.M - // 0675 195e lrri $AC0.M, @$AR2 - // 0676 2ea4 srs @COEF_A1_2, $AC0.M - // 0677 195e lrri $AC0.M, @$AR2 - // 0678 2ea5 srs @COEF_A2_2, $AC0.M - // 0679 195e lrri $AC0.M, @$AR2 - // 067a 2ea6 srs @COEF_A1_3, $AC0.M - // 067b 195e lrri $AC0.M, @$AR2 - // 067c 2ea7 srs @COEF_A2_3, $AC0.M - // 067d 195e lrri $AC0.M, @$AR2 - // 067e 2ea8 srs @COEF_A1_4, $AC0.M - // 067f 195e lrri $AC0.M, @$AR2 - // 0680 2ea9 srs @COEF_A2_4, $AC0.M - // 0681 195e lrri $AC0.M, @$AR2 - // 0682 2eaa srs @COEF_A1_5, $AC0.M - // 0683 195e lrri $AC0.M, @$AR2 - // 0684 2eab srs @COEF_A2_5, $AC0.M - // 0685 195e lrri $AC0.M, @$AR2 - // 0686 2eac srs @COEF_A1_6, $AC0.M - // 0687 195e lrri $AC0.M, @$AR2 - // 0688 2ead srs @COEF_A2_6, $AC0.M - // 0689 195e lrri $AC0.M, @$AR2 - // 068a 2eae srs @COEF_A1_7, $AC0.M - // 068b 195e lrri $AC0.M, @$AR2 - // 068c 2eaf srs @COEF_A2_7, $AC0.M - // 068d 195e lrri $AC0.M, @$AR2 - // 068e 2ede srs @GAIN, $AC0.M - // 068f 195e lrri $AC0.M, @$AR2 - // 0690 2eda srs @scale, $AC0.M - // 0691 195e lrri $AC0.M, @$AR2 - // 0692 2edb srs @yn1, $AC0.M - // 0693 195e lrri $AC0.M, @$AR2 - // 0694 2edc srs @yn2, $AC0.M - - // 0695 8c00 clr15 // signed mulx - // 0696 8a00 m2 // *2 - // 0697 8e00 set16 // no sign extend - - // 0698 195b lrri $AX1.H, @$AR2 - // 0699 1959 lrri $AX1.L, @$AR2 - // 069a 8100 clr $ACC0 - // 069b 195c lrri $AC0.L, @$AR2 - // 069c 0080 0e44 lri $AR0, #0x0e44 - // 069e 195f lrri $AC1.M, @$AR2 - // 069f 195f lrri $AC1.M, @$AR2 - // 06a0 195f lrri $AC1.M, @$AR2 - // 06a1 1b1f srri @$AR0, $AC1.M - AR0 = 0x0e44 - AX1.H = pb.src.ratioHi - AX1.L = pb.src.ratioLo - AC0.L = pb.src.currentAddressFrac - AC1.M = pb.src.last_samples[2] - - *0x0e44 = pb.src.last_samples[2] - *0x0e45 = pb.src.last_samples[3] - - // 06a2 185f lrr $AC1.M, @$AR2 - // 06a3 1b1f srri @$AR0, $AC1.M - // 06a4 6b00 movax $ACC1, $AX1 - // 06a5 1505 lsl $ACC1, #5 - // 06a6 4d00 add $ACC1, $ACC0 - // 06a7 157e lsr $ACC1, #-2 - // 06a8 1c9f mrr $IX0, $AC1.M - // 06a9 1cbd mrr $IX1, $AC1.L - ACC1 = (pb.src.currentAddressFrac + (pb.src.ratio << 5)) >> 2 - IX0 = ACC1 >> 16 - IX1 = ((ACC1 & 0xffff) & 0xc000) >> 14 - IX2 = ~((ACC1 >> 16) - 32) - AX0.H = 0x01fc - AC0.M = 0x0e45 - AR1 = 0xffdd // DSP_ACCELERATOR - AR3 = 0x0d80 - - // 06aa 05e0 addis $AC1.M, #0xe0 - // 06ab 9900 asr16 $ACC1 - // 06ac 7d00 neg $ACC1 - // 06ad 1cdd mrr $IX2, $AC1.L - // 06ae 8900 clr $ACC1 - // 06af 1fa5 mrr $AC1.L, $IX1 - // 06b0 1502 lsl $ACC1, #2 - // 06b1 1cbf mrr $IX1, $AC1.M - // 06b2 009a 01fc lri $AX0.H, #0x01fc - // 06b4 009e 0e45 lri $AC0.M, #0x0e45 - // 06b6 0081 ffdd lri $AR1, #0xffdd - // 06b8 0083 0d80 lri $AR3, #0x0d80 - // 06ba 0064 06cb bloop $IX0, 0x06cb - // 06bc 1827 lrr $IX3, @$AR1 - // 06bd 1b07 srri @$AR0, $IX3 - // 06be 4a00 addax $ACC0, $AX1 - // 06bf 1b7e srri @$AR3, $AC0.M - // 06c0 1827 lrr $IX3, @$AR1 - // 06c1 1b07 srri @$AR0, $IX3 - // 06c2 1b7c srri @$AR3, $AC0.L - // 06c3 0000 nop - // 06c4 1827 lrr $IX3, @$AR1 - // 06c5 1b07 srri @$AR0, $IX3 - // 06c6 0000 nop - // 06c7 0000 nop - // 06c8 1827 lrr $IX3, @$AR1 - // 06c9 1b07 srri @$AR0, $IX3 - // 06ca 0000 nop - // 06cb 0000 nop - ACCO = (0x0e45 << 16) + pb.src.currentAddressFrac - for (i = 0; i < IX0; i++) { - ACC0 += pb.src.ratio - *(0x0d80++) = ACC0 >> 16 - *(0x0d80++) = ACC0 & 0xffff - *(0x0e46++) = *DSP_ACCELERATOR - *(0x0e46++) = *DSP_ACCELERATOR - *(0x0e46++) = *DSP_ACCELERATOR - *(0x0e46++) = *DSP_ACCELERATOR - } - - // 06cc 0065 06d1 bloop $IX1, 0x06d1 - // 06ce 1827 lrr $IX3, @$AR1 - // 06cf 1b07 srri @$AR0, $IX3 - // 06d0 0000 nop - // 06d1 0000 nop - for (i = 0; i < IX1; i++) { - *(0x0e46++) = *DSP_ACCELERATOR - } - - // 06d2 0066 06d6 bloop $IX2, 0x06d6 - // 06d4 4a00 addax $ACC0, $AX1 - // 06d5 1b7e srri @$AR3, $AC0.M - // 06d6 1b7c srri @$AR3, $AC0.L - for (i = 0; i < IX2; i++) { - ACC0 += pb.src.ratio - *(0x0d80++) = ACC0 >> 16 - *(0x0d80++) = ACC0 & 0xffff - } - - // 06d7 0004 dar $AR0 - // 06d8 189f lrrd $AC1.M, @$AR0 - // 06d9 1adf srrd @$AR2, $AC1.M - // 06da 189f lrrd $AC1.M, @$AR0 - // 06db 1adf srrd @$AR2, $AC1.M - // 06dc 189f lrrd $AC1.M, @$AR0 - // 06dd 1adf srrd @$AR2, $AC1.M - // 06de 189f lrrd $AC1.M, @$AR0 - // 06df 1adf srrd @$AR2, $AC1.M - // 06e0 1adc srrd @$AR2, $AC0.L - *(0x0e46++)-- - pb.src.last_samples[3] = *(0x0e46--) - pb.src.last_samples[2] = *(0x0e46--) - pb.src.last_samples[1] = *(0x0e46--) - pb.src.last_samples[0] = *(0x0e46--) - pb.src.currentAddressFrac = ACC0 & 0xffff - - // 06e1 0082 0bd2 lri $AR2, #0x0bd2 - // 06e3 27dc lrs $AC1.M, @yn2 - // 06e4 1adf srrd @$AR2, $AC1.M - // 06e5 27db lrs $AC1.M, @yn1 - // 06e6 1adf srrd @$AR2, $AC1.M - // 06e7 27da lrs $AC1.M, @scale - // 06e8 1adf srrd @$AR2, $AC1.M - // 06e9 0082 0bbe lri $AR2, #0x0bbe - // 06eb 27d9 lrs $AC1.M, @ACCAL - // 06ec 1adf srrd @$AR2, $AC1.M - // 06ed 27d8 lrs $AC1.M, @ACCAH - // 06ee 1adf srrd @$AR2, $AC1.M - pb.adpm.yn2 = *yn2 - pb.adpm.yn1 = *yn1 - pb.adpm.pred_scale = *scale - pb.addr.currentAddressLo = *ACCAL // Current playback position - pb.addr.currentAddressHi = *ACCAH - - 06ef 8d00 set15 // unsigned mulx - 06f0 8b00 m0 // no *2 - 06f1 8f00 set40 // sign extend - 06f2 00c1 0e42 lr $AR1, @0x0e42 - 06f4 0082 0d80 lri $AR2, #0x0d80 - 06f6 8100 clr $ACC0 - 06f7 1120 0703 bloopi #0x20, 0x0703 - 06f9 8900 clr $ACC1 - 06fa 1940 lrri $AR0, @$AR2 - 06fb 189e lrrd $AC0.M, @$AR0 - 06fc 181b lrr $AX1.H, @$AR0 - 06fd 199a lrrn $AX0.H, @$AR0 - 06fe 5400 subr $ACC0, $AX0.H - 06ff 1f5e mrr $AX0.H, $AC0.M - 0700 1959 lrri $AX1.L, @$AR2 - 0701 b000 mulx $AX0.H, $AX1.L - 0702 fb00 addpaxz $ACC1, $AX1 - 0703 8139 clr's $ACC0 : @$AR1, $AC1.M - - 0704 00e1 0e42 sr @0x0e42, $AR1 - - 0706 02df ret -} - -void SRC_None() { - // Copy pb's data [pb.addr.format to pb.adpm.yn2] to corresponding hw regs - // 0707 0082 0bb8 lri $AR2, #0x0bb8 - // 0709 195e lrri $AC0.M, @$AR2 - // 070a 2ed1 srs @SampleFormat, $AC0.M - // 070b 195e lrri $AC0.M, @$AR2 - // 070c 2ed4 srs @ACSAH, $AC0.M - // 070d 195e lrri $AC0.M, @$AR2 - // 070e 2ed5 srs @ACSAL, $AC0.M - // 070f 195e lrri $AC0.M, @$AR2 - // 0710 2ed6 srs @ACEAH, $AC0.M - // 0711 195e lrri $AC0.M, @$AR2 - // 0712 2ed7 srs @ACEAL, $AC0.M - // 0713 195e lrri $AC0.M, @$AR2 - // 0714 2ed8 srs @ACCAH, $AC0.M - // 0715 195e lrri $AC0.M, @$AR2 - // 0716 2ed9 srs @ACCAL, $AC0.M - // 0717 195e lrri $AC0.M, @$AR2 - // 0718 2ea0 srs @COEF_A1_0, $AC0.M - // 0719 195e lrri $AC0.M, @$AR2 - // 071a 2ea1 srs @COEF_A2_0, $AC0.M - // 071b 195e lrri $AC0.M, @$AR2 - // 071c 2ea2 srs @COEF_A1_1, $AC0.M - // 071d 195e lrri $AC0.M, @$AR2 - // 071e 2ea3 srs @COEF_A2_1, $AC0.M - // 071f 195e lrri $AC0.M, @$AR2 - // 0720 2ea4 srs @COEF_A1_2, $AC0.M - // 0721 195e lrri $AC0.M, @$AR2 - // 0722 2ea5 srs @COEF_A2_2, $AC0.M - // 0723 195e lrri $AC0.M, @$AR2 - // 0724 2ea6 srs @COEF_A1_3, $AC0.M - // 0725 195e lrri $AC0.M, @$AR2 - // 0726 2ea7 srs @COEF_A2_3, $AC0.M - // 0727 195e lrri $AC0.M, @$AR2 - // 0728 2ea8 srs @COEF_A1_4, $AC0.M - // 0729 195e lrri $AC0.M, @$AR2 - // 072a 2ea9 srs @COEF_A2_4, $AC0.M - // 072b 195e lrri $AC0.M, @$AR2 - // 072c 2eaa srs @COEF_A1_5, $AC0.M - // 072d 195e lrri $AC0.M, @$AR2 - // 072e 2eab srs @COEF_A2_5, $AC0.M - // 072f 195e lrri $AC0.M, @$AR2 - // 0730 2eac srs @COEF_A1_6, $AC0.M - // 0731 195e lrri $AC0.M, @$AR2 - // 0732 2ead srs @COEF_A2_6, $AC0.M - // 0733 195e lrri $AC0.M, @$AR2 - // 0734 2eae srs @COEF_A1_7, $AC0.M - // 0735 195e lrri $AC0.M, @$AR2 - // 0736 2eaf srs @COEF_A2_7, $AC0.M - // 0737 195e lrri $AC0.M, @$AR2 - // 0738 2ede srs @GAIN, $AC0.M - // 0739 195e lrri $AC0.M, @$AR2 - // 073a 2eda srs @scale, $AC0.M - // 073b 195e lrri $AC0.M, @$AR2 - // 073c 2edb srs @yn1, $AC0.M - // 073d 195e lrri $AC0.M, @$AR2 - // 073e 2edc srs @yn2, $AC0.M - - // 073f 00c0 0e42 lr $AR0, @0x0e42 - // 0741 0081 ffdd lri $AR1, #0xffdd // DSP_ACCELERATOR - // 0743 1120 0748 bloopi #0x20, 0x0748 - // 0745 1824 lrr $IX0, @$AR1 - // 0746 1b04 srri @$AR0, $IX0 - // 0747 0000 nop - // 0748 0000 nop - // 0749 00e0 0e42 sr @0x0e42, $AR0 - - u16 i = *0x0e42 - for (; i < ((*0x0e42) + 0x20); i++) { - *i = *DSP_ACCELERATOR - } - *0x0e42 = i - - // 074b 0082 0bd9 lri $AR2, #0x0bd9 // pb.src.last_samples[3] - // 074d 0004 dar $AR0 - // 074e 189f lrrd $AC1.M, @$AR0 - // 074f 1adf srrd @$AR2, $AC1.M - // 0750 189f lrrd $AC1.M, @$AR0 - // 0751 1adf srrd @$AR2, $AC1.M - // 0752 189f lrrd $AC1.M, @$AR0 - // 0753 1adf srrd @$AR2, $AC1.M - // 0754 189f lrrd $AC1.M, @$AR0 - // 0755 1adf srrd @$AR2, $AC1.M - // 0756 8900 clr $ACC1 - // 0757 1adc srrd @$AR2, $AC0.L // uhhh assume AC0.L is 0? - i-- // Guess that 0x0e42 points to struct of 1 pointer and 32 values - pb.src.last_samples[3] = *(i--) - pb.src.last_samples[2] = *(i--) - pb.src.last_samples[1] = *(i--) - pb.src.last_samples[0] = *(i--) - pb.src.currentAddressFrac = 0 - - // 0758 27dc lrs $AC1.M, @yn2 - // 0759 00ff 0bd2 sr @0x0bd2, $AC1.M - // 075b 27db lrs $AC1.M, @yn1 - // 075c 00ff 0bd1 sr @0x0bd1, $AC1.M - // 075e 27da lrs $AC1.M, @scale - // 075f 00ff 0bd0 sr @0x0bd0, $AC1.M - // 0761 27d9 lrs $AC1.M, @ACCAL - // 0762 00ff 0bbe sr @0x0bbe, $AC1.M - // 0764 27d8 lrs $AC1.M, @ACCAH - // 0765 00ff 0bbd sr @0x0bbd, $AC1.M - pb.adpm.yn2 = *yn2 - pb.adpm.yn1 = *yn1 - pb.adpm.pred_scale = *scale - pb.addr.currentAddressLo = *ACCAL // Current playback position - pb.addr.currentAddressHi = *ACCAH - - 0767 02df ret -} - - -# From here to the jump tables, all the funcs just wrap calls to mixer(s) in IROM - -void Mixer_0() { - 0768 00c0 0e40 lr $AR0, @0x0e40 - 076a 0081 0b89 lri $AR1, #0x0b89 - 076c 00c2 0e08 lr $AR2, @0x0e08 - 076e 1c62 mrr $AR3, $AR2 - 076f 00c4 0e41 lr $IX0, @0x0e41 - 0771 00c5 0e09 lr $IX1, @0x0e09 - 0773 02bf 80e7 call 0x80e7 - 0775 00f8 0ba9 sr @0x0ba9, $AX0.L - 0777 00fb 0bac sr @0x0bac, $AX1.H - 0779 02df ret -} - -void Mixer_1() { - 077a 00c0 0e40 lr $AR0, @0x0e40 - 077c 0081 0b89 lri $AR1, #0x0b89 - 077e 00c2 0e08 lr $AR2, @0x0e08 - 0780 1c62 mrr $AR3, $AR2 - 0781 00c4 0e41 lr $IX0, @0x0e41 - 0783 00c5 0e09 lr $IX1, @0x0e09 - 0785 02bf 80e7 call 0x80e7 - 0787 00f8 0ba9 sr @0x0ba9, $AX0.L - 0789 00fb 0bac sr @0x0bac, $AX1.H - 078b 00c0 0e40 lr $AR0, @0x0e40 - 078d 0081 0b8d lri $AR1, #0x0b8d - 078f 00c2 0e0b lr $AR2, @0x0e0b - 0791 1c62 mrr $AR3, $AR2 - 0792 00c4 0e41 lr $IX0, @0x0e41 - 0794 00c5 0e0c lr $IX1, @0x0e0c - 0796 02bf 80e7 call 0x80e7 - 0798 00f8 0baa sr @0x0baa, $AX0.L - 079a 00fb 0bad sr @0x0bad, $AX1.H - 079c 02df ret -} - -void Mixer_2() { - 079d 00c0 0e40 lr $AR0, @0x0e40 - 079f 0081 0b89 lri $AR1, #0x0b89 - 07a1 00c2 0e08 lr $AR2, @0x0e08 - 07a3 1c62 mrr $AR3, $AR2 - 07a4 00c4 0e41 lr $IX0, @0x0e41 - 07a6 00c5 0e09 lr $IX1, @0x0e09 - 07a8 02bf 80e7 call 0x80e7 - 07aa 00f8 0ba9 sr @0x0ba9, $AX0.L - 07ac 00fb 0bac sr @0x0bac, $AX1.H - 07ae 00c0 0e40 lr $AR0, @0x0e40 - 07b0 0081 0b91 lri $AR1, #0x0b91 - 07b2 00c2 0e0e lr $AR2, @0x0e0e - 07b4 1c62 mrr $AR3, $AR2 - 07b5 00c4 0e41 lr $IX0, @0x0e41 - 07b7 00c5 0e0f lr $IX1, @0x0e0f - 07b9 02bf 80e7 call 0x80e7 - 07bb 00f8 0bab sr @0x0bab, $AX0.L - 07bd 00fb 0bae sr @0x0bae, $AX1.H - 07bf 02df ret -} - -void Unk() { - 07c0 00c0 0e40 lr $AR0, @0x0e40 - 07c2 0081 0b89 lri $AR1, #0x0b89 - 07c4 00c2 0e08 lr $AR2, @0x0e08 - 07c6 1c62 mrr $AR3, $AR2 - 07c7 00c4 0e41 lr $IX0, @0x0e41 - 07c9 00c5 0e09 lr $IX1, @0x0e09 - 07cb 02bf 80e7 call 0x80e7 - 07cd 00f8 0ba9 sr @0x0ba9, $AX0.L - 07cf 00fb 0bac sr @0x0bac, $AX1.H - 07d1 00c0 0e40 lr $AR0, @0x0e40 - 07d3 0081 0b8d lri $AR1, #0x0b8d - 07d5 00c2 0e0b lr $AR2, @0x0e0b - 07d7 1c62 mrr $AR3, $AR2 - 07d8 00c4 0e41 lr $IX0, @0x0e41 - 07da 00c5 0e0c lr $IX1, @0x0e0c - 07dc 02bf 80e7 call 0x80e7 - 07de 00f8 0baa sr @0x0baa, $AX0.L - 07e0 00fb 0bad sr @0x0bad, $AX1.H - 07e2 00c0 0e40 lr $AR0, @0x0e40 - 07e4 0081 0b91 lri $AR1, #0x0b91 - 07e6 00c2 0e0e lr $AR2, @0x0e0e - 07e8 1c62 mrr $AR3, $AR2 - 07e9 00c4 0e41 lr $IX0, @0x0e41 - 07eb 00c5 0e0f lr $IX1, @0x0e0f - 07ed 02bf 80e7 call 0x80e7 - 07ef 00f8 0bab sr @0x0bab, $AX0.L - 07f1 00fb 0bae sr @0x0bae, $AX1.H - 07f3 02df ret -} - -void Unk() { - 07f4 00c0 0e40 lr $AR0, @0x0e40 - 07f6 0081 0b89 lri $AR1, #0x0b89 - 07f8 00c2 0e08 lr $AR2, @0x0e08 - 07fa 1c62 mrr $AR3, $AR2 - 07fb 00c4 0e41 lr $IX0, @0x0e41 - 07fd 00c5 0e09 lr $IX1, @0x0e09 - 07ff 02bf 80e7 call 0x80e7 - 0801 00f8 0ba9 sr @0x0ba9, $AX0.L - 0803 00fb 0bac sr @0x0bac, $AX1.H - 0805 00c0 0e43 lr $AR0, @0x0e43 - 0807 0081 0b97 lri $AR1, #0x0b97 - 0809 00c2 0e0a lr $AR2, @0x0e0a - 080b 1c62 mrr $AR3, $AR2 - 080c 02bf 81f9 call 0x81f9 - 080e 00f8 0baf sr @0x0baf, $AX0.L - 0810 02df ret -} - -void Unk() { - 0811 00c0 0e40 lr $AR0, @0x0e40 - 0813 0081 0b89 lri $AR1, #0x0b89 - 0815 00c2 0e08 lr $AR2, @0x0e08 - 0817 1c62 mrr $AR3, $AR2 - 0818 00c4 0e41 lr $IX0, @0x0e41 - 081a 00c5 0e09 lr $IX1, @0x0e09 - 081c 02bf 80e7 call 0x80e7 - 081e 00f8 0ba9 sr @0x0ba9, $AX0.L - 0820 00fb 0bac sr @0x0bac, $AX1.H - 0822 00c0 0e40 lr $AR0, @0x0e40 - 0824 0081 0b8d lri $AR1, #0x0b8d - 0826 00c2 0e0b lr $AR2, @0x0e0b - 0828 1c62 mrr $AR3, $AR2 - 0829 00c4 0e41 lr $IX0, @0x0e41 - 082b 00c5 0e0c lr $IX1, @0x0e0c - 082d 02bf 80e7 call 0x80e7 - 082f 00f8 0baa sr @0x0baa, $AX0.L - 0831 00fb 0bad sr @0x0bad, $AX1.H - 0833 00c0 0e43 lr $AR0, @0x0e43 - 0835 0081 0b97 lri $AR1, #0x0b97 - 0837 00c2 0e0a lr $AR2, @0x0e0a - 0839 1c62 mrr $AR3, $AR2 - 083a 1c80 mrr $IX0, $AR0 - 083b 00c5 0e0d lr $IX1, @0x0e0d - 083d 02bf 80e7 call 0x80e7 - 083f 00f8 0baf sr @0x0baf, $AX0.L - 0841 00fb 0bb0 sr @0x0bb0, $AX1.H - 0843 02df ret -} - -void Unk() { - 0844 00c0 0e40 lr $AR0, @0x0e40 - 0846 0081 0b89 lri $AR1, #0x0b89 - 0848 00c2 0e08 lr $AR2, @0x0e08 - 084a 1c62 mrr $AR3, $AR2 - 084b 00c4 0e41 lr $IX0, @0x0e41 - 084d 00c5 0e09 lr $IX1, @0x0e09 - 084f 02bf 80e7 call 0x80e7 - 0851 00f8 0ba9 sr @0x0ba9, $AX0.L - 0853 00fb 0bac sr @0x0bac, $AX1.H - 0855 00c0 0e40 lr $AR0, @0x0e40 - 0857 0081 0b91 lri $AR1, #0x0b91 - 0859 00c2 0e0e lr $AR2, @0x0e0e - 085b 1c62 mrr $AR3, $AR2 - 085c 00c4 0e41 lr $IX0, @0x0e41 - 085e 00c5 0e0f lr $IX1, @0x0e0f - 0860 02bf 80e7 call 0x80e7 - 0862 00f8 0bab sr @0x0bab, $AX0.L - 0864 00fb 0bae sr @0x0bae, $AX1.H - 0866 00c0 0e43 lr $AR0, @0x0e43 - 0868 0081 0b95 lri $AR1, #0x0b95 - 086a 00c2 0e10 lr $AR2, @0x0e10 - 086c 1c62 mrr $AR3, $AR2 - 086d 1c80 mrr $IX0, $AR0 - 086e 00c5 0e0a lr $IX1, @0x0e0a - 0870 02bf 80e7 call 0x80e7 - 0872 00f8 0bb1 sr @0x0bb1, $AX0.L - 0874 00fb 0baf sr @0x0baf, $AX1.H - 0876 02df ret -} - -void Unk() { - 0877 00c0 0e40 lr $AR0, @0x0e40 - 0879 0081 0b89 lri $AR1, #0x0b89 - 087b 00c2 0e08 lr $AR2, @0x0e08 - 087d 1c62 mrr $AR3, $AR2 - 087e 00c4 0e41 lr $IX0, @0x0e41 - 0880 00c5 0e09 lr $IX1, @0x0e09 - 0882 02bf 80e7 call 0x80e7 - 0884 00f8 0ba9 sr @0x0ba9, $AX0.L - 0886 00fb 0bac sr @0x0bac, $AX1.H - 0888 00c0 0e40 lr $AR0, @0x0e40 - 088a 0081 0b8d lri $AR1, #0x0b8d - 088c 00c2 0e0b lr $AR2, @0x0e0b - 088e 1c62 mrr $AR3, $AR2 - 088f 00c4 0e41 lr $IX0, @0x0e41 - 0891 00c5 0e0c lr $IX1, @0x0e0c - 0893 02bf 80e7 call 0x80e7 - 0895 00f8 0baa sr @0x0baa, $AX0.L - 0897 00fb 0bad sr @0x0bad, $AX1.H - 0899 00c0 0e40 lr $AR0, @0x0e40 - 089b 0081 0b91 lri $AR1, #0x0b91 - 089d 00c2 0e0e lr $AR2, @0x0e0e - 089f 1c62 mrr $AR3, $AR2 - 08a0 00c4 0e41 lr $IX0, @0x0e41 - 08a2 00c5 0e0f lr $IX1, @0x0e0f - 08a4 02bf 80e7 call 0x80e7 - 08a6 00f8 0bab sr @0x0bab, $AX0.L - 08a8 00fb 0bae sr @0x0bae, $AX1.H - 08aa 00c0 0e43 lr $AR0, @0x0e43 - 08ac 0081 0b97 lri $AR1, #0x0b97 - 08ae 00c2 0e0a lr $AR2, @0x0e0a - 08b0 1c62 mrr $AR3, $AR2 - 08b1 1c80 mrr $IX0, $AR0 - 08b2 00c5 0e0d lr $IX1, @0x0e0d - 08b4 02bf 80e7 call 0x80e7 - 08b6 00f8 0baf sr @0x0baf, $AX0.L - 08b8 00fb 0bb0 sr @0x0bb0, $AX1.H - 08ba 00c0 0e43 lr $AR0, @0x0e43 - 08bc 0081 0b95 lri $AR1, #0x0b95 - 08be 00c2 0e10 lr $AR2, @0x0e10 - 08c0 1c62 mrr $AR3, $AR2 - 08c1 02bf 81f9 call 0x81f9 - 08c3 00f8 0bb1 sr @0x0bb1, $AX0.L - 08c5 02df ret -} - -void Unk() { - 08c6 00c0 0e40 lr $AR0, @0x0e40 - 08c8 0081 0b89 lri $AR1, #0x0b89 - 08ca 00c2 0e08 lr $AR2, @0x0e08 - 08cc 0083 0e44 lri $AR3, #0x0e44 - 08ce 00c4 0e41 lr $IX0, @0x0e41 - 08d0 00c5 0e09 lr $IX1, @0x0e09 - 08d2 02bf 8282 call 0x8282 - 08d4 00f8 0ba9 sr @0x0ba9, $AX0.L - 08d6 00fb 0bac sr @0x0bac, $AX1.H - 08d8 02df ret -} - -void Unk() { - 08d9 00c0 0e40 lr $AR0, @0x0e40 - 08db 0081 0b89 lri $AR1, #0x0b89 - 08dd 00c2 0e08 lr $AR2, @0x0e08 - 08df 0083 0e44 lri $AR3, #0x0e44 - 08e1 00c4 0e41 lr $IX0, @0x0e41 - 08e3 00c5 0e09 lr $IX1, @0x0e09 - 08e5 02bf 8282 call 0x8282 - 08e7 00f8 0ba9 sr @0x0ba9, $AX0.L - 08e9 00fb 0bac sr @0x0bac, $AX1.H - 08eb 00c0 0e40 lr $AR0, @0x0e40 - 08ed 0081 0b8d lri $AR1, #0x0b8d - 08ef 00c2 0e0b lr $AR2, @0x0e0b - 08f1 0083 0e44 lri $AR3, #0x0e44 - 08f3 00c4 0e41 lr $IX0, @0x0e41 - 08f5 00c5 0e0c lr $IX1, @0x0e0c - 08f7 02bf 8282 call 0x8282 - 08f9 00f8 0baa sr @0x0baa, $AX0.L - 08fb 00fb 0bad sr @0x0bad, $AX1.H - 08fd 02df ret -} - -void Unk() { - 08fe 00c0 0e40 lr $AR0, @0x0e40 - 0900 0081 0b89 lri $AR1, #0x0b89 - 0902 00c2 0e08 lr $AR2, @0x0e08 - 0904 0083 0e44 lri $AR3, #0x0e44 - 0906 00c4 0e41 lr $IX0, @0x0e41 - 0908 00c5 0e09 lr $IX1, @0x0e09 - 090a 02bf 8282 call 0x8282 - 090c 00f8 0ba9 sr @0x0ba9, $AX0.L - 090e 00fb 0bac sr @0x0bac, $AX1.H - 0910 00c0 0e40 lr $AR0, @0x0e40 - 0912 0081 0b91 lri $AR1, #0x0b91 - 0914 00c2 0e0e lr $AR2, @0x0e0e - 0916 0083 0e44 lri $AR3, #0x0e44 - 0918 00c4 0e41 lr $IX0, @0x0e41 - 091a 00c5 0e0f lr $IX1, @0x0e0f - 091c 02bf 8282 call 0x8282 - 091e 00f8 0bab sr @0x0bab, $AX0.L - 0920 00fb 0bae sr @0x0bae, $AX1.H - 0922 02df ret -} - -void Unk() { - 0923 00c0 0e40 lr $AR0, @0x0e40 - 0925 0081 0b89 lri $AR1, #0x0b89 - 0927 00c2 0e08 lr $AR2, @0x0e08 - 0929 0083 0e44 lri $AR3, #0x0e44 - 092b 00c4 0e41 lr $IX0, @0x0e41 - 092d 00c5 0e09 lr $IX1, @0x0e09 - 092f 02bf 8282 call 0x8282 - 0931 00f8 0ba9 sr @0x0ba9, $AX0.L - 0933 00fb 0bac sr @0x0bac, $AX1.H - 0935 00c0 0e40 lr $AR0, @0x0e40 - 0937 0081 0b8d lri $AR1, #0x0b8d - 0939 00c2 0e0b lr $AR2, @0x0e0b - 093b 0083 0e44 lri $AR3, #0x0e44 - 093d 00c4 0e41 lr $IX0, @0x0e41 - 093f 00c5 0e0c lr $IX1, @0x0e0c - 0941 02bf 8282 call 0x8282 - 0943 00f8 0baa sr @0x0baa, $AX0.L - 0945 00fb 0bad sr @0x0bad, $AX1.H - 0947 00c0 0e40 lr $AR0, @0x0e40 - 0949 0081 0b91 lri $AR1, #0x0b91 - 094b 00c2 0e0e lr $AR2, @0x0e0e - 094d 0083 0e44 lri $AR3, #0x0e44 - 094f 00c4 0e41 lr $IX0, @0x0e41 - 0951 00c5 0e0f lr $IX1, @0x0e0f - 0953 02bf 8282 call 0x8282 - 0955 00f8 0bab sr @0x0bab, $AX0.L - 0957 00fb 0bae sr @0x0bae, $AX1.H - 0959 02df ret -} - -void Unk() { - 095a 00c0 0e40 lr $AR0, @0x0e40 - 095c 0081 0b89 lri $AR1, #0x0b89 - 095e 00c2 0e08 lr $AR2, @0x0e08 - 0960 0083 0e44 lri $AR3, #0x0e44 - 0962 00c4 0e41 lr $IX0, @0x0e41 - 0964 00c5 0e09 lr $IX1, @0x0e09 - 0966 02bf 8282 call 0x8282 - 0968 00f8 0ba9 sr @0x0ba9, $AX0.L - 096a 00fb 0bac sr @0x0bac, $AX1.H - 096c 00c0 0e43 lr $AR0, @0x0e43 - 096e 0081 0b97 lri $AR1, #0x0b97 - 0970 00c2 0e0a lr $AR2, @0x0e0a - 0972 0083 0e44 lri $AR3, #0x0e44 - 0974 02bf 845d call 0x845d - 0976 00f8 0baf sr @0x0baf, $AX0.L - 0978 02df ret -} - -void Unk() { - 0979 00c0 0e40 lr $AR0, @0x0e40 - 097b 0081 0b89 lri $AR1, #0x0b89 - 097d 00c2 0e08 lr $AR2, @0x0e08 - 097f 0083 0e44 lri $AR3, #0x0e44 - 0981 00c4 0e41 lr $IX0, @0x0e41 - 0983 00c5 0e09 lr $IX1, @0x0e09 - 0985 02bf 8282 call 0x8282 - 0987 00f8 0ba9 sr @0x0ba9, $AX0.L - 0989 00fb 0bac sr @0x0bac, $AX1.H - 098b 00c0 0e40 lr $AR0, @0x0e40 - 098d 0081 0b8d lri $AR1, #0x0b8d - 098f 00c2 0e0b lr $AR2, @0x0e0b - 0991 0083 0e44 lri $AR3, #0x0e44 - 0993 00c4 0e41 lr $IX0, @0x0e41 - 0995 00c5 0e0c lr $IX1, @0x0e0c - 0997 02bf 8282 call 0x8282 - 0999 00f8 0baa sr @0x0baa, $AX0.L - 099b 00fb 0bad sr @0x0bad, $AX1.H - 099d 00c0 0e43 lr $AR0, @0x0e43 - 099f 0081 0b97 lri $AR1, #0x0b97 - 09a1 00c2 0e0a lr $AR2, @0x0e0a - 09a3 0083 0e44 lri $AR3, #0x0e44 - 09a5 1c80 mrr $IX0, $AR0 - 09a6 00c5 0e0d lr $IX1, @0x0e0d - 09a8 02bf 8282 call 0x8282 - 09aa 00f8 0baf sr @0x0baf, $AX0.L - 09ac 00fb 0bb0 sr @0x0bb0, $AX1.H - 09ae 02df ret -} - -void Unk() { - 09af 00c0 0e40 lr $AR0, @0x0e40 - 09b1 0081 0b89 lri $AR1, #0x0b89 - 09b3 00c2 0e08 lr $AR2, @0x0e08 - 09b5 0083 0e44 lri $AR3, #0x0e44 - 09b7 00c4 0e41 lr $IX0, @0x0e41 - 09b9 00c5 0e09 lr $IX1, @0x0e09 - 09bb 02bf 8282 call 0x8282 - 09bd 00f8 0ba9 sr @0x0ba9, $AX0.L - 09bf 00fb 0bac sr @0x0bac, $AX1.H - 09c1 00c0 0e40 lr $AR0, @0x0e40 - 09c3 0081 0b91 lri $AR1, #0x0b91 - 09c5 00c2 0e0e lr $AR2, @0x0e0e - 09c7 0083 0e44 lri $AR3, #0x0e44 - 09c9 00c4 0e41 lr $IX0, @0x0e41 - 09cb 00c5 0e0f lr $IX1, @0x0e0f - 09cd 02bf 8282 call 0x8282 - 09cf 00f8 0bab sr @0x0bab, $AX0.L - 09d1 00fb 0bae sr @0x0bae, $AX1.H - 09d3 00c0 0e43 lr $AR0, @0x0e43 - 09d5 0081 0b95 lri $AR1, #0x0b95 - 09d7 00c2 0e10 lr $AR2, @0x0e10 - 09d9 0083 0e44 lri $AR3, #0x0e44 - 09db 1c80 mrr $IX0, $AR0 - 09dc 00c5 0e0a lr $IX1, @0x0e0a - 09de 02bf 8282 call 0x8282 - 09e0 00f8 0bb1 sr @0x0bb1, $AX0.L - 09e2 00fb 0baf sr @0x0baf, $AX1.H - 09e4 02df ret -} - -void Unk() { - 09e5 00c0 0e40 lr $AR0, @0x0e40 - 09e7 0081 0b89 lri $AR1, #0x0b89 - 09e9 00c2 0e08 lr $AR2, @0x0e08 - 09eb 0083 0e44 lri $AR3, #0x0e44 - 09ed 00c4 0e41 lr $IX0, @0x0e41 - 09ef 00c5 0e09 lr $IX1, @0x0e09 - 09f1 02bf 8282 call 0x8282 - 09f3 00f8 0ba9 sr @0x0ba9, $AX0.L - 09f5 00fb 0bac sr @0x0bac, $AX1.H - 09f7 00c0 0e40 lr $AR0, @0x0e40 - 09f9 0081 0b8d lri $AR1, #0x0b8d - 09fb 00c2 0e0b lr $AR2, @0x0e0b - 09fd 0083 0e44 lri $AR3, #0x0e44 - 09ff 00c0 0e41 lr $AR0, @0x0e41 - 0a01 00c5 0e0c lr $IX1, @0x0e0c - 0a03 02bf 8282 call 0x8282 - 0a05 00f8 0baa sr @0x0baa, $AX0.L - 0a07 00fb 0bad sr @0x0bad, $AX1.H - 0a09 00c0 0e40 lr $AR0, @0x0e40 - 0a0b 0081 0b91 lri $AR1, #0x0b91 - 0a0d 00c2 0e0e lr $AR2, @0x0e0e - 0a0f 0083 0e44 lri $AR3, #0x0e44 - 0a11 00c4 0e41 lr $IX0, @0x0e41 - 0a13 00c5 0e0f lr $IX1, @0x0e0f - 0a15 02bf 8282 call 0x8282 - 0a17 00f8 0bab sr @0x0bab, $AX0.L - 0a19 00fb 0bae sr @0x0bae, $AX1.H - 0a1b 00c0 0e43 lr $AR0, @0x0e43 - 0a1d 0081 0b97 lri $AR1, #0x0b97 - 0a1f 00c2 0e0a lr $AR2, @0x0e0a - 0a21 0083 0e44 lri $AR3, #0x0e44 - 0a23 1c80 mrr $IX0, $AR0 - 0a24 00c5 0e0d lr $IX1, @0x0e0d - 0a26 02bf 8282 call 0x8282 - 0a28 00f8 0baf sr @0x0baf, $AX0.L - 0a2a 00fb 0bb0 sr @0x0bb0, $AX1.H - 0a2c 00c0 0e43 lr $AR0, @0x0e43 - 0a2e 0081 0b95 lri $AR1, #0x0b95 - 0a30 00c2 0e10 lr $AR2, @0x0e10 - 0a32 0083 0e44 lri $AR3, #0x0e44 - 0a34 02bf 845d call 0x845d - 0a36 00f8 0bb1 sr @0x0bb1, $AX0.L - 0a38 02df ret -} - -void Unk() { - 0a39 00c0 0e40 lr $AR0, @0x0e40 - 0a3b 0081 0b89 lri $AR1, #0x0b89 - 0a3d 00c2 0e08 lr $AR2, @0x0e08 - 0a3f 1c62 mrr $AR3, $AR2 - 0a40 00c4 0e41 lr $IX0, @0x0e41 - 0a42 00c5 0e09 lr $IX1, @0x0e09 - 0a44 02bf 80e7 call 0x80e7 - 0a46 00f8 0ba9 sr @0x0ba9, $AX0.L - 0a48 00fb 0bac sr @0x0bac, $AX1.H - 0a4a 00c0 0e43 lr $AR0, @0x0e43 - 0a4c 0081 0b91 lri $AR1, #0x0b91 - 0a4e 00c2 0e0e lr $AR2, @0x0e0e - 0a50 1c62 mrr $AR3, $AR2 - 0a51 1c80 mrr $IX0, $AR0 - 0a52 00c5 0e0f lr $IX1, @0x0e0f - 0a54 02bf 80e7 call 0x80e7 - 0a56 00f8 0bab sr @0x0bab, $AX0.L - 0a58 00fb 0bae sr @0x0bae, $AX1.H - 0a5a 02df ret -} - -void Unk() { - 0a5b 00c0 0e40 lr $AR0, @0x0e40 - 0a5d 0081 0b89 lri $AR1, #0x0b89 - 0a5f 00c2 0e08 lr $AR2, @0x0e08 - 0a61 1c62 mrr $AR3, $AR2 - 0a62 00c4 0e41 lr $IX0, @0x0e41 - 0a64 00c5 0e09 lr $IX1, @0x0e09 - 0a66 02bf 80e7 call 0x80e7 - 0a68 00f8 0ba9 sr @0x0ba9, $AX0.L - 0a6a 00fb 0bac sr @0x0bac, $AX1.H - 0a6c 00c0 0e43 lr $AR0, @0x0e43 - 0a6e 0081 0b91 lri $AR1, #0x0b91 - 0a70 00c2 0e0e lr $AR2, @0x0e0e - 0a72 1c62 mrr $AR3, $AR2 - 0a73 1c80 mrr $IX0, $AR0 - 0a74 00c5 0e0f lr $IX1, @0x0e0f - 0a76 02bf 80e7 call 0x80e7 - 0a78 00f8 0bab sr @0x0bab, $AX0.L - 0a7a 00fb 0bae sr @0x0bae, $AX1.H - 0a7c 00c0 0e40 lr $AR0, @0x0e40 - 0a7e 0081 0b8d lri $AR1, #0x0b8d - 0a80 00c2 0e0b lr $AR2, @0x0e0b - 0a82 1c62 mrr $AR3, $AR2 - 0a83 00c4 0e41 lr $IX0, @0x0e41 - 0a85 00c5 0e0c lr $IX1, @0x0e0c - 0a87 02bf 80e7 call 0x80e7 - 0a89 00f8 0baa sr @0x0baa, $AX0.L - 0a8b 00fb 0bad sr @0x0bad, $AX1.H - 0a8d 00c0 0e43 lr $AR0, @0x0e43 - 0a8f 0081 0b99 lri $AR1, #0x0b99 - 0a91 00c2 0e0d lr $AR2, @0x0e0d - 0a93 1c62 mrr $AR3, $AR2 - 0a94 02bf 81f9 call 0x81f9 - 0a96 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a98 02df ret -} - -void Unk() { - 0a99 00c0 0e40 lr $AR0, @0x0e40 - 0a9b 0081 0b89 lri $AR1, #0x0b89 - 0a9d 00c2 0e08 lr $AR2, @0x0e08 - 0a9f 0083 0e44 lri $AR3, #0x0e44 - 0aa1 00c4 0e41 lr $IX0, @0x0e41 - 0aa3 00c5 0e09 lr $IX1, @0x0e09 - 0aa5 02bf 8282 call 0x8282 - 0aa7 00f8 0ba9 sr @0x0ba9, $AX0.L - 0aa9 00fb 0bac sr @0x0bac, $AX1.H - 0aab 00c0 0e43 lr $AR0, @0x0e43 - 0aad 0081 0b91 lri $AR1, #0x0b91 - 0aaf 00c2 0e0e lr $AR2, @0x0e0e - 0ab1 0083 0e44 lri $AR3, #0x0e44 - 0ab3 1c80 mrr $IX0, $AR0 - 0ab4 00c5 0e0f lr $IX1, @0x0e0f - 0ab6 02bf 8282 call 0x8282 - 0ab8 00f8 0bab sr @0x0bab, $AX0.L - 0aba 00fb 0bae sr @0x0bae, $AX1.H - 0abc 02df ret -} - -void Unk() { - 0abd 00c0 0e40 lr $AR0, @0x0e40 - 0abf 0081 0b89 lri $AR1, #0x0b89 - 0ac1 00c2 0e08 lr $AR2, @0x0e08 - 0ac3 0083 0e44 lri $AR3, #0x0e44 - 0ac5 00c4 0e41 lr $IX0, @0x0e41 - 0ac7 00c5 0e09 lr $IX1, @0x0e09 - 0ac9 02bf 8282 call 0x8282 - 0acb 00f8 0ba9 sr @0x0ba9, $AX0.L - 0acd 00fb 0bac sr @0x0bac, $AX1.H - 0acf 00c0 0e43 lr $AR0, @0x0e43 - 0ad1 0081 0b91 lri $AR1, #0x0b91 - 0ad3 00c2 0e0e lr $AR2, @0x0e0e - 0ad5 0083 0e44 lri $AR3, #0x0e44 - 0ad7 1c80 mrr $IX0, $AR0 - 0ad8 00c5 0e0f lr $IX1, @0x0e0f - 0ada 02bf 8282 call 0x8282 - 0adc 00f8 0bab sr @0x0bab, $AX0.L - 0ade 00fb 0bae sr @0x0bae, $AX1.H - 0ae0 00c0 0e40 lr $AR0, @0x0e40 - 0ae2 0081 0b8d lri $AR1, #0x0b8d - 0ae4 00c2 0e0b lr $AR2, @0x0e0b - 0ae6 0083 0e44 lri $AR3, #0x0e44 - 0ae8 00c4 0e41 lr $IX0, @0x0e41 - 0aea 00c5 0e0c lr $IX1, @0x0e0c - 0aec 02bf 8282 call 0x8282 - 0aee 00f8 0baa sr @0x0baa, $AX0.L - 0af0 00fb 0bad sr @0x0bad, $AX1.H - 0af2 00c0 0e43 lr $AR0, @0x0e43 - 0af4 0081 0b99 lri $AR1, #0x0b99 - 0af6 00c2 0e0d lr $AR2, @0x0e0d - 0af8 0083 0e44 lri $AR3, #0x0e44 - 0afa 02bf 845d call 0x845d - 0afc 00f8 0bb0 sr @0x0bb0, $AX0.L - 0afe 02df ret -} - -# Jump table for main commands -0aff 0082 // Jump 0 -0b00 013e // Jump 1 -0b01 01bc // Jump 2 -0b02 0248 // Jump 3 -0b03 0413 // Jump 4 -0b04 0427 // Jump 5 -0b05 0165 // Jump 6 -0b06 0574 // Jump 7 -0b07 0b37 // Jump 8 -0b08 015f // Jump 9 -0b09 0478 // Jump a -0b0a 0474 // Jump b -0b0b 0476 // Jump c -0b0c 01a9 // Jump d -0b0d 043b // Jump e -0b0e 047a // Jump f Task_Yield() -0b0f 0bb1 // Jump 10 -0b10 0175 // Jump 11 - -# LUT for pb.mixerCtrl -0b11 0768 // Jump3 0 -0b12 077a // Jump3 1 -0b13 079d // Jump3 2 -0b14 07c0 // Jump3 3 -0b15 07f4 // Jump3 4 -0b16 0811 // Jump3 5 -0b17 0844 // Jump3 6 -0b18 0877 // Jump3 7 -0b19 08c6 // Jump3 8 -0b1a 08d9 // Jump3 9 -0b1b 08fe // Jump3 a -0b1c 0923 // Jump3 b -0b1d 095a // Jump3 c -0b1e 0979 // Jump3 d -0b1f 09af // Jump3 e -0b20 09e5 // Jump3 f - -0b21 0a39 // Jump3 10 -0b22 0a5b // Jump3 11 -0b23 0768 // Jump3 12 -0b24 0768 // Jump3 13 -0b25 0768 // Jump3 14 -0b26 0768 // Jump3 15 -0b27 0768 // Jump3 16 -0b28 0768 // Jump3 17 -0b29 0a99 // Jump3 18 -0b2a 0abd // Jump3 19 -0b2b 0768 // Jump3 1a -0b2c 0768 // Jump3 1b -0b2d 0768 // Jump3 1c -0b2e 0768 // Jump3 1d -0b2f 0768 // Jump3 1e -0b30 0768 // Jump3 1f - -# LUT for pb.srcSelect -0b31 05a8 // Jump4 0 -0b32 065d // Jump4 1 -0b33 0707 // Jump4 2 - -# LUT for pb.coefSelect tables (in drom) -0b34 1000 -0b35 1200 -0b36 1400 - -# End of noise - back to code. - -void Cmd_8() { - 0b37 8e00 set16 - - 0b38 8100 clr $ACC0 - 0b39 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0b3a 191c lrri $AC0.L, @$AR0 - - 0b3b 2ece srs @DSMAH, $AC0.M - 0b3c 2ccf srs @DSMAL, $AC0.L - 0b3d 16cd 0e80 si @DSPA, #0x0e80 - 0b3f 16c9 0000 si @DSCR, #0x0000 - 0b41 16cb 0100 si @DSBL, #0x0100 - - 0b43 1f7e mrr $AX1.H, $AC0.M - 0b44 1f3c mrr $AX1.L, $AC0.L - - 0b45 8100 clr $ACC0 - - 0b46 26c9 lrs $AC0.M, @DSCR - 0b47 02a0 0004 andf $AC0.M, #0x0004 - 0b49 029c 0b46 jlnz 0x0b46 - - 0b4b 191e lrri $AC0.M, @$AR0 - 0b4c 191c lrri $AC0.L, @$AR0 - 0b4d 2ece srs @DSMAH, $AC0.M - 0b4e 2ccf srs @DSMAL, $AC0.L - 0b4f 16cd 0280 si @DSPA, #0x0280 - 0b51 16c9 0000 si @DSCR, #0x0000 - 0b53 16cb 0280 si @DSBL, #0x0280 - - 0b55 1c80 mrr $IX0, $AR0 - - 0b56 0080 0280 lri $AR0, #0x0280 - 0b58 00c1 0e1b lr $AR1, @0x0e1b - 0b5a 0085 0000 lri $IX1, #0x0000 - 0b5c 0089 007f lri $WR1, #0x007f - 0b5e 0082 0f00 lri $AR2, #0x0f00 - 0b60 0083 16b4 lri $AR3, #0x16b4 - 0b62 1ce3 mrr $IX3, $AR3 - 0b63 8100 clr $ACC0 - - 0b64 26c9 lrs $AC0.M, @DSCR - 0b65 02a0 0004 andf $AC0.M, #0x0004 - 0b67 029c 0b64 jlnz 0x0b64 - - 0b69 8f00 set40 - 0b6a 8a78 m2'l : $AC1.M, @$AR0 - 0b6b 8c68 clr15'l : $AC1.L, @$AR0 - 0b6c f100 lsl16 $ACC1 - 0b6d 1a3f srr @$AR1, $AC1.M - 0b6e 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0b6f 107e loopi #0x7e - 0b70 f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b71 f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b72 f278 madd'l $AX0.L, $AX0.H : $AC1.M, @$AR0 - 0b73 6e68 movp'l $ACC0 : $AC1.L, @$AR0 - 0b74 f132 lsl16's $ACC1 : @$AR2, $AC0.M - 0b75 1a3f srr @$AR1, $AC1.M - 0b76 119e 0b80 bloopi #0x9e, 0x0b80 - 0b78 1c67 mrr $AR3, $IX3 - 0b79 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0b7a 107e loopi #0x7e - 0b7b f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b7c f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b7d f278 madd'l $AX0.L, $AX0.H : $AC1.M, @$AR0 - 0b7e 6e68 movp'l $ACC0 : $AC1.L, @$AR0 - 0b7f f132 lsl16's $ACC1 : @$AR2, $AC0.M - 0b80 1a3f srr @$AR1, $AC1.M - - 0b81 1c67 mrr $AR3, $IX3 - 0b82 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0b83 107e loopi #0x7e - 0b84 f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b85 f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0b86 f200 madd $AX0.L, $AX0.H - 0b87 6e00 movp $ACC0 - 0b88 1b5e srri @$AR2, $AC0.M - 0b89 00e1 0e1b sr @0x0e1b, $AR1 - - 0b8b 0080 0280 lri $AR0, #0x0280 - 0b8d 0083 0f00 lri $AR3, #0x0f00 - 0b8f 0081 0000 lri $AR1, #0x0000 - 0b91 0082 0140 lri $AR2, #0x0140 - 0b93 0089 ffff lri $WR1, #0xffff - - 0b95 8900 clr $ACC1 - 0b96 8100 clr $ACC0 - - 0b97 8f00 set40 - - 0b98 11a0 0ba0 bloopi #0xa0, 0x0ba0 - 0b9a 197f lrri $AC1.M, @$AR3 - 0b9b 9930 asr16's $ACC1 : @$AR0, $AC0.M - 0b9c 1b1e srri @$AR0, $AC0.M - 0b9d 1b3f srri @$AR1, $AC1.M - 0b9e 7d29 neg's $ACC1 : @$AR1, $AC1.L - 0b9f 1b5f srri @$AR2, $AC1.M - 0ba0 1b5d srri @$AR2, $AC1.L - - 0ba1 8e00 set16 - - 0ba2 1fdb mrr $AC0.M, $AX1.H - 0ba3 1f99 mrr $AC0.L, $AX1.L - 0ba4 2ece srs @DSMAH, $AC0.M - 0ba5 2ccf srs @DSMAL, $AC0.L - 0ba6 16cd 0e80 si @DSPA, #0x0e80 - 0ba8 16c9 0001 si @DSCR, #0x0001 - 0baa 16cb 0100 si @DSBL, #0x0100 - - // 0bac 02bf 055c call 0x055c - WaitDMA(); - - 0bae 1c04 mrr $AR0, $IX0 - - // 0baf 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -void Cmd_10() { - 0bb1 8e00 set16 - - 0bb2 8100 clr $ACC0 - 0bb3 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0bb4 191c lrri $AC0.L, @$AR0 - - 0bb5 2ece srs @DSMAH, $AC0.M - 0bb6 2ccf srs @DSMAL, $AC0.L - 0bb7 16cd 07c0 si @DSPA, #0x07c0 - 0bb9 16c9 0001 si @DSCR, #0x0001 - 0bbb 16cb 0500 si @DSBL, #0x0500 - - // 0bbd 02bf 055c call 0x055c - WaitDMA(); - - 0bbf 8100 clr $ACC0 - 0bc0 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0bc1 191c lrri $AC0.L, @$AR0 - - 0bc2 2ece srs @DSMAH, $AC0.M - 0bc3 2ccf srs @DSMAL, $AC0.L - 0bc4 16cd 07c0 si @DSPA, #0x07c0 - 0bc6 16c9 0000 si @DSCR, #0x0000 - 0bc8 8900 clr $ACC1 - 0bc9 0d20 lris $AC1.L, #0x20 - 0bca 2dcb srs @DSBL, $AC1.L - - 0bcb 4c00 add $ACC0, $ACC1 - - 0bcc 1c80 mrr $IX0, $AR0 - - 0bcd 0080 07c0 lri $AR0, #0x07c0 - 0bcf 0083 0000 lri $AR3, #0x0000 - 0bd1 1c43 mrr $AR2, $AR3 - 0bd2 0a00 lris $AX0.H, #0x00 - - 0bd3 27c9 lrs $AC1.M, @DSCR - 0bd4 03a0 0004 andf $AC1.M, #0x0004 - 0bd6 029c 0bd3 jlnz 0x0bd3 - - 0bd8 2ece srs @DSMAH, $AC0.M - 0bd9 2ccf srs @DSMAL, $AC0.L - 0bda 16cd 07d0 si @DSPA, #0x07d0 - 0bdc 16c9 0000 si @DSCR, #0x0000 - 0bde 16cb 04e0 si @DSBL, #0x04e0 - - 0be0 8f00 set40 - - 0be1 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0be2 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0be3 6a00 movax $ACC0, $AX1 - 0be4 4800 addax $ACC0, $AX0 - 0be5 114f 0bee bloopi #0x4f, 0x0bee - 0be7 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0be8 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0be9 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0bea 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0beb 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0bec 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0bed 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 0bee 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - - 0bef 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0bf0 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0bf1 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0bf2 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0bf3 1b5f srri @$AR2, $AC1.M - 0bf4 1b5d srri @$AR2, $AC1.L - 0bf5 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0bf6 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0bf7 6800 movax $ACC0, $AX0 - 0bf8 7c00 neg $ACC0 - 0bf9 4a00 addax $ACC0, $AX1 - 0bfa 114f 0c05 bloopi #0x4f, 0x0c05 - 0bfc 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0bfd 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0bfe 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0bff 7d00 neg $ACC1 - 0c00 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0c01 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0c02 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0c03 683a movax's $ACC0, $AX0.L : @$AR2, $AC1.M - 0c04 7c00 neg $ACC0 - 0c05 4a2a addax's $ACC0, $AX1.L : @$AR2, $AC1.L - - 0c06 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0c07 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0c08 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0c09 7d00 neg $ACC1 - 0c0a 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0c0b 1b5f srri @$AR2, $AC1.M - 0c0c 1b5d srri @$AR2, $AC1.L - - 0c0d 1c04 mrr $AR0, $IX0 - - // 0c0e 029f 0068 jmp 0x0068 - goto DoNextCommand; -} - -# Begin interrupt handlers - -// Sends mail with value on top of callstack and rti's -void ResetAndStackUOFlow_Handler() { - 0c10 8e00 set16 - - // 0c11 16fc ecc0 si @DMBH, #0xecc0 - // 0c13 1fcc mrr $AC0.M, $ST0 - // 0c14 1d9e mrr $ST0, $AC0.M - // 0c15 2efd srs @DMBL, $AC0.M - DMB = 0xecc00000 | $ST0 - - // 0c16 26fc lrs $AC0.M, @DMBH - // 0c17 02a0 8000 andf $AC0.M, #0x8000 - // 0c19 029c 0c16 jlnz 0x0c16 - while (@DMBH & 0x8000 == 0); - - // 0c1b 0000 nop - // 0c1c 0000 nop - // 0c1d 0000 nop - // 0c1e 02ff rti - return; -} - -// Saves/Restores whole ACC0, but only modifies AC0.M. strange -void Int2_Handler() { - 0c1f 8e00 set16 - - // Save ACC0 - 0c20 00f0 0e17 sr @0x0e17, $AC0.H - 0c22 00fe 0e18 sr @0x0e18, $AC0.M - 0c24 00fc 0e19 sr @0x0e19, $AC0.L - - // 0c26 1fcc mrr $AC0.M, $ST0 - // 0c27 1d9e mrr $ST0, $AC0.M - // 0c28 16fc feed si @DMBH, #0xfeed - // 0c2a 2efd srs @DMBL, $AC0.M - DMB = 0xfeed0000 | $ST0 - - // 0c2b 26fc lrs $AC0.M, @DMBH - // 0c2c 02a0 8000 andf $AC0.M, #0x8000 - // 0c2e 029c 0c2b jlnz 0x0c2b - while (@DMBH & 0x8000 == 0); - - // Restore ACC0 - 0c30 00d0 0e17 lr $AC0.H, @0x0e17 - 0c32 00de 0e18 lr $AC0.M, @0x0e18 - 0c34 00dc 0e19 lr $AC0.L, @0x0e19 - - // 0c36 0000 nop - // 0c37 0000 nop - // 0c38 0000 nop - // 0c39 0000 nop - // 0c3a 02ff rti - return; -} - -void Int3_Handler() { - 0c3b 8e00 set16 - - // Save AC0.L, AC0.M - 0c3c 1dbc mrr $ST1, $AC0.L - 0c3d 1dbe mrr $ST1, $AC0.M - - // 0c3e 8100 clr $ACC0 - // 0c3f 00de 0bb7 lr $AC0.M, @0x0bb7 - // 0c41 0601 cmpis $AC0.M, #0x01 - // 0c42 0295 0c47 jz 0x0c47 - // 0c44 0e00 lris $AC0.M, #0x00 - // 0c45 00fe 0b87 sr @0x0b87, $AC0.M - if (*0x0bb7 != 1) { // pb.addr != AXPBADDR_LOOP_ON - *0x0b87 = 0; // pb.state = AX_PB_STATE_STOP - } - - // Restore AC0.L, AC0.M - 0c47 1fcd mrr $AC0.M, $ST1 - 0c48 1f8d mrr $AC0.L, $ST1 - - // 0c49 02ff rti - return; -} - -void Int4_Handler() { - // 0c4a 0000 nop - // 0c4b 0000 nop - // 0c4c 0000 nop - // 0c4d 0000 nop - // 0c4e 0000 nop - // 0c4f 02ff rti - return; -} - -void Int5_Handler() { - 0c50 8e00 set16 - - // Save AC0.L, AC0.M - 0c51 1dbc mrr $ST1, $AC0.L - 0c52 1dbe mrr $ST1, $AC0.M - - // 0c53 8100 clr $ACC0 - // 0c54 00de 0bb7 lr $AC0.M, @0x0bb7 - // 0c56 0601 cmpis $AC0.M, #0x01 - // 0c57 0295 0c5f jz 0x0c5f - if (*0x0bb7 != 1) // pb.addr != AXPBADDR_LOOP_ON - { - // 0c59 0e00 lris $AC0.M, #0x00 - // 0c5a 00fe 0b87 sr @0x0b87, $AC0.M - *0x0b87 = 0; // pb.state = AX_PB_STATE_STOP - - // Restore AC0.L, AC0.M - 0c5c 1fcd mrr $AC0.M, $ST1 - 0c5d 1f8d mrr $AC0.L, $ST1 - - // 0c5e 02ff rti - return; - } - - // 0c5f 8100 clr $ACC0 - // 0c60 00de 0b88 lr $AC0.M, @0x0b88 - // 0c62 0601 cmpis $AC0.M, #0x01 - // 0c63 0295 0c71 jz 0x0c71 - if (*0x0b88 != 1) { // pb.type != AX_PB_TYPE_STREAM - - // 0c65 00de 0bda lr $AC0.M, @0x0bda - // 0c67 2eda srs @scale, $AC0.M - // 0c68 00de 0bdb lr $AC0.M, @0x0bdb - // 0c6a 2edb srs @yn1, $AC0.M - // 0c6b 00de 0bdc lr $AC0.M, @0x0bdc - // 0c6d 2edc srs @yn2, $AC0.M - @scale = pb.adpcmLoop.loop_pred_scale - @yn1 = pb.adpcmLoop.loop_yn1 - @yn2 = pb.adpcmLoop.loop_yn2 - - // Restore AC0.L, AC0.M - 0c6e 1fcd mrr $AC0.M, $ST1 - 0c6f 1f8d mrr $AC0.L, $ST1 - - // 0c70 02ff rti - return; - - } else { - - // 0c71 00de 0bda lr $AC0.M, @0x0bda - // 0c73 2eda srs @scale, $AC0.M - // 0c74 26db lrs $AC0.M, @yn1 - // 0c75 2edb srs @yn1, $AC0.M - // 0c76 26dc lrs $AC0.M, @yn2 - // 0c77 2edc srs @yn2, $AC0.M - @scale = pb.adpcmLoop.loop_pred_scale - // refresh @yn1, @yn2....why? - @yn1 = @yn1 - @yn2 = @yn2 - - // Well helllloooo there, padding - // 0c78 8100 clr $ACC0 - // 0c79 00dc 0bdd lr $AC0.L, @0x0bdd - // 0c7b 7600 inc $ACC0 - // 0c7c 00fc 0bdd sr @0x0bdd, $AC0.L - // 0c7e 8100 clr $ACC0 - pb.pad[0]++ - - // Restore AC0.L, AC0.M - 0c7f 1fcd mrr $AC0.M, $ST1 - 0c80 1f8d mrr $AC0.L, $ST1 - - // 0c81 02ff rti - return; - } -} - -void Int6_Handler() { - 0c82 0000 nop - 0c83 0000 nop - 0c84 0000 nop - 0c85 0000 nop - 0c86 0000 nop - 0c87 02ff rti -} - -void Int7_Handler() { - 0c88 0000 nop - 0c89 0000 nop - 0c8a 0000 nop - 0c8b 0000 nop - 0c8c 02ff rti -} - -# End of interrupt handlers - -// Jump table for the next function. -0c8d 0c9f // some kind of soft-reset for the UCode -0c8e 0ca2 // looks like code to dump the UCode memory for debugging -0c8f 0cda // rest the UCode and jump to ROM -0c90 0cdd // normal case to return to the main-loop - -// Called only from Task_Yield() -// Decides what to do next (this cmdblock is done) -void JumpThroughTable2() { - 0c91 8e00 set16 - 0c92 8100 clr $ACC0 - 0c93 8900 clr $ACC1 - - // 0c94 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - // 0c96 27ff lrs $AC1.M, @CMBL - // 0c97 009e 0c8d lri $AC0.M, #0x0c8d - // 0c99 4c00 add $ACC0, $ACC1 - // 0c9a 1c7e mrr $AR3, $AC0.M - // 0c9b 0313 ilrr $AC1.M, @$AR3 - // 0c9c 1c7f mrr $AR3, $AC1.M - // 0c9d 176f jmpr $AR3 - switch(@CMBL) { - case 0: AX_ResumeTask(); break; - case 1: JumpTable2_1(); break; - case 2: IROM_Reset(); break; - case 3: AX_GetNextCmdBlock(); break; - } - 0c9e 0021 halt -} - -// case 0: -void AX_ResumeTask() { - 0c9f 029f 0030 jmp 0x0030 - 0ca1 0021 halt -} - -// case 1: -// funky...calls the mbox funcs, sometimes prefilling ACx regs... -// Perhaps DMAs some stuff and yields? -// Need to RE the ROM to figure this func out completely -void JumpTable2_1() { - // 0ca2 8100 clr $ACC0 - // 0ca3 8900 clr $ACC1 - // 0ca4 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - // 0ca6 24ff lrs $AC0.L, @CMBL - // 0ca7 02bf 0ce6 call 0x0ce6 - WaitForCPUMail1(); - - // 0ca9 25ff lrs $AC1.L, @CMBL - // 0caa 02bf 0ce6 call 0x0ce6 - WaitForCPUMail1(); - - 0cac 27ff lrs $AC1.M, @CMBL - 0cad 2ece srs @DSMAH, $AC0.M - 0cae 2ccf srs @DSMAL, $AC0.L - 0caf 16c9 0001 si @DSCR, #0x0001 - 0cb1 2fcd srs @DSPA, $AC1.M - 0cb2 2dcb srs @DSBL, $AC1.L - - // 0cb3 8100 clr $ACC0 - // 0cb4 8900 clr $ACC1 - // 0cb5 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - 0cb7 24ff lrs $AC0.L, @CMBL - 0cb8 1c9e mrr $IX0, $AC0.M - 0cb9 1cbc mrr $IX1, $AC0.L - 0cba 02bf 0ce6 call 0x0ce6 - WaitForCPUMail1(); - - 0cbc 25ff lrs $AC1.L, @CMBL - 0cbd 02bf 0ce6 call 0x0ce6 - WaitForCPUMail1(); - - 0cbf 27ff lrs $AC1.M, @CMBL - 0cc0 1cdf mrr $IX2, $AC1.M - 0cc1 1cfd mrr $IX3, $AC1.L - - // 0cc2 8100 clr $ACC0 - // 0cc3 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - 0cc5 26ff lrs $AC0.M, @CMBL - 0cc6 1c1e mrr $AR0, $AC0.M - 0cc7 8900 clr $ACC1 - 0cc8 02bf 0ce6 call 0x0ce6 - WaitForCPUMail1(); - - 0cca 20ff lrs $AX0.L, @CMBL - 0ccb 1f5f mrr $AX0.H, $AC1.M - 0ccc 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - 0cce 21ff lrs $AX1.L, @CMBL - 0ccf 02bf 0ce0 call 0x0ce0 - WaitForCPUMail0(); - - 0cd1 23ff lrs $AX1.H, @CMBL - - // 0cd2 26c9 lrs $AC0.M, @DSCR - // 0cd3 02a0 0004 andf $AC0.M, #0x0004 - // 0cd5 029c 0cd2 jlnz 0x0cd2 - while (@DSCR & 0x0004 != 0); // Wait for DMA to complete - - // 0cd7 029f 80b5 jmp 0x80b5 - // 0cd9 0021 halt - IROM_ErrorAndDie(); // Not sure...gotta RE the ROM -} - -// case 2: -void IROM_Reset() { - 0cda 029f 8000 jmp 0x8000 - 0cdc 0021 halt -} - -// case 3: -void AX_GetNextCmdBlock() { - // 0cdd 029f 0045 jmp 0x0045 - goto GetNextCmdBlock; - - 0cdf 0021 halt -} - -void WaitForCPUMail0() { - // 0ce0 26fe lrs $AC0.M, @CMBH - // 0ce1 02c0 8000 andcf $AC0.M, #0x8000 - // 0ce3 029c 0ce0 jlnz 0x0ce0 - while (@CMBH & 0x8000 == 0); - // 0ce5 02df ret - return; -} - -void WaitForCPUMail1() { - // 0ce6 27fe lrs $AC1.M, @CMBH - // 0ce7 03c0 8000 andcf $AC1.M, #0x8000 - // 0ce9 029c 0ce6 jlnz 0x0ce6 - while (@CMBH & 0x8000 == 0); - // 0ceb 02df ret - return; -} - -0cec 0000 nop -0ced 0000 nop -0cee 0000 nop -0cef 0000 nop diff --git a/docs/DSP/DSP_UC_GBA.txt b/docs/DSP/DSP_UC_GBA.txt deleted file mode 100644 index 0daa70dd11..0000000000 --- a/docs/DSP/DSP_UC_GBA.txt +++ /dev/null @@ -1,498 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -ROM functions used: -0x8000 dsp reset -0x8078 wait for CMBH & 0x8000 -0x807e wait for DMBH & 0x8000 -0x808b dump DRAM/IRAM to mainmem -0x80b5 boot new ucode -0x80bc boot new ucode without ACC clearing by ROM - -For the rest, this ucode is just calling the last few instructions -from huge functions in irom - some kind of obfuscation -Perhaps someone thought the irom would never be dumped? ;p - -Similarly, drom is used pretty extensively as a source of what is intended to -be "mystery" numbers. Usually a word will be fetched, and masked to create a -simple value. No problem! :) - -0x81f4 - mulxac'mv $AX0.H, $AX1.L, $ACC1 : $AX1.H, $AC0.M - asr16'ir $ACC1 : $AR1 - srri @$AR3, $AC1.M - clr's $ACC0 : @$AR3, $AC1.L -0x8458 - mulxac'mv $AX0.H, $AX1.L, $ACC1 : $AX1.H, $AC0.M - asr16 $ACC1 - srri @$AR3, $AC1.M - clr's $ACC0 : @$AR3, $AC1.L -0x8723 - xorr $AC1.M, $AX1.H - srrd @$AR2, $AC1.M -0x8809 - orr'sn $AC1.M, $AX0.H : @$AR2, $AC1.L - srri @$AR2, $AC1.M -0x88e5 - orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 - lrrd $AC1.L, @$AR2 - add'dr $ACC0, $ACC1 : $AR1 - srri @$AR2, $AC0.M - srr @$AR2, $AC0.L - -struct sec_params_t -{ - u32 key; // from gba - u32 unk1; // normally 2 - u32 unk2; // normally 2 - u32 length; // size of data transferred to gba - u32 dest_addr; // addr to store result in mram - u32 pad[3]; -} - -// exception vector -0000 0000 nop -0001 0000 nop -0002 0000 nop -0003 0000 nop -0004 0000 nop -0005 0000 nop -0006 0000 nop -0007 0000 nop -0008 0000 nop -0009 0000 nop -000a 0000 nop -000b 0000 nop -000c 0000 nop -000d 0021 halt -000e 02ff rti -000f 0021 halt - -// entry point -void 0010_main() -{ -0010 1306 sbset #0x06 -0011 1203 sbclr #0x03 -0012 1204 sbclr #0x04 -0013 1305 sbset #0x05 -0014 0092 00ff lri $CR, #0x00ff -0016 0088 ffff lri $WR0, #0xffff -0018 0089 ffff lri $WR1, #0xffff -001a 008a ffff lri $WR2, #0xffff -001c 008b ffff lri $WR3, #0xffff -001e 8f00 set40 -001f 8b00 m0 -0020 8c00 clr15 -0021 02bf 807e call 0x807e // loop until dsp->cpu mailbox is empty -0023 16fc dcd1 si @DMBH, #0xdcd1 -0025 16fd 0000 si @DMBL, #0x0000 // sendmail 0xdcd10000 -0027 16fb 0001 si @DIRQ, #0x0001 - -// wait for cpu mail == 0xabbaxxxx -0029 02bf 8078 call 0x8078 // wait for cpu mail -002b 24ff lrs $AC0.L, @CMBL -002c 0280 abba cmpi $AC0.M, #0xabba -002e 0294 0029 jnz 0x0029 - -// wait for cpu mail -0030 8e00 set16 -0031 02bf 8078 call 0x8078 - -0033 20ff lrs $AX0.L, @CMBL -0034 0240 0fff andi $AC0.M, #0x0fff -0036 1f5e mrr $AX0.H, $AC0.M -0037 009b 0000 lri $AX1.H, #0x0000 // DSP-dram addr -0039 0099 0020 lri $AX1.L, #0x0020 // length (20 bytes = 10 words, word 9 and 10 are addr where result should DMA'd to in main mem) -003b 0087 0000 lri $IX3, #0x0000 // there will be no ucode/iram upload -003d 0080 0041 lri $AR0, #0x0041 // return addr after dram upload -003f 029f 80bc jmp 0x80bc // DRAM upload !! -// $AX0.H-$AX0.L - CPU(PPC) addr = mail & 0x0fffffff -// upload data from mainmem do dsp dram and jump to 0x41 after that - -0041 02bf 008c call 008c_BigCrazyFunction() -0043 02bf 807e call 0x807e // loop until dsp->cpu mailbox is empty - -0045 16fc dcd1 si @DMBH, #0xdcd1 -0047 16fd 0003 si @DMBL, #0x0003 // sendmail 0xdcd10003 (aka... calc is over, result is in main mem now) -0049 16fb 0001 si @DIRQ, #0x0001 -004b 8f00 set40 - -004c 02bf 8078 call 0x8078 -004e 0280 cdd1 cmpi $AC0.M, #0xcdd1 -0050 0294 004c jnz 0x004c - -0052 26ff lrs $AC0.M, @CMBL -0053 0280 0001 cmpi $AC0.M, #0x0001 -0055 0295 005e jz 0x005e // if cpu->dsp mail was 0xcdd10001 -> 005e_PrepareBootUcode() - -0057 0280 0002 cmpi $AC0.M, #0x0002 -0059 0295 8000 jz 0x8000 // if cpu->dsp mail was 0xcdd10002 -> dsp reset ( jmp to irom(0x8000)) - -005b 029f 004c jmp 0x004c // wait for next mail from cpu -005d 0021 halt -} - -void 005e_PrepareBootUcode() -{ -005e 8e00 set16 -005f 02bf 8078 call 0x8078 -0061 24ff lrs $AC0.L, @CMBL // ??? -0062 02bf 8078 call 0x8078 -0064 24ff lrs $AC0.L, @CMBL // ??? -0065 02bf 8078 call 0x8078 -0067 24ff lrs $AC0.L, @CMBL // ??? -0068 02bf 8078 call 0x8078 -006a 00c5 ffff lr $IX1, @CMBL -006c 0240 0fff andi $AC0.M, #0x0fff -006e 1c9e mrr $IX0, $AC0.M // mram addr for iram -006f 02bf 8078 call 0x8078 -0071 00c7 ffff lr $IX3, @CMBL // iram upload length. upload skipped if 0 -0073 02bf 8078 call 0x8078 -0075 00c6 ffff lr $IX2, @CMBL // iram dest -0077 02bf 8078 call 0x8078 -0079 00c0 ffff lr $AR0, @CMBL // startpc / return addr -007b 02bf 8078 call 0x8078 -007d 20ff lrs $AX0.L, @CMBL -007e 0240 0fff andi $AC0.M, #0x0fff -0080 1f5e mrr $AX0.H, $AC0.M // mram addr for dram -0081 02bf 8078 call 0x8078 -0083 21ff lrs $AX1.L, @CMBL // dram upload length. upload skipped if 0 -0084 02bf 8078 call 0x8078 -0086 23ff lrs $AX1.H, @CMBL // dram dest -0087 1205 sbclr #0x05 -0088 1206 sbclr #0x06 -0089 029f 80b5 jmp 80b5_BootUcode() -008b 0021 halt -} - -// does some crazy stuff with data at dram @0x3/0x5/0x6/0x7 with help of some values from drom :) -// result is @0x22,@0x23 and written back to main memory to dmem-0x08:dmem-0x09 -void 008c_BigCrazyFunction() -{ -// 008c 8100 clr $ACC0 -// 008d 0081 0010 lri $AR1, #0x0010 -// 008f 1020 loopi #0x20 -// 0090 1b3e srri @$AR1, $AC0.M - memset(0x10, 0, 0x20 * sizeof(dsp_word)); - -// 0091 00df 1456 lr $AC1.M, @0x1456 // drom 102f -// 0093 0340 ffd0 andi $AC1.M, #0xffd0 // -> 0x1000 -// 0095 8417 clrp'mv : $AX1.L, $AC1.M // clrp, ax1.l = 0x1000 - IMPORTANT: "confusing" section relies on prod being cleared, and ax1.l == 0x1000 - -// 0096 0080 0000 lri $AR0, #0x0000 -// 0098 0086 0000 lri $IX2, #0x0000 -// 009a 0082 001f lri $AR2, #0x001f -// 009c 00de 15f6 lr $AC0.M, @0x15f6 // drom 7f65 -// 009e 1408 lsl $ACC0, #8 // -> 0x7f_6500 -// 009f 00df 1766 lr $AC1.M, @0x1766 // drom 0273 -// 00a1 0340 00ff andi $AC1.M, #0x00ff // -> 0x73 -// 00a3 1f5f mrr $AX0.H, $AC1.M // ax0.h = 0x73 -// 00a4 02bf 88e5 call 0x88e5 // ar2 = 0x1f, ar1 = 0x30 -// orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 // acc0 = 0x7f_6573, ac1.m = 0, ar2 = 0x20 -// lrrd $AC1.L, @$AR2 // ac1.l = 0, ar2 = 0x1f -// add'dr $ACC0, $ACC1 : $AR1 -// srri @$AR2, $AC0.M // *0x1f = 0x6573, ar2 = 0x20 -// srr @$AR2, $AC0.L // *0x20 = 0 -// 00a6 1f1c mrr $AX0.L, $AC0.L // ax0.l = 0 -// 00a7 811e clr'mv $ACC0 : $AX1.H, $AC0.M // acc0 = 0, ax1.h = 0x6573 -// 00a8 191e lrri $AC0.M, @$AR0 // ac0.m = sec_params.key[0], ar1 = 1 -// 00a9 1478 lsr $ACC0, #-8 // acc0 0x00_00.._..00 -// 00aa 1ffc mrr $AC1.M, $AC0.L // ac1.m = sec_params.key[0] & 0x00ff -// 00ab 1f5e mrr $AX0.H, $AC0.M // ax0.h = sec_params.key[0] >> 8 -// 00ac 02bf 8809 call 0x8809 -// orr'sn $AC1.M, $AX0.H : @$AR2, $AC1.L // ac1.m |= ax0.h ..tricky tricky :D -// srri @$AR2, $AC1.M // *0x20 = bswap(sec_params.key[0]), ar2 = 0x21 -// 00ae 02bf 8723 call 0x8723 -// xorr $AC1.M, $AX1.H // ac1.m = sec_params.key[0] ^ 0x6573 -// srrd @$AR2, $AC1.M // *0x21 = bswap(sec_params.key[0]) ^ 0x6573, ar2 = 0x20 - // Initialize 0x21 - *0x1f = 0x6573 - *0x20 = bswap(sec_params.key[0]) - *0x21 = bswap(sec_params.key[0]) ^ 0x6573 - -// 00b0 0006 dar $AR2 // ar2 = 0x1f -// 00b1 8106 clr'dr $ACC0 : $AR2 // acc0 = 0, ar2 = 0x1e -// 00b2 00de 166c lr $AC0.M, @0x166c // drom 06f2 -// 00b4 1404 lsl $ACC0, #4 -// 00b5 0240 ff00 andi $AC0.M, #0xff00 // -> 0x6f00 -// 00b7 00df 1231 lr $AC1.M, @0x1231 // drom 64fc -// 00b9 1578 lsr $ACC1, #-8 -// 00ba 0340 00ff andi $AC1.M, #0x00ff // -> 0x64 -// 00bc 1f5f mrr $AX0.H, $AC1.M // ax0.h = 0x64 -// 00bd 02bf 88e5 call 0x88e5 -// orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 // ac0.m = 0x6f64, ac1.m = 0, ar2 = 0x1f -// lrrd $AC1.L, @$AR2 // ac1.l = 0x6573, ar2 = 0x1e -// add'dr $ACC0, $ACC1 : $AR1 // acc0 = 0x00_6f64_6573 -// srri @$AR2, $AC0.M // *0x1e = 0x6f64, ar2 = 0x1f -// srr @$AR2, $AC0.L // *0x1f = 0x6573 -// 00bf 1f1c mrr $AX0.L, $AC0.L -// 00c0 811e clr'mv $ACC0 : $AX1.H, $AC0.M // acc0 = 0, ax1.h = 0x6f64 -// 00c1 191e lrri $AC0.M, @$AR0 // ac0.m = sec_params.key[1] -// 00c2 1478 lsr $ACC0, #-8 // acc0 = 0x00_00.._..00 -// 00c3 1ffc mrr $AC1.M, $AC0.L // ac1.m = sec_params.key[1] & 0xff -// 00c4 1f5e mrr $AX0.H, $AC0.M // ax0.h = sec_params.key[1] >> 8 -// 00c5 02bf 8809 call 0x8809 -// orr'sn $AC1.M, $AX0.H : @$AR2, $AC1.L // ac1.m |= ax0.h -// srri @$AR2, $AC1.M // *0x1f = bswap(sec_params.key[1]), ar2 = 0x20 -// 00c7 02bf 8723 call 0x8723 -// xorr $AC1.M, $AX1.H -// srrd @$AR2, $AC1.M // *0x20 = bswap(sec_params.key[1]) ^ 0x6f64 - // Initialize 0x20 - *0x1e = 0x6f64 - *0x1f = bswap(sec_params.key[1]) - *0x20 = bswap(sec_params.key[1]) ^ 0x6f64 - - // Initialize 0x11 -// 00c9 8100 clr $ACC0 -// 00ca 8900 clr $ACC1 -// 00cb 00d1 0005 lr $AC1.H, @0x0005 -// 00cd 9900 asr16 $ACC1 // s16 unk2 = (s8)(sec_params.unk2[1]) -// 00ce 8200 cmp -// 00cf 0295 00e5 jz 0x00e5 -// 00d1 0291 00f3 jl 0x00f3 -if (unk2 < 0) { - // 00d3 0082 0010 lri $AR2, #0x0010 - // 00d5 0086 0001 lri $IX2, #0x0001 // 'sn will inc ar2 by 1 - // 00d7 00d0 171b lr $AC0.H, @0x171b // drom ff03 - // 00d9 9100 asr16 $ACC0 // -> 0x00_0003_0000 - // 00da 7d00 neg $ACC1 - // 00db 4d00 add $ACC1, $ACC0 - // 00dc 1501 lsl $ACC1, #1 - // 00dd 1f5f mrr $AX0.H, $AC1.M // ax0.h = ((~unk2 + 3) << 1) & 0xffff - // 00de 00df 0003 lr $AC1.M, @0x0003 // sec_params.unk1[1] - // 00e0 1504 lsl $ACC1, #4 - // 00e1 02bf 8809 call 0x8809 - // orr'sn $AC1.M, $AX0.H : @$AR2, $AC1.L // ac1.m = (((~unk2 + 3) << 1) & 0xffff) | (sec_params.unk1[1] << 4), ar2 = 0x11 - // srri @$AR2, $AC1.M - // 00e3 029f 0102 jmp 0x0102 - *0x11 = (((~unk2 + 3) << 1) | (sec_params.unk1[1] << 4)) & 0xffff - -} else if (unk2 == 0) { - // unk2 is unused - // 00e5 0082 0011 lri $AR2, #0x0011 - // 00e7 00df 0003 lr $AC1.M, @0x0003 // sec_params.unk1[1] - // 00e9 1501 lsl $ACC1, #1 - // 00ea 1f5f mrr $AX0.H, $AC1.M // ax0.h = sec_params.unk1[1] << 1 - // 00eb 00de 1043 lr $AC0.M, @0x1043 // drom 0076 - // 00ed 0240 fff0 andi $AC0.M, #0xfff0 // -> 0x70 - // 00ef 02bf 88e5 call 0x88e5 - // orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 // ac0.m = (sec_params.unk1[1] << 1) | 0x70, ac1.m = 0, ar2 = 0x12 - // lrrd $AC1.L, @$AR2 // ar2 = 0x11 - // add'dr $ACC0, $ACC1 : $AR1 // acc1 must be 0 - // srri @$AR2, $AC0.M // *0x11 = (sec_params.unk1[1] << 1) | 0x70, ar2 = 0x12 - // srr @$AR2, $AC0.L // *0x12 = 0 // just a side effect, it's already 0 anyways - // 00f1 029f 0102 jmp 0x0102 - *0x11 = ((sec_params.unk1[1] << 1) | 0x70) & 0xffff - -} else if (unk2 > 0) { - // 00f3 0082 0010 lri $AR2, #0x0010 - // 00f5 0086 0001 lri $IX2, #0x0001 // 'sn will inc ar2 by 1 - // 00f7 00d0 1285 lr $AC0.H, @0x1285 // drom 5aff (0xffff because of .h) - // 00f9 9100 asr16 $ACC0 // -> 0xff_ffff_0000 = -1 - // 00fa 4d00 add $ACC1, $ACC0 // ac1.m = unk2 - 1 - // 00fb 1501 lsl $ACC1, #1 // ac1.m <<= 1 ..in the normal case, this makes it 2 again... - // 00fc 00de 0003 lr $AC0.M, @0x0003 // sec_params.unk1[1] - // 00fe 1404 lsl $ACC0, #4 - // 00ff 1f5e mrr $AX0.H, $AC0.M // ax0.h = sec_params.unk1[1] << 4 - // 0100 02bf 8809 call 0x8809 - // orr'sn $AC1.M, $AX0.H : @$AR2, $AC1.L // ac1.m = ((unk2 - 1) << 1) | (sec_params.unk1[1] << 4), ar2 = 0x11 - // srri @$AR2, $AC1.M - *0x11 = (((unk2 - 1) << 1) | (sec_params.unk1[1] << 4)) & 0xffff -} - -// This just clears acc1 -// 0102 0083 0013 lri $AR3, #0x0013 -// 0104 1b7e srri @$AR3, $AC0.M // *0x13 = intermediate from above -> unused -// 0105 8923 clr's $ACC1 : @$AR3, $AC0.L // acc1 = 0, *0x14 = intermediate from above -> unused - -// The "confusion" -// 0106 0083 0013 lri $AR3, #0x0013 -// 0108 00df 0007 lr $AC1.M, @0x0007 // ac1.m = sec_params.length[1] -// 010a 00de 11b8 lr $AC0.M, @0x11b8 // drom 007f -// 010c 0240 fff0 andi $AC0.M, #0xfff0 // -> 0x70 -// 010e 1f5e mrr $AX0.H, $AC0.M // ax0.h = 0x70 -// 010f 02bf 81f4 call 0x81f4 -// mulxac'mv $AX0.H, $AX1.L, $ACC1 : $AX1.H, $AC0.M// prod = 0x70 * 0x1000 : .m1 = 7 -// asr16'ir $ACC1 : $AR1 // ac1.l = sec_params.length[1], the rest of acc1 must be 0 -// srri @$AR3, $AC1.M // *0x13 = 0, ar3 = 0x14 -// clr's $ACC0 : @$AR3, $AC1.L // acc0 = 0, *0x14 = sec_params.length[1], ar3 = 0x15 -// -// 0111 f100 lsl16 $ACC1 // ac1.m = sec_params.length[1] -// 0112 02bf 8458 call 0x8458 // this is the same routine, just adds 7 and stores to different location -// mulxac'mv $AX0.H, $AX1.L, $ACC1 : $AX1.H, $AC0.M// acc1 += 7 // last prod has 7 in the mid -// asr16 $ACC1 // ac1.l = sec_params.length[1] + 7 -// srri @$AR3, $AC1.M // *0x15 = 0, ar3 = 0x16 -// clr's $ACC0 : @$AR3, $AC1.L // *0x16 = sec_params.length[1] + 7 - *0x13 = 0 - *0x14 = sec_params.length[1] - *0x15 = 0 - *0x16 = sec_params.length[1] + 7 - -// 0114 8f00 set40 // SIGN EXTENSION IN EFFECT!! -// 0115 0082 0015 lri $AR2, #0x0015 -// 0117 00de 0006 lr $AC0.M, @0x0006 // ac0.m = sec_params.length[0] ..always 0? // sign extended -// 0119 00da 165b lr $AX0.H, @0x165b // drom 0000 -// 011b 02bf 88e5 call 0x88e5 -// orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 // ac0.m = sec_params.length[0], effectively clears acc1 (*0x15 == 0), ar2 = 0x16 -// lrrd $AC1.L, @$AR2 // ac1.l = sec_params.length[1] + 7, ar2 = 0x15 -// add'dr $ACC0, $ACC1 : $AR1 // ac0.m = sec_params.length[0], ac0.l = sec_params.length[1] + 7 -// srri @$AR2, $AC0.M // *0x15 = sec_params.length[0], ar2 = 0x16 -// srr @$AR2, $AC0.L // *0x16 = sec_params.length[1] + 7 -// 011d 14fd asr $ACC0, #-3 -// 011e 1403 lsl $ACC0, #3 // ((acc0 + 7) & ~7) (round up) // consider .length rounded from here on out -// 011f 1b5e srri @$AR2, $AC0.M // *0x16 = sec_params.length[0], ar2 = 0x17 -// 0120 1b5c srri @$AR2, $AC0.L // *0x17 = sec_params.length[1], ar2 = 0x18 -// 0121 0082 0016 lri $AR2, #0x0016 -// 0123 00de 1723 lr $AC0.M, @0x1723 // drom ffe0 // obviously sign extended -// 0125 14f4 asr $ACC0, #-12 // -> 0xff_ffff_fe00 = -1, -0x200 -// 0126 00da 166b lr $AX0.H, @0x166b // drom 0000 -// 0128 02bf 88e5 call 0x88e5 -// orr'l $AC0.M, $AX0.H : $AC1.M, @$AR2 // ac1.m = sec_params.length[0] // sign extended -// lrrd $AC1.L, @$AR2 // ac1.l = sec_params.length[1] -// add'dr $ACC0, $ACC1 : $AR1 // acc0 = sec_params.length - 0x200 // this is a proper signed operation :) -// srri @$AR2, $AC0.M // *0x16 = sec_params.length - 0x200 HIGH -// srr @$AR2, $AC0.L // *0x17 = sec_params.length - 0x200 LOW - // The above block just does 40bit subtraction...so annoying :p - *0x15 = sec_params.length[0] - *0x16 = sec_params.length - 0x200 HIGH - *0x17 = sec_params.length - 0x200 LOW - -// 012a b100 tst $ACC0 -// 012b 0290 012e jge 0x012e -// 012d 8100 clr $ACC0 -if (acc0 < 0) acc0 = 0 - -// At this point, ACC0 = max40bit(0, sec_params.length - 0x200) - -// 012e 14fd asr $ACC0, #-3 // taken into account at 013f -// 012f 8e00 set16 // back to sanity - -// voodoo -0130 00df 1491 lr $AC1.M, @0x1491 // drom 6a0f -0132 0340 d0f0 andi $AC1.M, #0xd0f0 // -> 0x4000 -0134 1cbf mrr $IX1, $AC1.M // ix1 = 0x4000 -0135 00df 1468 lr $AC1.M, @0x1468 // drom f808 -0137 00d1 11fc lr $AC1.H, @0x11fc // drom 0003 -0139 157c lsr $ACC1, #-4 // -> 0x00_3f80_8000 -013a 1cdf mrr $IX2, $AC1.M // ix2 = 0x3f80 -013b 00d1 11b8 lr $AC1.H, @0x11b8 // drom 007f -013d 9900 asr16 $ACC1 // -> 0x00_007f_3f80 -013e 1418 lsl $ACC0, #24 -013f 1478 lsr $ACC0, #-8 // (((ACC0 >> 3) << 24) >> 8) -same as ((ACC0 >> 3) << 16) & 0x00_ffff_0000 -> ac0.m = (u16)((sec_params.length - 0x200) >> 3) -u16 size = (u16)((sec_params.length - 0x200) >> 3) -0140 1f5e mrr $AX0.H, $AC0.M // ax0.h = size -0141 1ffe mrr $AC1.M, $AC0.M // ac1.m = size -0142 1f65 mrr $AX1.H, $IX1 // ax1.h = 0x4000 -0143 3600 andr $AC0.M, $AX1.H // ac0.m = size & 0x4000 -0144 1402 lsl $ACC0, #2 // acc0 <<= 2 // t = (0x00_size_0000 & 0x00_4000_ffff) << 2 -0145 1f66 mrr $AX1.H, $IX2 // ax1.h = 0x3f80 -0146 3700 andr $AC1.M, $AX1.H // ac1.m = size & 0x3f80 -0147 1501 lsl $ACC1, #1 // acc1 <<= 1 // u = (0x00_size_3f80 & 0x00_3f80_ffff) << 1 -0148 4c00 add $ACC0, $ACC1 // acc0 += acc1 // t += u -0149 1518 lsl $ACC1, #24 -014a 9900 asr16 $ACC1 // signed cast (s16)ac1.l (ends up in ac1.m) -014b 3500 andr $AC1.M, $AX0.H // ac1.m = (s16)u & size -014c 4c00 add $ACC0, $ACC1 // acc0 += acc1 // t += (s16)u & size -014d 00df 0012 lr $AC1.M, @0x0012 -014f 3f00 orc $AC1.M, $AC0.M // ac1.m = acc0 | 0x00_ffff_0000 -0150 00ff 0012 sr @0x0012, $AC1.M // *0x12 = ac1.m -0152 1470 lsr $ACC0, #-16 // // t >>= 16 unsigned -0153 00df 0011 lr $AC1.M, @0x0011 -0155 3f00 orc $AC1.M, $AC0.M -0156 00ff 0011 sr @0x0011, $AC1.M // *0x11 |= previous ac0.h, now at ac0.m <- so ac0.m = unsigned ac0.h -0158 1fa5 mrr $AC1.L, $IX1 // ac1.l = 0x4000 -0159 1501 lsl $ACC1, #1 // ac1.l = 0x8000 -015a 1fe6 mrr $AC1.M, $IX2 // ac1.m = 0x3f80 0x00_3f80_8000 -015b f100 lsl16 $ACC1 // ((acc1 << 16) >> 8) << 16 -015c 15f8 asr $ACC1, #-8 -015d f500 lsr16 $ACC1 // acc1 = 0x00_00ff_8080 -015e 1f5f mrr $AX0.H, $AC1.M // ax0.h = 0xff -015f 1f7d mrr $AX1.H, $AC1.L // ax1.h = 0x8080 -0160 8100 clr $ACC0 -0161 00de 0011 lr $AC0.M, @0x0011 -0163 3400 andr $AC0.M, $AX0.H // ac0.m = *0x11 & 0xff -0164 8900 clr $ACC1 // so it was all to setup ax0.h and ax1.h... -0165 00df 0012 lr $AC1.M, @0x0012 -0167 3500 andr $AC1.M, $AX0.H // ac1.m = *0x12 & 0xff -0168 4c00 add $ACC0, $ACC1 -0169 00df 0012 lr $AC1.M, @0x0012 -016b 1578 lsr $ACC1, #-8 -016c 4c00 add $ACC0, $ACC1 // acc0 = ((*0x11 & 0xff) << 16) + ((*0x12 & 0xff) << 16) + (*0x12 << 8) -016d 8900 clr $ACC1 -016e 1ffe mrr $AC1.M, $AC0.M -016f 1508 lsl $ACC1, #8 -0170 3b00 orr $AC1.M, $AX1.H // ac1.m = (ac0.m << 8) | 0x8080 -0171 00de 0011 lr $AC0.M, @0x0011 -0173 3e00 orc $AC0.M, $AC1.M // final11 = *0x11 | (ac0.m << 8) | 0x8080 -0174 00df 0012 lr $AC1.M, @0x0012 -0176 3b00 orr $AC1.M, $AX1.H -0177 1cbf mrr $IX1, $AC1.M // final12 = *0x12 | 0x8080 - -// write the final values @22 and @23 -// 0178 00da 15f1 lr $AX0.H, @0x15f1 // drom 0200 -// 017a 3500 andr $AC1.M, $AX0.H -// 017b 0295 0192 jz 0x0192 -if (final12 & 0x200 != 0) { - - // 017d 00df 10e2 lr $AC1.M, @0x10e2 // drom 376f - // 017f 1508 lsl $ACC1, #8 // -> 0x37_6f00 - // 0180 1f5f mrr $AX0.H, $AC1.M - // 0181 00df 103b lr $AC1.M, @0x103b // drom 0065 - // 0183 7900 decm $AC1.M // -> 0x64 - // 0184 3900 orr $AC1.M, $AX0.H - // 0185 3080 xorc $AC0.M, $AC1.M - // 0186 00fe 0022 sr @0x0022, $AC0.M // *0x22 = final11 ^ 0x6f64 - // 0188 00dc 1229 lr $AC0.L, @0x1229 // drom 657c - // 018a 00dd 11f8 lr $AC1.L, @0x11f8 // drom 0009 - // 018c 5c00 sub $ACC0, $ACC1 - // 018d f000 lsl16 $ACC0 - // 018e 1fe5 mrr $AC1.M, $IX1 - // 018f 3080 xorc $AC0.M, $AC1.M // *0x23 = final12 ^ 0x6573 - // 0190 029f 01a5 jmp 0x01a5 - *0x22 = final11 ^ 0x6f64 - *0x23 = final12 ^ 0x6573 - -} else { - // 0192 00df 10ca lr $AC1.M, @0x10ca // drom 3461 - // 0194 1508 lsl $ACC1, #8 // -> 0x34_6100 - // 0195 1f5f mrr $AX0.H, $AC1.M - // 0196 00df 1043 lr $AC1.M, @0x1043 // drom 0076 - // 0198 7500 incm $AC1.M // -> 0x77 - // 0199 3900 orr $AC1.M, $AX0.H - // 019a 3080 xorc $AC0.M, $AC1.M - // 019b 00fe 0022 sr @0x0022, $AC0.M // *0x22 = final11 ^ 0x6177 - // 019d 00dc 1259 lr $AC0.L, @0x1259 // drom 6143 - // 019f 00dd 16fe lr $AC1.L, @0x16fe // drom 0008 - // 01a1 4c00 add $ACC0, $ACC1 - // 01a2 f000 lsl16 $ACC0 - // 01a3 1fe5 mrr $AC1.M, $IX1 - // 01a4 3080 xorc $AC0.M, $AC1.M // *0x23 = final12 ^ 0x614b - *0x22 = final11 ^ 0x6177 - *0x23 = final12 ^ 0x614b -} -// 01a5 00fe 0023 sr @0x0023, $AC0.M // taken care of above - -// this is where result is written to main memory -// dsp mem 0x20-0x23 (8 bytes) are written back - only values @22 and @23 were modified, so result is 32bit -01a7 00da 0008 lr $AX0.H, @0x0008 // sec_params.dest_addr[0] -01a9 00d8 0009 lr $AX0.L, @0x0009 // sec_params.dest_addr[1] -01ab 009b 0020 lri $AX1.H, #0x0020 // dsp addr -01ad 0099 0008 lri $AX1.L, #0x0008 // length -01af 0087 0000 lri $IX3, #0x0000 // there will be no iram dma -01b1 02bf 808b call 0x808b // do it! - -01b3 02df ret -} - -01b4 0000 nop -01b5 0000 nop -01b6 0000 nop -01b7 0000 nop -01b8 0000 nop -01b9 0000 nop -01ba 0000 nop -01bb 0000 nop -01bc 0000 nop -01bd 0000 nop -01be 0000 nop -01bf 0000 nop diff --git a/docs/DSP/DSP_UC_IPL_24B22038.txt b/docs/DSP/DSP_UC_IPL_24B22038.txt deleted file mode 100644 index 35848c957a..0000000000 --- a/docs/DSP/DSP_UC_IPL_24B22038.txt +++ /dev/null @@ -1,1985 +0,0 @@ -0000 029f 0010 jmp 0x0010 -0002 0000 nop -0003 0000 nop -0004 02ff rti -0005 0000 nop -0006 02ff rti -0007 0000 nop -0008 02ff rti -0009 0000 nop -000a 02ff rti -000b 0000 nop -000c 02ff rti -000d 0000 nop -000e 02ff rti -000f 0000 nop - -// Entry -void 0010_Entry() -{ -0010 1302 sbset #0x02 -0011 1303 sbset #0x03 -0012 1204 sbclr #0x04 -0013 1305 sbset #0x05 -0014 1306 sbset #0x06 -0015 8e00 set16 -0016 8c00 clr15 -0017 8b00 m0 -0018 009e ffff lri $AC0.M, #0xffff -001a 1d1e mrr $WR0, $AC0.M -001b 1d3e mrr $WR1, $AC0.M -001c 1d5e mrr $WR2, $AC0.M -001d 1d7e mrr $WR3, $AC0.M -001e 0092 00ff lri $CR, #0x00ff -0020 8100 clr $ACC0 -0021 009f 1000 lri $AC1.M, #0x1000 -0023 0080 0000 lri $AR0, #0x0000 -0025 005f loop $AC1.M - 0026 1b1e srri @$AR0, $AC0.M // clear dram -0027 26ff lrs $AC0.M, @CMBL -0028 16fc 8888 si @DMBH, #0x8888 -002a 16fd 1111 si @DMBL, #0x1111 // SENDMAIL 0x88881111 -002c 26fc lrs $AC0.M, @DMBH -002d 02a0 8000 andf $AC0.M, #0x8000 -002f 029c 002c jlnz 0x002c -} - -void 0031_MainLoop() -{ -0031 8100 clr $ACC0 -0032 8900 clr $ACC1 -0033 26fe lrs $AC0.M, @CMBH -0034 02c0 8000 andcf $AC0.M, #0x8000 -0036 029c 0031 jlnz 0x0031 // wait for mail -0038 27ff lrs $AC1.M, @CMBL -0039 00ff 0345 sr @0x0345, $AC1.M -003b 1ffe mrr $AC1.M, $AC0.M -003c 0340 00ff andi $AC1.M, #0x00ff -003e 00ff 0344 sr @0x0344, $AC1.M -0040 1479 lsr $ACC0, #-7 -0041 0240 007e andi $AC0.M, #0x007e -0043 0200 0062 addi $AC0.M, #0x0062 -0045 00fe 0343 sr @0x0343, $AC0.M -0047 1c1e mrr $AR0, $AC0.M -0048 170f jmpr $AR0 // jump on CMD? -0049 009e 8000 lri $AC0.M, #0x8000 -004b 00dc 0343 lr $AC0.L, @0x0343 -004d 02bf 005a call 005a_SendMail(AC0.M,AC0.L) // sendmail 0x8000???? -004f 029f 0031 jmp 0x0031 -} - -void 0051_WaitForMailAndStoreIt(DEST $AR0) -{ -0051 26fe lrs $AC0.M, @CMBH -0052 02c0 8000 andcf $AC0.M, #0x8000 -0054 029c 0051 jlnz 0x0051 -0056 24ff lrs $AC0.L, @CMBL -0057 1b1e srri @$AR0, $AC0.M -0058 1b1c srri @$AR0, $AC0.L -0059 02df ret -} - -void 005a_SendMail(AC0.M,AC0.L) -{ -005a 2efc srs @DMBH, $AC0.M -005b 2cfd srs @DMBL, $AC0.L -005c 26fc lrs $AC0.M, @DMBH -005d 02a0 8000 andf $AC0.M, #0x8000 -005f 029c 005c jlnz 0x005c -0061 02df ret -} - -//CMDs -0062 029f 0049 jmp 0x0049 // CMD_0 -0064 029f 02bd jmp 0x02bd // CMD_1 -0066 029f 0470 jmp 0x0470 // CMD_2 -0068 029f 0031 jmp 0x0031 // CMD_3 -006a 029f 00df jmp 0x00df // CMD_4 -006c 029f 00f1 jmp 0x00f1 // CMD_5 -006e 029f 05bb jmp 0x05bb // CMD_6 -0070 029f 056f jmp 0x056f // CMD_7 -0072 029f 05d7 jmp 0x05d7 // CMD_8 -0074 029f 059f jmp 0x059f // CMD_9 -0076 029f 0741 jmp 0x0741 // CMD_A -0078 029f 0618 jmp 0x0618 // CMD_B - jump to IROM area (0x8644) -007a 029f 0203 jmp 0x0203 // CMD_C - -{ -007c 193e lrri $AC0.M, @$AR1 -007d 193c lrri $AC0.L, @$AR1 -007e 2fcd srs @DSPA, $AC1.M -007f 0f00 lris $AC1.M, #0x00 -0080 2fc9 srs @DSCR, $AC1.M // DMEM->CPU -0081 2ece srs @DSMAH, $AC0.M -0082 2ccf srs @DSMAL, $AC0.L -0083 1fe0 mrr $AC1.M, $AR0 -0084 1501 lsl $ACC1, #1 -0085 2fcb srs @DSBL, $AC1.M -0086 02bf 008f call 0x008f -0088 02df ret -} - -{ -0089 193e lrri $AC0.M, @$AR1 -008a 193c lrri $AC0.L, @$AR1 -008b 2fcd srs @DSPA, $AC1.M -008c 0f01 lris $AC1.M, #0x01 -008d 029f 0080 jmp 0x0080 -} - -{ -008f 26c9 lrs $AC0.M, @DSCR -0090 02a0 0004 andf $AC0.M, #0x0004 -0092 029c 008f jlnz 0x008f -0094 02df ret -} - -{ -0095 193e lrri $AC0.M, @$AR1 -0096 193c lrri $AC0.L, @$AR1 -0097 00ff ffcd sr @DSPA, $AC1.M -0099 0f00 lris $AC1.M, #0x00 -009a 00ff ffc9 sr @DSCR, $AC1.M -009c 00fe ffce sr @DSMAH, $AC0.M -009e 00fc ffcf sr @DSMAL, $AC0.L -00a0 1fe0 mrr $AC1.M, $AR0 -00a1 1501 lsl $ACC1, #1 -00a2 00ff ffcb sr @DSBL, $AC1.M -00a4 02df ret -} - -void 00a5_WaitForDMAend() -{ -00a5 00de ffc9 lr $AC0.M, @DSCR -00a7 02a0 0004 andf $AC0.M, #0x0004 -00a9 029c 00a5 jlnz 0x00a5 -00ab 02df ret -} - -void 00ac_AccZeldaTypeRead() -{ -00ac 193e lrri $AC0.M, @$AR1 -00ad 193c lrri $AC0.L, @$AR1 -00ae 0240 7fff andi $AC0.M, #0x7fff -00b0 02bf 00ba call 00ba_AccSetup() -00b2 007a 00b8 bloop $AX0.H, 0x00b8 -00b4 26d3 lrs $AC0.M, @UnkZelda -00b5 1b3e srri @$AR1, $AC0.M -00b6 0000 nop -00b7 0000 nop -00b8 0000 nop -00b9 02df ret -} - -void 00ba_AccSetup() -{ -00ba 1c3f mrr $AR1, $AC1.M -00bb 009f 0005 lri $AC1.M, #0x0005 -00bd 2fd1 srs @SampleFormat, $AC1.M // reads will be u8 -00be 1f5e mrr $AX0.H, $AC0.M -00bf 1f1c mrr $AX0.L, $AC0.L -00c0 2ed4 srs @ACSAH, $AC0.M -00c1 2cd5 srs @ACSAL, $AC0.L -00c2 8900 clr $ACC1 -00c3 1fa0 mrr $AC1.L, $AR0 -00c4 4c00 add $ACC0, $ACC1 -00c5 0200 0030 addi $AC0.M, #0x0030 -00c7 2ed6 srs @ACEAH, $AC0.M -00c8 2cd7 srs @ACEAL, $AC0.L -00c9 1fda mrr $AC0.M, $AX0.H -00ca 1f98 mrr $AC0.L, $AX0.L -00cb 147f lsr $ACC0, #-1 -00cc 2ed8 srs @ACCAH, $AC0.M -00cd 2cd9 srs @ACCAL, $AC0.L -00ce 1f40 mrr $AX0.H, $AR0 -00cf 02df ret -} - -void 00d0_AccZeldaTypeWrite() -{ -00d0 193e lrri $AC0.M, @$AR1 -00d1 193c lrri $AC0.L, @$AR1 -00d2 0260 8000 ori $AC0.M, #0x8000 -00d4 02bf 00ba call 00ba_AccSetup() -00d6 007a 00dd bloop $AX0.H, 0x00dd -{ - 00d8 193e lrri $AC0.M, @$AR1 - 00d9 2ed3 srs @UnkZelda, $AC0.M - 00da 0000 nop - 00db 0000 nop - 00dc 0000 nop - 00dd 0000 nop -} -00de 02df ret -} - -{ -00df 0080 0346 lri $AR0, #0x0346 -00e1 02bf 0051 call 0x0051 -00e3 02bf 0051 call 0x0051 -00e5 0081 0346 lri $AR1, #0x0346 -00e7 00df 0349 lr $AC1.M, @0x0349 -00e9 0340 ffff andi $AC1.M, #0xffff -00eb 00c0 0345 lr $AR0, @0x0345 -00ed 02bf 007c call 0x007c -00ef 029f 0049 jmp 0x0049 -} - -{ -00f1 0080 0346 lri $AR0, #0x0346 -00f3 02bf 0051 call 0x0051 -00f5 02bf 0051 call 0x0051 -00f7 0081 0346 lri $AR1, #0x0346 -00f9 00df 0349 lr $AC1.M, @0x0349 -00fb 0340 ffff andi $AC1.M, #0xffff -00fd 00c0 0345 lr $AR0, @0x0345 -00ff 02bf 0089 call 0x0089 -0101 029f 0049 jmp 0x0049 -} - -{ -0103 0092 00ff lri $CR, #0x00ff -0105 2fd1 srs @SampleFormat, $AC1.M -0106 0340 0003 andi $AC1.M, #0x0003 -0108 1f7f mrr $AX1.H, $AC1.M -0109 1f5e mrr $AX0.H, $AC0.M -010a 1f1c mrr $AX0.L, $AC0.L -010b 0200 0010 addi $AC0.M, #0x0010 -010d 2ed4 srs @ACSAH, $AC0.M -010e 2cd5 srs @ACSAL, $AC0.L -010f 8900 clr $ACC1 -0110 1fa0 mrr $AC1.L, $AR0 -0111 4c00 add $ACC0, $ACC1 -0112 0200 0030 addi $AC0.M, #0x0030 -0114 2ed6 srs @ACEAH, $AC0.M -0115 2cd7 srs @ACEAL, $AC0.L -0116 1fda mrr $AC0.M, $AX0.H -0117 1f98 mrr $AC0.L, $AX0.L -0118 1ffb mrr $AC1.M, $AX1.H -0119 7900 decm $AC1.M -011a 02ca lsrn -011b 2ed8 srs @ACCAH, $AC0.M -011c 2cd9 srs @ACCAL, $AC0.L -011d 02df ret -} - -//DSPLLE errors here!!! readw/writes from 0x3??? -{ -011e 1c23 mrr $AR1, $AR3 -011f 197e lrri $AC0.M, @$AR3 -0120 191b lrri $AX1.H, @$AR0 -0121 d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 -0122 1128 0128 bloopi #0x28, 0x0128 -0124 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 -0125 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M -0126 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 -0127 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M -0128 4900 addax $ACC1, $AX0 -0129 02df ret -} - -{ -012a 8f00 set40 -012b 1c03 mrr $AR0, $AR3 -012c 00db 038e lr $AX1.H, @0x038e -012e 009a 0004 lri $AX0.H, #0x0004 -0130 1978 lrri $AX0.L, @$AR3 -0131 a843 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR3 -0132 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 -0133 1128 0138 bloopi #0x28, 0x0138 -0135 38c3 asrnrx'l $ACC0, $AX0.H : $AX0.L, @$AR3 -0136 ae30 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC0.M -0137 38c3 asrnrx'l $ACC0, $AX0.H : $AX0.L, @$AR3 -0138 ae30 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC0.M -0139 8e00 set16 -013a 02df ret -} - -{ -013b 00f9 0361 sr @0x0361, $AX1.L -013d 1fc0 mrr $AC0.M, $AR0 -013e 0200 fffc addi $AC0.M, #0xfffc -0140 1c1e mrr $AR0, $AC0.M -0141 1c5e mrr $AR2, $AC0.M -0142 0083 0424 lri $AR3, #0x0424 -0144 197e lrri $AC0.M, @$AR3 -0145 197f lrri $AC1.M, @$AR3 -0146 80a2 nx'sl : $AC0.M, $AX0.H -0147 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H -0148 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M -0149 1b1f srri @$AR0, $AC1.M -014a 1c02 mrr $AR0, $AR2 -014b 8100 clr $ACC0 -014c 00de 0402 lr $AC0.M, @0x0402 -014e 00fe 0362 sr @0x0362, $AC0.M -0150 1474 lsr $ACC0, #-12 -0151 1f7e mrr $AX1.H, $AC0.M -0152 1f3c mrr $AX1.L, $AC0.L -0153 8900 clr $ACC1 -0154 00dd 0418 lr $AC1.L, @0x0418 -0156 1504 lsl $ACC1, #4 -0157 0604 cmpis $AC0.M, #0x04 -0158 0290 01b0 jge 0x01b0 -015a 1fdd mrr $AC0.M, $AC1.L -015b 0082 0c00 lri $AR2, #0x0c00 -015d 1050 loopi #0x50 -015e 4b2a addax's $ACC1, $AX1 : @$AR2, $AC1.L -015f 1fbe mrr $AC1.L, $AC0.M -0160 00fe 0360 sr @0x0360, $AC0.M -0162 8900 clr $ACC1 -0163 1fbe mrr $AC1.L, $AC0.M -0164 009a fff8 lri $AX0.H, #0xfff8 -0166 009b 00fc lri $AX1.H, #0x00fc -0168 00d8 0361 lr $AX0.L, @0x0361 -016a 0082 0c00 lri $AR2, #0x0c00 -016c 0083 0c00 lri $AR3, #0x0c00 -016e 195e lrri $AC0.M, @$AR2 -016f 3480 lsrnrx $ACC0, $AX0.H -0170 1128 0175 bloopi #0x28, 0x0175 -0172 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 -0173 35b3 lsrnrx's $ACC1, $AX0.H : @$AR3, $AC0.M -0174 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 -0175 34bb lsrnrx's $ACC0, $AX0.H : @$AR3, $AC1.M -0176 8a00 m2 -0177 0082 0c00 lri $AR2, #0x0c00 -0179 00dd 0418 lr $AC1.L, @0x0418 -017b 1504 lsl $ACC1, #4 -017c 1fe0 mrr $AC1.M, $AR0 -017d 8100 clr $ACC0 -017e 00de 0362 lr $AC0.M, @0x0362 -0180 1474 lsr $ACC0, #-12 -0181 1f7e mrr $AX1.H, $AC0.M -0182 1f3c mrr $AX1.L, $AC0.L -0183 8f00 set40 -0184 1943 lrri $AR3, @$AR2 -0185 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 -0186 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0187 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0188 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0189 f200 madd $AX0.L, $AX0.H -018a fe00 movpz $ACC0 -018b 1c1f mrr $AR0, $AC1.M -018c 1943 lrri $AR3, @$AR2 -018d 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 -018e 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -018f 114e 0197 bloopi #0x4e, 0x0197 -0191 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0192 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0193 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M -0194 1c1f mrr $AR0, $AC1.M -0195 1943 lrri $AR3, @$AR2 -0196 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 -0197 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 -0198 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -0199 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 -019a f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M -019b fe00 movpz $ACC0 -019c 1b3e srri @$AR1, $AC0.M -019d 8b00 m0 -019e 8e00 set16 -019f 00fe 041b sr @0x041b, $AC0.M -01a1 1c1f mrr $AR0, $AC1.M -01a2 150c lsl $ACC1, #12 -01a3 0340 0fff andi $AC1.M, #0x0fff -01a5 00ff 0418 sr @0x0418, $AC1.M -01a7 0083 0424 lri $AR3, #0x0424 -01a9 191e lrri $AC0.M, @$AR0 -01aa 191f lrri $AC1.M, @$AR0 -01ab 80a0 nx'ls : $AX0.H, $AC0.M -01ac 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M -01ad 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M -01ae 1b7f srri @$AR3, $AC1.M -01af 02df ret -} - -{ -01b0 1fe0 mrr $AC1.M, $AR0 -01b1 1c1f mrr $AR0, $AC1.M -01b2 1128 01b9 bloopi #0x28, 0x01b9 -01b4 4b70 addax'l $ACC1, $AX1 : $AC0.M, @$AR0 -01b5 1b3e srri @$AR1, $AC0.M -01b6 1c1f mrr $AR0, $AC1.M -01b7 4b70 addax'l $ACC1, $AX1 : $AC0.M, @$AR0 -01b8 1b3e srri @$AR1, $AC0.M -01b9 1c1f mrr $AR0, $AC1.M -01ba 029f 019f jmp 0x019f -} - -{ -01bc 8a00 m2 -01bd 0088 0007 lri $WR0, #0x0007 -01bf 1150 01cc bloopi #0x50, 0x01cc -{ - 01c1 1c61 mrr $AR3, $AR1 - 01c2 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 01c3 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c4 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c5 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c6 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c7 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c8 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01c9 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01ca f200 madd $AX0.L, $AX0.H - 01cb fe00 movpz $ACC0 - 01cc 1b3e srri @$AR1, $AC0.M -} -01cd 0088 ffff lri $WR0, #0xffff -01cf 8b00 m0 -01d0 02df ret -} - -{ -01d1 0088 0003 lri $WR0, #0x0003 -01d3 0085 0000 lri $IX1, #0x0000 -01d5 0087 0000 lri $IX3, #0x0000 -01d7 1fc2 mrr $AC0.M, $AR2 -01d8 195b lrri $AX1.H, @$AR2 -01d9 1959 lrri $AX1.L, @$AR2 -01da 195f lrri $AC1.M, @$AR2 -01db 195a lrri $AX0.H, @$AR2 -01dc 1c5e mrr $AR2, $AC0.M -01dd 1fda mrr $AC0.M, $AX0.H -01de 1c61 mrr $AR3, $AR1 -01df 8a00 m2 -01e0 8f00 set40 -01e1 191a lrri $AX0.H, @$AR0 -01e2 b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 -01e3 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 -01e4 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 -01e5 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 -01e6 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 -01e7 1127 01f2 bloopi #0x27, 0x01f2 -{ - 01e9 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 01ea 197e lrri $AC0.M, @$AR3 - 01eb e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 01ec eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 01ed bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 01ee e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 01ef 197f lrri $AC1.M, @$AR3 - 01f0 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 01f1 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 01f2 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 -} -01f3 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M -01f4 197e lrri $AC0.M, @$AR3 -01f5 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 -01f6 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 -01f7 bf00 mulxmv $AX0.H, $AX1.H, $ACC1 -01f8 1bff srrn @$AR3, $AC1.M -01f9 197f lrri $AC1.M, @$AR3 -01fa 8e00 set16 -01fb 8b00 m0 -01fc 0088 ffff lri $WR0, #0xffff -01fe 1b5b srri @$AR2, $AX1.H -01ff 1b59 srri @$AR2, $AX1.L -0200 1b5f srri @$AR2, $AC1.M -0201 1b5e srri @$AR2, $AC0.M -0202 02df ret -} - -{ -0203 0080 0346 lri $AR0, #0x0346 -0205 02bf 0051 call 0x0051 -0207 02bf 0051 call 0x0051 -0209 0081 0346 lri $AR1, #0x0346 -020b 009f 0580 lri $AC1.M, #0x0580 -020d 0080 0080 lri $AR0, #0x0080 -020f 02bf 007c call 0x007c -0211 0081 0348 lri $AR1, #0x0348 -0213 009f 0c00 lri $AC1.M, #0x0c00 -0215 0080 0080 lri $AR0, #0x0080 -0217 02bf 007c call 0x007c -0219 0080 0c00 lri $AR0, #0x0c00 -021b 0081 0580 lri $AR1, #0x0580 -021d 02bf 01d1 call 0x01d1 -021f 0081 0346 lri $AR1, #0x0346 -0221 009f 0580 lri $AC1.M, #0x0580 -0223 0080 0080 lri $AR0, #0x0080 -0225 02bf 0089 call 0x0089 -0227 0081 0348 lri $AR1, #0x0348 -0229 009f 0c00 lri $AC1.M, #0x0c00 -022b 0080 0080 lri $AR0, #0x0080 -022d 02bf 0089 call 0x0089 -022f 029f 0049 jmp 0x0049 -} - -void 0231_FormatAudioSynths(format AC0.M) -{ -0231 8100 clr $ACC0 -0232 1f5e mrr $AX0.H, $AC0.M -0233 00d8 0402 lr $AX0.L, @0x0402 -0235 00dc 0418 lr $AC0.L, @0x0418 -0237 0080 0520 lri $AR0, #0x0520 -0239 00df 0440 lr $AC1.M, @0x0440 -023b 1501 lsl $ACC1, #1 -023c 0340 007e andi $AC1.M, #0x007e -023e 0300 0246 addi $AC1.M, #0x0246 -0240 1c5f mrr $AR2, $AC1.M -0241 175f callr $AR2 // call 0x0246 -0242 00fc 0418 sr @0x0418, $AC0.L -0244 029f 04e7 jmp 0x04e7 // dummy -0246 029f 0257 jmp 0x0257 // 0x0 - Synth0 -0248 029f 028f jmp 0x028f // 0x1 - Synth1 -024a 029f 0277 jmp 0x0277 // 0x2 - Synth2 -024c 029f 0267 jmp 0x0267 // 0x3 - Synth3 -024e 029f 0292 jmp 0x0292 // 0x4 - Synth4 -0250 029f 0256 jmp 0x0256 // 0x5 - dummy -0252 029f 02b1 jmp 0x02b1 // 0x6 - Synth6 -0254 029f 02ae jmp 0x02ae // 0x7 - Synth7 -0256 02df ret -} - -void 0257_Synth0() -{ -0257 1401 lsl $ACC0, #1 -0258 009b c000 lri $AX1.H, #0xc000 -025a 0099 4000 lri $AX1.L, #0x4000 -025c 1150 0264 bloopi #0x50, 0x0264 -{ - 025e 02c0 0001 andcf $AC0.M, #0x0001 - 0260 027c iflnz - 0261 1b1b srri @$AR0, $AX1.H - 0262 027d iflz - 0263 1b19 srri @$AR0, $AX1.L - 0264 4800 addax $ACC0, $AX0 -} -0265 147f lsr $ACC0, #-1 -0266 02df ret -} - -void 0267_Synth3() -{ -0267 1401 lsl $ACC0, #1 -0268 009b c000 lri $AX1.H, #0xc000 -026a 0099 4000 lri $AX1.L, #0x4000 -026c 1150 0274 bloopi #0x50, 0x0274 -{ - 026e 02c0 0003 andcf $AC0.M, #0x0003 - 0270 027c iflnz - 0271 1b1b srri @$AR0, $AX1.H - 0272 027d iflz - 0273 1b19 srri @$AR0, $AX1.L - 0274 4800 addax $ACC0, $AX0 -} -0275 147f lsr $ACC0, #-1 -0276 02df ret -} - -void 0277_Synth2() -{ -0277 1401 lsl $ACC0, #1 -0278 0081 0ca0 lri $AR1, #0x0ca0 -027a 009b c000 lri $AX1.H, #0xc000 -027c 0099 4000 lri $AX1.L, #0x4000 -027e 8900 clr $ACC1 -027f 0082 0000 lri $AR2, #0x0000 -0281 1150 028c bloopi #0x50, 0x028c -{ - 0283 02c0 0001 andcf $AC0.M, #0x0001 - 0285 027c iflnz - 0286 1b1b srri @$AR0, $AX1.H - 0287 027d iflz - 0288 1b19 srri @$AR0, $AX1.L - 0289 183d lrr $AC1.L, @$AR1 - 028a 4900 addax $ACC1, $AX0 - 028b 1fe2 mrr $AC1.M, $AR2 - 028c 4c39 add's $ACC0, $ACC1 : @$AR1, $AC1.M -} -028d 147f lsr $ACC0, #-1 -028e 02df ret -} - -void 028f_Synth1() -{ -028f 1050 loopi #0x50 - 0290 4820 addax's $ACC0, $AX0 : @$AR0, $AC0.L -0291 02df ret -} - -void 0292_Synth4() -{ -0292 0082 0140 lri $AR2, #0x0140 -0294 008a 003f lri $WR2, #0x003f -0296 0086 0000 lri $IX2, #0x0000 -0298 1406 lsl $ACC0, #6 -0299 8900 clr $ACC1 -029a 1fb8 mrr $AC1.L, $AX0.L -029b 1506 lsl $ACC1, #6 -029c 009b 003f lri $AX1.H, #0x003f -029e 009a 0000 lri $AX0.H, #0x0000 -02a0 3600 andr $AC0.M, $AX1.H -02a1 1cde mrr $IX2, $AC0.M -02a2 001a addarn $AR2, $IX2 -02a3 3400 andr $AC0.M, $AX0.H -02a4 1150 02aa bloopi #0x50, 0x02aa -{ - 02a6 4c00 add $ACC0, $ACC1 - 02a7 364a andr'l $AC0.M, $AX1.H : $AX1.L, @$AR2 - 02a8 1cde mrr $IX2, $AC0.M - 02a9 340e andr'nr $AC0.M, $AX0.H : $AR2 - 02aa 1b19 srri @$AR0, $AX1.L -} -02ab 1fc2 mrr $AC0.M, $AR2 -02ac 147a lsr $ACC0, #-6 -02ad 02df ret -} - -void 02b1_Synth7() -{ -02ae 1050 loopi #0x50 - 02af 1b18 srri @$AR0, $AX0.L -02b0 02df ret -} - -void 02b1_Synth6() -{ -02b1 0083 0000 lri $AR3, #0x0000 -02b3 140f lsl $ACC0, #15 -02b4 4853 addax'l $ACC0, $AX0 : $AX0.H, @$AR3 -02b5 1114 02ba bloopi #0x14, 0x02ba -{ - 02b7 48a2 addax'sl $ACC0, $AX0 : $AC0.M, $AX0.H - 02b8 48a2 addax'sl $ACC0, $AX0 : $AC0.M, $AX0.H - 02b9 48a2 addax'sl $ACC0, $AX0 : $AC0.M, $AX0.H - 02ba 48a2 addax'sl $ACC0, $AX0 : $AC0.M, $AX0.H -} -02bb 146f lsr $ACC0, #-17 -02bc 02df ret -} - -{ -02bd 0080 0380 lri $AR0, #0x0380 -02bf 02bf 0051 call 0x0051 -02c1 02bf 0051 call 0x0051 -02c3 02bf 0051 call 0x0051 -02c5 02bf 0051 call 0x0051 -02c7 0081 0382 lri $AR1, #0x0382 -02c9 009f 0000 lri $AC1.M, #0x0000 -02cb 0080 0200 lri $AR0, #0x0200 -02cd 02bf 007c call 0x007c -02cf 0081 0384 lri $AR1, #0x0384 -02d1 009f 0300 lri $AC1.M, #0x0300 -02d3 0080 0020 lri $AR0, #0x0020 -02d5 02bf 007c call 0x007c -02d7 02bf 0351 call 0x0351 -02d9 00de 0345 lr $AC0.M, @0x0345 -02db 00fe 0342 sr @0x0342, $AC0.M -02dd 029f 0049 jmp 0x0049 -} - -{ -02df 00de 0344 lr $AC0.M, @0x0344 -02e1 1404 lsl $ACC0, #4 -02e2 0200 03a8 addi $AC0.M, #0x03a8 -02e4 1c1e mrr $AR0, $AC0.M -02e5 02bf 0051 call 0x0051 -02e7 02bf 0051 call 0x0051 -02e9 02bf 0051 call 0x0051 -02eb 00de 0345 lr $AC0.M, @0x0345 -02ed 1b1e srri @$AR0, $AC0.M -02ee 00de 0344 lr $AC0.M, @0x0344 -02f0 0200 03a4 addi $AC0.M, #0x03a4 -02f2 1c1e mrr $AR0, $AC0.M -02f3 8100 clr $ACC0 -02f4 1b1e srri @$AR0, $AC0.M -02f5 02df ret -} - -{ -02f6 00de 0344 lr $AC0.M, @0x0344 -02f8 1404 lsl $ACC0, #4 -02f9 0200 03b0 addi $AC0.M, #0x03b0 -02fb 1c1e mrr $AR0, $AC0.M -02fc 02bf 0051 call 0x0051 -02fe 02bf 0051 call 0x0051 -0300 02bf 0051 call 0x0051 -0302 02bf 0051 call 0x0051 -0304 02df ret -} - -{ -0305 0081 034c lri $AR1, #0x034c -0307 009f 0400 lri $AC1.M, #0x0400 -0309 0080 0080 lri $AR0, #0x0080 -030b 02bf 007c call 0x007c -030d 02df ret -} - -{ -030e 0081 034c lri $AR1, #0x034c -0310 009f 0a00 lri $AC1.M, #0x0a00 -0312 0080 0004 lri $AR0, #0x0004 -0314 02bf 00a5 call 00a5_WaitForDMAend() -0316 02bf 007c call 0x007c -0318 0081 034c lri $AR1, #0x034c -031a 009f 0400 lri $AC1.M, #0x0400 -031c 0080 0080 lri $AR0, #0x0080 -031e 02bf 0095 call 0x0095 -0320 02df ret -} - -{ -0321 0081 034c lri $AR1, #0x034c -0323 009f 0400 lri $AC1.M, #0x0400 -0325 0080 0040 lri $AR0, #0x0040 -0327 0081 034c lri $AR1, #0x034c -0329 193e lrri $AC0.M, @$AR1 -032a 193c lrri $AC0.L, @$AR1 -032b 0098 0000 lri $AX0.L, #0x0000 -032d 7000 addaxl $ACC0, $AX0.L -032e 02bf 008b call 0x008b -0330 02df ret -} - -{ -0331 191e lrri $AC0.M, @$AR0 -0332 191a lrri $AX0.H, @$AR0 -0333 005f loop $AC1.M -0334 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M -0335 1b7e srri @$AR3, $AC0.M -0336 1b7a srri @$AR3, $AX0.H -0337 02df ret -} - -{ -0338 191e lrri $AC0.M, @$AR0 -0339 191a lrri $AX0.H, @$AR0 -033a 007f 033f bloop $AC1.M, 0x033f -{ - 033c 32b2 not's $AC0.M : @$AR2, $AC0.M - 033d 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 033e 33ba not's $AC1.M : @$AR2, $AC1.M - 033f 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M -} -0340 0000 nop -0341 02df ret -} - -{ -0342 8a00 m2 -0343 157f lsr $ACC1, #-1 -0344 1c20 mrr $AR1, $AR0 -0345 1c03 mrr $AR0, $AR3 -0346 193a lrri $AX0.H, @$AR1 -0347 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 -0348 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 -0349 007f 034e bloop $AC1.M, 0x034e -{ - 034b 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 034c 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 034d 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 034e 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H -} -034f 8b00 m0 -0350 02df ret -} - -{ -0351 0083 ffa0 lri $AR3, #0xffa0 -0353 0080 0300 lri $AR0, #0x0300 -0355 009f 000e lri $AC1.M, #0x000e -0357 1108 035c bloopi #0x08, 0x035c -{ - 0359 191e lrri $AC0.M, @$AR0 - 035a 1b7e srri @$AR3, $AC0.M - 035b 191e lrri $AC0.M, @$AR0 - 035c 1b7e srri @$AR3, $AC0.M -} -035d 02df ret -} - -{ -035e 0080 0f40 lri $AR0, #0x0f40 -0360 0082 0d00 lri $AR2, #0x0d00 -0362 0083 0d60 lri $AR3, #0x0d60 -0364 009f 0028 lri $AC1.M, #0x0028 -0366 02bf 0338 call 0x0338 -0368 8900 clr $ACC1 -0369 009e 0050 lri $AC0.M, #0x0050 -036b 0080 0ca0 lri $AR0, #0x0ca0 -036d 005e loop $AC0.M - 036e 1b1f srri @$AR0, $AC1.M -036f 0080 0f40 lri $AR0, #0x0f40 -0371 005e loop $AC0.M - 0372 1b1f srri @$AR0, $AC1.M -0373 0080 0fa0 lri $AR0, #0x0fa0 -0375 005e loop $AC0.M - 0376 1b1f srri @$AR0, $AC1.M -0377 02df ret -} - -{ -0378 0080 0dc0 lri $AR0, #0x0dc0 -037a 009e 0180 lri $AC0.M, #0x0180 -037c 8900 clr $ACC1 -037d 005e loop $AC0.M - 037e 1b1f srri @$AR0, $AC1.M -037f 02df ret -} - -{ -0380 00c0 03a0 lr $AR0, @0x03a0 -0382 191a lrri $AX0.H, @$AR0 -0383 00df 03a1 lr $AC1.M, @0x03a1 -0385 009b 00a0 lri $AX1.H, #0x00a0 -0387 0081 0393 lri $AR1, #0x0393 -0389 18bc lrrd $AC0.L, @$AR1 -038a b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 -038b bc00 mulxac $AX0.H, $AX1.H, $ACC0 -038c 0080 0050 lri $AR0, #0x0050 -038e 0508 addis $AC1.M, #0x08 -038f 02bf 007e call 0x007e -0391 00de 0390 lr $AC0.M, @0x0390 -0393 02a0 0001 andf $AC0.M, #0x0001 -0395 029d 039f jlz 0x039f -0397 0080 0398 lri $AR0, #0x0398 -0399 009e 0008 lri $AC0.M, #0x0008 -039b 00c1 03a1 lr $AR1, @0x03a1 -039d 02bf 01bc call 0x01bc -039f 009f 0050 lri $AC1.M, #0x0050 -03a1 00c0 03a1 lr $AR0, @0x03a1 -03a3 8100 clr $ACC0 -03a4 00de 0394 lr $AC0.M, @0x0394 -03a6 b100 tst $ACC0 -03a7 0295 03ae jz 0x03ae -03a9 1c7e mrr $AR3, $AC0.M -03aa 00d8 0395 lr $AX0.L, @0x0395 -03ac 02bf 0342 call 0x0342 -03ae 009f 0050 lri $AC1.M, #0x0050 -03b0 00c0 03a1 lr $AR0, @0x03a1 -03b2 8100 clr $ACC0 -03b3 00de 0396 lr $AC0.M, @0x0396 -03b5 b100 tst $ACC0 -03b6 0295 03bd jz 0x03bd -03b8 1c7e mrr $AR3, $AC0.M -03b9 00d8 0397 lr $AX0.L, @0x0397 -03bb 02bf 0342 call 0x0342 -03bd 00de 0390 lr $AC0.M, @0x0390 -03bf 02a0 0002 andf $AC0.M, #0x0002 -03c1 02dd retlz -03c2 0080 0398 lri $AR0, #0x0398 -03c4 009e 0008 lri $AC0.M, #0x0008 -03c6 00c1 03a1 lr $AR1, @0x03a1 -03c8 02bf 01bc call 0x01bc -03ca 02df ret -} - -{ -03cb 009f 0dc0 lri $AC1.M, #0x0dc0 -03cd 00ff 03a1 sr @0x03a1, $AC1.M -03cf 009f 03a8 lri $AC1.M, #0x03a8 -03d1 00ff 03a2 sr @0x03a2, $AC1.M -03d3 009f 03a4 lri $AC1.M, #0x03a4 -03d5 00ff 03a0 sr @0x03a0, $AC1.M -03d7 1104 0400 bloopi #0x04, 0x0400 -{ - 03d9 00c0 03a2 lr $AR0, @0x03a2 - 03db 0083 0390 lri $AR3, #0x0390 - 03dd 009f 000e lri $AC1.M, #0x000e - 03df 02bf 0331 call 0x0331 - 03e1 00da 0390 lr $AX0.H, @0x0390 - 03e3 8600 tstaxh $AX0.H - 03e4 0295 03f1 jz 0x03f1 - 03e6 00df 03a1 lr $AC1.M, @0x03a1 - 03e8 1c7f mrr $AR3, $AC1.M - 03e9 0550 addis $AC1.M, #0x50 - 03ea 1c1f mrr $AR0, $AC1.M - 03eb 009f 0006 lri $AC1.M, #0x0006 - 03ed 02bf 0331 call 0x0331 - 03ef 02bf 0380 call 0x0380 - 03f1 00de 03a2 lr $AC0.M, @0x03a2 - 03f3 0410 addis $AC0.M, #0x10 - 03f4 00fe 03a2 sr @0x03a2, $AC0.M - 03f6 00de 03a1 lr $AC0.M, @0x03a1 - 03f8 0460 addis $AC0.M, #0x60 - 03f9 00fe 03a1 sr @0x03a1, $AC0.M - 03fb 00de 03a0 lr $AC0.M, @0x03a0 - 03fd 7400 incm $AC0.M - 03fe 00fe 03a0 sr @0x03a0, $AC0.M - 0400 0000 nop -} -0401 02df ret -} - -{ -0402 00c0 03a0 lr $AR0, @0x03a0 -0404 181a lrr $AX0.H, @$AR0 -0405 8100 clr $ACC0 -0406 181e lrr $AC0.M, @$AR0 -0407 00db 0391 lr $AX1.H, @0x0391 -0409 7400 incm $AC0.M -040a d100 cmpar $ACC1, $AX0.H -040b 0270 ifge -040c 8100 clr $ACC0 -040d 1b1e srri @$AR0, $AC0.M -040e 00df 03a1 lr $AC1.M, @0x03a1 -0410 009b 00a0 lri $AX1.H, #0x00a0 -0412 0081 0393 lri $AR1, #0x0393 -0414 18bc lrrd $AC0.L, @$AR1 -0415 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 -0416 bc00 mulxac $AX0.H, $AX1.H, $ACC0 -0417 0080 0050 lri $AR0, #0x0050 -0419 02bf 008b call 0x008b -041b 02df ret -} - -{ -041c 009f 0dc0 lri $AC1.M, #0x0dc0 -041e 00ff 03a1 sr @0x03a1, $AC1.M -0420 009f 03a8 lri $AC1.M, #0x03a8 -0422 00ff 03a2 sr @0x03a2, $AC1.M -0424 009f 03a4 lri $AC1.M, #0x03a4 -0426 00ff 03a0 sr @0x03a0, $AC1.M -0428 1104 0448 bloopi #0x04, 0x0448 -{ - 042a 00c0 03a2 lr $AR0, @0x03a2 - 042c 0083 0390 lri $AR3, #0x0390 - 042e 009f 000e lri $AC1.M, #0x000e - 0430 02bf 0331 call 0x0331 - 0432 00da 0390 lr $AX0.H, @0x0390 - 0434 8600 tstaxh $AX0.H - 0435 0295 0439 jz 0x0439 - 0437 02bf 0402 call 0x0402 - 0439 00de 03a2 lr $AC0.M, @0x03a2 - 043b 0410 addis $AC0.M, #0x10 - 043c 00fe 03a2 sr @0x03a2, $AC0.M - 043e 00de 03a1 lr $AC0.M, @0x03a1 - 0440 0460 addis $AC0.M, #0x60 - 0441 00fe 03a1 sr @0x03a1, $AC0.M - 0443 00de 03a0 lr $AC0.M, @0x03a0 - 0445 7400 incm $AC0.M - 0446 00fe 03a0 sr @0x03a0, $AC0.M - 0448 0000 nop -} -0449 02df ret -} - -{ -044a 0081 0386 lri $AR1, #0x0386 -044c 009f 03a8 lri $AC1.M, #0x03a8 -044e 0080 0040 lri $AR0, #0x0040 -0450 02bf 007c call 0x007c -0452 02df ret -} - -{ -0453 191e lrri $AC0.M, @$AR0 -0454 189c lrrd $AC0.L, @$AR0 -0455 4800 addax $ACC0, $AX0 -0456 1b1e srri @$AR0, $AC0.M -0457 1b1c srri @$AR0, $AC0.L -0458 02df ret -0459 8100 clr $ACC0 -045a 26fe lrs $AC0.M, @CMBH -045b 02c0 8000 andcf $AC0.M, #0x8000 -045d 029c 045a jlnz 0x045a -045f 26ff lrs $AC0.M, @CMBL -0460 02df ret -} - -{ -0461 0080 0388 lri $AR0, #0x0388 -0463 0081 0051 lri $AR1, #0x0051 -0465 173f callr $AR1 // call 0x0051 -0466 00de 0344 lr $AC0.M, @0x0344 -0468 00fe 0341 sr @0x0341, $AC0.M -046a 00de 0345 lr $AC0.M, @0x0345 -046c 00fe 038e sr @0x038e, $AC0.M -046e 173f callr $AR1 // call 0x0051 -046f 02df ret -} - -{ -0470 02bf 0461 call 0x0461 -0472 009e 8000 lri $AC0.M, #0x8000 -0474 00dc 0341 lr $AC0.L, @0x0341 -0476 02bf 005a call 005a_SendMail(AC0.M,AC0.L) // 0x8000???? -0478 8100 clr $ACC0 -0479 00fe 0355 sr @0x0355, $AC0.M -047b 02bf 044a call 0x044a -047d 00de 0341 lr $AC0.M, @0x0341 -047f 007e 056c bloop $AC0.M, 0x056c -{ - 0481 02bf 035e call 0x035e - 0483 02bf 03cb call 0x03cb - 0485 02bf 0459 call 0x0459 - 0487 8100 clr $ACC0 - 0488 00fe 0354 sr @0x0354, $AC0.M - 048a 00de 0342 lr $AC0.M, @0x0342 - 048c 007e 0538 bloop $AC0.M, 0x0538 - { - 048e 00d8 0354 lr $AX0.L, @0x0354 - 0490 009a 0100 lri $AX0.H, #0x0100 - 0492 8100 clr $ACC0 - 0493 00de 0380 lr $AC0.M, @0x0380 - 0495 00dc 0381 lr $AC0.L, @0x0381 - 0497 9000 mul $AX0.L, $AX0.H - 0498 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0499 00fe 034c sr @0x034c, $AC0.M - 049b 00fc 034d sr @0x034d, $AC0.L - 049d 02bf 0305 call 0x0305 - 049f 00da 0400 lr $AX0.H, @0x0400 - 04a1 8600 tstaxh $AX0.H - 04a2 0295 0533 jz 0x0533 - 04a4 00da 0401 lr $AX0.H, @0x0401 - 04a6 8600 tstaxh $AX0.H - 04a7 0294 0533 jnz 0x0533 - 04a9 00da 0406 lr $AX0.H, @0x0406 - 04ab 8600 tstaxh $AX0.H - 04ac 0294 0930 jnz 0x0930 - 04ae 8100 clr $ACC0 - 04af 00de 0440 lr $AC0.M, @0x0440 - 04b1 0607 cmpis $AC0.M, #0x07 // format 0x7 or less (Synths) - 04b2 0293 0231 jle 0x0231 - 04b4 0620 cmpis $AC0.M, #0x20 // format 0x20 - 04b5 0295 079e jz 0x079e - 04b7 0621 cmpis $AC0.M, #0x21 // format 0x21 - 04b8 0295 07a7 jz 0x07a7 - 04ba 00d8 0402 lr $AX0.L, @0x0402 - 04bc 8100 clr $ACC0 - 04bd 8900 clr $ACC1 - 04be 00dc 0418 lr $AC0.L, @0x0418 - 04c0 8d00 set15 - 04c1 0099 0050 lri $AX1.L, #0x0050 - 04c3 a000 mulx $AX0.L, $AX1.L - 04c4 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 04c5 1404 lsl $ACC0, #4 - 04c6 8c00 clr15 - 04c7 1ffe mrr $AC1.M, $AC0.M - 04c8 0083 0580 lri $AR3, #0x0580 - 04ca 00da 0441 lr $AX0.H, @0x0441 - 04cc 8600 tstaxh $AX0.H - 04cd 0295 04dd jz 0x04dd - 04cf 00da 0449 lr $AX0.H, @0x0449 - 04d1 8100 clr $ACC0 - 04d2 00de 044b lr $AC0.M, @0x044b - 04d4 3800 orr $AC0.M, $AX0.H - 04d5 0240 000f andi $AC0.M, #0x000f - 04d7 0295 04dd jz 0x04dd - 04d9 02bf 06a6 call 0x06a6 - 04db 029f 04df jmp 0x04df - 04dd 02bf 0837 call 0x0837 - //RAW21-jmp - 04df 0080 0580 lri $AR0, #0x0580 - 04e1 0081 0520 lri $AR1, #0x0520 - 04e3 0099 0000 lri $AX1.L, #0x0000 - 04e5 02bf 013b call 0x013b - //RAW20-jmp - 04e7 0080 0450 lri $AR0, #0x0450 - 04e9 0081 0520 lri $AR1, #0x0520 - 04eb 0082 0428 lri $AR2, #0x0428 - 04ed 0083 0453 lri $AR3, #0x0453 - 04ef 18fa lrrd $AX0.H, @$AR3 - 04f0 8600 tstaxh $AX0.H - 04f1 0294 0501 jnz 0x0501 - 04f3 18fa lrrd $AX0.H, @$AR3 - 04f4 8600 tstaxh $AX0.H - 04f5 0294 0501 jnz 0x0501 - 04f7 18fa lrrd $AX0.H, @$AR3 - 04f8 8600 tstaxh $AX0.H - 04f9 0294 0501 jnz 0x0501 - 04fb 8100 clr $ACC0 - 04fc 18fe lrrd $AC0.M, @$AR3 - 04fd 0280 7fff cmpi $AC0.M, #0x7fff - 04ff 0295 0505 jz 0x0505 - 0501 02bf 01d1 call 0x01d1 - 0503 029f 0505 jmp 0x0505 - 0505 8100 clr $ACC0 - 0506 1c9e mrr $IX0, $AC0.M - 0507 1cde mrr $IX2, $AC0.M - 0508 7400 incm $AC0.M - 0509 1cfe mrr $IX3, $AC0.M - 050a 8f00 set40 - 050b 0086 0002 lri $IX2, #0x0002 - 050d 0082 0408 lri $AR2, #0x0408 - 050f 1104 052f bloopi #0x04, 0x052f - { - 0511 8100 clr $ACC0 - 0512 195e lrri $AC0.M, @$AR2 - 0513 1200 sbclr #0x00 - 0514 b100 tst $ACC0 - 0515 0275 ifz - 0516 1300 sbset #0x00 - 0517 1c7e mrr $AR3, $AC0.M - 0518 195e lrri $AC0.M, @$AR2 - 0519 14fa asr $ACC0, #-6 - 051a 1f5e mrr $AX0.H, $AC0.M - 051b 1f1c mrr $AX0.L, $AC0.L - 051c 185f lrr $AC1.M, @$AR2 - 051d 0080 0520 lri $AR0, #0x0520 - 051f 029d 0523 jlz 0x0523 - 0521 02bf 011e call 0x011e - 0523 1b5f srri @$AR2, $AC1.M - 0524 8100 clr $ACC0 - 0525 185e lrr $AC0.M, @$AR2 - 0526 000e xar $AR2 - //; *** UNKNOWN OPCODE *** - // 0xc/0xd/0xe/0xf is one opcode where last 2 bits define target $AR? reg - // (new value is based on orig $AR? and %WR? reg value = unknown) - 0527 b100 tst $ACC0 - 0528 0274 ifnz - 0529 7800 decm $AC0.M - 052a b100 tst $ACC0 - 052b 8900 clr $ACC1 - 052c 0275 ifz - 052d 1a5f srr @$AR2, $AC1.M - 052e 001a addarn $AR2, $IX2 - 052f 1b5e srri @$AR2, $AC0.M - } - 0530 8e00 set16 - 0531 02bf 0321 call 0x0321 - 0533 00de 0354 lr $AC0.M, @0x0354 - 0535 7400 incm $AC0.M - 0536 00fe 0354 sr @0x0354, $AC0.M - 0538 0000 nop - } - 0539 16fb 0001 si @DIRQ, #0x0001 - 053b 0083 0d00 lri $AR3, #0x0d00 - 053d 02bf 012a call 0x012a - 053f 0081 0388 lri $AR1, #0x0388 - 0541 009f 0d00 lri $AC1.M, #0x0d00 - 0543 0080 0050 lri $AR0, #0x0050 - 0545 02bf 0089 call 0x0089 - 0547 0080 0fa0 lri $AR0, #0x0fa0 - 0549 0083 0d60 lri $AR3, #0x0d60 - 054b 009f 0050 lri $AC1.M, #0x0050 - 054d 0098 8000 lri $AX0.L, #0x8000 - 054f 02bf 0342 call 0x0342 - 0551 0083 0d60 lri $AR3, #0x0d60 - 0553 02bf 012a call 0x012a - 0555 0081 038a lri $AR1, #0x038a - 0557 009f 0d60 lri $AC1.M, #0x0d60 - 0559 0080 0050 lri $AR0, #0x0050 - 055b 02bf 0089 call 0x0089 - 055d 009a 0000 lri $AX0.H, #0x0000 - 055f 0098 00a0 lri $AX0.L, #0x00a0 - 0561 0080 0388 lri $AR0, #0x0388 - 0563 02bf 0453 call 0x0453 - 0565 0080 038a lri $AR0, #0x038a - 0567 02bf 0453 call 0x0453 - 0569 02bf 041c call 0x041c - 056b 0000 nop - 056c 0000 nop -} -056d 029f 0031 jmp 0x0031 -} - -{ -056f 0080 0346 lri $AR0, #0x0346 -0571 02bf 0051 call 0x0051 -0573 02bf 0051 call 0x0051 -0575 0081 0346 lri $AR1, #0x0346 -0577 193e lrri $AC0.M, @$AR1 -0578 193c lrri $AC0.L, @$AR1 -0579 009f 0400 lri $AC1.M, #0x0400 -057b 00c0 0345 lr $AR0, @0x0345 -057d 02bf 007e call 0x007e -057f 0081 0348 lri $AR1, #0x0348 -0581 193e lrri $AC0.M, @$AR1 -0582 193c lrri $AC0.L, @$AR1 -0583 009f 0800 lri $AC1.M, #0x0800 -0585 00c0 0345 lr $AR0, @0x0345 -0587 02bf 007e call 0x007e -0589 0081 0346 lri $AR1, #0x0346 -058b 193e lrri $AC0.M, @$AR1 -058c 193c lrri $AC0.L, @$AR1 -058d 009f 0800 lri $AC1.M, #0x0800 -058f 00c0 0345 lr $AR0, @0x0345 -0591 02bf 008b call 0x008b -0593 0081 0348 lri $AR1, #0x0348 -0595 193e lrri $AC0.M, @$AR1 -0596 193c lrri $AC0.L, @$AR1 -0597 009f 0400 lri $AC1.M, #0x0400 -0599 00c0 0345 lr $AR0, @0x0345 -059b 02bf 008b call 0x008b -059d 029f 0049 jmp 0x0049 -} - -{ -059f 0080 0346 lri $AR0, #0x0346 -05a1 02bf 0051 call 0x0051 -05a3 02bf 0051 call 0x0051 -05a5 0081 0346 lri $AR1, #0x0346 -05a7 193e lrri $AC0.M, @$AR1 -05a8 193c lrri $AC0.L, @$AR1 -05a9 009f 0400 lri $AC1.M, #0x0400 -05ab 00c0 0345 lr $AR0, @0x0345 -05ad 02bf 007e call 0x007e -05af 0081 0348 lri $AR1, #0x0348 -05b1 193e lrri $AC0.M, @$AR1 -05b2 193c lrri $AC0.L, @$AR1 -05b3 009f 0400 lri $AC1.M, #0x0400 -05b5 00c0 0345 lr $AR0, @0x0345 -05b7 02bf 008b call 0x008b -05b9 029f 0049 jmp 0x0049 -} - -{ -05bb 0080 0346 lri $AR0, #0x0346 -05bd 02bf 0051 call 0x0051 -05bf 02bf 0051 call 0x0051 -05c1 0081 0346 lri $AR1, #0x0346 -05c3 193e lrri $AC0.M, @$AR1 -05c4 193c lrri $AC0.L, @$AR1 -05c5 009f 0400 lri $AC1.M, #0x0400 -05c7 00c0 0345 lr $AR0, @0x0345 -05c9 02bf 00ae call 0x00ae -05cb 0081 0348 lri $AR1, #0x0348 -05cd 193e lrri $AC0.M, @$AR1 -05ce 193c lrri $AC0.L, @$AR1 -05cf 009f 0400 lri $AC1.M, #0x0400 -05d1 00c0 0345 lr $AR0, @0x0345 -05d3 02bf 008b call 0x008b -05d5 029f 0049 jmp 0x0049 -} - -{ -05d7 0080 0346 lri $AR0, #0x0346 -05d9 02bf 0051 call 0x0051 -05db 02bf 0051 call 0x0051 -05dd 0081 0346 lri $AR1, #0x0346 -05df 193e lrri $AC0.M, @$AR1 -05e0 193c lrri $AC0.L, @$AR1 -05e1 009f 0400 lri $AC1.M, #0x0400 -05e3 00c0 0344 lr $AR0, @0x0344 -05e5 02bf 007e call 0x007e -05e7 0081 0348 lri $AR1, #0x0348 -05e9 193e lrri $AC0.M, @$AR1 -05ea 193c lrri $AC0.L, @$AR1 -05eb 009f 0800 lri $AC1.M, #0x0800 -05ed 00c0 0344 lr $AR0, @0x0344 -05ef 02bf 007e call 0x007e -05f1 0080 0400 lri $AR0, #0x0400 -05f3 0083 0800 lri $AR3, #0x0800 -05f5 0084 0000 lri $IX0, #0x0000 -05f7 00da 0345 lr $AX0.H, @0x0345 -05f9 00df 0344 lr $AC1.M, @0x0344 -05fb 8f00 set40 -05fc 197b lrri $AX1.H, @$AR3 -05fd b800 mulx $AX0.H, $AX1.H -05fe 197b lrri $AX1.H, @$AR3 -05ff 007f 0604 bloop $AC1.M, 0x0604 -0601 199e lrrn $AC0.M, @$AR0 -0602 bc00 mulxac $AX0.H, $AX1.H, $ACC0 -0603 80b2 nx'sl : $AC0.M, $AX1.H -0604 0000 nop -0605 8e00 set16 -0606 0081 0346 lri $AR1, #0x0346 -0608 193e lrri $AC0.M, @$AR1 -0609 193c lrri $AC0.L, @$AR1 -060a 009f 0400 lri $AC1.M, #0x0400 -060c 00c0 0344 lr $AR0, @0x0344 -060e 02bf 008b call 0x008b -0610 009e 8200 lri $AC0.M, #0x8200 -0612 00dc 0344 lr $AC0.L, @0x0344 -0614 02bf 005a call 005a_SendMail(AC0.M,AC0.L) // 0x8200???? -0616 029f 0031 jmp 0x0031 -} - -{ -0618 0080 0346 lri $AR0, #0x0346 -061a 02bf 0051 call 0x0051 -061c 0081 0346 lri $AR1, #0x0346 -061e 009f 0400 lri $AC1.M, #0x0400 -0620 00c0 0345 lr $AR0, @0x0345 -0622 02bf 007c call 0x007c -0624 02bf 8644 call 0x8644 // iROM!!!! -0626 029f 0049 jmp 0x0049 -} - -{ -0628 009e 0430 lri $AC0.M, #0x0430 -062a 2219 lrs $AX0.H, @0x0019 -062b 4400 addr $ACC0, $AX0.H -062c 1c1e mrr $AR0, $AC0.M -062d 1fda mrr $AC0.M, $AX0.H -062e 3280 not $AC0.M -062f 7400 incm $AC0.M -0630 221a lrs $AX0.H, @0x001a -0631 4400 addr $ACC0, $AX0.H -0632 0090 0000 lri $AC0.H, #0x0000 -0634 029f 0645 jmp 0x0645 -} - -{ -0636 009e 0430 lri $AC0.M, #0x0430 -0638 2219 lrs $AX0.H, @0x0019 -0639 4400 addr $ACC0, $AX0.H -063a 1c1e mrr $AR0, $AC0.M -063b 1fda mrr $AC0.M, $AX0.H -063c 3280 not $AC0.M -063d 7400 incm $AC0.M -063e 221a lrs $AX0.H, @0x001a -063f 4400 addr $ACC0, $AX0.H -0640 0090 0000 lri $AC0.H, #0x0000 -0642 8200 cmp -0643 0270 ifge -0644 1fdf mrr $AC0.M, $AC1.M -0645 1f3e mrr $AX1.L, $AC0.M -0646 02bf 0699 call 0x0699 -0648 261c lrs $AC0.M, @0x001c -0649 241d lrs $AC0.L, @0x001d -064a 7200 addaxl $ACC0, $AX1.L -064b 5300 subr $ACC1, $AX1.L -064c 2e1c srs @0x001c, $AC0.M -064d 2c1d srs @0x001d, $AC0.L -064e 02df ret -} - -{ -064f 8100 clr $ACC0 -0650 221c lrs $AX0.H, @0x001c -0651 201d lrs $AX0.L, @0x001d -0652 4800 addax $ACC0, $AX0 -0653 147c lsr $ACC0, #-4 -0654 2e1e srs @0x001e, $AC0.M -0655 2c1f srs @0x001f, $AC0.L -0656 2340 lrs $AX1.H, @0x0040 -0657 c814 mulc'mv $AC0.M, $AX1.H : $AX1.L, $AC0.L -0658 9e00 mulmv $AX1.L, $AX1.H, $ACC0 -0659 f000 lsl16 $ACC0 -065a 4e00 addp $ACC0 -065b 234c lrs $AX1.H, @0x004c -065c 214d lrs $AX1.L, @0x004d -065d 4a00 addax $ACC0, $AX1 -065e 2e20 srs @0x0020, $AC0.M -065f 2c21 srs @0x0021, $AC0.L -0660 1fd8 mrr $AC0.M, $AX0.L -0661 0240 000f andi $AC0.M, #0x000f -0663 2e19 srs @0x0019, $AC0.M -0664 264a lrs $AC0.M, @0x004a -0665 244b lrs $AC0.L, @0x004b -0666 5800 subax $ACC0, $AX0 -0667 2e22 srs @0x0022, $AC0.M -0668 2c23 srs @0x0023, $AC0.L -0669 02df ret -} - -{ -066a 221e lrs $AX0.H, @0x001e -066b 201f lrs $AX0.L, @0x001f -066c 8100 clr $ACC0 -066d 264a lrs $AC0.M, @0x004a -066e 244b lrs $AC0.L, @0x004b -066f 147c lsr $ACC0, #-4 -0670 5800 subax $ACC0, $AX0 -0671 0295 067a jz 0x067a -0673 02bf 06ec call 0x06ec -0675 0e10 lris $AC0.M, #0x10 -0676 2e1a srs @0x001a, $AC0.M -0677 8100 clr $ACC0 -0678 2e19 srs @0x0019, $AC0.M -0679 02df ret -} - -{ -067a 224a lrs $AX0.H, @0x004a -067b 204b lrs $AX0.L, @0x004b -067c 8100 clr $ACC0 -067d 261c lrs $AC0.M, @0x001c -067e 241d lrs $AC0.L, @0x001d -067f 5800 subax $ACC0, $AX0 -0680 0290 0687 jge 0x0687 -0682 02bf 06ec call 0x06ec -0684 2623 lrs $AC0.M, @0x0023 -0685 029f 0676 jmp 0x0676 -} - -{ -0687 2648 lrs $AC0.M, @0x0048 -0688 2449 lrs $AC0.L, @0x0049 -0689 2e1c srs @0x001c, $AC0.M -068a 2c1d srs @0x001d, $AC0.L -068b 0e10 lris $AC0.M, #0x10 -068c 2e1a srs @0x001a, $AC0.M -068d 02bf 064f call 0x064f -068f 2642 lrs $AC0.M, @0x0042 -0690 2e3f srs @0x003f, $AC0.M -0691 2643 lrs $AC0.M, @0x0043 -0692 2e3e srs @0x003e, $AC0.M -0693 8100 clr $ACC0 -0694 00fe 0362 sr @0x0362, $AC0.M -0696 02bf 06ec call 0x06ec -0698 02df ret -} - -{ -0699 b100 tst $ACC0 -069a 02d5 retz -069b 04fe addis $AC0.M, #0xfe -069c 1f1e mrr $AX0.L, $AC0.M -069d 191e lrri $AC0.M, @$AR0 -069e 0291 06a4 jl 0x06a4 -06a0 191a lrri $AX0.H, @$AR0 -06a1 0058 loop $AX0.L -06a2 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M -06a3 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M -06a4 1b7e srri @$AR3, $AC0.M -06a5 02df ret -} - -{ -06a6 0092 0004 lri $CR, #0x0004 -06a8 02bf 064f call 0x064f -06aa 8100 clr $ACC0 -06ab 00fe 0362 sr @0x0362, $AC0.M -06ad 8100 clr $ACC0 -06ae 2622 lrs $AC0.M, @0x0022 -06af 2423 lrs $AC0.L, @0x0023 -06b0 b100 tst $ACC0 -06b1 0294 06c3 jnz 0x06c3 -06b3 02bf 066a call 0x066a -06b5 2219 lrs $AX0.H, @0x0019 -06b6 8600 tstaxh $AX0.H -06b7 0294 06c0 jnz 0x06c0 -06b9 02bf 0636 call 0x0636 -06bb b900 tst $ACC1 -06bc 0295 06e9 jz 0x06e9 -06be 02bf 064f call 0x064f -06c0 8100 clr $ACC0 -06c1 2622 lrs $AC0.M, @0x0022 -06c2 2423 lrs $AC0.L, @0x0023 -06c3 1f1f mrr $AX0.L, $AC1.M -06c4 009a 0000 lri $AX0.H, #0x0000 -06c6 5800 subax $ACC0, $AX0 -06c7 0290 06d6 jge 0x06d6 -06c9 8100 clr $ACC0 -06ca 2619 lrs $AC0.M, @0x0019 -06cb b100 tst $ACC0 -06cc 0294 06d0 jnz 0x06d0 -06ce 02bf 066a call 0x066a -06d0 02bf 0628 call 0x0628 -06d2 02bf 064f call 0x064f -06d4 029f 06ad jmp 0x06ad -} - -{ -06d6 8100 clr $ACC0 -06d7 2619 lrs $AC0.M, @0x0019 -06d8 b100 tst $ACC0 -06d9 0294 06dd jnz 0x06dd -06db 02bf 066a call 0x066a -06dd 02bf 0636 call 0x0636 -06df b900 tst $ACC1 -06e0 0295 06e9 jz 0x06e9 -06e2 02bf 064f call 0x064f -06e4 029f 06d6 jmp 0x06d6 -} - -{ -06e6 8100 clr $ACC0 -06e7 005f loop $AC1.M -06e8 1b7e srri @$AR3, $AC0.M -06e9 0092 00ff lri $CR, #0x00ff -06eb 02df ret -} - -{ -06ec 00ff 0360 sr @0x0360, $AC1.M -06ee 00da 0362 lr $AX0.H, @0x0362 -06f0 8600 tstaxh $AX0.H -06f1 0294 06fe jnz 0x06fe -06f3 0a01 lris $AX0.H, #0x01 -06f4 00fa 0362 sr @0x0362, $AX0.H -06f6 2620 lrs $AC0.M, @0x0020 -06f7 2421 lrs $AC0.L, @0x0021 -06f8 009f 0005 lri $AC1.M, #0x0005 -06fa 02bf 0103 call 0x0103 -06fc 0092 0004 lri $CR, #0x0004 -06fe 0080 ffd3 lri $AR0, #0xffd3 -0700 0084 0000 lri $IX0, #0x0000 -0702 199e lrrn $AC0.M, @$AR0 -0703 1ffe mrr $AC1.M, $AC0.M -0704 1401 lsl $ACC0, #1 -0705 0240 001e andi $AC0.M, #0x001e -0707 0200 0300 addi $AC0.M, #0x0300 -0709 1c3e mrr $AR1, $AC0.M -070a 157c lsr $ACC1, #-4 -070b 0340 000f andi $AC1.M, #0x000f -070d 0a11 lris $AX0.H, #0x11 -070e 5500 subr $ACC1, $AX0.H -070f 009a 00f0 lri $AX0.H, #0x00f0 -0711 009b 000f lri $AX1.H, #0x000f -0713 0082 0370 lri $AR2, #0x0370 -0715 1998 lrrn $AX0.L, @$AR0 -0716 6000 movr $ACC0, $AX0.L -0717 1107 071e bloopi #0x07, 0x071e -{ - 0719 3400 andr $AC0.M, $AX0.H - 071a 1408 lsl $ACC0, #8 - 071b 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 071c 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 071d 140c lsl $ACC0, #12 - 071e 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M -} -071f 3400 andr $AC0.M, $AX0.H -0720 1408 lsl $ACC0, #8 -0721 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M -0722 3600 andr $AC0.M, $AX1.H -0723 140c lsl $ACC0, #12 -0724 1b5e srri @$AR2, $AC0.M -0725 8f00 set40 -0726 1f7f mrr $AX1.H, $AC1.M -0727 203e lrs $AX0.L, @0x003e -0728 273f lrs $AC1.M, @0x003f -0729 193a lrri $AX0.H, @$AR1 -072a 1939 lrri $AX1.L, @$AR1 -072b 0080 0370 lri $AR0, #0x0370 -072d 0081 0430 lri $AR1, #0x0430 -072f 1c80 mrr $IX0, $AR0 -0730 a000 mulx $AX0.L, $AX1.L -0731 ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 -0732 1108 073b bloopi #0x08, 0x073b -0734 3a93 asrnrx'mv $ACC0, $AX1.H : $AX0.L, $AC1.M -0735 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 -0736 1485 asl $ACC0, #5 -0737 e831 maddc's $AC0.M, $AX1.L : @$AR1, $AC0.M -0738 3b92 asrnrx'mv $ACC1, $AX1.H : $AX0.L, $AC0.M -0739 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 -073a 1585 asl $ACC1, #5 -073b ea39 maddc's $AC1.M, $AX1.L : @$AR1, $AC1.M -073c 8e00 set16 -073d 8900 clr $ACC1 -073e 00df 0360 lr $AC1.M, @0x0360 -0740 02df ret -} - -{ -0741 0080 0346 lri $AR0, #0x0346 -0743 02bf 0051 call 0x0051 -0745 8100 clr $ACC0 -0746 0080 0430 lri $AR0, #0x0430 -0748 1010 loopi #0x10 - 0749 1b1e srri @$AR0, $AC0.M -074a 00fe 0442 sr @0x0442, $AC0.M -074c 00fe 0443 sr @0x0443, $AC0.M -074e 009c 0000 lri $AC0.L, #0x0000 -0750 00fe 041c sr @0x041c, $AC0.M -0752 00fc 041d sr @0x041d, $AC0.L -0754 009e 0100 lri $AC0.M, #0x0100 -0756 009c f100 lri $AC0.L, #0xf100 -0758 00fe 044e sr @0x044e, $AC0.M -075a 00fc 044f sr @0x044f, $AC0.L -075c 009e 0040 lri $AC0.M, #0x0040 -075e 009c 0000 lri $AC0.L, #0x0000 -0760 00fe 044c sr @0x044c, $AC0.M -0762 00fc 044d sr @0x044d, $AC0.L -0764 009e 0009 lri $AC0.M, #0x0009 -0766 00fe 0440 sr @0x0440, $AC0.M -0768 009e 0010 lri $AC0.M, #0x0010 -076a 00fe 041a sr @0x041a, $AC0.M -076c 009e 0100 lri $AC0.M, #0x0100 -076e 009c f250 lri $AC0.L, #0xf250 -0770 00fe 044a sr @0x044a, $AC0.M -0772 00fc 044b sr @0x044b, $AC0.L -0774 009c 0000 lri $AC0.L, #0x0000 -0776 00fe 0448 sr @0x0448, $AC0.M -0778 00fc 0449 sr @0x0449, $AC0.L -077a 009e 0001 lri $AC0.M, #0x0001 -077c 00fe 0441 sr @0x0441, $AC0.M -077e 8900 clr $ACC1 -077f 00ff 0401 sr @0x0401, $AC1.M -0781 1180 079b bloopi #0x80, 0x079b -{ - 0783 0083 0580 lri $AR3, #0x0580 - 0785 009f 0100 lri $AC1.M, #0x0100 - 0787 02bf 06a6 call 0x06a6 - 0789 0081 0346 lri $AR1, #0x0346 - 078b 193e lrri $AC0.M, @$AR1 - 078c 18bc lrrd $AC0.L, @$AR1 - 078d 009f 0580 lri $AC1.M, #0x0580 - 078f 0080 0100 lri $AR0, #0x0100 - 0791 02bf 008b call 0x008b - 0793 0081 0346 lri $AR1, #0x0346 - 0795 193e lrri $AC0.M, @$AR1 - 0796 18bc lrrd $AC0.L, @$AR1 - 0797 0098 0200 lri $AX0.L, #0x0200 - 0799 7000 addaxl $ACC0, $AX0.L - 079a 1b3e srri @$AR1, $AC0.M - 079b 1abc srrd @$AR1, $AC0.L -} -079c 029f 0049 jmp 0x0049 -} - -void 079e_AudioFormatRAW20() -{ -079e 8900 clr $ACC1 -079f 009f 0050 lri $AC1.M, #0x0050 -07a1 0083 0520 lri $AR3, #0x0520 -07a3 02bf 07b9 call 0x07b9 -07a5 029f 04e7 jmp 0x04e7 -} - -void 07a7_AudioFormatRAW21() -{ -07a7 00d8 0402 lr $AX0.L, @0x0402 -07a9 8100 clr $ACC0 -07aa 8900 clr $ACC1 -07ab 00dc 0418 lr $AC0.L, @0x0418 -07ad 009a 0050 lri $AX0.H, #0x0050 -07af 9000 mul $AX0.L, $AX0.H -07b0 9400 mulac $AX0.L, $AX0.H, $ACC0 -07b1 1404 lsl $ACC0, #4 -07b2 1ffe mrr $AC1.M, $AC0.M -07b3 0083 0580 lri $AR3, #0x0580 -07b5 02bf 07b9 call 0x07b9 -07b7 029f 04df jmp 0x04df -} - -{ -07b9 0092 0004 lri $CR, #0x0004 -07bb 8100 clr $ACC0 -07bc 2622 lrs $AC0.M, @0x0022 -07bd 2423 lrs $AC0.L, @0x0023 -07be 1f1f mrr $AX0.L, $AC1.M -07bf 009a 0000 lri $AX0.H, #0x0000 -07c1 5800 subax $ACC0, $AX0 -07c2 0290 07d9 jge 0x07d9 -07c4 8900 clr $ACC1 -07c5 00c0 0423 lr $AR0, @0x0423 -07c7 02bf 07fe call 0x07fe -07c9 8100 clr $ACC0 -07ca 1fd8 mrr $AC0.M, $AX0.L -07cb 2223 lrs $AX0.H, @0x0023 -07cc 5400 subr $ACC0, $AX0.H -07cd 0007 dar $AR3 -07ce 1979 lrri $AX1.L, @$AR3 -07cf 005e loop $AC0.M -07d0 1b79 srri @$AR3, $AX1.L -07d1 009f 0001 lri $AC1.M, #0x0001 -07d3 2f01 srs @0x0001, $AC1.M -07d4 8900 clr $ACC1 -07d5 2f23 srs @0x0023, $AC1.M -07d6 0092 00ff lri $CR, #0x00ff -07d8 02df ret -} - -{ -07d9 2e22 srs @0x0022, $AC0.M -07da 2c23 srs @0x0023, $AC0.L -07db 8100 clr $ACC0 -07dc 8900 clr $ACC1 -07dd 264a lrs $AC0.M, @0x004a -07de 271c lrs $AC1.M, @0x001c -07df 5c00 sub $ACC0, $ACC1 -07e0 2e1e srs @0x001e, $AC0.M -07e1 5000 subr $ACC0, $AX0.L -07e2 0290 07f8 jge 0x07f8 -07e4 00c0 041e lr $AR0, @0x041e -07e6 02bf 07fe call 0x07fe -07e8 8100 clr $ACC0 -07e9 1fd8 mrr $AC0.M, $AX0.L -07ea 221e lrs $AX0.H, @0x001e -07eb 5400 subr $ACC0, $AX0.H -07ec 1c1e mrr $AR0, $AC0.M -07ed 8100 clr $ACC0 -07ee 2e1c srs @0x001c, $AC0.M -07ef 2648 lrs $AC0.M, @0x0048 -07f0 2449 lrs $AC0.L, @0x0049 -07f1 2e4c srs @0x004c, $AC0.M -07f2 2c4d srs @0x004d, $AC0.L -07f3 02bf 07fe call 0x07fe -07f5 0092 00ff lri $CR, #0x00ff -07f7 02df ret -} - -{ -07f8 1c18 mrr $AR0, $AX0.L -07f9 02bf 07fe call 0x07fe -07fb 0092 00ff lri $CR, #0x00ff -07fd 02df ret -} - -{ -07fe 8100 clr $ACC0 -07ff 1fc0 mrr $AC0.M, $AR0 -0800 b100 tst $ACC0 -0801 02d5 retz -0802 8900 clr $ACC1 -0803 271c lrs $AC1.M, @0x001c -0804 0340 0001 andi $AC1.M, #0x0001 -0806 009b 0000 lri $AX1.H, #0x0000 -0808 1f3f mrr $AX1.L, $AC1.M -0809 264c lrs $AC0.M, @0x004c -080a 244d lrs $AC0.L, @0x004d -080b 8900 clr $ACC1 -080c 251c lrs $AC1.L, @0x001c -080d 1501 lsl $ACC1, #1 -080e 4c00 add $ACC0, $ACC1 -080f 5a00 subax $ACC0, $AX1 -0810 5a00 subax $ACC0, $AX1 -0811 1c20 mrr $AR1, $AR0 -0812 1fe0 mrr $AC1.M, $AR0 -0813 0502 addis $AC1.M, #0x02 -0814 1c1f mrr $AR0, $AC1.M -0815 009f 0a00 lri $AC1.M, #0x0a00 -0817 0092 00ff lri $CR, #0x00ff -0819 02bf 007e call 0x007e -081b 0092 0004 lri $CR, #0x0004 -081d 271c lrs $AC1.M, @0x001c -081e 1f61 mrr $AX1.H, $AR1 -081f 4700 addr $ACC1, $AX1.H -0820 2f1c srs @0x001c, $AC1.M -0821 0080 0a00 lri $AR0, #0x0a00 -0823 8900 clr $ACC1 -0824 1ff9 mrr $AC1.M, $AX1.L -0825 b900 tst $ACC1 -0826 0274 ifnz -0827 0008 iar $AR0 -0828 8900 clr $ACC1 -0829 1fe1 mrr $AC1.M, $AR1 -082a 191e lrri $AC0.M, @$AR0 -082b 0701 cmpis $AC1.M, #0x01 -082c 0293 0835 jle 0x0835 -082e 191a lrri $AX0.H, @$AR0 -082f 05fe addis $AC1.M, #0xfe -0830 005f loop $AC1.M -0831 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M -0832 1b7e srri @$AR3, $AC0.M -0833 1b7a srri @$AR3, $AX0.H -0834 02df ret -} - -{ -0835 1b7e srri @$AR3, $AC0.M -0836 02df ret -} - -{ -0837 0092 0004 lri $CR, #0x0004 -0839 2201 lrs $AX0.H, @0x0001 -083a 8600 tstaxh $AX0.H -083b 0294 0868 jnz 0x0868 -083d 2204 lrs $AX0.H, @0x0004 -083e 8600 tstaxh $AX0.H -083f 02b4 08bc callnz 0x08bc -0841 2219 lrs $AX0.H, @0x0019 -0842 8600 tstaxh $AX0.H -0843 0295 085d jz 0x085d -0845 009e 0430 lri $AC0.M, #0x0430 -0847 4400 addr $ACC0, $AX0.H -0848 1c1e mrr $AR0, $AC0.M -0849 0e10 lris $AC0.M, #0x10 -084a 5400 subr $ACC0, $AX0.H -084b 1f7e mrr $AX1.H, $AC0.M -084c 02bf 0699 call 0x0699 -084e d900 cmpar $ACC1, $AX1.H -084f 0292 085c jg 0x085c -0851 0295 0858 jz 0x0858 -0853 2619 lrs $AC0.M, @0x0019 -0854 4c00 add $ACC0, $ACC1 -0855 2e19 srs @0x0019, $AC0.M -0856 029f 08b9 jmp 0x08b9 - -0858 8100 clr $ACC0 -0859 2e19 srs @0x0019, $AC0.M -085a 029f 08b9 jmp 0x08b9 - -085c 5700 subr $ACC1, $AX1.H -085d 8100 clr $ACC0 -085e 2605 lrs $AC0.M, @0x0005 -085f b100 tst $ACC0 -0860 0295 0879 jz 0x0879 -0862 8100 clr $ACC0 -0863 2e05 srs @0x0005, $AC0.M -0864 2241 lrs $AX0.H, @0x0041 -0865 8600 tstaxh $AX0.H -0866 0294 086f jnz 0x086f -0868 8100 clr $ACC0 -0869 005f loop $AC1.M -086a 1b7e srri @$AR3, $AC0.M -086b 7400 incm $AC0.M -086c 2e01 srs @0x0001, $AC0.M -086d 029f 08b9 jmp 0x08b9 - -086f 2648 lrs $AC0.M, @0x0048 -0870 2449 lrs $AC0.L, @0x0049 -0871 2e1c srs @0x001c, $AC0.M -0872 2c1d srs @0x001d, $AC0.L -0873 02bf 08c1 call 0x08c1 -0875 2642 lrs $AC0.M, @0x0042 -0876 2443 lrs $AC0.L, @0x0043 -0877 2e3f srs @0x003f, $AC0.M -0878 2c3e srs @0x003e, $AC0.L -0879 00ff 0360 sr @0x0360, $AC1.M -087b 2620 lrs $AC0.M, @0x0020 -087c 2421 lrs $AC0.L, @0x0021 -087d 009f 0005 lri $AC1.M, #0x0005 -087f 02bf 0103 call 0x0103 -0881 0092 0004 lri $CR, #0x0004 -0883 8900 clr $ACC1 -0884 00ff 0362 sr @0x0362, $AC1.M -0886 00df 0360 lr $AC1.M, @0x0360 -0888 02bf 08db call 0x08db -088a 8100 clr $ACC0 -088b 00de 0362 lr $AC0.M, @0x0362 -088d 2240 lrs $AX0.H, @0x0040 -088e 4400 addr $ACC0, $AX0.H -088f 00fe 0362 sr @0x0362, $AC0.M -0891 8100 clr $ACC0 -0892 2622 lrs $AC0.M, @0x0022 -0893 2423 lrs $AC0.L, @0x0023 -0894 0a01 lris $AX0.H, #0x01 -0895 0081 0405 lri $AR1, #0x0405 -0897 7a00 dec $ACC0 -0898 b100 tst $ACC0 -0899 0275 ifz -089a 1a3a srr @$AR1, $AX0.H -089b 2e22 srs @0x0022, $AC0.M -089c 2c23 srs @0x0023, $AC0.L -089d 0710 cmpis $AC1.M, #0x10 -089e 0293 08a7 jle 0x08a7 -08a0 05f0 addis $AC1.M, #0xf0 -08a1 2205 lrs $AX0.H, @0x0005 -08a2 8600 tstaxh $AX0.H -08a3 0294 0862 jnz 0x0862 -08a5 029f 0888 jmp 0x0888 -08a7 0275 ifz -08a8 8900 clr $ACC1 -08a9 2f19 srs @0x0019, $AC1.M -08aa 1fc3 mrr $AC0.M, $AR3 -08ab 04f0 addis $AC0.M, #0xf0 -08ac 1c1e mrr $AR0, $AC0.M -08ad 0083 0430 lri $AR3, #0x0430 -08af 0e10 lris $AC0.M, #0x10 -08b0 02bf 0699 call 0x0699 -08b2 2620 lrs $AC0.M, @0x0020 -08b3 2421 lrs $AC0.L, @0x0021 -08b4 00d8 0362 lr $AX0.L, @0x0362 -08b6 7000 addaxl $ACC0, $AX0.L -08b7 2c21 srs @0x0021, $AC0.L -08b8 2e20 srs @0x0020, $AC0.M -08b9 0092 00ff lri $CR, #0x00ff -08bb 02df ret -} - -{ -08bc 8100 clr $ACC0 -08bd 2e1c srs @0x001c, $AC0.M -08be 2e1d srs @0x001d, $AC0.M -08bf 2e3e srs @0x003e, $AC0.M -08c0 2e3f srs @0x003f, $AC0.M -08c1 231c lrs $AX1.H, @0x001c -08c2 211d lrs $AX1.L, @0x001d -08c3 264a lrs $AC0.M, @0x004a -08c4 244b lrs $AC0.L, @0x004b -08c5 5a00 subax $ACC0, $AX1 -08c6 147c lsr $ACC0, #-4 -08c7 2e22 srs @0x0022, $AC0.M -08c8 2c23 srs @0x0023, $AC0.L -08c9 261c lrs $AC0.M, @0x001c -08ca 241d lrs $AC0.L, @0x001d -08cb 147c lsr $ACC0, #-4 -08cc 2240 lrs $AX0.H, @0x0040 -08cd c010 mulc'mv $AC0.M, $AX0.H : $AX0.L, $AC0.L -08ce 9600 mulmv $AX0.L, $AX0.H, $ACC0 -08cf f000 lsl16 $ACC0 -08d0 4e00 addp $ACC0 -08d1 234c lrs $AX1.H, @0x004c -08d2 214d lrs $AX1.L, @0x004d -08d3 4a00 addax $ACC0, $AX1 -08d4 2e20 srs @0x0020, $AC0.M -08d5 2c21 srs @0x0021, $AC0.L -08d6 8100 clr $ACC0 -08d7 2e05 srs @0x0005, $AC0.M -08d8 2e19 srs @0x0019, $AC0.M -08d9 2e04 srs @0x0004, $AC0.M -08da 02df ret -} - -{ -08db 00ff 0360 sr @0x0360, $AC1.M -08dd 0080 ffd3 lri $AR0, #0xffd3 -08df 0084 0000 lri $IX0, #0x0000 -08e1 199e lrrn $AC0.M, @$AR0 -08e2 1ffe mrr $AC1.M, $AC0.M -08e3 1401 lsl $ACC0, #1 -08e4 0240 001e andi $AC0.M, #0x001e -08e6 0200 0300 addi $AC0.M, #0x0300 -08e8 1c3e mrr $AR1, $AC0.M -08e9 157c lsr $ACC1, #-4 -08ea 0340 000f andi $AC1.M, #0x000f -08ec 0a11 lris $AX0.H, #0x11 -08ed 5500 subr $ACC1, $AX0.H -08ee 009a 00f0 lri $AX0.H, #0x00f0 -08f0 009b 000f lri $AX1.H, #0x000f -08f2 0082 0370 lri $AR2, #0x0370 -08f4 1998 lrrn $AX0.L, @$AR0 -08f5 6000 movr $ACC0, $AX0.L -08f6 1107 08fd bloopi #0x07, 0x08fd -{ - 08f8 3400 andr $AC0.M, $AX0.H - 08f9 1408 lsl $ACC0, #8 - 08fa 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 08fb 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 08fc 140c lsl $ACC0, #12 - 08fd 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M -} -08fe 3400 andr $AC0.M, $AX0.H -08ff 1408 lsl $ACC0, #8 -0900 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M -0901 3600 andr $AC0.M, $AX1.H -0902 140c lsl $ACC0, #12 -0903 1b5e srri @$AR2, $AC0.M -0904 8f00 set40 -0905 1f7f mrr $AX1.H, $AC1.M -0906 203e lrs $AX0.L, @0x003e -0907 273f lrs $AC1.M, @0x003f -0908 193a lrri $AX0.H, @$AR1 -0909 1939 lrri $AX1.L, @$AR1 -090a 0080 0370 lri $AR0, #0x0370 -090c 1c80 mrr $IX0, $AR0 -090d a000 mulx $AX0.L, $AX1.L -090e ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 -090f 3a93 asrnrx'mv $ACC0, $AX1.H : $AX0.L, $AC1.M -0910 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 -0911 1485 asl $ACC0, #5 -0912 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M -0913 3b92 asrnrx'mv $ACC1, $AX1.H : $AX0.L, $AC0.M -0914 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 -0915 1585 asl $ACC1, #5 -0916 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M -0917 1106 0920 bloopi #0x06, 0x0920 -{ - 0919 3a93 asrnrx'mv $ACC0, $AX1.H : $AX0.L, $AC1.M - 091a a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 091b 1485 asl $ACC0, #5 - 091c e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 091d 3b92 asrnrx'mv $ACC1, $AX1.H : $AX0.L, $AC0.M - 091e a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 091f 1585 asl $ACC1, #5 - 0920 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M -} -0921 3a93 asrnrx'mv $ACC0, $AX1.H : $AX0.L, $AC1.M -0922 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 -0923 1485 asl $ACC0, #5 -0924 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M -0925 3b92 asrnrx'mv $ACC1, $AX1.H : $AX0.L, $AC0.M -0926 a500 mulxac $AX0.L, $AX1.L, $ACC1 -0927 1585 asl $ACC1, #5 -0928 1b7f srri @$AR3, $AC1.M -0929 2e3e srs @0x003e, $AC0.M -092a 2f3f srs @0x003f, $AC1.M -092b 8e00 set16 -092c 8900 clr $ACC1 -092d 00df 0360 lr $AC1.M, @0x0360 -092f 02df ret -} - -{ -0930 0083 0520 lri $AR3, #0x0520 -0932 00de 041b lr $AC0.M, @0x041b -0934 1050 loopi #0x50 - 0935 1b7e srri @$AR3, $AC0.M -0936 029f 04e7 jmp 0x04e7 -} - -0938 0000 nop -0939 0000 nop -093a 0000 nop -093b 0000 nop -093c 0000 nop -093d 0000 nop -093e 0000 nop -093f 0000 nop diff --git a/docs/DSP/DSP_UC_Luigi.txt b/docs/DSP/DSP_UC_Luigi.txt deleted file mode 100644 index 5aa599f797..0000000000 --- a/docs/DSP/DSP_UC_Luigi.txt +++ /dev/null @@ -1,2507 +0,0 @@ -// This ucode is interesting because it is very similar to the Zelda ucode, -// but does not make use of exceptions. Hence, it might be possible to get -// it running okay even without understanding how the exceptions work. - -// CRC: 379F1139 -// ector-CRC: 42f64ac4 - -// Notable differences: -// -// Luigi init (not using mail exception): -// sbset #0x02 -// sbset #0x03 -// sbclr #0x04 -// sbset #0x05 -// sbset #0x06 -// set16 -// clr15 -// m0 - -// Zelda init (using mail exception): -// sbclr #0x02 ! -// sbclr #0x03 ! -// sbclr #0x04 -// sbset #0x05 (late, just when it's time to receive messages) -// sbset #0x06 -// set16 -// clr15 -// m0 - -// AX1 init (not using mail exception, same as Luigi init): -// sbset #0x02 -// sbset #0x03 -// sbclr #0x04 -// sbset #0x05 -// sbset #0x06 -// set16 -// clr15 -// m0 - - - -// exception vectors -0000 029f 0010 jmp 0x0010 -0002 0000 nop -0003 0000 nop -0004 02ff rti -0005 0000 nop -0006 02ff rti -0007 0000 nop -0008 02ff rti -0009 0000 nop -000a 02ff rti -000b 0000 nop -000c 02ff rti -000d 0000 nop -000e 02ff rti // This is Zelda's message exception. -000f 0000 nop - -// Reset vector -void 0010_ResetVector() { - // Compare to 0057 in the Zelda ucode - 0010 1302 sbset #0x02 - 0011 1303 sbset #0x03 - 0012 1204 sbclr #0x04 - 0013 1305 sbset #0x05 - 0014 1306 sbset #0x06 - 0015 8e00 set16 - 0016 8c00 clr15 - 0017 8b00 m0 - 0018 009e ffff lri $AC0.M, #0xffff - 001a 1d1e mrr $WR0, $AC0.M - 001b 1d3e mrr $WR1, $AC0.M - 001c 1d5e mrr $WR2, $AC0.M - 001d 1d7e mrr $WR3, $AC0.M - 001e 0092 00ff lri $CR, #0x00ff - 0020 8100 clr $ACC0 - // Clear memory - 0021 009f 1000 lri $AC1.M, #0x1000 - 0023 0080 0000 lri $AR0, #0x0000 - 0025 005f loop $AC1.M - 0026 1b1e srri @$AR0, $AC0.M - 0027 26ff lrs $AC0.M, @CMBL - 0028 16fc 8888 si @DMBH, #0x8888 - 002a 16fd 1111 si @DMBL, #0x1111 - 002c 26fc lrs $AC0.M, @DMBH - 002d 02a0 8000 andf $AC0.M, #0x8000 - 002f 029c 002c jlnz 0x002c - - while (true) { - 0031 8100 clr $ACC0 - 0032 8900 clr $ACC1 - 0033 26fe lrs $AC0.M, @CMBH - 0034 02c0 8000 andcf $AC0.M, #0x8000 - 0036 029c 0031 jlnz 0x0031 - 0038 27ff lrs $AC1.M, @CMBL - 0039 00ff 0345 sr @0x0345, $AC1.M - 003b 1ffe mrr $AC1.M, $AC0.M - 003c 0340 00ff andi $AC1.M, #0x00ff - 003e 00ff 0344 sr @0x0344, $AC1.M - 0040 1479 lsr $ACC0, #-7 - - // Jump table below - 0041 0240 007e andi $AC0.M, #0x007e - 0043 0200 0062 addi $AC0.M, #0x0062 - 0045 00fe 0343 sr @0x0343, $AC0.M - 0047 1c1e mrr $AR0, $AC0.M - 0048 170f jmpr $AR0 - 0049 009e 8000 lri $AC0.M, #0x8000 - 004b 00dc 0343 lr $AC0.L, @0x0343 - 004d 02bf 005a call 0x005a - 004f 029f 0031 jmp 0x0031 - } -} - -void 0051_Unk_Mail() { - 0051 26fe lrs $AC0.M, @CMBH - 0052 02c0 8000 andcf $AC0.M, #0x8000 - 0054 029c 0051 jlnz 0x0051 - 0056 24ff lrs $AC0.L, @CMBL - 0057 1b1e srri @$AR0, $AC0.M - 0058 1b1c srri @$AR0, $AC0.L - 0059 02df ret -} - -void 005a_Unk_Mail() { - 005a 2efc srs @DMBH, $AC0.M - 005b 2cfd srs @DMBL, $AC0.L - 005c 26fc lrs $AC0.M, @DMBH - 005d 02a0 8000 andf $AC0.M, #0x8000 - 005f 029c 005c jlnz 0x005c - 0061 02df ret -} - -// Just a jump table. -0062 029f 0049 jmp 0x0049 -0064 029f 0349 jmp 0x0349 // Command 01 -0066 029f 04eb jmp 0x04eb // Command 02 -0068 029f 0031 jmp 0x0031 -006a 029f 00df jmp 0x00df -006c 029f 00f1 jmp 0x00f1 -006e 029f 06e7 jmp 0x06e7 -0070 029f 069b jmp 0x069b -0072 029f 0703 jmp 0x0703 -0074 029f 06cb jmp 0x06cb -0076 029f 0870 jmp 0x0870 -0078 029f 0744 jmp 0x0744 -007a 029f 0238 jmp 0x0238 - - -void 007c_Unk() { - 007c 193e lrri $AC0.M, @$AR1 - 007d 193c lrri $AC0.L, @$AR1 - 007e 2fcd srs @DSPA, $AC1.M - 007f 0f00 lris $AC1.M, #0x00 - 0080 2fc9 srs @DSCR, $AC1.M - 0081 2ece srs @DSMAH, $AC0.M - 0082 2ccf srs @DSMAL, $AC0.L - 0083 1fe0 mrr $AC1.M, $AR0 - 0084 1501 lsl $ACC1, #1 - 0085 2fcb srs @DSBL, $AC1.M - 0086 02bf 008f call 0x008f - 0088 02df ret -} - - -void 0089_Unk() { - 0089 193e lrri $AC0.M, @$AR1 - 008a 193c lrri $AC0.L, @$AR1 - 008b 2fcd srs @DSPA, $AC1.M - 008c 0f01 lris $AC1.M, #0x01 - 008d 029f 0080 jmp 0x0080 - 008f 26c9 lrs $AC0.M, @DSCR - 0090 02a0 0004 andf $AC0.M, #0x0004 - 0092 029c 008f jlnz 0x008f - 0094 02df ret -} - -void 0095_Unk() { - 0095 193e lrri $AC0.M, @$AR1 - 0096 193c lrri $AC0.L, @$AR1 - 0097 00ff ffcd sr @DSPA, $AC1.M - 0099 0f00 lris $AC1.M, #0x00 - 009a 00ff ffc9 sr @DSCR, $AC1.M - 009c 00fe ffce sr @DSMAH, $AC0.M - 009e 00fc ffcf sr @DSMAL, $AC0.L - 00a0 1fe0 mrr $AC1.M, $AR0 - 00a1 1501 lsl $ACC1, #1 - 00a2 00ff ffcb sr @DSBL, $AC1.M - 00a4 02df ret -} - -void 00a5_Unk() { - 00a5 00de ffc9 lr $AC0.M, @DSCR - 00a7 02a0 0004 andf $AC0.M, #0x0004 - 00a9 029c 00a5 jlnz 0x00a5 - 00ab 02df ret -} - -void 00ac_ReadBlockFromAccelerator() { - 00ac 193e lrri $AC0.M, @$AR1 - 00ad 193c lrri $AC0.L, @$AR1 - 00ae 0240 7fff andi $AC0.M, #0x7fff - // 00b0 02bf 00ba call 0x00ba - 00ba_SetupAccelerator() - - 00b2 007a 00b8 bloop $AX0.H, 0x00b8 - 00b4 26d3 lrs $AC0.M, @UnkZelda - 00b5 1b3e srri @$AR1, $AC0.M - 00b6 0000 nop - 00b7 0000 nop - 00b8 0000 nop - 00b9 02df ret -} - -void 00ba_SetupAccelerator() { - 00ba 1c3f mrr $AR1, $AC1.M - 00bb 009f 0005 lri $AC1.M, #0x0005 - 00bd 2fd1 srs @SampleFormat, $AC1.M - 00be 1f5e mrr $AX0.H, $AC0.M - 00bf 1f1c mrr $AX0.L, $AC0.L - 00c0 2ed4 srs @ACSAH, $AC0.M - 00c1 2cd5 srs @ACSAL, $AC0.L - 00c2 8900 clr $ACC1 - 00c3 1fa0 mrr $AC1.L, $AR0 - 00c4 4c00 add $ACC0, $AC1.L - 00c5 0200 0030 addi $AC0.M, #0x0030 - 00c7 2ed6 srs @ACEAH, $AC0.M - 00c8 2cd7 srs @ACEAL, $AC0.L - 00c9 1fda mrr $AC0.M, $AX0.H - 00ca 1f98 mrr $AC0.L, $AX0.L - 00cb 147f lsr $ACC0, #-1 - 00cc 2ed8 srs @ACCAH, $AC0.M - 00cd 2cd9 srs @ACCAL, $AC0.L - 00ce 1f40 mrr $AX0.H, $AR0 - 00cf 02df ret -} - - -void 00d0_Unk() { - 00d0 193e lrri $AC0.M, @$AR1 - 00d1 193c lrri $AC0.L, @$AR1 - 00d2 0260 8000 ori $AC0.M, #0x8000 - // 00d4 02bf 00ba call 0x00ba - 00ba_SetupAccelerator() - 00d6 007a 00dd bloop $AX0.H, 0x00dd - 00d8 193e lrri $AC0.M, @$AR1 - 00d9 2ed3 srs @UnkZelda, $AC0.M - 00da 0000 nop - 00db 0000 nop - 00dc 0000 nop - 00dd 0000 nop - 00de 02df ret -} - -void 00df_Unk() { - 00df 0080 0346 lri $AR0, #0x0346 - 00e1 02bf 0051 call 0x0051 - 00e3 02bf 0051 call 0x0051 - 00e5 0081 0346 lri $AR1, #0x0346 - 00e7 00df 0349 lr $AC1.M, @0x0349 - 00e9 0340 ffff andi $AC1.M, #0xffff - 00eb 00c0 0345 lr $AR0, @0x0345 - 00ed 02bf 007c call 0x007c - 00ef 029f 0049 jmp 0x0049 - 00f1 0080 0346 lri $AR0, #0x0346 - 00f3 02bf 0051 call 0x0051 - 00f5 02bf 0051 call 0x0051 - 00f7 0081 0346 lri $AR1, #0x0346 - 00f9 00df 0349 lr $AC1.M, @0x0349 - 00fb 0340 ffff andi $AC1.M, #0xffff - 00fd 00c0 0345 lr $AR0, @0x0345 - 00ff 02bf 0089 call 0x0089 - 0101 029f 0049 jmp 0x0049 -} - -void 0103_SetupAcceleratorMystery() { - 0103 0092 00ff lri $CR, #0x00ff - 0105 2fd1 srs @SampleFormat, $AC1.M - 0106 0340 0003 andi $AC1.M, #0x0003 - 0108 1f7f mrr $AX1.H, $AC1.M - 0109 1f5e mrr $AX0.H, $AC0.M - 010a 1f1c mrr $AX0.L, $AC0.L - 010b 0200 0010 addi $AC0.M, #0x0010 - 010d 2ed4 srs @ACSAH, $AC0.M - 010e 2cd5 srs @ACSAL, $AC0.L - 010f 8900 clr $ACC1 - 0110 1fa0 mrr $AC1.L, $AR0 - 0111 4c00 add $ACC0, $AC1.L - 0112 0200 0030 addi $AC0.M, #0x0030 - 0114 2ed6 srs @ACEAH, $AC0.M - 0115 2cd7 srs @ACEAL, $AC0.L - 0116 1fda mrr $AC0.M, $AX0.H - 0117 1f98 mrr $AC0.L, $AX0.L - 0118 1ffb mrr $AC1.M, $AX1.H - 0119 7900 decm $AC1.M - 011a 02ca lsrn - 011b 2ed8 srs @ACCAH, $AC0.M - 011c 2cd9 srs @ACCAL, $AC0.L - 011d 02df ret -} - -void 011e_Unk() { - 011e 1c23 mrr $AR1, $AR3 - 011f 197e lrri $AC0.M, @$AR3 - 0120 191b lrri $AX1.H, @$AR0 - 0121 d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - 0122 1120 0128 bloopi #0x20, 0x0128 - 0124 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0125 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0126 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0127 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0128 4900 addax $ACC1, $AX0.L - 0129 1108 012e bloopi #0x08, 0x012e - 012b dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 012c 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 012d dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 012e 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 012f 02df ret -} - - -void 0130_Unk() { - 0130 8f00 set40 - 0131 1c03 mrr $AR0, $AR3 - 0132 00db 038e lr $AX1.H, @0x038e - 0134 009a 0004 lri $AX0.H, #0x0004 - 0136 1978 lrri $AX0.L, @$AR3 - 0137 a843 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR3 - 0138 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0139 1128 013e bloopi #0x28, 0x013e - 013b 38c3 orr'ld $AC0.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 013c ae30 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC0.M - 013d 38c3 orr'ld $AC0.M, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 013e ae30 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC0.M - 013f 8e00 set16 - 0140 02df ret -} - -void 0141_Unk() { - 0141 00f9 0361 sr @0x0361, $AX1.L - 0143 1fc0 mrr $AC0.M, $AR0 - 0144 0200 fffc addi $AC0.M, #0xfffc - 0146 1c1e mrr $AR0, $AC0.M - 0147 1c5e mrr $AR2, $AC0.M - 0148 0083 043c lri $AR3, #0x043c - 014a 197e lrri $AC0.M, @$AR3 - 014b 197f lrri $AC1.M, @$AR3 - 014c 80a2 nx'sl : $AC0.M, $AX0.H - 014d 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - 014e 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - 014f 1b1f srri @$AR0, $AC1.M - 0150 1c02 mrr $AR0, $AR2 - 0151 8100 clr $ACC0 - 0152 00de 0402 lr $AC0.M, @0x0402 - 0154 00fe 0362 sr @0x0362, $AC0.M - 0156 1474 lsr $ACC0, #-12 - 0157 1f7e mrr $AX1.H, $AC0.M - 0158 1f3c mrr $AX1.L, $AC0.L - 0159 8900 clr $ACC1 - 015a 00dd 0430 lr $AC1.L, @0x0430 - 015c 1504 lsl $ACC1, #4 - 015d 0604 cmpis $ACC0, #0x04 - 015e 0290 01b6 jns 0x01b6 - 0160 1fdd mrr $AC0.M, $AC1.L - 0161 0082 0c00 lri $AR2, #0x0c00 - 0163 1050 loopi #0x50 - 0164 4b2a addax's $ACC1, $AX1.L : @$AR2, $AC1.L - 0165 1fbe mrr $AC1.L, $AC0.M - 0166 00fe 0360 sr @0x0360, $AC0.M - 0168 8900 clr $ACC1 - 0169 1fbe mrr $AC1.L, $AC0.M - 016a 009a fff8 lri $AX0.H, #0xfff8 - 016c 009b 00fc lri $AX1.H, #0x00fc - 016e 00d8 0361 lr $AX0.L, @0x0361 - 0170 0082 0c00 lri $AR2, #0x0c00 - 0172 0083 0c00 lri $AR3, #0x0c00 - 0174 195e lrri $AC0.M, @$AR2 - 0175 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M - 0176 1128 017b bloopi #0x28, 0x017b - 0178 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 - 0179 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H - 017a 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 - 017b 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - 017c 8a00 m2 - 017d 0082 0c00 lri $AR2, #0x0c00 - 017f 00dd 0430 lr $AC1.L, @0x0430 - 0181 1504 lsl $ACC1, #4 - 0182 1fe0 mrr $AC1.M, $AR0 - 0183 8100 clr $ACC0 - 0184 00de 0362 lr $AC0.M, @0x0362 - 0186 1474 lsr $ACC0, #-12 - 0187 1f7e mrr $AX1.H, $AC0.M - 0188 1f3c mrr $AX1.L, $AC0.L - 0189 8f00 set40 - 018a 1943 lrri $AR3, @$AR2 - 018b 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 018c 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 018d f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 018e f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 018f f200 madd $AX0.L, $AX0.H - 0190 fe00 movpz $ACC0 - 0191 1c1f mrr $AR0, $AC1.M - - 0192 1943 lrri $AR3, @$AR2 - 0193 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0194 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0195 114e 019d bloopi #0x4e, 0x019d - 0197 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0198 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0199 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - - 019a 1c1f mrr $AR0, $AC1.M - 019b 1943 lrri $AR3, @$AR2 - 019c 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 019d 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - 019e f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 019f f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01a0 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 01a1 fe00 movpz $ACC0 - 01a2 1b3e srri @$AR1, $AC0.M - - 01a3 8b00 m0 - 01a4 8e00 set16 - 01a5 00fe 0433 sr @0x0433, $AC0.M - 01a7 1c1f mrr $AR0, $AC1.M - 01a8 150c lsl $ACC1, #12 - 01a9 0340 0fff andi $AC1.M, #0x0fff - 01ab 00ff 0430 sr @0x0430, $AC1.M - 01ad 0083 043c lri $AR3, #0x043c - 01af 191e lrri $AC0.M, @$AR0 - 01b0 191f lrri $AC1.M, @$AR0 - 01b1 80a0 nx'ls : $AX0.H, $AC0.M - 01b2 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 01b3 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 01b4 1b7f srri @$AR3, $AC1.M - 01b5 02df ret - -subroutine: - 01b6 1fe0 mrr $AC1.M, $AR0 - 01b7 1c1f mrr $AR0, $AC1.M - 01b8 1128 01bf bloopi #0x28, 0x01bf - 01ba 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 01bb 1b3e srri @$AR1, $AC0.M - 01bc 1c1f mrr $AR0, $AC1.M - 01bd 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 01be 1b3e srri @$AR1, $AC0.M - 01bf 1c1f mrr $AR0, $AC1.M - 01c0 029f 01a5 jmp 0x01a5 -} - -void 01c2_Unk() { - 01c2 8a00 m2 - 01c3 0083 03e8 lri $AR3, #0x03e8 - 01c5 191e lrri $AC0.M, @$AR0 - 01c6 191a lrri $AX0.H, @$AR0 - 01c7 1006 loopi #0x06 - 01c8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 01c9 1b7e srri @$AR3, $AC0.M - 01ca 1b7a srri @$AR3, $AX0.H - 01cb 0080 03e8 lri $AR0, #0x03e8 - 01cd 0088 0007 lri $WR0, #0x0007 - 01cf 1150 01dc bloopi #0x50, 0x01dc - 01d1 1c61 mrr $AR3, $AR1 - 01d2 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 01d3 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d4 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d5 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d6 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d7 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d8 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01d9 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01da f200 madd $AX0.L, $AX0.H - 01db fe00 movpz $ACC0 - 01dc 1b3e srri @$AR1, $AC0.M - 01dd 0088 ffff lri $WR0, #0xffff - 01df 8b00 m0 - 01e0 02df ret -} - -void 01e1_Unk() { // ZWW: 0b4d_IIR_Filter - 01e1 8a00 m2 - 01e2 05fe addis $ACC1, #0xfe - 01e3 0083 03e8 lri $AR3, #0x03e8 - 01e5 191e lrri $AC0.M, @$AR0 - 01e6 191a lrri $AX0.H, @$AR0 - 01e7 005f loop $AC1.M - 01e8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 01e9 1b7e srri @$AR3, $AC0.M - 01ea 1b7a srri @$AR3, $AX0.H - 01eb 0080 03e8 lri $AR0, #0x03e8 - 01ed 0501 addis $ACC1, #0x01 - 01ee 1d1f mrr $WR0, $AC1.M - 01ef 1150 01f7 bloopi #0x50, 0x01f7 - 01f1 1c61 mrr $AR3, $AR1 - 01f2 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 01f3 005f loop $AC1.M - 01f4 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 01f5 f200 madd $AX0.L, $AX0.H - 01f6 fe00 movpz $ACC0 - 01f7 1b3e srri @$AR1, $AC0.M - 01f8 0088 ffff lri $WR0, #0xffff - 01fa 8b00 m0 - 01fb 02df ret -} - -void 01fc_Unk() { // ZWW: 0b68_4TapFIR - 01fc 0083 03e8 lri $AR3, #0x03e8 - 01fe 191e lrri $AC0.M, @$AR0 - 01ff 191a lrri $AX0.H, @$AR0 - 0200 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0201 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0202 1b7e srri @$AR3, $AC0.M - 0203 1b7a srri @$AR3, $AX0.H - 0204 0080 03e8 lri $AR0, #0x03e8 - 0206 0088 0003 lri $WR0, #0x0003 - 0208 0085 0000 lri $IX1, #0x0000 - 020a 0087 0000 lri $IX3, #0x0000 - 020c 1fc2 mrr $AC0.M, $AR2 - 020d 195b lrri $AX1.H, @$AR2 - 020e 1959 lrri $AX1.L, @$AR2 - 020f 195f lrri $AC1.M, @$AR2 - 0210 195a lrri $AX0.H, @$AR2 - 0211 1c5e mrr $AR2, $AC0.M - 0212 1fda mrr $AC0.M, $AX0.H - 0213 1c61 mrr $AR3, $AR1 - 0214 8a00 m2 - 0215 8f00 set40 - 0216 191a lrri $AX0.H, @$AR0 - 0217 b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0218 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0219 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 021a e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 021b b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 021c 1127 0227 bloopi #0x27, 0x0227 - 021e e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - - 021f 197e lrri $AC0.M, @$AR3 - 0220 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0221 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0222 bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0223 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - - 0224 197f lrri $AC1.M, @$AR3 - 0225 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0226 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0227 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0228 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0229 197e lrri $AC0.M, @$AR3 - 022a e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 022b eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 022c bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 022d 1bff srrn @$AR3, $AC1.M - 022e 197f lrri $AC1.M, @$AR3 - 022f 8e00 set16 - 0230 8b00 m0 - 0231 0088 ffff lri $WR0, #0xffff - 0233 1b5b srri @$AR2, $AX1.H - 0234 1b59 srri @$AR2, $AX1.L - 0235 1b5f srri @$AR2, $AC1.M - 0236 1b5e srri @$AR2, $AC0.M - 0237 02df ret -} - -void 0238_Unk() { - 0238 0080 0346 lri $AR0, #0x0346 - 023a 02bf 0051 call 0x0051 - 023c 02bf 0051 call 0x0051 - 023e 0081 0346 lri $AR1, #0x0346 - 0240 009f 0580 lri $AC1.M, #0x0580 - 0242 0080 0080 lri $AR0, #0x0080 - 0244 02bf 007c call 0x007c - 0246 0081 0348 lri $AR1, #0x0348 - 0248 009f 0c00 lri $AC1.M, #0x0c00 - 024a 0080 0080 lri $AR0, #0x0080 - 024c 02bf 007c call 0x007c - 024e 0080 0c00 lri $AR0, #0x0c00 - 0250 0081 0580 lri $AR1, #0x0580 - 0252 02bf 01fc call 0x01fc - 0254 0081 0346 lri $AR1, #0x0346 - 0256 009f 0580 lri $AC1.M, #0x0580 - 0258 0080 0080 lri $AR0, #0x0080 - 025a 02bf 0089 call 0x0089 - 025c 0081 0348 lri $AR1, #0x0348 - 025e 009f 0c00 lri $AC1.M, #0x0c00 - 0260 0080 0080 lri $AR0, #0x0080 - 0262 02bf 0089 call 0x0089 - 0264 029f 0049 jmp 0x0049 - 0266 8100 clr $ACC0 - 0267 1f5e mrr $AX0.H, $AC0.M - 0268 00d8 0402 lr $AX0.L, @0x0402 - 026a 00dc 0430 lr $AC0.L, @0x0430 - 026c 0080 0520 lri $AR0, #0x0520 - 026e 00df 0480 lr $AC1.M, @0x0480 - 0270 1501 lsl $ACC1, #1 - 0271 0340 007e andi $AC1.M, #0x007e - 0273 0300 027b addi $AC1.M, #0x027b - 0275 1c5f mrr $AR2, $AC1.M - 0276 175f callr $AR2 - 0277 00fc 0430 sr @0x0430, $AC0.L - 0279 029f 056d jmp 0x056d - 027b 029f 029c jmp 0x029c - 027d 029f 02d7 jmp 0x02d7 - 027f 029f 02bf jmp 0x02bf - 0281 029f 02ac jmp 0x02ac - 0283 029f 02e5 jmp 0x02e5 - 0285 029f 029b jmp 0x029b - 0287 029f 0303 jmp 0x0303 - 0289 029f 0306 jmp 0x0306 - 028b 029f 029b jmp 0x029b - 028d 029f 029b jmp 0x029b - 028f 029f 0324 jmp 0x0324 - 0291 029f 02dd jmp 0x02dd - 0293 029f 02e1 jmp 0x02e1 - 0295 029f 029b jmp 0x029b - 0297 029f 029b jmp 0x029b - 0299 029f 029b jmp 0x029b - 029b 02df ret -} - -void 029c_Unk() { - 029c 1401 lsl $ACC0, #1 - 029d 009b c000 lri $AX1.H, #0xc000 - 029f 0099 4000 lri $AX1.L, #0x4000 - 02a1 1150 02a9 bloopi #0x50, 0x02a9 - 02a3 02c0 0001 andcf $AC0.M, #0x0001 - 02a5 027c iflnz - 02a6 1b1b srri @$AR0, $AX1.H - 02a7 027d iflz - 02a8 1b19 srri @$AR0, $AX1.L - 02a9 4800 addax $ACC0, $AX0.L - 02aa 147f lsr $ACC0, #-1 - 02ab 02df ret -} - -void 02ac_Unk() { - 02ac 1402 lsl $ACC0, #2 - 02ad 8900 clr $ACC1 - 02ae 1fb8 mrr $AC1.L, $AX0.L - 02af 1501 lsl $ACC1, #1 - 02b0 009b c000 lri $AX1.H, #0xc000 - 02b2 0099 4000 lri $AX1.L, #0x4000 - 02b4 1150 02bc bloopi #0x50, 0x02bc - 02b6 02c0 0003 andcf $AC0.M, #0x0003 - 02b8 027c iflnz - 02b9 1b1b srri @$AR0, $AX1.H - 02ba 027d iflz - 02bb 1b19 srri @$AR0, $AX1.L - 02bc 4c00 add $ACC0, $AC1.L - 02bd 147e lsr $ACC0, #-2 - 02be 02df ret -} - -void 02bf_Unk() { // ZWW:08d5 - 02bf 1401 lsl $ACC0, #1 - 02c0 0081 0ca0 lri $AR1, #0x0ca0 - 02c2 009b c000 lri $AX1.H, #0xc000 - 02c4 0099 4000 lri $AX1.L, #0x4000 - 02c6 8900 clr $ACC1 - 02c7 0082 0000 lri $AR2, #0x0000 - 02c9 1150 02d4 bloopi #0x50, 0x02d4 - 02cb 02c0 0001 andcf $AC0.M, #0x0001 - 02cd 027c iflnz - 02ce 1b1b srri @$AR0, $AX1.H - 02cf 027d iflz - 02d0 1b19 srri @$AR0, $AX1.L - 02d1 183d lrr $AC1.L, @$AR1 - 02d2 4900 addax $ACC1, $AX0.L - 02d3 1fe2 mrr $AC1.M, $AR2 - 02d4 4c39 add's $ACC0, $AC1.L : @$AR1, $AC1.M - 02d5 147f lsr $ACC0, #-1 - 02d6 02df ret -} - -void 02d7_Unk() { // ZWW:08ed - 02d7 8900 clr $ACC1 - 02d8 1fb8 mrr $AC1.L, $AX0.L - 02d9 157f lsr $ACC1, #-1 - 02da 1050 loopi #0x50 - 02db 4c20 add's $ACC0, $AC1.L : @$AR0, $AC0.L - 02dc 02df ret -} - -void 02dd_Unk() { // ZWW:08f3 - 02dd 0082 0180 lri $AR2, #0x0180 // Three entrances - 02df 029f 02e7 jmp 0x02e7 - 02e1 0082 01c0 lri $AR2, #0x01c0 - 02e3 029f 02e7 jmp 0x02e7 - 02e5 0082 0140 lri $AR2, #0x0140 - 02e7 008a 003f lri $WR2, #0x003f - 02e9 0086 0000 lri $IX2, #0x0000 - 02eb 1406 lsl $ACC0, #6 - 02ec 8900 clr $ACC1 - 02ed 1fb8 mrr $AC1.L, $AX0.L - 02ee 1505 lsl $ACC1, #5 - 02ef 009b 003f lri $AX1.H, #0x003f - 02f1 009a 0000 lri $AX0.H, #0x0000 - 02f3 3600 andr $AC0.M, $AX1.H - 02f4 1cde mrr $IX2, $AC0.M - 02f5 001a addarn $AR2, $IX2 - 02f6 3400 andr $AC0.M, $AX0.H - 02f7 1150 02fd bloopi #0x50, 0x02fd - 02f9 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 02fa 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 02fb 1cde mrr $IX2, $AC0.M - 02fc 340e andr'nr $AC0.M, $AX0.H : $AR2 - 02fd 1b19 srri @$AR0, $AX1.L - 02fe 1fc2 mrr $AC0.M, $AR2 - 02ff 147a lsr $ACC0, #-6 - 0300 008a ffff lri $WR2, #0xffff - 0302 02df ret -} - -void 030_MemsetBlock() { - 0303 1050 loopi #0x50 - 0304 1b18 srri @$AR0, $AX0.L - // 0305 02df ret -} - -void 0306_Unk() { - 0306 0082 0100 lri $AR2, #0x0100 - 0308 008a 003f lri $WR2, #0x003f - 030a 0086 0000 lri $IX2, #0x0000 - 030c 1406 lsl $ACC0, #6 - 030d 8900 clr $ACC1 - 030e 1fb8 mrr $AC1.L, $AX0.L - 030f 1505 lsl $ACC1, #5 - 0310 009b 003f lri $AX1.H, #0x003f - 0312 009a 0000 lri $AX0.H, #0x0000 - 0314 3600 andr $AC0.M, $AX1.H - 0315 1cde mrr $IX2, $AC0.M - 0316 001a addarn $AR2, $IX2 - 0317 3400 andr $AC0.M, $AX0.H - 0318 1150 031e bloopi #0x50, 0x031e - 031a 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 031b 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 031c 1cde mrr $IX2, $AC0.M - 031d 340e andr'nr $AC0.M, $AX0.H : $AR2 - 031e 1b19 srri @$AR0, $AX1.L - 031f 1fc2 mrr $AC0.M, $AR2 - 0320 147a lsr $ACC0, #-6 - 0321 008a ffff lri $WR2, #0xffff - 0323 02df ret -} - -void 0324_Unk() { - 0324 0082 0100 lri $AR2, #0x0100 - 0326 008a 003f lri $WR2, #0x003f - 0328 0086 0000 lri $IX2, #0x0000 - 032a 0081 0ca0 lri $AR1, #0x0ca0 - 032c 1406 lsl $ACC0, #6 - 032d 8900 clr $ACC1 - 032e 1fb8 mrr $AC1.L, $AX0.L - 032f 1505 lsl $ACC1, #5 - 0330 009b 003f lri $AX1.H, #0x003f - 0332 009a 0000 lri $AX0.H, #0x0000 - 0334 3600 andr $AC0.M, $AX1.H - 0335 1cde mrr $IX2, $AC0.M - 0336 001a addarn $AR2, $IX2 - 0337 3400 andr $AC0.M, $AX0.H - 0338 1150 0343 bloopi #0x50, 0x0343 - 033a 1939 lrri $AX1.L, @$AR1 - 033b a000 mulx $AX0.L, $AX1.L - 033c 140a lsl $ACC0, #10 - 033d 4e00 addp $ACC0 - 033e 1476 lsr $ACC0, #-10 - 033f 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 0340 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0341 1cde mrr $IX2, $AC0.M - 0342 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0343 1b19 srri @$AR0, $AX1.L - 0344 1fc2 mrr $AC0.M, $AR2 - 0345 147a lsr $ACC0, #-6 - 0346 008a ffff lri $WR2, #0xffff - 0348 02df ret -} - -// DsetupTable -void 0349_COMMAND_01() { - 0349 0080 0380 lri $AR0, #0x0380 - 034b 02bf 0051 call 0x0051 - 034d 02bf 0051 call 0x0051 - 034f 02bf 0051 call 0x0051 - 0351 02bf 0051 call 0x0051 - - 0353 0081 0382 lri $AR1, #0x0382 - 0355 009f 0000 lri $AC1.M, #0x0000 - 0357 0080 0200 lri $AR0, #0x0200 - // 0359 02bf 007c call 0x007c - 007c_CopyRAMtoDMEM() - - 035b 0081 0384 lri $AR1, #0x0384 - 035d 009f 0300 lri $AC1.M, #0x0300 - 035f 0080 0020 lri $AR0, #0x0020 - 0361 02bf 007c call 0x007c - 007c_CopyRAMtoDMEM() - - - 0363 02bf 03cc call 0x03cc - 0365 00de 0345 lr $AC0.M, @0x0345 - 0367 00fe 0342 sr @0x0342, $AC0.M - 0369 02bf 0af0 call 0x0af0 - 036b 029f 0049 jmp 0x0049 - 036d 00de 0344 lr $AC0.M, @0x0344 - 036f 1404 lsl $ACC0, #4 - 0370 0200 03a8 addi $AC0.M, #0x03a8 - 0372 1c1e mrr $AR0, $AC0.M - 0373 02bf 0051 call 0x0051 - 0375 02bf 0051 call 0x0051 - 0377 02bf 0051 call 0x0051 - 0379 00de 0345 lr $AC0.M, @0x0345 - 037b 1b1e srri @$AR0, $AC0.M - 037c 00de 0344 lr $AC0.M, @0x0344 - 037e 0200 03a4 addi $AC0.M, #0x03a4 - 0380 1c1e mrr $AR0, $AC0.M - 0381 8100 clr $ACC0 - 0382 1b1e srri @$AR0, $AC0.M - 0383 02df ret -} - -void 0384_Unk() { - 0384 00de 0344 lr $AC0.M, @0x0344 - 0386 1404 lsl $ACC0, #4 - 0387 0200 03b0 addi $AC0.M, #0x03b0 - 0389 1c1e mrr $AR0, $AC0.M - 038a 02bf 0051 call 0x0051 - 038c 02bf 0051 call 0x0051 - 038e 02bf 0051 call 0x0051 - 0390 02bf 0051 call 0x0051 - 0392 02df ret -} - -void 0393_Unk() { - 0393 0081 034c lri $AR1, #0x034c - 0395 009f 0400 lri $AC1.M, #0x0400 - 0397 0080 00c0 lri $AR0, #0x00c0 - 0399 02bf 007c call 0x007c - 039b 02df ret -} - -void 039c_Unk() { - 039c 0081 034c lri $AR1, #0x034c - 039e 009f 0400 lri $AC1.M, #0x0400 - 03a0 0080 0080 lri $AR0, #0x0080 - 03a2 0081 034c lri $AR1, #0x034c - 03a4 193e lrri $AC0.M, @$AR1 - 03a5 193c lrri $AC0.L, @$AR1 - 03a6 0098 0000 lri $AX0.L, #0x0000 - 03a8 7000 addaxl $ACC0, $AX0.L - 03a9 02bf 008b call 0x008b - 03ab 02df ret -} - -void 03ac_Unk() { - 03ac 191e lrri $AC0.M, @$AR0 - 03ad 191a lrri $AX0.H, @$AR0 - 03ae 005f loop $AC1.M - 03af 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 03b0 1b7e srri @$AR3, $AC0.M - 03b1 1b7a srri @$AR3, $AX0.H - 03b2 02df ret -} - -// Example call: -//a 03d9 0080 0f40 lri $AR0, #0x0f40 -//a 03db 0082 0d00 lri $AR2, #0x0d00 -//a 03dd 0083 0d60 lri $AR3, #0x0d60 -//a 03df 009f 0028 lri $AC1.M, #0x0028 -//a 03e1 02bf 03b3 call 0x03b3 -// Not sure how AR2 fits into the picture... -void 03b3_XorBuffer(InputBuffer($AR0), OutputBuffer($AR3), HalfLength($AC1.M)) { - 03b3 191e lrri $AC0.M, @$AR0 - 03b4 191a lrri $AX0.H, @$AR0 - 03b5 007f 03ba bloop $AC1.M, 0x03ba - 03b7 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 03b8 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 03b9 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 03ba 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 03bb 0000 nop - 03bc 02df ret -} - -void 03bd_Unk() { - 03bd 8a00 m2 - 03be 157f lsr $ACC1, #-1 - 03bf 1c20 mrr $AR1, $AR0 - 03c0 1c03 mrr $AR0, $AR3 - 03c1 193a lrri $AX0.H, @$AR1 - 03c2 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 - 03c3 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 - 03c4 007f 03c9 bloop $AC1.M, 0x03c9 - 03c6 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 03c7 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 03c8 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 03c9 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 03ca 8b00 m0 - 03cb 02df ret -} - -void 03cc_Unk() { - 03cc 0083 ffa0 lri $AR3, #0xffa0 - 03ce 0080 0300 lri $AR0, #0x0300 - 03d0 009f 000e lri $AC1.M, #0x000e - 03d2 1108 03d7 bloopi #0x08, 0x03d7 - 03d4 191e lrri $AC0.M, @$AR0 - 03d5 1b7e srri @$AR3, $AC0.M - 03d6 191e lrri $AC0.M, @$AR0 - 03d7 1b7e srri @$AR3, $AC0.M - 03d8 02df ret -} - -void 03d9_Unk() { - - 03d9 0080 0f40 lri $AR0, #0x0f40 - 03db 0082 0d00 lri $AR2, #0x0d00 - 03dd 0083 0d60 lri $AR3, #0x0d60 - 03df 009f 0028 lri $AC1.M, #0x0028 - // XorBuffer, why?? - 03e1 02bf 03b3 call 0x03b3 - - // Clear a bunch of buffers. - 03e3 8900 clr $ACC1 - 03e4 009e 0050 lri $AC0.M, #0x0050 - 03e6 0080 0ca0 lri $AR0, #0x0ca0 - 03e8 005e loop $AC0.M - 03e9 1b1f srri @$AR0, $AC1.M - 03ea 0080 0f40 lri $AR0, #0x0f40 - 03ec 005e loop $AC0.M - 03ed 1b1f srri @$AR0, $AC1.M - 03ee 0080 0fa0 lri $AR0, #0x0fa0 - 03f0 005e loop $AC0.M - 03f1 1b1f srri @$AR0, $AC1.M - 03f2 0080 0b00 lri $AR0, #0x0b00 - 03f4 005e loop $AC0.M - 03f5 1b1f srri @$AR0, $AC1.M - 03f6 0080 09a0 lri $AR0, #0x09a0 - 03f8 005e loop $AC0.M - 03f9 1b1f srri @$AR0, $AC1.M - - 03fa 02df ret -} - -void 03fb_Unk() { - 03fb 00c0 03a0 lr $AR0, @0x03a0 - 03fd 191a lrri $AX0.H, @$AR0 - 03fe 00df 03a1 lr $AC1.M, @0x03a1 - 0400 009b 00a0 lri $AX1.H, #0x00a0 - 0402 0081 0393 lri $AR1, #0x0393 - 0404 18bc lrrd $AC0.L, @$AR1 - 0405 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0406 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0407 0080 0050 lri $AR0, #0x0050 - 0409 0508 addis $ACC1, #0x08 - 040a 02bf 007e call 0x007e - 040c 00de 0390 lr $AC0.M, @0x0390 - 040e 02a0 0001 andf $AC0.M, #0x0001 - 0410 029d 041a jlz 0x041a - 0412 0080 0398 lri $AR0, #0x0398 - 0414 009e 0008 lri $AC0.M, #0x0008 - 0416 00c1 03a1 lr $AR1, @0x03a1 - 0418 02bf 01c2 call 0x01c2 - 041a 009f 0050 lri $AC1.M, #0x0050 - 041c 00c0 03a1 lr $AR0, @0x03a1 - 041e 8100 clr $ACC0 - 041f 00de 0394 lr $AC0.M, @0x0394 - 0421 b100 tst $ACC0 - 0422 0295 0429 jz 0x0429 - 0424 1c7e mrr $AR3, $AC0.M - 0425 00d8 0395 lr $AX0.L, @0x0395 - 0427 02bf 03bd call 0x03bd - 0429 009f 0050 lri $AC1.M, #0x0050 - 042b 00c0 03a1 lr $AR0, @0x03a1 - 042d 8100 clr $ACC0 - 042e 00de 0396 lr $AC0.M, @0x0396 - 0430 b100 tst $ACC0 - 0431 0295 0438 jz 0x0438 - 0433 1c7e mrr $AR3, $AC0.M - 0434 00d8 0397 lr $AX0.L, @0x0397 - 0436 02bf 03bd call 0x03bd - 0438 00de 0390 lr $AC0.M, @0x0390 - 043a 02a0 0002 andf $AC0.M, #0x0002 - 043c 02dd retlz - - 043d 0080 0398 lri $AR0, #0x0398 - 043f 009e 0008 lri $AC0.M, #0x0008 - 0441 00c1 03a1 lr $AR1, @0x03a1 - 0443 02bf 01c2 call 0x01c2 - 0445 02df ret -} - -void 0446_Unk() { - 0446 009f 0dc0 lri $AC1.M, #0x0dc0 - 0448 00ff 03a1 sr @0x03a1, $AC1.M - 044a 009f 03a8 lri $AC1.M, #0x03a8 - 044c 00ff 03a2 sr @0x03a2, $AC1.M - 044e 009f 03a4 lri $AC1.M, #0x03a4 - 0450 00ff 03a0 sr @0x03a0, $AC1.M - 0452 1104 047b bloopi #0x04, 0x047b - 0454 00c0 03a2 lr $AR0, @0x03a2 - 0456 0083 0390 lri $AR3, #0x0390 - 0458 009f 000e lri $AC1.M, #0x000e - 045a 02bf 03ac call 0x03ac - 045c 00da 0390 lr $AX0.H, @0x0390 - 045e 8600 tstaxh $AX0.H - 045f 0295 046c jz 0x046c - 0461 00df 03a1 lr $AC1.M, @0x03a1 - 0463 1c7f mrr $AR3, $AC1.M - 0464 0550 addis $ACC1, #0x50 - 0465 1c1f mrr $AR0, $AC1.M - 0466 009f 0006 lri $AC1.M, #0x0006 - 0468 02bf 03ac call 0x03ac - 046a 02bf 03fb call 0x03fb - 046c 00de 03a2 lr $AC0.M, @0x03a2 - 046e 0410 addis $ACC0, #0x10 - 046f 00fe 03a2 sr @0x03a2, $AC0.M - 0471 00de 03a1 lr $AC0.M, @0x03a1 - 0473 0460 addis $ACC0, #0x60 - 0474 00fe 03a1 sr @0x03a1, $AC0.M - 0476 00de 03a0 lr $AC0.M, @0x03a0 - 0478 7400 incm $AC0.M - 0479 00fe 03a0 sr @0x03a0, $AC0.M - 047b 0000 nop - 047c 02df ret -} - -void 047d_Unk() { - 047d 00c0 03a0 lr $AR0, @0x03a0 - 047f 181a lrr $AX0.H, @$AR0 - 0480 8100 clr $ACC0 - 0481 181e lrr $AC0.M, @$AR0 - 0482 00db 0391 lr $AX1.H, @0x0391 - 0484 7400 incm $AC0.M - 0485 d100 cmpar $ACC1, $AX0.H - 0486 0270 ifns - 0487 8100 clr $ACC0 - 0488 1b1e srri @$AR0, $AC0.M - 0489 00df 03a1 lr $AC1.M, @0x03a1 - 048b 009b 00a0 lri $AX1.H, #0x00a0 - 048d 0081 0393 lri $AR1, #0x0393 - 048f 18bc lrrd $AC0.L, @$AR1 - 0490 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0491 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0492 0080 0050 lri $AR0, #0x0050 - 0494 02bf 008b call 0x008b - 0496 02df ret -} - -void 0497_Unk() { - 0497 009f 0dc0 lri $AC1.M, #0x0dc0 - 0499 00ff 03a1 sr @0x03a1, $AC1.M - 049b 009f 03a8 lri $AC1.M, #0x03a8 - 049d 00ff 03a2 sr @0x03a2, $AC1.M - 049f 009f 03a4 lri $AC1.M, #0x03a4 - 04a1 00ff 03a0 sr @0x03a0, $AC1.M - 04a3 1104 04c3 bloopi #0x04, 0x04c3 - 04a5 00c0 03a2 lr $AR0, @0x03a2 - 04a7 0083 0390 lri $AR3, #0x0390 - 04a9 009f 000e lri $AC1.M, #0x000e - 04ab 02bf 03ac call 0x03ac - 04ad 00da 0390 lr $AX0.H, @0x0390 - 04af 8600 tstaxh $AX0.H - 04b0 0295 04b4 jz 0x04b4 - 04b2 02bf 047d call 0x047d - 04b4 00de 03a2 lr $AC0.M, @0x03a2 - 04b6 0410 addis $ACC0, #0x10 - 04b7 00fe 03a2 sr @0x03a2, $AC0.M - 04b9 00de 03a1 lr $AC0.M, @0x03a1 - 04bb 0460 addis $ACC0, #0x60 - 04bc 00fe 03a1 sr @0x03a1, $AC0.M - 04be 00de 03a0 lr $AC0.M, @0x03a0 - 04c0 7400 incm $AC0.M - 04c1 00fe 03a0 sr @0x03a0, $AC0.M - 04c3 0000 nop - 04c4 02df ret -} - -void 04c5_Unk() { - 04c5 0081 0386 lri $AR1, #0x0386 - 04c7 009f 03a8 lri $AC1.M, #0x03a8 - 04c9 0080 0040 lri $AR0, #0x0040 - 04cb 02bf 007c call 0x007c - 04cd 02df ret -} - -void 04ce_Increment32BitAddressAtAR0() { - 04ce 191e lrri $AC0.M, @$AR0 - 04cf 189c lrrd $AC0.L, @$AR0 - 04d0 4800 addax $ACC0, $AX0.L - 04d1 1b1e srri @$AR0, $AC0.M - 04d2 1b1c srri @$AR0, $AC0.L - 04d3 02df ret -} - -void 04d4_Unk() { - 04d4 8100 clr $ACC0 - 04d5 26fe lrs $AC0.M, @CMBH - 04d6 02c0 8000 andcf $AC0.M, #0x8000 - 04d8 029c 04d5 jlnz 0x04d5 - 04da 26ff lrs $AC0.M, @CMBL - 04db 02df ret -} - -void 04dc_Unk() { - 04dc 0080 0388 lri $AR0, #0x0388 - 04de 0081 0051 lri $AR1, #0x0051 - 04e0 173f callr $AR1 - 04e1 00de 0344 lr $AC0.M, @0x0344 - 04e3 00fe 0341 sr @0x0341, $AC0.M - 04e5 00de 0345 lr $AC0.M, @0x0345 - 04e7 00fe 038e sr @0x038e, $AC0.M - 04e9 173f callr $AR1 - 04ea 02df ret -} - -///////////////////////// -// -// -// 0x0341: Number of Frames to render ... - -// 0x034c + 0x034d: RAM address of the current PB block - -// 0x034e: Last Sync message for rendered frame -// 0x0354: PB loop counter - -// 0x0355: Current Frame - -// 0x0380: ??? -// 0x0381: ??? - -// 0x0388: RAM Address of Output Buffer1 -// 0x038a: RAM Address of Output Buffer2 -// -// 0x038f: Output Buffer Address (0x0520 most of the time) -// -// 0x03f8: *0x0433 -// 0x0520: Some kind of sample buffer - -// 0x0d00: Left mix buffer -// 0x0d60: Right mix buffer - -void 04eb_COMMAND_02() // sync frame - 04eb 02bf 04dc call 0x04dc - 04ed 009e 8000 lri $AC0.M, #0x8000 - 04ef 00dc 0341 lr $AC0.L, @0x0341 - 04f1 02bf 005a call 0x005a - 04f3 8100 clr $ACC0 - 04f4 00fe 0355 sr @0x0355, $AC0.M - 04f6 02bf 04c5 call 0x04c5 - 04f8 00de 0341 lr $AC0.M, @0x0341 - 04fa 007e 0698 bloop $AC0.M, 0x0698 - 04fc 02bf 03d9 call 0x03d9 - - 04fe 02bf 0446 call 0x0446 - 0500 02bf 0bb6 call 0x0bb6 - 0502 02bf 04d4 call 0x04d4 - 0504 8100 clr $ACC0 - 0505 00fe 0354 sr @0x0354, $AC0.M - 0507 00de 0342 lr $AC0.M, @0x0342 - 0509 007e 064c bloop $AC0.M, 0x064c - 050b 00d8 0354 lr $AX0.L, @0x0354 - 050d 009a 0180 lri $AX0.H, #0x0180 - 050f 8100 clr $ACC0 - 0510 00de 0380 lr $AC0.M, @0x0380 - 0512 00dc 0381 lr $AC0.L, @0x0381 - 0514 9000 mul $AX0.L, $AX0.H - 0515 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0516 00fe 034c sr @0x034c, $AC0.M - 0518 00fc 034d sr @0x034d, $AC0.L - 051a 02bf 0393 call 0x0393 - 051c 00da 0400 lr $AX0.H, @0x0400 - 051e 8600 tstaxh $AX0.H - 051f 0295 0647 jz 0x0647 - 0521 00da 0401 lr $AX0.H, @0x0401 - 0523 8600 tstaxh $AX0.H - 0524 0294 0647 jnz 0x0647 - 0526 00da 0433 lr $AX0.H, @0x0433 - 0528 00fa 03f8 sr @0x03f8, $AX0.H - 052a 00da 0406 lr $AX0.H, @0x0406 - 052c 8600 tstaxh $AX0.H - 052d 0294 0a5e jnz 0x0a5e - 052f 8100 clr $ACC0 - 0530 00de 0480 lr $AC0.M, @0x0480 - 0532 0609 cmpis $ACC0, #0x09 - 0533 0295 0540 jz 0x0540 - 0535 0620 cmpis $ACC0, #0x20 - 0536 0295 08cd jz 0x08cd - 0538 0621 cmpis $ACC0, #0x21 - 0539 0295 08d6 jz 0x08d6 - 053b 0608 cmpis $ACC0, #0x08 - 053c 0295 0a66 jz 0x0a66 - 053e 029f 0266 jmp 0x0266 - 0540 00d8 0402 lr $AX0.L, @0x0402 - 0542 8100 clr $ACC0 - 0543 8900 clr $ACC1 - 0544 00dc 0430 lr $AC0.L, @0x0430 - 0546 8d00 set15 - 0547 0099 0050 lri $AX1.L, #0x0050 - 0549 a000 mulx $AX0.L, $AX1.L - 054a a400 mulxac $AX0.L, $AX1.L, $ACC0 - 054b 1404 lsl $ACC0, #4 - 054c 8c00 clr15 - 054d 1ffe mrr $AC1.M, $AC0.M - 054e 0083 0580 lri $AR3, #0x0580 - 0550 00da 0481 lr $AX0.H, @0x0481 - 0552 8600 tstaxh $AX0.H - 0553 0295 0563 jz 0x0563 - 0555 00da 0489 lr $AX0.H, @0x0489 - 0557 8100 clr $ACC0 - 0558 00de 048b lr $AC0.M, @0x048b - 055a 3800 orr $AC0.M, $AX0.H - 055b 0240 000f andi $AC0.M, #0x000f - 055d 0295 0563 jz 0x0563 - 055f 02bf 07d5 call 0x07d5 - 0561 029f 0565 jmp 0x0565 - 0563 02bf 0966 call 0x0966 - 0565 0080 0580 lri $AR0, #0x0580 - 0567 0081 0520 lri $AR1, #0x0520 - 0569 0099 0000 lri $AX1.L, #0x0000 - 056b 02bf 0141 call 0x0141 - 056d 00da 04a8 lr $AX0.H, @0x04a8 - 056f 8600 tstaxh $AX0.H - 0570 0295 0576 jz 0x0576 - 0572 0080 0520 lri $AR0, #0x0520 - 0574 02bf 0b90 call 0x0b90 - 0576 009e 0520 lri $AC0.M, #0x0520 - 0578 00fe 038f sr @0x038f, $AC0.M - 057a 8900 clr $ACC1 - 057b 00df 0484 lr $AC1.M, @0x0484 - 057d 0340 001f andi $AC1.M, #0x001f - 057f b900 tst $ACC1 - 0580 0295 05a6 jz 0x05a6 - 0582 00de 038f lr $AC0.M, @0x038f - 0584 5c00 sub $ACC0, $AC1.L - 0585 00fe 038f sr @0x038f, $AC0.M - 0587 1c7e mrr $AR3, $AC0.M - 0588 0080 0440 lri $AR0, #0x0440 - 058a 05fe addis $ACC1, #0xfe - 058b 02bf 03ac call 0x03ac - 058d 0080 0490 lri $AR0, #0x0490 - 058f 00c1 038f lr $AR1, @0x038f - 0591 8900 clr $ACC1 - 0592 00df 0484 lr $AC1.M, @0x0484 - 0594 0340 001f andi $AC1.M, #0x001f - 0596 02bf 01e1 call 0x01e1 - 0598 00de 038f lr $AC0.M, @0x038f - 059a 0450 addis $ACC0, #0x50 - 059b 1c1e mrr $AR0, $AC0.M - 059c 0083 0440 lri $AR3, #0x0440 - 059e 8900 clr $ACC1 - 059f 00df 0484 lr $AC1.M, @0x0484 - 05a1 0340 001f andi $AC1.M, #0x001f - 05a3 05fe addis $ACC1, #0xfe - 05a4 02bf 03ac call 0x03ac - 05a6 00de 0484 lr $AC0.M, @0x0484 - 05a8 0240 0020 andi $AC0.M, #0x0020 - 05aa 0295 05c8 jz 0x05c8 - 05ac 0080 04a4 lri $AR0, #0x04a4 - 05ae 00c1 038f lr $AR1, @0x038f - 05b0 0082 0454 lri $AR2, #0x0454 - 05b2 0083 04a7 lri $AR3, #0x04a7 - 05b4 18fa lrrd $AX0.H, @$AR3 - 05b5 8600 tstaxh $AX0.H - 05b6 0294 05c6 jnz 0x05c6 - 05b8 18fa lrrd $AX0.H, @$AR3 - 05b9 8600 tstaxh $AX0.H - 05ba 0294 05c6 jnz 0x05c6 - 05bc 18fa lrrd $AX0.H, @$AR3 - 05bd 8600 tstaxh $AX0.H - 05be 0294 05c6 jnz 0x05c6 - 05c0 8100 clr $ACC0 - 05c1 18fe lrrd $AC0.M, @$AR3 - 05c2 0280 7fff cmpi $AC0.M, #0x7fff - 05c4 0295 05c8 jz 0x05c8 - 05c6 02bf 01fc call 0x01fc - 05c8 8100 clr $ACC0 - 05c9 1c9e mrr $IX0, $AC0.M - 05ca 1cde mrr $IX2, $AC0.M - 05cb 7400 incm $AC0.M - 05cc 1cfe mrr $IX3, $AC0.M - 05cd 8100 clr $ACC0 - 05ce 00de 0407 lr $AC0.M, @0x0407 - 05d0 b100 tst $ACC0 - 05d1 0295 05e0 jz 0x05e0 - 05d3 00c3 038f lr $AR3, @0x038f - 05d5 0007 dar $AR3 - 05d6 0080 0477 lri $AR0, #0x0477 - 05d8 0084 ffff lri $IX0, #0xffff - 05da 0087 ffff lri $IX3, #0xffff - 05dc 199a lrrn $AX0.H, @$AR0 - 05dd 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - 05de 005e loop $AC0.M - 05df 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - 05e0 00da 0485 lr $AX0.H, @0x0485 - 05e2 8600 tstaxh $AX0.H - 05e3 0295 05f6 jz 0x05f6 - 05e5 8900 clr $ACC1 - 05e6 0086 0005 lri $IX2, #0x0005 - 05e8 0082 040a lri $AR2, #0x040a - 05ea 1106 05ee bloopi #0x06, 0x05ee - 05ec 18de lrrd $AC0.M, @$AR2 - 05ed 147f lsr $ACC0, #-1 - 05ee 4d36 add'sn $ACC1, $AC0.L : @$AR2, $AC0.M - 05ef b900 tst $ACC1 - 05f0 0294 05f6 jnz 0x05f6 - 05f2 009a 0001 lri $AX0.H, #0x0001 - 05f4 00fa 0401 sr @0x0401, $AX0.H - 05f6 8f00 set40 - 05f7 0086 0002 lri $IX2, #0x0002 - 05f9 0082 0408 lri $AR2, #0x0408 - 05fb 1106 0626 bloopi #0x06, 0x0626 - 05fd 8100 clr $ACC0 - 05fe 195e lrri $AC0.M, @$AR2 - 05ff 1200 sbclr #0x00 - 0600 b100 tst $ACC0 - 0601 0275 ifz - 0602 1300 sbset #0x00 - 0603 1c7e mrr $AR3, $AC0.M - 0604 195e lrri $AC0.M, @$AR2 - 0605 195f lrri $AC1.M, @$AR2 - 0606 5c00 sub $ACC0, $AC1.L - 0607 14fb asr $ACC0, #-5 - 0608 1f5e mrr $AX0.H, $AC0.M - 0609 1f1c mrr $AX0.L, $AC0.L - 060a 185e lrr $AC0.M, @$AR2 - 060b 0240 00ff andi $AC0.M, #0x00ff - 060d 1f7e mrr $AX1.H, $AC0.M - 060e 185e lrr $AC0.M, @$AR2 - 060f 1478 lsr $ACC0, #-8 - 0610 009c 0000 lri $AC0.L, #0x0000 - 0612 d100 cmpar $ACC1, $AX0.H - 0613 0295 061b jz 0x061b - 0615 185e lrr $AC0.M, @$AR2 - 0616 0272 ifg - 0617 7400 incm $AC0.M - 0618 0271 ifs - 0619 7800 decm $AC0.M - 061a 1a5e srr @$AR2, $AC0.M - 061b 0006 dar $AR2 - 061c 00de 038f lr $AC0.M, @0x038f - 061e 5600 subr $ACC0, $AX1.H - 061f 029d 0624 jlz 0x0624 - 0621 1c1e mrr $AR0, $AC0.M - 0622 02bf 011e call 0x011e - 0624 0000 nop - 0625 1b5f srri @$AR2, $AC1.M - 0626 000a iar $AR2 - 0627 8e00 set16 - 0628 8100 clr $ACC0 - 0629 00de 0407 lr $AC0.M, @0x0407 - 062b b100 tst $ACC0 - 062c 0295 063d jz 0x063d - 062e 00c3 038f lr $AR3, @0x038f - 0630 0087 004f lri $IX3, #0x004f - 0632 001f addarn $AR3, $IX3 - 0633 0080 0477 lri $AR0, #0x0477 - 0635 0084 ffff lri $IX0, #0xffff - 0637 0087 ffff lri $IX3, #0xffff - 0639 19fa lrrn $AX0.H, @$AR3 - 063a 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 063b 005e loop $AC0.M - 063c 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - 063d 00da 0406 lr $AX0.H, @0x0406 - 063f 8600 tstaxh $AX0.H - 0640 0294 0645 jnz 0x0645 - 0642 8100 clr $ACC0 - 0643 00fe 0404 sr @0x0404, $AC0.M - 0645 02bf 039c call 0x039c - - - 0647 00de 0354 lr $AC0.M, @0x0354 - 0649 7400 incm $AC0.M - 064a 00fe 0354 sr @0x0354, $AC0.M - 064c 0000 nop - 064d 16fb 0001 si @DIRQ, #0x0001 - 064f 02bf 0b11 call 0x0b11 - 0651 02bf 0b24 call 0x0b24 - 0653 02bf 0b7b call 0x0b7b - 0655 0080 09a0 lri $AR0, #0x09a0 - 0657 0083 0d00 lri $AR3, #0x0d00 - 0659 009f 0050 lri $AC1.M, #0x0050 - 065b 0098 5a82 lri $AX0.L, #0x5a82 - 065d 02bf 03bd call 0x03bd - 065f 0080 09a0 lri $AR0, #0x09a0 - 0661 0083 0d60 lri $AR3, #0x0d60 - 0663 009f 0050 lri $AC1.M, #0x0050 - 0665 02bf 03bd call 0x03bd - 0667 0083 0d00 lri $AR3, #0x0d00 - 0669 02bf 0130 call 0x0130 - 066b 0081 0388 lri $AR1, #0x0388 - 066d 009f 0d00 lri $AC1.M, #0x0d00 - 066f 0080 0050 lri $AR0, #0x0050 - 0671 02bf 0089 call 0x0089 - 0673 0080 0fa0 lri $AR0, #0x0fa0 - 0675 0083 0d60 lri $AR3, #0x0d60 - 0677 009f 0050 lri $AC1.M, #0x0050 - 0679 0098 8000 lri $AX0.L, #0x8000 - 067b 02bf 03bd call 0x03bd - 067d 0083 0d60 lri $AR3, #0x0d60 - 067f 02bf 0130 call 0x0130 - 0681 0081 038a lri $AR1, #0x038a - 0683 009f 0d60 lri $AC1.M, #0x0d60 - 0685 0080 0050 lri $AR0, #0x0050 - 0687 02bf 0089 call 0x0089 - 0689 009a 0000 lri $AX0.H, #0x0000 - 068b 0098 00a0 lri $AX0.L, #0x00a0 - 068d 0080 0388 lri $AR0, #0x0388 - 068f 02bf 04ce call 0x04ce - 0691 0080 038a lri $AR0, #0x038a - 0693 02bf 04ce call 0x04ce - 0695 02bf 0497 call 0x0497 - 0697 0000 nop - 0698 0000 nop - } - 0699 029f 0031 jmp 0x0031 - 069b 0080 0346 lri $AR0, #0x0346 - 069d 02bf 0051 call 0x0051 - 069f 02bf 0051 call 0x0051 - 06a1 0081 0346 lri $AR1, #0x0346 - 06a3 193e lrri $AC0.M, @$AR1 - 06a4 193c lrri $AC0.L, @$AR1 - 06a5 009f 0400 lri $AC1.M, #0x0400 - 06a7 00c0 0345 lr $AR0, @0x0345 - 06a9 02bf 007e call 0x007e - - 06ab 0081 0348 lri $AR1, #0x0348 - 06ad 193e lrri $AC0.M, @$AR1 - 06ae 193c lrri $AC0.L, @$AR1 - 06af 009f 0800 lri $AC1.M, #0x0800 - 06b1 00c0 0345 lr $AR0, @0x0345 - 06b3 02bf 007e call 0x007e - - 06b5 0081 0346 lri $AR1, #0x0346 - 06b7 193e lrri $AC0.M, @$AR1 - 06b8 193c lrri $AC0.L, @$AR1 - 06b9 009f 0800 lri $AC1.M, #0x0800 - 06bb 00c0 0345 lr $AR0, @0x0345 - 06bd 02bf 008b call 0x008b - - 06bf 0081 0348 lri $AR1, #0x0348 - 06c1 193e lrri $AC0.M, @$AR1 - 06c2 193c lrri $AC0.L, @$AR1 - 06c3 009f 0400 lri $AC1.M, #0x0400 - 06c5 00c0 0345 lr $AR0, @0x0345 - 06c7 02bf 008b call 0x008b - - 06c9 029f 0049 jmp 0x0049 -} - -void 06cb_Unk() { - 06cb 0080 0346 lri $AR0, #0x0346 - 06cd 02bf 0051 call 0x0051 - 06cf 02bf 0051 call 0x0051 - 06d1 0081 0346 lri $AR1, #0x0346 - 06d3 193e lrri $AC0.M, @$AR1 - 06d4 193c lrri $AC0.L, @$AR1 - 06d5 009f 0400 lri $AC1.M, #0x0400 - 06d7 00c0 0345 lr $AR0, @0x0345 - 06d9 02bf 007e call 0x007e - 06db 0081 0348 lri $AR1, #0x0348 - 06dd 193e lrri $AC0.M, @$AR1 - 06de 193c lrri $AC0.L, @$AR1 - 06df 009f 0400 lri $AC1.M, #0x0400 - 06e1 00c0 0345 lr $AR0, @0x0345 - 06e3 02bf 008b call 0x008b - 06e5 029f 0049 jmp 0x0049 -} - -void 06e7_Unk() { - 06e7 0080 0346 lri $AR0, #0x0346 - 06e9 02bf 0051 call 0x0051 - 06eb 02bf 0051 call 0x0051 - 06ed 0081 0346 lri $AR1, #0x0346 - 06ef 193e lrri $AC0.M, @$AR1 - 06f0 193c lrri $AC0.L, @$AR1 - 06f1 009f 0400 lri $AC1.M, #0x0400 - 06f3 00c0 0345 lr $AR0, @0x0345 - 06f5 02bf 00ae call 0x00ae - 06f7 0081 0348 lri $AR1, #0x0348 - 06f9 193e lrri $AC0.M, @$AR1 - 06fa 193c lrri $AC0.L, @$AR1 - 06fb 009f 0400 lri $AC1.M, #0x0400 - 06fd 00c0 0345 lr $AR0, @0x0345 - 06ff 02bf 008b call 0x008b - 0701 029f 0049 jmp 0x0049 - 0703 0080 0346 lri $AR0, #0x0346 - 0705 02bf 0051 call 0x0051 - 0707 02bf 0051 call 0x0051 - 0709 0081 0346 lri $AR1, #0x0346 - 070b 193e lrri $AC0.M, @$AR1 - 070c 193c lrri $AC0.L, @$AR1 - 070d 009f 0400 lri $AC1.M, #0x0400 - 070f 00c0 0344 lr $AR0, @0x0344 - 0711 02bf 007e call 0x007e - 0713 0081 0348 lri $AR1, #0x0348 - 0715 193e lrri $AC0.M, @$AR1 - 0716 193c lrri $AC0.L, @$AR1 - 0717 009f 0800 lri $AC1.M, #0x0800 - 0719 00c0 0344 lr $AR0, @0x0344 - 071b 02bf 007e call 0x007e - 071d 0080 0400 lri $AR0, #0x0400 - 071f 0083 0800 lri $AR3, #0x0800 - 0721 0084 0000 lri $IX0, #0x0000 - 0723 00da 0345 lr $AX0.H, @0x0345 - 0725 00df 0344 lr $AC1.M, @0x0344 - 0727 8f00 set40 - 0728 197b lrri $AX1.H, @$AR3 - 0729 b800 mulx $AX0.H, $AX1.H - 072a 197b lrri $AX1.H, @$AR3 - 072b 007f 0730 bloop $AC1.M, 0x0730 - 072d 199e lrrn $AC0.M, @$AR0 - 072e bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 072f 80b2 nx'sl : $AC0.M, $AX1.H - 0730 0000 nop - 0731 8e00 set16 - 0732 0081 0346 lri $AR1, #0x0346 - 0734 193e lrri $AC0.M, @$AR1 - 0735 193c lrri $AC0.L, @$AR1 - 0736 009f 0400 lri $AC1.M, #0x0400 - 0738 00c0 0344 lr $AR0, @0x0344 - 073a 02bf 008b call 0x008b - 073c 009e 8200 lri $AC0.M, #0x8200 - 073e 00dc 0344 lr $AC0.L, @0x0344 - 0740 02bf 005a call 0x005a - 0742 029f 0031 jmp 0x0031 - 0744 0080 0346 lri $AR0, #0x0346 - 0746 02bf 0051 call 0x0051 - 0748 0081 0346 lri $AR1, #0x0346 - 074a 009f 0400 lri $AC1.M, #0x0400 - 074c 00c0 0345 lr $AR0, @0x0345 - 074e 02bf 007c call 0x007c - 0750 02bf 8644 call 0x8644 - 0752 029f 0049 jmp 0x0049 -} - -void 0754_Unk() { - 0754 009e 0458 lri $AC0.M, #0x0458 - 0756 2231 lrs $AX0.H, @0x0031 - 0757 4400 addr $ACC0, $AX0.H - 0758 1c1e mrr $AR0, $AC0.M - 0759 1fda mrr $AC0.M, $AX0.H - 075a 3280 xorr'ls $AC0.M, $AX1.H : $AX0.L, $AC0.M - 075b 7400 incm $AC0.M - 075c 2232 lrs $AX0.H, @0x0032 - 075d 4400 addr $ACC0, $AX0.H - 075e 0090 0000 lri $AC0.H, #0x0000 - 0760 029f 0771 jmp 0x0771 - 0762 009e 0458 lri $AC0.M, #0x0458 - 0764 2231 lrs $AX0.H, @0x0031 - 0765 4400 addr $ACC0, $AX0.H - 0766 1c1e mrr $AR0, $AC0.M - 0767 1fda mrr $AC0.M, $AX0.H - 0768 3280 xorr'ls $AC0.M, $AX1.H : $AX0.L, $AC0.M - 0769 7400 incm $AC0.M - 076a 2232 lrs $AX0.H, @0x0032 - 076b 4400 addr $ACC0, $AX0.H - 076c 0090 0000 lri $AC0.H, #0x0000 - 076e 8200 cmp - 076f 0270 ifns - 0770 1fdf mrr $AC0.M, $AC1.M - 0771 1f3e mrr $AX1.L, $AC0.M - 0772 02bf 07c8 call 0x07c8 - 0774 2634 lrs $AC0.M, @0x0034 - 0775 2435 lrs $AC0.L, @0x0035 - 0776 7200 addaxl $ACC0, $AX1.L - 0777 5300 subr $ACC1, $AX1.L - 0778 2e34 srs @0x0034, $AC0.M - 0779 2c35 srs @0x0035, $AC0.L - 077a 02df ret -} - -void 077b_Unk() { - 077b 8100 clr $ACC0 - 077c 2234 lrs $AX0.H, @0x0034 - 077d 2035 lrs $AX0.L, @0x0035 - 077e 4800 addax $ACC0, $AX0.L - 077f 147c lsr $ACC0, #-4 - 0780 2e36 srs @0x0036, $AC0.M - 0781 2c37 srs @0x0037, $AC0.L - 0782 2380 lrs $AX1.H, @0xff80 - 0783 8d00 set15 - 0784 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - 0785 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0786 8c00 clr15 - 0787 2035 lrs $AX0.L, @0x0035 - 0788 f000 lsl16 $ACC0 - 0789 4e00 addp $ACC0 - 078a 238c lrs $AX1.H, @0xff8c - 078b 218d lrs $AX1.L, @0xff8d - 078c 4a00 addax $ACC0, $AX1.L - 078d 2e38 srs @0x0038, $AC0.M - 078e 2c39 srs @0x0039, $AC0.L - 078f 1fd8 mrr $AC0.M, $AX0.L - 0790 0240 000f andi $AC0.M, #0x000f - 0792 2e31 srs @0x0031, $AC0.M - 0793 268a lrs $AC0.M, @0xff8a - 0794 248b lrs $AC0.L, @0xff8b - 0795 5800 subax $ACC0, $AX0.L - 0796 2e3a srs @0x003a, $AC0.M - 0797 2c3b srs @0x003b, $AC0.L - 0798 02df ret -} - -void 0799_Unk() { - 0799 2236 lrs $AX0.H, @0x0036 - 079a 2037 lrs $AX0.L, @0x0037 - 079b 8100 clr $ACC0 - 079c 268a lrs $AC0.M, @0xff8a - 079d 248b lrs $AC0.L, @0xff8b - 079e 147c lsr $ACC0, #-4 - 079f 5800 subax $ACC0, $AX0.L - 07a0 0295 07a9 jz 0x07a9 - 07a2 02bf 081b call 0x081b - 07a4 0e10 lris $AC0.M, #0x10 - 07a5 2e32 srs @0x0032, $AC0.M - 07a6 8100 clr $ACC0 - 07a7 2e31 srs @0x0031, $AC0.M - 07a8 02df ret -} - -void 07a9_Unk() { - 07a9 228a lrs $AX0.H, @0xff8a - 07aa 208b lrs $AX0.L, @0xff8b - 07ab 8100 clr $ACC0 - 07ac 2634 lrs $AC0.M, @0x0034 - 07ad 2435 lrs $AC0.L, @0x0035 - 07ae 5800 subax $ACC0, $AX0.L - 07af 0290 07b6 jns 0x07b6 - 07b1 02bf 081b call 0x081b - 07b3 263b lrs $AC0.M, @0x003b - 07b4 029f 07a5 jmp 0x07a5 - 07b6 2688 lrs $AC0.M, @0xff88 - 07b7 2489 lrs $AC0.L, @0xff89 - 07b8 2e34 srs @0x0034, $AC0.M - 07b9 2c35 srs @0x0035, $AC0.L - 07ba 0e10 lris $AC0.M, #0x10 - 07bb 2e32 srs @0x0032, $AC0.M - 07bc 02bf 077b call 0x077b - 07be 2682 lrs $AC0.M, @0xff82 - 07bf 2e67 srs @0x0067, $AC0.M - 07c0 2683 lrs $AC0.M, @0xff83 - 07c1 2e66 srs @0x0066, $AC0.M - 07c2 8100 clr $ACC0 - 07c3 00fe 0362 sr @0x0362, $AC0.M - 07c5 02bf 081b call 0x081b - 07c7 02df ret -} - -void 07c8_Unk() { - 07c8 b100 tst $ACC0 - 07c9 02d5 retz - 07ca 04fe addis $ACC0, #0xfe - 07cb 1f1e mrr $AX0.L, $AC0.M - 07cc 191e lrri $AC0.M, @$AR0 - 07cd 0291 07d3 js 0x07d3 - 07cf 191a lrri $AX0.H, @$AR0 - 07d0 0058 loop $AX0.L - 07d1 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 07d2 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 07d3 1b7e srri @$AR3, $AC0.M - 07d4 02df ret -} - -void 07d5_Unk() { - 07d5 0092 0004 lri $CR, #0x0004 - 07d7 02bf 077b call 0x077b - 07d9 8100 clr $ACC0 - 07da 00fe 0362 sr @0x0362, $AC0.M - 07dc 8100 clr $ACC0 - 07dd 263a lrs $AC0.M, @0x003a - 07de 243b lrs $AC0.L, @0x003b - 07df b100 tst $ACC0 - 07e0 0294 07f2 jnz 0x07f2 - 07e2 02bf 0799 call 0x0799 - 07e4 2231 lrs $AX0.H, @0x0031 - 07e5 8600 tstaxh $AX0.H - 07e6 0294 07ef jnz 0x07ef - 07e8 02bf 0762 call 0x0762 - 07ea b900 tst $ACC1 - 07eb 0295 0818 jz 0x0818 - 07ed 02bf 077b call 0x077b - 07ef 8100 clr $ACC0 - 07f0 263a lrs $AC0.M, @0x003a - 07f1 243b lrs $AC0.L, @0x003b - 07f2 1f1f mrr $AX0.L, $AC1.M - 07f3 009a 0000 lri $AX0.H, #0x0000 - 07f5 5800 subax $ACC0, $AX0.L - 07f6 0290 0805 jns 0x0805 - 07f8 8100 clr $ACC0 - 07f9 2631 lrs $AC0.M, @0x0031 - 07fa b100 tst $ACC0 - 07fb 0294 07ff jnz 0x07ff - 07fd 02bf 0799 call 0x0799 - 07ff 02bf 0754 call 0x0754 - 0801 02bf 077b call 0x077b - 0803 029f 07dc jmp 0x07dc - 0805 8100 clr $ACC0 - 0806 2631 lrs $AC0.M, @0x0031 - 0807 b100 tst $ACC0 - 0808 0294 080c jnz 0x080c - 080a 02bf 0799 call 0x0799 - 080c 02bf 0762 call 0x0762 - 080e b900 tst $ACC1 - 080f 0295 0818 jz 0x0818 - 0811 02bf 077b call 0x077b - 0813 029f 0805 jmp 0x0805 - 0815 8100 clr $ACC0 - 0816 005f loop $AC1.M - 0817 1b7e srri @$AR3, $AC0.M - 0818 0092 00ff lri $CR, #0x00ff - 081a 02df ret -} - -void 081b_Unk() { - 081b 00ff 0360 sr @0x0360, $AC1.M - 081d 00da 0362 lr $AX0.H, @0x0362 - 081f 8600 tstaxh $AX0.H - 0820 0294 082d jnz 0x082d - 0822 0a01 lris $AX0.H, #0x01 - 0823 00fa 0362 sr @0x0362, $AX0.H - 0825 2638 lrs $AC0.M, @0x0038 - 0826 2439 lrs $AC0.L, @0x0039 - 0827 009f 0005 lri $AC1.M, #0x0005 - 0829 02bf 0103 call 0x0103 - 082b 0092 0004 lri $CR, #0x0004 - 082d 0080 ffd3 lri $AR0, #0xffd3 - 082f 0084 0000 lri $IX0, #0x0000 - 0831 199e lrrn $AC0.M, @$AR0 - 0832 1ffe mrr $AC1.M, $AC0.M - 0833 1401 lsl $ACC0, #1 - 0834 0240 001e andi $AC0.M, #0x001e - 0836 0200 0300 addi $AC0.M, #0x0300 - 0838 1c3e mrr $AR1, $AC0.M - 0839 157c lsr $ACC1, #-4 - 083a 0340 000f andi $AC1.M, #0x000f - 083c 0a11 lris $AX0.H, #0x11 - 083d 5500 subr $ACC1, $AX0.H - 083e 009a 00f0 lri $AX0.H, #0x00f0 - 0840 009b 000f lri $AX1.H, #0x000f - 0842 0082 0370 lri $AR2, #0x0370 - 0844 1998 lrrn $AX0.L, @$AR0 - 0845 6000 movr $ACC0, $AX0.L - 0846 1107 084d bloopi #0x07, 0x084d - 0848 3400 andr $AC0.M, $AX0.H - 0849 1408 lsl $ACC0, #8 - 084a 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 084b 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 084c 140c lsl $ACC0, #12 - 084d 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 084e 3400 andr $AC0.M, $AX0.H - 084f 1408 lsl $ACC0, #8 - 0850 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0851 3600 andr $AC0.M, $AX1.H - 0852 140c lsl $ACC0, #12 - 0853 1b5e srri @$AR2, $AC0.M - 0854 8f00 set40 - 0855 1f7f mrr $AX1.H, $AC1.M - 0856 2066 lrs $AX0.L, @0x0066 - 0857 2767 lrs $AC1.M, @0x0067 - 0858 193a lrri $AX0.H, @$AR1 - 0859 1939 lrri $AX1.L, @$AR1 - 085a 0080 0370 lri $AR0, #0x0370 - 085c 0081 0458 lri $AR1, #0x0458 - 085e 1c80 mrr $IX0, $AR0 - 085f a000 mulx $AX0.L, $AX1.L - 0860 ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - 0861 1108 086a bloopi #0x08, 0x086a - 0863 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0864 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0865 1485 asl $ACC0, #5 - 0866 e831 maddc's $AC0.M, $AX1.L : @$AR1, $AC0.M - 0867 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 0868 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 0869 1585 asl $ACC1, #5 - 086a ea39 maddc's $AC1.M, $AX1.L : @$AR1, $AC1.M - 086b 8e00 set16 - 086c 8900 clr $ACC1 - 086d 00df 0360 lr $AC1.M, @0x0360 - 086f 02df ret -} - -void 0870_Unk() { - 0870 0080 0346 lri $AR0, #0x0346 - 0872 02bf 0051 call 0x0051 - 0874 8100 clr $ACC0 - 0875 0080 0458 lri $AR0, #0x0458 - 0877 1010 loopi #0x10 - 0878 1b1e srri @$AR0, $AC0.M - 0879 00fe 0482 sr @0x0482, $AC0.M - 087b 00fe 0483 sr @0x0483, $AC0.M - 087d 009c 0000 lri $AC0.L, #0x0000 - 087f 00fe 0434 sr @0x0434, $AC0.M - 0881 00fc 0435 sr @0x0435, $AC0.L - 0883 009e 0100 lri $AC0.M, #0x0100 - 0885 009c f100 lri $AC0.L, #0xf100 - 0887 00fe 048e sr @0x048e, $AC0.M - 0889 00fc 048f sr @0x048f, $AC0.L - 088b 009e 0040 lri $AC0.M, #0x0040 - 088d 009c 0000 lri $AC0.L, #0x0000 - 088f 00fe 048c sr @0x048c, $AC0.M - 0891 00fc 048d sr @0x048d, $AC0.L - 0893 009e 0009 lri $AC0.M, #0x0009 - 0895 00fe 0480 sr @0x0480, $AC0.M - 0897 009e 0010 lri $AC0.M, #0x0010 - 0899 00fe 0432 sr @0x0432, $AC0.M - 089b 009e 0100 lri $AC0.M, #0x0100 - 089d 009c f250 lri $AC0.L, #0xf250 - 089f 00fe 048a sr @0x048a, $AC0.M - 08a1 00fc 048b sr @0x048b, $AC0.L - 08a3 009c 0000 lri $AC0.L, #0x0000 - 08a5 00fe 0488 sr @0x0488, $AC0.M - 08a7 00fc 0489 sr @0x0489, $AC0.L - 08a9 009e 0001 lri $AC0.M, #0x0001 - 08ab 00fe 0481 sr @0x0481, $AC0.M - 08ad 8900 clr $ACC1 - 08ae 00ff 0401 sr @0x0401, $AC1.M - 08b0 1180 08ca bloopi #0x80, 0x08ca - 08b2 0083 0580 lri $AR3, #0x0580 - 08b4 009f 0100 lri $AC1.M, #0x0100 - 08b6 02bf 07d5 call 0x07d5 - 08b8 0081 0346 lri $AR1, #0x0346 - 08ba 193e lrri $AC0.M, @$AR1 - 08bb 18bc lrrd $AC0.L, @$AR1 - 08bc 009f 0580 lri $AC1.M, #0x0580 - 08be 0080 0100 lri $AR0, #0x0100 - 08c0 02bf 008b call 0x008b - 08c2 0081 0346 lri $AR1, #0x0346 - 08c4 193e lrri $AC0.M, @$AR1 - 08c5 18bc lrrd $AC0.L, @$AR1 - 08c6 0098 0200 lri $AX0.L, #0x0200 - 08c8 7000 addaxl $ACC0, $AX0.L - 08c9 1b3e srri @$AR1, $AC0.M - 08ca 1abc srrd @$AR1, $AC0.L - 08cb 029f 0049 jmp 0x0049 -} - -void 08cd_Unk() { - 08cd 8900 clr $ACC1 - 08ce 009f 0050 lri $AC1.M, #0x0050 - 08d0 0083 0520 lri $AR3, #0x0520 - 08d2 02bf 08e8 call 0x08e8 - 08d4 029f 056d jmp 0x056d -} - -void 08d6_Unk() { - 08d6 00d8 0402 lr $AX0.L, @0x0402 - 08d8 8100 clr $ACC0 - 08d9 8900 clr $ACC1 - 08da 00dc 0430 lr $AC0.L, @0x0430 - 08dc 009a 0050 lri $AX0.H, #0x0050 - 08de 9000 mul $AX0.L, $AX0.H - 08df 9400 mulac $AX0.L, $AX0.H, $ACC0 - 08e0 1404 lsl $ACC0, #4 - 08e1 1ffe mrr $AC1.M, $AC0.M - 08e2 0083 0580 lri $AR3, #0x0580 - 08e4 02bf 08e8 call 0x08e8 - 08e6 029f 0565 jmp 0x0565 -} - -void 08e8_Unk() { - 08e8 0092 0004 lri $CR, #0x0004 - 08ea 8100 clr $ACC0 - 08eb 263a lrs $AC0.M, @0x003a - 08ec 243b lrs $AC0.L, @0x003b - 08ed 1f1f mrr $AX0.L, $AC1.M - 08ee 009a 0000 lri $AX0.H, #0x0000 - 08f0 5800 subax $ACC0, $AX0.L - 08f1 0290 0908 jns 0x0908 - 08f3 8900 clr $ACC1 - 08f4 00c0 043b lr $AR0, @0x043b - 08f6 02bf 092d call 0x092d - 08f8 8100 clr $ACC0 - 08f9 1fd8 mrr $AC0.M, $AX0.L - 08fa 223b lrs $AX0.H, @0x003b - 08fb 5400 subr $ACC0, $AX0.H - 08fc 0007 dar $AR3 - 08fd 1979 lrri $AX1.L, @$AR3 - 08fe 005e loop $AC0.M - 08ff 1b79 srri @$AR3, $AX1.L - 0900 009f 0001 lri $AC1.M, #0x0001 - 0902 2f01 srs @0x0001, $AC1.M - 0903 8900 clr $ACC1 - 0904 2f3b srs @0x003b, $AC1.M - 0905 0092 00ff lri $CR, #0x00ff - 0907 02df ret -} - -void 0908_Unk() { - 0908 2e3a srs @0x003a, $AC0.M - 0909 2c3b srs @0x003b, $AC0.L - 090a 8100 clr $ACC0 - 090b 8900 clr $ACC1 - 090c 268a lrs $AC0.M, @0xff8a - 090d 2734 lrs $AC1.M, @0x0034 - 090e 5c00 sub $ACC0, $AC1.L - 090f 2e36 srs @0x0036, $AC0.M - 0910 5000 subr $ACC0, $AX0.L - 0911 0290 0927 jns 0x0927 - 0913 00c0 0436 lr $AR0, @0x0436 - 0915 02bf 092d call 0x092d - 0917 8100 clr $ACC0 - 0918 1fd8 mrr $AC0.M, $AX0.L - 0919 2236 lrs $AX0.H, @0x0036 - 091a 5400 subr $ACC0, $AX0.H - 091b 1c1e mrr $AR0, $AC0.M - 091c 8100 clr $ACC0 - 091d 2e34 srs @0x0034, $AC0.M - 091e 2688 lrs $AC0.M, @0xff88 - 091f 2489 lrs $AC0.L, @0xff89 - 0920 2e8c srs @0xff8c, $AC0.M - 0921 2c8d srs @0xff8d, $AC0.L - 0922 02bf 092d call 0x092d - 0924 0092 00ff lri $CR, #0x00ff - 0926 02df ret -} - -void 0927_Unk() { - 0927 1c18 mrr $AR0, $AX0.L - 0928 02bf 092d call 0x092d - 092a 0092 00ff lri $CR, #0x00ff - 092c 02df ret -} - -void 092d_Unk() { - 092d 8100 clr $ACC0 - 092e 1fc0 mrr $AC0.M, $AR0 - 092f b100 tst $ACC0 - 0930 02d5 retz - 0931 8900 clr $ACC1 - 0932 2734 lrs $AC1.M, @0x0034 - 0933 0340 0001 andi $AC1.M, #0x0001 - 0935 009b 0000 lri $AX1.H, #0x0000 - 0937 1f3f mrr $AX1.L, $AC1.M - 0938 268c lrs $AC0.M, @0xff8c - 0939 248d lrs $AC0.L, @0xff8d - 093a 8900 clr $ACC1 - 093b 2534 lrs $AC1.L, @0x0034 - 093c 1501 lsl $ACC1, #1 - 093d 4c00 add $ACC0, $AC1.L - 093e 5a00 subax $ACC0, $AX1.L - 093f 5a00 subax $ACC0, $AX1.L - 0940 1c20 mrr $AR1, $AR0 - 0941 1fe0 mrr $AC1.M, $AR0 - 0942 0502 addis $ACC1, #0x02 - 0943 1c1f mrr $AR0, $AC1.M - 0944 009f 0a00 lri $AC1.M, #0x0a00 - 0946 0092 00ff lri $CR, #0x00ff - 0948 02bf 007e call 0x007e - 094a 0092 0004 lri $CR, #0x0004 - 094c 2734 lrs $AC1.M, @0x0034 - 094d 1f61 mrr $AX1.H, $AR1 - 094e 4700 addr $ACC1, $AX1.H - 094f 2f34 srs @0x0034, $AC1.M - 0950 0080 0a00 lri $AR0, #0x0a00 - 0952 8900 clr $ACC1 - 0953 1ff9 mrr $AC1.M, $AX1.L - 0954 b900 tst $ACC1 - 0955 0274 ifnz - 0956 0008 iar $AR0 - 0957 8900 clr $ACC1 - 0958 1fe1 mrr $AC1.M, $AR1 - 0959 191e lrri $AC0.M, @$AR0 - 095a 0701 cmpis $ACC1, #0x01 - 095b 0293 0964 jle 0x0964 - 095d 191a lrri $AX0.H, @$AR0 - 095e 05fe addis $ACC1, #0xfe - 095f 005f loop $AC1.M - 0960 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0961 1b7e srri @$AR3, $AC0.M - 0962 1b7a srri @$AR3, $AX0.H - 0963 02df ret -} - -void 0964_Unk() { - 0964 1b7e srri @$AR3, $AC0.M - 0965 02df ret -} - -void 0966_Unk() { - 0966 0092 0004 lri $CR, #0x0004 - 0968 2201 lrs $AX0.H, @0x0001 - 0969 8600 tstaxh $AX0.H - 096a 0294 0997 jnz 0x0997 - 096c 2204 lrs $AX0.H, @0x0004 - 096d 8600 tstaxh $AX0.H - 096e 02b4 09eb callne 0x09eb - 0970 2231 lrs $AX0.H, @0x0031 - 0971 8600 tstaxh $AX0.H - 0972 0295 098c jz 0x098c - 0974 009e 0458 lri $AC0.M, #0x0458 - 0976 4400 addr $ACC0, $AX0.H - 0977 1c1e mrr $AR0, $AC0.M - 0978 0e10 lris $AC0.M, #0x10 - 0979 5400 subr $ACC0, $AX0.H - 097a 1f7e mrr $AX1.H, $AC0.M - 097b 02bf 07c8 call 0x07c8 - 097d d900 cmpar $ACC1, $AX1.H - 097e 0292 098b jg 0x098b - 0980 0295 0987 jz 0x0987 - 0982 2631 lrs $AC0.M, @0x0031 - 0983 4c00 add $ACC0, $AC1.L - 0984 2e31 srs @0x0031, $AC0.M - 0985 029f 09e8 jmp 0x09e8 - 0987 8100 clr $ACC0 - 0988 2e31 srs @0x0031, $AC0.M - 0989 029f 09e8 jmp 0x09e8 - 098b 5700 subr $ACC1, $AX1.H - 098c 8100 clr $ACC0 - 098d 2605 lrs $AC0.M, @0x0005 - 098e b100 tst $ACC0 - 098f 0295 09a8 jz 0x09a8 - 0991 8100 clr $ACC0 - 0992 2e05 srs @0x0005, $AC0.M - 0993 2281 lrs $AX0.H, @0xff81 - 0994 8600 tstaxh $AX0.H - 0995 0294 099e jnz 0x099e - 0997 8100 clr $ACC0 - 0998 005f loop $AC1.M - 0999 1b7e srri @$AR3, $AC0.M - 099a 7400 incm $AC0.M - 099b 2e01 srs @0x0001, $AC0.M - 099c 029f 09e8 jmp 0x09e8 - 099e 2688 lrs $AC0.M, @0xff88 - 099f 2489 lrs $AC0.L, @0xff89 - 09a0 2e34 srs @0x0034, $AC0.M - 09a1 2c35 srs @0x0035, $AC0.L - 09a2 02bf 09f0 call 0x09f0 - 09a4 2682 lrs $AC0.M, @0xff82 - 09a5 2483 lrs $AC0.L, @0xff83 - 09a6 2e67 srs @0x0067, $AC0.M - 09a7 2c66 srs @0x0066, $AC0.L - 09a8 00ff 0360 sr @0x0360, $AC1.M - 09aa 2638 lrs $AC0.M, @0x0038 - 09ab 2439 lrs $AC0.L, @0x0039 - 09ac 009f 0005 lri $AC1.M, #0x0005 - 09ae 02bf 0103 call 0x0103 - 09b0 0092 0004 lri $CR, #0x0004 - 09b2 8900 clr $ACC1 - 09b3 00ff 0362 sr @0x0362, $AC1.M - 09b5 00df 0360 lr $AC1.M, @0x0360 - 09b7 02bf 0a09 call 0x0a09 - 09b9 8100 clr $ACC0 - 09ba 00de 0362 lr $AC0.M, @0x0362 - 09bc 2280 lrs $AX0.H, @0xff80 - 09bd 4400 addr $ACC0, $AX0.H - 09be 00fe 0362 sr @0x0362, $AC0.M - 09c0 8100 clr $ACC0 - 09c1 263a lrs $AC0.M, @0x003a - 09c2 243b lrs $AC0.L, @0x003b - 09c3 0a01 lris $AX0.H, #0x01 - 09c4 0081 0405 lri $AR1, #0x0405 - 09c6 7a00 dec $ACC0 - 09c7 b100 tst $ACC0 - 09c8 0275 ifz - 09c9 1a3a srr @$AR1, $AX0.H - 09ca 2e3a srs @0x003a, $AC0.M - 09cb 2c3b srs @0x003b, $AC0.L - 09cc 0710 cmpis $ACC1, #0x10 - 09cd 0293 09d6 jle 0x09d6 - 09cf 05f0 addis $ACC1, #0xf0 - 09d0 2205 lrs $AX0.H, @0x0005 - 09d1 8600 tstaxh $AX0.H - 09d2 0294 0991 jnz 0x0991 - 09d4 029f 09b7 jmp 0x09b7 - 09d6 0275 ifz - 09d7 8900 clr $ACC1 - 09d8 2f31 srs @0x0031, $AC1.M - 09d9 1fc3 mrr $AC0.M, $AR3 - 09da 04f0 addis $ACC0, #0xf0 - 09db 1c1e mrr $AR0, $AC0.M - 09dc 0083 0458 lri $AR3, #0x0458 - 09de 0e10 lris $AC0.M, #0x10 - 09df 02bf 07c8 call 0x07c8 - 09e1 2638 lrs $AC0.M, @0x0038 - 09e2 2439 lrs $AC0.L, @0x0039 - 09e3 00d8 0362 lr $AX0.L, @0x0362 - 09e5 7000 addaxl $ACC0, $AX0.L - 09e6 2c39 srs @0x0039, $AC0.L - 09e7 2e38 srs @0x0038, $AC0.M - 09e8 0092 00ff lri $CR, #0x00ff - 09ea 02df ret -} - -void 09eb_Unk() { - 09eb 8100 clr $ACC0 - 09ec 2e34 srs @0x0034, $AC0.M - 09ed 2e35 srs @0x0035, $AC0.M - 09ee 2e66 srs @0x0066, $AC0.M - 09ef 2e67 srs @0x0067, $AC0.M - 09f0 2334 lrs $AX1.H, @0x0034 - 09f1 2135 lrs $AX1.L, @0x0035 - 09f2 268a lrs $AC0.M, @0xff8a - 09f3 248b lrs $AC0.L, @0xff8b - 09f4 5a00 subax $ACC0, $AX1.L - 09f5 147c lsr $ACC0, #-4 - 09f6 2e3a srs @0x003a, $AC0.M - 09f7 2c3b srs @0x003b, $AC0.L - 09f8 2634 lrs $AC0.M, @0x0034 - 09f9 2435 lrs $AC0.L, @0x0035 - 09fa 147c lsr $ACC0, #-4 - 09fb 2280 lrs $AX0.H, @0xff80 - 09fc c010 mulc'mv $AC0.M, $AX0.H : $AX0.L, $AC0.L - 09fd 9600 mulmv $AX0.L, $AX0.H, $ACC0 - 09fe f000 lsl16 $ACC0 - 09ff 4e00 addp $ACC0 - 0a00 238c lrs $AX1.H, @0xff8c - 0a01 218d lrs $AX1.L, @0xff8d - 0a02 4a00 addax $ACC0, $AX1.L - 0a03 2e38 srs @0x0038, $AC0.M - 0a04 2c39 srs @0x0039, $AC0.L - 0a05 8100 clr $ACC0 - 0a06 2e05 srs @0x0005, $AC0.M - 0a07 2e31 srs @0x0031, $AC0.M - 0a08 02df ret -} - - -void 0a09_Unk() { - 0a09 00ff 0360 sr @0x0360, $AC1.M - 0a0b 0080 ffd3 lri $AR0, #0xffd3 - 0a0d 0084 0000 lri $IX0, #0x0000 - 0a0f 199e lrrn $AC0.M, @$AR0 - 0a10 1ffe mrr $AC1.M, $AC0.M - 0a11 1401 lsl $ACC0, #1 - 0a12 0240 001e andi $AC0.M, #0x001e - 0a14 0200 0300 addi $AC0.M, #0x0300 - 0a16 1c3e mrr $AR1, $AC0.M - 0a17 157c lsr $ACC1, #-4 - 0a18 0340 000f andi $AC1.M, #0x000f - 0a1a 0a11 lris $AX0.H, #0x11 - 0a1b 5500 subr $ACC1, $AX0.H - 0a1c 009a 00f0 lri $AX0.H, #0x00f0 - 0a1e 009b 000f lri $AX1.H, #0x000f - 0a20 0082 0370 lri $AR2, #0x0370 - 0a22 1998 lrrn $AX0.L, @$AR0 - 0a23 6000 movr $ACC0, $AX0.L - 0a24 1107 0a2b bloopi #0x07, 0x0a2b - 0a26 3400 andr $AC0.M, $AX0.H - 0a27 1408 lsl $ACC0, #8 - 0a28 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0a29 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 0a2a 140c lsl $ACC0, #12 - 0a2b 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0a2c 3400 andr $AC0.M, $AX0.H - 0a2d 1408 lsl $ACC0, #8 - 0a2e 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0a2f 3600 andr $AC0.M, $AX1.H - 0a30 140c lsl $ACC0, #12 - 0a31 1b5e srri @$AR2, $AC0.M - 0a32 8f00 set40 - 0a33 1f7f mrr $AX1.H, $AC1.M - 0a34 2066 lrs $AX0.L, @0x0066 - 0a35 2767 lrs $AC1.M, @0x0067 - 0a36 193a lrri $AX0.H, @$AR1 - 0a37 1939 lrri $AX1.L, @$AR1 - 0a38 0080 0370 lri $AR0, #0x0370 - 0a3a 1c80 mrr $IX0, $AR0 - 0a3b a000 mulx $AX0.L, $AX1.L - 0a3c ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - 0a3d 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0a3e a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0a3f 1485 asl $ACC0, #5 - 0a40 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 0a41 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 0a42 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 0a43 1585 asl $ACC1, #5 - 0a44 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - 0a45 1106 0a4e bloopi #0x06, 0x0a4e - 0a47 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0a48 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0a49 1485 asl $ACC0, #5 - 0a4a e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 0a4b 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 0a4c a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 0a4d 1585 asl $ACC1, #5 - 0a4e ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - 0a4f 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0a50 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0a51 1485 asl $ACC0, #5 - 0a52 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 0a53 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 0a54 a500 mulxac $AX0.L, $AX1.L, $ACC1 - 0a55 1585 asl $ACC1, #5 - 0a56 1b7f srri @$AR3, $AC1.M - 0a57 2e66 srs @0x0066, $AC0.M - 0a58 2f67 srs @0x0067, $AC1.M - 0a59 8e00 set16 - 0a5a 8900 clr $ACC1 - 0a5b 00df 0360 lr $AC1.M, @0x0360 - 0a5d 02df ret -} - -void 0a5e_Unk() { - 0a5e 0083 0520 lri $AR3, #0x0520 - 0a60 00de 0433 lr $AC0.M, @0x0433 - 0a62 1050 loopi #0x50 - 0a63 1b7e srri @$AR3, $AC0.M - 0a64 029f 056d jmp 0x056d - 0a66 0092 0004 lri $CR, #0x0004 - 0a68 2002 lrs $AX0.L, @0x0002 - 0a69 8100 clr $ACC0 - 0a6a 8900 clr $ACC1 - 0a6b 2430 lrs $AC0.L, @0x0030 - 0a6c 8d00 set15 - 0a6d 0099 0050 lri $AX1.L, #0x0050 - 0a6f a000 mulx $AX0.L, $AX1.L - 0a70 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0a71 1404 lsl $ACC0, #4 - 0a72 8c00 clr15 - 0a73 1ffe mrr $AC1.M, $AC0.M - 0a74 0083 0580 lri $AR3, #0x0580 - 0a76 2201 lrs $AX0.H, @0x0001 - 0a77 8600 tstaxh $AX0.H - 0a78 0294 0a89 jnz 0x0a89 - 0a7a 2204 lrs $AX0.H, @0x0004 - 0a7b 8600 tstaxh $AX0.H - 0a7c 02b4 0ad2 callne 0x0ad2 - 0a7e 8100 clr $ACC0 - 0a7f 2605 lrs $AC0.M, @0x0005 - 0a80 b100 tst $ACC0 - 0a81 0295 0a96 jz 0x0a96 - 0a83 8100 clr $ACC0 - 0a84 2e05 srs @0x0005, $AC0.M - 0a85 2281 lrs $AX0.H, @0xff81 - 0a86 8600 tstaxh $AX0.H - 0a87 0294 0a90 jnz 0x0a90 - 0a89 8100 clr $ACC0 - 0a8a 005f loop $AC1.M - 0a8b 1b7e srri @$AR3, $AC0.M - 0a8c 7400 incm $AC0.M - 0a8d 2e01 srs @0x0001, $AC0.M - 0a8e 029f 0ace jmp 0x0ace - 0a90 2688 lrs $AC0.M, @0xff88 - 0a91 2489 lrs $AC0.L, @0xff89 - 0a92 2e34 srs @0x0034, $AC0.M - 0a93 2c35 srs @0x0035, $AC0.L - 0a94 02bf 0ad5 call 0x0ad5 - 0a96 00ff 0360 sr @0x0360, $AC1.M - 0a98 2638 lrs $AC0.M, @0x0038 - 0a99 2439 lrs $AC0.L, @0x0039 - 0a9a 009f 0005 lri $AC1.M, #0x0005 - 0a9c 02bf 0103 call 0x0103 - 0a9e 0092 0004 lri $CR, #0x0004 - 0aa0 00df 0360 lr $AC1.M, @0x0360 - 0aa2 8100 clr $ACC0 - 0aa3 263a lrs $AC0.M, @0x003a - 0aa4 b100 tst $ACC0 - 0aa5 0294 0ab5 jnz 0x0ab5 - 0aa7 263b lrs $AC0.M, @0x003b - 0aa8 5c00 sub $ACC0, $AC1.L - 0aa9 0290 0ab5 jns 0x0ab5 - 0aab 223b lrs $AX0.H, @0x003b - 0aac 02bf 0ae6 call 0x0ae6 - 0aae 5500 subr $ACC1, $AX0.H - 0aaf 009a 0001 lri $AX0.H, #0x0001 - 0ab1 00fa 0405 sr @0x0405, $AX0.H - 0ab3 029f 0a83 jmp 0x0a83 - 0ab5 1f5f mrr $AX0.H, $AC1.M - 0ab6 02bf 0ae6 call 0x0ae6 - 0ab8 00fa 0362 sr @0x0362, $AX0.H - 0aba 8100 clr $ACC0 - 0abb 263a lrs $AC0.M, @0x003a - 0abc 243b lrs $AC0.L, @0x003b - 0abd 1570 lsr $ACC1, #-16 - 0abe 0a01 lris $AX0.H, #0x01 - 0abf 0081 0405 lri $AR1, #0x0405 - 0ac1 5c00 sub $ACC0, $AC1.L - 0ac2 b100 tst $ACC0 - 0ac3 0275 ifz - 0ac4 1a3a srr @$AR1, $AX0.H - 0ac5 2e3a srs @0x003a, $AC0.M - 0ac6 2c3b srs @0x003b, $AC0.L - 0ac7 2638 lrs $AC0.M, @0x0038 - 0ac8 2439 lrs $AC0.L, @0x0039 - 0ac9 00d8 0362 lr $AX0.L, @0x0362 - 0acb 7000 addaxl $ACC0, $AX0.L - 0acc 2c39 srs @0x0039, $AC0.L - 0acd 2e38 srs @0x0038, $AC0.M - 0ace 0092 00ff lri $CR, #0x00ff - 0ad0 029f 0565 jmp 0x0565 - 0ad2 8100 clr $ACC0 - 0ad3 2e34 srs @0x0034, $AC0.M - 0ad4 2e35 srs @0x0035, $AC0.M - 0ad5 2334 lrs $AX1.H, @0x0034 - 0ad6 2135 lrs $AX1.L, @0x0035 - 0ad7 268a lrs $AC0.M, @0xff8a - 0ad8 248b lrs $AC0.L, @0xff8b - 0ad9 5a00 subax $ACC0, $AX1.L - 0ada 2e3a srs @0x003a, $AC0.M - 0adb 2c3b srs @0x003b, $AC0.L - 0adc 2634 lrs $AC0.M, @0x0034 - 0add 2435 lrs $AC0.L, @0x0035 - 0ade 238c lrs $AX1.H, @0xff8c - 0adf 218d lrs $AX1.L, @0xff8d - 0ae0 4a00 addax $ACC0, $AX1.L - 0ae1 2e38 srs @0x0038, $AC0.M - 0ae2 2c39 srs @0x0039, $AC0.L - 0ae3 8100 clr $ACC0 - 0ae4 2e05 srs @0x0005, $AC0.M - 0ae5 02df ret -} - -void 0ae6_ConvSigned8bitToSigned16bit() { - 0ae6 0080 ffd3 lri $AR0, #0xffd3 - 0ae8 0084 0000 lri $IX0, #0x0000 - 0aea 007a 0aee bloop $AX0.H, 0x0aee - 0aec 199e lrrn $AC0.M, @$AR0 - 0aed 1488 asl $ACC0, #8 - 0aee 1b7e srri @$AR3, $AC0.M - 0aef 02df ret -} - -void 0af0_Unk() { - 0af0 009e ffff lri $AC0.M, #0xffff - 0af2 00fe 03f2 sr @0x03f2, $AC0.M - 0af4 8100 clr $ACC0 - 0af5 00fe 03f0 sr @0x03f0, $AC0.M - 0af7 00fe 03f6 sr @0x03f6, $AC0.M - 0af9 009e 0100 lri $AC0.M, #0x0100 - 0afb 00fe 03f7 sr @0x03f7, $AC0.M - 0afd 00da 03f7 lr $AX0.H, @0x03f7 - 0aff 009e 8000 lri $AC0.M, #0x8000 - 0b01 5400 subr $ACC0, $AX0.H - 0b02 00fe 03f5 sr @0x03f5, $AC0.M - 0b04 009e 0030 lri $AC0.M, #0x0030 - 0b06 00fe 03f3 sr @0x03f3, $AC0.M - 0b08 009e 0010 lri $AC0.M, #0x0010 - 0b0a 00fe 03f4 sr @0x03f4, $AC0.M - 0b0c 009e 0096 lri $AC0.M, #0x0096 - 0b0e 00fe 03f1 sr @0x03f1, $AC0.M - 0b10 02df ret -} - -void 0b11_Unk() { - 0b11 0080 0b00 lri $AR0, #0x0b00 - 0b13 8100 clr $ACC0 - 0b14 00de 03f0 lr $AC0.M, @0x03f0 - 0b16 8900 clr $ACC1 - 0b17 b100 tst $ACC0 - 0b18 0275 ifz - 0b19 0550 addis $ACC1, #0x50 - 0b1a 00ff 03f0 sr @0x03f0, $AC1.M - 0b1c 0200 0b60 addi $AC0.M, #0x0b60 - 0b1e 1c7e mrr $AR3, $AC0.M - 0b1f 009f 004e lri $AC1.M, #0x004e - 0b21 02bf 03ac call 0x03ac - 0b23 02df ret -} - -void 0b24_Unk() { - - 0b24 00de 03f1 lr $AC0.M, @0x03f1 - 0b26 0200 0b60 addi $AC0.M, #0x0b60 - 0b28 1c7e mrr $AR3, $AC0.M - 0b29 8100 clr $ACC0 - 0b2a 8900 clr $ACC1 - 0b2b 009f 00a0 lri $AC1.M, #0x00a0 - 0b2d 00de 03f1 lr $AC0.M, @0x03f1 - 0b2f 5d00 sub $ACC1, $AC0.L - 0b30 009e 0050 lri $AC0.M, #0x0050 - 0b32 0750 cmpis $ACC1, #0x50 - 0b33 0270 ifns - 0b34 5d00 sub $ACC1, $AC0.L - 0b35 00da 03f2 lr $AX0.H, @0x03f2 - 0b37 8600 tstaxh $AX0.H - 0b38 0290 0b56 jns 0x0b56 - 0b3a 00de 03f3 lr $AC0.M, @0x03f3 - 0b3c 5c00 sub $ACC0, $AC1.L - 0b3d 0293 0b41 jle 0x0b41 - 0b3f 029f 0b5b jmp 0x0b5b - 0b41 00db 03f7 lr $AX1.H, @0x03f7 - 0b43 009e 8000 lri $AC0.M, #0x8000 - 0b45 4600 addr $ACC0, $AX1.H - 0b46 029f 0b4d jmp 0x0b4d - 0b48 00db 03f7 lr $AX1.H, @0x03f7 - 0b4a 009e 8000 lri $AC0.M, #0x8000 - 0b4c 5600 subr $ACC0, $AX1.H - 0b4d 00fe 03f5 sr @0x03f5, $AC0.M - 0b4f 1fda mrr $AC0.M, $AX0.H - 0b50 7c00 neg $ACC0 - 0b51 1f5e mrr $AX0.H, $AC0.M - 0b52 00fe 03f2 sr @0x03f2, $AC0.M - 0b54 029f 0b5b jmp 0x0b5b - 0b56 00de 03f4 lr $AC0.M, @0x03f4 - 0b58 5d00 sub $ACC1, $AC0.L - 0b59 0293 0b48 jle 0x0b48 - 0b5b 8900 clr $ACC1 - 0b5c 00dd 03f5 lr $AC1.L, @0x03f5 - 0b5e 1501 lsl $ACC1, #1 - 0b5f 8100 clr $ACC0 - 0b60 00dc 03f6 lr $AC0.L, @0x03f6 - 0b62 008b 009f lri $WR3, #0x009f - 0b64 0080 0b00 lri $AR0, #0x0b00 - 0b66 0099 0000 lri $AX1.L, #0x0000 - 0b68 1150 0b6f bloopi #0x50, 0x0b6f - 0b6a 1878 lrr $AX0.L, @$AR3 - 0b6b 4c00 add $ACC0, $AC1.L - 0b6c 1cfe mrr $IX3, $AC0.M - 0b6d 001f addarn $AR3, $IX3 - 0b6e 1fd9 mrr $AC0.M, $AX1.L - 0b6f 1b18 srri @$AR0, $AX0.L - 0b70 009f 0b60 lri $AC1.M, #0x0b60 - 0b72 1fc3 mrr $AC0.M, $AR3 - 0b73 5c00 sub $ACC0, $AC1.L - 0b74 00fe 03f1 sr @0x03f1, $AC0.M - 0b76 00fc 03f6 sr @0x03f6, $AC0.L - 0b78 008b ffff lri $WR3, #0xffff - 0b7a 02df ret -} - -void 0b7b_Unk() { - 0b7b 009f 0050 lri $AC1.M, #0x0050 - 0b7d 0080 0b00 lri $AR0, #0x0b00 - 0b7f 0083 0d60 lri $AR3, #0x0d60 - 0b81 0098 3fff lri $AX0.L, #0x3fff - 0b83 02bf 03bd call 0x03bd - 0b85 009f 0050 lri $AC1.M, #0x0050 - 0b87 0080 0b00 lri $AR0, #0x0b00 - 0b89 0083 0d00 lri $AR3, #0x0d00 - 0b8b 0098 3fff lri $AX0.L, #0x3fff - 0b8d 02bf 03bd call 0x03bd - 0b8f 02df ret -} - -void 0b90_Unk() { - 0b90 8a00 m2 - 0b91 8f00 set40 - 0b92 8100 clr $ACC0 - 0b93 00de 0404 lr $AC0.M, @0x0404 - 0b95 b100 tst $ACC0 - 0b96 0295 0b9d jz 0x0b9d - 0b98 8100 clr $ACC0 - 0b99 00fe 0478 sr @0x0478, $AC0.M - 0b9b 00fe 0479 sr @0x0479, $AC0.M - 0b9d 00df 0479 lr $AC1.M, @0x0479 - 0b9f 00db 0478 lr $AX1.H, @0x0478 - 0ba1 0099 0000 lri $AX1.L, #0x0000 - 0ba3 0084 0000 lri $IX0, #0x0000 - 0ba5 1150 0bae bloopi #0x50, 0x0bae - 0ba7 199e lrrn $AC0.M, @$AR0 - 0ba8 5c7c sub'ln $ACC0, $AC1.L : $AC1.M, @$AR0 - 0ba9 c000 mulc $AC0.M, $AX0.H - 0baa 6e00 movp $ACC0 - 0bab 1488 asl $ACC0, #8 - 0bac 4a00 addax $ACC0, $AX1.L - 0bad 1b1e srri @$AR0, $AC0.M - 0bae 1f7e mrr $AX1.H, $AC0.M - 0baf 00fb 0478 sr @0x0478, $AX1.H - 0bb1 00ff 0479 sr @0x0479, $AC1.M - 0bb3 8b00 m0 - 0bb4 8e00 set16 - 0bb5 02df ret -} - -void 0bb6_Unk() { - 0bb6 0080 01be lri $AR0, #0x01be - 0bb8 1918 lrri $AX0.L, @$AR0 - 0bb9 191a lrri $AX0.H, @$AR0 - 0bba 0080 0180 lri $AR0, #0x0180 - 0bbc 0083 0180 lri $AR3, #0x0180 - 0bbe 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0bbf 1ffe mrr $AC1.M, $AC0.M - 0bc0 1120 0bc7 bloopi #0x20, 0x0bc7 - 0bc2 7c00 neg $ACC0 - 0bc3 d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0bc4 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0bc5 c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 0bc6 1501 lsl $ACC1, #1 - 0bc7 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - 0bc8 0080 01fe lri $AR0, #0x01fe - 0bca 191a lrri $AX0.H, @$AR0 - 0bcb 1918 lrri $AX0.L, @$AR0 - 0bcc 0080 01c0 lri $AR0, #0x01c0 - 0bce 0083 01c0 lri $AR3, #0x01c0 - 0bd0 1ff8 mrr $AC1.M, $AX0.L - 0bd1 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0bd2 f800 addpaxz $ACC0, $AX0.H - 0bd3 0240 01ff andi $AC0.M, #0x01ff - 0bd5 0260 2000 ori $AC0.M, #0x2000 - 0bd7 02bf 0bda call 0x0bda - 0bd9 02df ret -} - -void 0bda_Unk() { - 0bda b900 tst $ACC1 - 0bdb 0272 ifg - 0bdc 7c00 neg $ACC0 - 0bdd 1f7e mrr $AX1.H, $AC0.M - 0bde 4700 addr $ACC1, $AX1.H - 0bdf 1110 0be4 bloopi #0x10, 0x0be4 - 0be1 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0be2 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0be3 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0be4 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0be5 02df ret -} - -void 0be6_Nop() { - 0be6 0000 nop - 0be7 0000 nop - 0be8 0000 nop - 0be9 0000 nop - 0bea 0000 nop - 0beb 0000 nop - 0bec 0000 nop - 0bed 0000 nop - 0bee 0000 nop - 0bef 0000 nop -} \ No newline at end of file diff --git a/docs/DSP/DSP_UC_MP2.txt b/docs/DSP/DSP_UC_MP2.txt deleted file mode 100644 index a0eedb801f..0000000000 --- a/docs/DSP/DSP_UC_MP2.txt +++ /dev/null @@ -1,2875 +0,0 @@ -// A common version of AX, especially in early games. CR is set to #FF all the -// time in this ucode, so srs/lrs always operate on hw registers. - - 0000 0000 nop - 0001 0000 nop - 0002 029f 0e71 jmp 0x0e71 - 0004 029f 0e80 jmp 0x0e80 - 0006 029f 0e9c jmp 0x0e9c - 0008 029f 0ebc jmp 0x0ebc - 000a 029f 0ec2 jmp 0x0ec2 - 000c 029f 0ef4 jmp 0x0ef4 - 000e 029f 0efa jmp 0x0efa - -void 0010_Entry() { - 0010 1302 sbset #0x02 - 0011 1303 sbset #0x03 - 0012 1204 sbclr #0x04 - 0013 1305 sbset #0x05 - 0014 1306 sbset #0x06 - 0015 8e00 set16 - 0016 8c00 clr15 - 0017 8b00 m0 - 0018 0092 00ff lri $CR, #0x00ff - 001a 8100 clr $ACC0 - 001b 8900 clr $ACC1 - 001c 009e 0e80 lri $AC0.M, #0x0e80 - 001e 00fe 0e1b sr @0x0e1b, $AC0.M - 0020 8100 clr $ACC0 - 0021 00fe 0e31 sr @0x0e31, $AC0.M - 0023 16fc dcd1 si @DMBH, #0xdcd1 - 0025 16fd 0000 si @DMBL, #0x0000 - 0027 16fb 0001 si @DIRQ, #0x0001 - 0029 26fc lrs $AC0.M, @DMBH - 002a 02a0 8000 andf $AC0.M, #0x8000 - 002c 029c 0029 jlnz 0x0029 - 002e 029f 0045 jmp 0x0045 -} - -void 0030_Unk_Restart() { - 0030 1302 sbset #0x02 - 0031 1303 sbset #0x03 - 0032 1204 sbclr #0x04 - 0033 1305 sbset #0x05 - 0034 1306 sbset #0x06 - 0035 8e00 set16 - 0036 8c00 clr15 - 0037 8b00 m0 - 0038 0092 00ff lri $CR, #0x00ff - 003a 16fc dcd1 si @DMBH, #0xdcd1 - 003c 16fd 0001 si @DMBL, #0x0001 - 003e 16fb 0001 si @DIRQ, #0x0001 - - do { - // 0040 26fc lrs $AC0.M, @DMBH - // 0041 02a0 8000 andf $AC0.M, #0x8000 - // 0043 029c 0040 jlnz 0x0040 - } while (DMBH & 0x8000); - - 0045 8e00 set16 - 0046 8100 clr $ACC0 - 0047 8900 clr $ACC1 - 0048 009f babe lri $AC1.M, #0xbabe - - do { - // 004a 26fe lrs $AC0.M, @CMBH - // 004b 02c0 8000 andcf $AC0.M, #0x8000 - // 004d 029c 004a jlnz 0x004a - // 004f 8200 cmp - // 0050 0294 004a jnz 0x004a - } while (CMBH & 0x8000 && CMBH == 0xbabe); - - 0052 23ff lrs $AX1.H, @CMBL - 0053 8100 clr $ACC0 - do { - // 0054 26fe lrs $AC0.M, @CMBH - // 0055 02c0 8000 andcf $AC0.M, #0x8000 - // 0057 029c 0054 jlnz 0x0054 - } while (CMBH & 0x8000) - - 0059 27ff lrs $AC1.M, @CMBL - 005a 0240 7fff andi $AC0.M, #0x7fff - 005c 2ece srs @DSMAH, $AC0.M - 005d 2fcf srs @DSMAL, $AC1.M - 005e 16cd 0c00 si @DSPA, #0x0c00 - 0060 8100 clr $ACC0 - 0061 2ec9 srs @DSCR, $AC0.M - 0062 1ffb mrr $AC1.M, $AX1.H - 0063 2fcb srs @DSBL, $AC1.M - 0064 02bf 0652 call 0652_WaitDMA - - 0066 0080 0c00 lri $AR0, #0x0c00 - 0068 8e00 set16 - 0069 8100 clr $ACC0 - 006a 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 006b b100 tst $ACC0 - 006c 0291 007e jl 0x007e - 006e 0a13 lris $AX0.H, #0x13 - 006f c100 cmpar $ACC0, $AX0.H - 0070 0292 007e jg 0x007e - 0072 009f 0c86 lri $AC1.M, #0x0c86 - 0074 4c00 add $ACC0, $ACC1 - 0075 1c7e mrr $AR3, $AC0.M - 0076 0213 ilrr $AC0.M, @$AR3 - 0077 1c7e mrr $AR3, $AC0.M - 0078 176f jmpr $AR3 - - // Check for bad ucode mail - 0079 16fc fbad si @DMBH, #0xfbad - 007b 16fd 8080 si @DMBL, #0x8080 - 007d 0021 halt - - // Check for bad ucode mail - 007e 16fc baad si @DMBH, #0xbaad - 0080 2efd srs @DMBL, $AC0.M - - 0082 8d00 set15 - 0083 8f00 set40 - 0084 8a00 m2 - 0085 8900 clr $ACC1 - 0086 8168 clr'l $ACC0 : $AC1.L, @$AR0 - 0087 0098 0000 lri $AX0.L, #0x0000 - 0089 0099 0001 lri $AX1.L, #0x0001 - 008b 0081 0000 lri $AR1, #0x0000 - 008d 193e lrri $AC0.M, @$AR1 - 008e 193c lrri $AC0.L, @$AR1 - - // 008f 11a0 009a bloopi #0xa0, 0x009a - for (int i = 0; i < 0x140; i+=2) { - 0091 a100 tstaxl $ACC0 - 0092 8271 cmp'l : $AC0.M, @$AR1 - 0093 0277 ifc - 0094 1f19 mrr $AX0.L, $AX1.L - 0095 193c lrri $AC0.L, @$AR1 - 0096 a100 tstaxl $ACC0 - 0097 8271 cmp'l : $AC0.M, @$AR1 - 0098 0277 ifc - 0099 1f19 mrr $AX0.L, $AX1.L - 009a 193c lrri $AC0.L, @$AR1 - } - - 009b 1fd8 mrr $AC0.M, $AX0.L - 009c b100 tst $ACC0 - 009d 0294 00cb jnz 0x00cb - 009f 00de 0e44 lr $AC0.M, @0x0e44 - 00a1 b100 tst $ACC0 - 00a2 0294 00ab jnz 0x00ab - 00a4 191c lrri $AC0.L, @$AR0 - 00a5 191c lrri $AC0.L, @$AR0 - 00a6 191c lrri $AC0.L, @$AR0 - 00a7 00e0 0e45 sr @0x0e45, $AR0 - 00a9 029f 0114 jmp 0x0114 - 00ab 8b00 m0 - 00ac 7a00 dec $ACC0 - 00ad 00fe 0e44 sr @0x0e44, $AC0.M - 00af 8400 clrp - 00b0 0099 0140 lri $AX1.L, #0x0140 - 00b2 1f1e mrr $AX0.L, $AC0.M - 00b3 a000 mulx $AX0.L, $AX1.L - 00b4 191e lrri $AC0.M, @$AR0 - 00b5 191e lrri $AC0.M, @$AR0 - 00b6 191c lrri $AC0.L, @$AR0 - 00b7 00e0 0e45 sr @0x0e45, $AR0 - 00b9 009a 0000 lri $AX0.H, #0x0000 - 00bb 0098 0dc0 lri $AX0.L, #0x0dc0 - 00bd 4e00 addp $ACC0 - 00be 4800 addax $ACC0, $AX0.L - 00bf 2ece srs @DSMAH, $AC0.M - 00c0 2ccf srs @DSMAL, $AC0.L - 00c1 009e 0e48 lri $AC0.M, #0x0e48 - 00c3 2ecd srs @DSPA, $AC0.M - 00c4 0e00 lris $AC0.M, #0x00 - 00c5 2ec9 srs @DSCR, $AC0.M - 00c6 009e 0140 lri $AC0.M, #0x0140 - 00c8 2ecb srs @DSBL, $AC0.M - 00c9 029f 00e3 jmp 0x00e3 - - 00cb 8b00 m0 - 00cc 00d8 0e44 lr $AX0.L, @0x0e44 - 00ce 0099 0140 lri $AX1.L, #0x0140 - 00d0 a000 mulx $AX0.L, $AX1.L - 00d1 191e lrri $AC0.M, @$AR0 - 00d2 00fe 0e44 sr @0x0e44, $AC0.M - 00d4 191e lrri $AC0.M, @$AR0 - 00d5 191c lrri $AC0.L, @$AR0 - 00d6 00e0 0e45 sr @0x0e45, $AR0 - 00d8 4e00 addp $ACC0 - 00d9 2ece srs @DSMAH, $AC0.M - 00da 2ccf srs @DSMAL, $AC0.L - 00db 009e 0e48 lri $AC0.M, #0x0e48 - 00dd 2ecd srs @DSPA, $AC0.M - 00de 0e00 lris $AC0.M, #0x00 - 00df 2ec9 srs @DSCR, $AC0.M - 00e0 009e 0140 lri $AC0.M, #0x0140 - 00e2 2ecb srs @DSBL, $AC0.M - 00e3 02bf 0652 call 0652_WaitDMA - 00e5 8a48 m2'l : $AX1.L, @$AR0 - 00e6 0083 0e48 lri $AR3, #0x0e48 - 00e8 0080 0000 lri $AR0, #0x0000 - 00ea 0081 0000 lri $AR1, #0x0000 - 00ec 1979 lrri $AX1.L, @$AR3 - 00ed 193a lrri $AX0.H, @$AR1 - 00ee b041 mulx'l $AX0.H, $AX1.L : $AX0.L, @$AR1 - 00ef a64b mulxmv'l $AX0.L, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 00f0 f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 00f1 b441 mulxac'l $AX0.H, $AX1.L, $ACC0 : $AX0.L, @$AR1 - 00f2 9100 asr16 $ACC0 - 00f3 1150 00fc bloopi #0x50, 0x00fc - 00f5 a792 mulxmv'sl $AX0.L, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 00f6 f151 lsl16'l $ACC1 : $AX0.H, @$AR1 - 00f7 b520 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR0, $AC0.L - 00f8 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 00f9 a693 mulxmv'sl $AX0.L, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 00fa f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 00fb b428 mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC1.L - 00fc 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 00fd 0083 0e48 lri $AR3, #0x0e48 - 00ff 0080 0140 lri $AR0, #0x0140 - 0101 0081 0140 lri $AR1, #0x0140 - 0103 1979 lrri $AX1.L, @$AR3 - 0104 193a lrri $AX0.H, @$AR1 - 0105 b041 mulx'l $AX0.H, $AX1.L : $AX0.L, @$AR1 - 0106 a64b mulxmv'l $AX0.L, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 0107 f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 0108 b441 mulxac'l $AX0.H, $AX1.L, $ACC0 : $AX0.L, @$AR1 - 0109 9100 asr16 $ACC0 - 010a 1150 0113 bloopi #0x50, 0x0113 - 010c a792 mulxmv'sl $AX0.L, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 010d f151 lsl16'l $ACC1 : $AX0.H, @$AR1 - 010e b520 mulxac's $AX0.H, $AX1.L, $ACC1 : @$AR0, $AC0.L - 010f 9941 asr16'l $ACC1 : $AX0.L, @$AR1 - 0110 a693 mulxmv'sl $AX0.L, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 0111 f051 lsl16'l $ACC0 : $AX0.H, @$AR1 - 0112 b428 mulxac's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC1.L - 0113 9141 asr16'l $ACC0 : $AX0.L, @$AR1 - 0114 00c0 0e45 lr $AR0, @0x0e45 - 0116 029f 0068 jmp 0x0068 - 0118 8100 clr $ACC0 - 0119 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 011a 8e78 set16'l : $AC1.M, @$AR0 - 011b 2ece srs @DSMAH, $AC0.M - 011c 2fcf srs @DSMAL, $AC1.M - 011d 009e 0e48 lri $AC0.M, #0x0e48 - 011f 2ecd srs @DSPA, $AC0.M - 0120 0e00 lris $AC0.M, #0x00 - 0121 2ec9 srs @DSCR, $AC0.M - 0122 009e 0040 lri $AC0.M, #0x0040 - 0124 2ecb srs @DSBL, $AC0.M - 0125 0081 0e48 lri $AR1, #0x0e48 - 0127 0082 0000 lri $AR2, #0x0000 - 0129 009b 009f lri $AX1.H, #0x009f - 012b 009a 0140 lri $AX0.H, #0x0140 - 012d 8100 clr $ACC0 - 012e 8900 clr $ACC1 - 012f 8f00 set40 - 0130 02bf 0652 call 0652_WaitDMA - 0132 193e lrri $AC0.M, @$AR1 - 0133 193c lrri $AC0.L, @$AR1 - 0134 b100 tst $ACC0 - 0135 193f lrri $AC1.M, @$AR1 - 0136 0294 013c jnz 0x013c - 0138 005a loop $AX0.H - 0139 1b5e srri @$AR2, $AC0.M - 013a 029f 0144 jmp 0x0144 - 013c 9900 asr16 $ACC1 - 013d 1b5e srri @$AR2, $AC0.M - 013e 1b5c srri @$AR2, $AC0.L - 013f 007b 0143 bloop $AX1.H, 0x0143 - 0141 4c00 add $ACC0, $ACC1 - 0142 1b5e srri @$AR2, $AC0.M - 0143 1b5c srri @$AR2, $AC0.L - 0144 193e lrri $AC0.M, @$AR1 - 0145 193c lrri $AC0.L, @$AR1 - 0146 b100 tst $ACC0 - 0147 193f lrri $AC1.M, @$AR1 - 0148 0294 014e jnz 0x014e - 014a 005a loop $AX0.H - 014b 1b5e srri @$AR2, $AC0.M - 014c 029f 0156 jmp 0x0156 - 014e 9900 asr16 $ACC1 - 014f 1b5e srri @$AR2, $AC0.M - 0150 1b5c srri @$AR2, $AC0.L - 0151 007b 0155 bloop $AX1.H, 0x0155 - 0153 4c00 add $ACC0, $ACC1 - 0154 1b5e srri @$AR2, $AC0.M - 0155 1b5c srri @$AR2, $AC0.L - 0156 193e lrri $AC0.M, @$AR1 - 0157 193c lrri $AC0.L, @$AR1 - 0158 b100 tst $ACC0 - 0159 193f lrri $AC1.M, @$AR1 - 015a 0294 0160 jnz 0x0160 - 015c 005a loop $AX0.H - 015d 1b5e srri @$AR2, $AC0.M - 015e 029f 0168 jmp 0x0168 - 0160 9900 asr16 $ACC1 - 0161 1b5e srri @$AR2, $AC0.M - 0162 1b5c srri @$AR2, $AC0.L - 0163 007b 0167 bloop $AX1.H, 0x0167 - 0165 4c00 add $ACC0, $ACC1 - 0166 1b5e srri @$AR2, $AC0.M - 0167 1b5c srri @$AR2, $AC0.L - 0168 0082 0400 lri $AR2, #0x0400 - 016a 193e lrri $AC0.M, @$AR1 - 016b 193c lrri $AC0.L, @$AR1 - 016c b179 tst'l $ACC0 : $AC1.M, @$AR1 - 016d 0294 0173 jnz 0x0173 - 016f 005a loop $AX0.H - 0170 1b5e srri @$AR2, $AC0.M - 0171 029f 017b jmp 0x017b - 0173 9900 asr16 $ACC1 - 0174 1b5e srri @$AR2, $AC0.M - 0175 1b5c srri @$AR2, $AC0.L - 0176 007b 017a bloop $AX1.H, 0x017a - 0178 4c00 add $ACC0, $ACC1 - 0179 1b5e srri @$AR2, $AC0.M - 017a 1b5c srri @$AR2, $AC0.L - 017b 193e lrri $AC0.M, @$AR1 - 017c 193c lrri $AC0.L, @$AR1 - 017d b179 tst'l $ACC0 : $AC1.M, @$AR1 - 017e 0294 0184 jnz 0x0184 - 0180 005a loop $AX0.H - 0181 1b5e srri @$AR2, $AC0.M - 0182 029f 018c jmp 0x018c - 0184 9900 asr16 $ACC1 - 0185 1b5e srri @$AR2, $AC0.M - 0186 1b5c srri @$AR2, $AC0.L - 0187 007b 018b bloop $AX1.H, 0x018b - 0189 4c00 add $ACC0, $ACC1 - 018a 1b5e srri @$AR2, $AC0.M - 018b 1b5c srri @$AR2, $AC0.L - 018c 193e lrri $AC0.M, @$AR1 - 018d 193c lrri $AC0.L, @$AR1 - 018e b179 tst'l $ACC0 : $AC1.M, @$AR1 - 018f 0294 0195 jnz 0x0195 - 0191 005a loop $AX0.H - 0192 1b5e srri @$AR2, $AC0.M - 0193 029f 019d jmp 0x019d - 0195 9900 asr16 $ACC1 - 0196 1b5e srri @$AR2, $AC0.M - 0197 1b5c srri @$AR2, $AC0.L - 0198 007b 019c bloop $AX1.H, 0x019c - 019a 4c00 add $ACC0, $ACC1 - 019b 1b5e srri @$AR2, $AC0.M - 019c 1b5c srri @$AR2, $AC0.L - 019d 0082 07c0 lri $AR2, #0x07c0 - 019f 193e lrri $AC0.M, @$AR1 - 01a0 193c lrri $AC0.L, @$AR1 - 01a1 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01a2 0294 01a8 jnz 0x01a8 - 01a4 005a loop $AX0.H - 01a5 1b5e srri @$AR2, $AC0.M - 01a6 029f 01b0 jmp 0x01b0 - 01a8 9900 asr16 $ACC1 - 01a9 1b5e srri @$AR2, $AC0.M - 01aa 1b5c srri @$AR2, $AC0.L - 01ab 007b 01af bloop $AX1.H, 0x01af - 01ad 4c00 add $ACC0, $ACC1 - 01ae 1b5e srri @$AR2, $AC0.M - 01af 1b5c srri @$AR2, $AC0.L - 01b0 193e lrri $AC0.M, @$AR1 - 01b1 193c lrri $AC0.L, @$AR1 - 01b2 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01b3 0294 01b9 jnz 0x01b9 - 01b5 005a loop $AX0.H - 01b6 1b5e srri @$AR2, $AC0.M - 01b7 029f 01c1 jmp 0x01c1 - 01b9 9900 asr16 $ACC1 - 01ba 1b5e srri @$AR2, $AC0.M - 01bb 1b5c srri @$AR2, $AC0.L - 01bc 007b 01c0 bloop $AX1.H, 0x01c0 - 01be 4c00 add $ACC0, $ACC1 - 01bf 1b5e srri @$AR2, $AC0.M - 01c0 1b5c srri @$AR2, $AC0.L - 01c1 193e lrri $AC0.M, @$AR1 - 01c2 193c lrri $AC0.L, @$AR1 - 01c3 b179 tst'l $ACC0 : $AC1.M, @$AR1 - 01c4 0294 01ca jnz 0x01ca - 01c6 005a loop $AX0.H - 01c7 1b5e srri @$AR2, $AC0.M - 01c8 029f 01d2 jmp 0x01d2 - 01ca 9900 asr16 $ACC1 - 01cb 1b5e srri @$AR2, $AC0.M - 01cc 1b5c srri @$AR2, $AC0.L - 01cd 007b 01d1 bloop $AX1.H, 0x01d1 - 01cf 4c00 add $ACC0, $ACC1 - 01d0 1b5e srri @$AR2, $AC0.M - 01d1 1b5c srri @$AR2, $AC0.L - 01d2 029f 0068 jmp 0x0068 - 01d4 0085 ffff lri $IX1, #0xffff - 01d6 8150 clr'l $ACC0 : $AX0.H, @$AR0 - 01d7 8940 clr'l $ACC1 : $AX0.L, @$AR0 - 01d8 8e48 set16'l : $AX1.L, @$AR0 - 01d9 00fa 0e17 sr @0x0e17, $AX0.H - 01db 00f8 0e18 sr @0x0e18, $AX0.L - 01dd 0081 0000 lri $AR1, #0x0000 - 01df 02bf 05e7 call 0x05e7 - 01e1 00da 0e17 lr $AX0.H, @0x0e17 - 01e3 00d8 0e18 lr $AX0.L, @0x0e18 - 01e5 8948 clr'l $ACC1 : $AX1.L, @$AR0 - 01e6 0081 0400 lri $AR1, #0x0400 - 01e8 02bf 05e7 call 0x05e7 - 01ea 00da 0e17 lr $AX0.H, @0x0e17 - 01ec 00d8 0e18 lr $AX0.L, @0x0e18 - 01ee 8948 clr'l $ACC1 : $AX1.L, @$AR0 - 01ef 0081 07c0 lri $AR1, #0x07c0 - 01f1 02bf 05e7 call 0x05e7 - 01f3 029f 0068 jmp 0x0068 - 01f5 0086 07c0 lri $IX2, #0x07c0 - 01f7 02bf 057a call 0x057a - 01f9 029f 0068 jmp 0x0068 - 01fb 8100 clr $ACC0 - 01fc 8e00 set16 - 01fd 191e lrri $AC0.M, @$AR0 - 01fe 191c lrri $AC0.L, @$AR0 - 01ff 2ece srs @DSMAH, $AC0.M - 0200 2ccf srs @DSMAL, $AC0.L - 0201 16cd 0000 si @DSPA, #0x0000 - 0203 16c9 0001 si @DSCR, #0x0001 - 0205 16cb 0780 si @DSBL, #0x0780 - 0207 02bf 0652 call 0652_WaitDMA - 0209 029f 0068 jmp 0x0068 - 020b 8100 clr $ACC0 - 020c 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 020d 8e60 set16'l : $AC0.L, @$AR0 - 020e 2ece srs @DSMAH, $AC0.M - 020f 2ccf srs @DSMAL, $AC0.L - 0210 16cd 0e48 si @DSPA, #0x0e48 - 0212 16c9 0000 si @DSCR, #0x0000 - 0214 8900 clr $ACC1 - 0215 0d20 lris $AC1.L, #0x20 - 0216 2dcb srs @DSBL, $AC1.L - 0217 4c00 add $ACC0, $ACC1 - 0218 1c80 mrr $IX0, $AR0 - 0219 0080 0280 lri $AR0, #0x0280 - 021b 0081 0000 lri $AR1, #0x0000 - 021d 0082 0140 lri $AR2, #0x0140 - 021f 0083 0e48 lri $AR3, #0x0e48 - 0221 0a00 lris $AX0.H, #0x00 - 0222 27c9 lrs $AC1.M, @DSCR - 0223 03a0 0004 andf $AC1.M, #0x0004 - 0225 029c 0222 jlnz 0x0222 - 0227 2ece srs @DSMAH, $AC0.M - 0228 2ccf srs @DSMAL, $AC0.L - 0229 16cd 0e58 si @DSPA, #0x0e58 - 022b 16c9 0000 si @DSCR, #0x0000 - 022d 16cb 0260 si @DSBL, #0x0260 - 022f 009f 00a0 lri $AC1.M, #0x00a0 - 0231 8f00 set40 - 0232 007f 023b bloop $AC1.M, 0x023b - 0234 197e lrri $AC0.M, @$AR3 - 0235 1b1a srri @$AR0, $AX0.H - 0236 197c lrri $AC0.L, @$AR3 - 0237 1b1a srri @$AR0, $AX0.H - 0238 1b5e srri @$AR2, $AC0.M - 0239 7c22 neg's $ACC0 : @$AR2, $AC0.L - 023a 1b3e srri @$AR1, $AC0.M - 023b 1b3c srri @$AR1, $AC0.L - 023c 1c04 mrr $AR0, $IX0 - 023d 029f 0068 jmp 0x0068 - 023f 8e70 set16'l : $AC0.M, @$AR0 - 0240 8960 clr'l $ACC1 : $AC0.L, @$AR0 - 0241 191f lrri $AC1.M, @$AR0 - 0242 2ece srs @DSMAH, $AC0.M - 0243 2ccf srs @DSMAL, $AC0.L - 0244 16cd 0c00 si @DSPA, #0x0c00 - 0246 16c9 0000 si @DSCR, #0x0000 - 0248 0503 addis $ACC1, #0x03 - 0249 0340 fff0 andi $AC1.M, #0xfff0 - 024b 2fcb srs @DSBL, $AC1.M - 024c 02bf 0652 call 0652_WaitDMA - 024e 0080 0c00 lri $AR0, #0x0c00 - 0250 029f 0068 jmp 0x0068 - 0252 8100 clr $ACC0 - 0253 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0254 8e78 set16'l : $AC1.M, @$AR0 - 0255 2ece srs @DSMAH, $AC0.M - 0256 2fcf srs @DSMAL, $AC1.M - 0257 16cd 0b80 si @DSPA, #0x0b80 - 0259 16c9 0000 si @DSCR, #0x0000 - 025b 16cb 00c4 si @DSBL, #0x00c4 - 025d 0082 0e08 lri $AR2, #0x0e08 - 025f 009f 0000 lri $AC1.M, #0x0000 - 0261 1b5f srri @$AR2, $AC1.M - 0262 009f 0140 lri $AC1.M, #0x0140 - 0264 1b5f srri @$AR2, $AC1.M - 0265 009f 0280 lri $AC1.M, #0x0280 - 0267 1b5f srri @$AR2, $AC1.M - 0268 009f 0400 lri $AC1.M, #0x0400 - 026a 1b5f srri @$AR2, $AC1.M - 026b 009f 0540 lri $AC1.M, #0x0540 - 026d 1b5f srri @$AR2, $AC1.M - 026e 009f 0680 lri $AC1.M, #0x0680 - 0270 1b5f srri @$AR2, $AC1.M - 0271 009f 07c0 lri $AC1.M, #0x07c0 - 0273 1b5f srri @$AR2, $AC1.M - 0274 009f 0900 lri $AC1.M, #0x0900 - 0276 1b5f srri @$AR2, $AC1.M - 0277 009f 0a40 lri $AC1.M, #0x0a40 - 0279 1b5f srri @$AR2, $AC1.M - 027a 02bf 0652 call 0652_WaitDMA - 027c 00de 0ba7 lr $AC0.M, @0x0ba7 - 027e 00df 0ba8 lr $AC1.M, @0x0ba8 - 0280 2ece srs @DSMAH, $AC0.M - 0281 2fcf srs @DSMAL, $AC1.M - 0282 16cd 03c0 si @DSPA, #0x03c0 - 0284 16c9 0000 si @DSCR, #0x0000 - 0286 16cb 0080 si @DSBL, #0x0080 - 0288 8100 clr $ACC0 - 0289 8900 clr $ACC1 - 028a 00de 0b84 lr $AC0.M, @0x0b84 - 028c 009f 0d0a lri $AC1.M, #0x0d0a - 028e 4c00 add $ACC0, $ACC1 - 028f 1c7e mrr $AR3, $AC0.M - 0290 0213 ilrr $AC0.M, @$AR3 - 0291 00fe 0e15 sr @0x0e15, $AC0.M - 0293 00de 0b85 lr $AC0.M, @0x0b85 - 0295 009f 0d0d lri $AC1.M, #0x0d0d - 0297 4c00 add $ACC0, $ACC1 - 0298 1c7e mrr $AR3, $AC0.M - 0299 0213 ilrr $AC0.M, @$AR3 - 029a 00fe 0e16 sr @0x0e16, $AC0.M - 029c 00de 0b86 lr $AC0.M, @0x0b86 - 029e 009a 000f lri $AX0.H, #0x000f - 02a0 009f 0c9a lri $AC1.M, #0x0c9a - 02a2 3400 andr $AC0.M, $AX0.H - 02a3 4c00 add $ACC0, $ACC1 - 02a4 1c7e mrr $AR3, $AC0.M - 02a5 0213 ilrr $AC0.M, @$AR3 - 02a6 00fe 0e14 sr @0x0e14, $AC0.M - 02a8 00de 0b86 lr $AC0.M, @0x0b86 - 02aa 009a 001f lri $AX0.H, #0x001f - 02ac 009f 0caa lri $AC1.M, #0x0caa - 02ae 14fc asr $ACC0, #-4 - 02af 3400 andr $AC0.M, $AX0.H - 02b0 4c00 add $ACC0, $ACC1 - 02b1 1c7e mrr $AR3, $AC0.M - 02b2 0213 ilrr $AC0.M, @$AR3 - 02b3 00fe 0e46 sr @0x0e46, $AC0.M - 02b5 00de 0b86 lr $AC0.M, @0x0b86 - 02b7 009f 0cca lri $AC1.M, #0x0cca - 02b9 14f7 asr $ACC0, #-9 - 02ba 4c00 add $ACC0, $ACC1 - 02bb 1c7e mrr $AR3, $AC0.M - 02bc 0213 ilrr $AC0.M, @$AR3 - 02bd 00fe 0e47 sr @0x0e47, $AC0.M - 02bf 8100 clr $ACC0 - 02c0 00de 0b9b lr $AC0.M, @0x0b9b - 02c2 b100 tst $ACC0 - 02c3 0295 02ea jz 0x02ea - 02c5 8900 clr $ACC1 - 02c6 00df 0b9e lr $AC1.M, @0x0b9e - 02c8 0300 0cc0 addi $AC1.M, #0x0cc0 - 02ca 00ff 0e40 sr @0x0e40, $AC1.M - 02cc 00df 0b9f lr $AC1.M, @0x0b9f - 02ce 0300 0cc0 addi $AC1.M, #0x0cc0 - 02d0 00ff 0e41 sr @0x0e41, $AC1.M - 02d2 009f 0ce0 lri $AC1.M, #0x0ce0 - 02d4 00ff 0e42 sr @0x0e42, $AC1.M - 02d6 00ff 0e43 sr @0x0e43, $AC1.M - 02d8 02bf 0652 call 0652_WaitDMA - 02da 00de 0b9c lr $AC0.M, @0x0b9c - 02dc 2ece srs @DSMAH, $AC0.M - 02dd 00de 0b9d lr $AC0.M, @0x0b9d - 02df 2ecf srs @DSMAL, $AC0.M - 02e0 16cd 0cc0 si @DSPA, #0x0cc0 - 02e2 16c9 0000 si @DSCR, #0x0000 - 02e4 16cb 0040 si @DSBL, #0x0040 - 02e6 02bf 0652 call 0652_WaitDMA - 02e8 029f 0068 jmp 0x0068 - 02ea 009f 0ce0 lri $AC1.M, #0x0ce0 - 02ec 00ff 0e42 sr @0x0e42, $AC1.M - 02ee 00ff 0e40 sr @0x0e40, $AC1.M - 02f0 00ff 0e41 sr @0x0e41, $AC1.M - 02f2 00ff 0e43 sr @0x0e43, $AC1.M - 02f4 02bf 0652 call 0652_WaitDMA - 02f6 029f 0068 jmp 0x0068 - 02f8 8e00 set16 - 02f9 00e0 0e07 sr @0x0e07, $AR0 - 02fb 0080 0ba2 lri $AR0, #0x0ba2 - 02fd 0081 03c0 lri $AR1, #0x03c0 - 02ff 0e05 lris $AC0.M, #0x05 - 0300 00fe 0e04 sr @0x0e04, $AC0.M - 0302 8900 clr $ACC1 - 0303 8150 clr'l $ACC0 : $AX0.H, @$AR0 - 0304 009f 0b80 lri $AC1.M, #0x0b80 - 0306 007a 030b bloop $AX0.H, 0x030b - 0308 193e lrri $AC0.M, @$AR1 - 0309 4c49 add'l $ACC0, $ACC1 : $AX1.L, @$AR1 - 030a 1c5e mrr $AR2, $AC0.M - 030b 1a59 srr @$AR2, $AX1.L - 030c 0083 0e05 lri $AR3, #0x0e05 - 030e 1b61 srri @$AR3, $AR1 - 030f 1b60 srri @$AR3, $AR0 - 0310 00de 0b87 lr $AC0.M, @0x0b87 - 0312 0601 cmpis $ACC0, #0x01 - 0313 0295 0317 jz 0x0317 - 0315 029f 040e jmp 0x040e - 0317 00de 0e42 lr $AC0.M, @0x0e42 - 0319 00fe 0e1c sr @0x0e1c, $AC0.M - 031b 00c3 0e15 lr $AR3, @0x0e15 - 031d 177f callr $AR3 - 031e 8e00 set16 - 031f 8a00 m2 - 0320 8100 clr $ACC0 - 0321 8900 clr $ACC1 - 0322 00de 0bb3 lr $AC0.M, @0x0bb3 - 0324 00df 0bb2 lr $AC1.M, @0x0bb2 - 0326 1f1f mrr $AX0.L, $AC1.M - 0327 4d00 add $ACC1, $ACC0 - 0328 1481 asl $ACC0, #1 - 0329 8d1e set15'mv : $AX1.H, $AC0.M - 032a 1fd8 mrr $AC0.M, $AX0.L - 032b 0098 8000 lri $AX0.L, #0x8000 - 032d 0080 0e48 lri $AR0, #0x0e48 - 032f a830 mulx's $AX0.L, $AX1.H : @$AR0, $AC0.M - 0330 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0331 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0332 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0333 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0334 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0335 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0336 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0337 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0338 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0339 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 033a ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 033b ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 033c ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 033d ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 033e ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 033f ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0340 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0341 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0342 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0343 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0344 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0345 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0346 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0347 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 0348 ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 0349 ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 034a ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 034b ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 034c ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 034d ad30 mulxac's $AX0.L, $AX1.H, $ACC1 : @$AR0, $AC0.M - 034e ac38 mulxac's $AX0.L, $AX1.H, $ACC0 : @$AR0, $AC1.M - 034f 00fe 0bb2 sr @0x0bb2, $AC0.M - 0351 8f00 set40 - 0352 0080 0e48 lri $AR0, #0x0e48 - 0354 00c1 0e43 lr $AR1, @0x0e43 - 0356 1c61 mrr $AR3, $AR1 - 0357 193a lrri $AX0.H, @$AR1 - 0358 1918 lrri $AX0.L, @$AR0 - 0359 9059 mul'l $AX0.L, $AX0.H : $AX1.H, @$AR1 - 035a 1919 lrri $AX1.L, @$AR0 - 035b 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 035c 8080 nx'ls : $AX0.L, $AC0.M - 035d 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 035e 8091 nx'ls : $AX1.L, $AC1.M - 035f 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0360 8080 nx'ls : $AX0.L, $AC0.M - 0361 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0362 8091 nx'ls : $AX1.L, $AC1.M - 0363 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0364 8080 nx'ls : $AX0.L, $AC0.M - 0365 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0366 8091 nx'ls : $AX1.L, $AC1.M - 0367 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0368 8080 nx'ls : $AX0.L, $AC0.M - 0369 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 036a 8091 nx'ls : $AX1.L, $AC1.M - 036b 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 036c 8080 nx'ls : $AX0.L, $AC0.M - 036d 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 036e 8091 nx'ls : $AX1.L, $AC1.M - 036f 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0370 8080 nx'ls : $AX0.L, $AC0.M - 0371 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0372 8091 nx'ls : $AX1.L, $AC1.M - 0373 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0374 8080 nx'ls : $AX0.L, $AC0.M - 0375 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0376 8091 nx'ls : $AX1.L, $AC1.M - 0377 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0378 8080 nx'ls : $AX0.L, $AC0.M - 0379 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 037a 8091 nx'ls : $AX1.L, $AC1.M - 037b 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 037c 8080 nx'ls : $AX0.L, $AC0.M - 037d 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 037e 8091 nx'ls : $AX1.L, $AC1.M - 037f 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0380 8080 nx'ls : $AX0.L, $AC0.M - 0381 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0382 8091 nx'ls : $AX1.L, $AC1.M - 0383 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0384 8080 nx'ls : $AX0.L, $AC0.M - 0385 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0386 8091 nx'ls : $AX1.L, $AC1.M - 0387 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0388 8080 nx'ls : $AX0.L, $AC0.M - 0389 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 038a 8091 nx'ls : $AX1.L, $AC1.M - 038b 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 038c 8080 nx'ls : $AX0.L, $AC0.M - 038d 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 038e 8091 nx'ls : $AX1.L, $AC1.M - 038f 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0390 8080 nx'ls : $AX0.L, $AC0.M - 0391 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0392 8091 nx'ls : $AX1.L, $AC1.M - 0393 9e51 mulmv'l $AX1.L, $AX1.H, $ACC0 : $AX0.H, @$AR1 - 0394 8080 nx'ls : $AX0.L, $AC0.M - 0395 9759 mulmv'l $AX0.L, $AX0.H, $ACC1 : $AX1.H, @$AR1 - 0396 8091 nx'ls : $AX1.L, $AC1.M - 0397 9e00 mulmv $AX1.L, $AX1.H, $ACC0 - 0398 6f33 movp's $ACC1 : @$AR3, $AC0.M - 0399 1b7f srri @$AR3, $AC1.M - 039a 8100 clr $ACC0 - 039b 00de 0bdd lr $AC0.M, @0x0bdd - 039d b100 tst $ACC0 - 039e 0295 03c0 jz 0x03c0 - 03a0 8d00 set15 - 03a1 8f00 set40 - 03a2 8a00 m2 - 03a3 00c0 0e43 lr $AR0, @0x0e43 - 03a5 00c1 0e43 lr $AR1, @0x0e43 - 03a7 0083 0bdf lri $AR3, #0x0bdf - 03a9 0087 ffff lri $IX3, #0xffff - 03ab 00de 0bde lr $AC0.M, @0x0bde - 03ad 80e1 nx'ld : $AX0.H, $AX1.L, @$AR1 - 03ae b04f mulx'ln $AX0.H, $AX1.L : $AX1.L, @$AR3 - 03af 1f5e mrr $AX0.H, $AC0.M - 03b0 e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 03b1 b64f mulxmv'ln $AX0.H, $AX1.L, $ACC0 : $AX1.L, @$AR3 - 03b2 1f5e mrr $AX0.H, $AC0.M - 03b3 e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 03b4 110f 03bb bloopi #0x0f, 0x03bb - 03b6 b79a mulxmv'slm $AX0.H, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 03b7 1f5f mrr $AX0.H, $AC1.M - 03b8 e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 03b9 b69b mulxmv'slm $AX0.H, $AX1.L, $ACC0 : $AC1.M, $AX1.L - 03ba 1f5e mrr $AX0.H, $AC0.M - 03bb e2e1 maddx'ld $AX0.H, $AX1.L : $AX0.H, $AX1.L, @$AR1 - 03bc b79a mulxmv'slm $AX0.H, $AX1.L, $ACC1 : $AC0.M, $AX1.L - 03bd 1b1f srri @$AR0, $AC1.M - 03be 00ff 0bde sr @0x0bde, $AC1.M - 03c0 00c3 0e14 lr $AR3, @0x0e14 - 03c2 8a00 m2 - 03c3 177f callr $AR3 - 03c4 00c3 0e46 lr $AR3, @0x0e46 - 03c6 8a00 m2 - 03c7 177f callr $AR3 - 03c8 00c3 0e47 lr $AR3, @0x0e47 - 03ca 8a00 m2 - 03cb 177f callr $AR3 - 03cc 8100 clr $ACC0 - 03cd 00de 0b9b lr $AC0.M, @0x0b9b - 03cf b100 tst $ACC0 - 03d0 0295 0406 jz 0x0406 - 03d2 00de 0e42 lr $AC0.M, @0x0e42 - 03d4 00fe 0e43 sr @0x0e43, $AC0.M - 03d6 8100 clr $ACC0 - 03d7 8900 clr $ACC1 - 03d8 00de 0b9e lr $AC0.M, @0x0b9e - 03da 00df 0ba0 lr $AC1.M, @0x0ba0 - 03dc 8200 cmp - 03dd 0293 03e2 jle 0x03e2 - 03df 7800 decm $AC0.M - 03e0 029f 03e5 jmp 0x03e5 - 03e2 0295 03e5 jz 0x03e5 - 03e4 7400 incm $AC0.M - 03e5 00fe 0b9e sr @0x0b9e, $AC0.M - 03e7 00df 0e43 lr $AC1.M, @0x0e43 - 03e9 05e0 addis $ACC1, #0xe0 - 03ea 4c00 add $ACC0, $ACC1 - 03eb 00fe 0e40 sr @0x0e40, $AC0.M - 03ed 8100 clr $ACC0 - 03ee 8900 clr $ACC1 - 03ef 00de 0b9f lr $AC0.M, @0x0b9f - 03f1 00df 0ba1 lr $AC1.M, @0x0ba1 - 03f3 8200 cmp - 03f4 0293 03f9 jle 0x03f9 - 03f6 7800 decm $AC0.M - 03f7 029f 03fc jmp 0x03fc - 03f9 0295 03fc jz 0x03fc - 03fb 7400 incm $AC0.M - 03fc 00fe 0b9f sr @0x0b9f, $AC0.M - 03fe 00df 0e43 lr $AC1.M, @0x0e43 - 0400 05e0 addis $ACC1, #0xe0 - 0401 4c00 add $ACC0, $ACC1 - 0402 00fe 0e41 sr @0x0e41, $AC0.M - 0404 029f 040e jmp 0x040e - 0406 00de 0e42 lr $AC0.M, @0x0e42 - 0408 00fe 0e40 sr @0x0e40, $AC0.M - 040a 00fe 0e41 sr @0x0e41, $AC0.M - 040c 00fe 0e43 sr @0x0e43, $AC0.M - 040e 8100 clr $ACC0 - 040f 8e00 set16 - 0410 8400 clrp - 0411 8900 clr $ACC1 - 0412 1efe mrr $PROD.M2, $AC0.M - 0413 0e40 lris $AC0.M, #0x40 - 0414 1ebe mrr $PROD.M1, $AC0.M - 0415 0083 0e08 lri $AR3, #0x0e08 - 0417 1c03 mrr $AR0, $AR3 - 0418 1ff5 mrr $AC1.M, $PROD.M1 - 0419 191a lrri $AX0.H, @$AR0 - 041a f858 addpaxz'l $ACC0, $AX0.H : $AX1.H, @$AR0 - 041b fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - 041c f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - 041d fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - 041e f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - 041f fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - 0420 f8b1 addpaxz'ls $ACC0, $AX0.H : $AX1.H, $AC1.M - 0421 fba0 addpaxz'ls $ACC1, $AX1.H : $AX0.H, $AC0.M - 0422 f83b addpaxz's $ACC0, $AX0.H : @$AR3, $AC1.M - 0423 1b7e srri @$AR3, $AC0.M - 0424 0083 0e04 lri $AR3, #0x0e04 - 0426 8100 clr $ACC0 - 0427 8973 clr'l $ACC1 : $AC0.M, @$AR3 - 0428 1961 lrri $AR1, @$AR3 - 0429 1960 lrri $AR0, @$AR3 - 042a 7800 decm $AC0.M - 042b 00fe 0e04 sr @0x0e04, $AC0.M - 042d 0294 0303 jnz 0x0303 - 042f 8e00 set16 - 0430 8100 clr $ACC0 - 0431 00de 0b9b lr $AC0.M, @0x0b9b - 0433 b100 tst $ACC0 - 0434 0295 0446 jz 0x0446 - 0436 00de 0b9c lr $AC0.M, @0x0b9c - 0438 00dc 0b9d lr $AC0.L, @0x0b9d - 043a 2ece srs @DSMAH, $AC0.M - 043b 2ccf srs @DSMAL, $AC0.L - 043c 8100 clr $ACC0 - 043d 00de 0e1c lr $AC0.M, @0x0e1c - 043f 2ecd srs @DSPA, $AC0.M - 0440 16c9 0001 si @DSCR, #0x0001 - 0442 16cb 0040 si @DSBL, #0x0040 - 0444 02bf 0652 call 0652_WaitDMA - 0446 8100 clr $ACC0 - 0447 8900 clr $ACC1 - 0448 00de 0b82 lr $AC0.M, @0x0b82 - 044a 00df 0b83 lr $AC1.M, @0x0b83 - 044c 2ece srs @DSMAH, $AC0.M - 044d 2fcf srs @DSMAL, $AC1.M - 044e 16cd 0b80 si @DSPA, #0x0b80 - 0450 16c9 0001 si @DSCR, #0x0001 - 0452 16cb 00c4 si @DSBL, #0x00c4 - 0454 02bf 0652 call 0652_WaitDMA - 0456 8100 clr $ACC0 - 0457 00de 0b80 lr $AC0.M, @0x0b80 - 0459 00dc 0b81 lr $AC0.L, @0x0b81 - 045b b100 tst $ACC0 - 045c 0294 0462 jnz 0x0462 - 045e 00c0 0e07 lr $AR0, @0x0e07 - 0460 029f 0068 jmp 0x0068 - 0462 2ece srs @DSMAH, $AC0.M - 0463 2ccf srs @DSMAL, $AC0.L - 0464 16cd 0b80 si @DSPA, #0x0b80 - 0466 16c9 0000 si @DSCR, #0x0000 - 0468 16cb 00c4 si @DSBL, #0x00c4 - 046a 0082 0e08 lri $AR2, #0x0e08 - 046c 009f 0000 lri $AC1.M, #0x0000 - 046e 1b5f srri @$AR2, $AC1.M - 046f 009f 0140 lri $AC1.M, #0x0140 - 0471 1b5f srri @$AR2, $AC1.M - 0472 009f 0280 lri $AC1.M, #0x0280 - 0474 1b5f srri @$AR2, $AC1.M - 0475 009f 0400 lri $AC1.M, #0x0400 - 0477 1b5f srri @$AR2, $AC1.M - 0478 009f 0540 lri $AC1.M, #0x0540 - 047a 1b5f srri @$AR2, $AC1.M - 047b 009f 0680 lri $AC1.M, #0x0680 - 047d 1b5f srri @$AR2, $AC1.M - 047e 009f 07c0 lri $AC1.M, #0x07c0 - 0480 1b5f srri @$AR2, $AC1.M - 0481 009f 0900 lri $AC1.M, #0x0900 - 0483 1b5f srri @$AR2, $AC1.M - 0484 009f 0a40 lri $AC1.M, #0x0a40 - 0486 1b5f srri @$AR2, $AC1.M - 0487 02bf 0652 call 0652_WaitDMA - 0489 00de 0ba7 lr $AC0.M, @0x0ba7 - 048b 00df 0ba8 lr $AC1.M, @0x0ba8 - 048d 2ece srs @DSMAH, $AC0.M - 048e 2fcf srs @DSMAL, $AC1.M - 048f 16cd 03c0 si @DSPA, #0x03c0 - 0491 16c9 0000 si @DSCR, #0x0000 - 0493 16cb 0080 si @DSBL, #0x0080 - 0495 8100 clr $ACC0 - 0496 8900 clr $ACC1 - 0497 00de 0b84 lr $AC0.M, @0x0b84 - 0499 009f 0d0a lri $AC1.M, #0x0d0a - 049b 4c00 add $ACC0, $ACC1 - 049c 1c7e mrr $AR3, $AC0.M - 049d 0213 ilrr $AC0.M, @$AR3 - 049e 00fe 0e15 sr @0x0e15, $AC0.M - 04a0 00de 0b85 lr $AC0.M, @0x0b85 - 04a2 009f 0d0d lri $AC1.M, #0x0d0d - 04a4 4c00 add $ACC0, $ACC1 - 04a5 1c7e mrr $AR3, $AC0.M - 04a6 0213 ilrr $AC0.M, @$AR3 - 04a7 00fe 0e16 sr @0x0e16, $AC0.M - 04a9 00de 0b86 lr $AC0.M, @0x0b86 - 04ab 009a 000f lri $AX0.H, #0x000f - 04ad 009f 0c9a lri $AC1.M, #0x0c9a - 04af 3400 andr $AC0.M, $AX0.H - 04b0 4c00 add $ACC0, $ACC1 - 04b1 1c7e mrr $AR3, $AC0.M - 04b2 0213 ilrr $AC0.M, @$AR3 - 04b3 00fe 0e14 sr @0x0e14, $AC0.M - 04b5 00de 0b86 lr $AC0.M, @0x0b86 - 04b7 009a 001f lri $AX0.H, #0x001f - 04b9 009f 0caa lri $AC1.M, #0x0caa - 04bb 14fc asr $ACC0, #-4 - 04bc 3400 andr $AC0.M, $AX0.H - 04bd 4c00 add $ACC0, $ACC1 - 04be 1c7e mrr $AR3, $AC0.M - 04bf 0213 ilrr $AC0.M, @$AR3 - 04c0 00fe 0e46 sr @0x0e46, $AC0.M - 04c2 00de 0b86 lr $AC0.M, @0x0b86 - 04c4 009f 0cca lri $AC1.M, #0x0cca - 04c6 14f7 asr $ACC0, #-9 - 04c7 4c00 add $ACC0, $ACC1 - 04c8 1c7e mrr $AR3, $AC0.M - 04c9 0213 ilrr $AC0.M, @$AR3 - 04ca 00fe 0e47 sr @0x0e47, $AC0.M - 04cc 8100 clr $ACC0 - 04cd 00de 0b9b lr $AC0.M, @0x0b9b - 04cf b100 tst $ACC0 - 04d0 0295 04f9 jz 0x04f9 - 04d2 8900 clr $ACC1 - 04d3 00df 0b9e lr $AC1.M, @0x0b9e - 04d5 0300 0cc0 addi $AC1.M, #0x0cc0 - 04d7 00ff 0e40 sr @0x0e40, $AC1.M - 04d9 00df 0b9f lr $AC1.M, @0x0b9f - 04db 0300 0cc0 addi $AC1.M, #0x0cc0 - 04dd 00ff 0e41 sr @0x0e41, $AC1.M - 04df 009f 0ce0 lri $AC1.M, #0x0ce0 - 04e1 00ff 0e42 sr @0x0e42, $AC1.M - 04e3 00ff 0e43 sr @0x0e43, $AC1.M - 04e5 02bf 0652 call 0652_WaitDMA - 04e7 00de 0b9c lr $AC0.M, @0x0b9c - 04e9 2ece srs @DSMAH, $AC0.M - 04ea 00de 0b9d lr $AC0.M, @0x0b9d - 04ec 2ecf srs @DSMAL, $AC0.M - 04ed 16cd 0cc0 si @DSPA, #0x0cc0 - 04ef 16c9 0000 si @DSCR, #0x0000 - 04f1 16cb 0040 si @DSBL, #0x0040 - 04f3 02bf 0652 call 0652_WaitDMA - 04f5 00c0 0e07 lr $AR0, @0x0e07 - 04f7 029f 02f8 jmp 0x02f8 - 04f9 009f 0ce0 lri $AC1.M, #0x0ce0 - 04fb 00ff 0e42 sr @0x0e42, $AC1.M - 04fd 00ff 0e40 sr @0x0e40, $AC1.M - 04ff 00ff 0e41 sr @0x0e41, $AC1.M - 0501 00ff 0e43 sr @0x0e43, $AC1.M - 0503 02bf 0652 call 0652_WaitDMA - 0505 00c0 0e07 lr $AR0, @0x0e07 - 0507 029f 02f8 jmp 0x02f8 - 0509 8e00 set16 - 050a 0086 0400 lri $IX2, #0x0400 - 050c 8100 clr $ACC0 - 050d 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 050e 191c lrri $AC0.L, @$AR0 - 050f 2ece srs @DSMAH, $AC0.M - 0510 2ccf srs @DSMAL, $AC0.L - 0511 1fc6 mrr $AC0.M, $IX2 - 0512 2ecd srs @DSPA, $AC0.M - 0513 16c9 0001 si @DSCR, #0x0001 - 0515 16cb 0780 si @DSBL, #0x0780 - 0517 02bf 0652 call 0652_WaitDMA - 0519 02bf 057a call 0x057a - 051b 029f 0068 jmp 0x0068 - 051d 8e00 set16 - 051e 0086 07c0 lri $IX2, #0x07c0 - 0520 8100 clr $ACC0 - 0521 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0522 191c lrri $AC0.L, @$AR0 - 0523 2ece srs @DSMAH, $AC0.M - 0524 2ccf srs @DSMAL, $AC0.L - 0525 1fc6 mrr $AC0.M, $IX2 - 0526 2ecd srs @DSPA, $AC0.M - 0527 16c9 0001 si @DSCR, #0x0001 - 0529 16cb 0780 si @DSBL, #0x0780 - 052b 02bf 0652 call 0652_WaitDMA - 052d 02bf 057a call 0x057a - 052f 029f 0068 jmp 0x0068 - 0531 8c00 clr15 - 0532 8a00 m2 - 0533 8100 clr $ACC0 - 0534 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0535 191f lrri $AC1.M, @$AR0 - 0536 2ece srs @DSMAH, $AC0.M - 0537 2fcf srs @DSMAL, $AC1.M - 0538 16cd 0280 si @DSPA, #0x0280 - 053a 16c9 0001 si @DSCR, #0x0001 - 053c 16cb 0280 si @DSBL, #0x0280 - 053e 8f50 set40'l : $AX0.H, @$AR0 - 053f 8140 clr'l $ACC0 : $AX0.L, @$AR0 - 0540 0081 0400 lri $AR1, #0x0400 - 0542 0083 0000 lri $AR3, #0x0000 - 0544 0082 0140 lri $AR2, #0x0140 - 0546 0099 0080 lri $AX1.L, #0x0080 - 0548 02bf 0652 call 0652_WaitDMA - 054a 1105 0562 bloopi #0x05, 0x0562 - 054c 1f61 mrr $AX1.H, $AR1 - 054d 1120 0554 bloopi #0x20, 0x0554 - 054f 8972 clr'l $ACC1 : $AC0.M, @$AR2 - 0550 195c lrri $AC0.L, @$AR2 - 0551 f07b lsl16'l $ACC0 : $AC1.M, @$AR3 - 0552 197d lrri $AC1.L, @$AR3 - 0553 f131 lsl16's $ACC1 : @$AR1, $AC0.M - 0554 8139 clr's $ACC0 : @$AR1, $AC1.M - 0555 8900 clr $ACC1 - 0556 6800 movax $ACC0, $AX0.L - 0557 2ece srs @DSMAH, $AC0.M - 0558 2ccf srs @DSMAL, $AC0.L - 0559 1ffb mrr $AC1.M, $AX1.H - 055a 2fcd srs @DSPA, $AC1.M - 055b 0f01 lris $AC1.M, #0x01 - 055c 2fc9 srs @DSCR, $AC1.M - 055d 1ff9 mrr $AC1.M, $AX1.L - 055e 2fcb srs @DSBL, $AC1.M - 055f 7200 addaxl $ACC0, $AX1.L - 0560 1f5e mrr $AX0.H, $AC0.M - 0561 1f1c mrr $AX0.L, $AC0.L - 0562 8100 clr $ACC0 - 0563 26c9 lrs $AC0.M, @DSCR - 0564 02a0 0004 andf $AC0.M, #0x0004 - 0566 029c 0563 jlnz 0x0563 - 0568 029f 0068 jmp 0x0068 - 056a 029f 0068 jmp 0x0068 - 056c 029f 0068 jmp 0x0068 - 056e 029f 0068 jmp 0x0068 - 0570 16fc dcd1 si @DMBH, #0xdcd1 - 0572 16fd 0002 si @DMBL, #0x0002 - 0574 16fb 0001 si @DIRQ, #0x0001 - 0576 029f 0f03 jmp 0x0f03 - 0578 029f 0045 jmp 0x0045 - 057a 8e00 set16 - 057b 191f lrri $AC1.M, @$AR0 - 057c 191d lrri $AC1.L, @$AR0 - 057d 1f5f mrr $AX0.H, $AC1.M - 057e 1f1d mrr $AX0.L, $AC1.L - 057f 2fce srs @DSMAH, $AC1.M - 0580 2dcf srs @DSMAL, $AC1.L - 0581 8900 clr $ACC1 - 0582 1fa6 mrr $AC1.L, $IX2 - 0583 2dcd srs @DSPA, $AC1.L - 0584 0e00 lris $AC0.M, #0x00 - 0585 2ec9 srs @DSCR, $AC0.M - 0586 8100 clr $ACC0 - 0587 009c 00c0 lri $AC0.L, #0x00c0 - 0589 2ccb srs @DSBL, $AC0.L - 058a 1ca0 mrr $IX1, $AR0 - 058b 0081 0e48 lri $AR1, #0x0e48 - 058d 4800 addax $ACC0, $AX0.L - 058e 1b3e srri @$AR1, $AC0.M - 058f 1b3c srri @$AR1, $AC0.L - 0590 0b00 lris $AX1.H, #0x00 - 0591 0099 0060 lri $AX1.L, #0x0060 - 0593 4b00 addax $ACC1, $AX1.L - 0594 1b3d srri @$AR1, $AC1.L - 0595 0081 0e48 lri $AR1, #0x0e48 - 0597 1c06 mrr $AR0, $IX2 - 0598 0083 0000 lri $AR3, #0x0000 - 059a 1c43 mrr $AR2, $AR3 - 059b 27c9 lrs $AC1.M, @DSCR - 059c 03a0 0004 andf $AC1.M, #0x0004 - 059e 029c 059b jlnz 0x059b - 05a0 1109 05d0 bloopi #0x09, 0x05d0 - 05a2 8e00 set16 - 05a3 193a lrri $AX0.H, @$AR1 - 05a4 1938 lrri $AX0.L, @$AR1 - 05a5 6900 movax $ACC1, $AX0.L - 05a6 2fce srs @DSMAH, $AC1.M - 05a7 2dcf srs @DSMAL, $AC1.L - 05a8 8900 clr $ACC1 - 05a9 193d lrri $AC1.L, @$AR1 - 05aa 2dcd srs @DSPA, $AC1.L - 05ab 16c9 0000 si @DSCR, #0x0000 - 05ad 8100 clr $ACC0 - 05ae 009c 00c0 lri $AC0.L, #0x00c0 - 05b0 2ccb srs @DSBL, $AC0.L - 05b1 0081 0e48 lri $AR1, #0x0e48 - 05b3 4800 addax $ACC0, $AX0.L - 05b4 1b3e srri @$AR1, $AC0.M - 05b5 1b3c srri @$AR1, $AC0.L - 05b6 0b00 lris $AX1.H, #0x00 - 05b7 0960 lris $AX1.L, #0x60 - 05b8 4b00 addax $ACC1, $AX1.L - 05b9 1b3d srri @$AR1, $AC1.L - 05ba 0081 0e48 lri $AR1, #0x0e48 - 05bc 8f00 set40 - 05bd 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05be 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05bf 6a00 movax $ACC0, $AX1.L - 05c0 4800 addax $ACC0, $AX0.L - 05c1 1117 05ca bloopi #0x17, 0x05ca - 05c3 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05c4 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05c5 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 05c6 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 05c7 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05c8 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05c9 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 05ca 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 05cb 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05cc 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05cd 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 05ce 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 05cf 1b5f srri @$AR2, $AC1.M - 05d0 1b5d srri @$AR2, $AC1.L - 05d1 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05d2 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05d3 6a00 movax $ACC0, $AX1.L - 05d4 4800 addax $ACC0, $AX0.L - 05d5 1117 05de bloopi #0x17, 0x05de - 05d7 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05d8 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05d9 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 05da 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 05db 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05dc 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05dd 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 05de 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 05df 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 05e0 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 05e1 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 05e2 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 05e3 1b5f srri @$AR2, $AC1.M - 05e4 1b5d srri @$AR2, $AC1.L - 05e5 1c05 mrr $AR0, $IX1 - 05e6 02df ret - 05e7 8e00 set16 - 05e8 009b 0e48 lri $AX1.H, #0x0e48 - 05ea 009d 00c0 lri $AC1.L, #0x00c0 - 05ec 02bf 0637 call 0x0637 - 05ee 4900 addax $ACC1, $AX0.L - 05ef 00ff 0e1d sr @0x0e1d, $AC1.M - 05f1 00fd 0e1e sr @0x0e1e, $AC1.L - 05f3 8900 clr $ACC1 - 05f4 02bf 0652 call 0652_WaitDMA - 05f6 1104 0622 bloopi #0x04, 0x0622 - 05f8 00da 0e1d lr $AX0.H, @0x0e1d - 05fa 00d8 0e1e lr $AX0.L, @0x0e1e - 05fc 009b 0ea8 lri $AX1.H, #0x0ea8 - 05fe 009d 00c0 lri $AC1.L, #0x00c0 - 0600 02bf 0637 call 0x0637 - 0602 4900 addax $ACC1, $AX0.L - 0603 00ff 0e1d sr @0x0e1d, $AC1.M - 0605 00fd 0e1e sr @0x0e1e, $AC1.L - 0607 0083 0e48 lri $AR3, #0x0e48 - 0609 02bf 0642 call 0x0642 - 060b 8900 clr $ACC1 - 060c 00da 0e1d lr $AX0.H, @0x0e1d - 060e 00d8 0e1e lr $AX0.L, @0x0e1e - 0610 009b 0e48 lri $AX1.H, #0x0e48 - 0612 009d 00c0 lri $AC1.L, #0x00c0 - 0614 02bf 0637 call 0x0637 - 0616 4900 addax $ACC1, $AX0.L - 0617 00ff 0e1d sr @0x0e1d, $AC1.M - 0619 00fd 0e1e sr @0x0e1e, $AC1.L - 061b 0083 0ea8 lri $AR3, #0x0ea8 - 061d 02bf 0642 call 0x0642 - 061f 0000 nop - 0620 0000 nop - 0621 8e00 set16 - 0622 8900 clr $ACC1 - 0623 00da 0e1d lr $AX0.H, @0x0e1d - 0625 00d8 0e1e lr $AX0.L, @0x0e1e - 0627 009b 0ea8 lri $AX1.H, #0x0ea8 - 0629 009d 00c0 lri $AC1.L, #0x00c0 - 062b 02bf 0637 call 0x0637 - 062d 4900 addax $ACC1, $AX0.L - 062e 0083 0e48 lri $AR3, #0x0e48 - 0630 02bf 0642 call 0x0642 - 0632 0083 0ea8 lri $AR3, #0x0ea8 - 0634 02bf 0642 call 0x0642 - 0636 02df ret - 0637 8e00 set16 - 0638 00fa ffce sr @DSMAH, $AX0.H - 063a 00f8 ffcf sr @DSMAL, $AX0.L - 063c 00fb ffcd sr @DSPA, $AX1.H - 063e 16c9 0000 si @DSCR, #0x0000 - 0640 2dcb srs @DSBL, $AC1.L - 0641 02df ret - 0642 8f00 set40 - 0643 8d00 set15 - 0644 8a00 m2 - 0645 197a lrri $AX0.H, @$AR3 - 0646 1978 lrri $AX0.L, @$AR3 - 0647 a000 mulx $AX0.L, $AX1.L - 0648 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0649 1130 0650 bloopi #0x30, 0x0650 - 064b 9179 asr16'l $ACC0 : $AC1.M, @$AR1 - 064c 4e6d addp'ln $ACC0 : $AC1.L, @$AR1 - 064d 197a lrri $AX0.H, @$AR3 - 064e 4d43 add'l $ACC1, $ACC0 : $AX0.L, @$AR3 - 064f a039 mulx's $AX0.L, $AX1.L : @$AR1, $AC1.M - 0650 b629 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR1, $AC1.L - 0651 02df ret - -void 0652_WaitDMA() { - do { - // 0652 26c9 lrs $AC0.M, @DSCR - // 0653 02a0 0004 andf $AC0.M, #0x0004 - // 0655 029c 0652 jlnz 0x0652 - } while (DSCR & 0x0004); - - 0657 02df ret -} - -void 0658_WaitForCPUMail() { - do { - // 0658 26fe lrs $AC0.M, @CMBH - // 0659 02c0 8000 andcf $AC0.M, #0x8000 - // 065b 029c 0658 jlnz 0x0658 - } while (CMBH & 0x8000); - - 065d 02df ret -} - -void 065e_WaitForDSPMail1() { - do { - // 065e 26fc lrs $AC0.M, @DMBH - // 065f 02a0 8000 andf $AC0.M, #0x8000 - // 0661 029c 065e jlnz 0x065e - } while (DMBH & 0x8000); - 0663 02df ret -} - -void 0644_WaitForDSPMail2() { - do { - // 0664 26fc lrs $AC0.M, @DMBH - // 0665 02a0 8000 andf $AC0.M, #0x8000 - // 0667 029c 0664 jlnz 0x0664 - } while (DMBH & 0x8000); - 0669 02df ret -} - - 066a 8100 clr $ACC0 - 066b 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 066c 8e60 set16'l : $AC0.L, @$AR0 - 066d 2ece srs @DSMAH, $AC0.M - 066e 2ccf srs @DSMAL, $AC0.L - 066f 16cd 0e48 si @DSPA, #0x0e48 - 0671 16c9 0000 si @DSCR, #0x0000 - 0673 8900 clr $ACC1 - 0674 0d20 lris $AC1.L, #0x20 - 0675 2dcb srs @DSBL, $AC1.L - 0676 4c00 add $ACC0, $ACC1 - 0677 1c80 mrr $IX0, $AR0 - 0678 0080 0280 lri $AR0, #0x0280 - 067a 0081 0000 lri $AR1, #0x0000 - 067c 0082 0140 lri $AR2, #0x0140 - 067e 0083 0e48 lri $AR3, #0x0e48 - 0680 0a00 lris $AX0.H, #0x00 - 0681 27c9 lrs $AC1.M, @DSCR - 0682 03a0 0004 andf $AC1.M, #0x0004 - 0684 029c 0681 jlnz 0x0681 - 0686 2ece srs @DSMAH, $AC0.M - 0687 2ccf srs @DSMAL, $AC0.L - 0688 16cd 0e58 si @DSPA, #0x0e58 - 068a 16c9 0000 si @DSCR, #0x0000 - 068c 16cb 0260 si @DSBL, #0x0260 - 068e 009f 00a0 lri $AC1.M, #0x00a0 - 0690 8f00 set40 - 0691 007f 069a bloop $AC1.M, 0x069a - 0693 197e lrri $AC0.M, @$AR3 - 0694 1b1a srri @$AR0, $AX0.H - 0695 197c lrri $AC0.L, @$AR3 - 0696 1b1a srri @$AR0, $AX0.H - 0697 1b5e srri @$AR2, $AC0.M - 0698 1b5c srri @$AR2, $AC0.L - 0699 1b3e srri @$AR1, $AC0.M - 069a 1b3c srri @$AR1, $AC0.L - 069b 1c04 mrr $AR0, $IX0 - 069c 029f 0068 jmp 0x0068 - 069e 0082 0bb8 lri $AR2, #0x0bb8 - 06a0 195e lrri $AC0.M, @$AR2 - 06a1 2ed1 srs @SampleFormat, $AC0.M - 06a2 195e lrri $AC0.M, @$AR2 - 06a3 2ed4 srs @ACSAH, $AC0.M - 06a4 195e lrri $AC0.M, @$AR2 - 06a5 2ed5 srs @ACSAL, $AC0.M - 06a6 195e lrri $AC0.M, @$AR2 - 06a7 2ed6 srs @ACEAH, $AC0.M - 06a8 195e lrri $AC0.M, @$AR2 - 06a9 2ed7 srs @ACEAL, $AC0.M - 06aa 195e lrri $AC0.M, @$AR2 - 06ab 2ed8 srs @ACCAH, $AC0.M - 06ac 195e lrri $AC0.M, @$AR2 - 06ad 2ed9 srs @ACCAL, $AC0.M - 06ae 195e lrri $AC0.M, @$AR2 - 06af 2ea0 srs @COEF_A1_0, $AC0.M - 06b0 195e lrri $AC0.M, @$AR2 - 06b1 2ea1 srs @COEF_A2_0, $AC0.M - 06b2 195e lrri $AC0.M, @$AR2 - 06b3 2ea2 srs @COEF_A1_1, $AC0.M - 06b4 195e lrri $AC0.M, @$AR2 - 06b5 2ea3 srs @COEF_A2_1, $AC0.M - 06b6 195e lrri $AC0.M, @$AR2 - 06b7 2ea4 srs @COEF_A1_2, $AC0.M - 06b8 195e lrri $AC0.M, @$AR2 - 06b9 2ea5 srs @COEF_A2_2, $AC0.M - 06ba 195e lrri $AC0.M, @$AR2 - 06bb 2ea6 srs @COEF_A1_3, $AC0.M - 06bc 195e lrri $AC0.M, @$AR2 - 06bd 2ea7 srs @COEF_A2_3, $AC0.M - 06be 195e lrri $AC0.M, @$AR2 - 06bf 2ea8 srs @COEF_A1_4, $AC0.M - 06c0 195e lrri $AC0.M, @$AR2 - 06c1 2ea9 srs @COEF_A2_4, $AC0.M - 06c2 195e lrri $AC0.M, @$AR2 - 06c3 2eaa srs @COEF_A1_5, $AC0.M - 06c4 195e lrri $AC0.M, @$AR2 - 06c5 2eab srs @COEF_A2_5, $AC0.M - 06c6 195e lrri $AC0.M, @$AR2 - 06c7 2eac srs @COEF_A1_6, $AC0.M - 06c8 195e lrri $AC0.M, @$AR2 - 06c9 2ead srs @COEF_A2_6, $AC0.M - 06ca 195e lrri $AC0.M, @$AR2 - 06cb 2eae srs @COEF_A1_7, $AC0.M - 06cc 195e lrri $AC0.M, @$AR2 - 06cd 2eaf srs @COEF_A2_7, $AC0.M - 06ce 195e lrri $AC0.M, @$AR2 - 06cf 2ede srs @GAIN, $AC0.M - 06d0 195e lrri $AC0.M, @$AR2 - 06d1 2eda srs @pred_scale, $AC0.M - 06d2 195e lrri $AC0.M, @$AR2 - 06d3 2edb srs @yn1, $AC0.M - 06d4 195e lrri $AC0.M, @$AR2 - 06d5 2edc srs @yn2, $AC0.M - 06d6 8c00 clr15 - 06d7 8a00 m2 - 06d8 8e00 set16 - 06d9 00d8 0e16 lr $AX0.L, @0x0e16 - 06db 195b lrri $AX1.H, @$AR2 - 06dc 1959 lrri $AX1.L, @$AR2 - 06dd 8100 clr $ACC0 - 06de 195c lrri $AC0.L, @$AR2 - 06df 0080 0e48 lri $AR0, #0x0e48 - 06e1 195f lrri $AC1.M, @$AR2 - 06e2 1b1f srri @$AR0, $AC1.M - 06e3 195f lrri $AC1.M, @$AR2 - 06e4 1b1f srri @$AR0, $AC1.M - 06e5 195f lrri $AC1.M, @$AR2 - 06e6 1b1f srri @$AR0, $AC1.M - 06e7 185f lrr $AC1.M, @$AR2 - 06e8 1b1f srri @$AR0, $AC1.M - 06e9 6b00 movax $ACC1, $AX1.L - 06ea 1505 lsl $ACC1, #5 - 06eb 4d00 add $ACC1, $ACC0 - 06ec 157e lsr $ACC1, #-2 - 06ed 1c9f mrr $IX0, $AC1.M - 06ee 1cbd mrr $IX1, $AC1.L - 06ef 05e0 addis $ACC1, #0xe0 - 06f0 9900 asr16 $ACC1 - 06f1 7d00 neg $ACC1 - 06f2 1cdd mrr $IX2, $AC1.L - 06f3 8900 clr $ACC1 - 06f4 1fa5 mrr $AC1.L, $IX1 - 06f5 1502 lsl $ACC1, #2 - 06f6 1cbf mrr $IX1, $AC1.M - 06f7 009a 01fc lri $AX0.H, #0x01fc - 06f9 009e 0e48 lri $AC0.M, #0x0e48 - 06fb 0081 ffdd lri $AR1, #0xffdd - 06fd 0083 0d80 lri $AR3, #0x0d80 - 06ff 0064 0710 bloop $IX0, 0x0710 - 0701 1827 lrr $IX3, @$AR1 - 0702 1b07 srri @$AR0, $IX3 - 0703 4a00 addax $ACC0, $AX1.L - 0704 1ffc mrr $AC1.M, $AC0.L - 0705 1827 lrr $IX3, @$AR1 - 0706 1b07 srri @$AR0, $IX3 - 0707 1579 lsr $ACC1, #-7 - 0708 3500 andr $AC1.M, $AX0.H - 0709 1827 lrr $IX3, @$AR1 - 070a 1b07 srri @$AR0, $IX3 - 070b 4100 addr $ACC1, $AX0.L - 070c 1b7e srri @$AR3, $AC0.M - 070d 1827 lrr $IX3, @$AR1 - 070e 1b07 srri @$AR0, $IX3 - 070f 1b7f srri @$AR3, $AC1.M - 0710 0000 nop - 0711 0065 0716 bloop $IX1, 0x0716 - 0713 1827 lrr $IX3, @$AR1 - 0714 1b07 srri @$AR0, $IX3 - 0715 0000 nop - 0716 0000 nop - 0717 0007 dar $AR3 - 0718 187f lrr $AC1.M, @$AR3 - 0719 0066 071f bloop $IX2, 0x071f - 071b 4a3b addax's $ACC0, $AX1.L : @$AR3, $AC1.M - 071c 1ffc mrr $AC1.M, $AC0.L - 071d 1579 lsr $ACC1, #-7 - 071e 3533 andr's $AC1.M, $AX0.H : @$AR3, $AC0.M - 071f 4100 addr $ACC1, $AX0.L - 0720 1b7f srri @$AR3, $AC1.M - 0721 0004 dar $AR0 - 0722 189f lrrd $AC1.M, @$AR0 - 0723 1adf srrd @$AR2, $AC1.M - 0724 189f lrrd $AC1.M, @$AR0 - 0725 1adf srrd @$AR2, $AC1.M - 0726 189f lrrd $AC1.M, @$AR0 - 0727 1adf srrd @$AR2, $AC1.M - 0728 189f lrrd $AC1.M, @$AR0 - 0729 1adf srrd @$AR2, $AC1.M - 072a 1adc srrd @$AR2, $AC0.L - 072b 0082 0bd2 lri $AR2, #0x0bd2 - 072d 27dc lrs $AC1.M, @yn2 - 072e 1adf srrd @$AR2, $AC1.M - 072f 27db lrs $AC1.M, @yn1 - 0730 1adf srrd @$AR2, $AC1.M - 0731 27da lrs $AC1.M, @pred_scale - 0732 1adf srrd @$AR2, $AC1.M - 0733 0082 0bbe lri $AR2, #0x0bbe - 0735 27d9 lrs $AC1.M, @ACCAL - 0736 1adf srrd @$AR2, $AC1.M - 0737 27d8 lrs $AC1.M, @ACCAH - 0738 1adf srrd @$AR2, $AC1.M - 0739 8f00 set40 - 073a 00c1 0e42 lr $AR1, @0x0e42 - 073c 0082 0d80 lri $AR2, #0x0d80 - 073e 1940 lrri $AR0, @$AR2 - 073f 1943 lrri $AR3, @$AR2 - 0740 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0741 b8c0 mulx'ld $AX0.H, $AX1.H : $AX0.L, $AX1.L, @$AR0 - 0742 111f 074a bloopi #0x1f, 0x074a - 0744 a6f0 mulxmv'ld $AX0.L, $AX1.L, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0745 bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0746 1940 lrri $AR0, @$AR2 - 0747 1943 lrri $AR3, @$AR2 - 0748 bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 0749 4ec0 addp'ld $ACC0 : $AX0.L, $AX1.L, @$AR0 - 074a b831 mulx's $AX0.H, $AX1.H : @$AR1, $AC0.M - 074b a6f0 mulxmv'ld $AX0.L, $AX1.L, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 074c bcf0 mulxac'ld $AX0.H, $AX1.H, $ACC0 : $AX0.H, $AX1.H, @$AR0 - 074d bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 074e 4e00 addp $ACC0 - 074f 1b3e srri @$AR1, $AC0.M - 0750 00e1 0e42 sr @0x0e42, $AR1 - 0752 02df ret - 0753 0082 0bb8 lri $AR2, #0x0bb8 - 0755 195e lrri $AC0.M, @$AR2 - 0756 2ed1 srs @SampleFormat, $AC0.M - 0757 195e lrri $AC0.M, @$AR2 - 0758 2ed4 srs @ACSAH, $AC0.M - 0759 195e lrri $AC0.M, @$AR2 - 075a 2ed5 srs @ACSAL, $AC0.M - 075b 195e lrri $AC0.M, @$AR2 - 075c 2ed6 srs @ACEAH, $AC0.M - 075d 195e lrri $AC0.M, @$AR2 - 075e 2ed7 srs @ACEAL, $AC0.M - 075f 195e lrri $AC0.M, @$AR2 - 0760 2ed8 srs @ACCAH, $AC0.M - 0761 195e lrri $AC0.M, @$AR2 - 0762 2ed9 srs @ACCAL, $AC0.M - 0763 195e lrri $AC0.M, @$AR2 - 0764 2ea0 srs @COEF_A1_0, $AC0.M - 0765 195e lrri $AC0.M, @$AR2 - 0766 2ea1 srs @COEF_A2_0, $AC0.M - 0767 195e lrri $AC0.M, @$AR2 - 0768 2ea2 srs @COEF_A1_1, $AC0.M - 0769 195e lrri $AC0.M, @$AR2 - 076a 2ea3 srs @COEF_A2_1, $AC0.M - 076b 195e lrri $AC0.M, @$AR2 - 076c 2ea4 srs @COEF_A1_2, $AC0.M - 076d 195e lrri $AC0.M, @$AR2 - 076e 2ea5 srs @COEF_A2_2, $AC0.M - 076f 195e lrri $AC0.M, @$AR2 - 0770 2ea6 srs @COEF_A1_3, $AC0.M - 0771 195e lrri $AC0.M, @$AR2 - 0772 2ea7 srs @COEF_A2_3, $AC0.M - 0773 195e lrri $AC0.M, @$AR2 - 0774 2ea8 srs @COEF_A1_4, $AC0.M - 0775 195e lrri $AC0.M, @$AR2 - 0776 2ea9 srs @COEF_A2_4, $AC0.M - 0777 195e lrri $AC0.M, @$AR2 - 0778 2eaa srs @COEF_A1_5, $AC0.M - 0779 195e lrri $AC0.M, @$AR2 - 077a 2eab srs @COEF_A2_5, $AC0.M - 077b 195e lrri $AC0.M, @$AR2 - 077c 2eac srs @COEF_A1_6, $AC0.M - 077d 195e lrri $AC0.M, @$AR2 - 077e 2ead srs @COEF_A2_6, $AC0.M - 077f 195e lrri $AC0.M, @$AR2 - 0780 2eae srs @COEF_A1_7, $AC0.M - 0781 195e lrri $AC0.M, @$AR2 - 0782 2eaf srs @COEF_A2_7, $AC0.M - 0783 195e lrri $AC0.M, @$AR2 - 0784 2ede srs @GAIN, $AC0.M - 0785 195e lrri $AC0.M, @$AR2 - 0786 2eda srs @pred_scale, $AC0.M - 0787 195e lrri $AC0.M, @$AR2 - 0788 2edb srs @yn1, $AC0.M - 0789 195e lrri $AC0.M, @$AR2 - 078a 2edc srs @yn2, $AC0.M - 078b 8c00 clr15 - 078c 8a00 m2 - 078d 8e00 set16 - 078e 195b lrri $AX1.H, @$AR2 - 078f 1959 lrri $AX1.L, @$AR2 - 0790 8100 clr $ACC0 - 0791 195c lrri $AC0.L, @$AR2 - 0792 0080 0e48 lri $AR0, #0x0e48 - 0794 195f lrri $AC1.M, @$AR2 - 0795 195f lrri $AC1.M, @$AR2 - 0796 195f lrri $AC1.M, @$AR2 - 0797 1b1f srri @$AR0, $AC1.M - 0798 185f lrr $AC1.M, @$AR2 - 0799 1b1f srri @$AR0, $AC1.M - 079a 6b00 movax $ACC1, $AX1.L - 079b 1505 lsl $ACC1, #5 - 079c 4d00 add $ACC1, $ACC0 - 079d 157e lsr $ACC1, #-2 - 079e 1c9f mrr $IX0, $AC1.M - 079f 1cbd mrr $IX1, $AC1.L - 07a0 05e0 addis $ACC1, #0xe0 - 07a1 9900 asr16 $ACC1 - 07a2 7d00 neg $ACC1 - 07a3 1cdd mrr $IX2, $AC1.L - 07a4 8900 clr $ACC1 - 07a5 1fa5 mrr $AC1.L, $IX1 - 07a6 1502 lsl $ACC1, #2 - 07a7 1cbf mrr $IX1, $AC1.M - 07a8 009a 01fc lri $AX0.H, #0x01fc - 07aa 009e 0e49 lri $AC0.M, #0x0e49 - 07ac 0081 ffdd lri $AR1, #0xffdd - 07ae 0083 0d80 lri $AR3, #0x0d80 - 07b0 0064 07c1 bloop $IX0, 0x07c1 - 07b2 1827 lrr $IX3, @$AR1 - 07b3 1b07 srri @$AR0, $IX3 - 07b4 4a00 addax $ACC0, $AX1.L - 07b5 1b7e srri @$AR3, $AC0.M - 07b6 1827 lrr $IX3, @$AR1 - 07b7 1b07 srri @$AR0, $IX3 - 07b8 1b7c srri @$AR3, $AC0.L - 07b9 0000 nop - 07ba 1827 lrr $IX3, @$AR1 - 07bb 1b07 srri @$AR0, $IX3 - 07bc 0000 nop - 07bd 0000 nop - 07be 1827 lrr $IX3, @$AR1 - 07bf 1b07 srri @$AR0, $IX3 - 07c0 0000 nop - 07c1 0000 nop - 07c2 0065 07c7 bloop $IX1, 0x07c7 - 07c4 1827 lrr $IX3, @$AR1 - 07c5 1b07 srri @$AR0, $IX3 - 07c6 0000 nop - 07c7 0000 nop - 07c8 0066 07cc bloop $IX2, 0x07cc - 07ca 4a00 addax $ACC0, $AX1.L - 07cb 1b7e srri @$AR3, $AC0.M - 07cc 1b7c srri @$AR3, $AC0.L - 07cd 0004 dar $AR0 - 07ce 189f lrrd $AC1.M, @$AR0 - 07cf 1adf srrd @$AR2, $AC1.M - 07d0 189f lrrd $AC1.M, @$AR0 - 07d1 1adf srrd @$AR2, $AC1.M - 07d2 189f lrrd $AC1.M, @$AR0 - 07d3 1adf srrd @$AR2, $AC1.M - 07d4 189f lrrd $AC1.M, @$AR0 - 07d5 1adf srrd @$AR2, $AC1.M - 07d6 1adc srrd @$AR2, $AC0.L - 07d7 0082 0bd2 lri $AR2, #0x0bd2 - 07d9 27dc lrs $AC1.M, @yn2 - 07da 1adf srrd @$AR2, $AC1.M - 07db 27db lrs $AC1.M, @yn1 - 07dc 1adf srrd @$AR2, $AC1.M - 07dd 27da lrs $AC1.M, @pred_scale - 07de 1adf srrd @$AR2, $AC1.M - 07df 0082 0bbe lri $AR2, #0x0bbe - 07e1 27d9 lrs $AC1.M, @ACCAL - 07e2 1adf srrd @$AR2, $AC1.M - 07e3 27d8 lrs $AC1.M, @ACCAH - 07e4 1adf srrd @$AR2, $AC1.M - 07e5 8d00 set15 - 07e6 8b00 m0 - 07e7 8f00 set40 - 07e8 00c1 0e42 lr $AR1, @0x0e42 - 07ea 0082 0d80 lri $AR2, #0x0d80 - 07ec 8100 clr $ACC0 - 07ed 1120 07f9 bloopi #0x20, 0x07f9 - 07ef 8900 clr $ACC1 - 07f0 1940 lrri $AR0, @$AR2 - 07f1 189e lrrd $AC0.M, @$AR0 - 07f2 181b lrr $AX1.H, @$AR0 - 07f3 199a lrrn $AX0.H, @$AR0 - 07f4 5400 subr $ACC0, $AX0.H - 07f5 1f5e mrr $AX0.H, $AC0.M - 07f6 1959 lrri $AX1.L, @$AR2 - 07f7 b000 mulx $AX0.H, $AX1.L - 07f8 fb00 addpaxz $ACC1, $AX1.H - 07f9 8139 clr's $ACC0 : @$AR1, $AC1.M - 07fa 00e1 0e42 sr @0x0e42, $AR1 - 07fc 02df ret - 07fd 0082 0bb8 lri $AR2, #0x0bb8 - 07ff 195e lrri $AC0.M, @$AR2 - 0800 2ed1 srs @SampleFormat, $AC0.M - 0801 195e lrri $AC0.M, @$AR2 - 0802 2ed4 srs @ACSAH, $AC0.M - 0803 195e lrri $AC0.M, @$AR2 - 0804 2ed5 srs @ACSAL, $AC0.M - 0805 195e lrri $AC0.M, @$AR2 - 0806 2ed6 srs @ACEAH, $AC0.M - 0807 195e lrri $AC0.M, @$AR2 - 0808 2ed7 srs @ACEAL, $AC0.M - 0809 195e lrri $AC0.M, @$AR2 - 080a 2ed8 srs @ACCAH, $AC0.M - 080b 195e lrri $AC0.M, @$AR2 - 080c 2ed9 srs @ACCAL, $AC0.M - 080d 195e lrri $AC0.M, @$AR2 - 080e 2ea0 srs @COEF_A1_0, $AC0.M - 080f 195e lrri $AC0.M, @$AR2 - 0810 2ea1 srs @COEF_A2_0, $AC0.M - 0811 195e lrri $AC0.M, @$AR2 - 0812 2ea2 srs @COEF_A1_1, $AC0.M - 0813 195e lrri $AC0.M, @$AR2 - 0814 2ea3 srs @COEF_A2_1, $AC0.M - 0815 195e lrri $AC0.M, @$AR2 - 0816 2ea4 srs @COEF_A1_2, $AC0.M - 0817 195e lrri $AC0.M, @$AR2 - 0818 2ea5 srs @COEF_A2_2, $AC0.M - 0819 195e lrri $AC0.M, @$AR2 - 081a 2ea6 srs @COEF_A1_3, $AC0.M - 081b 195e lrri $AC0.M, @$AR2 - 081c 2ea7 srs @COEF_A2_3, $AC0.M - 081d 195e lrri $AC0.M, @$AR2 - 081e 2ea8 srs @COEF_A1_4, $AC0.M - 081f 195e lrri $AC0.M, @$AR2 - 0820 2ea9 srs @COEF_A2_4, $AC0.M - 0821 195e lrri $AC0.M, @$AR2 - 0822 2eaa srs @COEF_A1_5, $AC0.M - 0823 195e lrri $AC0.M, @$AR2 - 0824 2eab srs @COEF_A2_5, $AC0.M - 0825 195e lrri $AC0.M, @$AR2 - 0826 2eac srs @COEF_A1_6, $AC0.M - 0827 195e lrri $AC0.M, @$AR2 - 0828 2ead srs @COEF_A2_6, $AC0.M - 0829 195e lrri $AC0.M, @$AR2 - 082a 2eae srs @COEF_A1_7, $AC0.M - 082b 195e lrri $AC0.M, @$AR2 - 082c 2eaf srs @COEF_A2_7, $AC0.M - 082d 195e lrri $AC0.M, @$AR2 - 082e 2ede srs @GAIN, $AC0.M - 082f 195e lrri $AC0.M, @$AR2 - 0830 2eda srs @pred_scale, $AC0.M - 0831 195e lrri $AC0.M, @$AR2 - 0832 2edb srs @yn1, $AC0.M - 0833 195e lrri $AC0.M, @$AR2 - 0834 2edc srs @yn2, $AC0.M - 0835 00c0 0e42 lr $AR0, @0x0e42 - 0837 0081 ffdd lri $AR1, #0xffdd - 0839 1120 083e bloopi #0x20, 0x083e - 083b 1824 lrr $IX0, @$AR1 - 083c 1b04 srri @$AR0, $IX0 - 083d 0000 nop - 083e 0000 nop - 083f 00e0 0e42 sr @0x0e42, $AR0 - 0841 0082 0bd9 lri $AR2, #0x0bd9 - 0843 0004 dar $AR0 - 0844 189f lrrd $AC1.M, @$AR0 - 0845 1adf srrd @$AR2, $AC1.M - 0846 189f lrrd $AC1.M, @$AR0 - 0847 1adf srrd @$AR2, $AC1.M - 0848 189f lrrd $AC1.M, @$AR0 - 0849 1adf srrd @$AR2, $AC1.M - 084a 189f lrrd $AC1.M, @$AR0 - 084b 1adf srrd @$AR2, $AC1.M - 084c 8900 clr $ACC1 - 084d 1adc srrd @$AR2, $AC0.L - 084e 27dc lrs $AC1.M, @yn2 - 084f 00ff 0bd2 sr @0x0bd2, $AC1.M - 0851 27db lrs $AC1.M, @yn1 - 0852 00ff 0bd1 sr @0x0bd1, $AC1.M - 0854 27da lrs $AC1.M, @pred_scale - 0855 00ff 0bd0 sr @0x0bd0, $AC1.M - 0857 27d9 lrs $AC1.M, @ACCAL - 0858 00ff 0bbe sr @0x0bbe, $AC1.M - 085a 27d8 lrs $AC1.M, @ACCAH - 085b 00ff 0bbd sr @0x0bbd, $AC1.M - 085d 02df ret - 085e 02df ret - 085f 00c0 0e40 lr $AR0, @0x0e40 - 0861 0081 0b89 lri $AR1, #0x0b89 - 0863 00c2 0e08 lr $AR2, @0x0e08 - 0865 1c62 mrr $AR3, $AR2 - 0866 02bf 81f9 call 0x81f9 - 0868 00f8 0ba9 sr @0x0ba9, $AX0.L - 086a 02df ret - 086b 00c0 0e41 lr $AR0, @0x0e41 - 086d 0081 0b8b lri $AR1, #0x0b8b - 086f 00c2 0e09 lr $AR2, @0x0e09 - 0871 1c62 mrr $AR3, $AR2 - 0872 02bf 81f9 call 0x81f9 - 0874 00f8 0bac sr @0x0bac, $AX0.L - 0876 02df ret - 0877 00c0 0e40 lr $AR0, @0x0e40 - 0879 0081 0b89 lri $AR1, #0x0b89 - 087b 00c2 0e08 lr $AR2, @0x0e08 - 087d 1c62 mrr $AR3, $AR2 - 087e 00c4 0e41 lr $IX0, @0x0e41 - 0880 00c5 0e09 lr $IX1, @0x0e09 - 0882 02bf 80e7 call 0x80e7 - 0884 00f8 0ba9 sr @0x0ba9, $AX0.L - 0886 00fb 0bac sr @0x0bac, $AX1.H - 0888 02df ret - 0889 00c0 0e43 lr $AR0, @0x0e43 - 088b 0081 0b97 lri $AR1, #0x0b97 - 088d 00c2 0e0a lr $AR2, @0x0e0a - 088f 1c62 mrr $AR3, $AR2 - 0890 02bf 81f9 call 0x81f9 - 0892 00f8 0baf sr @0x0baf, $AX0.L - 0894 02df ret - 0895 00c0 0e40 lr $AR0, @0x0e40 - 0897 0081 0b89 lri $AR1, #0x0b89 - 0899 00c2 0e08 lr $AR2, @0x0e08 - 089b 1c62 mrr $AR3, $AR2 - 089c 02bf 81f9 call 0x81f9 - 089e 00f8 0ba9 sr @0x0ba9, $AX0.L - 08a0 00c0 0e43 lr $AR0, @0x0e43 - 08a2 0081 0b97 lri $AR1, #0x0b97 - 08a4 00c2 0e0a lr $AR2, @0x0e0a - 08a6 1c62 mrr $AR3, $AR2 - 08a7 02bf 81f9 call 0x81f9 - 08a9 00f8 0baf sr @0x0baf, $AX0.L - 08ab 02df ret - 08ac 00c0 0e41 lr $AR0, @0x0e41 - 08ae 0081 0b8b lri $AR1, #0x0b8b - 08b0 00c2 0e09 lr $AR2, @0x0e09 - 08b2 1c62 mrr $AR3, $AR2 - 08b3 02bf 81f9 call 0x81f9 - 08b5 00f8 0bac sr @0x0bac, $AX0.L - 08b7 00c0 0e43 lr $AR0, @0x0e43 - 08b9 0081 0b97 lri $AR1, #0x0b97 - 08bb 00c2 0e0a lr $AR2, @0x0e0a - 08bd 1c62 mrr $AR3, $AR2 - 08be 02bf 81f9 call 0x81f9 - 08c0 00f8 0baf sr @0x0baf, $AX0.L - 08c2 02df ret - 08c3 00c0 0e40 lr $AR0, @0x0e40 - 08c5 0081 0b89 lri $AR1, #0x0b89 - 08c7 00c2 0e08 lr $AR2, @0x0e08 - 08c9 1c62 mrr $AR3, $AR2 - 08ca 00c4 0e41 lr $IX0, @0x0e41 - 08cc 00c5 0e09 lr $IX1, @0x0e09 - 08ce 02bf 80e7 call 0x80e7 - 08d0 00f8 0ba9 sr @0x0ba9, $AX0.L - 08d2 00fb 0bac sr @0x0bac, $AX1.H - 08d4 00c0 0e43 lr $AR0, @0x0e43 - 08d6 0081 0b97 lri $AR1, #0x0b97 - 08d8 00c2 0e0a lr $AR2, @0x0e0a - 08da 1c62 mrr $AR3, $AR2 - 08db 02bf 81f9 call 0x81f9 - 08dd 00f8 0baf sr @0x0baf, $AX0.L - 08df 02df ret - 08e0 00c0 0e40 lr $AR0, @0x0e40 - 08e2 0081 0b89 lri $AR1, #0x0b89 - 08e4 00c2 0e08 lr $AR2, @0x0e08 - 08e6 0083 0e48 lri $AR3, #0x0e48 - 08e8 02bf 845d call 0x845d - 08ea 00f8 0ba9 sr @0x0ba9, $AX0.L - 08ec 02df ret - 08ed 00c0 0e41 lr $AR0, @0x0e41 - 08ef 0081 0b8b lri $AR1, #0x0b8b - 08f1 00c2 0e09 lr $AR2, @0x0e09 - 08f3 0083 0e48 lri $AR3, #0x0e48 - 08f5 02bf 845d call 0x845d - 08f7 00f8 0bac sr @0x0bac, $AX0.L - 08f9 02df ret - 08fa 00c0 0e40 lr $AR0, @0x0e40 - 08fc 0081 0b89 lri $AR1, #0x0b89 - 08fe 00c2 0e08 lr $AR2, @0x0e08 - 0900 0083 0e48 lri $AR3, #0x0e48 - 0902 00c4 0e41 lr $IX0, @0x0e41 - 0904 00c5 0e09 lr $IX1, @0x0e09 - 0906 02bf 8282 call 0x8282 - 0908 00f8 0ba9 sr @0x0ba9, $AX0.L - 090a 00fb 0bac sr @0x0bac, $AX1.H - 090c 02df ret - 090d 00c0 0e43 lr $AR0, @0x0e43 - 090f 0081 0b97 lri $AR1, #0x0b97 - 0911 00c2 0e0a lr $AR2, @0x0e0a - 0913 0083 0e48 lri $AR3, #0x0e48 - 0915 02bf 845d call 0x845d - 0917 00f8 0baf sr @0x0baf, $AX0.L - 0919 02df ret - 091a 00c0 0e40 lr $AR0, @0x0e40 - 091c 0081 0b89 lri $AR1, #0x0b89 - 091e 00c2 0e08 lr $AR2, @0x0e08 - 0920 0083 0e48 lri $AR3, #0x0e48 - 0922 02bf 845d call 0x845d - 0924 00f8 0ba9 sr @0x0ba9, $AX0.L - 0926 00c0 0e43 lr $AR0, @0x0e43 - 0928 0081 0b97 lri $AR1, #0x0b97 - 092a 00c2 0e0a lr $AR2, @0x0e0a - 092c 0083 0e48 lri $AR3, #0x0e48 - 092e 02bf 845d call 0x845d - 0930 00f8 0baf sr @0x0baf, $AX0.L - 0932 02df ret - 0933 00c0 0e41 lr $AR0, @0x0e41 - 0935 0081 0b8b lri $AR1, #0x0b8b - 0937 00c2 0e09 lr $AR2, @0x0e09 - 0939 0083 0e48 lri $AR3, #0x0e48 - 093b 02bf 845d call 0x845d - 093d 00f8 0bac sr @0x0bac, $AX0.L - 093f 00c0 0e43 lr $AR0, @0x0e43 - 0941 0081 0b97 lri $AR1, #0x0b97 - 0943 00c2 0e0a lr $AR2, @0x0e0a - 0945 0083 0e48 lri $AR3, #0x0e48 - 0947 02bf 845d call 0x845d - 0949 00f8 0baf sr @0x0baf, $AX0.L - 094b 02df ret - 094c 00c0 0e40 lr $AR0, @0x0e40 - 094e 0081 0b89 lri $AR1, #0x0b89 - 0950 00c2 0e08 lr $AR2, @0x0e08 - 0952 0083 0e48 lri $AR3, #0x0e48 - 0954 00c4 0e41 lr $IX0, @0x0e41 - 0956 00c5 0e09 lr $IX1, @0x0e09 - 0958 02bf 8282 call 0x8282 - 095a 00f8 0ba9 sr @0x0ba9, $AX0.L - 095c 00fb 0bac sr @0x0bac, $AX1.H - 095e 00c0 0e43 lr $AR0, @0x0e43 - 0960 0081 0b97 lri $AR1, #0x0b97 - 0962 00c2 0e0a lr $AR2, @0x0e0a - 0964 0083 0e48 lri $AR3, #0x0e48 - 0966 02bf 845d call 0x845d - 0968 00f8 0baf sr @0x0baf, $AX0.L - 096a 02df ret - 096b 00c0 0e40 lr $AR0, @0x0e40 - 096d 0081 0b8d lri $AR1, #0x0b8d - 096f 00c2 0e0b lr $AR2, @0x0e0b - 0971 1c62 mrr $AR3, $AR2 - 0972 02bf 81f9 call 0x81f9 - 0974 00f8 0baa sr @0x0baa, $AX0.L - 0976 02df ret - 0977 00c0 0e41 lr $AR0, @0x0e41 - 0979 0081 0b8f lri $AR1, #0x0b8f - 097b 00c2 0e0c lr $AR2, @0x0e0c - 097d 1c62 mrr $AR3, $AR2 - 097e 02bf 81f9 call 0x81f9 - 0980 00f8 0bad sr @0x0bad, $AX0.L - 0982 02df ret - 0983 00c0 0e40 lr $AR0, @0x0e40 - 0985 0081 0b8d lri $AR1, #0x0b8d - 0987 00c2 0e0b lr $AR2, @0x0e0b - 0989 1c62 mrr $AR3, $AR2 - 098a 00c4 0e41 lr $IX0, @0x0e41 - 098c 00c5 0e0c lr $IX1, @0x0e0c - 098e 02bf 80e7 call 0x80e7 - 0990 00f8 0baa sr @0x0baa, $AX0.L - 0992 00fb 0bad sr @0x0bad, $AX1.H - 0994 02df ret - 0995 00c0 0e40 lr $AR0, @0x0e40 - 0997 0081 0b8d lri $AR1, #0x0b8d - 0999 00c2 0e0b lr $AR2, @0x0e0b - 099b 0083 0e48 lri $AR3, #0x0e48 - 099d 02bf 845d call 0x845d - 099f 00f8 0baa sr @0x0baa, $AX0.L - 09a1 02df ret - 09a2 00c0 0e41 lr $AR0, @0x0e41 - 09a4 0081 0b8f lri $AR1, #0x0b8f - 09a6 00c2 0e0c lr $AR2, @0x0e0c - 09a8 0083 0e48 lri $AR3, #0x0e48 - 09aa 02bf 845d call 0x845d - 09ac 00f8 0bad sr @0x0bad, $AX0.L - 09ae 02df ret - 09af 00c0 0e40 lr $AR0, @0x0e40 - 09b1 0081 0b8d lri $AR1, #0x0b8d - 09b3 00c2 0e0b lr $AR2, @0x0e0b - 09b5 0083 0e48 lri $AR3, #0x0e48 - 09b7 00c4 0e41 lr $IX0, @0x0e41 - 09b9 00c5 0e0c lr $IX1, @0x0e0c - 09bb 02bf 8282 call 0x8282 - 09bd 00f8 0baa sr @0x0baa, $AX0.L - 09bf 00fb 0bad sr @0x0bad, $AX1.H - 09c1 02df ret - 09c2 00c0 0e43 lr $AR0, @0x0e43 - 09c4 0081 0b99 lri $AR1, #0x0b99 - 09c6 00c2 0e0d lr $AR2, @0x0e0d - 09c8 1c62 mrr $AR3, $AR2 - 09c9 02bf 81f9 call 0x81f9 - 09cb 00f8 0bb0 sr @0x0bb0, $AX0.L - 09cd 02df ret - 09ce 00c0 0e43 lr $AR0, @0x0e43 - 09d0 0081 0b99 lri $AR1, #0x0b99 - 09d2 00c2 0e0d lr $AR2, @0x0e0d - 09d4 1c62 mrr $AR3, $AR2 - 09d5 02bf 81f9 call 0x81f9 - 09d7 00f8 0bb0 sr @0x0bb0, $AX0.L - 09d9 029f 096b jmp 0x096b - 09db 00c0 0e43 lr $AR0, @0x0e43 - 09dd 0081 0b99 lri $AR1, #0x0b99 - 09df 00c2 0e0d lr $AR2, @0x0e0d - 09e1 1c62 mrr $AR3, $AR2 - 09e2 02bf 81f9 call 0x81f9 - 09e4 00f8 0bb0 sr @0x0bb0, $AX0.L - 09e6 029f 0977 jmp 0x0977 - 09e8 00c0 0e43 lr $AR0, @0x0e43 - 09ea 0081 0b99 lri $AR1, #0x0b99 - 09ec 00c2 0e0d lr $AR2, @0x0e0d - 09ee 1c62 mrr $AR3, $AR2 - 09ef 02bf 81f9 call 0x81f9 - 09f1 00f8 0bb0 sr @0x0bb0, $AX0.L - 09f3 029f 0983 jmp 0x0983 - 09f5 00c0 0e43 lr $AR0, @0x0e43 - 09f7 0081 0b99 lri $AR1, #0x0b99 - 09f9 00c2 0e0d lr $AR2, @0x0e0d - 09fb 1c62 mrr $AR3, $AR2 - 09fc 02bf 81f9 call 0x81f9 - 09fe 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a00 029f 0995 jmp 0x0995 - 0a02 00c0 0e43 lr $AR0, @0x0e43 - 0a04 0081 0b99 lri $AR1, #0x0b99 - 0a06 00c2 0e0d lr $AR2, @0x0e0d - 0a08 1c62 mrr $AR3, $AR2 - 0a09 02bf 81f9 call 0x81f9 - 0a0b 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a0d 029f 09a2 jmp 0x09a2 - 0a0f 00c0 0e43 lr $AR0, @0x0e43 - 0a11 0081 0b99 lri $AR1, #0x0b99 - 0a13 00c2 0e0d lr $AR2, @0x0e0d - 0a15 1c62 mrr $AR3, $AR2 - 0a16 02bf 81f9 call 0x81f9 - 0a18 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a1a 029f 09af jmp 0x09af - 0a1c 00c0 0e43 lr $AR0, @0x0e43 - 0a1e 0081 0b99 lri $AR1, #0x0b99 - 0a20 00c2 0e0d lr $AR2, @0x0e0d - 0a22 0083 0e48 lri $AR3, #0x0e48 - 0a24 02bf 845d call 0x845d - 0a26 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a28 02df ret - 0a29 00c0 0e43 lr $AR0, @0x0e43 - 0a2b 0081 0b99 lri $AR1, #0x0b99 - 0a2d 00c2 0e0d lr $AR2, @0x0e0d - 0a2f 0083 0e48 lri $AR3, #0x0e48 - 0a31 02bf 845d call 0x845d - 0a33 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a35 029f 096b jmp 0x096b - 0a37 00c0 0e43 lr $AR0, @0x0e43 - 0a39 0081 0b99 lri $AR1, #0x0b99 - 0a3b 00c2 0e0d lr $AR2, @0x0e0d - 0a3d 0083 0e48 lri $AR3, #0x0e48 - 0a3f 02bf 845d call 0x845d - 0a41 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a43 029f 0977 jmp 0x0977 - 0a45 00c0 0e43 lr $AR0, @0x0e43 - 0a47 0081 0b99 lri $AR1, #0x0b99 - 0a49 00c2 0e0d lr $AR2, @0x0e0d - 0a4b 0083 0e48 lri $AR3, #0x0e48 - 0a4d 02bf 845d call 0x845d - 0a4f 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a51 029f 0983 jmp 0x0983 - 0a53 00c0 0e43 lr $AR0, @0x0e43 - 0a55 0081 0b99 lri $AR1, #0x0b99 - 0a57 00c2 0e0d lr $AR2, @0x0e0d - 0a59 0083 0e48 lri $AR3, #0x0e48 - 0a5b 02bf 845d call 0x845d - 0a5d 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a5f 029f 0995 jmp 0x0995 - 0a61 00c0 0e43 lr $AR0, @0x0e43 - 0a63 0081 0b99 lri $AR1, #0x0b99 - 0a65 00c2 0e0d lr $AR2, @0x0e0d - 0a67 0083 0e48 lri $AR3, #0x0e48 - 0a69 02bf 845d call 0x845d - 0a6b 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a6d 029f 09a2 jmp 0x09a2 - 0a6f 00c0 0e43 lr $AR0, @0x0e43 - 0a71 0081 0b99 lri $AR1, #0x0b99 - 0a73 00c2 0e0d lr $AR2, @0x0e0d - 0a75 0083 0e48 lri $AR3, #0x0e48 - 0a77 02bf 845d call 0x845d - 0a79 00f8 0bb0 sr @0x0bb0, $AX0.L - 0a7b 029f 09af jmp 0x09af - 0a7d 00c0 0e40 lr $AR0, @0x0e40 - 0a7f 0081 0b91 lri $AR1, #0x0b91 - 0a81 00c2 0e0e lr $AR2, @0x0e0e - 0a83 1c62 mrr $AR3, $AR2 - 0a84 02bf 81f9 call 0x81f9 - 0a86 00f8 0bab sr @0x0bab, $AX0.L - 0a88 02df ret - 0a89 00c0 0e41 lr $AR0, @0x0e41 - 0a8b 0081 0b93 lri $AR1, #0x0b93 - 0a8d 00c2 0e0f lr $AR2, @0x0e0f - 0a8f 1c62 mrr $AR3, $AR2 - 0a90 02bf 81f9 call 0x81f9 - 0a92 00f8 0bae sr @0x0bae, $AX0.L - 0a94 02df ret - 0a95 00c0 0e40 lr $AR0, @0x0e40 - 0a97 0081 0b91 lri $AR1, #0x0b91 - 0a99 00c2 0e0e lr $AR2, @0x0e0e - 0a9b 1c62 mrr $AR3, $AR2 - 0a9c 00c4 0e41 lr $IX0, @0x0e41 - 0a9e 00c5 0e0f lr $IX1, @0x0e0f - 0aa0 02bf 80e7 call 0x80e7 - 0aa2 00f8 0bab sr @0x0bab, $AX0.L - 0aa4 00fb 0bae sr @0x0bae, $AX1.H - 0aa6 02df ret - 0aa7 00c0 0e40 lr $AR0, @0x0e40 - 0aa9 0081 0b91 lri $AR1, #0x0b91 - 0aab 00c2 0e0e lr $AR2, @0x0e0e - 0aad 0083 0e48 lri $AR3, #0x0e48 - 0aaf 02bf 845d call 0x845d - 0ab1 00f8 0bab sr @0x0bab, $AX0.L - 0ab3 02df ret - 0ab4 00c0 0e41 lr $AR0, @0x0e41 - 0ab6 0081 0b93 lri $AR1, #0x0b93 - 0ab8 00c2 0e0f lr $AR2, @0x0e0f - 0aba 0083 0e48 lri $AR3, #0x0e48 - 0abc 02bf 845d call 0x845d - 0abe 00f8 0bae sr @0x0bae, $AX0.L - 0ac0 02df ret - 0ac1 00c0 0e40 lr $AR0, @0x0e40 - 0ac3 0081 0b91 lri $AR1, #0x0b91 - 0ac5 00c2 0e0e lr $AR2, @0x0e0e - 0ac7 0083 0e48 lri $AR3, #0x0e48 - 0ac9 00c4 0e41 lr $IX0, @0x0e41 - 0acb 00c5 0e0f lr $IX1, @0x0e0f - 0acd 02bf 8282 call 0x8282 - 0acf 00f8 0bab sr @0x0bab, $AX0.L - 0ad1 00fb 0bae sr @0x0bae, $AX1.H - 0ad3 02df ret - 0ad4 00c0 0e43 lr $AR0, @0x0e43 - 0ad6 0081 0b95 lri $AR1, #0x0b95 - 0ad8 00c2 0e10 lr $AR2, @0x0e10 - 0ada 1c62 mrr $AR3, $AR2 - 0adb 02bf 81f9 call 0x81f9 - 0add 00f8 0bb1 sr @0x0bb1, $AX0.L - 0adf 02df ret - 0ae0 00c0 0e43 lr $AR0, @0x0e43 - 0ae2 0081 0b95 lri $AR1, #0x0b95 - 0ae4 00c2 0e10 lr $AR2, @0x0e10 - 0ae6 1c62 mrr $AR3, $AR2 - 0ae7 02bf 81f9 call 0x81f9 - 0ae9 00f8 0bb1 sr @0x0bb1, $AX0.L - 0aeb 029f 0a7d jmp 0x0a7d - 0aed 00c0 0e43 lr $AR0, @0x0e43 - 0aef 0081 0b95 lri $AR1, #0x0b95 - 0af1 00c2 0e10 lr $AR2, @0x0e10 - 0af3 1c62 mrr $AR3, $AR2 - 0af4 02bf 81f9 call 0x81f9 - 0af6 00f8 0bb1 sr @0x0bb1, $AX0.L - 0af8 029f 0a89 jmp 0x0a89 - 0afa 00c0 0e43 lr $AR0, @0x0e43 - 0afc 0081 0b95 lri $AR1, #0x0b95 - 0afe 00c2 0e10 lr $AR2, @0x0e10 - 0b00 1c62 mrr $AR3, $AR2 - 0b01 02bf 81f9 call 0x81f9 - 0b03 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b05 029f 0a95 jmp 0x0a95 - 0b07 00c0 0e43 lr $AR0, @0x0e43 - 0b09 0081 0b95 lri $AR1, #0x0b95 - 0b0b 00c2 0e10 lr $AR2, @0x0e10 - 0b0d 1c62 mrr $AR3, $AR2 - 0b0e 02bf 81f9 call 0x81f9 - 0b10 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b12 029f 0aa7 jmp 0x0aa7 - 0b14 00c0 0e43 lr $AR0, @0x0e43 - 0b16 0081 0b95 lri $AR1, #0x0b95 - 0b18 00c2 0e10 lr $AR2, @0x0e10 - 0b1a 1c62 mrr $AR3, $AR2 - 0b1b 02bf 81f9 call 0x81f9 - 0b1d 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b1f 029f 0ab4 jmp 0x0ab4 - 0b21 00c0 0e43 lr $AR0, @0x0e43 - 0b23 0081 0b95 lri $AR1, #0x0b95 - 0b25 00c2 0e10 lr $AR2, @0x0e10 - 0b27 1c62 mrr $AR3, $AR2 - 0b28 02bf 81f9 call 0x81f9 - 0b2a 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b2c 029f 0ac1 jmp 0x0ac1 - 0b2e 00c0 0e43 lr $AR0, @0x0e43 - 0b30 0081 0b95 lri $AR1, #0x0b95 - 0b32 00c2 0e10 lr $AR2, @0x0e10 - 0b34 0083 0e48 lri $AR3, #0x0e48 - 0b36 02bf 845d call 0x845d - 0b38 02df ret - 0b39 00c0 0e43 lr $AR0, @0x0e43 - 0b3b 0081 0b95 lri $AR1, #0x0b95 - 0b3d 00c2 0e10 lr $AR2, @0x0e10 - 0b3f 0083 0e48 lri $AR3, #0x0e48 - 0b41 02bf 845d call 0x845d - 0b43 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b45 029f 0a7d jmp 0x0a7d - 0b47 00c0 0e43 lr $AR0, @0x0e43 - 0b49 0081 0b95 lri $AR1, #0x0b95 - 0b4b 00c2 0e10 lr $AR2, @0x0e10 - 0b4d 0083 0e48 lri $AR3, #0x0e48 - 0b4f 02bf 845d call 0x845d - 0b51 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b53 029f 0a89 jmp 0x0a89 - 0b55 00c0 0e43 lr $AR0, @0x0e43 - 0b57 0081 0b95 lri $AR1, #0x0b95 - 0b59 00c2 0e10 lr $AR2, @0x0e10 - 0b5b 0083 0e48 lri $AR3, #0x0e48 - 0b5d 02bf 845d call 0x845d - 0b5f 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b61 029f 0a95 jmp 0x0a95 - 0b63 00c0 0e43 lr $AR0, @0x0e43 - 0b65 0081 0b95 lri $AR1, #0x0b95 - 0b67 00c2 0e10 lr $AR2, @0x0e10 - 0b69 0083 0e48 lri $AR3, #0x0e48 - 0b6b 02bf 845d call 0x845d - 0b6d 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b6f 029f 0aa7 jmp 0x0aa7 - 0b71 00c0 0e43 lr $AR0, @0x0e43 - 0b73 0081 0b95 lri $AR1, #0x0b95 - 0b75 00c2 0e10 lr $AR2, @0x0e10 - 0b77 0083 0e48 lri $AR3, #0x0e48 - 0b79 02bf 845d call 0x845d - 0b7b 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b7d 029f 0ab4 jmp 0x0ab4 - 0b7f 00c0 0e43 lr $AR0, @0x0e43 - 0b81 0081 0b95 lri $AR1, #0x0b95 - 0b83 00c2 0e10 lr $AR2, @0x0e10 - 0b85 0083 0e48 lri $AR3, #0x0e48 - 0b87 02bf 845d call 0x845d - 0b89 00f8 0bb1 sr @0x0bb1, $AX0.L - 0b8b 029f 0ac1 jmp 0x0ac1 - 0b8d 00c0 0e43 lr $AR0, @0x0e43 - 0b8f 0081 0b91 lri $AR1, #0x0b91 - 0b91 00c2 0e0e lr $AR2, @0x0e0e - 0b93 1c62 mrr $AR3, $AR2 - 0b94 02bf 81f9 call 0x81f9 - 0b96 00f8 0bab sr @0x0bab, $AX0.L - 0b98 02df ret - 0b99 00c0 0e43 lr $AR0, @0x0e43 - 0b9b 0081 0b93 lri $AR1, #0x0b93 - 0b9d 00c2 0e0f lr $AR2, @0x0e0f - 0b9f 1c62 mrr $AR3, $AR2 - 0ba0 02bf 81f9 call 0x81f9 - 0ba2 00f8 0bae sr @0x0bae, $AX0.L - 0ba4 02df ret - 0ba5 00c0 0e43 lr $AR0, @0x0e43 - 0ba7 0081 0b91 lri $AR1, #0x0b91 - 0ba9 00c2 0e0e lr $AR2, @0x0e0e - 0bab 1c62 mrr $AR3, $AR2 - 0bac 00c4 0e43 lr $IX0, @0x0e43 - 0bae 00c5 0e0f lr $IX1, @0x0e0f - 0bb0 02bf 80e7 call 0x80e7 - 0bb2 00f8 0bab sr @0x0bab, $AX0.L - 0bb4 00fb 0bae sr @0x0bae, $AX1.H - 0bb6 02df ret - 0bb7 00c0 0e43 lr $AR0, @0x0e43 - 0bb9 0081 0b91 lri $AR1, #0x0b91 - 0bbb 00c2 0e0e lr $AR2, @0x0e0e - 0bbd 0083 0e48 lri $AR3, #0x0e48 - 0bbf 02bf 845d call 0x845d - 0bc1 00f8 0bab sr @0x0bab, $AX0.L - 0bc3 02df ret - 0bc4 00c0 0e43 lr $AR0, @0x0e43 - 0bc6 0081 0b93 lri $AR1, #0x0b93 - 0bc8 00c2 0e0f lr $AR2, @0x0e0f - 0bca 0083 0e48 lri $AR3, #0x0e48 - 0bcc 02bf 845d call 0x845d - 0bce 00f8 0bae sr @0x0bae, $AX0.L - 0bd0 02df ret - 0bd1 00c0 0e43 lr $AR0, @0x0e43 - 0bd3 0081 0b91 lri $AR1, #0x0b91 - 0bd5 00c2 0e0e lr $AR2, @0x0e0e - 0bd7 0083 0e48 lri $AR3, #0x0e48 - 0bd9 00c4 0e43 lr $IX0, @0x0e43 - 0bdb 00c5 0e0f lr $IX1, @0x0e0f - 0bdd 02bf 8282 call 0x8282 - 0bdf 00f8 0bab sr @0x0bab, $AX0.L - 0be1 00fb 0bae sr @0x0bae, $AX1.H - 0be3 02df ret - 0be4 00c0 0e43 lr $AR0, @0x0e43 - 0be6 0081 0b95 lri $AR1, #0x0b95 - 0be8 00c2 0e10 lr $AR2, @0x0e10 - 0bea 1c62 mrr $AR3, $AR2 - 0beb 02bf 81f9 call 0x81f9 - 0bed 00f8 0bb1 sr @0x0bb1, $AX0.L - 0bef 029f 0b8d jmp 0x0b8d - 0bf1 00c0 0e43 lr $AR0, @0x0e43 - 0bf3 0081 0b95 lri $AR1, #0x0b95 - 0bf5 00c2 0e10 lr $AR2, @0x0e10 - 0bf7 1c62 mrr $AR3, $AR2 - 0bf8 02bf 81f9 call 0x81f9 - 0bfa 00f8 0bb1 sr @0x0bb1, $AX0.L - 0bfc 029f 0b99 jmp 0x0b99 - 0bfe 00c0 0e43 lr $AR0, @0x0e43 - 0c00 0081 0b95 lri $AR1, #0x0b95 - 0c02 00c2 0e10 lr $AR2, @0x0e10 - 0c04 1c62 mrr $AR3, $AR2 - 0c05 02bf 81f9 call 0x81f9 - 0c07 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c09 029f 0ba5 jmp 0x0ba5 - 0c0b 00c0 0e43 lr $AR0, @0x0e43 - 0c0d 0081 0b95 lri $AR1, #0x0b95 - 0c0f 00c2 0e10 lr $AR2, @0x0e10 - 0c11 1c62 mrr $AR3, $AR2 - 0c12 02bf 81f9 call 0x81f9 - 0c14 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c16 029f 0bb7 jmp 0x0bb7 - 0c18 00c0 0e43 lr $AR0, @0x0e43 - 0c1a 0081 0b95 lri $AR1, #0x0b95 - 0c1c 00c2 0e10 lr $AR2, @0x0e10 - 0c1e 1c62 mrr $AR3, $AR2 - 0c1f 02bf 81f9 call 0x81f9 - 0c21 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c23 029f 0bc4 jmp 0x0bc4 - 0c25 00c0 0e43 lr $AR0, @0x0e43 - 0c27 0081 0b95 lri $AR1, #0x0b95 - 0c29 00c2 0e10 lr $AR2, @0x0e10 - 0c2b 1c62 mrr $AR3, $AR2 - 0c2c 02bf 81f9 call 0x81f9 - 0c2e 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c30 029f 0bd1 jmp 0x0bd1 - 0c32 00c0 0e43 lr $AR0, @0x0e43 - 0c34 0081 0b95 lri $AR1, #0x0b95 - 0c36 00c2 0e10 lr $AR2, @0x0e10 - 0c38 0083 0e48 lri $AR3, #0x0e48 - 0c3a 02bf 845d call 0x845d - 0c3c 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c3e 029f 0b8d jmp 0x0b8d - 0c40 00c0 0e43 lr $AR0, @0x0e43 - 0c42 0081 0b95 lri $AR1, #0x0b95 - 0c44 00c2 0e10 lr $AR2, @0x0e10 - 0c46 0083 0e48 lri $AR3, #0x0e48 - 0c48 02bf 845d call 0x845d - 0c4a 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c4c 029f 0b99 jmp 0x0b99 - 0c4e 00c0 0e43 lr $AR0, @0x0e43 - 0c50 0081 0b95 lri $AR1, #0x0b95 - 0c52 00c2 0e10 lr $AR2, @0x0e10 - 0c54 0083 0e48 lri $AR3, #0x0e48 - 0c56 02bf 845d call 0x845d - 0c58 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c5a 029f 0ba5 jmp 0x0ba5 - 0c5c 00c0 0e43 lr $AR0, @0x0e43 - 0c5e 0081 0b95 lri $AR1, #0x0b95 - 0c60 00c2 0e10 lr $AR2, @0x0e10 - 0c62 0083 0e48 lri $AR3, #0x0e48 - 0c64 02bf 845d call 0x845d - 0c66 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c68 029f 0bb7 jmp 0x0bb7 - 0c6a 00c0 0e43 lr $AR0, @0x0e43 - 0c6c 0081 0b95 lri $AR1, #0x0b95 - 0c6e 00c2 0e10 lr $AR2, @0x0e10 - 0c70 0083 0e48 lri $AR3, #0x0e48 - 0c72 02bf 845d call 0x845d - 0c74 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c76 029f 0bc4 jmp 0x0bc4 - 0c78 00c0 0e43 lr $AR0, @0x0e43 - 0c7a 0081 0b95 lri $AR1, #0x0b95 - 0c7c 00c2 0e10 lr $AR2, @0x0e10 - 0c7e 0083 0e48 lri $AR3, #0x0e48 - 0c80 02bf 845d call 0x845d - 0c82 00f8 0bb1 sr @0x0bb1, $AX0.L - 0c84 029f 0bd1 jmp 0x0bd1 - -// Is this a jump table?? - 0c86 0118 cw 0x0118 ; *** UNKNOWN OPCODE *** - 0c87 01d4 cw 0x01d4 ; *** UNKNOWN OPCODE *** - 0c88 0252 cw 0x0252 ; *** UNKNOWN OPCODE *** - 0c89 02f8 cw 0x02f8 ; *** UNKNOWN OPCODE *** - 0c8a 0509 addis $ACC1, #0x09 - 0c8b 051d addis $ACC1, #0x1d - 0c8c 01fb cw 0x01fb ; *** UNKNOWN OPCODE *** - 0c8d 066a cmpis $ACC0, #0x6a - 0c8e 0d10 lris $AC1.L, #0x10 - 0c8f 01f5 cw 0x01f5 ; *** UNKNOWN OPCODE *** - 0c90 056e addis $ACC1, #0x6e - 0c91 056a addis $ACC1, #0x6a - 0c92 056c addis $ACC1, #0x6c - 0c93 023f cw 0x023f ; *** UNKNOWN OPCODE *** - 0c94 0531 addis $ACC1, #0x31 - 0c95 0570 addis $ACC1, #0x70 - 0c96 0d8a lris $AC1.L, #0x8a - 0c97 020b cw 0x020b ; *** UNKNOWN OPCODE *** - - 0c98 0082 0e00 lri $AR2, #0x0e00 - 0c9a 085e lris $AX0.L, #0x5e - 0c9b 085f lris $AX0.L, #0x5f - 0c9c 086b lris $AX0.L, #0x6b - 0c9d 0877 lris $AX0.L, #0x77 - 0c9e 0889 lris $AX0.L, #0x89 - 0c9f 0895 lris $AX0.L, #0x95 - 0ca0 08ac lris $AX0.L, #0xac - 0ca1 08c3 lris $AX0.L, #0xc3 - 0ca2 085e lris $AX0.L, #0x5e - 0ca3 08e0 lris $AX0.L, #0xe0 - 0ca4 08ed lris $AX0.L, #0xed - 0ca5 08fa lris $AX0.L, #0xfa - 0ca6 090d lris $AX1.L, #0x0d - 0ca7 091a lris $AX1.L, #0x1a - 0ca8 0933 lris $AX1.L, #0x33 - 0ca9 094c lris $AX1.L, #0x4c - 0caa 085e lris $AX0.L, #0x5e - 0cab 096b lris $AX1.L, #0x6b - 0cac 0977 lris $AX1.L, #0x77 - 0cad 0983 lris $AX1.L, #0x83 - 0cae 085e lris $AX0.L, #0x5e - 0caf 0995 lris $AX1.L, #0x95 - 0cb0 09a2 lris $AX1.L, #0xa2 - 0cb1 09af lris $AX1.L, #0xaf - 0cb2 09c2 lris $AX1.L, #0xc2 - 0cb3 09ce lris $AX1.L, #0xce - 0cb4 09db lris $AX1.L, #0xdb - 0cb5 09e8 lris $AX1.L, #0xe8 - 0cb6 09c2 lris $AX1.L, #0xc2 - 0cb7 09f5 lris $AX1.L, #0xf5 - 0cb8 0a02 lris $AX0.H, #0x02 - 0cb9 0a0f lris $AX0.H, #0x0f - 0cba 085e lris $AX0.L, #0x5e - 0cbb 096b lris $AX1.L, #0x6b - 0cbc 0977 lris $AX1.L, #0x77 - 0cbd 0983 lris $AX1.L, #0x83 - 0cbe 085e lris $AX0.L, #0x5e - 0cbf 0995 lris $AX1.L, #0x95 - 0cc0 09a2 lris $AX1.L, #0xa2 - 0cc1 09af lris $AX1.L, #0xaf - 0cc2 0a1c lris $AX0.H, #0x1c - 0cc3 0a29 lris $AX0.H, #0x29 - 0cc4 0a37 lris $AX0.H, #0x37 - 0cc5 0a45 lris $AX0.H, #0x45 - 0cc6 0a1c lris $AX0.H, #0x1c - 0cc7 0a53 lris $AX0.H, #0x53 - 0cc8 0a61 lris $AX0.H, #0x61 - 0cc9 0a6f lris $AX0.H, #0x6f - 0cca 085e lris $AX0.L, #0x5e - 0ccb 0a7d lris $AX0.H, #0x7d - 0ccc 0a89 lris $AX0.H, #0x89 - 0ccd 0a95 lris $AX0.H, #0x95 - 0cce 085e lris $AX0.L, #0x5e - 0ccf 0aa7 lris $AX0.H, #0xa7 - 0cd0 0ab4 lris $AX0.H, #0xb4 - 0cd1 0ac1 lris $AX0.H, #0xc1 - 0cd2 0ad4 lris $AX0.H, #0xd4 - 0cd3 0ae0 lris $AX0.H, #0xe0 - 0cd4 0aed lris $AX0.H, #0xed - 0cd5 0afa lris $AX0.H, #0xfa - 0cd6 0ad4 lris $AX0.H, #0xd4 - 0cd7 0b07 lris $AX1.H, #0x07 - 0cd8 0b14 lris $AX1.H, #0x14 - 0cd9 0b21 lris $AX1.H, #0x21 - 0cda 085e lris $AX0.L, #0x5e - 0cdb 0a7d lris $AX0.H, #0x7d - 0cdc 0a89 lris $AX0.H, #0x89 - 0cdd 0a95 lris $AX0.H, #0x95 - 0cde 085e lris $AX0.L, #0x5e - 0cdf 0aa7 lris $AX0.H, #0xa7 - 0ce0 0ab4 lris $AX0.H, #0xb4 - 0ce1 0ac1 lris $AX0.H, #0xc1 - 0ce2 0b2e lris $AX1.H, #0x2e - 0ce3 0b39 lris $AX1.H, #0x39 - 0ce4 0b47 lris $AX1.H, #0x47 - 0ce5 0b55 lris $AX1.H, #0x55 - 0ce6 0b2e lris $AX1.H, #0x2e - 0ce7 0b63 lris $AX1.H, #0x63 - 0ce8 0b71 lris $AX1.H, #0x71 - 0ce9 0b7f lris $AX1.H, #0x7f - 0cea 085e lris $AX0.L, #0x5e - 0ceb 0b8d lris $AX1.H, #0x8d - 0cec 0b99 lris $AX1.H, #0x99 - 0ced 0ba5 lris $AX1.H, #0xa5 - 0cee 085e lris $AX0.L, #0x5e - 0cef 0bb7 lris $AX1.H, #0xb7 - 0cf0 0bc4 lris $AX1.H, #0xc4 - 0cf1 0bd1 lris $AX1.H, #0xd1 - 0cf2 0ad4 lris $AX0.H, #0xd4 - 0cf3 0be4 lris $AX1.H, #0xe4 - 0cf4 0bf1 lris $AX1.H, #0xf1 - 0cf5 0bfe lris $AX1.H, #0xfe - 0cf6 0ad4 lris $AX0.H, #0xd4 - 0cf7 0c0b lris $AC0.L, #0x0b - 0cf8 0c18 lris $AC0.L, #0x18 - 0cf9 0c25 lris $AC0.L, #0x25 - 0cfa 085e lris $AX0.L, #0x5e - 0cfb 0b8d lris $AX1.H, #0x8d - 0cfc 0b99 lris $AX1.H, #0x99 - 0cfd 0ba5 lris $AX1.H, #0xa5 - 0cfe 085e lris $AX0.L, #0x5e - 0cff 0bb7 lris $AX1.H, #0xb7 - 0d00 0bc4 lris $AX1.H, #0xc4 - 0d01 0bd1 lris $AX1.H, #0xd1 - 0d02 0b2e lris $AX1.H, #0x2e - 0d03 0c32 lris $AC0.L, #0x32 - 0d04 0c40 lris $AC0.L, #0x40 - 0d05 0c4e lris $AC0.L, #0x4e - 0d06 0b2e lris $AX1.H, #0x2e - 0d07 0c5c lris $AC0.L, #0x5c - 0d08 0c6a lris $AC0.L, #0x6a - 0d09 0c78 lris $AC0.L, #0x78 - 0d0a 069e cmpis $ACC0, #0x9e - 0d0b 0753 cmpis $ACC1, #0x53 - 0d0c 07fd cmpis $ACC1, #0xfd - 0d0d 1000 loopi #0x00 - 0d0e 1200 sbclr #0x00 - 0d0f 1400 lsl $ACC0, #0 - 0d10 8e00 set16 - 0d11 8100 clr $ACC0 - 0d12 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0d13 191c lrri $AC0.L, @$AR0 - 0d14 2ece srs @DSMAH, $AC0.M - 0d15 2ccf srs @DSMAL, $AC0.L - 0d16 16cd 0e80 si @DSPA, #0x0e80 - 0d18 16c9 0000 si @DSCR, #0x0000 - 0d1a 16cb 0100 si @DSBL, #0x0100 - 0d1c 1f7e mrr $AX1.H, $AC0.M - 0d1d 1f3c mrr $AX1.L, $AC0.L - 0d1e 8100 clr $ACC0 - 0d1f 26c9 lrs $AC0.M, @DSCR - 0d20 02a0 0004 andf $AC0.M, #0x0004 - 0d22 029c 0d1f jlnz 0x0d1f - 0d24 191e lrri $AC0.M, @$AR0 - 0d25 191c lrri $AC0.L, @$AR0 - 0d26 2ece srs @DSMAH, $AC0.M - 0d27 2ccf srs @DSMAL, $AC0.L - 0d28 16cd 0280 si @DSPA, #0x0280 - 0d2a 16c9 0000 si @DSCR, #0x0000 - 0d2c 16cb 0280 si @DSBL, #0x0280 - 0d2e 1c80 mrr $IX0, $AR0 - 0d2f 0080 0280 lri $AR0, #0x0280 - 0d31 00c1 0e1b lr $AR1, @0x0e1b - 0d33 0085 0000 lri $IX1, #0x0000 - 0d35 0089 007f lri $WR1, #0x007f - 0d37 0082 0f00 lri $AR2, #0x0f00 - 0d39 0083 16b4 lri $AR3, #0x16b4 - 0d3b 1ce3 mrr $IX3, $AR3 - 0d3c 8100 clr $ACC0 - 0d3d 26c9 lrs $AC0.M, @DSCR - 0d3e 02a0 0004 andf $AC0.M, #0x0004 - 0d40 029c 0d3d jlnz 0x0d3d - 0d42 8f00 set40 - 0d43 8a78 m2'l : $AC1.M, @$AR0 - 0d44 8c68 clr15'l : $AC1.L, @$AR0 - 0d45 f100 lsl16 $ACC1 - 0d46 1a3f srr @$AR1, $AC1.M - 0d47 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0d48 107e loopi #0x7e - 0d49 f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d4a f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d4b f278 madd'l $AX0.L, $AX0.H : $AC1.M, @$AR0 - 0d4c 6e68 movp'l $ACC0 : $AC1.L, @$AR0 - 0d4d f132 lsl16's $ACC1 : @$AR2, $AC0.M - 0d4e 1a3f srr @$AR1, $AC1.M - 0d4f 119e 0d59 bloopi #0x9e, 0x0d59 - 0d51 1c67 mrr $AR3, $IX3 - 0d52 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0d53 107e loopi #0x7e - 0d54 f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d55 f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d56 f278 madd'l $AX0.L, $AX0.H : $AC1.M, @$AR0 - 0d57 6e68 movp'l $ACC0 : $AC1.L, @$AR0 - 0d58 f132 lsl16's $ACC1 : @$AR2, $AC0.M - 0d59 1a3f srr @$AR1, $AC1.M - 0d5a 1c67 mrr $AR3, $IX3 - 0d5b 84e3 clrp'ld : $AX0.H, $AX1.L, @$AR3 - 0d5c 107e loopi #0x7e - 0d5d f2e3 madd'ld $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d5e f2e7 madd'ldn $AX0.L, $AX0.H : $AX0.H, $AX1.L, @$AR3 - 0d5f f200 madd $AX0.L, $AX0.H - 0d60 6e00 movp $ACC0 - 0d61 1b5e srri @$AR2, $AC0.M - 0d62 00e1 0e1b sr @0x0e1b, $AR1 - 0d64 0080 0280 lri $AR0, #0x0280 - 0d66 0083 0f00 lri $AR3, #0x0f00 - 0d68 0081 0000 lri $AR1, #0x0000 - 0d6a 0082 0140 lri $AR2, #0x0140 - 0d6c 0089 ffff lri $WR1, #0xffff - 0d6e 8900 clr $ACC1 - 0d6f 8100 clr $ACC0 - 0d70 8f00 set40 - 0d71 11a0 0d79 bloopi #0xa0, 0x0d79 - 0d73 197f lrri $AC1.M, @$AR3 - 0d74 9930 asr16's $ACC1 : @$AR0, $AC0.M - 0d75 1b1e srri @$AR0, $AC0.M - 0d76 1b3f srri @$AR1, $AC1.M - 0d77 7d29 neg's $ACC1 : @$AR1, $AC1.L - 0d78 1b5f srri @$AR2, $AC1.M - 0d79 1b5d srri @$AR2, $AC1.L - 0d7a 8e00 set16 - 0d7b 1fdb mrr $AC0.M, $AX1.H - 0d7c 1f99 mrr $AC0.L, $AX1.L - 0d7d 2ece srs @DSMAH, $AC0.M - 0d7e 2ccf srs @DSMAL, $AC0.L - 0d7f 16cd 0e80 si @DSPA, #0x0e80 - 0d81 16c9 0001 si @DSCR, #0x0001 - 0d83 16cb 0100 si @DSBL, #0x0100 - 0d85 02bf 0652 call 0652_WaitDMA - 0d87 1c04 mrr $AR0, $IX0 - 0d88 029f 0068 jmp 0x0068 - 0d8a 8e00 set16 - 0d8b 8100 clr $ACC0 - 0d8c 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0d8d 191c lrri $AC0.L, @$AR0 - 0d8e 2ece srs @DSMAH, $AC0.M - 0d8f 2ccf srs @DSMAL, $AC0.L - 0d90 16cd 07c0 si @DSPA, #0x07c0 - 0d92 16c9 0001 si @DSCR, #0x0001 - 0d94 16cb 0500 si @DSBL, #0x0500 - 0d96 02bf 0652 call 0652_WaitDMA - 0d98 8100 clr $ACC0 - 0d99 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0d9a 191c lrri $AC0.L, @$AR0 - 0d9b 2ece srs @DSMAH, $AC0.M - 0d9c 2ccf srs @DSMAL, $AC0.L - 0d9d 16cd 07c0 si @DSPA, #0x07c0 - 0d9f 16c9 0000 si @DSCR, #0x0000 - 0da1 8900 clr $ACC1 - 0da2 0d20 lris $AC1.L, #0x20 - 0da3 2dcb srs @DSBL, $AC1.L - 0da4 4c00 add $ACC0, $ACC1 - 0da5 1c80 mrr $IX0, $AR0 - 0da6 0080 07c0 lri $AR0, #0x07c0 - 0da8 0083 0000 lri $AR3, #0x0000 - 0daa 1c43 mrr $AR2, $AR3 - 0dab 0a00 lris $AX0.H, #0x00 - 0dac 27c9 lrs $AC1.M, @DSCR - 0dad 03a0 0004 andf $AC1.M, #0x0004 - 0daf 029c 0dac jlnz 0x0dac - 0db1 2ece srs @DSMAH, $AC0.M - 0db2 2ccf srs @DSMAL, $AC0.L - 0db3 16cd 07d0 si @DSPA, #0x07d0 - 0db5 16c9 0000 si @DSCR, #0x0000 - 0db7 16cb 04e0 si @DSBL, #0x04e0 - 0db9 8f00 set40 - 0dba 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dbb 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dbc 6a00 movax $ACC0, $AX1.L - 0dbd 4800 addax $ACC0, $AX0.L - 0dbe 114f 0dc7 bloopi #0x4f, 0x0dc7 - 0dc0 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dc1 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dc2 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0dc3 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0dc4 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dc5 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dc6 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 0dc7 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 0dc8 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dc9 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dca 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0dcb 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0dcc 1b5f srri @$AR2, $AC1.M - 0dcd 1b5d srri @$AR2, $AC1.L - 0dce 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dcf 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dd0 6800 movax $ACC0, $AX0.L - 0dd1 7c00 neg $ACC0 - 0dd2 4a00 addax $ACC0, $AX1.L - 0dd3 114f 0dde bloopi #0x4f, 0x0dde - 0dd5 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0dd6 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0dd7 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0dd8 7d00 neg $ACC1 - 0dd9 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0dda 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0ddb 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0ddc 683a movax's $ACC0, $AX0.L : @$AR2, $AC1.M - 0ddd 7c00 neg $ACC0 - 0dde 4a2a addax's $ACC0, $AX1.L : @$AR2, $AC1.L - 0ddf 80f0 nx'ld : $AX0.H, $AX1.H, @$AR0 - 0de0 80c0 nx'ld : $AX0.L, $AX1.L, @$AR0 - 0de1 6932 movax's $ACC1, $AX0.L : @$AR2, $AC0.M - 0de2 7d00 neg $ACC1 - 0de3 4b22 addax's $ACC1, $AX1.L : @$AR2, $AC0.L - 0de4 1b5f srri @$AR2, $AC1.M - 0de5 1b5d srri @$AR2, $AC1.L - 0de6 1c04 mrr $AR0, $IX0 - 0de7 029f 0068 jmp 0x0068 - 0de9 8f00 set40 - 0dea 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0deb 80c1 nx'ld : $AX0.L, $AX1.L, @$AR1 - 0dec 6a00 movax $ACC0, $AX1.L - 0ded 4800 addax $ACC0, $AX0.L - 0dee 114f 0df7 bloopi #0x4f, 0x0df7 - 0df0 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0df1 80c1 nx'ld : $AX0.L, $AX1.L, @$AR1 - 0df2 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0df3 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0df4 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0df5 80c1 nx'ld : $AX0.L, $AX1.L, @$AR1 - 0df6 6a3a movax's $ACC0, $AX1.L : @$AR2, $AC1.M - 0df7 482a addax's $ACC0, $AX0.L : @$AR2, $AC1.L - 0df8 80f1 nx'ld : $AX0.H, $AX1.H, @$AR1 - 0df9 80c1 nx'ld : $AX0.L, $AX1.L, @$AR1 - 0dfa 6b32 movax's $ACC1, $AX1.L : @$AR2, $AC0.M - 0dfb 4922 addax's $ACC1, $AX0.L : @$AR2, $AC0.L - 0dfc 1b5f srri @$AR2, $AC1.M - 0dfd 1b5d srri @$AR2, $AC1.L - 0dfe 8e00 set16 - 0dff 02df ret - 0e00 8e00 set16 - 0e01 8100 clr $ACC0 - 0e02 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e03 191c lrri $AC0.L, @$AR0 - 0e04 2ece srs @DSMAH, $AC0.M - 0e05 2ccf srs @DSMAL, $AC0.L - 0e06 16cd 0400 si @DSPA, #0x0400 - 0e08 16c9 0001 si @DSCR, #0x0001 - 0e0a 16cb 0780 si @DSBL, #0x0780 - 0e0c 02bf 0652 call 0652_WaitDMA - 0e0e 8100 clr $ACC0 - 0e0f 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e10 191c lrri $AC0.L, @$AR0 - 0e11 2ece srs @DSMAH, $AC0.M - 0e12 2ccf srs @DSMAL, $AC0.L - 0e13 16cd 0a40 si @DSPA, #0x0a40 - 0e15 16c9 0001 si @DSCR, #0x0001 - 0e17 16cb 0280 si @DSBL, #0x0280 - 0e19 02bf 0652 call 0652_WaitDMA - 0e1b 8100 clr $ACC0 - 0e1c 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e1d 191c lrri $AC0.L, @$AR0 - 0e1e 2ece srs @DSMAH, $AC0.M - 0e1f 2ccf srs @DSMAL, $AC0.L - 0e20 16cd 0e48 si @DSPA, #0x0e48 - 0e22 16c9 0000 si @DSCR, #0x0000 - 0e24 16cb 0280 si @DSBL, #0x0280 - 0e26 0081 0e48 lri $AR1, #0x0e48 - 0e28 0082 0000 lri $AR2, #0x0000 - 0e2a 0083 0000 lri $AR3, #0x0000 - 0e2c 02bf 0652 call 0652_WaitDMA - 0e2e 02bf 0de9 call 0x0de9 - 0e30 8100 clr $ACC0 - 0e31 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e32 191c lrri $AC0.L, @$AR0 - 0e33 2ece srs @DSMAH, $AC0.M - 0e34 2ccf srs @DSMAL, $AC0.L - 0e35 16cd 0e48 si @DSPA, #0x0e48 - 0e37 16c9 0000 si @DSCR, #0x0000 - 0e39 16cb 0280 si @DSBL, #0x0280 - 0e3b 0081 0e48 lri $AR1, #0x0e48 - 0e3d 0082 0140 lri $AR2, #0x0140 - 0e3f 0083 0140 lri $AR3, #0x0140 - 0e41 02bf 0652 call 0652_WaitDMA - 0e43 02bf 0de9 call 0x0de9 - 0e45 8100 clr $ACC0 - 0e46 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e47 191c lrri $AC0.L, @$AR0 - 0e48 2ece srs @DSMAH, $AC0.M - 0e49 2ccf srs @DSMAL, $AC0.L - 0e4a 16cd 0e48 si @DSPA, #0x0e48 - 0e4c 16c9 0000 si @DSCR, #0x0000 - 0e4e 16cb 0280 si @DSBL, #0x0280 - 0e50 0081 0e48 lri $AR1, #0x0e48 - 0e52 0082 07c0 lri $AR2, #0x07c0 - 0e54 0083 07c0 lri $AR3, #0x07c0 - 0e56 02bf 0652 call 0652_WaitDMA - 0e58 02bf 0de9 call 0x0de9 - 0e5a 8100 clr $ACC0 - 0e5b 8970 clr'l $ACC1 : $AC0.M, @$AR0 - 0e5c 191c lrri $AC0.L, @$AR0 - 0e5d 2ece srs @DSMAH, $AC0.M - 0e5e 2ccf srs @DSMAL, $AC0.L - 0e5f 16cd 0e48 si @DSPA, #0x0e48 - 0e61 16c9 0000 si @DSCR, #0x0000 - 0e63 16cb 0280 si @DSBL, #0x0280 - 0e65 0081 0e48 lri $AR1, #0x0e48 - 0e67 0082 0900 lri $AR2, #0x0900 - 0e69 0083 0900 lri $AR3, #0x0900 - 0e6b 02bf 0652 call 0652_WaitDMA - 0e6d 02bf 0de9 call 0x0de9 - 0e6f 029f 0068 jmp 0x0068 - -void 0e71_Int1_Handler() { - 0e71 8e00 set16 - 0e72 16fc ecc0 si @DMBH, #0xecc0 - 0e74 1fcc mrr $AC0.M, $ST0 - 0e75 1d9e mrr $ST0, $AC0.M - 0e76 2efd srs @DMBL, $AC0.M - do { - // 0e77 26fc lrs $AC0.M, @DMBH - // 0e78 02a0 8000 andf $AC0.M, #0x8000 - // 0e7a 029c 0e77 jlnz 0x0e77 - } while(DMBH & 0x8000); - - 0e7c 0000 nop - 0e7d 0000 nop - 0e7e 0000 nop - 0e7f 02ff rti -} - -void 0e80_Int2_Handler() { - 0e80 8e00 set16 - 0e81 00f0 0e17 sr @0x0e17, $AC0.H - 0e83 00fe 0e18 sr @0x0e18, $AC0.M - 0e85 00fc 0e19 sr @0x0e19, $AC0.L - 0e87 1fcc mrr $AC0.M, $ST0 - 0e88 1d9e mrr $ST0, $AC0.M - 0e89 16fc feed si @DMBH, #0xfeed - 0e8b 2efd srs @DMBL, $AC0.M - 0e8c 26fc lrs $AC0.M, @DMBH - 0e8d 02a0 8000 andf $AC0.M, #0x8000 - 0e8f 029c 0e8c jlnz 0x0e8c - 0e91 00d0 0e17 lr $AC0.H, @0x0e17 - 0e93 00de 0e18 lr $AC0.M, @0x0e18 - 0e95 00dc 0e19 lr $AC0.L, @0x0e19 - 0e97 0000 nop - 0e98 0000 nop - 0e99 0000 nop - 0e9a 0000 nop - 0e9b 02ff rti -} - -void 0e9c_Int3_Handler() { - 0e9c 8e00 set16 - 0e9d 1dbc mrr $ST1, $AC0.L - 0e9e 1dbe mrr $ST1, $AC0.M - 0e9f 8100 clr $ACC0 - 0ea0 00de 0bb7 lr $AC0.M, @0x0bb7 - 0ea2 0601 cmpis $ACC0, #0x01 - 0ea3 0295 0ea8 jz 0x0ea8 - 0ea5 0e00 lris $AC0.M, #0x00 - 0ea6 00fe 0b87 sr @0x0b87, $AC0.M - 0ea8 8100 clr $ACC0 - 0ea9 00de 0b88 lr $AC0.M, @0x0b88 - 0eab 0601 cmpis $ACC0, #0x01 - 0eac 0295 0eb2 jz 0x0eb2 - 0eae 8100 clr $ACC0 - 0eaf 1fcd mrr $AC0.M, $ST1 - 0eb0 1f8d mrr $AC0.L, $ST1 - 0eb1 02ff rti - 0eb2 8100 clr $ACC0 - 0eb3 00dc 0be1 lr $AC0.L, @0x0be1 - 0eb5 7600 inc $ACC0 - 0eb6 00fc 0be1 sr @0x0be1, $AC0.L - 0eb8 8100 clr $ACC0 - 0eb9 1fcd mrr $AC0.M, $ST1 - 0eba 1f8d mrr $AC0.L, $ST1 - 0ebb 02ff rti -} - -void 0ebc_Int4_Handler() { - 0ebc 0000 nop - 0ebd 0000 nop - 0ebe 0000 nop - 0ebf 0000 nop - 0ec0 0000 nop - 0ec1 02ff rti -} - -void 0ec2_Int5_Handler() { - 0ec2 8e00 set16 - 0ec3 1dbc mrr $ST1, $AC0.L - 0ec4 1dbe mrr $ST1, $AC0.M - 0ec5 8100 clr $ACC0 - 0ec6 00de 0bb7 lr $AC0.M, @0x0bb7 - 0ec8 0601 cmpis $ACC0, #0x01 - 0ec9 0295 0ed1 jz 0x0ed1 - 0ecb 0e00 lris $AC0.M, #0x00 - 0ecc 00fe 0b87 sr @0x0b87, $AC0.M - 0ece 1fcd mrr $AC0.M, $ST1 - 0ecf 1f8d mrr $AC0.L, $ST1 - 0ed0 02ff rti - 0ed1 8100 clr $ACC0 - 0ed2 00de 0b88 lr $AC0.M, @0x0b88 - 0ed4 0601 cmpis $ACC0, #0x01 - 0ed5 0295 0ee3 jz 0x0ee3 - 0ed7 00de 0bda lr $AC0.M, @0x0bda - 0ed9 2eda srs @pred_scale, $AC0.M - 0eda 00de 0bdb lr $AC0.M, @0x0bdb - 0edc 2edb srs @yn1, $AC0.M - 0edd 00de 0bdc lr $AC0.M, @0x0bdc - 0edf 2edc srs @yn2, $AC0.M - 0ee0 1fcd mrr $AC0.M, $ST1 - 0ee1 1f8d mrr $AC0.L, $ST1 - 0ee2 02ff rti - 0ee3 00de 0bda lr $AC0.M, @0x0bda - 0ee5 2eda srs @pred_scale, $AC0.M - 0ee6 26db lrs $AC0.M, @yn1 - 0ee7 2edb srs @yn1, $AC0.M - 0ee8 26dc lrs $AC0.M, @yn2 - 0ee9 2edc srs @yn2, $AC0.M - 0eea 8100 clr $ACC0 - 0eeb 00dc 0be1 lr $AC0.L, @0x0be1 - 0eed 7600 inc $ACC0 - 0eee 00fc 0be1 sr @0x0be1, $AC0.L - 0ef0 8100 clr $ACC0 - 0ef1 1fcd mrr $AC0.M, $ST1 - 0ef2 1f8d mrr $AC0.L, $ST1 - 0ef3 02ff rti -} -void 0ef4_Int6_Handler() { - 0ef4 0000 nop - 0ef5 0000 nop - 0ef6 0000 nop - 0ef7 0000 nop - 0ef8 0000 nop - 0ef9 02ff rti -} - -void 0e71_Int7_Handler() { - 0efa 0000 nop - 0efb 0000 nop - 0efc 0000 nop - 0efd 0000 nop - 0efe 02ff rti -} - -// Jump Table -0eff 0f11 -0f00 0f14 -0f01 0f4c -0f02 0f4f - - 0f03 8e00 set16 - 0f04 8100 clr $ACC0 - 0f05 8900 clr $ACC1 - 0f06 02bf 0f52 call 0x0f52 - 0f08 27ff lrs $AC1.M, @CMBL - 0f09 009e 0eff lri $AC0.M, #0x0eff - 0f0b 4c00 add $ACC0, $ACC1 - 0f0c 1c7e mrr $AR3, $AC0.M - 0f0d 0313 ilrr $AC1.M, @$AR3 - 0f0e 1c7f mrr $AR3, $AC1.M - 0f0f 176f jmpr $AR3 - 0f10 0021 halt - 0f11 029f 0030 jmp 0x0030 - - 0f13 0021 halt - 0f14 8100 clr $ACC0 - 0f15 8900 clr $ACC1 - 0f16 02bf 0f52 call 0x0f52 - 0f18 24ff lrs $AC0.L, @CMBL - 0f19 02bf 0f58 call 0x0f58 - 0f1b 25ff lrs $AC1.L, @CMBL - 0f1c 02bf 0f58 call 0x0f58 - 0f1e 27ff lrs $AC1.M, @CMBL - 0f1f 2ece srs @DSMAH, $AC0.M - 0f20 2ccf srs @DSMAL, $AC0.L - 0f21 16c9 0001 si @DSCR, #0x0001 - 0f23 2fcd srs @DSPA, $AC1.M - 0f24 2dcb srs @DSBL, $AC1.L - 0f25 8100 clr $ACC0 - 0f26 8900 clr $ACC1 - 0f27 02bf 0f52 call 0x0f52 - 0f29 24ff lrs $AC0.L, @CMBL - 0f2a 1c9e mrr $IX0, $AC0.M - 0f2b 1cbc mrr $IX1, $AC0.L - 0f2c 02bf 0f58 call 0x0f58 - 0f2e 25ff lrs $AC1.L, @CMBL - 0f2f 02bf 0f58 call 0x0f58 - 0f31 27ff lrs $AC1.M, @CMBL - 0f32 1cdf mrr $IX2, $AC1.M - 0f33 1cfd mrr $IX3, $AC1.L - 0f34 8100 clr $ACC0 - 0f35 02bf 0f52 call 0x0f52 - 0f37 26ff lrs $AC0.M, @CMBL - 0f38 1c1e mrr $AR0, $AC0.M - 0f39 8900 clr $ACC1 - 0f3a 02bf 0f58 call 0x0f58 - 0f3c 20ff lrs $AX0.L, @CMBL - 0f3d 1f5f mrr $AX0.H, $AC1.M - 0f3e 02bf 0f52 call 0x0f52 - 0f40 21ff lrs $AX1.L, @CMBL - 0f41 02bf 0f52 call 0x0f52 - 0f43 23ff lrs $AX1.H, @CMBL - 0f44 26c9 lrs $AC0.M, @DSCR - 0f45 02a0 0004 andf $AC0.M, #0x0004 - 0f47 029c 0f44 jlnz 0x0f44 - 0f49 029f 80b5 jmp 0x80b5 - 0f4b 0021 halt - 0f4c 029f 8000 jmp 0x8000 - 0f4e 0021 halt - 0f4f 029f 0045 jmp 0x0045 - 0f51 0021 halt - 0f52 26fe lrs $AC0.M, @CMBH - 0f53 02c0 8000 andcf $AC0.M, #0x8000 - 0f55 029c 0f52 jlnz 0x0f52 - 0f57 02df ret - 0f58 27fe lrs $AC1.M, @CMBH - 0f59 03c0 8000 andcf $AC1.M, #0x8000 - 0f5b 029c 0f58 jlnz 0x0f58 - 0f5d 02df ret - 0f5e 0000 nop - 0f5f 0000 nop diff --git a/docs/DSP/DSP_UC_Pikmin2Wii.txt b/docs/DSP/DSP_UC_Pikmin2Wii.txt deleted file mode 100644 index c13559a1d9..0000000000 --- a/docs/DSP/DSP_UC_Pikmin2Wii.txt +++ /dev/null @@ -1,2877 +0,0 @@ -// This one belongs to Pikmin 2 for the Wii and utilizes the mysterious UnkZelda address. Also very different from Pikmin 1 for the Wii - 0000 029f 0012 jmp 0x0012 - 0002 0000 nop - 0003 0000 nop - 0004 02ff rti - 0005 0000 nop - 0006 02ff rti - 0007 0000 nop - 0008 02ff rti - 0009 0000 nop - 000a 02ff rti - 000b 0000 nop - 000c 02ff rti - 000d 0000 nop - 000e 029f 072e jmp 0x072e - 0010 029f 0059 jmp 0x0059 - 0012 1205 sbclr #0x05 - 0013 02bf 0062 call 0x0062 - 0015 8100 clr $ACC0 - 0016 009f 1000 lri $AC1.M, #0x1000 - 0018 0080 0000 lri $AR0, #0x0000 - 001a 005f loop $AC1.M - 001b 1b1e srri @$AR0, $AC0.M - 001c 02bf 07fe call 0x07fe - 001e 02bf 0f72 call 0x0f72 - 0020 0e00 lris $AC0.M, #0x00 - 0021 02bf 07e0 call 0x07e0 - 0023 009e 1111 lri $AC0.M, #0x1111 - 0025 02bf 07ea call 0x07ea - 0027 0e00 lris $AC0.M, #0x00 - 0028 00fe 034e sr @0x034e, $AC0.M - 002a 1305 sbset #0x05 - 002b 3a00 orr $AC0.M, $AX1.H - 002c 7400 incm $AC0.M - 002d 1f7e mrr $AX1.H, $AC0.M - 002e 0240 00ff andi $AC0.M, #0x00ff - 0030 0200 5500 addi $AC0.M, #0x5500 - 0032 02bf 00a0 call 0x00a0 - 0034 029f 083b jmp 0x083b - 0036 00df 0357 lr $AC1.M, @0x0357 - 0038 00ff 0345 sr @0x0345, $AC1.M - 003a 00de 0356 lr $AC0.M, @0x0356 - 003c 1ffe mrr $AC1.M, $AC0.M - 003d 0340 00ff andi $AC1.M, #0x00ff - 003f 00ff 0344 sr @0x0344, $AC1.M - 0041 1479 lsr $ACC0, #-7 - 0042 0240 007e andi $AC0.M, #0x007e - 0044 00fe 0343 sr @0x0343, $AC0.M - 0046 0200 0080 addi $AC0.M, #0x0080 - 0048 1c1e mrr $AR0, $AC0.M - 0049 170f jmpr $AR0 - 004a 0092 00ff lri $CR, #0x00ff - 004c 009e cafe lri $AC0.M, #0xcafe - 004e 02bf 00a0 call 0x00a0 - 0050 0e04 lris $AC0.M, #0x04 - 0051 02bf 07e0 call 0x07e0 - 0053 00de 0356 lr $AC0.M, @0x0356 - 0055 02bf 07ea call 0x07ea - 0057 029f 002b jmp 0x002b - 0059 1205 sbclr #0x05 - 005a 02bf 0062 call 0x0062 - 005c 0e01 lris $AC0.M, #0x01 - 005d 02bf 07e0 call 0x07e0 - 005f 1305 sbset #0x05 - 0060 029f 002b jmp 0x002b - 0062 1202 sbclr #0x02 - 0063 1203 sbclr #0x03 - 0064 1204 sbclr #0x04 - 0065 1306 sbset #0x06 - 0066 8e00 set16 - 0067 8c00 clr15 - 0068 8b00 m0 - 0069 009e ffff lri $AC0.M, #0xffff - 006b 1d1e mrr $WR0, $AC0.M - 006c 1d3e mrr $WR1, $AC0.M - 006d 1d5e mrr $WR2, $AC0.M - 006e 1d7e mrr $WR3, $AC0.M - 006f 0092 00ff lri $CR, #0x00ff - 0071 02df ret - 0072 0081 0358 lri $AR1, #0x0358 - 0074 0090 0000 lri $AC0.H, #0x0000 - 0076 0c00 lris $AC0.L, #0x00 - 0077 007e 007c bloop $AC0.M, 0x007c - 0079 193e lrri $AC0.M, @$AR1 - 007a 1b1e srri @$AR0, $AC0.M - 007b 193e lrri $AC0.M, @$AR1 - 007c 1b1e srri @$AR0, $AC0.M - 007d 02df ret - 007e 029f 004a jmp 0x004a - 0080 029f 004a jmp 0x004a - 0082 029f 00d9 jmp 0x00d9 - 0084 029f 02e3 jmp 0x02e3 - 0086 029f 007e jmp 0x007e - 0088 029f 0677 jmp 0x0677 - 008a 029f 0689 jmp 0x0689 - 008c 029f 004a jmp 0x004a - 008e 029f 05c0 jmp 0x05c0 - 0090 029f 060c jmp 0x060c - 0092 029f 05f0 jmp 0x05f0 - 0094 029f 004a jmp 0x004a - 0096 029f 004a jmp 0x004a - 0098 029f 004a jmp 0x004a - 009a 029f 0103 jmp 0x0103 - 009c 029f 00f6 jmp 0x00f6 - 009e 029f 004a jmp 0x004a - 00a0 00fe 0b00 sr @0x0b00, $AC0.M - 00a2 8100 clr $ACC0 - 00a3 00de 0354 lr $AC0.M, @0x0354 - 00a5 1408 lsl $ACC0, #8 - 00a6 00df 0341 lr $AC1.M, @0x0341 - 00a8 3e00 orc $AC0.M - 00a9 00fe 0b01 sr @0x0b01, $AC0.M - 00ab 00de 0350 lr $AC0.M, @0x0350 - 00ad 00fe 0b02 sr @0x0b02, $AC0.M - 00af 00de 0351 lr $AC0.M, @0x0351 - 00b1 00fe 0b03 sr @0x0b03, $AC0.M - 00b3 00de 0352 lr $AC0.M, @0x0352 - 00b5 00fe 0b04 sr @0x0b04, $AC0.M - 00b7 00de 037d lr $AC0.M, @0x037d - 00b9 00dc 037e lr $AC0.L, @0x037e - 00bb 009f 0b00 lri $AC1.M, #0x0b00 - 00bd 0080 0010 lri $AR0, #0x0010 - 00bf 0090 0001 lri $AC0.H, #0x0001 - 00c1 1c3f mrr $AR1, $AC1.M - 00c2 0f0a lris $AC1.M, #0x0a - 00c3 2fd1 srs @SampleFormat, $AC1.M - 00c4 1f5e mrr $AX0.H, $AC0.M - 00c5 1f1c mrr $AX0.L, $AC0.L - 00c6 009e ffff lri $AC0.M, #0xffff - 00c8 2ed6 srs @ACEAH, $AC0.M - 00c9 2ed7 srs @ACEAL, $AC0.M - 00ca 1fda mrr $AC0.M, $AX0.H - 00cb 1f98 mrr $AC0.L, $AX0.L - 00cc 147f lsr $ACC0, #-1 - 00cd 2ed8 srs @ACCAH, $AC0.M - 00ce 2cd9 srs @ACCAL, $AC0.L - 00cf 1f40 mrr $AX0.H, $AR0 - 00d0 007a 00d7 bloop $AX0.H, 0x00d7 - 00d2 193e lrri $AC0.M, @$AR1 - 00d3 2ed3 srs @UnkZelda, $AC0.M - 00d4 0000 nop - 00d5 0000 nop - 00d6 0000 nop - 00d7 0000 nop - 00d8 02df ret - 00d9 0080 0380 lri $AR0, #0x0380 - 00db 0e04 lris $AC0.M, #0x04 - 00dc 02bf 0072 call 0x0072 - 00de 0081 0382 lri $AR1, #0x0382 - 00e0 009f 0000 lri $AC1.M, #0x0000 - 00e2 0080 0280 lri $AR0, #0x0280 - 00e4 02bf 0647 call 0x0647 - 00e6 0081 0384 lri $AR1, #0x0384 - 00e8 009f 0300 lri $AC1.M, #0x0300 - 00ea 0080 0020 lri $AR0, #0x0020 - 00ec 02bf 0647 call 0x0647 - 00ee 00de 0345 lr $AC0.M, @0x0345 - 00f0 00fe 0342 sr @0x0342, $AC0.M - 00f2 02bf 0d44 call 0x0d44 - 00f4 029f 004a jmp 0x004a - 00f6 0080 037d lri $AR0, #0x037d - 00f8 0e01 lris $AC0.M, #0x01 - 00f9 02bf 0072 call 0x0072 - 00fb 00de 037d lr $AC0.M, @0x037d - 00fd 0240 7fff andi $AC0.M, #0x7fff - 00ff 00fe 037d sr @0x037d, $AC0.M - 0101 029f 004a jmp 0x004a - 0103 0080 0374 lri $AR0, #0x0374 - 0105 0e01 lris $AC0.M, #0x01 - 0106 00fe 0377 sr @0x0377, $AC0.M - 0108 00fe 037c sr @0x037c, $AC0.M - 010a 02bf 0072 call 0x0072 - 010c 00de 0345 lr $AC0.M, @0x0345 - 010e 00fe 0376 sr @0x0376, $AC0.M - 0110 029f 004a jmp 0x004a - 0112 0081 034c lri $AR1, #0x034c - 0114 009f 0400 lri $AC1.M, #0x0400 - 0116 0080 00c0 lri $AR0, #0x00c0 - 0118 02bf 0647 call 0x0647 - 011a 02df ret - 011b 0081 034c lri $AR1, #0x034c - 011d 009f 0400 lri $AC1.M, #0x0400 - 011f 0080 0080 lri $AR0, #0x0080 - 0121 0081 034c lri $AR1, #0x034c - 0123 193e lrri $AC0.M, @$AR1 - 0124 193c lrri $AC0.L, @$AR1 - 0125 0098 0000 lri $AX0.L, #0x0000 - 0127 7000 addaxl $ACC0, $AX0.L - 0128 02bf 0656 call 0x0656 - 012a 02df ret - 012b 191e lrri $AC0.M, @$AR0 - 012c 191a lrri $AX0.H, @$AR0 - 012d 005f loop $AC1.M - 012e 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 012f 1b7e srri @$AR3, $AC0.M - 0130 1b7a srri @$AR3, $AX0.H - 0131 02df ret - 0132 0000 nop - 0133 007f 0138 bloop $AC1.M, 0x0138 - 0135 191e lrri $AC0.M, @$AR0 - 0136 1b7e srri @$AR3, $AC0.M - 0137 191e lrri $AC0.M, @$AR0 - 0138 1b7e srri @$AR3, $AC0.M - 0139 0000 nop - 013a 02df ret - 013b 191e lrri $AC0.M, @$AR0 - 013c 191a lrri $AX0.H, @$AR0 - 013d 007f 0142 bloop $AC1.M, 0x0142 - 013f 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 0140 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 0141 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 0142 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0143 0000 nop - 0144 02df ret - 0145 8a00 m2 - 0146 157f lsr $ACC1, #-1 - 0147 1c20 mrr $AR1, $AR0 - 0148 1c03 mrr $AR0, $AR3 - 0149 193a lrri $AX0.H, @$AR1 - 014a 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 - 014b 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 - 014c 007f 0151 bloop $AC1.M, 0x0151 - 014e 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 014f 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 0150 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 0151 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 0152 8b00 m0 - 0153 02df ret - 0154 8a00 m2 - 0155 191a lrri $AX0.H, @$AR0 - 0156 9050 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR0 - 0157 9250 mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0158 005f loop $AC1.M - 0159 92a0 mulmvz'ls $AX0.L, $AX0.H, $ACC0 : $AX0.H, $AC0.M - 015a 8b00 m0 - 015b 02df ret - 015c 8100 clr $ACC0 - 015d 8900 clr $ACC1 - 015e 0e50 lris $AC0.M, #0x50 - 015f 0080 0d00 lri $AR0, #0x0d00 - 0161 005e loop $AC0.M - 0162 1b1f srri @$AR0, $AC1.M - 0163 0080 0d60 lri $AR0, #0x0d60 - 0165 005e loop $AC0.M - 0166 1b1f srri @$AR0, $AC1.M - 0167 00da 0374 lr $AX0.H, @0x0374 - 0169 8600 tstaxh $AX0.H - 016a 02b5 0f9d callz 0x0f9d - 016c 8100 clr $ACC0 - 016d 8900 clr $ACC1 - 016e 0e50 lris $AC0.M, #0x50 - 016f 0080 0ca0 lri $AR0, #0x0ca0 - 0171 005e loop $AC0.M - 0172 1b1f srri @$AR0, $AC1.M - 0173 0080 0f40 lri $AR0, #0x0f40 - 0175 005e loop $AC0.M - 0176 1b1f srri @$AR0, $AC1.M - 0177 0080 0fa0 lri $AR0, #0x0fa0 - 0179 005e loop $AC0.M - 017a 1b1f srri @$AR0, $AC1.M - 017b 0080 0a00 lri $AR0, #0x0a00 - 017d 005e loop $AC0.M - 017e 1b1f srri @$AR0, $AC1.M - 017f 0080 09a0 lri $AR0, #0x09a0 - 0181 005e loop $AC0.M - 0182 1b1f srri @$AR0, $AC1.M - 0183 0f04 lris $AC1.M, #0x04 - 0184 0080 0e10 lri $AR0, #0x0e10 - 0186 0083 0dc0 lri $AR3, #0x0dc0 - 0188 02bf 0132 call 0x0132 - 018a 0080 0e70 lri $AR0, #0x0e70 - 018c 0083 0e20 lri $AR3, #0x0e20 - 018e 02bf 0132 call 0x0132 - 0190 0080 0ed0 lri $AR0, #0x0ed0 - 0192 0083 0e80 lri $AR3, #0x0e80 - 0194 02bf 0132 call 0x0132 - 0196 0080 0f30 lri $AR0, #0x0f30 - 0198 0083 0ee0 lri $AR3, #0x0ee0 - 019a 02bf 0132 call 0x0132 - 019c 8100 clr $ACC0 - 019d 0e50 lris $AC0.M, #0x50 - 019e 8900 clr $ACC1 - 019f 0080 0dc8 lri $AR0, #0x0dc8 - 01a1 005e loop $AC0.M - 01a2 1b1f srri @$AR0, $AC1.M - 01a3 0080 0e28 lri $AR0, #0x0e28 - 01a5 005e loop $AC0.M - 01a6 1b1f srri @$AR0, $AC1.M - 01a7 0080 0e88 lri $AR0, #0x0e88 - 01a9 005e loop $AC0.M - 01aa 1b1f srri @$AR0, $AC1.M - 01ab 0080 0ee8 lri $AR0, #0x0ee8 - 01ad 005e loop $AC0.M - 01ae 1b1f srri @$AR0, $AC1.M - 01af 02df ret - 01b0 009f 0580 lri $AC1.M, #0x0580 - 01b2 009b 00a0 lri $AX1.H, #0x00a0 - 01b4 0081 0393 lri $AR1, #0x0393 - 01b6 18bc lrrd $AC0.L, @$AR1 - 01b7 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 01b8 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 01b9 0080 0050 lri $AR0, #0x0050 - 01bb 02bf 0649 call 0x0649 - 01bd 02df ret - 01be 00df 03a1 lr $AC1.M, @0x03a1 - 01c0 0508 addis $ACC1, #0x08 - 01c1 0080 0580 lri $AR0, #0x0580 - 01c3 1c7f mrr $AR3, $AC1.M - 01c4 0098 7fff lri $AX0.L, #0x7fff - 01c6 8900 clr $ACC1 - 01c7 0f50 lris $AC1.M, #0x50 - 01c8 02bf 0145 call 0x0145 - 01ca 02df ret - 01cb 00c0 03a0 lr $AR0, @0x03a0 - 01cd 191a lrri $AX0.H, @$AR0 - 01ce 02bf 01b0 call 0x01b0 - 01d0 02bf 01be call 0x01be - 01d2 8100 clr $ACC0 - 01d3 8900 clr $ACC1 - 01d4 00de 0390 lr $AC0.M, @0x0390 - 01d6 02a0 0001 andf $AC0.M, #0x0001 - 01d8 029d 01e1 jlz 0x01e1 - 01da 0080 0398 lri $AR0, #0x0398 - 01dc 0e08 lris $AC0.M, #0x08 - 01dd 00c1 03a1 lr $AR1, @0x03a1 - 01df 02bf 0c86 call 0x0c86 - 01e1 0f50 lris $AC1.M, #0x50 - 01e2 00c0 03a1 lr $AR0, @0x03a1 - 01e4 00da 0394 lr $AX0.H, @0x0394 - 01e6 8600 tstaxh $AX0.H - 01e7 0295 01ee jz 0x01ee - 01e9 1c7a mrr $AR3, $AX0.H - 01ea 00d8 0395 lr $AX0.L, @0x0395 - 01ec 02bf 0145 call 0x0145 - 01ee 0f50 lris $AC1.M, #0x50 - 01ef 00c0 03a1 lr $AR0, @0x03a1 - 01f1 00da 0396 lr $AX0.H, @0x0396 - 01f3 8600 tstaxh $AX0.H - 01f4 0295 01fb jz 0x01fb - 01f6 1c7a mrr $AR3, $AX0.H - 01f7 00d8 0397 lr $AX0.L, @0x0397 - 01f9 02bf 0145 call 0x0145 - 01fb 00de 0390 lr $AC0.M, @0x0390 - 01fd 02a0 0002 andf $AC0.M, #0x0002 - 01ff 02dd retlz - 0200 0080 0398 lri $AR0, #0x0398 - 0202 0e08 lris $AC0.M, #0x08 - 0203 00c1 03a1 lr $AR1, @0x03a1 - 0205 02bf 0c86 call 0x0c86 - 0207 02df ret - 0208 8900 clr $ACC1 - 0209 009f 0dc0 lri $AC1.M, #0x0dc0 - 020b 00ff 03a1 sr @0x03a1, $AC1.M - 020d 009f 03a8 lri $AC1.M, #0x03a8 - 020f 00ff 03a2 sr @0x03a2, $AC1.M - 0211 009f 03a4 lri $AC1.M, #0x03a4 - 0213 00ff 03a0 sr @0x03a0, $AC1.M - 0215 1104 0235 bloopi #0x04, 0x0235 - 0217 00c0 03a2 lr $AR0, @0x03a2 - 0219 0083 0390 lri $AR3, #0x0390 - 021b 8900 clr $ACC1 - 021c 0f08 lris $AC1.M, #0x08 - 021d 02bf 0132 call 0x0132 - 021f 00da 0390 lr $AX0.H, @0x0390 - 0221 8600 tstaxh $AX0.H - 0222 0295 0226 jz 0x0226 - 0224 02bf 01cb call 0x01cb - 0226 8100 clr $ACC0 - 0227 00de 03a2 lr $AC0.M, @0x03a2 - 0229 0410 addis $ACC0, #0x10 - 022a 00fe 03a2 sr @0x03a2, $AC0.M - 022c 00de 03a1 lr $AC0.M, @0x03a1 - 022e 0460 addis $ACC0, #0x60 - 022f 00fe 03a1 sr @0x03a1, $AC0.M - 0231 00de 03a0 lr $AC0.M, @0x03a0 - 0233 7400 incm $AC0.M - 0234 00fe 03a0 sr @0x03a0, $AC0.M - 0236 00da 0374 lr $AX0.H, @0x0374 - 0238 8600 tstaxh $AX0.H - 0239 0294 025f jnz 0x025f - 023b 0f50 lris $AC1.M, #0x50 - 023c 0080 0be0 lri $AR0, #0x0be0 - 023e 0083 0e80 lri $AR3, #0x0e80 - 0240 0098 7fff lri $AX0.L, #0x7fff - 0242 02bf 0145 call 0x0145 - 0244 0f50 lris $AC1.M, #0x50 - 0245 0080 0be0 lri $AR0, #0x0be0 - 0247 0083 0ee0 lri $AR3, #0x0ee0 - 0249 0098 b820 lri $AX0.L, #0xb820 - 024b 02bf 0145 call 0x0145 - 024d 0f28 lris $AC1.M, #0x28 - 024e 0080 0c68 lri $AR0, #0x0c68 - 0250 0083 0e80 lri $AR3, #0x0e80 - 0252 0098 b820 lri $AX0.L, #0xb820 - 0254 02bf 0145 call 0x0145 - 0256 0f28 lris $AC1.M, #0x28 - 0257 0080 0c68 lri $AR0, #0x0c68 - 0259 0083 0ee0 lri $AR3, #0x0ee0 - 025b 0098 7fff lri $AX0.L, #0x7fff - 025d 02bf 0145 call 0x0145 - 025f 8100 clr $ACC0 - 0260 8900 clr $ACC1 - 0261 0e50 lris $AC0.M, #0x50 - 0262 0080 0be0 lri $AR0, #0x0be0 - 0264 005e loop $AC0.M - 0265 1b1f srri @$AR0, $AC1.M - 0266 0080 0c40 lri $AR0, #0x0c40 - 0268 005e loop $AC0.M - 0269 1b1f srri @$AR0, $AC1.M - 026a 02df ret - 026b 00c0 03a0 lr $AR0, @0x03a0 - 026d 181a lrr $AX0.H, @$AR0 - 026e 8100 clr $ACC0 - 026f 181e lrr $AC0.M, @$AR0 - 0270 00db 0391 lr $AX1.H, @0x0391 - 0272 7400 incm $AC0.M - 0273 d100 cmpar $ACC1, $AX0.H - 0274 0270 ifge - 0275 8100 clr $ACC0 - 0276 1b1e srri @$AR0, $AC0.M - 0277 00df 03a1 lr $AC1.M, @0x03a1 - 0279 009b 00a0 lri $AX1.H, #0x00a0 - 027b 0081 0393 lri $AR1, #0x0393 - 027d 18bc lrrd $AC0.L, @$AR1 - 027e b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 027f bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0280 0080 0050 lri $AR0, #0x0050 - 0282 02bf 0656 call 0x0656 - 0284 02df ret - 0285 00da 0374 lr $AX0.H, @0x0374 - 0287 8600 tstaxh $AX0.H - 0288 0294 029e jnz 0x029e - 028a 8900 clr $ACC1 - 028b 0f28 lris $AC1.M, #0x28 - 028c 0080 0c40 lri $AR0, #0x0c40 - 028e 0083 0ea8 lri $AR3, #0x0ea8 - 0290 0098 b820 lri $AX0.L, #0xb820 - 0292 02bf 0145 call 0x0145 - 0294 8900 clr $ACC1 - 0295 0f28 lris $AC1.M, #0x28 - 0296 0080 0c40 lri $AR0, #0x0c40 - 0298 0083 0f08 lri $AR3, #0x0f08 - 029a 0098 7fff lri $AX0.L, #0x7fff - 029c 02bf 0145 call 0x0145 - 029e 009f 0dc0 lri $AC1.M, #0x0dc0 - 02a0 00ff 03a1 sr @0x03a1, $AC1.M - 02a2 009f 03a8 lri $AC1.M, #0x03a8 - 02a4 00ff 03a2 sr @0x03a2, $AC1.M - 02a6 009f 03a4 lri $AC1.M, #0x03a4 - 02a8 00ff 03a0 sr @0x03a0, $AC1.M - 02aa 1104 02c8 bloopi #0x04, 0x02c8 - 02ac 00c0 03a2 lr $AR0, @0x03a2 - 02ae 0083 0390 lri $AR3, #0x0390 - 02b0 0f08 lris $AC1.M, #0x08 - 02b1 02bf 0132 call 0x0132 - 02b3 00da 0390 lr $AX0.H, @0x0390 - 02b5 8600 tstaxh $AX0.H - 02b6 0295 02ba jz 0x02ba - 02b8 02bf 026b call 0x026b - 02ba 00de 03a2 lr $AC0.M, @0x03a2 - 02bc 0410 addis $ACC0, #0x10 - 02bd 00fe 03a2 sr @0x03a2, $AC0.M - 02bf 00de 03a1 lr $AC0.M, @0x03a1 - 02c1 0460 addis $ACC0, #0x60 - 02c2 00fe 03a1 sr @0x03a1, $AC0.M - 02c4 00de 03a0 lr $AC0.M, @0x03a0 - 02c6 7400 incm $AC0.M - 02c7 00fe 03a0 sr @0x03a0, $AC0.M - 02c9 02df ret - 02ca 0081 0386 lri $AR1, #0x0386 - 02cc 009f 03a8 lri $AC1.M, #0x03a8 - 02ce 0080 0040 lri $AR0, #0x0040 - 02d0 02bf 0647 call 0x0647 - 02d2 02df ret - 02d3 191e lrri $AC0.M, @$AR0 - 02d4 189c lrrd $AC0.L, @$AR0 - 02d5 4800 addax $ACC0, $AX0.L - 02d6 1b1e srri @$AR0, $AC0.M - 02d7 1b1c srri @$AR0, $AC0.L - 02d8 02df ret - 02d9 8100 clr $ACC0 - 02da 8900 clr $ACC1 - 02db 00df 0354 lr $AC1.M, @0x0354 - 02dd 00de 034e lr $AC0.M, @0x034e - 02df 8200 cmp - 02e0 0293 02d9 jle 0x02d9 - 02e2 02df ret - 02e3 0080 0388 lri $AR0, #0x0388 - 02e5 0081 0072 lri $AR1, #0x0072 - 02e7 0e02 lris $AC0.M, #0x02 - 02e8 173f callr $AR1 - 02e9 02bf 04d7 call 0x04d7 - 02eb 00de 0344 lr $AC0.M, @0x0344 - 02ed 00fe 0341 sr @0x0341, $AC0.M - 02ef 00de 0345 lr $AC0.M, @0x0345 - 02f1 00fe 038e sr @0x038e, $AC0.M - 02f3 8100 clr $ACC0 - 02f4 00fe 0355 sr @0x0355, $AC0.M - 02f6 02bf 02ca call 0x02ca - 02f8 02bf 069b call 0x069b - 02fa 0092 00ff lri $CR, #0x00ff - 02fc 00de 0341 lr $AC0.M, @0x0341 - 02fe 007e 04ce bloop $AC0.M, 0x04ce - 0300 02bf 015c call 0x015c - 0302 02bf 0208 call 0x0208 - 0304 02bf 0543 call 0x0543 - 0306 02bf 0ad4 call 0x0ad4 - 0308 00de 0355 lr $AC0.M, @0x0355 - 030a 7400 incm $AC0.M - 030b 00fe 0355 sr @0x0355, $AC0.M - 030d 8100 clr $ACC0 - 030e 00fe 0354 sr @0x0354, $AC0.M - 0310 00de 0342 lr $AC0.M, @0x0342 - 0312 007e 046e bloop $AC0.M, 0x046e - 0314 009e fead lri $AC0.M, #0xfead - 0316 02bf 00a0 call 0x00a0 - 0318 02bf 02d9 call 0x02d9 - 031a 009e d0d0 lri $AC0.M, #0xd0d0 - 031c 02bf 00a0 call 0x00a0 - 031e 8100 clr $ACC0 - 031f 8900 clr $ACC1 - 0320 00de 0354 lr $AC0.M, @0x0354 - 0322 147c lsr $ACC0, #-4 - 0323 0200 04fc addi $AC0.M, #0x04fc - 0325 1c1e mrr $AR0, $AC0.M - 0326 181f lrr $AC1.M, @$AR0 - 0327 00de 0354 lr $AC0.M, @0x0354 - 0329 0240 000f andi $AC0.M, #0x000f - 032b 3d80 lsrnr $ACC1 - 032c 03c0 8000 andcf $AC1.M, #0x8000 - 032e 029c 046a jlnz 0x046a - 0330 00d8 0354 lr $AX0.L, @0x0354 - 0332 009a 0180 lri $AX0.H, #0x0180 - 0334 8100 clr $ACC0 - 0335 00de 0380 lr $AC0.M, @0x0380 - 0337 00dc 0381 lr $AC0.L, @0x0381 - 0339 9000 mul $AX0.L, $AX0.H - 033a 9400 mulac $AX0.L, $AX0.H, $ACC0 - 033b 00fe 034c sr @0x034c, $AC0.M - 033d 00fc 034d sr @0x034d, $AC0.L - 033f 02bf 0112 call 0x0112 - 0341 00da 0400 lr $AX0.H, @0x0400 - 0343 8600 tstaxh $AX0.H - 0344 0295 046a jz 0x046a - 0346 00da 0401 lr $AX0.H, @0x0401 - 0348 8600 tstaxh $AX0.H - 0349 0294 046a jnz 0x046a - 034b 00da 0433 lr $AX0.H, @0x0433 - 034d 00fa 03f8 sr @0x03f8, $AX0.H - 034f 00da 0406 lr $AX0.H, @0x0406 - 0351 8600 tstaxh $AX0.H - 0352 0294 0f5d jnz 0x0f5d - 0354 8100 clr $ACC0 - 0355 00de 0480 lr $AC0.M, @0x0480 - 0357 0609 cmpis $ACC0, #0x09 - 0358 0295 036b jz 0x036b - 035a 0605 cmpis $ACC0, #0x05 - 035b 0295 036b jz 0x036b - 035d 0608 cmpis $ACC0, #0x08 - 035e 0295 0b04 jz 0x0b04 - 0360 0610 cmpis $ACC0, #0x10 - 0361 0295 0b81 jz 0x0b81 - 0363 0620 cmpis $ACC0, #0x20 - 0364 0295 0bf2 jz 0x0bf2 - 0366 0621 cmpis $ACC0, #0x21 - 0367 0295 0bfa jz 0x0bfa - 0369 029f 09f1 jmp 0x09f1 - 036b 00d8 0402 lr $AX0.L, @0x0402 - 036d 8100 clr $ACC0 - 036e 8900 clr $ACC1 - 036f 00dc 0430 lr $AC0.L, @0x0430 - 0371 8d00 set15 - 0372 0950 lris $AX1.L, #0x50 - 0373 a000 mulx $AX0.L, $AX1.L - 0374 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0375 1404 lsl $ACC0, #4 - 0376 8c00 clr15 - 0377 1ffe mrr $AC1.M, $AC0.M - 0378 0083 0580 lri $AR3, #0x0580 - 037a 02bf 08b3 call 0x08b3 - 037c 029f 037e jmp 0x037e - 037e 0080 0580 lri $AR0, #0x0580 - 0380 0081 0520 lri $AR1, #0x0520 - 0382 0099 0000 lri $AX1.L, #0x0000 - 0384 02bf 0edd call 0x0edd - 0386 00da 04a8 lr $AX0.H, @0x04a8 - 0388 8600 tstaxh $AX0.H - 0389 0295 038f jz 0x038f - 038b 0080 0520 lri $AR0, #0x0520 - 038d 02bf 0ddc call 0x0ddc - 038f 009e 0520 lri $AC0.M, #0x0520 - 0391 00fe 038f sr @0x038f, $AC0.M - 0393 8900 clr $ACC1 - 0394 00df 0484 lr $AC1.M, @0x0484 - 0396 0340 001f andi $AC1.M, #0x001f - 0398 b900 tst $ACC1 - 0399 0295 03bf jz 0x03bf - 039b 00de 038f lr $AC0.M, @0x038f - 039d 5c00 sub $ACC0, $ACC1 - 039e 00fe 038f sr @0x038f, $AC0.M - 03a0 1c7e mrr $AR3, $AC0.M - 03a1 0080 0440 lri $AR0, #0x0440 - 03a3 05fe addis $ACC1, #0xfe - 03a4 02bf 012b call 0x012b - 03a6 0080 0490 lri $AR0, #0x0490 - 03a8 00c1 038f lr $AR1, @0x038f - 03aa 8900 clr $ACC1 - 03ab 00df 0484 lr $AC1.M, @0x0484 - 03ad 0340 001f andi $AC1.M, #0x001f - 03af 02bf 0ca5 call 0x0ca5 - 03b1 00de 038f lr $AC0.M, @0x038f - 03b3 0450 addis $ACC0, #0x50 - 03b4 1c1e mrr $AR0, $AC0.M - 03b5 0083 0440 lri $AR3, #0x0440 - 03b7 8900 clr $ACC1 - 03b8 00df 0484 lr $AC1.M, @0x0484 - 03ba 0340 001f andi $AC1.M, #0x001f - 03bc 05fe addis $ACC1, #0xfe - 03bd 02bf 012b call 0x012b - 03bf 00de 0484 lr $AC0.M, @0x0484 - 03c1 0240 0020 andi $AC0.M, #0x0020 - 03c3 0295 03e1 jz 0x03e1 - 03c5 0080 04a4 lri $AR0, #0x04a4 - 03c7 00c1 038f lr $AR1, @0x038f - 03c9 0082 0454 lri $AR2, #0x0454 - 03cb 0083 04a7 lri $AR3, #0x04a7 - 03cd 18fa lrrd $AX0.H, @$AR3 - 03ce 8600 tstaxh $AX0.H - 03cf 0294 03df jnz 0x03df - 03d1 18fa lrrd $AX0.H, @$AR3 - 03d2 8600 tstaxh $AX0.H - 03d3 0294 03df jnz 0x03df - 03d5 18fa lrrd $AX0.H, @$AR3 - 03d6 8600 tstaxh $AX0.H - 03d7 0294 03df jnz 0x03df - 03d9 8100 clr $ACC0 - 03da 18fe lrrd $AC0.M, @$AR3 - 03db 0280 7fff cmpi $AC0.M, #0x7fff - 03dd 0295 03e1 jz 0x03e1 - 03df 02bf 0cc0 call 0x0cc0 - 03e1 8100 clr $ACC0 - 03e2 00de 042c lr $AC0.M, @0x042c - 03e4 b100 tst $ACC0 - 03e5 0295 03eb jz 0x03eb - 03e7 02bf 0e2b call 0x0e2b - 03e9 029f 0460 jmp 0x0460 - 03eb 8100 clr $ACC0 - 03ec 1c9e mrr $IX0, $AC0.M - 03ed 1cde mrr $IX2, $AC0.M - 03ee 7400 incm $AC0.M - 03ef 1cfe mrr $IX3, $AC0.M - 03f0 8100 clr $ACC0 - 03f1 00de 0407 lr $AC0.M, @0x0407 - 03f3 b100 tst $ACC0 - 03f4 0295 0403 jz 0x0403 - 03f6 00c3 038f lr $AR3, @0x038f - 03f8 0007 dar $AR3 - 03f9 0080 0477 lri $AR0, #0x0477 - 03fb 0084 ffff lri $IX0, #0xffff - 03fd 0087 ffff lri $IX3, #0xffff - 03ff 199a lrrn $AX0.H, @$AR0 - 0400 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - 0401 005e loop $AC0.M - 0402 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - 0403 00da 0485 lr $AX0.H, @0x0485 - 0405 8600 tstaxh $AX0.H - 0406 0295 0419 jz 0x0419 - 0408 8900 clr $ACC1 - 0409 0086 0005 lri $IX2, #0x0005 - 040b 0082 040a lri $AR2, #0x040a - 040d 1106 0411 bloopi #0x06, 0x0411 - 040f 18de lrrd $AC0.M, @$AR2 - 0410 147f lsr $ACC0, #-1 - 0411 4d36 add'sn $ACC1, $ACC0 : @$AR2, $AC0.M - 0412 b900 tst $ACC1 - 0413 0294 0419 jnz 0x0419 - 0415 009a 0001 lri $AX0.H, #0x0001 - 0417 00fa 0401 sr @0x0401, $AX0.H - 0419 8f00 set40 - 041a 0086 0002 lri $IX2, #0x0002 - 041c 0082 0408 lri $AR2, #0x0408 - 041e 1106 0449 bloopi #0x06, 0x0449 - 0420 8100 clr $ACC0 - 0421 195e lrri $AC0.M, @$AR2 - 0422 1200 sbclr #0x00 - 0423 b100 tst $ACC0 - 0424 0275 ifz - 0425 1300 sbset #0x00 - 0426 1c7e mrr $AR3, $AC0.M - 0427 195e lrri $AC0.M, @$AR2 - 0428 195f lrri $AC1.M, @$AR2 - 0429 5c00 sub $ACC0, $ACC1 - 042a 14fb asr $ACC0, #-5 - 042b 1f5e mrr $AX0.H, $AC0.M - 042c 1f1c mrr $AX0.L, $AC0.L - 042d 185e lrr $AC0.M, @$AR2 - 042e 0240 00ff andi $AC0.M, #0x00ff - 0430 1f7e mrr $AX1.H, $AC0.M - 0431 185e lrr $AC0.M, @$AR2 - 0432 1478 lsr $ACC0, #-8 - 0433 009c 0000 lri $AC0.L, #0x0000 - 0435 d100 cmpar $ACC1, $AX0.H - 0436 0295 043e jz 0x043e - 0438 185e lrr $AC0.M, @$AR2 - 0439 0272 ifg - 043a 7400 incm $AC0.M - 043b 0271 ifl - 043c 7800 decm $AC0.M - 043d 1a5e srr @$AR2, $AC0.M - 043e 0006 dar $AR2 - 043f 00de 038f lr $AC0.M, @0x038f - 0441 5600 subr $ACC0, $AX1.H - 0442 029d 0447 jlz 0x0447 - 0444 1c1e mrr $AR0, $AC0.M - 0445 02bf 0e01 call 0x0e01 - 0447 0000 nop - 0448 1b5f srri @$AR2, $AC1.M - 0449 000a iar $AR2 - 044a 8e00 set16 - 044b 8100 clr $ACC0 - 044c 00de 0407 lr $AC0.M, @0x0407 - 044e b100 tst $ACC0 - 044f 0295 0460 jz 0x0460 - 0451 00c3 038f lr $AR3, @0x038f - 0453 0087 004f lri $IX3, #0x004f - 0455 001f addarn $AR3, $IX3 - 0456 0080 0477 lri $AR0, #0x0477 - 0458 0084 ffff lri $IX0, #0xffff - 045a 0087 ffff lri $IX3, #0xffff - 045c 19fa lrrn $AX0.H, @$AR3 - 045d 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 045e 005e loop $AC0.M - 045f 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - 0460 00da 0406 lr $AX0.H, @0x0406 - 0462 8600 tstaxh $AX0.H - 0463 0294 0468 jnz 0x0468 - 0465 8100 clr $ACC0 - 0466 00fe 0404 sr @0x0404, $AC0.M - 0468 02bf 011b call 0x011b - 046a 00de 0354 lr $AC0.M, @0x0354 - 046c 7400 incm $AC0.M - 046d 00fe 0354 sr @0x0354, $AC0.M - 046f 009e b05e lri $AC0.M, #0xb05e - 0471 02bf 00a0 call 0x00a0 - 0473 0e00 lris $AC0.M, #0x00 - 0474 00fe 034e sr @0x034e, $AC0.M - 0476 0e04 lris $AC0.M, #0x04 - 0477 02bf 07e0 call 0x07e0 - 0479 00de 0355 lr $AC0.M, @0x0355 - 047b 0260 ff00 ori $AC0.M, #0xff00 - 047d 02bf 07ea call 0x07ea - 047f 02bf 0d62 call 0x0d62 - 0481 02bf 0d74 call 0x0d74 - 0483 02bf 0dc9 call 0x0dc9 - 0485 00de 0341 lr $AC0.M, @0x0341 - 0487 7800 decm $AC0.M - 0488 00fe 0341 sr @0x0341, $AC0.M - 048a 0080 09a0 lri $AR0, #0x09a0 - 048c 0083 0d00 lri $AR3, #0x0d00 - 048e 0f50 lris $AC1.M, #0x50 - 048f 0098 5a82 lri $AX0.L, #0x5a82 - 0491 02bf 0145 call 0x0145 - 0493 0080 09a0 lri $AR0, #0x09a0 - 0495 0083 0d60 lri $AR3, #0x0d60 - 0497 0f50 lris $AC1.M, #0x50 - 0498 02bf 0145 call 0x0145 - 049a 0083 0d00 lri $AR3, #0x0d00 - 049c 02bf 0e19 call 0x0e19 - 049e 0081 0388 lri $AR1, #0x0388 - 04a0 009f 0d00 lri $AC1.M, #0x0d00 - 04a2 0080 0050 lri $AR0, #0x0050 - 04a4 02bf 0654 call 0x0654 - 04a6 0080 0fa0 lri $AR0, #0x0fa0 - 04a8 0083 0d60 lri $AR3, #0x0d60 - 04aa 0f50 lris $AC1.M, #0x50 - 04ab 0098 8000 lri $AX0.L, #0x8000 - 04ad 02bf 0145 call 0x0145 - 04af 0083 0d60 lri $AR3, #0x0d60 - 04b1 02bf 0e19 call 0x0e19 - 04b3 0081 038a lri $AR1, #0x038a - 04b5 009f 0d60 lri $AC1.M, #0x0d60 - 04b7 0080 0050 lri $AR0, #0x0050 - 04b9 02bf 0654 call 0x0654 - 04bb 009a 0000 lri $AX0.H, #0x0000 - 04bd 0098 00a0 lri $AX0.L, #0x00a0 - 04bf 0080 0388 lri $AR0, #0x0388 - 04c1 02bf 02d3 call 0x02d3 - 04c3 0080 038a lri $AR0, #0x038a - 04c5 02bf 02d3 call 0x02d3 - 04c7 02bf 0285 call 0x0285 - 04c9 02bf 0512 call 0x0512 - 04cb 02bf 04e9 call 0x04e9 - 04cd 0000 nop - 04ce 0000 nop - 04cf 009e 0dac lri $AC0.M, #0x0dac - 04d1 02bf 00a0 call 0x00a0 - 04d3 0080 002b lri $AR0, #0x002b - 04d5 029f 0779 jmp 0x0779 - 04d7 0080 0374 lri $AR0, #0x0374 - 04d9 0e02 lris $AC0.M, #0x02 - 04da 02bf 0074 call 0x0074 - 04dc 00de 0374 lr $AC0.M, @0x0374 - 04de 0240 7fff andi $AC0.M, #0x7fff - 04e0 00fe 0374 sr @0x0374, $AC0.M - 04e2 00de 0376 lr $AC0.M, @0x0376 - 04e4 0240 7fff andi $AC0.M, #0x7fff - 04e6 00fe 0376 sr @0x0376, $AC0.M - 04e8 02df ret - 04e9 00da 0374 lr $AX0.H, @0x0374 - 04eb 8600 tstaxh $AX0.H - 04ec 02d5 retz - 04ed 0083 0f40 lri $AR3, #0x0f40 - 04ef 02bf 0e19 call 0x0e19 - 04f1 0083 0ca0 lri $AR3, #0x0ca0 - 04f3 02bf 0e19 call 0x0e19 - 04f5 0081 0374 lri $AR1, #0x0374 - 04f7 009f 0f40 lri $AC1.M, #0x0f40 - 04f9 0080 0050 lri $AR0, #0x0050 - 04fb 02bf 0654 call 0x0654 - 04fd 0081 0376 lri $AR1, #0x0376 - 04ff 009f 0ca0 lri $AC1.M, #0x0ca0 - 0501 0080 0050 lri $AR0, #0x0050 - 0503 02bf 0654 call 0x0654 - 0505 009a 0000 lri $AX0.H, #0x0000 - 0507 0098 00a0 lri $AX0.L, #0x00a0 - 0509 0080 0374 lri $AR0, #0x0374 - 050b 02bf 02d3 call 0x02d3 - 050d 0080 0376 lri $AR0, #0x0376 - 050f 02bf 02d3 call 0x02d3 - 0511 02df ret - 0512 00da 0374 lr $AX0.H, @0x0374 - 0514 8600 tstaxh $AX0.H - 0515 02d5 retz - 0516 009f 0be0 lri $AC1.M, #0x0be0 - 0518 00ff 03a1 sr @0x03a1, $AC1.M - 051a 00df 03ca lr $AC1.M, @0x03ca - 051c 00ff 0392 sr @0x0392, $AC1.M - 051e 00df 03cb lr $AC1.M, @0x03cb - 0520 00ff 0393 sr @0x0393, $AC1.M - 0522 009f 03a6 lri $AC1.M, #0x03a6 - 0524 00ff 03a0 sr @0x03a0, $AC1.M - 0526 00df 03c9 lr $AC1.M, @0x03c9 - 0528 00ff 0391 sr @0x0391, $AC1.M - 052a 02bf 026b call 0x026b - 052c 009f 0c40 lri $AC1.M, #0x0c40 - 052e 00ff 03a1 sr @0x03a1, $AC1.M - 0530 00df 03da lr $AC1.M, @0x03da - 0532 00ff 0392 sr @0x0392, $AC1.M - 0534 00df 03db lr $AC1.M, @0x03db - 0536 00ff 0393 sr @0x0393, $AC1.M - 0538 009f 03a7 lri $AC1.M, #0x03a7 - 053a 00ff 03a0 sr @0x03a0, $AC1.M - 053c 00df 03d9 lr $AC1.M, @0x03d9 - 053e 00ff 0391 sr @0x0391, $AC1.M - 0540 02bf 026b call 0x026b - 0542 02df ret - 0543 00da 0374 lr $AX0.H, @0x0374 - 0545 8600 tstaxh $AX0.H - 0546 02d5 retz - 0547 00da 03d8 lr $AX0.H, @0x03d8 - 0549 8600 tstaxh $AX0.H - 054a 02d5 retz - 054b 0083 0be0 lri $AR3, #0x0be0 - 054d 0080 0c30 lri $AR0, #0x0c30 - 054f 0f04 lris $AC1.M, #0x04 - 0550 02bf 0132 call 0x0132 - 0552 0083 0c40 lri $AR3, #0x0c40 - 0554 0080 0c90 lri $AR0, #0x0c90 - 0556 0f04 lris $AC1.M, #0x04 - 0557 02bf 0132 call 0x0132 - 0559 00df 03ca lr $AC1.M, @0x03ca - 055b 00ff 0392 sr @0x0392, $AC1.M - 055d 00df 03cb lr $AC1.M, @0x03cb - 055f 00ff 0393 sr @0x0393, $AC1.M - 0561 00df 03a6 lr $AC1.M, @0x03a6 - 0563 7500 incm $AC1.M - 0564 1f5f mrr $AX0.H, $AC1.M - 0565 009f 0be8 lri $AC1.M, #0x0be8 - 0567 02bf 01b2 call 0x01b2 - 0569 00df 03da lr $AC1.M, @0x03da - 056b 00ff 0392 sr @0x0392, $AC1.M - 056d 00df 03db lr $AC1.M, @0x03db - 056f 00ff 0393 sr @0x0393, $AC1.M - 0571 00df 03a7 lr $AC1.M, @0x03a7 - 0573 7500 incm $AC1.M - 0574 1f5f mrr $AX0.H, $AC1.M - 0575 009f 0c48 lri $AC1.M, #0x0c48 - 0577 02bf 01b2 call 0x01b2 - 0579 00de 03c8 lr $AC0.M, @0x03c8 - 057b 02a0 0001 andf $AC0.M, #0x0001 - 057d 029d 0586 jlz 0x0586 - 057f 0080 03d0 lri $AR0, #0x03d0 - 0581 0e08 lris $AC0.M, #0x08 - 0582 0081 0be0 lri $AR1, #0x0be0 - 0584 02bf 0c86 call 0x0c86 - 0586 00de 03d8 lr $AC0.M, @0x03d8 - 0588 02a0 0001 andf $AC0.M, #0x0001 - 058a 029d 0593 jlz 0x0593 - 058c 0080 03e0 lri $AR0, #0x03e0 - 058e 0e08 lris $AC0.M, #0x08 - 058f 0081 0c40 lri $AR1, #0x0c40 - 0591 02bf 0c86 call 0x0c86 - 0593 0f50 lris $AC1.M, #0x50 - 0594 0080 0be0 lri $AR0, #0x0be0 - 0596 0083 0f40 lri $AR3, #0x0f40 - 0598 00d8 03cd lr $AX0.L, @0x03cd - 059a 02bf 0145 call 0x0145 - 059c 0f50 lris $AC1.M, #0x50 - 059d 0080 0c40 lri $AR0, #0x0c40 - 059f 0083 0ca0 lri $AR3, #0x0ca0 - 05a1 00d8 03df lr $AX0.L, @0x03df - 05a3 02bf 0145 call 0x0145 - 05a5 00de 03c8 lr $AC0.M, @0x03c8 - 05a7 02a0 0002 andf $AC0.M, #0x0002 - 05a9 029d 05b2 jlz 0x05b2 - 05ab 0080 03d0 lri $AR0, #0x03d0 - 05ad 0e08 lris $AC0.M, #0x08 - 05ae 0081 0be0 lri $AR1, #0x0be0 - 05b0 02bf 0c86 call 0x0c86 - 05b2 00de 03d8 lr $AC0.M, @0x03d8 - 05b4 02a0 0002 andf $AC0.M, #0x0002 - 05b6 029d 05bf jlz 0x05bf - 05b8 0080 03e0 lri $AR0, #0x03e0 - 05ba 0e08 lris $AC0.M, #0x08 - 05bb 0081 0c40 lri $AR1, #0x0c40 - 05bd 02bf 0c86 call 0x0c86 - 05bf 02df ret - 05c0 0080 0346 lri $AR0, #0x0346 - 05c2 02bf 0072 call 0x0072 - 05c4 02bf 0072 call 0x0072 - 05c6 0081 0346 lri $AR1, #0x0346 - 05c8 193e lrri $AC0.M, @$AR1 - 05c9 193c lrri $AC0.L, @$AR1 - 05ca 009f 0400 lri $AC1.M, #0x0400 - 05cc 00c0 0345 lr $AR0, @0x0345 - 05ce 02bf 0649 call 0x0649 - 05d0 0081 0348 lri $AR1, #0x0348 - 05d2 193e lrri $AC0.M, @$AR1 - 05d3 193c lrri $AC0.L, @$AR1 - 05d4 009f 0800 lri $AC1.M, #0x0800 - 05d6 00c0 0345 lr $AR0, @0x0345 - 05d8 02bf 0649 call 0x0649 - 05da 0081 0346 lri $AR1, #0x0346 - 05dc 193e lrri $AC0.M, @$AR1 - 05dd 193c lrri $AC0.L, @$AR1 - 05de 009f 0800 lri $AC1.M, #0x0800 - 05e0 00c0 0345 lr $AR0, @0x0345 - 05e2 02bf 0656 call 0x0656 - 05e4 0081 0348 lri $AR1, #0x0348 - 05e6 193e lrri $AC0.M, @$AR1 - 05e7 193c lrri $AC0.L, @$AR1 - 05e8 009f 0400 lri $AC1.M, #0x0400 - 05ea 00c0 0345 lr $AR0, @0x0345 - 05ec 02bf 0656 call 0x0656 - 05ee 029f 004a jmp 0x004a - 05f0 0080 0346 lri $AR0, #0x0346 - 05f2 02bf 0072 call 0x0072 - 05f4 02bf 0072 call 0x0072 - 05f6 0081 0346 lri $AR1, #0x0346 - 05f8 193e lrri $AC0.M, @$AR1 - 05f9 193c lrri $AC0.L, @$AR1 - 05fa 009f 0400 lri $AC1.M, #0x0400 - 05fc 00c0 0345 lr $AR0, @0x0345 - 05fe 02bf 0649 call 0x0649 - 0600 0081 0348 lri $AR1, #0x0348 - 0602 193e lrri $AC0.M, @$AR1 - 0603 193c lrri $AC0.L, @$AR1 - 0604 009f 0400 lri $AC1.M, #0x0400 - 0606 00c0 0345 lr $AR0, @0x0345 - 0608 02bf 0656 call 0x0656 - 060a 029f 004a jmp 0x004a - 060c 0080 0346 lri $AR0, #0x0346 - 060e 02bf 0072 call 0x0072 - 0610 02bf 0072 call 0x0072 - 0612 0081 0346 lri $AR1, #0x0346 - 0614 193e lrri $AC0.M, @$AR1 - 0615 193c lrri $AC0.L, @$AR1 - 0616 009f 0400 lri $AC1.M, #0x0400 - 0618 00c0 0344 lr $AR0, @0x0344 - 061a 02bf 0649 call 0x0649 - 061c 0081 0348 lri $AR1, #0x0348 - 061e 193e lrri $AC0.M, @$AR1 - 061f 193c lrri $AC0.L, @$AR1 - 0620 009f 0800 lri $AC1.M, #0x0800 - 0622 00c0 0344 lr $AR0, @0x0344 - 0624 02bf 0649 call 0x0649 - 0626 0080 0400 lri $AR0, #0x0400 - 0628 0083 0800 lri $AR3, #0x0800 - 062a 0084 0000 lri $IX0, #0x0000 - 062c 00da 0345 lr $AX0.H, @0x0345 - 062e 00df 0344 lr $AC1.M, @0x0344 - 0630 8f00 set40 - 0631 197b lrri $AX1.H, @$AR3 - 0632 b800 mulx $AX0.H, $AX1.H - 0633 197b lrri $AX1.H, @$AR3 - 0634 007f 0639 bloop $AC1.M, 0x0639 - 0636 199e lrrn $AC0.M, @$AR0 - 0637 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0638 80b2 nx'sl : $AC0.M, $AX1.H - 0639 0000 nop - 063a 8e00 set16 - 063b 0081 0346 lri $AR1, #0x0346 - 063d 193e lrri $AC0.M, @$AR1 - 063e 193c lrri $AC0.L, @$AR1 - 063f 009f 0400 lri $AC1.M, #0x0400 - 0641 00c0 0344 lr $AR0, @0x0344 - 0643 02bf 0656 call 0x0656 - 0645 029f 004a jmp 0x004a - 0647 193e lrri $AC0.M, @$AR1 - 0648 193c lrri $AC0.L, @$AR1 - 0649 2fcd srs @DSPA, $AC1.M - 064a 0f00 lris $AC1.M, #0x00 - 064b 2fc9 srs @DSCR, $AC1.M - 064c 2ece srs @DSMAH, $AC0.M - 064d 2ccf srs @DSMAL, $AC0.L - 064e 1fe0 mrr $AC1.M, $AR0 - 064f 1501 lsl $ACC1, #1 - 0650 2fcb srs @DSBL, $AC1.M - 0651 02bf 065a call 0x065a - 0653 02df ret - 0654 193e lrri $AC0.M, @$AR1 - 0655 193c lrri $AC0.L, @$AR1 - 0656 2fcd srs @DSPA, $AC1.M - 0657 0f01 lris $AC1.M, #0x01 - 0658 029f 064b jmp 0x064b - 065a 26c9 lrs $AC0.M, @DSCR - 065b 02a0 0004 andf $AC0.M, #0x0004 - 065d 029c 065a jlnz 0x065a - 065f 02df ret - 0660 193e lrri $AC0.M, @$AR1 - 0661 193c lrri $AC0.L, @$AR1 - 0662 00ff ffcd sr @DSPA, $AC1.M - 0664 0f00 lris $AC1.M, #0x00 - 0665 00ff ffc9 sr @DSCR, $AC1.M - 0667 00fe ffce sr @DSMAH, $AC0.M - 0669 00fc ffcf sr @DSMAL, $AC0.L - 066b 1fe0 mrr $AC1.M, $AR0 - 066c 1501 lsl $ACC1, #1 - 066d 00ff ffcb sr @DSBL, $AC1.M - 066f 02df ret - 0670 00de ffc9 lr $AC0.M, @DSCR - 0672 02a0 0004 andf $AC0.M, #0x0004 - 0674 029c 0670 jlnz 0x0670 - 0676 02df ret - 0677 0080 0346 lri $AR0, #0x0346 - 0679 02bf 0072 call 0x0072 - 067b 02bf 0072 call 0x0072 - 067d 0081 0346 lri $AR1, #0x0346 - 067f 00df 0349 lr $AC1.M, @0x0349 - 0681 0340 ffff andi $AC1.M, #0xffff - 0683 00c0 0345 lr $AR0, @0x0345 - 0685 02bf 0647 call 0x0647 - 0687 029f 004a jmp 0x004a - 0689 0080 0346 lri $AR0, #0x0346 - 068b 02bf 0072 call 0x0072 - 068d 02bf 0072 call 0x0072 - 068f 0081 0346 lri $AR1, #0x0346 - 0691 00df 0349 lr $AC1.M, @0x0349 - 0693 0340 ffff andi $AC1.M, #0xffff - 0695 00c0 0345 lr $AR0, @0x0345 - 0697 02bf 0654 call 0x0654 - 0699 029f 004a jmp 0x004a - 069b 0092 00ff lri $CR, #0x00ff - 069d 009e ffff lri $AC0.M, #0xffff - 069f 2ed4 srs @ACSAH, $AC0.M - 06a0 2ed5 srs @ACSAL, $AC0.M - 06a1 2ed6 srs @ACEAH, $AC0.M - 06a2 2ed7 srs @ACEAL, $AC0.M - 06a3 02df ret - 06a4 00ff ffd1 sr @SampleFormat, $AC1.M - 06a6 0340 0003 andi $AC1.M, #0x0003 - 06a8 7900 decm $AC1.M - 06a9 02ca lsrn - 06aa 00df 037d lr $AC1.M, @0x037d - 06ac 00dd 037e lr $AC1.L, @0x037e - 06ae 4c00 add $ACC0, $ACC1 - 06af 00fe ffd8 sr @ACCAH, $AC0.M - 06b1 00fc ffd9 sr @ACCAL, $AC0.L - 06b3 02df ret - 06b4 1fc3 mrr $AC0.M, $AR3 - 06b5 043f addis $ACC0, #0x3f - 06b6 0240 fff0 andi $AC0.M, #0xfff0 - 06b8 00fe ffcd sr @DSPA, $AC0.M - 06ba 1c1a mrr $AR0, $AX0.H - 06bb 00da 037f lr $AX0.H, @0x037f - 06bd 4400 addr $ACC0, $AX0.H - 06be 1f40 mrr $AX0.H, $AR0 - 06bf 1c1e mrr $AR0, $AC0.M - 06c0 1fda mrr $AC0.M, $AX0.H - 06c1 041f addis $ACC0, #0x1f - 06c2 0240 fff0 andi $AC0.M, #0xfff0 - 06c4 1401 lsl $ACC0, #1 - 06c5 00fe ffcb sr @DSBL, $AC0.M - 06c7 00de ffc9 lr $AC0.M, @DSCR - 06c9 02a0 0004 andf $AC0.M, #0x0004 - 06cb 029c 06c7 jlnz 0x06c7 - 06cd 007a 06d0 bloop $AX0.H, 0x06d0 - 06cf 191e lrri $AC0.M, @$AR0 - 06d0 1b7e srri @$AR3, $AC0.M - 06d1 02df ret - 06d2 8900 clr $ACC1 - 06d3 1ffc mrr $AC1.M, $AC0.L - 06d4 0340 001f andi $AC1.M, #0x001f - 06d6 00ff 037f sr @0x037f, $AC1.M - 06d8 1ffc mrr $AC1.M, $AC0.L - 06d9 0340 ffe0 andi $AC1.M, #0xffe0 - 06db 1f9f mrr $AC0.L, $AC1.M - 06dc 00df 037d lr $AC1.M, @0x037d - 06de 00dd 037e lr $AC1.L, @0x037e - 06e0 4c00 add $ACC0, $ACC1 - 06e1 00fe ffce sr @DSMAH, $AC0.M - 06e3 00fc ffcf sr @DSMAL, $AC0.L - 06e5 0f00 lris $AC1.M, #0x00 - 06e6 00ff ffc9 sr @DSCR, $AC1.M - 06e8 02df ret - 06e9 00df 037f lr $AC1.M, @0x037f - 06eb 157f lsr $ACC1, #-1 - 06ec 00ff 037f sr @0x037f, $AC1.M - 06ee 02df ret - 06ef 8600 tstaxh $AX0.H - 06f0 02d5 retz - 06f1 1f1a mrr $AX0.L, $AX0.H - 06f2 009e 0780 lri $AC0.M, #0x0780 - 06f4 00fe ffcd sr @DSPA, $AC0.M - 06f6 1fda mrr $AC0.M, $AX0.H - 06f7 043f addis $ACC0, #0x3f - 06f8 0240 ffe0 andi $AC0.M, #0xffe0 - 06fa 00fe ffcb sr @DSBL, $AC0.M - 06fc 00de ffc9 lr $AC0.M, @DSCR - 06fe 02a0 0004 andf $AC0.M, #0x0004 - 0700 029c 06fc jlnz 0x06fc - 0702 8100 clr $ACC0 - 0703 00de 037f lr $AC0.M, @0x037f - 0705 147f lsr $ACC0, #-1 - 0706 0200 0780 addi $AC0.M, #0x0780 - 0708 1c1e mrr $AR0, $AC0.M - 0709 00de 037f lr $AC0.M, @0x037f - 070b 02a0 0001 andf $AC0.M, #0x0001 - 070d 029d 0716 jlz 0x0716 - 070f 8100 clr $ACC0 - 0710 191e lrri $AC0.M, @$AR0 - 0711 1488 asl $ACC0, #8 - 0712 1b7e srri @$AR3, $AC0.M - 0713 1fda mrr $AC0.M, $AX0.H - 0714 7800 decm $AC0.M - 0715 1f5e mrr $AX0.H, $AC0.M - 0716 8100 clr $ACC0 - 0717 1fda mrr $AC0.M, $AX0.H - 0718 147f lsr $ACC0, #-1 - 0719 007e 0722 bloop $AC0.M, 0x0722 - 071b 8100 clr $ACC0 - 071c 181e lrr $AC0.M, @$AR0 - 071d 0240 ff00 andi $AC0.M, #0xff00 - 071f 1b7e srri @$AR3, $AC0.M - 0720 191e lrri $AC0.M, @$AR0 - 0721 1488 asl $ACC0, #8 - 0722 1b7e srri @$AR3, $AC0.M - 0723 1fda mrr $AC0.M, $AX0.H - 0724 1f58 mrr $AX0.H, $AX0.L - 0725 02a0 0001 andf $AC0.M, #0x0001 - 0727 02dd retlz - 0728 8100 clr $ACC0 - 0729 181e lrr $AC0.M, @$AR0 - 072a 0240 ff00 andi $AC0.M, #0xff00 - 072c 1b7e srri @$AR3, $AC0.M - 072d 02df ret - 072e 1205 sbclr #0x05 - 072f 8e00 set16 - 0730 00f0 03fd sr @0x03fd, $AC0.H - 0732 00fc 03ff sr @0x03ff, $AC0.L - 0734 f400 lsr16 $ACC0 - 0735 00fc 03fe sr @0x03fe, $AC0.L - 0737 00fa 03fa sr @0x03fa, $AX0.H - 0739 8100 clr $ACC0 - 073a 00de fffe lr $AC0.M, @CMBH - 073c 02c0 8000 andcf $AC0.M, #0x8000 - 073e 029c 082f jlnz 0x082f - 0740 00da ffff lr $AX0.H, @CMBL - 0742 8600 tstaxh $AX0.H - 0743 0294 0808 jnz 0x0808 - 0745 00de fffe lr $AC0.M, @CMBH - 0747 02c0 8000 andcf $AC0.M, #0x8000 - 0749 029c 0745 jlnz 0x0745 - 074b 0240 000f andi $AC0.M, #0x000f - 074d 1f5e mrr $AX0.H, $AC0.M - 074e 7400 incm $AC0.M - 074f 0c00 lris $AC0.L, #0x00 - 0750 1404 lsl $ACC0, #4 - 0751 00fe 034e sr @0x034e, $AC0.M - 0753 1fda mrr $AC0.M, $AX0.H - 0754 1f40 mrr $AX0.H, $AR0 - 0755 0200 04fc addi $AC0.M, #0x04fc - 0757 1c1e mrr $AR0, $AC0.M - 0758 00de ffff lr $AC0.M, @CMBL - 075a 1a1e srr @$AR0, $AC0.M - 075b 1c1a mrr $AR0, $AX0.H - 075c 00de 03fe lr $AC0.M, @0x03fe - 075e 00dc 03ff lr $AC0.L, @0x03ff - 0760 00d0 03fd lr $AC0.H, @0x03fd - 0762 00da 03fa lr $AX0.H, @0x03fa - 0764 1305 sbset #0x05 - 0765 02ff rti - 0766 009a 0002 lri $AX0.H, #0x0002 - 0768 00fa 03a3 sr @0x03a3, $AX0.H - 076a 00e0 03f9 sr @0x03f9, $AR0 - 076c 02bf 07f2 call 0x07f2 - 076e 16fc dcd1 si @DMBH, #0xdcd1 - 0770 16fd 0002 si @DMBL, #0x0002 - 0772 16fb 0001 si @DIRQ, #0x0001 - 0774 0021 halt - 0775 078d cmpis $ACC1, #0x8d - 0776 078e cmpis $ACC1, #0x8e - 0777 07ce cmpis $ACC1, #0xce - 0778 07d1 cmpis $ACC1, #0xd1 - 0779 00e0 03f9 sr @0x03f9, $AR0 - 077b 009e 0005 lri $AC0.M, #0x0005 - 077d 02bf 07e0 call 0x07e0 - 077f 8e00 set16 - 0780 8100 clr $ACC0 - 0781 8900 clr $ACC1 - 0782 02bf 07d4 call 0x07d4 - 0784 27ff lrs $AC1.M, @CMBL - 0785 009e 0775 lri $AC0.M, #0x0775 - 0787 4c00 add $ACC0, $ACC1 - 0788 1c7e mrr $AR3, $AC0.M - 0789 0313 ilrr $AC1.M, @$AR3 - 078a 1c7f mrr $AR3, $AC1.M - 078b 176f jmpr $AR3 - 078c 0021 halt - 078d 0021 halt - 078e 009a 0002 lri $AX0.H, #0x0002 - 0790 00fa 03a3 sr @0x03a3, $AX0.H - 0792 8100 clr $ACC0 - 0793 8900 clr $ACC1 - 0794 02bf 07d4 call 0x07d4 - 0796 24ff lrs $AC0.L, @CMBL - 0797 02bf 07da call 0x07da - 0799 25ff lrs $AC1.L, @CMBL - 079a 02bf 07da call 0x07da - 079c 27ff lrs $AC1.M, @CMBL - 079d 2ece srs @DSMAH, $AC0.M - 079e 2ccf srs @DSMAL, $AC0.L - 079f 16c9 0001 si @DSCR, #0x0001 - 07a1 2fcd srs @DSPA, $AC1.M - 07a2 2dcb srs @DSBL, $AC1.L - 07a3 8100 clr $ACC0 - 07a4 8900 clr $ACC1 - 07a5 02bf 07d4 call 0x07d4 - 07a7 24ff lrs $AC0.L, @CMBL - 07a8 1c9e mrr $IX0, $AC0.M - 07a9 1cbc mrr $IX1, $AC0.L - 07aa 02bf 07da call 0x07da - 07ac 25ff lrs $AC1.L, @CMBL - 07ad 02bf 07da call 0x07da - 07af 27ff lrs $AC1.M, @CMBL - 07b0 1cdf mrr $IX2, $AC1.M - 07b1 1cfd mrr $IX3, $AC1.L - 07b2 8100 clr $ACC0 - 07b3 02bf 07d4 call 0x07d4 - 07b5 26ff lrs $AC0.M, @CMBL - 07b6 1c1e mrr $AR0, $AC0.M - 07b7 8900 clr $ACC1 - 07b8 02bf 07da call 0x07da - 07ba 20ff lrs $AX0.L, @CMBL - 07bb 1f5f mrr $AX0.H, $AC1.M - 07bc 02bf 07d4 call 0x07d4 - 07be 21ff lrs $AX1.L, @CMBL - 07bf 02bf 07d4 call 0x07d4 - 07c1 23ff lrs $AX1.H, @CMBL - 07c2 26c9 lrs $AC0.M, @DSCR - 07c3 02a0 0004 andf $AC0.M, #0x0004 - 07c5 029c 07c2 jlnz 0x07c2 - 07c7 1206 sbclr #0x06 - 07c8 1203 sbclr #0x03 - 07c9 1204 sbclr #0x04 - 07ca 1205 sbclr #0x05 - 07cb 029f 80b5 jmp 0x80b5 - 07cd 0021 halt - 07ce 029f 8000 jmp 0x8000 - 07d0 0021 halt - 07d1 00c0 03f9 lr $AR0, @0x03f9 - 07d3 170f jmpr $AR0 - 07d4 26fe lrs $AC0.M, @CMBH - 07d5 02c0 8000 andcf $AC0.M, #0x8000 - 07d7 029c 07d4 jlnz 0x07d4 - 07d9 02df ret - 07da 27fe lrs $AC1.M, @CMBH - 07db 03c0 8000 andcf $AC1.M, #0x8000 - 07dd 029c 07da jlnz 0x07da - 07df 02df ret - 07e0 02bf 07f8 call 0x07f8 - 07e2 16fc dcd1 si @DMBH, #0xdcd1 - 07e4 2efd srs @DMBL, $AC0.M - 07e5 16fb 0001 si @DIRQ, #0x0001 - 07e7 02bf 07f8 call 0x07f8 - 07e9 02df ret - 07ea 02bf 07f8 call 0x07f8 - 07ec 16fc f355 si @DMBH, #0xf355 - 07ee 2efd srs @DMBL, $AC0.M - 07ef 02bf 07f8 call 0x07f8 - 07f1 02df ret - 07f2 26fc lrs $AC0.M, @DMBH - 07f3 02c0 8000 andcf $AC0.M, #0x8000 - 07f5 029d 07f2 jlz 0x07f2 - 07f7 02df ret - 07f8 27fc lrs $AC1.M, @DMBH - 07f9 03c0 8000 andcf $AC1.M, #0x8000 - 07fb 029d 07f8 jlz 0x07f8 - 07fd 02df ret - 07fe 009a 0280 lri $AX0.H, #0x0280 - 0800 00fa 0350 sr @0x0350, $AX0.H - 0802 00fa 0351 sr @0x0351, $AX0.H - 0804 0a00 lris $AX0.H, #0x00 - 0805 00fa 0352 sr @0x0352, $AX0.H - 0807 02df ret - 0808 00e0 03fb sr @0x03fb, $AR0 - 080a 00e8 03fc sr @0x03fc, $WR0 - 080c 00c0 0350 lr $AR0, @0x0350 - 080e 0088 002f lri $WR0, #0x002f - 0810 1b1a srri @$AR0, $AX0.H - 0811 00de fffe lr $AC0.M, @CMBH - 0813 02c0 8000 andcf $AC0.M, #0x8000 - 0815 029c 0811 jlnz 0x0811 - 0817 00dc ffff lr $AC0.L, @CMBL - 0819 1b1e srri @$AR0, $AC0.M - 081a 1b1c srri @$AR0, $AC0.L - 081b 1fda mrr $AC0.M, $AX0.H - 081c 7800 decm $AC0.M - 081d 1f5e mrr $AX0.H, $AC0.M - 081e 8600 tstaxh $AX0.H - 081f 0294 0811 jnz 0x0811 - 0821 8100 clr $ACC0 - 0822 00de 0352 lr $AC0.M, @0x0352 - 0824 7400 incm $AC0.M - 0825 00fe 0352 sr @0x0352, $AC0.M - 0827 00e0 0350 sr @0x0350, $AR0 - 0829 00c0 03fb lr $AR0, @0x03fb - 082b 00c8 03fc lr $WR0, @0x03fc - 082d 029f 075c jmp 0x075c - 082f 00e0 03fb sr @0x03fb, $AR0 - 0831 00e8 03fc sr @0x03fc, $WR0 - 0833 00c0 0350 lr $AR0, @0x0350 - 0835 0088 002f lri $WR0, #0x002f - 0837 0a00 lris $AX0.H, #0x00 - 0838 1b1a srri @$AR0, $AX0.H - 0839 029f 0821 jmp 0x0821 - 083b 00c0 0351 lr $AR0, @0x0351 - 083d 0088 002f lri $WR0, #0x002f - 083f 00da 0352 lr $AX0.H, @0x0352 - 0841 8600 tstaxh $AX0.H - 0842 0295 0863 jz 0x0863 - 0844 1205 sbclr #0x05 - 0845 00da 0352 lr $AX0.H, @0x0352 - 0847 1fda mrr $AC0.M, $AX0.H - 0848 7800 decm $AC0.M - 0849 00fe 0352 sr @0x0352, $AC0.M - 084b 1305 sbset #0x05 - 084c 0081 0356 lri $AR1, #0x0356 - 084e 191e lrri $AC0.M, @$AR0 - 084f 02c0 8000 andcf $AC0.M, #0x8000 - 0851 029d 0867 jlz 0x0867 - 0853 1f5e mrr $AX0.H, $AC0.M - 0854 8600 tstaxh $AX0.H - 0855 0295 086b jz 0x086b - 0857 007a 085c bloop $AX0.H, 0x085c - 0859 191e lrri $AC0.M, @$AR0 - 085a 1b3e srri @$AR1, $AC0.M - 085b 191e lrri $AC0.M, @$AR0 - 085c 1b3e srri @$AR1, $AC0.M - 085d 00e0 0351 sr @0x0351, $AR0 - 085f 0088 ffff lri $WR0, #0xffff - 0861 029f 0036 jmp 0x0036 - 0863 0088 ffff lri $WR0, #0xffff - 0865 029f 002b jmp 0x002b - 0867 00e0 0351 sr @0x0351, $AR0 - 0869 029f 083f jmp 0x083f - 086b 0080 083b lri $AR0, #0x083b - 086d 029f 0766 jmp 0x0766 - 086f 8100 clr $ACC0 - 0870 0e10 lris $AC0.M, #0x10 - 0871 2232 lrs $AX0.H, @0x0032 - 0872 8600 tstaxh $AX0.H - 0873 02d5 retz - 0874 5400 subr $ACC0, $AX0.H - 0875 0200 0458 addi $AC0.M, #0x0458 - 0877 1c1e mrr $AR0, $AC0.M - 0878 1fda mrr $AC0.M, $AX0.H - 0879 04fe addis $ACC0, #0xfe - 087a 1f1e mrr $AX0.L, $AC0.M - 087b 191e lrri $AC0.M, @$AR0 - 087c 0291 0882 jl 0x0882 - 087e 191a lrri $AX0.H, @$AR0 - 087f 0058 loop $AX0.L - 0880 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0881 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 0882 1b7e srri @$AR3, $AC0.M - 0883 02df ret - 0884 02bf 086f call 0x086f - 0886 8100 clr $ACC0 - 0887 2632 lrs $AC0.M, @0x0032 - 0888 5c00 sub $ACC0, $ACC1 - 0889 2e32 srs @0x0032, $AC0.M - 088a 0092 00ff lri $CR, #0x00ff - 088c 02df ret - 088d 00de 04fb lr $AC0.M, @0x04fb - 088f 7400 incm $AC0.M - 0890 00fe 04fb sr @0x04fb, $AC0.M - 0892 8100 clr $ACC0 - 0893 2e32 srs @0x0032, $AC0.M - 0894 2e66 srs @0x0066, $AC0.M - 0895 2e67 srs @0x0067, $AC0.M - 0896 268a lrs $AC0.M, @0xff8a - 0897 248b lrs $AC0.L, @0xff8b - 0898 2e3a srs @0x003a, $AC0.M - 0899 2c3b srs @0x003b, $AC0.L - 089a 268c lrs $AC0.M, @0xff8c - 089b 248d lrs $AC0.L, @0xff8d - 089c 2e38 srs @0x0038, $AC0.M - 089d 2c39 srs @0x0039, $AC0.L - 089e 02df ret - 089f 8100 clr $ACC0 - 08a0 2689 lrs $AC0.M, @0xff89 - 08a1 0240 000f andi $AC0.M, #0x000f - 08a3 1f5e mrr $AX0.H, $AC0.M - 08a4 8100 clr $ACC0 - 08a5 0e10 lris $AC0.M, #0x10 - 08a6 5400 subr $ACC0, $AX0.H - 08a7 2e32 srs @0x0032, $AC0.M - 08a8 268a lrs $AC0.M, @0xff8a - 08a9 248b lrs $AC0.L, @0xff8b - 08aa 2288 lrs $AX0.H, @0xff88 - 08ab 2089 lrs $AX0.L, @0xff89 - 08ac 5800 subax $ACC0, $AX0.L - 08ad 0a00 lris $AX0.H, #0x00 - 08ae 2032 lrs $AX0.L, @0x0032 - 08af 5800 subax $ACC0, $AX0.L - 08b0 2e3a srs @0x003a, $AC0.M - 08b1 2c3b srs @0x003b, $AC0.L - 08b2 02df ret - 08b3 0092 0004 lri $CR, #0x0004 - 08b5 8100 clr $ACC0 - 08b6 2604 lrs $AC0.M, @0x0004 - 08b7 b100 tst $ACC0 - 08b8 02b4 088d callnz 0x088d - 08ba 8100 clr $ACC0 - 08bb 2601 lrs $AC0.M, @0x0001 - 08bc b100 tst $ACC0 - 08bd 0294 095b jnz 0x095b - 08bf 2232 lrs $AX0.H, @0x0032 - 08c0 c900 cmpar $ACC0, $AX1.H - 08c1 0293 0884 jle 0x0884 - 08c3 5500 subr $ACC1, $AX0.H - 08c4 02bf 086f call 0x086f - 08c6 223a lrs $AX0.H, @0x003a - 08c7 8600 tstaxh $AX0.H - 08c8 0294 08cf jnz 0x08cf - 08ca 8100 clr $ACC0 - 08cb 263b lrs $AC0.M, @0x003b - 08cc 8200 cmp - 08cd 0291 0921 jl 0x0921 - 08cf 8100 clr $ACC0 - 08d0 1fdf mrr $AC0.M, $AC1.M - 08d1 040f addis $ACC0, #0x0f - 08d2 147c lsr $ACC0, #-4 - 08d3 1f7e mrr $AX1.H, $AC0.M - 08d4 0c00 lris $AC0.L, #0x00 - 08d5 1404 lsl $ACC0, #4 - 08d6 1f1e mrr $AX0.L, $AC0.M - 08d7 0a00 lris $AX0.H, #0x00 - 08d8 8100 clr $ACC0 - 08d9 263a lrs $AC0.M, @0x003a - 08da 243b lrs $AC0.L, @0x003b - 08db 5800 subax $ACC0, $AX0.L - 08dc 0290 08e7 jge 0x08e7 - 08de 8100 clr $ACC0 - 08df 263b lrs $AC0.M, @0x003b - 08e0 5c00 sub $ACC0, $ACC1 - 08e1 2e32 srs @0x0032, $AC0.M - 08e2 8100 clr $ACC0 - 08e3 2e3a srs @0x003a, $AC0.M - 08e4 2e3b srs @0x003b, $AC0.M - 08e5 029f 08ed jmp 0x08ed - 08e7 2e3a srs @0x003a, $AC0.M - 08e8 2c3b srs @0x003b, $AC0.L - 08e9 0c00 lris $AC0.L, #0x00 - 08ea 1fd8 mrr $AC0.M, $AX0.L - 08eb 5c00 sub $ACC0, $ACC1 - 08ec 2e32 srs @0x0032, $AC0.M - 08ed 8100 clr $ACC0 - 08ee 1fdb mrr $AC0.M, $AX1.H - 08ef 02bf 0961 call 0x0961 - 08f1 2232 lrs $AX0.H, @0x0032 - 08f2 8600 tstaxh $AX0.H - 08f3 0295 091e jz 0x091e - 08f5 0a10 lris $AX0.H, #0x10 - 08f6 8100 clr $ACC0 - 08f7 1fc3 mrr $AC0.M, $AR3 - 08f8 5400 subr $ACC0, $AX0.H - 08f9 1c7e mrr $AR3, $AC0.M - 08fa 0080 0458 lri $AR0, #0x0458 - 08fc 197e lrri $AC0.M, @$AR3 - 08fd 197a lrri $AX0.H, @$AR3 - 08fe 100e loopi #0x0e - 08ff 64a2 movr'sl $ACC0, $AX0.H : $AC0.M, $AX0.H - 0900 1b1e srri @$AR0, $AC0.M - 0901 1b1a srri @$AR0, $AX0.H - 0902 8100 clr $ACC0 - 0903 263a lrs $AC0.M, @0x003a - 0904 243b lrs $AC0.L, @0x003b - 0905 b100 tst $ACC0 - 0906 0294 091e jnz 0x091e - 0908 2232 lrs $AX0.H, @0x0032 - 0909 8600 tstaxh $AX0.H - 090a 0295 091e jz 0x091e - 090c 0080 0467 lri $AR0, #0x0467 - 090e 8100 clr $ACC0 - 090f 268b lrs $AC0.M, @0xff8b - 0910 b100 tst $ACC0 - 0911 0295 091e jz 0x091e - 0913 0200 000f addi $AC0.M, #0x000f - 0915 0240 000f andi $AC0.M, #0x000f - 0917 0200 0458 addi $AC0.M, #0x0458 - 0919 1c7e mrr $AR3, $AC0.M - 091a 007a 091d bloop $AX0.H, 0x091d - 091c 18fe lrrd $AC0.M, @$AR3 - 091d 1a9e srrd @$AR0, $AC0.M - 091e 0092 00ff lri $CR, #0x00ff - 0920 02df ret - 0921 b100 tst $ACC0 - 0922 0295 0931 jz 0x0931 - 0924 5d00 sub $ACC1, $ACC0 - 0925 040f addis $ACC0, #0x0f - 0926 147c lsr $ACC0, #-4 - 0927 0c00 lris $AC0.L, #0x00 - 0928 00e3 0363 sr @0x0363, $AR3 - 092a 02bf 0961 call 0x0961 - 092c 00de 0363 lr $AC0.M, @0x0363 - 092e 223b lrs $AX0.H, @0x003b - 092f 4400 addr $ACC0, $AX0.H - 0930 1c7e mrr $AR3, $AC0.M - 0931 8100 clr $ACC0 - 0932 2681 lrs $AC0.M, @0xff81 - 0933 b100 tst $ACC0 - 0934 0295 0959 jz 0x0959 - 0936 2380 lrs $AX1.H, @0xff80 - 0937 2688 lrs $AC0.M, @0xff88 - 0938 2489 lrs $AC0.L, @0xff89 - 0939 1408 lsl $ACC0, #8 - 093a 14f4 asr $ACC0, #-12 - 093b 2380 lrs $AX1.H, @0xff80 - 093c 8d00 set15 - 093d c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - 093e ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 093f 8c00 clr15 - 0940 f000 lsl16 $ACC0 - 0941 4e00 addp $ACC0 - 0942 238c lrs $AX1.H, @0xff8c - 0943 218d lrs $AX1.L, @0xff8d - 0944 4a00 addax $ACC0, $AX1.L - 0945 2e38 srs @0x0038, $AC0.M - 0946 2c39 srs @0x0039, $AC0.L - 0947 2682 lrs $AC0.M, @0xff82 - 0948 2e67 srs @0x0067, $AC0.M - 0949 2683 lrs $AC0.M, @0xff83 - 094a 2e66 srs @0x0066, $AC0.M - 094b 00e3 0363 sr @0x0363, $AR3 - 094d 0083 0458 lri $AR3, #0x0458 - 094f 8100 clr $ACC0 - 0950 0e01 lris $AC0.M, #0x01 - 0951 02bf 0961 call 0x0961 - 0953 00c3 0363 lr $AR3, @0x0363 - 0955 02bf 089f call 0x089f - 0957 029f 08bf jmp 0x08bf - 0959 0e01 lris $AC0.M, #0x01 - 095a 2e01 srs @0x0001, $AC0.M - 095b 8100 clr $ACC0 - 095c 005f loop $AC1.M - 095d 1b7e srri @$AR3, $AC0.M - 095e 0092 00ff lri $CR, #0x00ff - 0960 02df ret - 0961 00ff 0360 sr @0x0360, $AC1.M - 0963 00fe 0361 sr @0x0361, $AC0.M - 0965 2638 lrs $AC0.M, @0x0038 - 0966 2439 lrs $AC0.L, @0x0039 - 0967 0f05 lris $AC1.M, #0x05 - 0968 02bf 06a4 call 0x06a4 - 096a 2638 lrs $AC0.M, @0x0038 - 096b 2439 lrs $AC0.L, @0x0039 - 096c 8900 clr $ACC1 - 096d 00df 0361 lr $AC1.M, @0x0361 - 096f 2280 lrs $AX0.H, @0xff80 - 0970 d000 mulc $AC1.M, $AX0.H - 0971 6f00 movp $ACC1 - 0972 4c00 add $ACC0, $ACC1 - 0973 2e38 srs @0x0038, $AC0.M - 0974 2c39 srs @0x0039, $AC0.L - 0975 8100 clr $ACC0 - 0976 00de 0361 lr $AC0.M, @0x0361 - 0978 007e 09df bloop $AC0.M, 0x09df - 097a 0080 ffd3 lri $AR0, #0xffd3 - 097c 0084 0000 lri $IX0, #0x0000 - 097e 199e lrrn $AC0.M, @$AR0 - 097f 8900 clr $ACC1 - 0980 1ffe mrr $AC1.M, $AC0.M - 0981 1401 lsl $ACC0, #1 - 0982 0240 001e andi $AC0.M, #0x001e - 0984 0200 0300 addi $AC0.M, #0x0300 - 0986 1c3e mrr $AR1, $AC0.M - 0987 157c lsr $ACC1, #-4 - 0988 0340 000f andi $AC1.M, #0x000f - 098a 0a11 lris $AX0.H, #0x11 - 098b 5500 subr $ACC1, $AX0.H - 098c 8100 clr $ACC0 - 098d 2680 lrs $AC0.M, @0xff80 - 098e 0605 cmpis $ACC0, #0x05 - 098f 0295 09a8 jz 0x09a8 - 0991 009a 00f0 lri $AX0.H, #0x00f0 - 0993 0b0f lris $AX1.H, #0x0f - 0994 0082 0364 lri $AR2, #0x0364 - 0996 1998 lrrn $AX0.L, @$AR0 - 0997 6000 movr $ACC0, $AX0.L - 0998 1107 099f bloopi #0x07, 0x099f - 099a 3400 andr $AC0.M, $AX0.H - 099b 1408 lsl $ACC0, #8 - 099c 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 099d 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 099e 140c lsl $ACC0, #12 - 099f 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09a0 3400 andr $AC0.M, $AX0.H - 09a1 1408 lsl $ACC0, #8 - 09a2 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09a3 3600 andr $AC0.M, $AX1.H - 09a4 140c lsl $ACC0, #12 - 09a5 1b5e srri @$AR2, $AC0.M - 09a6 029f 09c8 jmp 0x09c8 - 09a8 009a c000 lri $AX0.H, #0xc000 - 09aa 0082 0364 lri $AR2, #0x0364 - 09ac 1998 lrrn $AX0.L, @$AR0 - 09ad 6000 movr $ACC0, $AX0.L - 09ae 1103 09bb bloopi #0x03, 0x09bb - 09b0 1408 lsl $ACC0, #8 - 09b1 3400 andr $AC0.M, $AX0.H - 09b2 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b3 140a lsl $ACC0, #10 - 09b4 3400 andr $AC0.M, $AX0.H - 09b5 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b6 140c lsl $ACC0, #12 - 09b7 3400 andr $AC0.M, $AX0.H - 09b8 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b9 140e lsl $ACC0, #14 - 09ba 3444 andr'ln $AC0.M, $AX0.H : $AX0.L, @$AR0 - 09bb 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09bc 1408 lsl $ACC0, #8 - 09bd 3400 andr $AC0.M, $AX0.H - 09be 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09bf 140a lsl $ACC0, #10 - 09c0 3400 andr $AC0.M, $AX0.H - 09c1 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09c2 140c lsl $ACC0, #12 - 09c3 3400 andr $AC0.M, $AX0.H - 09c4 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09c5 140e lsl $ACC0, #14 - 09c6 3400 andr $AC0.M, $AX0.H - 09c7 1b5e srri @$AR2, $AC0.M - 09c8 8f00 set40 - 09c9 1f7f mrr $AX1.H, $AC1.M - 09ca 2066 lrs $AX0.L, @0x0066 - 09cb 2767 lrs $AC1.M, @0x0067 - 09cc 193a lrri $AX0.H, @$AR1 - 09cd 1939 lrri $AX1.L, @$AR1 - 09ce 0080 0364 lri $AR0, #0x0364 - 09d0 a000 mulx $AX0.L, $AX1.L - 09d1 ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - 09d2 1108 09db bloopi #0x08, 0x09db - 09d4 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 09d5 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 09d6 1485 asl $ACC0, #5 - 09d7 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 09d8 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 09d9 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 09da 1585 asl $ACC1, #5 - 09db ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - 09dc 2f67 srs @0x0067, $AC1.M - 09dd 8e00 set16 - 09de 1ff8 mrr $AC1.M, $AX0.L - 09df 2f66 srs @0x0066, $AC1.M - 09e0 8900 clr $ACC1 - 09e1 00df 0360 lr $AC1.M, @0x0360 - 09e3 02df ret - 09e4 b100 tst $ACC0 - 09e5 02d5 retz - 09e6 04fe addis $ACC0, #0xfe - 09e7 1f1e mrr $AX0.L, $AC0.M - 09e8 191e lrri $AC0.M, @$AR0 - 09e9 0291 09ef jl 0x09ef - 09eb 191a lrri $AX0.H, @$AR0 - 09ec 0058 loop $AX0.L - 09ed 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 09ee 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 09ef 1b7e srri @$AR3, $AC0.M - 09f0 02df ret - 09f1 8100 clr $ACC0 - 09f2 1f5e mrr $AX0.H, $AC0.M - 09f3 00d8 0402 lr $AX0.L, @0x0402 - 09f5 00dc 0430 lr $AC0.L, @0x0430 - 09f7 0080 0520 lri $AR0, #0x0520 - 09f9 00df 0480 lr $AC1.M, @0x0480 - 09fb 1501 lsl $ACC1, #1 - 09fc 0340 007e andi $AC1.M, #0x007e - 09fe 0300 0a06 addi $AC1.M, #0x0a06 - 0a00 1c5f mrr $AR2, $AC1.M - 0a01 175f callr $AR2 - 0a02 00fc 0430 sr @0x0430, $AC0.L - 0a04 029f 0386 jmp 0x0386 - 0a06 029f 0a27 jmp 0x0a27 - 0a08 029f 0a62 jmp 0x0a62 - 0a0a 029f 0a4a jmp 0x0a4a - 0a0c 029f 0a37 jmp 0x0a37 - 0a0e 029f 0a70 jmp 0x0a70 - 0a10 029f 0a26 jmp 0x0a26 - 0a12 029f 0a8e jmp 0x0a8e - 0a14 029f 0a91 jmp 0x0a91 - 0a16 029f 0a26 jmp 0x0a26 - 0a18 029f 0a26 jmp 0x0a26 - 0a1a 029f 0aaf jmp 0x0aaf - 0a1c 029f 0a68 jmp 0x0a68 - 0a1e 029f 0a6c jmp 0x0a6c - 0a20 029f 0a26 jmp 0x0a26 - 0a22 029f 0a26 jmp 0x0a26 - 0a24 029f 0a26 jmp 0x0a26 - 0a26 02df ret - 0a27 1401 lsl $ACC0, #1 - 0a28 009b c000 lri $AX1.H, #0xc000 - 0a2a 0099 4000 lri $AX1.L, #0x4000 - 0a2c 1150 0a34 bloopi #0x50, 0x0a34 - 0a2e 02c0 0001 andcf $AC0.M, #0x0001 - 0a30 027c iflnz - 0a31 1b1b srri @$AR0, $AX1.H - 0a32 027d iflz - 0a33 1b19 srri @$AR0, $AX1.L - 0a34 4800 addax $ACC0, $AX0.L - 0a35 147f lsr $ACC0, #-1 - 0a36 02df ret - 0a37 1402 lsl $ACC0, #2 - 0a38 8900 clr $ACC1 - 0a39 1fb8 mrr $AC1.L, $AX0.L - 0a3a 1501 lsl $ACC1, #1 - 0a3b 009b c000 lri $AX1.H, #0xc000 - 0a3d 0099 4000 lri $AX1.L, #0x4000 - 0a3f 1150 0a47 bloopi #0x50, 0x0a47 - 0a41 02c0 0003 andcf $AC0.M, #0x0003 - 0a43 027c iflnz - 0a44 1b1b srri @$AR0, $AX1.H - 0a45 027d iflz - 0a46 1b19 srri @$AR0, $AX1.L - 0a47 4c00 add $ACC0, $ACC1 - 0a48 147e lsr $ACC0, #-2 - 0a49 02df ret - 0a4a 1401 lsl $ACC0, #1 - 0a4b 0081 0ca0 lri $AR1, #0x0ca0 - 0a4d 009b c000 lri $AX1.H, #0xc000 - 0a4f 0099 4000 lri $AX1.L, #0x4000 - 0a51 8900 clr $ACC1 - 0a52 0082 0000 lri $AR2, #0x0000 - 0a54 1150 0a5f bloopi #0x50, 0x0a5f - 0a56 02c0 0001 andcf $AC0.M, #0x0001 - 0a58 027c iflnz - 0a59 1b1b srri @$AR0, $AX1.H - 0a5a 027d iflz - 0a5b 1b19 srri @$AR0, $AX1.L - 0a5c 183d lrr $AC1.L, @$AR1 - 0a5d 4900 addax $ACC1, $AX0.L - 0a5e 1fe2 mrr $AC1.M, $AR2 - 0a5f 4c39 add's $ACC0, $ACC1 : @$AR1, $AC1.M - 0a60 147f lsr $ACC0, #-1 - 0a61 02df ret - 0a62 8900 clr $ACC1 - 0a63 1fb8 mrr $AC1.L, $AX0.L - 0a64 157f lsr $ACC1, #-1 - 0a65 1050 loopi #0x50 - 0a66 4c20 add's $ACC0, $ACC1 : @$AR0, $AC0.L - 0a67 02df ret - 0a68 0082 0180 lri $AR2, #0x0180 - 0a6a 029f 0a72 jmp 0x0a72 - 0a6c 0082 01c0 lri $AR2, #0x01c0 - 0a6e 029f 0a72 jmp 0x0a72 - 0a70 0082 0140 lri $AR2, #0x0140 - 0a72 008a 003f lri $WR2, #0x003f - 0a74 0086 0000 lri $IX2, #0x0000 - 0a76 1406 lsl $ACC0, #6 - 0a77 8900 clr $ACC1 - 0a78 1fb8 mrr $AC1.L, $AX0.L - 0a79 1505 lsl $ACC1, #5 - 0a7a 009b 003f lri $AX1.H, #0x003f - 0a7c 009a 0000 lri $AX0.H, #0x0000 - 0a7e 3600 andr $AC0.M, $AX1.H - 0a7f 1cde mrr $IX2, $AC0.M - 0a80 001a addarn $AR2, $IX2 - 0a81 3400 andr $AC0.M, $AX0.H - 0a82 1150 0a88 bloopi #0x50, 0x0a88 - 0a84 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a85 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a86 1cde mrr $IX2, $AC0.M - 0a87 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a88 1b19 srri @$AR0, $AX1.L - 0a89 1fc2 mrr $AC0.M, $AR2 - 0a8a 147a lsr $ACC0, #-6 - 0a8b 008a ffff lri $WR2, #0xffff - 0a8d 02df ret - 0a8e 1050 loopi #0x50 - 0a8f 1b18 srri @$AR0, $AX0.L - 0a90 02df ret - 0a91 0082 0100 lri $AR2, #0x0100 - 0a93 008a 003f lri $WR2, #0x003f - 0a95 0086 0000 lri $IX2, #0x0000 - 0a97 1406 lsl $ACC0, #6 - 0a98 8900 clr $ACC1 - 0a99 1fb8 mrr $AC1.L, $AX0.L - 0a9a 1505 lsl $ACC1, #5 - 0a9b 009b 003f lri $AX1.H, #0x003f - 0a9d 009a 0000 lri $AX0.H, #0x0000 - 0a9f 3600 andr $AC0.M, $AX1.H - 0aa0 1cde mrr $IX2, $AC0.M - 0aa1 001a addarn $AR2, $IX2 - 0aa2 3400 andr $AC0.M, $AX0.H - 0aa3 1150 0aa9 bloopi #0x50, 0x0aa9 - 0aa5 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0aa6 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0aa7 1cde mrr $IX2, $AC0.M - 0aa8 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0aa9 1b19 srri @$AR0, $AX1.L - 0aaa 1fc2 mrr $AC0.M, $AR2 - 0aab 147a lsr $ACC0, #-6 - 0aac 008a ffff lri $WR2, #0xffff - 0aae 02df ret - 0aaf 0082 0100 lri $AR2, #0x0100 - 0ab1 008a 003f lri $WR2, #0x003f - 0ab3 0086 0000 lri $IX2, #0x0000 - 0ab5 0081 0ca0 lri $AR1, #0x0ca0 - 0ab7 1406 lsl $ACC0, #6 - 0ab8 8900 clr $ACC1 - 0ab9 1fb8 mrr $AC1.L, $AX0.L - 0aba 1505 lsl $ACC1, #5 - 0abb 009b 003f lri $AX1.H, #0x003f - 0abd 009a 0000 lri $AX0.H, #0x0000 - 0abf 3600 andr $AC0.M, $AX1.H - 0ac0 1cde mrr $IX2, $AC0.M - 0ac1 001a addarn $AR2, $IX2 - 0ac2 3400 andr $AC0.M, $AX0.H - 0ac3 1150 0ace bloopi #0x50, 0x0ace - 0ac5 1939 lrri $AX1.L, @$AR1 - 0ac6 a000 mulx $AX0.L, $AX1.L - 0ac7 140a lsl $ACC0, #10 - 0ac8 4e00 addp $ACC0 - 0ac9 1476 lsr $ACC0, #-10 - 0aca 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0acb 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0acc 1cde mrr $IX2, $AC0.M - 0acd 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0ace 1b19 srri @$AR0, $AX1.L - 0acf 1fc2 mrr $AC0.M, $AR2 - 0ad0 147a lsr $ACC0, #-6 - 0ad1 008a ffff lri $WR2, #0xffff - 0ad3 02df ret - 0ad4 0080 01be lri $AR0, #0x01be - 0ad6 1918 lrri $AX0.L, @$AR0 - 0ad7 191a lrri $AX0.H, @$AR0 - 0ad8 0080 0180 lri $AR0, #0x0180 - 0ada 0083 0180 lri $AR3, #0x0180 - 0adc 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0add 1ffe mrr $AC1.M, $AC0.M - 0ade 1120 0ae5 bloopi #0x20, 0x0ae5 - 0ae0 7c00 neg $ACC0 - 0ae1 d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0ae2 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0ae3 c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 0ae4 1501 lsl $ACC1, #1 - 0ae5 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - 0ae6 0080 01fe lri $AR0, #0x01fe - 0ae8 191a lrri $AX0.H, @$AR0 - 0ae9 1918 lrri $AX0.L, @$AR0 - 0aea 0080 01c0 lri $AR0, #0x01c0 - 0aec 0083 01c0 lri $AR3, #0x01c0 - 0aee 1ff8 mrr $AC1.M, $AX0.L - 0aef 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0af0 f800 addpaxz $ACC0, $AX0.H - 0af1 0240 01ff andi $AC0.M, #0x01ff - 0af3 0260 2000 ori $AC0.M, #0x2000 - 0af5 02bf 0af8 call 0x0af8 - 0af7 02df ret - 0af8 b900 tst $ACC1 - 0af9 0272 ifg - 0afa 7c00 neg $ACC0 - 0afb 1f7e mrr $AX1.H, $AC0.M - 0afc 4700 addr $ACC1, $AX1.H - 0afd 1110 0b02 bloopi #0x10, 0x0b02 - 0aff 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0b00 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0b01 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0b02 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0b03 02df ret - 0b04 02bf 0b71 call 0x0b71 - 0b06 2201 lrs $AX0.H, @0x0001 - 0b07 8600 tstaxh $AX0.H - 0b08 0294 0b19 jnz 0x0b19 - 0b0a 2204 lrs $AX0.H, @0x0004 - 0b0b 8600 tstaxh $AX0.H - 0b0c 02b4 0b60 callnz 0x0b60 - 0b0e 8100 clr $ACC0 - 0b0f 2605 lrs $AC0.M, @0x0005 - 0b10 b100 tst $ACC0 - 0b11 0295 0b26 jz 0x0b26 - 0b13 8100 clr $ACC0 - 0b14 2e05 srs @0x0005, $AC0.M - 0b15 2281 lrs $AX0.H, @0xff81 - 0b16 8600 tstaxh $AX0.H - 0b17 0294 0b20 jnz 0x0b20 - 0b19 8100 clr $ACC0 - 0b1a 005f loop $AC1.M - 0b1b 1b7e srri @$AR3, $AC0.M - 0b1c 7400 incm $AC0.M - 0b1d 2e01 srs @0x0001, $AC0.M - 0b1e 029f 0b59 jmp 0x0b59 - 0b20 2688 lrs $AC0.M, @0xff88 - 0b21 2489 lrs $AC0.L, @0xff89 - 0b22 2e34 srs @0x0034, $AC0.M - 0b23 2c35 srs @0x0035, $AC0.L - 0b24 02bf 0b60 call 0x0b60 - 0b26 00ff 0360 sr @0x0360, $AC1.M - 0b28 2638 lrs $AC0.M, @0x0038 - 0b29 2439 lrs $AC0.L, @0x0039 - 0b2a 02bf 06d2 call 0x06d2 - 0b2c 00df 0360 lr $AC1.M, @0x0360 - 0b2e 8100 clr $ACC0 - 0b2f 263a lrs $AC0.M, @0x003a - 0b30 b100 tst $ACC0 - 0b31 0294 0b40 jnz 0x0b40 - 0b33 263b lrs $AC0.M, @0x003b - 0b34 5c00 sub $ACC0, $ACC1 - 0b35 0290 0b40 jge 0x0b40 - 0b37 223b lrs $AX0.H, @0x003b - 0b38 02bf 06ef call 0x06ef - 0b3a 5500 subr $ACC1, $AX0.H - 0b3b 0a01 lris $AX0.H, #0x01 - 0b3c 00fa 0405 sr @0x0405, $AX0.H - 0b3e 029f 0b13 jmp 0x0b13 - 0b40 1f5f mrr $AX0.H, $AC1.M - 0b41 02bf 06ef call 0x06ef - 0b43 00fa 0362 sr @0x0362, $AX0.H - 0b45 8100 clr $ACC0 - 0b46 263a lrs $AC0.M, @0x003a - 0b47 243b lrs $AC0.L, @0x003b - 0b48 1570 lsr $ACC1, #-16 - 0b49 0a01 lris $AX0.H, #0x01 - 0b4a 0081 0405 lri $AR1, #0x0405 - 0b4c 5c00 sub $ACC0, $ACC1 - 0b4d b100 tst $ACC0 - 0b4e 0275 ifz - 0b4f 1a3a srr @$AR1, $AX0.H - 0b50 2e3a srs @0x003a, $AC0.M - 0b51 2c3b srs @0x003b, $AC0.L - 0b52 2638 lrs $AC0.M, @0x0038 - 0b53 2439 lrs $AC0.L, @0x0039 - 0b54 00d8 0362 lr $AX0.L, @0x0362 - 0b56 7000 addaxl $ACC0, $AX0.L - 0b57 2c39 srs @0x0039, $AC0.L - 0b58 2e38 srs @0x0038, $AC0.M - 0b59 0092 00ff lri $CR, #0x00ff - 0b5b 029f 037e jmp 0x037e - 0b5d 8100 clr $ACC0 - 0b5e 2e34 srs @0x0034, $AC0.M - 0b5f 2e35 srs @0x0035, $AC0.M - 0b60 2334 lrs $AX1.H, @0x0034 - 0b61 2135 lrs $AX1.L, @0x0035 - 0b62 268a lrs $AC0.M, @0xff8a - 0b63 248b lrs $AC0.L, @0xff8b - 0b64 5a00 subax $ACC0, $AX1.L - 0b65 2e3a srs @0x003a, $AC0.M - 0b66 2c3b srs @0x003b, $AC0.L - 0b67 2634 lrs $AC0.M, @0x0034 - 0b68 2435 lrs $AC0.L, @0x0035 - 0b69 238c lrs $AX1.H, @0xff8c - 0b6a 218d lrs $AX1.L, @0xff8d - 0b6b 4a00 addax $ACC0, $AX1.L - 0b6c 2e38 srs @0x0038, $AC0.M - 0b6d 2c39 srs @0x0039, $AC0.L - 0b6e 8100 clr $ACC0 - 0b6f 2e05 srs @0x0005, $AC0.M - 0b70 02df ret - 0b71 0092 0004 lri $CR, #0x0004 - 0b73 2002 lrs $AX0.L, @0x0002 - 0b74 8100 clr $ACC0 - 0b75 8900 clr $ACC1 - 0b76 2430 lrs $AC0.L, @0x0030 - 0b77 8d00 set15 - 0b78 0950 lris $AX1.L, #0x50 - 0b79 a000 mulx $AX0.L, $AX1.L - 0b7a a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0b7b 1404 lsl $ACC0, #4 - 0b7c 8c00 clr15 - 0b7d 1ffe mrr $AC1.M, $AC0.M - 0b7e 0083 0580 lri $AR3, #0x0580 - 0b80 02df ret - 0b81 02bf 0b71 call 0x0b71 - 0b83 2201 lrs $AX0.H, @0x0001 - 0b84 8600 tstaxh $AX0.H - 0b85 0294 0b96 jnz 0x0b96 - 0b87 2204 lrs $AX0.H, @0x0004 - 0b88 8600 tstaxh $AX0.H - 0b89 02b4 0be0 callnz 0x0be0 - 0b8b 8100 clr $ACC0 - 0b8c 2605 lrs $AC0.M, @0x0005 - 0b8d b100 tst $ACC0 - 0b8e 0295 0ba3 jz 0x0ba3 - 0b90 8100 clr $ACC0 - 0b91 2e05 srs @0x0005, $AC0.M - 0b92 2281 lrs $AX0.H, @0xff81 - 0b93 8600 tstaxh $AX0.H - 0b94 0294 0b9d jnz 0x0b9d - 0b96 8100 clr $ACC0 - 0b97 005f loop $AC1.M - 0b98 1b7e srri @$AR3, $AC0.M - 0b99 7400 incm $AC0.M - 0b9a 2e01 srs @0x0001, $AC0.M - 0b9b 029f 0bd9 jmp 0x0bd9 - 0b9d 2688 lrs $AC0.M, @0xff88 - 0b9e 2489 lrs $AC0.L, @0xff89 - 0b9f 2e34 srs @0x0034, $AC0.M - 0ba0 2c35 srs @0x0035, $AC0.L - 0ba1 02bf 0be0 call 0x0be0 - 0ba3 00ff 0360 sr @0x0360, $AC1.M - 0ba5 2638 lrs $AC0.M, @0x0038 - 0ba6 2439 lrs $AC0.L, @0x0039 - 0ba7 02bf 06d2 call 0x06d2 - 0ba9 02bf 06e9 call 0x06e9 - 0bab 00df 0360 lr $AC1.M, @0x0360 - 0bad 8100 clr $ACC0 - 0bae 263a lrs $AC0.M, @0x003a - 0baf b100 tst $ACC0 - 0bb0 0294 0bbf jnz 0x0bbf - 0bb2 263b lrs $AC0.M, @0x003b - 0bb3 5c00 sub $ACC0, $ACC1 - 0bb4 0290 0bbf jge 0x0bbf - 0bb6 223b lrs $AX0.H, @0x003b - 0bb7 02bf 06b4 call 0x06b4 - 0bb9 5500 subr $ACC1, $AX0.H - 0bba 0a01 lris $AX0.H, #0x01 - 0bbb 00fa 0405 sr @0x0405, $AX0.H - 0bbd 029f 0b90 jmp 0x0b90 - 0bbf 1f5f mrr $AX0.H, $AC1.M - 0bc0 02bf 06b4 call 0x06b4 - 0bc2 00fa 0362 sr @0x0362, $AX0.H - 0bc4 8100 clr $ACC0 - 0bc5 263a lrs $AC0.M, @0x003a - 0bc6 243b lrs $AC0.L, @0x003b - 0bc7 1570 lsr $ACC1, #-16 - 0bc8 0a01 lris $AX0.H, #0x01 - 0bc9 0081 0405 lri $AR1, #0x0405 - 0bcb 5c00 sub $ACC0, $ACC1 - 0bcc b100 tst $ACC0 - 0bcd 0275 ifz - 0bce 1a3a srr @$AR1, $AX0.H - 0bcf 2e3a srs @0x003a, $AC0.M - 0bd0 2c3b srs @0x003b, $AC0.L - 0bd1 2638 lrs $AC0.M, @0x0038 - 0bd2 2439 lrs $AC0.L, @0x0039 - 0bd3 00d8 0362 lr $AX0.L, @0x0362 - 0bd5 7000 addaxl $ACC0, $AX0.L - 0bd6 7000 addaxl $ACC0, $AX0.L - 0bd7 2c39 srs @0x0039, $AC0.L - 0bd8 2e38 srs @0x0038, $AC0.M - 0bd9 0092 00ff lri $CR, #0x00ff - 0bdb 029f 037e jmp 0x037e - 0bdd 8100 clr $ACC0 - 0bde 2e34 srs @0x0034, $AC0.M - 0bdf 2e35 srs @0x0035, $AC0.M - 0be0 2334 lrs $AX1.H, @0x0034 - 0be1 2135 lrs $AX1.L, @0x0035 - 0be2 268a lrs $AC0.M, @0xff8a - 0be3 248b lrs $AC0.L, @0xff8b - 0be4 5a00 subax $ACC0, $AX1.L - 0be5 2e3a srs @0x003a, $AC0.M - 0be6 2c3b srs @0x003b, $AC0.L - 0be7 2634 lrs $AC0.M, @0x0034 - 0be8 2435 lrs $AC0.L, @0x0035 - 0be9 1401 lsl $ACC0, #1 - 0bea 238c lrs $AX1.H, @0xff8c - 0beb 218d lrs $AX1.L, @0xff8d - 0bec 4a00 addax $ACC0, $AX1.L - 0bed 2e38 srs @0x0038, $AC0.M - 0bee 2c39 srs @0x0039, $AC0.L - 0bef 8100 clr $ACC0 - 0bf0 2e05 srs @0x0005, $AC0.M - 0bf1 02df ret - 0bf2 8900 clr $ACC1 - 0bf3 0f50 lris $AC1.M, #0x50 - 0bf4 0083 0520 lri $AR3, #0x0520 - 0bf6 02bf 0c0b call 0x0c0b - 0bf8 029f 0386 jmp 0x0386 - 0bfa 00d8 0402 lr $AX0.L, @0x0402 - 0bfc 8100 clr $ACC0 - 0bfd 8900 clr $ACC1 - 0bfe 00dc 0430 lr $AC0.L, @0x0430 - 0c00 0a50 lris $AX0.H, #0x50 - 0c01 9000 mul $AX0.L, $AX0.H - 0c02 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0c03 1404 lsl $ACC0, #4 - 0c04 1ffe mrr $AC1.M, $AC0.M - 0c05 0083 0580 lri $AR3, #0x0580 - 0c07 02bf 0c0b call 0x0c0b - 0c09 029f 037e jmp 0x037e - 0c0b 0092 0004 lri $CR, #0x0004 - 0c0d 8100 clr $ACC0 - 0c0e 263a lrs $AC0.M, @0x003a - 0c0f 243b lrs $AC0.L, @0x003b - 0c10 1f1f mrr $AX0.L, $AC1.M - 0c11 0a00 lris $AX0.H, #0x00 - 0c12 5800 subax $ACC0, $AX0.L - 0c13 0292 0c29 jg 0x0c29 - 0c15 8900 clr $ACC1 - 0c16 00c0 043b lr $AR0, @0x043b - 0c18 02bf 0c4e call 0x0c4e - 0c1a 8100 clr $ACC0 - 0c1b 1fd8 mrr $AC0.M, $AX0.L - 0c1c 223b lrs $AX0.H, @0x003b - 0c1d 5400 subr $ACC0, $AX0.H - 0c1e 0007 dar $AR3 - 0c1f 1979 lrri $AX1.L, @$AR3 - 0c20 005e loop $AC0.M - 0c21 1b79 srri @$AR3, $AX1.L - 0c22 0f01 lris $AC1.M, #0x01 - 0c23 2f01 srs @0x0001, $AC1.M - 0c24 8900 clr $ACC1 - 0c25 2f3b srs @0x003b, $AC1.M - 0c26 0092 00ff lri $CR, #0x00ff - 0c28 02df ret - 0c29 2e3a srs @0x003a, $AC0.M - 0c2a 2c3b srs @0x003b, $AC0.L - 0c2b 8100 clr $ACC0 - 0c2c 8900 clr $ACC1 - 0c2d 268a lrs $AC0.M, @0xff8a - 0c2e 2734 lrs $AC1.M, @0x0034 - 0c2f 5c00 sub $ACC0, $ACC1 - 0c30 2e36 srs @0x0036, $AC0.M - 0c31 5000 subr $ACC0, $AX0.L - 0c32 0290 0c48 jge 0x0c48 - 0c34 00c0 0436 lr $AR0, @0x0436 - 0c36 02bf 0c4e call 0x0c4e - 0c38 8100 clr $ACC0 - 0c39 1fd8 mrr $AC0.M, $AX0.L - 0c3a 2236 lrs $AX0.H, @0x0036 - 0c3b 5400 subr $ACC0, $AX0.H - 0c3c 1c1e mrr $AR0, $AC0.M - 0c3d 8100 clr $ACC0 - 0c3e 2e34 srs @0x0034, $AC0.M - 0c3f 2688 lrs $AC0.M, @0xff88 - 0c40 2489 lrs $AC0.L, @0xff89 - 0c41 2e8c srs @0xff8c, $AC0.M - 0c42 2c8d srs @0xff8d, $AC0.L - 0c43 02bf 0c4e call 0x0c4e - 0c45 0092 00ff lri $CR, #0x00ff - 0c47 02df ret - 0c48 1c18 mrr $AR0, $AX0.L - 0c49 02bf 0c4e call 0x0c4e - 0c4b 0092 00ff lri $CR, #0x00ff - 0c4d 02df ret - 0c4e 8100 clr $ACC0 - 0c4f 1fc0 mrr $AC0.M, $AR0 - 0c50 b100 tst $ACC0 - 0c51 02d5 retz - 0c52 8900 clr $ACC1 - 0c53 2734 lrs $AC1.M, @0x0034 - 0c54 0340 0001 andi $AC1.M, #0x0001 - 0c56 0b00 lris $AX1.H, #0x00 - 0c57 1f3f mrr $AX1.L, $AC1.M - 0c58 268c lrs $AC0.M, @0xff8c - 0c59 248d lrs $AC0.L, @0xff8d - 0c5a 8900 clr $ACC1 - 0c5b 2534 lrs $AC1.L, @0x0034 - 0c5c 1501 lsl $ACC1, #1 - 0c5d 4c00 add $ACC0, $ACC1 - 0c5e 5a00 subax $ACC0, $AX1.L - 0c5f 5a00 subax $ACC0, $AX1.L - 0c60 1c20 mrr $AR1, $AR0 - 0c61 1fe0 mrr $AC1.M, $AR0 - 0c62 0502 addis $ACC1, #0x02 - 0c63 1c1f mrr $AR0, $AC1.M - 0c64 009f 0b00 lri $AC1.M, #0x0b00 - 0c66 0092 00ff lri $CR, #0x00ff - 0c68 02bf 0649 call 0x0649 - 0c6a 0092 0004 lri $CR, #0x0004 - 0c6c 2734 lrs $AC1.M, @0x0034 - 0c6d 1f61 mrr $AX1.H, $AR1 - 0c6e 4700 addr $ACC1, $AX1.H - 0c6f 2f34 srs @0x0034, $AC1.M - 0c70 0080 0b00 lri $AR0, #0x0b00 - 0c72 8900 clr $ACC1 - 0c73 1ff9 mrr $AC1.M, $AX1.L - 0c74 b900 tst $ACC1 - 0c75 0274 ifnz - 0c76 0008 iar $AR0 - 0c77 8900 clr $ACC1 - 0c78 1fe1 mrr $AC1.M, $AR1 - 0c79 191e lrri $AC0.M, @$AR0 - 0c7a 0701 cmpis $ACC1, #0x01 - 0c7b 0293 0c84 jle 0x0c84 - 0c7d 191a lrri $AX0.H, @$AR0 - 0c7e 05fe addis $ACC1, #0xfe - 0c7f 005f loop $AC1.M - 0c80 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c81 1b7e srri @$AR3, $AC0.M - 0c82 1b7a srri @$AR3, $AX0.H - 0c83 02df ret - 0c84 1b7e srri @$AR3, $AC0.M - 0c85 02df ret - 0c86 0083 03e8 lri $AR3, #0x03e8 - 0c88 191e lrri $AC0.M, @$AR0 - 0c89 191a lrri $AX0.H, @$AR0 - 0c8a 1006 loopi #0x06 - 0c8b 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c8c 1b7e srri @$AR3, $AC0.M - 0c8d 1b7a srri @$AR3, $AX0.H - 0c8e 0080 03e8 lri $AR0, #0x03e8 - 0c90 8a00 m2 - 0c91 0088 0007 lri $WR0, #0x0007 - 0c93 1150 0ca0 bloopi #0x50, 0x0ca0 - 0c95 1c61 mrr $AR3, $AR1 - 0c96 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c97 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c98 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c99 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c9a f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c9b f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c9c f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c9d f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c9e f200 madd $AX0.L, $AX0.H - 0c9f fe00 movpz $ACC0 - 0ca0 1b3e srri @$AR1, $AC0.M - 0ca1 0088 ffff lri $WR0, #0xffff - 0ca3 8b00 m0 - 0ca4 02df ret - 0ca5 8a00 m2 - 0ca6 05fe addis $ACC1, #0xfe - 0ca7 0083 03e8 lri $AR3, #0x03e8 - 0ca9 191e lrri $AC0.M, @$AR0 - 0caa 191a lrri $AX0.H, @$AR0 - 0cab 005f loop $AC1.M - 0cac 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cad 1b7e srri @$AR3, $AC0.M - 0cae 1b7a srri @$AR3, $AX0.H - 0caf 0080 03e8 lri $AR0, #0x03e8 - 0cb1 0501 addis $ACC1, #0x01 - 0cb2 1d1f mrr $WR0, $AC1.M - 0cb3 1150 0cbb bloopi #0x50, 0x0cbb - 0cb5 1c61 mrr $AR3, $AR1 - 0cb6 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0cb7 005f loop $AC1.M - 0cb8 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0cb9 f200 madd $AX0.L, $AX0.H - 0cba fe00 movpz $ACC0 - 0cbb 1b3e srri @$AR1, $AC0.M - 0cbc 0088 ffff lri $WR0, #0xffff - 0cbe 8b00 m0 - 0cbf 02df ret - 0cc0 0083 03e8 lri $AR3, #0x03e8 - 0cc2 191e lrri $AC0.M, @$AR0 - 0cc3 191a lrri $AX0.H, @$AR0 - 0cc4 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cc5 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cc6 1b7e srri @$AR3, $AC0.M - 0cc7 1b7a srri @$AR3, $AX0.H - 0cc8 0080 03e8 lri $AR0, #0x03e8 - 0cca 0088 0003 lri $WR0, #0x0003 - 0ccc 0085 0000 lri $IX1, #0x0000 - 0cce 0087 0000 lri $IX3, #0x0000 - 0cd0 1fc2 mrr $AC0.M, $AR2 - 0cd1 195b lrri $AX1.H, @$AR2 - 0cd2 1959 lrri $AX1.L, @$AR2 - 0cd3 195f lrri $AC1.M, @$AR2 - 0cd4 195a lrri $AX0.H, @$AR2 - 0cd5 1c5e mrr $AR2, $AC0.M - 0cd6 1fda mrr $AC0.M, $AX0.H - 0cd7 1c61 mrr $AR3, $AR1 - 0cd8 8a00 m2 - 0cd9 8f00 set40 - 0cda 191a lrri $AX0.H, @$AR0 - 0cdb b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0cdc e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cdd ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0cde e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0cdf b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0ce0 1127 0ceb bloopi #0x27, 0x0ceb - 0ce2 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ce3 197e lrri $AC0.M, @$AR3 - 0ce4 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ce5 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0ce6 bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0ce7 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0ce8 197f lrri $AC1.M, @$AR3 - 0ce9 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0cea e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0ceb b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0cec e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ced 197e lrri $AC0.M, @$AR3 - 0cee e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0cef eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cf0 bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 0cf1 1bff srrn @$AR3, $AC1.M - 0cf2 197f lrri $AC1.M, @$AR3 - 0cf3 8e00 set16 - 0cf4 8b00 m0 - 0cf5 0088 ffff lri $WR0, #0xffff - 0cf7 1b5b srri @$AR2, $AX1.H - 0cf8 1b59 srri @$AR2, $AX1.L - 0cf9 1b5f srri @$AR2, $AC1.M - 0cfa 1b5e srri @$AR2, $AC0.M - 0cfb 02df ret - 0cfc 0083 03e8 lri $AR3, #0x03e8 - 0cfe 191e lrri $AC0.M, @$AR0 - 0cff 191a lrri $AX0.H, @$AR0 - 0d00 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0d01 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0d02 1b7e srri @$AR3, $AC0.M - 0d03 1b7a srri @$AR3, $AX0.H - 0d04 0080 03e8 lri $AR0, #0x03e8 - 0d06 0088 0003 lri $WR0, #0x0003 - 0d08 0085 0000 lri $IX1, #0x0000 - 0d0a 0087 0000 lri $IX3, #0x0000 - 0d0c 1fc2 mrr $AC0.M, $AR2 - 0d0d 195b lrri $AX1.H, @$AR2 - 0d0e 1959 lrri $AX1.L, @$AR2 - 0d0f 195f lrri $AC1.M, @$AR2 - 0d10 195a lrri $AX0.H, @$AR2 - 0d11 1c5e mrr $AR2, $AC0.M - 0d12 1fda mrr $AC0.M, $AX0.H - 0d13 1c61 mrr $AR3, $AR1 - 0d14 8a00 m2 - 0d15 8f00 set40 - 0d16 191a lrri $AX0.H, @$AR0 - 0d17 b800 mulx $AX0.H, $AX1.H - 0d18 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0d19 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d1a ea00 maddc $AC1.M, $AX1.L - 0d1b ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0d1c e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0d1d ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0d1e b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0d1f 1127 0d30 bloopi #0x27, 0x0d30 - 0d21 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d22 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0d23 197e lrri $AC0.M, @$AR3 - 0d24 e800 maddc $AC0.M, $AX1.L - 0d25 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0d26 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0d27 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0d28 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0d29 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0d2a e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0d2b 197f lrri $AC1.M, @$AR3 - 0d2c ea00 maddc $AC1.M, $AX1.L - 0d2d ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0d2e e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0d2f ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0d30 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0d31 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d32 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0d33 197e lrri $AC0.M, @$AR3 - 0d34 e800 maddc $AC0.M, $AX1.L - 0d35 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0d36 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0d37 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0d38 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0d39 1bff srrn @$AR3, $AC1.M - 0d3a 197f lrri $AC1.M, @$AR3 - 0d3b 8e00 set16 - 0d3c 8b00 m0 - 0d3d 0088 ffff lri $WR0, #0xffff - 0d3f 1b5b srri @$AR2, $AX1.H - 0d40 1b59 srri @$AR2, $AX1.L - 0d41 1b5f srri @$AR2, $AC1.M - 0d42 1b5e srri @$AR2, $AC0.M - 0d43 02df ret - 0d44 0eff lris $AC0.M, #0xff - 0d45 00fe 03f2 sr @0x03f2, $AC0.M - 0d47 8100 clr $ACC0 - 0d48 00fe 03f0 sr @0x03f0, $AC0.M - 0d4a 00fe 03f6 sr @0x03f6, $AC0.M - 0d4c 009e 0100 lri $AC0.M, #0x0100 - 0d4e 00fe 03f7 sr @0x03f7, $AC0.M - 0d50 00da 03f7 lr $AX0.H, @0x03f7 - 0d52 009e 8000 lri $AC0.M, #0x8000 - 0d54 5400 subr $ACC0, $AX0.H - 0d55 00fe 03f5 sr @0x03f5, $AC0.M - 0d57 0e30 lris $AC0.M, #0x30 - 0d58 00fe 03f3 sr @0x03f3, $AC0.M - 0d5a 0e10 lris $AC0.M, #0x10 - 0d5b 00fe 03f4 sr @0x03f4, $AC0.M - 0d5d 009e 0096 lri $AC0.M, #0x0096 - 0d5f 00fe 03f1 sr @0x03f1, $AC0.M - 0d61 02df ret - 0d62 0080 0a00 lri $AR0, #0x0a00 - 0d64 8100 clr $ACC0 - 0d65 00de 03f0 lr $AC0.M, @0x03f0 - 0d67 8900 clr $ACC1 - 0d68 b100 tst $ACC0 - 0d69 0275 ifz - 0d6a 0550 addis $ACC1, #0x50 - 0d6b 00ff 03f0 sr @0x03f0, $AC1.M - 0d6d 0200 0a60 addi $AC0.M, #0x0a60 - 0d6f 1c7e mrr $AR3, $AC0.M - 0d70 0f4e lris $AC1.M, #0x4e - 0d71 02bf 012b call 0x012b - 0d73 02df ret - 0d74 00de 03f1 lr $AC0.M, @0x03f1 - 0d76 0200 0a60 addi $AC0.M, #0x0a60 - 0d78 1c7e mrr $AR3, $AC0.M - 0d79 8100 clr $ACC0 - 0d7a 8900 clr $ACC1 - 0d7b 009f 00a0 lri $AC1.M, #0x00a0 - 0d7d 00de 03f1 lr $AC0.M, @0x03f1 - 0d7f 5d00 sub $ACC1, $ACC0 - 0d80 0e50 lris $AC0.M, #0x50 - 0d81 0750 cmpis $ACC1, #0x50 - 0d82 0270 ifge - 0d83 5d00 sub $ACC1, $ACC0 - 0d84 00da 03f2 lr $AX0.H, @0x03f2 - 0d86 8600 tstaxh $AX0.H - 0d87 0290 0da5 jge 0x0da5 - 0d89 00de 03f3 lr $AC0.M, @0x03f3 - 0d8b 5c00 sub $ACC0, $ACC1 - 0d8c 0293 0d90 jle 0x0d90 - 0d8e 029f 0daa jmp 0x0daa - 0d90 00db 03f7 lr $AX1.H, @0x03f7 - 0d92 009e 8000 lri $AC0.M, #0x8000 - 0d94 4600 addr $ACC0, $AX1.H - 0d95 029f 0d9c jmp 0x0d9c - 0d97 00db 03f7 lr $AX1.H, @0x03f7 - 0d99 009e 8000 lri $AC0.M, #0x8000 - 0d9b 5600 subr $ACC0, $AX1.H - 0d9c 00fe 03f5 sr @0x03f5, $AC0.M - 0d9e 1fda mrr $AC0.M, $AX0.H - 0d9f 7c00 neg $ACC0 - 0da0 1f5e mrr $AX0.H, $AC0.M - 0da1 00fe 03f2 sr @0x03f2, $AC0.M - 0da3 029f 0daa jmp 0x0daa - 0da5 00de 03f4 lr $AC0.M, @0x03f4 - 0da7 5d00 sub $ACC1, $ACC0 - 0da8 0293 0d97 jle 0x0d97 - 0daa 8900 clr $ACC1 - 0dab 00dd 03f5 lr $AC1.L, @0x03f5 - 0dad 1501 lsl $ACC1, #1 - 0dae 8100 clr $ACC0 - 0daf 00dc 03f6 lr $AC0.L, @0x03f6 - 0db1 008b 009f lri $WR3, #0x009f - 0db3 0080 0a00 lri $AR0, #0x0a00 - 0db5 0900 lris $AX1.L, #0x00 - 0db6 1150 0dbd bloopi #0x50, 0x0dbd - 0db8 1878 lrr $AX0.L, @$AR3 - 0db9 4c00 add $ACC0, $ACC1 - 0dba 1cfe mrr $IX3, $AC0.M - 0dbb 001f addarn $AR3, $IX3 - 0dbc 1fd9 mrr $AC0.M, $AX1.L - 0dbd 1b18 srri @$AR0, $AX0.L - 0dbe 009f 0a60 lri $AC1.M, #0x0a60 - 0dc0 1fc3 mrr $AC0.M, $AR3 - 0dc1 5c00 sub $ACC0, $ACC1 - 0dc2 00fe 03f1 sr @0x03f1, $AC0.M - 0dc4 00fc 03f6 sr @0x03f6, $AC0.L - 0dc6 008b ffff lri $WR3, #0xffff - 0dc8 02df ret - 0dc9 0f50 lris $AC1.M, #0x50 - 0dca 0080 0a00 lri $AR0, #0x0a00 - 0dcc 0083 0d60 lri $AR3, #0x0d60 - 0dce 0098 3fff lri $AX0.L, #0x3fff - 0dd0 02bf 0145 call 0x0145 - 0dd2 0f50 lris $AC1.M, #0x50 - 0dd3 0080 0a00 lri $AR0, #0x0a00 - 0dd5 0083 0d00 lri $AR3, #0x0d00 - 0dd7 0098 3fff lri $AX0.L, #0x3fff - 0dd9 02bf 0145 call 0x0145 - 0ddb 02df ret - 0ddc 8a00 m2 - 0ddd 8f00 set40 - 0dde 8100 clr $ACC0 - 0ddf 00de 0404 lr $AC0.M, @0x0404 - 0de1 b100 tst $ACC0 - 0de2 0295 0de9 jz 0x0de9 - 0de4 8100 clr $ACC0 - 0de5 00fe 0478 sr @0x0478, $AC0.M - 0de7 00fe 0479 sr @0x0479, $AC0.M - 0de9 00df 0479 lr $AC1.M, @0x0479 - 0deb 00db 0478 lr $AX1.H, @0x0478 - 0ded 0900 lris $AX1.L, #0x00 - 0dee 0084 0000 lri $IX0, #0x0000 - 0df0 1150 0df9 bloopi #0x50, 0x0df9 - 0df2 199e lrrn $AC0.M, @$AR0 - 0df3 5c7c sub'ln $ACC0, $ACC1 : $AC1.M, @$AR0 - 0df4 c000 mulc $AC0.M, $AX0.H - 0df5 6e00 movp $ACC0 - 0df6 1488 asl $ACC0, #8 - 0df7 4a00 addax $ACC0, $AX1.L - 0df8 1b1e srri @$AR0, $AC0.M - 0df9 1f7e mrr $AX1.H, $AC0.M - 0dfa 00fb 0478 sr @0x0478, $AX1.H - 0dfc 00ff 0479 sr @0x0479, $AC1.M - 0dfe 8b00 m0 - 0dff 8e00 set16 - 0e00 02df ret - 0e01 b900 tst $ACC1 - 0e02 0294 0e07 jnz 0x0e07 - 0e04 6800 movax $ACC0, $AX0.L - 0e05 b100 tst $ACC0 - 0e06 02d5 retz - 0e07 1c23 mrr $AR1, $AR3 - 0e08 197e lrri $AC0.M, @$AR3 - 0e09 191b lrri $AX1.H, @$AR0 - 0e0a d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - 0e0b 1120 0e11 bloopi #0x20, 0x0e11 - 0e0d dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0e0e 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0e0f dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0e10 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0e11 4900 addax $ACC1, $AX0.L - 0e12 1108 0e17 bloopi #0x08, 0x0e17 - 0e14 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0e15 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0e16 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0e17 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0e18 02df ret - 0e19 8f00 set40 - 0e1a 8d00 set15 - 0e1b 1c03 mrr $AR0, $AR3 - 0e1c 00d9 038e lr $AX1.L, @0x038e - 0e1e 0b04 lris $AX1.H, #0x04 - 0e1f 197a lrri $AX0.H, @$AR3 - 0e20 b053 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR3 - 0e21 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0e22 1128 0e27 bloopi #0x28, 0x0e27 - 0e24 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0e25 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0e26 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0e27 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0e28 8c00 clr15 - 0e29 8e00 set16 - 0e2a 02df ret - 0e2b 00da 0485 lr $AX0.H, @0x0485 - 0e2d 8600 tstaxh $AX0.H - 0e2e 0295 0e3c jz 0x0e3c - 0e30 8100 clr $ACC0 - 0e31 00de 042a lr $AC0.M, @0x042a - 0e33 147f lsr $ACC0, #-1 - 0e34 00fe 042b sr @0x042b, $AC0.M - 0e36 b100 tst $ACC0 - 0e37 0294 0e3c jnz 0x0e3c - 0e39 0a01 lris $AX0.H, #0x01 - 0e3a 00fa 0401 sr @0x0401, $AX0.H - 0e3c 8f00 set40 - 0e3d 8100 clr $ACC0 - 0e3e 00de 0428 lr $AC0.M, @0x0428 - 0e40 1478 lsr $ACC0, #-8 - 0e41 00df 0428 lr $AC1.M, @0x0428 - 0e43 0340 007f andi $AC1.M, #0x007f - 0e45 1f1e mrr $AX0.L, $AC0.M - 0e46 1f5f mrr $AX0.H, $AC1.M - 0e47 0220 007f xori $ACC0, #0x007f - 0e49 1f3e mrr $AX1.L, $AC0.M - 0e4a 0320 007f xori $ACC1, #0x007f - 0e4c 1f7f mrr $AX1.H, $AC1.M - 0e4d 8100 clr $ACC0 - 0e4e 8900 clr $ACC1 - 0e4f 009f 0200 lri $AC1.M, #0x0200 - 0e51 1fd8 mrr $AC0.M, $AX0.L - 0e52 4c00 add $ACC0, $ACC1 - 0e53 1c1e mrr $AR0, $AC0.M - 0e54 1818 lrr $AX0.L, @$AR0 - 0e55 1fda mrr $AC0.M, $AX0.H - 0e56 4c00 add $ACC0, $ACC1 - 0e57 1c1e mrr $AR0, $AC0.M - 0e58 181a lrr $AX0.H, @$AR0 - 0e59 1fd9 mrr $AC0.M, $AX1.L - 0e5a 4c00 add $ACC0, $ACC1 - 0e5b 1c1e mrr $AR0, $AC0.M - 0e5c 1819 lrr $AX1.L, @$AR0 - 0e5d 1fdb mrr $AC0.M, $AX1.H - 0e5e 4c00 add $ACC0, $ACC1 - 0e5f 1c1e mrr $AR0, $AC0.M - 0e60 181b lrr $AX1.H, @$AR0 - 0e61 8a00 m2 - 0e62 0080 0b00 lri $AR0, #0x0b00 - 0e64 9800 mul $AX1.L, $AX1.H - 0e65 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0e66 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0e67 9630 mulmv's $AX0.L, $AX0.H, $ACC0 : @$AR0, $AC0.M - 0e68 6e30 movp's $ACC0 : @$AR0, $AC0.M - 0e69 1b1e srri @$AR0, $AC0.M - 0e6a 8b00 m0 - 0e6b 0080 0b00 lri $AR0, #0x0b00 - 0e6d 0081 0b04 lri $AR1, #0x0b04 - 0e6f 00da 042a lr $AX0.H, @0x042a - 0e71 02bf 0ebc call 0x0ebc - 0e73 0081 0b08 lri $AR1, #0x0b08 - 0e75 0080 0b00 lri $AR0, #0x0b00 - 0e77 00da 042a lr $AX0.H, @0x042a - 0e79 00de 0429 lr $AC0.M, @0x0429 - 0e7b 8a00 m2 - 0e7c c000 mulc $AC0.M, $AX0.H - 0e7d 8b00 m0 - 0e7e 6e00 movp $ACC0 - 0e7f 1f5e mrr $AX0.H, $AC0.M - 0e80 02bf 0ebc call 0x0ebc - 0e82 0080 0b00 lri $AR0, #0x0b00 - 0e84 0081 0b0c lri $AR1, #0x0b0c - 0e86 8100 clr $ACC0 - 0e87 8900 clr $ACC1 - 0e88 00de 042b lr $AC0.M, @0x042b - 0e8a 00df 042a lr $AC1.M, @0x042a - 0e8c 00fe 042a sr @0x042a, $AC0.M - 0e8e 5c00 sub $ACC0, $ACC1 - 0e8f 1f5e mrr $AX0.H, $AC0.M - 0e90 02bf 0ec7 call 0x0ec7 - 0e92 0080 0b0c lri $AR0, #0x0b0c - 0e94 0081 0b10 lri $AR1, #0x0b10 - 0e96 00da 0429 lr $AX0.H, @0x0429 - 0e98 02bf 0ebc call 0x0ebc - 0e9a 0081 0b04 lri $AR1, #0x0b04 - 0e9c 0082 0b0c lri $AR2, #0x0b0c - 0e9e 0083 0ed5 lri $AR3, #0x0ed5 - 0ea0 1108 0eb9 bloopi #0x08, 0x0eb9 - 0ea2 195f lrri $AC1.M, @$AR2 - 0ea3 15fb asr $ACC1, #-5 - 0ea4 1f1d mrr $AX0.L, $AC1.L - 0ea5 1f5f mrr $AX0.H, $AC1.M - 0ea6 193f lrri $AC1.M, @$AR1 - 0ea7 00e1 0b24 sr @0x0b24, $AR1 - 0ea9 00e2 0b25 sr @0x0b25, $AR2 - 0eab 021b ilrri $AC0.M, @$AR3 - 0eac 00e3 0b26 sr @0x0b26, $AR3 - 0eae 1c7e mrr $AR3, $AC0.M - 0eaf 00c0 038f lr $AR0, @0x038f - 0eb1 02bf 0e01 call 0x0e01 - 0eb3 00c1 0b24 lr $AR1, @0x0b24 - 0eb5 00c2 0b25 lr $AR2, @0x0b25 - 0eb7 00c3 0b26 lr $AR3, @0x0b26 - 0eb9 0000 nop - 0eba 8e00 set16 - 0ebb 02df ret - 0ebc 8a00 m2 - 0ebd 191f lrri $AC1.M, @$AR0 - 0ebe d078 mulc'l $AC1.M, $AX0.H : $AC1.M, @$AR0 - 0ebf d678 mulcmv'l $AC1.M, $AX0.H, $ACC0 : $AC1.M, @$AR0 - 0ec0 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0ec1 191f lrri $AC1.M, @$AR0 - 0ec2 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0ec3 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0ec4 1b3e srri @$AR1, $AC0.M - 0ec5 8b00 m0 - 0ec6 02df ret - 0ec7 8a00 m2 - 0ec8 8d00 set15 - 0ec9 1f7e mrr $AX1.H, $AC0.M - 0eca 1918 lrri $AX0.L, @$AR0 - 0ecb a840 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR0 - 0ecc ae40 mulxmv'l $AX0.L, $AX1.H, $ACC0 : $AX0.L, @$AR0 - 0ecd ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ece 1918 lrri $AX0.L, @$AR0 - 0ecf ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ed0 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0ed1 1b3e srri @$AR1, $AC0.M - 0ed2 8c00 clr15 - 0ed3 8b00 m0 - 0ed4 02df ret - 0ed5 0d00 lris $AC1.L, #0x00 - 0ed6 0d60 lris $AC1.L, #0x60 - 0ed7 0f40 lris $AC1.M, #0x40 - 0ed8 0ca0 lris $AC0.L, #0xa0 - 0ed9 0e80 lris $AC0.M, #0x80 - 0eda 0ee0 lris $AC0.M, #0xe0 - 0edb 0be0 lris $AX1.H, #0xe0 - 0edc 0c40 lris $AC0.L, #0x40 - 0edd 00f9 0361 sr @0x0361, $AX1.L - 0edf 1fc0 mrr $AC0.M, $AR0 - 0ee0 0200 fffc addi $AC0.M, #0xfffc - 0ee2 1c1e mrr $AR0, $AC0.M - 0ee3 1c5e mrr $AR2, $AC0.M - 0ee4 0083 043c lri $AR3, #0x043c - 0ee6 197e lrri $AC0.M, @$AR3 - 0ee7 197f lrri $AC1.M, @$AR3 - 0ee8 80a2 nx'sl : $AC0.M, $AX0.H - 0ee9 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - 0eea 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - 0eeb 1b1f srri @$AR0, $AC1.M - 0eec 1c02 mrr $AR0, $AR2 - 0eed 8100 clr $ACC0 - 0eee 00de 0402 lr $AC0.M, @0x0402 - 0ef0 00fe 0362 sr @0x0362, $AC0.M - 0ef2 1474 lsr $ACC0, #-12 - 0ef3 1f7e mrr $AX1.H, $AC0.M - 0ef4 1f3c mrr $AX1.L, $AC0.L - 0ef5 8900 clr $ACC1 - 0ef6 00dd 0430 lr $AC1.L, @0x0430 - 0ef8 1504 lsl $ACC1, #4 - 0ef9 0604 cmpis $ACC0, #0x04 - 0efa 0290 0f51 jge 0x0f51 - 0efc 1fdd mrr $AC0.M, $AC1.L - 0efd 0082 02b0 lri $AR2, #0x02b0 - 0eff 1050 loopi #0x50 - 0f00 4b2a addax's $ACC1, $AX1.L : @$AR2, $AC1.L - 0f01 1fbe mrr $AC1.L, $AC0.M - 0f02 00fe 0360 sr @0x0360, $AC0.M - 0f04 8900 clr $ACC1 - 0f05 1fbe mrr $AC1.L, $AC0.M - 0f06 0af8 lris $AX0.H, #0xf8 - 0f07 009b 00fc lri $AX1.H, #0x00fc - 0f09 00d8 0361 lr $AX0.L, @0x0361 - 0f0b 0082 02b0 lri $AR2, #0x02b0 - 0f0d 0083 02b0 lri $AR3, #0x02b0 - 0f0f 195e lrri $AC0.M, @$AR2 - 0f10 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M - 0f11 1128 0f16 bloopi #0x28, 0x0f16 - 0f13 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 - 0f14 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H - 0f15 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 - 0f16 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - 0f17 8a00 m2 - 0f18 0082 02b0 lri $AR2, #0x02b0 - 0f1a 00dd 0430 lr $AC1.L, @0x0430 - 0f1c 1504 lsl $ACC1, #4 - 0f1d 1fe0 mrr $AC1.M, $AR0 - 0f1e 8100 clr $ACC0 - 0f1f 00de 0362 lr $AC0.M, @0x0362 - 0f21 1474 lsr $ACC0, #-12 - 0f22 1f7e mrr $AX1.H, $AC0.M - 0f23 1f3c mrr $AX1.L, $AC0.L - 0f24 8f00 set40 - 0f25 1943 lrri $AR3, @$AR2 - 0f26 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0f27 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f28 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f29 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f2a f200 madd $AX0.L, $AX0.H - 0f2b fe00 movpz $ACC0 - 0f2c 1c1f mrr $AR0, $AC1.M - 0f2d 1943 lrri $AR3, @$AR2 - 0f2e 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0f2f 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f30 114e 0f38 bloopi #0x4e, 0x0f38 - 0f32 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f33 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f34 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0f35 1c1f mrr $AR0, $AC1.M - 0f36 1943 lrri $AR3, @$AR2 - 0f37 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0f38 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - 0f39 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f3a f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f3b f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0f3c fe00 movpz $ACC0 - 0f3d 1b3e srri @$AR1, $AC0.M - 0f3e 8b00 m0 - 0f3f 8e00 set16 - 0f40 00fe 0433 sr @0x0433, $AC0.M - 0f42 1c1f mrr $AR0, $AC1.M - 0f43 150c lsl $ACC1, #12 - 0f44 0340 0fff andi $AC1.M, #0x0fff - 0f46 00ff 0430 sr @0x0430, $AC1.M - 0f48 0083 043c lri $AR3, #0x043c - 0f4a 191e lrri $AC0.M, @$AR0 - 0f4b 191f lrri $AC1.M, @$AR0 - 0f4c 80a0 nx'ls : $AX0.H, $AC0.M - 0f4d 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0f4e 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0f4f 1b7f srri @$AR3, $AC1.M - 0f50 02df ret - 0f51 1fe0 mrr $AC1.M, $AR0 - 0f52 1c1f mrr $AR0, $AC1.M - 0f53 1128 0f5a bloopi #0x28, 0x0f5a - 0f55 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f56 1b3e srri @$AR1, $AC0.M - 0f57 1c1f mrr $AR0, $AC1.M - 0f58 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f59 1b3e srri @$AR1, $AC0.M - 0f5a 1c1f mrr $AR0, $AC1.M - 0f5b 029f 0f40 jmp 0x0f40 - 0f5d 0083 0520 lri $AR3, #0x0520 - 0f5f 00de 0433 lr $AC0.M, @0x0433 - 0f61 1050 loopi #0x50 - 0f62 1b7e srri @$AR3, $AC0.M - 0f63 029f 0386 jmp 0x0386 - 0f65 1c20 mrr $AR1, $AR0 - 0f66 185f lrr $AC1.M, @$AR2 - 0f67 1f7f mrr $AX1.H, $AC1.M - 0f68 193a lrri $AX0.H, @$AR1 - 0f69 6400 movr $ACC0, $AX0.H - 0f6a 0078 0f6f bloop $AX0.L, 0x0f6f - 0f6c 5659 subr'l $ACC0, $AX1.H : $AX1.H, @$AR1 - 0f6d 6730 movr's $ACC1, $AX1.H : @$AR0, $AC0.M - 0f6e 5551 subr'l $ACC1, $AX0.H : $AX0.H, @$AR1 - 0f6f 6438 movr's $ACC0, $AX0.H : @$AR0, $AC1.M - 0f70 1a5b srr @$AR2, $AX1.H - 0f71 02df ret - 0f72 0098 8240 lri $AX0.L, #0x8240 - 0f74 00f8 04e8 sr @0x04e8, $AX0.L - 0f76 0098 7fff lri $AX0.L, #0x7fff - 0f78 00f8 04e9 sr @0x04e9, $AX0.L - 0f7a 0098 7dbf lri $AX0.L, #0x7dbf - 0f7c 00f8 04ea sr @0x04ea, $AX0.L - 0f7e 0098 843f lri $AX0.L, #0x843f - 0f80 00f8 04eb sr @0x04eb, $AX0.L - 0f82 0098 b23b lri $AX0.L, #0xb23b - 0f84 00f8 04f0 sr @0x04f0, $AX0.L - 0f86 0098 7fff lri $AX0.L, #0x7fff - 0f88 00f8 04f1 sr @0x04f1, $AX0.L - 0f8a 0098 4dc4 lri $AX0.L, #0x4dc4 - 0f8c 00f8 04f2 sr @0x04f2, $AX0.L - 0f8e 0098 d808 lri $AX0.L, #0xd808 - 0f90 00f8 04f3 sr @0x04f3, $AX0.L - 0f92 0098 0000 lri $AX0.L, #0x0000 - 0f94 0080 04ec lri $AR0, #0x04ec - 0f96 1004 loopi #0x04 - 0f97 1b18 srri @$AR0, $AX0.L - 0f98 0080 04f4 lri $AR0, #0x04f4 - 0f9a 1004 loopi #0x04 - 0f9b 1b18 srri @$AR0, $AX0.L - 0f9c 02df ret - 0f9d 0080 0f40 lri $AR0, #0x0f40 - 0f9f 0083 0b00 lri $AR3, #0x0b00 - 0fa1 8900 clr $ACC1 - 0fa2 0f50 lris $AC1.M, #0x50 - 0fa3 0098 6784 lri $AX0.L, #0x6784 - 0fa5 02bf 0154 call 0x0154 - 0fa7 0080 04e8 lri $AR0, #0x04e8 - 0fa9 0082 04ec lri $AR2, #0x04ec - 0fab 0081 0b00 lri $AR1, #0x0b00 - 0fad 8900 clr $ACC1 - 0fae 0f50 lris $AC1.M, #0x50 - 0faf 0080 0b00 lri $AR0, #0x0b00 - 0fb1 0083 0d00 lri $AR3, #0x0d00 - 0fb3 0098 7fff lri $AX0.L, #0x7fff - 0fb5 02bf 0145 call 0x0145 - 0fb7 8900 clr $ACC1 - 0fb8 0f50 lris $AC1.M, #0x50 - 0fb9 0080 0b00 lri $AR0, #0x0b00 - 0fbb 0083 0d60 lri $AR3, #0x0d60 - 0fbd 0098 b820 lri $AX0.L, #0xb820 - 0fbf 02bf 0145 call 0x0145 - 0fc1 0080 0ca0 lri $AR0, #0x0ca0 - 0fc3 0083 0b00 lri $AR3, #0x0b00 - 0fc5 8900 clr $ACC1 - 0fc6 0f50 lris $AC1.M, #0x50 - 0fc7 0098 6784 lri $AX0.L, #0x6784 - 0fc9 02bf 0154 call 0x0154 - 0fcb 0080 04e8 lri $AR0, #0x04e8 - 0fcd 0082 04f4 lri $AR2, #0x04f4 - 0fcf 0081 0b00 lri $AR1, #0x0b00 - 0fd1 8900 clr $ACC1 - 0fd2 0f50 lris $AC1.M, #0x50 - 0fd3 0080 0b00 lri $AR0, #0x0b00 - 0fd5 0083 0d00 lri $AR3, #0x0d00 - 0fd7 0098 47e0 lri $AX0.L, #0x47e0 - 0fd9 02bf 0145 call 0x0145 - 0fdb 8900 clr $ACC1 - 0fdc 0f50 lris $AC1.M, #0x50 - 0fdd 0080 0b00 lri $AR0, #0x0b00 - 0fdf 0083 0d60 lri $AR3, #0x0d60 - 0fe1 0098 8001 lri $AX0.L, #0x8001 - 0fe3 02bf 0145 call 0x0145 - 0fe5 02df ret - 0fe6 0000 nop - 0fe7 0000 nop - 0fe8 0000 nop - 0fe9 0000 nop - 0fea 0000 nop - 0feb 0000 nop - 0fec 0000 nop - 0fed 0000 nop - 0fee 0000 nop - 0fef 0000 nop diff --git a/docs/DSP/DSP_UC_PikminWii.txt b/docs/DSP/DSP_UC_PikminWii.txt deleted file mode 100644 index 19373ea920..0000000000 --- a/docs/DSP/DSP_UC_PikminWii.txt +++ /dev/null @@ -1,2825 +0,0 @@ -// What seems to be the latest Zelda/SMG UCode (2009). Seems to work differently than the rest. Also longer and has more ext ops. - - 0000 029f 0012 jmp 0x0012 - 0002 0000 nop - 0003 0000 nop - 0004 02ff rti - 0005 0000 nop - 0006 02ff rti - 0007 0000 nop - 0008 02ff rti - 0009 0000 nop - 000a 02ff rti - 000b 0000 nop - 000c 02ff rti - 000d 0000 nop - 000e 029f 06e0 jmp 0x06e0 - 0010 029f 004c jmp 0x004c - 0012 1205 sbclr #0x05 - 0013 02bf 0055 call 0x0055 - 0015 8100 clr $ACC0 - 0016 009f 1000 lri $AC1.M, #0x1000 - 0018 0080 0000 lri $AR0, #0x0000 - 001a 005f loop $AC1.M - 001b 1b1e srri @$AR0, $AC0.M - 001c 02bf 07b0 call 0x07b0 - 001e 02bf 0f24 call 0x0f24 - 0020 0e00 lris $AC0.M, #0x00 - 0021 02bf 0792 call 0x0792 - 0023 009e 1111 lri $AC0.M, #0x1111 - 0025 02bf 079c call 0x079c - 0027 0e00 lris $AC0.M, #0x00 - 0028 00fe 034e sr @0x034e, $AC0.M - 002a 1305 sbset #0x05 - 002b 029f 07ed jmp 0x07ed - 002d 00df 0357 lr $AC1.M, @0x0357 - 002f 00ff 0345 sr @0x0345, $AC1.M - 0031 00de 0356 lr $AC0.M, @0x0356 - 0033 1ffe mrr $AC1.M, $AC0.M - 0034 0340 00ff andi $AC1.M, #0x00ff - 0036 00ff 0344 sr @0x0344, $AC1.M - 0038 1479 lsr $ACC0, #-7 - 0039 0240 007e andi $AC0.M, #0x007e - 003b 00fe 0343 sr @0x0343, $AC0.M - 003d 0200 0073 addi $AC0.M, #0x0073 - 003f 1c1e mrr $AR0, $AC0.M - 0040 170f jmpr $AR0 - 0041 0092 00ff lri $CR, #0x00ff - 0043 0e04 lris $AC0.M, #0x04 - 0044 02bf 0792 call 0x0792 - 0046 00de 0356 lr $AC0.M, @0x0356 - 0048 02bf 079c call 0x079c - 004a 029f 002b jmp 0x002b - 004c 1205 sbclr #0x05 - 004d 02bf 0055 call 0x0055 - 004f 0e01 lris $AC0.M, #0x01 - 0050 02bf 0792 call 0x0792 - 0052 1305 sbset #0x05 - 0053 029f 002b jmp 0x002b - 0055 1202 sbclr #0x02 - 0056 1203 sbclr #0x03 - 0057 1204 sbclr #0x04 - 0058 1306 sbset #0x06 - 0059 8e00 set16 - 005a 8c00 clr15 - 005b 8b00 m0 - 005c 009e ffff lri $AC0.M, #0xffff - 005e 1d1e mrr $WR0, $AC0.M - 005f 1d3e mrr $WR1, $AC0.M - 0060 1d5e mrr $WR2, $AC0.M - 0061 1d7e mrr $WR3, $AC0.M - 0062 0092 00ff lri $CR, #0x00ff - 0064 02df ret - 0065 0081 0358 lri $AR1, #0x0358 - 0067 0090 0000 lri $AC0.H, #0x0000 - 0069 0c00 lris $AC0.L, #0x00 - 006a 007e 006f bloop $AC0.M, 0x006f - 006c 193e lrri $AC0.M, @$AR1 - 006d 1b1e srri @$AR0, $AC0.M - 006e 193e lrri $AC0.M, @$AR1 - 006f 1b1e srri @$AR0, $AC0.M - 0070 02df ret - 0071 029f 0041 jmp 0x0041 - 0073 029f 0041 jmp 0x0041 - 0075 029f 0093 jmp 0x0093 - 0077 029f 029d jmp 0x029d - 0079 029f 0071 jmp 0x0071 - 007b 029f 0629 jmp 0x0629 - 007d 029f 063b jmp 0x063b - 007f 029f 0041 jmp 0x0041 - 0081 029f 0572 jmp 0x0572 - 0083 029f 05be jmp 0x05be - 0085 029f 05a2 jmp 0x05a2 - 0087 029f 0041 jmp 0x0041 - 0089 029f 0041 jmp 0x0041 - 008b 029f 0041 jmp 0x0041 - 008d 029f 00bd jmp 0x00bd - 008f 029f 00b0 jmp 0x00b0 - 0091 029f 0041 jmp 0x0041 - 0093 0080 0380 lri $AR0, #0x0380 - 0095 0e04 lris $AC0.M, #0x04 - 0096 02bf 0065 call 0x0065 - 0098 0081 0382 lri $AR1, #0x0382 - 009a 009f 0000 lri $AC1.M, #0x0000 - 009c 0080 0280 lri $AR0, #0x0280 - 009e 02bf 05f9 call 0x05f9 - 00a0 0081 0384 lri $AR1, #0x0384 - 00a2 009f 0300 lri $AC1.M, #0x0300 - 00a4 0080 0020 lri $AR0, #0x0020 - 00a6 02bf 05f9 call 0x05f9 - 00a8 00de 0345 lr $AC0.M, @0x0345 - 00aa 00fe 0342 sr @0x0342, $AC0.M - 00ac 02bf 0cf6 call 0x0cf6 - 00ae 029f 0041 jmp 0x0041 - 00b0 0080 037d lri $AR0, #0x037d - 00b2 0e01 lris $AC0.M, #0x01 - 00b3 02bf 0065 call 0x0065 - 00b5 00de 037d lr $AC0.M, @0x037d - 00b7 0240 7fff andi $AC0.M, #0x7fff - 00b9 00fe 037d sr @0x037d, $AC0.M - 00bb 029f 0041 jmp 0x0041 - 00bd 0080 0374 lri $AR0, #0x0374 - 00bf 0e01 lris $AC0.M, #0x01 - 00c0 00fe 0377 sr @0x0377, $AC0.M - 00c2 00fe 037c sr @0x037c, $AC0.M - 00c4 02bf 0065 call 0x0065 - 00c6 00de 0345 lr $AC0.M, @0x0345 - 00c8 00fe 0376 sr @0x0376, $AC0.M - 00ca 029f 0041 jmp 0x0041 - 00cc 0081 034c lri $AR1, #0x034c - 00ce 009f 0400 lri $AC1.M, #0x0400 - 00d0 0080 00c0 lri $AR0, #0x00c0 - 00d2 02bf 05f9 call 0x05f9 - 00d4 02df ret - 00d5 0081 034c lri $AR1, #0x034c - 00d7 009f 0400 lri $AC1.M, #0x0400 - 00d9 0080 0080 lri $AR0, #0x0080 - 00db 0081 034c lri $AR1, #0x034c - 00dd 193e lrri $AC0.M, @$AR1 - 00de 193c lrri $AC0.L, @$AR1 - 00df 0098 0000 lri $AX0.L, #0x0000 - 00e1 7000 addaxl $ACC0, $AX0.L - 00e2 02bf 0608 call 0x0608 - 00e4 02df ret - 00e5 191e lrri $AC0.M, @$AR0 - 00e6 191a lrri $AX0.H, @$AR0 - 00e7 005f loop $AC1.M - 00e8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 00e9 1b7e srri @$AR3, $AC0.M - 00ea 1b7a srri @$AR3, $AX0.H - 00eb 02df ret - 00ec 0000 nop - 00ed 007f 00f2 bloop $AC1.M, 0x00f2 - 00ef 191e lrri $AC0.M, @$AR0 - 00f0 1b7e srri @$AR3, $AC0.M - 00f1 191e lrri $AC0.M, @$AR0 - 00f2 1b7e srri @$AR3, $AC0.M - 00f3 0000 nop - 00f4 02df ret - 00f5 191e lrri $AC0.M, @$AR0 - 00f6 191a lrri $AX0.H, @$AR0 - 00f7 007f 00fc bloop $AC1.M, 0x00fc - 00f9 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 00fa 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 00fb 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 00fc 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 00fd 0000 nop - 00fe 02df ret - 00ff 8a00 m2 - 0100 157f lsr $ACC1, #-1 - 0101 1c20 mrr $AR1, $AR0 - 0102 1c03 mrr $AR0, $AR3 - 0103 193a lrri $AX0.H, @$AR1 - 0104 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 - 0105 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 - 0106 007f 010b bloop $AC1.M, 0x010b - 0108 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 0109 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 010a 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 010b 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 010c 8b00 m0 - 010d 02df ret - 010e 8a00 m2 - 010f 191a lrri $AX0.H, @$AR0 - 0110 9050 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR0 - 0111 9250 mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0112 005f loop $AC1.M - 0113 92a0 mulmvz'ls $AX0.L, $AX0.H, $ACC0 : $AX0.H, $AC0.M - 0114 8b00 m0 - 0115 02df ret - 0116 8100 clr $ACC0 - 0117 8900 clr $ACC1 - 0118 0e50 lris $AC0.M, #0x50 - 0119 0080 0d00 lri $AR0, #0x0d00 - 011b 005e loop $AC0.M - 011c 1b1f srri @$AR0, $AC1.M - 011d 0080 0d60 lri $AR0, #0x0d60 - 011f 005e loop $AC0.M - 0120 1b1f srri @$AR0, $AC1.M - 0121 00da 0374 lr $AX0.H, @0x0374 - 0123 8600 tstaxh $AX0.H - 0124 02b5 0f4f callz 0x0f4f - 0126 8100 clr $ACC0 - 0127 8900 clr $ACC1 - 0128 0e50 lris $AC0.M, #0x50 - 0129 0080 0ca0 lri $AR0, #0x0ca0 - 012b 005e loop $AC0.M - 012c 1b1f srri @$AR0, $AC1.M - 012d 0080 0f40 lri $AR0, #0x0f40 - 012f 005e loop $AC0.M - 0130 1b1f srri @$AR0, $AC1.M - 0131 0080 0fa0 lri $AR0, #0x0fa0 - 0133 005e loop $AC0.M - 0134 1b1f srri @$AR0, $AC1.M - 0135 0080 0a00 lri $AR0, #0x0a00 - 0137 005e loop $AC0.M - 0138 1b1f srri @$AR0, $AC1.M - 0139 0080 09a0 lri $AR0, #0x09a0 - 013b 005e loop $AC0.M - 013c 1b1f srri @$AR0, $AC1.M - 013d 0f04 lris $AC1.M, #0x04 - 013e 0080 0e10 lri $AR0, #0x0e10 - 0140 0083 0dc0 lri $AR3, #0x0dc0 - 0142 02bf 00ec call 0x00ec - 0144 0080 0e70 lri $AR0, #0x0e70 - 0146 0083 0e20 lri $AR3, #0x0e20 - 0148 02bf 00ec call 0x00ec - 014a 0080 0ed0 lri $AR0, #0x0ed0 - 014c 0083 0e80 lri $AR3, #0x0e80 - 014e 02bf 00ec call 0x00ec - 0150 0080 0f30 lri $AR0, #0x0f30 - 0152 0083 0ee0 lri $AR3, #0x0ee0 - 0154 02bf 00ec call 0x00ec - 0156 8100 clr $ACC0 - 0157 0e50 lris $AC0.M, #0x50 - 0158 8900 clr $ACC1 - 0159 0080 0dc8 lri $AR0, #0x0dc8 - 015b 005e loop $AC0.M - 015c 1b1f srri @$AR0, $AC1.M - 015d 0080 0e28 lri $AR0, #0x0e28 - 015f 005e loop $AC0.M - 0160 1b1f srri @$AR0, $AC1.M - 0161 0080 0e88 lri $AR0, #0x0e88 - 0163 005e loop $AC0.M - 0164 1b1f srri @$AR0, $AC1.M - 0165 0080 0ee8 lri $AR0, #0x0ee8 - 0167 005e loop $AC0.M - 0168 1b1f srri @$AR0, $AC1.M - 0169 02df ret - 016a 009f 0580 lri $AC1.M, #0x0580 - 016c 009b 00a0 lri $AX1.H, #0x00a0 - 016e 0081 0393 lri $AR1, #0x0393 - 0170 18bc lrrd $AC0.L, @$AR1 - 0171 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0172 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0173 0080 0050 lri $AR0, #0x0050 - 0175 02bf 05fb call 0x05fb - 0177 02df ret - 0178 00df 03a1 lr $AC1.M, @0x03a1 - 017a 0508 addis $ACC1, #0x08 - 017b 0080 0580 lri $AR0, #0x0580 - 017d 1c7f mrr $AR3, $AC1.M - 017e 0098 7fff lri $AX0.L, #0x7fff - 0180 8900 clr $ACC1 - 0181 0f50 lris $AC1.M, #0x50 - 0182 02bf 00ff call 0x00ff - 0184 02df ret - 0185 00c0 03a0 lr $AR0, @0x03a0 - 0187 191a lrri $AX0.H, @$AR0 - 0188 02bf 016a call 0x016a - 018a 02bf 0178 call 0x0178 - 018c 8100 clr $ACC0 - 018d 8900 clr $ACC1 - 018e 00de 0390 lr $AC0.M, @0x0390 - 0190 02a0 0001 andf $AC0.M, #0x0001 - 0192 029d 019b jlz 0x019b - 0194 0080 0398 lri $AR0, #0x0398 - 0196 0e08 lris $AC0.M, #0x08 - 0197 00c1 03a1 lr $AR1, @0x03a1 - 0199 02bf 0c38 call 0x0c38 - 019b 0f50 lris $AC1.M, #0x50 - 019c 00c0 03a1 lr $AR0, @0x03a1 - 019e 00da 0394 lr $AX0.H, @0x0394 - 01a0 8600 tstaxh $AX0.H - 01a1 0295 01a8 jz 0x01a8 - 01a3 1c7a mrr $AR3, $AX0.H - 01a4 00d8 0395 lr $AX0.L, @0x0395 - 01a6 02bf 00ff call 0x00ff - 01a8 0f50 lris $AC1.M, #0x50 - 01a9 00c0 03a1 lr $AR0, @0x03a1 - 01ab 00da 0396 lr $AX0.H, @0x0396 - 01ad 8600 tstaxh $AX0.H - 01ae 0295 01b5 jz 0x01b5 - 01b0 1c7a mrr $AR3, $AX0.H - 01b1 00d8 0397 lr $AX0.L, @0x0397 - 01b3 02bf 00ff call 0x00ff - 01b5 00de 0390 lr $AC0.M, @0x0390 - 01b7 02a0 0002 andf $AC0.M, #0x0002 - 01b9 02dd retlz - 01ba 0080 0398 lri $AR0, #0x0398 - 01bc 0e08 lris $AC0.M, #0x08 - 01bd 00c1 03a1 lr $AR1, @0x03a1 - 01bf 02bf 0c38 call 0x0c38 - 01c1 02df ret - 01c2 8900 clr $ACC1 - 01c3 009f 0dc0 lri $AC1.M, #0x0dc0 - 01c5 00ff 03a1 sr @0x03a1, $AC1.M - 01c7 009f 03a8 lri $AC1.M, #0x03a8 - 01c9 00ff 03a2 sr @0x03a2, $AC1.M - 01cb 009f 03a4 lri $AC1.M, #0x03a4 - 01cd 00ff 03a0 sr @0x03a0, $AC1.M - 01cf 1104 01ef bloopi #0x04, 0x01ef - 01d1 00c0 03a2 lr $AR0, @0x03a2 - 01d3 0083 0390 lri $AR3, #0x0390 - 01d5 8900 clr $ACC1 - 01d6 0f08 lris $AC1.M, #0x08 - 01d7 02bf 00ec call 0x00ec - 01d9 00da 0390 lr $AX0.H, @0x0390 - 01db 8600 tstaxh $AX0.H - 01dc 0295 01e0 jz 0x01e0 - 01de 02bf 0185 call 0x0185 - 01e0 8100 clr $ACC0 - 01e1 00de 03a2 lr $AC0.M, @0x03a2 - 01e3 0410 addis $ACC0, #0x10 - 01e4 00fe 03a2 sr @0x03a2, $AC0.M - 01e6 00de 03a1 lr $AC0.M, @0x03a1 - 01e8 0460 addis $ACC0, #0x60 - 01e9 00fe 03a1 sr @0x03a1, $AC0.M - 01eb 00de 03a0 lr $AC0.M, @0x03a0 - 01ed 7400 incm $AC0.M - 01ee 00fe 03a0 sr @0x03a0, $AC0.M - 01f0 00da 0374 lr $AX0.H, @0x0374 - 01f2 8600 tstaxh $AX0.H - 01f3 0294 0219 jnz 0x0219 - 01f5 0f50 lris $AC1.M, #0x50 - 01f6 0080 0be0 lri $AR0, #0x0be0 - 01f8 0083 0e80 lri $AR3, #0x0e80 - 01fa 0098 7fff lri $AX0.L, #0x7fff - 01fc 02bf 00ff call 0x00ff - 01fe 0f50 lris $AC1.M, #0x50 - 01ff 0080 0be0 lri $AR0, #0x0be0 - 0201 0083 0ee0 lri $AR3, #0x0ee0 - 0203 0098 b820 lri $AX0.L, #0xb820 - 0205 02bf 00ff call 0x00ff - 0207 0f28 lris $AC1.M, #0x28 - 0208 0080 0c68 lri $AR0, #0x0c68 - 020a 0083 0e80 lri $AR3, #0x0e80 - 020c 0098 b820 lri $AX0.L, #0xb820 - 020e 02bf 00ff call 0x00ff - 0210 0f28 lris $AC1.M, #0x28 - 0211 0080 0c68 lri $AR0, #0x0c68 - 0213 0083 0ee0 lri $AR3, #0x0ee0 - 0215 0098 7fff lri $AX0.L, #0x7fff - 0217 02bf 00ff call 0x00ff - 0219 8100 clr $ACC0 - 021a 8900 clr $ACC1 - 021b 0e50 lris $AC0.M, #0x50 - 021c 0080 0be0 lri $AR0, #0x0be0 - 021e 005e loop $AC0.M - 021f 1b1f srri @$AR0, $AC1.M - 0220 0080 0c40 lri $AR0, #0x0c40 - 0222 005e loop $AC0.M - 0223 1b1f srri @$AR0, $AC1.M - 0224 02df ret - 0225 00c0 03a0 lr $AR0, @0x03a0 - 0227 181a lrr $AX0.H, @$AR0 - 0228 8100 clr $ACC0 - 0229 181e lrr $AC0.M, @$AR0 - 022a 00db 0391 lr $AX1.H, @0x0391 - 022c 7400 incm $AC0.M - 022d d100 cmpar $ACC1, $AX0.H - 022e 0270 ifge - 022f 8100 clr $ACC0 - 0230 1b1e srri @$AR0, $AC0.M - 0231 00df 03a1 lr $AC1.M, @0x03a1 - 0233 009b 00a0 lri $AX1.H, #0x00a0 - 0235 0081 0393 lri $AR1, #0x0393 - 0237 18bc lrrd $AC0.L, @$AR1 - 0238 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0239 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 023a 0080 0050 lri $AR0, #0x0050 - 023c 02bf 0608 call 0x0608 - 023e 02df ret - 023f 00da 0374 lr $AX0.H, @0x0374 - 0241 8600 tstaxh $AX0.H - 0242 0294 0258 jnz 0x0258 - 0244 8900 clr $ACC1 - 0245 0f28 lris $AC1.M, #0x28 - 0246 0080 0c40 lri $AR0, #0x0c40 - 0248 0083 0ea8 lri $AR3, #0x0ea8 - 024a 0098 b820 lri $AX0.L, #0xb820 - 024c 02bf 00ff call 0x00ff - 024e 8900 clr $ACC1 - 024f 0f28 lris $AC1.M, #0x28 - 0250 0080 0c40 lri $AR0, #0x0c40 - 0252 0083 0f08 lri $AR3, #0x0f08 - 0254 0098 7fff lri $AX0.L, #0x7fff - 0256 02bf 00ff call 0x00ff - 0258 009f 0dc0 lri $AC1.M, #0x0dc0 - 025a 00ff 03a1 sr @0x03a1, $AC1.M - 025c 009f 03a8 lri $AC1.M, #0x03a8 - 025e 00ff 03a2 sr @0x03a2, $AC1.M - 0260 009f 03a4 lri $AC1.M, #0x03a4 - 0262 00ff 03a0 sr @0x03a0, $AC1.M - 0264 1104 0282 bloopi #0x04, 0x0282 - 0266 00c0 03a2 lr $AR0, @0x03a2 - 0268 0083 0390 lri $AR3, #0x0390 - 026a 0f08 lris $AC1.M, #0x08 - 026b 02bf 00ec call 0x00ec - 026d 00da 0390 lr $AX0.H, @0x0390 - 026f 8600 tstaxh $AX0.H - 0270 0295 0274 jz 0x0274 - 0272 02bf 0225 call 0x0225 - 0274 00de 03a2 lr $AC0.M, @0x03a2 - 0276 0410 addis $ACC0, #0x10 - 0277 00fe 03a2 sr @0x03a2, $AC0.M - 0279 00de 03a1 lr $AC0.M, @0x03a1 - 027b 0460 addis $ACC0, #0x60 - 027c 00fe 03a1 sr @0x03a1, $AC0.M - 027e 00de 03a0 lr $AC0.M, @0x03a0 - 0280 7400 incm $AC0.M - 0281 00fe 03a0 sr @0x03a0, $AC0.M - 0283 02df ret - 0284 0081 0386 lri $AR1, #0x0386 - 0286 009f 03a8 lri $AC1.M, #0x03a8 - 0288 0080 0040 lri $AR0, #0x0040 - 028a 02bf 05f9 call 0x05f9 - 028c 02df ret - 028d 191e lrri $AC0.M, @$AR0 - 028e 189c lrrd $AC0.L, @$AR0 - 028f 4800 addax $ACC0, $AX0.L - 0290 1b1e srri @$AR0, $AC0.M - 0291 1b1c srri @$AR0, $AC0.L - 0292 02df ret - 0293 8100 clr $ACC0 - 0294 8900 clr $ACC1 - 0295 00df 0354 lr $AC1.M, @0x0354 - 0297 00de 034e lr $AC0.M, @0x034e - 0299 8200 cmp - 029a 0293 0293 jle 0x0293 - 029c 02df ret - 029d 0080 0388 lri $AR0, #0x0388 - 029f 0081 0065 lri $AR1, #0x0065 - 02a1 0e02 lris $AC0.M, #0x02 - 02a2 173f callr $AR1 - 02a3 02bf 047f call 0x047f - 02a5 00de 0344 lr $AC0.M, @0x0344 - 02a7 00fe 0341 sr @0x0341, $AC0.M - 02a9 00de 0345 lr $AC0.M, @0x0345 - 02ab 00fe 038e sr @0x038e, $AC0.M - 02ad 8100 clr $ACC0 - 02ae 00fe 0355 sr @0x0355, $AC0.M - 02b0 02bf 0284 call 0x0284 - 02b2 02bf 064d call 0x064d - 02b4 0092 00ff lri $CR, #0x00ff - 02b6 00de 0341 lr $AC0.M, @0x0341 - 02b8 007e 047a bloop $AC0.M, 0x047a - 02ba 02bf 0116 call 0x0116 - 02bc 02bf 01c2 call 0x01c2 - 02be 02bf 04f5 call 0x04f5 - 02c0 02bf 0a86 call 0x0a86 - 02c2 00de 0355 lr $AC0.M, @0x0355 - 02c4 7400 incm $AC0.M - 02c5 00fe 0355 sr @0x0355, $AC0.M - 02c7 8100 clr $ACC0 - 02c8 00fe 0354 sr @0x0354, $AC0.M - 02ca 00de 0342 lr $AC0.M, @0x0342 - 02cc 007e 0420 bloop $AC0.M, 0x0420 - 02ce 02bf 0293 call 0x0293 - 02d0 8100 clr $ACC0 - 02d1 8900 clr $ACC1 - 02d2 00de 0354 lr $AC0.M, @0x0354 - 02d4 147c lsr $ACC0, #-4 - 02d5 0200 04fc addi $AC0.M, #0x04fc - 02d7 1c1e mrr $AR0, $AC0.M - 02d8 181f lrr $AC1.M, @$AR0 - 02d9 00de 0354 lr $AC0.M, @0x0354 - 02db 0240 000f andi $AC0.M, #0x000f - 02dd 3d80 lsrnr $ACC1 - 02de 03c0 8000 andcf $AC1.M, #0x8000 - 02e0 029c 041c jlnz 0x041c - 02e2 00d8 0354 lr $AX0.L, @0x0354 - 02e4 009a 0180 lri $AX0.H, #0x0180 - 02e6 8100 clr $ACC0 - 02e7 00de 0380 lr $AC0.M, @0x0380 - 02e9 00dc 0381 lr $AC0.L, @0x0381 - 02eb 9000 mul $AX0.L, $AX0.H - 02ec 9400 mulac $AX0.L, $AX0.H, $ACC0 - 02ed 00fe 034c sr @0x034c, $AC0.M - 02ef 00fc 034d sr @0x034d, $AC0.L - 02f1 02bf 00cc call 0x00cc - 02f3 00da 0400 lr $AX0.H, @0x0400 - 02f5 8600 tstaxh $AX0.H - 02f6 0295 041c jz 0x041c - 02f8 00da 0401 lr $AX0.H, @0x0401 - 02fa 8600 tstaxh $AX0.H - 02fb 0294 041c jnz 0x041c - 02fd 00da 0433 lr $AX0.H, @0x0433 - 02ff 00fa 03f8 sr @0x03f8, $AX0.H - 0301 00da 0406 lr $AX0.H, @0x0406 - 0303 8600 tstaxh $AX0.H - 0304 0294 0f0f jnz 0x0f0f - 0306 8100 clr $ACC0 - 0307 00de 0480 lr $AC0.M, @0x0480 - 0309 0609 cmpis $ACC0, #0x09 - 030a 0295 031d jz 0x031d - 030c 0605 cmpis $ACC0, #0x05 - 030d 0295 031d jz 0x031d - 030f 0608 cmpis $ACC0, #0x08 - 0310 0295 0ab6 jz 0x0ab6 - 0312 0610 cmpis $ACC0, #0x10 - 0313 0295 0b33 jz 0x0b33 - 0315 0620 cmpis $ACC0, #0x20 - 0316 0295 0ba4 jz 0x0ba4 - 0318 0621 cmpis $ACC0, #0x21 - 0319 0295 0bac jz 0x0bac - 031b 029f 09a3 jmp 0x09a3 - 031d 00d8 0402 lr $AX0.L, @0x0402 - 031f 8100 clr $ACC0 - 0320 8900 clr $ACC1 - 0321 00dc 0430 lr $AC0.L, @0x0430 - 0323 8d00 set15 - 0324 0950 lris $AX1.L, #0x50 - 0325 a000 mulx $AX0.L, $AX1.L - 0326 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0327 1404 lsl $ACC0, #4 - 0328 8c00 clr15 - 0329 1ffe mrr $AC1.M, $AC0.M - 032a 0083 0580 lri $AR3, #0x0580 - 032c 02bf 0865 call 0x0865 - 032e 029f 0330 jmp 0x0330 - 0330 0080 0580 lri $AR0, #0x0580 - 0332 0081 0520 lri $AR1, #0x0520 - 0334 0099 0000 lri $AX1.L, #0x0000 - 0336 02bf 0e8f call 0x0e8f - 0338 00da 04a8 lr $AX0.H, @0x04a8 - 033a 8600 tstaxh $AX0.H - 033b 0295 0341 jz 0x0341 - 033d 0080 0520 lri $AR0, #0x0520 - 033f 02bf 0d8e call 0x0d8e - 0341 009e 0520 lri $AC0.M, #0x0520 - 0343 00fe 038f sr @0x038f, $AC0.M - 0345 8900 clr $ACC1 - 0346 00df 0484 lr $AC1.M, @0x0484 - 0348 0340 001f andi $AC1.M, #0x001f - 034a b900 tst $ACC1 - 034b 0295 0371 jz 0x0371 - 034d 00de 038f lr $AC0.M, @0x038f - 034f 5c00 sub $ACC0, $ACC1 - 0350 00fe 038f sr @0x038f, $AC0.M - 0352 1c7e mrr $AR3, $AC0.M - 0353 0080 0440 lri $AR0, #0x0440 - 0355 05fe addis $ACC1, #0xfe - 0356 02bf 00e5 call 0x00e5 - 0358 0080 0490 lri $AR0, #0x0490 - 035a 00c1 038f lr $AR1, @0x038f - 035c 8900 clr $ACC1 - 035d 00df 0484 lr $AC1.M, @0x0484 - 035f 0340 001f andi $AC1.M, #0x001f - 0361 02bf 0c57 call 0x0c57 - 0363 00de 038f lr $AC0.M, @0x038f - 0365 0450 addis $ACC0, #0x50 - 0366 1c1e mrr $AR0, $AC0.M - 0367 0083 0440 lri $AR3, #0x0440 - 0369 8900 clr $ACC1 - 036a 00df 0484 lr $AC1.M, @0x0484 - 036c 0340 001f andi $AC1.M, #0x001f - 036e 05fe addis $ACC1, #0xfe - 036f 02bf 00e5 call 0x00e5 - 0371 00de 0484 lr $AC0.M, @0x0484 - 0373 0240 0020 andi $AC0.M, #0x0020 - 0375 0295 0393 jz 0x0393 - 0377 0080 04a4 lri $AR0, #0x04a4 - 0379 00c1 038f lr $AR1, @0x038f - 037b 0082 0454 lri $AR2, #0x0454 - 037d 0083 04a7 lri $AR3, #0x04a7 - 037f 18fa lrrd $AX0.H, @$AR3 - 0380 8600 tstaxh $AX0.H - 0381 0294 0391 jnz 0x0391 - 0383 18fa lrrd $AX0.H, @$AR3 - 0384 8600 tstaxh $AX0.H - 0385 0294 0391 jnz 0x0391 - 0387 18fa lrrd $AX0.H, @$AR3 - 0388 8600 tstaxh $AX0.H - 0389 0294 0391 jnz 0x0391 - 038b 8100 clr $ACC0 - 038c 18fe lrrd $AC0.M, @$AR3 - 038d 0280 7fff cmpi $AC0.M, #0x7fff - 038f 0295 0393 jz 0x0393 - 0391 02bf 0c72 call 0x0c72 - 0393 8100 clr $ACC0 - 0394 00de 042c lr $AC0.M, @0x042c - 0396 b100 tst $ACC0 - 0397 0295 039d jz 0x039d - 0399 02bf 0ddd call 0x0ddd - 039b 029f 0412 jmp 0x0412 - 039d 8100 clr $ACC0 - 039e 1c9e mrr $IX0, $AC0.M - 039f 1cde mrr $IX2, $AC0.M - 03a0 7400 incm $AC0.M - 03a1 1cfe mrr $IX3, $AC0.M - 03a2 8100 clr $ACC0 - 03a3 00de 0407 lr $AC0.M, @0x0407 - 03a5 b100 tst $ACC0 - 03a6 0295 03b5 jz 0x03b5 - 03a8 00c3 038f lr $AR3, @0x038f - 03aa 0007 dar $AR3 - 03ab 0080 0477 lri $AR0, #0x0477 - 03ad 0084 ffff lri $IX0, #0xffff - 03af 0087 ffff lri $IX3, #0xffff - 03b1 199a lrrn $AX0.H, @$AR0 - 03b2 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - 03b3 005e loop $AC0.M - 03b4 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - 03b5 00da 0485 lr $AX0.H, @0x0485 - 03b7 8600 tstaxh $AX0.H - 03b8 0295 03cb jz 0x03cb - 03ba 8900 clr $ACC1 - 03bb 0086 0005 lri $IX2, #0x0005 - 03bd 0082 040a lri $AR2, #0x040a - 03bf 1106 03c3 bloopi #0x06, 0x03c3 - 03c1 18de lrrd $AC0.M, @$AR2 - 03c2 147f lsr $ACC0, #-1 - 03c3 4d36 add'sn $ACC1, $ACC0 : @$AR2, $AC0.M - 03c4 b900 tst $ACC1 - 03c5 0294 03cb jnz 0x03cb - 03c7 009a 0001 lri $AX0.H, #0x0001 - 03c9 00fa 0401 sr @0x0401, $AX0.H - 03cb 8f00 set40 - 03cc 0086 0002 lri $IX2, #0x0002 - 03ce 0082 0408 lri $AR2, #0x0408 - 03d0 1106 03fb bloopi #0x06, 0x03fb - 03d2 8100 clr $ACC0 - 03d3 195e lrri $AC0.M, @$AR2 - 03d4 1200 sbclr #0x00 - 03d5 b100 tst $ACC0 - 03d6 0275 ifz - 03d7 1300 sbset #0x00 - 03d8 1c7e mrr $AR3, $AC0.M - 03d9 195e lrri $AC0.M, @$AR2 - 03da 195f lrri $AC1.M, @$AR2 - 03db 5c00 sub $ACC0, $ACC1 - 03dc 14fb asr $ACC0, #-5 - 03dd 1f5e mrr $AX0.H, $AC0.M - 03de 1f1c mrr $AX0.L, $AC0.L - 03df 185e lrr $AC0.M, @$AR2 - 03e0 0240 00ff andi $AC0.M, #0x00ff - 03e2 1f7e mrr $AX1.H, $AC0.M - 03e3 185e lrr $AC0.M, @$AR2 - 03e4 1478 lsr $ACC0, #-8 - 03e5 009c 0000 lri $AC0.L, #0x0000 - 03e7 d100 cmpar $ACC1, $AX0.H - 03e8 0295 03f0 jz 0x03f0 - 03ea 185e lrr $AC0.M, @$AR2 - 03eb 0272 ifg - 03ec 7400 incm $AC0.M - 03ed 0271 ifl - 03ee 7800 decm $AC0.M - 03ef 1a5e srr @$AR2, $AC0.M - 03f0 0006 dar $AR2 - 03f1 00de 038f lr $AC0.M, @0x038f - 03f3 5600 subr $ACC0, $AX1.H - 03f4 029d 03f9 jlz 0x03f9 - 03f6 1c1e mrr $AR0, $AC0.M - 03f7 02bf 0db3 call 0x0db3 - 03f9 0000 nop - 03fa 1b5f srri @$AR2, $AC1.M - 03fb 000a iar $AR2 - 03fc 8e00 set16 - 03fd 8100 clr $ACC0 - 03fe 00de 0407 lr $AC0.M, @0x0407 - 0400 b100 tst $ACC0 - 0401 0295 0412 jz 0x0412 - 0403 00c3 038f lr $AR3, @0x038f - 0405 0087 004f lri $IX3, #0x004f - 0407 001f addarn $AR3, $IX3 - 0408 0080 0477 lri $AR0, #0x0477 - 040a 0084 ffff lri $IX0, #0xffff - 040c 0087 ffff lri $IX3, #0xffff - 040e 19fa lrrn $AX0.H, @$AR3 - 040f 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 0410 005e loop $AC0.M - 0411 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - 0412 00da 0406 lr $AX0.H, @0x0406 - 0414 8600 tstaxh $AX0.H - 0415 0294 041a jnz 0x041a - 0417 8100 clr $ACC0 - 0418 00fe 0404 sr @0x0404, $AC0.M - 041a 02bf 00d5 call 0x00d5 - 041c 00de 0354 lr $AC0.M, @0x0354 - 041e 7400 incm $AC0.M - 041f 00fe 0354 sr @0x0354, $AC0.M - 0421 0e00 lris $AC0.M, #0x00 - 0422 00fe 034e sr @0x034e, $AC0.M - 0424 0e04 lris $AC0.M, #0x04 - 0425 02bf 0792 call 0x0792 - 0427 00de 0355 lr $AC0.M, @0x0355 - 0429 0260 ff00 ori $AC0.M, #0xff00 - 042b 02bf 079c call 0x079c - 042d 02bf 0d14 call 0x0d14 - 042f 02bf 0d26 call 0x0d26 - 0431 02bf 0d7b call 0x0d7b - 0433 00de 0341 lr $AC0.M, @0x0341 - 0435 7800 decm $AC0.M - 0436 00fe 0341 sr @0x0341, $AC0.M - 0438 0080 09a0 lri $AR0, #0x09a0 - 043a 0083 0d00 lri $AR3, #0x0d00 - 043c 0f50 lris $AC1.M, #0x50 - 043d 0098 5a82 lri $AX0.L, #0x5a82 - 043f 02bf 00ff call 0x00ff - 0441 0080 09a0 lri $AR0, #0x09a0 - 0443 0083 0d60 lri $AR3, #0x0d60 - 0445 0f50 lris $AC1.M, #0x50 - 0446 02bf 00ff call 0x00ff - 0448 0083 0d00 lri $AR3, #0x0d00 - 044a 02bf 0dcb call 0x0dcb - 044c 0081 0388 lri $AR1, #0x0388 - 044e 009f 0d00 lri $AC1.M, #0x0d00 - 0450 0080 0050 lri $AR0, #0x0050 - 0452 02bf 0606 call 0x0606 - 0454 0080 0fa0 lri $AR0, #0x0fa0 - 0456 0083 0d60 lri $AR3, #0x0d60 - 0458 0f50 lris $AC1.M, #0x50 - 0459 0098 8000 lri $AX0.L, #0x8000 - 045b 02bf 00ff call 0x00ff - 045d 0083 0d60 lri $AR3, #0x0d60 - 045f 02bf 0dcb call 0x0dcb - 0461 0081 038a lri $AR1, #0x038a - 0463 009f 0d60 lri $AC1.M, #0x0d60 - 0465 0080 0050 lri $AR0, #0x0050 - 0467 02bf 0606 call 0x0606 - 0469 009a 0000 lri $AX0.H, #0x0000 - 046b 0098 00a0 lri $AX0.L, #0x00a0 - 046d 0080 0388 lri $AR0, #0x0388 - 046f 02bf 028d call 0x028d - 0471 0080 038a lri $AR0, #0x038a - 0473 02bf 028d call 0x028d - 0475 02bf 023f call 0x023f - 0477 02bf 0491 call 0x0491 - 0479 0000 nop - 047a 0000 nop - 047b 0080 002b lri $AR0, #0x002b - 047d 029f 072b jmp 0x072b - 047f 0080 0374 lri $AR0, #0x0374 - 0481 0e02 lris $AC0.M, #0x02 - 0482 02bf 0067 call 0x0067 - 0484 00de 0374 lr $AC0.M, @0x0374 - 0486 0240 7fff andi $AC0.M, #0x7fff - 0488 00fe 0374 sr @0x0374, $AC0.M - 048a 00de 0376 lr $AC0.M, @0x0376 - 048c 0240 7fff andi $AC0.M, #0x7fff - 048e 00fe 0376 sr @0x0376, $AC0.M - 0490 02df ret - 0491 00da 0374 lr $AX0.H, @0x0374 - 0493 8600 tstaxh $AX0.H - 0494 02d5 retz - 0495 0083 0f40 lri $AR3, #0x0f40 - 0497 02bf 0dcb call 0x0dcb - 0499 0083 0ca0 lri $AR3, #0x0ca0 - 049b 02bf 0dcb call 0x0dcb - 049d 0081 0374 lri $AR1, #0x0374 - 049f 009f 0f40 lri $AC1.M, #0x0f40 - 04a1 0080 0050 lri $AR0, #0x0050 - 04a3 02bf 0606 call 0x0606 - 04a5 0081 0376 lri $AR1, #0x0376 - 04a7 009f 0ca0 lri $AC1.M, #0x0ca0 - 04a9 0080 0050 lri $AR0, #0x0050 - 04ab 02bf 0606 call 0x0606 - 04ad 009a 0000 lri $AX0.H, #0x0000 - 04af 0098 00a0 lri $AX0.L, #0x00a0 - 04b1 0080 0374 lri $AR0, #0x0374 - 04b3 02bf 028d call 0x028d - 04b5 0080 0376 lri $AR0, #0x0376 - 04b7 02bf 028d call 0x028d - 04b9 02df ret - 04ba 00da 0374 lr $AX0.H, @0x0374 - 04bc 8600 tstaxh $AX0.H - 04bd 02d5 retz - 04be 009f 0be0 lri $AC1.M, #0x0be0 - 04c0 00ff 03a1 sr @0x03a1, $AC1.M - 04c2 00df 03ca lr $AC1.M, @0x03ca - 04c4 00ff 0392 sr @0x0392, $AC1.M - 04c6 00df 03cb lr $AC1.M, @0x03cb - 04c8 00ff 0393 sr @0x0393, $AC1.M - 04ca 009f 03a6 lri $AC1.M, #0x03a6 - 04cc 00ff 03a0 sr @0x03a0, $AC1.M - 04ce 00df 03c9 lr $AC1.M, @0x03c9 - 04d0 00ff 0391 sr @0x0391, $AC1.M - 04d2 00da 03c8 lr $AX0.H, @0x03c8 - 04d4 8600 tstaxh $AX0.H - 04d5 0295 04d9 jz 0x04d9 - 04d7 02bf 0225 call 0x0225 - 04d9 009f 0c40 lri $AC1.M, #0x0c40 - 04db 00ff 03a1 sr @0x03a1, $AC1.M - 04dd 00df 03da lr $AC1.M, @0x03da - 04df 00ff 0392 sr @0x0392, $AC1.M - 04e1 00df 03db lr $AC1.M, @0x03db - 04e3 00ff 0393 sr @0x0393, $AC1.M - 04e5 009f 03a7 lri $AC1.M, #0x03a7 - 04e7 00ff 03a0 sr @0x03a0, $AC1.M - 04e9 00df 03d9 lr $AC1.M, @0x03d9 - 04eb 00ff 0391 sr @0x0391, $AC1.M - 04ed 00da 03d8 lr $AX0.H, @0x03d8 - 04ef 8600 tstaxh $AX0.H - 04f0 0295 04f4 jz 0x04f4 - 04f2 02bf 0225 call 0x0225 - 04f4 02df ret - 04f5 00da 0374 lr $AX0.H, @0x0374 - 04f7 8600 tstaxh $AX0.H - 04f8 02d5 retz - 04f9 00da 03d8 lr $AX0.H, @0x03d8 - 04fb 8600 tstaxh $AX0.H - 04fc 02d5 retz - 04fd 0083 0be0 lri $AR3, #0x0be0 - 04ff 0080 0c30 lri $AR0, #0x0c30 - 0501 0f04 lris $AC1.M, #0x04 - 0502 02bf 00ec call 0x00ec - 0504 0083 0c40 lri $AR3, #0x0c40 - 0506 0080 0c90 lri $AR0, #0x0c90 - 0508 0f04 lris $AC1.M, #0x04 - 0509 02bf 00ec call 0x00ec - 050b 00df 03ca lr $AC1.M, @0x03ca - 050d 00ff 0392 sr @0x0392, $AC1.M - 050f 00df 03cb lr $AC1.M, @0x03cb - 0511 00ff 0393 sr @0x0393, $AC1.M - 0513 00df 03a6 lr $AC1.M, @0x03a6 - 0515 7500 incm $AC1.M - 0516 1f5f mrr $AX0.H, $AC1.M - 0517 009f 0be8 lri $AC1.M, #0x0be8 - 0519 02bf 016c call 0x016c - 051b 00df 03da lr $AC1.M, @0x03da - 051d 00ff 0392 sr @0x0392, $AC1.M - 051f 00df 03db lr $AC1.M, @0x03db - 0521 00ff 0393 sr @0x0393, $AC1.M - 0523 00df 03a7 lr $AC1.M, @0x03a7 - 0525 7500 incm $AC1.M - 0526 1f5f mrr $AX0.H, $AC1.M - 0527 009f 0c48 lri $AC1.M, #0x0c48 - 0529 02bf 016c call 0x016c - 052b 00de 03c8 lr $AC0.M, @0x03c8 - 052d 02a0 0001 andf $AC0.M, #0x0001 - 052f 029d 0538 jlz 0x0538 - 0531 0080 03d0 lri $AR0, #0x03d0 - 0533 0e08 lris $AC0.M, #0x08 - 0534 0081 0be0 lri $AR1, #0x0be0 - 0536 02bf 0c38 call 0x0c38 - 0538 00de 03d8 lr $AC0.M, @0x03d8 - 053a 02a0 0001 andf $AC0.M, #0x0001 - 053c 029d 0545 jlz 0x0545 - 053e 0080 03e0 lri $AR0, #0x03e0 - 0540 0e08 lris $AC0.M, #0x08 - 0541 0081 0c40 lri $AR1, #0x0c40 - 0543 02bf 0c38 call 0x0c38 - 0545 0f50 lris $AC1.M, #0x50 - 0546 0080 0be0 lri $AR0, #0x0be0 - 0548 0083 0f40 lri $AR3, #0x0f40 - 054a 00d8 03cd lr $AX0.L, @0x03cd - 054c 02bf 00ff call 0x00ff - 054e 0f50 lris $AC1.M, #0x50 - 054f 0080 0c40 lri $AR0, #0x0c40 - 0551 0083 0ca0 lri $AR3, #0x0ca0 - 0553 00d8 03df lr $AX0.L, @0x03df - 0555 02bf 00ff call 0x00ff - 0557 00de 03c8 lr $AC0.M, @0x03c8 - 0559 02a0 0002 andf $AC0.M, #0x0002 - 055b 029d 0564 jlz 0x0564 - 055d 0080 03d0 lri $AR0, #0x03d0 - 055f 0e08 lris $AC0.M, #0x08 - 0560 0081 0be0 lri $AR1, #0x0be0 - 0562 02bf 0c38 call 0x0c38 - 0564 00de 03d8 lr $AC0.M, @0x03d8 - 0566 02a0 0002 andf $AC0.M, #0x0002 - 0568 029d 0571 jlz 0x0571 - 056a 0080 03e0 lri $AR0, #0x03e0 - 056c 0e08 lris $AC0.M, #0x08 - 056d 0081 0c40 lri $AR1, #0x0c40 - 056f 02bf 0c38 call 0x0c38 - 0571 02df ret - 0572 0080 0346 lri $AR0, #0x0346 - 0574 02bf 0065 call 0x0065 - 0576 02bf 0065 call 0x0065 - 0578 0081 0346 lri $AR1, #0x0346 - 057a 193e lrri $AC0.M, @$AR1 - 057b 193c lrri $AC0.L, @$AR1 - 057c 009f 0400 lri $AC1.M, #0x0400 - 057e 00c0 0345 lr $AR0, @0x0345 - 0580 02bf 05fb call 0x05fb - 0582 0081 0348 lri $AR1, #0x0348 - 0584 193e lrri $AC0.M, @$AR1 - 0585 193c lrri $AC0.L, @$AR1 - 0586 009f 0800 lri $AC1.M, #0x0800 - 0588 00c0 0345 lr $AR0, @0x0345 - 058a 02bf 05fb call 0x05fb - 058c 0081 0346 lri $AR1, #0x0346 - 058e 193e lrri $AC0.M, @$AR1 - 058f 193c lrri $AC0.L, @$AR1 - 0590 009f 0800 lri $AC1.M, #0x0800 - 0592 00c0 0345 lr $AR0, @0x0345 - 0594 02bf 0608 call 0x0608 - 0596 0081 0348 lri $AR1, #0x0348 - 0598 193e lrri $AC0.M, @$AR1 - 0599 193c lrri $AC0.L, @$AR1 - 059a 009f 0400 lri $AC1.M, #0x0400 - 059c 00c0 0345 lr $AR0, @0x0345 - 059e 02bf 0608 call 0x0608 - 05a0 029f 0041 jmp 0x0041 - 05a2 0080 0346 lri $AR0, #0x0346 - 05a4 02bf 0065 call 0x0065 - 05a6 02bf 0065 call 0x0065 - 05a8 0081 0346 lri $AR1, #0x0346 - 05aa 193e lrri $AC0.M, @$AR1 - 05ab 193c lrri $AC0.L, @$AR1 - 05ac 009f 0400 lri $AC1.M, #0x0400 - 05ae 00c0 0345 lr $AR0, @0x0345 - 05b0 02bf 05fb call 0x05fb - 05b2 0081 0348 lri $AR1, #0x0348 - 05b4 193e lrri $AC0.M, @$AR1 - 05b5 193c lrri $AC0.L, @$AR1 - 05b6 009f 0400 lri $AC1.M, #0x0400 - 05b8 00c0 0345 lr $AR0, @0x0345 - 05ba 02bf 0608 call 0x0608 - 05bc 029f 0041 jmp 0x0041 - 05be 0080 0346 lri $AR0, #0x0346 - 05c0 02bf 0065 call 0x0065 - 05c2 02bf 0065 call 0x0065 - 05c4 0081 0346 lri $AR1, #0x0346 - 05c6 193e lrri $AC0.M, @$AR1 - 05c7 193c lrri $AC0.L, @$AR1 - 05c8 009f 0400 lri $AC1.M, #0x0400 - 05ca 00c0 0344 lr $AR0, @0x0344 - 05cc 02bf 05fb call 0x05fb - 05ce 0081 0348 lri $AR1, #0x0348 - 05d0 193e lrri $AC0.M, @$AR1 - 05d1 193c lrri $AC0.L, @$AR1 - 05d2 009f 0800 lri $AC1.M, #0x0800 - 05d4 00c0 0344 lr $AR0, @0x0344 - 05d6 02bf 05fb call 0x05fb - 05d8 0080 0400 lri $AR0, #0x0400 - 05da 0083 0800 lri $AR3, #0x0800 - 05dc 0084 0000 lri $IX0, #0x0000 - 05de 00da 0345 lr $AX0.H, @0x0345 - 05e0 00df 0344 lr $AC1.M, @0x0344 - 05e2 8f00 set40 - 05e3 197b lrri $AX1.H, @$AR3 - 05e4 b800 mulx $AX0.H, $AX1.H - 05e5 197b lrri $AX1.H, @$AR3 - 05e6 007f 05eb bloop $AC1.M, 0x05eb - 05e8 199e lrrn $AC0.M, @$AR0 - 05e9 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 05ea 80b2 nx'sl : $AC0.M, $AX1.H - 05eb 0000 nop - 05ec 8e00 set16 - 05ed 0081 0346 lri $AR1, #0x0346 - 05ef 193e lrri $AC0.M, @$AR1 - 05f0 193c lrri $AC0.L, @$AR1 - 05f1 009f 0400 lri $AC1.M, #0x0400 - 05f3 00c0 0344 lr $AR0, @0x0344 - 05f5 02bf 0608 call 0x0608 - 05f7 029f 0041 jmp 0x0041 - 05f9 193e lrri $AC0.M, @$AR1 - 05fa 193c lrri $AC0.L, @$AR1 - 05fb 2fcd srs @DSPA, $AC1.M - 05fc 0f00 lris $AC1.M, #0x00 - 05fd 2fc9 srs @DSCR, $AC1.M - 05fe 2ece srs @DSMAH, $AC0.M - 05ff 2ccf srs @DSMAL, $AC0.L - 0600 1fe0 mrr $AC1.M, $AR0 - 0601 1501 lsl $ACC1, #1 - 0602 2fcb srs @DSBL, $AC1.M - 0603 02bf 060c call 0x060c - 0605 02df ret - 0606 193e lrri $AC0.M, @$AR1 - 0607 193c lrri $AC0.L, @$AR1 - 0608 2fcd srs @DSPA, $AC1.M - 0609 0f01 lris $AC1.M, #0x01 - 060a 029f 05fd jmp 0x05fd - 060c 26c9 lrs $AC0.M, @DSCR - 060d 02a0 0004 andf $AC0.M, #0x0004 - 060f 029c 060c jlnz 0x060c - 0611 02df ret - 0612 193e lrri $AC0.M, @$AR1 - 0613 193c lrri $AC0.L, @$AR1 - 0614 00ff ffcd sr @DSPA, $AC1.M - 0616 0f00 lris $AC1.M, #0x00 - 0617 00ff ffc9 sr @DSCR, $AC1.M - 0619 00fe ffce sr @DSMAH, $AC0.M - 061b 00fc ffcf sr @DSMAL, $AC0.L - 061d 1fe0 mrr $AC1.M, $AR0 - 061e 1501 lsl $ACC1, #1 - 061f 00ff ffcb sr @DSBL, $AC1.M - 0621 02df ret - 0622 00de ffc9 lr $AC0.M, @DSCR - 0624 02a0 0004 andf $AC0.M, #0x0004 - 0626 029c 0622 jlnz 0x0622 - 0628 02df ret - 0629 0080 0346 lri $AR0, #0x0346 - 062b 02bf 0065 call 0x0065 - 062d 02bf 0065 call 0x0065 - 062f 0081 0346 lri $AR1, #0x0346 - 0631 00df 0349 lr $AC1.M, @0x0349 - 0633 0340 ffff andi $AC1.M, #0xffff - 0635 00c0 0345 lr $AR0, @0x0345 - 0637 02bf 05f9 call 0x05f9 - 0639 029f 0041 jmp 0x0041 - 063b 0080 0346 lri $AR0, #0x0346 - 063d 02bf 0065 call 0x0065 - 063f 02bf 0065 call 0x0065 - 0641 0081 0346 lri $AR1, #0x0346 - 0643 00df 0349 lr $AC1.M, @0x0349 - 0645 0340 ffff andi $AC1.M, #0xffff - 0647 00c0 0345 lr $AR0, @0x0345 - 0649 02bf 0606 call 0x0606 - 064b 029f 0041 jmp 0x0041 - 064d 0092 00ff lri $CR, #0x00ff - 064f 009e ffff lri $AC0.M, #0xffff - 0651 2ed4 srs @ACSAH, $AC0.M - 0652 2ed5 srs @ACSAL, $AC0.M - 0653 2ed6 srs @ACEAH, $AC0.M - 0654 2ed7 srs @ACEAL, $AC0.M - 0655 02df ret - 0656 00ff ffd1 sr @SampleFormat, $AC1.M - 0658 0340 0003 andi $AC1.M, #0x0003 - 065a 7900 decm $AC1.M - 065b 02ca lsrn - 065c 00df 037d lr $AC1.M, @0x037d - 065e 00dd 037e lr $AC1.L, @0x037e - 0660 4c00 add $ACC0, $ACC1 - 0661 00fe ffd8 sr @ACCAH, $AC0.M - 0663 00fc ffd9 sr @ACCAL, $AC0.L - 0665 02df ret - 0666 1fc3 mrr $AC0.M, $AR3 - 0667 043f addis $ACC0, #0x3f - 0668 0240 fff0 andi $AC0.M, #0xfff0 - 066a 00fe ffcd sr @DSPA, $AC0.M - 066c 1c1a mrr $AR0, $AX0.H - 066d 00da 037f lr $AX0.H, @0x037f - 066f 4400 addr $ACC0, $AX0.H - 0670 1f40 mrr $AX0.H, $AR0 - 0671 1c1e mrr $AR0, $AC0.M - 0672 1fda mrr $AC0.M, $AX0.H - 0673 041f addis $ACC0, #0x1f - 0674 0240 fff0 andi $AC0.M, #0xfff0 - 0676 1401 lsl $ACC0, #1 - 0677 00fe ffcb sr @DSBL, $AC0.M - 0679 00de ffc9 lr $AC0.M, @DSCR - 067b 02a0 0004 andf $AC0.M, #0x0004 - 067d 029c 0679 jlnz 0x0679 - 067f 007a 0682 bloop $AX0.H, 0x0682 - 0681 191e lrri $AC0.M, @$AR0 - 0682 1b7e srri @$AR3, $AC0.M - 0683 02df ret - 0684 8900 clr $ACC1 - 0685 1ffc mrr $AC1.M, $AC0.L - 0686 0340 001f andi $AC1.M, #0x001f - 0688 00ff 037f sr @0x037f, $AC1.M - 068a 1ffc mrr $AC1.M, $AC0.L - 068b 0340 ffe0 andi $AC1.M, #0xffe0 - 068d 1f9f mrr $AC0.L, $AC1.M - 068e 00df 037d lr $AC1.M, @0x037d - 0690 00dd 037e lr $AC1.L, @0x037e - 0692 4c00 add $ACC0, $ACC1 - 0693 00fe ffce sr @DSMAH, $AC0.M - 0695 00fc ffcf sr @DSMAL, $AC0.L - 0697 0f00 lris $AC1.M, #0x00 - 0698 00ff ffc9 sr @DSCR, $AC1.M - 069a 02df ret - 069b 00df 037f lr $AC1.M, @0x037f - 069d 157f lsr $ACC1, #-1 - 069e 00ff 037f sr @0x037f, $AC1.M - 06a0 02df ret - 06a1 8600 tstaxh $AX0.H - 06a2 02d5 retz - 06a3 1f1a mrr $AX0.L, $AX0.H - 06a4 009e 0780 lri $AC0.M, #0x0780 - 06a6 00fe ffcd sr @DSPA, $AC0.M - 06a8 1fda mrr $AC0.M, $AX0.H - 06a9 043f addis $ACC0, #0x3f - 06aa 0240 ffe0 andi $AC0.M, #0xffe0 - 06ac 00fe ffcb sr @DSBL, $AC0.M - 06ae 00de ffc9 lr $AC0.M, @DSCR - 06b0 02a0 0004 andf $AC0.M, #0x0004 - 06b2 029c 06ae jlnz 0x06ae - 06b4 8100 clr $ACC0 - 06b5 00de 037f lr $AC0.M, @0x037f - 06b7 147f lsr $ACC0, #-1 - 06b8 0200 0780 addi $AC0.M, #0x0780 - 06ba 1c1e mrr $AR0, $AC0.M - 06bb 00de 037f lr $AC0.M, @0x037f - 06bd 02a0 0001 andf $AC0.M, #0x0001 - 06bf 029d 06c8 jlz 0x06c8 - 06c1 8100 clr $ACC0 - 06c2 191e lrri $AC0.M, @$AR0 - 06c3 1488 asl $ACC0, #8 - 06c4 1b7e srri @$AR3, $AC0.M - 06c5 1fda mrr $AC0.M, $AX0.H - 06c6 7800 decm $AC0.M - 06c7 1f5e mrr $AX0.H, $AC0.M - 06c8 8100 clr $ACC0 - 06c9 1fda mrr $AC0.M, $AX0.H - 06ca 147f lsr $ACC0, #-1 - 06cb 007e 06d4 bloop $AC0.M, 0x06d4 - 06cd 8100 clr $ACC0 - 06ce 181e lrr $AC0.M, @$AR0 - 06cf 0240 ff00 andi $AC0.M, #0xff00 - 06d1 1b7e srri @$AR3, $AC0.M - 06d2 191e lrri $AC0.M, @$AR0 - 06d3 1488 asl $ACC0, #8 - 06d4 1b7e srri @$AR3, $AC0.M - 06d5 1fda mrr $AC0.M, $AX0.H - 06d6 1f58 mrr $AX0.H, $AX0.L - 06d7 02a0 0001 andf $AC0.M, #0x0001 - 06d9 02dd retlz - 06da 8100 clr $ACC0 - 06db 181e lrr $AC0.M, @$AR0 - 06dc 0240 ff00 andi $AC0.M, #0xff00 - 06de 1b7e srri @$AR3, $AC0.M - 06df 02df ret - 06e0 1205 sbclr #0x05 - 06e1 8e00 set16 - 06e2 00f0 03fd sr @0x03fd, $AC0.H - 06e4 00fc 03ff sr @0x03ff, $AC0.L - 06e6 f400 lsr16 $ACC0 - 06e7 00fc 03fe sr @0x03fe, $AC0.L - 06e9 00fa 03fa sr @0x03fa, $AX0.H - 06eb 8100 clr $ACC0 - 06ec 00de fffe lr $AC0.M, @CMBH - 06ee 02c0 8000 andcf $AC0.M, #0x8000 - 06f0 029c 07e1 jlnz 0x07e1 - 06f2 00da ffff lr $AX0.H, @CMBL - 06f4 8600 tstaxh $AX0.H - 06f5 0294 07ba jnz 0x07ba - 06f7 00de fffe lr $AC0.M, @CMBH - 06f9 02c0 8000 andcf $AC0.M, #0x8000 - 06fb 029c 06f7 jlnz 0x06f7 - 06fd 0240 000f andi $AC0.M, #0x000f - 06ff 1f5e mrr $AX0.H, $AC0.M - 0700 7400 incm $AC0.M - 0701 0c00 lris $AC0.L, #0x00 - 0702 1404 lsl $ACC0, #4 - 0703 00fe 034e sr @0x034e, $AC0.M - 0705 1fda mrr $AC0.M, $AX0.H - 0706 1f40 mrr $AX0.H, $AR0 - 0707 0200 04fc addi $AC0.M, #0x04fc - 0709 1c1e mrr $AR0, $AC0.M - 070a 00de ffff lr $AC0.M, @CMBL - 070c 1a1e srr @$AR0, $AC0.M - 070d 1c1a mrr $AR0, $AX0.H - 070e 00de 03fe lr $AC0.M, @0x03fe - 0710 00dc 03ff lr $AC0.L, @0x03ff - 0712 00d0 03fd lr $AC0.H, @0x03fd - 0714 00da 03fa lr $AX0.H, @0x03fa - 0716 1305 sbset #0x05 - 0717 02ff rti - 0718 009a 0002 lri $AX0.H, #0x0002 - 071a 00fa 03a3 sr @0x03a3, $AX0.H - 071c 00e0 03f9 sr @0x03f9, $AR0 - 071e 02bf 07a4 call 0x07a4 - 0720 16fc dcd1 si @DMBH, #0xdcd1 - 0722 16fd 0002 si @DMBL, #0x0002 - 0724 16fb 0001 si @DIRQ, #0x0001 - 0726 0021 halt - 0727 073f cmpis $ACC1, #0x3f - 0728 0740 cmpis $ACC1, #0x40 - 0729 0780 cmpis $ACC1, #0x80 - 072a 0783 cmpis $ACC1, #0x83 - 072b 00e0 03f9 sr @0x03f9, $AR0 - 072d 009e 0005 lri $AC0.M, #0x0005 - 072f 02bf 0792 call 0x0792 - 0731 8e00 set16 - 0732 8100 clr $ACC0 - 0733 8900 clr $ACC1 - 0734 02bf 0786 call 0x0786 - 0736 27ff lrs $AC1.M, @CMBL - 0737 009e 0727 lri $AC0.M, #0x0727 - 0739 4c00 add $ACC0, $ACC1 - 073a 1c7e mrr $AR3, $AC0.M - 073b 0313 ilrr $AC1.M, @$AR3 - 073c 1c7f mrr $AR3, $AC1.M - 073d 176f jmpr $AR3 - 073e 0021 halt - 073f 0021 halt - 0740 009a 0002 lri $AX0.H, #0x0002 - 0742 00fa 03a3 sr @0x03a3, $AX0.H - 0744 8100 clr $ACC0 - 0745 8900 clr $ACC1 - 0746 02bf 0786 call 0x0786 - 0748 24ff lrs $AC0.L, @CMBL - 0749 02bf 078c call 0x078c - 074b 25ff lrs $AC1.L, @CMBL - 074c 02bf 078c call 0x078c - 074e 27ff lrs $AC1.M, @CMBL - 074f 2ece srs @DSMAH, $AC0.M - 0750 2ccf srs @DSMAL, $AC0.L - 0751 16c9 0001 si @DSCR, #0x0001 - 0753 2fcd srs @DSPA, $AC1.M - 0754 2dcb srs @DSBL, $AC1.L - 0755 8100 clr $ACC0 - 0756 8900 clr $ACC1 - 0757 02bf 0786 call 0x0786 - 0759 24ff lrs $AC0.L, @CMBL - 075a 1c9e mrr $IX0, $AC0.M - 075b 1cbc mrr $IX1, $AC0.L - 075c 02bf 078c call 0x078c - 075e 25ff lrs $AC1.L, @CMBL - 075f 02bf 078c call 0x078c - 0761 27ff lrs $AC1.M, @CMBL - 0762 1cdf mrr $IX2, $AC1.M - 0763 1cfd mrr $IX3, $AC1.L - 0764 8100 clr $ACC0 - 0765 02bf 0786 call 0x0786 - 0767 26ff lrs $AC0.M, @CMBL - 0768 1c1e mrr $AR0, $AC0.M - 0769 8900 clr $ACC1 - 076a 02bf 078c call 0x078c - 076c 20ff lrs $AX0.L, @CMBL - 076d 1f5f mrr $AX0.H, $AC1.M - 076e 02bf 0786 call 0x0786 - 0770 21ff lrs $AX1.L, @CMBL - 0771 02bf 0786 call 0x0786 - 0773 23ff lrs $AX1.H, @CMBL - 0774 26c9 lrs $AC0.M, @DSCR - 0775 02a0 0004 andf $AC0.M, #0x0004 - 0777 029c 0774 jlnz 0x0774 - 0779 1206 sbclr #0x06 - 077a 1203 sbclr #0x03 - 077b 1204 sbclr #0x04 - 077c 1205 sbclr #0x05 - 077d 029f 80b5 jmp 0x80b5 - 077f 0021 halt - 0780 029f 8000 jmp 0x8000 - 0782 0021 halt - 0783 00c0 03f9 lr $AR0, @0x03f9 - 0785 170f jmpr $AR0 - 0786 26fe lrs $AC0.M, @CMBH - 0787 02c0 8000 andcf $AC0.M, #0x8000 - 0789 029c 0786 jlnz 0x0786 - 078b 02df ret - 078c 27fe lrs $AC1.M, @CMBH - 078d 03c0 8000 andcf $AC1.M, #0x8000 - 078f 029c 078c jlnz 0x078c - 0791 02df ret - 0792 02bf 07aa call 0x07aa - 0794 16fc dcd1 si @DMBH, #0xdcd1 - 0796 2efd srs @DMBL, $AC0.M - 0797 16fb 0001 si @DIRQ, #0x0001 - 0799 02bf 07aa call 0x07aa - 079b 02df ret - 079c 02bf 07aa call 0x07aa - 079e 16fc f355 si @DMBH, #0xf355 - 07a0 2efd srs @DMBL, $AC0.M - 07a1 02bf 07aa call 0x07aa - 07a3 02df ret - 07a4 26fc lrs $AC0.M, @DMBH - 07a5 02c0 8000 andcf $AC0.M, #0x8000 - 07a7 029d 07a4 jlz 0x07a4 - 07a9 02df ret - 07aa 27fc lrs $AC1.M, @DMBH - 07ab 03c0 8000 andcf $AC1.M, #0x8000 - 07ad 029d 07aa jlz 0x07aa - 07af 02df ret - 07b0 009a 0280 lri $AX0.H, #0x0280 - 07b2 00fa 0350 sr @0x0350, $AX0.H - 07b4 00fa 0351 sr @0x0351, $AX0.H - 07b6 0a00 lris $AX0.H, #0x00 - 07b7 00fa 0352 sr @0x0352, $AX0.H - 07b9 02df ret - 07ba 00e0 03fb sr @0x03fb, $AR0 - 07bc 00e8 03fc sr @0x03fc, $WR0 - 07be 00c0 0350 lr $AR0, @0x0350 - 07c0 0088 002f lri $WR0, #0x002f - 07c2 1b1a srri @$AR0, $AX0.H - 07c3 00de fffe lr $AC0.M, @CMBH - 07c5 02c0 8000 andcf $AC0.M, #0x8000 - 07c7 029c 07c3 jlnz 0x07c3 - 07c9 00dc ffff lr $AC0.L, @CMBL - 07cb 1b1e srri @$AR0, $AC0.M - 07cc 1b1c srri @$AR0, $AC0.L - 07cd 1fda mrr $AC0.M, $AX0.H - 07ce 7800 decm $AC0.M - 07cf 1f5e mrr $AX0.H, $AC0.M - 07d0 8600 tstaxh $AX0.H - 07d1 0294 07c3 jnz 0x07c3 - 07d3 8100 clr $ACC0 - 07d4 00de 0352 lr $AC0.M, @0x0352 - 07d6 7400 incm $AC0.M - 07d7 00fe 0352 sr @0x0352, $AC0.M - 07d9 00e0 0350 sr @0x0350, $AR0 - 07db 00c0 03fb lr $AR0, @0x03fb - 07dd 00c8 03fc lr $WR0, @0x03fc - 07df 029f 070e jmp 0x070e - 07e1 00e0 03fb sr @0x03fb, $AR0 - 07e3 00e8 03fc sr @0x03fc, $WR0 - 07e5 00c0 0350 lr $AR0, @0x0350 - 07e7 0088 002f lri $WR0, #0x002f - 07e9 0a00 lris $AX0.H, #0x00 - 07ea 1b1a srri @$AR0, $AX0.H - 07eb 029f 07d3 jmp 0x07d3 - 07ed 00c0 0351 lr $AR0, @0x0351 - 07ef 0088 002f lri $WR0, #0x002f - 07f1 00da 0352 lr $AX0.H, @0x0352 - 07f3 8600 tstaxh $AX0.H - 07f4 0295 0815 jz 0x0815 - 07f6 1205 sbclr #0x05 - 07f7 00da 0352 lr $AX0.H, @0x0352 - 07f9 1fda mrr $AC0.M, $AX0.H - 07fa 7800 decm $AC0.M - 07fb 00fe 0352 sr @0x0352, $AC0.M - 07fd 1305 sbset #0x05 - 07fe 0081 0356 lri $AR1, #0x0356 - 0800 191e lrri $AC0.M, @$AR0 - 0801 02c0 8000 andcf $AC0.M, #0x8000 - 0803 029d 0819 jlz 0x0819 - 0805 1f5e mrr $AX0.H, $AC0.M - 0806 8600 tstaxh $AX0.H - 0807 0295 081d jz 0x081d - 0809 007a 080e bloop $AX0.H, 0x080e - 080b 191e lrri $AC0.M, @$AR0 - 080c 1b3e srri @$AR1, $AC0.M - 080d 191e lrri $AC0.M, @$AR0 - 080e 1b3e srri @$AR1, $AC0.M - 080f 00e0 0351 sr @0x0351, $AR0 - 0811 0088 ffff lri $WR0, #0xffff - 0813 029f 002d jmp 0x002d - 0815 0088 ffff lri $WR0, #0xffff - 0817 029f 002b jmp 0x002b - 0819 00e0 0351 sr @0x0351, $AR0 - 081b 029f 07f1 jmp 0x07f1 - 081d 0080 07ed lri $AR0, #0x07ed - 081f 029f 0718 jmp 0x0718 - 0821 8100 clr $ACC0 - 0822 0e10 lris $AC0.M, #0x10 - 0823 2232 lrs $AX0.H, @0x0032 - 0824 8600 tstaxh $AX0.H - 0825 02d5 retz - 0826 5400 subr $ACC0, $AX0.H - 0827 0200 0458 addi $AC0.M, #0x0458 - 0829 1c1e mrr $AR0, $AC0.M - 082a 1fda mrr $AC0.M, $AX0.H - 082b 04fe addis $ACC0, #0xfe - 082c 1f1e mrr $AX0.L, $AC0.M - 082d 191e lrri $AC0.M, @$AR0 - 082e 0291 0834 jl 0x0834 - 0830 191a lrri $AX0.H, @$AR0 - 0831 0058 loop $AX0.L - 0832 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0833 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 0834 1b7e srri @$AR3, $AC0.M - 0835 02df ret - 0836 02bf 0821 call 0x0821 - 0838 8100 clr $ACC0 - 0839 2632 lrs $AC0.M, @0x0032 - 083a 5c00 sub $ACC0, $ACC1 - 083b 2e32 srs @0x0032, $AC0.M - 083c 0092 00ff lri $CR, #0x00ff - 083e 02df ret - 083f 00de 04fb lr $AC0.M, @0x04fb - 0841 7400 incm $AC0.M - 0842 00fe 04fb sr @0x04fb, $AC0.M - 0844 8100 clr $ACC0 - 0845 2e32 srs @0x0032, $AC0.M - 0846 2e66 srs @0x0066, $AC0.M - 0847 2e67 srs @0x0067, $AC0.M - 0848 268a lrs $AC0.M, @0xff8a - 0849 248b lrs $AC0.L, @0xff8b - 084a 2e3a srs @0x003a, $AC0.M - 084b 2c3b srs @0x003b, $AC0.L - 084c 268c lrs $AC0.M, @0xff8c - 084d 248d lrs $AC0.L, @0xff8d - 084e 2e38 srs @0x0038, $AC0.M - 084f 2c39 srs @0x0039, $AC0.L - 0850 02df ret - 0851 8100 clr $ACC0 - 0852 2689 lrs $AC0.M, @0xff89 - 0853 0240 000f andi $AC0.M, #0x000f - 0855 1f5e mrr $AX0.H, $AC0.M - 0856 8100 clr $ACC0 - 0857 0e10 lris $AC0.M, #0x10 - 0858 5400 subr $ACC0, $AX0.H - 0859 2e32 srs @0x0032, $AC0.M - 085a 268a lrs $AC0.M, @0xff8a - 085b 248b lrs $AC0.L, @0xff8b - 085c 2288 lrs $AX0.H, @0xff88 - 085d 2089 lrs $AX0.L, @0xff89 - 085e 5800 subax $ACC0, $AX0.L - 085f 0a00 lris $AX0.H, #0x00 - 0860 2032 lrs $AX0.L, @0x0032 - 0861 5800 subax $ACC0, $AX0.L - 0862 2e3a srs @0x003a, $AC0.M - 0863 2c3b srs @0x003b, $AC0.L - 0864 02df ret - 0865 0092 0004 lri $CR, #0x0004 - 0867 8100 clr $ACC0 - 0868 2604 lrs $AC0.M, @0x0004 - 0869 b100 tst $ACC0 - 086a 02b4 083f callnz 0x083f - 086c 8100 clr $ACC0 - 086d 2601 lrs $AC0.M, @0x0001 - 086e b100 tst $ACC0 - 086f 0294 090d jnz 0x090d - 0871 2232 lrs $AX0.H, @0x0032 - 0872 c900 cmpar $ACC0, $AX1.H - 0873 0293 0836 jle 0x0836 - 0875 5500 subr $ACC1, $AX0.H - 0876 02bf 0821 call 0x0821 - 0878 223a lrs $AX0.H, @0x003a - 0879 8600 tstaxh $AX0.H - 087a 0294 0881 jnz 0x0881 - 087c 8100 clr $ACC0 - 087d 263b lrs $AC0.M, @0x003b - 087e 8200 cmp - 087f 0291 08d3 jl 0x08d3 - 0881 8100 clr $ACC0 - 0882 1fdf mrr $AC0.M, $AC1.M - 0883 040f addis $ACC0, #0x0f - 0884 147c lsr $ACC0, #-4 - 0885 1f7e mrr $AX1.H, $AC0.M - 0886 0c00 lris $AC0.L, #0x00 - 0887 1404 lsl $ACC0, #4 - 0888 1f1e mrr $AX0.L, $AC0.M - 0889 0a00 lris $AX0.H, #0x00 - 088a 8100 clr $ACC0 - 088b 263a lrs $AC0.M, @0x003a - 088c 243b lrs $AC0.L, @0x003b - 088d 5800 subax $ACC0, $AX0.L - 088e 0290 0899 jge 0x0899 - 0890 8100 clr $ACC0 - 0891 263b lrs $AC0.M, @0x003b - 0892 5c00 sub $ACC0, $ACC1 - 0893 2e32 srs @0x0032, $AC0.M - 0894 8100 clr $ACC0 - 0895 2e3a srs @0x003a, $AC0.M - 0896 2e3b srs @0x003b, $AC0.M - 0897 029f 089f jmp 0x089f - 0899 2e3a srs @0x003a, $AC0.M - 089a 2c3b srs @0x003b, $AC0.L - 089b 0c00 lris $AC0.L, #0x00 - 089c 1fd8 mrr $AC0.M, $AX0.L - 089d 5c00 sub $ACC0, $ACC1 - 089e 2e32 srs @0x0032, $AC0.M - 089f 8100 clr $ACC0 - 08a0 1fdb mrr $AC0.M, $AX1.H - 08a1 02bf 0913 call 0x0913 - 08a3 2232 lrs $AX0.H, @0x0032 - 08a4 8600 tstaxh $AX0.H - 08a5 0295 08d0 jz 0x08d0 - 08a7 0a10 lris $AX0.H, #0x10 - 08a8 8100 clr $ACC0 - 08a9 1fc3 mrr $AC0.M, $AR3 - 08aa 5400 subr $ACC0, $AX0.H - 08ab 1c7e mrr $AR3, $AC0.M - 08ac 0080 0458 lri $AR0, #0x0458 - 08ae 197e lrri $AC0.M, @$AR3 - 08af 197a lrri $AX0.H, @$AR3 - 08b0 100e loopi #0x0e - 08b1 64a2 movr'sl $ACC0, $AX0.H : $AC0.M, $AX0.H - 08b2 1b1e srri @$AR0, $AC0.M - 08b3 1b1a srri @$AR0, $AX0.H - 08b4 8100 clr $ACC0 - 08b5 263a lrs $AC0.M, @0x003a - 08b6 243b lrs $AC0.L, @0x003b - 08b7 b100 tst $ACC0 - 08b8 0294 08d0 jnz 0x08d0 - 08ba 2232 lrs $AX0.H, @0x0032 - 08bb 8600 tstaxh $AX0.H - 08bc 0295 08d0 jz 0x08d0 - 08be 0080 0467 lri $AR0, #0x0467 - 08c0 8100 clr $ACC0 - 08c1 268b lrs $AC0.M, @0xff8b - 08c2 b100 tst $ACC0 - 08c3 0295 08d0 jz 0x08d0 - 08c5 0200 000f addi $AC0.M, #0x000f - 08c7 0240 000f andi $AC0.M, #0x000f - 08c9 0200 0458 addi $AC0.M, #0x0458 - 08cb 1c7e mrr $AR3, $AC0.M - 08cc 007a 08cf bloop $AX0.H, 0x08cf - 08ce 18fe lrrd $AC0.M, @$AR3 - 08cf 1a9e srrd @$AR0, $AC0.M - 08d0 0092 00ff lri $CR, #0x00ff - 08d2 02df ret - 08d3 b100 tst $ACC0 - 08d4 0295 08e3 jz 0x08e3 - 08d6 5d00 sub $ACC1, $ACC0 - 08d7 040f addis $ACC0, #0x0f - 08d8 147c lsr $ACC0, #-4 - 08d9 0c00 lris $AC0.L, #0x00 - 08da 00e3 0363 sr @0x0363, $AR3 - 08dc 02bf 0913 call 0x0913 - 08de 00de 0363 lr $AC0.M, @0x0363 - 08e0 223b lrs $AX0.H, @0x003b - 08e1 4400 addr $ACC0, $AX0.H - 08e2 1c7e mrr $AR3, $AC0.M - 08e3 8100 clr $ACC0 - 08e4 2681 lrs $AC0.M, @0xff81 - 08e5 b100 tst $ACC0 - 08e6 0295 090b jz 0x090b - 08e8 2380 lrs $AX1.H, @0xff80 - 08e9 2688 lrs $AC0.M, @0xff88 - 08ea 2489 lrs $AC0.L, @0xff89 - 08eb 1408 lsl $ACC0, #8 - 08ec 14f4 asr $ACC0, #-12 - 08ed 2380 lrs $AX1.H, @0xff80 - 08ee 8d00 set15 - 08ef c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - 08f0 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 08f1 8c00 clr15 - 08f2 f000 lsl16 $ACC0 - 08f3 4e00 addp $ACC0 - 08f4 238c lrs $AX1.H, @0xff8c - 08f5 218d lrs $AX1.L, @0xff8d - 08f6 4a00 addax $ACC0, $AX1.L - 08f7 2e38 srs @0x0038, $AC0.M - 08f8 2c39 srs @0x0039, $AC0.L - 08f9 2682 lrs $AC0.M, @0xff82 - 08fa 2e67 srs @0x0067, $AC0.M - 08fb 2683 lrs $AC0.M, @0xff83 - 08fc 2e66 srs @0x0066, $AC0.M - 08fd 00e3 0363 sr @0x0363, $AR3 - 08ff 0083 0458 lri $AR3, #0x0458 - 0901 8100 clr $ACC0 - 0902 0e01 lris $AC0.M, #0x01 - 0903 02bf 0913 call 0x0913 - 0905 00c3 0363 lr $AR3, @0x0363 - 0907 02bf 0851 call 0x0851 - 0909 029f 0871 jmp 0x0871 - 090b 0e01 lris $AC0.M, #0x01 - 090c 2e01 srs @0x0001, $AC0.M - 090d 8100 clr $ACC0 - 090e 005f loop $AC1.M - 090f 1b7e srri @$AR3, $AC0.M - 0910 0092 00ff lri $CR, #0x00ff - 0912 02df ret - 0913 00ff 0360 sr @0x0360, $AC1.M - 0915 00fe 0361 sr @0x0361, $AC0.M - 0917 2638 lrs $AC0.M, @0x0038 - 0918 2439 lrs $AC0.L, @0x0039 - 0919 0f05 lris $AC1.M, #0x05 - 091a 02bf 0656 call 0x0656 - 091c 2638 lrs $AC0.M, @0x0038 - 091d 2439 lrs $AC0.L, @0x0039 - 091e 8900 clr $ACC1 - 091f 00df 0361 lr $AC1.M, @0x0361 - 0921 2280 lrs $AX0.H, @0xff80 - 0922 d000 mulc $AC1.M, $AX0.H - 0923 6f00 movp $ACC1 - 0924 4c00 add $ACC0, $ACC1 - 0925 2e38 srs @0x0038, $AC0.M - 0926 2c39 srs @0x0039, $AC0.L - 0927 8100 clr $ACC0 - 0928 00de 0361 lr $AC0.M, @0x0361 - 092a 007e 0991 bloop $AC0.M, 0x0991 - 092c 0080 ffd3 lri $AR0, #0xffd3 - 092e 0084 0000 lri $IX0, #0x0000 - 0930 199e lrrn $AC0.M, @$AR0 - 0931 8900 clr $ACC1 - 0932 1ffe mrr $AC1.M, $AC0.M - 0933 1401 lsl $ACC0, #1 - 0934 0240 001e andi $AC0.M, #0x001e - 0936 0200 0300 addi $AC0.M, #0x0300 - 0938 1c3e mrr $AR1, $AC0.M - 0939 157c lsr $ACC1, #-4 - 093a 0340 000f andi $AC1.M, #0x000f - 093c 0a11 lris $AX0.H, #0x11 - 093d 5500 subr $ACC1, $AX0.H - 093e 8100 clr $ACC0 - 093f 2680 lrs $AC0.M, @0xff80 - 0940 0605 cmpis $ACC0, #0x05 - 0941 0295 095a jz 0x095a - 0943 009a 00f0 lri $AX0.H, #0x00f0 - 0945 0b0f lris $AX1.H, #0x0f - 0946 0082 0364 lri $AR2, #0x0364 - 0948 1998 lrrn $AX0.L, @$AR0 - 0949 6000 movr $ACC0, $AX0.L - 094a 1107 0951 bloopi #0x07, 0x0951 - 094c 3400 andr $AC0.M, $AX0.H - 094d 1408 lsl $ACC0, #8 - 094e 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 094f 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 0950 140c lsl $ACC0, #12 - 0951 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0952 3400 andr $AC0.M, $AX0.H - 0953 1408 lsl $ACC0, #8 - 0954 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0955 3600 andr $AC0.M, $AX1.H - 0956 140c lsl $ACC0, #12 - 0957 1b5e srri @$AR2, $AC0.M - 0958 029f 097a jmp 0x097a - 095a 009a c000 lri $AX0.H, #0xc000 - 095c 0082 0364 lri $AR2, #0x0364 - 095e 1998 lrrn $AX0.L, @$AR0 - 095f 6000 movr $ACC0, $AX0.L - 0960 1103 096d bloopi #0x03, 0x096d - 0962 1408 lsl $ACC0, #8 - 0963 3400 andr $AC0.M, $AX0.H - 0964 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0965 140a lsl $ACC0, #10 - 0966 3400 andr $AC0.M, $AX0.H - 0967 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0968 140c lsl $ACC0, #12 - 0969 3400 andr $AC0.M, $AX0.H - 096a 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 096b 140e lsl $ACC0, #14 - 096c 3444 andr'ln $AC0.M, $AX0.H : $AX0.L, @$AR0 - 096d 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 096e 1408 lsl $ACC0, #8 - 096f 3400 andr $AC0.M, $AX0.H - 0970 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0971 140a lsl $ACC0, #10 - 0972 3400 andr $AC0.M, $AX0.H - 0973 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0974 140c lsl $ACC0, #12 - 0975 3400 andr $AC0.M, $AX0.H - 0976 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0977 140e lsl $ACC0, #14 - 0978 3400 andr $AC0.M, $AX0.H - 0979 1b5e srri @$AR2, $AC0.M - 097a 8f00 set40 - 097b 1f7f mrr $AX1.H, $AC1.M - 097c 2066 lrs $AX0.L, @0x0066 - 097d 2767 lrs $AC1.M, @0x0067 - 097e 193a lrri $AX0.H, @$AR1 - 097f 1939 lrri $AX1.L, @$AR1 - 0980 0080 0364 lri $AR0, #0x0364 - 0982 a000 mulx $AX0.L, $AX1.L - 0983 ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - 0984 1108 098d bloopi #0x08, 0x098d - 0986 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0987 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0988 1485 asl $ACC0, #5 - 0989 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 098a 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 098b a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 098c 1585 asl $ACC1, #5 - 098d ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - 098e 2f67 srs @0x0067, $AC1.M - 098f 8e00 set16 - 0990 1ff8 mrr $AC1.M, $AX0.L - 0991 2f66 srs @0x0066, $AC1.M - 0992 8900 clr $ACC1 - 0993 00df 0360 lr $AC1.M, @0x0360 - 0995 02df ret - 0996 b100 tst $ACC0 - 0997 02d5 retz - 0998 04fe addis $ACC0, #0xfe - 0999 1f1e mrr $AX0.L, $AC0.M - 099a 191e lrri $AC0.M, @$AR0 - 099b 0291 09a1 jl 0x09a1 - 099d 191a lrri $AX0.H, @$AR0 - 099e 0058 loop $AX0.L - 099f 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 09a0 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 09a1 1b7e srri @$AR3, $AC0.M - 09a2 02df ret - 09a3 8100 clr $ACC0 - 09a4 1f5e mrr $AX0.H, $AC0.M - 09a5 00d8 0402 lr $AX0.L, @0x0402 - 09a7 00dc 0430 lr $AC0.L, @0x0430 - 09a9 0080 0520 lri $AR0, #0x0520 - 09ab 00df 0480 lr $AC1.M, @0x0480 - 09ad 1501 lsl $ACC1, #1 - 09ae 0340 007e andi $AC1.M, #0x007e - 09b0 0300 09b8 addi $AC1.M, #0x09b8 - 09b2 1c5f mrr $AR2, $AC1.M - 09b3 175f callr $AR2 - 09b4 00fc 0430 sr @0x0430, $AC0.L - 09b6 029f 0338 jmp 0x0338 - 09b8 029f 09d9 jmp 0x09d9 - 09ba 029f 0a14 jmp 0x0a14 - 09bc 029f 09fc jmp 0x09fc - 09be 029f 09e9 jmp 0x09e9 - 09c0 029f 0a22 jmp 0x0a22 - 09c2 029f 09d8 jmp 0x09d8 - 09c4 029f 0a40 jmp 0x0a40 - 09c6 029f 0a43 jmp 0x0a43 - 09c8 029f 09d8 jmp 0x09d8 - 09ca 029f 09d8 jmp 0x09d8 - 09cc 029f 0a61 jmp 0x0a61 - 09ce 029f 0a1a jmp 0x0a1a - 09d0 029f 0a1e jmp 0x0a1e - 09d2 029f 09d8 jmp 0x09d8 - 09d4 029f 09d8 jmp 0x09d8 - 09d6 029f 09d8 jmp 0x09d8 - 09d8 02df ret - 09d9 1401 lsl $ACC0, #1 - 09da 009b c000 lri $AX1.H, #0xc000 - 09dc 0099 4000 lri $AX1.L, #0x4000 - 09de 1150 09e6 bloopi #0x50, 0x09e6 - 09e0 02c0 0001 andcf $AC0.M, #0x0001 - 09e2 027c iflnz - 09e3 1b1b srri @$AR0, $AX1.H - 09e4 027d iflz - 09e5 1b19 srri @$AR0, $AX1.L - 09e6 4800 addax $ACC0, $AX0.L - 09e7 147f lsr $ACC0, #-1 - 09e8 02df ret - 09e9 1402 lsl $ACC0, #2 - 09ea 8900 clr $ACC1 - 09eb 1fb8 mrr $AC1.L, $AX0.L - 09ec 1501 lsl $ACC1, #1 - 09ed 009b c000 lri $AX1.H, #0xc000 - 09ef 0099 4000 lri $AX1.L, #0x4000 - 09f1 1150 09f9 bloopi #0x50, 0x09f9 - 09f3 02c0 0003 andcf $AC0.M, #0x0003 - 09f5 027c iflnz - 09f6 1b1b srri @$AR0, $AX1.H - 09f7 027d iflz - 09f8 1b19 srri @$AR0, $AX1.L - 09f9 4c00 add $ACC0, $ACC1 - 09fa 147e lsr $ACC0, #-2 - 09fb 02df ret - 09fc 1401 lsl $ACC0, #1 - 09fd 0081 0ca0 lri $AR1, #0x0ca0 - 09ff 009b c000 lri $AX1.H, #0xc000 - 0a01 0099 4000 lri $AX1.L, #0x4000 - 0a03 8900 clr $ACC1 - 0a04 0082 0000 lri $AR2, #0x0000 - 0a06 1150 0a11 bloopi #0x50, 0x0a11 - 0a08 02c0 0001 andcf $AC0.M, #0x0001 - 0a0a 027c iflnz - 0a0b 1b1b srri @$AR0, $AX1.H - 0a0c 027d iflz - 0a0d 1b19 srri @$AR0, $AX1.L - 0a0e 183d lrr $AC1.L, @$AR1 - 0a0f 4900 addax $ACC1, $AX0.L - 0a10 1fe2 mrr $AC1.M, $AR2 - 0a11 4c39 add's $ACC0, $ACC1 : @$AR1, $AC1.M - 0a12 147f lsr $ACC0, #-1 - 0a13 02df ret - 0a14 8900 clr $ACC1 - 0a15 1fb8 mrr $AC1.L, $AX0.L - 0a16 157f lsr $ACC1, #-1 - 0a17 1050 loopi #0x50 - 0a18 4c20 add's $ACC0, $ACC1 : @$AR0, $AC0.L - 0a19 02df ret - 0a1a 0082 0180 lri $AR2, #0x0180 - 0a1c 029f 0a24 jmp 0x0a24 - 0a1e 0082 01c0 lri $AR2, #0x01c0 - 0a20 029f 0a24 jmp 0x0a24 - 0a22 0082 0140 lri $AR2, #0x0140 - 0a24 008a 003f lri $WR2, #0x003f - 0a26 0086 0000 lri $IX2, #0x0000 - 0a28 1406 lsl $ACC0, #6 - 0a29 8900 clr $ACC1 - 0a2a 1fb8 mrr $AC1.L, $AX0.L - 0a2b 1505 lsl $ACC1, #5 - 0a2c 009b 003f lri $AX1.H, #0x003f - 0a2e 009a 0000 lri $AX0.H, #0x0000 - 0a30 3600 andr $AC0.M, $AX1.H - 0a31 1cde mrr $IX2, $AC0.M - 0a32 001a addarn $AR2, $IX2 - 0a33 3400 andr $AC0.M, $AX0.H - 0a34 1150 0a3a bloopi #0x50, 0x0a3a - 0a36 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a37 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a38 1cde mrr $IX2, $AC0.M - 0a39 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a3a 1b19 srri @$AR0, $AX1.L - 0a3b 1fc2 mrr $AC0.M, $AR2 - 0a3c 147a lsr $ACC0, #-6 - 0a3d 008a ffff lri $WR2, #0xffff - 0a3f 02df ret - 0a40 1050 loopi #0x50 - 0a41 1b18 srri @$AR0, $AX0.L - 0a42 02df ret - 0a43 0082 0100 lri $AR2, #0x0100 - 0a45 008a 003f lri $WR2, #0x003f - 0a47 0086 0000 lri $IX2, #0x0000 - 0a49 1406 lsl $ACC0, #6 - 0a4a 8900 clr $ACC1 - 0a4b 1fb8 mrr $AC1.L, $AX0.L - 0a4c 1505 lsl $ACC1, #5 - 0a4d 009b 003f lri $AX1.H, #0x003f - 0a4f 009a 0000 lri $AX0.H, #0x0000 - 0a51 3600 andr $AC0.M, $AX1.H - 0a52 1cde mrr $IX2, $AC0.M - 0a53 001a addarn $AR2, $IX2 - 0a54 3400 andr $AC0.M, $AX0.H - 0a55 1150 0a5b bloopi #0x50, 0x0a5b - 0a57 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a58 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a59 1cde mrr $IX2, $AC0.M - 0a5a 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a5b 1b19 srri @$AR0, $AX1.L - 0a5c 1fc2 mrr $AC0.M, $AR2 - 0a5d 147a lsr $ACC0, #-6 - 0a5e 008a ffff lri $WR2, #0xffff - 0a60 02df ret - 0a61 0082 0100 lri $AR2, #0x0100 - 0a63 008a 003f lri $WR2, #0x003f - 0a65 0086 0000 lri $IX2, #0x0000 - 0a67 0081 0ca0 lri $AR1, #0x0ca0 - 0a69 1406 lsl $ACC0, #6 - 0a6a 8900 clr $ACC1 - 0a6b 1fb8 mrr $AC1.L, $AX0.L - 0a6c 1505 lsl $ACC1, #5 - 0a6d 009b 003f lri $AX1.H, #0x003f - 0a6f 009a 0000 lri $AX0.H, #0x0000 - 0a71 3600 andr $AC0.M, $AX1.H - 0a72 1cde mrr $IX2, $AC0.M - 0a73 001a addarn $AR2, $IX2 - 0a74 3400 andr $AC0.M, $AX0.H - 0a75 1150 0a80 bloopi #0x50, 0x0a80 - 0a77 1939 lrri $AX1.L, @$AR1 - 0a78 a000 mulx $AX0.L, $AX1.L - 0a79 140a lsl $ACC0, #10 - 0a7a 4e00 addp $ACC0 - 0a7b 1476 lsr $ACC0, #-10 - 0a7c 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a7d 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a7e 1cde mrr $IX2, $AC0.M - 0a7f 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a80 1b19 srri @$AR0, $AX1.L - 0a81 1fc2 mrr $AC0.M, $AR2 - 0a82 147a lsr $ACC0, #-6 - 0a83 008a ffff lri $WR2, #0xffff - 0a85 02df ret - 0a86 0080 01be lri $AR0, #0x01be - 0a88 1918 lrri $AX0.L, @$AR0 - 0a89 191a lrri $AX0.H, @$AR0 - 0a8a 0080 0180 lri $AR0, #0x0180 - 0a8c 0083 0180 lri $AR3, #0x0180 - 0a8e 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0a8f 1ffe mrr $AC1.M, $AC0.M - 0a90 1120 0a97 bloopi #0x20, 0x0a97 - 0a92 7c00 neg $ACC0 - 0a93 d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0a94 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0a95 c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 0a96 1501 lsl $ACC1, #1 - 0a97 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - 0a98 0080 01fe lri $AR0, #0x01fe - 0a9a 191a lrri $AX0.H, @$AR0 - 0a9b 1918 lrri $AX0.L, @$AR0 - 0a9c 0080 01c0 lri $AR0, #0x01c0 - 0a9e 0083 01c0 lri $AR3, #0x01c0 - 0aa0 1ff8 mrr $AC1.M, $AX0.L - 0aa1 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0aa2 f800 addpaxz $ACC0, $AX0.H - 0aa3 0240 01ff andi $AC0.M, #0x01ff - 0aa5 0260 2000 ori $AC0.M, #0x2000 - 0aa7 02bf 0aaa call 0x0aaa - 0aa9 02df ret - 0aaa b900 tst $ACC1 - 0aab 0272 ifg - 0aac 7c00 neg $ACC0 - 0aad 1f7e mrr $AX1.H, $AC0.M - 0aae 4700 addr $ACC1, $AX1.H - 0aaf 1110 0ab4 bloopi #0x10, 0x0ab4 - 0ab1 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0ab2 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0ab3 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0ab4 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0ab5 02df ret - 0ab6 02bf 0b23 call 0x0b23 - 0ab8 2201 lrs $AX0.H, @0x0001 - 0ab9 8600 tstaxh $AX0.H - 0aba 0294 0acb jnz 0x0acb - 0abc 2204 lrs $AX0.H, @0x0004 - 0abd 8600 tstaxh $AX0.H - 0abe 02b4 0b12 callnz 0x0b12 - 0ac0 8100 clr $ACC0 - 0ac1 2605 lrs $AC0.M, @0x0005 - 0ac2 b100 tst $ACC0 - 0ac3 0295 0ad8 jz 0x0ad8 - 0ac5 8100 clr $ACC0 - 0ac6 2e05 srs @0x0005, $AC0.M - 0ac7 2281 lrs $AX0.H, @0xff81 - 0ac8 8600 tstaxh $AX0.H - 0ac9 0294 0ad2 jnz 0x0ad2 - 0acb 8100 clr $ACC0 - 0acc 005f loop $AC1.M - 0acd 1b7e srri @$AR3, $AC0.M - 0ace 7400 incm $AC0.M - 0acf 2e01 srs @0x0001, $AC0.M - 0ad0 029f 0b0b jmp 0x0b0b - 0ad2 2688 lrs $AC0.M, @0xff88 - 0ad3 2489 lrs $AC0.L, @0xff89 - 0ad4 2e34 srs @0x0034, $AC0.M - 0ad5 2c35 srs @0x0035, $AC0.L - 0ad6 02bf 0b12 call 0x0b12 - 0ad8 00ff 0360 sr @0x0360, $AC1.M - 0ada 2638 lrs $AC0.M, @0x0038 - 0adb 2439 lrs $AC0.L, @0x0039 - 0adc 02bf 0684 call 0x0684 - 0ade 00df 0360 lr $AC1.M, @0x0360 - 0ae0 8100 clr $ACC0 - 0ae1 263a lrs $AC0.M, @0x003a - 0ae2 b100 tst $ACC0 - 0ae3 0294 0af2 jnz 0x0af2 - 0ae5 263b lrs $AC0.M, @0x003b - 0ae6 5c00 sub $ACC0, $ACC1 - 0ae7 0290 0af2 jge 0x0af2 - 0ae9 223b lrs $AX0.H, @0x003b - 0aea 02bf 06a1 call 0x06a1 - 0aec 5500 subr $ACC1, $AX0.H - 0aed 0a01 lris $AX0.H, #0x01 - 0aee 00fa 0405 sr @0x0405, $AX0.H - 0af0 029f 0ac5 jmp 0x0ac5 - 0af2 1f5f mrr $AX0.H, $AC1.M - 0af3 02bf 06a1 call 0x06a1 - 0af5 00fa 0362 sr @0x0362, $AX0.H - 0af7 8100 clr $ACC0 - 0af8 263a lrs $AC0.M, @0x003a - 0af9 243b lrs $AC0.L, @0x003b - 0afa 1570 lsr $ACC1, #-16 - 0afb 0a01 lris $AX0.H, #0x01 - 0afc 0081 0405 lri $AR1, #0x0405 - 0afe 5c00 sub $ACC0, $ACC1 - 0aff b100 tst $ACC0 - 0b00 0275 ifz - 0b01 1a3a srr @$AR1, $AX0.H - 0b02 2e3a srs @0x003a, $AC0.M - 0b03 2c3b srs @0x003b, $AC0.L - 0b04 2638 lrs $AC0.M, @0x0038 - 0b05 2439 lrs $AC0.L, @0x0039 - 0b06 00d8 0362 lr $AX0.L, @0x0362 - 0b08 7000 addaxl $ACC0, $AX0.L - 0b09 2c39 srs @0x0039, $AC0.L - 0b0a 2e38 srs @0x0038, $AC0.M - 0b0b 0092 00ff lri $CR, #0x00ff - 0b0d 029f 0330 jmp 0x0330 - 0b0f 8100 clr $ACC0 - 0b10 2e34 srs @0x0034, $AC0.M - 0b11 2e35 srs @0x0035, $AC0.M - 0b12 2334 lrs $AX1.H, @0x0034 - 0b13 2135 lrs $AX1.L, @0x0035 - 0b14 268a lrs $AC0.M, @0xff8a - 0b15 248b lrs $AC0.L, @0xff8b - 0b16 5a00 subax $ACC0, $AX1.L - 0b17 2e3a srs @0x003a, $AC0.M - 0b18 2c3b srs @0x003b, $AC0.L - 0b19 2634 lrs $AC0.M, @0x0034 - 0b1a 2435 lrs $AC0.L, @0x0035 - 0b1b 238c lrs $AX1.H, @0xff8c - 0b1c 218d lrs $AX1.L, @0xff8d - 0b1d 4a00 addax $ACC0, $AX1.L - 0b1e 2e38 srs @0x0038, $AC0.M - 0b1f 2c39 srs @0x0039, $AC0.L - 0b20 8100 clr $ACC0 - 0b21 2e05 srs @0x0005, $AC0.M - 0b22 02df ret - 0b23 0092 0004 lri $CR, #0x0004 - 0b25 2002 lrs $AX0.L, @0x0002 - 0b26 8100 clr $ACC0 - 0b27 8900 clr $ACC1 - 0b28 2430 lrs $AC0.L, @0x0030 - 0b29 8d00 set15 - 0b2a 0950 lris $AX1.L, #0x50 - 0b2b a000 mulx $AX0.L, $AX1.L - 0b2c a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0b2d 1404 lsl $ACC0, #4 - 0b2e 8c00 clr15 - 0b2f 1ffe mrr $AC1.M, $AC0.M - 0b30 0083 0580 lri $AR3, #0x0580 - 0b32 02df ret - 0b33 02bf 0b23 call 0x0b23 - 0b35 2201 lrs $AX0.H, @0x0001 - 0b36 8600 tstaxh $AX0.H - 0b37 0294 0b48 jnz 0x0b48 - 0b39 2204 lrs $AX0.H, @0x0004 - 0b3a 8600 tstaxh $AX0.H - 0b3b 02b4 0b92 callnz 0x0b92 - 0b3d 8100 clr $ACC0 - 0b3e 2605 lrs $AC0.M, @0x0005 - 0b3f b100 tst $ACC0 - 0b40 0295 0b55 jz 0x0b55 - 0b42 8100 clr $ACC0 - 0b43 2e05 srs @0x0005, $AC0.M - 0b44 2281 lrs $AX0.H, @0xff81 - 0b45 8600 tstaxh $AX0.H - 0b46 0294 0b4f jnz 0x0b4f - 0b48 8100 clr $ACC0 - 0b49 005f loop $AC1.M - 0b4a 1b7e srri @$AR3, $AC0.M - 0b4b 7400 incm $AC0.M - 0b4c 2e01 srs @0x0001, $AC0.M - 0b4d 029f 0b8b jmp 0x0b8b - 0b4f 2688 lrs $AC0.M, @0xff88 - 0b50 2489 lrs $AC0.L, @0xff89 - 0b51 2e34 srs @0x0034, $AC0.M - 0b52 2c35 srs @0x0035, $AC0.L - 0b53 02bf 0b92 call 0x0b92 - 0b55 00ff 0360 sr @0x0360, $AC1.M - 0b57 2638 lrs $AC0.M, @0x0038 - 0b58 2439 lrs $AC0.L, @0x0039 - 0b59 02bf 0684 call 0x0684 - 0b5b 02bf 069b call 0x069b - 0b5d 00df 0360 lr $AC1.M, @0x0360 - 0b5f 8100 clr $ACC0 - 0b60 263a lrs $AC0.M, @0x003a - 0b61 b100 tst $ACC0 - 0b62 0294 0b71 jnz 0x0b71 - 0b64 263b lrs $AC0.M, @0x003b - 0b65 5c00 sub $ACC0, $ACC1 - 0b66 0290 0b71 jge 0x0b71 - 0b68 223b lrs $AX0.H, @0x003b - 0b69 02bf 0666 call 0x0666 - 0b6b 5500 subr $ACC1, $AX0.H - 0b6c 0a01 lris $AX0.H, #0x01 - 0b6d 00fa 0405 sr @0x0405, $AX0.H - 0b6f 029f 0b42 jmp 0x0b42 - 0b71 1f5f mrr $AX0.H, $AC1.M - 0b72 02bf 0666 call 0x0666 - 0b74 00fa 0362 sr @0x0362, $AX0.H - 0b76 8100 clr $ACC0 - 0b77 263a lrs $AC0.M, @0x003a - 0b78 243b lrs $AC0.L, @0x003b - 0b79 1570 lsr $ACC1, #-16 - 0b7a 0a01 lris $AX0.H, #0x01 - 0b7b 0081 0405 lri $AR1, #0x0405 - 0b7d 5c00 sub $ACC0, $ACC1 - 0b7e b100 tst $ACC0 - 0b7f 0275 ifz - 0b80 1a3a srr @$AR1, $AX0.H - 0b81 2e3a srs @0x003a, $AC0.M - 0b82 2c3b srs @0x003b, $AC0.L - 0b83 2638 lrs $AC0.M, @0x0038 - 0b84 2439 lrs $AC0.L, @0x0039 - 0b85 00d8 0362 lr $AX0.L, @0x0362 - 0b87 7000 addaxl $ACC0, $AX0.L - 0b88 7000 addaxl $ACC0, $AX0.L - 0b89 2c39 srs @0x0039, $AC0.L - 0b8a 2e38 srs @0x0038, $AC0.M - 0b8b 0092 00ff lri $CR, #0x00ff - 0b8d 029f 0330 jmp 0x0330 - 0b8f 8100 clr $ACC0 - 0b90 2e34 srs @0x0034, $AC0.M - 0b91 2e35 srs @0x0035, $AC0.M - 0b92 2334 lrs $AX1.H, @0x0034 - 0b93 2135 lrs $AX1.L, @0x0035 - 0b94 268a lrs $AC0.M, @0xff8a - 0b95 248b lrs $AC0.L, @0xff8b - 0b96 5a00 subax $ACC0, $AX1.L - 0b97 2e3a srs @0x003a, $AC0.M - 0b98 2c3b srs @0x003b, $AC0.L - 0b99 2634 lrs $AC0.M, @0x0034 - 0b9a 2435 lrs $AC0.L, @0x0035 - 0b9b 1401 lsl $ACC0, #1 - 0b9c 238c lrs $AX1.H, @0xff8c - 0b9d 218d lrs $AX1.L, @0xff8d - 0b9e 4a00 addax $ACC0, $AX1.L - 0b9f 2e38 srs @0x0038, $AC0.M - 0ba0 2c39 srs @0x0039, $AC0.L - 0ba1 8100 clr $ACC0 - 0ba2 2e05 srs @0x0005, $AC0.M - 0ba3 02df ret - 0ba4 8900 clr $ACC1 - 0ba5 0f50 lris $AC1.M, #0x50 - 0ba6 0083 0520 lri $AR3, #0x0520 - 0ba8 02bf 0bbd call 0x0bbd - 0baa 029f 0338 jmp 0x0338 - 0bac 00d8 0402 lr $AX0.L, @0x0402 - 0bae 8100 clr $ACC0 - 0baf 8900 clr $ACC1 - 0bb0 00dc 0430 lr $AC0.L, @0x0430 - 0bb2 0a50 lris $AX0.H, #0x50 - 0bb3 9000 mul $AX0.L, $AX0.H - 0bb4 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0bb5 1404 lsl $ACC0, #4 - 0bb6 1ffe mrr $AC1.M, $AC0.M - 0bb7 0083 0580 lri $AR3, #0x0580 - 0bb9 02bf 0bbd call 0x0bbd - 0bbb 029f 0330 jmp 0x0330 - 0bbd 0092 0004 lri $CR, #0x0004 - 0bbf 8100 clr $ACC0 - 0bc0 263a lrs $AC0.M, @0x003a - 0bc1 243b lrs $AC0.L, @0x003b - 0bc2 1f1f mrr $AX0.L, $AC1.M - 0bc3 0a00 lris $AX0.H, #0x00 - 0bc4 5800 subax $ACC0, $AX0.L - 0bc5 0292 0bdb jg 0x0bdb - 0bc7 8900 clr $ACC1 - 0bc8 00c0 043b lr $AR0, @0x043b - 0bca 02bf 0c00 call 0x0c00 - 0bcc 8100 clr $ACC0 - 0bcd 1fd8 mrr $AC0.M, $AX0.L - 0bce 223b lrs $AX0.H, @0x003b - 0bcf 5400 subr $ACC0, $AX0.H - 0bd0 0007 dar $AR3 - 0bd1 1979 lrri $AX1.L, @$AR3 - 0bd2 005e loop $AC0.M - 0bd3 1b79 srri @$AR3, $AX1.L - 0bd4 0f01 lris $AC1.M, #0x01 - 0bd5 2f01 srs @0x0001, $AC1.M - 0bd6 8900 clr $ACC1 - 0bd7 2f3b srs @0x003b, $AC1.M - 0bd8 0092 00ff lri $CR, #0x00ff - 0bda 02df ret - 0bdb 2e3a srs @0x003a, $AC0.M - 0bdc 2c3b srs @0x003b, $AC0.L - 0bdd 8100 clr $ACC0 - 0bde 8900 clr $ACC1 - 0bdf 268a lrs $AC0.M, @0xff8a - 0be0 2734 lrs $AC1.M, @0x0034 - 0be1 5c00 sub $ACC0, $ACC1 - 0be2 2e36 srs @0x0036, $AC0.M - 0be3 5000 subr $ACC0, $AX0.L - 0be4 0290 0bfa jge 0x0bfa - 0be6 00c0 0436 lr $AR0, @0x0436 - 0be8 02bf 0c00 call 0x0c00 - 0bea 8100 clr $ACC0 - 0beb 1fd8 mrr $AC0.M, $AX0.L - 0bec 2236 lrs $AX0.H, @0x0036 - 0bed 5400 subr $ACC0, $AX0.H - 0bee 1c1e mrr $AR0, $AC0.M - 0bef 8100 clr $ACC0 - 0bf0 2e34 srs @0x0034, $AC0.M - 0bf1 2688 lrs $AC0.M, @0xff88 - 0bf2 2489 lrs $AC0.L, @0xff89 - 0bf3 2e8c srs @0xff8c, $AC0.M - 0bf4 2c8d srs @0xff8d, $AC0.L - 0bf5 02bf 0c00 call 0x0c00 - 0bf7 0092 00ff lri $CR, #0x00ff - 0bf9 02df ret - 0bfa 1c18 mrr $AR0, $AX0.L - 0bfb 02bf 0c00 call 0x0c00 - 0bfd 0092 00ff lri $CR, #0x00ff - 0bff 02df ret - 0c00 8100 clr $ACC0 - 0c01 1fc0 mrr $AC0.M, $AR0 - 0c02 b100 tst $ACC0 - 0c03 02d5 retz - 0c04 8900 clr $ACC1 - 0c05 2734 lrs $AC1.M, @0x0034 - 0c06 0340 0001 andi $AC1.M, #0x0001 - 0c08 0b00 lris $AX1.H, #0x00 - 0c09 1f3f mrr $AX1.L, $AC1.M - 0c0a 268c lrs $AC0.M, @0xff8c - 0c0b 248d lrs $AC0.L, @0xff8d - 0c0c 8900 clr $ACC1 - 0c0d 2534 lrs $AC1.L, @0x0034 - 0c0e 1501 lsl $ACC1, #1 - 0c0f 4c00 add $ACC0, $ACC1 - 0c10 5a00 subax $ACC0, $AX1.L - 0c11 5a00 subax $ACC0, $AX1.L - 0c12 1c20 mrr $AR1, $AR0 - 0c13 1fe0 mrr $AC1.M, $AR0 - 0c14 0502 addis $ACC1, #0x02 - 0c15 1c1f mrr $AR0, $AC1.M - 0c16 009f 0b00 lri $AC1.M, #0x0b00 - 0c18 0092 00ff lri $CR, #0x00ff - 0c1a 02bf 05fb call 0x05fb - 0c1c 0092 0004 lri $CR, #0x0004 - 0c1e 2734 lrs $AC1.M, @0x0034 - 0c1f 1f61 mrr $AX1.H, $AR1 - 0c20 4700 addr $ACC1, $AX1.H - 0c21 2f34 srs @0x0034, $AC1.M - 0c22 0080 0b00 lri $AR0, #0x0b00 - 0c24 8900 clr $ACC1 - 0c25 1ff9 mrr $AC1.M, $AX1.L - 0c26 b900 tst $ACC1 - 0c27 0274 ifnz - 0c28 0008 iar $AR0 - 0c29 8900 clr $ACC1 - 0c2a 1fe1 mrr $AC1.M, $AR1 - 0c2b 191e lrri $AC0.M, @$AR0 - 0c2c 0701 cmpis $ACC1, #0x01 - 0c2d 0293 0c36 jle 0x0c36 - 0c2f 191a lrri $AX0.H, @$AR0 - 0c30 05fe addis $ACC1, #0xfe - 0c31 005f loop $AC1.M - 0c32 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c33 1b7e srri @$AR3, $AC0.M - 0c34 1b7a srri @$AR3, $AX0.H - 0c35 02df ret - 0c36 1b7e srri @$AR3, $AC0.M - 0c37 02df ret - 0c38 0083 03e8 lri $AR3, #0x03e8 - 0c3a 191e lrri $AC0.M, @$AR0 - 0c3b 191a lrri $AX0.H, @$AR0 - 0c3c 1006 loopi #0x06 - 0c3d 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c3e 1b7e srri @$AR3, $AC0.M - 0c3f 1b7a srri @$AR3, $AX0.H - 0c40 0080 03e8 lri $AR0, #0x03e8 - 0c42 8a00 m2 - 0c43 0088 0007 lri $WR0, #0x0007 - 0c45 1150 0c52 bloopi #0x50, 0x0c52 - 0c47 1c61 mrr $AR3, $AR1 - 0c48 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c49 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4a f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4b f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4c f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4d f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4e f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c4f f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c50 f200 madd $AX0.L, $AX0.H - 0c51 fe00 movpz $ACC0 - 0c52 1b3e srri @$AR1, $AC0.M - 0c53 0088 ffff lri $WR0, #0xffff - 0c55 8b00 m0 - 0c56 02df ret - 0c57 8a00 m2 - 0c58 05fe addis $ACC1, #0xfe - 0c59 0083 03e8 lri $AR3, #0x03e8 - 0c5b 191e lrri $AC0.M, @$AR0 - 0c5c 191a lrri $AX0.H, @$AR0 - 0c5d 005f loop $AC1.M - 0c5e 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c5f 1b7e srri @$AR3, $AC0.M - 0c60 1b7a srri @$AR3, $AX0.H - 0c61 0080 03e8 lri $AR0, #0x03e8 - 0c63 0501 addis $ACC1, #0x01 - 0c64 1d1f mrr $WR0, $AC1.M - 0c65 1150 0c6d bloopi #0x50, 0x0c6d - 0c67 1c61 mrr $AR3, $AR1 - 0c68 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c69 005f loop $AC1.M - 0c6a f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c6b f200 madd $AX0.L, $AX0.H - 0c6c fe00 movpz $ACC0 - 0c6d 1b3e srri @$AR1, $AC0.M - 0c6e 0088 ffff lri $WR0, #0xffff - 0c70 8b00 m0 - 0c71 02df ret - 0c72 0083 03e8 lri $AR3, #0x03e8 - 0c74 191e lrri $AC0.M, @$AR0 - 0c75 191a lrri $AX0.H, @$AR0 - 0c76 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c77 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c78 1b7e srri @$AR3, $AC0.M - 0c79 1b7a srri @$AR3, $AX0.H - 0c7a 0080 03e8 lri $AR0, #0x03e8 - 0c7c 0088 0003 lri $WR0, #0x0003 - 0c7e 0085 0000 lri $IX1, #0x0000 - 0c80 0087 0000 lri $IX3, #0x0000 - 0c82 1fc2 mrr $AC0.M, $AR2 - 0c83 195b lrri $AX1.H, @$AR2 - 0c84 1959 lrri $AX1.L, @$AR2 - 0c85 195f lrri $AC1.M, @$AR2 - 0c86 195a lrri $AX0.H, @$AR2 - 0c87 1c5e mrr $AR2, $AC0.M - 0c88 1fda mrr $AC0.M, $AX0.H - 0c89 1c61 mrr $AR3, $AR1 - 0c8a 8a00 m2 - 0c8b 8f00 set40 - 0c8c 191a lrri $AX0.H, @$AR0 - 0c8d b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0c8e e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0c8f ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0c90 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0c91 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0c92 1127 0c9d bloopi #0x27, 0x0c9d - 0c94 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0c95 197e lrri $AC0.M, @$AR3 - 0c96 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0c97 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0c98 bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0c99 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0c9a 197f lrri $AC1.M, @$AR3 - 0c9b ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0c9c e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0c9d b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0c9e e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0c9f 197e lrri $AC0.M, @$AR3 - 0ca0 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ca1 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0ca2 bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 0ca3 1bff srrn @$AR3, $AC1.M - 0ca4 197f lrri $AC1.M, @$AR3 - 0ca5 8e00 set16 - 0ca6 8b00 m0 - 0ca7 0088 ffff lri $WR0, #0xffff - 0ca9 1b5b srri @$AR2, $AX1.H - 0caa 1b59 srri @$AR2, $AX1.L - 0cab 1b5f srri @$AR2, $AC1.M - 0cac 1b5e srri @$AR2, $AC0.M - 0cad 02df ret - 0cae 0083 03e8 lri $AR3, #0x03e8 - 0cb0 191e lrri $AC0.M, @$AR0 - 0cb1 191a lrri $AX0.H, @$AR0 - 0cb2 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cb3 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cb4 1b7e srri @$AR3, $AC0.M - 0cb5 1b7a srri @$AR3, $AX0.H - 0cb6 0080 03e8 lri $AR0, #0x03e8 - 0cb8 0088 0003 lri $WR0, #0x0003 - 0cba 0085 0000 lri $IX1, #0x0000 - 0cbc 0087 0000 lri $IX3, #0x0000 - 0cbe 1fc2 mrr $AC0.M, $AR2 - 0cbf 195b lrri $AX1.H, @$AR2 - 0cc0 1959 lrri $AX1.L, @$AR2 - 0cc1 195f lrri $AC1.M, @$AR2 - 0cc2 195a lrri $AX0.H, @$AR2 - 0cc3 1c5e mrr $AR2, $AC0.M - 0cc4 1fda mrr $AC0.M, $AX0.H - 0cc5 1c61 mrr $AR3, $AR1 - 0cc6 8a00 m2 - 0cc7 8f00 set40 - 0cc8 191a lrri $AX0.H, @$AR0 - 0cc9 b800 mulx $AX0.H, $AX1.H - 0cca e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0ccb e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0ccc ea00 maddc $AC1.M, $AX1.L - 0ccd ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0cce e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0ccf ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0cd0 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0cd1 1127 0ce2 bloopi #0x27, 0x0ce2 - 0cd3 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cd4 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0cd5 197e lrri $AC0.M, @$AR3 - 0cd6 e800 maddc $AC0.M, $AX1.L - 0cd7 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0cd8 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0cd9 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cda bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0cdb e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0cdc e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0cdd 197f lrri $AC1.M, @$AR3 - 0cde ea00 maddc $AC1.M, $AX1.L - 0cdf ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0ce0 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0ce1 ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0ce2 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0ce3 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0ce4 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ce5 197e lrri $AC0.M, @$AR3 - 0ce6 e800 maddc $AC0.M, $AX1.L - 0ce7 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ce8 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0ce9 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cea bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0ceb 1bff srrn @$AR3, $AC1.M - 0cec 197f lrri $AC1.M, @$AR3 - 0ced 8e00 set16 - 0cee 8b00 m0 - 0cef 0088 ffff lri $WR0, #0xffff - 0cf1 1b5b srri @$AR2, $AX1.H - 0cf2 1b59 srri @$AR2, $AX1.L - 0cf3 1b5f srri @$AR2, $AC1.M - 0cf4 1b5e srri @$AR2, $AC0.M - 0cf5 02df ret - 0cf6 0eff lris $AC0.M, #0xff - 0cf7 00fe 03f2 sr @0x03f2, $AC0.M - 0cf9 8100 clr $ACC0 - 0cfa 00fe 03f0 sr @0x03f0, $AC0.M - 0cfc 00fe 03f6 sr @0x03f6, $AC0.M - 0cfe 009e 0100 lri $AC0.M, #0x0100 - 0d00 00fe 03f7 sr @0x03f7, $AC0.M - 0d02 00da 03f7 lr $AX0.H, @0x03f7 - 0d04 009e 8000 lri $AC0.M, #0x8000 - 0d06 5400 subr $ACC0, $AX0.H - 0d07 00fe 03f5 sr @0x03f5, $AC0.M - 0d09 0e30 lris $AC0.M, #0x30 - 0d0a 00fe 03f3 sr @0x03f3, $AC0.M - 0d0c 0e10 lris $AC0.M, #0x10 - 0d0d 00fe 03f4 sr @0x03f4, $AC0.M - 0d0f 009e 0096 lri $AC0.M, #0x0096 - 0d11 00fe 03f1 sr @0x03f1, $AC0.M - 0d13 02df ret - 0d14 0080 0a00 lri $AR0, #0x0a00 - 0d16 8100 clr $ACC0 - 0d17 00de 03f0 lr $AC0.M, @0x03f0 - 0d19 8900 clr $ACC1 - 0d1a b100 tst $ACC0 - 0d1b 0275 ifz - 0d1c 0550 addis $ACC1, #0x50 - 0d1d 00ff 03f0 sr @0x03f0, $AC1.M - 0d1f 0200 0a60 addi $AC0.M, #0x0a60 - 0d21 1c7e mrr $AR3, $AC0.M - 0d22 0f4e lris $AC1.M, #0x4e - 0d23 02bf 00e5 call 0x00e5 - 0d25 02df ret - 0d26 00de 03f1 lr $AC0.M, @0x03f1 - 0d28 0200 0a60 addi $AC0.M, #0x0a60 - 0d2a 1c7e mrr $AR3, $AC0.M - 0d2b 8100 clr $ACC0 - 0d2c 8900 clr $ACC1 - 0d2d 009f 00a0 lri $AC1.M, #0x00a0 - 0d2f 00de 03f1 lr $AC0.M, @0x03f1 - 0d31 5d00 sub $ACC1, $ACC0 - 0d32 0e50 lris $AC0.M, #0x50 - 0d33 0750 cmpis $ACC1, #0x50 - 0d34 0270 ifge - 0d35 5d00 sub $ACC1, $ACC0 - 0d36 00da 03f2 lr $AX0.H, @0x03f2 - 0d38 8600 tstaxh $AX0.H - 0d39 0290 0d57 jge 0x0d57 - 0d3b 00de 03f3 lr $AC0.M, @0x03f3 - 0d3d 5c00 sub $ACC0, $ACC1 - 0d3e 0293 0d42 jle 0x0d42 - 0d40 029f 0d5c jmp 0x0d5c - 0d42 00db 03f7 lr $AX1.H, @0x03f7 - 0d44 009e 8000 lri $AC0.M, #0x8000 - 0d46 4600 addr $ACC0, $AX1.H - 0d47 029f 0d4e jmp 0x0d4e - 0d49 00db 03f7 lr $AX1.H, @0x03f7 - 0d4b 009e 8000 lri $AC0.M, #0x8000 - 0d4d 5600 subr $ACC0, $AX1.H - 0d4e 00fe 03f5 sr @0x03f5, $AC0.M - 0d50 1fda mrr $AC0.M, $AX0.H - 0d51 7c00 neg $ACC0 - 0d52 1f5e mrr $AX0.H, $AC0.M - 0d53 00fe 03f2 sr @0x03f2, $AC0.M - 0d55 029f 0d5c jmp 0x0d5c - 0d57 00de 03f4 lr $AC0.M, @0x03f4 - 0d59 5d00 sub $ACC1, $ACC0 - 0d5a 0293 0d49 jle 0x0d49 - 0d5c 8900 clr $ACC1 - 0d5d 00dd 03f5 lr $AC1.L, @0x03f5 - 0d5f 1501 lsl $ACC1, #1 - 0d60 8100 clr $ACC0 - 0d61 00dc 03f6 lr $AC0.L, @0x03f6 - 0d63 008b 009f lri $WR3, #0x009f - 0d65 0080 0a00 lri $AR0, #0x0a00 - 0d67 0900 lris $AX1.L, #0x00 - 0d68 1150 0d6f bloopi #0x50, 0x0d6f - 0d6a 1878 lrr $AX0.L, @$AR3 - 0d6b 4c00 add $ACC0, $ACC1 - 0d6c 1cfe mrr $IX3, $AC0.M - 0d6d 001f addarn $AR3, $IX3 - 0d6e 1fd9 mrr $AC0.M, $AX1.L - 0d6f 1b18 srri @$AR0, $AX0.L - 0d70 009f 0a60 lri $AC1.M, #0x0a60 - 0d72 1fc3 mrr $AC0.M, $AR3 - 0d73 5c00 sub $ACC0, $ACC1 - 0d74 00fe 03f1 sr @0x03f1, $AC0.M - 0d76 00fc 03f6 sr @0x03f6, $AC0.L - 0d78 008b ffff lri $WR3, #0xffff - 0d7a 02df ret - 0d7b 0f50 lris $AC1.M, #0x50 - 0d7c 0080 0a00 lri $AR0, #0x0a00 - 0d7e 0083 0d60 lri $AR3, #0x0d60 - 0d80 0098 3fff lri $AX0.L, #0x3fff - 0d82 02bf 00ff call 0x00ff - 0d84 0f50 lris $AC1.M, #0x50 - 0d85 0080 0a00 lri $AR0, #0x0a00 - 0d87 0083 0d00 lri $AR3, #0x0d00 - 0d89 0098 3fff lri $AX0.L, #0x3fff - 0d8b 02bf 00ff call 0x00ff - 0d8d 02df ret - 0d8e 8a00 m2 - 0d8f 8f00 set40 - 0d90 8100 clr $ACC0 - 0d91 00de 0404 lr $AC0.M, @0x0404 - 0d93 b100 tst $ACC0 - 0d94 0295 0d9b jz 0x0d9b - 0d96 8100 clr $ACC0 - 0d97 00fe 0478 sr @0x0478, $AC0.M - 0d99 00fe 0479 sr @0x0479, $AC0.M - 0d9b 00df 0479 lr $AC1.M, @0x0479 - 0d9d 00db 0478 lr $AX1.H, @0x0478 - 0d9f 0900 lris $AX1.L, #0x00 - 0da0 0084 0000 lri $IX0, #0x0000 - 0da2 1150 0dab bloopi #0x50, 0x0dab - 0da4 199e lrrn $AC0.M, @$AR0 - 0da5 5c7c sub'ln $ACC0, $ACC1 : $AC1.M, @$AR0 - 0da6 c000 mulc $AC0.M, $AX0.H - 0da7 6e00 movp $ACC0 - 0da8 1488 asl $ACC0, #8 - 0da9 4a00 addax $ACC0, $AX1.L - 0daa 1b1e srri @$AR0, $AC0.M - 0dab 1f7e mrr $AX1.H, $AC0.M - 0dac 00fb 0478 sr @0x0478, $AX1.H - 0dae 00ff 0479 sr @0x0479, $AC1.M - 0db0 8b00 m0 - 0db1 8e00 set16 - 0db2 02df ret - 0db3 b900 tst $ACC1 - 0db4 0294 0db9 jnz 0x0db9 - 0db6 6800 movax $ACC0, $AX0.L - 0db7 b100 tst $ACC0 - 0db8 02d5 retz - 0db9 1c23 mrr $AR1, $AR3 - 0dba 197e lrri $AC0.M, @$AR3 - 0dbb 191b lrri $AX1.H, @$AR0 - 0dbc d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - 0dbd 1120 0dc3 bloopi #0x20, 0x0dc3 - 0dbf dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0dc0 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dc1 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0dc2 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dc3 4900 addax $ACC1, $AX0.L - 0dc4 1108 0dc9 bloopi #0x08, 0x0dc9 - 0dc6 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0dc7 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dc8 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0dc9 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dca 02df ret - 0dcb 8f00 set40 - 0dcc 8d00 set15 - 0dcd 1c03 mrr $AR0, $AR3 - 0dce 00d9 038e lr $AX1.L, @0x038e - 0dd0 0b04 lris $AX1.H, #0x04 - 0dd1 197a lrri $AX0.H, @$AR3 - 0dd2 b053 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR3 - 0dd3 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0dd4 1128 0dd9 bloopi #0x28, 0x0dd9 - 0dd6 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0dd7 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dd8 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0dd9 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dda 8c00 clr15 - 0ddb 8e00 set16 - 0ddc 02df ret - 0ddd 00da 0485 lr $AX0.H, @0x0485 - 0ddf 8600 tstaxh $AX0.H - 0de0 0295 0dee jz 0x0dee - 0de2 8100 clr $ACC0 - 0de3 00de 042a lr $AC0.M, @0x042a - 0de5 147f lsr $ACC0, #-1 - 0de6 00fe 042b sr @0x042b, $AC0.M - 0de8 b100 tst $ACC0 - 0de9 0294 0dee jnz 0x0dee - 0deb 0a01 lris $AX0.H, #0x01 - 0dec 00fa 0401 sr @0x0401, $AX0.H - 0dee 8f00 set40 - 0def 8100 clr $ACC0 - 0df0 00de 0428 lr $AC0.M, @0x0428 - 0df2 1478 lsr $ACC0, #-8 - 0df3 00df 0428 lr $AC1.M, @0x0428 - 0df5 0340 007f andi $AC1.M, #0x007f - 0df7 1f1e mrr $AX0.L, $AC0.M - 0df8 1f5f mrr $AX0.H, $AC1.M - 0df9 0220 007f xori $ACC0, #0x007f - 0dfb 1f3e mrr $AX1.L, $AC0.M - 0dfc 0320 007f xori $ACC1, #0x007f - 0dfe 1f7f mrr $AX1.H, $AC1.M - 0dff 8100 clr $ACC0 - 0e00 8900 clr $ACC1 - 0e01 009f 0200 lri $AC1.M, #0x0200 - 0e03 1fd8 mrr $AC0.M, $AX0.L - 0e04 4c00 add $ACC0, $ACC1 - 0e05 1c1e mrr $AR0, $AC0.M - 0e06 1818 lrr $AX0.L, @$AR0 - 0e07 1fda mrr $AC0.M, $AX0.H - 0e08 4c00 add $ACC0, $ACC1 - 0e09 1c1e mrr $AR0, $AC0.M - 0e0a 181a lrr $AX0.H, @$AR0 - 0e0b 1fd9 mrr $AC0.M, $AX1.L - 0e0c 4c00 add $ACC0, $ACC1 - 0e0d 1c1e mrr $AR0, $AC0.M - 0e0e 1819 lrr $AX1.L, @$AR0 - 0e0f 1fdb mrr $AC0.M, $AX1.H - 0e10 4c00 add $ACC0, $ACC1 - 0e11 1c1e mrr $AR0, $AC0.M - 0e12 181b lrr $AX1.H, @$AR0 - 0e13 8a00 m2 - 0e14 0080 0b00 lri $AR0, #0x0b00 - 0e16 9800 mul $AX1.L, $AX1.H - 0e17 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0e18 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0e19 9630 mulmv's $AX0.L, $AX0.H, $ACC0 : @$AR0, $AC0.M - 0e1a 6e30 movp's $ACC0 : @$AR0, $AC0.M - 0e1b 1b1e srri @$AR0, $AC0.M - 0e1c 8b00 m0 - 0e1d 0080 0b00 lri $AR0, #0x0b00 - 0e1f 0081 0b04 lri $AR1, #0x0b04 - 0e21 00da 042a lr $AX0.H, @0x042a - 0e23 02bf 0e6e call 0x0e6e - 0e25 0081 0b08 lri $AR1, #0x0b08 - 0e27 0080 0b00 lri $AR0, #0x0b00 - 0e29 00da 042a lr $AX0.H, @0x042a - 0e2b 00de 0429 lr $AC0.M, @0x0429 - 0e2d 8a00 m2 - 0e2e c000 mulc $AC0.M, $AX0.H - 0e2f 8b00 m0 - 0e30 6e00 movp $ACC0 - 0e31 1f5e mrr $AX0.H, $AC0.M - 0e32 02bf 0e6e call 0x0e6e - 0e34 0080 0b00 lri $AR0, #0x0b00 - 0e36 0081 0b0c lri $AR1, #0x0b0c - 0e38 8100 clr $ACC0 - 0e39 8900 clr $ACC1 - 0e3a 00de 042b lr $AC0.M, @0x042b - 0e3c 00df 042a lr $AC1.M, @0x042a - 0e3e 00fe 042a sr @0x042a, $AC0.M - 0e40 5c00 sub $ACC0, $ACC1 - 0e41 1f5e mrr $AX0.H, $AC0.M - 0e42 02bf 0e79 call 0x0e79 - 0e44 0080 0b0c lri $AR0, #0x0b0c - 0e46 0081 0b10 lri $AR1, #0x0b10 - 0e48 00da 0429 lr $AX0.H, @0x0429 - 0e4a 02bf 0e6e call 0x0e6e - 0e4c 0081 0b04 lri $AR1, #0x0b04 - 0e4e 0082 0b0c lri $AR2, #0x0b0c - 0e50 0083 0e87 lri $AR3, #0x0e87 - 0e52 1108 0e6b bloopi #0x08, 0x0e6b - 0e54 195f lrri $AC1.M, @$AR2 - 0e55 15fb asr $ACC1, #-5 - 0e56 1f1d mrr $AX0.L, $AC1.L - 0e57 1f5f mrr $AX0.H, $AC1.M - 0e58 193f lrri $AC1.M, @$AR1 - 0e59 00e1 0b24 sr @0x0b24, $AR1 - 0e5b 00e2 0b25 sr @0x0b25, $AR2 - 0e5d 021b ilrri $AC0.M, @$AR3 - 0e5e 00e3 0b26 sr @0x0b26, $AR3 - 0e60 1c7e mrr $AR3, $AC0.M - 0e61 00c0 038f lr $AR0, @0x038f - 0e63 02bf 0db3 call 0x0db3 - 0e65 00c1 0b24 lr $AR1, @0x0b24 - 0e67 00c2 0b25 lr $AR2, @0x0b25 - 0e69 00c3 0b26 lr $AR3, @0x0b26 - 0e6b 0000 nop - 0e6c 8e00 set16 - 0e6d 02df ret - 0e6e 8a00 m2 - 0e6f 191f lrri $AC1.M, @$AR0 - 0e70 d078 mulc'l $AC1.M, $AX0.H : $AC1.M, @$AR0 - 0e71 d678 mulcmv'l $AC1.M, $AX0.H, $ACC0 : $AC1.M, @$AR0 - 0e72 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e73 191f lrri $AC1.M, @$AR0 - 0e74 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e75 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0e76 1b3e srri @$AR1, $AC0.M - 0e77 8b00 m0 - 0e78 02df ret - 0e79 8a00 m2 - 0e7a 8d00 set15 - 0e7b 1f7e mrr $AX1.H, $AC0.M - 0e7c 1918 lrri $AX0.L, @$AR0 - 0e7d a840 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR0 - 0e7e ae40 mulxmv'l $AX0.L, $AX1.H, $ACC0 : $AX0.L, @$AR0 - 0e7f ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e80 1918 lrri $AX0.L, @$AR0 - 0e81 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e82 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0e83 1b3e srri @$AR1, $AC0.M - 0e84 8c00 clr15 - 0e85 8b00 m0 - 0e86 02df ret - 0e87 0d00 lris $AC1.L, #0x00 - 0e88 0d60 lris $AC1.L, #0x60 - 0e89 0f40 lris $AC1.M, #0x40 - 0e8a 0ca0 lris $AC0.L, #0xa0 - 0e8b 0e80 lris $AC0.M, #0x80 - 0e8c 0ee0 lris $AC0.M, #0xe0 - 0e8d 0be0 lris $AX1.H, #0xe0 - 0e8e 0c40 lris $AC0.L, #0x40 - 0e8f 00f9 0361 sr @0x0361, $AX1.L - 0e91 1fc0 mrr $AC0.M, $AR0 - 0e92 0200 fffc addi $AC0.M, #0xfffc - 0e94 1c1e mrr $AR0, $AC0.M - 0e95 1c5e mrr $AR2, $AC0.M - 0e96 0083 043c lri $AR3, #0x043c - 0e98 197e lrri $AC0.M, @$AR3 - 0e99 197f lrri $AC1.M, @$AR3 - 0e9a 80a2 nx'sl : $AC0.M, $AX0.H - 0e9b 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - 0e9c 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - 0e9d 1b1f srri @$AR0, $AC1.M - 0e9e 1c02 mrr $AR0, $AR2 - 0e9f 8100 clr $ACC0 - 0ea0 00de 0402 lr $AC0.M, @0x0402 - 0ea2 00fe 0362 sr @0x0362, $AC0.M - 0ea4 1474 lsr $ACC0, #-12 - 0ea5 1f7e mrr $AX1.H, $AC0.M - 0ea6 1f3c mrr $AX1.L, $AC0.L - 0ea7 8900 clr $ACC1 - 0ea8 00dd 0430 lr $AC1.L, @0x0430 - 0eaa 1504 lsl $ACC1, #4 - 0eab 0604 cmpis $ACC0, #0x04 - 0eac 0290 0f03 jge 0x0f03 - 0eae 1fdd mrr $AC0.M, $AC1.L - 0eaf 0082 02b0 lri $AR2, #0x02b0 - 0eb1 1050 loopi #0x50 - 0eb2 4b2a addax's $ACC1, $AX1.L : @$AR2, $AC1.L - 0eb3 1fbe mrr $AC1.L, $AC0.M - 0eb4 00fe 0360 sr @0x0360, $AC0.M - 0eb6 8900 clr $ACC1 - 0eb7 1fbe mrr $AC1.L, $AC0.M - 0eb8 0af8 lris $AX0.H, #0xf8 - 0eb9 009b 00fc lri $AX1.H, #0x00fc - 0ebb 00d8 0361 lr $AX0.L, @0x0361 - 0ebd 0082 02b0 lri $AR2, #0x02b0 - 0ebf 0083 02b0 lri $AR3, #0x02b0 - 0ec1 195e lrri $AC0.M, @$AR2 - 0ec2 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M - 0ec3 1128 0ec8 bloopi #0x28, 0x0ec8 - 0ec5 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 - 0ec6 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H - 0ec7 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 - 0ec8 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - 0ec9 8a00 m2 - 0eca 0082 02b0 lri $AR2, #0x02b0 - 0ecc 00dd 0430 lr $AC1.L, @0x0430 - 0ece 1504 lsl $ACC1, #4 - 0ecf 1fe0 mrr $AC1.M, $AR0 - 0ed0 8100 clr $ACC0 - 0ed1 00de 0362 lr $AC0.M, @0x0362 - 0ed3 1474 lsr $ACC0, #-12 - 0ed4 1f7e mrr $AX1.H, $AC0.M - 0ed5 1f3c mrr $AX1.L, $AC0.L - 0ed6 8f00 set40 - 0ed7 1943 lrri $AR3, @$AR2 - 0ed8 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ed9 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0eda f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0edb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0edc f200 madd $AX0.L, $AX0.H - 0edd fe00 movpz $ACC0 - 0ede 1c1f mrr $AR0, $AC1.M - 0edf 1943 lrri $AR3, @$AR2 - 0ee0 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ee1 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ee2 114e 0eea bloopi #0x4e, 0x0eea - 0ee4 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ee5 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ee6 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0ee7 1c1f mrr $AR0, $AC1.M - 0ee8 1943 lrri $AR3, @$AR2 - 0ee9 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0eea 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - 0eeb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0eec f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0eed f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0eee fe00 movpz $ACC0 - 0eef 1b3e srri @$AR1, $AC0.M - 0ef0 8b00 m0 - 0ef1 8e00 set16 - 0ef2 00fe 0433 sr @0x0433, $AC0.M - 0ef4 1c1f mrr $AR0, $AC1.M - 0ef5 150c lsl $ACC1, #12 - 0ef6 0340 0fff andi $AC1.M, #0x0fff - 0ef8 00ff 0430 sr @0x0430, $AC1.M - 0efa 0083 043c lri $AR3, #0x043c - 0efc 191e lrri $AC0.M, @$AR0 - 0efd 191f lrri $AC1.M, @$AR0 - 0efe 80a0 nx'ls : $AX0.H, $AC0.M - 0eff 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0f00 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0f01 1b7f srri @$AR3, $AC1.M - 0f02 02df ret - 0f03 1fe0 mrr $AC1.M, $AR0 - 0f04 1c1f mrr $AR0, $AC1.M - 0f05 1128 0f0c bloopi #0x28, 0x0f0c - 0f07 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f08 1b3e srri @$AR1, $AC0.M - 0f09 1c1f mrr $AR0, $AC1.M - 0f0a 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f0b 1b3e srri @$AR1, $AC0.M - 0f0c 1c1f mrr $AR0, $AC1.M - 0f0d 029f 0ef2 jmp 0x0ef2 - 0f0f 0083 0520 lri $AR3, #0x0520 - 0f11 00de 0433 lr $AC0.M, @0x0433 - 0f13 1050 loopi #0x50 - 0f14 1b7e srri @$AR3, $AC0.M - 0f15 029f 0338 jmp 0x0338 - 0f17 1c20 mrr $AR1, $AR0 - 0f18 185f lrr $AC1.M, @$AR2 - 0f19 1f7f mrr $AX1.H, $AC1.M - 0f1a 193a lrri $AX0.H, @$AR1 - 0f1b 6400 movr $ACC0, $AX0.H - 0f1c 0078 0f21 bloop $AX0.L, 0x0f21 - 0f1e 5659 subr'l $ACC0, $AX1.H : $AX1.H, @$AR1 - 0f1f 6730 movr's $ACC1, $AX1.H : @$AR0, $AC0.M - 0f20 5551 subr'l $ACC1, $AX0.H : $AX0.H, @$AR1 - 0f21 6438 movr's $ACC0, $AX0.H : @$AR0, $AC1.M - 0f22 1a5b srr @$AR2, $AX1.H - 0f23 02df ret - 0f24 0098 8240 lri $AX0.L, #0x8240 - 0f26 00f8 04e8 sr @0x04e8, $AX0.L - 0f28 0098 7fff lri $AX0.L, #0x7fff - 0f2a 00f8 04e9 sr @0x04e9, $AX0.L - 0f2c 0098 7dbf lri $AX0.L, #0x7dbf - 0f2e 00f8 04ea sr @0x04ea, $AX0.L - 0f30 0098 843f lri $AX0.L, #0x843f - 0f32 00f8 04eb sr @0x04eb, $AX0.L - 0f34 0098 b23b lri $AX0.L, #0xb23b - 0f36 00f8 04f0 sr @0x04f0, $AX0.L - 0f38 0098 7fff lri $AX0.L, #0x7fff - 0f3a 00f8 04f1 sr @0x04f1, $AX0.L - 0f3c 0098 4dc4 lri $AX0.L, #0x4dc4 - 0f3e 00f8 04f2 sr @0x04f2, $AX0.L - 0f40 0098 d808 lri $AX0.L, #0xd808 - 0f42 00f8 04f3 sr @0x04f3, $AX0.L - 0f44 0098 0000 lri $AX0.L, #0x0000 - 0f46 0080 04ec lri $AR0, #0x04ec - 0f48 1004 loopi #0x04 - 0f49 1b18 srri @$AR0, $AX0.L - 0f4a 0080 04f4 lri $AR0, #0x04f4 - 0f4c 1004 loopi #0x04 - 0f4d 1b18 srri @$AR0, $AX0.L - 0f4e 02df ret - 0f4f 0080 0f40 lri $AR0, #0x0f40 - 0f51 0083 0b00 lri $AR3, #0x0b00 - 0f53 8900 clr $ACC1 - 0f54 0f50 lris $AC1.M, #0x50 - 0f55 0098 6784 lri $AX0.L, #0x6784 - 0f57 02bf 010e call 0x010e - 0f59 0080 04e8 lri $AR0, #0x04e8 - 0f5b 0082 04ec lri $AR2, #0x04ec - 0f5d 0081 0b00 lri $AR1, #0x0b00 - 0f5f 8900 clr $ACC1 - 0f60 0f50 lris $AC1.M, #0x50 - 0f61 0080 0b00 lri $AR0, #0x0b00 - 0f63 0083 0d00 lri $AR3, #0x0d00 - 0f65 0098 7fff lri $AX0.L, #0x7fff - 0f67 02bf 00ff call 0x00ff - 0f69 8900 clr $ACC1 - 0f6a 0f50 lris $AC1.M, #0x50 - 0f6b 0080 0b00 lri $AR0, #0x0b00 - 0f6d 0083 0d60 lri $AR3, #0x0d60 - 0f6f 0098 b820 lri $AX0.L, #0xb820 - 0f71 02bf 00ff call 0x00ff - 0f73 0080 0ca0 lri $AR0, #0x0ca0 - 0f75 0083 0b00 lri $AR3, #0x0b00 - 0f77 8900 clr $ACC1 - 0f78 0f50 lris $AC1.M, #0x50 - 0f79 0098 6784 lri $AX0.L, #0x6784 - 0f7b 02bf 010e call 0x010e - 0f7d 0080 04e8 lri $AR0, #0x04e8 - 0f7f 0082 04f4 lri $AR2, #0x04f4 - 0f81 0081 0b00 lri $AR1, #0x0b00 - 0f83 8900 clr $ACC1 - 0f84 0f50 lris $AC1.M, #0x50 - 0f85 0080 0b00 lri $AR0, #0x0b00 - 0f87 0083 0d00 lri $AR3, #0x0d00 - 0f89 0098 47e0 lri $AX0.L, #0x47e0 - 0f8b 02bf 00ff call 0x00ff - 0f8d 8900 clr $ACC1 - 0f8e 0f50 lris $AC1.M, #0x50 - 0f8f 0080 0b00 lri $AR0, #0x0b00 - 0f91 0083 0d60 lri $AR3, #0x0d60 - 0f93 0098 8001 lri $AX0.L, #0x8001 - 0f95 02bf 00ff call 0x00ff - 0f97 02df ret - 0f98 0000 nop - 0f99 0000 nop - 0f9a 0000 nop - 0f9b 0000 nop - 0f9c 0000 nop - 0f9d 0000 nop - 0f9e 0000 nop - 0f9f 0000 nop diff --git a/docs/DSP/DSP_UC_SuperMarioGalaxy.txt b/docs/DSP/DSP_UC_SuperMarioGalaxy.txt deleted file mode 100644 index 9909314224..0000000000 --- a/docs/DSP/DSP_UC_SuperMarioGalaxy.txt +++ /dev/null @@ -1,3174 +0,0 @@ - // Memory map: - // - // 0x0D00: final right buffer #1 - // 0x0D60: final left buffer #1 - // 0x0F40: final right buffer #2 - // 0x0CA0: final left buffer #2 - - 0000 029f 0012 jmp 0x0012 // Reset() - 0002 0000 nop - 0003 0000 nop - 0004 02ff rti - 0005 0000 nop - 0006 02ff rti - 0007 0000 nop - 0008 02ff rti - 0009 0000 nop - 000a 02ff rti - 000b 0000 nop - 000c 02ff rti - 000d 0000 nop - 000e 029f 06e9 jmp 0x06e9 // Exception_0E() - - 0010 029f 004c jmp 0x004c // TaskStart() - -// Reset() - 0012 1205 sbclr #0x05 - 0013 02bf 0055 call 0x0055 - 0015 8100 clr $ACC0 - 0016 009f 1000 lri $AC1.M, #0x1000 - 0018 0080 0000 lri $AR0, #0x0000 - 001a 005f loop $AC1.M - 001b 1b1e srri @$AR0, $AC0.M - 001c 02bf 07b9 call 0x07b9 // InitGlobalVars() - 001e 02bf 0f0a call 0x0f0a // InitUnkTable() - 0020 0e00 lris $AC0.M, #0x00 - 0021 02bf 079b call 0x079b // SendMail_DCD1(0x0000) - 0023 009e 1111 lri $AC0.M, #0x1111 - 0025 02bf 07a5 call 0x07a5 // sendMail_F355(0x1111) - 0027 0e00 lris $AC0.M, #0x00 - 0028 00fe 034e sr @0x034e, $AC0.M - 002a 1305 sbset #0x05 - 002b 029f 07f6 jmp 0x07f6 // jump to MessageLoop() - -// OpcodeHandler() - 002d 00df 0357 lr $AC1.M, @0x0357 - 002f 00ff 0345 sr @0x0345, $AC1.M - 0031 00de 0356 lr $AC0.M, @0x0356 - 0033 1ffe mrr $AC1.M, $AC0.M - 0034 0340 00ff andi $AC1.M, #0x00ff - 0036 00ff 0344 sr @0x0344, $AC1.M - 0038 1479 lsr $ACC0, #-7 - 0039 0240 007e andi $AC0.M, #0x007e - 003b 00fe 0343 sr @0x0343, $AC0.M - 003d 0200 0073 addi $AC0.M, #0x0073 // Opcode jump table address (0x0073) - 003f 1c1e mrr $AR0, $AC0.M - 0040 170f jmpr $AR0 // jump to opcode handler - 0041 0092 00ff lri $CR, #0x00ff // Return address from opcode handler - 0043 0e04 lris $AC0.M, #0x04 - 0044 02bf 079b call 0x079b // SendMail_DCD1(0x0004) - 0046 00de 0356 lr $AC0.M, @0x0356 - 0048 02bf 07a5 call 0x07a5 // SendMail_F355(mail_high_part) - 004a 029f 002b jmp 0x002b // jump back to MessageLoop() - -// TaskStart() - 004c 1205 sbclr #0x05 - 004d 02bf 0055 call 0x0055 - 004f 0e01 lris $AC0.M, #0x01 - 0050 02bf 079b call 0x079b // SendMail_DCD1(0x0001) - 0052 1305 sbset #0x05 - 0053 029f 002b jmp 0x002b // jump back to MessageLoop() - -// - 0055 1202 sbclr #0x02 - 0056 1203 sbclr #0x03 - 0057 1204 sbclr #0x04 - 0058 1306 sbset #0x06 - 0059 8e00 set16 - 005a 8c00 clr15 - 005b 8b00 m0 - 005c 009e ffff lri $AC0.M, #0xffff - 005e 1d1e mrr $WR0, $AC0.M - 005f 1d3e mrr $WR1, $AC0.M - 0060 1d5e mrr $WR2, $AC0.M - 0061 1d7e mrr $WR3, $AC0.M - 0062 0092 00ff lri $CR, #0x00ff - 0064 02df ret - -// ReadWholeMessage() - 0065 0081 0358 lri $AR1, #0x0358 - 0067 0090 0000 lri $AC0.H, #0x0000 - 0069 0c00 lris $AC0.L, #0x00 - 006a 007e 006f bloop $AC0.M, 0x006f - 006c 193e lrri $AC0.M, @$AR1 - 006d 1b1e srri @$AR0, $AC0.M - 006e 193e lrri $AC0.M, @$AR1 - 006f 1b1e srri @$AR0, $AC0.M - 0070 02df ret - -// Opcode_03() (dummy) - 0071 029f 0041 jmp 0x0041 - -// Opcode jump table (16 opcodes available) - 0073 029f 0041 jmp 0x0041 // 0 (dummy) - 0075 029f 0093 jmp 0x0093 // 1 (DsetupTable) - 0077 029f 029d jmp 0x029d // 2 (SyncFrame) - 0079 029f 0071 jmp 0x0071 // 3 (dummy) - 007b 029f 0616 jmp 0x0616 // 4 () - 007d 029f 0628 jmp 0x0628 // 5 () - 007f 029f 0041 jmp 0x0041 // 6 (dummy) - 0081 029f 055f jmp 0x055f // 7 () - 0083 029f 05ab jmp 0x05ab // 8 () - 0085 029f 058f jmp 0x058f // 9 () - 0087 029f 0041 jmp 0x0041 // A (dummy) - 0089 029f 0041 jmp 0x0041 // B (dummy) - 008b 029f 0041 jmp 0x0041 // C (dummy) - 008d 029f 00bd jmp 0x00bd // D (DsetDolbyDelay) - 008f 029f 00b0 jmp 0x00b0 // E () - 0091 029f 0041 jmp 0x0041 // F (dummy) - -// Opcode_01() - DsetupTable -// Message body: 5 mails -// Mail 1: bit0-15 = max (see inner loop of SyncFrame), bit16-32 = 0, bit24-30 = command (0x01) -// Mail 2: Address in main memory of parameter blocks used during mixing; there are X blocks of 384 bytes (192 words) each -// Mail 3: Address in main memory of something (640 words copied to 0x0000) -// Mail 4: Address in main memory of something (32 words copied to 0x0300) -// Mail 5: Address in main memory of other parameter blocks; there are 4 blocks (or more?) of 32 bytes (16 words) each -// Stores the mail body to 0x0380. - 0093 0080 0380 lri $AR0, #0x0380 - 0095 0e04 lris $AC0.M, #0x04 - 0096 02bf 0065 call 0x0065 - 0098 0081 0382 lri $AR1, #0x0382 - 009a 009f 0000 lri $AC1.M, #0x0000 - 009c 0080 0280 lri $AR0, #0x0280 - 009e 02bf 05e6 call 0x05e6 // DmaCopy(0x0000, Dword[0x0382], 0x280) - 00a0 0081 0384 lri $AR1, #0x0384 - 00a2 009f 0300 lri $AC1.M, #0x0300 - 00a4 0080 0020 lri $AR0, #0x0020 - 00a6 02bf 05e6 call 0x05e6 // DmaCopy(0x0300, Dword[0x0384], 32) - 00a8 00de 0345 lr $AC0.M, @0x0345 - 00aa 00fe 0342 sr @0x0342, $AC0.M - 00ac 02bf 0d01 call 0x0d01 - 00ae 029f 0041 jmp 0x0041 - -// Opcode_0E() - 00b0 0080 037d lri $AR0, #0x037d - 00b2 0e01 lris $AC0.M, #0x01 - 00b3 02bf 0065 call 0x0065 - 00b5 00de 037d lr $AC0.M, @0x037d - 00b7 0240 7fff andi $AC0.M, #0x7fff - 00b9 00fe 037d sr @0x037d, $AC0.M - 00bb 029f 0041 jmp 0x0041 - -// Opcode_0D() - DsetDolbyDelay - 00bd 0080 0374 lri $AR0, #0x0374 - 00bf 0e01 lris $AC0.M, #0x01 - 00c0 00fe 0377 sr @0x0377, $AC0.M - 00c2 00fe 037c sr @0x037c, $AC0.M - 00c4 02bf 0065 call 0x0065 - 00c6 00de 0345 lr $AC0.M, @0x0345 - 00c8 00fe 0376 sr @0x0376, $AC0.M - 00ca 029f 0041 jmp 0x0041 - -// read PB - 00cc 0081 034c lri $AR1, #0x034c - 00ce 009f 0400 lri $AC1.M, #0x0400 - 00d0 0080 00c0 lri $AR0, #0x00c0 - 00d2 02bf 05e6 call 0x05e6 // DmaCopy(0x0400, Dword[0x034C], 192) - 00d4 02df ret - -// writeback PB - 00d5 0081 034c lri $AR1, #0x034c - 00d7 009f 0400 lri $AC1.M, #0x0400 - 00d9 0080 0080 lri $AR0, #0x0080 - 00db 0081 034c lri $AR1, #0x034c - 00dd 193e lrri $AC0.M, @$AR1 - 00de 193c lrri $AC0.L, @$AR1 - 00df 0098 0000 lri $AX0.L, #0x0000 - 00e1 7000 addaxl $ACC0, $AX0.L - 00e2 02bf 05f5 call 0x05f5 // DmaCopy(Dword[0x034C], 0x0400, 128) - 00e4 02df ret - -// - 00e5 191e lrri $AC0.M, @$AR0 - 00e6 191a lrri $AX0.H, @$AR0 - 00e7 005f loop $AC1.M - 00e8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 00e9 1b7e srri @$AR3, $AC0.M - 00ea 1b7a srri @$AR3, $AX0.H - 00eb 02df ret - -// memcpy(destination, source, length) -// AR0 = source address -// AR3 = destination address -// AC1.M = length in dwords - 00ec 0000 nop - 00ed 007f 00f2 bloop $AC1.M, 0x00f2 - 00ef 191e lrri $AC0.M, @$AR0 - 00f0 1b7e srri @$AR3, $AC0.M - 00f1 191e lrri $AC0.M, @$AR0 - 00f2 1b7e srri @$AR3, $AC0.M - 00f3 0000 nop - 00f4 02df ret - -// - 00f5 191e lrri $AC0.M, @$AR0 - 00f6 191a lrri $AX0.H, @$AR0 - 00f7 007f 00fc bloop $AC1.M, 0x00fc - 00f9 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 00fa 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 00fb 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 00fc 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 00fd 0000 nop - 00fe 02df ret - -// multiply routine -// AC1.M = size in words -// AR0 = source addres -// AR3 = destination address - 00ff 8a00 m2 // multiply result by 2 - 0100 157f lsr $ACC1, #-1 // size >>= 1 (process buffers per dwords) - 0101 1c20 mrr $AR1, $AR0 // AR1 = AR0 - 0102 1c03 mrr $AR0, $AR3 // AR0 = AR3 - 0103 193a lrri $AX0.H, @$AR1 // AX0.H = Mem[AR1]; AR1++; - 0104 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 // prod = AX0.L * AX0.H; AX0.H = Mem[AR1]; AR1++; - 0105 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 // AC0.M = prod; AC0.L = 0; prod = AX0.L * AX0.H; AX1.H = Mem[AR3]; AR3++; - - 0106 007f 010b bloop $AC1.M, 0x010b - 0108 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 // ACC0 += AX1.H; AX0.H = Mem[AR1]; AR1++; - 0109 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H // AC0.M = prod; AC0.L = 0; prod = AX0.L * AX0.H; ... - 010a 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 010b 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - - 010c 8b00 m0 // don't multiply result - 010d 02df ret - -// - 010e 8a00 m2 - 010f 191a lrri $AX0.H, @$AR0 - 0110 9050 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR0 - 0111 9250 mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0112 005f loop $AC1.M - 0113 92a0 mulmvz'ls $AX0.L, $AX0.H, $ACC0 : $AX0.H, $AC0.M - 0114 8b00 m0 - 0115 02df ret - -// ClearBuffers() -// clears: -// - 80 words at 0x0D00 (right buffer #1) -// - 80 words at 0x0D60 (left buffer #1) -// - 80 words at 0x0CA0 (left buffer #2) -// - 80 words at 0x0F40 (right buffer #2) -// - 80 words at 0x0FA0 -// - 80 words at 0x0A00 -// - 80 words at 0x09A0 -// - 80 words at 0x0DC8 -// - 80 words at 0x0E28 -// - 80 words at 0x0E88 -// - 80 words at 0x0EE8 -// copies: -// - 8 words from 0x0E10 to 0x0DC0 -// - 8 words from 0x0E70 to 0x0E20 -// - 8 words from 0x0ED0 to 0x0E80 -// - 8 words from 0x0F30 to 0x0EE0 - 0116 8100 clr $ACC0 - 0117 8900 clr $ACC1 - 0118 0e50 lris $AC0.M, #0x50 - 0119 0080 0d00 lri $AR0, #0x0d00 - 011b 005e loop $AC0.M - 011c 1b1f srri @$AR0, $AC1.M - 011d 0080 0d60 lri $AR0, #0x0d60 - 011f 005e loop $AC0.M - 0120 1b1f srri @$AR0, $AC1.M - 0121 00da 0374 lr $AX0.H, @0x0374 - 0123 8600 tstaxh $AX0.H - 0124 02b5 0f35 callz 0x0f35 // call this mixer if right buffer address is 0??? uh??? - 0126 8100 clr $ACC0 - 0127 8900 clr $ACC1 - 0128 0e50 lris $AC0.M, #0x50 - 0129 0080 0ca0 lri $AR0, #0x0ca0 - 012b 005e loop $AC0.M - 012c 1b1f srri @$AR0, $AC1.M - 012d 0080 0f40 lri $AR0, #0x0f40 - 012f 005e loop $AC0.M - 0130 1b1f srri @$AR0, $AC1.M - 0131 0080 0fa0 lri $AR0, #0x0fa0 - 0133 005e loop $AC0.M - 0134 1b1f srri @$AR0, $AC1.M - 0135 0080 0a00 lri $AR0, #0x0a00 - 0137 005e loop $AC0.M - 0138 1b1f srri @$AR0, $AC1.M - 0139 0080 09a0 lri $AR0, #0x09a0 - 013b 005e loop $AC0.M - 013c 1b1f srri @$AR0, $AC1.M - 013d 0f04 lris $AC1.M, #0x04 - 013e 0080 0e10 lri $AR0, #0x0e10 - 0140 0083 0dc0 lri $AR3, #0x0dc0 - 0142 02bf 00ec call 0x00ec // memcpy(0x0DC0, 0x0E10, 4); - 0144 0080 0e70 lri $AR0, #0x0e70 - 0146 0083 0e20 lri $AR3, #0x0e20 - 0148 02bf 00ec call 0x00ec // memcpy(0x0E20, 0x0E70, 4); - 014a 0080 0ed0 lri $AR0, #0x0ed0 - 014c 0083 0e80 lri $AR3, #0x0e80 - 014e 02bf 00ec call 0x00ec // memcpy(0x0E80, 0x0ED0, 4); - 0150 0080 0f30 lri $AR0, #0x0f30 - 0152 0083 0ee0 lri $AR3, #0x0ee0 - 0154 02bf 00ec call 0x00ec // memcpy(0x0EE0, 0x0F30, 4); - 0156 8100 clr $ACC0 - 0157 0e50 lris $AC0.M, #0x50 - 0158 8900 clr $ACC1 - 0159 0080 0dc8 lri $AR0, #0x0dc8 - 015b 005e loop $AC0.M - 015c 1b1f srri @$AR0, $AC1.M - 015d 0080 0e28 lri $AR0, #0x0e28 - 015f 005e loop $AC0.M - 0160 1b1f srri @$AR0, $AC1.M - 0161 0080 0e88 lri $AR0, #0x0e88 - 0163 005e loop $AC0.M - 0164 1b1f srri @$AR0, $AC1.M - 0165 0080 0ee8 lri $AR0, #0x0ee8 - 0167 005e loop $AC0.M - 0168 1b1f srri @$AR0, $AC1.M - 0169 02df ret - -// - 016a 009f 0580 lri $AC1.M, #0x0580 - 016c 009b 00a0 lri $AX1.H, #0x00a0 - 016e 0081 0393 lri $AR1, #0x0393 - 0170 18bc lrrd $AC0.L, @$AR1 // AC0.L = Mem[0x0393]; - 0171 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 // AC0.M = Mem[0x0392]; - 0172 bc00 mulxac $AX0.H, $AX1.H, $ACC0 // ACC0 += (AX0.H * AX1.H); (Mem[0x03A4] * 160) - 0173 0080 0050 lri $AR0, #0x0050 - 0175 02bf 05e8 call 0x05e8 // DmaCopy(0x0580, ((Dword[0x0392 << 16) | Dword[0x0393]) + (Mem[0x03A4] * 160), 80); - 0177 02df ret - -// - 0178 00df 03a1 lr $AC1.M, @0x03a1 - 017a 0508 addis $ACC1, #0x08 - 017b 0080 0580 lri $AR0, #0x0580 - 017d 1c7f mrr $AR3, $AC1.M - 017e 0098 7fff lri $AX0.L, #0x7fff - 0180 8900 clr $ACC1 - 0181 0f50 lris $AC1.M, #0x50 - 0182 02bf 00ff call 0x00ff // mult routine - 0184 02df ret - -// mix? - 0185 00c0 03a0 lr $AR0, @0x03a0 - 0187 191a lrri $AX0.H, @$AR0 // AX0.H = Mem[0x03A4]; - 0188 02bf 016a call 0x016a // get music? - 018a 02bf 0178 call 0x0178 - 018c 8100 clr $ACC0 - 018d 8900 clr $ACC1 - 018e 00de 0390 lr $AC0.M, @0x0390 // First word of PB: status; 1 = playing, 0 = not playing - 0190 02a0 0001 andf $AC0.M, #0x0001 - 0192 029d 019b jlz 0x019b - 0194 0080 0398 lri $AR0, #0x0398 // - 0196 0e08 lris $AC0.M, #0x08 - 0197 00c1 03a1 lr $AR1, @0x03a1 - 0199 02bf 0c43 call 0x0c43 // ??? - 019b 0f50 lris $AC1.M, #0x50 - 019c 00c0 03a1 lr $AR0, @0x03a1 - 019e 00da 0394 lr $AX0.H, @0x0394 // - 01a0 8600 tstaxh $AX0.H - 01a1 0295 01a8 jz 0x01a8 - 01a3 1c7a mrr $AR3, $AX0.H - 01a4 00d8 0395 lr $AX0.L, @0x0395 - 01a6 02bf 00ff call 0x00ff // mult routine - 01a8 0f50 lris $AC1.M, #0x50 - 01a9 00c0 03a1 lr $AR0, @0x03a1 - 01ab 00da 0396 lr $AX0.H, @0x0396 - 01ad 8600 tstaxh $AX0.H - 01ae 0295 01b5 jz 0x01b5 - 01b0 1c7a mrr $AR3, $AX0.H - 01b1 00d8 0397 lr $AX0.L, @0x0397 - 01b3 02bf 00ff call 0x00ff - 01b5 00de 0390 lr $AC0.M, @0x0390 - 01b7 02a0 0002 andf $AC0.M, #0x0002 - 01b9 02dd retlz - 01ba 0080 0398 lri $AR0, #0x0398 - 01bc 0e08 lris $AC0.M, #0x08 - 01bd 00c1 03a1 lr $AR1, @0x03a1 - 01bf 02bf 0c43 call 0x0c43 - 01c1 02df ret - -// mix background music? called by cmd 02 (SyncFrame) -// uses the 4 first PBs -// so these PBs would be for background music? - 01c2 8900 clr $ACC1 - 01c3 009f 0dc0 lri $AC1.M, #0x0dc0 - 01c5 00ff 03a1 sr @0x03a1, $AC1.M - 01c7 009f 03a8 lri $AC1.M, #0x03a8 - 01c9 00ff 03a2 sr @0x03a2, $AC1.M - 01cb 009f 03a4 lri $AC1.M, #0x03a4 - 01cd 00ff 03a0 sr @0x03a0, $AC1.M - - 01cf 1104 01ef bloopi #0x04, 0x01ef // Perform mixing for 4 PBs - 01d1 00c0 03a2 lr $AR0, @0x03a2 // Inited to 0x03A8 - 01d3 0083 0390 lri $AR3, #0x0390 - 01d5 8900 clr $ACC1 - 01d6 0f08 lris $AC1.M, #0x08 - 01d7 02bf 00ec call 0x00ec // memcpy(0x0390, Mem[0x03A2], 8); Copy the current PB to 0x0390 - 01d9 00da 0390 lr $AX0.H, @0x0390 - 01db 8600 tstaxh $AX0.H - 01dc 0295 01e0 jz 0x01e0 // skip the call below if [0x0390] is nonzero? ([0x0390] = first word of PB, probably start/stop flag?) - 01de 02bf 0185 call 0x0185 // mix? - 01e0 8100 clr $ACC0 - 01e1 00de 03a2 lr $AC0.M, @0x03a2 - 01e3 0410 addis $ACC0, #0x10 // Increment address to next PB - 01e4 00fe 03a2 sr @0x03a2, $AC0.M - 01e6 00de 03a1 lr $AC0.M, @0x03a1 - 01e8 0460 addis $ACC0, #0x60 // Increment another value (buffer address???) - 01e9 00fe 03a1 sr @0x03a1, $AC0.M - 01eb 00de 03a0 lr $AC0.M, @0x03a0 - 01ed 7400 incm $AC0.M // Increment another value (address of something) - 01ee 00fe 03a0 sr @0x03a0, $AC0.M - - 01f0 00da 0374 lr $AX0.H, @0x0374 - 01f2 8600 tstaxh $AX0.H - 01f3 0294 0219 jnz 0x0219 - 01f5 0f50 lris $AC1.M, #0x50 - 01f6 0080 0be0 lri $AR0, #0x0be0 - 01f8 0083 0e80 lri $AR3, #0x0e80 - 01fa 0098 7fff lri $AX0.L, #0x7fff // +32767 - 01fc 02bf 00ff call 0x00ff // mult routine - 01fe 0f50 lris $AC1.M, #0x50 - 01ff 0080 0be0 lri $AR0, #0x0be0 - 0201 0083 0ee0 lri $AR3, #0x0ee0 - 0203 0098 b820 lri $AX0.L, #0xb820 // -18400 - 0205 02bf 00ff call 0x00ff // mult routine - 0207 0f28 lris $AC1.M, #0x28 - 0208 0080 0c68 lri $AR0, #0x0c68 - 020a 0083 0e80 lri $AR3, #0x0e80 - 020c 0098 b820 lri $AX0.L, #0xb820 // -18400 - 020e 02bf 00ff call 0x00ff // mult routine - 0210 0f28 lris $AC1.M, #0x28 - 0211 0080 0c68 lri $AR0, #0x0c68 - 0213 0083 0ee0 lri $AR3, #0x0ee0 - 0215 0098 7fff lri $AX0.L, #0x7fff // +32767 - 0217 02bf 00ff call 0x00ff // mult routine - // clear buffers at 0x0BE0 and 0x0C40 (80 words(160 bytes) each) - 0219 8100 clr $ACC0 - 021a 8900 clr $ACC1 - 021b 0e50 lris $AC0.M, #0x50 - 021c 0080 0be0 lri $AR0, #0x0be0 - 021e 005e loop $AC0.M - 021f 1b1f srri @$AR0, $AC1.M - 0220 0080 0c40 lri $AR0, #0x0c40 - 0222 005e loop $AC0.M - 0223 1b1f srri @$AR0, $AC1.M - 0224 02df ret - -// - 0225 00c0 03a0 lr $AR0, @0x03a0 - 0227 181a lrr $AX0.H, @$AR0 - 0228 8100 clr $ACC0 - 0229 181e lrr $AC0.M, @$AR0 - 022a 00db 0391 lr $AX1.H, @0x0391 - 022c 7400 incm $AC0.M - 022d d100 cmpar $ACC1, $AX0.H - 022e 0270 ifns - 022f 8100 clr $ACC0 - 0230 1b1e srri @$AR0, $AC0.M - 0231 00df 03a1 lr $AC1.M, @0x03a1 - 0233 009b 00a0 lri $AX1.H, #0x00a0 - 0235 0081 0393 lri $AR1, #0x0393 - 0237 18bc lrrd $AC0.L, @$AR1 - 0238 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0239 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 023a 0080 0050 lri $AR0, #0x0050 - 023c 02bf 05f5 call 0x05f5 // DmaCopy((Mem[0x0392] << 16 | Mem[0x0393]), Mem[0x03A1], 80); - 023e 02df ret - -// another mixer? - 023f 00da 0374 lr $AX0.H, @0x0374 - 0241 8600 tstaxh $AX0.H - 0242 0294 0258 jnz 0x0258 - 0244 8900 clr $ACC1 - 0245 0f28 lris $AC1.M, #0x28 - 0246 0080 0c40 lri $AR0, #0x0c40 - 0248 0083 0ea8 lri $AR3, #0x0ea8 - 024a 0098 b820 lri $AX0.L, #0xb820 - 024c 02bf 00ff call 0x00ff - 024e 8900 clr $ACC1 - 024f 0f28 lris $AC1.M, #0x28 - 0250 0080 0c40 lri $AR0, #0x0c40 - 0252 0083 0f08 lri $AR3, #0x0f08 - 0254 0098 7fff lri $AX0.L, #0x7fff - 0256 02bf 00ff call 0x00ff - 0258 009f 0dc0 lri $AC1.M, #0x0dc0 - 025a 00ff 03a1 sr @0x03a1, $AC1.M - 025c 009f 03a8 lri $AC1.M, #0x03a8 - 025e 00ff 03a2 sr @0x03a2, $AC1.M - 0260 009f 03a4 lri $AC1.M, #0x03a4 - 0262 00ff 03a0 sr @0x03a0, $AC1.M - - 0264 1104 0282 bloopi #0x04, 0x0282 - 0266 00c0 03a2 lr $AR0, @0x03a2 - 0268 0083 0390 lri $AR3, #0x0390 - 026a 0f08 lris $AC1.M, #0x08 - 026b 02bf 00ec call 0x00ec // memcpy(0x0390, Mem[0x03A2], 8); - 026d 00da 0390 lr $AX0.H, @0x0390 - 026f 8600 tstaxh $AX0.H - 0270 0295 0274 jz 0x0274 - 0272 02bf 0225 call 0x0225 - 0274 00de 03a2 lr $AC0.M, @0x03a2 - 0276 0410 addis $ACC0, #0x10 - 0277 00fe 03a2 sr @0x03a2, $AC0.M - 0279 00de 03a1 lr $AC0.M, @0x03a1 - 027b 0460 addis $ACC0, #0x60 - 027c 00fe 03a1 sr @0x03a1, $AC0.M - 027e 00de 03a0 lr $AC0.M, @0x03a0 - 0280 7400 incm $AC0.M - 0281 00fe 03a0 sr @0x03a0, $AC0.M - - 0283 02df ret - -// CopyPBs() -// Copies some main memory region to 0x03A8 -// The memory region contains what seems to be PBs... -// Each PB is 32 bytes (16 words) long -// The transfer copies 64 words, ie 4 PBs. -// There may be more PBs, though. Dunno... - 0284 0081 0386 lri $AR1, #0x0386 // address of PBs, set by DsetupTable - 0286 009f 03a8 lri $AC1.M, #0x03a8 - 0288 0080 0040 lri $AR0, #0x0040 - 028a 02bf 05e6 call 0x05e6 // DmaCopy(0x03A8, Dword[0x0386], 64) - 028c 02df ret - -// Helper -// Increment the 32-bit value at AR0 by the value -// in AX0.L. - 028d 191e lrri $AC0.M, @$AR0 - 028e 189c lrrd $AC0.L, @$AR0 - 028f 4800 addax $ACC0, $AX0.L - 0290 1b1e srri @$AR0, $AC0.M - 0291 1b1c srri @$AR0, $AC0.L - 0292 02df ret - -// WaitForNextSyncMessage() -// Note: the wait loop continues until two values become non-equal. -// One of these values is set when sync mails are received. -// These mails, as well as 'regular' mails, are processed by the -// exception 7 handler. That's why that wait loop never checks for -// new mails. - 0293 8100 clr $ACC0 - 0294 8900 clr $ACC1 - 0295 00df 0354 lr $AC1.M, @0x0354 - 0297 00de 034e lr $AC0.M, @0x034e - 0299 8200 cmp - 029a 0293 0293 jle 0x0293 - 029c 02df ret - -// Opcode_02() - SyncFrame -// Message body: 5 mails -// Mail 1: bit0-15 = some number, bit16-32 = number of buffers to fill, bit24-30 = command (0x02) -// Mail 2: Address of right buffers in main memory (each buffer is 160 bytes long) -// Mail 3: Address of left buffers in main memory (each buffer is 160 bytes long) -// Mail 4: unused (zero) -// Mail 5: unused (zero) -// Stores the message body to 0x0388 and 0x0374. -// Performs mixing synchronously with the game. - 029d 0080 0388 lri $AR0, #0x0388 - 029f 0081 0065 lri $AR1, #0x0065 - 02a1 0e02 lris $AC0.M, #0x02 // Copy only 2 mails. The 2 last mails are unused. - 02a2 173f callr $AR1 // Copy message body to 0x0388 - 02a3 02bf 0476 call 0x0476 // Copy message body to 0x0374 - 02a5 00de 0344 lr $AC0.M, @0x0344 - 02a7 00fe 0341 sr @0x0341, $AC0.M - 02a9 00de 0345 lr $AC0.M, @0x0345 - 02ab 00fe 038e sr @0x038e, $AC0.M // Mem[0x038E] = Mem[0x0345] (set by DsetupTable) - 02ad 8100 clr $ACC0 - 02ae 00fe 0355 sr @0x0355, $AC0.M - 02b0 02bf 0284 call 0x0284 // Copy 4 PBs to 0x03A8 - 02b2 0092 00ff lri $CR, #0x00ff - 02b4 00de 0341 lr $AC0.M, @0x0341 - - 02b6 007e 0471 bloop $AC0.M, 0x0471 // Outer loop: for(i = 0; i < number_of_buffers; i++) - 02b8 02bf 0116 call 0x0116 // ClearBuffers() - 02ba 02bf 01c2 call 0x01c2 // ??? mix background music? echo processing? - 02bc 02bf 04e2 call 0x04e2 // ??? again a mixer? - 02be 02bf 0a91 call 0x0a91 // ??? multiplications - 02c0 00de 0355 lr $AC0.M, @0x0355 - 02c2 7400 incm $AC0.M // increment some counter - 02c3 00fe 0355 sr @0x0355, $AC0.M - 02c5 8100 clr $ACC0 - 02c6 00fe 0354 sr @0x0354, $AC0.M // reset some counter - 02c8 00de 0342 lr $AC0.M, @0x0342 - - 02ca 007e 0415 bloop $AC0.M, 0x0415 // Inner loop: for(j = 0; j < max (usually 64; set by DsetupTable); j++) - 02cc 02bf 0293 call 0x0293 // WaitForNextSyncMessage() - 02ce 8100 clr $ACC0 - 02cf 8900 clr $ACC1 - 02d0 00de 0354 lr $AC0.M, @0x0354 - 02d2 147c lsr $ACC0, #-4 - 02d3 0200 04fc addi $AC0.M, #0x04fc - 02d5 1c1e mrr $AR0, $AC0.M - 02d6 181f lrr $AC1.M, @$AR0 - 02d7 00de 0354 lr $AC0.M, @0x0354 - 02d9 0240 000f andi $AC0.M, #0x000f - 02db 3d80 andc'ls $AC1.M : $AX0.L, $AC0.M - 02dc 03c0 8000 andcf $AC1.M, #0x8000 - 02de 029c 0411 jlnz 0x0411 // skip if (AC1.M & 0x8000) != 0x8000 - 02e0 00d8 0354 lr $AX0.L, @0x0354 - 02e2 009a 0180 lri $AX0.H, #0x0180 - 02e4 8100 clr $ACC0 - 02e5 00de 0380 lr $AC0.M, @0x0380 - 02e7 00dc 0381 lr $AC0.L, @0x0381 - 02e9 9000 mul $AX0.L, $AX0.H - 02ea 9400 mulac $AX0.L, $AX0.H, $ACC0 // ACC0 += (j * 384); - 02eb 00fe 034c sr @0x034c, $AC0.M - 02ed 00fc 034d sr @0x034d, $AC0.L - 02ef 02bf 00cc call 0x00cc // read PB; dma transfer from (Dword[0x0380] + (j*384)) to 0x0400, 192 words - 02f1 00da 0400 lr $AX0.H, @0x0400 - 02f3 8600 tstaxh $AX0.H - 02f4 0295 0411 jz 0x0411 // skip if Mem[0x0400] is zero - 02f6 00da 0401 lr $AX0.H, @0x0401 - 02f8 8600 tstaxh $AX0.H - 02f9 0294 0411 jnz 0x0411 // skip if Mem[0x0401] is nonzero - 02fb 00da 0433 lr $AX0.H, @0x0433 - 02fd 00fa 03f8 sr @0x03f8, $AX0.H // Mem[0x03F8] = Mem[0x0433] - 02ff 00da 0406 lr $AX0.H, @0x0406 - 0301 8600 tstaxh $AX0.H - 0302 0294 0ef5 jnz 0x0ef5 // jump to 0x0EF5 if Mem[0x0406] is nonzero - 0304 8100 clr $ACC0 - 0305 00de 0480 lr $AC0.M, @0x0480 // switch (Mem[0x0480]) ; sound format? - 0307 0609 cmpis $ACC0, #0x09 // case 0x09: (smg) - 0308 0295 031b jz 0x031b - 030a 0605 cmpis $ACC0, #0x05 // case 0x05: - 030b 0295 031b jz 0x031b - 030d 0608 cmpis $ACC0, #0x08 // case 0x08: - 030e 0295 0ac1 jz 0x0ac1 - 0310 0610 cmpis $ACC0, #0x10 // case 0x10: (smg) - 0311 0295 0b3e jz 0x0b3e - 0313 0620 cmpis $ACC0, #0x20 // case 0x20: - 0314 0295 0baf jz 0x0baf - 0316 0621 cmpis $ACC0, #0x21 // case 0x21: - 0317 0295 0bb7 jz 0x0bb7 - 0319 029f 09ae jmp 0x09ae // default: - // sound types 9 and 5 - // no compression? - 031b 00d8 0402 lr $AX0.L, @0x0402 // 0x0D71 - 031d 8100 clr $ACC0 - 031e 8900 clr $ACC1 - 031f 00dc 0430 lr $AC0.L, @0x0430 // 0x0000 - 0321 8d00 set15 - 0322 0950 lris $AX1.L, #0x50 - 0323 a000 mulx $AX0.L, $AX1.L - 0324 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0325 1404 lsl $ACC0, #4 // ACC0 = (Mem[0x0430] + (Mem[0x0402] * 80)) << 4; (AC0.L = 0x3500; AC0.M = 0x0043; AC0.H = 0x00;) - 0326 8c00 clr15 - 0327 1ffe mrr $AC1.M, $AC0.M // AC1.M = 0x0043; - 0328 0083 0580 lri $AR3, #0x0580 // AR3 = 0x0580; - 032a 02bf 086e call 0x086e - 032c 029f 032e jmp 0x032e - - 032e 0080 0580 lri $AR0, #0x0580 - 0330 0081 0520 lri $AR1, #0x0520 - 0332 0099 0000 lri $AX1.L, #0x0000 - 0334 02bf 0e75 call 0x0e75 // store ramp - - 0336 009e 0520 lri $AC0.M, #0x0520 - 0338 00fe 038f sr @0x038f, $AC0.M // Mem[0x038F] = 0x0520; - 033a 8900 clr $ACC1 - 033b 00df 0484 lr $AC1.M, @0x0484 - 033d 0340 001f andi $AC1.M, #0x001f - 033f b900 tst $ACC1 - 0340 0295 0366 jz 0x0366 - 0342 00de 038f lr $AC0.M, @0x038f - 0344 5c00 sub $ACC0, $AC1.L - 0345 00fe 038f sr @0x038f, $AC0.M // Mem[0x038F] -= AC1.L; uh? - 0347 1c7e mrr $AR3, $AC0.M - 0348 0080 0440 lri $AR0, #0x0440 - 034a 05fe addis $ACC1, #0xfe - 034b 02bf 00e5 call 0x00e5 // ??? - 034d 0080 0490 lri $AR0, #0x0490 - 034f 00c1 038f lr $AR1, @0x038f - 0351 8900 clr $ACC1 - 0352 00df 0484 lr $AC1.M, @0x0484 - 0354 0340 001f andi $AC1.M, #0x001f - 0356 02bf 0c62 call 0x0c62 // ??? - 0358 00de 038f lr $AC0.M, @0x038f - 035a 0450 addis $ACC0, #0x50 - 035b 1c1e mrr $AR0, $AC0.M - 035c 0083 0440 lri $AR3, #0x0440 - 035e 8900 clr $ACC1 - 035f 00df 0484 lr $AC1.M, @0x0484 - 0361 0340 001f andi $AC1.M, #0x001f - 0363 05fe addis $ACC1, #0xfe - 0364 02bf 00e5 call 0x00e5 // ??? - - 0366 00de 0484 lr $AC0.M, @0x0484 - 0368 0240 0020 andi $AC0.M, #0x0020 - 036a 0295 0388 jz 0x0388 - 036c 0080 04a4 lri $AR0, #0x04a4 - 036e 00c1 038f lr $AR1, @0x038f - 0370 0082 0454 lri $AR2, #0x0454 - 0372 0083 04a7 lri $AR3, #0x04a7 - 0374 18fa lrrd $AX0.H, @$AR3 - 0375 8600 tstaxh $AX0.H - 0376 0294 0386 jnz 0x0386 - 0378 18fa lrrd $AX0.H, @$AR3 - 0379 8600 tstaxh $AX0.H - 037a 0294 0386 jnz 0x0386 - 037c 18fa lrrd $AX0.H, @$AR3 - 037d 8600 tstaxh $AX0.H - 037e 0294 0386 jnz 0x0386 - 0380 8100 clr $ACC0 - 0381 18fe lrrd $AC0.M, @$AR3 - 0382 0280 7fff cmpi $AC0.M, #0x7fff - 0384 0295 0388 jz 0x0388 - 0386 02bf 0c7d call 0x0c7d // ??? - - 0388 8100 clr $ACC0 - 0389 00de 042c lr $AC0.M, @0x042c // 0x0001 - 038b b100 tst $ACC0 - 038c 0295 0392 jz 0x0392 - 038e 02bf 0dc3 call 0x0dc3 // ??? - 0390 029f 0407 jmp 0x0407 - - 0392 8100 clr $ACC0 - 0393 1c9e mrr $IX0, $AC0.M - 0394 1cde mrr $IX2, $AC0.M - 0395 7400 incm $AC0.M - 0396 1cfe mrr $IX3, $AC0.M - 0397 8100 clr $ACC0 - 0398 00de 0407 lr $AC0.M, @0x0407 - 039a b100 tst $ACC0 - 039b 0295 03aa jz 0x03aa - 039d 00c3 038f lr $AR3, @0x038f - 039f 0007 dar $AR3 - 03a0 0080 0477 lri $AR0, #0x0477 - 03a2 0084 ffff lri $IX0, #0xffff - 03a4 0087 ffff lri $IX3, #0xffff - 03a6 199a lrrn $AX0.H, @$AR0 - 03a7 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - 03a8 005e loop $AC0.M - 03a9 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - 03aa 00da 0485 lr $AX0.H, @0x0485 - 03ac 8600 tstaxh $AX0.H - 03ad 0295 03c0 jz 0x03c0 - 03af 8900 clr $ACC1 - 03b0 0086 0005 lri $IX2, #0x0005 - 03b2 0082 040a lri $AR2, #0x040a - - 03b4 1106 03b8 bloopi #0x06, 0x03b8 - 03b6 18de lrrd $AC0.M, @$AR2 - 03b7 147f lsr $ACC0, #-1 - 03b8 4d36 add'sn $ACC1, $AC0.L : @$AR2, $AC0.M - - 03b9 b900 tst $ACC1 - 03ba 0294 03c0 jnz 0x03c0 - 03bc 009a 0001 lri $AX0.H, #0x0001 - 03be 00fa 0401 sr @0x0401, $AX0.H // Key Off - 03c0 8f00 set40 - 03c1 0086 0002 lri $IX2, #0x0002 - 03c3 0082 0408 lri $AR2, #0x0408 - - 03c5 1106 03f0 bloopi #0x06, 0x03f0 - 03c7 8100 clr $ACC0 - 03c8 195e lrri $AC0.M, @$AR2 - 03c9 1200 sbclr #0x00 - 03ca b100 tst $ACC0 - 03cb 0275 ifz - 03cc 1300 sbset #0x00 - 03cd 1c7e mrr $AR3, $AC0.M - 03ce 195e lrri $AC0.M, @$AR2 - 03cf 195f lrri $AC1.M, @$AR2 - 03d0 5c00 sub $ACC0, $AC1.L - 03d1 14fb asr $ACC0, #-5 - 03d2 1f5e mrr $AX0.H, $AC0.M - 03d3 1f1c mrr $AX0.L, $AC0.L - 03d4 185e lrr $AC0.M, @$AR2 - 03d5 0240 00ff andi $AC0.M, #0x00ff - 03d7 1f7e mrr $AX1.H, $AC0.M - 03d8 185e lrr $AC0.M, @$AR2 - 03d9 1478 lsr $ACC0, #-8 - 03da 009c 0000 lri $AC0.L, #0x0000 - 03dc d100 cmpar $ACC1, $AX0.H - 03dd 0295 03e5 jz 0x03e5 - 03df 185e lrr $AC0.M, @$AR2 - 03e0 0272 ifg - 03e1 7400 incm $AC0.M - 03e2 0271 ifs - 03e3 7800 decm $AC0.M - 03e4 1a5e srr @$AR2, $AC0.M - 03e5 0006 dar $AR2 - 03e6 00de 038f lr $AC0.M, @0x038f - 03e8 5600 subr $ACC0, $AX1.H - 03e9 029d 03ee jlz 0x03ee - 03eb 1c1e mrr $AR0, $AC0.M - 03ec 02bf 0d99 call 0x0d99 // ??? - 03ee 0000 nop - 03ef 1b5f srri @$AR2, $AC1.M - 03f0 000a iar $AR2 - - 03f1 8e00 set16 - 03f2 8100 clr $ACC0 - 03f3 00de 0407 lr $AC0.M, @0x0407 - 03f5 b100 tst $ACC0 - 03f6 0295 0407 jz 0x0407 - 03f8 00c3 038f lr $AR3, @0x038f - 03fa 0087 004f lri $IX3, #0x004f - 03fc 001f addarn $AR3, $IX3 - 03fd 0080 0477 lri $AR0, #0x0477 - 03ff 0084 ffff lri $IX0, #0xffff - 0401 0087 ffff lri $IX3, #0xffff - 0403 19fa lrrn $AX0.H, @$AR3 - 0404 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 0405 005e loop $AC0.M - 0406 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - - 0407 00da 0406 lr $AX0.H, @0x0406 - 0409 8600 tstaxh $AX0.H - 040a 0294 040f jnz 0x040f // skip zeroing of Mem[0x0404] if Mem[0x0406] is nonzero - 040c 8100 clr $ACC0 - 040d 00fe 0404 sr @0x0404, $AC0.M // Mem[0x0404] = 0x0000; - 040f 02bf 00d5 call 0x00d5 // write back PB - 0411 00de 0354 lr $AC0.M, @0x0354 - 0413 7400 incm $AC0.M // increment some counter - 0414 00fe 0354 sr @0x0354, $AC0.M - // end of inner loop - 0416 0e00 lris $AC0.M, #0x00 - 0417 00fe 034e sr @0x034e, $AC0.M - 0419 0e04 lris $AC0.M, #0x04 - 041a 02bf 079b call 0x079b // SendMail_DCD1(0x0004) - 041c 00de 0355 lr $AC0.M, @0x0355 - 041e 0260 ff00 ori $AC0.M, #0xff00 - 0420 02bf 07a5 call 0x07a5 // SendMail_F355(0xFF00 | Mem[0x0355]) - 0422 02bf 0d1f call 0x0d1f // ??? - 0424 02bf 0d31 call 0x0d31 // ??? - 0426 02bf 0d86 call 0x0d86 // perform mults on buffer #1 - 0428 00de 0341 lr $AC0.M, @0x0341 - 042a 7800 decm $AC0.M // decrement some counter - 042b 00fe 0341 sr @0x0341, $AC0.M - 042d 0080 09a0 lri $AR0, #0x09a0 - 042f 0083 0d00 lri $AR3, #0x0d00 - 0431 0f50 lris $AC1.M, #0x50 - 0432 0098 5a82 lri $AX0.L, #0x5a82 - 0434 02bf 00ff call 0x00ff // operations on right buffer - 0436 0080 09a0 lri $AR0, #0x09a0 - 0438 0083 0d60 lri $AR3, #0x0d60 - 043a 0f50 lris $AC1.M, #0x50 - 043b 02bf 00ff call 0x00ff // operations on left buffer - 043d 0083 0d00 lri $AR3, #0x0d00 - 043f 02bf 0db1 call 0x0db1 // operations on right buffer - 0441 0081 0388 lri $AR1, #0x0388 - 0443 009f 0d00 lri $AC1.M, #0x0d00 - 0445 0080 0050 lri $AR0, #0x0050 - 0447 02bf 05f3 call 0x05f3 // DmaCopy(Dword[0x0388], 0x0D00, 80); Copy the final right buffer to main memory - 0449 0080 0fa0 lri $AR0, #0x0fa0 - 044b 0083 0d60 lri $AR3, #0x0d60 - 044d 0f50 lris $AC1.M, #0x50 - 044e 0098 8000 lri $AX0.L, #0x8000 - 0450 02bf 00ff call 0x00ff // operations on left buffer (uh? again?) - 0452 0083 0d60 lri $AR3, #0x0d60 - 0454 02bf 0db1 call 0x0db1 // operations on left buffer - 0456 0081 038a lri $AR1, #0x038a - 0458 009f 0d60 lri $AC1.M, #0x0d60 - 045a 0080 0050 lri $AR0, #0x0050 - 045c 02bf 05f3 call 0x05f3 // DmaCopy(Dword[0x038A], 0x0D60, 80); Copy the final left buffer to main memory - 045e 009a 0000 lri $AX0.H, #0x0000 - 0460 0098 00a0 lri $AX0.L, #0x00a0 - 0462 0080 0388 lri $AR0, #0x0388 - 0464 02bf 028d call 0x028d // Increment right buffer address - 0466 0080 038a lri $AR0, #0x038a - 0468 02bf 028d call 0x028d // Increment left buffer address - 046a 02bf 023f call 0x023f // call that other mixer - 046c 02bf 04b1 call 0x04b1 - 046e 02bf 0488 call 0x0488 // copy other buffers to main memory - 0470 0000 nop - 0471 0000 nop - // end of outer loop - 0472 0080 002b lri $AR0, #0x002b - 0474 029f 0734 jmp 0x0734 - -// copy the message body to 0x0374 - 0476 0080 0374 lri $AR0, #0x0374 - 0478 0e02 lris $AC0.M, #0x02 - 0479 02bf 0067 call 0x0067 - 047b 00de 0374 lr $AC0.M, @0x0374 - 047d 0240 7fff andi $AC0.M, #0x7fff - 047f 00fe 0374 sr @0x0374, $AC0.M - 0481 00de 0376 lr $AC0.M, @0x0376 - 0483 0240 7fff andi $AC0.M, #0x7fff - 0485 00fe 0376 sr @0x0376, $AC0.M - 0487 02df ret - -// copy other buffers to main memory -// that's probably why the mail body of cmd 0x02 is copied -// to two locations... - 0488 00da 0374 lr $AX0.H, @0x0374 - 048a 8600 tstaxh $AX0.H // Return immediately if right buffer address is zero - 048b 02d5 retz // But what happens if the left buffer address is zero? - 048c 0083 0f40 lri $AR3, #0x0f40 - 048e 02bf 0db1 call 0x0db1 // copy right buffer - 0490 0083 0ca0 lri $AR3, #0x0ca0 - 0492 02bf 0db1 call 0x0db1 // copy left buffer - 0494 0081 0374 lri $AR1, #0x0374 - 0496 009f 0f40 lri $AC1.M, #0x0f40 - 0498 0080 0050 lri $AR0, #0x0050 - 049a 02bf 05f3 call 0x05f3 // DmaCopy(Dword[0x0374], 0x0F40, 80); Right buffer - 049c 0081 0376 lri $AR1, #0x0376 - 049e 009f 0ca0 lri $AC1.M, #0x0ca0 - 04a0 0080 0050 lri $AR0, #0x0050 - 04a2 02bf 05f3 call 0x05f3 // DmaCopy(Dword[0x0376], 0x0CA0, 80); Left buffer - 04a4 009a 0000 lri $AX0.H, #0x0000 - 04a6 0098 00a0 lri $AX0.L, #0x00a0 - 04a8 0080 0374 lri $AR0, #0x0374 - 04aa 02bf 028d call 0x028d // Increment right buffer address - 04ac 0080 0376 lri $AR0, #0x0376 - 04ae 02bf 028d call 0x028d // Increment left buffer address - 04b0 02df ret - -// - 04b1 00da 0374 lr $AX0.H, @0x0374 - 04b3 8600 tstaxh $AX0.H - 04b4 02d5 retz - 04b5 009f 0be0 lri $AC1.M, #0x0be0 - 04b7 00ff 03a1 sr @0x03a1, $AC1.M - 04b9 00df 03ca lr $AC1.M, @0x03ca - 04bb 00ff 0392 sr @0x0392, $AC1.M - 04bd 00df 03cb lr $AC1.M, @0x03cb - 04bf 00ff 0393 sr @0x0393, $AC1.M - 04c1 009f 03a6 lri $AC1.M, #0x03a6 - 04c3 00ff 03a0 sr @0x03a0, $AC1.M - 04c5 00df 03c9 lr $AC1.M, @0x03c9 - 04c7 00ff 0391 sr @0x0391, $AC1.M - 04c9 02bf 0225 call 0x0225 - 04cb 009f 0c40 lri $AC1.M, #0x0c40 - 04cd 00ff 03a1 sr @0x03a1, $AC1.M - 04cf 00df 03da lr $AC1.M, @0x03da - 04d1 00ff 0392 sr @0x0392, $AC1.M - 04d3 00df 03db lr $AC1.M, @0x03db - 04d5 00ff 0393 sr @0x0393, $AC1.M - 04d7 009f 03a7 lri $AC1.M, #0x03a7 - 04d9 00ff 03a0 sr @0x03a0, $AC1.M - 04db 00df 03d9 lr $AC1.M, @0x03d9 - 04dd 00ff 0391 sr @0x0391, $AC1.M - 04df 02bf 0225 call 0x0225 - 04e1 02df ret - -// mixer? - 04e2 00da 0374 lr $AX0.H, @0x0374 // Check if right buffer address is zero - 04e4 8600 tstaxh $AX0.H - 04e5 02d5 retz - 04e6 00da 03d8 lr $AX0.H, @0x03d8 // uh? - 04e8 8600 tstaxh $AX0.H - 04e9 02d5 retz - 04ea 0083 0be0 lri $AR3, #0x0be0 - 04ec 0080 0c30 lri $AR0, #0x0c30 - 04ee 0f04 lris $AC1.M, #0x04 - 04ef 02bf 00ec call 0x00ec // memcpy(0x0BE0, 0x0C30, 4); - 04f1 0083 0c40 lri $AR3, #0x0c40 - 04f3 0080 0c90 lri $AR0, #0x0c90 - 04f5 0f04 lris $AC1.M, #0x04 - 04f6 02bf 00ec call 0x00ec // memcpy(0x0C40, 0x0C90, 4); - 04f8 00df 03ca lr $AC1.M, @0x03ca - 04fa 00ff 0392 sr @0x0392, $AC1.M - 04fc 00df 03cb lr $AC1.M, @0x03cb - 04fe 00ff 0393 sr @0x0393, $AC1.M - 0500 00df 03a6 lr $AC1.M, @0x03a6 - 0502 7500 incm $AC1.M - 0503 1f5f mrr $AX0.H, $AC1.M - 0504 009f 0be8 lri $AC1.M, #0x0be8 - 0506 02bf 016c call 0x016c - 0508 00df 03da lr $AC1.M, @0x03da - 050a 00ff 0392 sr @0x0392, $AC1.M - 050c 00df 03db lr $AC1.M, @0x03db - 050e 00ff 0393 sr @0x0393, $AC1.M - 0510 00df 03a7 lr $AC1.M, @0x03a7 - 0512 7500 incm $AC1.M - 0513 1f5f mrr $AX0.H, $AC1.M - 0514 009f 0c48 lri $AC1.M, #0x0c48 - 0516 02bf 016c call 0x016c - 0518 00de 03c8 lr $AC0.M, @0x03c8 - 051a 02a0 0001 andf $AC0.M, #0x0001 - 051c 029d 0525 jlz 0x0525 - 051e 0080 03d0 lri $AR0, #0x03d0 - 0520 0e08 lris $AC0.M, #0x08 - 0521 0081 0be0 lri $AR1, #0x0be0 - 0523 02bf 0c43 call 0x0c43 - 0525 00de 03d8 lr $AC0.M, @0x03d8 - 0527 02a0 0001 andf $AC0.M, #0x0001 - 0529 029d 0532 jlz 0x0532 - 052b 0080 03e0 lri $AR0, #0x03e0 - 052d 0e08 lris $AC0.M, #0x08 - 052e 0081 0c40 lri $AR1, #0x0c40 - 0530 02bf 0c43 call 0x0c43 - 0532 0f50 lris $AC1.M, #0x50 - 0533 0080 0be0 lri $AR0, #0x0be0 - 0535 0083 0f40 lri $AR3, #0x0f40 - 0537 00d8 03cd lr $AX0.L, @0x03cd - 0539 02bf 00ff call 0x00ff - 053b 0f50 lris $AC1.M, #0x50 - 053c 0080 0c40 lri $AR0, #0x0c40 - 053e 0083 0ca0 lri $AR3, #0x0ca0 - 0540 00d8 03df lr $AX0.L, @0x03df - 0542 02bf 00ff call 0x00ff - 0544 00de 03c8 lr $AC0.M, @0x03c8 - 0546 02a0 0002 andf $AC0.M, #0x0002 - 0548 029d 0551 jlz 0x0551 - 054a 0080 03d0 lri $AR0, #0x03d0 - 054c 0e08 lris $AC0.M, #0x08 - 054d 0081 0be0 lri $AR1, #0x0be0 - 054f 02bf 0c43 call 0x0c43 - 0551 00de 03d8 lr $AC0.M, @0x03d8 - 0553 02a0 0002 andf $AC0.M, #0x0002 - 0555 029d 055e jlz 0x055e - 0557 0080 03e0 lri $AR0, #0x03e0 - 0559 0e08 lris $AC0.M, #0x08 - 055a 0081 0c40 lri $AR1, #0x0c40 - 055c 02bf 0c43 call 0x0c43 - 055e 02df ret - -// Opcode_07() - - 055f 0080 0346 lri $AR0, #0x0346 - 0561 02bf 0065 call 0x0065 - 0563 02bf 0065 call 0x0065 - 0565 0081 0346 lri $AR1, #0x0346 - 0567 193e lrri $AC0.M, @$AR1 - 0568 193c lrri $AC0.L, @$AR1 - 0569 009f 0400 lri $AC1.M, #0x0400 - 056b 00c0 0345 lr $AR0, @0x0345 - 056d 02bf 05e8 call 0x05e8 - 056f 0081 0348 lri $AR1, #0x0348 - 0571 193e lrri $AC0.M, @$AR1 - 0572 193c lrri $AC0.L, @$AR1 - 0573 009f 0800 lri $AC1.M, #0x0800 - 0575 00c0 0345 lr $AR0, @0x0345 - 0577 02bf 05e8 call 0x05e8 - 0579 0081 0346 lri $AR1, #0x0346 - 057b 193e lrri $AC0.M, @$AR1 - 057c 193c lrri $AC0.L, @$AR1 - 057d 009f 0800 lri $AC1.M, #0x0800 - 057f 00c0 0345 lr $AR0, @0x0345 - 0581 02bf 05f5 call 0x05f5 - 0583 0081 0348 lri $AR1, #0x0348 - 0585 193e lrri $AC0.M, @$AR1 - 0586 193c lrri $AC0.L, @$AR1 - 0587 009f 0400 lri $AC1.M, #0x0400 - 0589 00c0 0345 lr $AR0, @0x0345 - 058b 02bf 05f5 call 0x05f5 - 058d 029f 0041 jmp 0x0041 - -// Opcode_09() - - 058f 0080 0346 lri $AR0, #0x0346 - 0591 02bf 0065 call 0x0065 - 0593 02bf 0065 call 0x0065 - 0595 0081 0346 lri $AR1, #0x0346 - 0597 193e lrri $AC0.M, @$AR1 - 0598 193c lrri $AC0.L, @$AR1 - 0599 009f 0400 lri $AC1.M, #0x0400 - 059b 00c0 0345 lr $AR0, @0x0345 - 059d 02bf 05e8 call 0x05e8 - 059f 0081 0348 lri $AR1, #0x0348 - 05a1 193e lrri $AC0.M, @$AR1 - 05a2 193c lrri $AC0.L, @$AR1 - 05a3 009f 0400 lri $AC1.M, #0x0400 - 05a5 00c0 0345 lr $AR0, @0x0345 - 05a7 02bf 05f5 call 0x05f5 - 05a9 029f 0041 jmp 0x0041 - -// Opcode_08() - - 05ab 0080 0346 lri $AR0, #0x0346 - 05ad 02bf 0065 call 0x0065 - 05af 02bf 0065 call 0x0065 - 05b1 0081 0346 lri $AR1, #0x0346 - 05b3 193e lrri $AC0.M, @$AR1 - 05b4 193c lrri $AC0.L, @$AR1 - 05b5 009f 0400 lri $AC1.M, #0x0400 - 05b7 00c0 0344 lr $AR0, @0x0344 - 05b9 02bf 05e8 call 0x05e8 - 05bb 0081 0348 lri $AR1, #0x0348 - 05bd 193e lrri $AC0.M, @$AR1 - 05be 193c lrri $AC0.L, @$AR1 - 05bf 009f 0800 lri $AC1.M, #0x0800 - 05c1 00c0 0344 lr $AR0, @0x0344 - 05c3 02bf 05e8 call 0x05e8 - 05c5 0080 0400 lri $AR0, #0x0400 - 05c7 0083 0800 lri $AR3, #0x0800 - 05c9 0084 0000 lri $IX0, #0x0000 - 05cb 00da 0345 lr $AX0.H, @0x0345 - 05cd 00df 0344 lr $AC1.M, @0x0344 - 05cf 8f00 set40 - 05d0 197b lrri $AX1.H, @$AR3 - 05d1 b800 mulx $AX0.H, $AX1.H - 05d2 197b lrri $AX1.H, @$AR3 - 05d3 007f 05d8 bloop $AC1.M, 0x05d8 - 05d5 199e lrrn $AC0.M, @$AR0 - 05d6 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 05d7 80b2 nx'sl : $AC0.M, $AX1.H - 05d8 0000 nop - 05d9 8e00 set16 - 05da 0081 0346 lri $AR1, #0x0346 - 05dc 193e lrri $AC0.M, @$AR1 - 05dd 193c lrri $AC0.L, @$AR1 - 05de 009f 0400 lri $AC1.M, #0x0400 - 05e0 00c0 0344 lr $AR0, @0x0344 - 05e2 02bf 05f5 call 0x05f5 - 05e4 029f 0041 jmp 0x0041 - -// DmaCopy(destination, source, len) -// AR1 = source: pointer to the main memory (32-bit) address -// AC1.M = destination: DSP memory address -// AR0 = len: length in words - 05e6 193e lrri $AC0.M, @$AR1 - 05e7 193c lrri $AC0.L, @$AR1 - 05e8 2fcd srs @DSPA, $AC1.M - 05e9 0f00 lris $AC1.M, #0x00 - 05ea 2fc9 srs @DSCR, $AC1.M - 05eb 2ece srs @DSMAH, $AC0.M - 05ec 2ccf srs @DSMAL, $AC0.L - 05ed 1fe0 mrr $AC1.M, $AR0 - 05ee 1501 lsl $ACC1, #1 - 05ef 2fcb srs @DSBL, $AC1.M - 05f0 02bf 05f9 call 0x05f9 - 05f2 02df ret - -// DmaCopy(destination, source, len) -// AR1 = destination: pointer to the main memory (32-bit) address -// AC1.M = source: DSP memory address -// AR0 = len: length in words - 05f3 193e lrri $AC0.M, @$AR1 - 05f4 193c lrri $AC0.L, @$AR1 - 05f5 2fcd srs @DSPA, $AC1.M - 05f6 0f01 lris $AC1.M, #0x01 - 05f7 029f 05ea jmp 0x05ea - -// wait for dma completion? - 05f9 26c9 lrs $AC0.M, @DSCR - 05fa 02a0 0004 andf $AC0.M, #0x0004 - 05fc 029c 05f9 jlnz 0x05f9 - 05fe 02df ret - -// unused dma routine - 05ff 193e lrri $AC0.M, @$AR1 - 0600 193c lrri $AC0.L, @$AR1 - 0601 00ff ffcd sr @DSPA, $AC1.M - 0603 0f00 lris $AC1.M, #0x00 - 0604 00ff ffc9 sr @DSCR, $AC1.M - 0606 00fe ffce sr @DSMAH, $AC0.M - 0608 00fc ffcf sr @DSMAL, $AC0.L - 060a 1fe0 mrr $AC1.M, $AR0 - 060b 1501 lsl $ACC1, #1 - 060c 00ff ffcb sr @DSBL, $AC1.M - 060e 02df ret - -// - 060f 00de ffc9 lr $AC0.M, @DSCR - 0611 02a0 0004 andf $AC0.M, #0x0004 - 0613 029c 060f jlnz 0x060f - 0615 02df ret - -// Opcode_04() - - 0616 0080 0346 lri $AR0, #0x0346 - 0618 02bf 0065 call 0x0065 - 061a 02bf 0065 call 0x0065 // wtf? - 061c 0081 0346 lri $AR1, #0x0346 - 061e 00df 0349 lr $AC1.M, @0x0349 - 0620 0340 ffff andi $AC1.M, #0xffff - 0622 00c0 0345 lr $AR0, @0x0345 - 0624 02bf 05e6 call 0x05e6 // DmaCopy(0x0349, Dword[0x0346], Mem[0x0345]) - 0626 029f 0041 jmp 0x0041 - -// Opcode_05() - - 0628 0080 0346 lri $AR0, #0x0346 - 062a 02bf 0065 call 0x0065 - 062c 02bf 0065 call 0x0065 // wtf? - 062e 0081 0346 lri $AR1, #0x0346 - 0630 00df 0349 lr $AC1.M, @0x0349 - 0632 0340 ffff andi $AC1.M, #0xffff - 0634 00c0 0345 lr $AR0, @0x0345 - 0636 02bf 05f3 call 0x05f3 - 0638 029f 0041 jmp 0x0041 - -// ReadSoundData(addr) -// AC0.M:AC0.L = main memory address -// read 128 samples of PCM8 sound from main memory to DSP memory at 0x0B00 - 063a 1ffc mrr $AC1.M, $AC0.L - 063b 0340 001f andi $AC1.M, #0x001f - 063d 00ff 037f sr @0x037f, $AC1.M - 063f 1ffc mrr $AC1.M, $AC0.L - 0640 0340 ffe0 andi $AC1.M, #0xffe0 - 0642 1f9f mrr $AC0.L, $AC1.M - 0643 00df 037d lr $AC1.M, @0x037d - 0645 00dd 037e lr $AC1.L, @0x037e - 0647 4c00 add $ACC0, $AC1.L - 0648 00fe ffce sr @DSMAH, $AC0.M - 064a 00fc ffcf sr @DSMAL, $AC0.L - 064c 0f00 lris $AC1.M, #0x00 - 064d 00ff ffc9 sr @DSCR, $AC1.M - 064f 009f 0b20 lri $AC1.M, #0x0b20 - 0651 00ff ffcd sr @DSPA, $AC1.M - 0653 0f40 lris $AC1.M, #0x40 - 0654 00ff ffcb sr @DSBL, $AC1.M - 0656 00de ffc9 lr $AC0.M, @DSCR - 0658 02a0 0004 andf $AC0.M, #0x0004 - 065a 029c 0656 jlnz 0x0656 - 065c 1fe1 mrr $AC1.M, $AR1 - 065d 0081 0b00 lri $AR1, #0x0b00 // Dst = 0x0B00; - 065f 0080 0b20 lri $AR0, #0x0b20 // Src = 0x0B20; - // for(i = 0; i < 32; i++) - 0661 1120 066a bloopi #0x20, 0x066a - 0663 8100 clr $ACC0 - 0664 191e lrri $AC0.M, @$AR0 - 0665 1478 lsr $ACC0, #-8 - 0666 1b3e srri @$AR1, $AC0.M // Dst[i*2] = Src[i] >> 8; - 0667 1408 lsl $ACC0, #8 - 0668 0240 00ff andi $AC0.M, #0x00ff - 066a 1b3e srri @$AR1, $AC0.M // Dst[i*2 + 1] = Src[i] & 0xFF; - - 066b 1c3f mrr $AR1, $AC1.M // Keep AR1 value to 0x0B00 - 066c 029f 092b jmp 0x092b - 066e 02df ret - -// dma? - 066f 1fc3 mrr $AC0.M, $AR3 - 0670 043f addis $ACC0, #0x3f - 0671 0240 fff0 andi $AC0.M, #0xfff0 - 0673 00fe ffcd sr @DSPA, $AC0.M - 0675 1c1a mrr $AR0, $AX0.H - 0676 00da 037f lr $AX0.H, @0x037f - 0678 4400 addr $ACC0, $AX0.H - 0679 1f40 mrr $AX0.H, $AR0 - 067a 1c1e mrr $AR0, $AC0.M - 067b 1fda mrr $AC0.M, $AX0.H - 067c 041f addis $ACC0, #0x1f - 067d 0240 fff0 andi $AC0.M, #0xfff0 - 067f 1401 lsl $ACC0, #1 - 0680 00fe ffcb sr @DSBL, $AC0.M - 0682 00de ffc9 lr $AC0.M, @DSCR - 0684 02a0 0004 andf $AC0.M, #0x0004 - 0686 029c 0682 jlnz 0x0682 - 0688 007a 068b bloop $AX0.H, 0x068b - 068a 191e lrri $AC0.M, @$AR0 - 068b 1b7e srri @$AR3, $AC0.M - 068c 02df ret - -// setup DSMAH, DSMAL and DSCR (RAM -> DSP memory) - 068d 8900 clr $ACC1 - 068e 1ffc mrr $AC1.M, $AC0.L - 068f 0340 001f andi $AC1.M, #0x001f - 0691 00ff 037f sr @0x037f, $AC1.M - 0693 1ffc mrr $AC1.M, $AC0.L - 0694 0340 ffe0 andi $AC1.M, #0xffe0 // addr &= 0xFFFFFFE0; - 0696 1f9f mrr $AC0.L, $AC1.M - 0697 00df 037d lr $AC1.M, @0x037d // 0x1000 - 0699 00dd 037e lr $AC1.L, @0x037e // 0x0800 - 069b 4c00 add $ACC0, $AC1.L // addr += 0x10000800; - 069c 00fe ffce sr @DSMAH, $AC0.M - 069e 00fc ffcf sr @DSMAL, $AC0.L - 06a0 0f00 lris $AC1.M, #0x00 - 06a1 00ff ffc9 sr @DSCR, $AC1.M - 06a3 02df ret - -// setup DSPA and DSBL (and thus complete DMA transfer) -// memory transferred is stored (temporarily) to 0x0780 -// then it's copied to the address specified by AR3 - 06a4 00df 037f lr $AC1.M, @0x037f - 06a6 157f lsr $ACC1, #-1 - 06a7 00ff 037f sr @0x037f, $AC1.M - 06a9 02df ret - 06aa 8600 tstaxh $AX0.H - 06ab 02d5 retz - 06ac 1f1a mrr $AX0.L, $AX0.H - 06ad 009e 0780 lri $AC0.M, #0x0780 - 06af 00fe ffcd sr @DSPA, $AC0.M - 06b1 1fda mrr $AC0.M, $AX0.H - 06b2 043f addis $ACC0, #0x3f - 06b3 0240 ffe0 andi $AC0.M, #0xffe0 - 06b5 00fe ffcb sr @DSBL, $AC0.M - 06b7 00de ffc9 lr $AC0.M, @DSCR - 06b9 02a0 0004 andf $AC0.M, #0x0004 - 06bb 029c 06b7 jlnz 0x06b7 - 06bd 8100 clr $ACC0 - 06be 00de 037f lr $AC0.M, @0x037f - 06c0 147f lsr $ACC0, #-1 - 06c1 0200 0780 addi $AC0.M, #0x0780 - 06c3 1c1e mrr $AR0, $AC0.M - 06c4 00de 037f lr $AC0.M, @0x037f - 06c6 02a0 0001 andf $AC0.M, #0x0001 - 06c8 029d 06d1 jlz 0x06d1 - 06ca 8100 clr $ACC0 - 06cb 191e lrri $AC0.M, @$AR0 - 06cc 1488 asl $ACC0, #8 - 06cd 1b7e srri @$AR3, $AC0.M - 06ce 1fda mrr $AC0.M, $AX0.H - 06cf 7800 decm $AC0.M - 06d0 1f5e mrr $AX0.H, $AC0.M - 06d1 8100 clr $ACC0 - 06d2 1fda mrr $AC0.M, $AX0.H - 06d3 147f lsr $ACC0, #-1 - - 06d4 007e 06dd bloop $AC0.M, 0x06dd - 06d6 8100 clr $ACC0 - 06d7 181e lrr $AC0.M, @$AR0 - 06d8 0240 ff00 andi $AC0.M, #0xff00 - 06da 1b7e srri @$AR3, $AC0.M - 06db 191e lrri $AC0.M, @$AR0 - 06dc 1488 asl $ACC0, #8 - 06dd 1b7e srri @$AR3, $AC0.M - - 06de 1fda mrr $AC0.M, $AX0.H - 06df 1f58 mrr $AX0.H, $AX0.L - 06e0 02a0 0001 andf $AC0.M, #0x0001 - 06e2 02dd retlz - 06e3 8100 clr $ACC0 - 06e4 181e lrr $AC0.M, @$AR0 - 06e5 0240 ff00 andi $AC0.M, #0xff00 - 06e7 1b7e srri @$AR3, $AC0.M - 06e8 02df ret - -// Exception_0E() - 06e9 1205 sbclr #0x05 - 06ea 8e00 set16 - 06eb 00f0 03fd sr @0x03fd, $AC0.H - 06ed 00fc 03ff sr @0x03ff, $AC0.L - 06ef f400 lsr16 $ACC0 - 06f0 00fc 03fe sr @0x03fe, $AC0.L - 06f2 00fa 03fa sr @0x03fa, $AX0.H - 06f4 8100 clr $ACC0 - 06f5 00de fffe lr $AC0.M, @CMBH // check for new mail - 06f7 02c0 8000 andcf $AC0.M, #0x8000 - 06f9 029c 07ea jlnz 0x07ea // If we received no mail - 06fb 00da ffff lr $AX0.H, @CMBL - 06fd 8600 tstaxh $AX0.H - 06fe 0294 07c3 jnz 0x07c3 // If we received a mail beginning a list, WaitForNextMails() - - 0700 00de fffe lr $AC0.M, @CMBH // if we received an empty mail, wait for the next mail - 0702 02c0 8000 andcf $AC0.M, #0x8000 - 0704 029c 0700 jlnz 0x0700 - 0706 0240 000f andi $AC0.M, #0x000f // get the number in the high part of the mail - 0708 1f5e mrr $AX0.H, $AC0.M - 0709 7400 incm $AC0.M // number++; - 070a 0c00 lris $AC0.L, #0x00 - 070b 1404 lsl $ACC0, #4 // number <<= 4; - 070c 00fe 034e sr @0x034e, $AC0.M - 070e 1fda mrr $AC0.M, $AX0.H - 070f 1f40 mrr $AX0.H, $AR0 - 0710 0200 04fc addi $AC0.M, #0x04fc - 0712 1c1e mrr $AR0, $AC0.M - 0713 00de ffff lr $AC0.M, @CMBL - 0715 1a1e srr @$AR0, $AC0.M - 0716 1c1a mrr $AR0, $AX0.H - - 0717 00de 03fe lr $AC0.M, @0x03fe - 0719 00dc 03ff lr $AC0.L, @0x03ff - 071b 00d0 03fd lr $AC0.H, @0x03fd - 071d 00da 03fa lr $AX0.H, @0x03fa - 071f 1305 sbset #0x05 - 0720 02ff rti - -// DoYield() - 0721 009a 0002 lri $AX0.H, #0x0002 - 0723 00fa 03a3 sr @0x03a3, $AX0.H - 0725 00e0 03f9 sr @0x03f9, $AR0 - 0727 02bf 07ad call 0x07ad - 0729 16fc dcd1 si @DMBH, #0xdcd1 - 072b 16fd 0002 si @DMBL, #0x0002 - 072d 16fb 0001 si @DIRQ, #0x0001 - 072f 0021 halt - -// Function jump table - 0730 0748 cmpis $ACC1, #0x48 // Function 0: halt - 0731 0749 cmpis $ACC1, #0x49 // Function 1: dump memory? and halt - 0732 0789 cmpis $ACC1, #0x89 // Function 2: jump to 0x8000 and halt - 0733 078c cmpis $ACC1, #0x8c // Function 3: return to MessageLoop() - -// Execute function according to mail received (0xCDD1000X) -// Warning: any function number above 3 will likely crash -// as no range check is performed. -// AR0 = 0x002B - 0734 00e0 03f9 sr @0x03f9, $AR0 - 0736 009e 0005 lri $AC0.M, #0x0005 - 0738 02bf 079b call 0x079b // SendMail_DCD1(0x0005) - 073a 8e00 set16 - 073b 8100 clr $ACC0 - 073c 8900 clr $ACC1 - 073d 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 073f 27ff lrs $AC1.M, @CMBL - 0740 009e 0730 lri $AC0.M, #0x0730 - 0742 4c00 add $ACC0, $AC1.L - 0743 1c7e mrr $AR3, $AC0.M - 0744 0313 ilrr $AC1.M, @$AR3 - 0745 1c7f mrr $AR3, $AC1.M - 0746 176f jmpr $AR3 - 0747 0021 halt -// Function 0 - 0748 0021 halt -// Function 1 - 0749 009a 0002 lri $AX0.H, #0x0002 - 074b 00fa 03a3 sr @0x03a3, $AX0.H - 074d 8100 clr $ACC0 - 074e 8900 clr $ACC1 - 074f 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 0751 24ff lrs $AC0.L, @CMBL - 0752 02bf 0795 call 0x0795 // WaitUntilCPUMailboxIsFull_AC1() - 0754 25ff lrs $AC1.L, @CMBL - 0755 02bf 0795 call 0x0795 // WaitUntilCPUMailboxIsFull_AC1() - 0757 27ff lrs $AC1.M, @CMBL - 0758 2ece srs @DSMAH, $AC0.M - 0759 2ccf srs @DSMAL, $AC0.L - 075a 16c9 0001 si @DSCR, #0x0001 - 075c 2fcd srs @DSPA, $AC1.M - 075d 2dcb srs @DSBL, $AC1.L - 075e 8100 clr $ACC0 - 075f 8900 clr $ACC1 - 0760 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 0762 24ff lrs $AC0.L, @CMBL - 0763 1c9e mrr $IX0, $AC0.M - 0764 1cbc mrr $IX1, $AC0.L - 0765 02bf 0795 call 0x0795 // WaitUntilCPUMailboxIsFull_AC1() - 0767 25ff lrs $AC1.L, @CMBL - 0768 02bf 0795 call 0x0795 // WaitUntilCPUMailboxIsFull_AC1() - 076a 27ff lrs $AC1.M, @CMBL - 076b 1cdf mrr $IX2, $AC1.M - 076c 1cfd mrr $IX3, $AC1.L - 076d 8100 clr $ACC0 - 076e 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 0770 26ff lrs $AC0.M, @CMBL - 0771 1c1e mrr $AR0, $AC0.M - 0772 8900 clr $ACC1 - 0773 02bf 0795 call 0x0795 // WaitUntilCPUMailboxIsFull_AC1() - 0775 20ff lrs $AX0.L, @CMBL - 0776 1f5f mrr $AX0.H, $AC1.M - 0777 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 0779 21ff lrs $AX1.L, @CMBL - 077a 02bf 078f call 0x078f // WaitUntilCPUMailboxIsFull_AC0() - 077c 23ff lrs $AX1.H, @CMBL - 077d 26c9 lrs $AC0.M, @DSCR - 077e 02a0 0004 andf $AC0.M, #0x0004 - 0780 029c 077d jlnz 0x077d - 0782 1206 sbclr #0x06 - 0783 1203 sbclr #0x03 - 0784 1204 sbclr #0x04 - 0785 1205 sbclr #0x05 - 0786 029f 80b5 jmp 0x80b5 - 0788 0021 halt -// Function 2 - 0789 029f 8000 jmp 0x8000 - 078b 0021 halt -// Function 3 - 078c 00c0 03f9 lr $AR0, @0x03f9 - 078e 170f jmpr $AR0 - -// WaitUntilCPUMailboxIsFull_AC0() - 078f 26fe lrs $AC0.M, @CMBH - 0790 02c0 8000 andcf $AC0.M, #0x8000 - 0792 029c 078f jlnz 0x078f - 0794 02df ret - -// WaitUntilCPUMailboxIsFull_AC1() - 0795 27fe lrs $AC1.M, @CMBH - 0796 03c0 8000 andcf $AC1.M, #0x8000 - 0798 029c 0795 jlnz 0x0795 - 079a 02df ret - -// SendMail_DCD1() // seems to additionally trigger an IRQ - 079b 02bf 07b3 call 0x07b3 - 079d 16fc dcd1 si @DMBH, #0xdcd1 - 079f 2efd srs @DMBL, $AC0.M - 07a0 16fb 0001 si @DIRQ, #0x0001 - 07a2 02bf 07b3 call 0x07b3 - 07a4 02df ret - -// SendMail_F355() - 07a5 02bf 07b3 call 0x07b3 - 07a7 16fc f355 si @DMBH, #0xf355 - 07a9 2efd srs @DMBL, $AC0.M - 07aa 02bf 07b3 call 0x07b3 - 07ac 02df ret - -// WaitUntilMailboxIsReady_AC0() - 07ad 26fc lrs $AC0.M, @DMBH - 07ae 02c0 8000 andcf $AC0.M, #0x8000 - 07b0 029d 07ad jlz 0x07ad - 07b2 02df ret - -// WaitUntilMailboxIsReady_AC1() - 07b3 27fc lrs $AC1.M, @DMBH - 07b4 03c0 8000 andcf $AC1.M, #0x8000 - 07b6 029d 07b3 jlz 0x07b3 - 07b8 02df ret - -// InitGlobalVars() - 07b9 009a 0280 lri $AX0.H, #0x0280 - 07bb 00fa 0350 sr @0x0350, $AX0.H - 07bd 00fa 0351 sr @0x0351, $AX0.H - 07bf 0a00 lris $AX0.H, #0x00 - 07c0 00fa 0352 sr @0x0352, $AX0.H - 07c2 02df ret - -// WaitForNextMails() -// AX0.H: low part of current mail (num of mails to wait for) - 07c3 00e0 03fb sr @0x03fb, $AR0 - 07c5 00e8 03fc sr @0x03fc, $WR0 - 07c7 00c0 0350 lr $AR0, @0x0350 - 07c9 0088 002f lri $WR0, #0x002f - 07cb 1b1a srri @$AR0, $AX0.H - 07cc 00de fffe lr $AC0.M, @CMBH - 07ce 02c0 8000 andcf $AC0.M, #0x8000 - 07d0 029c 07cc jlnz 0x07cc - 07d2 00dc ffff lr $AC0.L, @CMBL - 07d4 1b1e srri @$AR0, $AC0.M - 07d5 1b1c srri @$AR0, $AC0.L - 07d6 1fda mrr $AC0.M, $AX0.H - 07d7 7800 decm $AC0.M - 07d8 1f5e mrr $AX0.H, $AC0.M - 07d9 8600 tstaxh $AX0.H - 07da 0294 07cc jnz 0x07cc - - 07dc 8100 clr $ACC0 - 07dd 00de 0352 lr $AC0.M, @0x0352 - 07df 7400 incm $AC0.M - 07e0 00fe 0352 sr @0x0352, $AC0.M - 07e2 00e0 0350 sr @0x0350, $AR0 - 07e4 00c0 03fb lr $AR0, @0x03fb - 07e6 00c8 03fc lr $WR0, @0x03fc - 07e8 029f 0717 jmp 0x0717 - - // noMail() - 07ea 00e0 03fb sr @0x03fb, $AR0 - 07ec 00e8 03fc sr @0x03fc, $WR0 - 07ee 00c0 0350 lr $AR0, @0x0350 - 07f0 0088 002f lri $WR0, #0x002f - 07f2 0a00 lris $AX0.H, #0x00 - 07f3 1b1a srri @$AR0, $AX0.H - 07f4 029f 07dc jmp 0x07dc - -// MessageLoop() - 07f6 00c0 0351 lr $AR0, @0x0351 - 07f8 0088 002f lri $WR0, #0x002f - 07fa 00da 0352 lr $AX0.H, @0x0352 - 07fc 8600 tstaxh $AX0.H - 07fd 0295 081e jz 0x081e // jump back to MessageLoop - 07ff 1205 sbclr #0x05 - 0800 00da 0352 lr $AX0.H, @0x0352 - 0802 1fda mrr $AC0.M, $AX0.H - 0803 7800 decm $AC0.M - 0804 00fe 0352 sr @0x0352, $AC0.M - 0806 1305 sbset #0x05 - 0807 0081 0356 lri $AR1, #0x0356 - 0809 191e lrri $AC0.M, @$AR0 - 080a 02c0 8000 andcf $AC0.M, #0x8000 - 080c 029d 0822 jlz 0x0822 // ??? - 080e 1f5e mrr $AX0.H, $AC0.M - 080f 8600 tstaxh $AX0.H - 0810 0295 0826 jz 0x0826 // Yield() - 0812 007a 0817 bloop $AX0.H, 0x0817 - 0814 191e lrri $AC0.M, @$AR0 - 0815 1b3e srri @$AR1, $AC0.M - 0816 191e lrri $AC0.M, @$AR0 - 0817 1b3e srri @$AR1, $AC0.M - 0818 00e0 0351 sr @0x0351, $AR0 - 081a 0088 ffff lri $WR0, #0xffff - 081c 029f 002d jmp 0x002d // jump to OpcodeHandler() - 081e 0088 ffff lri $WR0, #0xffff - 0820 029f 002b jmp 0x002b // jump back to MessageLoop() - -// - 0822 00e0 0351 sr @0x0351, $AR0 - 0824 029f 07fa jmp 0x07fa - -// Yield() - 0826 0080 07f6 lri $AR0, #0x07f6 - 0828 029f 0721 jmp 0x0721 // DoYield() (halts) - -// interesting - writes value(s) to output - 082a 8100 clr $ACC0 - 082b 0e10 lris $AC0.M, #0x10 - 082c 2232 lrs $AX0.H, @0x0032 - 082d 8600 tstaxh $AX0.H - 082e 02d5 retz - 082f 5400 subr $ACC0, $AX0.H - 0830 0200 0458 addi $AC0.M, #0x0458 // source addr = (0x10 - Mem[0x0032]) + 0x0458 - 0832 1c1e mrr $AR0, $AC0.M - 0833 1fda mrr $AC0.M, $AX0.H - 0834 04fe addis $ACC0, #0xfe - 0835 1f1e mrr $AX0.L, $AC0.M // AX0.L = Mem[0x0032] - 2; - 0836 191e lrri $AC0.M, @$AR0 - 0837 0291 083d js 0x083d - 0839 191a lrri $AX0.H, @$AR0 - - 083a 0058 loop $AX0.L - 083b 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - - 083c 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 083d 1b7e srri @$AR3, $AC0.M // store value to output - 083e 02df ret - -// - 083f 02bf 082a call 0x082a - 0841 8100 clr $ACC0 - 0842 2632 lrs $AC0.M, @0x0032 - 0843 5c00 sub $ACC0, $AC1.L - 0844 2e32 srs @0x0032, $AC0.M - 0845 0092 00ff lri $CR, #0x00ff - 0847 02df ret - -// increment one value, then zero out other values - 0848 00de 04fb lr $AC0.M, @0x04fb - 084a 7400 incm $AC0.M - 084b 00fe 04fb sr @0x04fb, $AC0.M - 084d 8100 clr $ACC0 - 084e 2e32 srs @0x0032, $AC0.M - 084f 2e66 srs @0x0066, $AC0.M - 0850 2e67 srs @0x0067, $AC0.M - 0851 268a lrs $AC0.M, @0xff8a - 0852 248b lrs $AC0.L, @0xff8b - 0853 2e3a srs @0x003a, $AC0.M - 0854 2c3b srs @0x003b, $AC0.L - 0855 268c lrs $AC0.M, @0xff8c - 0856 248d lrs $AC0.L, @0xff8d - 0857 2e38 srs @0x0038, $AC0.M - 0858 2c39 srs @0x0039, $AC0.L - 0859 02df ret - -// - 085a 8100 clr $ACC0 - 085b 2689 lrs $AC0.M, @0xff89 - 085c 0240 000f andi $AC0.M, #0x000f - 085e 1f5e mrr $AX0.H, $AC0.M - 085f 8100 clr $ACC0 - 0860 0e10 lris $AC0.M, #0x10 - 0861 5400 subr $ACC0, $AX0.H - 0862 2e32 srs @0x0032, $AC0.M - 0863 268a lrs $AC0.M, @0xff8a - 0864 248b lrs $AC0.L, @0xff8b - 0865 2288 lrs $AX0.H, @0xff88 - 0866 2089 lrs $AX0.L, @0xff89 - 0867 5800 subax $ACC0, $AX0.L - 0868 0a00 lris $AX0.H, #0x00 - 0869 2032 lrs $AX0.L, @0x0032 - 086a 5800 subax $ACC0, $AX0.L - 086b 2e3a srs @0x003a, $AC0.M - 086c 2c3b srs @0x003b, $AC0.L - 086d 02df ret - -// mixer for sound types 5 and 9 -// AR3 = 0x0580 (out address) -// AC1.M = 0x0043, AC1.L = 0x0000 - 086e 0092 0004 lri $CR, #0x0004 - 0870 8100 clr $ACC0 - 0871 2604 lrs $AC0.M, @0x0004 - 0872 b100 tst $ACC0 - 0873 02b4 0848 callne 0x0848 // nothing much interesting - 0875 8100 clr $ACC0 - 0876 2601 lrs $AC0.M, @0x0001 - 0877 b100 tst $ACC0 - 0878 0294 0916 jnz 0x0916 // end - 087a 2232 lrs $AX0.H, @0x0032 - 087b c900 cmpar $ACC0, $AX1.H - 087c 0293 083f jle 0x083f // direct return (calls 0x082A though) - 087e 5500 subr $ACC1, $AX0.H - 087f 02bf 082a call 0x082a // interesting: stores value(s) to Mem[AR3] (output) - 0881 223a lrs $AX0.H, @0x003a - 0882 8600 tstaxh $AX0.H - 0883 0294 088a jnz 0x088a - 0885 8100 clr $ACC0 - 0886 263b lrs $AC0.M, @0x003b - 0887 8200 cmp - 0888 0291 08dc js 0x08dc - 088a 8100 clr $ACC0 - 088b 1fdf mrr $AC0.M, $AC1.M - 088c 040f addis $ACC0, #0x0f - 088d 147c lsr $ACC0, #-4 - 088e 1f7e mrr $AX1.H, $AC0.M - 088f 0c00 lris $AC0.L, #0x00 - 0890 1404 lsl $ACC0, #4 - 0891 1f1e mrr $AX0.L, $AC0.M - 0892 0a00 lris $AX0.H, #0x00 - 0893 8100 clr $ACC0 - 0894 263a lrs $AC0.M, @0x003a - 0895 243b lrs $AC0.L, @0x003b - 0896 5800 subax $ACC0, $AX0.L - 0897 0290 08a2 jns 0x08a2 - 0899 8100 clr $ACC0 - 089a 263b lrs $AC0.M, @0x003b - 089b 5c00 sub $ACC0, $AC1.L - 089c 2e32 srs @0x0032, $AC0.M - 089d 8100 clr $ACC0 - 089e 2e3a srs @0x003a, $AC0.M - 089f 2e3b srs @0x003b, $AC0.M - 08a0 029f 08a8 jmp 0x08a8 - 08a2 2e3a srs @0x003a, $AC0.M - 08a3 2c3b srs @0x003b, $AC0.L - 08a4 0c00 lris $AC0.L, #0x00 - 08a5 1fd8 mrr $AC0.M, $AX0.L - 08a6 5c00 sub $ACC0, $AC1.L - 08a7 2e32 srs @0x0032, $AC0.M - 08a8 8100 clr $ACC0 - 08a9 1fdb mrr $AC0.M, $AX1.H - 08aa 02bf 091c call 0x091c // afc decoder - 08ac 2232 lrs $AX0.H, @0x0032 - 08ad 8600 tstaxh $AX0.H - 08ae 0295 08d9 jz 0x08d9 // end - 08b0 0a10 lris $AX0.H, #0x10 - 08b1 8100 clr $ACC0 - 08b2 1fc3 mrr $AC0.M, $AR3 - 08b3 5400 subr $ACC0, $AX0.H - 08b4 1c7e mrr $AR3, $AC0.M - 08b5 0080 0458 lri $AR0, #0x0458 - 08b7 197e lrri $AC0.M, @$AR3 - 08b8 197a lrri $AX0.H, @$AR3 - - 08b9 100e loopi #0x0e - 08ba 64a2 movr'sl $ACC0, $AX0.H : $AC0.M, $AX0.H - - 08bb 1b1e srri @$AR0, $AC0.M - 08bc 1b1a srri @$AR0, $AX0.H - 08bd 8100 clr $ACC0 - 08be 263a lrs $AC0.M, @0x003a - 08bf 243b lrs $AC0.L, @0x003b - 08c0 b100 tst $ACC0 - 08c1 0294 08d9 jnz 0x08d9 // end - 08c3 2232 lrs $AX0.H, @0x0032 - 08c4 8600 tstaxh $AX0.H - 08c5 0295 08d9 jz 0x08d9 // end - 08c7 0080 0467 lri $AR0, #0x0467 - 08c9 8100 clr $ACC0 - 08ca 268b lrs $AC0.M, @0xff8b - 08cb b100 tst $ACC0 - 08cc 0295 08d9 jz 0x08d9 // end - 08ce 0200 000f addi $AC0.M, #0x000f - 08d0 0240 000f andi $AC0.M, #0x000f - 08d2 0200 0458 addi $AC0.M, #0x0458 - 08d4 1c7e mrr $AR3, $AC0.M - - 08d5 007a 08d8 bloop $AX0.H, 0x08d8 - 08d7 18fe lrrd $AC0.M, @$AR3 - 08d8 1a9e srrd @$AR0, $AC0.M - - 08d9 0092 00ff lri $CR, #0x00ff - 08db 02df ret - -// - 08dc b100 tst $ACC0 - 08dd 0295 08ec jz 0x08ec - 08df 5d00 sub $ACC1, $AC0.L - 08e0 040f addis $ACC0, #0x0f - 08e1 147c lsr $ACC0, #-4 - 08e2 0c00 lris $AC0.L, #0x00 - 08e3 00e3 0363 sr @0x0363, $AR3 - 08e5 02bf 091c call 0x091c - 08e7 00de 0363 lr $AC0.M, @0x0363 - 08e9 223b lrs $AX0.H, @0x003b - 08ea 4400 addr $ACC0, $AX0.H - 08eb 1c7e mrr $AR3, $AC0.M - 08ec 8100 clr $ACC0 - 08ed 2681 lrs $AC0.M, @0xff81 - 08ee b100 tst $ACC0 - 08ef 0295 0914 jz 0x0914 - 08f1 2380 lrs $AX1.H, @0xff80 - 08f2 2688 lrs $AC0.M, @0xff88 - 08f3 2489 lrs $AC0.L, @0xff89 - 08f4 1408 lsl $ACC0, #8 - 08f5 14f4 asr $ACC0, #-12 - 08f6 2380 lrs $AX1.H, @0xff80 - 08f7 8d00 set15 - 08f8 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - 08f9 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 08fa 8c00 clr15 - 08fb f000 lsl16 $ACC0 - 08fc 4e00 addp $ACC0 - 08fd 238c lrs $AX1.H, @0xff8c - 08fe 218d lrs $AX1.L, @0xff8d - 08ff 4a00 addax $ACC0, $AX1.L - 0900 2e38 srs @0x0038, $AC0.M - 0901 2c39 srs @0x0039, $AC0.L - 0902 2682 lrs $AC0.M, @0xff82 - 0903 2e67 srs @0x0067, $AC0.M - 0904 2683 lrs $AC0.M, @0xff83 - 0905 2e66 srs @0x0066, $AC0.M - 0906 00e3 0363 sr @0x0363, $AR3 - 0908 0083 0458 lri $AR3, #0x0458 - 090a 8100 clr $ACC0 - 090b 0e01 lris $AC0.M, #0x01 - 090c 02bf 091c call 0x091c - 090e 00c3 0363 lr $AR3, @0x0363 - 0910 02bf 085a call 0x085a - 0912 029f 087a jmp 0x087a - 0914 0e01 lris $AC0.M, #0x01 - 0915 2e01 srs @0x0001, $AC0.M - 0916 8100 clr $ACC0 - 0917 005f loop $AC1.M - 0918 1b7e srri @$AR3, $AC0.M - 0919 0092 00ff lri $CR, #0x00ff - 091b 02df ret - -// afc decoder (for sound formats 5 and 9) -// AC0.M = num of blocks to do? (0x4) -// AC1.M = - 091c 00ff 0360 sr @0x0360, $AC1.M - 091e 00fe 0361 sr @0x0361, $AC0.M - 0920 8100 clr $ACC0 - 0921 00de 0361 lr $AC0.M, @0x0361 - - 0923 007e 099c bloop $AC0.M, 0x099c - 0925 2638 lrs $AC0.M, @0x0038 - 0926 2439 lrs $AC0.L, @0x0039 - 0927 0092 00ff lri $CR, #0x00ff - 0929 029f 063a jmp 0x063a // ReadSoundData(Dword[0x0038]) - 092b 0092 0004 lri $CR, #0x0004 - 092d 2638 lrs $AC0.M, @0x0038 - 092e 2439 lrs $AC0.L, @0x0039 - 092f 8900 clr $ACC1 - 0930 2580 lrs $AC1.L, @0xff80 - 0931 4c00 add $ACC0, $AC1.L - 0932 2e38 srs @0x0038, $AC0.M - 0933 2c39 srs @0x0039, $AC0.L - 0934 00de 037f lr $AC0.M, @0x037f - 0936 0200 0b00 addi $AC0.M, #0x0b00 // buffer where read sound data is stored (128 bytes) - 0938 1c1e mrr $AR0, $AC0.M // AR0 = AC0.M = 0x0B00 + Mem[0x037F]; (Mem[0x037F] seems to be the offset in buffer to the actual block...) - 0939 0084 0001 lri $IX0, #0x0001 // IX0 = 0x0001; - 093b 199e lrrn $AC0.M, @$AR0 // AC0.M = Mem[AR0]; AR0++; read first byte in buffer - 093c 8900 clr $ACC1 - 093d 1ffe mrr $AC1.M, $AC0.M // AC1.M = AC0.M = first_byte; - 093e 1401 lsl $ACC0, #1 - 093f 0240 001e andi $AC0.M, #0x001e - 0941 0200 0300 addi $AC0.M, #0x0300 - 0943 1c3e mrr $AR1, $AC0.M // AR1 = ((first_byte << 1) & 0x1E) + 0x0300; - 0944 157c lsr $ACC1, #-4 - 0945 0340 000f andi $AC1.M, #0x000f - 0947 0a11 lris $AX0.H, #0x11 - 0948 5500 subr $ACC1, $AX0.H // AC1.M = ((first_byte >> 4) & 0xF) - 0x11; - 0949 8100 clr $ACC0 - 094a 2680 lrs $AC0.M, @0xff80 - 094b 0605 cmpis $ACC0, #0x05 - 094c 0295 0965 jz 0x0965 // skip loop below (execute another loop) for sound format 5 - - 094e 009a 00f0 lri $AX0.H, #0x00f0 // these masks... for adpcm sound surely - 0950 0b0f lris $AX1.H, #0x0f - 0951 0082 0364 lri $AR2, #0x0364 // AR2 = 0x0364; - 0953 1998 lrrn $AX0.L, @$AR0 // AX0.L = Mem[AR0]; AR0++; - 0954 6000 movr $ACC0, $AX0.L // AC0.HM = AX0; AC0.L = 0x0000; - // loop for sound format 9 (looks like adpcm) - // decompose sound data into nibbles and store it to 0x0364 (again a temp buffer!) - // for(i = 0; i < 7; i++) - 0955 1107 095c bloopi #0x07, 0x095c - 0957 3400 andr $AC0.M, $AX0.H // AC0.M &= 0x00F0; - 0958 1408 lsl $ACC0, #8 // ACC0 <<= 8; - 0959 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M // AC0.HM = AX0; AC0.L = 0; Mem[AR2] = AC0.M; AR2++; - 095a 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 // AC0.M &= 0x000F; AX0.L = Mem[AR0]; AR0++; - 095b 140c lsl $ACC0, #12 // ACC0 <<= 12; - 095c 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M // AC0.HM = AX0; AC0.L = 0; Mem[AR2] = AC0.M; AR2++; - - 095d 3400 andr $AC0.M, $AX0.H - 095e 1408 lsl $ACC0, #8 - 095f 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0960 3600 andr $AC0.M, $AX1.H - 0961 140c lsl $ACC0, #12 - 0962 1b5e srri @$AR2, $AC0.M - 0963 029f 0985 jmp 0x0985 - // below for sound format 5 only - 0965 009a c000 lri $AX0.H, #0xc000 - 0967 0082 0364 lri $AR2, #0x0364 - 0969 1998 lrrn $AX0.L, @$AR0 - 096a 6000 movr $ACC0, $AX0.L - // loop for sound format 5 - 096b 1103 0978 bloopi #0x03, 0x0978 - 096d 1408 lsl $ACC0, #8 - 096e 3400 andr $AC0.M, $AX0.H - 096f 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0970 140a lsl $ACC0, #10 - 0971 3400 andr $AC0.M, $AX0.H - 0972 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0973 140c lsl $ACC0, #12 - 0974 3400 andr $AC0.M, $AX0.H - 0975 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0976 140e lsl $ACC0, #14 - 0977 3444 andr'ln $AC0.M, $AX0.H : $AX0.L, @$AR0 - 0978 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - - 0979 1408 lsl $ACC0, #8 - 097a 3400 andr $AC0.M, $AX0.H - 097b 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 097c 140a lsl $ACC0, #10 - 097d 3400 andr $AC0.M, $AX0.H - 097e 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 097f 140c lsl $ACC0, #12 - 0980 3400 andr $AC0.M, $AX0.H - 0981 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0982 140e lsl $ACC0, #14 - 0983 3400 andr $AC0.M, $AX0.H - 0984 1b5e srri @$AR2, $AC0.M - - 0985 8f00 set40 - 0986 1f7f mrr $AX1.H, $AC1.M // AX1.H = AC1.M = ((first_byte >> 4) & 0xF) - 0x11; - 0987 2066 lrs $AX0.L, @0x0066 // AX0.L = Mem[0x0066]; - 0988 2767 lrs $AC1.M, @0x0067 // AC1.M = Mem[0x0067]; - 0989 193a lrri $AX0.H, @$AR1 // AX0.H = Mem[AR1]; AR1++; load coefs from 0x0300+ - 098a 1939 lrri $AX1.L, @$AR1 // AX1.L = Mem[AR1]; AR1++; - 098b 0080 0364 lri $AR0, #0x0364 // AR0 = 0x0364; - 098d a000 mulx $AX0.L, $AX1.L // prod = AX0.L * AX1.L; - 098e ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 // prod += AC1.M * AX1.L; AC0.M = Mem[AR0]; AR0++; - - 098f 1108 0998 bloopi #0x08, 0x0998 - 0991 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L // AC0.M |= AX1.H; Mem[AR3] = AC1.M; AR3++; AX1.L = Mem[AR0]; AR0++; - 0992 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 // ACC0 += prod; prod = AX0.L * AX1.L; AC1.M = Mem[AR0]; AR0++; - 0993 1485 asl $ACC0, #5 // ACC0 <<= 5; - 0994 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M // prod += AC0.M * AX1.L; Mem[AR3] = AC0.M; AR3++; - 0995 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L // AC1.M |= AX1.H; Mem[AR3] = AC0.M; AR3++; AX1.L = Mem[AR0]; AR0++; - 0996 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 // ACC1 += prod; prod = AX0.L * AX1.L; AC1.M = Mem[AR0]; AR0++; - 0997 1585 asl $ACC1, #5 // ACC1 <<= 5; - 0998 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M // prod += AC1.M * AX1.L; Mem[AR3] = AC1.M; AR3++; - - 0999 2f67 srs @0x0067, $AC1.M - 099a 8e00 set16 - 099b 1ff8 mrr $AC1.M, $AX0.L - 099c 2f66 srs @0x0066, $AC1.M - // end of outer loop - 099d 8900 clr $ACC1 - 099e 00df 0360 lr $AC1.M, @0x0360 - 09a0 02df ret - -// - 09a1 b100 tst $ACC0 - 09a2 02d5 retz - 09a3 04fe addis $ACC0, #0xfe - 09a4 1f1e mrr $AX0.L, $AC0.M - 09a5 191e lrri $AC0.M, @$AR0 - 09a6 0291 09ac js 0x09ac - 09a8 191a lrri $AX0.H, @$AR0 - 09a9 0058 loop $AX0.L - 09aa 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 09ab 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 09ac 1b7e srri @$AR3, $AC0.M - 09ad 02df ret - -// decode audio? - 09ae 8100 clr $ACC0 - 09af 1f5e mrr $AX0.H, $AC0.M - 09b0 00d8 0402 lr $AX0.L, @0x0402 - 09b2 00dc 0430 lr $AC0.L, @0x0430 - 09b4 0080 0520 lri $AR0, #0x0520 - 09b6 00df 0480 lr $AC1.M, @0x0480 // sound format??? - 09b8 1501 lsl $ACC1, #1 - 09b9 0340 007e andi $AC1.M, #0x007e - 09bb 0300 09c3 addi $AC1.M, #0x09c3 - 09bd 1c5f mrr $AR2, $AC1.M - 09be 175f callr $AR2 // jump to one of the functions - 09bf 00fc 0430 sr @0x0430, $AC0.L - 09c1 029f 0336 jmp 0x0336 // return to SyncFrame func - // jump table - 09c3 029f 09e4 jmp 0x09e4 // 0x0: - 09c5 029f 0a1f jmp 0x0a1f // 0x1: - 09c7 029f 0a07 jmp 0x0a07 // 0x2: - 09c9 029f 09f4 jmp 0x09f4 // 0x3: - 09cb 029f 0a2d jmp 0x0a2d // 0x4: - 09cd 029f 09e3 jmp 0x09e3 // 0x5: dummy - 09cf 029f 0a4b jmp 0x0a4b // 0x6: - 09d1 029f 0a4e jmp 0x0a4e // 0x7: - 09d3 029f 09e3 jmp 0x09e3 // 0x8: dummy - 09d5 029f 09e3 jmp 0x09e3 // 0x9: dummy - 09d7 029f 0a6c jmp 0x0a6c // 0xA: - 09d9 029f 0a25 jmp 0x0a25 // 0xB: - 09db 029f 0a29 jmp 0x0a29 // 0xC: - 09dd 029f 09e3 jmp 0x09e3 // 0xD: dummy - 09df 029f 09e3 jmp 0x09e3 // 0xE: dummy - 09e1 029f 09e3 jmp 0x09e3 // 0xF: dummy - 09e3 02df ret // direct return for dummy funcs - -// Func_00() - 09e4 1401 lsl $ACC0, #1 - 09e5 009b c000 lri $AX1.H, #0xc000 - 09e7 0099 4000 lri $AX1.L, #0x4000 - 09e9 1150 09f1 bloopi #0x50, 0x09f1 - 09eb 02c0 0001 andcf $AC0.M, #0x0001 - 09ed 027c iflnz - 09ee 1b1b srri @$AR0, $AX1.H - 09ef 027d iflz - 09f0 1b19 srri @$AR0, $AX1.L - 09f1 4800 addax $ACC0, $AX0.L - 09f2 147f lsr $ACC0, #-1 - 09f3 02df ret - 09f4 1402 lsl $ACC0, #2 - 09f5 8900 clr $ACC1 - 09f6 1fb8 mrr $AC1.L, $AX0.L - 09f7 1501 lsl $ACC1, #1 - 09f8 009b c000 lri $AX1.H, #0xc000 - 09fa 0099 4000 lri $AX1.L, #0x4000 - 09fc 1150 0a04 bloopi #0x50, 0x0a04 - 09fe 02c0 0003 andcf $AC0.M, #0x0003 - 0a00 027c iflnz - 0a01 1b1b srri @$AR0, $AX1.H - 0a02 027d iflz - 0a03 1b19 srri @$AR0, $AX1.L - 0a04 4c00 add $ACC0, $AC1.L - 0a05 147e lsr $ACC0, #-2 - 0a06 02df ret - 0a07 1401 lsl $ACC0, #1 - 0a08 0081 0ca0 lri $AR1, #0x0ca0 - 0a0a 009b c000 lri $AX1.H, #0xc000 - 0a0c 0099 4000 lri $AX1.L, #0x4000 - 0a0e 8900 clr $ACC1 - 0a0f 0082 0000 lri $AR2, #0x0000 - 0a11 1150 0a1c bloopi #0x50, 0x0a1c - 0a13 02c0 0001 andcf $AC0.M, #0x0001 - 0a15 027c iflnz - 0a16 1b1b srri @$AR0, $AX1.H - 0a17 027d iflz - 0a18 1b19 srri @$AR0, $AX1.L - 0a19 183d lrr $AC1.L, @$AR1 - 0a1a 4900 addax $ACC1, $AX0.L - 0a1b 1fe2 mrr $AC1.M, $AR2 - 0a1c 4c39 add's $ACC0, $AC1.L : @$AR1, $AC1.M - 0a1d 147f lsr $ACC0, #-1 - 0a1e 02df ret - 0a1f 8900 clr $ACC1 - 0a20 1fb8 mrr $AC1.L, $AX0.L - 0a21 157f lsr $ACC1, #-1 - 0a22 1050 loopi #0x50 - 0a23 4c20 add's $ACC0, $AC1.L : @$AR0, $AC0.L - 0a24 02df ret - 0a25 0082 0180 lri $AR2, #0x0180 - 0a27 029f 0a2f jmp 0x0a2f - 0a29 0082 01c0 lri $AR2, #0x01c0 - 0a2b 029f 0a2f jmp 0x0a2f - 0a2d 0082 0140 lri $AR2, #0x0140 - 0a2f 008a 003f lri $WR2, #0x003f - 0a31 0086 0000 lri $IX2, #0x0000 - 0a33 1406 lsl $ACC0, #6 - 0a34 8900 clr $ACC1 - 0a35 1fb8 mrr $AC1.L, $AX0.L - 0a36 1505 lsl $ACC1, #5 - 0a37 009b 003f lri $AX1.H, #0x003f - 0a39 009a 0000 lri $AX0.H, #0x0000 - 0a3b 3600 andr $AC0.M, $AX1.H - 0a3c 1cde mrr $IX2, $AC0.M - 0a3d 001a addarn $AR2, $IX2 - 0a3e 3400 andr $AC0.M, $AX0.H - 0a3f 1150 0a45 bloopi #0x50, 0x0a45 - 0a41 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 0a42 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a43 1cde mrr $IX2, $AC0.M - 0a44 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a45 1b19 srri @$AR0, $AX1.L - 0a46 1fc2 mrr $AC0.M, $AR2 - 0a47 147a lsr $ACC0, #-6 - 0a48 008a ffff lri $WR2, #0xffff - 0a4a 02df ret - 0a4b 1050 loopi #0x50 - 0a4c 1b18 srri @$AR0, $AX0.L - 0a4d 02df ret - 0a4e 0082 0100 lri $AR2, #0x0100 - 0a50 008a 003f lri $WR2, #0x003f - 0a52 0086 0000 lri $IX2, #0x0000 - 0a54 1406 lsl $ACC0, #6 - 0a55 8900 clr $ACC1 - 0a56 1fb8 mrr $AC1.L, $AX0.L - 0a57 1505 lsl $ACC1, #5 - 0a58 009b 003f lri $AX1.H, #0x003f - 0a5a 009a 0000 lri $AX0.H, #0x0000 - 0a5c 3600 andr $AC0.M, $AX1.H - 0a5d 1cde mrr $IX2, $AC0.M - 0a5e 001a addarn $AR2, $IX2 - 0a5f 3400 andr $AC0.M, $AX0.H - 0a60 1150 0a66 bloopi #0x50, 0x0a66 - 0a62 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 0a63 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a64 1cde mrr $IX2, $AC0.M - 0a65 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a66 1b19 srri @$AR0, $AX1.L - 0a67 1fc2 mrr $AC0.M, $AR2 - 0a68 147a lsr $ACC0, #-6 - 0a69 008a ffff lri $WR2, #0xffff - 0a6b 02df ret - -// - 0a6c 0082 0100 lri $AR2, #0x0100 - 0a6e 008a 003f lri $WR2, #0x003f - 0a70 0086 0000 lri $IX2, #0x0000 - 0a72 0081 0ca0 lri $AR1, #0x0ca0 - 0a74 1406 lsl $ACC0, #6 - 0a75 8900 clr $ACC1 - 0a76 1fb8 mrr $AC1.L, $AX0.L - 0a77 1505 lsl $ACC1, #5 - 0a78 009b 003f lri $AX1.H, #0x003f - 0a7a 009a 0000 lri $AX0.H, #0x0000 - 0a7c 3600 andr $AC0.M, $AX1.H - 0a7d 1cde mrr $IX2, $AC0.M - 0a7e 001a addarn $AR2, $IX2 - 0a7f 3400 andr $AC0.M, $AX0.H - - 0a80 1150 0a8b bloopi #0x50, 0x0a8b - 0a82 1939 lrri $AX1.L, @$AR1 - 0a83 a000 mulx $AX0.L, $AX1.L - 0a84 140a lsl $ACC0, #10 - 0a85 4e00 addp $ACC0 - 0a86 1476 lsr $ACC0, #-10 - 0a87 4c4a add'l $ACC0, $AC1.L : $AX1.L, @$AR2 - 0a88 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a89 1cde mrr $IX2, $AC0.M - 0a8a 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a8b 1b19 srri @$AR0, $AX1.L - - 0a8c 1fc2 mrr $AC0.M, $AR2 - 0a8d 147a lsr $ACC0, #-6 - 0a8e 008a ffff lri $WR2, #0xffff - 0a90 02df ret - -// - 0a91 0080 01be lri $AR0, #0x01be - 0a93 1918 lrri $AX0.L, @$AR0 - 0a94 191a lrri $AX0.H, @$AR0 - 0a95 0080 0180 lri $AR0, #0x0180 - 0a97 0083 0180 lri $AR3, #0x0180 - 0a99 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0a9a 1ffe mrr $AC1.M, $AC0.M - 0a9b 1120 0aa2 bloopi #0x20, 0x0aa2 - 0a9d 7c00 neg $ACC0 - 0a9e d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0a9f 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0aa0 c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 0aa1 1501 lsl $ACC1, #1 - 0aa2 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - 0aa3 0080 01fe lri $AR0, #0x01fe - 0aa5 191a lrri $AX0.H, @$AR0 - 0aa6 1918 lrri $AX0.L, @$AR0 - 0aa7 0080 01c0 lri $AR0, #0x01c0 - 0aa9 0083 01c0 lri $AR3, #0x01c0 - 0aab 1ff8 mrr $AC1.M, $AX0.L - 0aac 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0aad f800 addpaxz $ACC0, $AX0.H - 0aae 0240 01ff andi $AC0.M, #0x01ff - 0ab0 0260 2000 ori $AC0.M, #0x2000 - 0ab2 02bf 0ab5 call 0x0ab5 - 0ab4 02df ret - 0ab5 b900 tst $ACC1 - 0ab6 0272 ifg - 0ab7 7c00 neg $ACC0 - 0ab8 1f7e mrr $AX1.H, $AC0.M - 0ab9 4700 addr $ACC1, $AX1.H - 0aba 1110 0abf bloopi #0x10, 0x0abf - 0abc 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0abd 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0abe 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0abf 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0ac0 02df ret - -// - 0ac1 02bf 0b2e call 0x0b2e - 0ac3 2201 lrs $AX0.H, @0x0001 - 0ac4 8600 tstaxh $AX0.H - 0ac5 0294 0ad6 jnz 0x0ad6 - 0ac7 2204 lrs $AX0.H, @0x0004 - 0ac8 8600 tstaxh $AX0.H - 0ac9 02b4 0b1d callne 0x0b1d - 0acb 8100 clr $ACC0 - 0acc 2605 lrs $AC0.M, @0x0005 - 0acd b100 tst $ACC0 - 0ace 0295 0ae3 jz 0x0ae3 - 0ad0 8100 clr $ACC0 - 0ad1 2e05 srs @0x0005, $AC0.M - 0ad2 2281 lrs $AX0.H, @0xff81 - 0ad3 8600 tstaxh $AX0.H - 0ad4 0294 0add jnz 0x0add - 0ad6 8100 clr $ACC0 - 0ad7 005f loop $AC1.M - 0ad8 1b7e srri @$AR3, $AC0.M - 0ad9 7400 incm $AC0.M - 0ada 2e01 srs @0x0001, $AC0.M - 0adb 029f 0b16 jmp 0x0b16 - 0add 2688 lrs $AC0.M, @0xff88 - 0ade 2489 lrs $AC0.L, @0xff89 - 0adf 2e34 srs @0x0034, $AC0.M - 0ae0 2c35 srs @0x0035, $AC0.L - 0ae1 02bf 0b1d call 0x0b1d - 0ae3 00ff 0360 sr @0x0360, $AC1.M - 0ae5 2638 lrs $AC0.M, @0x0038 - 0ae6 2439 lrs $AC0.L, @0x0039 - 0ae7 02bf 068d call 0x068d - 0ae9 00df 0360 lr $AC1.M, @0x0360 - 0aeb 8100 clr $ACC0 - 0aec 263a lrs $AC0.M, @0x003a - 0aed b100 tst $ACC0 - 0aee 0294 0afd jnz 0x0afd - 0af0 263b lrs $AC0.M, @0x003b - 0af1 5c00 sub $ACC0, $AC1.L - 0af2 0290 0afd jns 0x0afd - 0af4 223b lrs $AX0.H, @0x003b - 0af5 02bf 06aa call 0x06aa - 0af7 5500 subr $ACC1, $AX0.H - 0af8 0a01 lris $AX0.H, #0x01 - 0af9 00fa 0405 sr @0x0405, $AX0.H - 0afb 029f 0ad0 jmp 0x0ad0 - 0afd 1f5f mrr $AX0.H, $AC1.M - 0afe 02bf 06aa call 0x06aa - 0b00 00fa 0362 sr @0x0362, $AX0.H - 0b02 8100 clr $ACC0 - 0b03 263a lrs $AC0.M, @0x003a - 0b04 243b lrs $AC0.L, @0x003b - 0b05 1570 lsr $ACC1, #-16 - 0b06 0a01 lris $AX0.H, #0x01 - 0b07 0081 0405 lri $AR1, #0x0405 - 0b09 5c00 sub $ACC0, $AC1.L - 0b0a b100 tst $ACC0 - 0b0b 0275 ifz - 0b0c 1a3a srr @$AR1, $AX0.H - 0b0d 2e3a srs @0x003a, $AC0.M - 0b0e 2c3b srs @0x003b, $AC0.L - 0b0f 2638 lrs $AC0.M, @0x0038 - 0b10 2439 lrs $AC0.L, @0x0039 - 0b11 00d8 0362 lr $AX0.L, @0x0362 - 0b13 7000 addaxl $ACC0, $AX0.L - 0b14 2c39 srs @0x0039, $AC0.L - 0b15 2e38 srs @0x0038, $AC0.M - 0b16 0092 00ff lri $CR, #0x00ff - 0b18 029f 032e jmp 0x032e - 0b1a 8100 clr $ACC0 - 0b1b 2e34 srs @0x0034, $AC0.M - 0b1c 2e35 srs @0x0035, $AC0.M - 0b1d 2334 lrs $AX1.H, @0x0034 - 0b1e 2135 lrs $AX1.L, @0x0035 - 0b1f 268a lrs $AC0.M, @0xff8a - 0b20 248b lrs $AC0.L, @0xff8b - 0b21 5a00 subax $ACC0, $AX1.L - 0b22 2e3a srs @0x003a, $AC0.M - 0b23 2c3b srs @0x003b, $AC0.L - 0b24 2634 lrs $AC0.M, @0x0034 - 0b25 2435 lrs $AC0.L, @0x0035 - 0b26 238c lrs $AX1.H, @0xff8c - 0b27 218d lrs $AX1.L, @0xff8d - 0b28 4a00 addax $ACC0, $AX1.L - 0b29 2e38 srs @0x0038, $AC0.M - 0b2a 2c39 srs @0x0039, $AC0.L - 0b2b 8100 clr $ACC0 - 0b2c 2e05 srs @0x0005, $AC0.M - 0b2d 02df ret - -// - 0b2e 0092 0004 lri $CR, #0x0004 - 0b30 2002 lrs $AX0.L, @0x0002 - 0b31 8100 clr $ACC0 - 0b32 8900 clr $ACC1 - 0b33 2430 lrs $AC0.L, @0x0030 - 0b34 8d00 set15 - 0b35 0950 lris $AX1.L, #0x50 - 0b36 a000 mulx $AX0.L, $AX1.L - 0b37 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0b38 1404 lsl $ACC0, #4 // ACC0 = (Mem[0x0002] * 80) << 4; - 0b39 8c00 clr15 - 0b3a 1ffe mrr $AC1.M, $AC0.M // AC1.M = AC0.M; - 0b3b 0083 0580 lri $AR3, #0x0580 - 0b3d 02df ret - -// process sound format 0x10 (smg) -// read data stored at 0x0000 by DsetupTable -// stores the output to 0x0580 - 0b3e 02bf 0b2e call 0x0b2e // prepare regs - 0b40 2201 lrs $AX0.H, @0x0001 - 0b41 8600 tstaxh $AX0.H - 0b42 0294 0b53 jnz 0x0b53 - 0b44 2204 lrs $AX0.H, @0x0004 - 0b45 8600 tstaxh $AX0.H - 0b46 02b4 0b9d callne 0x0b9d - 0b48 8100 clr $ACC0 - 0b49 2605 lrs $AC0.M, @0x0005 - 0b4a b100 tst $ACC0 - 0b4b 0295 0b60 jz 0x0b60 - 0b4d 8100 clr $ACC0 - 0b4e 2e05 srs @0x0005, $AC0.M - 0b4f 2281 lrs $AX0.H, @0xff81 - 0b50 8600 tstaxh $AX0.H - 0b51 0294 0b5a jnz 0x0b5a - - 0b53 8100 clr $ACC0 - - 0b54 005f loop $AC1.M - 0b55 1b7e srri @$AR3, $AC0.M // store zero to output - - 0b56 7400 incm $AC0.M - 0b57 2e01 srs @0x0001, $AC0.M - 0b58 029f 0b96 jmp 0x0b96 - - 0b5a 2688 lrs $AC0.M, @0xff88 - 0b5b 2489 lrs $AC0.L, @0xff89 - 0b5c 2e34 srs @0x0034, $AC0.M - 0b5d 2c35 srs @0x0035, $AC0.L - 0b5e 02bf 0b9d call 0x0b9d - - 0b60 00ff 0360 sr @0x0360, $AC1.M - 0b62 2638 lrs $AC0.M, @0x0038 - 0b63 2439 lrs $AC0.L, @0x0039 - // DMA transfer from main memory address Dword[0x0038] to 0x0580 - // Dword[0x0038] = Dword[0xFF8C] - 0b64 02bf 068d call 0x068d - 0b66 02bf 06a4 call 0x06a4 - 0b68 00df 0360 lr $AC1.M, @0x0360 - 0b6a 8100 clr $ACC0 - 0b6b 263a lrs $AC0.M, @0x003a - 0b6c b100 tst $ACC0 - 0b6d 0294 0b7c jnz 0x0b7c - 0b6f 263b lrs $AC0.M, @0x003b - 0b70 5c00 sub $ACC0, $AC1.L - 0b71 0290 0b7c jns 0x0b7c - 0b73 223b lrs $AX0.H, @0x003b - 0b74 02bf 066f call 0x066f // dma? - 0b76 5500 subr $ACC1, $AX0.H - 0b77 0a01 lris $AX0.H, #0x01 - 0b78 00fa 0405 sr @0x0405, $AX0.H - 0b7a 029f 0b4d jmp 0x0b4d - 0b7c 1f5f mrr $AX0.H, $AC1.M - 0b7d 02bf 066f call 0x066f // dma? - 0b7f 00fa 0362 sr @0x0362, $AX0.H - 0b81 8100 clr $ACC0 - 0b82 263a lrs $AC0.M, @0x003a - 0b83 243b lrs $AC0.L, @0x003b - 0b84 1570 lsr $ACC1, #-16 - 0b85 0a01 lris $AX0.H, #0x01 - 0b86 0081 0405 lri $AR1, #0x0405 - 0b88 5c00 sub $ACC0, $AC1.L - 0b89 b100 tst $ACC0 - 0b8a 0275 ifz - 0b8b 1a3a srr @$AR1, $AX0.H - 0b8c 2e3a srs @0x003a, $AC0.M - 0b8d 2c3b srs @0x003b, $AC0.L - 0b8e 2638 lrs $AC0.M, @0x0038 - 0b8f 2439 lrs $AC0.L, @0x0039 - 0b90 00d8 0362 lr $AX0.L, @0x0362 - 0b92 7000 addaxl $ACC0, $AX0.L - 0b93 7000 addaxl $ACC0, $AX0.L - 0b94 2c39 srs @0x0039, $AC0.L - 0b95 2e38 srs @0x0038, $AC0.M - 0b96 0092 00ff lri $CR, #0x00ff - 0b98 029f 032e jmp 0x032e - -// - 0b9a 8100 clr $ACC0 - - 0b9b 2e34 srs @0x0034, $AC0.M - 0b9c 2e35 srs @0x0035, $AC0.M - - 0b9d 2334 lrs $AX1.H, @0x0034 - 0b9e 2135 lrs $AX1.L, @0x0035 - 0b9f 268a lrs $AC0.M, @0xff8a - 0ba0 248b lrs $AC0.L, @0xff8b - 0ba1 5a00 subax $ACC0, $AX1.L - 0ba2 2e3a srs @0x003a, $AC0.M - 0ba3 2c3b srs @0x003b, $AC0.L - 0ba4 2634 lrs $AC0.M, @0x0034 - 0ba5 2435 lrs $AC0.L, @0x0035 - 0ba6 1401 lsl $ACC0, #1 - 0ba7 238c lrs $AX1.H, @0xff8c - 0ba8 218d lrs $AX1.L, @0xff8d - 0ba9 4a00 addax $ACC0, $AX1.L - 0baa 2e38 srs @0x0038, $AC0.M - 0bab 2c39 srs @0x0039, $AC0.L - 0bac 8100 clr $ACC0 - 0bad 2e05 srs @0x0005, $AC0.M - 0bae 02df ret - -// - 0baf 8900 clr $ACC1 - 0bb0 0f50 lris $AC1.M, #0x50 - 0bb1 0083 0520 lri $AR3, #0x0520 - 0bb3 02bf 0bc8 call 0x0bc8 - 0bb5 029f 0336 jmp 0x0336 - 0bb7 00d8 0402 lr $AX0.L, @0x0402 - 0bb9 8100 clr $ACC0 - 0bba 8900 clr $ACC1 - 0bbb 00dc 0430 lr $AC0.L, @0x0430 - 0bbd 0a50 lris $AX0.H, #0x50 - 0bbe 9000 mul $AX0.L, $AX0.H - 0bbf 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0bc0 1404 lsl $ACC0, #4 - 0bc1 1ffe mrr $AC1.M, $AC0.M - 0bc2 0083 0580 lri $AR3, #0x0580 - 0bc4 02bf 0bc8 call 0x0bc8 - 0bc6 029f 032e jmp 0x032e - -// - 0bc8 0092 0004 lri $CR, #0x0004 - 0bca 8100 clr $ACC0 - 0bcb 263a lrs $AC0.M, @0x003a - 0bcc 243b lrs $AC0.L, @0x003b - 0bcd 1f1f mrr $AX0.L, $AC1.M - 0bce 0a00 lris $AX0.H, #0x00 - 0bcf 5800 subax $ACC0, $AX0.L - 0bd0 0292 0be6 jg 0x0be6 - 0bd2 8900 clr $ACC1 - 0bd3 00c0 043b lr $AR0, @0x043b - 0bd5 02bf 0c0b call 0x0c0b - 0bd7 8100 clr $ACC0 - 0bd8 1fd8 mrr $AC0.M, $AX0.L - 0bd9 223b lrs $AX0.H, @0x003b - 0bda 5400 subr $ACC0, $AX0.H - 0bdb 0007 dar $AR3 - 0bdc 1979 lrri $AX1.L, @$AR3 - 0bdd 005e loop $AC0.M - 0bde 1b79 srri @$AR3, $AX1.L - 0bdf 0f01 lris $AC1.M, #0x01 - 0be0 2f01 srs @0x0001, $AC1.M - 0be1 8900 clr $ACC1 - 0be2 2f3b srs @0x003b, $AC1.M - 0be3 0092 00ff lri $CR, #0x00ff - 0be5 02df ret - -// - 0be6 2e3a srs @0x003a, $AC0.M - 0be7 2c3b srs @0x003b, $AC0.L - 0be8 8100 clr $ACC0 - 0be9 8900 clr $ACC1 - 0bea 268a lrs $AC0.M, @0xff8a - 0beb 2734 lrs $AC1.M, @0x0034 - 0bec 5c00 sub $ACC0, $AC1.L - 0bed 2e36 srs @0x0036, $AC0.M - 0bee 5000 subr $ACC0, $AX0.L - 0bef 0290 0c05 jns 0x0c05 - 0bf1 00c0 0436 lr $AR0, @0x0436 - 0bf3 02bf 0c0b call 0x0c0b - 0bf5 8100 clr $ACC0 - 0bf6 1fd8 mrr $AC0.M, $AX0.L - 0bf7 2236 lrs $AX0.H, @0x0036 - 0bf8 5400 subr $ACC0, $AX0.H - 0bf9 1c1e mrr $AR0, $AC0.M - 0bfa 8100 clr $ACC0 - 0bfb 2e34 srs @0x0034, $AC0.M - 0bfc 2688 lrs $AC0.M, @0xff88 - 0bfd 2489 lrs $AC0.L, @0xff89 - 0bfe 2e8c srs @0xff8c, $AC0.M - 0bff 2c8d srs @0xff8d, $AC0.L - 0c00 02bf 0c0b call 0x0c0b - 0c02 0092 00ff lri $CR, #0x00ff - 0c04 02df ret - -// - 0c05 1c18 mrr $AR0, $AX0.L - 0c06 02bf 0c0b call 0x0c0b - 0c08 0092 00ff lri $CR, #0x00ff - 0c0a 02df ret - -// - 0c0b 8100 clr $ACC0 - 0c0c 1fc0 mrr $AC0.M, $AR0 - 0c0d b100 tst $ACC0 - 0c0e 02d5 retz - 0c0f 8900 clr $ACC1 - 0c10 2734 lrs $AC1.M, @0x0034 - 0c11 0340 0001 andi $AC1.M, #0x0001 - 0c13 0b00 lris $AX1.H, #0x00 - 0c14 1f3f mrr $AX1.L, $AC1.M - 0c15 268c lrs $AC0.M, @0xff8c - 0c16 248d lrs $AC0.L, @0xff8d - 0c17 8900 clr $ACC1 - 0c18 2534 lrs $AC1.L, @0x0034 - 0c19 1501 lsl $ACC1, #1 - 0c1a 4c00 add $ACC0, $AC1.L - 0c1b 5a00 subax $ACC0, $AX1.L - 0c1c 5a00 subax $ACC0, $AX1.L - 0c1d 1c20 mrr $AR1, $AR0 - 0c1e 1fe0 mrr $AC1.M, $AR0 - 0c1f 0502 addis $ACC1, #0x02 - 0c20 1c1f mrr $AR0, $AC1.M - 0c21 009f 0b00 lri $AC1.M, #0x0b00 - 0c23 0092 00ff lri $CR, #0x00ff - 0c25 02bf 05e8 call 0x05e8 - 0c27 0092 0004 lri $CR, #0x0004 - 0c29 2734 lrs $AC1.M, @0x0034 - 0c2a 1f61 mrr $AX1.H, $AR1 - 0c2b 4700 addr $ACC1, $AX1.H - 0c2c 2f34 srs @0x0034, $AC1.M - 0c2d 0080 0b00 lri $AR0, #0x0b00 - 0c2f 8900 clr $ACC1 - 0c30 1ff9 mrr $AC1.M, $AX1.L - 0c31 b900 tst $ACC1 - 0c32 0274 ifnz - 0c33 0008 iar $AR0 - 0c34 8900 clr $ACC1 - 0c35 1fe1 mrr $AC1.M, $AR1 - 0c36 191e lrri $AC0.M, @$AR0 - 0c37 0701 cmpis $ACC1, #0x01 - 0c38 0293 0c41 jle 0x0c41 - 0c3a 191a lrri $AX0.H, @$AR0 - 0c3b 05fe addis $ACC1, #0xfe - 0c3c 005f loop $AC1.M - 0c3d 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c3e 1b7e srri @$AR3, $AC0.M - 0c3f 1b7a srri @$AR3, $AX0.H - 0c40 02df ret - -// uh? - 0c41 1b7e srri @$AR3, $AC0.M - 0c42 02df ret - -// ??? -// AR0 = some count??? address??? -// AC0.M = -// AR1 = - 0c43 0083 03e8 lri $AR3, #0x03e8 - 0c45 191e lrri $AC0.M, @$AR0 - 0c46 191a lrri $AX0.H, @$AR0 - 0c47 1006 loopi #0x06 - 0c48 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c49 1b7e srri @$AR3, $AC0.M - 0c4a 1b7a srri @$AR3, $AX0.H - 0c4b 0080 03e8 lri $AR0, #0x03e8 - 0c4d 8a00 m2 - 0c4e 0088 0007 lri $WR0, #0x0007 - - 0c50 1150 0c5d bloopi #0x50, 0x0c5d - 0c52 1c61 mrr $AR3, $AR1 - 0c53 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c54 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c55 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c56 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c57 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c58 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c59 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c5a f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c5b f200 madd $AX0.L, $AX0.H - 0c5c fe00 movpz $ACC0 - 0c5d 1b3e srri @$AR1, $AC0.M - - 0c5e 0088 ffff lri $WR0, #0xffff - 0c60 8b00 m0 - 0c61 02df ret - -// - 0c62 8a00 m2 - 0c63 05fe addis $ACC1, #0xfe - 0c64 0083 03e8 lri $AR3, #0x03e8 - 0c66 191e lrri $AC0.M, @$AR0 - 0c67 191a lrri $AX0.H, @$AR0 - 0c68 005f loop $AC1.M - 0c69 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c6a 1b7e srri @$AR3, $AC0.M - 0c6b 1b7a srri @$AR3, $AX0.H - 0c6c 0080 03e8 lri $AR0, #0x03e8 - 0c6e 0501 addis $ACC1, #0x01 - 0c6f 1d1f mrr $WR0, $AC1.M - 0c70 1150 0c78 bloopi #0x50, 0x0c78 - 0c72 1c61 mrr $AR3, $AR1 - 0c73 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c74 005f loop $AC1.M - 0c75 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c76 f200 madd $AX0.L, $AX0.H - 0c77 fe00 movpz $ACC0 - 0c78 1b3e srri @$AR1, $AC0.M - 0c79 0088 ffff lri $WR0, #0xffff - 0c7b 8b00 m0 - 0c7c 02df ret - 0c7d 0083 03e8 lri $AR3, #0x03e8 - 0c7f 191e lrri $AC0.M, @$AR0 - 0c80 191a lrri $AX0.H, @$AR0 - 0c81 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c82 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c83 1b7e srri @$AR3, $AC0.M - 0c84 1b7a srri @$AR3, $AX0.H - 0c85 0080 03e8 lri $AR0, #0x03e8 - 0c87 0088 0003 lri $WR0, #0x0003 - 0c89 0085 0000 lri $IX1, #0x0000 - 0c8b 0087 0000 lri $IX3, #0x0000 - 0c8d 1fc2 mrr $AC0.M, $AR2 - 0c8e 195b lrri $AX1.H, @$AR2 - 0c8f 1959 lrri $AX1.L, @$AR2 - 0c90 195f lrri $AC1.M, @$AR2 - 0c91 195a lrri $AX0.H, @$AR2 - 0c92 1c5e mrr $AR2, $AC0.M - 0c93 1fda mrr $AC0.M, $AX0.H - 0c94 1c61 mrr $AR3, $AR1 - 0c95 8a00 m2 - 0c96 8f00 set40 - 0c97 191a lrri $AX0.H, @$AR0 - 0c98 b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0c99 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0c9a ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0c9b e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0c9c b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0c9d 1127 0ca8 bloopi #0x27, 0x0ca8 - 0c9f e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ca0 197e lrri $AC0.M, @$AR3 - 0ca1 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ca2 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0ca3 bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0ca4 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0ca5 197f lrri $AC1.M, @$AR3 - 0ca6 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0ca7 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0ca8 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0ca9 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0caa 197e lrri $AC0.M, @$AR3 - 0cab e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0cac eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cad bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 0cae 1bff srrn @$AR3, $AC1.M - 0caf 197f lrri $AC1.M, @$AR3 - 0cb0 8e00 set16 - 0cb1 8b00 m0 - 0cb2 0088 ffff lri $WR0, #0xffff - 0cb4 1b5b srri @$AR2, $AX1.H - 0cb5 1b59 srri @$AR2, $AX1.L - 0cb6 1b5f srri @$AR2, $AC1.M - 0cb7 1b5e srri @$AR2, $AC0.M - 0cb8 02df ret - 0cb9 0083 03e8 lri $AR3, #0x03e8 - 0cbb 191e lrri $AC0.M, @$AR0 - 0cbc 191a lrri $AX0.H, @$AR0 - 0cbd 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cbe 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cbf 1b7e srri @$AR3, $AC0.M - 0cc0 1b7a srri @$AR3, $AX0.H - 0cc1 0080 03e8 lri $AR0, #0x03e8 - 0cc3 0088 0003 lri $WR0, #0x0003 - 0cc5 0085 0000 lri $IX1, #0x0000 - 0cc7 0087 0000 lri $IX3, #0x0000 - 0cc9 1fc2 mrr $AC0.M, $AR2 - 0cca 195b lrri $AX1.H, @$AR2 - 0ccb 1959 lrri $AX1.L, @$AR2 - 0ccc 195f lrri $AC1.M, @$AR2 - 0ccd 195a lrri $AX0.H, @$AR2 - 0cce 1c5e mrr $AR2, $AC0.M - 0ccf 1fda mrr $AC0.M, $AX0.H - 0cd0 1c61 mrr $AR3, $AR1 - 0cd1 8a00 m2 - 0cd2 8f00 set40 - 0cd3 191a lrri $AX0.H, @$AR0 - 0cd4 b800 mulx $AX0.H, $AX1.H - 0cd5 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0cd6 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cd7 ea00 maddc $AC1.M, $AX1.L - 0cd8 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0cd9 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0cda ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0cdb b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0cdc 1127 0ced bloopi #0x27, 0x0ced - 0cde e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cdf e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ce0 197e lrri $AC0.M, @$AR3 - 0ce1 e800 maddc $AC0.M, $AX1.L - 0ce2 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ce3 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0ce4 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0ce5 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0ce6 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0ce7 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0ce8 197f lrri $AC1.M, @$AR3 - 0ce9 ea00 maddc $AC1.M, $AX1.L - 0cea ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0ceb e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0cec ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0ced b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0cee e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cef e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0cf0 197e lrri $AC0.M, @$AR3 - 0cf1 e800 maddc $AC0.M, $AX1.L - 0cf2 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0cf3 ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0cf4 eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cf5 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0cf6 1bff srrn @$AR3, $AC1.M - 0cf7 197f lrri $AC1.M, @$AR3 - 0cf8 8e00 set16 - 0cf9 8b00 m0 - 0cfa 0088 ffff lri $WR0, #0xffff - 0cfc 1b5b srri @$AR2, $AX1.H - 0cfd 1b59 srri @$AR2, $AX1.L - 0cfe 1b5f srri @$AR2, $AC1.M - 0cff 1b5e srri @$AR2, $AC0.M - 0d00 02df ret - -// stores an offset table??? called by DsetupTable -// Mem[0x03F0] = 0x0000; -// Mem[0x03F1] = 0x0096; -// Mem[0x03F2] = 0x00FF; -// Mem[0x03F3] = 0x0030; -// Mem[0x03F4] = 0x0010; -// Mem[0x03F5] = 0x7F00; -// Mem[0x03F6] = 0x0000; -// Mem[0x03F7] = 0x0100; - 0d01 0eff lris $AC0.M, #0xff - 0d02 00fe 03f2 sr @0x03f2, $AC0.M - 0d04 8100 clr $ACC0 - 0d05 00fe 03f0 sr @0x03f0, $AC0.M - 0d07 00fe 03f6 sr @0x03f6, $AC0.M - 0d09 009e 0100 lri $AC0.M, #0x0100 - 0d0b 00fe 03f7 sr @0x03f7, $AC0.M - 0d0d 00da 03f7 lr $AX0.H, @0x03f7 - 0d0f 009e 8000 lri $AC0.M, #0x8000 - 0d11 5400 subr $ACC0, $AX0.H - 0d12 00fe 03f5 sr @0x03f5, $AC0.M - 0d14 0e30 lris $AC0.M, #0x30 - 0d15 00fe 03f3 sr @0x03f3, $AC0.M - 0d17 0e10 lris $AC0.M, #0x10 - 0d18 00fe 03f4 sr @0x03f4, $AC0.M - 0d1a 009e 0096 lri $AC0.M, #0x0096 - 0d1c 00fe 03f1 sr @0x03f1, $AC0.M - 0d1e 02df ret - -// - 0d1f 0080 0a00 lri $AR0, #0x0a00 - 0d21 8100 clr $ACC0 - 0d22 00de 03f0 lr $AC0.M, @0x03f0 - 0d24 8900 clr $ACC1 - 0d25 b100 tst $ACC0 - 0d26 0275 ifz - 0d27 0550 addis $ACC1, #0x50 - 0d28 00ff 03f0 sr @0x03f0, $AC1.M - 0d2a 0200 0a60 addi $AC0.M, #0x0a60 - 0d2c 1c7e mrr $AR3, $AC0.M - 0d2d 0f4e lris $AC1.M, #0x4e - 0d2e 02bf 00e5 call 0x00e5 - 0d30 02df ret - -// - 0d31 00de 03f1 lr $AC0.M, @0x03f1 - 0d33 0200 0a60 addi $AC0.M, #0x0a60 - 0d35 1c7e mrr $AR3, $AC0.M - 0d36 8100 clr $ACC0 - 0d37 8900 clr $ACC1 - 0d38 009f 00a0 lri $AC1.M, #0x00a0 - 0d3a 00de 03f1 lr $AC0.M, @0x03f1 - 0d3c 5d00 sub $ACC1, $AC0.L - 0d3d 0e50 lris $AC0.M, #0x50 - 0d3e 0750 cmpis $ACC1, #0x50 - 0d3f 0270 ifns - 0d40 5d00 sub $ACC1, $AC0.L - 0d41 00da 03f2 lr $AX0.H, @0x03f2 - 0d43 8600 tstaxh $AX0.H - 0d44 0290 0d62 jns 0x0d62 - 0d46 00de 03f3 lr $AC0.M, @0x03f3 - 0d48 5c00 sub $ACC0, $AC1.L - 0d49 0293 0d4d jle 0x0d4d - 0d4b 029f 0d67 jmp 0x0d67 - 0d4d 00db 03f7 lr $AX1.H, @0x03f7 - 0d4f 009e 8000 lri $AC0.M, #0x8000 - 0d51 4600 addr $ACC0, $AX1.H - 0d52 029f 0d59 jmp 0x0d59 - 0d54 00db 03f7 lr $AX1.H, @0x03f7 - 0d56 009e 8000 lri $AC0.M, #0x8000 - 0d58 5600 subr $ACC0, $AX1.H - 0d59 00fe 03f5 sr @0x03f5, $AC0.M - 0d5b 1fda mrr $AC0.M, $AX0.H - 0d5c 7c00 neg $ACC0 - 0d5d 1f5e mrr $AX0.H, $AC0.M - 0d5e 00fe 03f2 sr @0x03f2, $AC0.M - 0d60 029f 0d67 jmp 0x0d67 - 0d62 00de 03f4 lr $AC0.M, @0x03f4 - 0d64 5d00 sub $ACC1, $AC0.L - 0d65 0293 0d54 jle 0x0d54 - 0d67 8900 clr $ACC1 - 0d68 00dd 03f5 lr $AC1.L, @0x03f5 - 0d6a 1501 lsl $ACC1, #1 - 0d6b 8100 clr $ACC0 - 0d6c 00dc 03f6 lr $AC0.L, @0x03f6 - 0d6e 008b 009f lri $WR3, #0x009f - 0d70 0080 0a00 lri $AR0, #0x0a00 - 0d72 0900 lris $AX1.L, #0x00 - // fill buffer at 0x0A00 with buffer at (0x0A60 + Mem[0x03F1]) - 0d73 1150 0d7a bloopi #0x50, 0x0d7a - 0d75 1878 lrr $AX0.L, @$AR3 - 0d76 4c00 add $ACC0, $AC1.L - 0d77 1cfe mrr $IX3, $AC0.M - 0d78 001f addarn $AR3, $IX3 - 0d79 1fd9 mrr $AC0.M, $AX1.L - 0d7a 1b18 srri @$AR0, $AX0.L - - 0d7b 009f 0a60 lri $AC1.M, #0x0a60 - 0d7d 1fc3 mrr $AC0.M, $AR3 - 0d7e 5c00 sub $ACC0, $AC1.L - 0d7f 00fe 03f1 sr @0x03f1, $AC0.M - 0d81 00fc 03f6 sr @0x03f6, $AC0.L - 0d83 008b ffff lri $WR3, #0xffff - 0d85 02df ret - -// copy buffer at 0x0A00 to right & left buffers - 0d86 0f50 lris $AC1.M, #0x50 - 0d87 0080 0a00 lri $AR0, #0x0a00 - 0d89 0083 0d60 lri $AR3, #0x0d60 - 0d8b 0098 3fff lri $AX0.L, #0x3fff - 0d8d 02bf 00ff call 0x00ff - 0d8f 0f50 lris $AC1.M, #0x50 - 0d90 0080 0a00 lri $AR0, #0x0a00 - 0d92 0083 0d00 lri $AR3, #0x0d00 - 0d94 0098 3fff lri $AX0.L, #0x3fff - 0d96 02bf 00ff call 0x00ff - 0d98 02df ret - -// ??? -// ACC1: ??? - 0d99 b900 tst $ACC1 - 0d9a 0294 0d9f jnz 0x0d9f - 0d9c 6800 movax $ACC0, $AX0.L - 0d9d b100 tst $ACC0 - 0d9e 02d5 retz - 0d9f 1c23 mrr $AR1, $AR3 - 0da0 197e lrri $AC0.M, @$AR3 - 0da1 191b lrri $AX1.H, @$AR0 - 0da2 d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - - 0da3 1120 0da9 bloopi #0x20, 0x0da9 - 0da5 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0da6 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0da7 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0da8 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0da9 4900 addax $ACC1, $AX0.L - - 0daa 1108 0daf bloopi #0x08, 0x0daf - 0dac dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0dad 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dae dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0daf 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - - 0db0 02df ret - -// interleave two buffers - 0db1 8f00 set40 - 0db2 8d00 set15 - 0db3 1c03 mrr $AR0, $AR3 - 0db4 00d9 038e lr $AX1.L, @0x038e // (0x0040) set by DsetupTable - 0db6 0b04 lris $AX1.H, #0x04 - 0db7 197a lrri $AX0.H, @$AR3 - 0db8 b053 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR3 - 0db9 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0dba 1128 0dbf bloopi #0x28, 0x0dbf - 0dbc 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0dbd b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dbe 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0dbf b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dc0 8c00 clr15 - 0dc1 8e00 set16 - 0dc2 02df ret - -// ??? - 0dc3 00da 0485 lr $AX0.H, @0x0485 - 0dc5 8600 tstaxh $AX0.H - 0dc6 0295 0dd4 jz 0x0dd4 - 0dc8 8100 clr $ACC0 - 0dc9 00de 042a lr $AC0.M, @0x042a - 0dcb 147f lsr $ACC0, #-1 - 0dcc 00fe 042b sr @0x042b, $AC0.M - 0dce b100 tst $ACC0 - 0dcf 0294 0dd4 jnz 0x0dd4 - 0dd1 0a01 lris $AX0.H, #0x01 - 0dd2 00fa 0401 sr @0x0401, $AX0.H - - 0dd4 8f00 set40 - 0dd5 8100 clr $ACC0 - 0dd6 00de 0428 lr $AC0.M, @0x0428 - 0dd8 1478 lsr $ACC0, #-8 - 0dd9 00df 0428 lr $AC1.M, @0x0428 - 0ddb 0340 007f andi $AC1.M, #0x007f - 0ddd 1f1e mrr $AX0.L, $AC0.M - 0dde 1f5f mrr $AX0.H, $AC1.M - 0ddf 0220 007f xori $ACC0, #0x007f - 0de1 1f3e mrr $AX1.L, $AC0.M - 0de2 0320 007f xori $ACC1, #0x007f - 0de4 1f7f mrr $AX1.H, $AC1.M - 0de5 8100 clr $ACC0 - 0de6 8900 clr $ACC1 - 0de7 009f 0200 lri $AC1.M, #0x0200 - 0de9 1fd8 mrr $AC0.M, $AX0.L - 0dea 4c00 add $ACC0, $AC1.L - 0deb 1c1e mrr $AR0, $AC0.M - 0dec 1818 lrr $AX0.L, @$AR0 - 0ded 1fda mrr $AC0.M, $AX0.H - 0dee 4c00 add $ACC0, $AC1.L - 0def 1c1e mrr $AR0, $AC0.M - 0df0 181a lrr $AX0.H, @$AR0 - 0df1 1fd9 mrr $AC0.M, $AX1.L - 0df2 4c00 add $ACC0, $AC1.L - 0df3 1c1e mrr $AR0, $AC0.M - 0df4 1819 lrr $AX1.L, @$AR0 - 0df5 1fdb mrr $AC0.M, $AX1.H - 0df6 4c00 add $ACC0, $AC1.L - 0df7 1c1e mrr $AR0, $AC0.M - 0df8 181b lrr $AX1.H, @$AR0 - 0df9 8a00 m2 - 0dfa 0080 0b00 lri $AR0, #0x0b00 - 0dfc 9800 mul $AX1.L, $AX1.H - 0dfd ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0dfe b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dff 9630 mulmv's $AX0.L, $AX0.H, $ACC0 : @$AR0, $AC0.M - 0e00 6e30 movp's $ACC0 : @$AR0, $AC0.M - 0e01 1b1e srri @$AR0, $AC0.M - 0e02 8b00 m0 - 0e03 0080 0b00 lri $AR0, #0x0b00 - 0e05 0081 0b04 lri $AR1, #0x0b04 - 0e07 00da 042a lr $AX0.H, @0x042a - 0e09 02bf 0e54 call 0x0e54 - 0e0b 0081 0b08 lri $AR1, #0x0b08 - 0e0d 0080 0b00 lri $AR0, #0x0b00 - 0e0f 00da 042a lr $AX0.H, @0x042a - 0e11 00de 0429 lr $AC0.M, @0x0429 - 0e13 8a00 m2 - 0e14 c000 mulc $AC0.M, $AX0.H - 0e15 8b00 m0 - 0e16 6e00 movp $ACC0 - 0e17 1f5e mrr $AX0.H, $AC0.M - 0e18 02bf 0e54 call 0x0e54 - 0e1a 0080 0b00 lri $AR0, #0x0b00 - 0e1c 0081 0b0c lri $AR1, #0x0b0c - 0e1e 8100 clr $ACC0 - 0e1f 8900 clr $ACC1 - 0e20 00de 042b lr $AC0.M, @0x042b - 0e22 00df 042a lr $AC1.M, @0x042a - 0e24 00fe 042a sr @0x042a, $AC0.M - 0e26 5c00 sub $ACC0, $AC1.L - 0e27 1f5e mrr $AX0.H, $AC0.M - 0e28 02bf 0e5f call 0x0e5f - 0e2a 0080 0b0c lri $AR0, #0x0b0c - 0e2c 0081 0b10 lri $AR1, #0x0b10 - 0e2e 00da 0429 lr $AX0.H, @0x0429 - 0e30 02bf 0e54 call 0x0e54 - 0e32 0081 0b04 lri $AR1, #0x0b04 - 0e34 0082 0b0c lri $AR2, #0x0b0c - 0e36 0083 0e6d lri $AR3, #0x0e6d - 0e38 1108 0e51 bloopi #0x08, 0x0e51 - 0e3a 195f lrri $AC1.M, @$AR2 - 0e3b 15fb asr $ACC1, #-5 - 0e3c 1f1d mrr $AX0.L, $AC1.L - 0e3d 1f5f mrr $AX0.H, $AC1.M - 0e3e 193f lrri $AC1.M, @$AR1 - 0e3f 00e1 0b24 sr @0x0b24, $AR1 - 0e41 00e2 0b25 sr @0x0b25, $AR2 - 0e43 021b ilrri $AC0.M, @$AR3 - 0e44 00e3 0b26 sr @0x0b26, $AR3 - 0e46 1c7e mrr $AR3, $AC0.M - 0e47 00c0 038f lr $AR0, @0x038f - 0e49 02bf 0d99 call 0x0d99 - 0e4b 00c1 0b24 lr $AR1, @0x0b24 - 0e4d 00c2 0b25 lr $AR2, @0x0b25 - 0e4f 00c3 0b26 lr $AR3, @0x0b26 - 0e51 0000 nop - 0e52 8e00 set16 - 0e53 02df ret - -// - 0e54 8a00 m2 - 0e55 191f lrri $AC1.M, @$AR0 - 0e56 d078 mulc'l $AC1.M, $AX0.H : $AC1.M, @$AR0 - 0e57 d678 mulcmv'l $AC1.M, $AX0.H, $ACC0 : $AC1.M, @$AR0 - 0e58 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e59 191f lrri $AC1.M, @$AR0 - 0e5a d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e5b 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0e5c 1b3e srri @$AR1, $AC0.M - 0e5d 8b00 m0 - 0e5e 02df ret - 0e5f 8a00 m2 - 0e60 8d00 set15 - 0e61 1f7e mrr $AX1.H, $AC0.M - 0e62 1918 lrri $AX0.L, @$AR0 - 0e63 a840 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR0 - 0e64 ae40 mulxmv'l $AX0.L, $AX1.H, $ACC0 : $AX0.L, @$AR0 - 0e65 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e66 1918 lrri $AX0.L, @$AR0 - 0e67 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0e68 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0e69 1b3e srri @$AR1, $AC0.M - 0e6a 8c00 clr15 - 0e6b 8b00 m0 - 0e6c 02df ret - 0e6d 0d00 lris $AC1.L, #0x00 - 0e6e 0d60 lris $AC1.L, #0x60 - 0e6f 0f40 lris $AC1.M, #0x40 - 0e70 0ca0 lris $AC0.L, #0xa0 - 0e71 0e80 lris $AC0.M, #0x80 - 0e72 0ee0 lris $AC0.M, #0xe0 - 0e73 0be0 lris $AX1.H, #0xe0 - 0e74 0c40 lris $AC0.L, #0x40 - -// store ramp??? -// AR0 = 0x0580 (left buffer?) -// AR1 = 0x0520 (right buffer?) - 0e75 00f9 0361 sr @0x0361, $AX1.L - 0e77 1fc0 mrr $AC0.M, $AR0 - 0e78 0200 fffc addi $AC0.M, #0xfffc // AC0.M = AR0 - 4; - 0e7a 1c1e mrr $AR0, $AC0.M // AR0 = AC0.M = 0x057C; - 0e7b 1c5e mrr $AR2, $AC0.M // AR2 = AC0.M = 0x057C; - 0e7c 0083 043c lri $AR3, #0x043c // AR3 = 0x043C; - 0e7e 197e lrri $AC0.M, @$AR3 // AC0.M = Mem[AR3]; AR3++; - 0e7f 197f lrri $AC1.M, @$AR3 // AC1.M = Mem[AR3]; AR3++; - 0e80 80a2 nx'sl : $AC0.M, $AX0.H // AX0.H = Mem[AR3]; AR3++; Mem[AR0] = AC0.M; AR0++; - 0e81 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - 0e82 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - 0e83 1b1f srri @$AR0, $AC1.M - 0e84 1c02 mrr $AR0, $AR2 // AR0 = AR2; (0x0580) - 0e85 8100 clr $ACC0 - 0e86 00de 0402 lr $AC0.M, @0x0402 // AC0.M = Mem[0x0402]; (0x0FFC) (ACC0 = 0x0FFC0000) - 0e88 00fe 0362 sr @0x0362, $AC0.M // Mem[0x0362] = AC0.M; - 0e8a 1474 lsr $ACC0, #-12 // ACC0 >>= 12; - 0e8b 1f7e mrr $AX1.H, $AC0.M // AX1.H = AC0.M; (0x0000) - 0e8c 1f3c mrr $AX1.L, $AC0.L // AX1.L = AC0.L; (0xFFC0) - 0e8d 8900 clr $ACC1 - 0e8e 00dd 0430 lr $AC1.L, @0x0430 // AC1.L = Mem[0x0430]; - 0e90 1504 lsl $ACC1, #4 // ACC1 <<= 4; - 0e91 0604 cmpis $ACC0, #0x04 - 0e92 0290 0ee9 jns 0x0ee9 - 0e94 1fdd mrr $AC0.M, $AC1.L - 0e95 0082 02b0 lri $AR2, #0x02b0 // AR2 = 0x02B0; temp buffer? - // store a ramp. for example, the ramp is 0xFFC0, 0xFF80, 0xFF40, 0xFF00, 0xFEC0 and so on... if start value (Mem[0x0402]) is 0x0FFC. - 0e97 1050 loopi #0x50 // for(i = 0; i < 80; i++) - 0e98 4b2a addax's $ACC1, $AX1.L : @$AR2, $AC1.L // ACC1 += AX1.L; Mem[AR2] = AC1.L; AR2++; - - 0e99 1fbe mrr $AC1.L, $AC0.M - 0e9a 00fe 0360 sr @0x0360, $AC0.M - 0e9c 8900 clr $ACC1 - 0e9d 1fbe mrr $AC1.L, $AC0.M - 0e9e 0af8 lris $AX0.H, #0xf8 // AX0.H = 0x00F8; - 0e9f 009b 00fc lri $AX1.H, #0x00fc // AX1.H = 0x00FC; - 0ea1 00d8 0361 lr $AX0.L, @0x0361 // AX0.L = Mem[0x0361]; - 0ea3 0082 02b0 lri $AR2, #0x02b0 // AR2 = 0x02B0; - 0ea5 0083 02b0 lri $AR3, #0x02b0 // AR3 = 0x02B0; - 0ea7 195e lrri $AC0.M, @$AR2 // AC0.M = Mem[AR2]; - 0ea8 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M // AC0.M &= 0x00F8; AX0.L = Mem[AR0]; AR0++; Mem[AR3] = AC0.M; AR3++; - // do some processing on the ramp we just made, and merge it to the buffer at 0x0580 - 0ea9 1128 0eae bloopi #0x28, 0x0eae // - 0eab 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 // AC0.M &= AX1.H; AC1.M = Mem[AR2]; AR2++; - 0eac 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H // AC1.M &= 0x00F8; Mem[AR0] = AC1.M; AR0++; AX1.H = Mem[AR3]; AR3++; - 0ead 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 // ... - 0eae 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - - 0eaf 8a00 m2 // multiply by 2 - 0eb0 0082 02b0 lri $AR2, #0x02b0 - 0eb2 00dd 0430 lr $AC1.L, @0x0430 - 0eb4 1504 lsl $ACC1, #4 - 0eb5 1fe0 mrr $AC1.M, $AR0 - 0eb6 8100 clr $ACC0 - 0eb7 00de 0362 lr $AC0.M, @0x0362 - 0eb9 1474 lsr $ACC0, #-12 - 0eba 1f7e mrr $AX1.H, $AC0.M // AX1.H = 0x0000 - 0ebb 1f3c mrr $AX1.L, $AC0.L // AX1.L = 0xFFC0 - 0ebc 8f00 set40 - 0ebd 1943 lrri $AR3, @$AR2 - 0ebe 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ebf 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ec0 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ec1 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ec2 f200 madd $AX0.L, $AX0.H - 0ec3 fe00 movpz $ACC0 - 0ec4 1c1f mrr $AR0, $AC1.M - 0ec5 1943 lrri $AR3, @$AR2 - 0ec6 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ec7 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - - 0ec8 114e 0ed0 bloopi #0x4e, 0x0ed0 // uh? 0x4E? skip two samples? - 0eca f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ecb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ecc f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0ecd 1c1f mrr $AR0, $AC1.M - 0ece 1943 lrri $AR3, @$AR2 - 0ecf 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ed0 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - - 0ed1 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ed2 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ed3 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0ed4 fe00 movpz $ACC0 - 0ed5 1b3e srri @$AR1, $AC0.M - 0ed6 8b00 m0 // don't multiply by 2 - 0ed7 8e00 set16 - 0ed8 00fe 0433 sr @0x0433, $AC0.M - 0eda 1c1f mrr $AR0, $AC1.M - 0edb 150c lsl $ACC1, #12 - 0edc 0340 0fff andi $AC1.M, #0x0fff - 0ede 00ff 0430 sr @0x0430, $AC1.M - 0ee0 0083 043c lri $AR3, #0x043c - 0ee2 191e lrri $AC0.M, @$AR0 - 0ee3 191f lrri $AC1.M, @$AR0 - 0ee4 80a0 nx'ls : $AX0.H, $AC0.M - 0ee5 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0ee6 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0ee7 1b7f srri @$AR3, $AC1.M - 0ee8 02df ret - -// - 0ee9 1fe0 mrr $AC1.M, $AR0 - 0eea 1c1f mrr $AR0, $AC1.M - // copy buffer at 0x0580 to buffer at 0x0520? - 0eeb 1128 0ef2 bloopi #0x28, 0x0ef2 - 0eed 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0eee 1b3e srri @$AR1, $AC0.M - 0eef 1c1f mrr $AR0, $AC1.M - 0ef0 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0ef1 1b3e srri @$AR1, $AC0.M - 0ef2 1c1f mrr $AR0, $AC1.M - - 0ef3 029f 0ed8 jmp 0x0ed8 - -// - 0ef5 0083 0520 lri $AR3, #0x0520 - 0ef7 00de 0433 lr $AC0.M, @0x0433 - 0ef9 1050 loopi #0x50 - 0efa 1b7e srri @$AR3, $AC0.M - 0efb 029f 0336 jmp 0x0336 - -// - 0efd 1c20 mrr $AR1, $AR0 - 0efe 185f lrr $AC1.M, @$AR2 - 0eff 1f7f mrr $AX1.H, $AC1.M - 0f00 193a lrri $AX0.H, @$AR1 - 0f01 6400 movr $ACC0, $AX0.H - 0f02 0078 0f07 bloop $AX0.L, 0x0f07 - 0f04 5659 subr'l $ACC0, $AX1.H : $AX1.H, @$AR1 - 0f05 6730 movr's $ACC1, $AX1.H : @$AR0, $AC0.M - 0f06 5551 subr'l $ACC1, $AX0.H : $AX0.H, @$AR1 - 0f07 6438 movr's $ACC0, $AX0.H : @$AR0, $AC1.M - 0f08 1a5b srr @$AR2, $AX1.H - 0f09 02df ret - -// InitUnkTable() - 0f0a 0098 8240 lri $AX0.L, #0x8240 - 0f0c 00f8 04e8 sr @0x04e8, $AX0.L - 0f0e 0098 7fff lri $AX0.L, #0x7fff - 0f10 00f8 04e9 sr @0x04e9, $AX0.L - 0f12 0098 7dbf lri $AX0.L, #0x7dbf - 0f14 00f8 04ea sr @0x04ea, $AX0.L - 0f16 0098 843f lri $AX0.L, #0x843f - 0f18 00f8 04eb sr @0x04eb, $AX0.L - 0f1a 0098 b23b lri $AX0.L, #0xb23b - 0f1c 00f8 04f0 sr @0x04f0, $AX0.L - 0f1e 0098 7fff lri $AX0.L, #0x7fff - 0f20 00f8 04f1 sr @0x04f1, $AX0.L - 0f22 0098 4dc4 lri $AX0.L, #0x4dc4 - 0f24 00f8 04f2 sr @0x04f2, $AX0.L - 0f26 0098 d808 lri $AX0.L, #0xd808 - 0f28 00f8 04f3 sr @0x04f3, $AX0.L - 0f2a 0098 0000 lri $AX0.L, #0x0000 - 0f2c 0080 04ec lri $AR0, #0x04ec - 0f2e 1004 loopi #0x04 - 0f2f 1b18 srri @$AR0, $AX0.L - 0f30 0080 04f4 lri $AR0, #0x04f4 - 0f32 1004 loopi #0x04 - 0f33 1b18 srri @$AR0, $AX0.L - 0f34 02df ret - -// mixer? - 0f35 0080 0f40 lri $AR0, #0x0f40 - 0f37 0083 0b00 lri $AR3, #0x0b00 - 0f39 8900 clr $ACC1 - 0f3a 0f50 lris $AC1.M, #0x50 - 0f3b 0098 6784 lri $AX0.L, #0x6784 - 0f3d 02bf 010e call 0x010e - 0f3f 0080 04e8 lri $AR0, #0x04e8 - 0f41 0082 04ec lri $AR2, #0x04ec - 0f43 0081 0b00 lri $AR1, #0x0b00 - 0f45 8900 clr $ACC1 - 0f46 0f50 lris $AC1.M, #0x50 - 0f47 0080 0b00 lri $AR0, #0x0b00 - 0f49 0083 0d00 lri $AR3, #0x0d00 - 0f4b 0098 7fff lri $AX0.L, #0x7fff - 0f4d 02bf 00ff call 0x00ff - 0f4f 8900 clr $ACC1 - 0f50 0f50 lris $AC1.M, #0x50 - 0f51 0080 0b00 lri $AR0, #0x0b00 - 0f53 0083 0d60 lri $AR3, #0x0d60 - 0f55 0098 b820 lri $AX0.L, #0xb820 - 0f57 02bf 00ff call 0x00ff - 0f59 0080 0ca0 lri $AR0, #0x0ca0 - 0f5b 0083 0b00 lri $AR3, #0x0b00 - 0f5d 8900 clr $ACC1 - 0f5e 0f50 lris $AC1.M, #0x50 - 0f5f 0098 6784 lri $AX0.L, #0x6784 - 0f61 02bf 010e call 0x010e - 0f63 0080 04e8 lri $AR0, #0x04e8 - 0f65 0082 04f4 lri $AR2, #0x04f4 - 0f67 0081 0b00 lri $AR1, #0x0b00 - 0f69 8900 clr $ACC1 - 0f6a 0f50 lris $AC1.M, #0x50 - 0f6b 0080 0b00 lri $AR0, #0x0b00 - 0f6d 0083 0d00 lri $AR3, #0x0d00 - 0f6f 0098 47e0 lri $AX0.L, #0x47e0 - 0f71 02bf 00ff call 0x00ff - 0f73 8900 clr $ACC1 - 0f74 0f50 lris $AC1.M, #0x50 - 0f75 0080 0b00 lri $AR0, #0x0b00 - 0f77 0083 0d60 lri $AR3, #0x0d60 - 0f79 0098 8001 lri $AX0.L, #0x8001 - 0f7b 02bf 00ff call 0x00ff - 0f7d 02df ret - - 0f7e 0000 nop - 0f7f 0000 nop \ No newline at end of file diff --git a/docs/DSP/DSP_UC_Zelda.txt b/docs/DSP/DSP_UC_Zelda.txt deleted file mode 100644 index 770ca65f26..0000000000 --- a/docs/DSP/DSP_UC_Zelda.txt +++ /dev/null @@ -1,5094 +0,0 @@ -/* //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/* //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -All code is now wrapped in void Function() {} - the new DSP LLE debugger -can parse this file and auto read symbols using those. - -BIG Questions: - - - Who resets the 0x0350 to the beginning of the command block? Wrap register? - - What does 00eb_Unk_BufferMultAddToDest?? - - Why is a PB-Transfer from RAM to DMEM 0xC0 shorts long but DMEM to RAM just 0x80 - -DSP functionality to test: - - Interrupts (7) - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */ -// -// memory map -// todo - define syntax for this so it can be auto read. - -// -0x0000 to 0x280 // Unknown table -0x0280 // command queue - -/////////////////////////////////////////// - -0x0300 to 0x0320 // AFC COEF table - -0x0342 // low part of the DSetupTable /(Luigi2us) thinks it is the number of PBs -0x0343 // current command code (the code for the switch - casement table) seems to be for debug... nobody loads it -0x0344 // high part of the (command & 0xFF) ... prolly some kind of paramter -0x0345 // low part of the command - -0x034e (0x0000) - -/////////////////////////////////////////// - - - -/////////////////////////////////////////// -// Initialized at 0688_InitCommandBlock() -0x0350 (0x0280) // address to end of the command queue -0x0351 (0x0280) // address to start of the command queue -0x0352 (0x0000) // number of commands - - -0x0356[] // current command queue... eg: 0x81000040 for DsetupTable -0x0358 // first parameter of the command ... - - -0x0364 // Temp Buffer for AFC Decoder - -/////////////////////////////////////////// -0x0380 // RAM Address of the PBs -0x0381 // - -0x038e // used by COMMAND_02 copies the low part of the command to this place - - -0x03a8 // COMMAND_02 copies a struct with the size of 0x40 to the place - -/////////////////////////////////////////// -// used by 05b8_NewMail() exception to store register and restore registers -0x03fa to 0x03ff - -// shared and used by COMMAND_01 (DSetupTable) -0x03f0 // 0x00 -0x03f1 // 0x96 -0x03f2 // 0xFF -0x03f3 // 0x30 -0x03f5 // 0x10 -0x03f6 // 0x00 -0x03f7 // 0x100 ... got some more math... have to recheck it - - -0x03f9 // used by COMMAND_02... if the program decides to continue the UCode it stores the continue address... - -////////////////////////////////////////////// -// current PB in DSyncFrame -0x0400 -. -. -. -0x04C0 - - -/// -0x0400 - must be != 0 to be a valid block -0x0401 - must be != 0 to be a valid block - -0x0402 - Sample Decode Offset ?? Offset = (*0x402 * 0x50) - -0x0404 - Initialize Sample Decoder -0x0406 - Direct Stream ... no sample decoder is needed. - At the end of the PB Handling 0x0404 is set to 0 if it is NOT a direct stream - -0x0430 - Base Address ?? (0x0430 + Offset) << 4 - -0x042c flag if > 0 033d_unk() does something - - -0x0433 stored to 0x03f8 ... i think that is the current sample buffer - -0x0458 hmmm.... - -0x0480 if 0x0406 is zero check how we have to decode this data... - -0x0484 seems to contain filter settings... -0x0484 & 0x1f -> (02ed to 030f) -0x0484 & 0x20 - -0x04a8 if != zero sample is modified with function at 0x0c84.. perhaps an filter or volume - - -//////////////////////////////////////// -0x04d3 "offset to sample data" ???? - -There's definitely a bunch of sample data stored in each PB but I don't know exactly how. - - -/////////////////////////////////////////// -// Initialized at 0e14_Unk() -0x04e8 (0x8240) -0x04e9 (0x7FFF) -0x04ea (0x7DBF) -0x04eb (0x843f) -0x04ec (0x0000) -0x04ed (0x0000) -0x04ee (0x0000) -0x04ef (0x0000) - -0x04f0 (0xb23b) -0x04f1 (0x7FFF) -0x04f2 (0x4dc4) -0x04f3 (0xd808) -0x04f4 (0x0000) -0x04f5 (0x0000) -0x04f6 (0x0000) -0x04f7 (0x0000) - -/////////////////////////////////////////// -0x04fc... // used for some kind of data exchange between SyncFrame and MailExceptionHandler - // It is like this: - // (0x04fc + lastRenderedFrame) must be "something" :) - -0x0580.. Unresampled audio data is decoded to here - -/////////////////////////////////////////// -// Initialized at 04c0_Unk()... used by SyncFrame -0x0B00 to 0x0C00 -// The memory at 0b00 seems to be generally used as scratch space for various things. - - -////////////////////////////////////////// - -0x0dc0 -- ?????????? - - -// -// exception vector -// -0000 029f 0012 jmp 0x0012 -> ResetVector() -0002 0000 nop -0003 0000 nop -0004 02ff rti -0005 0000 nop -0006 02ff rti -0007 0000 nop -0008 02ff rti -0009 0000 nop -000a 02ff rti -000b 0000 nop -000c 02ff rti -000d 0000 nop -000e 029f 05b8 jmp 0x05b8 -> 05b8_NewMail() - -0010 029f 004e jmp 0x004e -> 004e_ContinueUCode() ??? - -// reset vector - -void 0012_ResetVector() -{ - // 0012 1205 sbclr #0x05 - - // 0013 02bf 0057 call 0x0057 - 0057_InitHardware() - - /* - 0015 8100 clr $ACC0 - 0016 009f 1000 lri $AC1.M, #0x1000 - 0018 0080 0000 lri $AR0, #0x0000 - 001a 005f loop $AC1.M - 001b 1b1e srri @$AR0, $AC0.M - Clear memory - */ - { - short ACC0 = 0; - short AR0 = 0x0000; - for (int i=0; i<0x1000; i++) - { - *AR0 = ACC0; - AR0++; - } - } - - // 001c 02bf 0688 call 0x0688 - 0688_InitCommandBlock(); - - // 001e 02bf 04c0 call 0x04c0 - 04c0_UnknownInit(); - - // 0020 02bf 0e14 call 0x0e14 - 0e14_DolbyInit(); // Init from 0x04e8 to 0x04f8 - - // 0022 0e00 lris $AC0.M, #0x00 - // 0023 02bf 066a call 0x066a - SendMB_DCD1(0x0000) - - // 0025 009e 1111 lri $AC0.M, #0x1111 - // 0027 02bf 0674 call 0x0674 - SendMB_F355(0x1111) - - // 0029 0e00 lris $AC0.M, #0x00 - // 002a 00fe 034e sr @0x034e, $AC0.M - *0x034e = 0x00 - - 002c 1305 sbset #0x05 - - // 002d 029f 06c5 jmp 0x06c5 - - // - // an exception will be raised if a new mail is inside the mailbox - // the exception handler will copy the command to an address and the - // 06c5_CopyCommandBlock creates a copy of the command to 0x0356 - // -:WaitForNewCommandBlock - while (06c5_CopyCommandBlock() == 0x002d); - - // 002f 00df 0357 lr $AC1.M, @0x0357 - // 0031 00ff 0345 sr @0x0345, $AC1.M - - *0x0345 = *0x0357 - - // 0033 00de 0356 lr $AC0.M, @0x0356 - // 0035 1ffe mrr $AC1.M, $AC0.M - // 0036 0340 00ff andi $AC1.M, #0x00ff - // 0038 00ff 0344 sr @0x0344, $AC1.M - - short upperCommand = *0x0356 // AC0 = upperCommand - *0x0344 = upperCommand & 0x00FF - - // 003a 1479 lsr $ACC0, #-7 - // 003b 0240 007e andi $AC0.M, #0x007e - // 003d 00fe 0343 sr @0x0343, $AC0.M - upperCommand = (upperCommand >> 7) & 0x7e // F|RES: i think duddy is wrong here ... a negative must be a shift right - *0x0343 = upperCommand - - // 003f 0200 0075 addi $AC0.M, #0x0075 - // 0041 1c1e mrr $AR0, $AC0.M - // 0042 170f jmpr $AR0 - // switch casement of the commands.. jump table is at 0075 - - switch (upperCommand >> 1) // command must be shift >> 1 in our source code because the jump table is aligned with 2 Bytes - { - // case 0x00: 0x0043 - case 0x01: 0095_COMMAND_01(); break; - case 0x02: 0243_COMMAND_02(); break; - - case 0x03: 0x0073 - case 0x04: 0095_COMMAND_04(); break; - case 0x05: 0x0592 - case 0x06: 0x0469 - case 0x07: 0x041d - case 0x08: 0x0485 - case 0x09: 0x044d - // case 0x0A: 0x0043 - // case 0x0B: 0x0043 - // case 0x0C: 0x0043 - case 0x0D: 0x00b2 - // case 0x0E: 0x0043 - // case 0x0F: 0x0043 - } - - # 0043 0092 00ff lri $CR, #0x00ff - - // 0045 0e04 lris $AC0.M, #0x04 - // 0046 02bf 066a call 0x066a - SendMB_DCD1(0x0004) - - // 0048 00de 0356 lr $AC0.M, @0x0356 - // 004a 02bf 0674 call 0x0674 - SendMB_F355(@0x0356) - - // 004c 029f 002d jmp 0x002d - GOTO :WaitForNewCommandBlock -} - -void 004e_ContinueUCode??() -{ - # 004e 1205 sbclr #0x05 - - // 004f 02bf 0057 call 0x0057 - 0057_InitHardware() - - // 0051 0e01 lris $AC0.M, #0x01 - // 0052 02bf 066a call 0x066a - SendMB_DCD1(0x0001) - - # 0054 1305 sbset #0x05 - - // 0055 029f 002d jmp 0x002d - GOTO :WaitForNewCommandBlock -} - -void 0057_InitHardware() -{ - 0057 1202 sbclr #0x02 - 0058 1203 sbclr #0x03 - 0059 1204 sbclr #0x04 - 005a 1306 sbset #0x06 - 005b 8e00 set16 - 005c 8c00 clr15 - 005d 8b00 m0 - - // Set all indexing wrappers to max range. - 005e 009e ffff lri $AC0.M, #0xffff - 0060 1d1e mrr $WR0, $AC0.M - 0061 1d3e mrr $WR1, $AC0.M - 0062 1d5e mrr $WR2, $AC0.M - 0063 1d7e mrr $WR3, $AC0.M - - // Have CR point to the HW interface. - 0064 0092 00ff lri $CR, #0x00ff - // 0066 02df ret -} - -void 0067_CopyCommand(_destAddr($AR0), _loopCount($AC0.M)) -{ - // 0067 0090 0000 lri $AC0.H, #0x0000 - // 0069 0c00 lris $AC0.L, #0x00 - // 006a 0081 0358 lri $AR1, #0x0358 - AC0.H = 0x0000 - AC0.L = 0x00 - AR1 = 0x0358 - - // 006c 007e 0071 bloop $AC0.M, 0x0071 - // 006e 193e lrri $AC0.M, @$AR1 - // 006f 1b1e srri @$AR0, $AC0.M - // 0070 193e lrri $AC0.M, @$AR1 - // 0071 1b1e srri @$AR0, $AC0.M - - for (int i=0; i<_loopCount; i++) - { - *_destAddr++ = *AR1.M++ - *_destAddr++ = *AR1.M++ - } - - // 0072 02df ret -} - -/* - 0073 029f 0043 jmp 0x0043 - 0075 029f 0043 jmp 0x0043 - 0077 029f 0095 jmp 0x0095 - 0079 029f 0243 jmp 0x0243 - 007b 029f 0073 jmp 0x0073 - 007d 029f 0580 jmp 0x0580 - 007f 029f 0592 jmp 0x0592 - 0081 029f 0469 jmp 0x0469 - 0083 029f 041d jmp 0x041d - 0085 029f 0485 jmp 0x0485 - 0087 029f 044d jmp 0x044d - 0089 029f 0043 jmp 0x0043 - 008b 029f 0043 jmp 0x0043 - 008d 029f 0043 jmp 0x0043 - 008f 029f 00b2 jmp 0x00b2 - 0091 029f 0043 jmp 0x0043 - 0093 029f 0043 jmp 0x0043 -jump table for command code decoding - */ - -// DsetupTable -void 0095_COMMAND_01() -{ - // 0095 0080 0380 lri $AR0, #0x0380 - // 0097 0e04 lris $AC0.M, #0x04 - // 0098 02bf 0067 call 0x0067 - 0067_CopyCommand(0x0380, 0x04) - - // 009a 0081 0382 lri $AR1, #0x0382 - // 009c 009f 0000 lri $AC1.M, #0x0000 - // 009e 0080 0280 lri $AR0, #0x0280 - // 00a0 02bf 0523 call 0x0523 - 0523_CopyRAMtoDMEM(0x0382, 0x0000, 0x0280) - - // 00a2 0081 0384 lri $AR1, #0x0384 - // 00a4 009f 0300 lri $AC1.M, #0x0300 - // 00a6 0080 0020 lri $AR0, #0x0020 - // 00a8 02bf 0523 call 0x0523 - 0523_CopyRAMtoDMEM(0x0384, 0x0300, 0x0020) - - // 00aa 00de 0345 lr $AC0.M, @0x0345 - // 00ac 00fe 0342 sr @0x0342, $AC0.M - *0x0342 = *0x0345 - - // 00ae 02bf 0bec call 0x0bec - 0bec_Unk() - - // 00b0 029f 0043 jmp 0x0043 -} - -// Command 0xD -void 00b2_Unk_CommandD() { - 00b2 0080 0374 lri $AR0, #0x0374 - 00b4 0e01 lris $AC0.M, #0x01 - 00b5 00fe 0377 sr @0x0377, $AC0.M - 00b7 00fe 037c sr @0x037c, $AC0.M - 00b9 02bf 0067 call 0x0067 // CopyCommand - - // 00bb 00de 0345 lr $AC0.M, @0x0345 - // 00bd 00fe 0376 sr @0x0376, $AC0.M - *0x0376 = *0x0345; - - 00bf 029f 0043 jmp 0x0043 -} - -void 00c1_CopyPBToDMEM() -{ - // 00c1 0081 034c lri $AR1, #0x034c - // 00c3 009f 0400 lri $AC1.M, #0x0400 - // 00c5 0080 00c0 lri $AR0, #0x00c0 - // 00c7 02bf 0523 call 0x0523 - // 00c9 02df ret - - 0523_CopyRAMtoDMEM(0x034c, 0x0400, 0x00c0); -} - - -void 00ca_CopyPBToRAM() -{ - // 00ca 0081 034c lri $AR1, #0x034c - // 00cc 009f 0400 lri $AC1.M, #0x0400 - // 00ce 0080 0080 lri $AR0, #0x0080 - // 00d0 0081 034c lri $AR1, #0x034c - AR1 = 0x034c - AC1.M = 0x0400 - AR0 = 0x0080 - - // 00d2 193e lrri $AC0.M, @$AR1 - // 00d3 193c lrri $AC0.L, @$AR1 - AC0.M = *0x034c - AC0.L = *0x034d - - // 00d4 0098 0000 lri $AX0.L, #0x0000 - // 00d6 7000 addaxl $ACC0, $AX0.L - // 00d7 02bf 0532 call 0x0532 - - 0532_DMEMtoRAM(0x0400, ACC0, 0x0080) - - // 00d9 02df ret -} - - -void 00da_CopyBuffer(_src($AR0), _dest($AR3), LenMinusOne(_AC1.M)) -{ - 00da 191e lrri $AC0.M, @$AR0 - 00db 191a lrri $AX0.H, @$AR0 - 00dc 005f loop $AC1.M - 00dd 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 00de 1b7e srri @$AR3, $AC0.M - 00df 1b7a srri @$AR3, $AX0.H - // 00e0 02df ret -} - - -void 00e1_XorBuffer( .., _LenInDWORDs(_AC1.M)) { - 00e1 191e lrri $AC0.M, @$AR0 - 00e2 191a lrri $AX0.H, @$AR0 - // 00e3 007f 00e8 bloop $AC1.M, 0x00e8 - for (int i = 0; i < AC1.M; i++) { - 00e5 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 00e6 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 00e7 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 00e8 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - } - // 00e9 0000 nop - // 00ea 02df ret -} - - -// --- the disasm looks buggy... AR3 seems to be the destination but it isnt used at all... no idea -// Hm, SL actually is able to use AR3 implicitly. -void 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) -{ - // 00eb 8a00 m2 // All multiplication results are multiplied by 2. - // 00ec 157f lsr $ACC1, #-1 //_size/2 - 00ed 1c20 mrr $AR1, $AR0 - 00ee 1c03 mrr $AR0, $AR3 // 'sl stores to AR0 - - // SW pipelineing strikes again... - 00ef 193a lrri $AX0.H, @$AR1 - 00f0 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 - 00f1 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 - // 00f2 007f 00f7 bloop $AC1.M, 0x00f7 - for (int i = 0; i < _size/2; i++) { - AX0.H = *AR1; - PROD = * - // 00f4 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - // 00f5 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - // 00f6 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - // 00f7 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - ACC0 += AX1 - AX0.H = *AR1; - *(AR3++) = AC0.M; - ACC0 = PROD; - PROD = AX0.L * AX0.H; - ... - } - - // In simplified form: - AR1 = AR0; - AR0 = AR3; - for (int i = 0; i < _size; i++) { - *AR0 = ((*AR0 << 16) + *AR1 * Factor) >> 16); - } - - // 00f8 8b00 m0 // Restore multiplication results. - // 00f9 02df ret -} - -void 00fa_BufferMultiply(src($AR0), dst($AR3), count($AC1.M), $mult($AX0.L)) -{ - //00fa 8a00 m2 - 00fb 191a lrri $AX0.H, @$AR0 - 00fc 9050 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR0 - 00fd 9250 mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 00fe 005f loop $AC1.M - 00ff 92a0 mulmvz'ls $AX0.L, $AX0.H, $ACC0 : $AX0.H, $AC0.M - - //0100 8b00 m0 - //0101 02df ret -} - - - // Clears the 0d00 and 0d60 buffers, plus a lot of other intermediate buffers. - // Also does some other things. -void 0102_PrepareFrameBuffers() - { - // 0102 8100 clr $ACC0 - // 0103 8900 clr $ACC1 - // 0104 0e50 lris $AC0.M, #0x50 - ACC0 = 0 - ACC1 = 0 - AC0.M = 0x50 - - // 0105 0080 0d00 lri $AR0, #0x0d00 - // 0107 005e loop $AC0.M - // 0108 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0d00++ = 0x00 - - // 0109 0080 0d60 lri $AR0, #0x0d60 - // 010b 005e loop $AC0.M - // 010c 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0d60++ = 0x00 - - // 10d 02bf 0e3f call 0x0e3f - - // This one adds and multiplies buffers together. Maybe surround or reverb stuff. - 0e3f_DolbyMixdown() - - // 010f 8100 clr $ACC0 - // 0110 8900 clr $ACC1 - // 0111 0e50 lris $AC0.M, #0x50 - ACC0 = 0 - ACC1 = 0 - AC0.M = 0x50 - - // 0112 0080 0ca0 lri $AR0, #0x0ca0 - // 0114 005e loop $AC0.M - // 0115 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0ca0++ = 0x00 - - // 0116 0080 0f40 lri $AR0, #0x0f40 - // 0118 005e loop $AC0.M - // 0119 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0f40++ = 0x00 - - // 011a 0080 0fa0 lri $AR0, #0x0fa0 - // 011c 005e loop $AC0.M - // 011d 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0fa0++ = 0x00 - - // 011e 0080 0a00 lri $AR0, #0x0a00 - // 0120 005e loop $AC0.M - // 0121 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x0a00++ = 0x00 - - // 0122 0080 09a0 lri $AR0, #0x09a0 - // 0124 005e loop $AC0.M - // 0125 1b1f srri @$AR0, $AC1.M - for (int i=0; i<0x50; i++) - *0x09a0++ = 0x00 - - // 0126 02df ret -} - - -void 0127_Unk() { - 0127 00c0 03a0 lr $AR0, @0x03a0 - 0129 191a lrri $AX0.H, @$AR0 - 012a 00df 03a1 lr $AC1.M, @0x03a1 - 012c 009b 00a0 lri $AX1.H, #0x00a0 - 012e 0081 0393 lri $AR1, #0x0393 - 0130 18bc lrrd $AC0.L, @$AR1 - 0131 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 0132 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0133 0080 0050 lri $AR0, #0x0050 - 0135 0508 addis $ACC1, #0x08 - 0136 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - // 0525_CopyRAMtoDMEM(... ,.. , 0x50) - - // 0138 00de 0390 lr $AC0.M, @0x0390 - // 013a 02a0 0001 andf $AC0.M, #0x0001 - // 013c 029d 0145 jlz 0x0145 - if (*0x0390 & 1) { - 013e 0080 0398 lri $AR0, #0x0398 - 0140 0e08 lris $AC0.M, #0x08 - 0141 00c1 03a1 lr $AR1, @0x03a1 - 0143 02bf 0b2e call 0x0b2e // 0b2e_Unk_Multiply - } - 0145 0f50 lris $AC1.M, #0x50 - 0146 00c0 03a1 lr $AR0, @0x03a1 - 0148 00da 0394 lr $AX0.H, @0x0394 - // 014a 8600 tstaxh $AX0.H - // 014b 0295 0152 jz 0x0152 - if (*0x0394 != 0) { - 014d 1c7a mrr $AR3, $AX0.H - 014e 00d8 0395 lr $AX0.L, @0x0395 - 0150 02bf 00eb call 0x00eb // 00eb_Unk_BufferMultAddToDest - } - 0152 0f50 lris $AC1.M, #0x50 - 0153 00c0 03a1 lr $AR0, @0x03a1 - 0155 00da 0396 lr $AX0.H, @0x0396 - 0157 8600 tstaxh $AX0.H - 0158 0295 015f jz 0x015f - 015a 1c7a mrr $AR3, $AX0.H - 015b 00d8 0397 lr $AX0.L, @0x0397 - 015d 02bf 00eb call 0x00eb // 00eb_Unk_BufferMultAddToDest - - // 015f 00de 0390 lr $AC0.M, @0x0390 - // 0161 02a0 0002 andf $AC0.M, #0x0002 - // 0163 02dd retlz - if (*0x390 & 2) - return; - - 0164 0080 0398 lri $AR0, #0x0398 - 0166 0e08 lris $AC0.M, #0x08 - 0167 00c1 03a1 lr $AR1, @0x03a1 - 0169 02bf 0b2e call 0x0b2e // 0b2e_Unk_Multiply - 016b 02df ret -} - - -// Looks similar to something else... -void 016c_Unk_SetupMemAt_0c00() -{ - 016c 8900 clr $ACC1 - - // 016d 009f 0dc0 lri $AC1.M, #0x0dc0 - // 016f 00ff 03a1 sr @0x03a1, $AC1.M - *0x03a1 = 0x0dc0; - // 0171 009f 03a8 lri $AC1.M, #0x03a8 - // 0173 00ff 03a2 sr @0x03a2, $AC1.M - *0x03a2 = 0x03a8; - // 0175 009f 03a4 lri $AC1.M, #0x03a4 - // 0177 00ff 03a0 sr @0x03a0, $AC1.M - *0x03a0 = 0x03a4; - - // Dangerous bloopi! It points to the SECOND HALF of a 2-word instruction so - // a naive check won't catch it! I think our current code does, though. - - // 0179 1104 019f bloopi #0x04, 0x019f - for (int i = 0; i < 4; i++) { - // 017b 00c0 03a2 lr $AR0, @0x03a2 - // 017d 0083 0390 lri $AR3, #0x0390 - // 017f 0f0e lris $AC1.M, #0x0e - // 0180 02bf 00da call 0x00da - 00da_CopyBuffer(@0x03a2, 0x0390, 0x0e) - - 0182 00da 0390 lr $AX0.H, @0x0390 - 0184 8600 tstaxh $AX0.H - 0185 0295 0191 jz 0x0191 - if (*0x0390) { - 0187 00df 03a1 lr $AC1.M, @0x03a1 - 0189 1c7f mrr $AR3, $AC1.M - 018a 0550 addis $ACC1, #0x50 - - // 018b 1c1f mrr $AR0, $AC1.M - // 018c 0f06 lris $AC1.M, #0x06 - // 018d 02bf 00da call 0x00da - 00da_CopyBuffer($AC1.M, $AR3, 0x06); - - // 018f 02bf 0127 call 0x0127 - 0127_Unk(); - } - // 0191 00de 03a2 lr $AC0.M, @0x03a2 - // 0193 0410 addis $ACC0, #0x10 - // 0194 00fe 03a2 sr @0x03a2, $AC0.M - (*0x03a2) += 0x10; - - // 0196 00de 03a1 lr $AC0.M, @0x03a1 - // 0198 0460 addis $ACC0, #0x60 - // 0199 00fe 03a1 sr @0x03a1, $AC0.M - (*0x03a1) += 0x60; - - // 019b 00de 03a0 lr $AC0.M, @0x03a0 - // 019d 7400 incm $AC0.M - // 019e 00fe 03a0 sr @0x03a0, $AC0.M - (*0x0ea0)++; - } - - // 01a0 0f50 lris $AC1.M, #0x50 - // 01a1 0080 0c00 lri $AR0, #0x0c00 - // 01a3 0083 0e80 lri $AR3, #0x0e80 - // 01a5 0098 7fff lri $AX0.L, #0x7fff - // 01a7 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src(0x0c00), _Dest(0x0e80), _size(0x50), _factor(0x7fff)) - - // 01a9 0f50 lris $AC1.M, #0x50 - // 01aa 0080 0c00 lri $AR0, #0x0c00 - // 01ac 0083 0ee0 lri $AR3, #0x0ee0 - // 01ae 0098 b820 lri $AX0.L, #0xb820 - // 01b0 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src(0x0c00), _Dest(0x0ee0), _size(0x50), _factor(0xb820)) - - // 01b2 0f28 lris $AC1.M, #0x28 - // 01b3 0080 0c78 lri $AR0, #0x0c78 - // 01b5 0083 0e80 lri $AR3, #0x0e80 - // 01b7 0098 b820 lri $AX0.L, #0xb820 - // 01b9 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src(0x0c78), _Dest(0x0e80), _size(0x28), _factor(0xb820)) - // 01bb 0f28 lris $AC1.M, #0x28 - // 01bc 0080 0c78 lri $AR0, #0x0c78 - // 01be 0083 0ee0 lri $AR3, #0x0ee0 - // 01c0 0098 7fff lri $AX0.L, #0x7fff - // 01c2 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src(0x0c78), _Dest(0x0e80), _size(0x28), _factor(0x7fff)) - - // Zero the temporary buffers 0x0c00 and 0x0c50 - 01c4 8100 clr $ACC0 - 01c5 8900 clr $ACC1 - 01c6 0e50 lris $AC0.M, #0x50 - 01c7 0080 0c00 lri $AR0, #0x0c00 - 01c9 005e loop $AC0.M - 01ca 1b1f srri @$AR0, $AC1.M - 01cb 0080 0c50 lri $AR0, #0x0c50 - 01cd 005e loop $AC0.M - 01ce 1b1f srri @$AR0, $AC1.M - - // 01cf 02df ret -} - -void 01d0_Unk() { - // 01d0 00c0 03a0 lr $AR0, @0x03a0 - // 01d2 181a lrr $AX0.H, @$AR0 - AX0.H = *0x03a0; - - // 01d3 8100 clr $ACC0 - // 01d4 181e lrr $AC0.M, @$AR0 - AC0.M = *0x03a0; - - // 01d5 00db 0391 lr $AX1.H, @0x0391 - AX1.H = *0x0391; - - // 01d7 7400 incm $AC0.M - AC0.M++; - - // 01d8 d100 cmpar $ACC1, $AX0.H - // 01d9 0270 ifge - if (ACC1 - AX0.H >= 0) { - 01da 8100 clr $ACC0 - } - - 01db 1b1e srri @$AR0, $AC0.M - 01dc 00df 03a1 lr $AC1.M, @0x03a1 - 01de 009b 00a0 lri $AX1.H, #0x00a0 - 01e0 0081 0393 lri $AR1, #0x0393 - 01e2 18bc lrrd $AC0.L, @$AR1 - 01e3 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 01e4 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - - // 01e5 0080 0050 lri $AR0, #0x0050 - // 01e7 02bf 0532 call 0x0532 - 0532_DMEMtoRAM(_DMEM(AC1.M), _pMemAddr(ACC0), 0x50) - - 01e9 02df ret -} - -void 01ea_Unk() { - 01ea 8900 clr $ACC1 - // 01eb 0f28 lris $AC1.M, #0x28 // half of 0x50 - // 01ec 0080 0c50 lri $AR0, #0x0c50 - // 01ee 0083 0ea8 lri $AR3, #0x0ea8 - // 01f0 0098 b820 lri $AX0.L, #0xb820 - // 01f2 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - 01f4 8900 clr $ACC1 - // 01f5 0f28 lris $AC1.M, #0x28 - // 01f6 0080 0c50 lri $AR0, #0x0c50 - // 01f8 0083 0f08 lri $AR3, #0x0f08 - // 01fa 0098 7fff lri $AX0.L, #0x7fff - // 01fc 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - - // 01fe 009f 0dc0 lri $AC1.M, #0x0dc0 - // 0200 00ff 03a1 sr @0x03a1, $AC1.M - // 0202 009f 03a8 lri $AC1.M, #0x03a8 - // 0204 00ff 03a2 sr @0x03a2, $AC1.M - // 0206 009f 03a4 lri $AC1.M, #0x03a4 - // 0208 00ff 03a0 sr @0x03a0, $AC1.M - (*0x03a1) = 0x0dc0; - (*0x03a2) = 0x03a8; - (*0x03a0) = 0x03a4; - - // Dangerous bloopi! It points to the SECOND HALF of a 2-word instruction so - // a naive check won't catch it! I think our current code does, though. - - // 020a 1104 0228 bloopi #0x04, 0x0228 - for (int i = 0; i < 4; i++) { - // 020c 00c0 03a2 lr $AR0, @0x03a2 - // 020e 0083 0390 lri $AR3, #0x0390 - // 0210 0f0e lris $AC1.M, #0x0e - // 0211 02bf 00da call 0x00da - 00da_CopyBuffer(_src(*0x03a2), _dest(0x0390), _LenInDWORDs(0xE)) - - // 0213 00da 0390 lr $AX0.H, @0x0390 - // 0215 8600 tstaxh $AX0.H - // 0216 0295 021a jz 0x021a - if (*0x0390) { - // 0218 02bf 01d0 call 0x01d0 - - // Copy some buffer to RAM? - 01d0_Unk(); - } - - // 021a 00de 03a2 lr $AC0.M, @0x03a2 - // 021c 0410 addis $ACC0, #0x10 - // 021d 00fe 03a2 sr @0x03a2, $AC0.M - (*0x03a2) += 0x10; - - // 021f 00de 03a1 lr $AC0.M, @0x03a1 - // 0221 0460 addis $ACC0, #0x60 - // 0222 00fe 03a1 sr @0x03a1, $AC0.M - (*0x03a1) += 0x60; - - // 0224 00de 03a0 lr $AC0.M, @0x03a0 - // 0226 7400 incm $AC0.M - // 0227 00fe 03a0 sr @0x03a0, $AC0.M - (*0x03a0)++; - } - 0229 02df ret -} - - -void 022a_Copy_XXX_From_RAM_To_0x03a8() -{ - // 022a 0081 0386 lri $AR1, #0x0386 - // 022c 009f 03a8 lri $AC1.M, #0x03a8 - // 022e 0080 0040 lri $AR0, #0x0040 - // 0230 02bf 0523 call 0x0523 - 0523_CopyRAMtoDMEM(0x0386, 0x03a8, 0x0040); - - // 0232 02df ret -} - - -void 0233_Increase_32BitAddress_InMem(_MemAddr(AR0), _Bytes(AX0.L)) -{ - // 0233 191e lrri $AC0.M, @$AR0 - // 0234 189c lrrd $AC0.L, @$AR0 - // 0235 4800 addax $ACC0, $AX0 - // 0236 1b1e srri @$AR0, $AC0.M - // 0237 1b1c srri @$AR0, $AC0.L - - *((u32*)AR0) += AX0 - - // 0238 02df ret -} - - -void 0239_WaitUntilLastFrameGotSynced() -{ - // 0239 8100 clr $ACC0 - // 023a 8900 clr $ACC1 - // 023b 00df 0354 lr $AC1.M, @0x0354 - // 023d 00de 034e lr $AC0.M, @0x034e - // 023f 8200 cmp - // 0240 0293 0239 jle 0x0239 // loop - do { - - } while (*0x0354 > *0x034e); // TODO: CHECK - - // 0242 02df ret -} - -///////////////////////// -// -// -// 0x0341: Number of Frames to render ... - -// 0x034c + 0x034d: RAM address of the current PB block - -// 0x034e: Last Sync message for rendered frame -// 0x0354: PB loop counter - -// 0x0355: Current Frame - -// 0x0380: ??? -// 0x0381: ??? - -// 0x0388: RAM Address of Output Buffer1 -// 0x038a: RAM Address of Output Buffer2 -// -// 0x038f: Output Buffer Address (0x0520 most of the time) -// -// 0x03f8: *0x0433 -// 0x0520: Some kind of sample buffer - -// 0x0d00: Left mix buffer -// 0x0d60: Right mix buffer - -void 0243_COMMAND_02() // sync frame -{ - // 0243 0080 0388 lri $AR0, #0x0388 - // 0245 0081 0067 lri $AR1, #0x0067 - // 0247 0e02 lris $AC0.M, #0x02 - // 0248 173f callr $AR1 - 0067_CopyCommand(0x0388, 0x02); - - // 0249 00de 0344 lr $AC0.M, @0x0344 - // 024b 00fe 0341 sr @0x0341, $AC0.M - *0x0341 = *0x0344; - - // 024d 00de 0345 lr $AC0.M, @0x0345 - // 024f 00fe 038e sr @0x038e, $AC0.M - *0x038e = *0x0345; - - // 0251 8100 clr $ACC0 - // 0252 00fe 0355 sr @0x0355, $AC0.M - *0x0355 = 0x00; - - // 0254 02bf 022a call 0x022a - 022a_Copy_XXX_From_RAM_To_0x03a8(); // perhaps an PB ?? - - // 0256 02bf 05a4 call 0x05a4 - 05A4_ResetAccelerator(); - - - // 0258 00de 0341 lr $AC0.M, @0x0341 - // 025a 007e 0418 bloop $AC0.M, 0x0418 - - // Frame size is 0xa0 * *0x0341 - for (int j=0; j< *0x0341; j++) // 0x0341 = high part of the (command & 0xFF) ... perhaps number of frames to render?? - { - // 025c 02bf 0102 call 0x0102 - 0102_PrepareFrameBuffers(); - - // 025e 02bf 016c call 0x016c - 016c_Unk_SetupMemAt_0c00(); - - // 0260 02bf 095f call 0x095f - 095f_Unk_SetupMemAt0_0180(); - - // 0262 00de 0355 lr $AC0.M, @0x0355 - // 0264 7400 incm $AC0.M - // 0265 00fe 0355 sr @0x0355, $AC0.M - (*0x0355)++; - - // 0267 8100 clr $ACC0 - // 0268 00fe 0354 sr @0x0354, $AC0.M - *0x0354 = 0; // PB counter - - // 026a 00de 0342 lr $AC0.M, @0x0342 - // 026c 007e 03c0 bloop $AC0.M, 0x03c0 - for (int i=0; i<*0x0342; i++) // 0x0342 - low part of the DSetupTable Command. Number of PBs? - { - // 026e 02bf 0239 call 0x0239 - 0239_WaitUntilLastFrameGotSynced(); - - // 0270 8100 clr $ACC0 - // 0271 8900 clr $ACC1 - ACC0 = 0; - ACC1 = 0; - - // this block is for masking out PBs... the lower part of the sync messages are updating this mask - // but i am not 100 percent sure how it works - { - // 0272 00de 0354 lr $AC0.M, @0x0354 - // 0274 147c lsr $ACC0, #-4 - // 0275 0200 04fc addi $AC0.M, #0x04fc - // 0277 1c1e mrr $AR0, $AC0.M - AC0.M = *0x0354 >> 4; - AR0 = AC0.M + 0x04fc; - - 0278 181f lrr $AC1.M, @$AR0 - 0279 00de 0354 lr $AC0.M, @0x0354 - 027b 0240 000f andi $AC0.M, #0x000f - // 027d 3d80 lsrnr - ACC1 <<= ACC0 - - 027e 03c0 8000 andcf $AC1.M, #0x8000 - // 0280 029c 03bc jlnz 0x03bc - GOTO NEXT_BLOCK: - } - - // 0282 00d8 0354 lr $AX0.L, @0x0354 - // 0284 009a 0180 lri $AX0.H, #0x0180 - // 0286 8100 clr $ACC0 - // 0287 00de 0380 lr $AC0.M, @0x0380 - // 0289 00dc 0381 lr $AC0.L, @0x0381 - // 028b 9000 mul $AX0.L, $AX0.H - // 028c 9400 mulac $AX0.L, $AX0.H, $ACC0 - // 028d 00fe 034c sr @0x034c, $AC0.M - // 028f 00fc 034d sr @0x034d, $AC0.L - AX0.L = *0x0354 // number of rendered frames - AX0.H = 0x0180 // PB Size with dummy buffer - ACC0 = (*0x0380 << 16) | *0x0381 - ACC0 += AX0.L * AX0.H - - // Compute the RAM address of the current PB. - *0x034C = AC0.M - *0x034D = AC0.L - - // Copy the current PB to 0x400, so we can access it from DSP code. - // 0291 02bf 00c1 call 0x00c1 - 00c1_CopyPBToDMEM() - - // 0293 00da 0400 lr $AX0.H, @0x0400 - // 0295 8600 tstaxh $AX0.H - // 0296 0295 03bc jz 0x03bc - if (*0x0400 == 0x00) - GOTO NEXT_BLOCK: - - // 0298 00da 0401 lr $AX0.H, @0x0401 - // 029a 8600 tstaxh $AX0.H - // 029b 0294 03bc jnz 0x03bc - if (*0x0401 != 0x00) - GOTO NEXT_BLOCK: - - // 029d 00da 0433 lr $AX0.H, @0x0433 - // 029f 00fa 03f8 sr @0x03f8, $AX0.H - *0x03f8 = *0x0433 - - // 02a1 00da 0406 lr $AX0.H, @0x0406 - // 02a3 8600 tstaxh $AX0.H - // 02a4 0294 0dff jnz 0x0dff - if (*0x0406 != 0x00) - { - // The Code at 0x0dff sets the value from *0x0433 to 0x50 shorts at 0x0520. - // Then it JMPs to ContinueWithBlock. - 0dff_Zero520_50(). - } - else - { - // 02a6 8100 clr $ACC0 - // 02a7 00de 0480 lr $AC0.M, @0x0480 - // 02a9 0609 cmpis $ACC0, #0x09 - // 02aa 0295 02bd jz 0x02bd - // 02ac 0605 cmpis $ACC0, #0x05 - // 02ad 0295 02bd jz 0x02bd - // 02af 0608 cmpis $ACC0, #0x08 - // 02b0 0295 098f jz 0x098f - // 02b2 0610 cmpis $ACC0, #0x10 - // 02b3 0295 0a14 jz 0x0a14 - // 02b5 0620 cmpis $ACC0, #0x20 - // 02b6 0295 0a9a jz 0x0a9a - // 02b8 0621 cmpis $ACC0, #0x21 - // 02b9 0295 0aa2 jz 0x0aa2 - // 02bb 029f 087c jmp 0x087c - - switch(*0x0480) - { - case 0x05: - case 0x09: GOTO 02BD: - case 0x08: GOTO 098f: - case 0x10: GOTO 0a14: - case 0x20: GOTO 0a9a: - case 0x21: GOTO 0aa2: - default: GOTO 087C: - } - - // This is the common decoding prep for 0x05 and 0x09. - - // 02bd 00d8 0402 lr $AX0.L, @0x0402 // delta? - // 02bf 8100 clr $ACC0 - // 02c0 8900 clr $ACC1 - // 02c1 00dc 0430 lr $AC0.L, @0x0430 // current fraction? - // 02c3 8d00 set15 // unsigned multiplication - // 02c4 0950 lris $AX1.L, #0x50 - // 02c5 a000 mulx $AX0.L, $AX1.L - // 02c6 a400 mulxac $AX0.L, $AX1.L, $ACC0 - // 02c7 1404 lsl $ACC0, #4 - // 02c8 8c00 clr15 - - // 0x0402 is delta ("Ratio"). - // Is this a computation of the starting point for decoding? - // If so 0x430 is the current sample position fraction and - AX0.L = *0x0402 - ACC0 = *0x430 + (AX0.L * 0x50) - ACC0 >>= 4 - - // 02c9 1ffe mrr $AC1.M, $AC0.M - // 02ca 0083 0580 lri $AR3, #0x0580 - // 02cc 02bf 073d call 0x073d - - // AC1.M here is ACC0.M! Effectively a shift right 16. The above fraction stuff seems to make sense. - 073d_DECODE_0x05_0x09(0x0580, AC1.M, 0x50) - - // NOP jump here. - // 02ce 029f 02d0 jmp 0x02d0 - - Resample_From0580To0520: - // 02d0 0080 0580 lri $AR0, #0x0580 - // 02d2 0081 0520 lri $AR1, #0x0520 - // 02d4 0099 0000 lri $AX1.L, #0x0000 - // 02d6 02bf 0d7f call 0x0d7f - 0d7f_ResampleAudioData(0x0580, 0x0520, 0x0000); - } - - // A block of audio is now present at 0x520. - - ContinueWithBlock: - // Apply various per-voice effects. - - // First up, a trivial in-place filter, if $0x04a8 is set. - - // 02d8 00da 04a8 lr $AX0.H, @0x04a8 - // 02da 8600 tstaxh $AX0.H - // 02db 0295 02e1 jz 0x02e1 - // 02dd 0080 0520 lri $AR0, #0x0520 - // 02df 02bf 0c84 call 0x0c84 - if (0x04a8 != 0) - void 0c84_FilterBufferInPlace(_sampleAddr($AR0), multiplier($AX0.H)) - - // 02e1 009e 0520 lri $AC0.M, #0x0520 - // 02e3 00fe 038f sr @0x038f, $AC0.M - *0x038f = 0x0520 - - // 02e5 8900 clr $ACC1 - // 02e6 00df 0484 lr $AC1.M, @0x0484 - // 02e8 0340 001f andi $AC1.M, #0x001f - // 02ea b900 tst $ACC1 - // 02eb 0295 0311 jz 0x0311 - if ((*0x0484 & 0x1f) != 0x00) - { - // 02ed 00de 038f lr $AC0.M, @0x038f - // 02ef 5c00 sub $ACC0, $ACC1 - // 02f0 00fe 038f sr @0x038f, $AC0.M - (*0x038f) -= AC1.M; - - // 02f2 1c7e mrr $AR3, $AC0.M - // 02f3 0080 0440 lri $AR0, #0x0440 - // 02f5 05fe addis $ACC1, #0xfe - // 02f6 02bf 00da call 0x00da - 00da_CopyBuffer(0x0440, (*0x038f), (*0x0484) + 0xfe) - - // 02f8 0080 0490 lri $AR0, #0x0490 - // 02fa 00c1 038f lr $AR1, @0x038f - // 02fc 8900 clr $ACC1 - // 02fd 00df 0484 lr $AC1.M, @0x0484 - // 02ff 0340 001f andi $AC1.M, #0x001f - // 0301 02bf 0b4d call 0x0b4d - 0b4d_IIR_Filter(In(0x0490), Out(*0x038f), FilterLength(*0x0484 & 0x1f)) - - 0303 00de 038f lr $AC0.M, @0x038f - 0305 0450 addis $ACC0, #0x50 - 0306 1c1e mrr $AR0, $AC0.M - // 0307 0083 0440 lri $AR3, #0x0440 - 0309 8900 clr $ACC1 - 030a 00df 0484 lr $AC1.M, @0x0484 - 030c 0340 001f andi $AC1.M, #0x001f - 030e 05fe addis $ACC1, #0xfe - // 030f 02bf 00da call 0x00da - 00da_CopyBuffer(, 0x0440) - } - - // 0311 00de 0484 lr $AC0.M, @0x0484 - // 0313 0240 0020 andi $AC0.M, #0x0020 - // 0315 0295 0333 jz 0x0333 - if ((*0x0484 & 0x0020) != 0) - { - 0317 0080 04a4 lri $AR0, #0x04a4 - 0319 00c1 038f lr $AR1, @0x038f - 031b 0082 0454 lri $AR2, #0x0454 - 031d 0083 04a7 lri $AR3, #0x04a7 - - // 031f 18fa lrrd $AX0.H, @$AR3 - // 0320 8600 tstaxh $AX0.H - // 0321 0294 0331 jnz 0x0331 - if (!*0x04a7) { - // 0323 18fa lrrd $AX0.H, @$AR3 - // 0324 8600 tstaxh $AX0.H - // 0325 0294 0331 jnz 0x0331 - if (!*0x04a6) { - // 0327 18fa lrrd $AX0.H, @$AR3 - // 0328 8600 tstaxh $AX0.H - // 0329 0294 0331 jnz 0x0331 - if (!*0x04a5) { - // 032b 8100 clr $ACC0 - // 032c 18fe lrrd $AC0.M, @$AR3 - // 032d 0280 7fff cmpi $AC0.M, #0x7fff - // 032f 0295 0333 jz 0x0333 - if (*0x04a4 != 0x7FFF) { - // 0331 02bf 0b68 call 0x0b68 - 0b68_4TapFIR(InBuffer($AR2), FilterBuffer($AR0), OutBuffer($AR1)); - } - } - } - } - } - - // Check volume mode, apply volume as appropriate - - // 0333 8100 clr $ACC0 - // 0334 00de 042c lr $AC0.M, @0x042c - // 0336 b100 tst $ACC0 - // 0337 0295 033d jz 0x033d - - if (*0x042c != 0) // Volume mode != 0 - { - // 0339 02bf 0cd3 call 0x0cd3 - // 033b 029f 03b2 jmp 0x03b2 - 0cd3_VolumeMixer1() // The complex one, probably with surround and stuff - } - else - { - // Volume mode == 0 - simple(r) volumes - // 033d 8100 clr $ACC0 - // 033e 1c9e mrr $IX0, $AC0.M - // 033f 1cde mrr $IX2, $AC0.M - // 0340 7400 incm $AC0.M - // 0341 1cfe mrr $IX3, $AC0.M - // 0342 8100 clr $ACC0 - $IX0 = 0; - $IX2 = 0; - $IX3 = 1; - - // 0343 00de 0407 lr $AC0.M, @0x0407 - // 0345 b100 tst $ACC0 - // 0346 0295 0355 jz 0x0355 - if (*0x0407 != 0) // Unknown, in zelda always 0x10, apparently. - { - // Seems like this all boils down to a backwards copy of - // 0x0470-0x0477 to *(*(0x038f)); - // Is that where we save samples in the PB, so that filters - // have something to read from at the start of each block? - - // 0348 00c3 038f lr $AR3, @0x038f - // 034a 0007 dar $AR3 - $AR3 = *(0x038f) - 1; - // 034b 0080 0477 lri $AR0, #0x0477 - // 034d 0084 ffff lri $IX0, #0xffff - // 034f 0087 ffff lri $IX3, #0xffff - $AR0 = 0x477; - $IX0 = -1; - $IX3 = -1; - // 0351 199a lrrn $AX0.H, @$AR0 - AX0.H = *$AR0; - AR0 += IX0; - - // 0352 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - $ACC1 = $AX0.H; - $AX0.H = *$AR0; - $AR0 += IX0; - // 0353 005e loop $AC0.M - for (int i = 0; i < AC0.M; i++) { - 0354 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - } - } - - // 0355 00da 0485 lr $AX0.H, @0x0485 - // 0357 8600 tstaxh $AX0.H - // 0358 0295 036b jz 0x036b - if (*0x0485 != 0) - { - 035a 8900 clr $ACC1 - 035b 0086 0005 lri $IX2, #0x0005 // 5 - 1 = 4, see loop - 035d 0082 040a lri $AR2, #0x040a - // 035f 1106 0363 bloopi #0x06, 0x0363 - - // Store half of every 4th value from 0x040a onwards in the position before. (!!!!) - // This really doesn't make a lot of sense. - // At the same time, keep their sum in ACC1. - for (int i = 0; i < 0x6; i++) { - // 0361 18de lrrd $AC0.M, @$AR2 - // 0362 147f lsr $ACC0, #-1 - // 0363 4d36 add'sn $ACC1, $ACC0 : @$AR2, $AC0.M - $AC0.M = *$AR2 >> 1; - $AR2--; - $ACC1 += $ACC0; - *$AR2 = $ACC0; - $AR2 += 5; - } - // 0364 b900 tst $ACC1 - // 0365 0294 036b jnz 0x036b - - // Volume has dropped to 0 on all channels, stop sound? - if (sum == 0) { - // 0367 009a 0001 lri $AX0.H, #0x0001 - // 0369 00fa 0401 sr @0x0401, $AX0.H // Write 1 to KeyOff. - } - } - - // 036b 8f00 set40 - // 036c 0086 0002 lri $IX2, #0x0002 - // 036e 0082 0408 lri $AR2, #0x0408 - $IX2 = 0x0002; - $AR2 = 0x0408; - - // Volume data starts at 0x0408, it's like this: - // 1 word controls sbset #0x00 apparently - // 2 volume values - // 1 other word. - - // 0370 1106 039b bloopi #0x06, 0x039b - for (int i = 0; i < 6; i++) - { - // 0372 8100 clr $ACC0 - // 0373 195e lrri $AC0.M, @$AR2 - // 0374 1200 sbclr #0x00 // W T F??? - // 0375 b100 tst $ACC0 - // 0376 0275 ifz - // 0377 1300 sbset #0x00 - // sbset #0x00 is logic zero ... we use it to store a bit here. see 0394 - if (*$AR2 == 0) { - sbset #0x00 - } else { - sbclr #0x00 - } - - 0378 1c7e mrr $AR3, $AC0.M - - 0379 195e lrri $AC0.M, @$AR2 // Load the two volume values - 037a 195f lrri $AC1.M, @$AR2 - - // 037b 5c00 sub $ACC0, $ACC1 // Subtract them - find volume delta? - // 037c 14fb asr $ACC0, #-5 - // 037d 1f5e mrr $AX0.H, $AC0.M - // 037e 1f1c mrr $AX0.L, $AC0.L - $AX0 = (vol1 - vol2) >> 5; // 32 steps .. - - // Read the value after the volumes. - - // 037f 185e lrr $AC0.M, @$AR2 - // 0380 0240 00ff andi $AC0.M, #0x00ff - // 0382 1f7e mrr $AX1.H, $AC0.M - $AX1.H = *$AR2 & 0xFF; - - // 0383 185e lrr $AC0.M, @$AR2 - // 0384 1478 lsr $ACC0, #-8 - // 0385 009c 0000 lri $AC0.L, #0x0000 - $AC0.M = *$AR2 >> 8; - - // ACC1 is here the second volume. Compare to delta. - // Adjust *$AR2 for some reason accordingly... - - // 0387 d100 cmpar $ACC1, $AX0.H - // 0388 0295 0390 jz 0x0390 - // 038a 185e lrr $AC0.M, @$AR2 - // 038b 0272 ifg - // 038c 7400 incm $AC0.M - // 038d 0271 ifl - // 038e 7800 decm $AC0.M - // 038f 1a5e srr @$AR2, $AC0.M - if ($ACC1 < $AX0.H) { - (*$AR2)--; - } else if ($ACC1 > $AX0.H) { - (*$AR2)++ - } - - // 0390 0006 dar $AR2 - $AR2--; - - // $AR2 again points at the second volume. - - 0391 00de 038f lr $AC0.M, @0x038f - - // Per channel mini-delay? - 0393 5600 subr $ACC0, $AX1.H // see 0382 - - // Use that stored logic zero bit, to skip mixing if the first word is (or isn't? not sure) 0. - // 0394 029d 0399 jlz 0x0399 - if (!logic zero) { - // 0396 1c1e mrr $AR0, $AC0.M - // 0397 02bf 0ca9 call 0x0ca9 - 0ca9_RampedMultiplyAddBuffer(Volume($ACC1), VolumeDelta($AX0), MultiplierData($AR0), Buffer($AR3)) - } - // 0399 0000 nop - // 039a 1b5f srri @$AR2, $AC1.M - // Update the second volume. - *($AR2++) = $AC1.M; - // 039b 000a iar $AR2 - $AR2++; // Next block of four values. - } - - // 039c 8e00 set16 - - // 039d 8100 clr $ACC0 - // 039e 00de 0407 lr $AC0.M, @0x0407 - // 03a0 b100 tst $ACC0 - // 03a1 0295 03b2 jz 0x03b2 - if (*0x0407 != 0) - { - // Stash away the last bunch of samples into 0x0477 and backwards, - // so that filter kernels and resampler have some previous data to - // read from the next time. - 03a3 00c3 038f lr $AR3, @0x038f - 03a5 0087 004f lri $IX3, #0x004f - 03a7 001f addarn $AR3, $IX3 - 03a8 0080 0477 lri $AR0, #0x0477 - 03aa 0084 ffff lri $IX0, #0xffff - 03ac 0087 ffff lri $IX3, #0xffff - 03ae 19fa lrrn $AX0.H, @$AR3 - 03af 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 03b0 005e loop $AC0.M - 03b1 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - } - } - - // 03b2 00da 0406 lr $AX0.H, @0x0406 - // 03b4 8600 tstaxh $AX0.H - // 03b5 0294 03ba jnz 0x03ba - if (*0x0406 == 0) - { - // 03b7 8100 clr $ACC0 - // 03b8 00fe 0404 sr @0x0404, $AC0.M - *0x0404 = 0x0000 - } - - // 03ba 02bf 00ca call 0x00ca - 00ca_CopyPBToRAM() - - NEXT_BLOCK: - 03bc 00de 0354 lr $AC0.M, @0x0354 - 03be 7400 incm $AC0.M - 03bf 00fe 0354 sr @0x0354, $AC0.M - } - - // Done mixing all voices, sync up with host before the final mixdown. - - // 03c1 0e00 lris $AC0.M, #0x00 - // 03c2 00fe 034e sr @0x034e, $AC0.M - *0x034e = 0x00 - - // 03c4 0e04 lris $AC0.M, #0x04 - // 03c5 02bf 066a call 0x066a - SendMB_DCD1(0x0004) - - // 03c7 00de 0355 lr $AC0.M, @0x0355 - // 03c9 0260 ff00 ori $AC0.M, #0xff00 - // 03cb 02bf 0674 call 0x0674 - SendMB_F355(*0x0355 | 0xFF00) // *0x0355 - current frame - - - // Buffer 0D00 and 0D60 are the final L & R mixing buffers. - - // This is where global effects are applied, and final mixdown is done. - - // 03cd 02bf 0c0a call 0x0c0a - 0c0a_Unk() // Copy 0a00 to 0a60? - - // 03cf 02bf 0c1c call 0x0c1c - 0c1c_ComputeReverbFrom0a60To0a00() // Not sure if this really is reverb but could be. - - // 03d1 02bf 0c71 call 0x0c71 - 0c71_AddBufferA00ToD60AndD00(); // add A00 on top of 0x0D00 and 0x0D60 - - // 03d3 00de 0341 lr $AC0.M, @0x0341 - // 03d5 7800 decm $AC0.M - // 03d6 00fe 0341 sr @0x0341, $AC0.M - - (*0x0341)--; - - // The audio at 09a0 is added to both channels, - // then the channel buffers are copied to RAM. - // For unknown reasons, the audio at 0x0fa0 is ONLY added to the right channel. - - // 03d8 0080 09a0 lri $AR0, #0x09a0 - // 03da 0083 0d00 lri $AR3, #0x0d00 - // 03dc 0f50 lris $AC1.M, #0x50 - // 03dd 0098 5a82 lri $AX0.L, #0x5a82 - // 03df 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(0x09a0, 0x0d00, 0x50, 0x5a82) - - // 03e1 0080 09a0 lri $AR0, #0x09a0 - // 03e3 0083 0d60 lri $AR3, #0x0d60 - // 03e5 0f50 lris $AC1.M, #0x50 - // 03e6 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(0x09a0, 0x0d60, 0x50, 0x5a82) - - // 03e8 0083 0d00 lri $AR3, #0x0d00 - // 03ea 02bf 0cc1 call 0x0cc1 - 0cc1_StrangeORRFilter(0x0d00) - - // 03ec 0081 0388 lri $AR1, #0x0388 - // 03ee 009f 0d00 lri $AC1.M, #0x0d00 - // 03f0 0080 0050 lri $AR0, #0x0050 - // 03f2 02bf 0530 call 0x0530 - 0530_DMEMtoRAM_Ind(0x0d00, 0x0388, 0x050) - - // 03f4 0080 0fa0 lri $AR0, #0x0fa0 - // 03f6 0083 0d60 lri $AR3, #0x0d60 - // 03f8 0f50 lris $AC1.M, #0x50 - // 03f9 0098 8000 lri $AX0.L, #0x8000 - // 03fb 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(0x0fa0, 0x0d60, 0x50, 0x8000) - - // 03fd 0083 0d60 lri $AR3, #0x0d60 - // 03ff 02bf 0cc1 call 0x0cc1 - 0cc1_StrangeORRFilter(0x0d60) - - // 0401 0081 038a lri $AR1, #0x038a - // 0403 009f 0d60 lri $AC1.M, #0x0d60 - // 0405 0080 0050 lri $AR0, #0x0050 - // 0407 02bf 0530 call 0x0530 - 0530_DMEMtoRAM_Ind(0x0d60, 0x038a, 0x050) - - - // Move both RAM output buffer pointers forward, 0xa0 bytes (0x50 samples). - - // 0409 009a 0000 lri $AX0.H, #0x0000 - // 040b 0098 00a0 lri $AX0.L, #0x00a0 - // 040d 0080 0388 lri $AR0, #0x0388 - // 040f 02bf 0233 call 0x0233 - 0233_Increase_32BitAddress_InMem(0x0388, 0xa0) - // 0411 0080 038a lri $AR0, #0x038a - // 0413 02bf 0233 call 0x0233 - 0233_Increase_32BitAddress_InMem(0x038a, 0xa0) - - - // 0415 02bf 01ea call 0x01ea - 01ea_Unk(); - - 0417 0000 nop - 0418 0000 nop - } - - // 0419 0080 002d lri $AR0, #0x002d - // 041b 029f 0603 jmp 0x0603 - 0603_FinalizeFrame(0x02d) -} - -// Command 07 - not seen used. -void 041d_Unk() { - 041d 0080 0346 lri $AR0, #0x0346 - // 041f 02bf 0067 call 0x0067 - 0067_CopyCommand(_destAddr(#0x0346), _loopCount($AC0.M)) - // 0421 02bf 0067 call 0x0067 - 0067_CopyCommand(_destAddr(#0x0346), _loopCount($AC0.M)) - - 0423 0081 0346 lri $AR1, #0x0346 - 0425 193e lrri $AC0.M, @$AR1 - 0426 193c lrri $AC0.L, @$AR1 - 0427 009f 0400 lri $AC1.M, #0x0400 - 0429 00c0 0345 lr $AR0, @0x0345 - 042b 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 042d 0081 0348 lri $AR1, #0x0348 - 042f 193e lrri $AC0.M, @$AR1 - 0430 193c lrri $AC0.L, @$AR1 - 0431 009f 0800 lri $AC1.M, #0x0800 - 0433 00c0 0345 lr $AR0, @0x0345 - 0435 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 0437 0081 0346 lri $AR1, #0x0346 - 0439 193e lrri $AC0.M, @$AR1 - 043a 193c lrri $AC0.L, @$AR1 - 043b 009f 0800 lri $AC1.M, #0x0800 - 043d 00c0 0345 lr $AR0, @0x0345 - 043f 02bf 0532 call 0x0532 - 0441 0081 0348 lri $AR1, #0x0348 - 0443 193e lrri $AC0.M, @$AR1 - 0444 193c lrri $AC0.L, @$AR1 - 0445 009f 0400 lri $AC1.M, #0x0400 - 0447 00c0 0345 lr $AR0, @0x0345 - 0449 02bf 0532 call 0x0532 - 044b 029f 0043 jmp 0x0043 -} - -void 044d_COMMAND_07() -{ - 044d 0080 0346 lri $AR0, #0x0346 - 044f 02bf 0067 call 0x0067 - 0451 02bf 0067 call 0x0067 - 0453 0081 0346 lri $AR1, #0x0346 - 0455 193e lrri $AC0.M, @$AR1 - 0456 193c lrri $AC0.L, @$AR1 - 0457 009f 0400 lri $AC1.M, #0x0400 - 0459 00c0 0345 lr $AR0, @0x0345 - 045b 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 045d 0081 0348 lri $AR1, #0x0348 - 045f 193e lrri $AC0.M, @$AR1 - 0460 193c lrri $AC0.L, @$AR1 - 0461 009f 0400 lri $AC1.M, #0x0400 - 0463 00c0 0345 lr $AR0, @0x0345 - 0465 02bf 0532 call 0x0532 - 0467 029f 0043 jmp 0x0043 -} - -void 0469_COMMAND_06_09() -{ - 0469 0080 0346 lri $AR0, #0x0346 - 046b 02bf 0067 call 0x0067 - 046d 02bf 0067 call 0x0067 - 046f 0081 0346 lri $AR1, #0x0346 - 0471 193e lrri $AC0.M, @$AR1 - 0472 193c lrri $AC0.L, @$AR1 - 0473 009f 0400 lri $AC1.M, #0x0400 - 0475 00c0 0345 lr $AR0, @0x0345 - // 0477 02bf 0555 call 0x0555 // ReadFromMysteryReg - 0555_UnknownReadFromMysteryReg(ARAMAddress(ACC0), DestBuffer(AC1.M), Length(AC0.M)) { - - 0479 0081 0348 lri $AR1, #0x0348 - 047b 193e lrri $AC0.M, @$AR1 - 047c 193c lrri $AC0.L, @$AR1 - 047d 009f 0400 lri $AC1.M, #0x0400 - 047f 00c0 0345 lr $AR0, @0x0345 - 0481 02bf 0532 call 0x0532 - 0483 029f 0043 jmp 0x0043 -} - -void 0485_COMMAND_08() -{ - 0485 0080 0346 lri $AR0, #0x0346 - 0487 02bf 0067 call 0x0067 - 0489 02bf 0067 call 0x0067 - 048b 0081 0346 lri $AR1, #0x0346 - 048d 193e lrri $AC0.M, @$AR1 - 048e 193c lrri $AC0.L, @$AR1 - 048f 009f 0400 lri $AC1.M, #0x0400 - 0491 00c0 0344 lr $AR0, @0x0344 - 0493 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 0495 0081 0348 lri $AR1, #0x0348 - 0497 193e lrri $AC0.M, @$AR1 - 0498 193c lrri $AC0.L, @$AR1 - 0499 009f 0800 lri $AC1.M, #0x0800 - 049b 00c0 0344 lr $AR0, @0x0344 - 049d 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 049f 0080 0400 lri $AR0, #0x0400 - 04a1 0083 0800 lri $AR3, #0x0800 - 04a3 0084 0000 lri $IX0, #0x0000 - 04a5 00da 0345 lr $AX0.H, @0x0345 - 04a7 00df 0344 lr $AC1.M, @0x0344 - 04a9 8f00 set40 - 04aa 197b lrri $AX1.H, @$AR3 - 04ab b800 mulx $AX0.H, $AX1.H - 04ac 197b lrri $AX1.H, @$AR3 - 04ad 007f 04b2 bloop $AC1.M, 0x04b2 - 04af 199e lrrn $AC0.M, @$AR0 - 04b0 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 04b1 80b2 nx'sl : $AC0.M, $AX1.H - 04b2 0000 nop - 04b3 8e00 set16 - 04b4 0081 0346 lri $AR1, #0x0346 - 04b6 193e lrri $AC0.M, @$AR1 - 04b7 193c lrri $AC0.L, @$AR1 - 04b8 009f 0400 lri $AC1.M, #0x0400 - 04ba 00c0 0344 lr $AR0, @0x0344 - 04bc 02bf 0532 call 0x0532 - 04be 029f 0043 jmp 0x0043 -} - - -// Zeroes 256 words @ 0x0b00, calls 0x0573 -void 04c0_UnknownInit() -{ - 04c0 0092 00ff lri $CR, #0x00ff - 04c2 8100 clr $ACC0 - 04c3 0080 0b00 lri $AR0, #0x0b00 - 04c5 10ff loopi #0xff - 04c6 1b1e srri @$AR0, $AC0.M - 04c7 1b1e srri @$AR0, $AC0.M - 04c8 8100 clr $ACC0 - 04c9 009f 0b00 lri $AC1.M, #0x0b00 - 04cb 0080 0100 lri $AR0, #0x0100 - 04cd 02bf 0573 call 0x0573 - - 04cf 02df ret -} - - -void 04d0_Unk() { - // 04d0 02bf 04e1 call 0x04e1 - 04e1_Read0x40WordsFromZeroTo0b00() - - // 04fb is incremented when you reset a voice - 04d2 00df 04fb lr $AC1.M, @0x04fb - 04d4 009e 0b00 lri $AC0.M, #0x0b00 - 04d6 4c00 add $ACC0, $ACC1 - 04d7 1c1e mrr $AR0, $AC0.M - - 04d8 181e lrr $AC0.M, @$AR0 - 04d9 7400 incm $AC0.M - 04da 1a1e srr @$AR0, $AC0.M - *(AR0)++ - - 04db 02bf 04ea call 0x04ea - 04dd 8100 clr $ACC0 - 04de 00fe 04fb sr @0x04fb, $AC0.M - 04e0 02df ret -} - -void 04e1_Read0x40WordsFromZeroTo0b00() { - 04e1 0092 00ff lri $CR, #0x00ff - 04e3 8100 clr $ACC0 - 04e4 009f 0b00 lri $AC1.M, #0x0b00 - 04e6 0080 0040 lri $AR0, #0x0040 - // 04e8 029f 0555 jmp 0x0555 - GOTO 0555_UnknownReadFromMysteryReg(ARAMAddress(ACC0), DestBuffer(AC1.M), Length(AR0)) { -} - -void 04ea_Call0573With0b00And0050() { - 04ea 8100 clr $ACC0 - 04eb 009f 0b00 lri $AC1.M, #0x0b00 - 04ed 0080 0050 lri $AR0, #0x0050 - 04ef 029f 0573 jmp 0x0573 - // I don't get it, the above doesn't match the parameters - 0573_Mystery_Write(InBuffer($AR1), _COUNT(AX0.H)); -} - - -void 04f1_Read0x40WordsFromZeroTo0b00() { - // 04f1 02bf 04e1 call 0x04e1 - 04e1_Read0x40WordsFromZeroTo0b00(); -} - -void 04f3_strange() { - 04f3 8900 clr $ACC1 - 04f4 0080 04fc lri $AR0, #0x04fc - 04f6 8100 clr $ACC0 - - // Count the masked voices, look at all four mask words - // 04f7 1104 0505 bloopi #0x04, 0x0505 - for (int j = 0; j < 4; j++) { - 04f9 0000 nop - 04fa 191e lrri $AC0.M, @$AR0 - 04fb 0000 nop - - 04fc 1110 0503 bloopi #0x10, 0x0503 - for (int i = 0; i < 0x10; i++) { - 04fe 02c0 0001 andcf $AC0.M, #0x0001 - 0500 027d iflz - 0501 7500 incm $AC1.M // count up - 0502 147f lsr $ACC0, #-1 - 0503 0000 nop - } - 0504 0000 nop - 0505 0000 nop - } - // AC1.M now contains the count of all voices masked/unmasked (not sure which) - - // Copy the voice masks to 0x0b48 ... - 0506 00de 04fc lr $AC0.M, @0x04fc - 0508 00fe 0b48 sr @0x0b48, $AC0.M - 050a 00de 04fd lr $AC0.M, @0x04fd - 050c 00fe 0b49 sr @0x0b49, $AC0.M - 050e 00de 04fe lr $AC0.M, @0x04fe - 0510 00fe 0b4a sr @0x0b4a, $AC0.M - 0512 00de 04ff lr $AC0.M, @0x04ff - 0514 00fe 0b4b sr @0x0b4b, $AC0.M - - 0516 009e 0b00 lri $AC0.M, #0x0b00 - 0518 4c00 add $ACC0, $ACC1 // The value is in AC1.M, this must be wrong disasm - 0519 1c1e mrr $AR0, $AC0.M - - // Increment the counter at [ #0b00 + masked voice count] - // why would you do this? making bucket histogram over the number of active voices? - 051a 181e lrr $AC0.M, @$AR0 - 051b 7400 incm $AC0.M - 051c 1a1e srr @$AR0, $AC0.M - - 051d 02bf 04ea call 0x04ea // 04ea_Call0573With0b00And0050() - 051f 02df ret -} - -void PointlessFunction_Unused() { - 0520 02bf 04ea call 0x04ea // 04ea_Call0573With0b00And0050() - 0522 02df ret -} - - -// the first parameter is a pointer to the real RAM addr -void 0523_CopyRAMtoDMEM(&_srcRAM($AR1), _destDMEM($AC1.M), _len($AR0)) -{ - // 0523 193e lrri $AC0.M, @$AR1 - // 0524 193c lrri $AC0.L, @$AR1 - AC0 = *AR1++ << 16 | *AR1 - -void 0525_CopyRAMtoDMEM(_srcRAM($AR1), _destDMEM($AC1.M), _len($AR0)) -{ - 0525 2fcd srs @DSPA, $AC1.M - 0526 0f00 lris $AC1.M, #0x00 - - // ugly jump to share code... i am not going to document it ^^ - 0527 2fc9 srs @DSCR, $AC1.M - 0528 2ece srs @DSMAH, $AC0.M - 0529 2ccf srs @DSMAL, $AC0.L - 052a 1fe0 mrr $AC1.M, $AR0 - 052b 1501 lsl $ACC1, #1 - 052c 2fcb srs @DSBL, $AC1.M - - // 052d 02bf 0536 call 0x0536 - 0536_WaitForDMATransfer() - - // 052f 02df ret -} - -void 0530_DMEMtoRAM_Ind(_DMEM(AC1.M), _pMemAddr(AR1), _len(AR0)) -{ - // 0530 193e lrri $AC0.M, @$AR1 - // 0531 193c lrri $AC0.L, @$AR1 - AC0 = *AR1++ << 16 | *AR1 - // continues.... - -void 0532_DMEMtoRAM(_DMEM(AC1.M), _pMemAddr(ACC0), _len(AR0)) -{ - 0532 2fcd srs @DSPA, $AC1.M - 0533 0f01 lris $AC1.M, #0x01 - 0534 029f 0527 jmp 0x0527 -} - -void 0536_WaitForDMATransfer() -{ - 0536 26c9 lrs $AC0.M, @DSCR - 0537 02a0 0004 andf $AC0.M, #0x0004 - 0539 029c 0536 jlnz 0x0536 - 053b 02df ret -} - -// Can't find any calls to this one. -void 053c_Unk_Unused() { - 053c 193e lrri $AC0.M, @$AR1 - 053d 193c lrri $AC0.L, @$AR1 - 053e 00ff ffcd sr @DSPA, $AC1.M - 0540 0f00 lris $AC1.M, #0x00 - 0541 00ff ffc9 sr @DSCR, $AC1.M - 0543 00fe ffce sr @DSMAH, $AC0.M - 0545 00fc ffcf sr @DSMAL, $AC0.L - 0547 1fe0 mrr $AC1.M, $AR0 - 0548 1501 lsl $ACC1, #1 - 0549 00ff ffcb sr @DSBL, $AC1.M - 054b 02df ret -} - -void 054c_WaitForDMATransfer2_Unused() { - 054c 00de ffc9 lr $AC0.M, @DSCR - 054e 02a0 0004 andf $AC0.M, #0x0004 - 0550 029c 054c jlnz 0x054c - 0552 02df ret -} - -void 0553_UnknownReadFromMysteryReg_Unused() { - 0553 193e lrri $AC0.M, @$AR1 - 0554 193c lrri $AC0.L, @$AR1 - // continues... - -void 0555_UnknownReadFromMysteryReg(ARAMAddress(ACC0), DestBuffer(AC1.M), Length(AC0.M)) { - // 0555 0240 7fff andi $AC0.M, #0x7fff - // 0557 02bf 0561 call 0x0561 - 0561_SetupAcceleratorForMysteryAccess(ACC0 & 0x7FFFFFFF, AR0, AC1.M); - // After that, length is now in AX0.H - - // 0559 007a 055f bloop $AX0.H, 0x055f - for (int i = 0; i < AX0.H; i++) { - // 055b 26d3 lrs $AC0.M, @Unk Zelda - // 055c 1b3e srri @$AR1, $AC0.M - *(AR1++) = ReadFromUnknownAcceleratorRegister(); - } - // 055d 0000 nop - // 055e 0000 nop - // 055f 0000 nop - // 0560 02df ret -} - -void 0561_SetupAcceleratorForMysteryAccess(ARAMAddress(ACC0), DestBuffer(AC1.M), Length(AR0)) { - 0561 1c3f mrr $AR1, $AC1.M - 0562 0f0a lris $AC1.M, #0x0a - 0563 2fd1 srs @SampleFormat, $AC1.M - 0564 1f5e mrr $AX0.H, $AC0.M - 0565 1f1c mrr $AX0.L, $AC0.L - // Store 0xFFFFFFFF value as end address - Zelda does not use the looping hardware - 0566 009e ffff lri $AC0.M, #0xffff - 0568 2ed6 srs @ACEAH, $AC0.M // end address - 0569 2ed7 srs @ACEAL, $AC0.M - 056a 1fda mrr $AC0.M, $AX0.H - 056b 1f98 mrr $AC0.L, $AX0.L - // Divide "current" address by 2. - 056c 147f lsr $ACC0, #-1 - 056d 2ed8 srs @ACCAH, $AC0.M // Current address - 056e 2cd9 srs @ACCAL, $AC0.L - 056f 1f40 mrr $AX0.H, $AR0 - 0570 02df ret -} - -// Writes to UnkZelda, nops -void 0571_Mystery_Write_FirstLoadTwoRegs_Unused() { - 0571 193e lrri $AC0.M, @$AR1 - 0572 193c lrri $AC0.L, @$AR1 - -void 0573_Mystery_Write(InBuffer($AR1), SourceBuffer(AC1.M), _COUNT(AX0.H)) { - 0573 0090 0001 lri $AC0.H, #0x0001 - // 0575 02bf 0561 call 0x0561 - 0561_SetupAcceleratorForMysteryAccess(ACC0, AR0, AC1.M); - 0577 007a 057e bloop $AX0.H, 0x057e - 0579 193e lrri $AC0.M, @$AR1 - 057a 2ed3 srs @Unk Zelda, $AC0.M - 057b 0000 nop // seems the above store takes some time, - 057c 0000 nop // whatever it does, so ... 4 nops does the trick I guess - 057d 0000 nop - 057e 0000 nop - 057f 02df ret -} - - -void 0580_COMMAND_04() -{ - // commando looks buggy... - // it copies data to the switch casement data address... sounds like BS - - 0580 0080 0346 lri $AR0, #0x0346 - 0582 02bf 0067 call 0x0067 - 0584 02bf 0067 call 0x0067 - - 0067_CopyCommand(0x0346, mssing AC0.M??) - - 0586 0081 0346 lri $AR1, #0x0346 - 0588 00df 0349 lr $AC1.M, @0x0349 - 058a 0340 ffff andi $AC1.M, #0xffff - 058c 00c0 0345 lr $AR0, @0x0345 - 058e 02bf 0523 call 0x0523 - 0590 029f 0043 jmp 0x0043 -} - -void 0592_COMMAND_05() -{ - 0592 0080 0346 lri $AR0, #0x0346 - 0594 02bf 0067 call 0x0067 - 0596 02bf 0067 call 0x0067 - - // 0598 0081 0346 lri $AR1, #0x0346 - // 059a 00df 0349 lr $AC1.M, @0x0349 - // 059c 0340 ffff andi $AC1.M, #0xffff - // 059e 00c0 0345 lr $AR0, @0x0345 - // 05a0 02bf 0530 call 0x0530 - 0530_DMEMtoRAM_Ind((*0x0349)&0xFFFF, 0x0346, *0x0345) - - // 05a2 029f 0043 jmp 0x0043 - // jumps back to send sync messages .... -} - - -void 05A4_ResetAccelerator() -{ - 05a4 0092 00ff lri $CR, #0x00ff - 05a6 009e ffff lri $AC0.M, #0xffff - 05a8 2ed4 srs @ACSAH, $AC0.M - 05a9 2ed5 srs @ACSAL, $AC0.M - 05aa 2ed6 srs @ACEAH, $AC0.M - 05ab 2ed7 srs @ACEAL, $AC0.M - 05ac 02df ret -} - - -void 05ad_SetupAccelerator(_acceleratorH(AC0.M), _accleratorL(AC0.L), _format(AC1.M)) -{ - // 05ad 00ff ffd1 sr @SampleFormat, $AC1.M - *SampleFormat = AC1.M - - // 05af 0340 0003 andi $AC1.M, #0x0003 - // 05b1 7900 decm $AC1.M - // 05b2 02ca lsrn // ACC0 >>= AC1.M - // 05b3 00fe ffd8 sr @ACCAH, $AC0.M - // 05b5 00fc ffd9 sr @ACCAL, $AC0.L - - *ACCAH/ACCAL = address >> ((sampleFormat & 3) - 1); - // ACCAH/ACCAL is current read address - // Hm, this seems to imply some direct relationship between the sample format number and - // the nibbles-per-sample value - - // 05b7 02df ret -} - -void 05b8_NewMail() { - # 05b8 1205 sbclr #0x05 - # 05b9 8e00 set16 - - /* - 05ba 00f0 03fd sr @0x03fd, $AC0.H - 05bc 00fc 03ff sr @0x03ff, $AC0.L - 05be f400 lsr16 $ACC0 - 05bf 00fc 03fe sr @0x03fe, $AC0.L - 05c1 00fa 03fa sr @0x03fa, $AX0.H - 05c3 8100 clr $ACC0 - - save AC0 register - */ - - *0x03fd = AC0.H - *0x03ff = AC0.L - ACC0 >>= 16 - *0x03fe = AC0.L - *0x03fa = AX0.H - - // 05c4 00de fffe lr $AC0.M, @CMBH - // 05c6 02c0 8000 andcf $AC0.M, #0x8000 - // 05c8 029c 06b9 jlnz 0x06b9 - if (@CMBH & 0x8000 > 0) - { - !MISSING! - } - - // 05ca 00da ffff lr $AX0.H, @CMBL - // 05cc 8600 tstaxh $AX0.H - // 05cd 0294 0692 jnz 0x0692 - if (*CMBL != 0) - { - !MISSING! - } - - - // 05cf 00de fffe lr $AC0.M, @CMBH - // 05d1 02c0 8000 andcf $AC0.M, #0x8000 - // 05d3 029c 05cf jlnz 0x05cf - while(@CMBH & 0x8000 > 0); - - - // 05d5 0240 000f andi $AC0.M, #0x000f - // 05d7 1f5e mrr $AX0.H, $AC0.M - // 05d8 7400 incm $AC0.M - // 05d9 0c00 lris $AC0.L, #0x00 - // 05da 1404 lsl $ACC0, #4 - // 05db 00fe 034e sr @0x034e, $AC0.M - AC0.M = *CMBH & 0x000F - AX0.H = AC0.M - *0x034e = (AC0.M++) << 4 - - - // 05dd 1fda mrr $AC0.M, $AX0.H - // 05de 1f40 mrr $AX0.H, $AR0 - // 05df 0200 04fc addi $AC0.M, #0x04fc - // 05e1 1c1e mrr $AR0, $AC0.M - - AX0.H = AR0 // save AR0 - - AC0.M = *CMBH & 0x000F - AC0.M += 0x04fc - AR0 = AC0.M - - // 05e2 00de ffff lr $AC0.M, @CMBL - // 05e4 1a1e srr @$AR0, $AC0.M - // 05e5 1c1a mrr $AR0, $AX0.H - AC0.M = *CMBL - *AR0 = AC0.M - AR0 = AX.H // restore AR0 - - -EndOfMailException: - - /* - 05e6 00de 03fe lr $AC0.M, @0x03fe - 05e8 00dc 03ff lr $AC0.L, @0x03ff - 05ea 00d0 03fd lr $AC0.H, @0x03fd - 05ec 00da 03fa lr $AX0.H, @0x03fa - restore AC0 register - */ - AC0.M = *0x03fe - AC0.L = *0x03ff - AC0.H = *0x03fd - AX0.H = *0x03fa - - # 05ee 1305 sbset #0x05 - - 05ef 02ff rti -} - -void 05f0_HaltUCode() -{ - 05f0 009a 0002 lri $AX0.H, #0x0002 - 05f2 00fa 03a3 sr @0x03a3, $AX0.H - 05f4 00e0 03f9 sr @0x03f9, $AR0 - /* - 05f6 02bf 067c call 0x067c - */ - 067c_Unk() - - 05f8 16fc dcd1 si @DMBH, #0xdcd1 - 05fa 16fd 0002 si @DMBL, #0x0002 - 05fc 16fb 0001 si @DIRQ, #0x0001 - 05fe 0021 halt -} - -// Sync Table -05ff 0617 cmpis $ACC0, #0x17 -0600 0618 cmpis $ACC0, #0x18 -0601 0658 cmpis $ACC0, #0x58 -0602 065b cmpis $ACC0, #0x5b - - // at the end of a frame, we get a mail telling ucode what to do next -void 0603_FinalizeFrame(_returnAddr($AR0)) -{ - // 0603 00e0 03f9 sr @0x03f9, $AR0 - 0x03f9 = _returnAddr - - // 0605 009e 0005 lri $AC0.M, #0x0005 - // 0607 02bf 066a call 0x066a - SendMB_DCD1(0x0005) - - # 0609 8e00 set16 - // 060a 8100 clr $ACC0 - // 060b 8900 clr $ACC1 - ACC0 = 0 - ACC1 = 0 - - // 060c 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - // 060e 27ff lrs $AC1.M, @CMBL - // 060f 009e 05ff lri $AC0.M, #0x05ff - // 0611 4c00 add $ACC0, $ACC1 - AC0.M = 0x05ff + *CMBL - - // 0612 1c7e mrr $AR3, $AC0.M - // 0613 0313 ilrr $AC1.M, @$AR3 - // 0614 1c7f mrr $AR3, $AC1.M - AR3 = *AC0.M <- "BUT FROM Instrcution Memory (look at sync table about)" - - // 0615 176f jmpr $AR3 - switch(AR3 - 0x05FF) - { - case 0x00: HALT(); break; - case 0x01: 0618_PrepareBootUcode(); break; - case 0x02: 0658_SoftReset(); break; - case 0x03: 065b_ContinueWithUCode(); break; - default: HALT(); - // 0616 0021 halt - } -} - -0617 0021 halt - - // Sets up info needed to dma in a chunk to iram or dram, - // and calls irom to do actual dma. irom returns to address given in AR0 -void 0618_PrepareBootUcode() { - // Dunno what that's about... - 0618 009a 0002 lri $AX0.H, #0x0002 - 061a 00fa 03a3 sr @0x03a3, $AX0.H - - 061c 8100 clr $ACC0 - 061d 8900 clr $ACC1 - - //061e 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - 0620 24ff lrs $AC0.L, @CMBL - - //0621 02bf 0664 call 0x0664 - 0664_WaitForCPUMailBox_AC1() - - 0623 25ff lrs $AC1.L, @CMBL - - //0624 02bf 0664 call 0x0664 - 0664_WaitForCPUMailBox_AC1() - - 0626 27ff lrs $AC1.M, @CMBL - 0627 2ece srs @DSMAH, $AC0.M - 0628 2ccf srs @DSMAL, $AC0.L // 0 - 0629 16c9 0001 si @DSCR, #0x0001 - 062b 2fcd srs @DSPA, $AC1.M // 2 - 062c 2dcb srs @DSBL, $AC1.L // 1 - - 062d 8100 clr $ACC0 - 062e 8900 clr $ACC1 - - //062f 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - 0631 24ff lrs $AC0.L, @CMBL - 0632 1c9e mrr $IX0, $AC0.M - 0633 1cbc mrr $IX1, $AC0.L - //0634 02bf 0664 call 0x0664 - 0664_WaitForCPUMailBox_AC1() - - 0636 25ff lrs $AC1.L, @CMBL - - //0637 02bf 0664 call 0x0664 - 0664_WaitForCPUMailBox_AC1() - - 0639 27ff lrs $AC1.M, @CMBL - 063a 1cdf mrr $IX2, $AC1.M - 063b 1cfd mrr $IX3, $AC1.L - 063c 8100 clr $ACC0 - - //063d 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - 063f 26ff lrs $AC0.M, @CMBL - 0640 1c1e mrr $AR0, $AC0.M - 0641 8900 clr $ACC1 - //0642 02bf 0664 call 0x0664 - 0664_WaitForCPUMailBox_AC1() - - 0644 20ff lrs $AX0.L, @CMBL - 0645 1f5f mrr $AX0.H, $AC1.M - //0646 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - 0648 21ff lrs $AX1.L, @CMBL - - //0649 02bf 065e call 0x065e - 065e_WaitForCPUMailBox_AC0() - - 064b 23ff lrs $AX1.H, @CMBL - - // Make sure dma is ready - // 064c 26c9 lrs $AC0.M, @DSCR - // 064d 02a0 0004 andf $AC0.M, #0x0004 - // 064f 029c 064c jlnz 0x064c - - // Reset some of the state - // 0651 1206 sbclr #0x06 - // 0652 1203 sbclr #0x03 - // 0653 1204 sbclr #0x04 - // 0654 1205 sbclr #0x05 - - // 0655 029f 80b5 jmp 0x80b5 - 80b5_BootUcode(); - - // Should not reach here - 0657 0021 halt -} - -void 0658_SoftReset() { - 0658 029f 8000 jmp 0x8000 - 065a 0021 halt -} - -void 065b_ContinueWithUCode() -{ - // 065b 00c0 03f9 lr $AR0, @0x03f9 - // 065d 170f jmpr $AR0 - GOTO *0x03f9; -} - - -void 065e_WaitForCPUMailBox_AC0() -{ - 065e 26fe lrs $AC0.M, @CMBH - 065f 02c0 8000 andcf $AC0.M, #0x8000 - 0661 029c 065e jlnz 0x065e - 0663 02df ret -} - -void 0664_WaitForCPUMailBox_AC1() -{ - 0664 27fe lrs $AC1.M, @CMBH - 0665 03c0 8000 andcf $AC1.M, #0x8000 - 0667 029c 0664 jlnz 0x0664 - 0669 02df ret -} -void SendMB_DCD1(_low) - { - // 066a 02bf 0682 call 0x0682 - WaitForEmptyDSPMailBox_ovAC1(); - - // 066c 16fc dcd1 si @DMBH, #0xdcd1 - // 066e 2efd srs @DMBL, $AC0.M - // 066f 16fb 0001 si @DIRQ, #0x0001 - - *DMBH = 0xDCD1 - *DMBL = _low - *DIRQ = 0x0001 - - // 0671 02bf 0682 call 0x0682 - WaitForEmptyDSPMailBox_ovAC1() - - // 0673 02df ret -} - - -void SendMB_F355(_low) -{ - // 0674 02bf 0682 call 0x0682 - WaitForEmptyDSPMailBox_ovAC1(); - - // 0676 16fc f355 si @DMBH, #0xf355 - // 0678 2efd srs @DMBL, $AC0.M - - *DMBH = 0xf355 - *DMBL = _low - - // 0679 02bf 0682 call 0x0682 - WaitForEmptyDSPMailBox_ovAC1(); - - // 067b 02df ret -} - - -void 067c_Unk() -{ - 067c 26fc lrs $AC0.M, @DMBH - 067d 02c0 8000 andcf $AC0.M, #0x8000 - 067f 029d 067c jlz 0x067c - 0681 02df ret -} - - -void WaitForEmptyDSPMailBox_ovAC1.M() - { - // 0682 27fc lrs $AC1.M, @DMBH - // 0683 03c0 8000 andcf $AC1.M, #0x8000 - // 0685 029d 0682 jlz 0x0682 - while (*DMBH & 0x8000); - - // 0687 02df ret -} - - -void 0688_InitCommandBlock() -{ - // 0688 009a 0280 lri $AX0.H, #0x0280 - // 068a 00fa 0350 sr @0x0350, $AX0.H - // 068c 00fa 0351 sr @0x0351, $AX0.H - *0x0350 = 0x0280 - *0x0351 = 0x0280 - - // 068e 0a00 lris $AX0.H, #0x00 - // 068f 00fa 0352 sr @0x0352, $AX0.H - *0x0352 = 0x00 - - // 0691 02df ret -} - - // - // this block is called by the new mail exception - // it seems to copy a new command to the address @0x0350 and increase the - // number of commands at 0x0352 - // - { - 0692 00e0 03fb sr @0x03fb, $AR0 - 0694 00e8 03fc sr @0x03fc, $WR0 - 0696 00c0 0350 lr $AR0, @0x0350 - 0698 0088 002f lri $WR0, #0x002f - - do { - 069a 1b1a srri @$AR0, $AX0.H - - // 069b 00de fffe lr $AC0.M, @CMBH - // 069d 02c0 8000 andcf $AC0.M, #0x8000 - // 069f 029c 069b jlnz 0x069b - while (!CMBH & 0x8000) - ; - 06a1 00dc ffff lr $AC0.L, @CMBL - 06a3 1b1e srri @$AR0, $AC0.M - 06a4 1b1c srri @$AR0, $AC0.L - 06a5 1fda mrr $AC0.M, $AX0.H - 06a6 7800 decm $AC0.M - 06a7 1f5e mrr $AX0.H, $AC0.M - - // 06a8 8600 tstaxh $AX0.H - // 06a9 0294 069b jnz 0x069b - } while (AX0.H); - - /* - 06ab 8100 clr $ACC0 - 06ac 00de 0352 lr $AC0.M, @0x0352 - 06ae 7400 incm $AC0.M - 06af 00fe 0352 sr @0x0352, $AC0.M - increase number of commands - */ - *0x0352 = *0x0352++ - - - 06b1 00e0 0350 sr @0x0350, $AR0 - 06b3 00c0 03fb lr $AR0, @0x03fb - 06b5 00c8 03fc lr $WR0, @0x03fc - - // 06b7 029f 05e6 jmp 0x05e6 - GOTO EndOfMailException // return values and leave exception - - // looks like a read from ring buffer [0x350, 0x37f] - // note the use of the wrap register WR0. - 06b9 00e0 03fb sr @0x03fb, $AR0 - 06bb 00e8 03fc sr @0x03fc, $WR0 - 06bd 00c0 0350 lr $AR0, @0x0350 - 06bf 0088 002f lri $WR0, #0x002f - 06c1 0a00 lris $AX0.H, #0x00 - 06c2 1b1a srri @$AR0, $AX0.H - 06c3 029f 06ab jmp 0x06ab -} - - -void 06c5_CopyCommandBlock() - { - // 06c5 00c0 0351 lr $AR0, @0x0351 - short srcCommandQueueAddr = *0x0351 - - // 06c7 0088 002f lri $WR0, #0x002f - $WR0 = #0x002f - - -:start - /* - 06c9 00da 0352 lr $AX0.H, @0x0352 - 06cb 8600 tstaxh $AX0.H - 06cc 0295 06ed jz 0x06ed - check how many commands are inside the "queue" - */ - - if (*0x352 == 0) - { - $WR0 = #0xffff - return 0x2d; - } - - /* - 06ce 1205 sbclr #0x05 - 06cf 00da 0352 lr $AX0.H, @0x0352 - 06d1 1fda mrr $AC0.M, $AX0.H - 06d2 7800 decm $AC0.M - 06d3 00fe 0352 sr @0x0352, $AC0.M - 06d5 1305 sbset #0x05 - decrement number of commands in queue - */ - *0x352--; - - // 06d6 0081 0356 lri $AR1, #0x0356 - short destCommandQueueAddr = 0x0356 - - // 06d8 191e lrri $AC0.M, @$AR0 - // 06d9 02c0 8000 andcf $AC0.M, #0x8000 - // 06db 029d 06f1 jlz 0x06f1 - // 06dd 1f5e mrr $AX0.H, $AC0.M - // 06de 8600 tstaxh $AX0.H - // 06df 0295 06f5 jz 0x06f5 - - // check if command is valid - - short numCommands = *srcCommandQueueAddr++ - numCommands &= 0x8000 - if (numCommands < 0) - { - *0x0351 = srcCommandQueueAddr - GOTO :start - } - - if (numCommands == 0) - { - 05f0_HaltUCode() - } - - /* - 06e1 007a 06e6 bloop $AX0.H, 0x06e6 - 06e3 191e lrri $AC0.M, @$AR0 - 06e4 1b3e srri @$AR1, $AC0.M - 06e5 191e lrri $AC0.M, @$AR0 - 06e6 1b3e srri @$AR1, $AC0.M - - copy command queue - */ - - for (int i=0; i> 4 - - //07c5 2380 lrs $AX1.H, @0xff80 - //07c6 8d00 set15 - //07c7 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - - $AX0.l = (PB.LoopStartPos >> 4) & 0xffff; - prod = (PB.LoopStartPos >> 4 & 0xffff0000)*PB.Format; - - //07c8 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - - $ACC0 = (PB.LoopStartPos >> 4 & 0xffff0000)*PB.Format; - prod = ((PB.LoopStartPos >> 4) & 0xffff)*PB.Format; - - //07c9 8c00 clr15 - //07ca f000 lsl16 $ACC0 - - $ACC0 = (((PB.LoopStartPos >> 4) & 0xffff0000)*PB.Format)<<16 - - //07cb 4e00 addp $ACC0 - - $ACC0 = ((((PB.LoopStartPos >> 4) & 0xffff0000)*PB.Format)<<16)+ - (((PB.LoopStartPos >> 4) & 0xffff)*PB.Format) - - // 07cc 238c lrs $AX1.H, @0xff8c - // 07cd 218d lrs $AX1.L, @0xff8d - // 07ce 4a00 addax $ACC0, $AX1 - - $ACC0 = (((((PB.LoopStartPos >> 4) & 0xffff0000)*PB.Format)<<16)+ - (((PB.LoopStartPos >> 4) & 0xffff)*PB.Format))+PB.StartAddr - - // 07cf 2e38 srs @0x0038, $AC0.M - // 07d0 2c39 srs @0x0039, $AC0.L - - PB.CurAddr = $ACC0 & 0xffffffff; - - // 07d1 2682 lrs $AC0.M, @0xff82 - // 07d2 2e67 srs @0x0067, $AC0.M - // 07d3 2683 lrs $AC0.M, @0xff83 - // 07d4 2e66 srs @0x0066, $AC0.M - //Unconditionally (!) copy YN1 and YN2 from loopyn2 and loopyn1 - - PB.YN1 = PB.LoopYN1; - PB.YN2 = PB.LoopYN2; - - 07d5 00e3 0363 sr @0x0363, $AR3 - 07d7 0083 0458 lri $AR3, #0x0458 - 07d9 8100 clr $ACC0 - 07da 0e01 lris $AC0.M, #0x01 - - // 07db 02bf 07eb call 0x07eb - 07eb_AFCDecoder(); - - 07dd 00c3 0363 lr $AR3, @0x0363 - 07df 02bf 0729 call 0x0729 - 07e1 029f 0749 jmp 0x0749 - - // No repeat - // stop rendering of this PB (0x401 == 1) and clear the output buffer with zeroes... - //07e3 0e01 lris $AC0.M, #0x01 - //07e4 2e01 srs @0x0001, $AC0.M - - PB.KeyOff = 1; - - early_out: - // Zero the buffer. - 07e5 8100 clr $ACC0 - 07e6 005f loop $AC1.M - 07e7 1b7e srri @$AR3, $AC0.M - 07e8 0092 00ff lri $CR, #0x00ff - - // 07ea 02df ret - return - } -} - - - - -void 07eb_AFCDecoder(_numberOfSample(AC0.M)) -{ - // 07eb 00ff 0360 sr @0x0360, $AC1.M - // 07ed 00fe 0361 sr @0x0361, $AC0.M - // 07ef 2638 lrs $AC0.M, @0x0038 - // 07f0 2439 lrs $AC0.L, @0x0039 - // 07f1 0f05 lris $AC1.M, #0x05 - // 07f2 02bf 05ad call 0x05ad - 05ad_SetupAccelerator(AC0.M, AC0.L, AC1.M) - - // 07f4 2638 lrs $AC0.M, @0x0038 - // 07f5 2439 lrs $AC0.L, @0x0039 - // 07f6 8900 clr $ACC1 - // 07f7 00df 0361 lr $AC1.M, @0x0361 - // 07f9 2280 lrs $AX0.H, @0xff80 - // 07fa d000 mulc $AC1.M, $AX0.H - // 07fb 6f00 movp $ACC1 - // 07fc 4c00 add $ACC0, $ACC1 - // 07fd 2e38 srs @0x0038, $AC0.M - // 07fe 2c39 srs @0x0039, $AC0.L - // increase sample offset in ARAM - AC0 = (*0x0038 << 16) | *0x0039 - AC1 = AC0 + _numberOfSample * *0x0480 // bytes per sample - *0x0038 = AC0.M - *0x0039 = AC0.L - - - // 07ff 8100 clr $ACC0 - // 0800 00de 0361 lr $AC0.M, @0x0361 - //0802 007e 086b bloop $AC0.M, 0x086b - for (int i = 0; i < _numberOfSample; i++) - { - // Look for the lrrn below to find the ARAM reads. - - // FFD3 seems to be some interface to do plain single byte reads - // from ARAM with no ADPCM fanciness or similar. - - // It loads through AR0 loaded with immediate #ffd3, not through - // lrs, so CR doesn't affect the effective address. - - 0804 0080 ffd3 lri $AR0, #0xffd3 - 0806 0084 0000 lri $IX0, #0x0000 - 0808 199e lrrn $AC0.M, @$AR0 - 0809 8900 clr $ACC1 - 080a 1ffe mrr $AC1.M, $AC0.M - 080b 1401 lsl $ACC0, #1 - 080c 0240 001e andi $AC0.M, #0x001e - 080e 0200 0300 addi $AC0.M, #0x0300 // AFC COEF Table - 0810 1c3e mrr $AR1, $AC0.M - 0811 157c lsr $ACC1, #-4 - 0812 0340 000f andi $AC1.M, #0x000f - 0814 0a11 lris $AX0.H, #0x11 - 0815 5500 subr $ACC1, $AX0.H - - // 0816 8100 clr $ACC0 - // 0817 2680 lrs $AC0.M, @0xff80 - // 0818 0605 cmpis $ACC0, #0x05 - // 0819 0295 0832 jz 0x0832 - if (*0x480 != 0x5) // ( == 0x09) - { - 081b 009a 00f0 lri $AX0.H, #0x00f0 - 081d 0b0f lris $AX1.H, #0x0f - 081e 0082 0364 lri $AR2, #0x0364 - 0820 1998 lrrn $AX0.L, @$AR0 - 0821 6000 movr $ACC0, $AX0.L - - // Unpack 14 of the nibbles.. - 0822 1107 0829 bloopi #0x07, 0x0829 - for (int j=0; j<7; j++) - { - 0824 3400 andr $AC0.M, $AX0.H - 0825 1408 lsl $ACC0, #8 - 0826 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - - 0827 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 0828 140c lsl $ACC0, #12 - 0829 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - } - // Then do the last two .. - 082a 3400 andr $AC0.M, $AX0.H - 082b 1408 lsl $ACC0, #8 - 082c 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 082d 3600 andr $AC0.M, $AX1.H - 082e 140c lsl $ACC0, #12 - 082f 1b5e srri @$AR2, $AC0.M - - 0830 029f 0852 jmp 0x0852 - } - else // (*0x480 == 5) - { - 0832 009a c000 lri $AX0.H, #0xc000 - 0834 0082 0364 lri $AR2, #0x0364 - 0836 1998 lrrn $AX0.L, @$AR0 - 0837 6000 movr $ACC0, $AX0.L - - // Unpack half nibbles (half quality, ~half space) - //0838 1103 0845 bloopi #0x03, 0x0845 - for (j=0; j<3; j++) - { - 083a 1408 lsl $ACC0, #8 - 083b 3400 andr $AC0.M, $AX0.H - 083c 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 083d 140a lsl $ACC0, #10 - 083e 3400 andr $AC0.M, $AX0.H - 083f 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0840 140c lsl $ACC0, #12 - 0841 3400 andr $AC0.M, $AX0.H - 0842 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0843 140e lsl $ACC0, #14 - 0844 3444 andr'ln $AC0.M, $AX0.H : $AX0.L, @$AR0 - 0845 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - } - - 0846 1408 lsl $ACC0, #8 - 0847 3400 andr $AC0.M, $AX0.H - 0848 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0849 140a lsl $ACC0, #10 - 084a 3400 andr $AC0.M, $AX0.H - 084b 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 084c 140c lsl $ACC0, #12 - 084d 3400 andr $AC0.M, $AX0.H - 084e 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 084f 140e lsl $ACC0, #14 - 0850 3400 andr $AC0.M, $AX0.H - 0851 1b5e srri @$AR2, $AC0.M - } - - 0852 8f00 set40 - 0853 1f7f mrr $AX1.H, $AC1.M - 0854 2066 lrs $AX0.L, @0x0066 - 0855 2767 lrs $AC1.M, @0x0067 - 0856 193a lrri $AX0.H, @$AR1 - 0857 1939 lrri $AX1.L, @$AR1 - 0858 0080 0364 lri $AR0, #0x0364 - 085a 1c80 mrr $IX0, $AR0 - 085b a000 mulx $AX0.L, $AX1.L - 085c ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - - // ADPCM decoding main loop. - 085d 1108 0866 bloopi #0x08, 0x0866 - for (int i=0; i<8; i++) - { - 085f 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 0860 a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 0861 1485 asl $ACC0, #5 - 0862 e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 0863 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 0864 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 0865 1585 asl $ACC1, #5 - 0866 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - } - 0867 2f67 srs @0x0067, $AC1.M - 0868 8e00 set16 - 0869 1ff8 mrr $AC1.M, $AX0.L - 086a 2f66 srs @0x0066, $AC1.M - 086b 8900 clr $ACC1 - } - 086c 00df 0360 lr $AC1.M, @0x0360 - 086e 02df ret -} - - - - - - // probably unreachable - { - // 086f b100 tst $ACC0 - // 0870 02d5 retz - if (!$ACC0) return; - - 0871 04fe addis $ACC0, #0xfe - 0872 1f1e mrr $AX0.L, $AC0.M - 0873 191e lrri $AC0.M, @$AR0 - 0874 0291 087a jl 0x087a - 0876 191a lrri $AX0.H, @$AR0 - 0877 0058 loop $AX0.L - 0878 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0879 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 087a 1b7e srri @$AR3, $AC0.M - 087b 02df ret -} - - -//////////////////////////////////////////// DEFAULT DECODER -void 087c_DefaultDecoder() -{ - // 087c 8100 clr $ACC0 - // 087d 1f5e mrr $AX0.H, $AC0.M - // 087e 00d8 0402 lr $AX0.L, @0x0402 - - ACC0 = 0; - AX0.L = *0x0402; // == PB.RatioInt - - // Sample fraction is stored in a common way, but sample position is not, so - // it's in the individual decoders. Some decoders, like square wave, only care about - // fractional sample position. So here we just load up the fractional sample - // position before handing control over. - - // 0880 00dc 0430 lr $AC0.L, @0x0430 - // 0882 0080 0520 lri $AR0, #0x0520 - - AC0.L = *0x430; // == PB.CurSampleFrac - AR0 = 0x0520; - - // 0884 00df 0480 lr $AC1.M, @0x0480 - // 0886 1501 lsl $ACC1, #1 - // 0887 0340 007e andi $AC1.M, #0x007e - // 0889 0300 0891 addi $AC1.M, #0x0891 - // 088b 1c5f mrr $AR2, $AC1.M - // 088c 175f callr $AR2 // (*$AR2)() <-- See jump table at 0x0891 - - AC1.M = ((*0x480 * 2) & 0x007e) + 0x0891; // == ((PB.Format * 2) & 0x007e) + 0x0891 - AR2 = AC1.M; - - JumpTable0891(PB.Format); - - //088d 00fc 0430 sr @0x0430, $AC0.L - *0x430 = AC0.L; // *0x430 == PB.CurSampleFrac - - // 088f 029f 02d8 jmp 0x02d8 - GOTO ContinueWithBlock: // in SyncFrame -} - - -// Jump table -// switch(PB.Format) -0891 029f 08b2 jmp 0x08b2 // case 0x0 // 08b2_Decoder0x0_SquareWave (used in ZWW) -0893 029f 08ed jmp 0x08ed // case 0x1 // 08ed_Decoder0x1_SawWave (used in ZWW) -0895 029f 08d5 jmp 0x08d5 // case 0x2 // 08d5_Decoder0x2_SquareSaw (hasn't been spotted) -0897 029f 08c2 jmp 0x08c2 // case 0x3 // 08c2_Decoder0x3_RectangleWave (hasn't been spotted) -0899 029f 08fb jmp 0x08fb // case 0x4 // void 08f3_Decoder0x4_0xb_0xc_WaveTable (used in Pikmin) -089b 029f 08b1 jmp 0x08b1 // case 0x5 (can never happen) -089d 029f 0919 jmp 0x0919 // case 0x6 // 0919_Decoder0x6_Constant (hasn't been spotted) -089f 029f 091c jmp 0x091c // case 0x7 // 091c_Decoder0x7_WaveTable (used in Pikmin) -08a1 029f 08b1 jmp 0x08b1 // case 0x8 (can never happen) -08a3 029f 08b1 jmp 0x08b1 // case 0x9 (can never happen) -08a5 029f 093a jmp 0x093a // case 0xa (hasn't been spotted) -08a7 029f 08f3 jmp 0x08f3 // case 0xb // void 08f3_Decoder0x4_0xb_0xc_WaveTable (used in Pikmin) (used in Pikmin) -08a9 029f 08f7 jmp 0x08f7 // case 0xc // void 08f3_Decoder0x4_0xb_0xc_WaveTable (used in Pikmin) (Zelda force field in temple of gods) -08ab 029f 08b1 jmp 0x08b1 // case 0xd (unused) -08ad 029f 08b1 jmp 0x08b1 // case 0xe (unused) -08af 029f 08b1 jmp 0x08b1 // case 0xf (unused) -08b1 02df ret - -void 08b2_Decoder0x0_SquareWave(ACC0, AR0, AX0.L) { - // 08b2 1401 lsl $ACC0, #1 - t = samplePosition * 2; - - // Set up sound buffers - // 08b3 009b c000 lri $AX1.H, #0xc000 - // 08b5 0099 4000 lri $AX1.L, #0x4000 - - // 08b7 1150 08bf bloopi #0x50, 0x08bf - for(int i = 0; i < 80; i++) { - //08b9 02c0 0001 andcf $AC0.M, #0x0001 - //08bb 027c iflnz - // 08bc 1b1b srri @$AR0, $AX1.H - //08bd 027d iflz - // 08be 1b19 srri @$AR0, $AX1.L - if(($AC0.M & 1) == 1) - *$AR0++ = 0x4000; - else - *$AR0++ = 0xc000; - - // 08bf 4800 addax $ACC0, $AX0 - t += PB.Ratio; - } - // 08c0 147f lsr $ACC0, #-1 - t /= 2; - - // 08c1 02df ret -} - -void 08c2_Decoder0x3_RectangleWave(ACC0, AR0, AX0.L) { - 08c2 1402 lsl $ACC0, #2 // t = PB.CurSampleFrac * 4 - 08c3 8900 clr $ACC1 // ACC1 = 0 - 08c4 1fb8 mrr $AC1.L, $AX0.L // AC1.L = PB.RatioInt - 08c5 1501 lsl $ACC1, #1 // ACC1 *= 2 - 08c6 009b c000 lri $AX1.H, #0xc000 - 08c8 0099 4000 lri $AX1.L, #0x4000 - // 08ca 1150 08d2 bloopi #0x50, 0x08d2 - for(int i = 0; i < 80; i++) { - // 08cc 02c0 0003 andcf $AC0.M, #0x0003 - // 08ce 027c iflnz - // 08cf 1b1b srri @$AR0, $AX1.H - // 08d0 027d iflz - // 08d1 1b19 srri @$AR0, $AX1.L - // 08d2 4c00 add $ACC0, $ACC1 - - if (($AC0.M & 3) == 3) - *$AR0++ = 0x4000; - else - *$AR0++ = 0xc000; - - t += (PB.RatioInt * 2); - } - // 08d3 147e lsr $ACC0, #-2 - t /= 4; - - // 08d4 02df ret -} - -void 08d5_Decoder0x2_SquareSaw(ACC0, AR0, AX0.L) { - 08d5 1401 lsl $ACC0, #1 - 08d6 0081 0ca0 lri $AR1, #0x0ca0 - 08d8 009b c000 lri $AX1.H, #0xc000 - 08da 0099 4000 lri $AX1.L, #0x4000 - 08dc 8900 clr $ACC1 - 08dd 0082 0000 lri $AR2, #0x0000 - 08df 1150 08ea bloopi #0x50, 0x08ea - 08e1 02c0 0001 andcf $AC0.M, #0x0001 - 08e3 027c iflnz - 08e4 1b1b srri @$AR0, $AX1.H - 08e5 027d iflz - 08e6 1b19 srri @$AR0, $AX1.L - 08e7 183d lrr $AC1.L, @$AR1 - 08e8 4900 addax $ACC1, $AX0 - 08e9 1fe2 mrr $AC1.M, $AR2 - 08ea 4c39 add's $ACC0, $ACC1 : @$AR1, $AC1.M - 08eb 147f lsr $ACC0, #-1 - // 08ec 02df ret -} - -void 08ed_Decoder0x1_SawWave(ACC0, AR0, AX0.L) { - // 08ed 8900 clr $ACC1 - // 08ee 1fb8 mrr $AC1.L, $AX0.L - // 08ef 157f lsr $ACC1, #-1 - - // At this point AX0.L is PB.RatioInt and AC0.L is PB.CurSampleFrac - ACC1 = 0; - AC1.L = AX0.L * 2; - - // 08f0 1050 loopi #0x50 - for(int i = 0; i < 0x50; i++) { - // 08f1 4c20 add's $ACC0, $ACC1 : @$AR0, $AC0.L - ACC0 += ACC1; - *$AR0++ = AC0.L; - } - // 08f2 02df ret -} - - -void 08f3_Decoder0x4_0xb_0xc_WaveTable(ACC0, AR0, AX0.L) { - // See 091c - - 08f3 0082 0180 lri $AR2, #0x0180 // Entrance 1, 0x0b - 08f5 029f 08fd jmp 0x08fd - - 08f7 0082 01c0 lri $AR2, #0x01c0 // Entrance 2, 0x0c - 08f9 029f 08fd jmp 0x08fd - - 08fb 0082 0140 lri $AR2, #0x0140 // Entrance 3, 0x04 - - 08fd 008a 003f lri $WR2, #0x003f - 08ff 0086 0000 lri $IX2, #0x0000 - 0901 1406 lsl $ACC0, #6 - 0902 8900 clr $ACC1 - 0903 1fb8 mrr $AC1.L, $AX0.L - 0904 1505 lsl $ACC1, #5 - 0905 009b 003f lri $AX1.H, #0x003f - 0907 009a 0000 lri $AX0.H, #0x0000 - 0909 3600 andr $AC0.M, $AX1.H - 090a 1cde mrr $IX2, $AC0.M - 090b 001a addarn $AR2, $IX2 - 090c 3400 andr $AC0.M, $AX0.H - 090d 1150 0913 bloopi #0x50, 0x0913 - 090f 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0910 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0911 1cde mrr $IX2, $AC0.M - 0912 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0913 1b19 srri @$AR0, $AX1.L - 0914 1fc2 mrr $AC0.M, $AR2 - 0915 147a lsr $ACC0, #-6 - 0916 008a ffff lri $WR2, #0xffff - // 0918 02df ret -} - -void 0919_Decoder0x6_Constant(AR0, AX0.L) { - // case 0x6: Fills the buffer with PB.RatioInt (zero?) - - // 0919 1050 loopi #0x50 - // 091a 1b18 srri @$AR0, $AX0.L - - for(int i = 0; i < 0x50; i++) - *AR0++ = AX0.L; // PB.RatioInt - - // 091b 02df ret -} - -void 091c_Decoder0x7_WaveTable(ACC0, AR0, AX0.L) { - // So AR2 is where it reads the data from, and it updates ACC0 to the final read address in the end - // Questions: How does the wrap register change the data access? - - // 091c 0082 0100 lri $AR2, #0x0100 - // 091e 008a 003f lri $WR2, #0x003f - // 0920 0086 0000 lri $IX2, #0x0000 - // 0922 1406 lsl $ACC0, #6 - // 0923 8900 clr $ACC1 - // 0924 1fb8 mrr $AC1.L, $AX0.L - // 0925 1505 lsl $ACC1, #5 - - - WR2 = 0x003f; - ACC0 <<= 6; - ACC1 = AX0.L << 5; - - - // 0926 009b 003f lri $AX1.H, #0x003f - // 0928 009a 0000 lri $AX0.H, #0x0000 - // 092a 3600 andr $AC0.M, $AX1.H - // 092b 1cde mrr $IX2, $AC0.M - // 092c 001a addarn $AR2, $IX2 - // 092d 3400 andr $AC0.M, $AX0.H - - AC0.M &= 0x003f; - IX2 = AC0.M; - AR2 = 0x0100 + IX2; - - AC0.M = 0; - - - // 092e 1150 0934 bloopi #0x50, 0x0934 - for(int i = 0; i < 0x50; i++) { - // 0930 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - - ACC0 += ACC1; - AX1.L = *AR2++; - - // 0931 3606 andr'dr $AC0.M, $AX1.H : $AR2 - AC0.M &= 0x003f; - AR2--; - - // 0932 1cde mrr $IX2, $AC0.M - IX2 = AC0.M; - - // 0933 340e andr'nr $AC0.M, $AX0.H : $AR2 - AC0.M = 0; - AR2 += IX2; - - // 0934 1b19 srri @$AR0, $AX1.L - *AR0++ = AX1.L; - - } - - // 0935 1fc2 mrr $AC0.M, $AR2 - // 0936 147a lsr $ACC0, #-6 - // 0937 008a ffff lri $WR2, #0xffff - - AC0.M = AR2; - ACC0 >>= 6; - WR2 = 0xffff; - - // 0939 02df ret -} - -void 093a_Unk() { - 093a 0082 0100 lri $AR2, #0x0100 - 093c 008a 003f lri $WR2, #0x003f - 093e 0086 0000 lri $IX2, #0x0000 - 0940 0081 0ca0 lri $AR1, #0x0ca0 - 0942 1406 lsl $ACC0, #6 - 0943 8900 clr $ACC1 - 0944 1fb8 mrr $AC1.L, $AX0.L - 0945 1505 lsl $ACC1, #5 - 0946 009b 003f lri $AX1.H, #0x003f - 0948 009a 0000 lri $AX0.H, #0x0000 - 094a 3600 andr $AC0.M, $AX1.H - 094b 1cde mrr $IX2, $AC0.M - 094c 001a addarn $AR2, $IX2 - 094d 3400 andr $AC0.M, $AX0.H - 094e 1150 0959 bloopi #0x50, 0x0959 - 0950 1939 lrri $AX1.L, @$AR1 - 0951 a000 mulx $AX0.L, $AX1.L - 0952 140a lsl $ACC0, #10 - 0953 4e00 addp $ACC0 - 0954 1476 lsr $ACC0, #-10 - 0955 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0956 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0957 1cde mrr $IX2, $AC0.M - 0958 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0959 1b19 srri @$AR0, $AX1.L - 095a 1fc2 mrr $AC0.M, $AR2 - 095b 147a lsr $ACC0, #-6 - 095c 008a ffff lri $WR2, #0xffff - 095e 02df ret -} - -void 095f_Unk_SetupMemAt0_0180() { - 095f 0080 01be lri $AR0, #0x01be - 0961 1918 lrri $AX0.L, @$AR0 - 0962 191a lrri $AX0.H, @$AR0 - 0963 0080 0180 lri $AR0, #0x0180 - 0965 0083 0180 lri $AR3, #0x0180 - 0967 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0968 1ffe mrr $AC1.M, $AC0.M - // 0969 1120 0970 bloopi #0x20, 0x0970 - for (int i = 0; i < 0x20; i++) { - 096b 7c00 neg $ACC0 - 096c d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 096d 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 096e c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 096f 1501 lsl $ACC1, #1 - 0970 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - } - 0971 0080 01fe lri $AR0, #0x01fe - 0973 191a lrri $AX0.H, @$AR0 - 0974 1918 lrri $AX0.L, @$AR0 - 0975 0080 01c0 lri $AR0, #0x01c0 - 0977 0083 01c0 lri $AR3, #0x01c0 - 0979 1ff8 mrr $AC1.M, $AX0.L - 097a 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 097b f800 addpaxz $ACC0, $AX0.H - 097c 0240 01ff andi $AC0.M, #0x01ff - 097e 0260 2000 ori $AC0.M, #0x2000 - - //0980 02bf 0983 call 0x0983 - 0983_WriteRamp($ACC0, $ACC1, Dest($AR3)) - - // 0982 02df ret -} - -void 0983_WriteRamp(ACC0, ACC1, Dest($AR3)) { - // 0983 b900 tst $ACC1 - // 0984 0272 ifg - // 0985 7c00 neg $ACC0 - if ($ACC1 > 0) { - $ACC0 = -$ACC0; - } - - // 0986 1f7e mrr $AX1.H, $AC0.M - // 0987 4700 addr $ACC1, $AX1.H - - // 0988 1110 098d bloopi #0x10, 0x098d - for (int i = 0; i < 0x10; i++) { - 098a 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 098b 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 098c 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 098d 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - } - 098e 02df ret -} - -//////////////////////////////////////////// 0x08 DECODER -// Hardcoded destination 0x0580. -void Decoder0x08() { - 098f 0092 0004 lri $CR, #0x0004 - 0991 2002 lrs $AX0.L, @0x0002 - 0992 8100 clr $ACC0 - 0993 8900 clr $ACC1 - 0994 2430 lrs $AC0.L, @0x0030 // CurSampleFrac - - // 0995 8d00 set15 - // 0996 0950 lris $AX1.L, #0x50 - // 0997 a000 mulx $AX0.L, $AX1.L - // 0998 a400 mulxac $AX0.L, $AX1.L, $ACC0 - // 0999 1404 lsl $ACC0, #4 - // 099a 8c00 clr15 - // Compute how much data we need to read, to get 0x50 samples after resampling. - // AC0.L is cursamplefrace, AX0.L is ratio. - $ACC0 = PB.CurrentSampleFrac + 0x50 * PB.Ratio; - - 099b 1ffe mrr $AC1.M, $AC0.M - 099c 0083 0580 lri $AR3, #0x0580 - 099e 2201 lrs $AX0.H, @0x0001 - 099f 8600 tstaxh $AX0.H - 09a0 0294 09b1 jnz 0x09b1 - - // 09a2 2204 lrs $AX0.H, @0x0004 - // 09a3 8600 tstaxh $AX0.H - // 09a4 02b4 09f9 callne 0x09f9 - if (*0x0404) { // NeedsReset - 09f9_UpdateSampleCounters8(); - } - - 09a6 8100 clr $ACC0 - 09a7 2605 lrs $AC0.M, @0x0005 - 09a8 b100 tst $ACC0 - 09a9 0295 09be jz 0x09be - -label09ab: - 09ab 8100 clr $ACC0 - 09ac 2e05 srs @0x0005, $AC0.M - 09ad 2281 lrs $AX0.H, @0xff81 - 09ae 8600 tstaxh $AX0.H - 09af 0294 09b8 jnz 0x09b8 - 09b1 8100 clr $ACC0 - 09b2 005f loop $AC1.M - 09b3 1b7e srri @$AR3, $AC0.M - 09b4 7400 incm $AC0.M - 09b5 2e01 srs @0x0001, $AC0.M - 09b6 029f 09f2 jmp 0x09f2 - 09b8 2688 lrs $AC0.M, @0xff88 - 09b9 2489 lrs $AC0.L, @0xff89 - 09ba 2e34 srs @0x0034, $AC0.M - 09bb 2c35 srs @0x0035, $AC0.L - // 09bc 02bf 09f9 call 0x09f9 - 09f9_UpdateSampleCounters8(); - - 09be 00ff 0360 sr @0x0360, $AC1.M - - 09c0 2638 lrs $AC0.M, @0x0038 - 09c1 2439 lrs $AC0.L, @0x0039 - 09c2 0f05 lris $AC1.M, #0x05 // Sample format 5 - // 09c3 02bf 05ad call 0x05ad - 05ad_SetupAccelerator(AC0.M, AC0.L, AC1.M) - - 09c5 00df 0360 lr $AC1.M, @0x0360 - 09c7 8100 clr $ACC0 - // 09c8 263a lrs $AC0.M, @0x003a - // 09c9 b100 tst $ACC0 - // 09ca 0294 09d9 jnz 0x09d9 - if (*(0x043a)) { - 09cc 263b lrs $AC0.M, @0x003b - 09cd 5c00 sub $ACC0, $ACC1 - 09ce 0290 09d9 jge 0x09d9 - - 09d0 223b lrs $AX0.H, @0x003b - // 09d1 02bf 0a0a call 0x0a0a // Load more samples. - 0a0a_ReadFromAccelerator8To16(OutBuffer($AR3), Count($AX0.H)) - - 09d3 5500 subr $ACC1, $AX0.H - // 09d4 0a01 lris $AX0.H, #0x01 - // 09d5 00fa 0405 sr @0x0405, $AX0.H - *0x405 = 1; // PB.ReachedEnd = 1; - - 09d7 029f 09ab jmp 0x09ab - } - - 09d9 1f5f mrr $AX0.H, $AC1.M - // 09da 02bf 0a0a call 0x0a0a // Load more samples. - 0a0a_ReadFromAccelerator8To16(OutBuffer($AR3), Count($AX0.H)); - - // Stash AX0.H away, it gets read again at 09ef. - 09dc 00fa 0362 sr @0x0362, $AX0.H - - 09de 8100 clr $ACC0 - 09df 263a lrs $AC0.M, @0x003a - 09e0 243b lrs $AC0.L, @0x003b - 09e1 1570 lsr $ACC1, #-16 - - // 09e2 0a01 lris $AX0.H, #0x01 - // 09e3 0081 0405 lri $AR1, #0x0405 - // 09e5 5c00 sub $ACC0, $ACC1 - // 09e6 b100 tst $ACC0 - // 09e7 0275 ifz - // 09e8 1a3a srr @$AR1, $AX0.H - - ACC0 -= ACC1; - if(ACC0 == 0) - *0x405 = 1; // PB.ReachedEnd = 1 - - 09e9 2e3a srs @0x003a, $AC0.M - 09ea 2c3b srs @0x003b, $AC0.L - 09eb 2638 lrs $AC0.M, @0x0038 - 09ec 2439 lrs $AC0.L, @0x0039 - 09ed 00d8 0362 lr $AX0.L, @0x0362 - 09ef 7000 addaxl $ACC0, $AX0.L - 09f0 2c39 srs @0x0039, $AC0.L - 09f1 2e38 srs @0x0038, $AC0.M - - // 09f2 0092 00ff lri $CR, #0x00ff - // 09f4 029f 02d0 jmp 0x02d0 - GOTO Resample_From0580To0520: -} - - -// unreachable code -void Unreachable() { - 09f6 8100 clr $ACC0 - 09f7 2e34 srs @0x0034, $AC0.M - 09f8 2e35 srs @0x0035, $AC0.M -} - -void 09f9_UpdateSampleCounters8() { - 09f9 2334 lrs $AX1.H, @0x0034 - 09fa 2135 lrs $AX1.L, @0x0035 - 09fb 268a lrs $AC0.M, @0xff8a - 09fc 248b lrs $AC0.L, @0xff8b - 09fd 5a00 subax $ACC0, $AX1 - 09fe 2e3a srs @0x003a, $AC0.M - 09ff 2c3b srs @0x003b, $AC0.L - 0a00 2634 lrs $AC0.M, @0x0034 - 0a01 2435 lrs $AC0.L, @0x0035 - 0a02 238c lrs $AX1.H, @0xff8c - 0a03 218d lrs $AX1.L, @0xff8d - 0a04 4a00 addax $ACC0, $AX1 - 0a05 2e38 srs @0x0038, $AC0.M - 0a06 2c39 srs @0x0039, $AC0.L - 0a07 8100 clr $ACC0 - 0a08 2e05 srs @0x0005, $AC0.M - // 0a09 02df ret -} - -void 0a0a_ReadFromAccelerator8To16(OutBuffer($AR3), Count($AX0.H)) { - // Read from ARAM. Convert 8-bit samples to 16-bit. - // 0a0a 0080 ffd3 lri $AR0, #0xffd3 - // 0a0c 0084 0000 lri $IX0, #0x0000 - // 0a0e 007a 0a12 bloop $AX0.H, 0x0a12 - // 0a10 199e lrrn $AC0.M, @$AR0 - // 0a11 1488 asl $ACC0, #8 - // 0a12 1b7e srri @$AR3, $AC0.M - // 0a13 02df ret - for (int i = 0; i < $AX0.H; i++) { - *($AR3++) = (*0xffd3) << 8; // ffd3 is the non-adpcm alternative read address for the accelerator. - } -} - - -//////////////////////////////////////////// 0x10 DECODER -// Hardcoded destination 0x0580. -// This should be the easiest decoder to decipher in full -- except the really -// trivial ones like the synths. -// It's almost identical to Decoder0x08 -void Decoder0x10() { - // 0a14 0092 0004 lri $CR, #0x0004 - 0a16 2002 lrs $AX0.L, @0x0002 - 0a17 8100 clr $ACC0 - 0a18 8900 clr $ACC1 - // 0a19 2430 lrs $AC0.L, @0x0030 - 0a1a 8d00 set15 - - // 0a1b 0950 lris $AX1.L, #0x50 - // 0a1c a000 mulx $AX0.L, $AX1.L - // 0a1d a400 mulxac $AX0.L, $AX1.L, $ACC0 - // 0a1e 1404 lsl $ACC0, #4 - // 0a1f 8c00 clr15 - - // Compute how much data we need to read, to get 0x50 samples after resampling. - // AC0.L is cursamplefrac, AX0.L is ratio. - $ACC0 = (PB.CurrentSampleFrac + 0x50 * PB.Ratio) << 4; - - 0a20 1ffe mrr $AC1.M, $AC0.M - 0a21 0083 0580 lri $AR3, #0x0580 - 0a23 2201 lrs $AX0.H, @0x0001 - 0a24 8600 tstaxh $AX0.H - 0a25 0294 0a36 jnz 0x0a36 /// Jump! See jump destination below. - - 0a27 2204 lrs $AX0.H, @0x0004 - 0a28 8600 tstaxh $AX0.H - 0a29 02b4 0a7f callne 0x0a7f - if (*0x0404) // "NeedsReset" - { - 0a7f_UpdateSampleCounters10() - } - - 0a2b 8100 clr $ACC0 - - 0a2c 2605 lrs $AC0.M, @0x0005 - 0a2d b100 tst $ACC0 - 0a2e 0295 0a43 jz 0x0a43 - if (*0x405) { - - retry_0a30: - 0a30 8100 clr $ACC0 - 0a31 2e05 srs @0x0005, $AC0.M - 0a32 2281 lrs $AX0.H, @0xff81 - 0a33 8600 tstaxh $AX0.H - 0a34 0294 0a3d jnz 0x0a3d - if (!*401) { //// <<<<<<<<<<<< Jump destination - 0a36 8100 clr $ACC0 - 0a37 005f loop $AC1.M - 0a38 1b7e srri @$AR3, $AC0.M - 0a39 7400 incm $AC0.M - 0a3a 2e01 srs @0x0001, $AC0.M - 0a3b 029f 0a78 jmp 0x0a78 // quit - } else { - // Copy [88,89] to [34,35] - 0a3d 2688 lrs $AC0.M, @0xff88 - 0a3e 2489 lrs $AC0.L, @0xff89 - 0a3f 2e34 srs @0x0034, $AC0.M - 0a40 2c35 srs @0x0035, $AC0.L - 0a41 02bf 0a7f call 0x0a7f - 0a7f_UpdateSampleCounters10() - } - } - - 0a43: - 0a43 00ff 0360 sr @0x0360, $AC1.M - 0a45 2638 lrs $AC0.M, @0x0038 - 0a46 2439 lrs $AC0.L, @0x0039 - 0a47 0f06 lris $AC1.M, #0x06 // Sample format 6 - // 0a48 02bf 05ad call 0x05ad - 05ad_SetupAccelerator(AC0.M, AC0.L, AC1.M) - - 0a4a 00df 0360 lr $AC1.M, @0x0360 - 0a4c 8100 clr $ACC0 - 0a4d 263a lrs $AC0.M, @0x003a - 0a4e b100 tst $ACC0 - 0a4f 0294 0a5e jnz 0x0a5e - if (!*0x043a) { - 0a51 263b lrs $AC0.M, @0x003b - 0a52 5c00 sub $ACC0, $ACC1 - 0a53 0290 0a5e jge 0x0a5e - if (0x43b <= ACC1) { // not sure, but .. not enough samples? - 0a55 223b lrs $AX0.H, @0x003b - // 0a56 02bf 0a91 call 0x0a91 // Read more samples - 0a91_ReadFromAccelerator(OutBuffer($AR3), Count($AX0.H)); - 0a58 5500 subr $ACC1, $AX0.H - // 0a59 0a01 lris $AX0.H, #0x01 - // 0a5a 00fa 0405 sr @0x0405, $AX0.H - *0x405 = 1; // PB.ReachedEnd - - 0a5c 029f 0a30 jmp 0x0a30 // GOTO retry_0a30; - } - } - - 0a5e 1f5f mrr $AX0.H, $AC1.M - // 0a5f 02bf 0a91 call 0x0a91 // Read more samples - 0a91_ReadFromAccelerator(OutBuffer($AR3), Count($AX0.H)) - - // Stash AX0.H away, it gets read again at 0a72. - 0a61 00fa 0362 sr @0x0362, $AX0.H - - 0a63 8100 clr $ACC0 - 0a64 263a lrs $AC0.M, @0x003a - 0a65 243b lrs $AC0.L, @0x003b - 0a66 1570 lsr $ACC1, #-16 - // 0a67 0a01 lris $AX0.H, #0x01 - // 0a68 0081 0405 lri $AR1, #0x0405 - // 0a6a 5c00 sub $ACC0, $ACC1 - // 0a6b b100 tst $ACC0 - // 0a6c 0275 ifz - // 0a6d 1a3a srr @$AR1, $AX0.H - - ACC0 -= ACC1; - if(ACC0 == 0) - *0x405 = 1; // PB.ReachedEnd = 1 - - 0a6e 2e3a srs @0x003a, $AC0.M - 0a6f 2c3b srs @0x003b, $AC0.L - 0a70 2638 lrs $AC0.M, @0x0038 - 0a71 2439 lrs $AC0.L, @0x0039 - 0a72 00d8 0362 lr $AX0.L, @0x0362 - 0a74 7000 addaxl $ACC0, $AX0.L - 0a75 7000 addaxl $ACC0, $AX0.L - 0a76 2c39 srs @0x0039, $AC0.L - 0a77 2e38 srs @0x0038, $AC0.M - - // 0a78 0092 00ff lri $CR, #0x00ff - // 0a7a 029f 02d0 jmp 0x02d0 - GOTO Resample_From0580To0520: -} - -void 0a7c_UnkUnused() { - 0a7c 8100 clr $ACC0 - 0a7d 2e34 srs @0x0034, $AC0.M - 0a7e 2e35 srs @0x0035, $AC0.M - -// used by 0x10 decoder -void 0a7f_UpdateSampleCounters10() { - 0a7f 2334 lrs $AX1.H, @0x0034 - 0a80 2135 lrs $AX1.L, @0x0035 - 0a81 268a lrs $AC0.M, @0xff8a - 0a82 248b lrs $AC0.L, @0xff8b - 0a83 5a00 subax $ACC0, $AX1 // Subtract [34,35] from [8a, 8b] - 0a84 2e3a srs @0x003a, $AC0.M - 0a85 2c3b srs @0x003b, $AC0.L - 0a86 2634 lrs $AC0.M, @0x0034 - 0a87 2435 lrs $AC0.L, @0x0035 - 0a88 1401 lsl $ACC0, #1 // This shift is not done in UpdateSampleCounters8. - 0a89 238c lrs $AX1.H, @0xff8c - 0a8a 218d lrs $AX1.L, @0xff8d - 0a8b 4a00 addax $ACC0, $AX1 // Add [34,35]<<1 to [8c, 8d] - 0a8c 2e38 srs @0x0038, $AC0.M - 0a8d 2c39 srs @0x0039, $AC0.L - 0a8e 8100 clr $ACC0 - 0a8f 2e05 srs @0x0005, $AC0.M - 0a90 02df ret -} - - -// Read AX0.H samples from the accelerator. -void 0a91_ReadFromAccelerator(OutBuffer($AR3), Count($AX0.H)) { - // 0a91 0080 ffd3 lri $AR0, #0xffd3 - // 0a93 0084 0000 lri $IX0, #0x0000 - // 0a95 007a 0a98 bloop $AX0.H, 0x0a98 - // 0a97 199e lrrn $AC0.M, @$AR0 - // 0a98 1b7e srri @$AR3, $AC0.M - // 0a99 02df ret - - for (int i = 0; i < $AX0.H; i++) { - *($AR3++) = *0xffd3; // ffd3 is the non-adpcm alternative read address for the accelerator. - } -} - -//////////////////////////////////////////// 0x20 DECODER -// Same as 0x21 but with no resampling. -{ - // 0a9a 8900 clr $ACC1 - // 0a9b 0f50 lris $AC1.M, #0x50 - // 0a9c 0083 0520 lri $AR3, #0x0520 - // 0a9e 02bf 0ab3 call 0x0ab3 - - ACC1 = 0; - AC1.M = 0x50; - AR3 = 0x520; - - 0ab3_Decoder0x21Core(AC1.M=0x50, AR3=#0x0520); - - // 0aa0 029f 02d8 jmp 0x02d8 - GOTO ContinueWithBlock: // in SyncFrame -} - -//////////////////////////////////////////// 0x21 DECODER -void 0aa2_Decoder0x21() { - // 0aa2 00d8 0402 lr $AX0.L, @0x0402 - // 0aa4 8100 clr $ACC0 - // 0aa5 8900 clr $ACC1 - AX0.L = *0x0402; - ACC0 = 0 - ACC1 = 0 - // 0aa6 00dc 0430 lr $AC0.L, @0x0430 - // 0aa8 0a50 lris $AX0.H, #0x50 - // 0aa9 9000 mul $AX0.L, $AX0.H - // 0aaa 9400 mulac $AX0.L, $AX0.H, $ACC0 - // 0aab 1404 lsl $ACC0, #4 - ACC0 = (*0x0430 + (*0x0402 * 0x50)) << 4; - - // 0aac 1ffe mrr $AC1.M, $AC0.M - ACC1 = ACC0 & 0xFFFF0000; - - // 0aad 0083 0580 lri $AR3, #0x0580 - // 0aaf 02bf 0ab3 call 0x0ab3 // 0ab3_Decoder0x21Core - 0ab3_Decoder0x21Core(AC1.M, AR3=#0x0580); - - // 0ab1 029f 02d0 jmp 0x02d0 - GOTO Resample_From0580To0520: -} - -// 0x21 Decoder Core -// Decoder 0x21 simply streams raw audio from RAM (not ARAM!) by using DMA. -// Lots of buffer wrap trickery etc but no actual decoding. -void 0ab3_Decoder0x21Core(AC1.M, AR3) { - // 0ab3 0092 0004 lri $CR, #0x0004 - // 0ab5 8100 clr $ACC0 - // 0ab6 263a lrs $AC0.M, @0x003a - // 0ab7 243b lrs $AC0.L, @0x003b - // 0ab8 1f1f mrr $AX0.L, $AC1.M - // 0ab9 0a00 lris $AX0.H, #0x00 - // 0aba 5800 subax $ACC0, $AX0 - ACC0 = [0x043a,0x043b]; - ACC0 -= AC1.M; - - - // 0abb 0292 0ad1 jg 0x0ad1 - if ([0x043a,0x043b] <= AC1.M) { - // Happens when sound has finished playing? - - // 0abd 8900 clr $ACC1 - // 0abe 00c0 043b lr $AR0, @0x043b - ACC1 = 0; - AR0 = *0x043b; - - // 0ac0 02bf 0af6 call 0x0af6 // 0af6_Decoder0x21_MoreStuff() - 0af6_Decoder0x21_MoreStuff(AR0=*0x043b, AR3); - - // 0ac2 8100 clr $ACC0 - // 0ac3 1fd8 mrr $AC0.M, $AX0.L - // 0ac4 223b lrs $AX0.H, @0x003b - // 0ac5 5400 subr $ACC0, $AX0.H - // 0ac6 0007 dar $AR3 - // 0ac7 1979 lrri $AX1.L, @$AR3 - - ACC0 = 0; - AX0.H = *0x043b; - AC0.M = AX0.L - *0x043b; - - AX1.L = *$AR3; - - // Looks like duplication of the first memory address AC0.M times - - // 0ac8 005e loop $AC0.M - for(int i = 0; i < AC0.M; i++) { - // 0ac9 1b79 srri @$AR3, $AX1.L - *$AR3++ = AX1.L; - } - - // 0aca 0f01 lris $AC1.M, #0x01 - // 0acb 2f01 srs @0x0001, $AC1.M - // 0acc 8900 clr $ACC1 - // 0acd 2f3b srs @0x003b, $AC1.M - - ACC1 = 0; - - // Looks like some finalization of the PB - *0x0401 = 1; // KeyOff - *0x043b = 0; // RemLength - - - 0ace 0092 00ff lri $CR, #0x00ff - //0ad0 02df ret - return; - } - - // 0ad1 2e3a srs @0x003a, $AC0.M - // 0ad2 2c3b srs @0x003b, $AC0.L - - *0x043a = AC0.M; - *0x043b = AC0.L; - - // 0ad3 8100 clr $ACC0 - // 0ad4 8900 clr $ACC1 - // 0ad5 268a lrs $AC0.M, @0xff8a - // 0ad6 2734 lrs $AC1.M, @0x0034 - - ACC0 = 0; - ACC1 = 0; - AC0.M = *0x048a; - AC1.M = *0x0434; - - // 0ad7 5c00 sub $ACC0, $ACC1 - // 0ad8 2e36 srs @0x0036, $AC0.M - - ACC0 -= AC1.L; - *0x0436 = (ACC0 & 0xFFFF0000) >> 16; - - // 0ad9 5000 subr $ACC0, $AX0.L - ACC0 -= AX0.L; - - 0ada 0290 0af0 jge 0x0af0 - if (ACC0 < 0) { - // 0adc 00c0 0436 lr $AR0, @0x0436 - // 0ade 02bf 0af6 call 0x0af6 - 0af6_Decoder0x21_MoreStuff(AR0=*0x0436, AR3); - - // 0ae0 8100 clr $ACC0 - // 0ae1 1fd8 mrr $AC0.M, $AX0.L - - ACC0 = 0; - AC0.M = AX0.L; - - // 0ae2 2236 lrs $AX0.H, @0x0036 // 0x0436 - AX0.H = *0x0436; - - // 0ae3 5400 subr $ACC0, $AX0.H - // 0ae4 1c1e mrr $AR0, $AC0.M - // 0ae5 8100 clr $ACC0 - // 0ae6 2e34 srs @0x0034, $AC0.M - - ACC0 -= AX0.H; - AR0 = (ACC0 & 0xFFFF0000) >> 16; - ACC0 = 0; - *0x0434 = 0; - - // 0ae7 2688 lrs $AC0.M, @0xff88 // 0x0488 - // 0ae8 2489 lrs $AC0.L, @0xff89 // 0x0489 - // 0ae9 2e8c srs @0xff8c, $AC0.M - // 0aea 2c8d srs @0xff8d, $AC0.L - - *0x048c = *0x0488; - *0x048d = *0x0489; - - // 0aeb 02bf 0af6 call 0x0af6 - 0af6_Decoder0x21_MoreStuff(AR0=*0x0436, AR3); - - 0aed 0092 00ff lri $CR, #0x00ff - // 0aef 02df ret - return; - } - - // 0af0 1c18 mrr $AR0, $AX0.L - // 0af1 02bf 0af6 call 0x0af6 - - AR0 = AX0.L; - 0af6_Decoder0x21_MoreStuff(AR0=AX0.L, AR3); - - 0af3 0092 00ff lri $CR, #0x00ff - // 0af5 02df ret -} - - - -// CR = 0x4 -// Does strange stuff with PB[0x34] and the address PB[0x8c,d] -// Does not touch AX0.L -void 0af6_Decoder0x21_MoreStuff($AR0, $AR3) { - // 0af6 8100 clr $ACC0 - // 0af7 1fc0 mrr $AC0.M, $AR0 - // 0af8 b100 tst $ACC0 - // 0af9 02d5 retz - if (!AR0) - return; - - // 0afa 8900 clr $ACC1 - // 0afb 2734 lrs $AC1.M, @0x0034 - // 0afc 0340 0001 andi $AC1.M, #0x0001 - // 0afe 0b00 lris $AX1.H, #0x00 - // 0aff 1f3f mrr $AX1.L, $AC1.M - - AX1.L = *0x0434 & 1; - - // 0b00 268c lrs $AC0.M, @0xff8c - // 0b01 248d lrs $AC0.L, @0xff8d - // 0b02 8900 clr $ACC1 - // 0b03 2534 lrs $AC1.L, @0x0034 - // 0b04 1501 lsl $ACC1, #1 - // 0b05 4c00 add $ACC0, $ACC1 - - // 0b06 5a00 subax $ACC0, $AX1 - // 0b07 5a00 subax $ACC0, $AX1 - - ACC0 = [8c,8d] + *0x0434 * 2 - ((*0x0434 & 1) * 2); - - // 0b08 1c20 mrr $AR1, $AR0 - - AR1 = AR0; - - // 0b09 1fe0 mrr $AC1.M, $AR0 - // 0b0a 0502 addis $ACC1, #0x02 - ACC1 = ($AR0 << 16) + 0x20000; - - // - // 0b0b 1c1f mrr $AR0, $AC1.M - // 0b0c 009f 0b00 lri $AC1.M, #0x0b00 - 0b0e 0092 00ff lri $CR, #0x00ff - - AR0 = AC1.M; - AC1.M = 0x0b00; - - // Load more audio from RAM by DMA?? - - // 0b10 02bf 0525 call 0x0525 // 0525_CopyRAMtoDMEM - 0525_CopyRAMtoDMEM($AR1 == $ACC1 >> 16, 0x0b00, $AR0) - - // 0b12 0092 0004 lri $CR, #0x0004 - - // 0b14 2734 lrs $AC1.M, @0x0034 - // 0b15 1f61 mrr $AX1.H, $AR1 - // 0b16 4700 addr $ACC1, $AX1.H - // 0b17 2f34 srs @0x0034, $AC1.M - *0x0434 += AR1; - - // 0b18 0080 0b00 lri $AR0, #0x0b00 - // 0b1a 8900 clr $ACC1 - // 0b1b 1ff9 mrr $AC1.M, $AX1.L - // 0b1c b900 tst $ACC1 - // 0b1d 0274 ifnz - if (AX1.L) { - // 0b1e 0008 iar $AR0 - $AR0++; - } - // 0b1f 8900 clr $ACC1 - // 0b20 1fe1 mrr $AC1.M, $AR1 - // 0b21 191e lrri $AC0.M, @$AR0 - // 0b22 0701 cmpis $ACC1, #0x01 - ACC1 = 0; - AC1.M = AR1; - AC0.M = *$AR0++; - // 0b23 0293 0b2c jle 0x0b2c - if (AC1.M > 1) { - // 0b25 191a lrri $AX0.H, @$AR0 - // 0b26 05fe addis $ACC1, #0xfe - AX0.H = *$AR0++; - ACC1 += 0xfe0000; - - // 0b27 005f loop $AC1.M - for(int i = 0; i < AC1.M; i++) { - // 0b28 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - AC0.L = 0; - AC0.H = AX0.H; - AC0.M = AX0.H; - AX0.H = *$AR0++; - *$AR3++ = AC0.M; - } - //0b29 1b7e srri @$AR3, $AC0.M - //0b2a 1b7a srri @$AR3, $AX0.H - //0b2b 02df ret - - *$AR3++ = AC0.M; - *$AR3++ = AX0.H; - } else { - //0b2c 1b7e srri @$AR3, $AC0.M - //0b2d 02df ret - *$AR3++ = AC0.M; - } -} - - -void 0b2e_Unk_Multiply() { // ZWW: 01c2_Unk - 0b2e 8a00 m2 - 0b2f 0083 03e8 lri $AR3, #0x03e8 - 0b31 191e lrri $AC0.M, @$AR0 - 0b32 191a lrri $AX0.H, @$AR0 - 0b33 1006 loopi #0x06 - 0b34 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0b35 1b7e srri @$AR3, $AC0.M - 0b36 1b7a srri @$AR3, $AX0.H - 0b37 0080 03e8 lri $AR0, #0x03e8 - 0b39 0088 0007 lri $WR0, #0x0007 - 0b3b 1150 0b48 bloopi #0x50, 0x0b48 - for (int i = 0; i < 0x50; i++) { - 0b3d 1c61 mrr $AR3, $AR1 - 0b3e 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0b3f f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b40 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b41 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b42 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b43 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b44 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b45 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b46 f200 madd $AX0.L, $AX0.H - 0b47 fe00 movpz $ACC0 - 0b48 1b3e srri @$AR1, $AC0.M - } - 0b49 0088 ffff lri $WR0, #0xffff - 0b4b 8b00 m0 - 0b4c 02df ret -} - -// looks kind of like a IIR filter? -// Hardcoded buffer length = 0x50 -void 0b4d_IIR_Filter(InBuffer($AR0), OutBuffer($AR1), FilterLength(AC1.M)) { - 0b4d 8a00 m2 - 0b4e 05fe addis $ACC1, #0xfe - 0b4f 0083 03e8 lri $AR3, #0x03e8 - 0b51 191e lrri $AC0.M, @$AR0 - 0b52 191a lrri $AX0.H, @$AR0 - 0b53 005f loop $AC1.M - 0b54 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - - 0b55 1b7e srri @$AR3, $AC0.M - 0b56 1b7a srri @$AR3, $AX0.H - 0b57 0080 03e8 lri $AR0, #0x03e8 - 0b59 0501 addis $ACC1, #0x01 - 0b5a 1d1f mrr $WR0, $AC1.M - // 0b5b 1150 0b63 bloopi #0x50, 0x0b63 - for (int i = 0; i < 0x50; i++) { - 0b5d 1c61 mrr $AR3, $AR1 - 0b5e 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0b5f 005f loop $AC1.M - 0b60 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0b61 f200 madd $AX0.L, $AX0.H - 0b62 fe00 movpz $ACC0 - 0b63 1b3e srri @$AR1, $AC0.M - } - 0b64 0088 ffff lri $WR0, #0xffff - 0b66 8b00 m0 - 0b67 02df ret -} - -// Looks like a 4-tap FIR filter. -// Hardcoded buffer length = 0x50 -// Uses 0x03e8 as some scratch space, i think . -void 0b68_4TapFIR(InBuffer($AR2), FilterBuffer($AR0), OutBuffer($AR1)) { - 0b68 0083 03e8 lri $AR3, #0x03e8 - 0b6a 191e lrri $AC0.M, @$AR0 - 0b6b 191a lrri $AX0.H, @$AR0 - 0b6c 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0b6d 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0b6e 1b7e srri @$AR3, $AC0.M - 0b6f 1b7a srri @$AR3, $AX0.H - 0b70 0080 03e8 lri $AR0, #0x03e8 - 0b72 0088 0003 lri $WR0, #0x0003 // That's a short wrap - filter coefs? - 0b74 0085 0000 lri $IX1, #0x0000 - 0b76 0087 0000 lri $IX3, #0x0000 - 0b78 1fc2 mrr $AC0.M, $AR2 - 0b79 195b lrri $AX1.H, @$AR2 - 0b7a 1959 lrri $AX1.L, @$AR2 - 0b7b 195f lrri $AC1.M, @$AR2 - 0b7c 195a lrri $AX0.H, @$AR2 - 0b7d 1c5e mrr $AR2, $AC0.M - 0b7e 1fda mrr $AC0.M, $AX0.H - 0b7f 1c61 mrr $AR3, $AR1 - 0b80 8a00 m2 - 0b81 8f00 set40 - 0b82 191a lrri $AX0.H, @$AR0 - 0b83 b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0b84 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0b85 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0b86 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0b87 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0b88 1127 0b93 bloopi #0x27, 0x0b93 - for (int i = 0; i < 0x27; i++) { - 0b8a e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M // end of first iteration - - 0b8b 197e lrri $AC0.M, @$AR3 - 0b8c e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0b8d eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0b8e bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0b8f e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M // e - - 0b90 197f lrri $AC1.M, @$AR3 // start of first iteration - 0b91 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0b92 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0b93 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - } - 0b94 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0b95 197e lrri $AC0.M, @$AR3 - 0b96 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0b97 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0b98 bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 0b99 1bff srrn @$AR3, $AC1.M - 0b9a 197f lrri $AC1.M, @$AR3 - 0b9b 8e00 set16 - 0b9c 8b00 m0 - 0b9d 0088 ffff lri $WR0, #0xffff - 0b9f 1b5b srri @$AR2, $AX1.H - 0ba0 1b59 srri @$AR2, $AX1.L - 0ba1 1b5f srri @$AR2, $AC1.M - 0ba2 1b5e srri @$AR2, $AC0.M - 0ba3 02df ret -} - -// Fixed length 0x50. -void 0ba4_UnknownFilter(params($AR0), buffer($AR1), filter_state($AR2)) { - 0ba4 0083 03e8 lri $AR3, #0x03e8 - - // Load 4 parameters from *$AR0, copy them into the tiny ring buffer - // later handled by $AR0/$WR0 (filter state?) - 0ba6 191e lrri $AC0.M, @$AR0 - 0ba7 191a lrri $AX0.H, @$AR0 - 0ba8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0ba9 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0baa 1b7e srri @$AR3, $AC0.M - 0bab 1b7a srri @$AR3, $AX0.H - 0bac 0080 03e8 lri $AR0, #0x03e8 - 0bae 0088 0003 lri $WR0, #0x0003 // That's a short wrap - filter coefs? - 0bb0 0085 0000 lri $IX1, #0x0000 - 0bb2 0087 0000 lri $IX3, #0x0000 - - // Load more parameters from *$AR2 - 0bb4 1fc2 mrr $AC0.M, $AR2 - 0bb5 195b lrri $AX1.H, @$AR2 - 0bb6 1959 lrri $AX1.L, @$AR2 - 0bb7 195f lrri $AC1.M, @$AR2 - 0bb8 195a lrri $AX0.H, @$AR2 - - 0bb9 1c5e mrr $AR2, $AC0.M - 0bba 1fda mrr $AC0.M, $AX0.H - - // Setup AR3, now ready to read in data. - 0bbb 1c61 mrr $AR3, $AR1 - 0bbc 8a00 m2 - 0bbd 8f00 set40 - - // Start the pipeline - 0bbe 191a lrri $AX0.H, @$AR0 - 0bbf b800 mulx $AX0.H, $AX1.H - 0bc0 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0bc1 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0bc2 ea00 maddc $AC1.M, $AX1.L - 0bc3 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0bc4 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0bc5 ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0bc6 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - - 0bc7 1127 0bd8 bloopi #0x27, 0x0bd8 - // (half of 0x50) - 1, -1 due to the software pipelining. - for (int i = 0; i < 0x27; i++) { - 0bc9 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0bca e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - - 0bcb 197e lrri $AC0.M, @$AR3 - 0bcc e800 maddc $AC0.M, $AX1.L - 0bcd e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0bce ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0bcf eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0bd0 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0bd1 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0bd2 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - - 0bd3 197f lrri $AC1.M, @$AR3 - 0bd4 ea00 maddc $AC1.M, $AX1.L - 0bd5 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0bd6 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0bd7 ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0bd8 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - } - 0bd9 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0bda e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - - 0bdb 197e lrri $AC0.M, @$AR3 - 0bdc e800 maddc $AC0.M, $AX1.L - 0bdd e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0bde ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0bdf eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0be0 bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0be1 1bff srrn @$AR3, $AC1.M - - 0be2 197f lrri $AC1.M, @$AR3 - 0be3 8e00 set16 - 0be4 8b00 m0 - 0be5 0088 ffff lri $WR0, #0xffff - 0be7 1b5b srri @$AR2, $AX1.H - 0be8 1b59 srri @$AR2, $AX1.L - 0be9 1b5f srri @$AR2, $AC1.M - 0bea 1b5e srri @$AR2, $AC0.M - // 0beb 02df ret -} - -void 0bec_Unk() { - // 0bec 0eff lris $AC0.M, #0xff - // 0bed 00fe 03f2 sr @0x03f2, $AC0.M - *0x03f2 = 0xFF - - // 0bef 8100 clr $ACC0 - // 0bf0 00fe 03f0 sr @0x03f0, $AC0.M - // 0bf2 00fe 03f6 sr @0x03f6, $AC0.M - *0x03f0 = 0x00 - *0x03f6 = 0x00 - - // 0bf4 009e 0100 lri $AC0.M, #0x0100 - // 0bf6 00fe 03f7 sr @0x03f7, $AC0.M - *0x03f7 = 0x100 - - 0bf8 00da 03f7 lr $AX0.H, @0x03f7 - 0bfa 009e 8000 lri $AC0.M, #0x8000 - 0bfc 5400 subr $ACC0, $AX0.H - 0bfd 00fe 03f5 sr @0x03f5, $AC0.M - - // 0bff 0e30 lris $AC0.M, #0x30 - // 0c00 00fe 03f3 sr @0x03f3, $AC0.M - *0x03f3 = 0x0030 - - // 0c02 0e10 lris $AC0.M, #0x10 - // 0c03 00fe 03f4 sr @0x03f4, $AC0.M - *0x03f5 = 0x0010 - - // 0c05 009e 0096 lri $AC0.M, #0x0096 - // 0c07 00fe 03f1 sr @0x03f1, $AC0.M - *0x03f1 = 0x0096 - - // 0c09 02df ret -} - -void 0c0a_Unk() { - // 0c0a 0080 0a00 lri $AR0, #0x0a00 - // 0c0c 8100 clr $ACC0 - // 0c0d 00de 03f0 lr $AC0.M, @0x03f0 - // 0c0f 8900 clr $ACC1 - // 0c10 b100 tst $ACC0 - - // 0c11 0275 ifz - // 0c12 0550 addis $ACC1, #0x50 - $AC0.M = *(0x03f0); - if (*(0x03f0) == 0) { - $ACC1 = 0x50 << 16; - } - // 0c13 00ff 03f0 sr @0x03f0, $AC1.M - *(0x03f0) = $ACC1; - - // 0c15 0200 0a60 addi $AC0.M, #0x0a60 - // 0c17 1c7e mrr $AR3, $AC0.M - // 0c18 0f4e lris $AC1.M, #0x4e - - $AC0.M += 0xa60; - $AR3 = $AC0.M - $AC1.M = 0x4e; - - // 0c19 02bf 00da call 0x00da - 00da_CopyBuffer(src=0x0a00, dst=$AC0.M, #0x4e) - - // 0c1b 02df ret -} - -// The control flow of this thing is NOT easy ... -// Reads from buffer at 0x0a60 -// Writes to buffer at 0x0a00 -void 0c1c_ComputeReverbFrom0a60To0a00() -{ - // 0c1c 00de 03f1 lr $AC0.M, @0x03f1 - // 0c1e 0200 0a60 addi $AC0.M, #0x0a60 - // 0c20 1c7e mrr $AR3, $AC0.M - $AR3 = 0x0a60 + *(0x03f1); - - 0c21 8100 clr $ACC0 - 0c22 8900 clr $ACC1 - 0c23 009f 00a0 lri $AC1.M, #0x00a0 - 0c25 00de 03f1 lr $AC0.M, @0x03f1 - 0c27 5d00 sub $ACC1, $ACC0 - 0c28 0e50 lris $AC0.M, #0x50 - 0c29 0750 cmpis $ACC1, #0x50 - 0c2a 0270 ifge - 0c2b 5d00 sub $ACC1, $ACC0 - 0c2c 00da 03f2 lr $AX0.H, @0x03f2 - 0c2e 8600 tstaxh $AX0.H - 0c2f 0290 0c4d jge 0x0c4d - 0c31 00de 03f3 lr $AC0.M, @0x03f3 - 0c33 5c00 sub $ACC0, $ACC1 - 0c34 0293 0c38 jle 0x0c38 - 0c36 029f 0c52 jmp 0x0c52 // done: - - 0c38 00db 03f7 lr $AX1.H, @0x03f7 - 0c3a 009e 8000 lri $AC0.M, #0x8000 - 0c3c 4600 addr $ACC0, $AX1.H - 0c3d 029f 0c44 jmp 0x0c44 - - 0c3f 00db 03f7 lr $AX1.H, @0x03f7 - 0c41 009e 8000 lri $AC0.M, #0x8000 - 0c43 5600 subr $ACC0, $AX1.H - - 0c44 00fe 03f5 sr @0x03f5, $AC0.M - 0c46 1fda mrr $AC0.M, $AX0.H - 0c47 7c00 neg $ACC0 - 0c48 1f5e mrr $AX0.H, $AC0.M - 0c49 00fe 03f2 sr @0x03f2, $AC0.M - 0c4b 029f 0c52 jmp 0x0c52 // done: - - 0c4d 00de 03f4 lr $AC0.M, @0x03f4 - 0c4f 5d00 sub $ACC1, $ACC0 - 0c50 0293 0c3f jle 0x0c3f - -done: - 0c52 8900 clr $ACC1 - 0c53 00dd 03f5 lr $AC1.L, @0x03f5 - 0c55 1501 lsl $ACC1, #1 - 0c56 8100 clr $ACC0 - 0c57 00dc 03f6 lr $AC0.L, @0x03f6 - 0c59 008b 009f lri $WR3, #0x009f // 0xa0 wrap - 0c5b 0080 0a00 lri $AR0, #0x0a00 - 0c5d 0900 lris $AX1.L, #0x00 - - // This is the loop that used to go crazy in the LLE emulation - // before we fixed addarn to obey the wrapping register. - - // Feels like some crazy delay function with a slowly drifting delay time. - - // Could this be part of a reverb? Or just a flanger? - - // 0c5e 1150 0c65 bloopi #0x50, 0x0c65 - for (int i = 0; i < 0x50; i++) { - 0c60 1878 lrr $AX0.L, @$AR3 - 0c61 4c00 add $ACC0, $ACC1 - 0c62 1cfe mrr $IX3, $AC0.M - 0c63 001f addarn $AR3, $IX3 - 0c64 1fd9 mrr $AC0.M, $AX1.L - 0c65 1b18 srri @$AR0, $AX0.L - - $AX0.L = *AR3; - $ACC0 += $ACC1; - $IX3 = $AC0.M; - $AR3 += $IX3; - $AC0.M = $AX1.L; - *(AR0++) = $AX0.L; - } - - 0c66 009f 0a60 lri $AC1.M, #0x0a60 - 0c68 1fc3 mrr $AC0.M, $AR3 - 0c69 5c00 sub $ACC0, $ACC1 - 0c6a 00fe 03f1 sr @0x03f1, $AC0.M - 0c6c 00fc 03f6 sr @0x03f6, $AC0.L - 0c6e 008b ffff lri $WR3, #0xffff // restore wrap - // 0c70 02df ret -} - - -void 0c71_AddBufferA00ToD60AndD00() -{ - // 0c71 0f50 lris $AC1.M, #0x50 - // 0c72 0080 0a00 lri $AR0, #0x0a00 - // 0c74 0083 0d60 lri $AR3, #0x0d60 - // 0c76 0098 3fff lri $AX0.L, #0x3fff - // 0c78 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(0x0a00, 0x0d60, 0x50, 0x3fff) - - // 0c7a 0f50 lris $AC1.M, #0x50 - // 0c7b 0080 0a00 lri $AR0, #0x0a00 - // 0c7d 0083 0d00 lri $AR3, #0x0d00 - // 0c7f 0098 3fff lri $AX0.L, #0x3fff - // 0c81 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(0x0a00, 0x0d00, 0x50, 0x3fff) - - // 0c83 02df ret -} - -void 0c84_FilterBufferInPlace(_sampleAddr($AR0), multiplier($AX0.H)) -{ - // 0c84 8a00 m2 - // 0c85 8f00 set40 - // 0c86 8100 clr $ACC0 - // 0c87 00de 0404 lr $AC0.M, @0x0404 - // 0c89 b100 tst $ACC0 - // 0c8a 0295 0c91 jz 0x0c91 - if (*(0x0404)) { - // 0c8c 8100 clr $ACC0 - // 0c8d 00fe 0478 sr @0x0478, $AC0.M - // 0c8f 00fe 0479 sr @0x0479, $AC0.M - *0x0478 = 0; - *0x0479 = 0; - } - // 0c91 00df 0479 lr $AC1.M, @0x0479 - // 0c93 00db 0478 lr $AX1.H, @0x0478 - // 0c95 0900 lris $AX1.L, #0x00 - // 0c96 0084 0000 lri $IX0, #0x0000 - // 0c98 1150 0ca1 bloopi #0x50, 0x0ca1 - $AC1.M = *0x0479; - $AX1.H = *0x0478; - - // ACC1 always contains the value from the previous iteration. - for (int i = 0; i < 0x50; i++) { - // 0c9a 199e lrrn $AC0.M, @$AR0 - // 0c9b 5c7c sub'ln $ACC0, $ACC1 : $AC1.M, @$AR0 - // 0c9c c000 mulc $AC0.M, $AX0.H // Where does AX0.H get set? - // 0c9d 6e00 movp $ACC0 - // 0c9e 1488 asl $ACC0, #8 - // 0c9f 4a00 addax $ACC0, $AX1 - // 0ca0 1b1e srri @$AR0, $AC0.M - // 0ca1 1f7e mrr $AX1.H, $AC0.M - *$AC0.M = *$AR0; - $ACC0 -= $ACC1; - ( $AC1.M = *AR0; ) - $ACC0 = ($AC0.M * $AX0.H * 2 << 8) + ($AX1.L); - *($AR0++) = $AC0.M; - $AX1.H = $AC0.M; - - // Write back - 0ca2 00fb 0478 sr @0x0478, $AX1.H - 0ca4 00ff 0479 sr @0x0479, $AC1.M - - // 0ca6 8b00 m0 - // 0ca7 8e00 set16 - // 0ca8 02df ret -} - -// Called from both volume handlers. -// ACC1 is volume, AX is volume delta. -void 0ca9_RampedMultiplyAddBuffer(Volume($ACC1), Delta($AX0), InBuffer($AR0), Buffer($AR3)) { - // 0ca9 b900 tst $ACC1 - // 0caa 0294 0caf jnz 0x0caf - if (!ACC1) { - // 0cac 6800 movax $ACC0, $AX0.L - // 0cad b100 tst $ACC0 - // 0cae 02d5 retz - if (!AX0.L) - // If incoming volume is zero and ramp delta is zero, - // not really much point to do anything. - return - } - 0caf 1c23 mrr $AR1, $AR3 - 0cb0 197e lrri $AC0.M, @$AR3 - - // This is another heavily software pipelined loop, so it's very confusing. - // See the docs for mulc and mulcac if you want to have any hope of understanding it. - // - // Produce the first result, so it's ready in the prod register. - 0cb1 191b lrri $AX1.H, @$AR0 - 0cb2 d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - - // 0cb3 1120 0cb9 bloopi #0x20, 0x0cb9 - for (int i = 0; i < 0x20; i++) { - 0cb5 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0cb6 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - - 0cb7 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0cb8 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M // Store 1 - - // Walk the ramp. Somewhat odd that it's done only every 2 samples. - 0cb9 4900 addax $ACC1, $AX0 - } - - // 0cba 1108 0cbf bloopi #0x08, 0x0cbf - for (int i = 0; i < 0x8; i++) { - 0cbc dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0cbd 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - - 0cbe dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0cbf 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - } - - // NOTE - The above two loops are very similar and the sum of their lengths is - // 0x28 - which is half of 0x50. And each does two loads and two stores, so together - // it's 50. Just strange that the addax is missing in the second loop. - - // It looks like we're dealing with crappy volume ramping - the delta is computed using - // (vol2 - vol1) >> 5! That's why it can only ramp the volume the first 64 (0x20 * 2) samples! - - 0cc0 02df ret -} - - -// What a strange filter .. ORR? -void 0cc1_StrangeORRFilter(_pBuffer(AR3)) -{ - 0cc1 8f00 set40 - 0cc2 8d00 set15 // X multiplications unsigned - 0cc3 1c03 mrr $AR0, $AR3 - 0cc4 00d9 038e lr $AX1.L, @0x038e - 0cc6 0b04 lris $AX1.H, #0x04 - - // pipeline starts here. - 0cc7 197a lrri $AX0.H, @$AR3 - 0cc8 b053 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR3 - 0cc9 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0cca 1128 0ccf bloopi #0x28, 0x0ccf - 0ccc 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0ccd b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0cce 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0ccf b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0cd0 8c00 clr15 - 0cd1 8e00 set16 - - // 0cd2 02df ret -} - - -// called from sync frame if (*0x042c != 0) -// That is, if volume mode != 0. -// It first seems to compute a lot of parameters and store them at 0x0b00 forwards. -// Then it uses those as input for the usual (ramped?) mixes. -void 0cd3_VolumeMixer1() -{ - // 0cd3 00da 0485 lr $AX0.H, @0x0485 - // 0cd5 8600 tstaxh $AX0.H - // 0cd6 0295 0ce5 jz 0x0ce5 - if (*0x0485 != 0) { - // 0cd8 8100 clr $ACC0 - // 0cd9 00de 042a lr $AC0.M, @0x042a - // 0cdb 147f lsr $ACC0, #-1 - // 0cdc 00fe 042b sr @0x042b, $AC0.M - *(0x042b) = *(0x042a) >> 1; - - // 0cde b100 tst $ACC0 - // 0cdf 0294 0ce5 jnz 0x0ce5 - if (*0x042b == 0) { - // 0ce1 009a 0001 lri $AX0.H, #0x0001 - // 0ce3 00fa 0401 sr @0x0401, $AX0.H - *(0x0401) = 1; // KeyOff - } - } - - // 0ce5 8f00 set40 - // 0ce6 8100 clr $ACC0 - // 0ce7 00de 0428 lr $AC0.M, @0x0428 - // 0ce9 1478 lsr $ACC0, #-8 - (ACC0 = *(0x0428) << 8); - - // 0cea 00df 0428 lr $AC1.M, @0x0428 - // 0cec 0340 007f andi $AC1.M, #0x007f - // 0cee 1f1e mrr $AX0.L, $AC0.M - // 0cef 1f5f mrr $AX0.H, $AC1.M - // 0cf0 0220 007f xori $ACC0, #0x007f - // 0cf2 1f3e mrr $AX1.L, $AC0.M - // 0cf3 0320 007f xori $ACC1, #0x007f - // 0cf5 1f7f mrr $AX1.H, $AC1.M - AX0.L = *(0x0428) >> 8; - AX0.H = *(0x0428) & 0x7F; - AX1.L = AX0.L ^ 0x7f; - AX1.H = AX1.H ^ 0x7f; - - // 0cf6 8100 clr $ACC0 - // 0cf7 8900 clr $ACC1 - // 0cf8 009f 0200 lri $AC1.M, #0x0200 - - // 0cfa 1fd8 mrr $AC0.M, $AX0.L - // 0cfb 4c00 add $ACC0, $ACC1 # broken disasm? this doesn't make much sense. - // 0cfc 1c1e mrr $AR0, $AC0.M - // 0cfd 1818 lrr $AX0.L, @$AR0 - AR0 = AX0.L + 0x0200; - AX0.L = *AR0; - - // 0cfe 1fda mrr $AC0.M, $AX0.H - // 0cff 4c00 add $ACC0, $ACC1 - // 0d00 1c1e mrr $AR0, $AC0.M - // 0d01 181a lrr $AX0.H, @$AR0 - AR0 = AX0.H + 0x200; - AX0.H = *AR0; - - // 0d02 1fd9 mrr $AC0.M, $AX1.L - // 0d03 4c00 add $ACC0, $ACC1 - // 0d04 1c1e mrr $AR0, $AC0.M - // 0d05 1819 lrr $AX1.L, @$AR0 - AR0 = AX1.L + 0x200; - AX1.L = *AR0 - - // 0d06 1fdb mrr $AC0.M, $AX1.H - // 0d07 4c00 add $ACC0, $ACC1 - // 0d08 1c1e mrr $AR0, $AC0.M - // 0d09 181b lrr $AX1.H, @$AR0 - AR0 = AX1.H + 0x200; - AX1.H = *AR0; - - // 0d0a 0080 0b00 lri $AR0, #0x0b00 - // 0d0c 9800 mul $AX1.L, $AX1.H - // 0d0d ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - // 0d0e b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - // 0d0f 9630 mulmv's $AX0.L, $AX0.H, $ACC0 : @$AR0, $AC0.M - // 0d10 6e30 movp's $ACC0 : @$AR0, $AC0.M - // 0d11 1b1e srri @$AR0, $AC0.M - - // The above is heavily "sw-pipelined" but I think it turns into: - $AR0 = 0x0b00; - *$AR0++ = AX1.L * AX1.H; - *$AR0++ = AX0.L * AX1.H; - *$AR0++ = AX0.H * AX1.L; - *$AR0++ = AX0.L * AX0.H; - - // 0d12 0080 0b00 lri $AR0, #0x0b00 - // 0d14 0081 0b04 lri $AR1, #0x0b04 - // 0d16 00da 042a lr $AX0.H, @0x042a - // 0d18 02bf 0d62 call 0x0d62 // some tricky multiplication - 0d62_Mul4ByAX0H(0x0b00, 0x0b04, *(0x042a)); - - // 0d1a 0081 0b08 lri $AR1, #0x0b08 - // 0d1c 0080 0b04 lri $AR0, #0x0b04 - // 0d1e 00da 042a lr $AX0.H, @0x042a // interesting - // 0d20 00de 0429 lr $AC0.M, @0x0429 // interesting - // 0d22 c000 mulc $AC0.M, $AX0.H - // 0d23 6e00 movp $ACC0 - // 0d24 1481 asl $ACC0, #1 - // 0d25 1f5e mrr $AX0.H, $AC0.M - - 0d62_Mul4ByAX0H(0x0b00, 0x0b04, (*(0x042a) * *(0x0429) << 1) >> 16); - // 0d26 02bf 0d62 call 0x0d62 // some tricky multiplication - - // 0d28 0080 0b00 lri $AR0, #0x0b00 - // 0d2a 0081 0b0c lri $AR1, #0x0b0c - // 0d2c 8100 clr $ACC0 - // 0d2d 8900 clr $ACC1 - // 0d2e 00de 042b lr $AC0.M, @0x042b // interesting - // 0d30 00df 042a lr $AC1.M, @0x042a // interesting - // 0d32 00fe 042a sr @0x042a, $AC0.M - *(0x042a) = *(0x042b); - - // 0d34 5c00 sub $ACC0, $ACC1 - // 0d35 1f5e mrr $AX0.H, $AC0.M - // 0d36 02bf 0d6b call 0x0d6b // some other tricky multiplication - 0d6b_Mul4ByAC0M_Unsigned(0xb00, 0x0b0c, $AC0.M(*(0x042a) - *(0x042b))) // does not touch AX0.H - - // 0d38 0080 0b0c lri $AR0, #0x0b0c - // 0d3a 0081 0b10 lri $AR1, #0x0b10 - // 0d3c 00da 0429 lr $AX0.H, @0x0429 // interesting - 0d3e 02bf 0d62 call 0x0d62 // some tricky multiplication - 0d62_Mul4ByAX0H(0x0b0c, 0x0b10, *(0x0429)); - - // 0d40 0081 0b04 lri $AR1, #0x0b04 - // 0d42 0082 0b0c lri $AR2, #0x0b0c - // 0d44 0083 0d77 lri $AR3, #0x0d77 - - // So basically the below loop is: - // For i in 0 to 8: - // Call 0ca9_RampedMultiplyAddBuffer($AR0 = *0x038f, $AR3=0x0d77[i], AX0=0xb0c[i]<<11, AC1.M=0x0b04[i]) - - // 0d46 1108 0d5f bloopi #0x08, 0x0d5f - for (int i = 0; i < 8; i++) { - // 0d48 195f lrri $AC1.M, @$AR2 - // 0d49 15fb asr $ACC1, #-5 - // 0d4a 1f1d mrr $AX0.L, $AC1.L - // 0d4b 1f5f mrr $AX0.H, $AC1.M - // Compute volume delta - AX0 = *AR2++ << 11; - - // 0d4c 193f lrri $AC1.M, @$AR1 - AC1.M = *AR1++; - - // 0d4d 00e1 0b24 sr @0x0b24, $AR1 - // 0d4f 00e2 0b25 sr @0x0b25, $AR2 - // 0d51 021b ilrri $AC0.M, @$AR3 // Buffer address table lookup (see below) - // 0d52 00e3 0b26 sr @0x0b26, $AR3 - (Stash AR1, AR2, AR3) - // 0d54 1c7e mrr $AR3, $AC0.M - // 0d55 00c0 038f lr $AR0, @0x038f - // 0d57 02bf 0ca9 call 0x0ca9 - 0ca9_RampedMultiplyAddBuffer(Volume($ACC1), Delta($AX0), InBuffer($AR0), Buffer($AR3)) - - // 0d59 00c1 0b24 lr $AR1, @0x0b24 - // 0d5b 00c2 0b25 lr $AR2, @0x0b25 - // 0d5d 00c3 0b26 lr $AR3, @0x0b26 - (Restore AR1, AR2, AR3) - 0d5f 0000 nop - } - - // 0d60 8e00 set16 - // 0d61 02df ret -} - -void 0d62_Mul4ByAX0H(in_buffer($AR0), out_buffer($AR1), multiplicand($AX0.H)) { - // 0d62 191f lrri $AC1.M, @$AR0 - // 0d63 d078 mulc'l $AC1.M, $AX0.H : $AC1.M, @$AR0 - // 0d64 d678 mulcmv'l $AC1.M, $AX0.H, $ACC0 : $AC1.M, @$AR0 - // 0d65 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - // 0d66 191f lrri $AC1.M, @$AR0 - // 0d67 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - // 0d68 6e31 movp's $ACC0 : @$AR1, $AC0.M - // 0d69 1b3e srri @$AR1, $AC0.M - // 0d6a 02df ret - // The above is a crazy sw-pipelined way to write: - for (int i = 0; i < 4; i++) { - out_buffer[i] = (s16)in_buffer[i] * (s16)multiplicand >> 16; - } -} - -void 0d6b_Mul4ByAC0M_Unsigned(in_buffer($AR0), out_buffer($AR1), multiplicand($AX1.H)) { - // 0d6b 8d00 set15 - // 0d6c 1f7e mrr $AX1.H, $AC0.M - // 0d6d 1918 lrri $AX0.L, @$AR0 - // 0d6e a840 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR0 - // 0d6f ae40 mulxmv'l $AX0.L, $AX1.H, $ACC0 : $AX0.L, @$AR0 - // 0d70 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - // 0d71 1918 lrri $AX0.L, @$AR0 - // 0d72 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - // 0d73 6e31 movp's $ACC0 : @$AR1, $AC0.M - // 0d74 1b3e srri @$AR1, $AC0.M - // 0d75 8c00 clr15 - // 0d76 02df ret - // The above is a crazy sw-pipelined way to write: - for (int i = 0; i < 4; i++) { - out_buffer[i] = in_buffer[i] * multiplicand >> 16; //(unsigned multiplication) - } -} - -// table for 0cd3_Unk -// This is a bunch of buffer addresses! -short table = {0x0d00, 0x0d60, 0x0f40, 0x0ca0, 0x0e80, 0x0ee0, 0x0c00, 0x0c50}; - -0d77 0d00 -0d78 0d60 -0d79 0f40 -0d7a 0ca0 -0d7b 0e80 -0d7c 0ee0 -0d7d 0c00 -0d7e 0c50 - -void 0d7f_ResampleAudioData(_src($AR0), _dest($AR1), param(AX1.L) = 0, _option??) -{ - 0d7f 00f9 0361 sr @0x0361, $AX1.L // always 0 - - // 0d81 1fc0 mrr $AC0.M, $AR0 - // 0d82 0200 fffc addi $AC0.M, #0xfffc - // 0d84 1c1e mrr $AR0, $AC0.M - // 0d85 1c5e mrr $AR2, $AC0.M - - // We read a little bit BEFORE the input. The next piece of code takes care of that... - $AR0 = $AR0 - 4; - $AR2 = $AR0; - - // 0x043c to 0x043f is storage for old sample data. - 0d86 0083 043c lri $AR3, #0x043c - - // Pipelined tiny memcpy - first four are loads, last four are stores. middle two overlap. - // 0d88 197e lrri $AC0.M, @$AR3 - // 0d89 197f lrri $AC1.M, @$AR3 - // 0d8a 80a2 nx'sl : $AC0.M, $AX0.H - // 0d8b 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - // 0d8c 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - // 0d8d 1b1f srri @$AR0, $AC1.M - for (int i = 0; i < 4; i++) - *($AR0++) = *($AR3++); - - // Point $AR0 back at 4 words before the start of the in buffer. - // 0d8e 1c02 mrr $AR0, $AR2 - - 0d8f 8100 clr $ACC0 - // 0d90 00de 0402 lr $AC0.M, @0x0402 // Ratio int - // 0d92 00fe 0362 sr @0x0362, $AC0.M - // 0d94 1474 lsr $ACC0, #-12 - // 0d95 1f7e mrr $AX1.H, $AC0.M - // 0d96 1f3c mrr $AX1.L, $AC0.L - *0x0362 = PB.Ratio; - $AX1 = PB.Ratio << 4; - - 0d97 8900 clr $ACC1 - 0d98 00dd 0430 lr $AC1.L, @0x0430 // Sample position frac - 0d9a 1504 lsl $ACC1, #4 - - // $ACC0 here still contains ratio << 12; - 0d9b 0604 cmpis $ACC0, #0x04 - // 0d9c 0290 0df3 jge 0x0df3 // subroutine - - // If ratio too low, don't bother resampling? - GOTONS JustCopyWithoutResampling; - - 0d9e 1fdd mrr $AC0.M, $AC1.L - 0d9f 0082 02b0 lri $AR2, #0x02b0 - - // Store a ramp at 0x2b0? Lookup table for read addresses? - 0da1 1050 loopi #0x50 - 0da2 4b2a addax's $ACC1, $AX1 : @$AR2, $AC1.L - - 0da3 1fbe mrr $AC1.L, $AC0.M - 0da4 00fe 0360 sr @0x0360, $AC0.M - 0da6 8900 clr $ACC1 - 0da7 1fbe mrr $AC1.L, $AC0.M - - 0da8 0af8 lris $AX0.H, #0xf8 - 0da9 009b 00fc lri $AX1.H, #0x00fc - 0dab 00d8 0361 lr $AX0.L, @0x0361 // parameter was stashed here. - - // 0x02b0 is where the ramp from above is stored. - 0dad 0082 02b0 lri $AR2, #0x02b0 - 0daf 0083 02b0 lri $AR3, #0x02b0 - 0db1 195e lrri $AC0.M, @$AR2 - - // I really don't understand what the purpose of this loop is. - 0db2 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M - // 0db3 1128 0db8 bloopi #0x28, 0x0db8 - for (int i = 0; i < 0x50; i += 2) { - 0db5 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 - 0db6 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H - 0db7 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 - 0db8 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - } - - 0db9 8a00 m2 // All muls doubled. - - // 0x02b0 is where the ramp from above is stored. - 0dba 0082 02b0 lri $AR2, #0x02b0 - - 0dbc 00dd 0430 lr $AC1.L, @0x0430 - 0dbe 1504 lsl $ACC1, #4 - 0dbf 1fe0 mrr $AC1.M, $AR0 - 0dc0 8100 clr $ACC0 - 0dc1 00de 0362 lr $AC0.M, @0x0362 - 0dc3 1474 lsr $ACC0, #-12 - 0dc4 1f7e mrr $AX1.H, $AC0.M - 0dc5 1f3c mrr $AX1.L, $AC0.L - - // Resample with some nice filter of some sort, using unreadable - // pipelined DSP code... gah. - - 0dc6 8f00 set40 // Loaded ACx.M values extend to the entire ACC. Don't see any actual use though. - - // Yep, this pretty much confirms that 0x02b0 is precomputed read addresses. - 0dc7 1943 lrri $AR3, @$AR2 - 0dc8 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 - 0dc9 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0dca f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0dcb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0dcc f200 madd $AX0.L, $AX0.H - 0dcd fe00 movpz $ACC0 - 0dce 1c1f mrr $AR0, $AC1.M - 0dcf 1943 lrri $AR3, @$AR2 - 0dd0 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 - 0dd1 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - // 0dd2 114e 0dda bloopi #0x4e, 0x0dda - // Count the stores - 0x4e stores in the main loop, two more afterwards. - // Deeply pipelined. - for (int i = 0; i < 0x4e; i++) { - 0dd4 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0dd5 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0dd6 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0dd7 1c1f mrr $AR0, $AC1.M - 0dd8 1943 lrri $AR3, @$AR2 - 0dd9 4bc3 addax'ld $ACC1, $AX1 : $AX0.L, $AX1.L, @$AR3 - 0dda 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - } - 0ddb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ddc f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0ddd f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0dde fe00 movpz $ACC0 - 0ddf 1b3e srri @$AR1, $AC0.M - - // Things back to normal. - // 0de0 8b00 m0 - // 0de1 8e00 set16 - -back_from_JustCopyWithoutResampling: - 0de2 00fe 0433 sr @0x0433, $AC0.M - 0de4 1c1f mrr $AR0, $AC1.M - 0de5 150c lsl $ACC1, #12 - 0de6 0340 0fff andi $AC1.M, #0x0fff - 0de8 00ff 0430 sr @0x0430, $AC1.M - - // Store the last 4 samples or something undecoded - // back into the PB. - 0dea 0083 043c lri $AR3, #0x043c - 0dec 191e lrri $AC0.M, @$AR0 - 0ded 191f lrri $AC1.M, @$AR0 - 0dee 80a0 nx'ls : $AX0.H, $AC0.M - 0def 64a1 movr'ls $AC0.M, $AX0.H : $AX0.H, $AC1.M - 0df0 6533 movr's $AC1.M, $AX0.H : @$AR3, $AC0.M - 0df1 1b7f srri @$AR3, $AC1.M - // 0df2 02df ret - return; - -JustCopyWithoutResampling: - // 0df3 1fe0 mrr $AC1.M, $AR0 - // 0df4 1c1f mrr $AR0, $AC1.M // This instruction looks very pointless. - - // 0df5 1128 0dfc bloopi #0x28, 0x0dfc - // 0df7 4b70 addax'l $ACC1, $AX1 : $AC0.M, @$AR0 - // 0df8 1b3e srri @$AR1, $AC0.M - // 0df9 1c1f mrr $AR0, $AC1.M - // 0dfa 4b70 addax'l $ACC1, $AX1 : $AC0.M, @$AR0 - // 0dfb 1b3e srri @$AR1, $AC0.M - // 0dfc 1c1f mrr $AR0, $AC1.M - for (int i = 0; i < 0x50; i++) { - $ACC1 += $AX1; // This is to still advance the playback position. - $AC0.M = *($AR0++); - *($AR1++) = $AC0.M; - $AR0 = $AC1.M; // Undo the increment - } - - // Looks like $AR0 stays unchanged, while $AR1 gets incremented by 0x50. - 0dfd 029f 0de2 jmp 0x0de2 -} - - -// Small utility jumped to from SyncFrame. -// sets 50 shorts from 0x520 to zero. -void 0dff_Zero520_50() { - 0dff 0083 0520 lri $AR3, #0x0520 - 0e01 00de 0433 lr $AC0.M, @0x0433 - 0e03 1050 loopi #0x50 - 0e04 1b7e srri @$AR3, $AC0.M - // 0e05 029f 02d8 jmp 0x02d8 - GOTO ContinueWithBlock: // in SyncFrame -} - -// No-one calls this routine. -void 0e07_UnUsed() { - 0e07 1c20 mrr $AR1, $AR0 - 0e08 185f lrr $AC1.M, @$AR2 - 0e09 1f7f mrr $AX1.H, $AC1.M - 0e0a 193a lrri $AX0.H, @$AR1 - 0e0b 6400 movr $ACC0, $AX0.H - 0e0c 0078 0e11 bloop $AX0.L, 0x0e11 - 0e0e 5659 subr'l $ACC0, $AX1.H : $AX1.H, @$AR1 - 0e0f 6730 movr's $ACC1, $AX1.H : @$AR0, $AC0.M - 0e10 5551 subr'l $ACC1, $AX0.H : $AX0.H, @$AR1 - 0e11 6438 movr's $ACC0, $AX0.H : @$AR0, $AC1.M - 0e12 1a5b srr @$AR2, $AX1.H - // 0e13 02df ret -} - -void 0e14_DolbyInit() -{ - // Init parameters/coefficients for UnknownFilter - 0e14 0098 8240 lri $AX0.L, #0x8240 - 0e16 00f8 04e8 sr @0x04e8, $AX0.L - 0e18 0098 7fff lri $AX0.L, #0x7fff - 0e1a 00f8 04e9 sr @0x04e9, $AX0.L - 0e1c 0098 7dbf lri $AX0.L, #0x7dbf - 0e1e 00f8 04ea sr @0x04ea, $AX0.L - 0e20 0098 843f lri $AX0.L, #0x843f - 0e22 00f8 04eb sr @0x04eb, $AX0.L - 0e24 0098 b23b lri $AX0.L, #0xb23b - 0e26 00f8 04f0 sr @0x04f0, $AX0.L - 0e28 0098 7fff lri $AX0.L, #0x7fff - 0e2a 00f8 04f1 sr @0x04f1, $AX0.L - 0e2c 0098 4dc4 lri $AX0.L, #0x4dc4 - 0e2e 00f8 04f2 sr @0x04f2, $AX0.L - 0e30 0098 d808 lri $AX0.L, #0xd808 - 0e32 00f8 04f3 sr @0x04f3, $AX0.L - - // Zero the UnknownFilter states. - 0e34 0098 0000 lri $AX0.L, #0x0000 - 0e36 0080 04ec lri $AR0, #0x04ec - 0e38 1004 loopi #0x04 - 0e39 1b18 srri @$AR0, $AX0.L - 0e3a 0080 04f4 lri $AR0, #0x04f4 - 0e3c 1004 loopi #0x04 - 0e3d 1b18 srri @$AR0, $AX0.L - // 0e3e 02df ret -} - -// I'm going to guess that this is Dolby mixing. -void 0e3f_DolbyMixdown() -{ - 0e3f 0080 0f40 lri $AR0, #0x0f40 - 0e41 0083 0b00 lri $AR3, #0x0b00 - 0e43 8900 clr $ACC1 - 0e44 0f50 lris $AC1.M, #0x50 - 0e45 0098 6784 lri $AX0.L, #0x6784 - //0e47 02bf 00fa call 0x00fa // XorBuffer - 00fa_BufferMultiply(src($AR0), dst($AR3), count($AC1.M), $mult($AX0.L)) - - 0e49 0080 04e8 lri $AR0, #0x04e8 - 0e4b 0082 04ec lri $AR2, #0x04ec - 0e4d 0081 0b00 lri $AR1, #0x0b00 - 0e4f 02bf 0ba4 call 0x0ba4 // 0ba4_UnknownFilter - 0ba4_UnknownFilter(params($AR0), buffer($AR1), filter_state($AR2)) - - 0e51 8900 clr $ACC1 - 0e52 0f50 lris $AC1.M, #0x50 - 0e53 0080 0b00 lri $AR0, #0x0b00 - 0e55 0083 0d00 lri $AR3, #0x0d00 - 0e57 0098 7fff lri $AX0.L, #0x7fff - // 0e59 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - 0e5b 8900 clr $ACC1 - 0e5c 0f50 lris $AC1.M, #0x50 - 0e5d 0080 0b00 lri $AR0, #0x0b00 - 0e5f 0083 0d60 lri $AR3, #0x0d60 - 0e61 0098 b820 lri $AX0.L, #0xb820 - // 0e63 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - 0e65 0080 0ca0 lri $AR0, #0x0ca0 - 0e67 0083 0b00 lri $AR3, #0x0b00 - 0e69 8900 clr $ACC1 - 0e6a 0f50 lris $AC1.M, #0x50 - 0e6b 0098 6784 lri $AX0.L, #0x6784 - // 0e6d 02bf 00fa call 0x00fa // XorBuffer - 00fa_BufferMultiply(src($AR0), dst($AR3), count($AC1.M), $mult($AX0.L)) - - 0e6f 0080 04e8 lri $AR0, #0x04e8 - 0e71 0082 04f4 lri $AR2, #0x04f4 - 0e73 0081 0b00 lri $AR1, #0x0b00 - // 0e75 02bf 0ba4 call 0x0ba4 // 0ba4_UnknownFilter - 0ba4_UnknownFilter(params($AR0), buffer($AR1), filter_state($AR2)) - - 0e77 8900 clr $ACC1 - 0e78 0f50 lris $AC1.M, #0x50 - 0e79 0080 0b00 lri $AR0, #0x0b00 - 0e7b 0083 0d00 lri $AR3, #0x0d00 - 0e7d 0098 47e0 lri $AX0.L, #0x47e0 - // 0e7f 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - 0e81 8900 clr $ACC1 - 0e82 0f50 lris $AC1.M, #0x50 - 0e83 0080 0b00 lri $AR0, #0x0b00 - 0e85 0083 0d60 lri $AR3, #0x0d60 - 0e87 0098 8001 lri $AX0.L, #0x8001 - // 0e89 02bf 00eb call 0x00eb - 00eb_Unk_BufferMultAddToDest(_Src=($AR0), _Dest($AR3), _size($AC1.M), _factor($AX0.L)) - - // 0e8b 02df ret -} - - -void Nops() { - 0e8c 0000 nop - 0e8d 0000 nop - 0e8e 0000 nop - 0e8f 0000 nop -} diff --git a/docs/DSP/DSP_UC_Zelda_Wii.txt b/docs/DSP/DSP_UC_Zelda_Wii.txt deleted file mode 100644 index a70c3274ec..0000000000 --- a/docs/DSP/DSP_UC_Zelda_Wii.txt +++ /dev/null @@ -1,2850 +0,0 @@ - 0000 029f 0012 jmp 0x0012 - 0002 0000 nop - 0003 0000 nop - 0004 02ff rti - 0005 0000 nop - 0006 02ff rti - 0007 0000 nop - 0008 02ff rti - 0009 0000 nop - 000a 02ff rti - 000b 0000 nop - 000c 02ff rti - 000d 0000 nop - 000e 029f 0725 jmp 0x0725 - 0010 029f 0059 jmp 0x0059 - 0012 1205 sbclr #0x05 - 0013 02bf 0062 call 0x0062 - 0015 8100 clr $ACC0 - 0016 009f 1000 lri $AC1.M, #0x1000 - 0018 0080 0000 lri $AR0, #0x0000 - 001a 005f loop $AC1.M - 001b 1b1e srri @$AR0, $AC0.M - 001c 02bf 07f5 call 0x07f5 - 001e 02bf 0f44 call 0x0f44 - 0020 0e00 lris $AC0.M, #0x00 - 0021 02bf 07d7 call 0x07d7 - 0023 009e 1111 lri $AC0.M, #0x1111 -// SEND_f355(0x1111) - 0025 02bf 07e1 call 0x07e1 - 0027 0e00 lris $AC0.M, #0x00 - 0028 00fe 034e sr @0x034e, $AC0.M - 002a 1305 sbset #0x05 - 002b 3a00 orr $AC0.M, $AX1.H - 002c 7400 incm $AC0.M - 002d 1f7e mrr $AX1.H, $AC0.M - 002e 0240 00ff andi $AC0.M, #0x00ff - 0030 0200 5500 addi $AC0.M, #0x5500 - 0032 02bf 00a0 call 0x00a0 - 0034 029f 0832 jmp 0x0832 - 0036 00df 0357 lr $AC1.M, @0x0357 - 0038 00ff 0345 sr @0x0345, $AC1.M - 003a 00de 0356 lr $AC0.M, @0x0356 - 003c 1ffe mrr $AC1.M, $AC0.M - 003d 0340 00ff andi $AC1.M, #0x00ff - 003f 00ff 0344 sr @0x0344, $AC1.M - 0041 1479 lsr $ACC0, #-7 - 0042 0240 007e andi $AC0.M, #0x007e - 0044 00fe 0343 sr @0x0343, $AC0.M - 0046 0200 0080 addi $AC0.M, #0x0080 - 0048 1c1e mrr $AR0, $AC0.M - 0049 170f jmpr $AR0 - 004a 0092 00ff lri $CR, #0x00ff - 004c 009e cafe lri $AC0.M, #0xcafe - 004e 02bf 00a0 call 0x00a0 - 0050 0e04 lris $AC0.M, #0x04 - 0051 02bf 07d7 call 0x07d7 - 0053 00de 0356 lr $AC0.M, @0x0356 - 0055 02bf 07e1 call 0x07e1 - 0057 029f 002b jmp 0x002b - 0059 1205 sbclr #0x05 - 005a 02bf 0062 call 0x0062 - 005c 0e01 lris $AC0.M, #0x01 - 005d 02bf 07d7 call 0x07d7 - 005f 1305 sbset #0x05 - 0060 029f 002b jmp 0x002b - 0062 1202 sbclr #0x02 - 0063 1203 sbclr #0x03 - 0064 1204 sbclr #0x04 - 0065 1306 sbset #0x06 - 0066 8e00 set16 - 0067 8c00 clr15 - 0068 8b00 m0 - 0069 009e ffff lri $AC0.M, #0xffff - 006b 1d1e mrr $WR0, $AC0.M - 006c 1d3e mrr $WR1, $AC0.M - 006d 1d5e mrr $WR2, $AC0.M - 006e 1d7e mrr $WR3, $AC0.M - 006f 0092 00ff lri $CR, #0x00ff - 0071 02df ret - 0072 0081 0358 lri $AR1, #0x0358 - 0074 0090 0000 lri $AC0.H, #0x0000 - 0076 0c00 lris $AC0.L, #0x00 - 0077 007e 007c bloop $AC0.M, 0x007c - 0079 193e lrri $AC0.M, @$AR1 - 007a 1b1e srri @$AR0, $AC0.M - 007b 193e lrri $AC0.M, @$AR1 - 007c 1b1e srri @$AR0, $AC0.M - 007d 02df ret - 007e 029f 004a jmp 0x004a - 0080 029f 004a jmp 0x004a - 0082 029f 00d9 jmp 0x00d9 - 0084 029f 02e3 jmp 0x02e3 - 0086 029f 007e jmp 0x007e - 0088 029f 066e jmp 0x066e - 008a 029f 0680 jmp 0x0680 - 008c 029f 004a jmp 0x004a - 008e 029f 05b7 jmp 0x05b7 - 0090 029f 0603 jmp 0x0603 - 0092 029f 05e7 jmp 0x05e7 - 0094 029f 004a jmp 0x004a - 0096 029f 004a jmp 0x004a - 0098 029f 004a jmp 0x004a - 009a 029f 0103 jmp 0x0103 - 009c 029f 00f6 jmp 0x00f6 - 009e 029f 004a jmp 0x004a - 00a0 00fe 0b00 sr @0x0b00, $AC0.M - 00a2 8100 clr $ACC0 - 00a3 00de 0354 lr $AC0.M, @0x0354 - 00a5 1408 lsl $ACC0, #8 - 00a6 00df 0341 lr $AC1.M, @0x0341 - 00a8 3e00 cw 0x3e00 ; *** UNKNOWN OPCODE *** - 00a9 00fe 0b01 sr @0x0b01, $AC0.M - 00ab 00de 0350 lr $AC0.M, @0x0350 - 00ad 00fe 0b02 sr @0x0b02, $AC0.M - 00af 00de 0351 lr $AC0.M, @0x0351 - 00b1 00fe 0b03 sr @0x0b03, $AC0.M - 00b3 00de 0352 lr $AC0.M, @0x0352 - 00b5 00fe 0b04 sr @0x0b04, $AC0.M - 00b7 00de 037d lr $AC0.M, @0x037d - 00b9 00dc 037e lr $AC0.L, @0x037e - 00bb 009f 0b00 lri $AC1.M, #0x0b00 - 00bd 0080 0010 lri $AR0, #0x0010 - 00bf 0090 0001 lri $AC0.H, #0x0001 - 00c1 1c3f mrr $AR1, $AC1.M - 00c2 0f0a lris $AC1.M, #0x0a - 00c3 2fd1 srs @SampleFormat, $AC1.M - 00c4 1f5e mrr $AX0.H, $AC0.M - 00c5 1f1c mrr $AX0.L, $AC0.L - 00c6 009e ffff lri $AC0.M, #0xffff - 00c8 2ed6 srs @ACEAH, $AC0.M - 00c9 2ed7 srs @ACEAL, $AC0.M - 00ca 1fda mrr $AC0.M, $AX0.H - 00cb 1f98 mrr $AC0.L, $AX0.L - 00cc 147f lsr $ACC0, #-1 - 00cd 2ed8 srs @ACCAH, $AC0.M - 00ce 2cd9 srs @ACCAL, $AC0.L - 00cf 1f40 mrr $AX0.H, $AR0 - 00d0 007a 00d7 bloop $AX0.H, 0x00d7 - 00d2 193e lrri $AC0.M, @$AR1 - 00d3 2ed3 srs @UnkZelda, $AC0.M - 00d4 0000 nop - 00d5 0000 nop - 00d6 0000 nop - 00d7 0000 nop - 00d8 02df ret - 00d9 0080 0380 lri $AR0, #0x0380 - 00db 0e04 lris $AC0.M, #0x04 - 00dc 02bf 0072 call 0x0072 - 00de 0081 0382 lri $AR1, #0x0382 - 00e0 009f 0000 lri $AC1.M, #0x0000 - 00e2 0080 0280 lri $AR0, #0x0280 - 00e4 02bf 063e call 0x063e - 00e6 0081 0384 lri $AR1, #0x0384 - 00e8 009f 0300 lri $AC1.M, #0x0300 - 00ea 0080 0020 lri $AR0, #0x0020 - 00ec 02bf 063e call 0x063e - 00ee 00de 0345 lr $AC0.M, @0x0345 - 00f0 00fe 0342 sr @0x0342, $AC0.M - 00f2 02bf 0d3b call 0x0d3b - 00f4 029f 004a jmp 0x004a - 00f6 0080 037d lri $AR0, #0x037d - 00f8 0e01 lris $AC0.M, #0x01 - 00f9 02bf 0072 call 0x0072 - 00fb 00de 037d lr $AC0.M, @0x037d - 00fd 0240 7fff andi $AC0.M, #0x7fff - 00ff 00fe 037d sr @0x037d, $AC0.M - 0101 029f 004a jmp 0x004a - 0103 0080 0374 lri $AR0, #0x0374 - 0105 0e01 lris $AC0.M, #0x01 - 0106 00fe 0377 sr @0x0377, $AC0.M - 0108 00fe 037c sr @0x037c, $AC0.M - 010a 02bf 0072 call 0x0072 - 010c 00de 0345 lr $AC0.M, @0x0345 - 010e 00fe 0376 sr @0x0376, $AC0.M - 0110 029f 004a jmp 0x004a - 0112 0081 034c lri $AR1, #0x034c - 0114 009f 0400 lri $AC1.M, #0x0400 - 0116 0080 00c0 lri $AR0, #0x00c0 - 0118 02bf 063e call 0x063e - 011a 02df ret - 011b 0081 034c lri $AR1, #0x034c - 011d 009f 0400 lri $AC1.M, #0x0400 - 011f 0080 0080 lri $AR0, #0x0080 - 0121 0081 034c lri $AR1, #0x034c - 0123 193e lrri $AC0.M, @$AR1 - 0124 193c lrri $AC0.L, @$AR1 - 0125 0098 0000 lri $AX0.L, #0x0000 - 0127 7000 addaxl $ACC0, $AX0.L - 0128 02bf 064d call 0x064d - 012a 02df ret - 012b 191e lrri $AC0.M, @$AR0 - 012c 191a lrri $AX0.H, @$AR0 - 012d 005f loop $AC1.M - 012e 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 012f 1b7e srri @$AR3, $AC0.M - 0130 1b7a srri @$AR3, $AX0.H - 0131 02df ret - 0132 0000 nop - 0133 007f 0138 bloop $AC1.M, 0x0138 - 0135 191e lrri $AC0.M, @$AR0 - 0136 1b7e srri @$AR3, $AC0.M - 0137 191e lrri $AC0.M, @$AR0 - 0138 1b7e srri @$AR3, $AC0.M - 0139 0000 nop - 013a 02df ret - 013b 191e lrri $AC0.M, @$AR0 - 013c 191a lrri $AX0.H, @$AR0 - 013d 007f 0142 bloop $AC1.M, 0x0142 - 013f 32b2 xorr'sl $AC0.M, $AX1.H : $AC0.M, $AX1.H - 0140 65a0 movr'ls $ACC1, $AX0.H : $AX0.H, $AC0.M - 0141 33ba xorr'slm $AC1.M, $AX1.H : $AC0.M, $AX1.H - 0142 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0143 0000 nop - 0144 02df ret - 0145 8a00 m2 - 0146 157f lsr $ACC1, #-1 - 0147 1c20 mrr $AR1, $AR0 - 0148 1c03 mrr $AR0, $AR3 - 0149 193a lrri $AX0.H, @$AR1 - 014a 9051 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR1 - 014b 925b mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX1.H, @$AR3 - 014c 007f 0151 bloop $AC1.M, 0x0151 - 014e 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 014f 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 0150 4651 addr'l $ACC0, $AX1.H : $AX0.H, @$AR1 - 0151 92b2 mulmvz'sl $AX0.L, $AX0.H, $ACC0 : $AC0.M, $AX1.H - 0152 8b00 m0 - 0153 02df ret - 0154 8a00 m2 - 0155 191a lrri $AX0.H, @$AR0 - 0156 9050 mul'l $AX0.L, $AX0.H : $AX0.H, @$AR0 - 0157 9250 mulmvz'l $AX0.L, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0158 005f loop $AC1.M - 0159 92a0 mulmvz'ls $AX0.L, $AX0.H, $ACC0 : $AX0.H, $AC0.M - 015a 8b00 m0 - 015b 02df ret - 015c 8100 clr $ACC0 - 015d 8900 clr $ACC1 - 015e 0e50 lris $AC0.M, #0x50 - 015f 0080 0d00 lri $AR0, #0x0d00 - 0161 005e loop $AC0.M - 0162 1b1f srri @$AR0, $AC1.M - 0163 0080 0d60 lri $AR0, #0x0d60 - 0165 005e loop $AC0.M - 0166 1b1f srri @$AR0, $AC1.M - 0167 00da 0374 lr $AX0.H, @0x0374 - 0169 8600 tstaxh $AX0.H - 016a 02b5 0f6f callz 0x0f6f - 016c 8100 clr $ACC0 - 016d 8900 clr $ACC1 - 016e 0e50 lris $AC0.M, #0x50 - 016f 0080 0ca0 lri $AR0, #0x0ca0 - 0171 005e loop $AC0.M - 0172 1b1f srri @$AR0, $AC1.M - 0173 0080 0f40 lri $AR0, #0x0f40 - 0175 005e loop $AC0.M - 0176 1b1f srri @$AR0, $AC1.M - 0177 0080 0fa0 lri $AR0, #0x0fa0 - 0179 005e loop $AC0.M - 017a 1b1f srri @$AR0, $AC1.M - 017b 0080 0a00 lri $AR0, #0x0a00 - 017d 005e loop $AC0.M - 017e 1b1f srri @$AR0, $AC1.M - 017f 0080 09a0 lri $AR0, #0x09a0 - 0181 005e loop $AC0.M - 0182 1b1f srri @$AR0, $AC1.M - 0183 0f04 lris $AC1.M, #0x04 - 0184 0080 0e10 lri $AR0, #0x0e10 - 0186 0083 0dc0 lri $AR3, #0x0dc0 - 0188 02bf 0132 call 0x0132 - 018a 0080 0e70 lri $AR0, #0x0e70 - 018c 0083 0e20 lri $AR3, #0x0e20 - 018e 02bf 0132 call 0x0132 - 0190 0080 0ed0 lri $AR0, #0x0ed0 - 0192 0083 0e80 lri $AR3, #0x0e80 - 0194 02bf 0132 call 0x0132 - 0196 0080 0f30 lri $AR0, #0x0f30 - 0198 0083 0ee0 lri $AR3, #0x0ee0 - 019a 02bf 0132 call 0x0132 - 019c 8100 clr $ACC0 - 019d 0e50 lris $AC0.M, #0x50 - 019e 8900 clr $ACC1 - 019f 0080 0dc8 lri $AR0, #0x0dc8 - 01a1 005e loop $AC0.M - 01a2 1b1f srri @$AR0, $AC1.M - 01a3 0080 0e28 lri $AR0, #0x0e28 - 01a5 005e loop $AC0.M - 01a6 1b1f srri @$AR0, $AC1.M - 01a7 0080 0e88 lri $AR0, #0x0e88 - 01a9 005e loop $AC0.M - 01aa 1b1f srri @$AR0, $AC1.M - 01ab 0080 0ee8 lri $AR0, #0x0ee8 - 01ad 005e loop $AC0.M - 01ae 1b1f srri @$AR0, $AC1.M - 01af 02df ret - 01b0 009f 0580 lri $AC1.M, #0x0580 - 01b2 009b 00a0 lri $AX1.H, #0x00a0 - 01b4 0081 0393 lri $AR1, #0x0393 - 01b6 18bc lrrd $AC0.L, @$AR1 - 01b7 b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 01b8 bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 01b9 0080 0050 lri $AR0, #0x0050 - 01bb 02bf 0640 call 0x0640 - 01bd 02df ret - 01be 00df 03a1 lr $AC1.M, @0x03a1 - 01c0 0508 addis $ACC1, #0x08 - 01c1 0080 0580 lri $AR0, #0x0580 - 01c3 1c7f mrr $AR3, $AC1.M - 01c4 0098 7fff lri $AX0.L, #0x7fff - 01c6 8900 clr $ACC1 - 01c7 0f50 lris $AC1.M, #0x50 - 01c8 02bf 0145 call 0x0145 - 01ca 02df ret - 01cb 00c0 03a0 lr $AR0, @0x03a0 - 01cd 191a lrri $AX0.H, @$AR0 - 01ce 02bf 01b0 call 0x01b0 - 01d0 02bf 01be call 0x01be - 01d2 8100 clr $ACC0 - 01d3 8900 clr $ACC1 - 01d4 00de 0390 lr $AC0.M, @0x0390 - 01d6 02a0 0001 andf $AC0.M, #0x0001 - 01d8 029d 01e1 jlz 0x01e1 - 01da 0080 0398 lri $AR0, #0x0398 - 01dc 0e08 lris $AC0.M, #0x08 - 01dd 00c1 03a1 lr $AR1, @0x03a1 - 01df 02bf 0c7d call 0x0c7d - 01e1 0f50 lris $AC1.M, #0x50 - 01e2 00c0 03a1 lr $AR0, @0x03a1 - 01e4 00da 0394 lr $AX0.H, @0x0394 - 01e6 8600 tstaxh $AX0.H - 01e7 0295 01ee jz 0x01ee - 01e9 1c7a mrr $AR3, $AX0.H - 01ea 00d8 0395 lr $AX0.L, @0x0395 - 01ec 02bf 0145 call 0x0145 - 01ee 0f50 lris $AC1.M, #0x50 - 01ef 00c0 03a1 lr $AR0, @0x03a1 - 01f1 00da 0396 lr $AX0.H, @0x0396 - 01f3 8600 tstaxh $AX0.H - 01f4 0295 01fb jz 0x01fb - 01f6 1c7a mrr $AR3, $AX0.H - 01f7 00d8 0397 lr $AX0.L, @0x0397 - 01f9 02bf 0145 call 0x0145 - 01fb 00de 0390 lr $AC0.M, @0x0390 - 01fd 02a0 0002 andf $AC0.M, #0x0002 - 01ff 02dd retlz - 0200 0080 0398 lri $AR0, #0x0398 - 0202 0e08 lris $AC0.M, #0x08 - 0203 00c1 03a1 lr $AR1, @0x03a1 - 0205 02bf 0c7d call 0x0c7d - 0207 02df ret - 0208 8900 clr $ACC1 - 0209 009f 0dc0 lri $AC1.M, #0x0dc0 - 020b 00ff 03a1 sr @0x03a1, $AC1.M - 020d 009f 03a8 lri $AC1.M, #0x03a8 - 020f 00ff 03a2 sr @0x03a2, $AC1.M - 0211 009f 03a4 lri $AC1.M, #0x03a4 - 0213 00ff 03a0 sr @0x03a0, $AC1.M - 0215 1104 0235 bloopi #0x04, 0x0235 - 0217 00c0 03a2 lr $AR0, @0x03a2 - 0219 0083 0390 lri $AR3, #0x0390 - 021b 8900 clr $ACC1 - 021c 0f08 lris $AC1.M, #0x08 - 021d 02bf 0132 call 0x0132 - 021f 00da 0390 lr $AX0.H, @0x0390 - 0221 8600 tstaxh $AX0.H - 0222 0295 0226 jz 0x0226 - 0224 02bf 01cb call 0x01cb - 0226 8100 clr $ACC0 - 0227 00de 03a2 lr $AC0.M, @0x03a2 - 0229 0410 addis $ACC0, #0x10 - 022a 00fe 03a2 sr @0x03a2, $AC0.M - 022c 00de 03a1 lr $AC0.M, @0x03a1 - 022e 0460 addis $ACC0, #0x60 - 022f 00fe 03a1 sr @0x03a1, $AC0.M - 0231 00de 03a0 lr $AC0.M, @0x03a0 - 0233 7400 incm $AC0.M - 0234 00fe 03a0 sr @0x03a0, $AC0.M - 0236 00da 0374 lr $AX0.H, @0x0374 - 0238 8600 tstaxh $AX0.H - 0239 0294 025f jnz 0x025f - 023b 0f50 lris $AC1.M, #0x50 - 023c 0080 0be0 lri $AR0, #0x0be0 - 023e 0083 0e80 lri $AR3, #0x0e80 - 0240 0098 7fff lri $AX0.L, #0x7fff - 0242 02bf 0145 call 0x0145 - 0244 0f50 lris $AC1.M, #0x50 - 0245 0080 0be0 lri $AR0, #0x0be0 - 0247 0083 0ee0 lri $AR3, #0x0ee0 - 0249 0098 b820 lri $AX0.L, #0xb820 - 024b 02bf 0145 call 0x0145 - 024d 0f28 lris $AC1.M, #0x28 - 024e 0080 0c68 lri $AR0, #0x0c68 - 0250 0083 0e80 lri $AR3, #0x0e80 - 0252 0098 b820 lri $AX0.L, #0xb820 - 0254 02bf 0145 call 0x0145 - 0256 0f28 lris $AC1.M, #0x28 - 0257 0080 0c68 lri $AR0, #0x0c68 - 0259 0083 0ee0 lri $AR3, #0x0ee0 - 025b 0098 7fff lri $AX0.L, #0x7fff - 025d 02bf 0145 call 0x0145 - 025f 8100 clr $ACC0 - 0260 8900 clr $ACC1 - 0261 0e50 lris $AC0.M, #0x50 - 0262 0080 0be0 lri $AR0, #0x0be0 - 0264 005e loop $AC0.M - 0265 1b1f srri @$AR0, $AC1.M - 0266 0080 0c40 lri $AR0, #0x0c40 - 0268 005e loop $AC0.M - 0269 1b1f srri @$AR0, $AC1.M - 026a 02df ret - 026b 00c0 03a0 lr $AR0, @0x03a0 - 026d 181a lrr $AX0.H, @$AR0 - 026e 8100 clr $ACC0 - 026f 181e lrr $AC0.M, @$AR0 - 0270 00db 0391 lr $AX1.H, @0x0391 - 0272 7400 incm $AC0.M - 0273 d100 cmpar $ACC1, $AX0.H - 0274 0270 ifge - 0275 8100 clr $ACC0 - 0276 1b1e srri @$AR0, $AC0.M - 0277 00df 03a1 lr $AC1.M, @0x03a1 - 0279 009b 00a0 lri $AX1.H, #0x00a0 - 027b 0081 0393 lri $AR1, #0x0393 - 027d 18bc lrrd $AC0.L, @$AR1 - 027e b871 mulx'l $AX0.H, $AX1.H : $AC0.M, @$AR1 - 027f bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 0280 0080 0050 lri $AR0, #0x0050 - 0282 02bf 064d call 0x064d - 0284 02df ret - 0285 00da 0374 lr $AX0.H, @0x0374 - 0287 8600 tstaxh $AX0.H - 0288 0294 029e jnz 0x029e - 028a 8900 clr $ACC1 - 028b 0f28 lris $AC1.M, #0x28 - 028c 0080 0c40 lri $AR0, #0x0c40 - 028e 0083 0ea8 lri $AR3, #0x0ea8 - 0290 0098 b820 lri $AX0.L, #0xb820 - 0292 02bf 0145 call 0x0145 - 0294 8900 clr $ACC1 - 0295 0f28 lris $AC1.M, #0x28 - 0296 0080 0c40 lri $AR0, #0x0c40 - 0298 0083 0f08 lri $AR3, #0x0f08 - 029a 0098 7fff lri $AX0.L, #0x7fff - 029c 02bf 0145 call 0x0145 - 029e 009f 0dc0 lri $AC1.M, #0x0dc0 - 02a0 00ff 03a1 sr @0x03a1, $AC1.M - 02a2 009f 03a8 lri $AC1.M, #0x03a8 - 02a4 00ff 03a2 sr @0x03a2, $AC1.M - 02a6 009f 03a4 lri $AC1.M, #0x03a4 - 02a8 00ff 03a0 sr @0x03a0, $AC1.M - 02aa 1104 02c8 bloopi #0x04, 0x02c8 - 02ac 00c0 03a2 lr $AR0, @0x03a2 - 02ae 0083 0390 lri $AR3, #0x0390 - 02b0 0f08 lris $AC1.M, #0x08 - 02b1 02bf 0132 call 0x0132 - 02b3 00da 0390 lr $AX0.H, @0x0390 - 02b5 8600 tstaxh $AX0.H - 02b6 0295 02ba jz 0x02ba - 02b8 02bf 026b call 0x026b - 02ba 00de 03a2 lr $AC0.M, @0x03a2 - 02bc 0410 addis $ACC0, #0x10 - 02bd 00fe 03a2 sr @0x03a2, $AC0.M - 02bf 00de 03a1 lr $AC0.M, @0x03a1 - 02c1 0460 addis $ACC0, #0x60 - 02c2 00fe 03a1 sr @0x03a1, $AC0.M - 02c4 00de 03a0 lr $AC0.M, @0x03a0 - 02c6 7400 incm $AC0.M - 02c7 00fe 03a0 sr @0x03a0, $AC0.M - 02c9 02df ret - 02ca 0081 0386 lri $AR1, #0x0386 - 02cc 009f 03a8 lri $AC1.M, #0x03a8 - 02ce 0080 0040 lri $AR0, #0x0040 - 02d0 02bf 063e call 0x063e - 02d2 02df ret - 02d3 191e lrri $AC0.M, @$AR0 - 02d4 189c lrrd $AC0.L, @$AR0 - 02d5 4800 addax $ACC0, $AX0.L - 02d6 1b1e srri @$AR0, $AC0.M - 02d7 1b1c srri @$AR0, $AC0.L - 02d8 02df ret - 02d9 8100 clr $ACC0 - 02da 8900 clr $ACC1 - 02db 00df 0354 lr $AC1.M, @0x0354 - 02dd 00de 034e lr $AC0.M, @0x034e - 02df 8200 cmp - 02e0 0293 02d9 jle 0x02d9 - 02e2 02df ret - 02e3 0080 0388 lri $AR0, #0x0388 - 02e5 0081 0072 lri $AR1, #0x0072 - 02e7 0e02 lris $AC0.M, #0x02 - 02e8 173f callr $AR1 - 02e9 02bf 04ce call 0x04ce - 02eb 00de 0344 lr $AC0.M, @0x0344 - 02ed 00fe 0341 sr @0x0341, $AC0.M - 02ef 00de 0345 lr $AC0.M, @0x0345 - 02f1 00fe 038e sr @0x038e, $AC0.M - 02f3 8100 clr $ACC0 - 02f4 00fe 0355 sr @0x0355, $AC0.M - 02f6 02bf 02ca call 0x02ca - 02f8 02bf 0692 call 0x0692 - 02fa 0092 00ff lri $CR, #0x00ff - 02fc 00de 0341 lr $AC0.M, @0x0341 - 02fe 007e 04c5 bloop $AC0.M, 0x04c5 - 0300 02bf 015c call 0x015c - 0302 02bf 0208 call 0x0208 - 0304 02bf 053a call 0x053a - 0306 02bf 0acb call 0x0acb - 0308 00de 0355 lr $AC0.M, @0x0355 - 030a 7400 incm $AC0.M - 030b 00fe 0355 sr @0x0355, $AC0.M - 030d 8100 clr $ACC0 - 030e 00fe 0354 sr @0x0354, $AC0.M - 0310 00de 0342 lr $AC0.M, @0x0342 - 0312 007e 0465 bloop $AC0.M, 0x0465 - 0314 009e fead lri $AC0.M, #0xfead - 0316 02bf 00a0 call 0x00a0 - 0318 02bf 02d9 call 0x02d9 - 031a 009e d0d0 lri $AC0.M, #0xd0d0 - 031c 02bf 00a0 call 0x00a0 - 031e 8100 clr $ACC0 - 031f 8900 clr $ACC1 - 0320 00de 0354 lr $AC0.M, @0x0354 - 0322 147c lsr $ACC0, #-4 - 0323 0200 04fc addi $AC0.M, #0x04fc - 0325 1c1e mrr $AR0, $AC0.M - 0326 181f lrr $AC1.M, @$AR0 - 0327 00de 0354 lr $AC0.M, @0x0354 - 0329 0240 000f andi $AC0.M, #0x000f - 032b 3d80 lsrnr $ACC1 - 032c 03c0 8000 andcf $AC1.M, #0x8000 - 032e 029c 0461 jlnz 0x0461 - 0330 00d8 0354 lr $AX0.L, @0x0354 - 0332 009a 0180 lri $AX0.H, #0x0180 - 0334 8100 clr $ACC0 - 0335 00de 0380 lr $AC0.M, @0x0380 - 0337 00dc 0381 lr $AC0.L, @0x0381 - 0339 9000 mul $AX0.L, $AX0.H - 033a 9400 mulac $AX0.L, $AX0.H, $ACC0 - 033b 00fe 034c sr @0x034c, $AC0.M - 033d 00fc 034d sr @0x034d, $AC0.L - 033f 02bf 0112 call 0x0112 - 0341 00da 0400 lr $AX0.H, @0x0400 - 0343 8600 tstaxh $AX0.H - 0344 0295 0461 jz 0x0461 - 0346 00da 0401 lr $AX0.H, @0x0401 - 0348 8600 tstaxh $AX0.H - 0349 0294 0461 jnz 0x0461 - 034b 00da 0433 lr $AX0.H, @0x0433 - 034d 00fa 03f8 sr @0x03f8, $AX0.H - 034f 00da 0406 lr $AX0.H, @0x0406 - 0351 8600 tstaxh $AX0.H - 0352 0294 0f2f jnz 0x0f2f - 0354 8100 clr $ACC0 - 0355 00de 0480 lr $AC0.M, @0x0480 - 0357 0609 cmpis $ACC0, #0x09 - 0358 0295 036b jz 0x036b - 035a 0605 cmpis $ACC0, #0x05 - 035b 0295 036b jz 0x036b - 035d 0608 cmpis $ACC0, #0x08 - 035e 0295 0afb jz 0x0afb - 0360 0610 cmpis $ACC0, #0x10 - 0361 0295 0b78 jz 0x0b78 - 0363 0620 cmpis $ACC0, #0x20 - 0364 0295 0be9 jz 0x0be9 - 0366 0621 cmpis $ACC0, #0x21 - 0367 0295 0bf1 jz 0x0bf1 - 0369 029f 09e8 jmp 0x09e8 - 036b 00d8 0402 lr $AX0.L, @0x0402 - 036d 8100 clr $ACC0 - 036e 8900 clr $ACC1 - 036f 00dc 0430 lr $AC0.L, @0x0430 - 0371 8d00 set15 - 0372 0950 lris $AX1.L, #0x50 - 0373 a000 mulx $AX0.L, $AX1.L - 0374 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0375 1404 lsl $ACC0, #4 - 0376 8c00 clr15 - 0377 1ffe mrr $AC1.M, $AC0.M - 0378 0083 0580 lri $AR3, #0x0580 - 037a 02bf 08aa call 0x08aa - 037c 029f 037e jmp 0x037e - 037e 0080 0580 lri $AR0, #0x0580 - 0380 0081 0520 lri $AR1, #0x0520 - 0382 0099 0000 lri $AX1.L, #0x0000 - 0384 02bf 0eaf call 0x0eaf - 0386 009e 0520 lri $AC0.M, #0x0520 - 0388 00fe 038f sr @0x038f, $AC0.M - 038a 8900 clr $ACC1 - 038b 00df 0484 lr $AC1.M, @0x0484 - 038d 0340 001f andi $AC1.M, #0x001f - 038f b900 tst $ACC1 - 0390 0295 03b6 jz 0x03b6 - 0392 00de 038f lr $AC0.M, @0x038f - 0394 5c00 sub $ACC0, $ACC1 - 0395 00fe 038f sr @0x038f, $AC0.M - 0397 1c7e mrr $AR3, $AC0.M - 0398 0080 0440 lri $AR0, #0x0440 - 039a 05fe addis $ACC1, #0xfe - 039b 02bf 012b call 0x012b - 039d 0080 0490 lri $AR0, #0x0490 - 039f 00c1 038f lr $AR1, @0x038f - 03a1 8900 clr $ACC1 - 03a2 00df 0484 lr $AC1.M, @0x0484 - 03a4 0340 001f andi $AC1.M, #0x001f - 03a6 02bf 0c9c call 0x0c9c - 03a8 00de 038f lr $AC0.M, @0x038f - 03aa 0450 addis $ACC0, #0x50 - 03ab 1c1e mrr $AR0, $AC0.M - 03ac 0083 0440 lri $AR3, #0x0440 - 03ae 8900 clr $ACC1 - 03af 00df 0484 lr $AC1.M, @0x0484 - 03b1 0340 001f andi $AC1.M, #0x001f - 03b3 05fe addis $ACC1, #0xfe - 03b4 02bf 012b call 0x012b - 03b6 00de 0484 lr $AC0.M, @0x0484 - 03b8 0240 0020 andi $AC0.M, #0x0020 - 03ba 0295 03d8 jz 0x03d8 - 03bc 0080 04a4 lri $AR0, #0x04a4 - 03be 00c1 038f lr $AR1, @0x038f - 03c0 0082 0454 lri $AR2, #0x0454 - 03c2 0083 04a7 lri $AR3, #0x04a7 - 03c4 18fa lrrd $AX0.H, @$AR3 - 03c5 8600 tstaxh $AX0.H - 03c6 0294 03d6 jnz 0x03d6 - 03c8 18fa lrrd $AX0.H, @$AR3 - 03c9 8600 tstaxh $AX0.H - 03ca 0294 03d6 jnz 0x03d6 - 03cc 18fa lrrd $AX0.H, @$AR3 - 03cd 8600 tstaxh $AX0.H - 03ce 0294 03d6 jnz 0x03d6 - 03d0 8100 clr $ACC0 - 03d1 18fe lrrd $AC0.M, @$AR3 - 03d2 0280 7fff cmpi $AC0.M, #0x7fff - 03d4 0295 03d8 jz 0x03d8 - 03d6 02bf 0cb7 call 0x0cb7 - 03d8 8100 clr $ACC0 - 03d9 00de 042c lr $AC0.M, @0x042c - 03db b100 tst $ACC0 - 03dc 0295 03e2 jz 0x03e2 - 03de 02bf 0dfd call 0x0dfd - 03e0 029f 0457 jmp 0x0457 - 03e2 8100 clr $ACC0 - 03e3 1c9e mrr $IX0, $AC0.M - 03e4 1cde mrr $IX2, $AC0.M - 03e5 7400 incm $AC0.M - 03e6 1cfe mrr $IX3, $AC0.M - 03e7 8100 clr $ACC0 - 03e8 00de 0407 lr $AC0.M, @0x0407 - 03ea b100 tst $ACC0 - 03eb 0295 03fa jz 0x03fa - 03ed 00c3 038f lr $AR3, @0x038f - 03ef 0007 dar $AR3 - 03f0 0080 0477 lri $AR0, #0x0477 - 03f2 0084 ffff lri $IX0, #0xffff - 03f4 0087 ffff lri $IX3, #0xffff - 03f6 199a lrrn $AX0.H, @$AR0 - 03f7 6554 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR0 - 03f8 005e loop $AC0.M - 03f9 65ad movr'lsnm $ACC1, $AX0.H : $AX0.H, $AC1.M - 03fa 00da 0485 lr $AX0.H, @0x0485 - 03fc 8600 tstaxh $AX0.H - 03fd 0295 0410 jz 0x0410 - 03ff 8900 clr $ACC1 - 0400 0086 0005 lri $IX2, #0x0005 - 0402 0082 040a lri $AR2, #0x040a - 0404 1106 0408 bloopi #0x06, 0x0408 - 0406 18de lrrd $AC0.M, @$AR2 - 0407 147f lsr $ACC0, #-1 - 0408 4d36 add'sn $ACC1, $ACC0 : @$AR2, $AC0.M - 0409 b900 tst $ACC1 - 040a 0294 0410 jnz 0x0410 - 040c 009a 0001 lri $AX0.H, #0x0001 - 040e 00fa 0401 sr @0x0401, $AX0.H - 0410 8f00 set40 - 0411 0086 0002 lri $IX2, #0x0002 - 0413 0082 0408 lri $AR2, #0x0408 - 0415 1106 0440 bloopi #0x06, 0x0440 - 0417 8100 clr $ACC0 - 0418 195e lrri $AC0.M, @$AR2 - 0419 1200 sbclr #0x00 - 041a b100 tst $ACC0 - 041b 0275 ifz - 041c 1300 sbset #0x00 - 041d 1c7e mrr $AR3, $AC0.M - 041e 195e lrri $AC0.M, @$AR2 - 041f 195f lrri $AC1.M, @$AR2 - 0420 5c00 sub $ACC0, $ACC1 - 0421 14fb asr $ACC0, #-5 - 0422 1f5e mrr $AX0.H, $AC0.M - 0423 1f1c mrr $AX0.L, $AC0.L - 0424 185e lrr $AC0.M, @$AR2 - 0425 0240 00ff andi $AC0.M, #0x00ff - 0427 1f7e mrr $AX1.H, $AC0.M - 0428 185e lrr $AC0.M, @$AR2 - 0429 1478 lsr $ACC0, #-8 - 042a 009c 0000 lri $AC0.L, #0x0000 - 042c d100 cmpar $ACC1, $AX0.H - 042d 0295 0435 jz 0x0435 - 042f 185e lrr $AC0.M, @$AR2 - 0430 0272 ifg - 0431 7400 incm $AC0.M - 0432 0271 ifl - 0433 7800 decm $AC0.M - 0434 1a5e srr @$AR2, $AC0.M - 0435 0006 dar $AR2 - 0436 00de 038f lr $AC0.M, @0x038f - 0438 5600 subr $ACC0, $AX1.H - 0439 029d 043e jlz 0x043e - 043b 1c1e mrr $AR0, $AC0.M - 043c 02bf 0dd3 call 0x0dd3 - 043e 0000 nop - 043f 1b5f srri @$AR2, $AC1.M - 0440 000a iar $AR2 - 0441 8e00 set16 - 0442 8100 clr $ACC0 - 0443 00de 0407 lr $AC0.M, @0x0407 - 0445 b100 tst $ACC0 - 0446 0295 0457 jz 0x0457 - 0448 00c3 038f lr $AR3, @0x038f - 044a 0087 004f lri $IX3, #0x004f - 044c 001f addarn $AR3, $IX3 - 044d 0080 0477 lri $AR0, #0x0477 - 044f 0084 ffff lri $IX0, #0xffff - 0451 0087 ffff lri $IX3, #0xffff - 0453 19fa lrrn $AX0.H, @$AR3 - 0454 6557 movr'ln $ACC1, $AX0.H : $AX0.H, @$AR3 - 0455 005e loop $AC0.M - 0456 65af movr'slnm $ACC1, $AX0.H : $AC1.M, $AX0.H - 0457 00da 0406 lr $AX0.H, @0x0406 - 0459 8600 tstaxh $AX0.H - 045a 0294 045f jnz 0x045f - 045c 8100 clr $ACC0 - 045d 00fe 0404 sr @0x0404, $AC0.M - 045f 02bf 011b call 0x011b - 0461 00de 0354 lr $AC0.M, @0x0354 - 0463 7400 incm $AC0.M - 0464 00fe 0354 sr @0x0354, $AC0.M - 0466 009e b05e lri $AC0.M, #0xb05e - 0468 02bf 00a0 call 0x00a0 - 046a 0e00 lris $AC0.M, #0x00 - 046b 00fe 034e sr @0x034e, $AC0.M - 046d 0e04 lris $AC0.M, #0x04 - 046e 02bf 07d7 call 0x07d7 - 0470 00de 0355 lr $AC0.M, @0x0355 - 0472 0260 ff00 ori $AC0.M, #0xff00 - 0474 02bf 07e1 call 0x07e1 - 0476 02bf 0d59 call 0x0d59 - 0478 02bf 0d6b call 0x0d6b - 047a 02bf 0dc0 call 0x0dc0 - 047c 00de 0341 lr $AC0.M, @0x0341 - 047e 7800 decm $AC0.M - 047f 00fe 0341 sr @0x0341, $AC0.M - 0481 0080 09a0 lri $AR0, #0x09a0 - 0483 0083 0d00 lri $AR3, #0x0d00 - 0485 0f50 lris $AC1.M, #0x50 - 0486 0098 5a82 lri $AX0.L, #0x5a82 - 0488 02bf 0145 call 0x0145 - 048a 0080 09a0 lri $AR0, #0x09a0 - 048c 0083 0d60 lri $AR3, #0x0d60 - 048e 0f50 lris $AC1.M, #0x50 - 048f 02bf 0145 call 0x0145 - 0491 0083 0d00 lri $AR3, #0x0d00 - 0493 02bf 0deb call 0x0deb - 0495 0081 0388 lri $AR1, #0x0388 - 0497 009f 0d00 lri $AC1.M, #0x0d00 - 0499 0080 0050 lri $AR0, #0x0050 - 049b 02bf 064b call 0x064b - 049d 0080 0fa0 lri $AR0, #0x0fa0 - 049f 0083 0d60 lri $AR3, #0x0d60 - 04a1 0f50 lris $AC1.M, #0x50 - 04a2 0098 8000 lri $AX0.L, #0x8000 - 04a4 02bf 0145 call 0x0145 - 04a6 0083 0d60 lri $AR3, #0x0d60 - 04a8 02bf 0deb call 0x0deb - 04aa 0081 038a lri $AR1, #0x038a - 04ac 009f 0d60 lri $AC1.M, #0x0d60 - 04ae 0080 0050 lri $AR0, #0x0050 - 04b0 02bf 064b call 0x064b - 04b2 009a 0000 lri $AX0.H, #0x0000 - 04b4 0098 00a0 lri $AX0.L, #0x00a0 - 04b6 0080 0388 lri $AR0, #0x0388 - 04b8 02bf 02d3 call 0x02d3 - 04ba 0080 038a lri $AR0, #0x038a - 04bc 02bf 02d3 call 0x02d3 - 04be 02bf 0285 call 0x0285 - 04c0 02bf 0509 call 0x0509 - 04c2 02bf 04e0 call 0x04e0 - 04c4 0000 nop - 04c5 0000 nop - 04c6 009e 0dac lri $AC0.M, #0x0dac - 04c8 02bf 00a0 call 0x00a0 - 04ca 0080 002b lri $AR0, #0x002b - 04cc 029f 0770 jmp 0x0770 - 04ce 0080 0374 lri $AR0, #0x0374 - 04d0 0e02 lris $AC0.M, #0x02 - 04d1 02bf 0074 call 0x0074 - 04d3 00de 0374 lr $AC0.M, @0x0374 - 04d5 0240 7fff andi $AC0.M, #0x7fff - 04d7 00fe 0374 sr @0x0374, $AC0.M - 04d9 00de 0376 lr $AC0.M, @0x0376 - 04db 0240 7fff andi $AC0.M, #0x7fff - 04dd 00fe 0376 sr @0x0376, $AC0.M - 04df 02df ret - 04e0 00da 0374 lr $AX0.H, @0x0374 - 04e2 8600 tstaxh $AX0.H - 04e3 02d5 retz - 04e4 0083 0f40 lri $AR3, #0x0f40 - 04e6 02bf 0deb call 0x0deb - 04e8 0083 0ca0 lri $AR3, #0x0ca0 - 04ea 02bf 0deb call 0x0deb - 04ec 0081 0374 lri $AR1, #0x0374 - 04ee 009f 0f40 lri $AC1.M, #0x0f40 - 04f0 0080 0050 lri $AR0, #0x0050 - 04f2 02bf 064b call 0x064b - 04f4 0081 0376 lri $AR1, #0x0376 - 04f6 009f 0ca0 lri $AC1.M, #0x0ca0 - 04f8 0080 0050 lri $AR0, #0x0050 - 04fa 02bf 064b call 0x064b - 04fc 009a 0000 lri $AX0.H, #0x0000 - 04fe 0098 00a0 lri $AX0.L, #0x00a0 - 0500 0080 0374 lri $AR0, #0x0374 - 0502 02bf 02d3 call 0x02d3 - 0504 0080 0376 lri $AR0, #0x0376 - 0506 02bf 02d3 call 0x02d3 - 0508 02df ret - 0509 00da 0374 lr $AX0.H, @0x0374 - 050b 8600 tstaxh $AX0.H - 050c 02d5 retz - 050d 009f 0be0 lri $AC1.M, #0x0be0 - 050f 00ff 03a1 sr @0x03a1, $AC1.M - 0511 00df 03ca lr $AC1.M, @0x03ca - 0513 00ff 0392 sr @0x0392, $AC1.M - 0515 00df 03cb lr $AC1.M, @0x03cb - 0517 00ff 0393 sr @0x0393, $AC1.M - 0519 009f 03a6 lri $AC1.M, #0x03a6 - 051b 00ff 03a0 sr @0x03a0, $AC1.M - 051d 00df 03c9 lr $AC1.M, @0x03c9 - 051f 00ff 0391 sr @0x0391, $AC1.M - 0521 02bf 026b call 0x026b - 0523 009f 0c40 lri $AC1.M, #0x0c40 - 0525 00ff 03a1 sr @0x03a1, $AC1.M - 0527 00df 03da lr $AC1.M, @0x03da - 0529 00ff 0392 sr @0x0392, $AC1.M - 052b 00df 03db lr $AC1.M, @0x03db - 052d 00ff 0393 sr @0x0393, $AC1.M - 052f 009f 03a7 lri $AC1.M, #0x03a7 - 0531 00ff 03a0 sr @0x03a0, $AC1.M - 0533 00df 03d9 lr $AC1.M, @0x03d9 - 0535 00ff 0391 sr @0x0391, $AC1.M - 0537 02bf 026b call 0x026b - 0539 02df ret - 053a 00da 0374 lr $AX0.H, @0x0374 - 053c 8600 tstaxh $AX0.H - 053d 02d5 retz - 053e 00da 03d8 lr $AX0.H, @0x03d8 - 0540 8600 tstaxh $AX0.H - 0541 02d5 retz - 0542 0083 0be0 lri $AR3, #0x0be0 - 0544 0080 0c30 lri $AR0, #0x0c30 - 0546 0f04 lris $AC1.M, #0x04 - 0547 02bf 0132 call 0x0132 - 0549 0083 0c40 lri $AR3, #0x0c40 - 054b 0080 0c90 lri $AR0, #0x0c90 - 054d 0f04 lris $AC1.M, #0x04 - 054e 02bf 0132 call 0x0132 - 0550 00df 03ca lr $AC1.M, @0x03ca - 0552 00ff 0392 sr @0x0392, $AC1.M - 0554 00df 03cb lr $AC1.M, @0x03cb - 0556 00ff 0393 sr @0x0393, $AC1.M - 0558 00df 03a6 lr $AC1.M, @0x03a6 - 055a 7500 incm $AC1.M - 055b 1f5f mrr $AX0.H, $AC1.M - 055c 009f 0be8 lri $AC1.M, #0x0be8 - 055e 02bf 01b2 call 0x01b2 - 0560 00df 03da lr $AC1.M, @0x03da - 0562 00ff 0392 sr @0x0392, $AC1.M - 0564 00df 03db lr $AC1.M, @0x03db - 0566 00ff 0393 sr @0x0393, $AC1.M - 0568 00df 03a7 lr $AC1.M, @0x03a7 - 056a 7500 incm $AC1.M - 056b 1f5f mrr $AX0.H, $AC1.M - 056c 009f 0c48 lri $AC1.M, #0x0c48 - 056e 02bf 01b2 call 0x01b2 - 0570 00de 03c8 lr $AC0.M, @0x03c8 - 0572 02a0 0001 andf $AC0.M, #0x0001 - 0574 029d 057d jlz 0x057d - 0576 0080 03d0 lri $AR0, #0x03d0 - 0578 0e08 lris $AC0.M, #0x08 - 0579 0081 0be0 lri $AR1, #0x0be0 - 057b 02bf 0c7d call 0x0c7d - 057d 00de 03d8 lr $AC0.M, @0x03d8 - 057f 02a0 0001 andf $AC0.M, #0x0001 - 0581 029d 058a jlz 0x058a - 0583 0080 03e0 lri $AR0, #0x03e0 - 0585 0e08 lris $AC0.M, #0x08 - 0586 0081 0c40 lri $AR1, #0x0c40 - 0588 02bf 0c7d call 0x0c7d - 058a 0f50 lris $AC1.M, #0x50 - 058b 0080 0be0 lri $AR0, #0x0be0 - 058d 0083 0f40 lri $AR3, #0x0f40 - 058f 00d8 03cd lr $AX0.L, @0x03cd - 0591 02bf 0145 call 0x0145 - 0593 0f50 lris $AC1.M, #0x50 - 0594 0080 0c40 lri $AR0, #0x0c40 - 0596 0083 0ca0 lri $AR3, #0x0ca0 - 0598 00d8 03df lr $AX0.L, @0x03df - 059a 02bf 0145 call 0x0145 - 059c 00de 03c8 lr $AC0.M, @0x03c8 - 059e 02a0 0002 andf $AC0.M, #0x0002 - 05a0 029d 05a9 jlz 0x05a9 - 05a2 0080 03d0 lri $AR0, #0x03d0 - 05a4 0e08 lris $AC0.M, #0x08 - 05a5 0081 0be0 lri $AR1, #0x0be0 - 05a7 02bf 0c7d call 0x0c7d - 05a9 00de 03d8 lr $AC0.M, @0x03d8 - 05ab 02a0 0002 andf $AC0.M, #0x0002 - 05ad 029d 05b6 jlz 0x05b6 - 05af 0080 03e0 lri $AR0, #0x03e0 - 05b1 0e08 lris $AC0.M, #0x08 - 05b2 0081 0c40 lri $AR1, #0x0c40 - 05b4 02bf 0c7d call 0x0c7d - 05b6 02df ret - 05b7 0080 0346 lri $AR0, #0x0346 - 05b9 02bf 0072 call 0x0072 - 05bb 02bf 0072 call 0x0072 - 05bd 0081 0346 lri $AR1, #0x0346 - 05bf 193e lrri $AC0.M, @$AR1 - 05c0 193c lrri $AC0.L, @$AR1 - 05c1 009f 0400 lri $AC1.M, #0x0400 - 05c3 00c0 0345 lr $AR0, @0x0345 - 05c5 02bf 0640 call 0x0640 - 05c7 0081 0348 lri $AR1, #0x0348 - 05c9 193e lrri $AC0.M, @$AR1 - 05ca 193c lrri $AC0.L, @$AR1 - 05cb 009f 0800 lri $AC1.M, #0x0800 - 05cd 00c0 0345 lr $AR0, @0x0345 - 05cf 02bf 0640 call 0x0640 - 05d1 0081 0346 lri $AR1, #0x0346 - 05d3 193e lrri $AC0.M, @$AR1 - 05d4 193c lrri $AC0.L, @$AR1 - 05d5 009f 0800 lri $AC1.M, #0x0800 - 05d7 00c0 0345 lr $AR0, @0x0345 - 05d9 02bf 064d call 0x064d - 05db 0081 0348 lri $AR1, #0x0348 - 05dd 193e lrri $AC0.M, @$AR1 - 05de 193c lrri $AC0.L, @$AR1 - 05df 009f 0400 lri $AC1.M, #0x0400 - 05e1 00c0 0345 lr $AR0, @0x0345 - 05e3 02bf 064d call 0x064d - 05e5 029f 004a jmp 0x004a - 05e7 0080 0346 lri $AR0, #0x0346 - 05e9 02bf 0072 call 0x0072 - 05eb 02bf 0072 call 0x0072 - 05ed 0081 0346 lri $AR1, #0x0346 - 05ef 193e lrri $AC0.M, @$AR1 - 05f0 193c lrri $AC0.L, @$AR1 - 05f1 009f 0400 lri $AC1.M, #0x0400 - 05f3 00c0 0345 lr $AR0, @0x0345 - 05f5 02bf 0640 call 0x0640 - 05f7 0081 0348 lri $AR1, #0x0348 - 05f9 193e lrri $AC0.M, @$AR1 - 05fa 193c lrri $AC0.L, @$AR1 - 05fb 009f 0400 lri $AC1.M, #0x0400 - 05fd 00c0 0345 lr $AR0, @0x0345 - 05ff 02bf 064d call 0x064d - 0601 029f 004a jmp 0x004a - 0603 0080 0346 lri $AR0, #0x0346 - 0605 02bf 0072 call 0x0072 - 0607 02bf 0072 call 0x0072 - 0609 0081 0346 lri $AR1, #0x0346 - 060b 193e lrri $AC0.M, @$AR1 - 060c 193c lrri $AC0.L, @$AR1 - 060d 009f 0400 lri $AC1.M, #0x0400 - 060f 00c0 0344 lr $AR0, @0x0344 - 0611 02bf 0640 call 0x0640 - 0613 0081 0348 lri $AR1, #0x0348 - 0615 193e lrri $AC0.M, @$AR1 - 0616 193c lrri $AC0.L, @$AR1 - 0617 009f 0800 lri $AC1.M, #0x0800 - 0619 00c0 0344 lr $AR0, @0x0344 - 061b 02bf 0640 call 0x0640 - 061d 0080 0400 lri $AR0, #0x0400 - 061f 0083 0800 lri $AR3, #0x0800 - 0621 0084 0000 lri $IX0, #0x0000 - 0623 00da 0345 lr $AX0.H, @0x0345 - 0625 00df 0344 lr $AC1.M, @0x0344 - 0627 8f00 set40 - 0628 197b lrri $AX1.H, @$AR3 - 0629 b800 mulx $AX0.H, $AX1.H - 062a 197b lrri $AX1.H, @$AR3 - 062b 007f 0630 bloop $AC1.M, 0x0630 - 062d 199e lrrn $AC0.M, @$AR0 - 062e bc00 mulxac $AX0.H, $AX1.H, $ACC0 - 062f 80b2 nx'sl : $AC0.M, $AX1.H - 0630 0000 nop - 0631 8e00 set16 - 0632 0081 0346 lri $AR1, #0x0346 - 0634 193e lrri $AC0.M, @$AR1 - 0635 193c lrri $AC0.L, @$AR1 - 0636 009f 0400 lri $AC1.M, #0x0400 - 0638 00c0 0344 lr $AR0, @0x0344 - 063a 02bf 064d call 0x064d - 063c 029f 004a jmp 0x004a - 063e 193e lrri $AC0.M, @$AR1 - 063f 193c lrri $AC0.L, @$AR1 - 0640 2fcd srs @DSPA, $AC1.M - 0641 0f00 lris $AC1.M, #0x00 - 0642 2fc9 srs @DSCR, $AC1.M - 0643 2ece srs @DSMAH, $AC0.M - 0644 2ccf srs @DSMAL, $AC0.L - 0645 1fe0 mrr $AC1.M, $AR0 - 0646 1501 lsl $ACC1, #1 - 0647 2fcb srs @DSBL, $AC1.M - 0648 02bf 0651 call 0x0651 - 064a 02df ret - 064b 193e lrri $AC0.M, @$AR1 - 064c 193c lrri $AC0.L, @$AR1 - 064d 2fcd srs @DSPA, $AC1.M - 064e 0f01 lris $AC1.M, #0x01 - 064f 029f 0642 jmp 0x0642 - 0651 26c9 lrs $AC0.M, @DSCR - 0652 02a0 0004 andf $AC0.M, #0x0004 - 0654 029c 0651 jlnz 0x0651 - 0656 02df ret - 0657 193e lrri $AC0.M, @$AR1 - 0658 193c lrri $AC0.L, @$AR1 - 0659 00ff ffcd sr @DSPA, $AC1.M - 065b 0f00 lris $AC1.M, #0x00 - 065c 00ff ffc9 sr @DSCR, $AC1.M - 065e 00fe ffce sr @DSMAH, $AC0.M - 0660 00fc ffcf sr @DSMAL, $AC0.L - 0662 1fe0 mrr $AC1.M, $AR0 - 0663 1501 lsl $ACC1, #1 - 0664 00ff ffcb sr @DSBL, $AC1.M - 0666 02df ret - 0667 00de ffc9 lr $AC0.M, @DSCR - 0669 02a0 0004 andf $AC0.M, #0x0004 - 066b 029c 0667 jlnz 0x0667 - 066d 02df ret - 066e 0080 0346 lri $AR0, #0x0346 - 0670 02bf 0072 call 0x0072 - 0672 02bf 0072 call 0x0072 - 0674 0081 0346 lri $AR1, #0x0346 - 0676 00df 0349 lr $AC1.M, @0x0349 - 0678 0340 ffff andi $AC1.M, #0xffff - 067a 00c0 0345 lr $AR0, @0x0345 - 067c 02bf 063e call 0x063e - 067e 029f 004a jmp 0x004a - 0680 0080 0346 lri $AR0, #0x0346 - 0682 02bf 0072 call 0x0072 - 0684 02bf 0072 call 0x0072 - 0686 0081 0346 lri $AR1, #0x0346 - 0688 00df 0349 lr $AC1.M, @0x0349 - 068a 0340 ffff andi $AC1.M, #0xffff - 068c 00c0 0345 lr $AR0, @0x0345 - 068e 02bf 064b call 0x064b - 0690 029f 004a jmp 0x004a - 0692 0092 00ff lri $CR, #0x00ff - 0694 009e ffff lri $AC0.M, #0xffff - 0696 2ed4 srs @ACSAH, $AC0.M - 0697 2ed5 srs @ACSAL, $AC0.M - 0698 2ed6 srs @ACEAH, $AC0.M - 0699 2ed7 srs @ACEAL, $AC0.M - 069a 02df ret - 069b 00ff ffd1 sr @SampleFormat, $AC1.M - 069d 0340 0003 andi $AC1.M, #0x0003 - 069f 7900 decm $AC1.M - 06a0 02ca lsrn - 06a1 00df 037d lr $AC1.M, @0x037d - 06a3 00dd 037e lr $AC1.L, @0x037e - 06a5 4c00 add $ACC0, $ACC1 - 06a6 00fe ffd8 sr @ACCAH, $AC0.M - 06a8 00fc ffd9 sr @ACCAL, $AC0.L - 06aa 02df ret - 06ab 1fc3 mrr $AC0.M, $AR3 - 06ac 043f addis $ACC0, #0x3f - 06ad 0240 fff0 andi $AC0.M, #0xfff0 - 06af 00fe ffcd sr @DSPA, $AC0.M - 06b1 1c1a mrr $AR0, $AX0.H - 06b2 00da 037f lr $AX0.H, @0x037f - 06b4 4400 addr $ACC0, $AX0.H - 06b5 1f40 mrr $AX0.H, $AR0 - 06b6 1c1e mrr $AR0, $AC0.M - 06b7 1fda mrr $AC0.M, $AX0.H - 06b8 041f addis $ACC0, #0x1f - 06b9 0240 fff0 andi $AC0.M, #0xfff0 - 06bb 1401 lsl $ACC0, #1 - 06bc 00fe ffcb sr @DSBL, $AC0.M - 06be 00de ffc9 lr $AC0.M, @DSCR - 06c0 02a0 0004 andf $AC0.M, #0x0004 - 06c2 029c 06be jlnz 0x06be - 06c4 007a 06c7 bloop $AX0.H, 0x06c7 - 06c6 191e lrri $AC0.M, @$AR0 - 06c7 1b7e srri @$AR3, $AC0.M - 06c8 02df ret - 06c9 8900 clr $ACC1 - 06ca 1ffc mrr $AC1.M, $AC0.L - 06cb 0340 001f andi $AC1.M, #0x001f - 06cd 00ff 037f sr @0x037f, $AC1.M - 06cf 1ffc mrr $AC1.M, $AC0.L - 06d0 0340 ffe0 andi $AC1.M, #0xffe0 - 06d2 1f9f mrr $AC0.L, $AC1.M - 06d3 00df 037d lr $AC1.M, @0x037d - 06d5 00dd 037e lr $AC1.L, @0x037e - 06d7 4c00 add $ACC0, $ACC1 - 06d8 00fe ffce sr @DSMAH, $AC0.M - 06da 00fc ffcf sr @DSMAL, $AC0.L - 06dc 0f00 lris $AC1.M, #0x00 - 06dd 00ff ffc9 sr @DSCR, $AC1.M - 06df 02df ret - 06e0 00df 037f lr $AC1.M, @0x037f - 06e2 157f lsr $ACC1, #-1 - 06e3 00ff 037f sr @0x037f, $AC1.M - 06e5 02df ret - 06e6 8600 tstaxh $AX0.H - 06e7 02d5 retz - 06e8 1f1a mrr $AX0.L, $AX0.H - 06e9 009e 0780 lri $AC0.M, #0x0780 - 06eb 00fe ffcd sr @DSPA, $AC0.M - 06ed 1fda mrr $AC0.M, $AX0.H - 06ee 043f addis $ACC0, #0x3f - 06ef 0240 ffe0 andi $AC0.M, #0xffe0 - 06f1 00fe ffcb sr @DSBL, $AC0.M - 06f3 00de ffc9 lr $AC0.M, @DSCR - 06f5 02a0 0004 andf $AC0.M, #0x0004 - 06f7 029c 06f3 jlnz 0x06f3 - 06f9 8100 clr $ACC0 - 06fa 00de 037f lr $AC0.M, @0x037f - 06fc 147f lsr $ACC0, #-1 - 06fd 0200 0780 addi $AC0.M, #0x0780 - 06ff 1c1e mrr $AR0, $AC0.M - 0700 00de 037f lr $AC0.M, @0x037f - 0702 02a0 0001 andf $AC0.M, #0x0001 - 0704 029d 070d jlz 0x070d - 0706 8100 clr $ACC0 - 0707 191e lrri $AC0.M, @$AR0 - 0708 1488 asl $ACC0, #8 - 0709 1b7e srri @$AR3, $AC0.M - 070a 1fda mrr $AC0.M, $AX0.H - 070b 7800 decm $AC0.M - 070c 1f5e mrr $AX0.H, $AC0.M - 070d 8100 clr $ACC0 - 070e 1fda mrr $AC0.M, $AX0.H - 070f 147f lsr $ACC0, #-1 - 0710 007e 0719 bloop $AC0.M, 0x0719 - 0712 8100 clr $ACC0 - 0713 181e lrr $AC0.M, @$AR0 - 0714 0240 ff00 andi $AC0.M, #0xff00 - 0716 1b7e srri @$AR3, $AC0.M - 0717 191e lrri $AC0.M, @$AR0 - 0718 1488 asl $ACC0, #8 - 0719 1b7e srri @$AR3, $AC0.M - 071a 1fda mrr $AC0.M, $AX0.H - 071b 1f58 mrr $AX0.H, $AX0.L - 071c 02a0 0001 andf $AC0.M, #0x0001 - 071e 02dd retlz - 071f 8100 clr $ACC0 - 0720 181e lrr $AC0.M, @$AR0 - 0721 0240 ff00 andi $AC0.M, #0xff00 - 0723 1b7e srri @$AR3, $AC0.M - 0724 02df ret - 0725 1205 sbclr #0x05 - 0726 8e00 set16 - 0727 00f0 03fd sr @0x03fd, $AC0.H - 0729 00fc 03ff sr @0x03ff, $AC0.L - 072b f400 lsr16 $ACC0 - 072c 00fc 03fe sr @0x03fe, $AC0.L - 072e 00fa 03fa sr @0x03fa, $AX0.H - 0730 8100 clr $ACC0 - 0731 00de fffe lr $AC0.M, @CMBH - 0733 02c0 8000 andcf $AC0.M, #0x8000 - 0735 029c 0826 jlnz 0x0826 - 0737 00da ffff lr $AX0.H, @CMBL - 0739 8600 tstaxh $AX0.H - 073a 0294 07ff jnz 0x07ff - 073c 00de fffe lr $AC0.M, @CMBH - 073e 02c0 8000 andcf $AC0.M, #0x8000 - 0740 029c 073c jlnz 0x073c - 0742 0240 000f andi $AC0.M, #0x000f - 0744 1f5e mrr $AX0.H, $AC0.M - 0745 7400 incm $AC0.M - 0746 0c00 lris $AC0.L, #0x00 - 0747 1404 lsl $ACC0, #4 - 0748 00fe 034e sr @0x034e, $AC0.M - 074a 1fda mrr $AC0.M, $AX0.H - 074b 1f40 mrr $AX0.H, $AR0 - 074c 0200 04fc addi $AC0.M, #0x04fc - 074e 1c1e mrr $AR0, $AC0.M - 074f 00de ffff lr $AC0.M, @CMBL - 0751 1a1e srr @$AR0, $AC0.M - 0752 1c1a mrr $AR0, $AX0.H - 0753 00de 03fe lr $AC0.M, @0x03fe - 0755 00dc 03ff lr $AC0.L, @0x03ff - 0757 00d0 03fd lr $AC0.H, @0x03fd - 0759 00da 03fa lr $AX0.H, @0x03fa - 075b 1305 sbset #0x05 - 075c 02ff rti - 075d 009a 0002 lri $AX0.H, #0x0002 - 075f 00fa 03a3 sr @0x03a3, $AX0.H - 0761 00e0 03f9 sr @0x03f9, $AR0 - 0763 02bf 07e9 call 0x07e9 - 0765 16fc dcd1 si @DMBH, #0xdcd1 - 0767 16fd 0002 si @DMBL, #0x0002 - 0769 16fb 0001 si @DIRQ, #0x0001 - 076b 0021 halt - 076c 0784 cmpis $ACC1, #0x84 - 076d 0785 cmpis $ACC1, #0x85 - 076e 07c5 cmpis $ACC1, #0xc5 - 076f 07c8 cmpis $ACC1, #0xc8 - 0770 00e0 03f9 sr @0x03f9, $AR0 - 0772 009e 0005 lri $AC0.M, #0x0005 - 0774 02bf 07d7 call 0x07d7 - 0776 8e00 set16 - 0777 8100 clr $ACC0 - 0778 8900 clr $ACC1 - 0779 02bf 07cb call 0x07cb - 077b 27ff lrs $AC1.M, @CMBL - 077c 009e 076c lri $AC0.M, #0x076c - 077e 4c00 add $ACC0, $ACC1 - 077f 1c7e mrr $AR3, $AC0.M - 0780 0313 ilrr $AC1.M, @$AR3 - 0781 1c7f mrr $AR3, $AC1.M - 0782 176f jmpr $AR3 - 0783 0021 halt - 0784 0021 halt - 0785 009a 0002 lri $AX0.H, #0x0002 - 0787 00fa 03a3 sr @0x03a3, $AX0.H - 0789 8100 clr $ACC0 - 078a 8900 clr $ACC1 - 078b 02bf 07cb call 0x07cb - 078d 24ff lrs $AC0.L, @CMBL - 078e 02bf 07d1 call 0x07d1 - 0790 25ff lrs $AC1.L, @CMBL - 0791 02bf 07d1 call 0x07d1 - 0793 27ff lrs $AC1.M, @CMBL - 0794 2ece srs @DSMAH, $AC0.M - 0795 2ccf srs @DSMAL, $AC0.L - 0796 16c9 0001 si @DSCR, #0x0001 - 0798 2fcd srs @DSPA, $AC1.M - 0799 2dcb srs @DSBL, $AC1.L - 079a 8100 clr $ACC0 - 079b 8900 clr $ACC1 - 079c 02bf 07cb call 0x07cb - 079e 24ff lrs $AC0.L, @CMBL - 079f 1c9e mrr $IX0, $AC0.M - 07a0 1cbc mrr $IX1, $AC0.L - 07a1 02bf 07d1 call 0x07d1 - 07a3 25ff lrs $AC1.L, @CMBL - 07a4 02bf 07d1 call 0x07d1 - 07a6 27ff lrs $AC1.M, @CMBL - 07a7 1cdf mrr $IX2, $AC1.M - 07a8 1cfd mrr $IX3, $AC1.L - 07a9 8100 clr $ACC0 - 07aa 02bf 07cb call 0x07cb - 07ac 26ff lrs $AC0.M, @CMBL - 07ad 1c1e mrr $AR0, $AC0.M - 07ae 8900 clr $ACC1 - 07af 02bf 07d1 call 0x07d1 - 07b1 20ff lrs $AX0.L, @CMBL - 07b2 1f5f mrr $AX0.H, $AC1.M - 07b3 02bf 07cb call 0x07cb - 07b5 21ff lrs $AX1.L, @CMBL - 07b6 02bf 07cb call 0x07cb - 07b8 23ff lrs $AX1.H, @CMBL - 07b9 26c9 lrs $AC0.M, @DSCR - 07ba 02a0 0004 andf $AC0.M, #0x0004 - 07bc 029c 07b9 jlnz 0x07b9 - 07be 1206 sbclr #0x06 - 07bf 1203 sbclr #0x03 - 07c0 1204 sbclr #0x04 - 07c1 1205 sbclr #0x05 - 07c2 029f 80b5 jmp 0x80b5 - 07c4 0021 halt - 07c5 029f 8000 jmp 0x8000 - 07c7 0021 halt - 07c8 00c0 03f9 lr $AR0, @0x03f9 - 07ca 170f jmpr $AR0 - 07cb 26fe lrs $AC0.M, @CMBH - 07cc 02c0 8000 andcf $AC0.M, #0x8000 - 07ce 029c 07cb jlnz 0x07cb - 07d0 02df ret - 07d1 27fe lrs $AC1.M, @CMBH - 07d2 03c0 8000 andcf $AC1.M, #0x8000 - 07d4 029c 07d1 jlnz 0x07d1 - 07d6 02df ret - -void SEND_DCD1(AC0.M) { - 07d7 02bf 07ef call 0x07ef - 07d9 16fc dcd1 si @DMBH, #0xdcd1 - 07db 2efd srs @DMBL, $AC0.M - 07dc 16fb 0001 si @DIRQ, #0x0001 - 07de 02bf 07ef call 0x07ef - 07e0 02df ret -} - -void SEND_F355(AC0.M) { - 07e1 02bf 07ef call 0x07ef - 07e3 16fc f355 si @DMBH, #0xf355 - 07e5 2efd srs @DMBL, $AC0.M - 07e6 02bf 07ef call 0x07ef - 07e8 02df ret -} - - 07e9 26fc lrs $AC0.M, @DMBH - 07ea 02c0 8000 andcf $AC0.M, #0x8000 - 07ec 029d 07e9 jlz 0x07e9 - 07ee 02df ret - 07ef 27fc lrs $AC1.M, @DMBH - 07f0 03c0 8000 andcf $AC1.M, #0x8000 - 07f2 029d 07ef jlz 0x07ef - 07f4 02df ret - 07f5 009a 0280 lri $AX0.H, #0x0280 - 07f7 00fa 0350 sr @0x0350, $AX0.H - 07f9 00fa 0351 sr @0x0351, $AX0.H - 07fb 0a00 lris $AX0.H, #0x00 - 07fc 00fa 0352 sr @0x0352, $AX0.H - 07fe 02df ret - 07ff 00e0 03fb sr @0x03fb, $AR0 - 0801 00e8 03fc sr @0x03fc, $WR0 - 0803 00c0 0350 lr $AR0, @0x0350 - 0805 0088 002f lri $WR0, #0x002f - 0807 1b1a srri @$AR0, $AX0.H - 0808 00de fffe lr $AC0.M, @CMBH - 080a 02c0 8000 andcf $AC0.M, #0x8000 - 080c 029c 0808 jlnz 0x0808 - 080e 00dc ffff lr $AC0.L, @CMBL - 0810 1b1e srri @$AR0, $AC0.M - 0811 1b1c srri @$AR0, $AC0.L - 0812 1fda mrr $AC0.M, $AX0.H - 0813 7800 decm $AC0.M - 0814 1f5e mrr $AX0.H, $AC0.M - 0815 8600 tstaxh $AX0.H - 0816 0294 0808 jnz 0x0808 - 0818 8100 clr $ACC0 - 0819 00de 0352 lr $AC0.M, @0x0352 - 081b 7400 incm $AC0.M - 081c 00fe 0352 sr @0x0352, $AC0.M - 081e 00e0 0350 sr @0x0350, $AR0 - 0820 00c0 03fb lr $AR0, @0x03fb - 0822 00c8 03fc lr $WR0, @0x03fc - 0824 029f 0753 jmp 0x0753 - 0826 00e0 03fb sr @0x03fb, $AR0 - 0828 00e8 03fc sr @0x03fc, $WR0 - 082a 00c0 0350 lr $AR0, @0x0350 - 082c 0088 002f lri $WR0, #0x002f - 082e 0a00 lris $AX0.H, #0x00 - 082f 1b1a srri @$AR0, $AX0.H - 0830 029f 0818 jmp 0x0818 - 0832 00c0 0351 lr $AR0, @0x0351 - 0834 0088 002f lri $WR0, #0x002f - 0836 00da 0352 lr $AX0.H, @0x0352 - 0838 8600 tstaxh $AX0.H - 0839 0295 085a jz 0x085a - 083b 1205 sbclr #0x05 - 083c 00da 0352 lr $AX0.H, @0x0352 - 083e 1fda mrr $AC0.M, $AX0.H - 083f 7800 decm $AC0.M - 0840 00fe 0352 sr @0x0352, $AC0.M - 0842 1305 sbset #0x05 - 0843 0081 0356 lri $AR1, #0x0356 - 0845 191e lrri $AC0.M, @$AR0 - 0846 02c0 8000 andcf $AC0.M, #0x8000 - 0848 029d 085e jlz 0x085e - 084a 1f5e mrr $AX0.H, $AC0.M - 084b 8600 tstaxh $AX0.H - 084c 0295 0862 jz 0x0862 - 084e 007a 0853 bloop $AX0.H, 0x0853 - 0850 191e lrri $AC0.M, @$AR0 - 0851 1b3e srri @$AR1, $AC0.M - 0852 191e lrri $AC0.M, @$AR0 - 0853 1b3e srri @$AR1, $AC0.M - 0854 00e0 0351 sr @0x0351, $AR0 - 0856 0088 ffff lri $WR0, #0xffff - 0858 029f 0036 jmp 0x0036 - 085a 0088 ffff lri $WR0, #0xffff - 085c 029f 002b jmp 0x002b - 085e 00e0 0351 sr @0x0351, $AR0 - 0860 029f 0836 jmp 0x0836 - 0862 0080 0832 lri $AR0, #0x0832 - 0864 029f 075d jmp 0x075d - 0866 8100 clr $ACC0 - 0867 0e10 lris $AC0.M, #0x10 - 0868 2232 lrs $AX0.H, @0x0032 - 0869 8600 tstaxh $AX0.H - 086a 02d5 retz - 086b 5400 subr $ACC0, $AX0.H - 086c 0200 0458 addi $AC0.M, #0x0458 - 086e 1c1e mrr $AR0, $AC0.M - 086f 1fda mrr $AC0.M, $AX0.H - 0870 04fe addis $ACC0, #0xfe - 0871 1f1e mrr $AX0.L, $AC0.M - 0872 191e lrri $AC0.M, @$AR0 - 0873 0291 0879 jl 0x0879 - 0875 191a lrri $AX0.H, @$AR0 - 0876 0058 loop $AX0.L - 0877 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0878 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 0879 1b7e srri @$AR3, $AC0.M - 087a 02df ret - 087b 02bf 0866 call 0x0866 - 087d 8100 clr $ACC0 - 087e 2632 lrs $AC0.M, @0x0032 - 087f 5c00 sub $ACC0, $ACC1 - 0880 2e32 srs @0x0032, $AC0.M - 0881 0092 00ff lri $CR, #0x00ff - 0883 02df ret - 0884 00de 04fb lr $AC0.M, @0x04fb - 0886 7400 incm $AC0.M - 0887 00fe 04fb sr @0x04fb, $AC0.M - 0889 8100 clr $ACC0 - 088a 2e32 srs @0x0032, $AC0.M - 088b 2e66 srs @0x0066, $AC0.M - 088c 2e67 srs @0x0067, $AC0.M - 088d 268a lrs $AC0.M, @0xff8a - 088e 248b lrs $AC0.L, @0xff8b - 088f 2e3a srs @0x003a, $AC0.M - 0890 2c3b srs @0x003b, $AC0.L - 0891 268c lrs $AC0.M, @0xff8c - 0892 248d lrs $AC0.L, @0xff8d - 0893 2e38 srs @0x0038, $AC0.M - 0894 2c39 srs @0x0039, $AC0.L - 0895 02df ret - 0896 8100 clr $ACC0 - 0897 2689 lrs $AC0.M, @0xff89 - 0898 0240 000f andi $AC0.M, #0x000f - 089a 1f5e mrr $AX0.H, $AC0.M - 089b 8100 clr $ACC0 - 089c 0e10 lris $AC0.M, #0x10 - 089d 5400 subr $ACC0, $AX0.H - 089e 2e32 srs @0x0032, $AC0.M - 089f 268a lrs $AC0.M, @0xff8a - 08a0 248b lrs $AC0.L, @0xff8b - 08a1 2288 lrs $AX0.H, @0xff88 - 08a2 2089 lrs $AX0.L, @0xff89 - 08a3 5800 subax $ACC0, $AX0.L - 08a4 0a00 lris $AX0.H, #0x00 - 08a5 2032 lrs $AX0.L, @0x0032 - 08a6 5800 subax $ACC0, $AX0.L - 08a7 2e3a srs @0x003a, $AC0.M - 08a8 2c3b srs @0x003b, $AC0.L - 08a9 02df ret - 08aa 0092 0004 lri $CR, #0x0004 - 08ac 8100 clr $ACC0 - 08ad 2604 lrs $AC0.M, @0x0004 - 08ae b100 tst $ACC0 - 08af 02b4 0884 callnz 0x0884 - 08b1 8100 clr $ACC0 - 08b2 2601 lrs $AC0.M, @0x0001 - 08b3 b100 tst $ACC0 - 08b4 0294 0952 jnz 0x0952 - 08b6 2232 lrs $AX0.H, @0x0032 - 08b7 c900 cmpar $ACC0, $AX1.H - 08b8 0293 087b jle 0x087b - 08ba 5500 subr $ACC1, $AX0.H - 08bb 02bf 0866 call 0x0866 - 08bd 223a lrs $AX0.H, @0x003a - 08be 8600 tstaxh $AX0.H - 08bf 0294 08c6 jnz 0x08c6 - 08c1 8100 clr $ACC0 - 08c2 263b lrs $AC0.M, @0x003b - 08c3 8200 cmp - 08c4 0291 0918 jl 0x0918 - 08c6 8100 clr $ACC0 - 08c7 1fdf mrr $AC0.M, $AC1.M - 08c8 040f addis $ACC0, #0x0f - 08c9 147c lsr $ACC0, #-4 - 08ca 1f7e mrr $AX1.H, $AC0.M - 08cb 0c00 lris $AC0.L, #0x00 - 08cc 1404 lsl $ACC0, #4 - 08cd 1f1e mrr $AX0.L, $AC0.M - 08ce 0a00 lris $AX0.H, #0x00 - 08cf 8100 clr $ACC0 - 08d0 263a lrs $AC0.M, @0x003a - 08d1 243b lrs $AC0.L, @0x003b - 08d2 5800 subax $ACC0, $AX0.L - 08d3 0290 08de jge 0x08de - 08d5 8100 clr $ACC0 - 08d6 263b lrs $AC0.M, @0x003b - 08d7 5c00 sub $ACC0, $ACC1 - 08d8 2e32 srs @0x0032, $AC0.M - 08d9 8100 clr $ACC0 - 08da 2e3a srs @0x003a, $AC0.M - 08db 2e3b srs @0x003b, $AC0.M - 08dc 029f 08e4 jmp 0x08e4 - 08de 2e3a srs @0x003a, $AC0.M - 08df 2c3b srs @0x003b, $AC0.L - 08e0 0c00 lris $AC0.L, #0x00 - 08e1 1fd8 mrr $AC0.M, $AX0.L - 08e2 5c00 sub $ACC0, $ACC1 - 08e3 2e32 srs @0x0032, $AC0.M - 08e4 8100 clr $ACC0 - 08e5 1fdb mrr $AC0.M, $AX1.H - 08e6 02bf 0958 call 0x0958 - 08e8 2232 lrs $AX0.H, @0x0032 - 08e9 8600 tstaxh $AX0.H - 08ea 0295 0915 jz 0x0915 - 08ec 0a10 lris $AX0.H, #0x10 - 08ed 8100 clr $ACC0 - 08ee 1fc3 mrr $AC0.M, $AR3 - 08ef 5400 subr $ACC0, $AX0.H - 08f0 1c7e mrr $AR3, $AC0.M - 08f1 0080 0458 lri $AR0, #0x0458 - 08f3 197e lrri $AC0.M, @$AR3 - 08f4 197a lrri $AX0.H, @$AR3 - 08f5 100e loopi #0x0e - 08f6 64a2 movr'sl $ACC0, $AX0.H : $AC0.M, $AX0.H - 08f7 1b1e srri @$AR0, $AC0.M - 08f8 1b1a srri @$AR0, $AX0.H - 08f9 8100 clr $ACC0 - 08fa 263a lrs $AC0.M, @0x003a - 08fb 243b lrs $AC0.L, @0x003b - 08fc b100 tst $ACC0 - 08fd 0294 0915 jnz 0x0915 - 08ff 2232 lrs $AX0.H, @0x0032 - 0900 8600 tstaxh $AX0.H - 0901 0295 0915 jz 0x0915 - 0903 0080 0467 lri $AR0, #0x0467 - 0905 8100 clr $ACC0 - 0906 268b lrs $AC0.M, @0xff8b - 0907 b100 tst $ACC0 - 0908 0295 0915 jz 0x0915 - 090a 0200 000f addi $AC0.M, #0x000f - 090c 0240 000f andi $AC0.M, #0x000f - 090e 0200 0458 addi $AC0.M, #0x0458 - 0910 1c7e mrr $AR3, $AC0.M - 0911 007a 0914 bloop $AX0.H, 0x0914 - 0913 18fe lrrd $AC0.M, @$AR3 - 0914 1a9e srrd @$AR0, $AC0.M - 0915 0092 00ff lri $CR, #0x00ff - 0917 02df ret - 0918 b100 tst $ACC0 - 0919 0295 0928 jz 0x0928 - 091b 5d00 sub $ACC1, $ACC0 - 091c 040f addis $ACC0, #0x0f - 091d 147c lsr $ACC0, #-4 - 091e 0c00 lris $AC0.L, #0x00 - 091f 00e3 0363 sr @0x0363, $AR3 - 0921 02bf 0958 call 0x0958 - 0923 00de 0363 lr $AC0.M, @0x0363 - 0925 223b lrs $AX0.H, @0x003b - 0926 4400 addr $ACC0, $AX0.H - 0927 1c7e mrr $AR3, $AC0.M - 0928 8100 clr $ACC0 - 0929 2681 lrs $AC0.M, @0xff81 - 092a b100 tst $ACC0 - 092b 0295 0950 jz 0x0950 - 092d 2380 lrs $AX1.H, @0xff80 - 092e 2688 lrs $AC0.M, @0xff88 - 092f 2489 lrs $AC0.L, @0xff89 - 0930 1408 lsl $ACC0, #8 - 0931 14f4 asr $ACC0, #-12 - 0932 2380 lrs $AX1.H, @0xff80 - 0933 8d00 set15 - 0934 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L - 0935 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0936 8c00 clr15 - 0937 f000 lsl16 $ACC0 - 0938 4e00 addp $ACC0 - 0939 238c lrs $AX1.H, @0xff8c - 093a 218d lrs $AX1.L, @0xff8d - 093b 4a00 addax $ACC0, $AX1.L - 093c 2e38 srs @0x0038, $AC0.M - 093d 2c39 srs @0x0039, $AC0.L - 093e 2682 lrs $AC0.M, @0xff82 - 093f 2e67 srs @0x0067, $AC0.M - 0940 2683 lrs $AC0.M, @0xff83 - 0941 2e66 srs @0x0066, $AC0.M - 0942 00e3 0363 sr @0x0363, $AR3 - 0944 0083 0458 lri $AR3, #0x0458 - 0946 8100 clr $ACC0 - 0947 0e01 lris $AC0.M, #0x01 - 0948 02bf 0958 call 0x0958 - 094a 00c3 0363 lr $AR3, @0x0363 - 094c 02bf 0896 call 0x0896 - 094e 029f 08b6 jmp 0x08b6 - 0950 0e01 lris $AC0.M, #0x01 - 0951 2e01 srs @0x0001, $AC0.M - 0952 8100 clr $ACC0 - 0953 005f loop $AC1.M - 0954 1b7e srri @$AR3, $AC0.M - 0955 0092 00ff lri $CR, #0x00ff - 0957 02df ret - 0958 00ff 0360 sr @0x0360, $AC1.M - 095a 00fe 0361 sr @0x0361, $AC0.M - 095c 2638 lrs $AC0.M, @0x0038 - 095d 2439 lrs $AC0.L, @0x0039 - 095e 0f05 lris $AC1.M, #0x05 - 095f 02bf 069b call 0x069b - 0961 2638 lrs $AC0.M, @0x0038 - 0962 2439 lrs $AC0.L, @0x0039 - 0963 8900 clr $ACC1 - 0964 00df 0361 lr $AC1.M, @0x0361 - 0966 2280 lrs $AX0.H, @0xff80 - 0967 d000 mulc $AC1.M, $AX0.H - 0968 6f00 movp $ACC1 - 0969 4c00 add $ACC0, $ACC1 - 096a 2e38 srs @0x0038, $AC0.M - 096b 2c39 srs @0x0039, $AC0.L - 096c 8100 clr $ACC0 - 096d 00de 0361 lr $AC0.M, @0x0361 - 096f 007e 09d6 bloop $AC0.M, 0x09d6 - 0971 0080 ffd3 lri $AR0, #0xffd3 - 0973 0084 0000 lri $IX0, #0x0000 - 0975 199e lrrn $AC0.M, @$AR0 - 0976 8900 clr $ACC1 - 0977 1ffe mrr $AC1.M, $AC0.M - 0978 1401 lsl $ACC0, #1 - 0979 0240 001e andi $AC0.M, #0x001e - 097b 0200 0300 addi $AC0.M, #0x0300 - 097d 1c3e mrr $AR1, $AC0.M - 097e 157c lsr $ACC1, #-4 - 097f 0340 000f andi $AC1.M, #0x000f - 0981 0a11 lris $AX0.H, #0x11 - 0982 5500 subr $ACC1, $AX0.H - 0983 8100 clr $ACC0 - 0984 2680 lrs $AC0.M, @0xff80 - 0985 0605 cmpis $ACC0, #0x05 - 0986 0295 099f jz 0x099f - 0988 009a 00f0 lri $AX0.H, #0x00f0 - 098a 0b0f lris $AX1.H, #0x0f - 098b 0082 0364 lri $AR2, #0x0364 - 098d 1998 lrrn $AX0.L, @$AR0 - 098e 6000 movr $ACC0, $AX0.L - 098f 1107 0996 bloopi #0x07, 0x0996 - 0991 3400 andr $AC0.M, $AX0.H - 0992 1408 lsl $ACC0, #8 - 0993 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0994 3644 andr'ln $AC0.M, $AX1.H : $AX0.L, @$AR0 - 0995 140c lsl $ACC0, #12 - 0996 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 0997 3400 andr $AC0.M, $AX0.H - 0998 1408 lsl $ACC0, #8 - 0999 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 099a 3600 andr $AC0.M, $AX1.H - 099b 140c lsl $ACC0, #12 - 099c 1b5e srri @$AR2, $AC0.M - 099d 029f 09bf jmp 0x09bf - 099f 009a c000 lri $AX0.H, #0xc000 - 09a1 0082 0364 lri $AR2, #0x0364 - 09a3 1998 lrrn $AX0.L, @$AR0 - 09a4 6000 movr $ACC0, $AX0.L - 09a5 1103 09b2 bloopi #0x03, 0x09b2 - 09a7 1408 lsl $ACC0, #8 - 09a8 3400 andr $AC0.M, $AX0.H - 09a9 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09aa 140a lsl $ACC0, #10 - 09ab 3400 andr $AC0.M, $AX0.H - 09ac 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09ad 140c lsl $ACC0, #12 - 09ae 3400 andr $AC0.M, $AX0.H - 09af 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b0 140e lsl $ACC0, #14 - 09b1 3444 andr'ln $AC0.M, $AX0.H : $AX0.L, @$AR0 - 09b2 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b3 1408 lsl $ACC0, #8 - 09b4 3400 andr $AC0.M, $AX0.H - 09b5 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b6 140a lsl $ACC0, #10 - 09b7 3400 andr $AC0.M, $AX0.H - 09b8 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09b9 140c lsl $ACC0, #12 - 09ba 3400 andr $AC0.M, $AX0.H - 09bb 6032 movr's $ACC0, $AX0.L : @$AR2, $AC0.M - 09bc 140e lsl $ACC0, #14 - 09bd 3400 andr $AC0.M, $AX0.H - 09be 1b5e srri @$AR2, $AC0.M - 09bf 8f00 set40 - 09c0 1f7f mrr $AX1.H, $AC1.M - 09c1 2066 lrs $AX0.L, @0x0066 - 09c2 2767 lrs $AC1.M, @0x0067 - 09c3 193a lrri $AX0.H, @$AR1 - 09c4 1939 lrri $AX1.L, @$AR1 - 09c5 0080 0364 lri $AR0, #0x0364 - 09c7 a000 mulx $AX0.L, $AX1.L - 09c8 ea70 maddc'l $AC1.M, $AX1.L : $AC0.M, @$AR0 - 09c9 1108 09d2 bloopi #0x08, 0x09d2 - 09cb 3a93 orr'sl $AC0.M, $AX1.H : $AC1.M, $AX1.L - 09cc a478 mulxac'l $AX0.L, $AX1.L, $ACC0 : $AC1.M, @$AR0 - 09cd 1485 asl $ACC0, #5 - 09ce e833 maddc's $AC0.M, $AX1.L : @$AR3, $AC0.M - 09cf 3b92 orr'sl $AC1.M, $AX1.H : $AC0.M, $AX1.L - 09d0 a570 mulxac'l $AX0.L, $AX1.L, $ACC1 : $AC0.M, @$AR0 - 09d1 1585 asl $ACC1, #5 - 09d2 ea3b maddc's $AC1.M, $AX1.L : @$AR3, $AC1.M - 09d3 2f67 srs @0x0067, $AC1.M - 09d4 8e00 set16 - 09d5 1ff8 mrr $AC1.M, $AX0.L - 09d6 2f66 srs @0x0066, $AC1.M - 09d7 8900 clr $ACC1 - 09d8 00df 0360 lr $AC1.M, @0x0360 - 09da 02df ret - 09db b100 tst $ACC0 - 09dc 02d5 retz - 09dd 04fe addis $ACC0, #0xfe - 09de 1f1e mrr $AX0.L, $AC0.M - 09df 191e lrri $AC0.M, @$AR0 - 09e0 0291 09e6 jl 0x09e6 - 09e2 191a lrri $AX0.H, @$AR0 - 09e3 0058 loop $AX0.L - 09e4 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 09e5 6433 movr's $ACC0, $AX0.H : @$AR3, $AC0.M - 09e6 1b7e srri @$AR3, $AC0.M - 09e7 02df ret - 09e8 8100 clr $ACC0 - 09e9 1f5e mrr $AX0.H, $AC0.M - 09ea 00d8 0402 lr $AX0.L, @0x0402 - 09ec 00dc 0430 lr $AC0.L, @0x0430 - 09ee 0080 0520 lri $AR0, #0x0520 - 09f0 00df 0480 lr $AC1.M, @0x0480 - 09f2 1501 lsl $ACC1, #1 - 09f3 0340 007e andi $AC1.M, #0x007e - 09f5 0300 09fd addi $AC1.M, #0x09fd - 09f7 1c5f mrr $AR2, $AC1.M - 09f8 175f callr $AR2 - 09f9 00fc 0430 sr @0x0430, $AC0.L - 09fb 029f 0386 jmp 0x0386 - 09fd 029f 0a1e jmp 0x0a1e - 09ff 029f 0a59 jmp 0x0a59 - 0a01 029f 0a41 jmp 0x0a41 - 0a03 029f 0a2e jmp 0x0a2e - 0a05 029f 0a67 jmp 0x0a67 - 0a07 029f 0a1d jmp 0x0a1d - 0a09 029f 0a85 jmp 0x0a85 - 0a0b 029f 0a88 jmp 0x0a88 - 0a0d 029f 0a1d jmp 0x0a1d - 0a0f 029f 0a1d jmp 0x0a1d - 0a11 029f 0aa6 jmp 0x0aa6 - 0a13 029f 0a5f jmp 0x0a5f - 0a15 029f 0a63 jmp 0x0a63 - 0a17 029f 0a1d jmp 0x0a1d - 0a19 029f 0a1d jmp 0x0a1d - 0a1b 029f 0a1d jmp 0x0a1d - 0a1d 02df ret - 0a1e 1401 lsl $ACC0, #1 - 0a1f 009b c000 lri $AX1.H, #0xc000 - 0a21 0099 4000 lri $AX1.L, #0x4000 - 0a23 1150 0a2b bloopi #0x50, 0x0a2b - 0a25 02c0 0001 andcf $AC0.M, #0x0001 - 0a27 027c iflnz - 0a28 1b1b srri @$AR0, $AX1.H - 0a29 027d iflz - 0a2a 1b19 srri @$AR0, $AX1.L - 0a2b 4800 addax $ACC0, $AX0.L - 0a2c 147f lsr $ACC0, #-1 - 0a2d 02df ret - 0a2e 1402 lsl $ACC0, #2 - 0a2f 8900 clr $ACC1 - 0a30 1fb8 mrr $AC1.L, $AX0.L - 0a31 1501 lsl $ACC1, #1 - 0a32 009b c000 lri $AX1.H, #0xc000 - 0a34 0099 4000 lri $AX1.L, #0x4000 - 0a36 1150 0a3e bloopi #0x50, 0x0a3e - 0a38 02c0 0003 andcf $AC0.M, #0x0003 - 0a3a 027c iflnz - 0a3b 1b1b srri @$AR0, $AX1.H - 0a3c 027d iflz - 0a3d 1b19 srri @$AR0, $AX1.L - 0a3e 4c00 add $ACC0, $ACC1 - 0a3f 147e lsr $ACC0, #-2 - 0a40 02df ret - 0a41 1401 lsl $ACC0, #1 - 0a42 0081 0ca0 lri $AR1, #0x0ca0 - 0a44 009b c000 lri $AX1.H, #0xc000 - 0a46 0099 4000 lri $AX1.L, #0x4000 - 0a48 8900 clr $ACC1 - 0a49 0082 0000 lri $AR2, #0x0000 - 0a4b 1150 0a56 bloopi #0x50, 0x0a56 - 0a4d 02c0 0001 andcf $AC0.M, #0x0001 - 0a4f 027c iflnz - 0a50 1b1b srri @$AR0, $AX1.H - 0a51 027d iflz - 0a52 1b19 srri @$AR0, $AX1.L - 0a53 183d lrr $AC1.L, @$AR1 - 0a54 4900 addax $ACC1, $AX0.L - 0a55 1fe2 mrr $AC1.M, $AR2 - 0a56 4c39 add's $ACC0, $ACC1 : @$AR1, $AC1.M - 0a57 147f lsr $ACC0, #-1 - 0a58 02df ret - 0a59 8900 clr $ACC1 - 0a5a 1fb8 mrr $AC1.L, $AX0.L - 0a5b 157f lsr $ACC1, #-1 - 0a5c 1050 loopi #0x50 - 0a5d 4c20 add's $ACC0, $ACC1 : @$AR0, $AC0.L - 0a5e 02df ret - 0a5f 0082 0180 lri $AR2, #0x0180 - 0a61 029f 0a69 jmp 0x0a69 - 0a63 0082 01c0 lri $AR2, #0x01c0 - 0a65 029f 0a69 jmp 0x0a69 - 0a67 0082 0140 lri $AR2, #0x0140 - 0a69 008a 003f lri $WR2, #0x003f - 0a6b 0086 0000 lri $IX2, #0x0000 - 0a6d 1406 lsl $ACC0, #6 - 0a6e 8900 clr $ACC1 - 0a6f 1fb8 mrr $AC1.L, $AX0.L - 0a70 1505 lsl $ACC1, #5 - 0a71 009b 003f lri $AX1.H, #0x003f - 0a73 009a 0000 lri $AX0.H, #0x0000 - 0a75 3600 andr $AC0.M, $AX1.H - 0a76 1cde mrr $IX2, $AC0.M - 0a77 001a addarn $AR2, $IX2 - 0a78 3400 andr $AC0.M, $AX0.H - 0a79 1150 0a7f bloopi #0x50, 0x0a7f - 0a7b 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a7c 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a7d 1cde mrr $IX2, $AC0.M - 0a7e 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0a7f 1b19 srri @$AR0, $AX1.L - 0a80 1fc2 mrr $AC0.M, $AR2 - 0a81 147a lsr $ACC0, #-6 - 0a82 008a ffff lri $WR2, #0xffff - 0a84 02df ret - 0a85 1050 loopi #0x50 - 0a86 1b18 srri @$AR0, $AX0.L - 0a87 02df ret - 0a88 0082 0100 lri $AR2, #0x0100 - 0a8a 008a 003f lri $WR2, #0x003f - 0a8c 0086 0000 lri $IX2, #0x0000 - 0a8e 1406 lsl $ACC0, #6 - 0a8f 8900 clr $ACC1 - 0a90 1fb8 mrr $AC1.L, $AX0.L - 0a91 1505 lsl $ACC1, #5 - 0a92 009b 003f lri $AX1.H, #0x003f - 0a94 009a 0000 lri $AX0.H, #0x0000 - 0a96 3600 andr $AC0.M, $AX1.H - 0a97 1cde mrr $IX2, $AC0.M - 0a98 001a addarn $AR2, $IX2 - 0a99 3400 andr $AC0.M, $AX0.H - 0a9a 1150 0aa0 bloopi #0x50, 0x0aa0 - 0a9c 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0a9d 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0a9e 1cde mrr $IX2, $AC0.M - 0a9f 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0aa0 1b19 srri @$AR0, $AX1.L - 0aa1 1fc2 mrr $AC0.M, $AR2 - 0aa2 147a lsr $ACC0, #-6 - 0aa3 008a ffff lri $WR2, #0xffff - 0aa5 02df ret - 0aa6 0082 0100 lri $AR2, #0x0100 - 0aa8 008a 003f lri $WR2, #0x003f - 0aaa 0086 0000 lri $IX2, #0x0000 - 0aac 0081 0ca0 lri $AR1, #0x0ca0 - 0aae 1406 lsl $ACC0, #6 - 0aaf 8900 clr $ACC1 - 0ab0 1fb8 mrr $AC1.L, $AX0.L - 0ab1 1505 lsl $ACC1, #5 - 0ab2 009b 003f lri $AX1.H, #0x003f - 0ab4 009a 0000 lri $AX0.H, #0x0000 - 0ab6 3600 andr $AC0.M, $AX1.H - 0ab7 1cde mrr $IX2, $AC0.M - 0ab8 001a addarn $AR2, $IX2 - 0ab9 3400 andr $AC0.M, $AX0.H - 0aba 1150 0ac5 bloopi #0x50, 0x0ac5 - 0abc 1939 lrri $AX1.L, @$AR1 - 0abd a000 mulx $AX0.L, $AX1.L - 0abe 140a lsl $ACC0, #10 - 0abf 4e00 addp $ACC0 - 0ac0 1476 lsr $ACC0, #-10 - 0ac1 4c4a add'l $ACC0, $ACC1 : $AX1.L, @$AR2 - 0ac2 3606 andr'dr $AC0.M, $AX1.H : $AR2 - 0ac3 1cde mrr $IX2, $AC0.M - 0ac4 340e andr'nr $AC0.M, $AX0.H : $AR2 - 0ac5 1b19 srri @$AR0, $AX1.L - 0ac6 1fc2 mrr $AC0.M, $AR2 - 0ac7 147a lsr $ACC0, #-6 - 0ac8 008a ffff lri $WR2, #0xffff - 0aca 02df ret - 0acb 0080 01be lri $AR0, #0x01be - 0acd 1918 lrri $AX0.L, @$AR0 - 0ace 191a lrri $AX0.H, @$AR0 - 0acf 0080 0180 lri $AR0, #0x0180 - 0ad1 0083 0180 lri $AR3, #0x0180 - 0ad3 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0ad4 1ffe mrr $AC1.M, $AC0.M - 0ad5 1120 0adc bloopi #0x20, 0x0adc - 0ad7 7c00 neg $ACC0 - 0ad8 d450 mulcac'l $AC1.M, $AX0.H, $ACC0 : $AX0.H, @$AR0 - 0ad9 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0ada c550 mulcac'l $AC0.M, $AX0.H, $ACC1 : $AX0.H, @$AR0 - 0adb 1501 lsl $ACC1, #1 - 0adc 643b movr's $ACC0, $AX0.H : @$AR3, $AC1.M - 0add 0080 01fe lri $AR0, #0x01fe - 0adf 191a lrri $AX0.H, @$AR0 - 0ae0 1918 lrri $AX0.L, @$AR0 - 0ae1 0080 01c0 lri $AR0, #0x01c0 - 0ae3 0083 01c0 lri $AR3, #0x01c0 - 0ae5 1ff8 mrr $AC1.M, $AX0.L - 0ae6 9070 mul'l $AX0.L, $AX0.H : $AC0.M, @$AR0 - 0ae7 f800 addpaxz $ACC0, $AX0.H - 0ae8 0240 01ff andi $AC0.M, #0x01ff - 0aea 0260 2000 ori $AC0.M, #0x2000 - 0aec 02bf 0aef call 0x0aef - 0aee 02df ret - 0aef b900 tst $ACC1 - 0af0 0272 ifg - 0af1 7c00 neg $ACC0 - 0af2 1f7e mrr $AX1.H, $AC0.M - 0af3 4700 addr $ACC1, $AX1.H - 0af4 1110 0af9 bloopi #0x10, 0x0af9 - 0af6 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0af7 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0af8 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0af9 473b addr's $ACC1, $AX1.H : @$AR3, $AC1.M - 0afa 02df ret - 0afb 02bf 0b68 call 0x0b68 - 0afd 2201 lrs $AX0.H, @0x0001 - 0afe 8600 tstaxh $AX0.H - 0aff 0294 0b10 jnz 0x0b10 - 0b01 2204 lrs $AX0.H, @0x0004 - 0b02 8600 tstaxh $AX0.H - 0b03 02b4 0b57 callnz 0x0b57 - 0b05 8100 clr $ACC0 - 0b06 2605 lrs $AC0.M, @0x0005 - 0b07 b100 tst $ACC0 - 0b08 0295 0b1d jz 0x0b1d - 0b0a 8100 clr $ACC0 - 0b0b 2e05 srs @0x0005, $AC0.M - 0b0c 2281 lrs $AX0.H, @0xff81 - 0b0d 8600 tstaxh $AX0.H - 0b0e 0294 0b17 jnz 0x0b17 - 0b10 8100 clr $ACC0 - 0b11 005f loop $AC1.M - 0b12 1b7e srri @$AR3, $AC0.M - 0b13 7400 incm $AC0.M - 0b14 2e01 srs @0x0001, $AC0.M - 0b15 029f 0b50 jmp 0x0b50 - 0b17 2688 lrs $AC0.M, @0xff88 - 0b18 2489 lrs $AC0.L, @0xff89 - 0b19 2e34 srs @0x0034, $AC0.M - 0b1a 2c35 srs @0x0035, $AC0.L - 0b1b 02bf 0b57 call 0x0b57 - 0b1d 00ff 0360 sr @0x0360, $AC1.M - 0b1f 2638 lrs $AC0.M, @0x0038 - 0b20 2439 lrs $AC0.L, @0x0039 - 0b21 02bf 06c9 call 0x06c9 - 0b23 00df 0360 lr $AC1.M, @0x0360 - 0b25 8100 clr $ACC0 - 0b26 263a lrs $AC0.M, @0x003a - 0b27 b100 tst $ACC0 - 0b28 0294 0b37 jnz 0x0b37 - 0b2a 263b lrs $AC0.M, @0x003b - 0b2b 5c00 sub $ACC0, $ACC1 - 0b2c 0290 0b37 jge 0x0b37 - 0b2e 223b lrs $AX0.H, @0x003b - 0b2f 02bf 06e6 call 0x06e6 - 0b31 5500 subr $ACC1, $AX0.H - 0b32 0a01 lris $AX0.H, #0x01 - 0b33 00fa 0405 sr @0x0405, $AX0.H - 0b35 029f 0b0a jmp 0x0b0a - 0b37 1f5f mrr $AX0.H, $AC1.M - 0b38 02bf 06e6 call 0x06e6 - 0b3a 00fa 0362 sr @0x0362, $AX0.H - 0b3c 8100 clr $ACC0 - 0b3d 263a lrs $AC0.M, @0x003a - 0b3e 243b lrs $AC0.L, @0x003b - 0b3f 1570 lsr $ACC1, #-16 - 0b40 0a01 lris $AX0.H, #0x01 - 0b41 0081 0405 lri $AR1, #0x0405 - 0b43 5c00 sub $ACC0, $ACC1 - 0b44 b100 tst $ACC0 - 0b45 0275 ifz - 0b46 1a3a srr @$AR1, $AX0.H - 0b47 2e3a srs @0x003a, $AC0.M - 0b48 2c3b srs @0x003b, $AC0.L - 0b49 2638 lrs $AC0.M, @0x0038 - 0b4a 2439 lrs $AC0.L, @0x0039 - 0b4b 00d8 0362 lr $AX0.L, @0x0362 - 0b4d 7000 addaxl $ACC0, $AX0.L - 0b4e 2c39 srs @0x0039, $AC0.L - 0b4f 2e38 srs @0x0038, $AC0.M - 0b50 0092 00ff lri $CR, #0x00ff - 0b52 029f 037e jmp 0x037e - 0b54 8100 clr $ACC0 - 0b55 2e34 srs @0x0034, $AC0.M - 0b56 2e35 srs @0x0035, $AC0.M - 0b57 2334 lrs $AX1.H, @0x0034 - 0b58 2135 lrs $AX1.L, @0x0035 - 0b59 268a lrs $AC0.M, @0xff8a - 0b5a 248b lrs $AC0.L, @0xff8b - 0b5b 5a00 subax $ACC0, $AX1.L - 0b5c 2e3a srs @0x003a, $AC0.M - 0b5d 2c3b srs @0x003b, $AC0.L - 0b5e 2634 lrs $AC0.M, @0x0034 - 0b5f 2435 lrs $AC0.L, @0x0035 - 0b60 238c lrs $AX1.H, @0xff8c - 0b61 218d lrs $AX1.L, @0xff8d - 0b62 4a00 addax $ACC0, $AX1.L - 0b63 2e38 srs @0x0038, $AC0.M - 0b64 2c39 srs @0x0039, $AC0.L - 0b65 8100 clr $ACC0 - 0b66 2e05 srs @0x0005, $AC0.M - 0b67 02df ret - 0b68 0092 0004 lri $CR, #0x0004 - 0b6a 2002 lrs $AX0.L, @0x0002 - 0b6b 8100 clr $ACC0 - 0b6c 8900 clr $ACC1 - 0b6d 2430 lrs $AC0.L, @0x0030 - 0b6e 8d00 set15 - 0b6f 0950 lris $AX1.L, #0x50 - 0b70 a000 mulx $AX0.L, $AX1.L - 0b71 a400 mulxac $AX0.L, $AX1.L, $ACC0 - 0b72 1404 lsl $ACC0, #4 - 0b73 8c00 clr15 - 0b74 1ffe mrr $AC1.M, $AC0.M - 0b75 0083 0580 lri $AR3, #0x0580 - 0b77 02df ret - 0b78 02bf 0b68 call 0x0b68 - 0b7a 2201 lrs $AX0.H, @0x0001 - 0b7b 8600 tstaxh $AX0.H - 0b7c 0294 0b8d jnz 0x0b8d - 0b7e 2204 lrs $AX0.H, @0x0004 - 0b7f 8600 tstaxh $AX0.H - 0b80 02b4 0bd7 callnz 0x0bd7 - 0b82 8100 clr $ACC0 - 0b83 2605 lrs $AC0.M, @0x0005 - 0b84 b100 tst $ACC0 - 0b85 0295 0b9a jz 0x0b9a - 0b87 8100 clr $ACC0 - 0b88 2e05 srs @0x0005, $AC0.M - 0b89 2281 lrs $AX0.H, @0xff81 - 0b8a 8600 tstaxh $AX0.H - 0b8b 0294 0b94 jnz 0x0b94 - 0b8d 8100 clr $ACC0 - 0b8e 005f loop $AC1.M - 0b8f 1b7e srri @$AR3, $AC0.M - 0b90 7400 incm $AC0.M - 0b91 2e01 srs @0x0001, $AC0.M - 0b92 029f 0bd0 jmp 0x0bd0 - 0b94 2688 lrs $AC0.M, @0xff88 - 0b95 2489 lrs $AC0.L, @0xff89 - 0b96 2e34 srs @0x0034, $AC0.M - 0b97 2c35 srs @0x0035, $AC0.L - 0b98 02bf 0bd7 call 0x0bd7 - 0b9a 00ff 0360 sr @0x0360, $AC1.M - 0b9c 2638 lrs $AC0.M, @0x0038 - 0b9d 2439 lrs $AC0.L, @0x0039 - 0b9e 02bf 06c9 call 0x06c9 - 0ba0 02bf 06e0 call 0x06e0 - 0ba2 00df 0360 lr $AC1.M, @0x0360 - 0ba4 8100 clr $ACC0 - 0ba5 263a lrs $AC0.M, @0x003a - 0ba6 b100 tst $ACC0 - 0ba7 0294 0bb6 jnz 0x0bb6 - 0ba9 263b lrs $AC0.M, @0x003b - 0baa 5c00 sub $ACC0, $ACC1 - 0bab 0290 0bb6 jge 0x0bb6 - 0bad 223b lrs $AX0.H, @0x003b - 0bae 02bf 06ab call 0x06ab - 0bb0 5500 subr $ACC1, $AX0.H - 0bb1 0a01 lris $AX0.H, #0x01 - 0bb2 00fa 0405 sr @0x0405, $AX0.H - 0bb4 029f 0b87 jmp 0x0b87 - 0bb6 1f5f mrr $AX0.H, $AC1.M - 0bb7 02bf 06ab call 0x06ab - 0bb9 00fa 0362 sr @0x0362, $AX0.H - 0bbb 8100 clr $ACC0 - 0bbc 263a lrs $AC0.M, @0x003a - 0bbd 243b lrs $AC0.L, @0x003b - 0bbe 1570 lsr $ACC1, #-16 - 0bbf 0a01 lris $AX0.H, #0x01 - 0bc0 0081 0405 lri $AR1, #0x0405 - 0bc2 5c00 sub $ACC0, $ACC1 - 0bc3 b100 tst $ACC0 - 0bc4 0275 ifz - 0bc5 1a3a srr @$AR1, $AX0.H - 0bc6 2e3a srs @0x003a, $AC0.M - 0bc7 2c3b srs @0x003b, $AC0.L - 0bc8 2638 lrs $AC0.M, @0x0038 - 0bc9 2439 lrs $AC0.L, @0x0039 - 0bca 00d8 0362 lr $AX0.L, @0x0362 - 0bcc 7000 addaxl $ACC0, $AX0.L - 0bcd 7000 addaxl $ACC0, $AX0.L - 0bce 2c39 srs @0x0039, $AC0.L - 0bcf 2e38 srs @0x0038, $AC0.M - 0bd0 0092 00ff lri $CR, #0x00ff - 0bd2 029f 037e jmp 0x037e - 0bd4 8100 clr $ACC0 - 0bd5 2e34 srs @0x0034, $AC0.M - 0bd6 2e35 srs @0x0035, $AC0.M - 0bd7 2334 lrs $AX1.H, @0x0034 - 0bd8 2135 lrs $AX1.L, @0x0035 - 0bd9 268a lrs $AC0.M, @0xff8a - 0bda 248b lrs $AC0.L, @0xff8b - 0bdb 5a00 subax $ACC0, $AX1.L - 0bdc 2e3a srs @0x003a, $AC0.M - 0bdd 2c3b srs @0x003b, $AC0.L - 0bde 2634 lrs $AC0.M, @0x0034 - 0bdf 2435 lrs $AC0.L, @0x0035 - 0be0 1401 lsl $ACC0, #1 - 0be1 238c lrs $AX1.H, @0xff8c - 0be2 218d lrs $AX1.L, @0xff8d - 0be3 4a00 addax $ACC0, $AX1.L - 0be4 2e38 srs @0x0038, $AC0.M - 0be5 2c39 srs @0x0039, $AC0.L - 0be6 8100 clr $ACC0 - 0be7 2e05 srs @0x0005, $AC0.M - 0be8 02df ret - 0be9 8900 clr $ACC1 - 0bea 0f50 lris $AC1.M, #0x50 - 0beb 0083 0520 lri $AR3, #0x0520 - 0bed 02bf 0c02 call 0x0c02 - 0bef 029f 0386 jmp 0x0386 - 0bf1 00d8 0402 lr $AX0.L, @0x0402 - 0bf3 8100 clr $ACC0 - 0bf4 8900 clr $ACC1 - 0bf5 00dc 0430 lr $AC0.L, @0x0430 - 0bf7 0a50 lris $AX0.H, #0x50 - 0bf8 9000 mul $AX0.L, $AX0.H - 0bf9 9400 mulac $AX0.L, $AX0.H, $ACC0 - 0bfa 1404 lsl $ACC0, #4 - 0bfb 1ffe mrr $AC1.M, $AC0.M - 0bfc 0083 0580 lri $AR3, #0x0580 - 0bfe 02bf 0c02 call 0x0c02 - 0c00 029f 037e jmp 0x037e - 0c02 0092 0004 lri $CR, #0x0004 - 0c04 8100 clr $ACC0 - 0c05 263a lrs $AC0.M, @0x003a - 0c06 243b lrs $AC0.L, @0x003b - 0c07 1f1f mrr $AX0.L, $AC1.M - 0c08 0a00 lris $AX0.H, #0x00 - 0c09 5800 subax $ACC0, $AX0.L - 0c0a 0292 0c20 jg 0x0c20 - 0c0c 8900 clr $ACC1 - 0c0d 00c0 043b lr $AR0, @0x043b - 0c0f 02bf 0c45 call 0x0c45 - 0c11 8100 clr $ACC0 - 0c12 1fd8 mrr $AC0.M, $AX0.L - 0c13 223b lrs $AX0.H, @0x003b - 0c14 5400 subr $ACC0, $AX0.H - 0c15 0007 dar $AR3 - 0c16 1979 lrri $AX1.L, @$AR3 - 0c17 005e loop $AC0.M - 0c18 1b79 srri @$AR3, $AX1.L - 0c19 0f01 lris $AC1.M, #0x01 - 0c1a 2f01 srs @0x0001, $AC1.M - 0c1b 8900 clr $ACC1 - 0c1c 2f3b srs @0x003b, $AC1.M - 0c1d 0092 00ff lri $CR, #0x00ff - 0c1f 02df ret - 0c20 2e3a srs @0x003a, $AC0.M - 0c21 2c3b srs @0x003b, $AC0.L - 0c22 8100 clr $ACC0 - 0c23 8900 clr $ACC1 - 0c24 268a lrs $AC0.M, @0xff8a - 0c25 2734 lrs $AC1.M, @0x0034 - 0c26 5c00 sub $ACC0, $ACC1 - 0c27 2e36 srs @0x0036, $AC0.M - 0c28 5000 subr $ACC0, $AX0.L - 0c29 0290 0c3f jge 0x0c3f - 0c2b 00c0 0436 lr $AR0, @0x0436 - 0c2d 02bf 0c45 call 0x0c45 - 0c2f 8100 clr $ACC0 - 0c30 1fd8 mrr $AC0.M, $AX0.L - 0c31 2236 lrs $AX0.H, @0x0036 - 0c32 5400 subr $ACC0, $AX0.H - 0c33 1c1e mrr $AR0, $AC0.M - 0c34 8100 clr $ACC0 - 0c35 2e34 srs @0x0034, $AC0.M - 0c36 2688 lrs $AC0.M, @0xff88 - 0c37 2489 lrs $AC0.L, @0xff89 - 0c38 2e8c srs @0xff8c, $AC0.M - 0c39 2c8d srs @0xff8d, $AC0.L - 0c3a 02bf 0c45 call 0x0c45 - 0c3c 0092 00ff lri $CR, #0x00ff - 0c3e 02df ret - 0c3f 1c18 mrr $AR0, $AX0.L - 0c40 02bf 0c45 call 0x0c45 - 0c42 0092 00ff lri $CR, #0x00ff - 0c44 02df ret - 0c45 8100 clr $ACC0 - 0c46 1fc0 mrr $AC0.M, $AR0 - 0c47 b100 tst $ACC0 - 0c48 02d5 retz - 0c49 8900 clr $ACC1 - 0c4a 2734 lrs $AC1.M, @0x0034 - 0c4b 0340 0001 andi $AC1.M, #0x0001 - 0c4d 0b00 lris $AX1.H, #0x00 - 0c4e 1f3f mrr $AX1.L, $AC1.M - 0c4f 268c lrs $AC0.M, @0xff8c - 0c50 248d lrs $AC0.L, @0xff8d - 0c51 8900 clr $ACC1 - 0c52 2534 lrs $AC1.L, @0x0034 - 0c53 1501 lsl $ACC1, #1 - 0c54 4c00 add $ACC0, $ACC1 - 0c55 5a00 subax $ACC0, $AX1.L - 0c56 5a00 subax $ACC0, $AX1.L - 0c57 1c20 mrr $AR1, $AR0 - 0c58 1fe0 mrr $AC1.M, $AR0 - 0c59 0502 addis $ACC1, #0x02 - 0c5a 1c1f mrr $AR0, $AC1.M - 0c5b 009f 0b00 lri $AC1.M, #0x0b00 - 0c5d 0092 00ff lri $CR, #0x00ff - 0c5f 02bf 0640 call 0x0640 - 0c61 0092 0004 lri $CR, #0x0004 - 0c63 2734 lrs $AC1.M, @0x0034 - 0c64 1f61 mrr $AX1.H, $AR1 - 0c65 4700 addr $ACC1, $AX1.H - 0c66 2f34 srs @0x0034, $AC1.M - 0c67 0080 0b00 lri $AR0, #0x0b00 - 0c69 8900 clr $ACC1 - 0c6a 1ff9 mrr $AC1.M, $AX1.L - 0c6b b900 tst $ACC1 - 0c6c 0274 ifnz - 0c6d 0008 iar $AR0 - 0c6e 8900 clr $ACC1 - 0c6f 1fe1 mrr $AC1.M, $AR1 - 0c70 191e lrri $AC0.M, @$AR0 - 0c71 0701 cmpis $ACC1, #0x01 - 0c72 0293 0c7b jle 0x0c7b - 0c74 191a lrri $AX0.H, @$AR0 - 0c75 05fe addis $ACC1, #0xfe - 0c76 005f loop $AC1.M - 0c77 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c78 1b7e srri @$AR3, $AC0.M - 0c79 1b7a srri @$AR3, $AX0.H - 0c7a 02df ret - 0c7b 1b7e srri @$AR3, $AC0.M - 0c7c 02df ret - 0c7d 0083 03e8 lri $AR3, #0x03e8 - 0c7f 191e lrri $AC0.M, @$AR0 - 0c80 191a lrri $AX0.H, @$AR0 - 0c81 1006 loopi #0x06 - 0c82 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0c83 1b7e srri @$AR3, $AC0.M - 0c84 1b7a srri @$AR3, $AX0.H - 0c85 0080 03e8 lri $AR0, #0x03e8 - 0c87 8a00 m2 - 0c88 0088 0007 lri $WR0, #0x0007 - 0c8a 1150 0c97 bloopi #0x50, 0x0c97 - 0c8c 1c61 mrr $AR3, $AR1 - 0c8d 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0c8e f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c8f f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c90 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c91 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c92 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c93 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c94 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0c95 f200 madd $AX0.L, $AX0.H - 0c96 fe00 movpz $ACC0 - 0c97 1b3e srri @$AR1, $AC0.M - 0c98 0088 ffff lri $WR0, #0xffff - 0c9a 8b00 m0 - 0c9b 02df ret - 0c9c 8a00 m2 - 0c9d 05fe addis $ACC1, #0xfe - 0c9e 0083 03e8 lri $AR3, #0x03e8 - 0ca0 191e lrri $AC0.M, @$AR0 - 0ca1 191a lrri $AX0.H, @$AR0 - 0ca2 005f loop $AC1.M - 0ca3 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0ca4 1b7e srri @$AR3, $AC0.M - 0ca5 1b7a srri @$AR3, $AX0.H - 0ca6 0080 03e8 lri $AR0, #0x03e8 - 0ca8 0501 addis $ACC1, #0x01 - 0ca9 1d1f mrr $WR0, $AC1.M - 0caa 1150 0cb2 bloopi #0x50, 0x0cb2 - 0cac 1c61 mrr $AR3, $AR1 - 0cad 84c3 clrp'ld : $AX0.L, $AX1.L, @$AR3 - 0cae 005f loop $AC1.M - 0caf f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0cb0 f200 madd $AX0.L, $AX0.H - 0cb1 fe00 movpz $ACC0 - 0cb2 1b3e srri @$AR1, $AC0.M - 0cb3 0088 ffff lri $WR0, #0xffff - 0cb5 8b00 m0 - 0cb6 02df ret - 0cb7 0083 03e8 lri $AR3, #0x03e8 - 0cb9 191e lrri $AC0.M, @$AR0 - 0cba 191a lrri $AX0.H, @$AR0 - 0cbb 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cbc 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cbd 1b7e srri @$AR3, $AC0.M - 0cbe 1b7a srri @$AR3, $AX0.H - 0cbf 0080 03e8 lri $AR0, #0x03e8 - 0cc1 0088 0003 lri $WR0, #0x0003 - 0cc3 0085 0000 lri $IX1, #0x0000 - 0cc5 0087 0000 lri $IX3, #0x0000 - 0cc7 1fc2 mrr $AC0.M, $AR2 - 0cc8 195b lrri $AX1.H, @$AR2 - 0cc9 1959 lrri $AX1.L, @$AR2 - 0cca 195f lrri $AC1.M, @$AR2 - 0ccb 195a lrri $AX0.H, @$AR2 - 0ccc 1c5e mrr $AR2, $AC0.M - 0ccd 1fda mrr $AC0.M, $AX0.H - 0cce 1c61 mrr $AR3, $AR1 - 0ccf 8a00 m2 - 0cd0 8f00 set40 - 0cd1 191a lrri $AX0.H, @$AR0 - 0cd2 b850 mulx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0cd3 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0cd4 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0cd5 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0cd6 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0cd7 1127 0ce2 bloopi #0x27, 0x0ce2 - 0cd9 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0cda 197e lrri $AC0.M, @$AR3 - 0cdb e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0cdc eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0cdd bf50 mulxmv'l $AX0.H, $AX1.H, $ACC1 : $AX0.H, @$AR0 - 0cde e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0cdf 197f lrri $AC1.M, @$AR3 - 0ce0 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0ce1 e8e8 maddc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0ce2 b650 mulxmv'l $AX0.H, $AX1.L, $ACC0 : $AX0.H, @$AR0 - 0ce3 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0ce4 197e lrri $AC0.M, @$AR3 - 0ce5 e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0ce6 eaf8 maddc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0ce7 bf00 mulxmv $AX0.H, $AX1.H, $ACC1 - 0ce8 1bff srrn @$AR3, $AC1.M - 0ce9 197f lrri $AC1.M, @$AR3 - 0cea 8e00 set16 - 0ceb 8b00 m0 - 0cec 0088 ffff lri $WR0, #0xffff - 0cee 1b5b srri @$AR2, $AX1.H - 0cef 1b59 srri @$AR2, $AX1.L - 0cf0 1b5f srri @$AR2, $AC1.M - 0cf1 1b5e srri @$AR2, $AC0.M - 0cf2 02df ret - 0cf3 0083 03e8 lri $AR3, #0x03e8 - 0cf5 191e lrri $AC0.M, @$AR0 - 0cf6 191a lrri $AX0.H, @$AR0 - 0cf7 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cf8 64a0 movr'ls $ACC0, $AX0.H : $AX0.H, $AC0.M - 0cf9 1b7e srri @$AR3, $AC0.M - 0cfa 1b7a srri @$AR3, $AX0.H - 0cfb 0080 03e8 lri $AR0, #0x03e8 - 0cfd 0088 0003 lri $WR0, #0x0003 - 0cff 0085 0000 lri $IX1, #0x0000 - 0d01 0087 0000 lri $IX3, #0x0000 - 0d03 1fc2 mrr $AC0.M, $AR2 - 0d04 195b lrri $AX1.H, @$AR2 - 0d05 1959 lrri $AX1.L, @$AR2 - 0d06 195f lrri $AC1.M, @$AR2 - 0d07 195a lrri $AX0.H, @$AR2 - 0d08 1c5e mrr $AR2, $AC0.M - 0d09 1fda mrr $AC0.M, $AX0.H - 0d0a 1c61 mrr $AR3, $AR1 - 0d0b 8a00 m2 - 0d0c 8f00 set40 - 0d0d 191a lrri $AX0.H, @$AR0 - 0d0e b800 mulx $AX0.H, $AX1.H - 0d0f e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0d10 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d11 ea00 maddc $AC1.M, $AX1.L - 0d12 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0d13 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0d14 ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0d15 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0d16 1127 0d27 bloopi #0x27, 0x0d27 - 0d18 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d19 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0d1a 197e lrri $AC0.M, @$AR3 - 0d1b e800 maddc $AC0.M, $AX1.L - 0d1c e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0d1d ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0d1e eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0d1f bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0d20 e350 maddx'l $AX0.H, $AX1.H : $AX0.H, @$AR0 - 0d21 e2a9 maddx'lsm $AX0.H, $AX1.L : $AX0.H, $AC1.M - 0d22 197f lrri $AC1.M, @$AR3 - 0d23 ea00 maddc $AC1.M, $AX1.L - 0d24 ea50 maddc'l $AC1.M, $AX1.L : $AX0.H, @$AR0 - 0d25 e877 maddc'ln $AC0.M, $AX1.L : $AC0.M, @$AR3 - 0d26 ece8 msubc'ldm $AC0.M, $AX1.L : $AX0.H, $AX1.L, @$AR0 - 0d27 b200 mulxmvz $AX0.H, $AX1.L, $ACC0 - 0d28 e250 maddx'l $AX0.H, $AX1.L : $AX0.H, @$AR0 - 0d29 e3a8 maddx'lsm $AX0.H, $AX1.H : $AX0.H, $AC0.M - 0d2a 197e lrri $AC0.M, @$AR3 - 0d2b e800 maddc $AC0.M, $AX1.L - 0d2c e850 maddc'l $AC0.M, $AX1.L : $AX0.H, @$AR0 - 0d2d ea7f maddc'ln $AC1.M, $AX1.L : $AC1.M, @$AR3 - 0d2e eef8 msubc'ldm $AC1.M, $AX1.L : $AX0.H, $AX1.H, @$AR0 - 0d2f bb00 mulxmvz $AX0.H, $AX1.H, $ACC1 - 0d30 1bff srrn @$AR3, $AC1.M - 0d31 197f lrri $AC1.M, @$AR3 - 0d32 8e00 set16 - 0d33 8b00 m0 - 0d34 0088 ffff lri $WR0, #0xffff - 0d36 1b5b srri @$AR2, $AX1.H - 0d37 1b59 srri @$AR2, $AX1.L - 0d38 1b5f srri @$AR2, $AC1.M - 0d39 1b5e srri @$AR2, $AC0.M - 0d3a 02df ret - 0d3b 0eff lris $AC0.M, #0xff - 0d3c 00fe 03f2 sr @0x03f2, $AC0.M - 0d3e 8100 clr $ACC0 - 0d3f 00fe 03f0 sr @0x03f0, $AC0.M - 0d41 00fe 03f6 sr @0x03f6, $AC0.M - 0d43 009e 0100 lri $AC0.M, #0x0100 - 0d45 00fe 03f7 sr @0x03f7, $AC0.M - 0d47 00da 03f7 lr $AX0.H, @0x03f7 - 0d49 009e 8000 lri $AC0.M, #0x8000 - 0d4b 5400 subr $ACC0, $AX0.H - 0d4c 00fe 03f5 sr @0x03f5, $AC0.M - 0d4e 0e30 lris $AC0.M, #0x30 - 0d4f 00fe 03f3 sr @0x03f3, $AC0.M - 0d51 0e10 lris $AC0.M, #0x10 - 0d52 00fe 03f4 sr @0x03f4, $AC0.M - 0d54 009e 0096 lri $AC0.M, #0x0096 - 0d56 00fe 03f1 sr @0x03f1, $AC0.M - 0d58 02df ret - 0d59 0080 0a00 lri $AR0, #0x0a00 - 0d5b 8100 clr $ACC0 - 0d5c 00de 03f0 lr $AC0.M, @0x03f0 - 0d5e 8900 clr $ACC1 - 0d5f b100 tst $ACC0 - 0d60 0275 ifz - 0d61 0550 addis $ACC1, #0x50 - 0d62 00ff 03f0 sr @0x03f0, $AC1.M - 0d64 0200 0a60 addi $AC0.M, #0x0a60 - 0d66 1c7e mrr $AR3, $AC0.M - 0d67 0f4e lris $AC1.M, #0x4e - 0d68 02bf 012b call 0x012b - 0d6a 02df ret - 0d6b 00de 03f1 lr $AC0.M, @0x03f1 - 0d6d 0200 0a60 addi $AC0.M, #0x0a60 - 0d6f 1c7e mrr $AR3, $AC0.M - 0d70 8100 clr $ACC0 - 0d71 8900 clr $ACC1 - 0d72 009f 00a0 lri $AC1.M, #0x00a0 - 0d74 00de 03f1 lr $AC0.M, @0x03f1 - 0d76 5d00 sub $ACC1, $ACC0 - 0d77 0e50 lris $AC0.M, #0x50 - 0d78 0750 cmpis $ACC1, #0x50 - 0d79 0270 ifge - 0d7a 5d00 sub $ACC1, $ACC0 - 0d7b 00da 03f2 lr $AX0.H, @0x03f2 - 0d7d 8600 tstaxh $AX0.H - 0d7e 0290 0d9c jge 0x0d9c - 0d80 00de 03f3 lr $AC0.M, @0x03f3 - 0d82 5c00 sub $ACC0, $ACC1 - 0d83 0293 0d87 jle 0x0d87 - 0d85 029f 0da1 jmp 0x0da1 - 0d87 00db 03f7 lr $AX1.H, @0x03f7 - 0d89 009e 8000 lri $AC0.M, #0x8000 - 0d8b 4600 addr $ACC0, $AX1.H - 0d8c 029f 0d93 jmp 0x0d93 - 0d8e 00db 03f7 lr $AX1.H, @0x03f7 - 0d90 009e 8000 lri $AC0.M, #0x8000 - 0d92 5600 subr $ACC0, $AX1.H - 0d93 00fe 03f5 sr @0x03f5, $AC0.M - 0d95 1fda mrr $AC0.M, $AX0.H - 0d96 7c00 neg $ACC0 - 0d97 1f5e mrr $AX0.H, $AC0.M - 0d98 00fe 03f2 sr @0x03f2, $AC0.M - 0d9a 029f 0da1 jmp 0x0da1 - 0d9c 00de 03f4 lr $AC0.M, @0x03f4 - 0d9e 5d00 sub $ACC1, $ACC0 - 0d9f 0293 0d8e jle 0x0d8e - 0da1 8900 clr $ACC1 - 0da2 00dd 03f5 lr $AC1.L, @0x03f5 - 0da4 1501 lsl $ACC1, #1 - 0da5 8100 clr $ACC0 - 0da6 00dc 03f6 lr $AC0.L, @0x03f6 - 0da8 008b 009f lri $WR3, #0x009f - 0daa 0080 0a00 lri $AR0, #0x0a00 - 0dac 0900 lris $AX1.L, #0x00 - 0dad 1150 0db4 bloopi #0x50, 0x0db4 - 0daf 1878 lrr $AX0.L, @$AR3 - 0db0 4c00 add $ACC0, $ACC1 - 0db1 1cfe mrr $IX3, $AC0.M - 0db2 001f addarn $AR3, $IX3 - 0db3 1fd9 mrr $AC0.M, $AX1.L - 0db4 1b18 srri @$AR0, $AX0.L - 0db5 009f 0a60 lri $AC1.M, #0x0a60 - 0db7 1fc3 mrr $AC0.M, $AR3 - 0db8 5c00 sub $ACC0, $ACC1 - 0db9 00fe 03f1 sr @0x03f1, $AC0.M - 0dbb 00fc 03f6 sr @0x03f6, $AC0.L - 0dbd 008b ffff lri $WR3, #0xffff - 0dbf 02df ret - 0dc0 0f50 lris $AC1.M, #0x50 - 0dc1 0080 0a00 lri $AR0, #0x0a00 - 0dc3 0083 0d60 lri $AR3, #0x0d60 - 0dc5 0098 3fff lri $AX0.L, #0x3fff - 0dc7 02bf 0145 call 0x0145 - 0dc9 0f50 lris $AC1.M, #0x50 - 0dca 0080 0a00 lri $AR0, #0x0a00 - 0dcc 0083 0d00 lri $AR3, #0x0d00 - 0dce 0098 3fff lri $AX0.L, #0x3fff - 0dd0 02bf 0145 call 0x0145 - 0dd2 02df ret - 0dd3 b900 tst $ACC1 - 0dd4 0294 0dd9 jnz 0x0dd9 - 0dd6 6800 movax $ACC0, $AX0.L - 0dd7 b100 tst $ACC0 - 0dd8 02d5 retz - 0dd9 1c23 mrr $AR1, $AR3 - 0dda 197e lrri $AC0.M, @$AR3 - 0ddb 191b lrri $AX1.H, @$AR0 - 0ddc d858 mulc'l $AC1.M, $AX1.H : $AX1.H, @$AR0 - 0ddd 1120 0de3 bloopi #0x20, 0x0de3 - 0ddf dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0de0 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0de1 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0de2 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0de3 4900 addax $ACC1, $AX0.L - 0de4 1108 0de9 bloopi #0x08, 0x0de9 - 0de6 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0de7 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0de8 dcd3 mulcac'ld $AC1.M, $AX1.H, $ACC0 : $AX0.L, $AX1.H, @$AR3 - 0de9 6231 movr's $ACC0, $AX1.L : @$AR1, $AC0.M - 0dea 02df ret - 0deb 8f00 set40 - 0dec 8d00 set15 - 0ded 1c03 mrr $AR0, $AR3 - 0dee 00d9 038e lr $AX1.L, @0x038e - 0df0 0b04 lris $AX1.H, #0x04 - 0df1 197a lrri $AX0.H, @$AR3 - 0df2 b053 mulx'l $AX0.H, $AX1.L : $AX0.H, @$AR3 - 0df3 b600 mulxmv $AX0.H, $AX1.L, $ACC0 - 0df4 1128 0df9 bloopi #0x28, 0x0df9 - 0df6 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0df7 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0df8 3ad3 orr'ld $AC0.M, $AX1.H : $AX0.L, $AX1.H, @$AR3 - 0df9 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0dfa 8c00 clr15 - 0dfb 8e00 set16 - 0dfc 02df ret - 0dfd 00da 0485 lr $AX0.H, @0x0485 - 0dff 8600 tstaxh $AX0.H - 0e00 0295 0e0e jz 0x0e0e - 0e02 8100 clr $ACC0 - 0e03 00de 042a lr $AC0.M, @0x042a - 0e05 147f lsr $ACC0, #-1 - 0e06 00fe 042b sr @0x042b, $AC0.M - 0e08 b100 tst $ACC0 - 0e09 0294 0e0e jnz 0x0e0e - 0e0b 0a01 lris $AX0.H, #0x01 - 0e0c 00fa 0401 sr @0x0401, $AX0.H - 0e0e 8f00 set40 - 0e0f 8100 clr $ACC0 - 0e10 00de 0428 lr $AC0.M, @0x0428 - 0e12 1478 lsr $ACC0, #-8 - 0e13 00df 0428 lr $AC1.M, @0x0428 - 0e15 0340 007f andi $AC1.M, #0x007f - 0e17 1f1e mrr $AX0.L, $AC0.M - 0e18 1f5f mrr $AX0.H, $AC1.M - 0e19 0220 007f xori $ACC0, #0x007f - 0e1b 1f3e mrr $AX1.L, $AC0.M - 0e1c 0320 007f xori $ACC1, #0x007f - 0e1e 1f7f mrr $AX1.H, $AC1.M - 0e1f 8100 clr $ACC0 - 0e20 8900 clr $ACC1 - 0e21 009f 0200 lri $AC1.M, #0x0200 - 0e23 1fd8 mrr $AC0.M, $AX0.L - 0e24 4c00 add $ACC0, $ACC1 - 0e25 1c1e mrr $AR0, $AC0.M - 0e26 1818 lrr $AX0.L, @$AR0 - 0e27 1fda mrr $AC0.M, $AX0.H - 0e28 4c00 add $ACC0, $ACC1 - 0e29 1c1e mrr $AR0, $AC0.M - 0e2a 181a lrr $AX0.H, @$AR0 - 0e2b 1fd9 mrr $AC0.M, $AX1.L - 0e2c 4c00 add $ACC0, $ACC1 - 0e2d 1c1e mrr $AR0, $AC0.M - 0e2e 1819 lrr $AX1.L, @$AR0 - 0e2f 1fdb mrr $AC0.M, $AX1.H - 0e30 4c00 add $ACC0, $ACC1 - 0e31 1c1e mrr $AR0, $AC0.M - 0e32 181b lrr $AX1.H, @$AR0 - 0e33 8a00 m2 - 0e34 0080 0b00 lri $AR0, #0x0b00 - 0e36 9800 mul $AX1.L, $AX1.H - 0e37 ae00 mulxmv $AX0.L, $AX1.H, $ACC0 - 0e38 b630 mulxmv's $AX0.H, $AX1.L, $ACC0 : @$AR0, $AC0.M - 0e39 9630 mulmv's $AX0.L, $AX0.H, $ACC0 : @$AR0, $AC0.M - 0e3a 6e30 movp's $ACC0 : @$AR0, $AC0.M - 0e3b 1b1e srri @$AR0, $AC0.M - 0e3c 8b00 m0 - 0e3d 0080 0b00 lri $AR0, #0x0b00 - 0e3f 0081 0b04 lri $AR1, #0x0b04 - 0e41 00da 042a lr $AX0.H, @0x042a - 0e43 02bf 0e8e call 0x0e8e - 0e45 0081 0b08 lri $AR1, #0x0b08 - 0e47 0080 0b00 lri $AR0, #0x0b00 - 0e49 00da 042a lr $AX0.H, @0x042a - 0e4b 00de 0429 lr $AC0.M, @0x0429 - 0e4d 8a00 m2 - 0e4e c000 mulc $AC0.M, $AX0.H - 0e4f 8b00 m0 - 0e50 6e00 movp $ACC0 - 0e51 1f5e mrr $AX0.H, $AC0.M - 0e52 02bf 0e8e call 0x0e8e - 0e54 0080 0b00 lri $AR0, #0x0b00 - 0e56 0081 0b0c lri $AR1, #0x0b0c - 0e58 8100 clr $ACC0 - 0e59 8900 clr $ACC1 - 0e5a 00de 042b lr $AC0.M, @0x042b - 0e5c 00df 042a lr $AC1.M, @0x042a - 0e5e 00fe 042a sr @0x042a, $AC0.M - 0e60 5c00 sub $ACC0, $ACC1 - 0e61 1f5e mrr $AX0.H, $AC0.M - 0e62 02bf 0e99 call 0x0e99 - 0e64 0080 0b0c lri $AR0, #0x0b0c - 0e66 0081 0b10 lri $AR1, #0x0b10 - 0e68 00da 0429 lr $AX0.H, @0x0429 - 0e6a 02bf 0e8e call 0x0e8e - 0e6c 0081 0b04 lri $AR1, #0x0b04 - 0e6e 0082 0b0c lri $AR2, #0x0b0c - 0e70 0083 0ea7 lri $AR3, #0x0ea7 - 0e72 1108 0e8b bloopi #0x08, 0x0e8b - 0e74 195f lrri $AC1.M, @$AR2 - 0e75 15fb asr $ACC1, #-5 - 0e76 1f1d mrr $AX0.L, $AC1.L - 0e77 1f5f mrr $AX0.H, $AC1.M - 0e78 193f lrri $AC1.M, @$AR1 - 0e79 00e1 0b24 sr @0x0b24, $AR1 - 0e7b 00e2 0b25 sr @0x0b25, $AR2 - 0e7d 021b ilrri $AC0.M, @$AR3 - 0e7e 00e3 0b26 sr @0x0b26, $AR3 - 0e80 1c7e mrr $AR3, $AC0.M - 0e81 00c0 038f lr $AR0, @0x038f - 0e83 02bf 0dd3 call 0x0dd3 - 0e85 00c1 0b24 lr $AR1, @0x0b24 - 0e87 00c2 0b25 lr $AR2, @0x0b25 - 0e89 00c3 0b26 lr $AR3, @0x0b26 - 0e8b 0000 nop - 0e8c 8e00 set16 - 0e8d 02df ret - 0e8e 8a00 m2 - 0e8f 191f lrri $AC1.M, @$AR0 - 0e90 d078 mulc'l $AC1.M, $AX0.H : $AC1.M, @$AR0 - 0e91 d678 mulcmv'l $AC1.M, $AX0.H, $ACC0 : $AC1.M, @$AR0 - 0e92 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e93 191f lrri $AC1.M, @$AR0 - 0e94 d631 mulcmv's $AC1.M, $AX0.H, $ACC0 : @$AR1, $AC0.M - 0e95 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0e96 1b3e srri @$AR1, $AC0.M - 0e97 8b00 m0 - 0e98 02df ret - 0e99 8a00 m2 - 0e9a 8d00 set15 - 0e9b 1f7e mrr $AX1.H, $AC0.M - 0e9c 1918 lrri $AX0.L, @$AR0 - 0e9d a840 mulx'l $AX0.L, $AX1.H : $AX0.L, @$AR0 - 0e9e ae40 mulxmv'l $AX0.L, $AX1.H, $ACC0 : $AX0.L, @$AR0 - 0e9f ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ea0 1918 lrri $AX0.L, @$AR0 - 0ea1 ae31 mulxmv's $AX0.L, $AX1.H, $ACC0 : @$AR1, $AC0.M - 0ea2 6e31 movp's $ACC0 : @$AR1, $AC0.M - 0ea3 1b3e srri @$AR1, $AC0.M - 0ea4 8c00 clr15 - 0ea5 8b00 m0 - 0ea6 02df ret - 0ea7 0d00 lris $AC1.L, #0x00 - 0ea8 0d60 lris $AC1.L, #0x60 - 0ea9 0f40 lris $AC1.M, #0x40 - 0eaa 0ca0 lris $AC0.L, #0xa0 - 0eab 0e80 lris $AC0.M, #0x80 - 0eac 0ee0 lris $AC0.M, #0xe0 - 0ead 0be0 lris $AX1.H, #0xe0 - 0eae 0c40 lris $AC0.L, #0x40 - 0eaf 00f9 0361 sr @0x0361, $AX1.L - 0eb1 1fc0 mrr $AC0.M, $AR0 - 0eb2 0200 fffc addi $AC0.M, #0xfffc - 0eb4 1c1e mrr $AR0, $AC0.M - 0eb5 1c5e mrr $AR2, $AC0.M - 0eb6 0083 043c lri $AR3, #0x043c - 0eb8 197e lrri $AC0.M, @$AR3 - 0eb9 197f lrri $AC1.M, @$AR3 - 0eba 80a2 nx'sl : $AC0.M, $AX0.H - 0ebb 64a3 movr'sl $ACC0, $AX0.H : $AC1.M, $AX0.H - 0ebc 6530 movr's $ACC1, $AX0.H : @$AR0, $AC0.M - 0ebd 1b1f srri @$AR0, $AC1.M - 0ebe 1c02 mrr $AR0, $AR2 - 0ebf 8100 clr $ACC0 - 0ec0 00de 0402 lr $AC0.M, @0x0402 - 0ec2 00fe 0362 sr @0x0362, $AC0.M - 0ec4 1474 lsr $ACC0, #-12 - 0ec5 1f7e mrr $AX1.H, $AC0.M - 0ec6 1f3c mrr $AX1.L, $AC0.L - 0ec7 8900 clr $ACC1 - 0ec8 00dd 0430 lr $AC1.L, @0x0430 - 0eca 1504 lsl $ACC1, #4 - 0ecb 0604 cmpis $ACC0, #0x04 - 0ecc 0290 0f23 jge 0x0f23 - 0ece 1fdd mrr $AC0.M, $AC1.L - 0ecf 0082 02b0 lri $AR2, #0x02b0 - 0ed1 1050 loopi #0x50 - 0ed2 4b2a addax's $ACC1, $AX1.L : @$AR2, $AC1.L - 0ed3 1fbe mrr $AC1.L, $AC0.M - 0ed4 00fe 0360 sr @0x0360, $AC0.M - 0ed6 8900 clr $ACC1 - 0ed7 1fbe mrr $AC1.L, $AC0.M - 0ed8 0af8 lris $AX0.H, #0xf8 - 0ed9 009b 00fc lri $AX1.H, #0x00fc - 0edb 00d8 0361 lr $AX0.L, @0x0361 - 0edd 0082 02b0 lri $AR2, #0x02b0 - 0edf 0083 02b0 lri $AR3, #0x02b0 - 0ee1 195e lrri $AC0.M, @$AR2 - 0ee2 3480 andr'ls $AC0.M, $AX0.H : $AX0.L, $AC0.M - 0ee3 1128 0ee8 bloopi #0x28, 0x0ee8 - 0ee5 367a andr'l $AC0.M, $AX1.H : $AC1.M, @$AR2 - 0ee6 35b3 andr'sl $AC1.M, $AX0.H : $AC1.M, $AX1.H - 0ee7 3772 andr'l $AC1.M, $AX1.H : $AC0.M, @$AR2 - 0ee8 34bb andr'slm $AC0.M, $AX0.H : $AC1.M, $AX1.H - 0ee9 8a00 m2 - 0eea 0082 02b0 lri $AR2, #0x02b0 - 0eec 00dd 0430 lr $AC1.L, @0x0430 - 0eee 1504 lsl $ACC1, #4 - 0eef 1fe0 mrr $AC1.M, $AR0 - 0ef0 8100 clr $ACC0 - 0ef1 00de 0362 lr $AC0.M, @0x0362 - 0ef3 1474 lsr $ACC0, #-12 - 0ef4 1f7e mrr $AX1.H, $AC0.M - 0ef5 1f3c mrr $AX1.L, $AC0.L - 0ef6 8f00 set40 - 0ef7 1943 lrri $AR3, @$AR2 - 0ef8 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0ef9 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0efa f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0efb f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0efc f200 madd $AX0.L, $AX0.H - 0efd fe00 movpz $ACC0 - 0efe 1c1f mrr $AR0, $AC1.M - 0eff 1943 lrri $AR3, @$AR2 - 0f00 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0f01 90c3 mul'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f02 114e 0f0a bloopi #0x4e, 0x0f0a - 0f04 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f05 f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f06 f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0f07 1c1f mrr $AR0, $AC1.M - 0f08 1943 lrri $AR3, @$AR2 - 0f09 4bc3 addax'ld $ACC1, $AX1.L : $AX0.L, $AX1.L, @$AR3 - 0f0a 92c3 mulmvz'ld $AX0.L, $AX0.H, $ACC0 : $AX0.L, $AX1.L, @$AR3 - 0f0b f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f0c f2c3 madd'ld $AX0.L, $AX0.H : $AX0.L, $AX1.L, @$AR3 - 0f0d f231 madd's $AX0.L, $AX0.H : @$AR1, $AC0.M - 0f0e fe00 movpz $ACC0 - 0f0f 1b3e srri @$AR1, $AC0.M - 0f10 8b00 m0 - 0f11 8e00 set16 - 0f12 00fe 0433 sr @0x0433, $AC0.M - 0f14 1c1f mrr $AR0, $AC1.M - 0f15 150c lsl $ACC1, #12 - 0f16 0340 0fff andi $AC1.M, #0x0fff - 0f18 00ff 0430 sr @0x0430, $AC1.M - 0f1a 0083 043c lri $AR3, #0x043c - 0f1c 191e lrri $AC0.M, @$AR0 - 0f1d 191f lrri $AC1.M, @$AR0 - 0f1e 80a0 nx'ls : $AX0.H, $AC0.M - 0f1f 64a1 movr'ls $ACC0, $AX0.H : $AX0.H, $AC1.M - 0f20 6533 movr's $ACC1, $AX0.H : @$AR3, $AC0.M - 0f21 1b7f srri @$AR3, $AC1.M - 0f22 02df ret - 0f23 1fe0 mrr $AC1.M, $AR0 - 0f24 1c1f mrr $AR0, $AC1.M - 0f25 1128 0f2c bloopi #0x28, 0x0f2c - 0f27 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f28 1b3e srri @$AR1, $AC0.M - 0f29 1c1f mrr $AR0, $AC1.M - 0f2a 4b70 addax'l $ACC1, $AX1.L : $AC0.M, @$AR0 - 0f2b 1b3e srri @$AR1, $AC0.M - 0f2c 1c1f mrr $AR0, $AC1.M - 0f2d 029f 0f12 jmp 0x0f12 - 0f2f 0083 0520 lri $AR3, #0x0520 - 0f31 00de 0433 lr $AC0.M, @0x0433 - 0f33 1050 loopi #0x50 - 0f34 1b7e srri @$AR3, $AC0.M - 0f35 029f 0386 jmp 0x0386 - 0f37 1c20 mrr $AR1, $AR0 - 0f38 185f lrr $AC1.M, @$AR2 - 0f39 1f7f mrr $AX1.H, $AC1.M - 0f3a 193a lrri $AX0.H, @$AR1 - 0f3b 6400 movr $ACC0, $AX0.H - 0f3c 0078 0f41 bloop $AX0.L, 0x0f41 - 0f3e 5659 subr'l $ACC0, $AX1.H : $AX1.H, @$AR1 - 0f3f 6730 movr's $ACC1, $AX1.H : @$AR0, $AC0.M - 0f40 5551 subr'l $ACC1, $AX0.H : $AX0.H, @$AR1 - 0f41 6438 movr's $ACC0, $AX0.H : @$AR0, $AC1.M - 0f42 1a5b srr @$AR2, $AX1.H - 0f43 02df ret - 0f44 0098 8240 lri $AX0.L, #0x8240 - 0f46 00f8 04e8 sr @0x04e8, $AX0.L - 0f48 0098 7fff lri $AX0.L, #0x7fff - 0f4a 00f8 04e9 sr @0x04e9, $AX0.L - 0f4c 0098 7dbf lri $AX0.L, #0x7dbf - 0f4e 00f8 04ea sr @0x04ea, $AX0.L - 0f50 0098 843f lri $AX0.L, #0x843f - 0f52 00f8 04eb sr @0x04eb, $AX0.L - 0f54 0098 b23b lri $AX0.L, #0xb23b - 0f56 00f8 04f0 sr @0x04f0, $AX0.L - 0f58 0098 7fff lri $AX0.L, #0x7fff - 0f5a 00f8 04f1 sr @0x04f1, $AX0.L - 0f5c 0098 4dc4 lri $AX0.L, #0x4dc4 - 0f5e 00f8 04f2 sr @0x04f2, $AX0.L - 0f60 0098 d808 lri $AX0.L, #0xd808 - 0f62 00f8 04f3 sr @0x04f3, $AX0.L - 0f64 0098 0000 lri $AX0.L, #0x0000 - 0f66 0080 04ec lri $AR0, #0x04ec - 0f68 1004 loopi #0x04 - 0f69 1b18 srri @$AR0, $AX0.L - 0f6a 0080 04f4 lri $AR0, #0x04f4 - 0f6c 1004 loopi #0x04 - 0f6d 1b18 srri @$AR0, $AX0.L - 0f6e 02df ret - 0f6f 0080 0f40 lri $AR0, #0x0f40 - 0f71 0083 0b00 lri $AR3, #0x0b00 - 0f73 8900 clr $ACC1 - 0f74 0f50 lris $AC1.M, #0x50 - 0f75 0098 6784 lri $AX0.L, #0x6784 - 0f77 02bf 0154 call 0x0154 - 0f79 0080 04e8 lri $AR0, #0x04e8 - 0f7b 0082 04ec lri $AR2, #0x04ec - 0f7d 0081 0b00 lri $AR1, #0x0b00 - 0f7f 8900 clr $ACC1 - 0f80 0f50 lris $AC1.M, #0x50 - 0f81 0080 0b00 lri $AR0, #0x0b00 - 0f83 0083 0d00 lri $AR3, #0x0d00 - 0f85 0098 7fff lri $AX0.L, #0x7fff - 0f87 02bf 0145 call 0x0145 - 0f89 8900 clr $ACC1 - 0f8a 0f50 lris $AC1.M, #0x50 - 0f8b 0080 0b00 lri $AR0, #0x0b00 - 0f8d 0083 0d60 lri $AR3, #0x0d60 - 0f8f 0098 b820 lri $AX0.L, #0xb820 - 0f91 02bf 0145 call 0x0145 - 0f93 0080 0ca0 lri $AR0, #0x0ca0 - 0f95 0083 0b00 lri $AR3, #0x0b00 - 0f97 8900 clr $ACC1 - 0f98 0f50 lris $AC1.M, #0x50 - 0f99 0098 6784 lri $AX0.L, #0x6784 - 0f9b 02bf 0154 call 0x0154 - 0f9d 0080 04e8 lri $AR0, #0x04e8 - 0f9f 0082 04f4 lri $AR2, #0x04f4 - 0fa1 0081 0b00 lri $AR1, #0x0b00 - 0fa3 8900 clr $ACC1 - 0fa4 0f50 lris $AC1.M, #0x50 - 0fa5 0080 0b00 lri $AR0, #0x0b00 - 0fa7 0083 0d00 lri $AR3, #0x0d00 - 0fa9 0098 47e0 lri $AX0.L, #0x47e0 - 0fab 02bf 0145 call 0x0145 - 0fad 8900 clr $ACC1 - 0fae 0f50 lris $AC1.M, #0x50 - 0faf 0080 0b00 lri $AR0, #0x0b00 - 0fb1 0083 0d60 lri $AR3, #0x0d60 - 0fb3 0098 8001 lri $AX0.L, #0x8001 - 0fb5 02bf 0145 call 0x0145 - 0fb7 02df ret - 0fb8 0000 nop - 0fb9 0000 nop - 0fba 0000 nop - 0fbb 0000 nop - 0fbc 0000 nop - 0fbd 0000 nop - 0fbe 0000 nop - 0fbf 0000 nop