2016-11-02 04:03:16 +01:00
|
|
|
.include "asm/macros.inc"
|
|
|
|
.include "constants/gba_constants.inc"
|
|
|
|
.include "constants/m4a_constants.inc"
|
|
|
|
|
|
|
|
.syntax unified
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
thumb_func_start umul3232H32
|
|
|
|
umul3232H32:
|
|
|
|
adr r2, __umul3232H32
|
|
|
|
bx r2
|
|
|
|
.arm
|
|
|
|
__umul3232H32:
|
|
|
|
umull r2, r3, r0, r1
|
|
|
|
add r0, r3, 0
|
|
|
|
bx lr
|
|
|
|
thumb_func_end umul3232H32
|
|
|
|
|
|
|
|
thumb_func_start SoundMain
|
|
|
|
SoundMain:
|
|
|
|
ldr r0, lt_SOUND_INFO_PTR
|
2020-09-08 22:25:09 +02:00
|
|
|
ldr r0, [r0]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r2, lt_ID_NUMBER
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, r3
|
|
|
|
beq SoundMain_1
|
|
|
|
bx lr @ Exit the function if ident doesn't match ID_NUMBER.
|
|
|
|
SoundMain_1:
|
|
|
|
adds r3, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r0, o_SoundInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
push {r4-r7,lr}
|
|
|
|
mov r1, r8
|
|
|
|
mov r2, r9
|
|
|
|
mov r3, r10
|
|
|
|
mov r4, r11
|
|
|
|
push {r0-r4}
|
|
|
|
sub sp, 0x18
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r0, o_SoundInfo_maxLines]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0 @ if maxLines is 0, there is no maximum
|
|
|
|
beq SoundMain_3
|
|
|
|
ldr r2, lt_REG_VCOUNT
|
|
|
|
ldrb r2, [r2]
|
|
|
|
cmp r2, VCOUNT_VBLANK
|
|
|
|
bhs SoundMain_2
|
|
|
|
adds r2, TOTAL_SCANLINES
|
|
|
|
SoundMain_2:
|
|
|
|
adds r1, r2
|
|
|
|
SoundMain_3:
|
|
|
|
str r1, [sp, 0x14]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r0, o_SoundInfo_MPlayMainHead]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
beq SoundMain_4
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r0, [r0, o_SoundInfo_musicPlayerHead]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl _081DD25E
|
|
|
|
ldr r0, [sp, 0x18]
|
|
|
|
SoundMain_4:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_CgbSound]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl _081DD25E
|
|
|
|
ldr r0, [sp, 0x18]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_pcmSamplesPerVBlank]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r8, r3
|
2020-08-25 03:57:34 +02:00
|
|
|
ldr r5, lt_o_SoundInfo_pcmBuffer
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r5, r0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r4, [r0, o_SoundInfo_pcmDmaCounter]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r7, r4, 1
|
|
|
|
bls SoundMain_5
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r0, o_SoundInfo_pcmDmaPeriod]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r1, r7
|
|
|
|
mov r2, r8
|
|
|
|
muls r2, r1
|
|
|
|
adds r5, r2
|
|
|
|
SoundMain_5:
|
|
|
|
str r5, [sp, 0x8]
|
|
|
|
ldr r6, lt_PCM_DMA_BUF_SIZE
|
|
|
|
ldr r3, lt_SoundMainRAM_Buffer
|
|
|
|
bx r3
|
|
|
|
|
|
|
|
.align 2, 0
|
|
|
|
lt_SOUND_INFO_PTR: .word SOUND_INFO_PTR
|
|
|
|
lt_ID_NUMBER: .word ID_NUMBER
|
|
|
|
lt_SoundMainRAM_Buffer: .word SoundMainRAM_Buffer + 1
|
|
|
|
lt_REG_VCOUNT: .word REG_VCOUNT
|
2020-08-25 03:57:34 +02:00
|
|
|
lt_o_SoundInfo_pcmBuffer: .word o_SoundInfo_pcmBuffer
|
2016-11-02 04:03:16 +01:00
|
|
|
lt_PCM_DMA_BUF_SIZE: .word PCM_DMA_BUF_SIZE
|
|
|
|
thumb_func_end SoundMain
|
|
|
|
|
|
|
|
thumb_func_start SoundMainRAM
|
|
|
|
SoundMainRAM:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r0, o_SoundInfo_reverb]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
beq SoundMainRAM_NoReverb
|
|
|
|
adr r1, SoundMainRAM_Reverb
|
|
|
|
bx r1
|
|
|
|
.arm
|
|
|
|
SoundMainRAM_Reverb:
|
|
|
|
cmp r4, 0x2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
addeq r7, r0, o_SoundInfo_pcmBuffer
|
2016-11-02 04:03:16 +01:00
|
|
|
addne r7, r5, r8
|
|
|
|
mov r4, r8
|
|
|
|
_081DCEC4:
|
|
|
|
ldrsb r0, [r5, r6]
|
|
|
|
ldrsb r1, [r5]
|
|
|
|
add r0, r0, r1
|
|
|
|
ldrsb r1, [r7, r6]
|
|
|
|
add r0, r0, r1
|
|
|
|
ldrsb r1, [r7], 0x1
|
|
|
|
add r0, r0, r1
|
|
|
|
mul r1, r0, r3
|
|
|
|
mov r0, r1, asr 9
|
|
|
|
tst r0, 0x80
|
|
|
|
addne r0, r0, 0x1
|
|
|
|
strb r0, [r5, r6]
|
|
|
|
strb r0, [r5], 0x1
|
|
|
|
subs r4, r4, 0x1
|
|
|
|
bgt _081DCEC4
|
|
|
|
adr r0, _081DCF36 + 1 @ plus 1 because THUMB
|
|
|
|
bx r0
|
|
|
|
.thumb
|
|
|
|
SoundMainRAM_NoReverb:
|
|
|
|
movs r0, 0
|
|
|
|
mov r1, r8
|
|
|
|
adds r6, r5
|
|
|
|
lsrs r1, 3
|
|
|
|
bcc SoundMainRAM_NoReverb_Ok
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
SoundMainRAM_NoReverb_Ok:
|
|
|
|
lsrs r1, 1
|
|
|
|
bcc SoundMainRAM_NoReverb_Loop
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
SoundMainRAM_NoReverb_Loop:
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
stm r5!, {r0}
|
|
|
|
stm r6!, {r0}
|
|
|
|
subs r1, 1
|
|
|
|
bgt SoundMainRAM_NoReverb_Loop
|
|
|
|
_081DCF36:
|
|
|
|
ldr r4, [sp, 0x18]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r4, o_SoundInfo_divFreq]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r12, r0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundInfo_maxChans]
|
|
|
|
adds r4, o_SoundInfo_chans
|
2016-11-02 04:03:16 +01:00
|
|
|
|
|
|
|
SoundMainRAM_ChanLoop:
|
|
|
|
str r0, [sp, 0x4]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r4, o_SoundChannel_wav]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x14]
|
|
|
|
cmp r0, 0
|
|
|
|
beq _081DCF60
|
|
|
|
ldr r1, =REG_VCOUNT
|
|
|
|
ldrb r1, [r1]
|
|
|
|
cmp r1, VCOUNT_VBLANK
|
|
|
|
bhs _081DCF54
|
|
|
|
adds r1, TOTAL_SCANLINES
|
|
|
|
_081DCF54:
|
|
|
|
cmp r1, r0
|
|
|
|
blo _081DCF60
|
|
|
|
b _081DD24A
|
|
|
|
|
|
|
|
.pool
|
|
|
|
|
|
|
|
_081DCF60:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r6, [r4, o_SoundChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r6
|
|
|
|
bne _081DCF6A
|
|
|
|
b _081DD240
|
|
|
|
_081DCF6A:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_START
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r6
|
|
|
|
beq _081DCFA0
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r6
|
|
|
|
bne _081DCFB0
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r6, SOUND_CHANNEL_SF_ENV_ATTACK
|
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r3, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
adds r0, o_WaveData_data
|
|
|
|
ldr r1, [r4, o_SoundChannel_count]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_SoundChannel_currentPointer]
|
|
|
|
ldr r0, [r3, o_WaveData_size]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r0, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_SoundChannel_count]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r5, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r5, [r4, o_SoundChannel_envelopeVolume]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r5, [r4, o_SoundChannel_fw]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r2, [r3, o_WaveData_flags]
|
|
|
|
movs r0, WAVE_DATA_FLAG_LOOP
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r2
|
|
|
|
beq _081DCFF8
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_LOOP
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r6, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DCFF8
|
|
|
|
_081DCFA0:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r5, [r4, o_SoundChannel_envelopeVolume]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_IEC
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r6
|
|
|
|
beq _081DCFB6
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_pseudoEchoLength]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r0, 1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_pseudoEchoLength]
|
2016-11-02 04:03:16 +01:00
|
|
|
bhi _081DD006
|
|
|
|
_081DCFB0:
|
|
|
|
movs r0, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD240
|
|
|
|
_081DCFB6:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r6
|
|
|
|
beq _081DCFD6
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_release]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r5, r0
|
|
|
|
lsrs r5, 8
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_pseudoEchoVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r5, r0
|
|
|
|
bhi _081DD006
|
|
|
|
_081DCFC8:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r5, [r4, o_SoundChannel_pseudoEchoVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r5, 0
|
|
|
|
beq _081DCFB0
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_IEC
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r6, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD006
|
|
|
|
_081DCFD6:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, SOUND_CHANNEL_SF_ENV
|
2016-11-02 04:03:16 +01:00
|
|
|
ands r2, r6
|
2020-12-11 13:58:00 +01:00
|
|
|
cmp r2, SOUND_CHANNEL_SF_ENV_DECAY
|
2016-11-02 04:03:16 +01:00
|
|
|
bne _081DCFF4
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_decay]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r5, r0
|
|
|
|
lsrs r5, 8
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_sustain]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r5, r0
|
|
|
|
bhi _081DD006
|
|
|
|
adds r5, r0, 0
|
|
|
|
beq _081DCFC8
|
|
|
|
subs r6, 0x1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD006
|
|
|
|
_081DCFF4:
|
2020-12-11 13:58:00 +01:00
|
|
|
cmp r2, SOUND_CHANNEL_SF_ENV_ATTACK
|
2016-11-02 04:03:16 +01:00
|
|
|
bne _081DD006
|
|
|
|
_081DCFF8:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_attack]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r5, r0
|
|
|
|
cmp r5, 0xFF
|
|
|
|
bcc _081DD006
|
|
|
|
movs r5, 0xFF
|
|
|
|
subs r6, 0x1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD006:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r5, [r4, o_SoundChannel_envelopeVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x18]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r0, o_SoundChannel_release]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, 0x1
|
|
|
|
muls r0, r5
|
|
|
|
lsrs r5, r0, 4
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_rightVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r0, r5
|
|
|
|
lsrs r0, 8
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_envelopeVolumeRight]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_leftVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r0, r5
|
|
|
|
lsrs r0, 8
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_envelopeVolumeLeft]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_LOOP
|
2016-11-02 04:03:16 +01:00
|
|
|
ands r0, r6
|
|
|
|
str r0, [sp, 0x10]
|
|
|
|
beq _081DD03A
|
|
|
|
adds r0, r3, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
adds r0, o_WaveData_data
|
|
|
|
ldr r1, [r3, o_WaveData_loopStart]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1
|
|
|
|
str r0, [sp, 0xC]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r0, [r3, o_WaveData_size]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r0, r1
|
|
|
|
str r0, [sp, 0x10]
|
|
|
|
_081DD03A:
|
|
|
|
ldr r5, [sp, 0x8]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r2, [r4, o_SoundChannel_count]
|
|
|
|
ldr r3, [r4, o_SoundChannel_currentPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
adr r0, _081DD044
|
|
|
|
bx r0
|
|
|
|
.arm
|
|
|
|
_081DD044:
|
|
|
|
str r8, [sp]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r9, [r4, o_SoundChannel_fw]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r10, [r4, o_SoundChannel_envelopeVolumeRight]
|
|
|
|
ldrb r11, [r4, o_SoundChannel_envelopeVolumeLeft]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
tst r0, TONEDATA_TYPE_CMP | TONEDATA_TYPE_REV
|
2016-11-02 04:03:16 +01:00
|
|
|
beq _081DD068
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk1
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD228
|
|
|
|
_081DD068:
|
|
|
|
mov r10, r10, lsl 16
|
|
|
|
mov r11, r11, lsl 16
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, 0x8
|
|
|
|
beq _081DD19C
|
|
|
|
_081DD07C:
|
|
|
|
cmp r2, 0x4
|
|
|
|
ble _081DD0EC
|
|
|
|
subs r2, r2, r8
|
|
|
|
movgt r9, 0
|
|
|
|
bgt _081DD0A8
|
|
|
|
mov r9, r8
|
|
|
|
add r2, r2, r8
|
|
|
|
sub r8, r2, 0x4
|
|
|
|
sub r9, r9, r8
|
|
|
|
ands r2, r2, 0x3
|
|
|
|
moveq r2, 0x4
|
|
|
|
_081DD0A8:
|
|
|
|
ldr r6, [r5]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD0B0:
|
|
|
|
ldrsb r0, [r3], 0x1
|
|
|
|
mul r1, r10, r0
|
|
|
|
bic r1, r1, 0xFF0000
|
|
|
|
add r6, r1, r6, ror 8
|
|
|
|
mul r1, r11, r0
|
|
|
|
bic r1, r1, 0xFF0000
|
|
|
|
add r7, r1, r7, ror 8
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD0B0
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
subs r8, r8, 0x4
|
|
|
|
bgt _081DD0A8
|
|
|
|
adds r8, r8, r9
|
|
|
|
beq _081DD22C
|
|
|
|
_081DD0EC:
|
|
|
|
ldr r6, [r5]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD0F4:
|
|
|
|
ldrsb r0, [r3], 0x1
|
|
|
|
mul r1, r10, r0
|
|
|
|
bic r1, r1, 0xFF0000
|
|
|
|
add r6, r1, r6, ror 8
|
|
|
|
mul r1, r11, r0
|
|
|
|
bic r1, r1, 0xFF0000
|
|
|
|
add r7, r1, r7, ror 8
|
|
|
|
subs r2, r2, 0x1
|
|
|
|
beq _081DD164
|
|
|
|
_081DD118:
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD0F4
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
subs r8, r8, 0x4
|
|
|
|
bgt _081DD07C
|
|
|
|
b _081DD22C
|
|
|
|
_081DD134:
|
|
|
|
ldr r0, [sp, 0x18]
|
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD158
|
|
|
|
ldr r3, [sp, 0x14]
|
|
|
|
rsb lr, r2, 0
|
|
|
|
_081DD148:
|
|
|
|
adds r2, r0, r2
|
|
|
|
bgt _081DD1FC
|
|
|
|
sub lr, lr, r0
|
|
|
|
b _081DD148
|
|
|
|
_081DD158:
|
|
|
|
pop {r4,r12}
|
|
|
|
mov r2, 0
|
|
|
|
b _081DD174
|
|
|
|
_081DD164:
|
|
|
|
ldr r2, [sp, 0x10]
|
|
|
|
cmp r2, 0
|
|
|
|
ldrne r3, [sp, 0xC]
|
|
|
|
bne _081DD118
|
|
|
|
_081DD174:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r2, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r5, lsr 30
|
|
|
|
bic r5, r5, 0xC0000000
|
|
|
|
rsb r0, r0, 0x3
|
|
|
|
mov r0, r0, lsl 3
|
|
|
|
mov r6, r6, ror r0
|
|
|
|
mov r7, r7, ror r0
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
b _081DD234
|
|
|
|
_081DD19C:
|
|
|
|
push {r4,r12}
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r1, [r4, o_SoundChannel_frequency]
|
2016-11-02 04:03:16 +01:00
|
|
|
mul r4, r12, r1
|
|
|
|
ldrsb r0, [r3]
|
|
|
|
ldrsb r1, [r3, 0x1]!
|
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD1B4:
|
|
|
|
ldr r6, [r5]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD1BC:
|
|
|
|
mul lr, r9, r1
|
|
|
|
add lr, r0, lr, asr 23
|
|
|
|
mul r12, r10, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r6, r12, r6, ror 8
|
|
|
|
mul r12, r11, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r7, r12, r7, ror 8
|
|
|
|
add r9, r9, r4
|
|
|
|
movs lr, r9, lsr 23
|
|
|
|
beq _081DD208
|
|
|
|
bic r9, r9, 0x3F800000
|
|
|
|
subs r2, r2, lr
|
|
|
|
ble _081DD134
|
|
|
|
subs lr, lr, 0x1
|
|
|
|
addeq r0, r0, r1
|
|
|
|
_081DD1FC:
|
|
|
|
ldrsbne r0, [r3, lr]!
|
|
|
|
ldrsb r1, [r3, 0x1]!
|
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD208:
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD1BC
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
subs r8, r8, 0x4
|
|
|
|
bgt _081DD1B4
|
|
|
|
sub r3, r3, 0x1
|
|
|
|
pop {r4,r12}
|
|
|
|
_081DD228:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r9, [r4, o_SoundChannel_fw]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD22C:
|
2020-12-11 13:58:00 +01:00
|
|
|
str r2, [r4, o_SoundChannel_count]
|
|
|
|
str r3, [r4, o_SoundChannel_currentPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD234:
|
|
|
|
ldr r8, [sp]
|
|
|
|
add r0, pc, 0x1
|
|
|
|
bx r0
|
|
|
|
.thumb
|
|
|
|
_081DD240:
|
|
|
|
ldr r0, [sp, 0x4]
|
|
|
|
subs r0, 1
|
|
|
|
ble _081DD24A
|
|
|
|
adds r4, SoundChannel_size
|
|
|
|
b SoundMainRAM_ChanLoop
|
|
|
|
_081DD24A:
|
|
|
|
ldr r0, [sp, 0x18]
|
|
|
|
ldr r3, =ID_NUMBER
|
|
|
|
str r3, [r0]
|
|
|
|
add sp, 0x1C
|
|
|
|
pop {r0-r7}
|
|
|
|
mov r8, r0
|
|
|
|
mov r9, r1
|
|
|
|
mov r10, r2
|
|
|
|
mov r11, r3
|
|
|
|
pop {r3}
|
|
|
|
_081DD25E:
|
|
|
|
bx r3
|
|
|
|
.pool
|
|
|
|
thumb_func_end SoundMainRAM
|
|
|
|
|
2021-11-06 16:42:34 +01:00
|
|
|
@ Not present in GBA SDK 3.0
|
|
|
|
arm_func_start SoundMainRAM_Unk1
|
|
|
|
SoundMainRAM_Unk1:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r6, [r4, o_SoundChannel_wav]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_statusFlags]
|
|
|
|
tst r0, SOUND_CHANNEL_SF_SPECIAL
|
2016-11-02 04:03:16 +01:00
|
|
|
bne _081DD2B4
|
2020-12-11 13:58:00 +01:00
|
|
|
orr r0, r0, SOUND_CHANNEL_SF_SPECIAL
|
|
|
|
strb r0, [r4, o_SoundChannel_statusFlags]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
tst r0, TONEDATA_TYPE_REV
|
2016-11-02 04:03:16 +01:00
|
|
|
beq _081DD29C
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r1, [r6, o_WaveData_size]
|
2016-11-02 04:03:16 +01:00
|
|
|
add r1, r1, r6, lsl 1
|
|
|
|
add r1, r1, 0x20
|
|
|
|
sub r3, r1, r3
|
2020-12-11 13:58:00 +01:00
|
|
|
str r3, [r4, o_SoundChannel_currentPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD29C:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrh r0, [r6, o_WaveData_type]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD2B4
|
|
|
|
sub r3, r3, r6
|
|
|
|
sub r3, r3, 0x10
|
2020-12-11 13:58:00 +01:00
|
|
|
str r3, [r4, o_SoundChannel_currentPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD2B4:
|
|
|
|
push {r8,r12,lr}
|
|
|
|
mov r10, r10, lsl 16
|
|
|
|
mov r11, r11, lsl 16
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r1, [r4, o_SoundChannel_frequency]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
tst r0, TONEDATA_TYPE_FIX
|
2016-11-02 04:03:16 +01:00
|
|
|
movne r8, 0x800000
|
|
|
|
muleq r8, r12, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrh r0, [r6, o_WaveData_type]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD468
|
|
|
|
mov r0, 0xFF000000
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r4, o_SoundChannel_xpi]
|
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
tst r0, TONEDATA_TYPE_REV
|
2016-11-02 04:03:16 +01:00
|
|
|
bne _081DD3C0
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r1
|
|
|
|
add r3, r3, 0x1
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD308:
|
|
|
|
ldr r6, [r5]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD310:
|
|
|
|
mul lr, r9, r1
|
|
|
|
add lr, r0, lr, asr 23
|
|
|
|
mul r12, r10, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r6, r12, r6, ror 8
|
|
|
|
mul r12, r11, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r7, r12, r7, ror 8
|
|
|
|
add r9, r9, r8
|
|
|
|
movs lr, r9, lsr 23
|
|
|
|
beq _081DD370
|
|
|
|
bic r9, r9, 0x3F800000
|
|
|
|
subs r2, r2, lr
|
|
|
|
ble _081DD398
|
|
|
|
subs lr, lr, 0x1
|
|
|
|
bne _081DD358
|
|
|
|
add r0, r0, r1
|
|
|
|
b _081DD364
|
|
|
|
_081DD358:
|
|
|
|
add r3, r3, lr
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r1
|
|
|
|
_081DD364:
|
|
|
|
add r3, r3, 0x1
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD370:
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD310
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
ldr r6, [sp]
|
|
|
|
subs r6, r6, 0x4
|
|
|
|
str r6, [sp]
|
|
|
|
bgt _081DD308
|
|
|
|
sub r3, r3, 0x1
|
|
|
|
b _081DD4F0
|
|
|
|
_081DD398:
|
|
|
|
ldr r0, [sp, 0x1C]
|
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD4F4
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r4, o_SoundChannel_wav]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r3, o_WaveData_loopStart]
|
2016-11-02 04:03:16 +01:00
|
|
|
rsb lr, r2, 0
|
|
|
|
_081DD3B0:
|
|
|
|
adds r2, r2, r0
|
|
|
|
bgt _081DD358
|
|
|
|
sub lr, lr, r0
|
|
|
|
b _081DD3B0
|
|
|
|
_081DD3C0:
|
|
|
|
sub r3, r3, 0x1
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r1
|
|
|
|
sub r3, r3, 0x1
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD3D8:
|
|
|
|
ldr r6, [r5]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD3E0:
|
|
|
|
mul lr, r9, r1
|
|
|
|
add lr, r0, lr, asr 23
|
|
|
|
mul r12, r10, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r6, r12, r6, ror 8
|
|
|
|
mul r12, r11, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r7, r12, r7, ror 8
|
|
|
|
add r9, r9, r8
|
|
|
|
movs lr, r9, lsr 23
|
|
|
|
beq _081DD440
|
|
|
|
bic r9, r9, 0x3F800000
|
|
|
|
subs r2, r2, lr
|
|
|
|
ble _081DD4F4
|
|
|
|
subs lr, lr, 0x1
|
|
|
|
bne _081DD428
|
|
|
|
add r0, r0, r1
|
|
|
|
b _081DD434
|
|
|
|
_081DD428:
|
|
|
|
sub r3, r3, lr
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r1
|
|
|
|
_081DD434:
|
|
|
|
sub r3, r3, 0x1
|
2021-11-06 16:42:34 +01:00
|
|
|
bl SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD440:
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD3E0
|
2020-12-11 13:58:00 +01:00
|
|
|
str r7, [r5, PCM_DMA_BUF_SIZE]
|
2016-11-02 04:03:16 +01:00
|
|
|
str r6, [r5], 0x4
|
|
|
|
ldr r6, [sp]
|
|
|
|
subs r6, r6, 0x4
|
|
|
|
str r6, [sp]
|
|
|
|
bgt _081DD3D8
|
|
|
|
add r3, r3, 0x2
|
|
|
|
b _081DD4F0
|
|
|
|
_081DD468:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
tst r0, TONEDATA_TYPE_REV
|
2016-11-02 04:03:16 +01:00
|
|
|
beq _081DD4F0
|
|
|
|
ldrsb r0, [r3, -0x1]!
|
|
|
|
ldrsb r1, [r3, -0x1]
|
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD480:
|
|
|
|
ldr r6, [r5]
|
|
|
|
ldr r7, [r5, 0x630]
|
|
|
|
_081DD488:
|
|
|
|
mul lr, r9, r1
|
|
|
|
add lr, r0, lr, asr 23
|
|
|
|
mul r12, r10, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r6, r12, r6, ror 8
|
|
|
|
mul r12, r11, lr
|
|
|
|
bic r12, r12, 0xFF0000
|
|
|
|
add r7, r12, r7, ror 8
|
|
|
|
add r9, r9, r8
|
|
|
|
movs lr, r9, lsr 23
|
|
|
|
beq _081DD4CC
|
|
|
|
bic r9, r9, 0x3F800000
|
|
|
|
subs r2, r2, lr
|
|
|
|
ble _081DD4F4
|
|
|
|
ldrsb r0, [r3, -lr]!
|
|
|
|
ldrsb r1, [r3, -0x1]
|
|
|
|
sub r1, r1, r0
|
|
|
|
_081DD4CC:
|
|
|
|
adds r5, r5, 0x40000000
|
|
|
|
bcc _081DD488
|
|
|
|
str r7, [r5, 0x630]
|
|
|
|
str r6, [r5], 0x4
|
|
|
|
ldr r6, [sp]
|
|
|
|
subs r6, r6, 0x4
|
|
|
|
str r6, [sp]
|
|
|
|
bgt _081DD480
|
|
|
|
add r3, r3, 0x1
|
|
|
|
_081DD4F0:
|
|
|
|
pop {r8,r12,pc}
|
|
|
|
_081DD4F4:
|
|
|
|
mov r2, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r2, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r0, r5, lsr 30
|
|
|
|
bic r5, r5, 0xC0000000
|
|
|
|
rsb r0, r0, 0x3
|
|
|
|
mov r0, r0, lsl 3
|
|
|
|
mov r6, r6, ror r0
|
|
|
|
mov r7, r7, ror r0
|
|
|
|
str r7, [r5, 0x630]
|
|
|
|
str r6, [r5], 0x4
|
|
|
|
pop {r8,r12,pc}
|
2021-11-06 16:42:34 +01:00
|
|
|
arm_func_end SoundMainRAM_Unk1
|
2016-11-02 04:03:16 +01:00
|
|
|
|
2021-11-06 16:42:34 +01:00
|
|
|
@ Not present in GBA SDK 3.0
|
|
|
|
arm_func_start SoundMainRAM_Unk2
|
|
|
|
SoundMainRAM_Unk2:
|
2016-11-02 04:03:16 +01:00
|
|
|
push {r0,r2,r5-r7,lr}
|
|
|
|
mov r0, r3, lsr 6
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r1, [r4, o_SoundChannel_xpi]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r1
|
|
|
|
beq _081DD594
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r4, o_SoundChannel_xpi]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r1, 0x21
|
|
|
|
mul r2, r1, r0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r1, [r4, o_SoundChannel_wav]
|
2016-11-02 04:03:16 +01:00
|
|
|
add r2, r2, r1
|
|
|
|
add r2, r2, 0x10
|
2022-05-17 19:51:54 +02:00
|
|
|
ldr r5, =sDecodingBuffer
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r6, =gDeltaEncodingTable
|
|
|
|
mov r7, 0x40
|
|
|
|
ldrb lr, [r2], 1
|
|
|
|
strb lr, [r5], 1
|
|
|
|
ldrb r1, [r2], 1
|
|
|
|
b _081DD57C
|
|
|
|
_081DD568:
|
|
|
|
ldrb r1, [r2], 1
|
|
|
|
mov r0, r1, lsr 4
|
|
|
|
ldrsb r0, [r6, r0]
|
|
|
|
add lr, lr, r0
|
|
|
|
strb lr, [r5], 1
|
|
|
|
_081DD57C:
|
|
|
|
and r0, r1, 0xF
|
|
|
|
ldrsb r0, [r6, r0]
|
|
|
|
add lr, lr, r0
|
|
|
|
strb lr, [r5], 1
|
|
|
|
subs r7, r7, 2
|
|
|
|
bgt _081DD568
|
|
|
|
_081DD594:
|
2022-05-17 19:51:54 +02:00
|
|
|
ldr r5, =sDecodingBuffer
|
2016-11-02 04:03:16 +01:00
|
|
|
and r0, r3, 0x3F
|
|
|
|
ldrsb r1, [r5, r0]
|
|
|
|
pop {r0,r2,r5-r7,pc}
|
|
|
|
.pool
|
2021-11-06 16:42:34 +01:00
|
|
|
arm_func_end SoundMainRAM_Unk2
|
2016-11-02 04:03:16 +01:00
|
|
|
|
|
|
|
thumb_func_start SoundMainBTM
|
|
|
|
SoundMainBTM:
|
|
|
|
mov r12, r4
|
|
|
|
movs r1, 0
|
|
|
|
movs r2, 0
|
|
|
|
movs r3, 0
|
|
|
|
movs r4, 0
|
|
|
|
stm r0!, {r1-r4}
|
|
|
|
stm r0!, {r1-r4}
|
|
|
|
stm r0!, {r1-r4}
|
|
|
|
stm r0!, {r1-r4}
|
|
|
|
mov r4, r12
|
|
|
|
bx lr
|
|
|
|
thumb_func_end SoundMainBTM
|
|
|
|
|
|
|
|
thumb_func_start RealClearChain
|
|
|
|
RealClearChain:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r0, o_SoundChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
beq _081DD5E2
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r1, [r0, o_SoundChannel_nextChannelPointer]
|
|
|
|
ldr r2, [r0, o_SoundChannel_prevChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, 0
|
|
|
|
beq _081DD5D6
|
2020-12-11 13:58:00 +01:00
|
|
|
str r1, [r2, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD5D8
|
|
|
|
_081DD5D6:
|
2020-12-11 13:58:00 +01:00
|
|
|
str r1, [r3, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD5D8:
|
|
|
|
cmp r1, 0
|
|
|
|
beq _081DD5DE
|
2020-12-11 13:58:00 +01:00
|
|
|
str r2, [r1, o_SoundChannel_prevChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD5DE:
|
|
|
|
movs r1, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
str r1, [r0, o_SoundChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD5E2:
|
|
|
|
bx lr
|
|
|
|
thumb_func_end RealClearChain
|
|
|
|
|
|
|
|
thumb_func_start ply_fine
|
|
|
|
ply_fine:
|
|
|
|
push {r4,r5,lr}
|
|
|
|
adds r5, r1, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r4, [r5, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
beq ply_fine_done
|
|
|
|
ply_fine_loop:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq ply_fine_ok
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r1, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r1, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
ply_fine_ok:
|
|
|
|
adds r0, r4, 0
|
|
|
|
bl RealClearChain
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r4, [r4, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne ply_fine_loop
|
|
|
|
ply_fine_done:
|
|
|
|
movs r0, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
pop {r4,r5}
|
|
|
|
pop {r0}
|
|
|
|
bx r0
|
|
|
|
thumb_func_end ply_fine
|
|
|
|
|
|
|
|
thumb_func_start MPlayJumpTableCopy
|
|
|
|
MPlayJumpTableCopy:
|
|
|
|
mov r12, lr
|
|
|
|
movs r1, 0x24
|
|
|
|
ldr r2, lt_MPlayJumpTableTemplate
|
|
|
|
MPlayJumpTableCopy_Loop:
|
|
|
|
ldr r3, [r2]
|
|
|
|
bl chk_adr_r2
|
|
|
|
stm r0!, {r3}
|
|
|
|
adds r2, 0x4
|
|
|
|
subs r1, 0x1
|
|
|
|
bgt MPlayJumpTableCopy_Loop
|
|
|
|
bx r12
|
|
|
|
thumb_func_end MPlayJumpTableCopy
|
|
|
|
|
|
|
|
.align 2, 0
|
|
|
|
.thumb_func
|
|
|
|
ldrb_r3_r2:
|
|
|
|
ldrb r3, [r2]
|
|
|
|
|
|
|
|
@ This attempts to protect against reading anything from the BIOS ROM
|
|
|
|
@ besides the jump table template.
|
|
|
|
@ It assumes that the jump table template is located at the end of the ROM.
|
|
|
|
.thumb_func
|
|
|
|
chk_adr_r2:
|
|
|
|
push {r0}
|
|
|
|
lsrs r0, r2, 25
|
|
|
|
bne chk_adr_r2_done @ if adr >= 0x2000000 (i.e. not in BIOS ROM), accept it
|
|
|
|
ldr r0, lt_MPlayJumpTableTemplate
|
|
|
|
cmp r2, r0
|
|
|
|
blo chk_adr_r2_reject @ if adr < gMPlayJumpTableTemplate, reject it
|
|
|
|
lsrs r0, r2, 14
|
|
|
|
beq chk_adr_r2_done @ if adr < 0x40000 (i.e. in BIOS ROM), accept it
|
|
|
|
chk_adr_r2_reject:
|
|
|
|
movs r3, 0
|
|
|
|
chk_adr_r2_done:
|
|
|
|
pop {r0}
|
|
|
|
bx lr
|
|
|
|
|
|
|
|
.align 2, 0
|
|
|
|
lt_MPlayJumpTableTemplate: .word gMPlayJumpTableTemplate
|
|
|
|
|
|
|
|
thumb_func_start ld_r3_tp_adr_i
|
|
|
|
ld_r3_tp_adr_i:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD64A:
|
|
|
|
adds r3, r2, 0x1
|
2020-12-11 13:58:00 +01:00
|
|
|
str r3, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
b chk_adr_r2
|
|
|
|
thumb_func_end ld_r3_tp_adr_i
|
|
|
|
|
|
|
|
thumb_func_start ply_goto
|
|
|
|
ply_goto:
|
|
|
|
push {lr}
|
|
|
|
ply_goto_1:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r0, [r2, 0x3]
|
|
|
|
lsls r0, 8
|
|
|
|
ldrb r3, [r2, 0x2]
|
|
|
|
orrs r0, r3
|
|
|
|
lsls r0, 8
|
|
|
|
ldrb r3, [r2, 0x1]
|
|
|
|
orrs r0, r3
|
|
|
|
lsls r0, 8
|
|
|
|
bl ldrb_r3_r2
|
|
|
|
orrs r0, r3
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
pop {r0}
|
|
|
|
bx r0
|
|
|
|
thumb_func_end ply_goto
|
|
|
|
|
|
|
|
thumb_func_start ply_patt
|
|
|
|
ply_patt:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r2, [r1, o_MusicPlayerTrack_patternLevel]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, 3
|
|
|
|
bhs ply_patt_done
|
|
|
|
lsls r2, 2
|
|
|
|
adds r3, r1, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r2, 0x4
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r3, o_MusicPlayerTrack_patternStack]
|
|
|
|
ldrb r2, [r1, o_MusicPlayerTrack_patternLevel]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r2, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r2, [r1, o_MusicPlayerTrack_patternLevel]
|
2016-11-02 04:03:16 +01:00
|
|
|
b ply_goto
|
|
|
|
ply_patt_done:
|
|
|
|
b ply_fine
|
|
|
|
thumb_func_end ply_patt
|
|
|
|
|
|
|
|
thumb_func_start ply_pend
|
|
|
|
ply_pend:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r2, [r1, o_MusicPlayerTrack_patternLevel]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, 0
|
|
|
|
beq ply_pend_done
|
|
|
|
subs r2, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r2, [r1, o_MusicPlayerTrack_patternLevel]
|
2016-11-02 04:03:16 +01:00
|
|
|
lsls r2, 2
|
|
|
|
adds r3, r1, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r3, o_MusicPlayerTrack_patternStack]
|
|
|
|
str r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ply_pend_done:
|
|
|
|
bx lr
|
|
|
|
thumb_func_end ply_pend
|
|
|
|
|
|
|
|
thumb_func_start ply_rept
|
|
|
|
ply_rept:
|
|
|
|
push {lr}
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
cmp r3, 0
|
|
|
|
bne ply_rept_1
|
|
|
|
adds r2, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
b ply_goto_1
|
|
|
|
ply_rept_1:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_repN]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r3, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_repN]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r12, r3
|
|
|
|
bl ld_r3_tp_adr_i
|
|
|
|
cmp r12, r3
|
|
|
|
bhs ply_rept_2
|
|
|
|
b ply_goto_1
|
|
|
|
ply_rept_2:
|
|
|
|
movs r3, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_repN]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r2, 5
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
pop {r0}
|
|
|
|
bx r0
|
|
|
|
thumb_func_end ply_rept
|
|
|
|
|
|
|
|
thumb_func_start ply_prio
|
|
|
|
ply_prio:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_priority]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_prio
|
|
|
|
|
|
|
|
thumb_func_start ply_tempo
|
|
|
|
ply_tempo:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
|
|
|
lsls r3, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strh r3, [r0, o_MusicPlayerInfo_tempoD]
|
|
|
|
ldrh r2, [r0, o_MusicPlayerInfo_tempoU]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r3, r2
|
|
|
|
lsrs r3, 8
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strh r3, [r0, o_MusicPlayerInfo_tempoI]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_tempo
|
|
|
|
|
|
|
|
thumb_func_start ply_keysh
|
|
|
|
ply_keysh:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_keyShift]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r2, 0xC
|
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_keysh
|
|
|
|
|
|
|
|
thumb_func_start ply_voice
|
|
|
|
ply_voice:
|
|
|
|
mov r12, lr
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
adds r2, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
lsls r2, r3, 1
|
|
|
|
adds r2, r3
|
|
|
|
lsls r2, 2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_MusicPlayerInfo_tone]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r2, r3
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r2, o_ToneData_type]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl chk_adr_r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r1, o_MusicPlayerTrack_ToneData_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r2, o_ToneData_wav]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl chk_adr_r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r1, o_MusicPlayerTrack_ToneData_wav]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r2, o_ToneData_attack]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl chk_adr_r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r1, o_MusicPlayerTrack_ToneData_attack]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_voice
|
|
|
|
|
|
|
|
thumb_func_start ply_vol
|
|
|
|
ply_vol:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_vol]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_VOLCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_vol
|
|
|
|
|
|
|
|
thumb_func_start ply_pan
|
|
|
|
ply_pan:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
2020-12-11 13:58:00 +01:00
|
|
|
subs r3, C_V
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_pan]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_VOLCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_pan
|
|
|
|
|
|
|
|
thumb_func_start ply_bend
|
|
|
|
ply_bend:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
2020-12-11 13:58:00 +01:00
|
|
|
subs r3, C_V
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_bend]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_bend
|
|
|
|
|
|
|
|
thumb_func_start ply_bendr
|
|
|
|
ply_bendr:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_bendRange]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_bendr
|
|
|
|
|
|
|
|
thumb_func_start ply_lfodl
|
|
|
|
ply_lfodl:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_lfoDelay]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_lfodl
|
|
|
|
|
|
|
|
thumb_func_start ply_modt
|
|
|
|
ply_modt:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r1, o_MusicPlayerTrack_modT]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r3
|
|
|
|
beq _081DD7AA
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_modT]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_VOLCHG | MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD7AA:
|
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_modt
|
|
|
|
|
|
|
|
thumb_func_start ply_tune
|
|
|
|
ply_tune:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i
|
2020-12-11 13:58:00 +01:00
|
|
|
subs r3, C_V
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_tune]
|
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_tune
|
|
|
|
|
|
|
|
thumb_func_start ply_port
|
|
|
|
ply_port:
|
|
|
|
mov r12, lr
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
adds r2, 1
|
|
|
|
ldr r0, =REG_SOUND1CNT_L @ sound register base address
|
|
|
|
adds r0, r3
|
|
|
|
bl _081DD64A
|
|
|
|
strb r3, [r0]
|
|
|
|
bx r12
|
|
|
|
.pool
|
|
|
|
thumb_func_end ply_port
|
|
|
|
|
|
|
|
thumb_func_start m4aSoundVSync
|
|
|
|
m4aSoundVSync:
|
|
|
|
ldr r0, lt2_SOUND_INFO_PTR
|
|
|
|
ldr r0, [r0]
|
|
|
|
|
|
|
|
@ Exit the function if ident is not ID_NUMBER or ID_NUMBER+1.
|
|
|
|
ldr r2, lt2_ID_NUMBER
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r3, r2
|
|
|
|
cmp r3, 1
|
|
|
|
bhi m4aSoundVSync_Done
|
|
|
|
|
|
|
|
@ Decrement the PCM DMA counter. If it reaches 0, we need to do a DMA.
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r0, o_SoundInfo_pcmDmaCounter]
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r1, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r1, [r0, o_SoundInfo_pcmDmaCounter]
|
2016-11-02 04:03:16 +01:00
|
|
|
bgt m4aSoundVSync_Done
|
|
|
|
|
|
|
|
@ Reload the PCM DMA counter.
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r0, o_SoundInfo_pcmDmaPeriod]
|
|
|
|
strb r1, [r0, o_SoundInfo_pcmDmaCounter]
|
2016-11-02 04:03:16 +01:00
|
|
|
|
|
|
|
ldr r2, =REG_DMA1
|
|
|
|
|
|
|
|
ldr r1, [r2, 0x8] @ DMA1CNT
|
|
|
|
lsls r1, 7
|
|
|
|
bcc m4aSoundVSync_SkipDMA1 @ branch if repeat bit isn't set
|
|
|
|
|
|
|
|
ldr r1, =((DMA_ENABLE | DMA_START_NOW | DMA_32BIT | DMA_SRC_INC | DMA_DEST_FIXED) << 16) | 4
|
|
|
|
str r1, [r2, 0x8] @ DMA1CNT
|
|
|
|
|
|
|
|
m4aSoundVSync_SkipDMA1:
|
|
|
|
ldr r1, [r2, 0xC + 0x8] @ DMA2CNT
|
|
|
|
lsls r1, 7
|
|
|
|
bcc m4aSoundVSync_SkipDMA2 @ branch if repeat bit isn't set
|
|
|
|
|
|
|
|
ldr r1, =((DMA_ENABLE | DMA_START_NOW | DMA_32BIT | DMA_SRC_INC | DMA_DEST_FIXED) << 16) | 4
|
|
|
|
str r1, [r2, 0xC + 0x8] @ DMA2CNT
|
|
|
|
|
|
|
|
m4aSoundVSync_SkipDMA2:
|
|
|
|
|
|
|
|
@ turn off DMA1/DMA2
|
|
|
|
movs r1, DMA_32BIT >> 8
|
|
|
|
lsls r1, 8
|
|
|
|
strh r1, [r2, 0xA] @ DMA1CNT_H
|
|
|
|
strh r1, [r2, 0xC + 0xA] @ DMA2CNT_H
|
|
|
|
|
|
|
|
@ turn on DMA1/DMA2 direct-sound FIFO mode
|
|
|
|
movs r1, (DMA_ENABLE | DMA_START_SPECIAL | DMA_32BIT | DMA_REPEAT) >> 8
|
|
|
|
lsls r1, 8 @ LSB is 0, so DMA_SRC_INC is used (destination is always fixed in FIFO mode)
|
|
|
|
strh r1, [r2, 0xA] @ DMA1CNT_H
|
|
|
|
strh r1, [r2, 0xC + 0xA] @ DMA2CNT_H
|
|
|
|
|
|
|
|
m4aSoundVSync_Done:
|
|
|
|
bx lr
|
|
|
|
|
|
|
|
.pool
|
|
|
|
thumb_func_end m4aSoundVSync
|
|
|
|
|
|
|
|
thumb_func_start MPlayMain
|
|
|
|
MPlayMain:
|
|
|
|
ldr r2, lt2_ID_NUMBER
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_MusicPlayerInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, r3
|
|
|
|
beq _081DD82E
|
|
|
|
bx lr
|
|
|
|
_081DD82E:
|
|
|
|
adds r3, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r0, o_MusicPlayerInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
push {r0,lr}
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_MusicPlayerInfo_func]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
beq _081DD840
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r0, o_MusicPlayerInfo_intp]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl call_r3
|
|
|
|
_081DD840:
|
|
|
|
pop {r0}
|
|
|
|
push {r4-r7}
|
|
|
|
mov r4, r8
|
|
|
|
mov r5, r9
|
|
|
|
mov r6, r10
|
|
|
|
mov r7, r11
|
|
|
|
push {r4-r7}
|
|
|
|
adds r7, r0, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r7, o_MusicPlayerInfo_status]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
bge _081DD858
|
|
|
|
b _081DDA6C
|
|
|
|
_081DD858:
|
|
|
|
ldr r0, lt2_SOUND_INFO_PTR
|
|
|
|
ldr r0, [r0]
|
|
|
|
mov r8, r0
|
|
|
|
adds r0, r7, 0
|
|
|
|
bl FadeOutBody
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r7, o_MusicPlayerInfo_status]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
bge _081DD86C
|
|
|
|
b _081DDA6C
|
|
|
|
_081DD86C:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrh r0, [r7, o_MusicPlayerInfo_tempoC]
|
|
|
|
ldrh r1, [r7, o_MusicPlayerInfo_tempoI]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1
|
|
|
|
b _081DD9BC
|
|
|
|
_081DD874:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r6, [r7, o_MusicPlayerInfo_trackCount]
|
|
|
|
ldr r5, [r7, o_MusicPlayerInfo_tracks]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r3, 0x1
|
|
|
|
movs r4, 0
|
|
|
|
_081DD87C:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_flags]
|
|
|
|
movs r1, MPT_FLG_EXIST
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r1, r0
|
|
|
|
bne _081DD886
|
|
|
|
b _081DD998
|
|
|
|
_081DD886:
|
|
|
|
mov r10, r3
|
|
|
|
orrs r4, r3
|
|
|
|
mov r11, r4
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r4, [r5, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
beq _081DD8BA
|
|
|
|
_081DD892:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq _081DD8AE
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_gateTime]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD8B4
|
|
|
|
subs r0, 0x1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_gateTime]
|
2016-11-02 04:03:16 +01:00
|
|
|
bne _081DD8B4
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r1, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r1, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD8B4
|
|
|
|
_081DD8AE:
|
|
|
|
adds r0, r4, 0
|
|
|
|
bl ClearChain
|
|
|
|
_081DD8B4:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r4, [r4, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne _081DD892
|
|
|
|
_081DD8BA:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r5, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MPT_FLG_START
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r3
|
|
|
|
beq _081DD938
|
|
|
|
adds r0, r5, 0
|
|
|
|
bl Clear64byte
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MPT_FLG_EXIST
|
|
|
|
strb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_bendRange]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x40
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_volX]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x16
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_lfoSpeed]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x1
|
|
|
|
adds r1, r5, 0x6
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r1, o_MusicPlayerTrack_ToneData_type - 0x6]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD938
|
|
|
|
_081DD8E0:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r5, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r1, [r2]
|
|
|
|
cmp r1, 0x80
|
|
|
|
bhs _081DD8EC
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_runningStatus]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD8F6
|
|
|
|
_081DD8EC:
|
|
|
|
adds r2, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r5, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0xBD
|
|
|
|
bcc _081DD8F6
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r1, [r5, o_MusicPlayerTrack_runningStatus]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD8F6:
|
|
|
|
cmp r1, 0xCF
|
|
|
|
bcc _081DD90C
|
|
|
|
mov r0, r8
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_plynote]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1, 0
|
|
|
|
subs r0, 0xCF
|
|
|
|
adds r1, r7, 0
|
|
|
|
adds r2, r5, 0
|
|
|
|
bl call_r3
|
|
|
|
b _081DD938
|
|
|
|
_081DD90C:
|
|
|
|
cmp r1, 0xB0
|
|
|
|
bls _081DD92E
|
|
|
|
adds r0, r1, 0
|
|
|
|
subs r0, 0xB1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r7, o_MusicPlayerInfo_cmd]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r3, r8
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r3, o_SoundInfo_MPlayJumpTable]
|
2016-11-02 04:03:16 +01:00
|
|
|
lsls r0, 2
|
|
|
|
ldr r3, [r3, r0]
|
|
|
|
adds r0, r7, 0
|
|
|
|
adds r1, r5, 0
|
|
|
|
bl call_r3
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD994
|
|
|
|
b _081DD938
|
|
|
|
_081DD92E:
|
|
|
|
ldr r0, lt_gClockTable
|
|
|
|
subs r1, 0x80
|
|
|
|
adds r1, r0
|
|
|
|
ldrb r0, [r1]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_wait]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD938:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_wait]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD8E0
|
|
|
|
subs r0, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_wait]
|
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_lfoSpeed]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0
|
|
|
|
beq _081DD994
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_mod]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD994
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_lfoDelayC]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq _081DD95A
|
|
|
|
subs r0, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_lfoDelayC]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD994
|
|
|
|
_081DD95A:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_lfoSpeedC]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_lfoSpeedC]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r0, 0
|
|
|
|
subs r0, 0x40
|
|
|
|
lsls r0, 24
|
|
|
|
bpl _081DD96E
|
|
|
|
lsls r2, r1, 24
|
|
|
|
asrs r2, 24
|
|
|
|
b _081DD972
|
|
|
|
_081DD96E:
|
|
|
|
movs r0, 0x80
|
|
|
|
subs r2, r0, r1
|
|
|
|
_081DD972:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_mod]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r0, r2
|
|
|
|
asrs r2, r0, 6
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_modM]
|
2016-11-02 04:03:16 +01:00
|
|
|
eors r0, r2
|
|
|
|
lsls r0, 24
|
|
|
|
beq _081DD994
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r2, [r5, o_MusicPlayerTrack_modM]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r0, [r5]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_modT]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0
|
|
|
|
bne _081DD98E
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r1, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DD990
|
|
|
|
_081DD98E:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r1, MPT_FLG_VOLCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD990:
|
|
|
|
orrs r0, r1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD994:
|
|
|
|
mov r3, r10
|
|
|
|
mov r4, r11
|
|
|
|
_081DD998:
|
|
|
|
subs r6, 0x1
|
|
|
|
ble _081DD9A4
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MusicPlayerTrack_size
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r5, r0
|
|
|
|
lsls r3, 1
|
|
|
|
b _081DD87C
|
|
|
|
_081DD9A4:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r7, o_MusicPlayerInfo_clock]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r7, o_MusicPlayerInfo_clock]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne _081DD9B6
|
|
|
|
movs r0, 0x80
|
|
|
|
lsls r0, 24
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r7, o_MusicPlayerInfo_status]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDA6C
|
|
|
|
_081DD9B6:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r4, [r7, o_MusicPlayerInfo_status]
|
|
|
|
ldrh r0, [r7, o_MusicPlayerInfo_tempoC]
|
2020-12-11 13:58:00 +01:00
|
|
|
subs r0, 150
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD9BC:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strh r0, [r7, o_MusicPlayerInfo_tempoC]
|
2020-12-11 13:58:00 +01:00
|
|
|
cmp r0, 150
|
2016-11-02 04:03:16 +01:00
|
|
|
bcc _081DD9C4
|
|
|
|
b _081DD874
|
|
|
|
_081DD9C4:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r2, [r7, o_MusicPlayerInfo_trackCount]
|
|
|
|
ldr r5, [r7, o_MusicPlayerInfo_tracks]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DD9C8:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r1, 0x80
|
|
|
|
tst r1, r0
|
|
|
|
beq _081DDA62
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r1, MPT_FLG_VOLCHG | MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r1, r0
|
|
|
|
beq _081DDA62
|
|
|
|
mov r9, r2
|
|
|
|
adds r0, r7, 0
|
|
|
|
adds r1, r5, 0
|
|
|
|
bl TrkVolPitSet
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r4, [r5, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
beq _081DDA58
|
|
|
|
_081DD9E6:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
bne _081DD9F6
|
|
|
|
adds r0, r4, 0
|
|
|
|
bl ClearChain
|
|
|
|
b _081DDA52
|
|
|
|
_081DD9F6:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r6, TONEDATA_TYPE_CGB
|
2016-11-02 04:03:16 +01:00
|
|
|
ands r6, r0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r5, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MPT_FLG_VOLCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r3
|
|
|
|
beq _081DDA14
|
|
|
|
bl ChnVolSetAsm
|
|
|
|
cmp r6, 0
|
|
|
|
beq _081DDA14
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_CgbChannel_modify]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r1, 0x1
|
|
|
|
orrs r0, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_CgbChannel_modify]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDA14:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r5, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r3
|
|
|
|
beq _081DDA52
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_key]
|
|
|
|
movs r0, o_MusicPlayerTrack_keyM
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrsb r0, [r5, r0]
|
|
|
|
adds r2, r1, r0
|
|
|
|
bpl _081DDA28
|
|
|
|
movs r2, 0
|
|
|
|
_081DDA28:
|
|
|
|
cmp r6, 0
|
|
|
|
beq _081DDA46
|
|
|
|
mov r0, r8
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r0, o_SoundInfo_MidiKeyToCgbFreq]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r2, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r2, [r5, o_MusicPlayerTrack_pitM]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r6, 0
|
|
|
|
bl call_r3
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_CgbChannel_frequency]
|
|
|
|
ldrb r0, [r4, o_CgbChannel_modify]
|
|
|
|
movs r1, CGB_CHANNEL_MO_PIT
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r0, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_CgbChannel_modify]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDA52
|
|
|
|
_081DDA46:
|
|
|
|
adds r1, r2, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r2, [r5, o_MusicPlayerTrack_pitM]
|
|
|
|
ldr r0, [r4, o_SoundChannel_wav]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl MidiKeyToFreq
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_SoundChannel_frequency]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDA52:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r4, [r4, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne _081DD9E6
|
|
|
|
_081DDA58:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r1, 0xF0
|
|
|
|
ands r0, r1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r2, r9
|
|
|
|
_081DDA62:
|
|
|
|
subs r2, 0x1
|
|
|
|
ble _081DDA6C
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MusicPlayerTrack_size
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r5, r0
|
|
|
|
bgt _081DD9C8
|
|
|
|
_081DDA6C:
|
|
|
|
ldr r0, lt2_ID_NUMBER
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r0, [r7, o_MusicPlayerInfo_ident]
|
2016-11-02 04:03:16 +01:00
|
|
|
pop {r0-r7}
|
|
|
|
mov r8, r0
|
|
|
|
mov r9, r1
|
|
|
|
mov r10, r2
|
|
|
|
mov r11, r3
|
|
|
|
pop {r3}
|
|
|
|
|
|
|
|
call_r3:
|
|
|
|
bx r3
|
|
|
|
|
|
|
|
.align 2, 0
|
|
|
|
lt_gClockTable: .word gClockTable
|
|
|
|
lt2_SOUND_INFO_PTR: .word SOUND_INFO_PTR
|
|
|
|
lt2_ID_NUMBER: .word ID_NUMBER
|
|
|
|
thumb_func_end MPlayMain
|
|
|
|
|
|
|
|
thumb_func_start TrackStop
|
|
|
|
TrackStop:
|
|
|
|
push {r4-r6,lr}
|
|
|
|
adds r5, r1, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_flags]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, MPT_FLG_EXIST
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq TrackStop_Done
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r4, [r5, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
beq TrackStop_3
|
|
|
|
movs r6, 0
|
|
|
|
TrackStop_Loop:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, 0
|
|
|
|
beq TrackStop_2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r0, [r4, o_SoundChannel_type]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r3, TONEDATA_TYPE_CGB
|
2016-11-02 04:03:16 +01:00
|
|
|
ands r0, r3
|
|
|
|
beq TrackStop_1
|
|
|
|
ldr r3, =SOUND_INFO_PTR
|
|
|
|
ldr r3, [r3]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r3, [r3, o_SoundInfo_CgbOscOff]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl call_r3
|
|
|
|
TrackStop_1:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r6, [r4, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
TrackStop_2:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r6, [r4, o_SoundChannel_track]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r4, [r4, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne TrackStop_Loop
|
|
|
|
TrackStop_3:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r4, [r5, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
TrackStop_Done:
|
|
|
|
pop {r4-r6}
|
|
|
|
pop {r0}
|
|
|
|
bx r0
|
|
|
|
.pool
|
|
|
|
thumb_func_end TrackStop
|
|
|
|
|
|
|
|
thumb_func_start ChnVolSetAsm
|
|
|
|
ChnVolSetAsm:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_velocity]
|
|
|
|
movs r0, o_SoundChannel_rhythmPan
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrsb r2, [r4, r0]
|
|
|
|
movs r3, 0x80
|
|
|
|
adds r3, r2
|
|
|
|
muls r3, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_volMR]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r0, r3
|
|
|
|
asrs r0, 14
|
|
|
|
cmp r0, 0xFF
|
|
|
|
bls _081DDAE8
|
|
|
|
movs r0, 0xFF
|
|
|
|
_081DDAE8:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_rightVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r3, 0x7F
|
|
|
|
subs r3, r2
|
|
|
|
muls r3, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_volML]
|
2016-11-02 04:03:16 +01:00
|
|
|
muls r0, r3
|
|
|
|
asrs r0, 14
|
|
|
|
cmp r0, 0xFF
|
|
|
|
bls _081DDAFC
|
|
|
|
movs r0, 0xFF
|
|
|
|
_081DDAFC:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_leftVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx lr
|
|
|
|
thumb_func_end ChnVolSetAsm
|
|
|
|
|
|
|
|
thumb_func_start ply_note
|
|
|
|
ply_note:
|
|
|
|
push {r4-r7,lr}
|
|
|
|
mov r4, r8
|
|
|
|
mov r5, r9
|
|
|
|
mov r6, r10
|
|
|
|
mov r7, r11
|
|
|
|
push {r4-r7}
|
|
|
|
sub sp, 0x18
|
|
|
|
str r1, [sp]
|
|
|
|
adds r5, r2, 0
|
|
|
|
ldr r1, =SOUND_INFO_PTR
|
|
|
|
ldr r1, [r1]
|
|
|
|
str r1, [sp, 0x4]
|
|
|
|
ldr r1, =gClockTable
|
|
|
|
adds r0, r1
|
|
|
|
ldrb r0, [r0]
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_gateTime]
|
|
|
|
ldr r3, [r5, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r0, [r3]
|
|
|
|
cmp r0, 0x80
|
|
|
|
bhs _081DDB46
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r3, 0x1
|
|
|
|
ldrb r0, [r3]
|
|
|
|
cmp r0, 0x80
|
|
|
|
bhs _081DDB44
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_velocity]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r3, 0x1
|
|
|
|
ldrb r0, [r3]
|
|
|
|
cmp r0, 0x80
|
|
|
|
bhs _081DDB44
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_gateTime]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r1, [r5, o_MusicPlayerTrack_gateTime]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r3, 0x1
|
|
|
|
_081DDB44:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r5, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDB46:
|
|
|
|
movs r0, 0
|
|
|
|
str r0, [sp, 0x14]
|
|
|
|
adds r4, r5, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
adds r4, o_MusicPlayerTrack_ToneData_type
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r2, [r4]
|
|
|
|
movs r0, TONEDATA_TYPE_RHY | TONEDATA_TYPE_SPL
|
|
|
|
tst r0, r2
|
|
|
|
beq _081DDB98
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r5, o_MusicPlayerTrack_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, TONEDATA_TYPE_SPL
|
|
|
|
tst r0, r2
|
|
|
|
beq _081DDB66
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r1, [r5, o_MusicPlayerTrack_ToneData_keySplitTable]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r3
|
|
|
|
ldrb r0, [r1]
|
|
|
|
b _081DDB68
|
|
|
|
_081DDB66:
|
|
|
|
adds r0, r3, 0
|
|
|
|
_081DDB68:
|
|
|
|
lsls r1, r0, 1
|
|
|
|
adds r1, r0
|
|
|
|
lsls r1, 2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r5, o_MusicPlayerTrack_ToneData_wav]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r0
|
|
|
|
mov r9, r1
|
|
|
|
mov r6, r9
|
|
|
|
ldrb r1, [r6]
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, TONEDATA_TYPE_SPL | TONEDATA_TYPE_RHY
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq _081DDB80
|
|
|
|
b _081DDCEA
|
|
|
|
_081DDB80:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, TONEDATA_TYPE_RHY
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r2
|
|
|
|
beq _081DDB9C
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r6, o_ToneData_pan_sweep]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x80
|
|
|
|
tst r0, r1
|
|
|
|
beq _081DDB94
|
2020-12-11 13:58:00 +01:00
|
|
|
subs r1, TONEDATA_P_S_PAN
|
2016-11-02 04:03:16 +01:00
|
|
|
lsls r1, 1
|
|
|
|
str r1, [sp, 0x14]
|
|
|
|
_081DDB94:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r3, [r6, o_SoundChannel_type]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDB9C
|
|
|
|
_081DDB98:
|
|
|
|
mov r9, r4
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r3, [r5, o_MusicPlayerTrack_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDB9C:
|
|
|
|
str r3, [sp, 0x8]
|
|
|
|
ldr r6, [sp]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r6, o_MusicPlayerInfo_priority]
|
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_priority]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r0, r1
|
|
|
|
cmp r0, 0xFF
|
|
|
|
bls _081DDBAC
|
|
|
|
movs r0, 0xFF
|
|
|
|
_081DDBAC:
|
|
|
|
str r0, [sp, 0x10]
|
|
|
|
mov r6, r9
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r6, o_ToneData_type]
|
|
|
|
movs r6, TONEDATA_TYPE_CGB
|
2016-11-02 04:03:16 +01:00
|
|
|
ands r6, r0
|
|
|
|
str r6, [sp, 0xC]
|
|
|
|
beq _081DDBEC
|
|
|
|
ldr r0, [sp, 0x4]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r4, [r0, o_SoundInfo_cgbChans]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r4, 0
|
|
|
|
bne _081DDBC4
|
|
|
|
b _081DDCEA
|
|
|
|
_081DDBC4:
|
|
|
|
subs r6, 0x1
|
|
|
|
lsls r0, r6, 6
|
|
|
|
adds r4, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_CgbChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq _081DDC40
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
bne _081DDC40
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_CgbChannel_priority]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x10]
|
|
|
|
cmp r1, r0
|
|
|
|
bcc _081DDC40
|
|
|
|
beq _081DDBE4
|
|
|
|
b _081DDCEA
|
|
|
|
_081DDBE4:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r0, [r4, o_CgbChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r5
|
|
|
|
bcs _081DDC40
|
|
|
|
b _081DDCEA
|
|
|
|
_081DDBEC:
|
|
|
|
ldr r6, [sp, 0x10]
|
|
|
|
adds r7, r5, 0
|
|
|
|
movs r2, 0
|
|
|
|
mov r8, r2
|
|
|
|
ldr r4, [sp, 0x4]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r3, [r4, o_SoundInfo_maxChans]
|
|
|
|
adds r4, o_SoundInfo_chans
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDBFA:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_statusFlags]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_ON
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq _081DDC40
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r0, r1
|
|
|
|
beq _081DDC14
|
|
|
|
cmp r2, 0
|
|
|
|
bne _081DDC18
|
|
|
|
adds r2, 0x1
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r6, [r4, o_SoundChannel_priority]
|
|
|
|
ldr r7, [r4, o_SoundChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDC32
|
|
|
|
_081DDC14:
|
|
|
|
cmp r2, 0
|
|
|
|
bne _081DDC34
|
|
|
|
_081DDC18:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r4, o_SoundChannel_priority]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r6
|
|
|
|
bcs _081DDC24
|
|
|
|
adds r6, r0, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r7, [r4, o_SoundChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDC32
|
|
|
|
_081DDC24:
|
|
|
|
bhi _081DDC34
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r0, [r4, o_SoundChannel_track]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r7
|
|
|
|
bls _081DDC30
|
|
|
|
adds r7, r0, 0
|
|
|
|
b _081DDC32
|
|
|
|
_081DDC30:
|
|
|
|
bcc _081DDC34
|
|
|
|
_081DDC32:
|
|
|
|
mov r8, r4
|
|
|
|
_081DDC34:
|
2020-12-11 13:58:00 +01:00
|
|
|
adds r4, SoundChannel_size
|
2016-11-02 04:03:16 +01:00
|
|
|
subs r3, 0x1
|
|
|
|
bgt _081DDBFA
|
|
|
|
mov r4, r8
|
|
|
|
cmp r4, 0
|
|
|
|
beq _081DDCEA
|
|
|
|
_081DDC40:
|
|
|
|
adds r0, r4, 0
|
|
|
|
bl ClearChain
|
|
|
|
movs r1, 0
|
2020-12-11 13:58:00 +01:00
|
|
|
str r1, [r4, o_SoundChannel_prevChannelPointer]
|
|
|
|
ldr r3, [r5, o_MusicPlayerTrack_chan]
|
|
|
|
str r3, [r4, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
beq _081DDC54
|
2020-12-11 13:58:00 +01:00
|
|
|
str r4, [r3, o_SoundChannel_prevChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDC54:
|
2020-12-11 13:58:00 +01:00
|
|
|
str r4, [r5, o_MusicPlayerTrack_chan]
|
|
|
|
str r5, [r4, o_SoundChannel_track]
|
|
|
|
ldrb r0, [r5, o_MusicPlayerTrack_lfoDelay]
|
|
|
|
strb r0, [r5, o_MusicPlayerTrack_lfoDelayC]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r1
|
|
|
|
beq _081DDC66
|
|
|
|
adds r1, r5, 0
|
|
|
|
bl clear_modM
|
|
|
|
_081DDC66:
|
|
|
|
ldr r0, [sp]
|
|
|
|
adds r1, r5, 0
|
|
|
|
bl TrkVolPitSet
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r0, [r5, o_MusicPlayerTrack_gateTime]
|
|
|
|
str r0, [r4, o_SoundChannel_gateTime]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x10]
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_priority]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x8]
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldr r0, [sp, 0x14]
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r4, o_SoundChannel_rhythmPan]
|
2016-11-02 04:03:16 +01:00
|
|
|
mov r6, r9
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r6, o_ToneData_type]
|
|
|
|
strb r0, [r4, o_SoundChannel_type]
|
|
|
|
ldr r7, [r6, o_ToneData_wav]
|
|
|
|
str r7, [r4, o_SoundChannel_wav]
|
|
|
|
ldr r0, [r6, o_ToneData_attack]
|
|
|
|
str r0, [r4, o_SoundChannel_attack]
|
|
|
|
ldrh r0, [r5, o_MusicPlayerTrack_pseudoEchoVolume]
|
|
|
|
strh r0, [r4, o_SoundChannel_pseudoEchoVolume]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl ChnVolSetAsm
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r1, [r4, o_SoundChannel_key]
|
|
|
|
movs r0, o_MusicPlayerTrack_keyM
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrsb r0, [r5, r0]
|
|
|
|
adds r3, r1, r0
|
|
|
|
bpl _081DDCA0
|
|
|
|
movs r3, 0
|
|
|
|
_081DDCA0:
|
|
|
|
ldr r6, [sp, 0xC]
|
|
|
|
cmp r6, 0
|
|
|
|
beq _081DDCCE
|
|
|
|
mov r6, r9
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r6, o_ToneData_length]
|
|
|
|
strb r0, [r4, o_CgbChannel_length]
|
|
|
|
ldrb r1, [r6, o_ToneData_pan_sweep]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0x80
|
|
|
|
tst r0, r1
|
|
|
|
bne _081DDCBA
|
|
|
|
movs r0, 0x70
|
|
|
|
tst r0, r1
|
|
|
|
bne _081DDCBC
|
|
|
|
_081DDCBA:
|
|
|
|
movs r1, 0x8
|
|
|
|
_081DDCBC:
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r1, [r4, o_CgbChannel_sweep]
|
|
|
|
ldrb r2, [r5, o_MusicPlayerTrack_pitM]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r3, 0
|
|
|
|
ldr r0, [sp, 0xC]
|
|
|
|
ldr r3, [sp, 0x4]
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r3, [r3, o_SoundInfo_MidiKeyToCgbFreq]
|
2016-11-02 04:03:16 +01:00
|
|
|
bl call_r3
|
|
|
|
b _081DDCDC
|
|
|
|
_081DDCCE:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r0, [r5, o_MusicPlayerTrack_unk_3C]
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_SoundChannel_count]
|
|
|
|
ldrb r2, [r5, o_MusicPlayerTrack_pitM]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r1, r3, 0
|
|
|
|
adds r0, r7, 0
|
|
|
|
bl MidiKeyToFreq
|
|
|
|
_081DDCDC:
|
2020-12-11 13:58:00 +01:00
|
|
|
str r0, [r4, o_SoundChannel_frequency]
|
|
|
|
movs r0, SOUND_CHANNEL_SF_START
|
|
|
|
strb r0, [r4, o_SoundChannel_statusFlags]
|
|
|
|
ldrb r1, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
movs r0, 0xF0
|
|
|
|
ands r0, r1
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r0, [r5, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDCEA:
|
|
|
|
add sp, 0x18
|
|
|
|
pop {r0-r7}
|
|
|
|
mov r8, r0
|
|
|
|
mov r9, r1
|
|
|
|
mov r10, r2
|
|
|
|
mov r11, r3
|
|
|
|
pop {r0}
|
|
|
|
bx r0
|
|
|
|
.pool
|
|
|
|
thumb_func_end ply_note
|
|
|
|
|
|
|
|
thumb_func_start ply_endtie
|
|
|
|
ply_endtie:
|
|
|
|
push {r4,r5}
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
cmp r3, 0x80
|
|
|
|
bhs _081DDD16
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r2, 0x1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDD18
|
|
|
|
_081DDD16:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_key]
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDD18:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r1, [r1, o_MusicPlayerTrack_chan]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0
|
|
|
|
beq _081DDD40
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r4, SOUND_CHANNEL_SF_START | SOUND_CHANNEL_SF_ENV
|
|
|
|
movs r5, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDD22:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r2, [r1, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
tst r2, r4
|
|
|
|
beq _081DDD3A
|
|
|
|
tst r2, r5
|
|
|
|
bne _081DDD3A
|
2020-12-11 13:58:00 +01:00
|
|
|
ldrb r0, [r1, o_SoundChannel_midiKey]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r0, r3
|
|
|
|
bne _081DDD3A
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r0, SOUND_CHANNEL_SF_STOP
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r2, r0
|
2020-12-11 13:58:00 +01:00
|
|
|
strb r2, [r1, o_SoundChannel_statusFlags]
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDD40
|
|
|
|
_081DDD3A:
|
2020-12-11 13:58:00 +01:00
|
|
|
ldr r1, [r1, o_SoundChannel_nextChannelPointer]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r1, 0
|
|
|
|
bne _081DDD22
|
|
|
|
_081DDD40:
|
|
|
|
pop {r4,r5}
|
|
|
|
bx lr
|
|
|
|
thumb_func_end ply_endtie
|
|
|
|
|
|
|
|
thumb_func_start clear_modM
|
|
|
|
clear_modM:
|
|
|
|
movs r2, 0
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r2, [r1, o_MusicPlayerTrack_modM]
|
|
|
|
strb r2, [r1, o_MusicPlayerTrack_lfoSpeedC]
|
|
|
|
ldrb r2, [r1, o_MusicPlayerTrack_modT]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r2, 0
|
|
|
|
bne _081DDD54
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_PITCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
b _081DDD56
|
|
|
|
_081DDD54:
|
2020-12-11 13:58:00 +01:00
|
|
|
movs r2, MPT_FLG_VOLCHG
|
2016-11-02 04:03:16 +01:00
|
|
|
_081DDD56:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldrb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
orrs r3, r2
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_flags]
|
2016-11-02 04:03:16 +01:00
|
|
|
bx lr
|
|
|
|
thumb_func_end clear_modM
|
|
|
|
|
|
|
|
thumb_func_start ld_r3_tp_adr_i
|
|
|
|
ld_r3_tp_adr_i_unchecked:
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
ldr r2, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
adds r3, r2, 1
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
str r3, [r1, o_MusicPlayerTrack_cmdPtr]
|
2016-11-02 04:03:16 +01:00
|
|
|
ldrb r3, [r2]
|
|
|
|
bx lr
|
|
|
|
thumb_func_end ld_r3_tp_adr_i
|
|
|
|
|
|
|
|
thumb_func_start ply_lfos
|
|
|
|
ply_lfos:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i_unchecked
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_lfoSpeed]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
bne _081DDD7C
|
|
|
|
bl clear_modM
|
|
|
|
_081DDD7C:
|
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_lfos
|
|
|
|
|
|
|
|
thumb_func_start ply_mod
|
|
|
|
ply_mod:
|
|
|
|
mov r12, lr
|
|
|
|
bl ld_r3_tp_adr_i_unchecked
|
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136,
#1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179,
#1180, #1181, #1182 and #1183.
2020-09-13 09:22:50 +02:00
|
|
|
strb r3, [r1, o_MusicPlayerTrack_mod]
|
2016-11-02 04:03:16 +01:00
|
|
|
cmp r3, 0
|
|
|
|
bne _081DDD90
|
|
|
|
bl clear_modM
|
|
|
|
_081DDD90:
|
|
|
|
bx r12
|
|
|
|
thumb_func_end ply_mod
|
|
|
|
|
|
|
|
.align 2, 0 @ Don't pad with nop.
|
2019-04-04 15:54:43 +02:00
|
|
|
|
2022-01-23 01:37:46 +01:00
|
|
|
.bss
|
2022-05-17 19:51:54 +02:00
|
|
|
sDecodingBuffer: @ Used as a buffer for audio decoded from compressed DPCM
|
2022-01-23 01:43:11 +01:00
|
|
|
.space 0x40
|
2022-05-17 19:51:54 +02:00
|
|
|
.size sDecodingBuffer, .-sDecodingBuffer
|