/[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 14 by dpavlin, Mon Oct 8 16:18:51 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2003-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2003-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: ps2_bios.c,v 1.1 2005/08/29 14:46:34 debug Exp $   *  $Id: ps2_bios.c,v 1.6 2007/06/14 16:13:30 debug Exp $
29   *   *
30   *  Playstation 2 SIFBIOS emulation.   *  Playstation 2 SIFBIOS emulation.
31   */   */
# Line 41  Line 41 
41  #include "cpu.h"  #include "cpu.h"
42  #include "cpu_mips.h"  #include "cpu_mips.h"
43  #include "machine.h"  #include "machine.h"
44  #include "misc.h"  #include "memory.h"
45    
46    
47  extern int quiet_mode;  extern int quiet_mode;
# 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;
                 cpu->dead = 1;  
67                  break;                  break;
68          case 2:                 /*  setdve(int mode)  */          case 2:                 /*  setdve(int mode)  */
69                  debug("[ SIFBIOS setdve(0x%llx) ]\n",                  debug("[ SIFBIOS setdve(0x%"PRIx64") ]\n",
70                      (long long)cpu->cd.mips.gpr[MIPS_GPR_A1]);                      (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A1]);
71                  break;                  break;
72          case 3:                 /*  putchar(int ch)  */          case 3:                 /*  putchar(int ch)  */
73                  /*  debug("[ SIFBIOS putchar(0x%x) ]\n",                  /*  debug("[ SIFBIOS putchar(0x%x) ]\n",
# Line 111  int playstation2_sifbios_emul(struct cpu Line 110  int playstation2_sifbios_emul(struct cpu
110                  cpu->cd.mips.gpr[MIPS_GPR_V0] = 1;              /*  TODO  */                  cpu->cd.mips.gpr[MIPS_GPR_V0] = 1;              /*  TODO  */
111                  break;                  break;
112          case 64:          case 64:
113                  fatal("[ SIFBIOS SBR_IOPH_INIT(0x%x,0x%x,0x%x): TODO ]\n",                  fatal("[ SIFBIOS SBR_IOPH_INIT(0x%"PRIx32",0x%"PRIx32",0x%"
114                      (int)cpu->cd.mips.gpr[MIPS_GPR_A1],                      PRIx32"): TODO ]\n",
115                      (int)cpu->cd.mips.gpr[MIPS_GPR_A2],                      (uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A1],
116                      (int)cpu->cd.mips.gpr[MIPS_GPR_A3]);                      (uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A2],
117                        (uint32_t) cpu->cd.mips.gpr[MIPS_GPR_A3]);
118    
119                  /*                  /*
120                   *  This is really really ugly:   TODO                   *  This is really really ugly:   TODO
# Line 165  int playstation2_sifbios_emul(struct cpu Line 165  int playstation2_sifbios_emul(struct cpu
165                  cpu->cd.mips.gpr[MIPS_GPR_V0] = 0;                  cpu->cd.mips.gpr[MIPS_GPR_V0] = 0;
166                  break;                  break;
167          case 65:          case 65:
168                  fatal("[ SIFBIOS alloc iop heap(0x%x) ]\n",                  fatal("[ SIFBIOS alloc iop heap(0x"PRIx32") ]\n",
169                      (int)cpu->cd.mips.gpr[MIPS_GPR_A1]);                      (uint32_t)cpu->cd.mips.gpr[MIPS_GPR_A1]);
170    
171                  /*                  /*
172                   *  Linux uses this to allocate "heap" for the OHCI USB                   *  Linux uses this to allocate "heap" for the OHCI USB
# Line 230  int playstation2_sifbios_emul(struct cpu Line 230  int playstation2_sifbios_emul(struct cpu
230                  fatal("Playstation 2 SIFBIOS emulation: "                  fatal("Playstation 2 SIFBIOS emulation: "
231                      "unimplemented call nr 0x%x\n", callnr);                      "unimplemented call nr 0x%x\n", callnr);
232                  cpu->running = 0;                  cpu->running = 0;
                 cpu->dead = 1;  
233          }          }
234    
235          return 1;          return 1;

Legend:
Removed from v.14  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26