mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
supercon: WIP, don't mind the mess
This commit is contained in:
parent
92473ff3c1
commit
62fb91d39e
@ -6,14 +6,15 @@
|
|||||||
|
|
||||||
- UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?)
|
- UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?)
|
||||||
- 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label
|
- 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label
|
||||||
- TTL, 24 LEDs, 8*8 chessboard buttons
|
- TTL, buzzer, 24 LEDs, 8*8 chessboard buttons
|
||||||
- external port for clock and printer, not emulated here
|
- external ports for clock and printer, not emulated here
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/m6502/m6502.h"
|
#include "cpu/m6502/m6502.h"
|
||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
|
#include "sound/beep.h"
|
||||||
|
|
||||||
// internal artwork
|
// internal artwork
|
||||||
#include "supercon.lh"
|
#include "supercon.lh"
|
||||||
@ -24,23 +25,375 @@ class supercon_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
supercon_state(const machine_config &mconfig, device_type type, const char *tag)
|
supercon_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu")
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_beeper(*this, "beeper"),
|
||||||
|
m_inp_matrix(*this, "IN"),
|
||||||
|
m_display_wait(33),
|
||||||
|
m_display_maxy(1),
|
||||||
|
m_display_maxx(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
// devices/pointers
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<beep_device> m_beeper;
|
||||||
|
optional_ioport_array<8> m_inp_matrix;
|
||||||
|
|
||||||
|
DECLARE_WRITE8_MEMBER(supercon_1c_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(supercon_1d_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(supercon_1e_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(supercon_1f_w);
|
||||||
|
DECLARE_READ8_MEMBER(supercon_1c_r);
|
||||||
|
DECLARE_READ8_MEMBER(supercon_1d_r);
|
||||||
|
DECLARE_READ8_MEMBER(supercon_1e_r);
|
||||||
|
DECLARE_READ8_MEMBER(supercon_1f_r);
|
||||||
|
|
||||||
|
// misc common
|
||||||
|
UINT16 m_inp_mux; // multiplexed keypad mask
|
||||||
|
UINT16 m_led_select;
|
||||||
|
UINT16 m_led_data;
|
||||||
|
|
||||||
|
UINT16 read_inputs(int columns);
|
||||||
|
|
||||||
|
// display common
|
||||||
|
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
|
||||||
|
int m_display_maxy; // display matrix number of rows
|
||||||
|
int m_display_maxx; // display matrix number of columns (max 31 for now)
|
||||||
|
|
||||||
|
UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
|
||||||
|
UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
|
||||||
|
UINT32 m_display_cache[0x20]; // (internal use)
|
||||||
|
UINT8 m_display_decay[0x20][0x20]; // (internal use)
|
||||||
|
|
||||||
|
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
|
||||||
|
void display_update();
|
||||||
|
void set_display_size(int maxx, int maxy);
|
||||||
|
void set_display_segmask(UINT32 digits, UINT32 mask);
|
||||||
|
void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void machine_start() override;
|
||||||
|
virtual void machine_reset() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// machine start/reset
|
||||||
|
|
||||||
|
void supercon_state::machine_start()
|
||||||
|
{
|
||||||
|
// zerofill
|
||||||
|
memset(m_display_state, 0, sizeof(m_display_state));
|
||||||
|
memset(m_display_cache, ~0, sizeof(m_display_cache));
|
||||||
|
memset(m_display_decay, 0, sizeof(m_display_decay));
|
||||||
|
memset(m_display_segmask, 0, sizeof(m_display_segmask));
|
||||||
|
|
||||||
|
m_inp_mux = 0;
|
||||||
|
m_led_select = 0;
|
||||||
|
m_led_data = 0;
|
||||||
|
|
||||||
|
// register for savestates
|
||||||
|
save_item(NAME(m_display_maxy));
|
||||||
|
save_item(NAME(m_display_maxx));
|
||||||
|
save_item(NAME(m_display_wait));
|
||||||
|
|
||||||
|
save_item(NAME(m_display_state));
|
||||||
|
/* save_item(NAME(m_display_cache)); */ // don't save!
|
||||||
|
save_item(NAME(m_display_decay));
|
||||||
|
save_item(NAME(m_display_segmask));
|
||||||
|
|
||||||
|
save_item(NAME(m_inp_mux));
|
||||||
|
save_item(NAME(m_led_select));
|
||||||
|
save_item(NAME(m_led_data));
|
||||||
|
}
|
||||||
|
|
||||||
|
void supercon_state::machine_reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Helper Functions
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
// The device may strobe the outputs very fast, it is unnoticeable to the user.
|
||||||
|
// To prevent flickering here, we need to simulate a decay.
|
||||||
|
|
||||||
|
void supercon_state::display_update()
|
||||||
|
{
|
||||||
|
UINT32 active_state[0x20];
|
||||||
|
|
||||||
|
for (int y = 0; y < m_display_maxy; y++)
|
||||||
|
{
|
||||||
|
active_state[y] = 0;
|
||||||
|
|
||||||
|
for (int x = 0; x <= m_display_maxx; x++)
|
||||||
|
{
|
||||||
|
// turn on powered segments
|
||||||
|
if (m_display_state[y] >> x & 1)
|
||||||
|
m_display_decay[y][x] = m_display_wait;
|
||||||
|
|
||||||
|
// determine active state
|
||||||
|
UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
|
||||||
|
active_state[y] |= (ds << x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// on difference, send to output
|
||||||
|
for (int y = 0; y < m_display_maxy; y++)
|
||||||
|
if (m_display_cache[y] != active_state[y])
|
||||||
|
{
|
||||||
|
if (m_display_segmask[y] != 0)
|
||||||
|
output().set_digit_value(y, active_state[y] & m_display_segmask[y]);
|
||||||
|
|
||||||
|
const int mul = (m_display_maxx <= 10) ? 10 : 100;
|
||||||
|
for (int x = 0; x <= m_display_maxx; x++)
|
||||||
|
{
|
||||||
|
int state = active_state[y] >> x & 1;
|
||||||
|
char buf1[0x10]; // lampyx
|
||||||
|
char buf2[0x10]; // y.x
|
||||||
|
|
||||||
|
if (x == m_display_maxx)
|
||||||
|
{
|
||||||
|
// always-on if selected
|
||||||
|
sprintf(buf1, "lamp%da", y);
|
||||||
|
sprintf(buf2, "%d.a", y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(buf1, "lamp%d", y * mul + x);
|
||||||
|
sprintf(buf2, "%d.%d", y, x);
|
||||||
|
}
|
||||||
|
output().set_value(buf1, state);
|
||||||
|
output().set_value(buf2, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(m_display_cache, active_state, sizeof(m_display_cache));
|
||||||
|
}
|
||||||
|
|
||||||
|
TIMER_DEVICE_CALLBACK_MEMBER(supercon_state::display_decay_tick)
|
||||||
|
{
|
||||||
|
// slowly turn off unpowered segments
|
||||||
|
for (int y = 0; y < m_display_maxy; y++)
|
||||||
|
for (int x = 0; x <= m_display_maxx; x++)
|
||||||
|
if (m_display_decay[y][x] != 0)
|
||||||
|
m_display_decay[y][x]--;
|
||||||
|
|
||||||
|
display_update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void supercon_state::set_display_size(int maxx, int maxy)
|
||||||
|
{
|
||||||
|
m_display_maxx = maxx;
|
||||||
|
m_display_maxy = maxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void supercon_state::set_display_segmask(UINT32 digits, UINT32 mask)
|
||||||
|
{
|
||||||
|
// set a segment mask per selected digit, but leave unselected ones alone
|
||||||
|
for (int i = 0; i < 0x20; i++)
|
||||||
|
{
|
||||||
|
if (digits & 1)
|
||||||
|
m_display_segmask[i] = mask;
|
||||||
|
digits >>= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void supercon_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
|
||||||
|
{
|
||||||
|
set_display_size(maxx, maxy);
|
||||||
|
|
||||||
|
// update current state
|
||||||
|
UINT32 mask = (1 << maxx) - 1;
|
||||||
|
for (int y = 0; y < maxy; y++)
|
||||||
|
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
|
||||||
|
|
||||||
|
if (update)
|
||||||
|
display_update();
|
||||||
|
}
|
||||||
|
|
||||||
|
// generic input handlers
|
||||||
|
|
||||||
|
UINT16 supercon_state::read_inputs(int columns)
|
||||||
|
{
|
||||||
|
UINT16 ret = 0;
|
||||||
|
|
||||||
|
// read selected input rows
|
||||||
|
for (int i = 0; i < columns; i++)
|
||||||
|
if (m_inp_mux >> i & 1)
|
||||||
|
ret |= m_inp_matrix[i]->read();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Address maps */
|
/* Address maps */
|
||||||
|
|
||||||
static ADDRESS_MAP_START(supercon_mem, AS_PROGRAM, 8, supercon_state)
|
|
||||||
AM_RANGE( 0x0000, 0x0fff) AM_RAM AM_SHARE("nvram")
|
WRITE8_MEMBER(supercon_state::supercon_1c_w)
|
||||||
AM_RANGE( 0x2000, 0xffff) AM_ROM
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(supercon_state::supercon_1d_w)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(supercon_state::supercon_1e_w)
|
||||||
|
{
|
||||||
|
// d0-d7: input mux, led data
|
||||||
|
m_inp_mux = m_led_data = data;
|
||||||
|
display_matrix(8, 3, m_led_data, m_led_select);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(supercon_state::supercon_1f_w)
|
||||||
|
{
|
||||||
|
// d4-d6: select led row
|
||||||
|
m_led_select = data >> 4 & 7;
|
||||||
|
display_matrix(8, 3, m_led_data, m_led_select);
|
||||||
|
|
||||||
|
// d7: enable beeper
|
||||||
|
m_beeper->set_state(data >> 7 & 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
READ8_MEMBER(supercon_state::supercon_1c_r)
|
||||||
|
{
|
||||||
|
return 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
READ8_MEMBER(supercon_state::supercon_1d_r)
|
||||||
|
{
|
||||||
|
return 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
READ8_MEMBER(supercon_state::supercon_1e_r)
|
||||||
|
{
|
||||||
|
// d6,d7: multiplexed inputs (side panel)
|
||||||
|
return (read_inputs(8) >> 2 & 0xc0) ^ 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
READ8_MEMBER(supercon_state::supercon_1f_r)
|
||||||
|
{
|
||||||
|
// d0-d7: multiplexed inputs (chessboard squares)
|
||||||
|
return ~read_inputs(8) & 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, supercon_state )
|
||||||
|
AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram")
|
||||||
|
AM_RANGE(0x1c00, 0x1c00) AM_READWRITE(supercon_1c_r, supercon_1c_w)
|
||||||
|
AM_RANGE(0x1d00, 0x1d00) AM_READWRITE(supercon_1d_r, supercon_1d_w)
|
||||||
|
AM_RANGE(0x1e00, 0x1e00) AM_READWRITE(supercon_1e_r, supercon_1e_w)
|
||||||
|
AM_RANGE(0x1f00, 0x1f00) AM_READWRITE(supercon_1f_r, supercon_1f_w)
|
||||||
|
AM_RANGE(0x2000, 0xffff) AM_ROM
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
/* Input ports */
|
/* Input ports */
|
||||||
|
|
||||||
static INPUT_PORTS_START( supercon )
|
static INPUT_PORTS_START( supercon )
|
||||||
|
PORT_START("IN.0")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2)
|
||||||
|
|
||||||
|
PORT_START("IN.1")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4)
|
||||||
|
|
||||||
|
PORT_START("IN.2")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6)
|
||||||
|
|
||||||
|
PORT_START("IN.3")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8)
|
||||||
|
|
||||||
|
PORT_START("IN.4")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W)
|
||||||
|
|
||||||
|
PORT_START("IN.5")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R)
|
||||||
|
|
||||||
|
PORT_START("IN.6")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y)
|
||||||
|
|
||||||
|
PORT_START("IN.7")
|
||||||
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square")
|
||||||
|
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U)
|
||||||
|
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
/* Machine driver */
|
/* Machine driver */
|
||||||
@ -49,12 +402,18 @@ static MACHINE_CONFIG_START( supercon, supercon_state )
|
|||||||
|
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2)
|
MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2)
|
||||||
MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // ?
|
MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // guessed
|
||||||
MCFG_CPU_PROGRAM_MAP(supercon_mem)
|
MCFG_CPU_PROGRAM_MAP(supercon_mem)
|
||||||
|
|
||||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||||
|
|
||||||
|
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", supercon_state, display_decay_tick, attotime::from_msec(1))
|
||||||
MCFG_DEFAULT_LAYOUT(layout_supercon)
|
MCFG_DEFAULT_LAYOUT(layout_supercon)
|
||||||
|
|
||||||
|
/* sound hardware */
|
||||||
|
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||||
|
MCFG_SOUND_ADD("beeper", BEEP, 2000) // guessed
|
||||||
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
/* ROM definition */
|
/* ROM definition */
|
||||||
@ -68,4 +427,4 @@ ROM_END
|
|||||||
/* Driver */
|
/* Driver */
|
||||||
|
|
||||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
|
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
|
||||||
CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
|
CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
|
||||||
|
@ -14,7 +14,33 @@
|
|||||||
<view name="Internal Layout">
|
<view name="Internal Layout">
|
||||||
<bounds left="0" right="100" top="0" bottom="100" />
|
<bounds left="0" right="100" top="0" bottom="100" />
|
||||||
|
|
||||||
<bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
|
<bezel name="0.0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.1" element="led"><bounds x="1" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.2" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.3" element="led"><bounds x="3" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.4" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.5" element="led"><bounds x="5" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.6" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="0.7" element="led"><bounds x="7" y="0" width="1" height="1" /></bezel>
|
||||||
|
|
||||||
|
<bezel name="1.0" element="led"><bounds x="0" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.1" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.2" element="led"><bounds x="2" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.3" element="led"><bounds x="3" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.4" element="led"><bounds x="4" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.5" element="led"><bounds x="5" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.6" element="led"><bounds x="6" y="1" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="1.7" element="led"><bounds x="7" y="1" width="1" height="1" /></bezel>
|
||||||
|
|
||||||
|
<bezel name="2.0" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.1" element="led"><bounds x="1" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.2" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.3" element="led"><bounds x="3" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.4" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.5" element="led"><bounds x="5" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.6" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel>
|
||||||
|
<bezel name="2.7" element="led"><bounds x="7" y="2" width="1" height="1" /></bezel>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</mamelayout>
|
</mamelayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user