25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: machine_playstation2.c,v 1.3 2006/01/16 01:45:29 debug Exp $ |
* $Id: machine_playstation2.c,v 1.6 2006/06/30 20:22:54 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
42 |
#include "memory.h" |
#include "memory.h" |
43 |
#include "misc.h" |
#include "misc.h" |
44 |
|
|
45 |
|
#define PLAYSTATION2_BDA 0xffffffffa0001000ULL |
46 |
|
#define PLAYSTATION2_OPTARGS 0xffffffff81fff100ULL |
47 |
|
#define PLAYSTATION2_SIFBIOS 0xffffffffbfc10000ULL |
48 |
|
|
49 |
|
|
50 |
static int int_to_bcd(int i) |
static int int_to_bcd(int i) |
51 |
{ |
{ |
120 |
PLAYSTATION2_SIFBIOS); |
PLAYSTATION2_SIFBIOS); |
121 |
store_buf(cpu, PLAYSTATION2_BDA + 4, "PS2b", 4); |
store_buf(cpu, PLAYSTATION2_BDA + 4, "PS2b", 4); |
122 |
|
|
123 |
|
/* "Magic trap" instruction for software PROM emulation: */ |
124 |
|
store_32bit_word(cpu, PLAYSTATION2_SIFBIOS, 0x00c0de0c); |
125 |
|
|
126 |
store_32bit_word(cpu, 0xa0000000 + machine->physical_ram_in_mb |
store_32bit_word(cpu, 0xa0000000 + machine->physical_ram_in_mb |
127 |
* 1048576 - 0x1000 + 0x4, PLAYSTATION2_OPTARGS); |
* 1048576 - 0x1000 + 0x4, PLAYSTATION2_OPTARGS); |
128 |
if (tmp == NULL) { |
if (tmp == NULL) { |
180 |
|
|
181 |
MACHINE_REGISTER(playstation2) |
MACHINE_REGISTER(playstation2) |
182 |
{ |
{ |
183 |
MR_DEFAULT(playstation2, "Playstation 2", ARCH_MIPS, MACHINE_PS2, 2, 0); |
MR_DEFAULT(playstation2, "Playstation 2", ARCH_MIPS, MACHINE_PS2); |
184 |
me->aliases[0] = "playstation2"; |
|
185 |
me->aliases[1] = "ps2"; |
machine_entry_add_alias(me, "playstation2"); |
186 |
|
machine_entry_add_alias(me, "ps2"); |
187 |
|
|
188 |
me->set_default_ram = machine_default_ram_playstation2; |
me->set_default_ram = machine_default_ram_playstation2; |
|
machine_entry_add(me, ARCH_MIPS); |
|
189 |
} |
} |
190 |
|
|