|
@@ -14,9 +14,10 @@
|
14
|
14
|
.equ GAME_KWJ6, 3
|
15
|
15
|
.equ GAME_AE7E, 4
|
16
|
16
|
.equ GAME_BPRD, 5
|
|
17
|
+ .equ GAME_SOTS, 6
|
17
|
18
|
|
18
|
19
|
/* SELECT USED GAME HERE */
|
19
|
|
- .equ USED_GAME, GAME_BPRE
|
|
20
|
+ .equ USED_GAME, GAME_SOTS
|
20
|
21
|
|
21
|
22
|
.equ FRAME_LENGTH_5734, 0x60
|
22
|
23
|
.equ FRAME_LENGTH_7884, 0x84 @ THIS MODE IS NOT SUPPORTED BY THIS ENGINE BECAUSE IT DOESN'T USE AN 8 ALIGNED BUFFER LENGTH
|
|
@@ -37,6 +38,7 @@
|
37
|
38
|
|
38
|
39
|
.equ BUFFER_IRAM_BPE, 0x03001AA8
|
39
|
40
|
.equ BUFFER_IRAM_BPR, 0x030028E0
|
|
41
|
+ .equ BUFFER_IRAM_SOTS, 0x030028A0
|
40
|
42
|
.equ BUFFER_IRAM_KWJ, 0x03005840
|
41
|
43
|
.equ BUFFER_IRAM_AE7, 0x03006D60
|
42
|
44
|
|
|
@@ -155,6 +157,16 @@
|
155
|
157
|
.equ ENABLE_DECOMPRESSION, 1
|
156
|
158
|
|
157
|
159
|
.endif
|
|
160
|
+@*********** IF POKEMON SOTS
|
|
161
|
+.if USED_GAME==GAME_SOTS
|
|
162
|
+
|
|
163
|
+ .equ hq_buffer_ptr, BUFFER_IRAM_SOTS
|
|
164
|
+ .equ decoder_buffer_target, DECODER_BUFFER_BPR
|
|
165
|
+ .equ POKE_INIT, 1
|
|
166
|
+ .equ DMA_FIX, 1
|
|
167
|
+ .equ ENABLE_DECOMPRESSION, 1
|
|
168
|
+
|
|
169
|
+.endif
|
158
|
170
|
@*********** IF KAWAs JUKEBOX 2006
|
159
|
171
|
.if USED_GAME==GAME_KWJ6
|
160
|
172
|
|
|
@@ -1359,12 +1371,13 @@ C_uncompressed_reverse_mixing_load_skip:
|
1359
|
1371
|
*/
|
1360
|
1372
|
F_bdpcm_decoder:
|
1361
|
1373
|
|
1362
|
|
- STMFD SP!, {R0, R2, R5-R7, LR}
|
|
1374
|
+ STMFD SP!, {R0, LR}
|
1363
|
1375
|
MOV R0, R3, LSR#6 @ clip off everything but the block offset, each block is 0x40 samples long
|
1364
|
1376
|
LDR R12, [R4, #CHN_BLOCK_COUNT]
|
1365
|
1377
|
CMP R0, R12
|
1366
|
1378
|
BEQ C_bdpcm_decoder_return @ block already decoded -> skip
|
1367
|
1379
|
|
|
1380
|
+ STMFD SP!, {R2, R5-R7}
|
1368
|
1381
|
STR R0, [R4, #CHN_BLOCK_COUNT]
|
1369
|
1382
|
MOV R12, #0x21 @ 1 Block = 0x21 Bytes, 0x40 decoded samples
|
1370
|
1383
|
MUL R2, R12, R0
|
|
@@ -1393,12 +1406,13 @@ C_bdpcm_decoder_lsb:
|
1393
|
1406
|
STRB LR, [R5], #1
|
1394
|
1407
|
SUBS R7, R7, #2
|
1395
|
1408
|
BGT C_bdpcm_decoder_msb
|
1396
|
|
-
|
|
1409
|
+
|
|
1410
|
+ LDMFD SP!, {R2, R5-R7}
|
1397
|
1411
|
C_bdpcm_decoder_return:
|
1398
|
|
- LDR R5, decoder_buffer
|
|
1412
|
+ LDR R12, decoder_buffer
|
1399
|
1413
|
AND R0, R3, #0x3F
|
1400
|
|
- LDRSB R12, [R5, R0]
|
1401
|
|
- LDMFD SP!, {R0, R2, R5-R7, PC}
|
|
1414
|
+ LDRSB R12, [R12, R0]
|
|
1415
|
+ LDMFD SP!, {R0, PC}
|
1402
|
1416
|
|
1403
|
1417
|
.align 2
|
1404
|
1418
|
|