This commit is contained in:
briantro 2016-09-03 22:59:49 -05:00
commit cdc4969955
3 changed files with 68 additions and 39 deletions

View File

@ -5,6 +5,7 @@
Chess-Master Chess-Master
TODO: 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 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) (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 - a better artwork
@ -18,8 +19,6 @@
#include "sound/speaker.h" #include "sound/speaker.h"
#include "chessmst.lh" #include "chessmst.lh"
#define MASTER_CLOCK (9830400/4) /* 9830.4kHz source */
class chessmst_state : public driver_device class chessmst_state : public driver_device
{ {
public: public:
@ -255,45 +254,76 @@ WRITE8_MEMBER( chessmst_state::pio2_port_b_w )
static MACHINE_CONFIG_START( chessmst, chessmst_state ) static MACHINE_CONFIG_START( chessmst, chessmst_state )
/* basic machine hardware */ /* 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_PROGRAM_MAP(chessmst_mem)
MCFG_CPU_IO_MAP(chessmst_io) 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) MCFG_DEFAULT_LAYOUT(layout_chessmst)
/* sound hardware */ /* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
/* devices */ static MACHINE_CONFIG_START( chessmsta, chessmst_state )
MCFG_DEVICE_ADD("z80pio1", Z80PIO, MASTER_CLOCK)
/* 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_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w)) 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_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_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r))
MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w)) 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 MACHINE_CONFIG_END
/* ROM definition */ /* ROM definition */
ROM_START( chessmst ) ROM_START( chessmst )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD( "056.bin", 0x0000, 0x0400, CRC(2b90e5d3) SHA1(c47445964b2e6cb11bd1f27e395cf980c97af196)) ROM_LOAD( "056.bin", 0x0000, 0x0400, CRC(2b90e5d3) SHA1(c47445964b2e6cb11bd1f27e395cf980c97af196) )
ROM_LOAD( "057.bin", 0x0400, 0x0400, CRC(e666fc56) SHA1(3fa75b82cead81973bea94191a5c35f0acaaa0e6)) ROM_LOAD( "057.bin", 0x0400, 0x0400, CRC(e666fc56) SHA1(3fa75b82cead81973bea94191a5c35f0acaaa0e6) )
ROM_LOAD( "058.bin", 0x0800, 0x0400, CRC(6a17fbec) SHA1(019051e93a5114477c50eaa87e1ff01b02eb404d)) ROM_LOAD( "058.bin", 0x0800, 0x0400, CRC(6a17fbec) SHA1(019051e93a5114477c50eaa87e1ff01b02eb404d) )
ROM_LOAD( "059.bin", 0x0c00, 0x0400, CRC(e96e3d07) SHA1(20fab75f206f842231f0414ebc473ce2a7371e7f)) ROM_LOAD( "059.bin", 0x0c00, 0x0400, CRC(e96e3d07) SHA1(20fab75f206f842231f0414ebc473ce2a7371e7f) )
ROM_LOAD( "060.bin", 0x1000, 0x0400, CRC(0e31f000) SHA1(daac924b79957a71a4b276bf2cef44badcbe37d3)) ROM_LOAD( "060.bin", 0x1000, 0x0400, CRC(0e31f000) SHA1(daac924b79957a71a4b276bf2cef44badcbe37d3) )
ROM_LOAD( "061.bin", 0x1400, 0x0400, CRC(69ad896d) SHA1(25d999b59d4cc74bd339032c26889af00e64df60)) ROM_LOAD( "061.bin", 0x1400, 0x0400, CRC(69ad896d) SHA1(25d999b59d4cc74bd339032c26889af00e64df60) )
ROM_LOAD( "062.bin", 0x1800, 0x0400, CRC(c42925fe) SHA1(c42d8d7c30a9b6d91ac994cec0cc2723f41324e9)) ROM_LOAD( "062.bin", 0x1800, 0x0400, CRC(c42925fe) SHA1(c42d8d7c30a9b6d91ac994cec0cc2723f41324e9) )
ROM_LOAD( "063.bin", 0x1c00, 0x0400, CRC(86be4cdb) SHA1(741f984c15c6841e227a8722ba30cf9e6b86d878)) ROM_LOAD( "063.bin", 0x1c00, 0x0400, CRC(86be4cdb) SHA1(741f984c15c6841e227a8722ba30cf9e6b86d878) )
ROM_LOAD( "064.bin", 0x2000, 0x0400, CRC(e82f5480) SHA1(38a939158052f5e6484ee3725b86e522541fe4aa)) ROM_LOAD( "064.bin", 0x2000, 0x0400, CRC(e82f5480) SHA1(38a939158052f5e6484ee3725b86e522541fe4aa) )
ROM_LOAD( "065.bin", 0x2400, 0x0400, CRC(4ec0e92c) SHA1(0b748231a50777391b04c1778750fbb46c21bee8)) ROM_LOAD( "065.bin", 0x2400, 0x0400, CRC(4ec0e92c) SHA1(0b748231a50777391b04c1778750fbb46c21bee8) )
ROM_END 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 */ /* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ /* 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 ) 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 )

View File

@ -9351,6 +9351,7 @@ cheekyms // 8004 (c) [1980?]
@source:chessmst.cpp @source:chessmst.cpp
chessmst // chessmst //
chessmsta //
@source:chesstrv.cpp @source:chesstrv.cpp
borisdpl // borisdpl //

View File

@ -93,6 +93,7 @@
//#define CRTC_REG_DISP 1 //#define CRTC_REG_DISP 1
//#define SPR_DEBUG 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 //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) 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); 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(!(m_video.towns_video_reg[1] & 0x01))
{ {
if(!machine().input().code_pressed(KEYCODE_Q)) if((m_video.towns_layer_ctrl & 0x03) != 0 && layer1_en)
{
if((m_video.towns_layer_ctrl & 0x03) != 0)
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1); towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1);
} if((m_video.towns_layer_ctrl & 0x0c) != 0 && layer2_en)
if(!machine().input().code_pressed(KEYCODE_W))
{
if((m_video.towns_layer_ctrl & 0x0c) != 0)
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0); towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0);
} }
}
else else
{ {
if(!machine().input().code_pressed(KEYCODE_Q)) if((m_video.towns_layer_ctrl & 0x0c) != 0 && layer1_en)
{
if((m_video.towns_layer_ctrl & 0x0c) != 0)
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0); towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[0],0);
} if((m_video.towns_layer_ctrl & 0x03) != 0 && layer2_en)
if(!machine().input().code_pressed(KEYCODE_W))
{
if((m_video.towns_layer_ctrl & 0x03) != 0)
towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1); towns_crtc_draw_layer(bitmap,&m_video.towns_crtc_layerscr[1],1);
} }
}
#if 0 #if 0
#ifdef SPR_DEBUG #ifdef SPR_DEBUG