hlcd0538: correct lcd/interrupt pins (nw)

This commit is contained in:
hap 2017-03-10 21:45:11 +01:00
parent d166c9712c
commit cf9d807d18
4 changed files with 26 additions and 17 deletions

View File

@ -8,7 +8,6 @@
0539: 0 rows, 34 columns
TODO:
- LCD pin
- the only difference between 0538/0539 is row pins voltage levels?
*/
@ -26,7 +25,7 @@ const device_type HLCD0539 = device_creator<hlcd0539_device>;
hlcd0538_device::hlcd0538_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_write_cols(*this)
m_write_cols(*this), m_write_interrupt(*this)
{
}
@ -50,15 +49,16 @@ void hlcd0538_device::device_start()
{
// resolve callbacks
m_write_cols.resolve_safe();
m_write_interrupt.resolve_safe();
// zerofill
m_int = 0;
m_lcd = 0;
m_clk = 0;
m_data = 0;
m_shift = 0;
// register for savestates
save_item(NAME(m_int));
save_item(NAME(m_lcd));
save_item(NAME(m_clk));
save_item(NAME(m_data));
save_item(NAME(m_shift));
@ -81,16 +81,19 @@ WRITE_LINE_MEMBER(hlcd0538_device::write_clk)
m_clk = state;
}
WRITE_LINE_MEMBER(hlcd0538_device::write_int)
WRITE_LINE_MEMBER(hlcd0538_device::write_lcd)
{
state = (state) ? 1 : 0;
// transfer to latches on rising edge
if (state && !m_int)
if (state && !m_lcd)
{
m_write_cols(0, m_shift, ~0);
m_write_cols(0, m_shift, ~u64(0));
m_shift = 0;
}
m_int = state;
m_lcd = state;
// interrupt output follows lcd input
m_write_interrupt(state);
}

View File

@ -14,6 +14,10 @@
#define MCFG_HLCD0538_WRITE_COLS_CB(_devcb) \
devcb = &hlcd0538_device::set_write_cols_callback(*device, DEVCB_##_devcb);
// INTERRUPT pin
#define MCFG_HLCD0538_INTERRUPT_CB(_devcb) \
devcb = &hlcd0538_device::set_write_interrupt_callback(*device, DEVCB_##_devcb);
// pinout reference
@ -22,7 +26,7 @@
+V 1 |* \_/ | 40 R 1
DATA IN 2 | | 39 R 2
CLK 3 | | 38 R 3
LCD0 4 | | 37 R 4
LCD 4 | | 37 R 4
GND 5 | | 36 R 5
INTERRUPT 6 | | 35 R 6
C 26 7 | | 34 R 7
@ -51,22 +55,24 @@ public:
// static configuration helpers
template<typename Object> static devcb_base &set_write_cols_callback(device_t &device, Object &&object) { return downcast<hlcd0538_device &>(device).m_write_cols.set_callback(std::forward<Object>(object)); }
template<typename Object> static devcb_base &set_write_interrupt_callback(device_t &device, Object &&object) { return downcast<hlcd0538_device &>(device).m_write_interrupt.set_callback(std::forward<Object>(object)); }
DECLARE_WRITE_LINE_MEMBER(write_clk);
DECLARE_WRITE_LINE_MEMBER(write_int);
DECLARE_WRITE_LINE_MEMBER(write_lcd);
DECLARE_WRITE_LINE_MEMBER(write_data) { m_data = (state) ? 1 : 0; }
protected:
// device-level overrides
virtual void device_start() override;
int m_int; // input pin state
int m_lcd; // input pin state
int m_clk; // "
int m_data; // "
u64 m_shift;
// callbacks
devcb_write64 m_write_cols;
devcb_write_line m_write_interrupt;
};

View File

@ -2242,12 +2242,12 @@ ROM_START( fexcelv ) // model 6092, PCB label 510.1117A02, sound PCB 510.1117A01
ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) ) // PCB2, M27256
ROM_END
ROM_START( fexcela ) // model 6080, PCB label 510-1099A01(manuf.1985) or 510-1099B01(manuf.1986)
ROM_START( fexcela ) // model EP12, PCB label 510-1099A01
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-1072a01.ic5", 0xc000, 0x4000, CRC(212b006d) SHA1(242ff851b0841cbec66bbada6a730da021010e2c) )
ROM_END
ROM_START( fexcelb ) // model EP12, PCB label 510-1099A01
ROM_START( fexcelb ) // model 6080, PCB label 510-1099A01(manuf.1985) or 510-1099B01(manuf.1986)
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-1072b01.ic5", 0xc000, 0x4000, CRC(fd2f6064) SHA1(f84bb98bdb9565a04891eb6820597d7aecc90c21) ) // RCA
ROM_END

View File

@ -384,12 +384,12 @@ WRITE8_MEMBER(novag6502_state::cforte_mux_w)
WRITE8_MEMBER(novag6502_state::cforte_control_w)
{
// d0: lcd data
// d1: lcd clock
// d2: lcd interrupt
// d0: HLCD0538 data in
// d1: HLCD0538 clk
// d2: HLCD0538 lcd
m_hlcd0538->write_data(data & 1);
m_hlcd0538->write_clk(data >> 1 & 1);
m_hlcd0538->write_int(data >> 2 & 1);
m_hlcd0538->write_lcd(data >> 2 & 1);
// d3: unused?