Introduce ROM_SIZE Makefile option

This commit is contained in:
Ryan Dwyer
2022-10-12 23:06:19 +10:00
parent 46a88a3d59
commit eb51ea4550
7 changed files with 40 additions and 36 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ void texReset(void)
g_TextureConfigSegment = mempAlloc(len, MEMPOOL_STAGE);
dmaExec(g_TextureConfigSegment, (u32)&_textureconfigSegmentRomStart, len);
g_TexBase = (u32)g_TextureConfigSegment - 0x02000000;
g_TexBase = (u32)g_TextureConfigSegment - ROM_SIZE * 1024 * 1024;
g_TexGdl1 = (Gfx *)(g_TexBase + (u32)g_TcGdl1);
g_TexGdl2 = (Gfx *)(g_TexBase + (u32)g_TcGdl2);
g_TexGdl3 = (Gfx *)(g_TexBase + (u32)g_TcGdl3);
@@ -72,7 +72,7 @@ void texReset(void)
g_TexGeneralConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcGeneralConfigs);
g_TexRadarConfigs = (struct textureconfig *)(g_TexBase + (u32)g_TcRadarConfigs);
g_TexNumConfigs = (len - (u32)&g_TcWallhitConfigs + 0x02000000) / sizeof(struct textureconfig);
g_TexNumConfigs = (len - (u32)&g_TcWallhitConfigs + ROM_SIZE * 1024 * 1024) / sizeof(struct textureconfig);
g_TexWords = mempAlloc(ALIGN16(g_TexNumConfigs * 4), MEMPOOL_STAGE);
for (i = 0; i < g_TexNumConfigs; i++) {
+1 -1
View File
@@ -34,7 +34,7 @@ void dmaStart(void *memaddr, u32 romaddr, u32 len, bool priority)
s32 i;
#if VERSION < VERSION_NTSC_1_0
if (romaddr >= 1024 * 1024 * 32) {
if (romaddr >= ROM_SIZE * 1024 * 1024) {
crashSetMessage("DMA : Off the end of the rom");
CRASH();
}