diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index 3e1a4c54996..f43d77c5c51 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -23,30 +23,6 @@ //#define VERBOSE_OUT(x) printf x #define VERBOSE_OUT(x) -/*************************************************************************** - - Static declarations - -***************************************************************************/ - -//ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync -fixedfreq_interface fixedfreq_mode_ntsc720 = { - 13500000, - 720,736,799,858, - 480,486,492,525, - 2, /* interlaced */ - 0.3 -}; - -//ModeLine "704x480@30i" 13.5 704 728 791 858 480 486 492 525 -fixedfreq_interface fixedfreq_mode_ntsc704 = { - 13500000, - 704,728,791,858, - 480,486,492,525, - 2, /* interlaced */ - 0.3 -}; - /*************************************************************************** Fixed frequency monitor @@ -57,32 +33,40 @@ const device_type FIXFREQ = &device_creator; fixedfreq_device::fixedfreq_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_video_interface(mconfig, *this, false) + device_video_interface(mconfig, *this, false), + // default to NTSC "704x480@30i" + m_monitor_clock(13500000), + m_hvisible(704), + m_hfrontporch(728), + m_hsync(791), + m_hbackporch(858), + m_vvisible(480), + m_vfrontporch(486), + m_vsync(492), + m_vbackporch(525), + m_fieldcount(2), + m_sync_threshold(0.3) { } fixedfreq_device::fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FIXFREQ, "Fixed Frequency Monochrome Monitor", tag, owner, clock, "fixfreq", __FILE__), - device_video_interface(mconfig, *this, false) + device_video_interface(mconfig, *this, false), + // default to NTSC "704x480@30i" + m_monitor_clock(13500000), + m_hvisible(704), + m_hfrontporch(728), + m_hsync(791), + m_hbackporch(858), + m_vvisible(480), + m_vfrontporch(486), + m_vsync(492), + m_vbackporch(525), + m_fieldcount(2), + m_sync_threshold(0.3) { } -void fixedfreq_device::device_config_complete() -{ - const fixedfreq_interface *intf = reinterpret_cast(static_config()); - - if ( intf != NULL ) - { - *static_cast(this) = *intf; - } - else - { - *static_cast(this) = fixedfreq_mode_ntsc704; - } - -} - - void fixedfreq_device::device_start() { m_htotal = 0; diff --git a/src/emu/video/fixfreq.h b/src/emu/video/fixfreq.h index c636fc2c354..fa9703cd2b4 100644 --- a/src/emu/video/fixfreq.h +++ b/src/emu/video/fixfreq.h @@ -18,42 +18,77 @@ #define FIXFREQ_INTERFACE(name) \ const fixedfreq_interface (name) = -#define MCFG_FIXFREQ_ADD(_tag, _screen_tag, _config) \ +#define MCFG_FIXFREQ_ADD(_tag, _screen_tag) \ MCFG_SCREEN_ADD(_screen_tag, RASTER) \ MCFG_SCREEN_RAW_PARAMS(13500000, 858, 0, 858, 525, 0, 525) \ MCFG_SCREEN_UPDATE_DEVICE(_tag, fixedfreq_device, screen_update) \ MCFG_DEVICE_ADD(_tag, FIXFREQ, 0) \ - MCFG_VIDEO_SET_SCREEN(_screen_tag) \ - MCFG_DEVICE_CONFIG(_config) + MCFG_VIDEO_SET_SCREEN(_screen_tag) -struct fixedfreq_interface { - UINT32 m_monitor_clock; - int m_hvisible; - int m_hfrontporch; - int m_hsync; - int m_hbackporch; - int m_vvisible; - int m_vfrontporch; - int m_vsync; - int m_vbackporch; - int m_fieldcount; - double m_sync_threshold; -}; +#define MCFG_FIXFREQ_MONITOR_CLOCK(_clock) \ + fixedfreq_device::set_minitor_clock(*device, _clock); + +#define MCFG_FIXFREQ_HORZ_PARAMS(_visible, _frontporch, _sync, _backporch) \ + fixedfreq_device::set_horz_params(*device, _visible, _frontporch, _sync, _backporch); + +#define MCFG_FIXFREQ_VERT_PARAMS(_visible, _frontporch, _sync, _backporch) \ + fixedfreq_device::set_vert_params(*device, _visible, _frontporch, _sync, _backporch); + +#define MCFG_FIXFREQ_FIELDCOUNT(_count) \ + fixedfreq_device::set_fieldcount(*device, _count); + +#define MCFG_FIXFREQ_SYNC_THRESHOLD(_threshold) \ + fixedfreq_device::set_threshold(*device, _threshold); + +// pre-defined configurations + +//ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync +#define MCFG_FIXFREQ_MODE_NTSC720 \ + MCFG_FIXFREQ_MONITOR_CLOCK(13500000) \ + MCFG_FIXFREQ_HORZ_PARAMS(720, 736, 799, 858) \ + MCFG_FIXFREQ_VERT_PARAMS(480, 486, 492, 525) \ + MCFG_FIXFREQ_FIELDCOUNT(2) \ + MCFG_FIXFREQ_SYNC_THRESHOLD(0.3) + +//ModeLine "704x480@30i" 13.5 704 728 791 858 480 486 492 525 +#define MCFG_FIXFREQ_MODE_NTSC704 \ + MCFG_FIXFREQ_MONITOR_CLOCK(13500000) \ + MCFG_FIXFREQ_HORZ_PARAMS(704, 728, 791, 858) \ + MCFG_FIXFREQ_VERT_PARAMS(480, 486, 492, 525) \ + MCFG_FIXFREQ_FIELDCOUNT(2) \ + MCFG_FIXFREQ_SYNC_THRESHOLD(0.3) -extern fixedfreq_interface fixedfreq_mode_ntsc704; -extern fixedfreq_interface fixedfreq_mode_ntsc720; // ======================> vga_device class fixedfreq_device : public device_t, - public device_video_interface, - public fixedfreq_interface + public device_video_interface { public: // construction/destruction fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); fixedfreq_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + // inline configuration helpers + static void set_minitor_clock(device_t &device, UINT32 clock) { downcast(device).m_monitor_clock = clock; } + static void set_fieldcount(device_t &device, int count) { downcast(device).m_fieldcount = count; } + static void set_threshold(device_t &device, double threshold) { downcast(device).m_sync_threshold = threshold; } + static void set_horz_params(device_t &device, int visible, int frontporch, int sync, int backporch) + { + fixedfreq_device &dev = downcast(device); + dev.m_hvisible = visible; + dev.m_hfrontporch = frontporch; + dev.m_hsync = sync; + dev.m_hbackporch = backporch; + } + static void set_vert_params(device_t &device, int visible, int frontporch, int sync, int backporch) + { + fixedfreq_device &dev = downcast(device); + dev.m_vvisible = visible; + dev.m_vfrontporch = frontporch; + dev.m_vsync = sync; + dev.m_vbackporch = backporch; + } virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -61,7 +96,6 @@ public: protected: // device-level overrides - virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); virtual void device_post_load(); @@ -89,6 +123,19 @@ private: bitmap_rgb32 *m_bitmap[2]; int m_cur_bm; + /* adjustable by drivers */ + UINT32 m_monitor_clock; + int m_hvisible; + int m_hfrontporch; + int m_hsync; + int m_hbackporch; + int m_vvisible; + int m_vfrontporch; + int m_vsync; + int m_vbackporch; + int m_fieldcount; + double m_sync_threshold; + /* sync separator */ double m_vint; double m_int_trig; diff --git a/src/mame/drivers/a1supply.c b/src/mame/drivers/a1supply.c index a4426688519..81e09d091ad 100644 --- a/src/mame/drivers/a1supply.c +++ b/src/mame/drivers/a1supply.c @@ -31,14 +31,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_a1supply = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -103,7 +95,12 @@ static MACHINE_CONFIG_START( a1supply, a1supply_state ) MCFG_NETLIST_SETUP(a1supply) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_a1supply) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/aleisttl.c b/src/mame/drivers/aleisttl.c index 76f2c58b168..ef8dde605e0 100644 --- a/src/mame/drivers/aleisttl.c +++ b/src/mame/drivers/aleisttl.c @@ -33,14 +33,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_sburners = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -105,7 +97,12 @@ static MACHINE_CONFIG_START( sburners, sburners_state ) MCFG_NETLIST_SETUP(sburners) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_sburners) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/atarittl.c b/src/mame/drivers/atarittl.c index 61b56f1a318..fe872309e8a 100644 --- a/src/mame/drivers/atarittl.c +++ b/src/mame/drivers/atarittl.c @@ -76,14 +76,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_atarikee = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -150,7 +142,12 @@ static MACHINE_CONFIG_START( atarikee, atarikee_state ) MCFG_NETLIST_SETUP(atarikee) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_atarikee) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/bailey.c b/src/mame/drivers/bailey.c index 93fcf45d78c..35ecad0629e 100644 --- a/src/mame/drivers/bailey.c +++ b/src/mame/drivers/bailey.c @@ -26,14 +26,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_bailey = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -98,7 +90,12 @@ static MACHINE_CONFIG_START( bailey, bailey_state ) MCFG_NETLIST_SETUP(bailey) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_bailey) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/chicago.c b/src/mame/drivers/chicago.c index 2308a56485d..023abf4126b 100644 --- a/src/mame/drivers/chicago.c +++ b/src/mame/drivers/chicago.c @@ -35,14 +35,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_chicago = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -107,10 +99,14 @@ static MACHINE_CONFIG_START( chicago, chicago_state ) MCFG_NETLIST_SETUP(chicago) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_chicago) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END - /*************************************************************************** Game driver(s) diff --git a/src/mame/drivers/electra.c b/src/mame/drivers/electra.c index 0d8997c6905..b613fc75a12 100644 --- a/src/mame/drivers/electra.c +++ b/src/mame/drivers/electra.c @@ -32,14 +32,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_electra = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -104,7 +96,12 @@ static MACHINE_CONFIG_START( electra, electra_state ) MCFG_NETLIST_SETUP(electra) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_electra) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/exidyttl.c b/src/mame/drivers/exidyttl.c index 71f57149b78..974e64f7bb3 100644 --- a/src/mame/drivers/exidyttl.c +++ b/src/mame/drivers/exidyttl.c @@ -36,14 +36,6 @@ Exidy discrete hardware games #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_attack = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -108,10 +100,14 @@ static MACHINE_CONFIG_START( attack, exidyttl_state ) MCFG_NETLIST_SETUP(attack) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_attack) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END - static MACHINE_CONFIG_START( deathrac, exidyttl_state ) /* basic machine hardware */ @@ -119,7 +115,12 @@ static MACHINE_CONFIG_START( deathrac, exidyttl_state ) MCFG_NETLIST_SETUP(attack) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_attack) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/fungames.c b/src/mame/drivers/fungames.c index adcbf79ed64..65ec10c9d50 100644 --- a/src/mame/drivers/fungames.c +++ b/src/mame/drivers/fungames.c @@ -32,14 +32,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_fungames = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -104,7 +96,12 @@ static MACHINE_CONFIG_START( fungames, fungames_state ) MCFG_NETLIST_SETUP(fungames) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_fungames) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/meadwttl.c b/src/mame/drivers/meadwttl.c index ddd97e55e55..baa394faf7d 100644 --- a/src/mame/drivers/meadwttl.c +++ b/src/mame/drivers/meadwttl.c @@ -31,14 +31,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_meadows = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -103,7 +95,12 @@ static MACHINE_CONFIG_START( meadows, meadwttl_state ) MCFG_NETLIST_SETUP(meadows) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_meadows) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/monacogp.c b/src/mame/drivers/monacogp.c index 2e22f639c9d..70eefbdcd64 100644 --- a/src/mame/drivers/monacogp.c +++ b/src/mame/drivers/monacogp.c @@ -123,14 +123,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_monacogp = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -195,7 +187,12 @@ static MACHINE_CONFIG_START( monacogp, monacogp_state ) MCFG_NETLIST_SETUP(monacogp) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_monacogp) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c index c0b86164ad4..493e9615a59 100644 --- a/src/mame/drivers/pong.c +++ b/src/mame/drivers/pong.c @@ -51,22 +51,7 @@ TODO: please see netlist include files #define VBSTART (V_TOTAL) #define VBEND (16) -fixedfreq_interface fixedfreq_mode_pongd = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.31 -}; - -fixedfreq_interface fixedfreq_mode_pong = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.31 -}; - +#if 0 fixedfreq_interface fixedfreq_mode_pongX2 = { MASTER_CLOCK * 2, (H_TOTAL-67) * 2, (H_TOTAL-40) * 2, (H_TOTAL-8) * 2, (H_TOTAL) * 2, @@ -74,6 +59,7 @@ fixedfreq_interface fixedfreq_mode_pongX2 = { 1, /* non-interlaced */ 0.31 }; +#endif enum input_changed_enum { @@ -252,8 +238,12 @@ static MACHINE_CONFIG_START( pong, pong_state ) MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq") /* video hardware */ - - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pong) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.31) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -298,8 +288,12 @@ static MACHINE_CONFIG_START( pongd, pong_state ) MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq") /* video hardware */ - - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pongd) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.31) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -327,6 +321,6 @@ ROM_START( pongd ) /* dummy to satisfy game entry*/ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) ROM_END -GAME( 1972, pong, 0, pong, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE) -GAME( 1972, pongf, 0, pongf, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE ) +GAME( 1972, pong, 0, pong, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE) +GAME( 1972, pongf, 0, pongf, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE ) GAME( 1974, pongd, 0, pongd, pongd, driver_device, 0, ROT0, "Atari", "Pong Doubles [TTL]", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ramtek.c b/src/mame/drivers/ramtek.c index 30c3f34984f..e6079296f54 100644 --- a/src/mame/drivers/ramtek.c +++ b/src/mame/drivers/ramtek.c @@ -37,14 +37,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_ramtek = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -109,7 +101,12 @@ static MACHINE_CONFIG_START( ramtek, ramtek_state ) MCFG_NETLIST_SETUP(ramtek) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_ramtek) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END diff --git a/src/mame/drivers/taitottl.c b/src/mame/drivers/taitottl.c index 1012a9dab5e..cd8b886290c 100644 --- a/src/mame/drivers/taitottl.c +++ b/src/mame/drivers/taitottl.c @@ -60,14 +60,6 @@ #define VBEND (16) #define HRES_MULT (1) - -fixedfreq_interface fixedfreq_mode_taito = { - MASTER_CLOCK, - H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, - 1, /* non-interlaced */ - 0.30 -}; // end @@ -132,7 +124,12 @@ static MACHINE_CONFIG_START( taitottl, taitottl_state ) MCFG_NETLIST_SETUP(taitottl) /* video hardware */ - MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_taito) + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(0.30) MACHINE_CONFIG_END