Merge pull request #4549 from DavidHaywood/220119_2

new NOT WORKING (TV Game Work)
This commit is contained in:
R. Belmont 2019-01-24 10:07:08 -05:00 committed by GitHub
commit 60eddf4367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 761 additions and 218 deletions

View File

@ -3501,6 +3501,10 @@ files {
MAME_DIR .. "src/mame/machine/xavix_mtrk_wheel.h", MAME_DIR .. "src/mame/machine/xavix_mtrk_wheel.h",
MAME_DIR .. "src/mame/machine/xavix_madfb_ball.cpp", MAME_DIR .. "src/mame/machine/xavix_madfb_ball.cpp",
MAME_DIR .. "src/mame/machine/xavix_madfb_ball.h", MAME_DIR .. "src/mame/machine/xavix_madfb_ball.h",
MAME_DIR .. "src/mame/machine/xavix_io.cpp",
MAME_DIR .. "src/mame/machine/xavix_io.h",
MAME_DIR .. "src/mame/machine/xavix2002_io.cpp",
MAME_DIR .. "src/mame/machine/xavix2002_io.h",
} }
createMESSProjects(_target, _subtarget, "ultimachine") createMESSProjects(_target, _subtarget, "ultimachine")

View File

@ -448,8 +448,12 @@ asr_zpg
prefetch(); prefetch();
asr_aba asr_aba
fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); TMP = read_pc();
read_pc_noinc(); TMP = set_h(TMP, read_pc());
TMP2 = read(TMP);
write(TMP, TMP2);
TMP2 = do_asr(TMP2); // used by xavbox, see 14e8
write(TMP, TMP2);
prefetch(); prefetch();
asr_zpx asr_zpx

View File

@ -7,8 +7,8 @@
The dies for these are marked The dies for these are marked
SSD 2000 NEC 85605-621 SSD 2000 NEC 85605-621
and possibly
SSD 2002 NEC 85054-611 (although this might use even more opcodes and need it's own file) SSD 2002 NEC 85054-611
6502 with custom opcodes 6502 with custom opcodes
integrated gfx / sound integrated gfx / sound
@ -17,77 +17,12 @@
see xavix.cpp for basic notes see xavix.cpp for basic notes
the machines using the '2000' series chips seem to have more extra the 2000 chip has more opcodes than the 97/98 chips in xavix.cpp, and
opcodes, so presumably these were only available in those models. is a similar die structure to the 2002 chip, but doesn't seem to have any
of note, push x / push y and pull x / pull y additional capabilities.
Dirt Rebel MX, which is confirmed as 2000 type however seems to require the 2002 chip seems to be the one that was officially dubbed 'SuperXaviX'
some of the documented but 'undocumented' opcodes on the 6502 to have additonal and has additional video capabilities on top of the extended opcodes.
meaning for one specific function on startup
this just seems to be some very buggy checksum code where the games don't even care about the result...
(actually it looks like some games might be using it as a PRNG seed?)
a is 80 when entering here?
01BC37: A0 3F ldy #$3f
01BC39: B2 clr a // clear acculuator
01BC3A: 1B spa0 a // store 'accumulator' into byte 0 of PA 'address' register
01BC3B: 9B spa2 a // store 'accumulator' into byte 2 of PA 'address' register
-- loop point 2
01BC3C: 98 tya // y -> a (3f on first run of loop)
01BC3D: 5B spa1 a // store 'accumulator' into byte 1 of PA 'address' register (003f00 on first loop?)
-- loop point 1
01BC3E: A3 ldal0 a // read byte 0 of 32-bit 'long' register into accumulator
01BC3F: 73 adcpa // adc ($Address PA)
01BC40: 83 stal0 a // store accumulator back in byte 0 of 32-bit 'long' register (even byte checksum?)
01BC41: FB incpa // increase 'address' register PA
01BC42: A7 ldal1 a // read byte 1 of 32-bit 'long' register into accumulator
01BC43: 73 adcpa // adc ($Address PA)
01BC44: 87 stal1 a // store accumulator back in byte 0 of 32-bit 'long' register (odd byte checksum?)
01BC45: FB incpa // increase 'address' register PA
01BC46: D0 F6 bne $1bc3e // (branch based on PA increase, so PA must set flags?, probably overflows after 0xffff if upper byte is 'bank'? or at 0xff if this really is a mirror of the function below
01BC48: 88 dey // decrease y, which contained 3f at the start
01BC49: 10 F1 bpl $1bc3c // branch back to loop point 2 to reload counter
// contains the odd byte checksum once we drop out the loop
01BC4B: 8D FB 00 sta $00fb // store it in zero page memory
01BC4E: A3 ldal0 a // get the even byte checksum from byte 0 of 32-bit 'long' register
01BC4F: 8D FA 00 sta $00fa // store it in zero page memory
01BC52: 07 oral1 a // why do we want to do this? (routine below does it too)
01BC53: D0 03 bne $1bc58
01BC55: CE FA 00 dec $00fa
01BC58: 80 retf
this is presumably meant to be similar to the function found in Namco
Nostalgia 2
// A is 80 on entry
09FFD8: A9 3F lda #$3f
09FFDA: 85 01 sta $01 // set upper bit of pointer at 0x0000 to 3f (it completely fails to initialize the ram at 00, we currently init it to ff, but should probably be 0?)
09FFDC: A0 00 ldy #$00 // clear inner loop counter
-- loop point 1 and 2
09FFDE: AD FA 00 lda $00fa // read current even byte checksum value from zero page ram fa (game also completely fails to initialize this)
09FFE1: 71 00 adc ($00), y // so 3f00 + y first outer loop, 3e00 + y second outer loop with y increasing in inner loop (add byte read to even checksum byte?)
09FFE3: 8D FA 00 sta $00fa // store even checksum at 0xfa in zero page ram
09FFE6: C8 iny // increase counter y
09FFE7: AD FB 00 lda $00fb // read current odd byte checksum value from zero page ram fb (likewise never initialized!)
09FFEA: 71 00 adc ($00), y // 3f00 + y (add byte read to odd checksum byte)
09FFEC: 8D FB 00 sta $00fb // store odd checksum byte at 0xfb in zero page ram
09FFEF: C8 iny // increase y
09FFF0: D0 EC bne $9ffde // branch back if y hasn't overflowed (so work on 0x100 bytes, looping back 0x7f times)
09FFF2: C6 01 dec $01 // decrease accumulator (started at 3f) (inner loop counter already 0 because it overflowed)
09FFF4: 10 E8 bpl $9ffde // branch back
// checksums are already in place after loop so no need to copy them like in above
09FFF6: 0D FA 00 ora $00fa // same weird 'or' call
--
09FFF9: D0 03 bne $9fffe
09FFFB: CE FA 00 dec $00fa
09FFFE: 80 retf
***************************************************************************/ ***************************************************************************/
@ -96,10 +31,13 @@
#include "xavix2000.h" #include "xavix2000.h"
#include "xavix2000d.h" #include "xavix2000d.h"
DEFINE_DEVICE_TYPE(XAVIX2000, xavix2000_device, "xavix2000", "XaviX (SSD 2000 / 2002)") DEFINE_DEVICE_TYPE(XAVIX2000, xavix2000_device, "xavix2000", "XaviX (SSD 2000)")
DEFINE_DEVICE_TYPE(XAVIX2002, xavix2002_device, "xavix2002", "XaviX (SSD 2002) (SuperXaviX)")
xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
xavix_device(mconfig, XAVIX2000, tag, owner, clock)
xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
xavix_device(mconfig, type, tag, owner, clock)
{ {
program_config.m_addr_width = 24; program_config.m_addr_width = 24;
program_config.m_logaddr_width = 24; program_config.m_logaddr_width = 24;
@ -107,6 +45,17 @@ xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *ta
sprogram_config.m_logaddr_width = 24; sprogram_config.m_logaddr_width = 24;
} }
xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
xavix2000_device(mconfig, XAVIX2000, tag, owner, clock)
{
}
xavix2002_device::xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
xavix2000_device(mconfig, XAVIX2002, tag, owner, clock)
{
}
void xavix2000_device::device_start() void xavix2000_device::device_start()
{ {
xavix_device::device_start(); xavix_device::device_start();

View File

@ -15,6 +15,7 @@
class xavix2000_device : public xavix_device { class xavix2000_device : public xavix_device {
public: public:
xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
virtual void do_exec_full() override; virtual void do_exec_full() override;
@ -160,6 +161,13 @@ enum {
SXAVIX_PB SXAVIX_PB
}; };
class xavix2002_device : public xavix2000_device {
public:
xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
DECLARE_DEVICE_TYPE(XAVIX2000, xavix2000_device) DECLARE_DEVICE_TYPE(XAVIX2000, xavix2000_device)
DECLARE_DEVICE_TYPE(XAVIX2002, xavix2002_device)
#endif // MAME_CPU_M6502_XAVIX2000_H #endif // MAME_CPU_M6502_XAVIX2000_H

View File

@ -201,12 +201,32 @@
Fitness Dance has an Atmel H93864C (maybe SEEPROM?) a Microchip DSPIC 33FJ12GP202 and two JRC 2740 dual op amps. Fitness Dance has an Atmel H93864C (maybe SEEPROM?) a Microchip DSPIC 33FJ12GP202 and two JRC 2740 dual op amps.
Music and Circuit has a 24CS64, two UTC324 quad op amps, a 74HC14, a 74HCT04, and an 8-pin SOIC labeled 61545, which is likely an M61545 dual electronic volume control. Music and Circuit has a 24CS64, two UTC324 quad op amps, a 74HC14, a 74HCT04, and an 8-pin SOIC labeled 61545, which is likely an M61545 dual electronic volume control.
It looks like the sensors (cameras) are from ETOMS
They are all 32x32 arrays except Fitness Play, which is 64x64. Most of the PCBs are marked CIS.
Bowling and Boxing look identical.
LOTR and SW look identical
DQ looks similar to LOTR
Real Swing Golf (different driver) and Fitness Play look different from all the others.
The sensor dies for Bowling, Boxing, Star Wars and DQ are labeled CU5501A.
LOTR is CU5501
Real Swing Golf is CU5502
Fitness Play is S-5300A SLH2039H and does not have ETOMS on it.
The Fitness Play main PCB has an extra glob next to the ribbon cable to the camera.
Most of the camera PCBs connect to the main PCB with an 18-20 wire ribbon cable.
Real Swing Golf just has 6 wires, Its camera PCB is the only one with a ceramic resonator
Maybe the CU5502 chip offloads some processing from the CPU?
NOTES: NOTES:
Play TV Monster Truck runs off an entirely different codebase to everything else, presumably coded by the developer from scratch rather than using code supplied by SSD Company LTD Play TV Monster Truck runs off an entirely different codebase to everything else, presumably coded by the developer from scratch rather than using code supplied by SSD Company LTD
Play TV Rescue Heroes fails to display any kind of XaviX logo or SSD Copyright, it is the only XaviX based game so far to not show these details anywhere in the game. Play TV Rescue Heroes fails to display any kind of XaviX logo or SSD Copyright, it is the only XaviX based game so far to not show these details anywhere in the game.
***************************************************************************/ ***************************************************************************/
#include "emu.h" #include "emu.h"
@ -314,20 +334,15 @@ void xavix_state::xavix_lowbus_map(address_map &map)
map(0x75f0, 0x75f1).rw(FUNC(xavix_state::sound_startstop_r), FUNC(xavix_state::sound_startstop_w)); // r/w tested read/written 8 times in a row map(0x75f0, 0x75f1).rw(FUNC(xavix_state::sound_startstop_r), FUNC(xavix_state::sound_startstop_w)); // r/w tested read/written 8 times in a row
map(0x75f2, 0x75f3).rw(FUNC(xavix_state::sound_updateenv_r), FUNC(xavix_state::sound_updateenv_w)); map(0x75f2, 0x75f3).rw(FUNC(xavix_state::sound_updateenv_r), FUNC(xavix_state::sound_updateenv_w));
map(0x75f4, 0x75f5).r(FUNC(xavix_state::sound_sta16_r)); // related to 75f0 / 75f1 (read after writing there - rad_mtrk) map(0x75f4, 0x75f5).r(FUNC(xavix_state::sound_sta16_r)); // related to 75f0 / 75f1 (read after writing there - rad_mtrk)
// taitons1 after 75f7/75f8
map(0x75f6, 0x75f6).rw(FUNC(xavix_state::sound_volume_r), FUNC(xavix_state::sound_volume_w)); // r/w tested map(0x75f6, 0x75f6).rw(FUNC(xavix_state::sound_volume_r), FUNC(xavix_state::sound_volume_w)); // r/w tested
// taitons1 written as a pair
map(0x75f7, 0x75f7).w(FUNC(xavix_state::sound_regbase_w)); map(0x75f7, 0x75f7).w(FUNC(xavix_state::sound_regbase_w));
map(0x75f8, 0x75f8).rw(FUNC(xavix_state::sound_75f8_r), FUNC(xavix_state::sound_75f8_w)); // r/w tested map(0x75f8, 0x75f8).rw(FUNC(xavix_state::sound_75f8_r), FUNC(xavix_state::sound_75f8_w)); // r/w tested
// taitons1 written after 75f6, then read
map(0x75f9, 0x75f9).rw(FUNC(xavix_state::sound_75f9_r), FUNC(xavix_state::sound_75f9_w)); map(0x75f9, 0x75f9).rw(FUNC(xavix_state::sound_75f9_r), FUNC(xavix_state::sound_75f9_w));
// at another time
map(0x75fa, 0x75fa).rw(FUNC(xavix_state::sound_timer0_r), FUNC(xavix_state::sound_timer0_w)); // r/w tested map(0x75fa, 0x75fa).rw(FUNC(xavix_state::sound_timer0_r), FUNC(xavix_state::sound_timer0_w)); // r/w tested
map(0x75fb, 0x75fb).rw(FUNC(xavix_state::sound_timer1_r), FUNC(xavix_state::sound_timer1_w)); // r/w tested map(0x75fb, 0x75fb).rw(FUNC(xavix_state::sound_timer1_r), FUNC(xavix_state::sound_timer1_w)); // r/w tested
map(0x75fc, 0x75fc).rw(FUNC(xavix_state::sound_timer2_r), FUNC(xavix_state::sound_timer2_w)); // r/w tested map(0x75fc, 0x75fc).rw(FUNC(xavix_state::sound_timer2_r), FUNC(xavix_state::sound_timer2_w)); // r/w tested
map(0x75fd, 0x75fd).rw(FUNC(xavix_state::sound_timer3_r), FUNC(xavix_state::sound_timer3_w)); // r/w tested map(0x75fd, 0x75fd).rw(FUNC(xavix_state::sound_timer3_r), FUNC(xavix_state::sound_timer3_w)); // r/w tested
map(0x75fe, 0x75fe).rw(FUNC(xavix_state::sound_irqstatus_r), FUNC(xavix_state::sound_irqstatus_w)); map(0x75fe, 0x75fe).rw(FUNC(xavix_state::sound_irqstatus_r), FUNC(xavix_state::sound_irqstatus_w));
// taitons1 written other 75xx operations
map(0x75ff, 0x75ff).w(FUNC(xavix_state::sound_75ff_w)); map(0x75ff, 0x75ff).w(FUNC(xavix_state::sound_75ff_w));
// Slot Registers // Slot Registers
@ -399,9 +414,22 @@ void xavix_state::superxavix_lowbus_map(address_map &map)
map(0x6c00, 0x6cff).ram().w(FUNC(xavix_state::bmp_palram_sh_w)).share("bmp_palram_sh"); map(0x6c00, 0x6cff).ram().w(FUNC(xavix_state::bmp_palram_sh_w)).share("bmp_palram_sh");
map(0x6d00, 0x6dff).ram().w(FUNC(xavix_state::bmp_palram_l_w)).share("bmp_palram_l"); map(0x6d00, 0x6dff).ram().w(FUNC(xavix_state::bmp_palram_l_w)).share("bmp_palram_l");
// extended external bus stuff (possible banking control?)
map(0x7909, 0x7909).w(FUNC(xavix_state::extended_extbus_reg0_w));
map(0x790b, 0x790b).w(FUNC(xavix_state::extended_extbus_reg1_w));
map(0x790d, 0x790d).w(FUNC(xavix_state::extended_extbus_reg2_w));
map(0x7a10, 0x7a12).rw("xavix2002io", FUNC(xavix2002_io_device::pio_dir_r), FUNC(xavix2002_io_device::pio_dir_w));
map(0x7a20, 0x7a22).rw("xavix2002io", FUNC(xavix2002_io_device::pio_out_r), FUNC(xavix2002_io_device::pio_out_w));
map(0x7a30, 0x7a32).r("xavix2002io", FUNC(xavix2002_io_device::pio_in_r));
map(0x6fb0, 0x6fc7).ram().share("bmp_base"); map(0x6fb0, 0x6fc7).ram().share("bmp_base");
map(0x7ffd, 0x7ffd).nopw(); // looks like a watchdog?
} }
static INPUT_PORTS_START( xavix ) static INPUT_PORTS_START( xavix )
PORT_START("IN0") PORT_START("IN0")
PORT_DIPNAME( 0x01, 0x00, "IN0" ) PORT_DIPNAME( 0x01, 0x00, "IN0" )
@ -507,6 +535,30 @@ static INPUT_PORTS_START( xavix_an )
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( xavix_i2c )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
INPUT_PORTS_END
static INPUT_PORTS_START( ttv_lotr )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_lotr_state,camera_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_lotr_state,camera_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
INPUT_PORTS_END
static INPUT_PORTS_START( xavix_bowl )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_bowl_state,camera_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_bowl_state,camera_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
INPUT_PORTS_END
static INPUT_PORTS_START( epo_sdb ) static INPUT_PORTS_START( epo_sdb )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix)
@ -554,16 +606,19 @@ static INPUT_PORTS_START( taikodp )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("AN6") // 12 PORT_MODIFY("AN6") // 12
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_cart_state,i2c_r, nullptr)
INPUT_PORTS_END INPUT_PORTS_END
/*
static INPUT_PORTS_START( xavixp ) static INPUT_PORTS_START( xavixp )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix)
PORT_MODIFY("REGION") // PAL/NTSC flag PORT_MODIFY("REGION") // PAL/NTSC flag
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM )
INPUT_PORTS_END INPUT_PORTS_END
*/
/* Test mode lists the following /* Test mode lists the following
@ -710,8 +765,8 @@ static INPUT_PORTS_START( ekara )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix)
PORT_MODIFY("IN1") PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) // multiplexed input PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_ekara_state,ekara_multi0_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) // multiplexed input PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_ekara_state,ekara_multi1_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off. PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
@ -829,7 +884,7 @@ static INPUT_PORTS_START( rad_pingp )
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( nostalgia ) static INPUT_PORTS_START( nostalgia )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("IN0") // mappings based on Dragon Buster button list, inputs don't seem to work properly in some games, probably because bad EEPROM support means all buttons are mapped to the same thing? PORT_MODIFY("IN0") // mappings based on Dragon Buster button list, inputs don't seem to work properly in some games, probably because bad EEPROM support means all buttons are mapped to the same thing?
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // Fire4 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // Fire4
@ -865,7 +920,7 @@ static INPUT_PORTS_START( rad_bb2 )
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( ttv_mx ) static INPUT_PORTS_START( ttv_mx )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("IN0") PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Accel PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Accel
@ -909,7 +964,7 @@ static INPUT_PORTS_START( rad_rh )
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( epo_efdx ) static INPUT_PORTS_START( epo_efdx )
PORT_INCLUDE(xavix) PORT_INCLUDE(xavix_i2c)
PORT_MODIFY("IN0") PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // select PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // select
@ -921,6 +976,13 @@ static INPUT_PORTS_START( epo_efdx )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( has_wamg )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // waits for this after fading out title, what is it?
INPUT_PORTS_END
/* correct, 4bpp gfxs */ /* correct, 4bpp gfxs */
static const gfx_layout charlayout = static const gfx_layout charlayout =
{ {
@ -1017,7 +1079,6 @@ void xavix_state::xavix(machine_config &config)
m_sound->add_route(1, "rspeaker", 1.0); m_sound->add_route(1, "rspeaker", 1.0);
} }
void xavix_i2c_state::xavix_i2c_24lc02(machine_config &config) void xavix_i2c_state::xavix_i2c_24lc02(machine_config &config)
{ {
xavix(config); xavix(config);
@ -1025,6 +1086,12 @@ void xavix_i2c_state::xavix_i2c_24lc02(machine_config &config)
I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02 (taiko) I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02 (taiko)
} }
void xavix_i2c_state::xavix_i2c_24c02(machine_config &config)
{
xavix(config);
I2CMEM(config, "i2cmem", 0).set_page_size(16).set_data_size(0x100); // 24C02
}
void xavix_i2c_state::xavix_i2c_24lc04(machine_config &config) void xavix_i2c_state::xavix_i2c_24lc04(machine_config &config)
{ {
@ -1062,7 +1129,7 @@ void xavix_state::xavix2000(machine_config &config)
XAVIX2000(config.replace(), m_maincpu, MAIN_CLOCK); XAVIX2000(config.replace(), m_maincpu, MAIN_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &xavix_state::xavix_map); m_maincpu->set_addrmap(AS_PROGRAM, &xavix_state::xavix_map);
m_maincpu->set_addrmap(5, &xavix_state::superxavix_lowbus_map); m_maincpu->set_addrmap(5, &xavix_state::xavix_lowbus_map);
m_maincpu->set_addrmap(6, &xavix_state::xavix_extbus_map); m_maincpu->set_addrmap(6, &xavix_state::xavix_extbus_map);
m_maincpu->disable_cache(); m_maincpu->disable_cache();
m_maincpu->set_vblank_int("screen", FUNC(xavix_state::interrupt)); m_maincpu->set_vblank_int("screen", FUNC(xavix_state::interrupt));
@ -1071,6 +1138,40 @@ void xavix_state::xavix2000(machine_config &config)
m_palette->set_entries(512); m_palette->set_entries(512);
} }
void xavix_state::xavix2002(machine_config &config)
{
xavix(config);
XAVIX2002(config.replace(), m_maincpu, MAIN_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &xavix_state::xavix_map);
m_maincpu->set_addrmap(5, &xavix_state::superxavix_lowbus_map); // has extra video, io etc.
m_maincpu->set_addrmap(6, &xavix_state::xavix_extbus_map);
m_maincpu->disable_cache();
m_maincpu->set_vblank_int("screen", FUNC(xavix_state::interrupt));
m_maincpu->set_vector_callback(FUNC(xavix_state::get_vectors));
m_palette->set_entries(512);
XAVIX2002IO(config, m_xavix2002io, 0);
}
void xavix_i2c_jmat_state::xavix2002_i2c_jmat(machine_config &config)
{
xavix2002(config);
I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x200); // ?
m_xavix2002io->read_0_callback().set(FUNC(xavix_i2c_jmat_state::read_extended_io0));
m_xavix2002io->write_0_callback().set(FUNC(xavix_i2c_jmat_state::write_extended_io0));
m_xavix2002io->read_1_callback().set(FUNC(xavix_i2c_jmat_state::read_extended_io1));
m_xavix2002io->write_1_callback().set(FUNC(xavix_i2c_jmat_state::write_extended_io1));
m_xavix2002io->read_2_callback().set(FUNC(xavix_i2c_jmat_state::read_extended_io2));
m_xavix2002io->write_2_callback().set(FUNC(xavix_i2c_jmat_state::write_extended_io2));
}
void xavix_state::xavix2000_nv(machine_config &config) void xavix_state::xavix2000_nv(machine_config &config)
{ {
xavix2000(config); xavix2000(config);
@ -1177,6 +1278,14 @@ void xavix_cart_state::xavix_cart_ddrfammt(machine_config &config)
//SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp"); // not for this system, but unlike other carts, actually tells you this if inserted rather than crashing the system //SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp"); // not for this system, but unlike other carts, actually tells you this if inserted rather than crashing the system
} }
void xavix_i2c_state::xavix2002_i2c_24c04(machine_config &config)
{
xavix2002(config);
I2CMEM(config, "i2cmem", 0).set_page_size(16).set_data_size(0x200); // 24C04
}
void xavix_state::init_xavix() void xavix_state::init_xavix()
{ {
m_rgnlen = memregion("bios")->bytes(); m_rgnlen = memregion("bios")->bytes();
@ -1317,6 +1426,10 @@ ROM_START( epo_guru )
ROM_LOAD("gururinworld.bin", 0x000000, 0x400000, CRC(e5ae4523) SHA1(0e39ef8f94203d34e49422081667805f50a339a1) ) ROM_LOAD("gururinworld.bin", 0x000000, 0x400000, CRC(e5ae4523) SHA1(0e39ef8f94203d34e49422081667805f50a339a1) )
ROM_END ROM_END
ROM_START( epo_dmon ) // Doraemon has a phototransistor, microphone and 24LC02, PCB says XaviX 2002
ROM_REGION(0x400000, "bios", ROMREGION_ERASE00)
ROM_LOAD("doraemon.bin", 0x000000, 0x400000, CRC(d8f5412f) SHA1(11a4c017ed400f7aa585be744d9693efe734c192) )
ROM_END
ROM_START( rad_rh ) ROM_START( rad_rh )
ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) ROM_REGION(0x200000, "bios", ROMREGION_ERASE00)
@ -1445,7 +1558,9 @@ CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_sta
CONS( 2005, epo_guru, 0, 0, xavix, xavix, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2005, epo_guru, 0, 0, xavix, xavix, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 200?, has_wamg, 0, 0, xavix, xavix, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2002, epo_dmon, 0, 0, xavix_i2c_24c02, xavix_i2c,xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Doraemon Computer Megaphone (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // full / proper title?
CONS( 200?, has_wamg, 0, 0, xavix, has_wamg, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
/* Music titles: Emulation note: /* Music titles: Emulation note:
@ -1455,9 +1570,9 @@ CONS( 200?, has_wamg, 0, 0, xavix, xavix, xavix_state,
CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turn it on" without cart CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turn it on" without cart
CONS( 2000, ekaraa, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turning on e-kara" without cart CONS( 2000, ekaraa, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turning on e-kara" without cart
CONS( 2000, ekaraj, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows Japanese message without cart CONS( 2000, ekaraj, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows Japanese message without cart
CONS( 2002, ekarag, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Germany?, includes 3 songs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // found in Germany, could just be a Europe-wide model tho?, NOT a headset model, but still has 3 songs.
// the 'e-kara pro headset' has 3 songs built in for the US release. The Japanese release of this appears to be called 'e-kara H.S.' and it is unclear if it also has built in songs. The Canadian box says 'cartridge contains' instead of 'songs included' but is likely a printing error. // the 'e-kara pro headset' has 3 songs built in for the US release. The Japanese release of this appears to be called 'e-kara H.S.' and it is unclear if it also has built in songs. The Canadian box says 'cartridge contains' instead of 'songs included' but is likely a printing error.
CONS( 2002, ekaraphs, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara Pro Headset (US, includes 3 songs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) CONS( 2002, ekaraphs, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara Pro Headset (US, includes 3 songs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ )
CONS( 2002, ekarag, ekaraphs, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Germany?, includes 3 songs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // found in Germany, could just be a Europe-wide model tho?, verify if regular or headset type
CONS( 2001, ddrfammt, 0, 0, xavix_cart_ddrfammt,ddrfammt, xavix_cart_state, init_xavix, "Takara / Konami / SSD Company LTD", "Dance Dance Revolution Family Mat (Japan)", MACHINE_IMPERFECT_SOUND/*|MACHINE_IS_BIOS_ROOT*/ ) CONS( 2001, ddrfammt, 0, 0, xavix_cart_ddrfammt,ddrfammt, xavix_cart_state, init_xavix, "Takara / Konami / SSD Company LTD", "Dance Dance Revolution Family Mat (Japan)", MACHINE_IMPERFECT_SOUND/*|MACHINE_IS_BIOS_ROOT*/ )
@ -1503,10 +1618,10 @@ ROM_END
CONS( 2004, epo_sdb, 0, 0, xavix2000_nv, epo_sdb, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Super Dash Ball (Japan)", MACHINE_IMPERFECT_SOUND ) CONS( 2004, epo_sdb, 0, 0, xavix2000_nv, epo_sdb, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Super Dash Ball (Japan)", MACHINE_IMPERFECT_SOUND )
CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2005, ttv_lotr, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2005, ttv_lotr, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2005, ttv_mx, 0, 0, xavix2000_i2c_24c04, ttv_mx, xavix_i2c_state, init_xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2005, ttv_mx, 0, 0, xavix2000_i2c_24c04, ttv_mx, xavix_i2c_state, init_xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c02, xavix , xavix_i2c_lotr_state, init_xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
/* SuperXaviX (XaviX 2002 type CPU) hardware titles (3rd XaviX generation?) /* SuperXaviX (XaviX 2002 type CPU) hardware titles (3rd XaviX generation?)
@ -1519,9 +1634,15 @@ CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c02, xavix , xavix_i2c_lotr_state,
/* The 'XaviXPORT' isn't a real console, more of a TV adapter, all the actual hardware (CPU including video hw, sound hw) is in the cartridges and controllers /* The 'XaviXPORT' isn't a real console, more of a TV adapter, all the actual hardware (CPU including video hw, sound hw) is in the cartridges and controllers
and can vary between games, see notes at top of driver. and can vary between games, see notes at top of driver.
The 'Dyomos' console released in France appears to be nearly identical to XaviXPORT The 'Domyos Interactive System (DiS)' released in France by Decathlon appears to be identical to XaviXPORT (but for PAL regions, and with an entirely different software range)
*/ */
ROM_START( tmy_thom )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "thomastank.bin", 0x000000, 0x800000, CRC(a52a23be) SHA1(e5b3500239d9e56eb5405f7585982959e5a162da) )
ROM_END
// XaviXPORT
ROM_START( xavtenni ) ROM_START( xavtenni )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xavixtennis.bin", 0x000000, 0x800000, CRC(23a1d918) SHA1(2241c59e8ea8328013e55952ebf9060ea0a4675b) ) ROM_LOAD( "xavixtennis.bin", 0x000000, 0x800000, CRC(23a1d918) SHA1(2241c59e8ea8328013e55952ebf9060ea0a4675b) )
@ -1532,22 +1653,79 @@ ROM_START( xavbaseb )
ROM_LOAD( "xpbaseball.bin", 0x000000, 0x800000, CRC(e9ed692d) SHA1(537e390e972156dc7da66ee127ae4c8052038ee5) ) ROM_LOAD( "xpbaseball.bin", 0x000000, 0x800000, CRC(e9ed692d) SHA1(537e390e972156dc7da66ee127ae4c8052038ee5) )
ROM_END ROM_END
ROM_START( xavbowl )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpbowling.bin", 0x000000, 0x800000, CRC(2873460b) SHA1(ea8e2392f5a12961a23eb66dca8e07dec81ce8c8) )
ROM_END
ROM_START( xavbassf )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpbassfishing.bin", 0x000000, 0x800000, CRC(09ab2f29) SHA1(616254176315d0947002e9ae5a6371a3ffa2e8eb) )
ROM_END
ROM_START( xavbox )
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpboxing.bin", 0x000000, 0x800000, CRC(b61e7717) SHA1(162b9c53ac8c9d7b6972db44f7bc1cb0a7837b70) )
ROM_END
ROM_START( xavjmat ) ROM_START( xavjmat )
ROM_REGION( 0x1000000, "bios", ROMREGION_ERASE00 ) ROM_REGION( 0x1000000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpjmat.bin", 0x000000, 0x1000000, CRC(71a51eef) SHA1(41fd2c3013d1c86756046ec9174e94400f8fa06d) ) ROM_LOAD( "xpjmat.bin", 0x000000, 0x1000000, CRC(71a51eef) SHA1(41fd2c3013d1c86756046ec9174e94400f8fa06d) )
ROM_END ROM_END
ROM_START( tmy_thom ) // Domyos DiS (XaviX 2002 based titles)
ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) ROM_START( domfitex )
ROM_LOAD( "thomastank.bin", 0x000000, 0x800000, CRC(a52a23be) SHA1(e5b3500239d9e56eb5405f7585982959e5a162da) ) ROM_REGION( 0x1000000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpfitnessexercise.bin", 0x000000, 0x1000000, CRC(f1089229) SHA1(803df8ba0a05cb004a4238c6c71ea1ffa4428990) )
ROM_END ROM_END
CONS( 2004, xavtenni, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) ROM_START( domfitch )
CONS( 2004, xavbaseb, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Baseball (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) ROM_REGION( 0x1000000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpfitnesschallenge.bin", 0x000000, 0x1000000, CRC(e0a4093d) SHA1(2692ac03f8be4f86a4777ad0c365cbab7b469e3b) )
ROM_END
// TODO: does it have an SEEPROM? why does it hang? full title?
CONS( 2005, tmy_thom, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Thomas and Friends (Tomy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2004, xavtenni, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2004, xavbaseb, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Baseball (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2004, xavbowl, 0, 0, xavix2002_i2c_24c04, xavix_bowl, xavix_i2c_bowl_state, init_xavix, "SSD Company LTD", "XaviX Bowling (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has IR 'Camera'
CONS( 2004, xavbox, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Boxing (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has IR 'Camera'
// Bass Fishing PCB is just like Tennis except with an RF daughterboard.
CONS( 2004, xavbassf, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Bass Fishing (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// TODO: check SEEPROM type and hookup, banking! // TODO: check SEEPROM type and hookup, banking!
CONS( 2005, xavjmat, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD", "Jackie Chan J-Mat Fitness (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2005, xavjmat, 0, 0, xavix2002_i2c_jmat, xavix_i2c, xavix_i2c_jmat_state, init_xavix, "SSD Company LTD", "Jackie Chan J-Mat Fitness (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// TODO: does it have an SEEPROM? why does it hang? full title?
CONS( 2005, tmy_thom, 0, 0, xavix2000_i2c_24c04, xavix, xavix_i2c_state, init_xavix, "SSD Company LTD / Tomy", "Thomas and Friends (Tomy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // https://arnaudmeyer.wordpress.com/domyos-interactive-system/
// Domyos Fitness Adventure
// Domyos Fitness Challenge
// Domyos Fitness Exercises
// Domyos Fit Race
// Domyos Soft Fitness
// Domyos Fitness Dance
// Domyos Fitness Play
// Domyos Fitness Training
// Domyos Bike Concept (not listed on site above)
// Has SEEPROM and an RTC. Exercise has some leftover PC buffer stuff. (TODO, check SEEPROM type, RTC type, banking) (both Exercises and Challenge are identical PCBs)
CONS( 2008, domfitex, 0, 0, xavix2002_i2c_jmat, xavixp, xavix_i2c_jmat_state, init_xavix, "Decathlon / SSD Company LTD", "Domyos Fitness Exercises (Domyos Interactive System)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
CONS( 2008, domfitch, 0, 0, xavix2002_i2c_jmat, xavixp, xavix_i2c_jmat_state, init_xavix, "Decathlon / SSD Company LTD", "Domyos Fitness Challenge (Domyos Interactive System)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
// Domyos DiS (unknown hardware, or bad dumps)
// This DOES NOT look like a 6502 based Xavix / Super Xavix! maybe XaviX 2, the cartridges contain the entire system (CPU,Video,Sound,ROM) so that is possible.
// Seems to have 32-bit looking stuff, possible vectors at start?
ROM_START( domfitad )
ROM_REGION( 0x1000000, "bios", ROMREGION_ERASE00 )
ROM_LOAD( "xpfitnessadventure.bin", 0x000000, 0x1000000, CRC(a7917081) SHA1(95ae5dc6e64a78ae060cb0e61d8b0af34a93c4ce) )
ROM_END
// Has SEEPROM and an RTC. Adventure has the string DOMYSSDCOLTD a couple of times.
CONS( 2008, domfitad, 0, 0, xavix2002_i2c_jmat, xavixp, xavix_i2c_jmat_state, init_xavix, "Decathlon / SSD Company LTD", "Domyos Fitness Adventure (Domyos Interactive System)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )

View File

@ -18,7 +18,8 @@
#include "machine/xavix_mtrk_wheel.h" #include "machine/xavix_mtrk_wheel.h"
#include "machine/xavix_madfb_ball.h" #include "machine/xavix_madfb_ball.h"
#include "machine/xavix2002_io.h"
#include "machine/xavix_io.h"
class xavix_sound_device : public device_t, public device_sound_interface class xavix_sound_device : public device_t, public device_sound_interface
{ {
@ -99,7 +100,8 @@ public:
m_palette(*this, "palette"), m_palette(*this, "palette"),
m_region(*this, "REGION"), m_region(*this, "REGION"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_sound(*this, "xavix_sound") m_sound(*this, "xavix_sound"),
m_xavix2002io(*this, "xavix2002io")
{ } { }
void xavix(machine_config &config); void xavix(machine_config &config);
@ -108,6 +110,8 @@ public:
void xavix_nv(machine_config &config); void xavix_nv(machine_config &config);
void xavix2000_nv(machine_config &config); void xavix2000_nv(machine_config &config);
void xavix2002(machine_config &config);
void init_xavix(); void init_xavix();
DECLARE_WRITE_LINE_MEMBER(ioevent_trg01); DECLARE_WRITE_LINE_MEMBER(ioevent_trg01);
@ -563,7 +567,20 @@ private:
int get_current_address_byte(); int get_current_address_byte();
required_device<xavix_sound_device> m_sound; required_device<xavix_sound_device> m_sound;
DECLARE_READ8_MEMBER(sound_regram_read_cb); DECLARE_READ8_MEMBER(sound_regram_read_cb);
protected:
optional_device<xavix2002_io_device> m_xavix2002io;
// additional SuperXaviX / XaviX2002 stuff
uint8_t m_sx_extended_extbus[3];
DECLARE_WRITE8_MEMBER(extended_extbus_reg0_w);
DECLARE_WRITE8_MEMBER(extended_extbus_reg1_w);
DECLARE_WRITE8_MEMBER(extended_extbus_reg2_w);
}; };
class xavix_i2c_state : public xavix_state class xavix_i2c_state : public xavix_state
@ -578,19 +595,24 @@ public:
void xavix_i2c_24lc02(machine_config &config); void xavix_i2c_24lc02(machine_config &config);
void xavix_i2c_24lc04(machine_config &config); void xavix_i2c_24lc04(machine_config &config);
void xavix_i2c_24c02(machine_config &config);
void xavix_i2c_24c08(machine_config &config); void xavix_i2c_24c08(machine_config &config);
void xavix2000_i2c_24c04(machine_config &config); void xavix2000_i2c_24c04(machine_config &config);
void xavix2000_i2c_24c02(machine_config &config); void xavix2000_i2c_24c02(machine_config &config);
void xavix2002_i2c_24c04(machine_config &config);
void init_epo_efdx() void init_epo_efdx()
{ {
init_xavix(); init_xavix();
hackaddress1 = 0x958a; hackaddress1 = 0x958a;
hackaddress2 = 0x8524; hackaddress2 = 0x8524;
} }
DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
protected: protected:
virtual uint8_t read_io1(uint8_t direction) override;
virtual void write_io1(uint8_t data, uint8_t direction) override; virtual void write_io1(uint8_t data, uint8_t direction) override;
required_device<i2cmem_device> m_i2cmem; required_device<i2cmem_device> m_i2cmem;
@ -600,6 +622,25 @@ private:
int hackaddress2; int hackaddress2;
}; };
class xavix_i2c_jmat_state : public xavix_i2c_state
{
public:
xavix_i2c_jmat_state(const machine_config &mconfig, device_type type, const char *tag)
: xavix_i2c_state(mconfig, type, tag)
{ }
void xavix2002_i2c_jmat(machine_config &config);
private:
READ8_MEMBER(read_extended_io0);
READ8_MEMBER(read_extended_io1);
READ8_MEMBER(read_extended_io2);
WRITE8_MEMBER(write_extended_io0);
WRITE8_MEMBER(write_extended_io1);
WRITE8_MEMBER(write_extended_io2);
};
class xavix_i2c_lotr_state : public xavix_i2c_state class xavix_i2c_lotr_state : public xavix_i2c_state
{ {
public: public:
@ -607,11 +648,22 @@ public:
: xavix_i2c_state(mconfig, type, tag) : xavix_i2c_state(mconfig, type, tag)
{ } { }
DECLARE_CUSTOM_INPUT_MEMBER(camera_r);
protected: protected:
virtual uint8_t read_io1(uint8_t direction) override;
//virtual void write_io1(uint8_t data, uint8_t direction) override; //virtual void write_io1(uint8_t data, uint8_t direction) override;
}; };
class xavix_i2c_bowl_state : public xavix_i2c_state
{
public:
xavix_i2c_bowl_state(const machine_config &mconfig, device_type type, const char *tag)
: xavix_i2c_state(mconfig, type, tag)
{ }
DECLARE_CUSTOM_INPUT_MEMBER(camera_r);
};
class xavix_mtrk_state : public xavix_state class xavix_mtrk_state : public xavix_state
@ -816,8 +868,9 @@ public:
void xavix_i2c_taiko(machine_config &config); void xavix_i2c_taiko(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
protected: protected:
virtual uint8_t read_io1(uint8_t direction) override;
virtual void write_io1(uint8_t data, uint8_t direction) override; virtual void write_io1(uint8_t data, uint8_t direction) override;
required_device<i2cmem_device> m_i2cmem; required_device<i2cmem_device> m_i2cmem;
@ -835,6 +888,9 @@ public:
m_extraiowrite(0) m_extraiowrite(0)
{ } { }
DECLARE_CUSTOM_INPUT_MEMBER(ekara_multi0_r);
DECLARE_CUSTOM_INPUT_MEMBER(ekara_multi1_r);
// void xavix_ekara(machine_config &config); // void xavix_ekara(machine_config &config);
protected: protected:
@ -842,7 +898,6 @@ protected:
required_ioport m_extra0; required_ioport m_extra0;
required_ioport m_extra1; required_ioport m_extra1;
virtual uint8_t read_io1(uint8_t direction) override;
virtual void write_io0(uint8_t data, uint8_t direction) override; virtual void write_io0(uint8_t data, uint8_t direction) override;
virtual void write_io1(uint8_t data, uint8_t direction) override; virtual void write_io1(uint8_t data, uint8_t direction) override;

View File

@ -1,8 +1,8 @@
// license:BSD-3-Clause // license:BSD-3-Clause
// copyright-holders:David Haywood // copyright-holders:David Haywood
#ifndef MAME_AUDIO_RAD_EU3A05GPIO_H #ifndef MAME_MACHINE_RAD_EU3A05GPIO_H
#define MAME_AUDIO_RAD_EU3A05GPIO_H #define MAME_MACHINE_RAD_EU3A05GPIO_H
class radica6502_gpio_device : public device_t class radica6502_gpio_device : public device_t
@ -40,4 +40,4 @@ private:
DECLARE_DEVICE_TYPE(RADICA6502_GPIO, radica6502_gpio_device) DECLARE_DEVICE_TYPE(RADICA6502_GPIO, radica6502_gpio_device)
#endif // MAME_AUDIO_RAD_EU3A05GPIO_H #endif // MAME_MACHINE_RAD_EU3A05GPIO_H

View File

@ -467,7 +467,8 @@ TIMER_CALLBACK_MEMBER(xavix_state::interrupt_gen)
m_screen->update_partial(m_screen->vpos()); m_screen->update_partial(m_screen->vpos());
} }
m_interrupt_timer->adjust(attotime::never, 0); // m_interrupt_timer->adjust(attotime::never, 0);
m_interrupt_timer->adjust(m_screen->time_until_pos(m_posirq_y[0], m_posirq_x[0]), 0); // epo_dmon expects it to keep firing without being reloaded? check this doesn't break anything else!
} }
@ -487,6 +488,63 @@ WRITE8_MEMBER(xavix_state::dispctrl_posirq_y_w)
/* Per Game IO port callbacks */ /* Per Game IO port callbacks */
CUSTOM_INPUT_MEMBER(xavix_i2c_state::i2c_r)
{
return m_i2cmem->read_sda();
}
CUSTOM_INPUT_MEMBER(xavix_i2c_cart_state::i2c_r)
{
return m_i2cmem->read_sda();
}
CUSTOM_INPUT_MEMBER(xavix_i2c_lotr_state::camera_r) // seems to be some kind of camera status bits
{
return machine().rand();
}
CUSTOM_INPUT_MEMBER(xavix_i2c_bowl_state::camera_r) // seems to be some kind of camera status bits
{
return machine().rand();
}
CUSTOM_INPUT_MEMBER(xavix_ekara_state::ekara_multi0_r)
{
switch (m_extraioselect & 0x7f)
{
case 0x01: return (m_extra0->read() & 0x01) >> 0; break;
case 0x02: return (m_extra0->read() & 0x04) >> 2; break;
case 0x04: return (m_extra0->read() & 0x10) >> 4; break;
case 0x08: return (m_extra0->read() & 0x40) >> 6; break;
case 0x10: return (m_extra1->read() & 0x01) >> 0; break;
case 0x20: return (m_extra1->read() & 0x04) >> 2; break;
case 0x40: return (m_extra1->read() & 0x10) >> 4; break;
default:
LOG("latching inputs with invalid m_extraioselect value of %02x\n", m_extraioselect);
return 0x00;
}
return 0x00;
}
CUSTOM_INPUT_MEMBER(xavix_ekara_state::ekara_multi1_r)
{
switch (m_extraioselect & 0x7f)
{
case 0x01: return (m_extra0->read() & 0x02) >> 1;
case 0x02: return (m_extra0->read() & 0x08) >> 3;
case 0x04: return (m_extra0->read() & 0x20) >> 5;
case 0x08: return (m_extra0->read() & 0x80) >> 7;
case 0x10: return (m_extra1->read() & 0x02) >> 1;
case 0x20: return (m_extra1->read() & 0x08) >> 3;
case 0x40: return (m_extra1->read() & 0x20) >> 5;
default:
LOG("latching inputs with invalid m_extraioselect value of %02x\n", m_extraioselect);
return 0x00;
}
return 0x00;
}
uint8_t xavix_state::read_io0(uint8_t direction) uint8_t xavix_state::read_io0(uint8_t direction)
{ {
// no special handling // no special handling
@ -509,19 +567,6 @@ void xavix_state::write_io1(uint8_t data, uint8_t direction)
// no special handling // no special handling
} }
uint8_t xavix_i2c_state::read_io1(uint8_t direction)
{
uint8_t ret = m_in1->read();
if (!(direction & 0x08))
{
ret &= ~0x08;
ret |= (m_i2cmem->read_sda() & 1) << 3;
}
return ret;
}
void xavix_i2c_state::write_io1(uint8_t data, uint8_t direction) void xavix_i2c_state::write_io1(uint8_t data, uint8_t direction)
{ {
// ignore these writes so that epo_edfx can send read requests to the ee-prom and doesn't just report an error // ignore these writes so that epo_edfx can send read requests to the ee-prom and doesn't just report an error
@ -543,96 +588,11 @@ void xavix_i2c_state::write_io1(uint8_t data, uint8_t direction)
} }
// for taikodp // for taikodp
uint8_t xavix_i2c_cart_state::read_io1(uint8_t direction)
{
uint8_t ret = m_in1->read();
if (!(direction & 0x08))
{
ret &= ~0x08;
ret |= (m_i2cmem->read_sda() & 1) << 3;
}
return ret;
}
void xavix_i2c_cart_state::write_io1(uint8_t data, uint8_t direction) void xavix_i2c_cart_state::write_io1(uint8_t data, uint8_t direction)
{
if (direction & 0x08)
{ {
m_i2cmem->write_sda((data & 0x08) >> 3); m_i2cmem->write_sda((data & 0x08) >> 3);
}
if (direction & 0x10)
{
m_i2cmem->write_scl((data & 0x10) >> 4); m_i2cmem->write_scl((data & 0x10) >> 4);
} }
}
uint8_t xavix_i2c_lotr_state::read_io1(uint8_t direction)
{
uint8_t ret = m_in1->read();
// some kind of comms with the IR sensor?
ret ^= (machine().rand() & 0x02);
ret ^= (machine().rand() & 0x04);
if (!(direction & 0x08))
{
ret &= ~0x08;
ret |= (m_i2cmem->read_sda() & 1) << 3;
}
return ret;
}
uint8_t xavix_ekara_state::read_io1(uint8_t direction)
{
uint8_t extrainlatch0 = 0x00;
uint8_t extrainlatch1 = 0x00;
switch (m_extraioselect & 0x7f)
{
case 0x01:
extrainlatch0 = (m_extra0->read() & 0x01) >> 0;
extrainlatch1 = (m_extra0->read() & 0x02) >> 1;
break;
case 0x02:
extrainlatch0 = (m_extra0->read() & 0x04) >> 2;
extrainlatch1 = (m_extra0->read() & 0x08) >> 3;
break;
case 0x04:
extrainlatch0 = (m_extra0->read() & 0x10) >> 4;
extrainlatch1 = (m_extra0->read() & 0x20) >> 5;
break;
case 0x08:
extrainlatch0 = (m_extra0->read() & 0x40) >> 6;
extrainlatch1 = (m_extra0->read() & 0x80) >> 7;
break;
case 0x10:
extrainlatch0 = (m_extra1->read() & 0x01) >> 0;
extrainlatch1 = (m_extra1->read() & 0x02) >> 1;
break;
case 0x20:
extrainlatch0 = (m_extra1->read() & 0x04) >> 2;
extrainlatch1 = (m_extra1->read() & 0x08) >> 3;
break;
case 0x40:
extrainlatch0 = (m_extra1->read() & 0x10) >> 4;
extrainlatch1 = (m_extra1->read() & 0x20) >> 5;
break;
default:
LOG("latching inputs with invalid m_extraioselect value of %02x\n", m_extraioselect);
break;
}
uint8_t ret = m_in1->read();
ret &= 0xfc;
ret |= extrainlatch0 << 0;
ret |= extrainlatch1 << 1;
return ret;
}
void xavix_ekara_state::write_io0(uint8_t data, uint8_t direction) void xavix_ekara_state::write_io0(uint8_t data, uint8_t direction)
{ {
@ -646,6 +606,36 @@ void xavix_ekara_state::write_io1(uint8_t data, uint8_t direction)
m_extraiowrite = extraiowrite; m_extraiowrite = extraiowrite;
} }
/* SuperXavix IO port handliner (per game) */
READ8_MEMBER(xavix_i2c_jmat_state::read_extended_io0)
{
return 0x00;
}
READ8_MEMBER(xavix_i2c_jmat_state::read_extended_io1)
{
return 0x00;
}
READ8_MEMBER(xavix_i2c_jmat_state::read_extended_io2)
{
return 0x00;
}
WRITE8_MEMBER(xavix_i2c_jmat_state::write_extended_io0)
{
}
WRITE8_MEMBER(xavix_i2c_jmat_state::write_extended_io1)
{
}
WRITE8_MEMBER(xavix_i2c_jmat_state::write_extended_io2)
{
}
/* General IO port handling */ /* General IO port handling */
READ8_MEMBER(xavix_state::io0_data_r) READ8_MEMBER(xavix_state::io0_data_r)
@ -1076,6 +1066,8 @@ void xavix_state::machine_start()
save_item(NAME(m_timer_baseval)); save_item(NAME(m_timer_baseval));
save_item(NAME(m_spritereg)); save_item(NAME(m_spritereg));
save_item(NAME(m_barrel_params)); save_item(NAME(m_barrel_params));
save_item(NAME(m_sx_extended_extbus));
} }
void xavix_state::machine_reset() void xavix_state::machine_reset()
@ -1154,6 +1146,12 @@ void xavix_state::machine_reset()
m_barrel_params[0] = 0x00; m_barrel_params[0] = 0x00;
m_barrel_params[1] = 0x00; m_barrel_params[1] = 0x00;
// SuperXaviX
for (int i = 0; i < 3; i++)
{
m_sx_extended_extbus[i] = 0x00;
}
} }
typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate; typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate;
@ -1181,3 +1179,22 @@ int16_t xavix_state::get_vectors(int which, int half)
} }
// additional SuperXaviX / XaviX2002 stuff
WRITE8_MEMBER(xavix_state::extended_extbus_reg0_w)
{
LOG("%s: extended_extbus_reg0_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[0] = data;
}
WRITE8_MEMBER(xavix_state::extended_extbus_reg1_w)
{
LOG("%s: extended_extbus_reg1_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[1] = data;
}
WRITE8_MEMBER(xavix_state::extended_extbus_reg2_w)
{
LOG("%s: extended_extbus_reg2_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[2] = data;
}

View File

@ -0,0 +1,127 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
// has separate input / output addresses but still uses direction registers, or I've misunderstood this entirely.
#include "emu.h"
#include "xavix2002_io.h"
#define VERBOSE 0
#include "logmacro.h"
DEFINE_DEVICE_TYPE(XAVIX2002IO, xavix2002_io_device, "xavix2002io", "XaviX 2002 IO")
xavix2002_io_device::xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, XAVIX2002IO, tag, owner, clock)
, m_in0_cb(*this)
, m_in1_cb(*this)
, m_in2_cb(*this)
, m_out0_cb(*this)
, m_out1_cb(*this)
, m_out2_cb(*this)
{
}
void xavix2002_io_device::device_start()
{
m_in0_cb.resolve_safe(0xff);
m_in1_cb.resolve_safe(0xff);
m_in2_cb.resolve_safe(0xff);
m_out0_cb.resolve_safe();
m_out1_cb.resolve_safe();
m_out2_cb.resolve_safe();
save_item(NAME(m_sx_pio_dir));
save_item(NAME(m_sx_pio_out));
}
void xavix2002_io_device::device_reset()
{
for (int i = 0; i < 3; i++)
{
m_sx_pio_dir[i] = 0;
m_sx_pio_out[i] = 0;
}
}
WRITE8_MEMBER(xavix2002_io_device::pio_dir_w)
{
LOG("%s: superxavix pio_dir_w (port %d) %02x\n", machine().describe_context(), offset, data);
if (offset < 3)
{
m_sx_pio_dir[offset] = data;
// update port?
}
}
READ8_MEMBER(xavix2002_io_device::pio_dir_r)
{
LOG("%s: superxavix pio_dir_r (port %d)\n", machine().describe_context(), offset);
uint8_t ret = 0x00;
if (offset < 3)
{
ret = m_sx_pio_dir[offset];
}
return ret;
}
WRITE8_MEMBER(xavix2002_io_device::pio_out_w)
{
LOG("%s: superxavix pio_out_w (port %d) %02x\n", machine().describe_context(), offset, data);
if (offset < 3)
{
m_sx_pio_out[offset] = data;
// TODO: look at direction register
uint8_t outdata = m_sx_pio_out[offset];
switch (offset)
{
case 0: m_out0_cb(space,0,outdata); break;
case 1: m_out1_cb(space,0,outdata); break;
case 2: m_out2_cb(space,0,outdata); break;
default: break;
}
}
}
READ8_MEMBER(xavix2002_io_device::pio_out_r)
{
// what does this actually read?
LOG("%s: superxavix pio_out_r (port %d)\n", machine().describe_context(), offset);
return 0x00;
// uint8_t ret = 0x00;
// if (offset<3)
// ret = m_sx_pio_out[offset];
// return ret;
}
READ8_MEMBER(xavix2002_io_device::pio_in_r)
{
LOG("%s: superxavix pio_in_r (port %d)\n", machine().describe_context(), offset);
uint8_t ret = 0x00;
switch (offset)
{
case 0: ret = m_in0_cb(); break;
case 1: ret = m_in1_cb(); break;
case 2: ret = m_in2_cb(); break;
default: ret = 0x00; break;
}
// mask with direction register before returning
return ret;
}

View File

@ -0,0 +1,49 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_MACHINE_XAVIX2002_IO_H
#define MAME_MACHINE_XAVIX2002_IO_H
class xavix2002_io_device : public device_t
{
public:
xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
auto read_0_callback() { return m_in0_cb.bind(); }
auto read_1_callback() { return m_in1_cb.bind(); }
auto read_2_callback() { return m_in2_cb.bind(); }
auto write_0_callback() { return m_out0_cb.bind(); }
auto write_1_callback() { return m_out1_cb.bind(); }
auto write_2_callback() { return m_out2_cb.bind(); }
DECLARE_WRITE8_MEMBER(pio_dir_w);
DECLARE_READ8_MEMBER(pio_dir_r);
DECLARE_WRITE8_MEMBER(pio_out_w);
DECLARE_READ8_MEMBER(pio_out_r);
DECLARE_READ8_MEMBER(pio_in_r);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
devcb_read8 m_in0_cb;
devcb_read8 m_in1_cb;
devcb_read8 m_in2_cb;
devcb_write8 m_out0_cb;
devcb_write8 m_out1_cb;
devcb_write8 m_out2_cb;
uint8_t m_sx_pio_dir[3];
uint8_t m_sx_pio_out[3];
};
DECLARE_DEVICE_TYPE(XAVIX2002IO, xavix2002_io_device)
#endif // MAME_MACHINE_XAVIX2002_IO_H

View File

@ -0,0 +1,103 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
// TODO: hook this back up, and work out why taikodp eeprom breaks when it is hooked up. epo_efdx breakage is expected because that requires an ugly hack to get to the title
// note, eeproms don't work properly in most games at the moment, but no behavioral change was expected with taikodp
#include "emu.h"
#include "xavix_io.h"
#define VERBOSE 0
#include "logmacro.h"
DEFINE_DEVICE_TYPE(XAVIXIO, xavix_io_device, "xavixio", "XaviX IO")
xavix_io_device::xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, XAVIXIO, tag, owner, clock)
, m_in0_cb(*this)
, m_in1_cb(*this)
, m_out0_cb(*this)
, m_out1_cb(*this)
{
}
void xavix_io_device::device_start()
{
m_in0_cb.resolve_safe(0xff);
m_in1_cb.resolve_safe(0xff);
m_out0_cb.resolve_safe();
m_out1_cb.resolve_safe();
save_item(NAME(m_dir));
save_item(NAME(m_dat));
}
void xavix_io_device::device_reset()
{
for (int i = 0; i < 2; i++)
{
m_dir[i] = 0;
m_dat[i] = 0;
}
}
// direction: 1 is out, 0 is in
WRITE8_MEMBER(xavix_io_device::xav_7a0x_dir_w)
{
LOG("%s: xavix IO xav_7a0x_dir_w (port %d) %02x\n", machine().describe_context(), offset, data);
if (offset < 2)
{
m_dir[offset] = data;
// write back to the port
xav_7a0x_dat_w(space,offset,m_dat[offset]);
}
}
WRITE8_MEMBER(xavix_io_device::xav_7a0x_dat_w)
{
LOG("%s: xavix IO xav_7a0x_dat_w (port %d) %02x\n", machine().describe_context(), offset, data);
if (offset < 2)
{
m_dat[offset] = data;
uint8_t outdata = m_dat[offset] & m_dir[offset];
switch (offset)
{
case 0x0: m_out0_cb(space, 0, outdata); break;
case 0x1: m_out1_cb(space, 0, outdata); break;
}
}
}
READ8_MEMBER(xavix_io_device::xav_7a0x_dir_r)
{
uint8_t ret = 0x00;
LOG("%s: xavix IO xav_7a0x_dir_r (port %d)\n", machine().describe_context(), offset);
if (offset < 2)
{
ret = m_dir[offset];
}
return ret;
}
READ8_MEMBER(xavix_io_device::xav_7a0x_dat_r)
{
uint8_t ret = 0x00;
LOG("%s: xavix IO xav_7a0x_dat_r (port %d)\n", machine().describe_context(), offset);
if (offset < 2)
{
switch (offset)
{
case 0x0: ret = m_in0_cb(space, 0); break;
case 0x1: ret = m_in1_cb(space, 0); break;
}
ret &= ~m_dir[offset];
ret |= m_dat[offset] & m_dir[offset];
}
return ret;
}

View File

@ -0,0 +1,42 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_MACHINE_XAVIX_IO_H
#define MAME_MACHINE_XAVIX_IO_H
class xavix_io_device : public device_t
{
public:
xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
auto read_0_callback() { return m_in0_cb.bind(); }
auto read_1_callback() { return m_in1_cb.bind(); }
auto write_0_callback() { return m_out0_cb.bind(); }
auto write_1_callback() { return m_out1_cb.bind(); }
DECLARE_WRITE8_MEMBER(xav_7a0x_dir_w);
DECLARE_WRITE8_MEMBER(xav_7a0x_dat_w);
DECLARE_READ8_MEMBER(xav_7a0x_dir_r);
DECLARE_READ8_MEMBER(xav_7a0x_dat_r);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
devcb_read8 m_in0_cb;
devcb_read8 m_in1_cb;
devcb_write8 m_out0_cb;
devcb_write8 m_out1_cb;
uint8_t m_dir[2];
uint8_t m_dat[2];
};
DECLARE_DEVICE_TYPE(XAVIXIO, xavix_io_device)
#endif // MAME_MACHINE_XAVIX_IO_H

View File

@ -39768,6 +39768,7 @@ epo_epp //
epo_efdx // epo_efdx //
epo_sdb // epo_sdb //
epo_guru // epo_guru //
epo_dmon //
rad_rh // rad_rh //
has_wamg // has_wamg //
ekara // ekara //
@ -39784,8 +39785,14 @@ ttv_mx //
drgqst // drgqst //
xavtenni // xavtenni //
xavbaseb // xavbaseb //
xavbassf //
xavbowl //
xavbox //
xavjmat // xavjmat //
tmy_thom // tmy_thom //
domfitex //
domfitch //
domfitad //
@source:xbox.cpp @source:xbox.cpp