summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/vic20/videopak.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/vic20/videopak.cpp')
-rw-r--r--src/devices/bus/vic20/videopak.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp
index 849f9a00a3b..841d4265a1b 100644
--- a/src/devices/bus/vic20/videopak.cpp
+++ b/src/devices/bus/vic20/videopak.cpp
@@ -97,15 +97,14 @@ GFXDECODE_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void vic20_video_pak_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, MC6845_SCREEN_TAG, SCREEN_TYPE_RASTER, rgb_t::white()));
- screen.set_screen_update(MC6845_TAG, FUNC(h46505_device::screen_update));
- screen.set_size(80*8, 24*8);
- screen.set_visarea(0, 80*8-1, 0, 24*8-1);
- screen.set_refresh_hz(50);
-
- GFXDECODE(config, "gfxdecode", m_palette, gfx_vic20_video_pak);
+MACHINE_CONFIG_START(vic20_video_pak_device::device_add_mconfig)
+ MCFG_SCREEN_ADD_MONOCHROME(MC6845_SCREEN_TAG, RASTER, rgb_t::white())
+ MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, h46505_device, screen_update)
+ MCFG_SCREEN_SIZE(80*8, 24*8)
+ MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1)
+ MCFG_SCREEN_REFRESH_RATE(50)
+
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vic20_video_pak)
PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, XTAL(14'318'181) / 8);
@@ -113,7 +112,7 @@ void vic20_video_pak_device::device_add_mconfig(machine_config &config)
m_crtc->set_show_border_area(true);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(vic20_video_pak_device::crtc_update_row), this);
-}
+MACHINE_CONFIG_END
@@ -162,7 +161,7 @@ void vic20_video_pak_device::device_reset()
// vic20_cd_r - cartridge data read
//-------------------------------------------------
-uint8_t vic20_video_pak_device::vic20_cd_r(offs_t offset, uint8_t data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
+uint8_t vic20_video_pak_device::vic20_cd_r(address_space &space, offs_t offset, uint8_t data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
if (!m_ram_enable)
{
@@ -221,7 +220,7 @@ uint8_t vic20_video_pak_device::vic20_cd_r(offs_t offset, uint8_t data, int ram1
{
if (offset == 0x1bf9)
{
- data = m_crtc->register_r();
+ data = m_crtc->register_r(space, 0);
}
}
@@ -233,7 +232,7 @@ uint8_t vic20_video_pak_device::vic20_cd_r(offs_t offset, uint8_t data, int ram1
// vic20_cd_w - cartridge data write
//-------------------------------------------------
-void vic20_video_pak_device::vic20_cd_w(offs_t offset, uint8_t data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
+void vic20_video_pak_device::vic20_cd_w(address_space &space, offs_t offset, uint8_t data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
if (!m_ram_enable)
{
@@ -293,11 +292,11 @@ void vic20_video_pak_device::vic20_cd_w(offs_t offset, uint8_t data, int ram1, i
switch (offset)
{
case 0x1bf8:
- m_crtc->address_w(data);
+ m_crtc->address_w(space, 0, data);
break;
case 0x1bf9:
- m_crtc->register_w(data);
+ m_crtc->register_w(space, 0, data);
break;
case 0x1bfc: