mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
-spg2xx: Fixed a subtle interrupt bug causing Clickstart to not boot. [Ryan Holtz]
This commit is contained in:
parent
bdc93df0cf
commit
b8a5d8ec26
@ -86,6 +86,7 @@ void spg2xx_device::device_start()
|
||||
|
||||
save_item(NAME(m_sprite_limit));
|
||||
save_item(NAME(m_pal_flag));
|
||||
save_item(NAME(m_fiq_vector));
|
||||
}
|
||||
|
||||
void spg2xx_device::device_reset()
|
||||
@ -93,9 +94,21 @@ void spg2xx_device::device_reset()
|
||||
unsp_device::device_reset();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(spg2xx_device::fiq_vector_w)
|
||||
{
|
||||
m_fiq_vector = data;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(spg2xx_device::videoirq_w)
|
||||
{
|
||||
set_state_unsynced(UNSP_IRQ0_LINE, state);
|
||||
if (m_fiq_vector == 0)
|
||||
{
|
||||
set_state_unsynced(UNSP_FIQ_LINE, state);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_state_unsynced(UNSP_IRQ0_LINE, state);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(spg2xx_device::timerirq_w)
|
||||
@ -156,6 +169,7 @@ void spg2xx_device::configure_spg_io(spg2xx_io_device* io)
|
||||
io->write_external_irq_callback().set(FUNC(spg2xx_device::extirq_w));
|
||||
io->write_ffrq_tmr1_irq_callback().set(FUNC(spg2xx_device::ffreq1_w));
|
||||
io->write_ffrq_tmr2_irq_callback().set(FUNC(spg2xx_device::ffreq2_w));
|
||||
io->write_fiq_vector_callback().set(FUNC(spg2xx_device::fiq_vector_w));
|
||||
}
|
||||
|
||||
void spg24x_device::device_add_mconfig(machine_config &config)
|
||||
|
@ -78,6 +78,7 @@ protected:
|
||||
|
||||
void internal_map(address_map &map);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(fiq_vector_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(videoirq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(audioirq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(timerirq_w);
|
||||
@ -117,6 +118,8 @@ protected:
|
||||
|
||||
emu_timer *m_screenpos_timer;
|
||||
|
||||
uint8_t m_fiq_vector;
|
||||
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
void configure_spg_io(spg2xx_io_device* io);
|
||||
|
@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(SPG28X_IO, spg28x_io_device, "spg28x_io", "SPG280-series Syst
|
||||
#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_ALL (LOG_IO | LOG_VLINES | LOG_SEGMENT | LOG_WATCHDOG | LOG_FIQ | LOG_SIO | LOG_EXT_MEM)
|
||||
|
||||
#define VERBOSE (0)
|
||||
#define VERBOSE (LOG_UART)
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
@ -57,6 +57,7 @@ spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type ty
|
||||
, m_external_irq_cb(*this)
|
||||
, m_ffreq_tmr1_irq_cb(*this)
|
||||
, m_ffreq_tmr2_irq_cb(*this)
|
||||
, m_fiq_vector_w(*this)
|
||||
{
|
||||
}
|
||||
|
||||
@ -93,6 +94,8 @@ void spg2xx_io_device::device_start()
|
||||
m_ffreq_tmr1_irq_cb.resolve();
|
||||
m_ffreq_tmr2_irq_cb.resolve();
|
||||
|
||||
m_fiq_vector_w.resolve();
|
||||
|
||||
m_tmb1 = timer_alloc(TIMER_TMB1);
|
||||
m_tmb2 = timer_alloc(TIMER_TMB2);
|
||||
m_tmb1->adjust(attotime::never);
|
||||
@ -131,6 +134,8 @@ void spg2xx_io_device::device_start()
|
||||
|
||||
save_item(NAME(m_uart_baud_rate));
|
||||
|
||||
save_item(NAME(m_sio_bits_remaining));
|
||||
save_item(NAME(m_sio_writing));
|
||||
}
|
||||
|
||||
void spg2xx_io_device::device_reset()
|
||||
@ -160,10 +165,12 @@ void spg2xx_io_device::device_reset()
|
||||
|
||||
m_rng_timer->adjust(attotime::from_hz(1234), 0, attotime::from_hz(1234)); // timer value is arbitrary, maybe should match system clock, but that would result in heavy switching
|
||||
|
||||
|
||||
m_2khz_divider = 0;
|
||||
m_1khz_divider = 0;
|
||||
m_4hz_divider = 0;
|
||||
|
||||
m_sio_bits_remaining = 0;
|
||||
m_sio_writing = false;
|
||||
}
|
||||
|
||||
/*************************
|
||||
@ -321,7 +328,7 @@ READ16_MEMBER(spg2xx_io_device::io_extended_r)
|
||||
LOGMASKED(LOG_UART, "UART Rx data is available, clearing bits\n");
|
||||
if (m_uart_rx_fifo_count)
|
||||
{
|
||||
LOGMASKED(LOG_UART, "Remaining count %d, value %02x\n", m_uart_rx_fifo_count, m_uart_rx_fifo[m_uart_rx_fifo_start]);
|
||||
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_uart_rx_fifo_start = (m_uart_rx_fifo_start + 1) % ARRAY_LENGTH(m_uart_rx_fifo);
|
||||
@ -357,8 +364,25 @@ READ16_MEMBER(spg2xx_io_device::io_extended_r)
|
||||
LOGMASKED(LOG_UART, "%s: io_r: UART Rx FIFO Control = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x51: // unknown, polled by ClickStart cartridges ( clikstrt )
|
||||
return 0x8000;
|
||||
case 0x50: // SIO Setup
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SIO Setup = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x51: // SIO Status
|
||||
LOGMASKED(LOG_SIO, "%s: io_r: SIO Status = %04x\n", machine().describe_context(), val);
|
||||
break;
|
||||
|
||||
case 0x54: // 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)
|
||||
{
|
||||
m_sio_bits_remaining--;
|
||||
if (m_sio_bits_remaining == 0)
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x58: // I2C Command ( tvgogo )
|
||||
LOGMASKED(LOG_I2C, "%s: io_r: I2C Command = %04x\n", machine().describe_context(), val);
|
||||
@ -607,6 +631,9 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
|
||||
case 0x11: // 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
|
||||
@ -748,7 +775,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
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;
|
||||
const uint16_t changed = (old & IO_IRQ_ENABLE) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
const uint16_t changed = (IO_IRQ_STATUS & old) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
|
||||
if (changed)
|
||||
check_irqs(changed);
|
||||
break;
|
||||
@ -878,6 +905,7 @@ WRITE16_MEMBER(spg2xx_io_device::io_w)
|
||||
};
|
||||
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_fiq_vector_w(data & 7);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1002,19 +1030,37 @@ WRITE16_MEMBER(spg2xx_io_device::io_extended_w)
|
||||
, BIT(data, 11), BIT(data, 10), BIT(data, 9), BIT(data, 8), BIT(data, 7) ? 16 : 8, BIT(data, 6));
|
||||
LOGMASKED(LOG_SIO, " (Mode:%s, RWProtocol:%d, Rate:sysclk%s, AddrMode:%s)\n"
|
||||
, 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_sio_bits_remaining = BIT(data, 7) ? 16 : 8;
|
||||
m_sio_writing = BIT(data, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x52: // SIO Start Address (low)
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Stat Address (low) (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
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)
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Stat Address (hi) (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
LOGMASKED(LOG_SIO, "%s: io_w: SIO Start Address (hi) (not implemented) = %04x\n", machine().describe_context(), data);
|
||||
break;
|
||||
|
||||
case 0x54: // 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)
|
||||
{
|
||||
m_sio_bits_remaining--;
|
||||
if (m_sio_bits_remaining == 0)
|
||||
{
|
||||
m_io_regs[0x51] &= ~0x8000;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x55: // SIO Automatic Transmit Count
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
virtual DECLARE_READ16_MEMBER(io_extended_r);
|
||||
virtual DECLARE_WRITE16_MEMBER(io_extended_w);
|
||||
|
||||
|
||||
auto pal_read_callback() { return m_pal_read_cb.bind(); };
|
||||
|
||||
auto write_timer_irq_callback() { return m_timer_irq_cb.bind(); };
|
||||
@ -49,6 +48,8 @@ public:
|
||||
auto write_ffrq_tmr1_irq_callback() { return m_ffreq_tmr1_irq_cb.bind(); };
|
||||
auto write_ffrq_tmr2_irq_callback() { return m_ffreq_tmr2_irq_cb.bind(); };
|
||||
|
||||
auto write_fiq_vector_callback() { return m_fiq_vector_w.bind(); };
|
||||
|
||||
protected:
|
||||
spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint32_t sprite_limit)
|
||||
: spg2xx_io_device(mconfig, type, tag, owner, clock)
|
||||
@ -140,6 +141,9 @@ protected:
|
||||
|
||||
emu_timer *m_rng_timer;
|
||||
|
||||
uint8_t m_sio_bits_remaining;
|
||||
bool m_sio_writing;
|
||||
|
||||
required_device<unsp_device> m_cpu;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
@ -150,6 +154,8 @@ protected:
|
||||
devcb_write_line m_external_irq_cb;
|
||||
devcb_write_line m_ffreq_tmr1_irq_cb;
|
||||
devcb_write_line m_ffreq_tmr2_irq_cb;
|
||||
|
||||
devcb_write8 m_fiq_vector_w;
|
||||
};
|
||||
|
||||
class spg24x_io_device : public spg2xx_io_device
|
||||
|
@ -76,7 +76,6 @@ void spg2xx_video_device::device_start()
|
||||
m_rowscrolloffset_read_cb.resolve_safe(0);
|
||||
|
||||
m_video_irq_cb.resolve();
|
||||
|
||||
}
|
||||
|
||||
void spg2xx_video_device::device_reset()
|
||||
|
@ -47,9 +47,11 @@ public:
|
||||
, m_system_region(*this, "maincpu")
|
||||
, m_io_mouse_x(*this, "MOUSEX")
|
||||
, m_io_mouse_y(*this, "MOUSEY")
|
||||
, m_keys(*this, "KEYS%u", 0U)
|
||||
, m_cart_region(nullptr)
|
||||
, m_mouse_x(0)
|
||||
, m_mouse_y(0)
|
||||
, m_mouse_button(0)
|
||||
, m_mouse_dx(0)
|
||||
, m_mouse_dy(0)
|
||||
, m_uart_tx_fifo_start(0)
|
||||
@ -98,14 +100,16 @@ private:
|
||||
required_memory_region m_system_region;
|
||||
required_ioport m_io_mouse_x;
|
||||
required_ioport m_io_mouse_y;
|
||||
required_ioport_array<3> m_keys;
|
||||
memory_region *m_cart_region;
|
||||
|
||||
uint16_t m_mouse_x;
|
||||
uint16_t m_mouse_y;
|
||||
uint8_t m_mouse_button;
|
||||
int16_t m_mouse_dx;
|
||||
int16_t m_mouse_dy;
|
||||
|
||||
uint8_t m_uart_tx_fifo[32]; // arbitrary size
|
||||
uint8_t m_uart_tx_fifo[1024]; // arbitrary size
|
||||
uint8_t m_uart_tx_fifo_start;
|
||||
uint8_t m_uart_tx_fifo_end;
|
||||
uint8_t m_uart_tx_fifo_count;
|
||||
@ -125,6 +129,7 @@ void clickstart_state::machine_start()
|
||||
|
||||
save_item(NAME(m_mouse_x));
|
||||
save_item(NAME(m_mouse_y));
|
||||
save_item(NAME(m_mouse_button));
|
||||
save_item(NAME(m_mouse_dx));
|
||||
save_item(NAME(m_mouse_dy));
|
||||
|
||||
@ -141,8 +146,9 @@ void clickstart_state::machine_start()
|
||||
|
||||
void clickstart_state::machine_reset()
|
||||
{
|
||||
m_mouse_x = 0xffff;
|
||||
m_mouse_y = 0xffff;
|
||||
m_mouse_x = m_io_mouse_x->read();
|
||||
m_mouse_y = m_io_mouse_y->read();
|
||||
m_mouse_button = 0;
|
||||
m_mouse_dx = 0;
|
||||
m_mouse_dy = 0;
|
||||
|
||||
@ -198,18 +204,20 @@ void clickstart_state::uart_tx_fifo_push(uint8_t value)
|
||||
INPUT_CHANGED_MEMBER(clickstart_state::key_update)
|
||||
{
|
||||
const size_t keycode = static_cast<size_t>(param);
|
||||
|
||||
printf("keycode:%02x, oldval:%02x, newval:%02x\n", (uint8_t)keycode, oldval, newval);
|
||||
|
||||
uint8_t buffer[5] = {};
|
||||
buffer[0] = 0x01;
|
||||
buffer[1] = newval ? keycode : 0x3f;
|
||||
buffer[2] = 0x3f;
|
||||
buffer[3] = 0x01;
|
||||
uint8_t buffer[6] = {};
|
||||
buffer[0] = 0x00;
|
||||
buffer[1] = 0x01;
|
||||
buffer[2] = newval ? keycode : 0x3f;
|
||||
buffer[3] = 0x2f;
|
||||
buffer[4] = 0x01;
|
||||
buffer[5] = 0x01;
|
||||
|
||||
printf("Keyboard queueing: ");
|
||||
uint16_t sum = 0;
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
uart_tx_fifo_push(buffer[i] ^ 0xff);
|
||||
sum += buffer[i];
|
||||
@ -222,32 +230,38 @@ INPUT_CHANGED_MEMBER(clickstart_state::key_update)
|
||||
|
||||
INPUT_CHANGED_MEMBER(clickstart_state::mouse_update)
|
||||
{
|
||||
uint16_t x = m_io_mouse_x->read();
|
||||
uint16_t y = m_io_mouse_y->read();
|
||||
uint16_t old_mouse_x = m_mouse_x;
|
||||
uint16_t old_mouse_y = m_mouse_y;
|
||||
m_mouse_button = newval ? (uint8_t)static_cast<size_t>(param) : 0;
|
||||
|
||||
if (m_mouse_x == 0xffff)
|
||||
{
|
||||
old_mouse_x = x;
|
||||
old_mouse_y = y;
|
||||
}
|
||||
const uint16_t x_val(m_io_mouse_x->read());
|
||||
const uint16_t y_val(m_io_mouse_y->read());
|
||||
int16_t x_delta(x_val - m_mouse_x);
|
||||
int16_t y_delta(y_val - m_mouse_y);
|
||||
|
||||
m_mouse_x = x;
|
||||
m_mouse_y = y;
|
||||
// deal with wraparound
|
||||
if (0x0200 <= x_delta)
|
||||
x_delta -= 0x400;
|
||||
else if (-0x0200 >= x_delta)
|
||||
x_delta += 0x400;
|
||||
if (0x100 <= y_delta)
|
||||
y_delta -= 0x200;
|
||||
else if (-0x100 >= y_delta)
|
||||
x_delta += 0x200;
|
||||
|
||||
m_mouse_dx += (m_mouse_x - old_mouse_x);
|
||||
m_mouse_dy += (m_mouse_y - old_mouse_y);
|
||||
m_mouse_x = x_val;
|
||||
m_mouse_y = y_val;
|
||||
|
||||
if (m_mouse_dx < -63)
|
||||
m_mouse_dx = -63;
|
||||
else if (m_mouse_dx > 62)
|
||||
m_mouse_dx = 62;
|
||||
m_mouse_dx = x_delta;
|
||||
m_mouse_dy = -y_delta;
|
||||
|
||||
if (m_mouse_dy < -63)
|
||||
m_mouse_dy = -63;
|
||||
else if (m_mouse_dy > 62)
|
||||
m_mouse_dy = 62;
|
||||
if (m_mouse_dx < -255)
|
||||
m_mouse_dx = -255;
|
||||
else if (m_mouse_dx > 255)
|
||||
m_mouse_dx = 255;
|
||||
|
||||
if (m_mouse_dy < -255)
|
||||
m_mouse_dy = -255;
|
||||
else if (m_mouse_dy > 255)
|
||||
m_mouse_dy = 255;
|
||||
|
||||
update_mouse_buffer();
|
||||
|
||||
@ -257,27 +271,22 @@ INPUT_CHANGED_MEMBER(clickstart_state::mouse_update)
|
||||
|
||||
void clickstart_state::update_mouse_buffer()
|
||||
{
|
||||
if (m_mouse_dx == 0 && m_mouse_dy == 0)
|
||||
return;
|
||||
uint8_t buffer[6] = {};
|
||||
buffer[0] = 0x00;
|
||||
buffer[1] = 0x01 | m_mouse_button;
|
||||
buffer[2] = 0x3e | ((m_mouse_dx >> 1) & 0x80);
|
||||
buffer[3] = 0x3f | ((m_mouse_dy >> 1) & 0x80);
|
||||
buffer[4] = (m_mouse_dx & 0xfe) + 1;
|
||||
buffer[5] = (m_mouse_dy & 0xfe) + 1;
|
||||
|
||||
uint8_t buffer[5] = {};
|
||||
buffer[0] = 0x01;
|
||||
buffer[1] = 0x3f;
|
||||
buffer[2] = 0x3f;
|
||||
buffer[3] = (m_mouse_dx + 1) & 0x3f;
|
||||
buffer[4] = (m_mouse_dy + 1) & 0x3f;
|
||||
|
||||
printf("Mouse queueing: ");
|
||||
uint16_t sum = 0;
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
uart_tx_fifo_push(buffer[i] ^ 0xff);
|
||||
sum += buffer[i];
|
||||
printf("%02x/%02x ", buffer[i], buffer[i] ^ 0xff);
|
||||
}
|
||||
sum = (sum & 0xff) ^ 0xff;
|
||||
uart_tx_fifo_push((uint8_t)sum);
|
||||
printf("%02x\n", (uint8_t)sum);
|
||||
}
|
||||
|
||||
READ16_MEMBER(clickstart_state::rom_r)
|
||||
@ -302,24 +311,26 @@ WRITE16_MEMBER(clickstart_state::porta_w)
|
||||
|
||||
WRITE16_MEMBER(clickstart_state::portb_w)
|
||||
{
|
||||
logerror("%s: portb_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
//logerror("%s: portb_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(clickstart_state::portc_w)
|
||||
{
|
||||
// Bit 12: SCK from SPG SIO
|
||||
// Bit 11: SDA from SPG SIO
|
||||
//logerror("%s: portc_w: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
}
|
||||
|
||||
READ16_MEMBER(clickstart_state::porta_r)
|
||||
{
|
||||
uint16_t data = 0x4000;
|
||||
//logerror("%s: porta_r: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
logerror("%s: porta_r: %04x & %04x\n", machine().describe_context(), data, mem_mask);
|
||||
return data;
|
||||
}
|
||||
|
||||
READ16_MEMBER(clickstart_state::portb_r)
|
||||
{
|
||||
logerror("%s: portb_r: %04x\n", machine().describe_context(), mem_mask);
|
||||
//logerror("%s: portb_r: %04x\n", machine().describe_context(), mem_mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -343,10 +354,14 @@ void clickstart_state::mem_map(address_map &map)
|
||||
|
||||
static INPUT_PORTS_START( clickstart )
|
||||
PORT_START("MOUSEX")
|
||||
PORT_BIT(0x3e, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0)
|
||||
PORT_BIT(0x3ff, 0x00, IPT_MOUSE_X) PORT_MINMAX(0x0000,0x03ff) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0)
|
||||
|
||||
PORT_START("MOUSEY")
|
||||
PORT_BIT(0x3e, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0)
|
||||
PORT_BIT(0x1ff, 0x00, IPT_MOUSE_Y) PORT_MINMAX(0x0000,0x01ff) PORT_SENSITIVITY(10) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0)
|
||||
|
||||
PORT_START("MOUSEBTN")
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0x10)
|
||||
PORT_BIT(0xfffe, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEYS0")
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x01) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
|
||||
@ -377,21 +392,23 @@ static INPUT_PORTS_START( clickstart )
|
||||
PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x18) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('x')
|
||||
PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x19) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('y')
|
||||
PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1a) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('z')
|
||||
PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1b) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1c) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1d) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
||||
PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1e) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
||||
PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x1f) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
||||
PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x20) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
||||
PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x25) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x26) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
|
||||
PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x28) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
|
||||
PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x29) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
|
||||
PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2a) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
|
||||
PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2b) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
|
||||
|
||||
PORT_START("KEYS2")
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x21) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
||||
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x22) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
|
||||
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x23) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2d) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
|
||||
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2e) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
|
||||
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2f) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
|
||||
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x24) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
|
||||
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x27) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0xa9) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift")
|
||||
PORT_BIT(0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2c) PORT_CODE(KEYCODE_LALT) PORT_NAME("Music")
|
||||
PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0xa9) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("Shift") PORT_TOGGLE
|
||||
PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, key_update, 0x2f) PORT_CODE(KEYCODE_TILDE) PORT_NAME("Pause") PORT_TOGGLE
|
||||
PORT_BIT(0xff00, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
// There is a SEEPROM on the motherboard (type?)
|
||||
|
Loading…
Reference in New Issue
Block a user