From 070f179694ff6950440c4613cf3542a72ddb3280 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 6 May 2019 20:26:37 +0200 Subject: New working machine added ---------- Computer Chess (Mattel) [hap, Sean Riddle] --- src/devices/video/hlcd0515.cpp | 19 +++++++++++-------- src/mame/drivers/mattelchess.cpp | 6 ++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/devices/video/hlcd0515.cpp b/src/devices/video/hlcd0515.cpp index 92d0bfb26be..eb34af3b78a 100644 --- a/src/devices/video/hlcd0515.cpp +++ b/src/devices/video/hlcd0515.cpp @@ -9,9 +9,6 @@ 0530: specifications unknown, pinout seems similar to 0569 0601: specifications unknown, pinout seems similar to 0569 - TODO: - - read mode is untested - */ #include "emu.h" @@ -129,7 +126,13 @@ void hlcd0515_device::set_control() } // clock 4: read/write mode - m_buffer = (m_control & 1) ? m_ram[m_rowsel] : 0; + if (m_control & 1) + { + m_buffer = m_ram[m_rowsel]; + clock_data(-1); + } + else + m_buffer = 0; } void hlcd0569_device::set_control() @@ -143,11 +146,11 @@ void hlcd0515_device::clock_data(int col) { if (m_control & 1) { - if (col < m_colmax) - m_buffer <<= 1; - - m_dataout = m_buffer >> m_colmax & 1; + m_dataout = m_buffer & 1; m_write_data(m_dataout); + + if (col < m_colmax) + m_buffer >>= 1; } else { diff --git a/src/mame/drivers/mattelchess.cpp b/src/mame/drivers/mattelchess.cpp index 6abe760f962..3da0a4bde70 100644 --- a/src/mame/drivers/mattelchess.cpp +++ b/src/mame/drivers/mattelchess.cpp @@ -11,8 +11,6 @@ Hardware notes: - custom LCD screen with chess squares background TODO: -- It goes bonkers at computer's turn, it reads from LCD RAM and seems it doesn't - get the data it expects - add SAVE switch - internal artwork @@ -120,8 +118,8 @@ WRITE8_MEMBER(mchess_state::lcd_w) // d5: both LCDC DATA IN for (int i = 0; i < 2; i++) { - m_lcd[i]->clock_w(BIT(data, 4)); m_lcd[i]->data_w(BIT(data, 5)); + m_lcd[i]->clock_w(BIT(~data, 4)); } m_lcd_control = data; @@ -216,4 +214,4 @@ ROM_END ******************************************************************************/ // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -CONS( 1980, mchess, 0, 0, mchess, mchess, mchess_state, empty_init, "Mattel", "Computer Chess (Mattel)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING ) +CONS( 1980, mchess, 0, 0, mchess, mchess, mchess_state, empty_init, "Mattel", "Computer Chess (Mattel)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -- cgit v1.2.3