summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/novagbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/novagbase.h')
-rw-r--r--src/mame/includes/novagbase.h54
1 files changed, 11 insertions, 43 deletions
diff --git a/src/mame/includes/novagbase.h b/src/mame/includes/novagbase.h
index e62b32c91ab..e5f3856953c 100644
--- a/src/mame/includes/novagbase.h
+++ b/src/mame/includes/novagbase.h
@@ -2,7 +2,8 @@
// copyright-holders:hap
/******************************************************************************
*
-* Novag chess machines base class
+* Novag chess computers base driver
+* implementation is in machine/novagbase.cpp
*
******************************************************************************/
@@ -11,30 +12,25 @@
#pragma once
+#include "includes/chessbase.h"
+
#include "machine/timer.h"
#include "sound/dac.h"
#include "sound/beep.h"
#include "video/hd44780.h"
#include "emupal.h"
-class novagbase_state : public driver_device
+class novagbase_state : public chessbase_state
{
public:
novagbase_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
+ chessbase_state(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_rombank(*this, "rombank"),
m_beeper(*this, "beeper"),
m_dac(*this, "dac"),
- m_lcd(*this, "hd44780"),
- m_inp_matrix(*this, "IN.%u", 0),
- m_out_x(*this, "%u.%u", 0U, 0U),
- m_out_a(*this, "%u.a", 0U),
- m_out_digit(*this, "digit%u", 0U),
- m_display_wait(33),
- m_display_maxy(1),
- m_display_maxx(0)
+ m_lcd(*this, "hd44780")
{ }
// devices/pointers
@@ -44,20 +40,6 @@ public:
optional_device<beep_device> m_beeper;
optional_device<dac_bit_interface> m_dac;
optional_device<hd44780_device> m_lcd;
- optional_ioport_array<9> m_inp_matrix; // max 9
- output_finder<0x20, 0x20> m_out_x;
- output_finder<0x20> m_out_a;
- output_finder<0x20> m_out_digit;
-
- // misc common
- u16 m_inp_mux; // multiplexed keypad mask
- u16 m_led_select;
- u16 m_led_data;
- u8 m_7seg_data;
- u8 m_lcd_control;
- u8 m_lcd_data;
-
- u16 read_inputs(int columns);
// in case reset button is directly tied to maincpu reset pin
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); }
@@ -66,22 +48,11 @@ public:
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
- // display common
- int m_display_wait; // led/lamp off-delay in milliseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
-
- u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- u8 m_display_decay[0x20][0x20]; // (internal use)
-
- void novag_lcd_palette(palette_device &palette) const;
- TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
+ // lcd common
HD44780_PIXEL_UPDATE(novag_lcd_pixel_update);
- void display_update();
- void set_display_size(int maxx, int maxy);
- void set_display_segmask(u32 digits, u32 mask);
- void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
+ void novag_lcd_palette(palette_device &palette) const;
+ u8 m_lcd_control;
+ u8 m_lcd_data;
protected:
virtual void machine_start() override;
@@ -89,7 +60,4 @@ protected:
};
-INPUT_PORTS_EXTERN( novag_cb_buttons );
-INPUT_PORTS_EXTERN( novag_cb_magnets );
-
#endif // MAME_INCLUDES_NOVAGBASE_H