Removed SuperFX interleave support, Removed really old interleave code, Replaced 48Mb interleave asm monstrosity with much smaller C monster.

This commit is contained in:
n-a-c-h
2004-12-09 20:28:40 +00:00
parent 7f85fcc164
commit 8e9cdec36a
2 changed files with 44 additions and 249 deletions

View File

@@ -200,6 +200,46 @@ void CheckIntlEHi(unsigned char *ROM)
}
}
//These two functions interleave, yes interleave, because ZSNES has it's large ROM map backwards
void intlv1()
{
char blocks[256];
int i, numblocks = NumofBanks/2;
for (i = 0; i < numblocks; i++)
{
blocks[i + numblocks] = i * 2;
blocks[i] = i * 2 + 1;
}
swapBlocks(blocks);
}
//This is a mess, I wish we didn't need this, but it kicks the old asm code
void IntlEHi()
{
unsigned int temp, i,
*loc1 = romdata,
*loc2 = romdata + 0x100000;
for (i = 0; i < 0x80000; i++)
{
temp = loc1[i];
loc1[i] = loc2[i];
loc2[i] = temp;
}
loc1 = romdata + 0x80000;
loc2 = romdata + 0x100000;
for (i = 0; i < 0x80000; i++)
{
temp = loc1[i];
loc1[i] = loc2[i];
loc2[i] = temp;
}
NumofBanks = 64;
intlv1();
NumofBanks = 192;
}
//ROM loading functions, which some strangly enough were in guiload.inc
bool AllASCII(unsigned char *b, int size)
{