diff options
author | 2017-02-07 22:26:41 -0500 | |
---|---|---|
committer | 2017-02-07 22:26:41 -0500 | |
commit | 8ef98237ab5dfcf61c95f5f30e40ab83282b8d24 (patch) | |
tree | a19eeb1d957798f5a7485836edab10f4f0aa1df1 /src/devices/video/tms9927.h | |
parent | 5990685b53bb4a47cb5a3ca3f75619b7449fa6aa (diff) |
intvkbd - mostly internal driver improvements (#2045)
WIP - commit. Not much visible progress yet, except that the screen alignment is now correct. But internally things are getting better. Rebased on top of mame0182
Changed intvkbd to use generic TMS9927 support
Modded TMS9927 to allow for driver-specific overscan areas
Aligned STIC and TMS9927 graphics properly
Added prelim support for testing intvkbd printer
Add proper documented memory addresses for tape drive
Bring in commented tape drive code from old MESS source (wip)
Diffstat (limited to 'src/devices/video/tms9927.h')
-rw-r--r-- | src/devices/video/tms9927.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/devices/video/tms9927.h b/src/devices/video/tms9927.h index eac4fdc8463..11a3648fbf8 100644 --- a/src/devices/video/tms9927.h +++ b/src/devices/video/tms9927.h @@ -19,7 +19,9 @@ #define MCFG_TMS9927_REGION(_tag) \ tms9927_device::set_region_tag(*device, "^" _tag); - +#define MCFG_TMS9927_OVERSCAN(_left, _right, _top, _bottom) \ + tms9927_device::set_overscan(*device, _left, _right, _top, _bottom); + class tms9927_device : public device_t, public device_video_interface { @@ -32,7 +34,14 @@ public: 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); } - + static void set_overscan(device_t &device, int left, int right, int top, int bottom) { + tms9927_device &dev = downcast<tms9927_device &>(device); + dev.m_overscan_left = left; + dev.m_overscan_right = right; + dev.m_overscan_top = top; + dev.m_overscan_bottom = bottom; + } + DECLARE_WRITE8_MEMBER(write); DECLARE_READ8_MEMBER(read); @@ -59,7 +68,11 @@ private: devcb_write_line m_write_vsyn; int m_hpixels_per_column; /* number of pixels per video memory address */ - + uint16_t m_overscan_left; + uint16_t m_overscan_right; + uint16_t m_overscan_top; + uint16_t m_overscan_bottom; + // internal state optional_region_ptr<uint8_t> m_selfload; @@ -68,12 +81,13 @@ private: uint8_t m_reg[9]; uint8_t m_start_datarow; uint8_t m_reset; - + /* derived state; no need to save */ uint8_t m_valid_config; uint16_t m_total_hpix, m_total_vpix; uint16_t m_visible_hpix, m_visible_vpix; + int m_vsyn; emu_timer *m_vsync_timer; |