summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/tms9927.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/tms9927.h')
-rw-r--r--src/devices/video/tms9927.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/devices/video/tms9927.h b/src/devices/video/tms9927.h
index 5358b9b271b..feb49a83be1 100644
--- a/src/devices/video/tms9927.h
+++ b/src/devices/video/tms9927.h
@@ -13,6 +13,9 @@
#define MCFG_TMS9927_VSYN_CALLBACK(_write) \
devcb = &tms9927_device::set_vsyn_wr_callback(*device, DEVCB_##_write);
+#define MCFG_TMS9927_HSYN_CALLBACK(_write) \
+ devcb = &tms9927_device::set_hsyn_wr_callback(*device, DEVCB_##_write);
+
#define MCFG_TMS9927_CHAR_WIDTH(_pixels) \
tms9927_device::set_char_width(*device, _pixels);
@@ -28,6 +31,7 @@ public:
tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> static devcb_base &set_vsyn_wr_callback(device_t &device, Object &&cb) { return downcast<tms9927_device &>(device).m_write_vsyn.set_callback(std::forward<Object>(cb)); }
+ template <class Object> static devcb_base &set_hsyn_wr_callback(device_t &device, Object &&cb) { return downcast<tms9927_device &>(device).m_write_hsyn.set_callback(std::forward<Object>(cb)); }
static void set_char_width(device_t &device, int pixels) { downcast<tms9927_device &>(device).m_hpixels_per_column = pixels; }
static void set_region_tag(device_t &device, const char *tag) { downcast<tms9927_device &>(device).m_selfload.set_tag(tag); }
@@ -44,9 +48,9 @@ public:
DECLARE_READ_LINE_MEMBER(bl_r);
- int screen_reset();
+ bool screen_reset();
int upscroll_offset();
- int cursor_bounds(rectangle &bounds);
+ bool cursor_bounds(rectangle &bounds);
protected:
tms9927_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -60,7 +64,8 @@ protected:
private:
enum
{
- TIMER_VSYNC
+ TIMER_VSYNC,
+ TIMER_HSYNC
};
void state_postload();
@@ -68,6 +73,8 @@ private:
void generic_access(address_space &space, offs_t offset);
devcb_write_line m_write_vsyn;
+ devcb_write_line m_write_hsyn;
+
int m_hpixels_per_column; /* number of pixels per video memory address */
uint16_t m_overscan_left;
uint16_t m_overscan_right;
@@ -81,16 +88,19 @@ private:
uint32_t m_clock;
uint8_t m_reg[9];
uint8_t m_start_datarow;
- uint8_t m_reset;
+ bool m_reset;
+ bool m_vsyn;
+ bool m_hsyn;
/* derived state; no need to save */
- uint8_t m_valid_config;
+ bool m_valid_config;
uint16_t m_total_hpix, m_total_vpix;
uint16_t m_visible_hpix, m_visible_vpix;
-
- int m_vsyn;
+ uint16_t m_vsyn_start, m_vsyn_end;
+ uint16_t m_hsyn_start, m_hsyn_end;
emu_timer *m_vsync_timer;
+ emu_timer *m_hsync_timer;
};