mirror of
https://github.com/holub/mame
synced 2025-05-30 01:23:07 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
cdc4969955
@ -5,6 +5,7 @@
|
||||
Chess-Master
|
||||
|
||||
TODO:
|
||||
- figure out why chessmsta won't work, for starters it assume z80 carry flag is set at poweron?
|
||||
- the HALT button does not work as it should: it stops the computers calculation
|
||||
(the board LEDs go OFF and the CM's LED goes ON), but the machine doesn't return any move (as it should)
|
||||
- a better artwork
|
||||
@ -18,8 +19,6 @@
|
||||
#include "sound/speaker.h"
|
||||
#include "chessmst.lh"
|
||||
|
||||
#define MASTER_CLOCK (9830400/4) /* 9830.4kHz source */
|
||||
|
||||
class chessmst_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -255,29 +254,52 @@ WRITE8_MEMBER( chessmst_state::pio2_port_b_w )
|
||||
static MACHINE_CONFIG_START( chessmst, chessmst_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) // U880
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_9_8304MHz/4) // U880 Z80 clone
|
||||
MCFG_CPU_PROGRAM_MAP(chessmst_mem)
|
||||
MCFG_CPU_IO_MAP(chessmst_io)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL_9_8304MHz/4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_w))
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL_9_8304MHz/4)
|
||||
MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w))
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_chessmst)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/* devices */
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, MASTER_CLOCK)
|
||||
static MACHINE_CONFIG_START( chessmsta, chessmst_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/4) // U880 Z80 clone
|
||||
MCFG_CPU_PROGRAM_MAP(chessmst_mem)
|
||||
MCFG_CPU_IO_MAP(chessmst_io)
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL_8MHz/4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_w))
|
||||
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, MASTER_CLOCK)
|
||||
MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL_8MHz/4)
|
||||
MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
|
||||
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w))
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_chessmst)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( chessmst )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
@ -293,7 +315,15 @@ ROM_START( chessmst )
|
||||
ROM_LOAD( "065.bin", 0x2400, 0x0400, CRC(4ec0e92c) SHA1(0b748231a50777391b04c1778750fbb46c21bee8) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( chessmsta )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "2764.bin", 0x0000, 0x2000, CRC(6be28876) SHA1(fd7d77b471e7792aef3b2b3f7ff1de4cdafc94c9) )
|
||||
ROM_LOAD( "u2616bm108.bin", 0x2000, 0x0800, CRC(6e69ace3) SHA1(e099b6b6cc505092f64b8d51ab9c70aa64f58f70) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/* Driver */
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 1984, chessmst, 0, 0, chessmst, chessmst, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
|
||||
COMP( 1984, chessmst, 0, 0, chessmst, chessmst, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master (set 1)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
|
||||
COMP( 1984, chessmsta, chessmst, 0, chessmsta, chessmst, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master (set 2)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
|
||||
|
@ -9351,6 +9351,7 @@ cheekyms // 8004 (c) [1980?]
|
||||
|
||||
@source:chessmst.cpp
|
||||
chessmst //
|
||||
chessmsta //
|
||||
|
||||
@source:chesstrv.cpp
|
||||
borisdpl //
|
||||
|
@ -93,6 +93,7 @@
|
||||
|
||||
//#define CRTC_REG_DISP 1
|
||||
//#define SPR_DEBUG 1
|
||||
#define LAYER_DISABLE 0 // for debugging, allow the Q and W keys to be used for disabling graphic layers
|
||||
|
||||
//static UINT32 pshift; // for debugging
|
||||
|
||||
@ -1673,34 +1674,31 @@ void towns_state::video_start()
|
||||
|
||||
UINT32 towns_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bool layer1_en = true, layer2_en = true;
|
||||
bitmap.fill(0x00000000, cliprect);
|
||||
|
||||
if(LAYER_DISABLE)
|
||||
{
|
||||
if(machine().input().code_pressed(KEYCODE_Q))
|
||||
layer1_en = false;
|
||||
if(machine().input().code_pressed(KEYCODE_W))
|
||||
layer2_en = false;
|
||||
}
|
||||
|
||||
if(!(m_video.towns_video_reg[1] & 0x01))
|
||||
{
|
||||
if(!machine().input().code_pressed(KEYCODE_Q))
|
||||
{
|
||||
if((m_video.towns_layer_ctrl & 0x03) != 0)
|
||||
if((m_video.towns_layer_ctrl & 0x03) != 0 && layer1_en)
|
||||
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1);
|
||||
}
|
||||
if(!machine().input().code_pressed(KEYCODE_W))
|
||||
{
|
||||
if((m_video.towns_layer_ctrl & 0x0c) != 0)
|
||||
if((m_video.towns_layer_ctrl & 0x0c) != 0 && layer2_en)
|
||||
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!machine().input().code_pressed(KEYCODE_Q))
|
||||
{
|
||||
if((m_video.towns_layer_ctrl & 0x0c) != 0)
|
||||
if((m_video.towns_layer_ctrl & 0x0c) != 0 && layer1_en)
|
||||
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0);
|
||||
}
|
||||
if(!machine().input().code_pressed(KEYCODE_W))
|
||||
{
|
||||
if((m_video.towns_layer_ctrl & 0x03) != 0)
|
||||
if((m_video.towns_layer_ctrl & 0x03) != 0 && layer2_en)
|
||||
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef SPR_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user