mirror of
https://github.com/holub/mame
synced 2025-06-23 12:58:37 +03:00
xbox.cpp: some cleaning (nw)
This commit is contained in:
parent
4023b5c631
commit
97a3a3dd65
@ -133,33 +133,9 @@ void xbox_state::hack_eeprom()
|
||||
m_maincpu->space(0).write_byte(0x375f0, m_maincpu->space(0).read_byte(0x375f0) & 0xfe); // internal hub not used
|
||||
}
|
||||
|
||||
/*static const struct {
|
||||
const char *game_name;
|
||||
struct {
|
||||
UINT32 address;
|
||||
UINT8 write_byte;
|
||||
} modify[16];
|
||||
} hacks[] = { { "chihiro",{ { 0x6a79f, 0x01 },{ 0x6a7a0, 0x00 },{ 0x6b575, 0x00 },{ 0x6b576, 0x00 },{ 0x6b5af, 0x75 },{ 0x6b78a, 0x75 },{ 0x6b7ca, 0x00 },{ 0x6b7b8, 0x00 },{ 0x8f5b2, 0x75 },{ 0x79a9e, 0x74 },{ 0x79b80, 0x74 },{ 0x79b97, 0x74 },{ 0, 0 } } },
|
||||
{ "outr2",{ { 0x12e4cf, 0x01 },{ 0x12e4d0, 0x00 },{ 0x4793e, 0x01 },{ 0x4793f, 0x00 },{ 0x47aa3, 0x01 },{ 0x47aa4, 0x00 },{ 0x14f2b6, 0x84 },{ 0x14f2d1, 0x75 },{ 0x8732f, 0x7d },{ 0x87384, 0x7d },{ 0x87388, 0xeb },{ 0, 0 } } } };*/
|
||||
|
||||
void xbox_state::hack_usb()
|
||||
{
|
||||
int p;
|
||||
|
||||
if (usbhack_counter == 0)
|
||||
p = 0;
|
||||
else if (usbhack_counter == 1) // after game loaded
|
||||
p = usbhack_index;
|
||||
else
|
||||
p = -1;
|
||||
if (p >= 0) {
|
||||
/*for (int a = 0; a < 16; a++) {
|
||||
if (hacks[p].modify[a].address == 0)
|
||||
break;
|
||||
m_maincpu->space(0).write_byte(hacks[p].modify[a].address, hacks[p].modify[a].write_byte);
|
||||
}*/
|
||||
}
|
||||
usbhack_counter++;
|
||||
// not needed
|
||||
}
|
||||
|
||||
void xbox_state::machine_start()
|
||||
@ -169,11 +145,6 @@ void xbox_state::machine_start()
|
||||
xbox_base_state::machine_start();
|
||||
xbox_devs.ide = machine().device<bus_master_ide_controller_device>("ide");
|
||||
usbhack_index = -1;
|
||||
/*for (int a = 1; a < 2; a++)
|
||||
if (strcmp(machine().basename(), hacks[a].game_name) == 0) {
|
||||
usbhack_index = a;
|
||||
break;
|
||||
}*/
|
||||
usbhack_counter = 0;
|
||||
usb_device = machine().device<ohci_game_controller_device>("ohci_gamepad");
|
||||
if (usb_device != nullptr) {
|
||||
|
@ -841,7 +841,7 @@ int xbox_base_state::smbus_cx25871(int command, int rw, int data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// let's try to fake the missing eeprom, make sure its ntsc
|
||||
// let's try to fake the missing eeprom, make sure its ntsc, otherwise chihiro will show an error
|
||||
static int dummyeeprom[256] = {
|
||||
0x39, 0xe3, 0xcc, 0x81, 0xb0, 0xa9, 0x97, 0x09, 0x57, 0xac, 0x57, 0x12, 0xf7, 0xc2, 0xc0, 0x21, 0xce, 0x0d, 0x0a, 0xdb, 0x20, 0x7a, 0xf3, 0xff,
|
||||
0xdf, 0x67, 0xed, 0xf4, 0xf8, 0x95, 0x5c, 0xd0, 0x9b, 0xef, 0x7b, 0x81, 0xda, 0xd5, 0x98, 0xc1, 0xb1, 0xb3, 0x74, 0x18, 0x86, 0x05, 0xe2, 0x7c,
|
||||
@ -1194,7 +1194,7 @@ MACHINE_CONFIG_START(xbox_base, xbox_base_state)
|
||||
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
|
||||
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE("maincpu", AS_PROGRAM)
|
||||
|
||||
// next line is temporary
|
||||
// usb controller
|
||||
MCFG_OHCI_USB_CONTROLLER_ADD("ohci_usb")
|
||||
MCFG_OHCI_USB_CONTROLLER_INTERRUPT_HANDLER(WRITELINE(xbox_base_state, xbox_ohci_usb_interrupt_changed))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user