Skip to content

Commit 8284caf

Browse files
committed
Ensure 64-byte alignment of DPCM segment in .asm
1 parent a9202e0 commit 8284caf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Source/ChunkRenderText.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ void CChunkRenderText::StoreSamples(const std::vector<const CDSample*> &Samples,
145145
str.Format("\n; DPCM samples (located at DPCM segment)\n");
146146

147147
if (Samples.size() > 0 && !m_bBankSwitched) {
148+
// align first sample for external programs using assembly export
149+
// this allows more flexible memory configurations to directly use the export
150+
str.Append("\n\t.align 64\n");
148151
str.Append("\n\t.segment \"DPCM\"\n");
149152
}
150153

@@ -162,10 +165,6 @@ void CChunkRenderText::StoreSamples(const std::vector<const CDSample*> &Samples,
162165
if (m_bBankSwitched)
163166
StoreDPCMBankSegment(bank, str);
164167

165-
// align first sample for external programs using assembly export
166-
// this allows more flexible memory configurations to directly use the export
167-
if (i == 0) str.Append("\n\t.align 64\n\n");
168-
169168
// adjust padding if necessary
170169
if ((Address & 0x3F) > 0) {
171170
str.Append("\n\t.align 64\n");

0 commit comments

Comments
 (0)