mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-31 00:10:52 +01:00
4a0c8fc0c9
enable newline normalization get revision number via `hg svn info` for svnrev.h ignore incremental/generated binary files (windows/VS at least) leave a comment if some files need native eol set in svnprops git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5637 8ced0084-cf51-0410-be5f-012b33b47a6e
3340 lines
134 KiB
Plaintext
3340 lines
134 KiB
Plaintext
// 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 = <nothing interesting>
|
|
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 <PROD> 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 <PROD> 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 // <PROD> = 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 += <PROD>; <PROD> = 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 += <PROD>; <PROD> = 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 += <PROD>; <PROD> = 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 = <PROD>;
|
|
0be6 4f12 addp'mv $ACC1 : $AX0.L, $AC0.M // acc1 += <PROD>; 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
|