memory composition, part 5

almost there
This commit is contained in:
tildearrow 2024-03-06 03:42:21 -05:00
parent 6763aa44a9
commit 0be5835645
13 changed files with 108 additions and 1 deletions

View file

@ -491,6 +491,9 @@ void DivPlatformSegaPCM::renderSamples(int sysID) {
memset(sampleLoaded,0,256*sizeof(bool));
memset(sampleOffSegaPCM,0,256*sizeof(unsigned int));
memset(sampleEndSegaPCM,0,256);
memCompo=DivMemoryComposition();
memCompo.name="Sample ROM";
for (int i=0; i<parent->song.sampleLen; i++) {
DivSample* sample=parent->getSample(i);
@ -506,6 +509,7 @@ void DivPlatformSegaPCM::renderSamples(int sysID) {
sampleLoaded[i]=true;
if (memPos>=2097152) break;
sampleOffSegaPCM[i]=memPos;
memCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"Sample",i,memPos,memPos+alignedSize));
for (unsigned int j=0; j<alignedSize; j++) {
if (j>=sample->samples) {
sampleMem[memPos++]=0;
@ -519,6 +523,9 @@ void DivPlatformSegaPCM::renderSamples(int sysID) {
if (memPos>=2097152) break;
}
sampleMemLen=memPos;
memCompo.used=sampleMemLen;
memCompo.capacity=getSampleMemCapacity(0);
}
void DivPlatformSegaPCM::setFlags(const DivConfig& flags) {