mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
-i2cmem: Added 24C04 device type. [Ryan Holtz]
-spg2xx_io: Converted from magic register indices to enumerated values. Added SPI logging. [Ryan Holtz] -spg2xx_jakks: Split into separate game-key, plain, and touch drivers. [Ryan Holtz] -jak_batm: Hooked up I2C EEPROM to enable saving. [Ryan Holtz]
This commit is contained in:
parent
e776f26e05
commit
ddd5ae31b0
@ -3810,6 +3810,8 @@ files {
|
||||
MAME_DIR .. "src/mame/drivers/spg110.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_jakks.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_jakks_gkr.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_jakks_tvtouch.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_zone.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_zone_32bit.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/spg2xx_senario.cpp",
|
||||
|
@ -62,6 +62,7 @@ DEFINE_DEVICE_TYPE(I2CMEM, i2cmem_device, "i2cmem", "I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device, "x2404p", "X2404P I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device, "24c01", "24C01 I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device, "24c02", "24C02 I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C04, i2c_24c04_device, "24c04", "24C04 I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device, "24c08", "24C08 I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device, "24c16", "24C16 I2C Memory")
|
||||
DEFINE_DEVICE_TYPE(I2C_24C16A, i2c_24c16a_device, "24c16a", "24C16A I2C Memory")
|
||||
@ -127,6 +128,11 @@ i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *ta
|
||||
{
|
||||
}
|
||||
|
||||
i2c_24c04_device::i2c_24c04_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
|
||||
i2cmem_device(mconfig, I2C_24C04, tag, owner, clock, 8, 0x200)
|
||||
{
|
||||
}
|
||||
|
||||
i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
i2cmem_device(mconfig, I2C_24C08, tag, owner, clock, 0, 0x400)
|
||||
{
|
||||
|
@ -106,6 +106,7 @@ protected:
|
||||
DECLARE_I2C_DEVICE(x2404p)
|
||||
DECLARE_I2C_DEVICE(24c01)
|
||||
DECLARE_I2C_DEVICE(24c02)
|
||||
DECLARE_I2C_DEVICE(24c04)
|
||||
DECLARE_I2C_DEVICE(24c08)
|
||||
DECLARE_I2C_DEVICE(24c16);
|
||||
DECLARE_I2C_DEVICE(24c16a);
|
||||
@ -115,7 +116,7 @@ DECLARE_I2C_DEVICE(24c64);
|
||||
DECLARE_DEVICE_TYPE(I2CMEM, i2cmem_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C04, i2c_24c04_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device)
|
||||
DECLARE_DEVICE_TYPE(I2C_24C16A, i2c_24c16a_device)
|
||||
|
@ -26,15 +26,16 @@ DEFINE_DEVICE_TYPE(SPG28X_IO, spg28x_io_device, "spg28x_io", "SPG280-series Syst
|
||||
#define LOG_SIO (1U << 26)
|
||||
#define LOG_EXT_MEM (1U << 27)
|
||||
#define LOG_EXTINT (1U << 28)
|
||||
#define LOG_IO (LOG_IO_READS | LOG_IO_WRITES | LOG_IRQS | LOG_GPIO | LOG_UART | LOG_I2C | LOG_TIMERS | LOG_EXTINT | LOG_UNKNOWN_IO)
|
||||
#define LOG_SPI (1U << 29)
|
||||
#define LOG_IO (LOG_IO_READS | LOG_IO_WRITES | LOG_IRQS | LOG_GPIO | LOG_UART | LOG_I2C | LOG_TIMERS | LOG_EXTINT | LOG_UNKNOWN_IO | LOG_SPI)
|
||||
#define LOG_ALL (LOG_IO | LOG_VLINES | LOG_SEGMENT | LOG_WATCHDOG | LOG_FIQ | LOG_SIO | LOG_EXT_MEM)
|
||||
|
||||
#define VERBOSE (0)
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
#define IO_IRQ_ENABLE m_io_regs[0x21]
|
||||
#define IO_IRQ_STATUS m_io_regs[0x22]
|
||||
#define IO_IRQ_ENABLE m_io_regs[REG_INT_CTRL]
|
||||
#define IO_IRQ_STATUS m_io_regs[REG_INT_CLEAR]
|
||||
|
||||
spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, type, tag, owner, clock),
|
||||
@ -149,9 +150,9 @@ void spg2xx_io_device::device_reset()
|
||||
m_timer_b_divisor = 0;
|
||||
m_timer_b_tick_rate = 0;
|
||||
|
||||
m_io_regs[0x23] = 0x0028;
|
||||
m_io_regs[0x2c] = 0x1418;
|
||||
m_io_regs[0x2d] = 0x1658;
|
||||
m_io_regs[REG_EXT_MEMORY_CTRL] = 0x0028;
|
||||
m_io_regs[REG_PRNG1] = 0x1418;
|
||||
m_io_regs[REG_PRNG2] = 0x1658;
|
||||
|
||||
m_uart_rx_available = false;
|
||||
memset(m_uart_rx_fifo, 0, ARRAY_LENGTH(m_uart_rx_fifo));
|
||||
@ -182,20 +183,20 @@ void spg2xx_io_device::device_reset()
|
||||
void spg2xx_io_device::uart_rx(uint8_t data)
|
||||
{
|
||||
LOGMASKED(LOG_UART, "uart_rx: Pulling %02x into receive FIFO\n", data);
|
||||
if (BIT(m_io_regs[0x30], 6))
|
||||
if (BIT(m_io_regs[REG_UART_CTRL], 6))
|
||||
{
|
||||
m_uart_rx_fifo[m_uart_rx_fifo_end] = data;
|
||||
m_uart_rx_fifo_end = (m_uart_rx_fifo_end + 1) % ARRAY_LENGTH(m_uart_rx_fifo);
|
||||
m_uart_rx_fifo_count++;
|
||||
if (m_uart_rx_timer->remaining() == attotime::never)
|
||||
m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[REG_UART_CTRL], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t spg2xx_io_device::clock_rng(int which)
|
||||
{
|
||||
const uint16_t value = m_io_regs[0x2c + which];
|
||||
m_io_regs[0x2c + which] = ((value << 1) | (BIT(value, 14) ^ BIT(value, 13))) & 0x7fff;
|
||||
const uint16_t value = m_io_regs[REG_PRNG1 + which];
|
||||
m_io_regs[REG_PRNG1 + which] = ((value << 1) | (BIT(value, 14) ^ BIT(value, 13))) & 0x7fff;
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -210,54 +211,54 @@ READ16_MEMBER(spg2xx_io_device::io_r)
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x01: case 0x06: case 0x0b: // GPIO Data Port A/B/C
|
||||
case REG_IOA_DATA: case REG_IOB_DATA: case REG_IOC_DATA:
|
||||
do_gpio(offset, false);
|
||||
LOGMASKED(LOG_GPIO, "%s: io_r: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - 1) % 5], gpioports[(offset - 1) / 5], m_io_regs[offset]);
|
||||
LOGMASKED(LOG_GPIO, "%s: io_r: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - REG_IOA_DATA) % 5], gpioports[(offset - REG_IOA_DATA) / 5], m_io_regs[offset]);
|
||||
val = m_io_regs[offset];
|
||||
break;
|
||||
|
||||
case 0x02: case 0x03: case 0x04: case 0x05:
|
||||
case 0x07: case 0x08: case 0x09: case 0x0a:
|
||||
case 0x0c: case 0x0d: case 0x0e: case 0x0f: // Other GPIO regs
|
||||
LOGMASKED(LOG_GPIO, "%s: io_r: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - 1) % 5], gpioports[(offset - 1) / 5], m_io_regs[offset]);
|
||||
case REG_IOA_BUFFER: case REG_IOA_DIR: case REG_IOA_ATTRIB: case REG_IOA_MASK:
|
||||
case REG_IOB_BUFFER: case REG_IOB_DIR: case REG_IOB_ATTRIB: case REG_IOB_MASK:
|
||||
case REG_IOC_BUFFER: case REG_IOC_DIR: case REG_IOC_ATTRIB: case REG_IOC_MASK:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_r: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - REG_IOA_DATA) % 5], gpioports[(offset - REG_IOA_DATA) / 5], m_io_regs[offset]);
|
||||
break;
|
||||
|
||||
case 0x10: // Timebase Control
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: Timebase Control = %04x\n", machine().describe_context(), val);
|
||||
case REG_TIMEBASE_SETUP:
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: Timebase Setup = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x12: // Timer A Data
|
||||
case REG_TIMERA_DATA:
|
||||
LOGMASKED(LOG_IO_WRITES, "%s: io_r: Timer A Data = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x1c: // Video line counter
|
||||
case REG_VERT_LINE:
|
||||
val = m_screen->vpos();
|
||||
LOGMASKED(LOG_VLINES, "%s: io_r: Video Line = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x20: // System Control
|
||||
case REG_SYSTEM_CTRL:
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: System Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x21: // IRQ Control
|
||||
case REG_INT_CTRL:
|
||||
LOGMASKED(LOG_IRQS, "%s: io_r: I/O IRQ Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x22: // IRQ Status
|
||||
case REG_INT_CLEAR:
|
||||
LOGMASKED(LOG_IRQS, "%s: io_r: I/O IRQ Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x23: // External Memory Control
|
||||
case REG_EXT_MEMORY_CTRL:
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: Ext. Memory Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x25: // ADC Control
|
||||
case REG_ADC_CTRL:
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: ADC Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x27: // ADC Data
|
||||
case REG_ADC_DATA:
|
||||
{
|
||||
m_io_regs[0x27] = 0;
|
||||
m_io_regs[REG_ADC_DATA] = 0;
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
IO_IRQ_STATUS &= ~0x2000;
|
||||
const uint16_t changed = (old & IO_IRQ_ENABLE) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
@ -267,32 +268,26 @@ READ16_MEMBER(spg2xx_io_device::io_r)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x29: // Wakeup Source
|
||||
case REG_WAKEUP_SOURCE:
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: Wakeup Source = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x2b:
|
||||
{
|
||||
uint16_t pal = m_pal_read_cb();
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: NTSC/PAL = %04x\n", machine().describe_context(), pal);
|
||||
return pal;
|
||||
}
|
||||
case REG_NTSC_PAL:
|
||||
val = m_pal_read_cb();
|
||||
LOGMASKED(LOG_IO_READS, "%s: io_r: NTSC/PAL = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x2c: // PRNG 0
|
||||
{
|
||||
case REG_PRNG1:
|
||||
return clock_rng(0);
|
||||
}
|
||||
|
||||
case 0x2d: // PRNG 1
|
||||
{
|
||||
case REG_PRNG2:
|
||||
return clock_rng(1);
|
||||
}
|
||||
|
||||
case 0x2e: // FIQ Source Select
|
||||
case REG_FIQ_SEL:
|
||||
LOGMASKED(LOG_FIQ, "%s: io_r: FIQ Source Select = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x2f: // Data Segment
|
||||
case REG_DATA_SEGMENT:
|
||||
val = m_cpu->get_ds();
|
||||
LOGMASKED(LOG_SEGMENT, "%s: io_r: Data Segment = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
@ -315,24 +310,24 @@ READ16_MEMBER(spg2xx_io_device::io_extended_r)
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x30: // UART Control
|
||||
case REG_UART_CTRL:
|
||||
LOGMASKED(LOG_UART, "%s: io_r: UART Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x31: // UART Status
|
||||
case REG_UART_STATUS:
|
||||
LOGMASKED(LOG_UART, "%s: io_r: UART Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x36: // UART RX Data
|
||||
case REG_UART_RXBUF:
|
||||
if (m_uart_rx_available)
|
||||
{
|
||||
m_io_regs[0x31] &= ~0x0081;
|
||||
m_io_regs[REG_UART_STATUS] &= ~0x0081;
|
||||
LOGMASKED(LOG_UART, "UART Rx data is available, clearing bits\n");
|
||||
if (m_uart_rx_fifo_count)
|
||||
{
|
||||
LOGMASKED(LOG_UART, "%s: Remaining count %d, value %02x\n", machine().describe_context(), m_uart_rx_fifo_count, m_uart_rx_fifo[m_uart_rx_fifo_start]);
|
||||
m_io_regs[0x36] = m_uart_rx_fifo[m_uart_rx_fifo_start];
|
||||
val = m_io_regs[0x36];
|
||||
m_io_regs[REG_UART_RXBUF] = m_uart_rx_fifo[m_uart_rx_fifo_start];
|
||||
val = m_io_regs[REG_UART_RXBUF];
|
||||
m_uart_rx_fifo_start = (m_uart_rx_fifo_start + 1) % ARRAY_LENGTH(m_uart_rx_fifo);
|
||||
m_uart_rx_fifo_count--;
|
||||
|
||||
@ -345,7 +340,7 @@ READ16_MEMBER(spg2xx_io_device::io_extended_r)
|
||||
LOGMASKED(LOG_UART, "Remaining count %d, setting up timer\n", m_uart_rx_fifo_count);
|
||||
//uart_receive_tick();
|
||||
if (m_uart_rx_timer->remaining() == attotime::never)
|
||||
m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[REG_UART_CTRL], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -355,46 +350,70 @@ READ16_MEMBER(spg2xx_io_device::io_extended_r)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_io_regs[0x37] |= 0x2000;
|
||||
m_io_regs[REG_UART_RXFIFO] |= 0x2000;
|
||||
}
|
||||
LOGMASKED(LOG_UART, "%s: io_r: UART Rx Data = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x37: // UART Rx FIFO Control
|
||||
case REG_UART_RXFIFO:
|
||||
val &= ~0x0070;
|
||||
val |= (m_uart_rx_available ? 7 : 0) << 4;
|
||||
LOGMASKED(LOG_UART, "%s: io_r: UART Rx FIFO Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x50: // SIO Setup
|
||||
case REG_SPI_CTRL:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SPI_TXSTATUS:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Tx Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SPI_TXDATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Tx Data = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SPI_RXSTATUS:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Rx Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SPI_RXDATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Rx Data = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SPI_MISC:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Misc. = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case REG_SIO_SETUP:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SIO Setup = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x51: // SIO Status
|
||||
case REG_SIO_STATUS:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SIO Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x54: // SIO Data
|
||||
case REG_SIO_DATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SIO Data = %04x\n", machine().describe_context(), val);
|
||||
if ((m_io_regs[0x51] & 0x8000) && !m_sio_writing)
|
||||
if ((m_io_regs[REG_SIO_STATUS] & 0x8000) && !m_sio_writing)
|
||||
{
|
||||
m_sio_bits_remaining--;
|
||||
if (m_sio_bits_remaining == 0)
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
m_io_regs[REG_SIO_STATUS] &= ~0x8000;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x58: // I2C Command ( tvgogo )
|
||||
case REG_I2C_CMD:
|
||||
LOGMASKED(LOG_I2C, "%s: io_r: I2C Command = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x59: // I2C Status
|
||||
case REG_I2C_STATUS:
|
||||
LOGMASKED(LOG_I2C, "%s: io_r: I2C Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x5e: // I2C Data In
|
||||
case REG_I2C_DATA_IN: // I2C Data In
|
||||
LOGMASKED(LOG_I2C, "%s: io_r: I2C Data In = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
@ -422,9 +441,9 @@ void spg2xx_io_device::update_porta_special_modes()
|
||||
};
|
||||
for (int bit = 15; bit >= 0; bit--)
|
||||
{
|
||||
if (!BIT(m_io_regs[0x05], bit))
|
||||
if (!BIT(m_io_regs[REG_IOA_MASK], bit))
|
||||
continue;
|
||||
uint8_t type = (BIT(m_io_regs[0x03], bit) << 1) | BIT(m_io_regs[0x00], 0);
|
||||
uint8_t type = (BIT(m_io_regs[REG_IOA_DIR], bit) << 1) | BIT(m_io_regs[REG_IO_MODE], 0);
|
||||
LOGMASKED(LOG_GPIO, " Bit %2d: %s\n", bit, s_pa_special[type][bit]);
|
||||
}
|
||||
}
|
||||
@ -445,16 +464,16 @@ void spg2xx_io_device::update_portb_special_modes()
|
||||
};
|
||||
for (int bit = 7; bit >= 0; bit--)
|
||||
{
|
||||
if (!BIT(m_io_regs[0x0a], bit))
|
||||
if (!BIT(m_io_regs[REG_IOB_MASK], bit))
|
||||
continue;
|
||||
uint8_t type = (BIT(m_io_regs[0x08], bit) << 1) | BIT(m_io_regs[0x00], 1);
|
||||
uint8_t type = (BIT(m_io_regs[REG_IOB_DIR], bit) << 1) | BIT(m_io_regs[REG_IO_MODE], 1);
|
||||
LOGMASKED(LOG_GPIO, " Bit %2d: %s\n", bit, s_pb_special[type][bit]);
|
||||
}
|
||||
}
|
||||
|
||||
void spg2xx_io_device::update_timer_b_rate()
|
||||
{
|
||||
switch (m_io_regs[0x17] & 7)
|
||||
switch (m_io_regs[REG_TIMERB_CTRL] & 7)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
@ -490,10 +509,10 @@ void spg2xx_io_device::update_timer_ab_src()
|
||||
|
||||
void spg2xx_io_device::increment_timer_a()
|
||||
{
|
||||
m_io_regs[0x12]++;
|
||||
if (m_io_regs[0x12] == 0)
|
||||
m_io_regs[REG_TIMERA_DATA]++;
|
||||
if (m_io_regs[REG_TIMERA_DATA] == 0)
|
||||
{
|
||||
m_io_regs[0x12] = m_timer_a_preload;
|
||||
m_io_regs[REG_TIMERA_DATA] = m_timer_a_preload;
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
IO_IRQ_STATUS |= 0x0800;
|
||||
const uint16_t changed = (old & IO_IRQ_ENABLE) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
@ -507,10 +526,10 @@ void spg2xx_io_device::increment_timer_a()
|
||||
|
||||
void spg2xx_io_device::update_timer_c_src()
|
||||
{
|
||||
m_io_regs[0x16]++;
|
||||
if (m_io_regs[0x16] == 0)
|
||||
m_io_regs[REG_TIMERB_DATA]++;
|
||||
if (m_io_regs[REG_TIMERB_DATA] == 0)
|
||||
{
|
||||
m_io_regs[0x16] = m_timer_b_preload;
|
||||
m_io_regs[REG_TIMERB_DATA] = m_timer_b_preload;
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
IO_IRQ_STATUS |= 0x0400;
|
||||
const uint16_t changed = (old & IO_IRQ_ENABLE) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
@ -525,17 +544,17 @@ void spg2xx_io_device::update_timer_c_src()
|
||||
|
||||
WRITE16_MEMBER(spg28x_io_device::io_extended_w)
|
||||
{
|
||||
offset += 0x30;
|
||||
offset += REG_UART_CTRL;
|
||||
|
||||
if (offset == 0x33)
|
||||
if (offset == REG_UART_BAUD1)
|
||||
{
|
||||
m_io_regs[offset] = data;
|
||||
m_uart_baud_rate = 27000000 / (0x10000 - m_io_regs[0x33]);
|
||||
m_uart_baud_rate = 27000000 / (0x10000 - m_io_regs[REG_UART_BAUD1]);
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Baud Rate scaler = %04x (%d baud)\n", machine().describe_context(), data, m_uart_baud_rate);
|
||||
}
|
||||
else
|
||||
{
|
||||
spg2xx_io_device::io_extended_w(space, offset-0x30, data, mem_mask);
|
||||
spg2xx_io_device::io_extended_w(space, offset - REG_UART_CTRL, data, mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -546,12 +565,12 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00: // GPIO special function select
|
||||
case REG_IO_MODE:
|
||||
{
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: GPIO Configuration = %04x (IOBWake:%d, IOAWake:%d, IOBSpecSel:%d, IOASpecSel:%d)\n", machine().describe_context(), data
|
||||
, BIT(data, 4), BIT(data, 3), BIT(data, 1), BIT(data, 0));
|
||||
const uint16_t old = m_io_regs[offset];
|
||||
m_io_regs[offset] = data;
|
||||
const uint16_t old = m_io_regs[REG_IO_MODE];
|
||||
m_io_regs[REG_IO_MODE] = data;
|
||||
const uint16_t changed = old ^ data;
|
||||
if (BIT(changed, 0))
|
||||
update_porta_special_modes();
|
||||
@ -560,45 +579,45 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x01: case 0x06: case 0x0b: // GPIO data, port A/B/C
|
||||
case REG_IOA_DATA: case REG_IOB_DATA: case REG_IOC_DATA:
|
||||
offset++;
|
||||
// Intentional fallthrough - we redirect data register writes to the buffer register.
|
||||
|
||||
case 0x02: case 0x04: // Port A
|
||||
case 0x07: case 0x09: // Port B
|
||||
case 0x0c: case 0x0d: case 0x0e: case 0x0f: // Port C
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - 1) % 5], gpioports[(offset - 1) / 5], data);
|
||||
case REG_IOA_BUFFER: case REG_IOA_ATTRIB:
|
||||
case REG_IOB_BUFFER: case REG_IOB_ATTRIB:
|
||||
case REG_IOC_BUFFER: case REG_IOC_DIR: case REG_IOC_ATTRIB: case REG_IOC_MASK:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: %s %c = %04x\n", machine().describe_context(), gpioregs[(offset - REG_IOA_DATA) % 5], gpioports[(offset - REG_IOA_DATA) / 5], data);
|
||||
m_io_regs[offset] = data;
|
||||
do_gpio(offset, true);
|
||||
break;
|
||||
|
||||
case 0x03: // Port A Direction
|
||||
case REG_IOA_DIR:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: GPIO Direction Port A = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_IOA_DIR] = data;
|
||||
update_porta_special_modes();
|
||||
do_gpio(offset, true);
|
||||
break;
|
||||
|
||||
case 0x08: // Port B Direction
|
||||
case REG_IOB_DIR:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: GPIO Direction Port B = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_IOB_DIR] = data;
|
||||
update_portb_special_modes();
|
||||
do_gpio(offset, true);
|
||||
break;
|
||||
|
||||
case 0x05: // Port A Special
|
||||
case REG_IOA_MASK:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: Port A Special Function Select: %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_IOA_MASK] = data;
|
||||
update_porta_special_modes();
|
||||
break;
|
||||
|
||||
case 0x0a: // Port B Special
|
||||
case REG_IOB_MASK:
|
||||
LOGMASKED(LOG_GPIO, "%s: io_w: Port B Special Function Select: %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_IOB_MASK] = data;
|
||||
update_portb_special_modes();
|
||||
break;
|
||||
|
||||
case 0x10: // Timebase Control
|
||||
case REG_TIMEBASE_SETUP:
|
||||
{
|
||||
static const char* const s_tmb1_sel[2][4] =
|
||||
{
|
||||
@ -622,7 +641,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
};
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timebase Control = %04x (Source:%s, TMB2:%s, TMB1:%s)\n", machine().describe_context(), data,
|
||||
BIT(data, 4) ? "27MHz" : "32768Hz", s_tmb2_sel[BIT(data, 4)][(data >> 2) & 3], s_tmb1_sel[BIT(data, 4)][data & 3]);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_TIMEBASE_SETUP] = data;
|
||||
const uint8_t hifreq = BIT(data, 4);
|
||||
const uint32_t tmb1freq = s_tmb1_freq[hifreq][data & 3];
|
||||
m_tmb1->adjust(attotime::from_hz(tmb1freq), 0, attotime::from_hz(tmb1freq));
|
||||
@ -631,26 +650,26 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x11: // Timebase Clear
|
||||
case REG_TIMEBASE_CLEAR:
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timebase Clear = %04x\n", machine().describe_context(), data);
|
||||
m_2khz_divider = 0;
|
||||
m_1khz_divider = 0;
|
||||
m_4hz_divider = 0;
|
||||
break;
|
||||
|
||||
case 0x12: // Timer A Data
|
||||
case REG_TIMERA_DATA:
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer A Data = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_TIMERA_DATA] = data;
|
||||
m_timer_a_preload = data;
|
||||
break;
|
||||
|
||||
case 0x13: // Timer A Control
|
||||
case REG_TIMERA_CTRL:
|
||||
{
|
||||
static const char* const s_source_a[8] = { "0", "0", "32768Hz", "8192Hz", "4096Hz", "1", "0", "ExtClk1" };
|
||||
static const char* const s_source_b[8] = { "2048Hz", "1024Hz", "256Hz", "TMB1", "4Hz", "2Hz", "1", "ExtClk2" };
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer A Control = %04x (Source A:%s, Source B:%s)\n", machine().describe_context(), data,
|
||||
s_source_a[data & 7], s_source_b[(data >> 3) & 7]);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_TIMERA_CTRL] = data;
|
||||
int timer_a_rate = 0;
|
||||
switch (data & 7)
|
||||
{
|
||||
@ -704,7 +723,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x15: // Timer A IRQ Clear
|
||||
case REG_TIMERA_IRQCLR:
|
||||
{
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer A IRQ Clear\n", machine().describe_context());
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
@ -715,28 +734,28 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x16: // Timer B Data
|
||||
case REG_TIMERB_DATA:
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer B Data = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_TIMERB_DATA] = data;
|
||||
m_timer_b_preload = data;
|
||||
break;
|
||||
|
||||
case 0x17: // Timer B Control
|
||||
case REG_TIMERB_CTRL:
|
||||
{
|
||||
static const char* const s_source_c[8] = { "0", "0", "32768Hz", "8192Hz", "4096Hz", "1", "0", "ExtClk1" };
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer B Control = %04x (Source C:%s)\n", machine().describe_context(), data, s_source_c[data & 7]);
|
||||
m_io_regs[offset] = data;
|
||||
if (m_io_regs[0x18] == 1)
|
||||
m_io_regs[REG_TIMERB_CTRL] = data;
|
||||
if (m_io_regs[REG_TIMERB_ON] == 1)
|
||||
{
|
||||
update_timer_b_rate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x18: // Timer B Enable
|
||||
case REG_TIMERB_ON:
|
||||
{
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer B Enable = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data & 1;
|
||||
m_io_regs[REG_TIMERB_ON] = data & 1;
|
||||
if (data & 1)
|
||||
{
|
||||
update_timer_b_rate();
|
||||
@ -748,7 +767,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x19: // Timer B IRQ Clear
|
||||
case REG_TIMERB_IRQCLR:
|
||||
{
|
||||
LOGMASKED(LOG_TIMERS, "%s: io_w: Timer B IRQ Clear\n", machine().describe_context());
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
@ -759,7 +778,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x20: // System Control
|
||||
case REG_SYSTEM_CTRL:
|
||||
{
|
||||
static const char* const s_sysclk[4] = { "13.5MHz", "27MHz", "27MHz NoICE", "54MHz" };
|
||||
static const char* const s_lvd_voltage[4] = { "2.7V", "2.9V", "3.1V", "3.3V" };
|
||||
@ -768,8 +787,8 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
, data, BIT(data, 15), BIT(data, 14), s_sysclk[(data >> 12) & 3], BIT(data, 11), BIT(data, 9), BIT(data, 8));
|
||||
LOGMASKED(LOG_IO_WRITES, " LVDEn:%d, LVDVoltSel:%s, 32kHzDisable:%d, StrWkMode:%s, VDACDisable:%d, ADACDisable:%d, ADACOutDisable:%d)\n"
|
||||
, BIT(data, 7), s_lvd_voltage[(data >> 5) & 3], BIT(data, 4), s_weak_strong[BIT(data, 3)], BIT(data, 2), BIT(data, 1), BIT(data, 0));
|
||||
const uint16_t old = m_io_regs[offset];
|
||||
m_io_regs[offset] = data;
|
||||
const uint16_t old = m_io_regs[REG_SYSTEM_CTRL];
|
||||
m_io_regs[REG_SYSTEM_CTRL] = data;
|
||||
if (BIT(old, 15) != BIT(data, 15))
|
||||
{
|
||||
if (BIT(data, 15))
|
||||
@ -780,18 +799,18 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x21: // IRQ Enable
|
||||
case REG_INT_CTRL:
|
||||
{
|
||||
LOGMASKED(LOG_IRQS, "%s: io_w: IRQ Enable = %04x\n", machine().describe_context(), data);
|
||||
const uint16_t old = IO_IRQ_ENABLE;
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_INT_CTRL] = data;
|
||||
const uint16_t changed = (IO_IRQ_STATUS & old) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
if (changed)
|
||||
check_irqs(changed);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x22: // IRQ Acknowledge
|
||||
case REG_INT_CLEAR:
|
||||
{
|
||||
LOGMASKED(LOG_IRQS, "%s: io_w: IRQ Acknowledge = %04x\n", machine().describe_context(), data);
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
@ -807,7 +826,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x23: // External Memory Control
|
||||
case REG_EXT_MEMORY_CTRL:
|
||||
{
|
||||
static const char* const s_bus_arb[8] =
|
||||
{
|
||||
@ -837,28 +856,28 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
LOGMASKED(LOG_EXT_MEM, " ROMAddrDecode:%s\n", s_addr_decode[(data >> 6) & 3]);
|
||||
LOGMASKED(LOG_EXT_MEM, " RAMAddrDecode:%s\n", s_ram_decode[(data >> 8) & 15]);
|
||||
m_chip_sel((data >> 6) & 3);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_EXT_MEMORY_CTRL] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x24: // Watchdog
|
||||
LOGMASKED(LOG_WATCHDOG, "%s: io_w: Watchdog Pet = %04x\n", machine().describe_context(), data);
|
||||
if (data == 0x55aa && BIT(m_io_regs[0x20], 15))
|
||||
case REG_WATCHDOG_CLEAR:
|
||||
LOGMASKED(LOG_WATCHDOG, "%s: io_w: Watchdog Clear = %04x\n", machine().describe_context(), data);
|
||||
if (data == 0x55aa && BIT(m_io_regs[REG_SYSTEM_CTRL], 15))
|
||||
{
|
||||
m_watchdog_timer->adjust(attotime::from_msec(750));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x25: // ADC Control
|
||||
case REG_ADC_CTRL:
|
||||
{
|
||||
LOGMASKED(LOG_IO_WRITES, "%s: io_w: ADC Control = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data & ~0x1000;
|
||||
m_io_regs[REG_ADC_CTRL] = data & ~0x1000;
|
||||
if (BIT(data, 0))
|
||||
{
|
||||
m_io_regs[0x27] = 0x8000 | (m_adc_in[BIT(data, 5)]() & 0x7fff);
|
||||
m_io_regs[0x25] |= 0x2000;
|
||||
m_io_regs[REG_ADC_DATA] = 0x8000 | (m_adc_in[BIT(data, 5)]() & 0x7fff);
|
||||
m_io_regs[REG_ADC_CTRL] |= 0x2000;
|
||||
}
|
||||
if (BIT(data, 12) && !BIT(m_io_regs[offset], 1))
|
||||
if (BIT(data, 12) && !BIT(m_io_regs[REG_ADC_CTRL], 1))
|
||||
{
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
IO_IRQ_STATUS |= 0x2000;
|
||||
@ -871,14 +890,14 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x28: // Sleep Mode
|
||||
case REG_SLEEP_MODE:
|
||||
LOGMASKED(LOG_IO_WRITES, "%s: io_w: Sleep Mode (%s enter value) = %04x\n", machine().describe_context(), data == 0xaa55 ? "valid" : "invalid", data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_SLEEP_MODE] = data;
|
||||
break;
|
||||
|
||||
case 0x29: // Wakeup Source
|
||||
{
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_WAKEUP_SOURCE] = data;
|
||||
static const char* const s_sources[8] =
|
||||
{
|
||||
"TMB1", "TMB2", "2Hz", "4Hz", "1024Hz", "2048Hz", "4096Hz", "Key"
|
||||
@ -901,29 +920,29 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x2c: // PRNG 0 seed
|
||||
case REG_PRNG1:
|
||||
LOGMASKED(LOG_IO_WRITES, "%s: io_w: PRNG 0 seed = %04x\n", machine().describe_context(), data & 0x7fff);
|
||||
m_io_regs[offset] = data & 0x7fff;
|
||||
m_io_regs[REG_PRNG1] = data & 0x7fff;
|
||||
break;
|
||||
|
||||
case 0x2d: // PRNG 1 seed
|
||||
case REG_PRNG2:
|
||||
LOGMASKED(LOG_IO_WRITES, "%s: io_w: PRNG 1 seed = %04x\n", machine().describe_context(), data & 0x7fff);
|
||||
m_io_regs[offset] = data & 0x7fff;
|
||||
m_io_regs[REG_PRNG2] = data & 0x7fff;
|
||||
break;
|
||||
|
||||
case 0x2e: // FIQ Source Select
|
||||
case REG_FIQ_SEL:
|
||||
{
|
||||
static const char* const s_fiq_select[8] =
|
||||
{
|
||||
"PPU", "SPU Channel", "Timer A", "Timer B", "UART/SPI", "External", "Reserved", "None"
|
||||
};
|
||||
LOGMASKED(LOG_FIQ, "%s: io_w: FIQ Source Select (not yet implemented) = %04x, %s\n", machine().describe_context(), data, s_fiq_select[data & 7]);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_FIQ_SEL] = data;
|
||||
m_fiq_vector_w(data & 7);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x2f: // Data Segment
|
||||
case REG_DATA_SEGMENT:
|
||||
m_cpu->set_ds(data & 0x3f);
|
||||
LOGMASKED(LOG_SEGMENT, "%s: io_w: Data Segment = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
@ -942,49 +961,49 @@ WRITE16_MEMBER(spg2xx_io_device::io_extended_w)
|
||||
{
|
||||
// this set of registers might only be on the 24x not the 11x
|
||||
|
||||
offset += 0x30;
|
||||
offset += REG_UART_CTRL;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
|
||||
case 0x30: // UART Control
|
||||
case REG_UART_CTRL: // UART Control
|
||||
{
|
||||
static const char* const s_9th_bit[4] = { "0", "1", "Odd", "Even" };
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Control = %04x (TxEn:%d, RxEn:%d, Bits:%d, MultiProc:%d, 9thBit:%s, TxIntEn:%d, RxIntEn:%d\n",
|
||||
machine().describe_context(), data, BIT(data, 7), BIT(data, 6), BIT(data, 5) ? 9 : 8, BIT(data, 4), s_9th_bit[(data >> 2) & 3],
|
||||
BIT(data, 1), BIT(data, 0));
|
||||
const uint16_t changed = m_io_regs[offset] ^ data;
|
||||
m_io_regs[offset] = data;
|
||||
const uint16_t changed = m_io_regs[REG_UART_CTRL] ^ data;
|
||||
m_io_regs[REG_UART_CTRL] = data;
|
||||
if (!BIT(data, 6))
|
||||
{
|
||||
m_uart_rx_available = false;
|
||||
m_io_regs[0x36] = 0;
|
||||
m_io_regs[REG_UART_RXBUF] = 0;
|
||||
}
|
||||
if (BIT(changed, 7))
|
||||
{
|
||||
if (BIT(data, 7))
|
||||
{
|
||||
m_io_regs[0x31] |= 0x0002;
|
||||
m_io_regs[REG_UART_STATUS] |= 0x0002;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_io_regs[0x31] &= ~0x0042;
|
||||
m_io_regs[REG_UART_STATUS] &= ~0x0042;
|
||||
m_uart_tx_timer->adjust(attotime::never);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x31: // UART Status
|
||||
case REG_UART_STATUS:
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Status = %04x\n", machine().describe_context(), data);
|
||||
if (BIT(data, 0))
|
||||
{
|
||||
m_io_regs[0x31] &= ~1;
|
||||
m_io_regs[REG_UART_STATUS] &= ~1;
|
||||
m_uart_rx_irq = false;
|
||||
}
|
||||
if (BIT(data, 1))
|
||||
{
|
||||
m_io_regs[0x31] &= ~2;
|
||||
m_io_regs[REG_UART_STATUS] &= ~2;
|
||||
m_uart_tx_irq = false;
|
||||
}
|
||||
if (!m_uart_rx_irq && !m_uart_tx_irq)
|
||||
@ -997,46 +1016,93 @@ WRITE16_MEMBER(spg2xx_io_device::io_extended_w)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x33: // UART Baud Rate (low byte)
|
||||
case 0x34: // UART Baud Rate (high byte)
|
||||
case REG_UART_BAUD1: // (low byte)
|
||||
case REG_UART_BAUD2: // (high byte)
|
||||
{
|
||||
m_io_regs[offset] = data;
|
||||
const uint32_t divisor = 16 * (0x10000 - ((m_io_regs[0x34] << 8) | m_io_regs[0x33]));
|
||||
const uint32_t divisor = 16 * (0x10000 - ((m_io_regs[REG_UART_BAUD2] << 8) | m_io_regs[REG_UART_BAUD1]));
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Baud Rate (%s byte): Baud rate = %d\n", offset == 0x33 ? "low" : "high", machine().describe_context(), 27000000 / divisor);
|
||||
m_uart_baud_rate = 27000000 / divisor;
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x35: // UART TX Data
|
||||
case REG_UART_TXBUF:
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Tx Data = %02x\n", machine().describe_context(), data & 0x00ff);
|
||||
m_io_regs[offset] = data;
|
||||
if (BIT(m_io_regs[0x30], 7))
|
||||
m_io_regs[REG_UART_TXBUF] = data;
|
||||
if (BIT(m_io_regs[REG_UART_CTRL], 7))
|
||||
{
|
||||
LOGMASKED(LOG_UART, "io_w: UART Tx: Clearing ready bit, setting busy bit, setting up timer\n");
|
||||
m_uart_tx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
m_io_regs[0x31] &= ~0x0002;
|
||||
m_io_regs[0x31] |= 0x0040;
|
||||
m_uart_tx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[REG_UART_CTRL], 5) ? 11 : 10, m_uart_baud_rate));
|
||||
m_io_regs[REG_UART_STATUS] &= ~0x0002;
|
||||
m_io_regs[REG_UART_STATUS] |= 0x0040;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x36: // UART RX Data
|
||||
case REG_UART_RXBUF:
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Rx Data (read-only) = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case 0x37: // UART Rx FIFO Control
|
||||
case REG_UART_RXFIFO:
|
||||
LOGMASKED(LOG_UART, "%s: io_w: UART Rx FIFO Control = %04x (Reset:%d, Overrun:%d, Underrun:%d, Count:%d, Threshold:%d)\n",
|
||||
machine().describe_context(), data, BIT(data, 15), BIT(data, 14), BIT(data, 13), (data >> 4) & 7, data & 7);
|
||||
if (data & 0x8000)
|
||||
{
|
||||
m_uart_rx_available = false;
|
||||
m_io_regs[0x36] = 0;
|
||||
m_io_regs[REG_UART_RXBUF] = 0;
|
||||
}
|
||||
m_io_regs[offset] &= ~data & 0x6000;
|
||||
m_io_regs[offset] &= ~0x0007;
|
||||
m_io_regs[offset] |= data & 0x0007;
|
||||
m_io_regs[REG_UART_RXFIFO] &= ~data & 0x6000;
|
||||
m_io_regs[REG_UART_RXFIFO] &= ~0x0007;
|
||||
m_io_regs[REG_UART_RXFIFO] |= data & 0x0007;
|
||||
break;
|
||||
|
||||
case 0x50: // SIO Setup
|
||||
case REG_SPI_CTRL:
|
||||
{
|
||||
static const char* const s_spi_clock[8] = { "SYSCLK/2" , "SYSCLK/4", "SYSCLK/8", "SYSCLK/16", "SYSCLK/32", "SYSCLK/64", "SYSCLK/128", "Reserved" };
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Control = %04x (Enable:%d, Loopback:%d, Reset:%d, Mode:%s, Phase:%d, Polarity:%d, Clock:%s)\n", machine().describe_context(), data,
|
||||
BIT(data, 15), BIT(data, 13), BIT(data, 11), BIT(data, 8) ? "Slave" : "Master", BIT(data, 5), BIT(data, 4), s_spi_clock[data & 7]);
|
||||
m_io_regs[offset] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
case REG_SPI_TXSTATUS:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Tx Status = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] &= ~0x40f0;
|
||||
m_io_regs[offset] |= data & 0x40f0;
|
||||
if (BIT(data, 15))
|
||||
{
|
||||
m_io_regs[offset] &= ~0x8000;
|
||||
}
|
||||
break;
|
||||
|
||||
case REG_SPI_TXDATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Tx Data = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case REG_SPI_RXSTATUS:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Rx Status = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] &= ~0x40f0;
|
||||
m_io_regs[offset] |= data & 0x40f0;
|
||||
if (BIT(data, 15))
|
||||
{
|
||||
m_io_regs[offset] &= ~0x8000;
|
||||
}
|
||||
break;
|
||||
|
||||
case REG_SPI_RXDATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Rx Data = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case REG_SPI_MISC:
|
||||
{
|
||||
static const char* const s_spi_clock[8] = { "SYSCLK/2" , "SYSCLK/4", "SYSCLK/8", "SYSCLK/16", "SYSCLK/32", "SYSCLK/64", "SYSCLK/128", "Reserved" };
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SPI Misc. = %04x (Over:%d, SmartInt:%d, Busy:%d, RxFull:%d, RxNotEmpty:%d, TxNotFull:%d, TxEmpty:%d)\n", machine().describe_context(), data,
|
||||
BIT(data, 9), BIT(data, 8), BIT(data, 4), BIT(data, 3), BIT(data, 2), BIT(data, 1), BIT(data, 0));
|
||||
m_io_regs[offset] &= ~0x0300;
|
||||
m_io_regs[offset] |= data & 0x0300;
|
||||
break;
|
||||
}
|
||||
|
||||
case REG_SIO_SETUP:
|
||||
{
|
||||
static const char* const s_addr_mode[4] = { "16-bit", "None", "8-bit", "24-bit" };
|
||||
static const char* const s_baud_rate[4] = { "/16", "/4", "/8", "/32" };
|
||||
@ -1046,80 +1112,80 @@ WRITE16_MEMBER(spg2xx_io_device::io_extended_w)
|
||||
, BIT(data, 5), BIT(data, 4), s_baud_rate[(data >> 2) & 3], s_addr_mode[data & 3]);
|
||||
if (BIT(data, 10))
|
||||
{
|
||||
m_io_regs[0x51] |= 0x8000;
|
||||
m_io_regs[REG_SIO_STATUS] |= 0x8000;
|
||||
m_sio_bits_remaining = BIT(data, 7) ? 16 : 8;
|
||||
m_sio_writing = BIT(data, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
m_io_regs[REG_SIO_STATUS] &= ~0x8000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x52: // SIO Start Address (low)
|
||||
case REG_SIO_ADDRL:
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Start Address (low) (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case 0x53: // SIO Start Address (hi)
|
||||
case REG_SIO_ADDRH:
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Start Address (hi) (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case 0x54: // SIO Data
|
||||
case REG_SIO_DATA:
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Data (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
if ((m_io_regs[0x51] & 0x8000) && m_sio_writing)
|
||||
if ((m_io_regs[REG_SIO_SETUP] & 0x8000) && m_sio_writing)
|
||||
{
|
||||
m_sio_bits_remaining--;
|
||||
if (m_sio_bits_remaining == 0)
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
m_io_regs[REG_SIO_STATUS] &= ~0x8000;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x55: // SIO Automatic Transmit Count
|
||||
case REG_SIO_AUTO_TX_NUM:
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Auto Transmit Count (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case 0x58: // I2C Command
|
||||
case REG_I2C_CMD:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Command = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_CMD] = data;
|
||||
do_i2c();
|
||||
break;
|
||||
|
||||
case 0x59: // I2C Status / Acknowledge
|
||||
case REG_I2C_STATUS:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Acknowledge = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] &= ~data;
|
||||
m_io_regs[REG_I2C_STATUS] &= ~data;
|
||||
break;
|
||||
|
||||
case 0x5a: // I2C Access Mode
|
||||
case REG_I2C_ACCESS:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Access Mode = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_ACCESS] = data;
|
||||
break;
|
||||
|
||||
case 0x5b: // I2C Device Address
|
||||
case REG_I2C_ADDR:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Device Address = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_ADDR] = data;
|
||||
break;
|
||||
|
||||
case 0x5c: // I2C Sub-Address
|
||||
case REG_I2C_SUBADDR:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Sub-Address = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_SUBADDR] = data;
|
||||
break;
|
||||
|
||||
case 0x5d: // I2C Data Out
|
||||
case REG_I2C_DATA_OUT:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Data Out = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_DATA_OUT] = data;
|
||||
break;
|
||||
|
||||
case 0x5e: // I2C Data In
|
||||
case REG_I2C_DATA_IN:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Data In = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_DATA_IN] = data;
|
||||
break;
|
||||
|
||||
case 0x5f: // I2C Controller Mode
|
||||
case REG_I2C_MODE:
|
||||
LOGMASKED(LOG_I2C, "%s: io_w: I2C Controller Mode = %04x\n", machine().describe_context(), data);
|
||||
m_io_regs[offset] = data;
|
||||
m_io_regs[REG_I2C_MODE] = data;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1224,11 +1290,11 @@ void spg2xx_io_device::system_timer_tick()
|
||||
|
||||
void spg2xx_io_device::uart_transmit_tick()
|
||||
{
|
||||
LOGMASKED(LOG_UART, "uart_transmit_tick: Transmitting %02x, setting TxReady, clearing TxBusy\n", (uint8_t)m_io_regs[0x35]);
|
||||
m_uart_tx((uint8_t)m_io_regs[0x35]);
|
||||
m_io_regs[0x31] |= 0x0002;
|
||||
m_io_regs[0x31] &= ~0x0040;
|
||||
if (BIT(m_io_regs[0x30], 1))
|
||||
LOGMASKED(LOG_UART, "uart_transmit_tick: Transmitting %02x, setting TxReady, clearing TxBusy\n", (uint8_t)m_io_regs[REG_UART_TXBUF]);
|
||||
m_uart_tx((uint8_t)m_io_regs[REG_UART_TXBUF]);
|
||||
m_io_regs[REG_UART_STATUS] |= 0x0002;
|
||||
m_io_regs[REG_UART_STATUS] &= ~0x0040;
|
||||
if (BIT(m_io_regs[REG_UART_CTRL], 1))
|
||||
{
|
||||
const uint16_t old = IO_IRQ_STATUS;
|
||||
IO_IRQ_STATUS |= 0x0100;
|
||||
@ -1245,9 +1311,9 @@ void spg2xx_io_device::uart_transmit_tick()
|
||||
void spg2xx_io_device::uart_receive_tick()
|
||||
{
|
||||
LOGMASKED(LOG_UART, "uart_receive_tick: Setting RBF and RxRDY\n");
|
||||
m_io_regs[0x31] |= 0x81;
|
||||
m_io_regs[REG_UART_STATUS] |= 0x81;
|
||||
m_uart_rx_available = true;
|
||||
if (BIT(m_io_regs[0x30], 0))
|
||||
if (BIT(m_io_regs[REG_UART_CTRL], 0))
|
||||
{
|
||||
LOGMASKED(LOG_UART, "uart_receive_tick: RxIntEn is set, setting rx_irq to true and setting UART IRQ\n");
|
||||
m_uart_rx_irq = true;
|
||||
@ -1387,12 +1453,12 @@ void spg2xx_io_device::do_gpio(uint32_t offset, bool write)
|
||||
|
||||
void spg2xx_io_device::do_i2c()
|
||||
{
|
||||
const uint16_t addr = ((m_io_regs[0x5b] & 0x06) << 7) | (uint8_t)m_io_regs[0x5c];
|
||||
const uint16_t addr = ((m_io_regs[REG_I2C_ADDR] & 0x06) << 7) | (uint8_t)m_io_regs[REG_I2C_SUBADDR];
|
||||
|
||||
if (m_io_regs[0x58] & 0x40) // Serial EEPROM read
|
||||
m_io_regs[0x5e] = m_i2c_r(addr);
|
||||
if (m_io_regs[REG_I2C_CMD] & 0x40) // Serial EEPROM read
|
||||
m_io_regs[REG_I2C_DATA_IN] = m_i2c_r(addr);
|
||||
else
|
||||
m_i2c_w(addr, m_io_regs[0x5d]);
|
||||
m_i2c_w(addr, m_io_regs[REG_I2C_DATA_OUT]);
|
||||
|
||||
m_io_regs[0x59] |= 1;
|
||||
m_io_regs[REG_I2C_STATUS] |= 1;
|
||||
}
|
||||
|
@ -56,6 +56,94 @@ protected:
|
||||
{
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
REG_IO_MODE,
|
||||
REG_IOA_DATA,
|
||||
REG_IOA_BUFFER,
|
||||
REG_IOA_DIR,
|
||||
REG_IOA_ATTRIB,
|
||||
REG_IOA_MASK,
|
||||
REG_IOB_DATA,
|
||||
REG_IOB_BUFFER,
|
||||
REG_IOB_DIR,
|
||||
REG_IOB_ATTRIB,
|
||||
REG_IOB_MASK,
|
||||
REG_IOC_DATA,
|
||||
REG_IOC_BUFFER,
|
||||
REG_IOC_DIR,
|
||||
REG_IOC_ATTRIB,
|
||||
REG_IOC_MASK,
|
||||
|
||||
REG_TIMEBASE_SETUP,
|
||||
REG_TIMEBASE_CLEAR,
|
||||
REG_TIMERA_DATA,
|
||||
REG_TIMERA_CTRL,
|
||||
REG_TIMERA_ON,
|
||||
REG_TIMERA_IRQCLR,
|
||||
REG_TIMERB_DATA,
|
||||
REG_TIMERB_CTRL,
|
||||
REG_TIMERB_ON,
|
||||
REG_TIMERB_IRQCLR,
|
||||
|
||||
REG_VERT_LINE = 0x1c,
|
||||
|
||||
REG_SYSTEM_CTRL = 0x20,
|
||||
REG_INT_CTRL,
|
||||
REG_INT_CLEAR,
|
||||
REG_EXT_MEMORY_CTRL,
|
||||
REG_WATCHDOG_CLEAR,
|
||||
REG_ADC_CTRL,
|
||||
REG_ADC_DATA = 0x27,
|
||||
|
||||
REG_SLEEP_MODE,
|
||||
REG_WAKEUP_SOURCE,
|
||||
REG_WAKEUP_TIME,
|
||||
|
||||
REG_NTSC_PAL,
|
||||
|
||||
REG_PRNG1 = 0x2c,
|
||||
REG_PRNG2,
|
||||
|
||||
REG_FIQ_SEL,
|
||||
REG_DATA_SEGMENT,
|
||||
|
||||
REG_UART_CTRL,
|
||||
REG_UART_STATUS,
|
||||
REG_UART_RESET,
|
||||
REG_UART_BAUD1,
|
||||
REG_UART_BAUD2,
|
||||
REG_UART_TXBUF,
|
||||
REG_UART_RXBUF,
|
||||
REG_UART_RXFIFO,
|
||||
|
||||
REG_SPI_CTRL = 0x40,
|
||||
REG_SPI_TXSTATUS,
|
||||
REG_SPI_TXDATA,
|
||||
REG_SPI_RXSTATUS,
|
||||
REG_SPI_RXDATA,
|
||||
REG_SPI_MISC,
|
||||
|
||||
REG_SIO_SETUP = 0x50,
|
||||
REG_SIO_STATUS,
|
||||
REG_SIO_ADDRL,
|
||||
REG_SIO_ADDRH,
|
||||
REG_SIO_DATA,
|
||||
REG_SIO_AUTO_TX_NUM,
|
||||
|
||||
REG_I2C_CMD = 0x58,
|
||||
REG_I2C_STATUS,
|
||||
REG_I2C_ACCESS,
|
||||
REG_I2C_ADDR,
|
||||
REG_I2C_SUBADDR,
|
||||
REG_I2C_DATA_OUT,
|
||||
REG_I2C_DATA_IN,
|
||||
REG_I2C_MODE,
|
||||
|
||||
REG_REGULATOR_CTRL = 0x60,
|
||||
REG_CLOCK_CTRL,
|
||||
REG_IO_DRIVE_CTRL
|
||||
};
|
||||
void check_extint_irq(int channel);
|
||||
void check_irqs(const uint16_t changed);
|
||||
|
||||
|
@ -1,162 +1,32 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz, David Haywood
|
||||
|
||||
// Note: even after the GameKey port was physically removed and the PCBs redesigned, many of the test modes still show the value read from the port (and many games still show the Game Key Ready splash screen on startup)
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/spg2xx.h"
|
||||
|
||||
#include "bus/jakks_gamekey/slot.h"
|
||||
|
||||
|
||||
class jakks_gkr_state : public spg2xx_game_state
|
||||
class jakks_state : public spg2xx_game_state
|
||||
{
|
||||
public:
|
||||
jakks_gkr_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
spg2xx_game_state(mconfig, type, tag),
|
||||
m_porta_key_mode(false),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_cart_region(nullptr)
|
||||
jakks_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
spg2xx_game_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void jakks(machine_config &config);
|
||||
void jakks_i2c(machine_config &config);
|
||||
void walle(machine_config &config);
|
||||
|
||||
void jakks_gkr(machine_config &config);
|
||||
void jakks_gkr_i2c(machine_config &config);
|
||||
void jakks_gkr_1m_i2c(machine_config &config);
|
||||
void jakks_gkr_2m_i2c(machine_config &config);
|
||||
void jakks_gkr_nk(machine_config &config);
|
||||
void jakks_gkr_nk_i2c(machine_config &config);
|
||||
void jakks_gkr_dy(machine_config &config);
|
||||
void jakks_gkr_dy_i2c(machine_config &config);
|
||||
void jakks_gkr_dp_i2c(machine_config &config);
|
||||
void jakks_gkr_sw_i2c(machine_config &config);
|
||||
void jakks_gkr_nm_i2c(machine_config &config);
|
||||
void jakks_gkr_cc_i2c(machine_config &config);
|
||||
void jakks_gkr_wf_i2c(machine_config &config);
|
||||
void jakks_gkr_mv_i2c(machine_config &config);
|
||||
void jakks_gkr_wp(machine_config &config);
|
||||
void jakks_gkr_cb(machine_config &config);
|
||||
|
||||
void jakks_tvtouch(machine_config& config);
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(i2c_gkr_r);
|
||||
|
||||
protected:
|
||||
DECLARE_READ16_MEMBER(jakks_porta_r);
|
||||
DECLARE_READ16_MEMBER(walle_portc_r);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(jakks_porta_w);
|
||||
DECLARE_WRITE16_MEMBER(jakks_portb_w);
|
||||
DECLARE_WRITE16_MEMBER(walle_portc_w);
|
||||
|
||||
uint16_t m_walle_portc_data;
|
||||
void base_config(machine_config& config);
|
||||
void batman(machine_config &config);
|
||||
void walle(machine_config& config);
|
||||
|
||||
private:
|
||||
virtual void machine_start() override;
|
||||
|
||||
DECLARE_READ16_MEMBER(jakks_porta_key_io_r);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(gkr_portc_w);
|
||||
DECLARE_WRITE16_MEMBER(jakks_porta_key_io_w);
|
||||
bool m_porta_key_mode;
|
||||
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_gamekey);
|
||||
|
||||
optional_device<jakks_gamekey_slot_device> m_cart;
|
||||
memory_region *m_cart_region;
|
||||
DECLARE_WRITE16_MEMBER(portc_w);
|
||||
};
|
||||
|
||||
READ_LINE_MEMBER(jakks_gkr_state::i2c_gkr_r)
|
||||
WRITE16_MEMBER(jakks_state::portc_w)
|
||||
{
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
return m_cart->read_cart_seeprom();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_i2cmem->read_sda();
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::walle_portc_w)
|
||||
{
|
||||
m_walle_portc_data = data & mem_mask;
|
||||
if (BIT(mem_mask, 1))
|
||||
m_i2cmem->write_scl(BIT(data, 1));
|
||||
if (BIT(mem_mask, 0))
|
||||
m_i2cmem->write_sda(BIT(data, 0));
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::gkr_portc_w)
|
||||
{
|
||||
m_walle_portc_data = data & mem_mask;
|
||||
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
m_cart->write_cart_seeprom(space,offset,data,mem_mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_i2cmem)
|
||||
{
|
||||
if (BIT(mem_mask, 1))
|
||||
m_i2cmem->write_scl(BIT(data, 1));
|
||||
if (BIT(mem_mask, 0))
|
||||
m_i2cmem->write_sda(BIT(data, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_gkr_state::jakks_porta_r)
|
||||
{
|
||||
//logerror("%s: jakks_porta_r\n", machine().describe_context());
|
||||
return m_io_p1->read();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_porta_w)
|
||||
{
|
||||
//logerror("%s: jakks_porta_w %04x\n", machine().describe_context(), data);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_portb_w)
|
||||
{
|
||||
//logerror("%s: jakks_portb_w %04x\n", machine().describe_context(), data);
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_gkr_state::jakks_porta_key_io_r)
|
||||
{
|
||||
//logerror("%s: jakks_porta_key_io_r\n", machine().describe_context());
|
||||
if (m_porta_key_mode == false)
|
||||
{
|
||||
return m_io_p1->read();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* masks with 0xf, inverts, and combines it with a previous read (when data written to jakks_porta_key_io_w was 0x0000) and expects result to be 0x0000
|
||||
could just expect data written to be returned, but that would be a strange check.
|
||||
all systems seem to respond to the same result, so how is the per-system lock implemented? */
|
||||
return (m_io_p1->read() & 0xfff0) | 0x000f;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_porta_key_io_w)
|
||||
{
|
||||
logerror("%s: jakks_porta_key_io_w %04x\n", machine().describe_context(), data);
|
||||
// only seen 0xffff and 0x0000 written here.. writes 0xffff before the 2nd part of the port a gamekey check read.
|
||||
if (data == 0xffff)
|
||||
{
|
||||
m_porta_key_mode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_porta_key_mode = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( batman )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
|
||||
@ -167,6 +37,10 @@ static INPUT_PORTS_START( batman )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Menu")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("B Button")
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("X Button")
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
|
||||
PORT_BIT(0xfffe, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( walle )
|
||||
@ -184,623 +58,31 @@ static INPUT_PORTS_START( walle )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_sith_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0xf3df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_pooh )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0xf7df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0xfff7, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_care )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0xf7df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0xfff7, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_nm_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
|
||||
PORT_START("DIALX") // for Pole Position, joystick can be twisted like a dial/wheel (limited?) (check range)
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_cc_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("C")
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("D")
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_wf_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x01c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
|
||||
/* on real unit you can spin the wheel (and must make sure it completes a full circle, or you lose your turn) instead of pressing 'B' for a random spin but where does it map? (it can be tested in secret test mode)
|
||||
PORT_START("DIALX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("DIALY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
*/
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_gkr )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_NAME("Joypad Down")
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_NAME("Joypad Left")
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_NAME("Joypad Right")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (not verified for all games, state can be seen in secret test menu of many tho)
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) // this causes WWE to think the unit is a '2nd Controller' and tells you to plug the 1st one in.
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_sdoo_i2c ) // GameKeyReady units had 2 main buttons, later releases reduced that to 1 button (as the internal games don't require 2 and no GameKeys were released)
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) // debug input, skips levels!
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) // must be low or other inputs don't work?
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r) // is this correct? doesn't seem to work
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( jak_gkr_i2c )
|
||||
PORT_INCLUDE(jak_gkr)
|
||||
|
||||
PORT_MODIFY("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_dpr_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Start / Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( tvtouch )
|
||||
PORT_START("P1")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P1" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P3" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // might not only be a button input, check code
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
void jakks_gkr_state::jakks(machine_config &config)
|
||||
void jakks_state::base_config(machine_config& config)
|
||||
{
|
||||
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_4m);
|
||||
|
||||
spg2xx_base(config);
|
||||
|
||||
m_maincpu->porta_in().set(FUNC(jakks_gkr_state::jakks_porta_r));
|
||||
m_maincpu->porta_out().set(FUNC(jakks_gkr_state::jakks_porta_w));
|
||||
m_maincpu->portb_out().set(FUNC(jakks_gkr_state::jakks_portb_w));
|
||||
}
|
||||
m_maincpu->porta_in().set(FUNC(jakks_state::base_porta_r));
|
||||
m_maincpu->portc_in().set_ioport("P3");
|
||||
m_maincpu->portc_out().set(FUNC(jakks_state::portc_w));
|
||||
|
||||
void jakks_gkr_state::jakks_i2c(machine_config &config)
|
||||
{
|
||||
jakks(config);
|
||||
I2CMEM(config, m_i2cmem, 0).set_data_size(0x200);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::machine_start()
|
||||
void jakks_state::batman(machine_config &config)
|
||||
{
|
||||
spg2xx_game_state::machine_start();
|
||||
|
||||
// if there's a cart, override the standard banking
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
std::string region_tag;
|
||||
m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(JAKKSSLOT_ROM_REGION_TAG).c_str());
|
||||
m_bank->configure_entries(0, (m_cart_region->bytes() + 0x7fffff) / 0x800000, m_cart_region->base(), 0x800000);
|
||||
m_bank->set_entry(0);
|
||||
}
|
||||
|
||||
save_item(NAME(m_walle_portc_data));
|
||||
base_config(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_state::mem_map_4m);
|
||||
}
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER(jakks_gkr_state::cart_load_gamekey)
|
||||
void jakks_state::walle(machine_config &config)
|
||||
{
|
||||
return m_cart->call_load();
|
||||
base_config(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_state::mem_map_2m);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr(machine_config &config)
|
||||
{
|
||||
jakks(config);
|
||||
|
||||
m_maincpu->porta_in().set(FUNC(jakks_gkr_state::jakks_porta_key_io_r));
|
||||
m_maincpu->porta_out().set(FUNC(jakks_gkr_state::jakks_porta_key_io_w));
|
||||
m_maincpu->portc_in().set_ioport("P3");
|
||||
m_maincpu->portc_out().set(FUNC(jakks_gkr_state::gkr_portc_w));
|
||||
|
||||
m_maincpu->set_rowscroll_offset(0);
|
||||
|
||||
JAKKS_GAMEKEY_SLOT(config, m_cart, 0, jakks_gamekey, nullptr);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
I2CMEM(config, m_i2cmem, 0).set_data_size(0x200);
|
||||
}
|
||||
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_1m_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_2m_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_2m);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nk(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nk").set_original("jakks_gamekey_nk");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nk_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nk").set_original("jakks_gamekey_nk");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dy(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dy").set_original("jakks_gamekey_dy");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dy_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dy").set_original("jakks_gamekey_dy");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_mv_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_mv").set_original("jakks_gamekey_mv");
|
||||
}
|
||||
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dp_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dp").set_original("jakks_gamekey_dp");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_sw_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_sw").set_original("jakks_gamekey_sw");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_wp(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_wp").set_original("jakks_gamekey_wp"); // NO KEYS RELEASED
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_cb(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_cb").set_original("jakks_gamekey_cb"); // NO KEYS RELEASED
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nm_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("DIALX");
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nm").set_original("jakks_gamekey_nm");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_cc_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
// shows 'E0' in gamekey test menu on real HW (maybe related to value key needs to return if one existed)
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_cc").set_original("jakks_gamekey_cc"); // no game keys were released
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_wf_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
//m_maincpu->adc_in<0>().set_ioport("DIALX"); // wheel does not seem to map here
|
||||
//m_maincpu->adc_in<1>().set_ioport("DIALY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_wf").set_original("jakks_gamekey_wf"); // no game keys were released
|
||||
}
|
||||
|
||||
void jakks_gkr_state::walle(machine_config &config)
|
||||
{
|
||||
jakks_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_2m);
|
||||
m_maincpu->portc_in().set_ioport("P3");
|
||||
m_maincpu->portc_out().set(FUNC(jakks_gkr_state::walle_portc_w));
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_tvtouch(machine_config &config)
|
||||
{
|
||||
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_4m);
|
||||
|
||||
spg2xx_base(config);
|
||||
|
||||
m_maincpu->porta_in().set(FUNC(jakks_gkr_state::base_porta_r));
|
||||
m_maincpu->portb_in().set(FUNC(jakks_gkr_state::base_portb_r));
|
||||
m_maincpu->portc_in().set(FUNC(jakks_gkr_state::base_portc_r));
|
||||
}
|
||||
|
||||
ROM_START( tvtchsw )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "touchstarwars.bin", 0x000000, 0x400000, CRC(db5ccc31) SHA1(786af933ef1fb644faf8eed935c448b93296bc33) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_batm )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "batman.bin", 0x000000, 0x400000, CRC(46f848e5) SHA1(5875d57bb3fe0cac5d20e626e4f82a0e5f9bb94c) )
|
||||
@ -813,140 +95,6 @@ ROM_START( jak_wall )
|
||||
//ROM_LOAD16_WORD_SWAP( "walle.bin", 0x000000, 0x400000, BAD_DUMP CRC(6bc90b16) SHA1(184d72de059057aae7800da510fcf05ed1da9ec9))
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_wwe )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkswwegkr.bin", 0x000000, 0x200000, CRC(b078a812) SHA1(7d97c0e2171b3fd91b280480c9ffd5651828195a) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_fan4 )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksffgkr.bin", 0x000000, 0x200000, CRC(8755a1f7) SHA1(7214da15fe61881da27b81575fbdb54cc0f1d6aa) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_just )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksjlagkr.bin", 0x000000, 0x200000, CRC(182989f0) SHA1(799229c537d6fe629ba9e1e4051d1bb9ca445d44) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dora )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdoragkr.bin", 0x000000, 0x200000, CRC(bcaa132d) SHA1(3894b980fbc4144731b2a7a94acebb29e30de67c) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_nick )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksnicktoonsgkr.bin", 0x000000, 0x200000, CRC(4dec1656) SHA1(b3002ab15e75068102f4955a3f0c52fb6d5cda56) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sbfc )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksspongebobgkr.bin", 0x000000, 0x200000, CRC(9871303c) SHA1(78bc2687e1514094db8bb875e1117df3fcb3d201) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dorr )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdora2gkr.bin", 0x000000, 0x200000, CRC(6c09bcd9) SHA1(4bcad79658832f319d16b4f63257e127f6862d79) )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( jak_spdm )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksspidermangkr.bin", 0x000000, 0x200000, CRC(1b2ee700) SHA1(30ea69c489e1238b004f473f972b682e35573138) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_pooh )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkspoohgkr.bin", 0x000000, 0x200000, CRC(0d97df55) SHA1(f108621a83c7b2263dd1531d82311627c3a02002) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_care )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "carebeargkr.bin", 0x000000, 0x200000, CRC(e6096eb7) SHA1(92ee1a6df374f8b355ba2280dc43d764f6f69dfe) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_wof )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkswheeloffortunegkr.bin", 0x000000, 0x200000, CRC(6a879620) SHA1(95478764a61741569041c2299528f6464651d593) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_disn )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneygkr.bin", 0x000000, 0x100000, CRC(7a5ebcd7) SHA1(9add8c2a6e3f0409c8957a2ba2d054fd2c4c39c1) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_disf )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneyfriendsgkr.bin", 0x000000, 0x200000, CRC(77bca50b) SHA1(6e0f4fd229ee11eac721b5dbe79cf9002d3dbd64) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dpr )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdisneyprincessgkr.bin", 0x000000, 0x200000, CRC(e26003ce) SHA1(ee15243281df6f09b96185c34582d7091604c954) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dprs )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneyprincess2gkr.bin", 0x000000, 0x200000, CRC(b670bdde) SHA1(c33ce7ada72a0c44bc881b5792cd33a9f2f0fb08) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_mpac )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksmspacmangkr.bin", 0x000000, 0x100000, CRC(cab40f77) SHA1(30731acc461150d96aafa7a0451cfb1a25264678) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sdoo )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksscoobydoogkr.bin", 0x000000, 0x400000, CRC(61062ce5) SHA1(9d21767fd855385ef83e4209c429ecd4bf7e5384) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dbz )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdragonballzgkr.bin", 0x000000, 0x200000, CRC(d52c3b20) SHA1(fd5ce41c143cad9bca3372054f4ff98b52c33874) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sith )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksstarwarsgkr.bin", 0x000000, 0x200000, CRC(932cde19) SHA1(b88b748c235e9eeeda574e4d5b4077ae9da6fbd0) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_capc )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "capcomgkr.bin", 0x000000, 0x200000, CRC(6d47cce4) SHA1(263926a991d55459aa3cee90049d2202c1e3a70e) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
// JAKKS Pacific Inc TV games
|
||||
CONS( 2004, jak_batm, 0, 0, jakks, batman, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "The Batman (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
CONS( 2008, jak_wall, 0, 0, walle, walle, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wall-E (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
|
||||
// 'Game-Key Ready' JAKKS games (these can also take per-game specific expansion cartridges, although not all games had them released)
|
||||
// Some of these were available in versions without Game-Key ports, it is unconfirmed if code was the same unless otherwise stated
|
||||
// For units released AFTER the GameKey promotion was cancelled it appears the code is the same as the PCB inside is the same, just the external port closed off, earlier units might be different hardware in some cases.
|
||||
// units released BEFORE the GameKey support were sometimes different hardware, eg. the Spider-Man and Disney units were SPG110 based
|
||||
CONS( 2005, jak_wwe, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released)
|
||||
CONS( 2005, jak_fan4, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released)
|
||||
CONS( 2005, jak_just, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released)
|
||||
CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer - Nursery Rhyme Adventure (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3 released) - The upper part of this one is pink/purple.
|
||||
CONS( 2005, jak_dorr, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer - Race to Play Park (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3 released) - The upper part of this one is blue
|
||||
CONS( 2004, jak_nick, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Nicktoons (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys
|
||||
CONS( 2005, jak_sbfc, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "SpongeBob SquarePants - The Fry Cook Games (JAKKS Pacific TV Game, Game-Key Ready) (AUG 18 2005 21:31:56)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys
|
||||
CONS( 2005, jak_sdoo, 0, 0, jakks_gkr_2m_i2c, jak_sdoo_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Jolliford Management", "Scooby-Doo! and the Mystery of the Castle (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // SD (no game-keys released) (was dumped from a later unit with GameKey port missing, but internal PCB still supported it, code likely the same)
|
||||
CONS( 2005, jak_disn, 0, 0, jakks_gkr_dy, jak_gkr, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Disney (JAKKS Pacific TV Game, Game-Key Ready) (08 FEB 2005 A)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DY keys (3 released)
|
||||
CONS( 2005, jak_disf, 0, 0, jakks_gkr_dy_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Disney Friends (JAKKS Pacific TV Game, Game-Key Ready) (17 MAY 2005 A)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DY keys (3 released)
|
||||
CONS( 2005, jak_dpr, 0, 0, jakks_gkr_dp_i2c, jak_dpr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / 5000ft, Inc", "Disney Princess (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DP keys (1 key released)
|
||||
CONS( 2005, jak_dprs, 0, 0, jakks_gkr_dp_i2c, jak_dpr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / 5000ft, Inc", "Disney Princesses (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DP keys (1 key released) (unit looks identical to above, including just having 'Disney Princess' logo, but this one has the 'board game' as a frontend and a slightly different on-screen title)
|
||||
CONS( 2005, jak_sith, 0, 0, jakks_gkr_sw_i2c, jak_sith_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Griptonite Games", "Star Wars - Revenge of the Sith (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses SW keys (1 released)
|
||||
CONS( 2005, jak_dbz, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dragon Ball Z (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DB (no game-keys released, 1 in development but cancelled)
|
||||
CONS( 2005, jak_mpac, 0, 0, jakks_gkr_nm_i2c, jak_nm_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Namco / HotGen Ltd", "Ms. Pac-Man 5-in-1 (Ms. Pac-Man, Pole Position, Galaga, Xevious, Mappy) (JAKKS Pacific TV Game, Game-Key Ready) (07 FEB 2005 A SKU F)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NM (3 keys available [Dig Dug, New Rally-X], [Rally-X, Pac-Man, Bosconian], [Pac-Man, Bosconian])
|
||||
CONS( 2005, jak_capc, 0, 0, jakks_gkr_cc_i2c, jak_cc_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Capcom / HotGen Ltd", "Capcom 3-in-1 (1942, Commando, Ghosts'n Goblins) (JAKKS Pacific TV Game, Game-Key Ready) (29 MAR 2005 B)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses CC keys (no game-keys released)
|
||||
CONS( 2005, jak_wof, 0, 0, jakks_gkr_wf_i2c, jak_wf_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wheel of Fortune (JAKKS Pacific TV Game, Game-Key Ready) (Jul 11 2005 ORIG)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses WF keys (no game-keys released) analog wheel not emulated
|
||||
// There is a 'Second Edition' version of Wheel of Fortune with a Gold case, GameKey port removed, and a '2' over the usual Game Key Ready logo, internals are different too, not Game-Key Ready
|
||||
CONS( 2004, jak_spdm, 0, 0, jakks_gkr_mv_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Spider-Man (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // MV (1 key available)
|
||||
CONS( 2005, jak_pooh, 0, 0, jakks_gkr_wp, jak_pooh, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Winnie the Pooh - Piglet's Special Day (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WP (no game-keys released)
|
||||
CONS( 2005, jak_care, 0, 0, jakks_gkr_cb, jak_care, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Care Bears TV Games (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // CB (no game-keys released)
|
||||
|
||||
// Some versions of the Shrek - Over the Hedge unit show the GameKey logo on startup (others don't) there is no evidence to suggest it was ever released with a GameKey port tho, and the internal PCB has no place for one on the versions we've seen (which show the logo)
|
||||
|
||||
// TV Touch Games (these are re-release versions of classic JAKKS games but using a touchpad controller)
|
||||
CONS( 2012, tvtchsw, 0, 0, jakks_tvtouch, tvtouch, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Code Mystics", "TV Touch Games: Star Wars Original Trilogy", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // Touch games have 24C04
|
||||
CONS( 2004, jak_batm, 0, 0, batman, batman, jakks_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "The Batman (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
CONS( 2008, jak_wall, 0, 0, walle, walle, jakks_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wall-E (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
|
||||
|
693
src/mame/drivers/spg2xx_jakks_gkr.cpp
Normal file
693
src/mame/drivers/spg2xx_jakks_gkr.cpp
Normal file
@ -0,0 +1,693 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz, David Haywood
|
||||
|
||||
// Note: even after the GameKey port was physically removed and the PCBs redesigned, many of the test modes still show the value read from the port (and many games still show the Game Key Ready splash screen on startup)
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/spg2xx.h"
|
||||
|
||||
#include "bus/jakks_gamekey/slot.h"
|
||||
|
||||
|
||||
class jakks_gkr_state : public spg2xx_game_state
|
||||
{
|
||||
public:
|
||||
jakks_gkr_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
spg2xx_game_state(mconfig, type, tag),
|
||||
m_porta_key_mode(false),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_cart_region(nullptr)
|
||||
{ }
|
||||
|
||||
void jakks_gkr(machine_config &config);
|
||||
void jakks_gkr_i2c(machine_config &config);
|
||||
void jakks_gkr_1m_i2c(machine_config &config);
|
||||
void jakks_gkr_2m_i2c(machine_config &config);
|
||||
void jakks_gkr_nk(machine_config &config);
|
||||
void jakks_gkr_nk_i2c(machine_config &config);
|
||||
void jakks_gkr_dy(machine_config &config);
|
||||
void jakks_gkr_dy_i2c(machine_config &config);
|
||||
void jakks_gkr_dp_i2c(machine_config &config);
|
||||
void jakks_gkr_sw_i2c(machine_config &config);
|
||||
void jakks_gkr_nm_i2c(machine_config &config);
|
||||
void jakks_gkr_cc_i2c(machine_config &config);
|
||||
void jakks_gkr_wf_i2c(machine_config &config);
|
||||
void jakks_gkr_mv_i2c(machine_config &config);
|
||||
void jakks_gkr_wp(machine_config &config);
|
||||
void jakks_gkr_cb(machine_config &config);
|
||||
|
||||
void jakks_tvtouch(machine_config& config);
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(i2c_gkr_r);
|
||||
|
||||
protected:
|
||||
DECLARE_READ16_MEMBER(jakks_porta_r);
|
||||
DECLARE_WRITE16_MEMBER(jakks_porta_w);
|
||||
DECLARE_WRITE16_MEMBER(jakks_portb_w);
|
||||
|
||||
private:
|
||||
virtual void machine_start() override;
|
||||
|
||||
DECLARE_READ16_MEMBER(jakks_porta_key_io_r);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(gkr_portc_w);
|
||||
DECLARE_WRITE16_MEMBER(jakks_porta_key_io_w);
|
||||
bool m_porta_key_mode;
|
||||
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_gamekey);
|
||||
|
||||
optional_device<jakks_gamekey_slot_device> m_cart;
|
||||
memory_region *m_cart_region;
|
||||
};
|
||||
|
||||
READ_LINE_MEMBER(jakks_gkr_state::i2c_gkr_r)
|
||||
{
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
return m_cart->read_cart_seeprom();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_i2cmem->read_sda();
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::gkr_portc_w)
|
||||
{
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
m_cart->write_cart_seeprom(space,offset,data,mem_mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_i2cmem)
|
||||
{
|
||||
if (BIT(mem_mask, 1))
|
||||
m_i2cmem->write_scl(BIT(data, 1));
|
||||
if (BIT(mem_mask, 0))
|
||||
m_i2cmem->write_sda(BIT(data, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_gkr_state::jakks_porta_r)
|
||||
{
|
||||
//logerror("%s: jakks_porta_r\n", machine().describe_context());
|
||||
return m_io_p1->read();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_porta_w)
|
||||
{
|
||||
//logerror("%s: jakks_porta_w %04x\n", machine().describe_context(), data);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_portb_w)
|
||||
{
|
||||
//logerror("%s: jakks_portb_w %04x\n", machine().describe_context(), data);
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_gkr_state::jakks_porta_key_io_r)
|
||||
{
|
||||
//logerror("%s: jakks_porta_key_io_r\n", machine().describe_context());
|
||||
if (m_porta_key_mode == false)
|
||||
{
|
||||
return m_io_p1->read();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* masks with 0xf, inverts, and combines it with a previous read (when data written to jakks_porta_key_io_w was 0x0000) and expects result to be 0x0000
|
||||
could just expect data written to be returned, but that would be a strange check.
|
||||
all systems seem to respond to the same result, so how is the per-system lock implemented? */
|
||||
return (m_io_p1->read() & 0xfff0) | 0x000f;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_gkr_state::jakks_porta_key_io_w)
|
||||
{
|
||||
logerror("%s: jakks_porta_key_io_w %04x\n", machine().describe_context(), data);
|
||||
// only seen 0xffff and 0x0000 written here.. writes 0xffff before the 2nd part of the port a gamekey check read.
|
||||
if (data == 0xffff)
|
||||
{
|
||||
m_porta_key_mode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_porta_key_mode = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( jak_sith_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0xf3df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_pooh )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0xf7df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0xfff7, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_care )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0xf7df, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0xfff7, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
|
||||
PORT_START("JOYX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("JOYY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_nm_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
|
||||
PORT_START("DIALX") // for Pole Position, joystick can be twisted like a dial/wheel (limited?) (check range)
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_cc_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("C")
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("D")
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_wf_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("A")
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x01c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
|
||||
|
||||
/* on real unit you can spin the wheel (and must make sure it completes a full circle, or you lose your turn) instead of pressing 'B' for a random spin but where does it map? (it can be tested in secret test mode)
|
||||
PORT_START("DIALX")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
|
||||
PORT_START("DIALY")
|
||||
PORT_BIT(0x0fff, 0x0000, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x0fff)
|
||||
*/
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_gkr )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_NAME("Joypad Down")
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_NAME("Joypad Left")
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_NAME("Joypad Right")
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (not verified for all games, state can be seen in secret test menu of many tho)
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) // this causes WWE to think the unit is a '2nd Controller' and tells you to plug the 1st one in.
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_sdoo_i2c ) // GameKeyReady units had 2 main buttons, later releases reduced that to 1 button (as the internal games don't require 2 and no GameKeys were released)
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) // debug input, skips levels!
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) // must be low or other inputs don't work?
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r) // is this correct? doesn't seem to work
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( jak_gkr_i2c )
|
||||
PORT_INCLUDE(jak_gkr)
|
||||
|
||||
PORT_MODIFY("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( jak_dpr_i2c )
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Start / Menu / Pause")
|
||||
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
|
||||
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
void jakks_gkr_state::machine_start()
|
||||
{
|
||||
spg2xx_game_state::machine_start();
|
||||
|
||||
// if there's a cart, override the standard banking
|
||||
if (m_cart && m_cart->exists())
|
||||
{
|
||||
std::string region_tag;
|
||||
m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(JAKKSSLOT_ROM_REGION_TAG).c_str());
|
||||
m_bank->configure_entries(0, (m_cart_region->bytes() + 0x7fffff) / 0x800000, m_cart_region->base(), 0x800000);
|
||||
m_bank->set_entry(0);
|
||||
}
|
||||
}
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER(jakks_gkr_state::cart_load_gamekey)
|
||||
{
|
||||
return m_cart->call_load();
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr(machine_config &config)
|
||||
{
|
||||
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_4m);
|
||||
|
||||
spg2xx_base(config);
|
||||
|
||||
m_maincpu->porta_in().set(FUNC(jakks_gkr_state::jakks_porta_key_io_r));
|
||||
m_maincpu->porta_out().set(FUNC(jakks_gkr_state::jakks_porta_key_io_w));
|
||||
m_maincpu->portb_out().set(FUNC(jakks_gkr_state::jakks_portb_w));
|
||||
m_maincpu->portc_in().set_ioport("P3");
|
||||
m_maincpu->portc_out().set(FUNC(jakks_gkr_state::gkr_portc_w));
|
||||
m_maincpu->set_rowscroll_offset(0);
|
||||
|
||||
JAKKS_GAMEKEY_SLOT(config, m_cart, 0, jakks_gamekey, nullptr);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
I2CMEM(config, m_i2cmem, 0).set_data_size(0x200);
|
||||
}
|
||||
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_1m_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_2m_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_2m);
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nk(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nk").set_original("jakks_gamekey_nk");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nk_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nk").set_original("jakks_gamekey_nk");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dy(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dy").set_original("jakks_gamekey_dy");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dy_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dy").set_original("jakks_gamekey_dy");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_mv_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_mv").set_original("jakks_gamekey_mv");
|
||||
}
|
||||
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_dp_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_dp").set_original("jakks_gamekey_dp");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_sw_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_sw").set_original("jakks_gamekey_sw");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_wp(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_wp").set_original("jakks_gamekey_wp"); // NO KEYS RELEASED
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_cb(machine_config &config)
|
||||
{
|
||||
jakks_gkr(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("JOYX");
|
||||
m_maincpu->adc_in<1>().set_ioport("JOYY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_cb").set_original("jakks_gamekey_cb"); // NO KEYS RELEASED
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_nm_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
m_maincpu->adc_in<0>().set_ioport("DIALX");
|
||||
SOFTWARE_LIST(config, "jakks_gamekey_nm").set_original("jakks_gamekey_nm");
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_cc_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
// shows 'E0' in gamekey test menu on real HW (maybe related to value key needs to return if one existed)
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_cc").set_original("jakks_gamekey_cc"); // no game keys were released
|
||||
}
|
||||
|
||||
void jakks_gkr_state::jakks_gkr_wf_i2c(machine_config &config)
|
||||
{
|
||||
jakks_gkr_i2c(config);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_gkr_state::mem_map_1m);
|
||||
//m_maincpu->adc_in<0>().set_ioport("DIALX"); // wheel does not seem to map here
|
||||
//m_maincpu->adc_in<1>().set_ioport("DIALY");
|
||||
//SOFTWARE_LIST(config, "jakks_gamekey_wf").set_original("jakks_gamekey_wf"); // no game keys were released
|
||||
}
|
||||
|
||||
ROM_START( jak_wwe )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkswwegkr.bin", 0x000000, 0x200000, CRC(b078a812) SHA1(7d97c0e2171b3fd91b280480c9ffd5651828195a) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_fan4 )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksffgkr.bin", 0x000000, 0x200000, CRC(8755a1f7) SHA1(7214da15fe61881da27b81575fbdb54cc0f1d6aa) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_just )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksjlagkr.bin", 0x000000, 0x200000, CRC(182989f0) SHA1(799229c537d6fe629ba9e1e4051d1bb9ca445d44) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dora )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdoragkr.bin", 0x000000, 0x200000, CRC(bcaa132d) SHA1(3894b980fbc4144731b2a7a94acebb29e30de67c) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_nick )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksnicktoonsgkr.bin", 0x000000, 0x200000, CRC(4dec1656) SHA1(b3002ab15e75068102f4955a3f0c52fb6d5cda56) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sbfc )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksspongebobgkr.bin", 0x000000, 0x200000, CRC(9871303c) SHA1(78bc2687e1514094db8bb875e1117df3fcb3d201) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dorr )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdora2gkr.bin", 0x000000, 0x200000, CRC(6c09bcd9) SHA1(4bcad79658832f319d16b4f63257e127f6862d79) )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( jak_spdm )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksspidermangkr.bin", 0x000000, 0x200000, CRC(1b2ee700) SHA1(30ea69c489e1238b004f473f972b682e35573138) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_pooh )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkspoohgkr.bin", 0x000000, 0x200000, CRC(0d97df55) SHA1(f108621a83c7b2263dd1531d82311627c3a02002) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_care )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "carebeargkr.bin", 0x000000, 0x200000, CRC(e6096eb7) SHA1(92ee1a6df374f8b355ba2280dc43d764f6f69dfe) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_wof )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakkswheeloffortunegkr.bin", 0x000000, 0x200000, CRC(6a879620) SHA1(95478764a61741569041c2299528f6464651d593) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_disn )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneygkr.bin", 0x000000, 0x100000, CRC(7a5ebcd7) SHA1(9add8c2a6e3f0409c8957a2ba2d054fd2c4c39c1) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_disf )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneyfriendsgkr.bin", 0x000000, 0x200000, CRC(77bca50b) SHA1(6e0f4fd229ee11eac721b5dbe79cf9002d3dbd64) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dpr )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdisneyprincessgkr.bin", 0x000000, 0x200000, CRC(e26003ce) SHA1(ee15243281df6f09b96185c34582d7091604c954) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dprs )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "disneyprincess2gkr.bin", 0x000000, 0x200000, CRC(b670bdde) SHA1(c33ce7ada72a0c44bc881b5792cd33a9f2f0fb08) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_mpac )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksmspacmangkr.bin", 0x000000, 0x100000, CRC(cab40f77) SHA1(30731acc461150d96aafa7a0451cfb1a25264678) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sdoo )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksscoobydoogkr.bin", 0x000000, 0x400000, CRC(61062ce5) SHA1(9d21767fd855385ef83e4209c429ecd4bf7e5384) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_dbz )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksdragonballzgkr.bin", 0x000000, 0x200000, CRC(d52c3b20) SHA1(fd5ce41c143cad9bca3372054f4ff98b52c33874) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_sith )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "jakksstarwarsgkr.bin", 0x000000, 0x200000, CRC(932cde19) SHA1(b88b748c235e9eeeda574e4d5b4077ae9da6fbd0) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( jak_capc )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "capcomgkr.bin", 0x000000, 0x200000, CRC(6d47cce4) SHA1(263926a991d55459aa3cee90049d2202c1e3a70e) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
// 'Game-Key Ready' JAKKS games (these can also take per-game specific expansion cartridges, although not all games had them released)
|
||||
// Some of these were available in versions without Game-Key ports, it is unconfirmed if code was the same unless otherwise stated
|
||||
// For units released AFTER the GameKey promotion was cancelled it appears the code is the same as the PCB inside is the same, just the external port closed off, earlier units might be different hardware in some cases.
|
||||
// units released BEFORE the GameKey support were sometimes different hardware, eg. the Spider-Man and Disney units were SPG110 based
|
||||
CONS( 2005, jak_wwe, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released)
|
||||
CONS( 2005, jak_fan4, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released)
|
||||
CONS( 2005, jak_just, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released)
|
||||
CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer - Nursery Rhyme Adventure (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3 released) - The upper part of this one is pink/purple.
|
||||
CONS( 2005, jak_dorr, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer - Race to Play Park (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3 released) - The upper part of this one is blue
|
||||
CONS( 2004, jak_nick, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Nicktoons (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys
|
||||
CONS( 2005, jak_sbfc, 0, 0, jakks_gkr_nk_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "SpongeBob SquarePants - The Fry Cook Games (JAKKS Pacific TV Game, Game-Key Ready) (AUG 18 2005 21:31:56)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys
|
||||
CONS( 2005, jak_sdoo, 0, 0, jakks_gkr_2m_i2c, jak_sdoo_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Jolliford Management", "Scooby-Doo! and the Mystery of the Castle (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // SD (no game-keys released) (was dumped from a later unit with GameKey port missing, but internal PCB still supported it, code likely the same)
|
||||
CONS( 2005, jak_disn, 0, 0, jakks_gkr_dy, jak_gkr, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Disney (JAKKS Pacific TV Game, Game-Key Ready) (08 FEB 2005 A)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DY keys (3 released)
|
||||
CONS( 2005, jak_disf, 0, 0, jakks_gkr_dy_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Disney Friends (JAKKS Pacific TV Game, Game-Key Ready) (17 MAY 2005 A)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DY keys (3 released)
|
||||
CONS( 2005, jak_dpr, 0, 0, jakks_gkr_dp_i2c, jak_dpr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / 5000ft, Inc", "Disney Princess (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DP keys (1 key released)
|
||||
CONS( 2005, jak_dprs, 0, 0, jakks_gkr_dp_i2c, jak_dpr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / 5000ft, Inc", "Disney Princesses (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DP keys (1 key released) (unit looks identical to above, including just having 'Disney Princess' logo, but this one has the 'board game' as a frontend and a slightly different on-screen title)
|
||||
CONS( 2005, jak_sith, 0, 0, jakks_gkr_sw_i2c, jak_sith_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Griptonite Games", "Star Wars - Revenge of the Sith (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses SW keys (1 released)
|
||||
CONS( 2005, jak_dbz, 0, 0, jakks_gkr_1m_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dragon Ball Z (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DB (no game-keys released, 1 in development but cancelled)
|
||||
CONS( 2005, jak_mpac, 0, 0, jakks_gkr_nm_i2c, jak_nm_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Namco / HotGen Ltd", "Ms. Pac-Man 5-in-1 (Ms. Pac-Man, Pole Position, Galaga, Xevious, Mappy) (JAKKS Pacific TV Game, Game-Key Ready) (07 FEB 2005 A SKU F)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NM (3 keys available [Dig Dug, New Rally-X], [Rally-X, Pac-Man, Bosconian], [Pac-Man, Bosconian])
|
||||
CONS( 2005, jak_capc, 0, 0, jakks_gkr_cc_i2c, jak_cc_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Capcom / HotGen Ltd", "Capcom 3-in-1 (1942, Commando, Ghosts'n Goblins) (JAKKS Pacific TV Game, Game-Key Ready) (29 MAR 2005 B)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses CC keys (no game-keys released)
|
||||
CONS( 2005, jak_wof, 0, 0, jakks_gkr_wf_i2c, jak_wf_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wheel of Fortune (JAKKS Pacific TV Game, Game-Key Ready) (Jul 11 2005 ORIG)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses WF keys (no game-keys released) analog wheel not emulated
|
||||
// There is a 'Second Edition' version of Wheel of Fortune with a Gold case, GameKey port removed, and a '2' over the usual Game Key Ready logo, internals are different too, not Game-Key Ready
|
||||
CONS( 2004, jak_spdm, 0, 0, jakks_gkr_mv_i2c, jak_gkr_i2c, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Spider-Man (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // MV (1 key available)
|
||||
CONS( 2005, jak_pooh, 0, 0, jakks_gkr_wp, jak_pooh, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Winnie the Pooh - Piglet's Special Day (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WP (no game-keys released)
|
||||
CONS( 2005, jak_care, 0, 0, jakks_gkr_cb, jak_care, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Backbone Entertainment", "Care Bears TV Games (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // CB (no game-keys released)
|
||||
|
||||
// Some versions of the Shrek - Over the Hedge unit show the GameKey logo on startup (others don't) there is no evidence to suggest it was ever released with a GameKey port tho, and the internal PCB has no place for one on the versions we've seen (which show the logo)
|
242
src/mame/drivers/spg2xx_jakks_tvtouch.cpp
Normal file
242
src/mame/drivers/spg2xx_jakks_tvtouch.cpp
Normal file
@ -0,0 +1,242 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ryan Holtz, David Haywood
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/spg2xx.h"
|
||||
|
||||
class jakks_tvtouch_state : public spg2xx_game_state
|
||||
{
|
||||
public:
|
||||
jakks_tvtouch_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
spg2xx_game_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tvtouch(machine_config &config);
|
||||
|
||||
private:
|
||||
DECLARE_READ16_MEMBER(porta_r);
|
||||
DECLARE_READ16_MEMBER(portb_r);
|
||||
DECLARE_READ16_MEMBER(portc_r);
|
||||
DECLARE_WRITE16_MEMBER(porta_w);
|
||||
DECLARE_WRITE16_MEMBER(portb_w);
|
||||
DECLARE_WRITE16_MEMBER(portc_w);
|
||||
|
||||
uint16_t m_porta_latch;
|
||||
uint16_t m_portb_latch;
|
||||
uint16_t m_portc_latch;
|
||||
};
|
||||
|
||||
static INPUT_PORTS_START( tvtouch )
|
||||
PORT_START("P1")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P1" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("P2")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("P3")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, "P3" )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // might not only be a button input, check code
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
READ16_MEMBER(jakks_tvtouch_state::porta_r)
|
||||
{
|
||||
logerror("%s: porta_r: %04x & %04x\n", machine().describe_context(), 0, mem_mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_tvtouch_state::portb_r)
|
||||
{
|
||||
logerror("%s: portb_r: %04x & %04x\n", machine().describe_context(), 0, mem_mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ16_MEMBER(jakks_tvtouch_state::portc_r)
|
||||
{
|
||||
uint16_t data = m_i2cmem->read_sda();
|
||||
//if (mem_mask & 0xfffc)
|
||||
//logerror("%s: portc_r: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_tvtouch_state::porta_w)
|
||||
{
|
||||
logerror("%s: porta_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_tvtouch_state::portb_w)
|
||||
{
|
||||
logerror("%s: portb_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(jakks_tvtouch_state::portc_w)
|
||||
{
|
||||
//if (mem_mask & 0xfffc)
|
||||
//logerror("%s: portc_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
if (BIT(mem_mask, 1))
|
||||
m_i2cmem->write_scl(BIT(data, 1));
|
||||
if (BIT(mem_mask, 0))
|
||||
m_i2cmem->write_sda(BIT(data, 0));
|
||||
}
|
||||
|
||||
void jakks_tvtouch_state::tvtouch(machine_config &config)
|
||||
{
|
||||
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jakks_tvtouch_state::mem_map_4m);
|
||||
|
||||
spg2xx_base(config);
|
||||
|
||||
m_maincpu->porta_in().set(FUNC(jakks_tvtouch_state::porta_r));
|
||||
m_maincpu->portb_in().set(FUNC(jakks_tvtouch_state::portb_r));
|
||||
m_maincpu->portc_in().set(FUNC(jakks_tvtouch_state::portc_r));
|
||||
m_maincpu->porta_out().set(FUNC(jakks_tvtouch_state::porta_w));
|
||||
m_maincpu->portb_out().set(FUNC(jakks_tvtouch_state::portb_w));
|
||||
m_maincpu->portc_out().set(FUNC(jakks_tvtouch_state::portc_w));
|
||||
|
||||
I2C_24C04(config, m_i2cmem, 0);
|
||||
}
|
||||
|
||||
ROM_START( tvtchsw )
|
||||
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_WORD_SWAP( "touchstarwars.bin", 0x000000, 0x400000, CRC(db5ccc31) SHA1(786af933ef1fb644faf8eed935c448b93296bc33) )
|
||||
ROM_END
|
||||
|
||||
// TV Touch Games (these are re-release versions of classic JAKKS games but using a touchpad controller)
|
||||
CONS( 2012, tvtchsw, 0, 0, tvtouch, tvtouch, jakks_tvtouch_state, empty_init, "JAKKS Pacific Inc / Code Mystics", "TV Touch Games: Star Wars Original Trilogy", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // Touch games have 24C04
|
@ -37063,6 +37063,8 @@ icanpian //
|
||||
@source:spg2xx_jakks.cpp
|
||||
jak_batm // The Batman, 2004
|
||||
jak_wall //
|
||||
|
||||
@source:spg2xx_jakks_gkr.cpp
|
||||
jak_wwe //
|
||||
jak_fan4 //
|
||||
jak_just //
|
||||
@ -37083,6 +37085,8 @@ jak_pooh //
|
||||
jak_care //
|
||||
jak_nick //
|
||||
jak_sbfc //
|
||||
|
||||
@source:spg2xx_jakks_tvtouch.cpp
|
||||
tvtchsw
|
||||
|
||||
@source:spg2xx_lexibook.cpp
|
||||
|
@ -815,6 +815,8 @@ spg2xx.cpp
|
||||
spg2xx_dreamlife.cpp
|
||||
spg2xx_ican.cpp
|
||||
spg2xx_jakks.cpp
|
||||
spg2xx_jakks_gkr.cpp
|
||||
spg2xx_jakks_tvtouch.cpp
|
||||
spg2xx_lexibook.cpp
|
||||
spg2xx_pdc.cpp
|
||||
spg2xx_playvision.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user