mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
model2: hook powesled comms and inputs, add main unit hack dummy set, game kind of boots is run 3x MAME instances (powsledm powsled powsledr) connected via m2comm device (nw)
This commit is contained in:
parent
d64b1781d7
commit
8e5450ed88
@ -1141,9 +1141,9 @@ void model2_state::model2_base_mem(address_map &map)
|
||||
map(0x01800000, 0x01803fff).rw(FUNC(model2_state::palette_r), FUNC(model2_state::palette_w));
|
||||
map(0x01810000, 0x0181bfff).rw(FUNC(model2_state::colorxlat_r), FUNC(model2_state::colorxlat_w));
|
||||
map(0x0181c000, 0x0181c003).w(FUNC(model2_state::model2_3d_zclip_w));
|
||||
map(0x01a10000, 0x01a13fff).rw(m_m2comm, FUNC(m2comm_device::share_r), FUNC(m2comm_device::share_w));
|
||||
map(0x01a14000, 0x01a14000).rw(m_m2comm, FUNC(m2comm_device::cn_r), FUNC(m2comm_device::cn_w));
|
||||
map(0x01a14002, 0x01a14002).rw(m_m2comm, FUNC(m2comm_device::fg_r), FUNC(m2comm_device::fg_w));
|
||||
map(0x01a00000, 0x01a03fff).rw(m_m2comm, FUNC(m2comm_device::share_r), FUNC(m2comm_device::share_w)).mirror(0x10000); // Power Sled access comm.board at 0x01A0XXXX, not sure if really a mirror, or slightly different comm.device
|
||||
map(0x01a04000, 0x01a04000).rw(m_m2comm, FUNC(m2comm_device::cn_r), FUNC(m2comm_device::cn_w)).mirror(0x10000);
|
||||
map(0x01a04002, 0x01a04002).rw(m_m2comm, FUNC(m2comm_device::fg_r), FUNC(m2comm_device::fg_w)).mirror(0x10000);
|
||||
map(0x01d00000, 0x01d03fff).ram().share("backup1"); // Backup sram
|
||||
map(0x02000000, 0x03ffffff).rom().region("main_data", 0);
|
||||
|
||||
@ -2296,17 +2296,34 @@ static INPUT_PORTS_START( powsled )
|
||||
PORT_INCLUDE(model2)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Skip Error")
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE2)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Cancel Error") PORT_PLAYER(1)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("P1 Entry") PORT_PLAYER(1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("P1 Call") PORT_PLAYER(1)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("P2 Entry") PORT_PLAYER(2)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("P2 Call") PORT_PLAYER(2)
|
||||
PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("IN3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(3)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(3) PORT_NAME("Cancel Network Check")
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(3)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_PLAYER(3)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(3)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(3)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(3)
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(3)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Cancel Network Check") PORT_PLAYER(1)
|
||||
PORT_BIT(0xfd, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("P1_R")
|
||||
PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
||||
|
||||
PORT_START("P1_L")
|
||||
PORT_BIT(0xff, 0x00, IPT_PEDAL2) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
|
||||
|
||||
PORT_START("P2_R")
|
||||
PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
||||
|
||||
PORT_START("P2_L")
|
||||
PORT_BIT(0xff, 0x00, IPT_PEDAL2) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -2842,6 +2859,13 @@ void model2b_state::powsled(machine_config &config)
|
||||
|
||||
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
|
||||
io.in_pe_callback().set_ioport("IN3");
|
||||
io.an_port_callback<1>().set_ioport("P1_R");
|
||||
io.an_port_callback<3>().set_ioport("P1_L");
|
||||
io.an_port_callback<5>().set_ioport("P2_R");
|
||||
io.an_port_callback<7>().set_ioport("P2_L");
|
||||
// 0 and 2 is Motion AD
|
||||
|
||||
subdevice<m2comm_device>("m2comm")->set_frameoffset(0x180);
|
||||
}
|
||||
|
||||
|
||||
@ -6776,6 +6800,33 @@ ROM_START( powsledr ) /* Power Sled Relay Revision A, Model 2B, ROM board ID# 83
|
||||
ROM_LOAD16_WORD_SWAP("fpr-19461.34", 0x400000, 0x400000, CRC(7b91d65b) SHA1(3768f134fc9e54966e683cc4b9616d704cb9c49d) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( powsledm ) // Main unit is not dumped, temporary we use relay dump plus patches in driver init
|
||||
ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program
|
||||
ROM_LOAD32_WORD("epr-19472a.15", 0x000000, 0x080000, CRC(7a947eb7) SHA1(01a9fcd5055235367e4699da0037ae701c524074) )
|
||||
ROM_LOAD32_WORD("epr-19473a.16", 0x000002, 0x080000, CRC(165d77ae) SHA1(129cd1b8b5d2a2f4e59300166c739ef48699d444) )
|
||||
|
||||
ROM_REGION32_LE( 0x2000000, "main_data", 0 ) // Data
|
||||
ROM_LOAD32_WORD("fpr-19468.11", 0x0000000, 0x400000, CRC(56fae4e2) SHA1(795db62467eb1cb5b375e05bf168573baacfd657) )
|
||||
ROM_LOAD32_WORD("fpr-19469.12", 0x0000002, 0x400000, CRC(5579c922) SHA1(d2bd10adf959e4e648f2f51a1a0463e077fa9c60) )
|
||||
|
||||
ROM_REGION( 0x1000000, "polygons", 0 ) // Models
|
||||
ROM_LOAD32_WORD("fpr-19455.17", 0x000000, 0x400000, CRC(165ee345) SHA1(2cfd3da4f90fcae8a6d2802976ed0ea5abc7df2f) )
|
||||
ROM_LOAD32_WORD("fpr-19456.21", 0x000002, 0x400000, CRC(c3b2e2c5) SHA1(6dcd173726395fd0f115196470063bfb7c6891b8) )
|
||||
|
||||
ROM_REGION( 0x800000, "textures", 0 ) // Textures
|
||||
ROM_LOAD32_WORD("fpr-19458.27", 0x000000, 0x400000, CRC(f24acca2) SHA1(7fd7da64e247e62aa6542e1ad1a9ea9527ac9e73) )
|
||||
ROM_LOAD32_WORD("fpr-19457.25", 0x000002, 0x400000, CRC(79d7e6fa) SHA1(906986145c23fc87ea7205d7722302104665e2bb) )
|
||||
|
||||
ROM_REGION( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc)
|
||||
|
||||
ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
|
||||
ROM_LOAD16_WORD_SWAP("epr-19467.31", 0x000000, 0x020000, CRC(5e8b9763) SHA1(54c3671c74bb16c8b447e9cae9c49b6d05b27a3e) )
|
||||
|
||||
ROM_REGION16_BE( 0x800000, "samples", 0 ) // Samples
|
||||
ROM_LOAD16_WORD_SWAP("fpr-19460.32", 0x000000, 0x400000, CRC(456967cc) SHA1(b81ae04f6cffc2db41f946c10cb80edcdba5779a) )
|
||||
ROM_LOAD16_WORD_SWAP("fpr-19461.34", 0x400000, 0x400000, CRC(7b91d65b) SHA1(3768f134fc9e54966e683cc4b9616d704cb9c49d) )
|
||||
ROM_END
|
||||
|
||||
|
||||
void model2_state::init_pltkids()
|
||||
{
|
||||
@ -6798,6 +6849,14 @@ void model2_state::init_sgt24h()
|
||||
//ROM[0x5b3e8/4] = 0x08000004;
|
||||
}
|
||||
|
||||
void model2_state::init_powsledm ()
|
||||
{
|
||||
u8 *ROM = (u8 *)memregion("maincpu")->base();
|
||||
ROM[0x1571C] = 0x01; // Main mode
|
||||
ROM[0x1584C] = 0x89; // set node ID 0x200 = main
|
||||
ROM[0x1585D] = 0xFD; // inverted node ID
|
||||
}
|
||||
|
||||
READ32_MEMBER(model2_state::doa_prot_r)
|
||||
{
|
||||
// doa only reads 16-bits at a time, while STV reads 32-bits
|
||||
@ -6908,6 +6967,7 @@ GAME( 1996, doa, 0, model2b_0229, doa, model2b_state, init_do
|
||||
GAME( 1996, sgt24h, 0, indy500, sgt24h, model2b_state, init_sgt24h, ROT0, "Jaleco", "Super GT 24h", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, powsled, 0, powsled, powsled, model2b_state, empty_init, ROT0, "Sega", "Power Sled (Slave, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, powsledr, powsled, powsled, powsled, model2b_state, empty_init, ROT0, "Sega", "Power Sled (Relay, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, powsledm, powsled, powsled, powsled, model2b_state, init_powsledm, ROT0, "Sega", "Power Sled (Main, hack of Relay)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, dynabb, 0, dynabb, dynabb, model2b_state, empty_init, ROT0, "Sega", "Dynamite Baseball", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1997, dynabb97, 0, dynabb, dynabb, model2b_state, empty_init, ROT0, "Sega", "Dynamite Baseball 97 (Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1997, overrevb, overrev, indy500, overrev, model2b_state, empty_init, ROT0, "Jaleco", "Over Rev (Model 2B, Revision B)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
|
@ -90,6 +90,7 @@ public:
|
||||
void init_zerogun();
|
||||
void init_sgt24h();
|
||||
void init_srallyc();
|
||||
void init_powsledm();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
@ -212,6 +212,8 @@ m2comm_device::m2comm_device(const machine_config &mconfig, const char *tag, dev
|
||||
strcat(m_remotehost, mconfig.options().comm_remoteport());
|
||||
|
||||
m_framesync = mconfig.options().comm_framesync() ? 0x01 : 0x00;
|
||||
|
||||
m_frameoffset = 0x1c0; // default
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -301,13 +303,13 @@ WRITE8_MEMBER(m2comm_device::cn_w)
|
||||
// TODO - check EPR-16726 on Daytona USA and Sega Rally Championship
|
||||
// EPR-18643(A) - these are accessed by VirtuaON and Sega Touring Car Championship
|
||||
|
||||
// frameSize - 0x0e00
|
||||
// frameSize - 0x0e00. is it = frameoffset*8 ? if true - it should be 0xC00 for Power Sled
|
||||
m_shared[0x12] = 0x00;
|
||||
m_shared[0x13] = 0x0e;
|
||||
|
||||
// frameOffset - 0x01c0
|
||||
m_shared[0x14] = 0xc0;
|
||||
m_shared[0x15] = 0x01;
|
||||
// frameOffset - 0x01c0 in most games or 0x180 in Power Sled
|
||||
m_shared[0x14] = m_frameoffset & 0xff;
|
||||
m_shared[0x15] = m_frameoffset >> 8;
|
||||
|
||||
comm_tick();
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ public:
|
||||
// IRQ logic - 5 = VINT, 7 = DLC
|
||||
void check_vint_irq();
|
||||
|
||||
void set_frameoffset(uint16_t offset) { m_frameoffset = offset; };
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
@ -61,6 +63,7 @@ private:
|
||||
uint8_t m_buffer0[0x1000];
|
||||
uint8_t m_buffer1[0x1000];
|
||||
uint8_t m_framesync;
|
||||
uint16_t m_frameoffset;
|
||||
|
||||
#ifdef M2COMM_SIMULATION
|
||||
uint8_t m_linkenable;
|
||||
|
@ -21875,8 +21875,9 @@ overrevb // 1997.09 Over Rev (Revision B)
|
||||
overrevba // 1997.09 Over Rev (Revision A)
|
||||
pltkids // 1999.03 Pilot Kids (Revision A)
|
||||
pltkidsa // 1999.03 Pilot Kids
|
||||
powsled // 1996.?? Power Sled (Revision A)
|
||||
powsledr // 1996.?? Power Sled Relay (Revision A)
|
||||
powsled // 1996.?? Power Sled (Slave, Revision A)
|
||||
powsledr // 1996.?? Power Sled (Relay, Revision A)
|
||||
powsledm // 1996.?? Power Sled (Main, hack of Relay)
|
||||
rascot2 // 1997.?? Royal Ascot II
|
||||
rchase2 // 1995.06 Rail Chase 2 (Revision A)
|
||||
schamp // 1996.05 Sonic Championship (USA)
|
||||
|
Loading…
Reference in New Issue
Block a user