notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
psxbios: Make HLE bios start from block 1, not 2.
[pcsx_rearmed.git]
/
libpcsxcore
/
psxbios.c
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
98e467a
..
59471f1
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-307,6
+307,8
@@
static inline void DeliverEvent(u32 ev, u32 spec) {
} else Event[ev][spec].status = EvStALREADY;
}
} else Event[ev][spec].status = EvStALREADY;
}
+static unsigned interrupt_r26=0x8004E8B0;
+
static inline void SaveRegs() {
memcpy(regs, psxRegs.GPR.r, 32*4);
regs[32] = psxRegs.GPR.n.lo;
static inline void SaveRegs() {
memcpy(regs, psxRegs.GPR.r, 32*4);
regs[32] = psxRegs.GPR.n.lo;
@@
-1968,6
+1970,7
@@
void psxBios_ReturnFromException() { // 17
LoadRegs();
pc0 = psxRegs.CP0.n.EPC;
LoadRegs();
pc0 = psxRegs.CP0.n.EPC;
+ k0 = interrupt_r26;
if (psxRegs.CP0.n.Cause & 0x80000000) pc0 += 4;
psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) |
if (psxRegs.CP0.n.Cause & 0x80000000) pc0 += 4;
psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) |
@@
-2275,7
+2278,7
@@
void psxBios_firstfile() { // 42
if (pa0) {
strcpy(ffile, pa0);
pfile = ffile+5;
if (pa0) {
strcpy(ffile, pa0);
pfile = ffile+5;
- nfile =
1
;
+ nfile =
0
;
if (!strncmp(pa0, "bu00", 4)) {
// firstfile() calls _card_read() internally, so deliver it's event
DeliverEvent(0x11, 0x2);
if (!strncmp(pa0, "bu00", 4)) {
// firstfile() calls _card_read() internally, so deliver it's event
DeliverEvent(0x11, 0x2);
@@
-2595,7
+2598,7
@@
void psxBios__card_status() { // 5c
PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x5c], a0);
#endif
PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x5c], a0);
#endif
- v0 =
1
;
+ v0 =
card_active_chan
;
pc0 = ra;
}
pc0 = ra;
}
@@
-3190,6
+3193,7
@@
void psxBiosException() {
switch (psxRegs.CP0.n.Cause & 0x3c) {
case 0x00: // Interrupt
switch (psxRegs.CP0.n.Cause & 0x3c) {
case 0x00: // Interrupt
+ interrupt_r26=psxRegs.CP0.n.EPC;
#ifdef PSXCPU_LOG
// PSXCPU_LOG("interrupt\n");
#endif
#ifdef PSXCPU_LOG
// PSXCPU_LOG("interrupt\n");
#endif
@@
-3303,4
+3307,5
@@
void psxBiosFreeze(int Mode) {
bfreezes(FDesc);
bfreezel(&card_active_chan);
bfreezel(&pad_stopped);
bfreezes(FDesc);
bfreezel(&card_active_chan);
bfreezel(&pad_stopped);
+ bfreezel(&heap_size);
}
}