summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-08-21 09:04:09 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-08-21 09:04:09 -0400
commitb3e306b985c98019687f46fb08cd4f999ec751f7 (patch)
treef24ea3b993f6486db005634b84856ccc90346e71 /src/mame
parentafdcf4dcec6e38611f4266ae78a612025d1cdc05 (diff)
divideo: Fetch screen to be potentially configured during device_config_complete (nw)
- Allow device finder to be used as an argument for set_screen (nw) screen: Calculate physical aspect ratio whenever required, not in device_config_complete, since the renderer caches the result anyway (nw) cdp1861, cdp1864: Eliminate the "magic reference" constructors, doing their work in device_config_complete instead (nw)
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/cosmicos.cpp5
-rw-r--r--src/mame/drivers/elf.cpp5
-rw-r--r--src/mame/drivers/eti660.cpp8
-rw-r--r--src/mame/drivers/studio2.cpp13
-rw-r--r--src/mame/drivers/tmc2000e.cpp8
-rw-r--r--src/mame/drivers/vip.cpp6
-rw-r--r--src/mame/video/tmc1800.cpp10
7 files changed, 39 insertions, 16 deletions
diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp
index 553997796ee..f3aa02eba41 100644
--- a/src/mame/drivers/cosmicos.cpp
+++ b/src/mame/drivers/cosmicos.cpp
@@ -36,6 +36,7 @@
#include "emu.h"
#include "includes/cosmicos.h"
+#include "screen.h"
#include "speaker.h"
#include "cosmicos.lh"
@@ -527,13 +528,15 @@ MACHINE_CONFIG_START(cosmicos_state::cosmicos)
MCFG_TIMER_DRIVER_ADD_PERIODIC("digit", cosmicos_state, digit_tick, attotime::from_hz(100))
MCFG_TIMER_DRIVER_ADD_PERIODIC("interrupt", cosmicos_state, int_tick, attotime::from_hz(1000))
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
+
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- CDP1864(config, m_cti, 1.75_MHz_XTAL, SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1864(config, m_cti, 1.75_MHz_XTAL).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set(FUNC(cosmicos_state::dmaout_w));
diff --git a/src/mame/drivers/elf.cpp b/src/mame/drivers/elf.cpp
index 2a3de82e26a..f9ce8358370 100644
--- a/src/mame/drivers/elf.cpp
+++ b/src/mame/drivers/elf.cpp
@@ -17,6 +17,7 @@
#include "emu.h"
#include "includes/elf.h"
#include "elf2.lh"
+#include "screen.h"
#define RUN \
BIT(m_special->read(), 0)
@@ -251,11 +252,11 @@ MACHINE_CONFIG_START(elf2_state::elf2)
/* video hardware */
config.set_default_layout(layout_elf2);
-
- CDP1861(config, m_vdc, XTAL(3'579'545)/2, SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1861(config, m_vdc, XTAL(3'579'545)/2).set_screen(SCREEN_TAG);
m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1);
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
/* devices */
MCFG_DEVICE_ADD(MM74C923_TAG, MM74C923, 0)
diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp
index dbd4eef6fcd..9ca22647fc5 100644
--- a/src/mame/drivers/eti660.cpp
+++ b/src/mame/drivers/eti660.cpp
@@ -38,6 +38,7 @@
#include "emu.h"
#include "includes/eti660.h"
+#include "screen.h"
#include "speaker.h"
@@ -318,9 +319,12 @@ MACHINE_CONFIG_START(eti660_state::eti660)
m_maincpu->q_cb().set(FUNC(eti660_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(eti660_state::dma_w));
- /* video/sound hardware */
+ /* video hardware */
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
+
+ /* sound hardware */
SPEAKER(config, "mono").front_center();
- CDP1864(config, m_cti, XTAL(8'867'238)/5, SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1864(config, m_cti, XTAL(8'867'238)/5).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
diff --git a/src/mame/drivers/studio2.cpp b/src/mame/drivers/studio2.cpp
index a98a74c3f69..40282dc6999 100644
--- a/src/mame/drivers/studio2.cpp
+++ b/src/mame/drivers/studio2.cpp
@@ -194,6 +194,7 @@ Notes:
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "screen.h"
#include "softlist.h"
#include "speaker.h"
@@ -660,7 +661,8 @@ MACHINE_CONFIG_START(studio2_state::studio2)
m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w));
/* video hardware */
- CDP1861(config, m_vdc, 1760000, SCREEN(config, m_screen, SCREEN_TYPE_RASTER));
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ CDP1861(config, m_vdc, 1760000).set_screen(m_screen);
m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1);
@@ -685,11 +687,13 @@ MACHINE_CONFIG_START(visicom_state::visicom)
m_maincpu->dma_wr_cb().set(FUNC(visicom_state::dma_w));
/* video hardware */
- CDP1861(config, m_vdc, XTAL(3'579'545)/2, SCREEN(config, m_screen, SCREEN_TYPE_RASTER));
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_screen_update(FUNC(visicom_state::screen_update));
+
+ CDP1861(config, m_vdc, XTAL(3'579'545)/2).set_screen(m_screen);
m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1);
- m_screen->set_screen_update(FUNC(visicom_state::screen_update));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -718,7 +722,8 @@ MACHINE_CONFIG_START(mpt02_state::mpt02)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00);
- CDP1864(config, m_cti, 1.75_MHz_XTAL, SCREEN(config, m_screen, SCREEN_TYPE_RASTER));
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ CDP1864(config, m_cti, 1.75_MHz_XTAL).set_screen(m_screen);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp
index 1d6d43cfee3..315f398479d 100644
--- a/src/mame/drivers/tmc2000e.cpp
+++ b/src/mame/drivers/tmc2000e.cpp
@@ -34,6 +34,7 @@
#include "emu.h"
#include "includes/tmc2000e.h"
+#include "screen.h"
#include "speaker.h"
@@ -293,9 +294,12 @@ void tmc2000e_state::tmc2000e(machine_config &config)
m_maincpu->q_cb().set(FUNC(tmc2000e_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(tmc2000e_state::dma_w));
- // video/sound hardware
+ // video hardware
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
+
+ // sound hardware
SPEAKER(config, "mono").front_center();
- CDP1864(config, m_cti, 1.75_MHz_XTAL, SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1864(config, m_cti, 1.75_MHz_XTAL).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
diff --git a/src/mame/drivers/vip.cpp b/src/mame/drivers/vip.cpp
index 88d9a6d5af9..54ceade7ab1 100644
--- a/src/mame/drivers/vip.cpp
+++ b/src/mame/drivers/vip.cpp
@@ -222,6 +222,7 @@ Notes:
#include "emu.h"
#include "includes/vip.h"
+#include "screen.h"
#include "softlist.h"
#include "speaker.h"
@@ -716,11 +717,12 @@ MACHINE_CONFIG_START(vip_state::vip)
m_maincpu->tpb_cb().set(m_exp, FUNC(vip_expansion_slot_device::tpb_w));
// video hardware
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- CDP1861(config, m_vdc, 3.52128_MHz_XTAL / 2, screen);
+ CDP1861(config, m_vdc, 3.52128_MHz_XTAL / 2).set_screen(SCREEN_TAG);
m_vdc->int_cb().set(FUNC(vip_state::vdc_int_w));
m_vdc->dma_out_cb().set(FUNC(vip_state::vdc_dma_out_w));
m_vdc->efx_cb().set(FUNC(vip_state::vdc_ef1_w));
+
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
screen.set_screen_update(FUNC(vip_state::screen_update));
// sound hardware
diff --git a/src/mame/video/tmc1800.cpp b/src/mame/video/tmc1800.cpp
index 83d2471ca4e..71110e5aa51 100644
--- a/src/mame/video/tmc1800.cpp
+++ b/src/mame/video/tmc1800.cpp
@@ -7,6 +7,7 @@
#include "machine/rescap.h"
#include "sound/cdp1864.h"
#include "video/cdp1861.h"
+#include "screen.h"
#include "speaker.h"
@@ -38,10 +39,11 @@ uint32_t osc1000b_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
void tmc1800_state::tmc1800_video(machine_config &config)
{
- CDP1861(config, m_vdc, XTAL(1'750'000), SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1861(config, m_vdc, XTAL(1'750'000)).set_screen(SCREEN_TAG);
m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1);
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
}
MACHINE_CONFIG_START(osc1000b_state::osc1000b_video)
@@ -54,8 +56,9 @@ MACHINE_CONFIG_END
void tmc2000_state::tmc2000_video(machine_config &config)
{
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
SPEAKER(config, "mono").front_center();
- CDP1864(config, m_cti, XTAL(1'750'000), SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1864(config, m_cti, XTAL(1'750'000)).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
@@ -69,8 +72,9 @@ void tmc2000_state::tmc2000_video(machine_config &config)
void nano_state::nano_video(machine_config &config)
{
+ SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
SPEAKER(config, "mono").front_center();
- CDP1864(config, m_cti, XTAL(1'750'000), SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ CDP1864(config, m_cti, XTAL(1'750'000)).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
m_cti->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_cti->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);