/[gxemul]/trunk/src/promemul/ps2_bios.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/promemul/ps2_bios.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 25  Line 25 
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   */   */
# Line 61  int playstation2_sifbios_emul(struct cpu Line 61  int playstation2_sifbios_emul(struct cpu
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",
# Line 111  int playstation2_sifbios_emul(struct cpu Line 111  int playstation2_sifbios_emul(struct cpu
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
# Line 165  int playstation2_sifbios_emul(struct cpu Line 166  int playstation2_sifbios_emul(struct cpu
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

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26