25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: ps2_bios.c,v 1.2 2006/02/16 05:57:10 debug Exp $ |
* $Id: ps2_bios.c,v 1.3 2006/03/30 19:36:05 debug Exp $ |
29 |
* |
* |
30 |
* Playstation 2 SIFBIOS emulation. |
* Playstation 2 SIFBIOS emulation. |
31 |
*/ |
*/ |
61 |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 0x200; /* TODO */ |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 0x200; /* TODO */ |
62 |
break; |
break; |
63 |
case 1: /* halt(int mode) */ |
case 1: /* halt(int mode) */ |
64 |
debug("[ SIFBIOS halt(0x%llx) ]\n", |
debug("[ SIFBIOS halt(0x%"PRIx64") ]\n", |
65 |
(long long)cpu->cd.mips.gpr[MIPS_GPR_A1]); |
(uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A1]); |
66 |
cpu->running = 0; |
cpu->running = 0; |
67 |
cpu->dead = 1; |
cpu->dead = 1; |
68 |
break; |
break; |
69 |
case 2: /* setdve(int mode) */ |
case 2: /* setdve(int mode) */ |
70 |
debug("[ SIFBIOS setdve(0x%llx) ]\n", |
debug("[ SIFBIOS setdve(0x%"PRIx64") ]\n", |
71 |
(long long)cpu->cd.mips.gpr[MIPS_GPR_A1]); |
(uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A1]); |
72 |
break; |
break; |
73 |
case 3: /* putchar(int ch) */ |
case 3: /* putchar(int ch) */ |
74 |
/* debug("[ SIFBIOS putchar(0x%x) ]\n", |
/* debug("[ SIFBIOS putchar(0x%x) ]\n", |
111 |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 1; /* TODO */ |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 1; /* TODO */ |
112 |
break; |
break; |
113 |
case 64: |
case 64: |
114 |
fatal("[ SIFBIOS SBR_IOPH_INIT(0x%x,0x%x,0x%x): TODO ]\n", |
fatal("[ SIFBIOS SBR_IOPH_INIT(0x%"PRIx32",0x%"PRIx32",0x%" |
115 |
(int)cpu->cd.mips.gpr[MIPS_GPR_A1], |
PRIx32"): TODO ]\n", |
116 |
(int)cpu->cd.mips.gpr[MIPS_GPR_A2], |
(uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A1], |
117 |
(int)cpu->cd.mips.gpr[MIPS_GPR_A3]); |
(uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A2], |
118 |
|
(uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A3]); |
119 |
|
|
120 |
/* |
/* |
121 |
* This is really really ugly: TODO |
* This is really really ugly: TODO |
166 |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 0; |
cpu->cd.mips.gpr[MIPS_GPR_V0] = 0; |
167 |
break; |
break; |
168 |
case 65: |
case 65: |
169 |
fatal("[ SIFBIOS alloc iop heap(0x%x) ]\n", |
fatal("[ SIFBIOS alloc iop heap(0x"PRIx32") ]\n", |
170 |
(int)cpu->cd.mips.gpr[MIPS_GPR_A1]); |
(uint32_t)cpu->cd.mips.gpr[MIPS_GPR_A1]); |
171 |
|
|
172 |
/* |
/* |
173 |
* Linux uses this to allocate "heap" for the OHCI USB |
* Linux uses this to allocate "heap" for the OHCI USB |