summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/compis/hrg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/compis/hrg.cpp')
-rw-r--r--src/devices/bus/compis/hrg.cpp50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/devices/bus/compis/hrg.cpp b/src/devices/bus/compis/hrg.cpp
index 7aa8aa72f7e..fc1665107fa 100644
--- a/src/devices/bus/compis/hrg.cpp
+++ b/src/devices/bus/compis/hrg.cpp
@@ -77,42 +77,40 @@ UPD7220_DISPLAY_PIXELS_MEMBER( compis_uhrg_device::display_pixels )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void compis_hrg_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER, rgb_t::green()));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
- screen.set_size(640, 400);
- screen.set_visarea(0, 640-1, 0, 400-1);
- screen.set_screen_update(UPD7220_TAG, FUNC(upd7220_device::screen_update));
+MACHINE_CONFIG_START(compis_hrg_device::device_add_mconfig)
+ MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
+ MCFG_SCREEN_SIZE(640, 400)
+ MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
+ MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
UPD7220(config, m_crtc, 2252500); // unknown clock
m_crtc->set_addrmap(0, &compis_hrg_device::hrg_map);
- m_crtc->set_display_pixels(FUNC(compis_hrg_device::display_pixels));
+ m_crtc->set_display_pixels_callback(FUNC(compis_hrg_device::display_pixels), this);
m_crtc->set_screen(SCREEN_TAG);
PALETTE(config, m_palette, palette_device::MONOCHROME);
-}
+MACHINE_CONFIG_END
-void compis_uhrg_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER, rgb_t::green()));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
- screen.set_size(1280, 800);
- screen.set_visarea(0, 1280-1, 0, 800-1);
- screen.set_screen_update(UPD7220_TAG, FUNC(upd7220_device::screen_update));
+MACHINE_CONFIG_START(compis_uhrg_device::device_add_mconfig)
+ MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
+ MCFG_SCREEN_SIZE(1280, 800)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1280-1, 0, 800-1)
+ MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
UPD7220(config, m_crtc, 2252500*2); // unknown clock
m_crtc->set_addrmap(0, &compis_uhrg_device::uhrg_map);
- m_crtc->set_display_pixels(FUNC(compis_uhrg_device::display_pixels));
+ m_crtc->set_display_pixels_callback(FUNC(compis_uhrg_device::display_pixels), this);
m_crtc->set_screen(SCREEN_TAG);
PALETTE(config, m_palette, palette_device::MONOCHROME);
-}
+MACHINE_CONFIG_END
//**************************************************************************
@@ -165,12 +163,12 @@ void compis_hrg_device::device_reset()
// pcs6_6_r -
//-------------------------------------------------
-uint8_t compis_hrg_device::pcs6_6_r(offs_t offset)
+uint8_t compis_hrg_device::pcs6_6_r(address_space &space, offs_t offset)
{
uint8_t data = 0xff;
if (offset < 2)
- data = m_crtc->read(offset & 0x01);
+ data = m_crtc->read(space, offset & 0x01);
else
// monochrome only, hblank? vblank?
if(offset == 2)
@@ -202,10 +200,10 @@ uint8_t compis_hrg_device::pcs6_6_r(offs_t offset)
// pcs6_6_w -
//-------------------------------------------------
-void compis_hrg_device::pcs6_6_w(offs_t offset, uint8_t data)
+void compis_hrg_device::pcs6_6_w(address_space &space, offs_t offset, uint8_t data)
{
//logerror("%s PCS 6:6 write %04x : %02x\n", machine().describe_context(), offset, data);
// 0x336 is likely the color plane register
- if (offset < 2) m_crtc->write(offset & 0x01, data);
+ if (offset < 2) m_crtc->write(space, offset & 0x01, data);
}