1079 |
|
// Extra routine for 68k emulator start |
1080 |
|
lp = (uint32 *)(ROM_BASE + 0x36f900); |
1081 |
|
*lp++ = htonl(0x7c2903a6); // mtctr r1 |
1082 |
+ |
#if EMULATED_PPC |
1083 |
+ |
*lp++ = POWERPC_NATIVE_OP(NATIVE_DISABLE_INTERRUPT); |
1084 |
+ |
#else |
1085 |
|
*lp++ = htonl(0x80200000 + XLM_IRQ_NEST); // lwz r1,XLM_IRQ_NEST |
1086 |
|
*lp++ = htonl(0x38210001); // addi r1,r1,1 |
1087 |
|
*lp++ = htonl(0x90200000 + XLM_IRQ_NEST); // stw r1,XLM_IRQ_NEST |
1088 |
+ |
#endif |
1089 |
|
*lp++ = htonl(0x80200000 + XLM_KERNEL_DATA);// lwz r1,XLM_KERNEL_DATA |
1090 |
|
*lp++ = htonl(0x90c10018); // stw r6,0x18(r1) |
1091 |
|
*lp++ = htonl(0x7cc902a6); // mfctr r6 |
1113 |
|
// Extra routine for Mixed Mode |
1114 |
|
lp = (uint32 *)(ROM_BASE + 0x36fa00); |
1115 |
|
*lp++ = htonl(0x7c2903a6); // mtctr r1 |
1116 |
+ |
#if EMULATED_PPC |
1117 |
+ |
*lp++ = POWERPC_NATIVE_OP(NATIVE_DISABLE_INTERRUPT); |
1118 |
+ |
#else |
1119 |
|
*lp++ = htonl(0x80200000 + XLM_IRQ_NEST); // lwz r1,XLM_IRQ_NEST |
1120 |
|
*lp++ = htonl(0x38210001); // addi r1,r1,1 |
1121 |
|
*lp++ = htonl(0x90200000 + XLM_IRQ_NEST); // stw r1,XLM_IRQ_NEST |
1122 |
+ |
#endif |
1123 |
|
*lp++ = htonl(0x80200000 + XLM_KERNEL_DATA);// lwz r1,XLM_KERNEL_DATA |
1124 |
|
*lp++ = htonl(0x90c10018); // stw r6,0x18(r1) |
1125 |
|
*lp++ = htonl(0x7cc902a6); // mfctr r6 |
1147 |
|
// Extra routine for Reset/FC1E opcode |
1148 |
|
lp = (uint32 *)(ROM_BASE + 0x36fb00); |
1149 |
|
*lp++ = htonl(0x7c2903a6); // mtctr r1 |
1150 |
+ |
#if EMULATED_PPC |
1151 |
+ |
*lp++ = POWERPC_NATIVE_OP(NATIVE_DISABLE_INTERRUPT); |
1152 |
+ |
#else |
1153 |
|
*lp++ = htonl(0x80200000 + XLM_IRQ_NEST); // lwz r1,XLM_IRQ_NEST |
1154 |
|
*lp++ = htonl(0x38210001); // addi r1,r1,1 |
1155 |
|
*lp++ = htonl(0x90200000 + XLM_IRQ_NEST); // stw r1,XLM_IRQ_NEST |
1156 |
+ |
#endif |
1157 |
|
*lp++ = htonl(0x80200000 + XLM_KERNEL_DATA);// lwz r1,XLM_KERNEL_DATA |
1158 |
|
*lp++ = htonl(0x90c10018); // stw r6,0x18(r1) |
1159 |
|
*lp++ = htonl(0x7cc902a6); // mfctr r6 |
1181 |
|
// Extra routine for FE0A opcode (QuickDraw 3D needs this) |
1182 |
|
lp = (uint32 *)(ROM_BASE + 0x36fc00); |
1183 |
|
*lp++ = htonl(0x7c2903a6); // mtctr r1 |
1184 |
+ |
#if EMULATED_PPC |
1185 |
+ |
*lp++ = POWERPC_NATIVE_OP(NATIVE_DISABLE_INTERRUPT); |
1186 |
+ |
#else |
1187 |
|
*lp++ = htonl(0x80200000 + XLM_IRQ_NEST); // lwz r1,XLM_IRQ_NEST |
1188 |
|
*lp++ = htonl(0x38210001); // addi r1,r1,1 |
1189 |
|
*lp++ = htonl(0x90200000 + XLM_IRQ_NEST); // stw r1,XLM_IRQ_NEST |
1190 |
+ |
#endif |
1191 |
|
*lp++ = htonl(0x80200000 + XLM_KERNEL_DATA);// lwz r1,XLM_KERNEL_DATA |
1192 |
|
*lp++ = htonl(0x90c10018); // stw r6,0x18(r1) |
1193 |
|
*lp++ = htonl(0x7cc902a6); // mfctr r6 |
1322 |
|
*lp = htonl(POWERPC_BCTR); |
1323 |
|
|
1324 |
|
lp = (uint32 *)(ROM_BASE + 0x318000); |
1325 |
+ |
#if EMULATED_PPC |
1326 |
+ |
*lp++ = POWERPC_NATIVE_OP(NATIVE_ENABLE_INTERRUPT); |
1327 |
+ |
*lp = htonl(0x48000000 + ((xlp - 0x8004) & 0x03fffffc)); // b ROM_BASE+0x312c2c |
1328 |
+ |
#else |
1329 |
|
*lp++ = htonl(0x81400000 + XLM_IRQ_NEST); // lwz r10,XLM_IRQ_NEST |
1330 |
|
*lp++ = htonl(0x394affff); // subi r10,r10,1 |
1331 |
|
*lp++ = htonl(0x91400000 + XLM_IRQ_NEST); // stw r10,XLM_IRQ_NEST |
1332 |
|
*lp = htonl(0x48000000 + ((xlp - 0x800c) & 0x03fffffc)); // b ROM_BASE+0x312c2c |
1333 |
+ |
#endif |
1334 |
+ |
|
1335 |
|
/* |
1336 |
|
// Disable FE0A/FE06 opcodes |
1337 |
|
lp = (uint32 *)(ROM_BASE + 0x3144ac); |
2173 |
|
M68kRegisters r; |
2174 |
|
uint8 pb[SIZEOF_IOParam]; |
2175 |
|
|
2154 |
– |
#if DISABLE_SCSI && 0 |
2155 |
– |
// Fake SCSIGlobals |
2156 |
– |
static const uint8 fake_scsi_globals[32] = {0,}; |
2157 |
– |
WriteMacInt32(0xc0c, (uint32)fake_scsi_globals); |
2158 |
– |
#endif |
2159 |
– |
|
2176 |
|
// Install floppy driver |
2177 |
|
if (ROMType == ROMTYPE_NEWWORLD) { |
2178 |
|
|
2187 |
|
WriteMacInt16(dce + dCtlFlags, SonyDriverFlags); |
2188 |
|
} |
2189 |
|
|
2190 |
+ |
#if DISABLE_SCSI && 0 |
2191 |
+ |
// Fake SCSIGlobals |
2192 |
+ |
static const uint8 fake_scsi_globals[32] = {0,}; |
2193 |
+ |
WriteMacInt32(0xc0c, (uint32)fake_scsi_globals); |
2194 |
+ |
#endif |
2195 |
+ |
|
2196 |
|
// Open .Sony driver |
2197 |
|
WriteMacInt8((uint32)pb + ioPermssn, 0); |
2198 |
|
WriteMacInt32((uint32)pb + ioNamePtr, (uint32)"\005.Sony"); |