+
+ HW_GPU_STATUS |= SWAP32(PSXGPU_nBUSY);
+}
+
+static void SetBootRegs(u32 pc, u32 gp, u32 sp)
+{
+ //printf("%s %08x %08x %08x\n", __func__, pc, gp, sp);
+ psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL);
+
+ psxRegs.pc = pc;
+ psxRegs.GPR.n.gp = gp;
+ psxRegs.GPR.n.sp = sp ? sp : 0x801fff00;
+
+ psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, NULL);
+}
+
+void BiosBootBypass() {
+ assert(psxRegs.pc == 0x80030000);
+
+ // skip BIOS logos and region check
+ psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL);
+ psxRegs.pc = psxRegs.GPR.n.ra;
+}
+
+static void getFromCnf(char *buf, const char *key, u32 *val)
+{
+ buf = strstr(buf, key);
+ if (buf)
+ buf = strchr(buf, '=');
+ if (buf)
+ *val = strtol(buf + 1, NULL, 16);