Previous 199869 Revisions Next

r32700 Monday 13th October, 2014 at 05:46:51 UTC by Fabio Priuli
fixfreq: converted to use inline configs. nw.
[src/emu/video]fixfreq.c fixfreq.h
[src/mame/drivers]a1supply.c aleisttl.c atarittl.c bailey.c chicago.c electra.c exidyttl.c fungames.c meadwttl.c monacogp.c pong.c ramtek.c taitottl.c

trunk/src/mame/drivers/pong.c
r32699r32700
5151#define VBSTART                 (V_TOTAL)
5252#define VBEND                   (16)
5353
54fixedfreq_interface fixedfreq_mode_pongd = {
55   MASTER_CLOCK,
56   H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL,
57   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
58   1,  /* non-interlaced */
59   0.31
60};
61
62fixedfreq_interface fixedfreq_mode_pong = {
63   MASTER_CLOCK,
64   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
65   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
66   1,  /* non-interlaced */
67   0.31
68};
69
54#if 0
7055fixedfreq_interface fixedfreq_mode_pongX2 = {
7156   MASTER_CLOCK * 2,
7257   (H_TOTAL-67) * 2, (H_TOTAL-40) * 2, (H_TOTAL-8) * 2, (H_TOTAL) * 2,
r32699r32700
7459   1,  /* non-interlaced */
7560   0.31
7661};
62#endif
7763
7864enum input_changed_enum
7965{
r32699r32700
252238   MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq")
253239
254240   /* video hardware */
241   MCFG_FIXFREQ_ADD("fixfreq", "screen")
242   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
243   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
244   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
245   MCFG_FIXFREQ_FIELDCOUNT(1)
246   MCFG_FIXFREQ_SYNC_THRESHOLD(0.31)
255247
256   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pong)
257
258248   /* sound hardware */
259249   MCFG_SPEAKER_STANDARD_MONO("mono")
260250   MCFG_SOUND_ADD("dac", DAC, 48000)
r32699r32700
298288   MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq")
299289
300290   /* video hardware */
291   MCFG_FIXFREQ_ADD("fixfreq", "screen")
292   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
293   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL)
294   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
295   MCFG_FIXFREQ_FIELDCOUNT(1)
296   MCFG_FIXFREQ_SYNC_THRESHOLD(0.31)
301297
302   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pongd)
303
304298   /* sound hardware */
305299   MCFG_SPEAKER_STANDARD_MONO("mono")
306300   MCFG_SOUND_ADD("dac", DAC, 48000)
r32699r32700
327321   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
328322ROM_END
329323
330GAME( 1972, pong,  0, pong, pong, driver_device,  0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE)
331GAME( 1972, pongf,  0, pongf, pong, driver_device,  0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE )
324GAME( 1972, pong,   0, pong,  pong,  driver_device,  0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE)
325GAME( 1972, pongf,  0, pongf, pong,  driver_device,  0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE )
332326GAME( 1974, pongd,  0, pongd, pongd, driver_device,  0, ROT0, "Atari", "Pong Doubles [TTL]", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/taitottl.c
r32699r32700
6060#define VBEND                   (16)
6161
6262#define HRES_MULT                   (1)
63
64fixedfreq_interface fixedfreq_mode_taito = {
65   MASTER_CLOCK,
66   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
67   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
68   1,  /* non-interlaced */
69   0.30
70};
7163// end
7264
7365
r32699r32700
132124   MCFG_NETLIST_SETUP(taitottl)
133125
134126   /* video hardware */
135   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_taito)
127   MCFG_FIXFREQ_ADD("fixfreq", "screen")
128   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
129   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
130   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
131   MCFG_FIXFREQ_FIELDCOUNT(1)
132   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
136133MACHINE_CONFIG_END
137134
138135
trunk/src/mame/drivers/aleisttl.c
r32699r32700
3333#define VBEND                   (16)
3434
3535#define HRES_MULT                   (1)
36
37fixedfreq_interface fixedfreq_mode_sburners = {
38   MASTER_CLOCK,
39   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
40   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
41   1,  /* non-interlaced */
42   0.30
43};
4436// end
4537
4638
r32699r32700
10597   MCFG_NETLIST_SETUP(sburners)
10698
10799   /* video hardware */
108   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_sburners)
100   MCFG_FIXFREQ_ADD("fixfreq", "screen")
101   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
102   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
103   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
104   MCFG_FIXFREQ_FIELDCOUNT(1)
105   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
109106MACHINE_CONFIG_END
110107
111108
trunk/src/mame/drivers/exidyttl.c
r32699r32700
3636#define VBEND                   (16)
3737
3838#define HRES_MULT                   (1)
39
40fixedfreq_interface fixedfreq_mode_attack = {
41   MASTER_CLOCK,
42   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
43   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
44   1,  /* non-interlaced */
45   0.30
46};
4739// end
4840
4941
r32699r32700
108100   MCFG_NETLIST_SETUP(attack)
109101
110102   /* video hardware */
111   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_attack)
103   MCFG_FIXFREQ_ADD("fixfreq", "screen")
104   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
105   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
106   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
107   MCFG_FIXFREQ_FIELDCOUNT(1)
108   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
112109MACHINE_CONFIG_END
113110
114
115111static MACHINE_CONFIG_START( deathrac, exidyttl_state )
116112
117113   /* basic machine hardware */
r32699r32700
119115   MCFG_NETLIST_SETUP(attack)
120116
121117   /* video hardware */
122   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_attack)
118   MCFG_FIXFREQ_ADD("fixfreq", "screen")
119   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
120   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
121   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
122   MCFG_FIXFREQ_FIELDCOUNT(1)
123   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
123124MACHINE_CONFIG_END
124125
125126
trunk/src/mame/drivers/atarittl.c
r32699r32700
7676#define VBEND                   (16)
7777
7878#define HRES_MULT                   (1)
79
80fixedfreq_interface fixedfreq_mode_atarikee = {
81   MASTER_CLOCK,
82   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
83   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
84   1,  /* non-interlaced */
85   0.30
86};
8779// end
8880
8981
r32699r32700
150142   MCFG_NETLIST_SETUP(atarikee)
151143
152144   /* video hardware */
153   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_atarikee)
145   MCFG_FIXFREQ_ADD("fixfreq", "screen")
146   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
147   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
148   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
149   MCFG_FIXFREQ_FIELDCOUNT(1)
150   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
154151MACHINE_CONFIG_END
155152
156153
trunk/src/mame/drivers/monacogp.c
r32699r32700
123123#define VBEND                   (16)
124124
125125#define HRES_MULT                   (1)
126
127fixedfreq_interface fixedfreq_mode_monacogp = {
128   MASTER_CLOCK,
129   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
130   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
131   1,  /* non-interlaced */
132   0.30
133};
134126// end
135127
136128
r32699r32700
195187   MCFG_NETLIST_SETUP(monacogp)
196188
197189   /* video hardware */
198   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_monacogp)
190   MCFG_FIXFREQ_ADD("fixfreq", "screen")
191   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
192   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
193   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
194   MCFG_FIXFREQ_FIELDCOUNT(1)
195   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
199196MACHINE_CONFIG_END
200197
201198
trunk/src/mame/drivers/a1supply.c
r32699r32700
3131#define VBEND                   (16)
3232
3333#define HRES_MULT                   (1)
34
35fixedfreq_interface fixedfreq_mode_a1supply = {
36   MASTER_CLOCK,
37   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
38   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
39   1,  /* non-interlaced */
40   0.30
41};
4234// end
4335
4436
r32699r32700
10395   MCFG_NETLIST_SETUP(a1supply)
10496
10597   /* video hardware */
106   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_a1supply)
98   MCFG_FIXFREQ_ADD("fixfreq", "screen")
99   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
100   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
101   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
102   MCFG_FIXFREQ_FIELDCOUNT(1)
103   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
107104MACHINE_CONFIG_END
108105
109106
trunk/src/mame/drivers/bailey.c
r32699r32700
2626#define VBEND                   (16)
2727
2828#define HRES_MULT                   (1)
29
30fixedfreq_interface fixedfreq_mode_bailey = {
31   MASTER_CLOCK,
32   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
33   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
34   1,  /* non-interlaced */
35   0.30
36};
3729// end
3830
3931
r32699r32700
9890   MCFG_NETLIST_SETUP(bailey)
9991
10092   /* video hardware */
101   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_bailey)
93   MCFG_FIXFREQ_ADD("fixfreq", "screen")
94   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
95   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
96   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
97   MCFG_FIXFREQ_FIELDCOUNT(1)
98   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
10299MACHINE_CONFIG_END
103100
104101
trunk/src/mame/drivers/ramtek.c
r32699r32700
3737#define VBEND                   (16)
3838
3939#define HRES_MULT                   (1)
40
41fixedfreq_interface fixedfreq_mode_ramtek = {
42   MASTER_CLOCK,
43   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
44   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
45   1,  /* non-interlaced */
46   0.30
47};
4840// end
4941
5042
r32699r32700
109101   MCFG_NETLIST_SETUP(ramtek)
110102
111103   /* video hardware */
112   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_ramtek)
104   MCFG_FIXFREQ_ADD("fixfreq", "screen")
105   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
106   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
107   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
108   MCFG_FIXFREQ_FIELDCOUNT(1)
109   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
113110MACHINE_CONFIG_END
114111
115112
trunk/src/mame/drivers/chicago.c
r32699r32700
3535#define VBEND                   (16)
3636
3737#define HRES_MULT                   (1)
38
39fixedfreq_interface fixedfreq_mode_chicago = {
40   MASTER_CLOCK,
41   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
42   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
43   1,  /* non-interlaced */
44   0.30
45};
4638// end
4739
4840
r32699r32700
10799   MCFG_NETLIST_SETUP(chicago)
108100
109101   /* video hardware */
110   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_chicago)
102   MCFG_FIXFREQ_ADD("fixfreq", "screen")
103   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
104   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
105   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
106   MCFG_FIXFREQ_FIELDCOUNT(1)
107   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
111108MACHINE_CONFIG_END
112109
113
114110/***************************************************************************
115111
116112 Game driver(s)
trunk/src/mame/drivers/meadwttl.c
r32699r32700
3131#define VBEND                   (16)
3232
3333#define HRES_MULT                   (1)
34
35fixedfreq_interface fixedfreq_mode_meadows = {
36   MASTER_CLOCK,
37   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
38   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
39   1,  /* non-interlaced */
40   0.30
41};
4234// end
4335
4436
r32699r32700
10395   MCFG_NETLIST_SETUP(meadows)
10496
10597   /* video hardware */
106   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_meadows)
98   MCFG_FIXFREQ_ADD("fixfreq", "screen")
99   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
100   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
101   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
102   MCFG_FIXFREQ_FIELDCOUNT(1)
103   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
107104MACHINE_CONFIG_END
108105
109106
trunk/src/mame/drivers/fungames.c
r32699r32700
3232#define VBEND                   (16)
3333
3434#define HRES_MULT                   (1)
35
36fixedfreq_interface fixedfreq_mode_fungames = {
37   MASTER_CLOCK,
38   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
39   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
40   1,  /* non-interlaced */
41   0.30
42};
4335// end
4436
4537
r32699r32700
10496   MCFG_NETLIST_SETUP(fungames)
10597
10698   /* video hardware */
107   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_fungames)
99   MCFG_FIXFREQ_ADD("fixfreq", "screen")
100   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
101   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
102   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
103   MCFG_FIXFREQ_FIELDCOUNT(1)
104   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
108105MACHINE_CONFIG_END
109106
110107
trunk/src/mame/drivers/electra.c
r32699r32700
3232#define VBEND                   (16)
3333
3434#define HRES_MULT                   (1)
35
36fixedfreq_interface fixedfreq_mode_electra = {
37   MASTER_CLOCK,
38   H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL,
39   V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL,
40   1,  /* non-interlaced */
41   0.30
42};
4335// end
4436
4537
r32699r32700
10496   MCFG_NETLIST_SETUP(electra)
10597
10698   /* video hardware */
107   MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_electra)
99   MCFG_FIXFREQ_ADD("fixfreq", "screen")
100   MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK)
101   MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL)
102   MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL)
103   MCFG_FIXFREQ_FIELDCOUNT(1)
104   MCFG_FIXFREQ_SYNC_THRESHOLD(0.30)
108105MACHINE_CONFIG_END
109106
110107
trunk/src/emu/video/fixfreq.c
r32699r32700
2525
2626/***************************************************************************
2727
28    Static declarations
29
30***************************************************************************/
31
32//ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync
33fixedfreq_interface fixedfreq_mode_ntsc720 = {
34   13500000,
35   720,736,799,858,
36   480,486,492,525,
37   2,  /* interlaced */
38   0.3
39};
40
41//ModeLine "704x480@30i" 13.5 704 728 791 858 480 486 492 525
42fixedfreq_interface fixedfreq_mode_ntsc704 = {
43   13500000,
44   704,728,791,858,
45   480,486,492,525,
46   2,  /* interlaced */
47   0.3
48};
49
50/***************************************************************************
51
5228    Fixed frequency monitor
5329
5430***************************************************************************/
r32699r32700
5733
5834fixedfreq_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)
5935   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
60      device_video_interface(mconfig, *this, false)
36      device_video_interface(mconfig, *this, false),
37      // default to NTSC "704x480@30i"
38      m_monitor_clock(13500000),
39      m_hvisible(704),
40      m_hfrontporch(728),
41      m_hsync(791),
42      m_hbackporch(858),
43      m_vvisible(480),
44      m_vfrontporch(486),
45      m_vsync(492),
46      m_vbackporch(525),
47      m_fieldcount(2),
48      m_sync_threshold(0.3)
6149{
6250}
6351
6452fixedfreq_device::fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6553   : device_t(mconfig, FIXFREQ, "Fixed Frequency Monochrome Monitor", tag, owner, clock, "fixfreq", __FILE__),
66      device_video_interface(mconfig, *this, false)
54      device_video_interface(mconfig, *this, false),
55      // default to NTSC "704x480@30i"
56      m_monitor_clock(13500000),
57      m_hvisible(704),
58      m_hfrontporch(728),
59      m_hsync(791),
60      m_hbackporch(858),
61      m_vvisible(480),
62      m_vfrontporch(486),
63      m_vsync(492),
64      m_vbackporch(525),
65      m_fieldcount(2),
66      m_sync_threshold(0.3)
6767{
6868}
6969
70void fixedfreq_device::device_config_complete()
71{
72   const fixedfreq_interface *intf = reinterpret_cast<const fixedfreq_interface *>(static_config());
73
74   if ( intf != NULL )
75   {
76      *static_cast<fixedfreq_interface *>(this) = *intf;
77   }
78   else
79   {
80      *static_cast<fixedfreq_interface *>(this) = fixedfreq_mode_ntsc704;
81   }
82
83}
84
85
8670void fixedfreq_device::device_start()
8771{
8872   m_htotal = 0;
trunk/src/emu/video/fixfreq.h
r32699r32700
1818#define FIXFREQ_INTERFACE(name) \
1919   const fixedfreq_interface (name) =
2020
21#define MCFG_FIXFREQ_ADD(_tag, _screen_tag, _config) \
21#define MCFG_FIXFREQ_ADD(_tag, _screen_tag) \
2222   MCFG_SCREEN_ADD(_screen_tag, RASTER) \
2323   MCFG_SCREEN_RAW_PARAMS(13500000, 858, 0, 858, 525, 0, 525) \
2424   MCFG_SCREEN_UPDATE_DEVICE(_tag, fixedfreq_device, screen_update) \
2525   MCFG_DEVICE_ADD(_tag, FIXFREQ, 0) \
26   MCFG_VIDEO_SET_SCREEN(_screen_tag) \
27   MCFG_DEVICE_CONFIG(_config)
26   MCFG_VIDEO_SET_SCREEN(_screen_tag)
2827
29struct fixedfreq_interface {
30   UINT32 m_monitor_clock;
31   int m_hvisible;
32   int m_hfrontporch;
33   int m_hsync;
34   int m_hbackporch;
35   int m_vvisible;
36   int m_vfrontporch;
37   int m_vsync;
38   int m_vbackporch;
39   int m_fieldcount;
40   double m_sync_threshold;
41};
28#define MCFG_FIXFREQ_MONITOR_CLOCK(_clock) \
29   fixedfreq_device::set_minitor_clock(*device, _clock);
4230
43extern fixedfreq_interface fixedfreq_mode_ntsc704;
44extern fixedfreq_interface fixedfreq_mode_ntsc720;
31#define MCFG_FIXFREQ_HORZ_PARAMS(_visible, _frontporch, _sync, _backporch) \
32   fixedfreq_device::set_horz_params(*device, _visible, _frontporch, _sync, _backporch);
4533
34#define MCFG_FIXFREQ_VERT_PARAMS(_visible, _frontporch, _sync, _backporch) \
35   fixedfreq_device::set_vert_params(*device, _visible, _frontporch, _sync, _backporch);
36
37#define MCFG_FIXFREQ_FIELDCOUNT(_count) \
38   fixedfreq_device::set_fieldcount(*device, _count);
39
40#define MCFG_FIXFREQ_SYNC_THRESHOLD(_threshold) \
41   fixedfreq_device::set_threshold(*device, _threshold);
42
43// pre-defined configurations
44
45//ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync
46#define MCFG_FIXFREQ_MODE_NTSC720 \
47   MCFG_FIXFREQ_MONITOR_CLOCK(13500000) \
48   MCFG_FIXFREQ_HORZ_PARAMS(720, 736, 799, 858) \
49   MCFG_FIXFREQ_VERT_PARAMS(480, 486, 492, 525) \
50   MCFG_FIXFREQ_FIELDCOUNT(2) \
51   MCFG_FIXFREQ_SYNC_THRESHOLD(0.3)
52
53//ModeLine "704x480@30i" 13.5 704 728 791 858 480 486 492 525
54#define MCFG_FIXFREQ_MODE_NTSC704 \
55   MCFG_FIXFREQ_MONITOR_CLOCK(13500000) \
56   MCFG_FIXFREQ_HORZ_PARAMS(704, 728, 791, 858) \
57   MCFG_FIXFREQ_VERT_PARAMS(480, 486, 492, 525) \
58   MCFG_FIXFREQ_FIELDCOUNT(2) \
59   MCFG_FIXFREQ_SYNC_THRESHOLD(0.3)
60
61
4662// ======================> vga_device
4763
4864class fixedfreq_device :  public device_t,
49                     public device_video_interface,
50                     public fixedfreq_interface
65                     public device_video_interface
5166{
5267public:
5368   // construction/destruction
5469   fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
5570   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);
5671
72   // inline configuration helpers
73   static void set_minitor_clock(device_t &device, UINT32 clock) { downcast<fixedfreq_device &>(device).m_monitor_clock = clock; }
74   static void set_fieldcount(device_t &device, int count) { downcast<fixedfreq_device &>(device).m_fieldcount = count; }
75   static void set_threshold(device_t &device, double threshold) { downcast<fixedfreq_device &>(device).m_sync_threshold = threshold; }
76   static void set_horz_params(device_t &device, int visible, int frontporch, int sync, int backporch)
77   {
78      fixedfreq_device &dev = downcast<fixedfreq_device &>(device);
79      dev.m_hvisible = visible;
80      dev.m_hfrontporch = frontporch;
81      dev.m_hsync = sync;
82      dev.m_hbackporch = backporch;
83   }
84   static void set_vert_params(device_t &device, int visible, int frontporch, int sync, int backporch)
85   {
86      fixedfreq_device &dev = downcast<fixedfreq_device &>(device);
87      dev.m_vvisible = visible;
88      dev.m_vfrontporch = frontporch;
89      dev.m_vsync = sync;
90      dev.m_vbackporch = backporch;
91   }
5792
5893   virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
5994
r32699r32700
6196
6297protected:
6398   // device-level overrides
64   virtual void device_config_complete();
6599   virtual void device_start();
66100   virtual void device_reset();
67101   virtual void device_post_load();
r32699r32700
89123   bitmap_rgb32 *m_bitmap[2];
90124   int m_cur_bm;
91125
126   /* adjustable by drivers */
127   UINT32 m_monitor_clock;
128   int m_hvisible;
129   int m_hfrontporch;
130   int m_hsync;
131   int m_hbackporch;
132   int m_vvisible;
133   int m_vfrontporch;
134   int m_vsync;
135   int m_vbackporch;
136   int m_fieldcount;
137   double m_sync_threshold;
138
92139   /* sync separator */
93140   double m_vint;
94141   double m_int_trig;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team