diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp index 2ad2970dffd..91f0846bc27 100644 --- a/src/mame/drivers/chihiro.cpp +++ b/src/mame/drivers/chihiro.cpp @@ -381,10 +381,34 @@ Thanks to Alex, Mr Mudkips, and Philip Burke for this info. #include "includes/chihiro.h" #include "includes/xbox.h" #include "includes/xbox_usb.h" +#include "machine/jvshost.h" +#include "machine/jvs13551.h" #define LOG_PCI //#define LOG_BASEBOARD + +///////////////////////// +extern const device_type JVS_MASTER; + +class jvs_master : public jvs_host +{ +public: + //friend class mie_device; + + // construction/destruction + jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +}; + +const device_type JVS_MASTER = &device_creator; + +jvs_master::jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : jvs_host(mconfig, JVS_MASTER, "JVS MASTER", tag, owner, clock, "jvs_master", __FILE__) +{ +} + +///////////////////////// + extern const device_type OHCI_HLEAN2131QC; class ohci_hlean2131qc_device : public device_t, public ohci_function_device @@ -940,6 +964,7 @@ int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffe // use data of this packet // generate response // update buffer_out + p = p + len; } } @@ -1255,6 +1280,62 @@ static ADDRESS_MAP_START(chihiro_map_io, AS_IO, 32, chihiro_state) ADDRESS_MAP_END static INPUT_PORTS_START(chihiro) + PORT_START("TILT") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_TILT) + PORT_BIT(0x7f, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("P1") + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_START1) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_8WAY + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_8WAY + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_8WAY + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_8WAY + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_BUTTON3) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_BUTTON4) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_BUTTON5) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_BUTTON6) + PORT_BIT(0x400f, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("P2") + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_START2) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(2) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_PLAYER(2) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_PLAYER(2) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_PLAYER(2) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(2) + PORT_BIT(0x400f, IP_ACTIVE_HIGH, IPT_UNUSED) + + /* Dummy so we can easily get the analog ch # */ + PORT_START("A0") + PORT_BIT(0x00ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A1") + PORT_BIT(0x01ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A2") + PORT_BIT(0x02ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A3") + PORT_BIT(0x03ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A4") + PORT_BIT(0x04ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A5") + PORT_BIT(0x05ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A6") + PORT_BIT(0x06ff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("A7") + PORT_BIT(0x07ff, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END void chihiro_state::machine_start() @@ -1304,9 +1385,11 @@ static MACHINE_CONFIG_DERIVED_CLASS(chihiro_base, xbox_base, chihiro_state) MCFG_DEVICE_MODIFY("ide:1") MCFG_DEVICE_SLOT_INTERFACE(ide_baseboard, "bb", true) - // next line is temporary + // next lines are temporary MCFG_DEVICE_ADD("ohci_hlean2131qc", OHCI_HLEAN2131QC, 0) -MACHINE_CONFIG_END + MCFG_DEVICE_ADD("jvs_master", JVS_MASTER, 0) + MCFG_SEGA_837_13551_DEVICE_ADD("837_13551", "jvs_master", ":TILT", ":P1", ":P2", ":A0", ":A1", ":A2", ":A3", ":A4", ":A5", ":A6", ":A7", ":OUTPUT") + MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED(chihirogd, chihiro_base) MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", "^pic", nullptr, NOOP)