mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-01 16:57:27 +00:00
SNES: Change base capacity to 0xf800 bytes instead of 0x10000
This is to reflect both source address calculations in the engine code, which assume an echo buffer to end at 0xf800
This commit is contained in:
parent
d8d12fa215
commit
ddb29874d7
1 changed files with 5 additions and 3 deletions
|
@ -841,7 +841,7 @@ void DivPlatformSNES::initEcho() {
|
|||
|
||||
for (DivMemoryEntry& i: memCompo.entries) {
|
||||
if (i.type==DIV_MEMORY_ECHO) {
|
||||
i.begin=(65536-echoDelay*2048);
|
||||
i.begin=(0xf800-echoDelay*2048);
|
||||
}
|
||||
}
|
||||
memCompo.used=sampleMemLen+echoDelay*2048;
|
||||
|
@ -946,7 +946,7 @@ const void* DivPlatformSNES::getSampleMem(int index) {
|
|||
}
|
||||
|
||||
size_t DivPlatformSNES::getSampleMemCapacity(int index) {
|
||||
return index == 0 ? (65536-echoDelay*2048) : 0;
|
||||
return index == 0 ? (0xf800-echoDelay*2048) : 0;
|
||||
}
|
||||
|
||||
size_t DivPlatformSNES::getSampleMemUsage(int index) {
|
||||
|
@ -1010,7 +1010,9 @@ void DivPlatformSNES::renderSamples(int sysID) {
|
|||
}
|
||||
sampleMemLen=memPos;
|
||||
|
||||
memCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_ECHO,"Echo Buffer",-1,(65536-echoDelay*2048),65536));
|
||||
// even if the delay is 0, the DSP will still operate the first buffer sample
|
||||
// so the ARAM buffer size becomes 4 bytes when the delay is 0
|
||||
memCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_ECHO,"Echo Buffer",-1,(0xf800-echoDelay*2048),echoDelay==0?0xf804:0xf800));
|
||||
|
||||
memCompo.capacity=65536;
|
||||
memCompo.used=sampleMemLen+echoDelay*2048;
|
||||
|
|
Loading…
Reference in a new issue