- uint32 runAddress = GET32(jaguar_mainRom, 0x2A);
- uint32 progLength = GET32(jaguar_mainRom, 0x02);
- WriteLog("Setting up PD ROM... Run address: %08X, length: %08X\n", runAddress, progLength);
- memcpy(jaguar_mainRam + runAddress, jaguar_mainRom + 0x2E, progLength);
+ uint32 loadAddress = GET32(jaguar_mainRom, 0x22), runAddress = GET32(jaguar_mainRom, 0x2A);
+//This is not always right! Especially when converted via bin2jag1!!!
+//We should have access to the length of the furshlumiger file that was loaded anyway!
+//Now, we do! ;-)
+// uint32 progLength = GET32(jaguar_mainRom, 0x02);
+//jaguarRomSize
+//jaguarRunAddress
+// WriteLog("Jaguar: Setting up PD ROM... Run address: %08X, length: %08X\n", runAddress, progLength);
+// memcpy(jaguar_mainRam + loadAddress, jaguar_mainRom + 0x2E, progLength);
+ WriteLog("Jaguar: Setting up PD ROM... Run address: %08X, length: %08X\n", runAddress, jaguarRomSize - 0x2E);
+ memcpy(jaguar_mainRam + loadAddress, jaguar_mainRom + 0x2E, jaguarRomSize - 0x2E);