mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
ssystem3: rewriting driver from scratch (nw)
This commit is contained in:
parent
aa714aa102
commit
a067ce5b85
@ -3078,6 +3078,7 @@ files {
|
||||
MAME_DIR .. "src/mame/drivers/saitek_delta1.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/saitek_risc2500.cpp",
|
||||
MAME_DIR .. "src/mame/includes/saitek_stratos.h",
|
||||
MAME_DIR .. "src/mame/drivers/saitek_ssystem3.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/saitek_stratos.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/saitek_corona.cpp", -- subdriver of saitek_stratos
|
||||
MAME_DIR .. "src/mame/drivers/saitek_superstar.cpp",
|
||||
@ -4072,9 +4073,6 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/softbox.h",
|
||||
MAME_DIR .. "src/mame/drivers/squale.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/solbourne.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/ssystem3.cpp",
|
||||
MAME_DIR .. "src/mame/includes/ssystem3.h",
|
||||
MAME_DIR .. "src/mame/video/ssystem3.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/swyft.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/symbolics.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/sys2900.cpp",
|
||||
|
@ -3,7 +3,7 @@
|
||||
/*
|
||||
|
||||
The ChessMachine EC by Tasc
|
||||
External module with ARM2 CPU, also sold under the Mephisto brand by H&G
|
||||
External module with ARM2 CPU, also sold under the Mephisto brand by H+G
|
||||
|
||||
see chessmachine_device for technical notes
|
||||
|
||||
|
@ -13,7 +13,8 @@ Microchess, originally made for the KIM-1. Jennings went on to co-found Personal
|
||||
Jennings also licensed Chessmate to Novag, and they released it as the MK II. The hardware
|
||||
is almost identical and the software is the same(identical ROM labels). Two designs were made,
|
||||
one jukebox shape, and one brick shape. The one in MAME came from the jukebox, but both
|
||||
models have the same ROMs.
|
||||
models have the same ROMs. Note that like MK I, although it is a Winkler/Auge production,
|
||||
it doesn't involve SciSys company. SciSys was founded by Winkler after MK II.
|
||||
|
||||
TODO:
|
||||
- is there an older version of chmate? chips on pcb photos are dated 1979, but
|
||||
|
@ -66,6 +66,7 @@
|
||||
@MP2726 TMS1040 1979, Tomy Break Up
|
||||
*MP2788 TMS1040? 1980, Bandai Flight Time (? note: VFD-capable)
|
||||
@MP3005 TMS1730 1989, Tiger Copy Cat (model 7-522)
|
||||
*MP3200 TMS1000 1978, Parker Brothers Electronic Mastermind
|
||||
@MP3201 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750A)
|
||||
@MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750B)
|
||||
@MP3226 TMS1000 1978, Milton Bradley Simon (Rev A)
|
||||
|
162
src/mame/drivers/saitek_ssystem3.cpp
Normal file
162
src/mame/drivers/saitek_ssystem3.cpp
Normal file
@ -0,0 +1,162 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
// thanks-to:Berger
|
||||
/******************************************************************************
|
||||
|
||||
TODO:
|
||||
- WIP
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/volt_reg.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
//#include "saitek_ssystem3.lh" // clickable
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class ssystem3_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ssystem3_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_display(*this, "display"),
|
||||
m_dac(*this, "dac"),
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
// machine drivers
|
||||
void ssystem3(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
// devices/pointers
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<pwm_display_device> m_display;
|
||||
optional_device<dac_bit_interface> m_dac;
|
||||
required_ioport_array<4> m_inputs;
|
||||
|
||||
// address maps
|
||||
void main_map(address_map &map);
|
||||
|
||||
// I/O handlers
|
||||
};
|
||||
|
||||
void ssystem3_state::machine_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
I/O
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Address Maps
|
||||
******************************************************************************/
|
||||
|
||||
void ssystem3_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x03ff).ram();
|
||||
map(0x6000, 0x600f).m("via", FUNC(via6522_device::map));
|
||||
map(0x8000, 0x9fff).rom().mirror(0x6000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Input Ports
|
||||
******************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( ssystem3 )
|
||||
PORT_START("IN.0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4)
|
||||
|
||||
PORT_START("IN.1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8)
|
||||
|
||||
PORT_START("IN.2")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R)
|
||||
|
||||
PORT_START("IN.3")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Machine Drivers
|
||||
******************************************************************************/
|
||||
|
||||
void ssystem3_state::ssystem3(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M6502(config, m_maincpu, 4_MHz_XTAL / 2);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ssystem3_state::main_map);
|
||||
|
||||
VIA6522(config, "via", 4_MHz_XTAL / 2);
|
||||
|
||||
//NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
/* video hardware */
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 4);
|
||||
//config.set_default_layout(layout_saitek_ssystem3);
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "speaker").front_center();
|
||||
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
|
||||
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
ROM Definitions
|
||||
******************************************************************************/
|
||||
|
||||
ROM_START( ssystem3 )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD("c19081e_ss-3-lrom.u4", 0x8000, 0x1000, CRC(9ea46ed3) SHA1(34eef85b356efbea6ddac1d1705b104fc8e2731a) ) // 2332
|
||||
ROM_LOAD("c19082_ss-3-hrom.u5", 0x9000, 0x1000, CRC(52741e0b) SHA1(2a7b950f9810c5a14a1b9d5e6b2bd93da621662e) ) // "
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Drivers
|
||||
******************************************************************************/
|
||||
|
||||
// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS
|
||||
CONS( 1979, ssystem3, 0, 0, ssystem3, ssystem3, ssystem3_state, empty_init, "SciSys / Novag", "Chess Champion: Super System III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
|
@ -1,321 +0,0 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Peter Trauner
|
||||
/******************************************************************************
|
||||
|
||||
ssystem3.c
|
||||
|
||||
Driver file to handle emulation of the Chess Champion Super System III / Chess
|
||||
Champion MK III
|
||||
by PeT mess@utanet.at November 2000, march 2008
|
||||
|
||||
Hardware descriptions:
|
||||
- A 6502 CPU
|
||||
- A 6522 VIA ($6000?) (PB6 and PB7 are tied)
|
||||
- 2 x 2114 1kx4 SRAM to provide 1KB of RAM ($0000)
|
||||
- 2xXXKB ROM (both connected to the same pins!,
|
||||
look into mess source mess/messroms/rddil24.c for notes)
|
||||
- signetics 7947e c19081e ss-3-lrom
|
||||
- signetics 7945e c19082 ss-3-hrom ($d000??)
|
||||
|
||||
optional printer (special serial connection)
|
||||
optional board display (special serial connection)
|
||||
internal expansion/cartridge port
|
||||
(special power saving pack)
|
||||
|
||||
|
||||
todo:
|
||||
not sure about lcd signs and their assignments
|
||||
not sure about all buttons and switches
|
||||
playfield displayment currently based on simulation and on screen
|
||||
not check for audio yet
|
||||
convert to new artwork system
|
||||
|
||||
needed:
|
||||
artwork for board display
|
||||
backup of playfield rom and picture/description of its board
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/ssystem3.h"
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
// in my opinion own cpu to display lcd field and to handle own buttons
|
||||
void ssystem3_state::ssystem3_playfield_getfigure(int x, int y, int *figure, int *black)
|
||||
{
|
||||
int d;
|
||||
if (x&1)
|
||||
d=m_playfield.u.s.field[y][x/2]&0xf;
|
||||
else
|
||||
d=m_playfield.u.s.field[y][x/2]>>4;
|
||||
|
||||
*figure=d&7;
|
||||
*black=d&8;
|
||||
}
|
||||
|
||||
void ssystem3_state::ssystem3_playfield_reset()
|
||||
{
|
||||
memset(&m_playfield, 0, sizeof(m_playfield));
|
||||
m_playfield.signal=false;
|
||||
// m_playfield.on=true; //m_configuration->read()&1;
|
||||
}
|
||||
|
||||
void ssystem3_state::ssystem3_playfield_write(int reset, int signal)
|
||||
{
|
||||
int d=false;
|
||||
|
||||
if (!reset) {
|
||||
m_playfield.count=0;
|
||||
m_playfield.bit=0;
|
||||
m_playfield.started=false;
|
||||
m_playfield.signal=signal;
|
||||
m_playfield.time=machine().time();
|
||||
}
|
||||
if (!signal && m_playfield.signal) {
|
||||
attotime t=machine().time();
|
||||
m_playfield.high_time=t - m_playfield.time;
|
||||
m_playfield.time=t;
|
||||
|
||||
// logerror("%.4x playfield %d lowtime %s hightime %s\n",(int)activecpu_get_pc(), m_playfield.count,
|
||||
// m_playfield.low_time.as_string(7), m_playfield.high_time.as_string(7) );
|
||||
|
||||
if (m_playfield.started) {
|
||||
// 0 twice as long low
|
||||
// 1 twice as long high
|
||||
if (m_playfield.low_time > m_playfield.high_time) d=true;
|
||||
|
||||
m_playfield.data&=~(1<<(m_playfield.bit^7));
|
||||
if (d) m_playfield.data|=1<<(m_playfield.bit^7);
|
||||
m_playfield.bit++;
|
||||
if (m_playfield.bit==8) {
|
||||
logerror("%.4x playfield wrote %d %02x\n", (int)m_maincpu->pc(), m_playfield.count, m_playfield.data);
|
||||
m_playfield.u.data[m_playfield.count]=m_playfield.data;
|
||||
m_playfield.bit=0;
|
||||
m_playfield.count=(m_playfield.count+1)%ARRAY_LENGTH(m_playfield.u.data);
|
||||
if (m_playfield.count==0) m_playfield.started=false;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (signal && !m_playfield.signal) {
|
||||
attotime t=machine().time();
|
||||
m_playfield.low_time= t - m_playfield.time;
|
||||
m_playfield.time=t;
|
||||
m_playfield.started=true;
|
||||
}
|
||||
m_playfield.signal=signal;
|
||||
}
|
||||
|
||||
void ssystem3_state::ssystem3_playfield_read(int *on, int *ready)
|
||||
{
|
||||
*on = !(m_configuration->read() & 1);
|
||||
// *on=!m_playfield.on;
|
||||
*ready=false;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(ssystem3_state::ssystem3_via_write_a)
|
||||
{
|
||||
m_porta=data;
|
||||
// logerror("%.4x via port a write %02x\n",(int)activecpu_get_pc(), data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(ssystem3_state::ssystem3_via_read_a)
|
||||
{
|
||||
uint8_t data=0xff;
|
||||
#if 1 // time switch
|
||||
if (!(m_porta&0x10)) data&=m_matrix[0]->read()|0xf1;
|
||||
if (!(m_porta&0x20)) data&=m_matrix[1]->read()|0xf1;
|
||||
if (!(m_porta&0x40)) data&=m_matrix[2]->read()|0xf1;
|
||||
if (!(m_porta&0x80)) data&=m_matrix[3]->read()|0xf1;
|
||||
#else
|
||||
if (!(m_porta&0x10)) data&=m_matrix[0]->read()|0xf0;
|
||||
if (!(m_porta&0x20)) data&=m_matrix[1]->read()|0xf0;
|
||||
if (!(m_porta&0x40)) data&=m_matrix[2]->read()|0xf0;
|
||||
if (!(m_porta&0x80)) data&=m_matrix[3]->read()|0xf0;
|
||||
#endif
|
||||
if (!(m_porta&1)) {
|
||||
if (!(m_matrix[0]->read()&1)) data&=~0x10;
|
||||
if (!(m_matrix[1]->read()&1)) data&=~0x20;
|
||||
if (!(m_matrix[2]->read()&1)) data&=~0x40;
|
||||
if (!(m_matrix[3]->read()&1)) data&=~0x80;
|
||||
}
|
||||
if (!(m_porta&2)) {
|
||||
if (!(m_matrix[0]->read()&2)) data&=~0x10;
|
||||
if (!(m_matrix[1]->read()&2)) data&=~0x20;
|
||||
if (!(m_matrix[2]->read()&2)) data&=~0x40;
|
||||
if (!(m_matrix[3]->read()&2)) data&=~0x80;
|
||||
}
|
||||
if (!(m_porta&4)) {
|
||||
if (!(m_matrix[0]->read()&4)) data&=~0x10;
|
||||
if (!(m_matrix[1]->read()&4)) data&=~0x20;
|
||||
if (!(m_matrix[2]->read()&4)) data&=~0x40;
|
||||
if (!(m_matrix[3]->read()&4)) data&=~0x80;
|
||||
}
|
||||
if (!(m_porta&8)) {
|
||||
if (!(m_matrix[0]->read()&8)) data&=~0x10;
|
||||
if (!(m_matrix[1]->read()&8)) data&=~0x20;
|
||||
if (!(m_matrix[2]->read()&8)) data&=~0x40;
|
||||
if (!(m_matrix[3]->read()&8)) data&=~0x80;
|
||||
}
|
||||
// logerror("%.4x via port a read %02x\n",(int)activecpu_get_pc(), data);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
port b
|
||||
bit 0: output opt device reset?
|
||||
|
||||
hi speed serial 1 (d7d7 transfers 40 bit $2e)
|
||||
bit 1: output data
|
||||
bit 2: output clock (hi data is taken)
|
||||
|
||||
bit 3: output opt data read
|
||||
bit 4: input low opt data available
|
||||
bit 5: input low opt device available
|
||||
|
||||
|
||||
bit 6: input clocks!?
|
||||
|
||||
port a:
|
||||
bit 7: input low x/$37 2
|
||||
bit 6: input low x/$37 3
|
||||
bit 5: input low x/$37 4 (else 1)
|
||||
|
||||
*/
|
||||
READ8_MEMBER(ssystem3_state::ssystem3_via_read_b)
|
||||
{
|
||||
uint8_t data=0xff;
|
||||
int on, ready;
|
||||
ssystem3_playfield_read(&on, &ready);
|
||||
if (!on) data&=~0x20;
|
||||
if (!ready) data&=~0x10;
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(ssystem3_state::ssystem3_via_write_b)
|
||||
{
|
||||
ssystem3_playfield_write(data & 1, data & 8);
|
||||
ssystem3_lcd_write(data & 4, data & 2);
|
||||
|
||||
// TODO: figure out what this is trying to achieve
|
||||
uint8_t d = ssystem3_via_read_b(space, 0, mem_mask) & ~0x40;
|
||||
if (data & 0x80) d |= 0x40;
|
||||
// d&=~0x8f;
|
||||
m_via6522_0->write_pb(d);
|
||||
}
|
||||
|
||||
void ssystem3_state::init_ssystem3()
|
||||
{
|
||||
ssystem3_playfield_reset();
|
||||
ssystem3_lcd_reset();
|
||||
}
|
||||
|
||||
void ssystem3_state::ssystem3_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x03ff).ram();
|
||||
/*
|
||||
67-de playfield ($40 means white, $80 black)
|
||||
*/
|
||||
// AM_RANGE( 0x4000, 0x40ff) AM_NOP
|
||||
/*
|
||||
probably zusatzger??t memory (battery powered ram 256x4? at 0x4000)
|
||||
$40ff low nibble ram if playfield module (else init with normal playfield)
|
||||
*/
|
||||
map(0x6000, 0x600f).m(m_via6522_0, FUNC(via6522_device::map));
|
||||
map(0xc000, 0xdfff).rom();
|
||||
map(0xf000, 0xffff).rom();
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( ssystem3 )
|
||||
/*
|
||||
switches: light(hardware?) sound time power(hardware!)
|
||||
|
||||
new game (hardware?)
|
||||
*/
|
||||
|
||||
|
||||
PORT_START( "Switches" )
|
||||
//PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NEW GAME") PORT_CODE(KEYCODE_F3) // seems to be direct wired to reset
|
||||
// PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("?CLEAR") PORT_CODE(KEYCODE_F1)
|
||||
// PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("?ENTER") PORT_CODE(KEYCODE_ENTER)
|
||||
PORT_START( "matrix.0" )
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?1") PORT_CODE(KEYCODE_1_PAD)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 C SQ EP") PORT_CODE(KEYCODE_9)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER?") PORT_CODE(KEYCODE_ENTER)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 C BOARD MD") PORT_CODE(KEYCODE_0)
|
||||
PORT_START( "matrix.1" )
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?2") PORT_CODE(KEYCODE_2_PAD)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 F springer zeitvorgabe") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 E laeufer ruecknahme") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CE interrupt") PORT_CODE(KEYCODE_BACKSPACE)
|
||||
PORT_START( "matrix.2" )
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?3") PORT_CODE(KEYCODE_3_PAD)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 G bauer zugvorschlaege") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_G)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 D turm #") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 A white") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A)
|
||||
PORT_START( "matrix.3" )
|
||||
PORT_DIPNAME( 0x01, 0, "Time") PORT_CODE(KEYCODE_T) PORT_TOGGLE PORT_DIPSETTING( 0, DEF_STR(Off) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 H black") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_H)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 C dame #50") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_C)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 B koenig FP") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B)
|
||||
PORT_START( "Configuration" )
|
||||
PORT_DIPNAME( 0x0001, 0, "Schachbrett") PORT_TOGGLE
|
||||
PORT_DIPSETTING( 0, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 1, "angeschlossen" )
|
||||
#if 0
|
||||
PORT_DIPNAME( 0x0002, 0, "Memory") PORT_TOGGLE
|
||||
PORT_DIPSETTING( 0, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 2, "angeschlossen" )
|
||||
PORT_DIPNAME( 0x0004, 0, "Drucker") PORT_TOGGLE
|
||||
PORT_DIPSETTING( 0, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 4, "angeschlossen" )
|
||||
#endif
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
void ssystem3_state::ssystem3(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M6502(config, m_maincpu, 1000000);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ssystem3_state::ssystem3_map);
|
||||
|
||||
config.m_minimum_quantum = attotime::from_hz(60);
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
|
||||
screen.set_refresh_hz(30);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
|
||||
screen.set_size(728, 437);
|
||||
screen.set_visarea(0, 728-1, 0, 437-1);
|
||||
screen.set_screen_update(FUNC(ssystem3_state::screen_update_ssystem3));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
PALETTE(config, m_palette, FUNC(ssystem3_state::palette_init), 242 + 32768);
|
||||
|
||||
/* via */
|
||||
VIA6522(config, m_via6522_0, 1000000);
|
||||
m_via6522_0->readpa_handler().set(FUNC(ssystem3_state::ssystem3_via_read_a));
|
||||
m_via6522_0->readpb_handler().set(FUNC(ssystem3_state::ssystem3_via_read_b));
|
||||
m_via6522_0->writepa_handler().set(FUNC(ssystem3_state::ssystem3_via_write_a));
|
||||
m_via6522_0->writepb_handler().set(FUNC(ssystem3_state::ssystem3_via_write_b));
|
||||
}
|
||||
|
||||
|
||||
ROM_START(ssystem3)
|
||||
ROM_REGION(0x10000,"maincpu",0)
|
||||
ROM_LOAD("ss3lrom", 0xc000, 0x1000, CRC(9ea46ed3) SHA1(34eef85b356efbea6ddac1d1705b104fc8e2731a) )
|
||||
// ROM_RELOAD(0xe000, 0x1000)
|
||||
ROM_LOAD("ss3hrom", 0xf000, 0x1000, CRC(52741e0b) SHA1(2a7b950f9810c5a14a1b9d5e6b2bd93da621662e) )
|
||||
ROM_RELOAD(0xd000, 0x1000)
|
||||
ROM_END
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Game driver(s)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
CONS( 1979, ssystem3, 0, 0, ssystem3, ssystem3, ssystem3_state, init_ssystem3, "SciSys / Novag", "Chess Champion: Super System III", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
//chess champion MK III in germany
|
@ -1,91 +0,0 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Peter Trauner
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/ssystem3.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAME_INCLUDES_SSYSTEM3_H
|
||||
#define MAME_INCLUDES_SSYSTEM3_H
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "emupal.h"
|
||||
|
||||
|
||||
struct playfield_t
|
||||
{
|
||||
int signal;
|
||||
// int on;
|
||||
|
||||
int count, bit, started;
|
||||
uint8_t data;
|
||||
attotime time, high_time, low_time;
|
||||
union {
|
||||
struct {
|
||||
uint8_t header[7];
|
||||
uint8_t field[8][8/2];
|
||||
uint8_t unknown[5];
|
||||
} s;
|
||||
uint8_t data[7+8*8/2+5];
|
||||
} u;
|
||||
};
|
||||
|
||||
struct lcd_t
|
||||
{
|
||||
uint8_t data[5];
|
||||
int clock;
|
||||
int count;
|
||||
};
|
||||
|
||||
|
||||
class ssystem3_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ssystem3_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_palette(*this, "palette")
|
||||
, m_via6522_0(*this, "via6522_0")
|
||||
, m_configuration(*this, "Configuration")
|
||||
, m_matrix(*this, "matrix.%u", 0)
|
||||
{ }
|
||||
|
||||
void ssystem3(machine_config &config);
|
||||
|
||||
void init_ssystem3();
|
||||
|
||||
private:
|
||||
virtual void video_start() override;
|
||||
void palette_init(palette_device &palette);
|
||||
uint32_t screen_update_ssystem3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE8_MEMBER(ssystem3_via_write_a);
|
||||
DECLARE_READ8_MEMBER(ssystem3_via_read_a);
|
||||
DECLARE_READ8_MEMBER(ssystem3_via_read_b);
|
||||
DECLARE_WRITE8_MEMBER(ssystem3_via_write_b);
|
||||
void ssystem3_lcd_reset();
|
||||
void ssystem3_lcd_write(int clock, int data);
|
||||
void ssystem3_draw_7segment(bitmap_ind16 &bitmap,int value, int x, int y);
|
||||
void ssystem3_draw_led(bitmap_ind16 &bitmap,int16_t color, int x, int y, int ch);
|
||||
void ssystem3_playfield_getfigure(int x, int y, int *figure, int *black);
|
||||
void ssystem3_playfield_reset();
|
||||
void ssystem3_playfield_write(int reset, int signal);
|
||||
void ssystem3_playfield_read(int *on, int *ready);
|
||||
|
||||
void ssystem3_map(address_map &map);
|
||||
|
||||
uint8_t m_porta;
|
||||
std::unique_ptr<uint8_t[]> m_videoram;
|
||||
playfield_t m_playfield;
|
||||
lcd_t m_lcd;
|
||||
|
||||
required_device<m6502_device> m_maincpu;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<via6522_device> m_via6522_0;
|
||||
required_ioport m_configuration;
|
||||
required_ioport_array<4> m_matrix;
|
||||
};
|
||||
|
||||
|
||||
#endif // MAME_INCLUDES_SSYSTEM3_H
|
@ -34201,6 +34201,9 @@ ccdelta1 //
|
||||
risc2500 //
|
||||
montreux //
|
||||
|
||||
@source:saitek_ssystem3.cpp
|
||||
ssystem3 // Chess Champion Super System III / MK III
|
||||
|
||||
@source:saitek_stratos.cpp
|
||||
stratos
|
||||
stratosa
|
||||
@ -36489,9 +36492,6 @@ vasara // (c) 2000 Visco
|
||||
vasara2 // (c) 2001 Visco
|
||||
vasara2a // (c) 2001 Visco
|
||||
|
||||
@source:ssystem3.cpp
|
||||
ssystem3 // Chess Champion Super System III / MK III
|
||||
|
||||
@source:st_mp100.cpp
|
||||
dracula //
|
||||
hothand //
|
||||
|
@ -706,6 +706,7 @@ saitek_corona.cpp
|
||||
saitek_cp2000.cpp
|
||||
saitek_delta1.cpp
|
||||
saitek_risc2500.cpp
|
||||
saitek_ssystem3.cpp
|
||||
saitek_stratos.cpp
|
||||
saitek_superstar.cpp
|
||||
samcoupe.cpp
|
||||
@ -759,7 +760,6 @@ spectrum.cpp
|
||||
spg110.cpp
|
||||
squale.cpp
|
||||
ssem.cpp
|
||||
ssystem3.cpp
|
||||
st17xx.cpp
|
||||
storio.cpp
|
||||
studio2.cpp
|
||||
|
@ -1,233 +0,0 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Peter Trauner
|
||||
/******************************************************************************
|
||||
PeT mess@utanet.at
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/ssystem3.h"
|
||||
|
||||
void ssystem3_state::ssystem3_lcd_reset()
|
||||
{
|
||||
m_lcd.count=0; m_lcd.clock=1;
|
||||
}
|
||||
|
||||
void ssystem3_state::ssystem3_lcd_write(int clock, int data)
|
||||
{
|
||||
if (clock&&!m_lcd.clock) {
|
||||
m_lcd.data[m_lcd.count/8]&=~(1<<(m_lcd.count&7));
|
||||
if (data) m_lcd.data[m_lcd.count/8]|=1<<(m_lcd.count&7);
|
||||
if (m_lcd.count+1==40) {
|
||||
logerror("%.4x lcd %02x%02x%02x%02x%02x\n",(int)m_maincpu->pc(),
|
||||
m_lcd.data[0], m_lcd.data[1], m_lcd.data[2], m_lcd.data[3], m_lcd.data[4]);
|
||||
}
|
||||
m_lcd.count=(m_lcd.count+1)%40;
|
||||
}
|
||||
m_lcd.clock=clock;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const unsigned char ssystem3_palette[] =
|
||||
{
|
||||
0,12,12,
|
||||
80,82,75,
|
||||
0,12,12
|
||||
};
|
||||
|
||||
|
||||
void ssystem3_state::palette_init(palette_device &palette)
|
||||
{
|
||||
for (int i = 0; i < sizeof(ssystem3_palette) / 3; i++)
|
||||
m_palette->set_pen_color(i, ssystem3_palette[i*3], ssystem3_palette[i*3+1], ssystem3_palette[i*3+2]);
|
||||
}
|
||||
|
||||
|
||||
void ssystem3_state::video_start()
|
||||
{
|
||||
// artwork seams to need this
|
||||
m_videoram = std::make_unique<uint8_t[]>(6 * 2 + 24);
|
||||
}
|
||||
|
||||
|
||||
static const char led[]={
|
||||
" aaaaaaaaaaaa\r"
|
||||
" f aaaaaaaaaa b\r"
|
||||
" ff aaaaaaaa bb\r"
|
||||
" fff aaaaaa bbb\r"
|
||||
" ffff bbbb\r"
|
||||
" ffff bbbb\r"
|
||||
" ffff bbbb\r"
|
||||
" ffff bbbb\r"
|
||||
" ffff bbbb\r"
|
||||
" ffff bbbb\r"
|
||||
" fff bbb\r"
|
||||
" f gggggggg b\r"
|
||||
" gggggggggggg\r"
|
||||
" gggggggggggg\r"
|
||||
" e gggggggg c\r"
|
||||
" eee ccc\r"
|
||||
" eeee cccc\r"
|
||||
" eeee cccc\r"
|
||||
"eeee cccc\r"
|
||||
"eeee cccc\r"
|
||||
"eeee cccc\r"
|
||||
"eeee cccc\r"
|
||||
"eee dddddd ccc\r"
|
||||
"ee dddddddd cc\r"
|
||||
"e dddddddddd c\r"
|
||||
" dddddddddddd"
|
||||
};
|
||||
|
||||
void ssystem3_state::ssystem3_draw_7segment(bitmap_ind16 &bitmap,int value, int x, int y)
|
||||
{
|
||||
int i, xi, yi, mask, color;
|
||||
|
||||
for (i=0, xi=0, yi=0; led[i]; i++) {
|
||||
mask=0;
|
||||
switch (led[i]) {
|
||||
case 'a': mask=0x80; break;
|
||||
case 'b': mask=0x40; break;
|
||||
case 'c': mask=0x20; break;
|
||||
case 'd': mask=0x10; break;
|
||||
case 'e': mask=8; break;
|
||||
case 'f': mask=4; break;
|
||||
case 'g': mask=2; break;
|
||||
case 'h':
|
||||
// this is more likely wired to the separate leds
|
||||
mask=1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mask!=0) {
|
||||
color=(value&mask)?1:0;
|
||||
bitmap.pix16(y+yi, x+xi) = color;
|
||||
}
|
||||
if (led[i]!='\r') xi++;
|
||||
else { yi++, xi=0; }
|
||||
}
|
||||
}
|
||||
|
||||
static const struct {
|
||||
int x,y;
|
||||
} ssystem3_led_pos[5]={
|
||||
{150,123},
|
||||
{170,123},
|
||||
{200,123},
|
||||
{220,123},
|
||||
{125,123}
|
||||
};
|
||||
|
||||
static const char single_led[]=
|
||||
" c 1 1\r"
|
||||
" bb ccccc bb 1 1\r"
|
||||
" bb c bb 1 1\r"
|
||||
" bb bb bb bb 1 1\r"
|
||||
" bb bbbbbbbbbbb bb 111 111\r"
|
||||
" 1 1\r"
|
||||
" 99 9999999 99 1 1\r"
|
||||
" 99 99 1 1\r"
|
||||
" 88888888888 9 1 1\r"
|
||||
" 88 8 9999\r"
|
||||
" 8888 6666666 8 9999\r"
|
||||
" 8888 6 6\r"
|
||||
" 6 777 6\r"
|
||||
" 6 777 6\r"
|
||||
" 6 777 6\r"
|
||||
" 6 777 6\r"
|
||||
" 6 77777 6\r"
|
||||
" 6 77777 6 2 2 4\r"
|
||||
" 6 7777777 6 2 2 4\r"
|
||||
" 6 7777777 6 2 2 4\r"
|
||||
" 6 777777777 6 2 2 44444\r"
|
||||
" 6 777777777 6 2 2 4\r"
|
||||
" 6 77777777777 6 2 2 33433\r"
|
||||
" 6 7 6 2 2 4\r"
|
||||
" 6666666 7 6666666 2 2 4\r"
|
||||
" 7 2 2 4\r"
|
||||
" 77777777777777777\r"
|
||||
"\r"
|
||||
"\r"
|
||||
"\r"
|
||||
" 5555555555555555555 000000 000000 00 00 0000000 00 00 00000000 00 00 00 0000000\r"
|
||||
"5 5 0000000 00000000 000 000 00000000 00 00 00000000 00 000 00 00000000\r"
|
||||
"5 5 00 00 00 0000 0000 00 00 00 00 00 00 0000 00 00\r"
|
||||
"5 5 00 00 00 00 00 00 00 00000000 00 00 00 00 00 00 00 00 0000\r"
|
||||
"5 5 00 00 00 00 00 00 00 0000000 00 00 00 00 00 0000 00 00\r"
|
||||
"5 5 0000000 00000000 00 0000 00 00 00000000 00 00 00 000 00000000\r"
|
||||
" 55555555 55555555 000000 000000 00 00 00 00 000000 00 00 00 00 0000000"
|
||||
;
|
||||
|
||||
void ssystem3_state::ssystem3_draw_led(bitmap_ind16 &bitmap,int16_t color, int x, int y, int ch)
|
||||
{
|
||||
int j, xi=0;
|
||||
for (j=0; single_led[j]; j++) {
|
||||
switch (single_led[j]) {
|
||||
default:
|
||||
if (ch==single_led[j]) {
|
||||
bitmap.pix16(y, x+xi) = color;
|
||||
}
|
||||
xi++;
|
||||
break;
|
||||
case ' ':
|
||||
xi++;
|
||||
break;
|
||||
case '\r':
|
||||
xi=0;
|
||||
y++;
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ssystem3_state::screen_update_ssystem3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
ssystem3_draw_7segment(bitmap, m_lcd.data[1+i], ssystem3_led_pos[i].x, ssystem3_led_pos[i].y);
|
||||
}
|
||||
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '0'); //?
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&2?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '5');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&4?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '7');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&8?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, 'b');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&0x10?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '9');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&0x20?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '8');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&0x40?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, 'c');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[0]&0x80?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '6');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[1]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '2');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[2]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '1'); //?
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[3]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3');
|
||||
ssystem3_draw_led(bitmap, m_lcd.data[4]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4');
|
||||
|
||||
if (m_configuration->read() & 1) { // playfield(optional device)
|
||||
static const int lcd_signs_on[]={
|
||||
0, // empty
|
||||
1, // bauer
|
||||
3, // springer
|
||||
0x11, // l??ufer
|
||||
7, // turm
|
||||
0x1f, // dame
|
||||
0x17, // k??nig
|
||||
0
|
||||
};
|
||||
int y, x;
|
||||
for (y=0; y<8; y++) {
|
||||
for (x=0; x<8; x++) {
|
||||
int figure, black;
|
||||
int xp=263+x*22;
|
||||
int yp=55+(y^7)*28;
|
||||
ssystem3_playfield_getfigure(x, y, &figure, &black);
|
||||
ssystem3_draw_led(bitmap, lcd_signs_on[figure]&1?1:0, xp, yp, '6');
|
||||
ssystem3_draw_led(bitmap, lcd_signs_on[figure]&2?1:0, xp, yp, '8');
|
||||
ssystem3_draw_led(bitmap, lcd_signs_on[figure]&4?1:0, xp, yp, '9');
|
||||
ssystem3_draw_led(bitmap, lcd_signs_on[figure]&8?1:0, xp, yp, 'b');
|
||||
ssystem3_draw_led(bitmap, lcd_signs_on[figure]&0x10?1:0, xp, yp, 'c');
|
||||
ssystem3_draw_led(bitmap, figure!=0 && black?1:0, xp, yp, '7');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user