Previous | 199869 Revisions | Next |
r41804 Thursday 19th November, 2015 at 02:52:28 UTC by kazblox |
---|
ymf262: fix ksl shift bits According to OPL3 on the OPL3 reverse engineering forum, 3.0 and 1.5 db were swapped. |
[docs] | hlsl.txt |
[hash] | psx.xml |
[hlsl] | post.fx |
[hlsl/artwork_support] | post.fx |
[scripts] | genie.lua |
[scripts/src] | 3rdparty.lua |
[src/devices/bus/isa] | cga.cpp |
[src/devices/cpu/arc] | arc.cpp |
[src/devices/cpu/e0c6200] | e0c6200.h e0c6s46.cpp |
[src/devices/cpu/h8] | h8.cpp h83002.cpp h83006.cpp h83008.cpp h83048.cpp h83337.cpp h8_adc.cpp h8_intc.cpp h8_port.cpp h8_sci.cpp h8_timer16.cpp h8_timer8.cpp h8s2245.cpp h8s2320.cpp h8s2357.cpp h8s2655.cpp |
[src/devices/cpu/hcd62121] | hcd62121.cpp |
[src/devices/cpu/i4004] | i4004.cpp |
[src/devices/cpu/i8089] | i8089.cpp |
[src/devices/cpu/i860] | i860.cpp |
[src/devices/cpu/i960] | i960.cpp |
[src/devices/cpu/ie15] | ie15.cpp |
[src/devices/cpu/m6502] | m6502.cpp m6509.cpp m6510.cpp m65ce02.cpp m740.cpp |
[src/devices/cpu/mb86233] | mb86233.cpp |
[src/devices/cpu/mcs96] | i8x9x.cpp mcs96.cpp |
[src/devices/cpu/melps4] | m58846.cpp |
[src/devices/cpu/mn10200] | mn10200.h |
[src/devices/cpu/pdp1] | tx0.cpp |
[src/devices/cpu/psx] | dma.cpp irq.cpp mdec.cpp sio.cpp |
[src/devices/cpu/s2650] | s2650.cpp |
[src/devices/cpu/saturn] | saturn.cpp |
[src/devices/cpu/scmp] | scmp.cpp |
[src/devices/cpu/se3208] | se3208.cpp |
[src/devices/cpu/sm8500] | sm8500.cpp |
[src/devices/cpu/superfx] | superfx.cpp |
[src/devices/cpu/tms34010] | tms34010.cpp |
[src/devices/cpu/tms57002] | tms57002.cpp |
[src/devices/cpu/unsp] | unsp.cpp |
[src/devices/cpu/upd7725] | upd7725.cpp |
[src/devices/cpu/z8000] | z8000.cpp z8000tbl.inc |
[src/devices/machine] | 40105.cpp 68230pit.cpp 68561mpcc.cpp 7200fifo.cpp 74123.cpp 74181.cpp 8530scc.cpp aakart.cpp adc0808.cpp adc1038.cpp aicartc.cpp amigafdc.cpp ataflash.cpp atahle.cpp cdp1852.cpp dp8390.cpp ds1204.cpp ds1315.cpp ds2401.cpp ds2404.cpp e0516.cpp e05a30.cpp i8212.cpp i8243.cpp i8271.cpp idehd.cpp ins8154.cpp jvsdev.cpp jvshost.cpp k033906.cpp lh5810.cpp linflash.cpp lpc-rtc.cpp m6m80011ap.cpp mb14241.cpp mb3773.cpp mb8795.cpp mc146818.cpp mc68328.cpp microtch.cpp mm74c922.cpp mos6551.cpp ncr5380n.cpp ncr5390.cpp nsc810.cpp nscsi_bus.cpp nscsi_cb.cpp nscsi_cd.cpp nscsi_hd.cpp pc_lpt.cpp pla.cpp rf5c296.cpp rtc4543.cpp rtc9701.cpp s3520cf.cpp s3c44b0.cpp serflash.cpp spchrom.cpp tms1024.cpp upd4701.cpp upd4992.cpp upd7002.cpp v3021.cpp vrc4373.cpp vt82c496.cpp ym2148.cpp |
[src/devices/sound] | 315-5641.cpp awacs.cpp es1373.cpp esqpump.cpp i5000.cpp ics2115.cpp k054539.cpp k056800.cpp l7a1045_l6028_dsp_a.h mas3507d.cpp msm5232.cpp tc8830f.cpp upd7752.cpp vrc6.cpp wave.cpp ymf262.cpp ymz770.cpp |
[src/devices/video] | 315_5313.cpp crtc_ega.cpp ef9340_1.cpp epic12.cpp fixfreq.cpp gf4500.cpp h63484.cpp huc6202.cpp huc6261.cpp msm6222b.cpp scn2674.cpp sed1200.cpp sed1520.cpp t6a04.cpp |
[src/emu] | emuopts.cpp render.cpp render.h |
[src/emu/video] | vector.cpp vector.h |
[src/lib/formats] | ap2_dsk.cpp |
[src/mame] | arcade.lst |
[src/mame/drivers] | asteroid.cpp bwidow.cpp bzone.cpp goldnpkr.cpp marinedt.cpp mhavoc.cpp naomi.cpp omegrace.cpp quantum.cpp starwars.cpp stv.cpp subsino.cpp tempest.cpp tomcat.cpp |
[src/mame/machine] | asteroid.cpp |
[src/mame/video] | avgdvg.cpp avgdvg.h |
[src/osd/modules/render] | drawd3d.cpp drawd3d.h |
[src/osd/modules/render/d3d] | d3dhlsl.cpp d3dhlsl.h |
[src/osd/windows] | winmain.cpp winmain.h |
r250315 | r250316 | |
---|---|---|
10 | 10 | hlslpath [path] Path to the .fx files that are in use. (default: hlsl) |
11 | 11 | hlsl_prescale_x [horizontal] HLSL pre-scale override factor for X. (0 for auto) |
12 | 12 | hlsl_prescale_y [vertical] HLSL pre-scale override factor for Y. (0 for auto) |
13 | hlsl_write [filename] Enables HLSL AVI writing. (huge disk bandwidth suggested) | |
13 | hlsl_preset -1 through 3 HLSL preset to use. (default: -1) | |
14 | hlsl_write [filename] Enable HLSL AVI writing. (huge disk bandwidth suggested) | |
14 | 15 | hlsl_snap_width [width] HLSL upscaled-snapshot width. (default: 2048) |
15 | hlsl_snap_height | |
16 | hlsl_snap_height [height] HLSL upscaled-snapshot height. (default: 1536) | |
16 | 17 | |
17 | 18 | |
18 | 19 | Surface/Color Processing Parameters |
r250315 | r250316 | |
21 | 22 | Name Values Description |
22 | 23 | shadow_mask_alpha 0.0 to 1.0 The ovearll darkness of each shadow mask pixel. |
23 | 24 | shadow_mask_texture [filename] A PNG that defines the shadow mask for each pixel. |
24 | shadow_mask_x_count 1+ The number of pixels one shadow mask tile uses on screen. | |
25 | shadow_mask_y_count 1+ This stretches the shadow mask tiles on X and Y axis. | |
26 | shadow_mask_usize 0.0 to 1.0 The size of one shadow mask tile in U/V coordinate. | |
27 | shadow_mask_vsize 0.0 to 1.0 The shadow mask textures always has a size of power-of-two. | |
28 | shadow_mask_voffset -1.0 to 1.0 The offset of the shadow mask texture in U/V coordinates. | |
29 | shadow_mask_voffset -1.0 to 1.0 An offset of 1.0 repressents one pixel on screen. | |
30 | curvature 0.0 to 1.0 Curvature amount of the screen. | |
31 | round_corner 0.0 to 1.0 Rounded corners amount of the screen. | |
32 | smooth_border 0.0 to 1.0 Smooth borders amount of the screen. | |
33 | reflection 0.0 to 1.0 Refelection amount of the screen highlight. | |
34 | vignetting 0.0 to 1.0 Vignetting amount of the image. | |
25 | shadow_mask_x_count 1+ The count of shadow mask elements, X (usually 640-ish). | |
26 | shadow_mask_y_count 1+ The count of shadow mask elements, Y (usually 480-ish). | |
27 | shadow_mask_usize 0.0 to 1.0 These parameters define the *in-use* pixel count on the | |
28 | shadow_mask_vsize 0.0 to 1.0 X and Y axes of the shadow mask texture. | |
29 | curvature 0.0 to 1.0 Screen curvature. Affects borders and shadow mask. | |
30 | pincushion 0.0 to 1.0 Image curvature. Affects the source image only. | |
35 | 31 | scanline_alpha 0.0 to 1.0 The overall darkness of each scanline furrow. |
36 | 32 | scanline_size 0.0 to 4.0 The overall height of each scanline. |
37 | 33 | scanline_height [height] Individual height scaling value for scanlines. |
r250315 | r250316 | |
101 | 97 | Bloom Post-Processing Options |
102 | 98 | ----------------------------- |
103 | 99 | Name Default Values Description |
104 | bloom_scale 0.500 Bloom intensity factor. (0.000-2.000) | |
105 | bloom_overdrive 0.00,0.00,0.00 Bloom overdrive factor to bright full saturated colors. (0.000-2.000) | |
100 | vector_bloom_scale 0.300 Intensity factor for vector bloom. (0.000-1.000) | |
101 | raster_bloom_scale 0.225 Intensity factor for raster bloom. (0.000-1.000) | |
106 | 102 | bloom_lvl0_weight 1.00 Bloom level 0 (full-size target) weight. (0.00-1.00) |
107 | 103 | bloom_lvl1_weight 0.21 Bloom level 1 (half-size target) weight. (0.00-1.00) |
108 | 104 | bloom_lvl2_weight 0.19 Bloom level 2 (quarter-size target) weight. (0.00-1.00) |
r250315 | r250316 | |
---|---|---|
3 | 3 | <softwarelist name="psx" description="Sony Playstation CD-ROMs"> |
4 | 4 | |
5 | 5 | <!-- Interactive CD Sampler Discs--> |
6 | ||
6 | ||
7 | <!-- size="364872255" crc="536126e5" --> | |
7 | 8 | <software name="intcdv1m"> |
8 | 9 | <description>Interactive CD Sampler Disc - Volume 01 (M Rated)</description> |
9 | 10 | <year>1995</year> |
10 | 11 | <publisher>SCEA</publisher> |
11 | 12 | <part name="cdrom" interface="psx_cdrom"> |
12 | 13 | <diskarea name="cdrom"> |
13 | <disk name="Interactive CD Sampler Disc - Volume 1 ( | |
14 | <disk name="Interactive CD Sampler Disc - Volume 1 (m rated)" sha1="4bc8e61f799ecd19c1b8207943eaab8359d34858"/> | |
14 | 15 | </diskarea> |
15 | 16 | </part> |
16 | 17 | </software> |
17 | 18 | |
19 | <!-- size="428110417" crc="48bd3d35" --> | |
18 | 20 | <software name="intcdv2"> |
19 | 21 | <description>Interactive CD Sampler Disc - Volume 02</description> |
20 | 22 | <year>1996</year> |
21 | 23 | <publisher>SCEA</publisher> |
22 | 24 | <part name="cdrom" interface="psx_cdrom"> |
23 | 25 | <diskarea name="cdrom"> |
24 | <disk name="Interactive CD Sampler Disc - Volume 2" sha1="8 | |
26 | <disk name="Interactive CD Sampler Disc - Volume 2" sha1="5801f9972e483b9e2a7f316796b57b74d8baa5e7"/> | |
25 | 27 | </diskarea> |
26 | 28 | </part> |
27 | 29 | </software> |
28 | 30 | |
31 | <!-- size="476195663" crc="fb8d356b" --> | |
29 | 32 | <software name="intcdv30"> |
30 | 33 | <description>Interactive CD Sampler Disc - Volume 03 (1.0)</description> |
31 | 34 | <year>1996</year> |
32 | 35 | <publisher>SCEA</publisher> |
33 | 36 | <part name="cdrom" interface="psx_cdrom"> |
34 | 37 | <diskarea name="cdrom"> |
35 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.0)" sha1=" | |
38 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.0)" sha1="f82e72d70b10badb35a91a09950d0d89db50855c"/> | |
36 | 39 | </diskarea> |
37 | 40 | </part> |
38 | 41 | </software> |
39 | 42 | |
43 | <!-- size="487436207" crc="336304eb" --> | |
40 | 44 | <software name="intcdv31"> |
41 | 45 | <description>Interactive CD Sampler Disc - Volume 03 (1.1)</description> |
42 | 46 | <year>1996</year> |
43 | 47 | <publisher>SCEA</publisher> |
44 | 48 | <part name="cdrom" interface="psx_cdrom"> |
45 | 49 | <diskarea name="cdrom"> |
46 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.1)" sha1=" | |
50 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.1)" sha1="5f6fa89b8c9b31b3dabdc7ac06806bc721d2aa16"/> | |
47 | 51 | </diskarea> |
48 | 52 | </part> |
49 | 53 | </software> |
50 | 54 | |
55 | <!-- size="487436203" crc="d96b31d2" --> | |
51 | 56 | <software name="intcdv32"> |
52 | 57 | <description>Interactive CD Sampler Disc - Volume 03 (1.2)</description> |
53 | 58 | <year>1996</year> |
54 | 59 | <publisher>SCEA</publisher> |
55 | 60 | <part name="cdrom" interface="psx_cdrom"> |
56 | 61 | <diskarea name="cdrom"> |
57 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.2)" sha1="2 | |
62 | <disk name="Interactive CD Sampler Disc - Volume 3 (1.2)" sha1="20f261877d3f63bd9215ca791800417ff7287e46"/> | |
58 | 63 | </diskarea> |
59 | 64 | </part> |
60 | 65 | </software> |
61 | 66 | |
67 | <!-- size="354903558" crc="67ca3059" --> | |
62 | 68 | <software name="intcdv4"> |
63 | 69 | <description>Interactive CD Sampler Disc - Volume 04</description> |
64 | 70 | <year>1997</year> |
65 | 71 | <publisher>SCEA</publisher> |
66 | 72 | <part name="cdrom" interface="psx_cdrom"> |
67 | 73 | <diskarea name="cdrom"> |
68 | <disk name="Interactive CD Sampler Disc - Volume 4" sha1="c5 | |
74 | <disk name="Interactive CD Sampler Disc - Volume 4" sha1="c353a52e8b7831f11d3ce8ea771e865e9ba3431a"/> | |
69 | 75 | </diskarea> |
70 | 76 | </part> |
71 | 77 | </software> |
72 | 78 | |
79 | <!-- size="291855185" crc="8119ed78" --> | |
73 | 80 | <software name="intcdv5"> |
74 | 81 | <description>Interactive CD Sampler Disc - Volume 05</description> |
75 | 82 | <year>1997</year> |
76 | 83 | <publisher>SCEA</publisher> |
77 | 84 | <part name="cdrom" interface="psx_cdrom"> |
78 | 85 | <diskarea name="cdrom"> |
79 | <disk name="Interactive CD Sampler Disc - Volume 5" sha1=" | |
86 | <disk name="Interactive CD Sampler Disc - Volume 5" sha1="9aef2ff7583b61d24302a35831a25ed5549610e1"/> | |
80 | 87 | </diskarea> |
81 | 88 | </part> |
82 | 89 | </software> |
83 | 90 | |
91 | <!-- size="427620748" crc="917b5f35" --> | |
84 | 92 | <software name="intcdv6"> |
85 | 93 | <description>Interactive CD Sampler Disc - Volume 06</description> |
86 | 94 | <year>1998</year> |
87 | 95 | <publisher>SCEA</publisher> |
88 | 96 | <part name="cdrom" interface="psx_cdrom"> |
89 | 97 | <diskarea name="cdrom"> |
90 | <disk name="Interactive CD Sampler Disc - Volume 6" sha1=" | |
98 | <disk name="Interactive CD Sampler Disc - Volume 6" sha1="c35833fdd8a46016b3ccafa9ae08f68c10309737"/> | |
91 | 99 | </diskarea> |
92 | 100 | </part> |
93 | 101 | </software> |
94 | 102 | |
103 | <!-- size="397092409" crc="17f17815" --> | |
95 | 104 | <software name="intcdv7"> |
96 | 105 | <description>Interactive CD Sampler Disc - Volume 07</description> |
97 | 106 | <year>1998</year> |
98 | 107 | <publisher>SCEA</publisher> |
99 | 108 | <part name="cdrom" interface="psx_cdrom"> |
100 | 109 | <diskarea name="cdrom"> |
101 | <disk name="Interactive CD Sampler Disc - Volume 7" sha1=" | |
110 | <disk name="Interactive CD Sampler Disc - Volume 7" sha1="81db574e4599e022cfac938516cff29bb09d1388"/> | |
102 | 111 | </diskarea> |
103 | 112 | </part> |
104 | 113 | </software> |
105 | 114 | |
115 | <!-- size="420000809" crc="91d8b335" --> | |
106 | 116 | <software name="intcdv8"> |
107 | 117 | <description>Interactive CD Sampler Disc - Volume 08</description> |
108 | 118 | <year>1998</year> |
109 | 119 | <publisher>SCEA</publisher> |
110 | 120 | <part name="cdrom" interface="psx_cdrom"> |
111 | 121 | <diskarea name="cdrom"> |
112 | <disk name="Interactive CD Sampler Disc - Volume 8" sha1=" | |
122 | <disk name="Interactive CD Sampler Disc - Volume 8" sha1="7f23e2d284a104e6914d34527960567111914264"/> | |
113 | 123 | </diskarea> |
114 | 124 | </part> |
115 | 125 | </software> |
116 | 126 | |
127 | <!-- size="389598196" crc="993e0ab1" --> | |
117 | 128 | <software name="intcdv9"> |
118 | 129 | <description>Interactive CD Sampler Disc - Volume 09</description> |
119 | 130 | <year>1998</year> |
120 | 131 | <publisher>SCEA</publisher> |
121 | 132 | <part name="cdrom" interface="psx_cdrom"> |
122 | 133 | <diskarea name="cdrom"> |
123 | <disk name="Interactive CD Sampler Disc - Volume 9" sha1=" | |
134 | <disk name="Interactive CD Sampler Disc - Volume 9" sha1="286559ce34f06a7f2eb2b441e9188da0e158d107"/> | |
124 | 135 | </diskarea> |
125 | 136 | </part> |
126 | 137 | </software> |
127 | 138 | |
139 | <!-- size="365007076" crc="5f5fd01f" --> | |
128 | 140 | <software name="intcdv10"> |
129 | 141 | <description>Interactive CD Sampler Disc - Volume 10</description> |
130 | 142 | <year>1999</year> |
131 | 143 | <publisher>SCEA</publisher> |
132 | 144 | <part name="cdrom" interface="psx_cdrom"> |
133 | 145 | <diskarea name="cdrom"> |
134 | <disk name="Interactive CD Sampler Disc - Volume 10" sha1=" | |
146 | <disk name="Interactive CD Sampler Disc - Volume 10" sha1="8c414a1e26ac98d07f774cc8b16eb2fa8da0ca61"/> | |
135 | 147 | </diskarea> |
136 | 148 | </part> |
137 | 149 | </software> |
138 | 150 | |
151 | <!-- size="272935197" crc="82e6fdf0" --> | |
139 | 152 | <software name="intcdv11"> |
140 | 153 | <description>Interactive CD Sampler Disc - Volume 11</description> |
141 | 154 | <year>1999</year> |
142 | 155 | <publisher>SCEA</publisher> |
143 | 156 | <part name="cdrom" interface="psx_cdrom"> |
144 | 157 | <diskarea name="cdrom"> |
145 | <disk name="Interactive CD Sampler Disc - Volume 11" sha1="0 | |
158 | <disk name="Interactive CD Sampler Disc - Volume 11" sha1="3029004840d98c2789d2a0d93bdd762b3c56df0f"/> | |
146 | 159 | </diskarea> |
147 | 160 | </part> |
148 | 161 | </software> |
149 | 162 | |
163 | <!-- size="149681460" crc="99551669" --> | |
150 | 164 | <software name="intcdtru"> |
151 | 165 | <description>Toys R Us - Interactive CD Sampler Disc</description> |
152 | 166 | <year>1998</year> |
153 | 167 | <publisher>SCEA</publisher> |
154 | 168 | <part name="cdrom" interface="psx_cdrom"> |
155 | 169 | <diskarea name="cdrom"> |
156 | <disk name="Toys R Us - Interactive CD Sampler Disc" sha1=" | |
170 | <disk name="Toys R Us - Interactive CD Sampler Disc" sha1="4abae391a7ad1e38c2ee7cbd7401caebcf091df3"/> | |
157 | 171 | </diskarea> |
158 | 172 | </part> |
159 | 173 | </software> |
160 | 174 | |
175 | <!-- size="93662349" crc="59bd7278" --> | |
161 | 176 | <software name="intcdff7"> |
162 | 177 | <description>Final Fantasy VII Interactive Sampler CD</description> |
163 | 178 | <year>1996</year> |
164 | 179 | <publisher>SCEA</publisher> |
165 | 180 | <part name="cdrom" interface="psx_cdrom"> |
166 | 181 | <diskarea name="cdrom"> |
167 | <disk name="Final Fantasy VII Interactive Sampler CD" sha1=" | |
182 | <disk name="Final Fantasy VII Interactive Sampler CD" sha1="0a88439b32be5172e79847f79ae33b6ba22b1de6"/> | |
168 | 183 | </diskarea> |
169 | 184 | </part> |
170 | 185 | </software> |
r250315 | r250316 | |
---|---|---|
152 | 152 | // Post-Processing Pixel Shader |
153 | 153 | //----------------------------------------------------------------------------- |
154 | 154 | |
155 | uniform float2 ScreenScale = float2(1.0f, 1.0f); | |
156 | uniform float2 ScreenOffset = float2(0.0f, 0.0f); | |
157 | ||
158 | 155 | uniform float ScanlineAlpha = 1.0f; |
159 | 156 | uniform float ScanlineScale = 1.0f; |
160 | 157 | uniform float ScanlineBrightScale = 1.0f; |
r250315 | r250316 | |
235 | 232 | : float2(-0.25f, 0.25f) |
236 | 233 | : OrientationSwapXY |
237 | 234 | ? float2(0.25f, 0.25f) |
238 | : float2(-0.25f, 0.25f); | |
235 | : float2(-0.25f, 0.25f); | |
239 | 236 | |
240 | 237 | float2 SpotCoord = coord; |
241 | 238 | SpotCoord += spotOffset * RatioCorrection; |
r250315 | r250316 | |
337 | 334 | return coord; |
338 | 335 | } |
339 | 336 | |
340 | float2 GetAdjustedCoords(float2 coord, float2 centerOffset, float distortionAmount) | |
341 | { | |
342 | float2 RatioCorrection = GetRatioCorrection(); | |
343 | ||
344 | // center coordinates | |
345 | coord -= centerOffset; | |
346 | ||
347 | // apply ratio difference between screen and quad | |
348 | coord /= RatioCorrection; | |
349 | ||
350 | // apply screen scale | |
351 | coord /= ScreenScale; | |
352 | ||
353 | // distort coordinates | |
354 | coord = GetDistortedCoords(coord, distortionAmount); | |
355 | ||
356 | // revert ratio difference between screen and quad | |
357 | coord *= RatioCorrection; | |
358 | ||
359 | // un-center coordinates | |
360 | coord += centerOffset; | |
361 | ||
362 | // apply screen offset | |
363 | coord += (centerOffset * 2.0) * ScreenOffset; | |
364 | ||
365 | return coord; | |
366 | } | |
367 | ||
368 | 337 | float4 ps_main(PS_INPUT Input) : COLOR |
369 | 338 | { |
370 | 339 | float2 ScreenTexelDims = 1.0f / ScreenDims; |
r250315 | r250316 | |
376 | 345 | float2 ScreenCoord = Input.ScreenCoord / ScreenDims; |
377 | 346 | ScreenCoord = GetCoords(ScreenCoord, float2(0.5f, 0.5f), CurvatureAmount); |
378 | 347 | |
379 | float2 DistortionCoord = Input.TexCoord; | |
380 | DistortionCoord = GetCoords(DistortionCoord, HalfSourceRect, CurvatureAmount); | |
381 | ||
382 | 348 | float2 BaseCoord = Input.TexCoord; |
383 | BaseCoord = Get | |
349 | BaseCoord = GetCoords(BaseCoord, HalfSourceRect, CurvatureAmount); | |
384 | 350 | |
385 | float2 DistortionCoordCentered = DistortionCoord; | |
386 | DistortionCoordCentered -= HalfSourceRect; | |
387 | ||
388 | 351 | float2 BaseCoordCentered = BaseCoord; |
389 | 352 | BaseCoordCentered -= HalfSourceRect; |
390 | 353 | |
391 | 354 | float4 BaseColor = tex2D(DiffuseSampler, BaseCoord); |
392 | 355 | BaseColor.a = 1.0f; |
393 | 356 | |
394 | if (BaseCoord.x < 0.0f || BaseCoord.y < 0.0f) | |
395 | { | |
396 | BaseColor.rgb = 0.0f; | |
397 | } | |
398 | ||
399 | 357 | // Mask Simulation (may not affect bloom) |
400 | 358 | if (!PrepareBloom) |
401 | 359 | { |
r250315 | r250316 | |
473 | 431 | // Vignetting Simulation (may not affect bloom) |
474 | 432 | if (!PrepareBloom) |
475 | 433 | { |
476 | float2 VignetteCoord = | |
434 | float2 VignetteCoord = BaseCoordCentered; | |
477 | 435 | |
478 | 436 | float VignetteFactor = GetVignetteFactor(VignetteCoord, VignettingAmount); |
479 | 437 | Output.rgb *= VignetteFactor; |
r250315 | r250316 | |
484 | 442 | { |
485 | 443 | float3 LightColor = float3(1.0f, 0.90f, 0.80f); |
486 | 444 | |
487 | float2 SpotCoord = DistortionCoordCentered; | |
488 | float2 NoiseCoord = DistortionCoordCentered; | |
445 | float2 SpotCoord = BaseCoordCentered; | |
446 | float2 NoiseCoord = BaseCoordCentered; | |
489 | 447 | |
490 | 448 | float SpotAddend = GetSpotAddend(SpotCoord, ReflectionAmount); |
491 | 449 | float NoiseFactor = GetNoiseFactor(SpotAddend, random(NoiseCoord)); |
r250315 | r250316 | |
493 | 451 | } |
494 | 452 | |
495 | 453 | // Round Corners Simulation (may affect bloom) |
496 | float2 RoundCornerCoord = | |
454 | float2 RoundCornerCoord = BaseCoordCentered; | |
497 | 455 | |
498 | 456 | float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerAmount, SmoothBorderAmount); |
499 | 457 | Output.rgb *= roundCornerFactor; |
r250315 | r250316 | |
---|---|---|
77 | 77 | |
78 | 78 | uniform float2 ScreenDims; // size of the window or fullscreen |
79 | 79 | uniform float2 SourceDims; // size of the texture in power-of-two size |
80 | uniform float2 SourceRect; // size of the uv rectangle | |
81 | 80 | uniform float2 TargetDims; // size of the target surface |
82 | 81 | |
83 | 82 | uniform float2 ShadowDims = float2(32.0f, 32.0f); // size of the shadow texture (extended to power-of-two size) |
r250315 | r250316 | |
88 | 87 | |
89 | 88 | uniform bool PrepareBloom = false; // disables some effects for rendering bloom textures |
90 | 89 | uniform bool PrepareVector = false; |
91 | uniform bool PrepareRaster = false; | |
92 | 90 | |
93 | 91 | VS_OUTPUT vs_main(VS_INPUT Input) |
94 | 92 | { |
r250315 | r250316 | |
125 | 123 | // Post-Processing Pixel Shader |
126 | 124 | //----------------------------------------------------------------------------- |
127 | 125 | |
128 | uniform float2 ScreenScale = float2(1.0f, 1.0f); | |
129 | uniform float2 ScreenOffset = float2(0.0f, 0.0f); | |
130 | ||
131 | 126 | uniform float ScanlineAlpha = 1.0f; |
132 | 127 | uniform float ScanlineScale = 1.0f; |
133 | 128 | uniform float ScanlineBrightScale = 1.0f; |
r250315 | r250316 | |
142 | 137 | uniform float3 Power = float3(1.0f, 1.0f, 1.0f); |
143 | 138 | uniform float3 Floor = float3(0.0f, 0.0f, 0.0f); |
144 | 139 | |
145 | float2 GetAdjustedCoords(float2 coord, float2 centerOffset) | |
146 | { | |
147 | // center coordinates | |
148 | coord -= centerOffset; | |
149 | ||
150 | // apply screen scale | |
151 | coord /= ScreenScale; | |
152 | ||
153 | // un-center coordinates | |
154 | coord += centerOffset; | |
155 | ||
156 | // apply screen offset | |
157 | coord += (centerOffset * 2.0) * ScreenOffset; | |
158 | ||
159 | return coord; | |
160 | } | |
161 | ||
162 | 140 | float4 ps_main(PS_INPUT Input) : COLOR |
163 | 141 | { |
164 | 142 | float2 ScreenTexelDims = 1.0f / ScreenDims; |
165 | 143 | |
166 | float2 HalfSourceRect = PrepareVector | |
167 | ? float2(0.5f, 0.5f) | |
168 | : SourceRect * 0.5f; | |
169 | ||
170 | 144 | float2 ScreenCoord = Input.ScreenCoord / ScreenDims; |
171 | float2 BaseCoord = | |
145 | float2 BaseCoord = Input.TexCoord; | |
172 | 146 | |
173 | 147 | // Color |
174 | 148 | float4 BaseColor = tex2D(DiffuseSampler, BaseCoord); |
175 | 149 | BaseColor.a = 1.0f; |
176 | 150 | |
177 | if (BaseCoord.x < 0.0f || BaseCoord.y < 0.0f) | |
178 | { | |
179 | BaseColor.rgb = 0.0f; | |
180 | } | |
181 | ||
182 | 151 | // Mask Simulation (may not affect bloom) |
183 | 152 | if (!PrepareBloom) |
184 | 153 | { |
r250315 | r250316 | |
235 | 204 | // Scanline Simulation (may not affect bloom) |
236 | 205 | if (!PrepareBloom) |
237 | 206 | { |
238 | // Scanline Simulation (only for raster screen) | |
239 | if (PrepareRaster) | |
207 | // Scanline Simulation (disabled for vector) | |
208 | if (!PrepareVector) | |
240 | 209 | { |
241 | 210 | float InnerSine = BaseCoord.y * ScanlineScale * SourceDims.y; |
242 | 211 | float ScanJitter = ScanlineOffset * SourceDims.y; |
r250315 | r250316 | |
---|---|---|
532 | 532 | os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " drivers " .. _OPTIONS["subtarget"] .. " > ".. GEN_DIR .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"].."/drivlist.cpp") |
533 | 533 | end |
534 | 534 | configuration { "gmake" } |
535 | if _OPTIONS["CPP11"]~="1" then | |
536 | 535 | defines { |
537 | 536 | "nullptr=NULL" -- getting ready for C++11 |
538 | 537 | } |
539 | end | |
540 | 538 | flags { |
541 | 539 | "SingleOutputDir", |
542 | 540 | } |
r250315 | r250316 | |
---|---|---|
674 | 674 | includedirs { |
675 | 675 | MAME_DIR .. "3rdparty/bx/include/compat/mingw", |
676 | 676 | } |
677 | if _OPTIONS["CPP11"]~="1" then | |
678 | 677 | defines { |
679 | 678 | "nullptr=NULL" -- not used but needed for C++11 code |
680 | 679 | } |
681 | end | |
682 | 680 | |
683 | 681 | configuration { "osx*" } |
684 | 682 | includedirs { |
r250315 | r250316 | |
---|---|---|
308 | 308 | device_t(mconfig, ISA8_CGA, "IBM Color/Graphics Monitor Adapter", tag, owner, clock, "cga", __FILE__), |
309 | 309 | device_isa8_card_interface(mconfig, *this), |
310 | 310 | m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), |
311 | m_update_row_type(-1), m_ | |
311 | m_update_row_type(-1), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), | |
312 | 312 | m_vram_size( 0x4000 ), m_plantronics(0), |
313 | 313 | m_palette(*this, "palette"), |
314 | 314 | m_screen(*this, "screen") |
r250315 | r250316 | |
324 | 324 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
325 | 325 | device_isa8_card_interface(mconfig, *this), |
326 | 326 | m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), |
327 | m_update_row_type(-1), m_ | |
327 | m_update_row_type(-1), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), | |
328 | 328 | m_vram_size( 0x4000 ), m_plantronics(0), |
329 | 329 | m_palette(*this, "palette"), |
330 | 330 | m_screen(*this, "screen") |
r250315 | r250316 | |
---|---|---|
19 | 19 | |
20 | 20 | arc_device::arc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
21 | 21 | : cpu_device(mconfig, ARC, "ARCtangent A4", tag, owner, clock, "arc", __FILE__) |
22 | , m_program_config("program", ENDIANNESS_BIG, 32, 24, 0), m_pc(0), m_program(nullptr), m_icount(0), m_debugger_temp(0) | |
23 | // some docs describe these as 'middle endian'?! | |
22 | , m_program_config("program", ENDIANNESS_BIG, 32, 24, 0) // some docs describe these as 'middle endian'?! | |
24 | 23 | { |
25 | 24 | } |
26 | 25 |
r250315 | r250316 | |
---|---|---|
19 | 19 | e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor program, address_map_constructor data, const char *shortname, const char *source) |
20 | 20 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
21 | 21 | , m_program_config("program", ENDIANNESS_BIG, 16, 13, -1, program) |
22 | , m_data_config("data", ENDIANNESS_BIG, 8, 12, 0, data), m_program(nullptr), m_data(nullptr), m_op(0), m_prev_op(0), m_irq_vector(0), m_irq_id(0), m_possible_irq(false), m_halt(false), | |
23 | m_sleep(false), m_icount(0), m_pc(0), m_prev_pc(0), m_npc(0), m_jpc(0), m_a(0), m_b(0), m_xp(0), m_xh(0), m_xl(0), m_yp(0), m_yh(0), m_yl(0), m_sp(0), m_f(0) | |
22 | , m_data_config("data", ENDIANNESS_BIG, 8, 12, 0, data) | |
24 | 23 | { } |
25 | 24 | |
26 | 25 | protected: |
r250315 | r250316 | |
---|---|---|
48 | 48 | e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
49 | 49 | : e0c6200_cpu_device(mconfig, E0C6S46, "E0C6S46", tag, owner, clock, ADDRESS_MAP_NAME(e0c6s46_program), ADDRESS_MAP_NAME(e0c6s46_data), "e0c6s46", __FILE__) |
50 | 50 | , m_vram1(*this, "vram1") |
51 | , m_vram2(*this, "vram2"), m_osc(0), m_svd(0), m_lcd_control(0), m_lcd_contrast(0) | |
52 | , m_pixel_update_handler(nullptr) | |
51 | , m_vram2(*this, "vram2") | |
52 | , m_pixel_update_handler(NULL) | |
53 | 53 | , m_write_r0(*this), m_write_r1(*this), m_write_r2(*this), m_write_r3(*this), m_write_r4(*this) |
54 | 54 | , m_read_p0(*this), m_read_p1(*this), m_read_p2(*this), m_read_p3(*this) |
55 | , m_write_p0(*this), m_write_p1(*this), m_write_p2(*this), m_write_p3(*this), m_r_dir(0), m_p_dir(0), m_p_pullup(0), m_dfk0(0), m_256_src_pulse(0), m_core_256_handle(nullptr), | |
56 | m_watchdog_count(0), m_clktimer_count(0), m_stopwatch_on(0), m_swl_cur_pulse(0), m_swl_slice(0), m_swl_count(0), m_swh_count(0), m_prgtimer_select(0), m_prgtimer_on(0), m_prgtimer_src_pulse(0), | |
57 | m_prgtimer_cur_pulse(0), m_prgtimer_count(0), m_prgtimer_reload(0), m_prgtimer_handle(nullptr), m_bz_43_on(0), m_bz_freq(0), m_bz_envelope(0), m_bz_duty_ratio(0), m_bz_1shot_on(0), m_bz_1shot_running(false), m_bz_1shot_count(0), m_bz_pulse(0), m_buzzer_handle(nullptr) | |
55 | , m_write_p0(*this), m_write_p1(*this), m_write_p2(*this), m_write_p3(*this) | |
58 | 56 | { } |
59 | 57 | |
60 | 58 |
r250315 | r250316 | |
---|---|---|
16 | 16 | h8_device::h8_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, bool mode_a16, address_map_delegate map_delegate) : |
17 | 17 | cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), |
18 | 18 | program_config("program", ENDIANNESS_BIG, 16, mode_a16 ? 16 : 24, 0, map_delegate), |
19 | io_config("io", ENDIANNESS_BIG, 16, 16, -1), program(nullptr), io(nullptr), direct(nullptr), PPC(0), NPC(0), PC(0), PIR(0), EXR(0), CCR(0), MAC(0), MACF(0), | |
20 | TMP1(0), TMP2(0), TMPR(0), inst_state(0), inst_substate(0), icount(0), bcount(0), irq_vector(0), taken_irq_vector(0), irq_level(0), taken_irq_level(0), irq_required(false), irq_nmi(false) | |
19 | io_config("io", ENDIANNESS_BIG, 16, 16, -1) | |
21 | 20 | { |
22 | 21 | supports_advanced = false; |
23 | 22 | mode_advanced = false; |
r250315 | r250316 | |
---|---|---|
23 | 23 | timer16_3(*this, "timer16:3"), |
24 | 24 | timer16_4(*this, "timer16:4"), |
25 | 25 | sci0(*this, "sci0"), |
26 | sci1(*this, "sci1") | |
26 | sci1(*this, "sci1") | |
27 | 27 | { |
28 | 28 | } |
29 | 29 |
r250315 | r250316 | |
---|---|---|
28 | 28 | timer16_2(*this, "timer16:2"), |
29 | 29 | sci0(*this, "sci0"), |
30 | 30 | sci1(*this, "sci1"), |
31 | sci2(*this, "sci2") | |
31 | sci2(*this, "sci2") | |
32 | 32 | { |
33 | 33 | } |
34 | 34 | |
r250315 | r250316 | |
53 | 53 | timer16_2(*this, "timer16:2"), |
54 | 54 | sci0(*this, "sci0"), |
55 | 55 | sci1(*this, "sci1"), |
56 | sci2(*this, "sci2") | |
56 | sci2(*this, "sci2") | |
57 | 57 | { |
58 | 58 | ram_start = 0xfff720; |
59 | 59 | } |
r250315 | r250316 | |
---|---|---|
25 | 25 | timer16_1(*this, "timer16:1"), |
26 | 26 | timer16_2(*this, "timer16:2"), |
27 | 27 | sci0(*this, "sci0"), |
28 | sci1(*this, "sci1") | |
28 | sci1(*this, "sci1") | |
29 | 29 | { |
30 | 30 | } |
31 | 31 |
r250315 | r250316 | |
---|---|---|
30 | 30 | timer16_3(*this, "timer16:3"), |
31 | 31 | timer16_4(*this, "timer16:4"), |
32 | 32 | sci0(*this, "sci0"), |
33 | sci1(*this, "sci1") | |
33 | sci1(*this, "sci1") | |
34 | 34 | { |
35 | 35 | } |
36 | 36 |
r250315 | r250316 | |
---|---|---|
26 | 26 | timer16(*this, "timer16"), |
27 | 27 | timer16_0(*this, "timer16:0"), |
28 | 28 | sci0(*this, "sci0"), |
29 | sci1(*this, "sci1") | |
29 | sci1(*this, "sci1") | |
30 | 30 | { |
31 | 31 | } |
32 | 32 | |
r250315 | r250316 | |
48 | 48 | timer16(*this, "timer16"), |
49 | 49 | timer16_0(*this, "timer16:0"), |
50 | 50 | sci0(*this, "sci0"), |
51 | sci1(*this, "sci1") | |
51 | sci1(*this, "sci1") | |
52 | 52 | { |
53 | 53 | ram_start = 0xf780; |
54 | 54 | } |
r250315 | r250316 | |
---|---|---|
12 | 12 | |
13 | 13 | h8_adc_device::h8_adc_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) : |
14 | 14 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
15 | cpu(*this, DEVICE_SELF_OWNER), intc(nullptr), io(nullptr), intc_tag(nullptr), intc_vector(0), adcsr(0), adcr(0), register_mask(0), trigger(0), start_mode(0), start_channel(0), | |
16 | end_channel(0), start_count(0), mode(0), channel(0), count(0), analog_powered(false), adtrg(false), next_event(0) | |
15 | cpu(*this, DEVICE_SELF_OWNER) | |
17 | 16 | { |
18 | 17 | suspend_on_interrupt = false; |
19 | 18 | analog_power_control = false; |
r250315 | r250316 | |
---|---|---|
9 | 9 | |
10 | 10 | h8_intc_device::h8_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
11 | 11 | device_t(mconfig, H8_INTC, "H8 INTC", tag, owner, clock, "h8_intc", __FILE__), |
12 | cpu(*this, DEVICE_SELF_OWNER) | |
12 | cpu(*this, DEVICE_SELF_OWNER) | |
13 | 13 | { |
14 | 14 | irq_vector_base = 4; |
15 | 15 | irq_vector_nmi = 3; |
16 | 16 | } |
17 | 17 | |
18 | 18 | h8_intc_device::h8_intc_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) : |
19 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), irq_vector_base(0), irq_vector_nmi(0), | |
20 | cpu(*this, DEVICE_SELF_OWNER), nmi_input(false), irq_input(0), ier(0), isr(0), iscr(0), icr_filter(0), ipr_filter(0) | |
19 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), | |
20 | cpu(*this, DEVICE_SELF_OWNER) | |
21 | 21 | { |
22 | 22 | } |
23 | 23 |
r250315 | r250316 | |
---|---|---|
7 | 7 | |
8 | 8 | h8_port_device::h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
9 | 9 | device_t(mconfig, H8_PORT, "H8 digital port", tag, owner, clock, "h8_digital_port", __FILE__), |
10 | cpu(*this, DEVICE_SELF_OWNER) | |
10 | cpu(*this, DEVICE_SELF_OWNER) | |
11 | 11 | { |
12 | 12 | } |
13 | 13 |
r250315 | r250316 | |
---|---|---|
11 | 11 | device_t(mconfig, H8_SCI, "H8 Serial Communications Interface", tag, owner, clock, "h8_sci", __FILE__), |
12 | 12 | cpu(*this, DEVICE_SELF_OWNER), |
13 | 13 | tx_cb(*this), |
14 | clk_cb(*this), intc(nullptr), intc_tag(nullptr), external_to_internal_ratio(0), internal_to_external_ratio(0), sync_timer(nullptr), eri_int(0), rxi_int(0), txi_int(0), tei_int(0), | |
15 | tx_state(0), rx_state(0), tx_bit(0), rx_bit(0), clock_state(0), clock_mode(0), tx_parity(0), rx_parity(0), ext_clock_counter(0), clock_value(false), ext_clock_value(false), rx_value(false), | |
16 | rdr(0), tdr(0), smr(0), scr(0), ssr(0), brr(0), rsr(0), tsr(0), clock_base(0), divider(0) | |
14 | clk_cb(*this) | |
17 | 15 | { |
18 | 16 | external_clock_period = attotime::never; |
19 | 17 | } |
r250315 | r250316 | |
---|---|---|
12 | 12 | |
13 | 13 | h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
14 | 14 | device_t(mconfig, H8_TIMER16_CHANNEL, "H8 16-bits timer channel", tag, owner, clock, "h8_16bits_timer_channel", __FILE__), |
15 | cpu(*this, "^^"), chained_timer(nullptr), intc(nullptr), intc_tag(nullptr), tier_mask(0), tgr_count(0), tbr_count(0), tgr_clearing(0), tcr(0), tier(0), ier(0), isr(0), clock_type(0), | |
16 | clock_divider(0), tcnt(0), last_clock_update(0), event_time(0), phase(0), counter_cycle(0), counter_incrementing(false), channel_active(false) | |
15 | cpu(*this, "^^") | |
17 | 16 | { |
18 | 17 | chain_tag = NULL; |
19 | 18 | } |
20 | 19 | |
21 | 20 | h8_timer16_channel_device::h8_timer16_channel_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) : |
22 | 21 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
23 | cpu(*this, "^^"), chained_timer(nullptr), intc(nullptr), intc_tag(nullptr), tier_mask(0), tgr_count(0), tbr_count(0), tgr_clearing(0), tcr(0), tier(0), ier(0), isr(0), clock_type(0), | |
24 | clock_divider(0), tcnt(0), last_clock_update(0), event_time(0), phase(0), counter_cycle(0), counter_incrementing(false), channel_active(false) | |
22 | cpu(*this, "^^") | |
25 | 23 | { |
26 | 24 | chain_tag = NULL; |
27 | 25 | } |
r250315 | r250316 | |
---|---|---|
8 | 8 | |
9 | 9 | h8_timer8_channel_device::h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
10 | 10 | device_t(mconfig, H8_TIMER8_CHANNEL, "H8 8-bits timer channel", tag, owner, clock, "h8_8bits_timer_channel", __FILE__), |
11 | cpu(*this, "^"), chained_timer(nullptr), intc(nullptr), chain_tag(nullptr), intc_tag(nullptr), irq_ca(0), irq_cb(0), irq_v(0), chain_type(0), tcr(0), tcsr(0), tcnt(0), extra_clock_bit(false), | |
12 | has_adte(false), has_ice(false), clock_type(0), clock_divider(0), clear_type(0), counter_cycle(0), last_clock_update(0), event_time(0) | |
11 | cpu(*this, "^") | |
13 | 12 | { |
14 | 13 | } |
15 | 14 | |
16 | 15 | h8_timer8_channel_device::h8_timer8_channel_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) : |
17 | 16 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
18 | cpu(*this, "^"), chained_timer(nullptr), intc(nullptr), chain_tag(nullptr), intc_tag(nullptr), irq_ca(0), irq_cb(0), irq_v(0), chain_type(0), tcr(0), tcsr(0), tcnt(0), extra_clock_bit(false), | |
19 | has_adte(false), has_ice(false), clock_type(0), clock_divider(0), clear_type(0), counter_cycle(0), last_clock_update(0), event_time(0) | |
17 | cpu(*this, "^") | |
20 | 18 | { |
21 | 19 | } |
22 | 20 |
r250315 | r250316 | |
---|---|---|
33 | 33 | timer16_2(*this, "timer16:2"), |
34 | 34 | sci0(*this, "sci0"), |
35 | 35 | sci1(*this, "sci1"), |
36 | sci2(*this, "sci2") | |
36 | sci2(*this, "sci2") | |
37 | 37 | { |
38 | 38 | } |
39 | 39 |
r250315 | r250316 | |
---|---|---|
42 | 42 | timer16_5(*this, "timer16:5"), |
43 | 43 | sci0(*this, "sci0"), |
44 | 44 | sci1(*this, "sci1"), |
45 | sci2(*this, "sci2") | |
45 | sci2(*this, "sci2") | |
46 | 46 | { |
47 | 47 | } |
48 | 48 |
r250315 | r250316 | |
---|---|---|
38 | 38 | timer16_5(*this, "timer16:5"), |
39 | 39 | sci0(*this, "sci0"), |
40 | 40 | sci1(*this, "sci1"), |
41 | sci2(*this, "sci2") | |
41 | sci2(*this, "sci2") | |
42 | 42 | { |
43 | 43 | } |
44 | 44 |
r250315 | r250316 | |
---|---|---|
34 | 34 | timer16_5(*this, "timer16:5"), |
35 | 35 | sci0(*this, "sci0"), |
36 | 36 | sci1(*this, "sci1"), |
37 | sci2(*this, "sci2") | |
37 | sci2(*this, "sci2") | |
38 | 38 | { |
39 | 39 | has_trace = true; |
40 | 40 | } |
r250315 | r250316 | |
---|---|---|
32 | 32 | hcd62121_cpu_device::hcd62121_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
33 | 33 | : cpu_device(mconfig, HCD62121, "Hitachi HCD62121", tag, owner, clock, "hcd62121", __FILE__) |
34 | 34 | , m_program_config("program", ENDIANNESS_BIG, 8, 24, 0) |
35 | , m_io_config("io", ENDIANNESS_BIG, 8, 8, 0), m_prev_pc(0) | |
36 | , m_sp(0) | |
35 | , m_io_config("io", ENDIANNESS_BIG, 8, 8, 0) | |
36 | , m_sp(0) | |
37 | 37 | , m_ip(0) |
38 | 38 | , m_dsize(0) |
39 | 39 | , m_cseg(0) |
40 | 40 | , m_dseg(0) |
41 | 41 | , m_sseg(0) |
42 | 42 | , m_f(0) |
43 | , m_lar(0) | |
43 | , m_lar(0) | |
44 | 44 | { |
45 | 45 | } |
46 | 46 |
r250315 | r250316 | |
---|---|---|
28 | 28 | : cpu_device(mconfig, I4004, "Intel I4004", tag, owner, clock, "i4004", __FILE__) |
29 | 29 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0) |
30 | 30 | , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0) |
31 | , m_data_config("data", ENDIANNESS_LITTLE, 8, 12, 0) | |
31 | , m_data_config("data", ENDIANNESS_LITTLE, 8, 12, 0) | |
32 | 32 | { |
33 | 33 | m_is_octal = true; |
34 | 34 | } |
r250315 | r250316 | |
---|---|---|
38 | 38 | m_ch1(*this, "1"), |
39 | 39 | m_ch2(*this, "2"), |
40 | 40 | m_write_sintr1(*this), |
41 | m_write_sintr2(*this), | |
41 | m_write_sintr2(*this), | |
42 | 42 | m_sysbus(0), |
43 | 43 | m_scb(0), |
44 | m_soc(0), | |
44 | m_soc(0), | |
45 | 45 | m_master(false), |
46 | 46 | m_current_tp(0), |
47 | 47 | m_ca(0), |
48 | m_sel(0) | |
48 | m_sel(0) | |
49 | 49 | { |
50 | 50 | } |
51 | 51 |
r250315 | r250316 | |
---|---|---|
36 | 36 | |
37 | 37 | i860_cpu_device::i860_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
38 | 38 | : cpu_device(mconfig, I860, "i860XR", tag, owner, clock, "i860xr", __FILE__) |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 64, 32, 0) | |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 64, 32, 0) | |
40 | 40 | { |
41 | 41 | } |
42 | 42 |
r250315 | r250316 | |
---|---|---|
18 | 18 | |
19 | 19 | i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
20 | 20 | : cpu_device(mconfig, I960, "i960kb", tag, owner, clock, "i960kb", __FILE__) |
21 | , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0), m_rcache_pos(0), m_SAT(0), m_PRCB(0), m_PC(0), m_AC(0), m_IP(0), m_PIP(0), m_ICR(0), m_bursting(0), m_immediate_irq(0), | |
22 | m_immediate_vector(0), m_immediate_pri(0), m_program(nullptr), m_direct(nullptr), m_icount(0) | |
21 | , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) | |
23 | 22 | { |
24 | 23 | } |
25 | 24 |
r250315 | r250316 | |
---|---|---|
31 | 31 | ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
32 | 32 | : cpu_device(mconfig, IE15, "ie15", tag, owner, clock, "ie15_cpu", __FILE__), |
33 | 33 | m_program_config("program", ENDIANNESS_LITTLE, 8, 14), |
34 | m_io_config("io", ENDIANNESS_LITTLE, 8, 8), m_A(0), m_CF(0), m_ZF(0), m_RF(0), m_flags(0), | |
35 | m_program(0), m_io(nullptr), | |
34 | m_io_config("io", ENDIANNESS_LITTLE, 8, 8), | |
35 | m_program(0), | |
36 | 36 | m_direct(0) |
37 | 37 | { |
38 | 38 | // set our instruction counter |
r250315 | r250316 | |
---|---|---|
18 | 18 | cpu_device(mconfig, M6502, "M6502", tag, owner, clock, "m6502", __FILE__), |
19 | 19 | sync_w(*this), |
20 | 20 | program_config("program", ENDIANNESS_LITTLE, 8, 16), |
21 | sprogram_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16), PPC(0), NPC(0), PC(0), SP(0), TMP(0), TMP2(0), A(0), X(0), Y(0), P(0), IR(0), inst_state_base(0), mintf(nullptr), | |
22 | inst_state(0), inst_substate(0), icount(0), nmi_state(false), irq_state(false), apu_irq_state(false), v_state(false), irq_taken(false), sync(false), inhibit_interrupts(false) | |
21 | sprogram_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16) | |
23 | 22 | { |
24 | 23 | direct_disabled = false; |
25 | 24 | } |
26 | 25 | |
27 | 26 | m6502_device::m6502_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) : |
28 | cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), | |
27 | cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), | |
29 | 28 | sync_w(*this), |
30 | 29 | program_config("program", ENDIANNESS_LITTLE, 8, 16), |
31 | sprogram_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16), PPC(0), NPC(0), PC(0), SP(0), TMP(0), TMP2(0), A(0), X(0), Y(0), P(0), IR(0), inst_state_base(0), mintf(nullptr), | |
32 | inst_state(0), inst_substate(0), icount(0), nmi_state(false), irq_state(false), apu_irq_state(false), v_state(false), irq_taken(false), sync(false), inhibit_interrupts(false) | |
30 | sprogram_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16) | |
33 | 31 | { |
34 | 32 | direct_disabled = false; |
35 | 33 | } |
r250315 | r250316 | |
---|---|---|
14 | 14 | const device_type M6509 = &device_creator<m6509_device>; |
15 | 15 | |
16 | 16 | m6509_device::m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
17 | m6502_device(mconfig, M6509, "M6509", tag, owner, clock, "m6509", __FILE__) | |
17 | m6502_device(mconfig, M6509, "M6509", tag, owner, clock, "m6509", __FILE__) | |
18 | 18 | { |
19 | 19 | program_config.m_addrbus_width = 20; |
20 | 20 | program_config.m_logaddr_width = 20; |
r250315 | r250316 | |
---|---|---|
16 | 16 | m6510_device::m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
17 | 17 | m6502_device(mconfig, M6510, "M6510", tag, owner, clock, "m6510", __FILE__), |
18 | 18 | read_port(*this), |
19 | write_port(*this) | |
19 | write_port(*this) | |
20 | 20 | { |
21 | 21 | pullup = 0x00; |
22 | 22 | floating = 0x00; |
r250315 | r250316 | |
25 | 25 | m6510_device::m6510_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) : |
26 | 26 | m6502_device(mconfig, type, name, tag, owner, clock, shortname, source), |
27 | 27 | read_port(*this), |
28 | write_port(*this) | |
28 | write_port(*this) | |
29 | 29 | { |
30 | 30 | pullup = 0x00; |
31 | 31 | floating = 0x00; |
r250315 | r250316 | |
---|---|---|
14 | 14 | const device_type M65CE02 = &device_creator<m65ce02_device>; |
15 | 15 | |
16 | 16 | m65ce02_device::m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
17 | m65c02_device(mconfig, M65CE02, "M65CE02", tag, owner, clock, "m65ce02", __FILE__) | |
17 | m65c02_device(mconfig, M65CE02, "M65CE02", tag, owner, clock, "m65ce02", __FILE__) | |
18 | 18 | { |
19 | 19 | } |
20 | 20 | |
21 | 21 | m65ce02_device::m65ce02_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) : |
22 | m65c02_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
22 | m65c02_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
23 | 23 | { |
24 | 24 | } |
25 | 25 |
r250315 | r250316 | |
---|---|---|
14 | 14 | const device_type M740 = &device_creator<m740_device>; |
15 | 15 | |
16 | 16 | m740_device::m740_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
17 | m6502_device(mconfig, M740, "M740", tag, owner, clock, "m740", __FILE__) | |
17 | m6502_device(mconfig, M740, "M740", tag, owner, clock, "m740", __FILE__) | |
18 | 18 | { |
19 | 19 | } |
20 | 20 | |
21 | 21 | m740_device::m740_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) : |
22 | m6502_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
22 | m6502_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
23 | 23 | { |
24 | 24 | } |
25 | 25 |
r250315 | r250316 | |
---|---|---|
26 | 26 | mb86233_cpu_device::mb86233_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
27 | 27 | : cpu_device(mconfig, MB86233, "MB86233", tag, owner, clock, "mb86233", __FILE__) |
28 | 28 | , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, -2) |
29 | , m_data_config("data", ENDIANNESS_LITTLE, 32, 32, 0), m_pc(0), m_reps(0), m_pcsp(0), m_eb(0), m_shift(0), m_repcnt(0), m_sr(0), | |
30 | m_fpucontrol(0), m_program(nullptr), m_direct(nullptr), m_icount(0), m_fifo_wait(0) | |
31 | , m_fifo_read_cb(*this) | |
29 | , m_data_config("data", ENDIANNESS_LITTLE, 32, 32, 0) | |
30 | , m_fifo_read_cb(*this) | |
32 | 31 | , m_fifo_read_ok_cb(*this) |
33 | 32 | , m_fifo_write_cb(*this) |
34 | , m_tablergn(nullptr), m_ARAM(nullptr), m_BRAM(nullptr) | |
35 | , m_Tables(nullptr) | |
33 | , m_tablergn(NULL) | |
34 | , m_Tables(NULL) | |
36 | 35 | { |
37 | 36 | } |
38 | 37 |
r250315 | r250316 | |
---|---|---|
13 | 13 | |
14 | 14 | i8x9x_device::i8x9x_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) : |
15 | 15 | mcs96_device(mconfig, type, name, tag, owner, clock, 8, "i8x9x", __FILE__), |
16 | io_config("io", ENDIANNESS_LITTLE, 16, 16, -1), io(nullptr), base_timer2(0), ad_done(0), hso_command(0), ad_command(0), hso_time(0), ad_result(0), | |
17 | ios0(0), ios1(0), ioc0(0), ioc1(0), sbuf(0), sp_stat(0), serial_send_buf(0), serial_send_timer(0) | |
16 | io_config("io", ENDIANNESS_LITTLE, 16, 16, -1) | |
18 | 17 | { |
19 | 18 | } |
20 | 19 |
r250315 | r250316 | |
---|---|---|
14 | 14 | |
15 | 15 | mcs96_device::mcs96_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int data_width, const char *shortname, const char *source) : |
16 | 16 | cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), |
17 | program_config("program", ENDIANNESS_LITTLE, data_width, 16), program(nullptr), direct(nullptr), icount(0), bcount(0), inst_state(0), cycles_scaling(0), pending_irq(0), | |
18 | PC(0), PPC(0), PSW(0), OP1(0), OP2(0), OP3(0), OPI(0), TMP(0), irq_requested(false) | |
17 | program_config("program", ENDIANNESS_LITTLE, data_width, 16) | |
19 | 18 | { |
20 | 19 | } |
21 | 20 |
r250315 | r250316 | |
---|---|---|
25 | 25 | |
26 | 26 | // device definitions |
27 | 27 | m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
28 | : melps4_cpu_device(mconfig, M58846, "M58846", tag, owner, clock, 11, ADDRESS_MAP_NAME(program_2kx9), 7, ADDRESS_MAP_NAME(data_128x4), 12 /* number of D pins */, 2 /* subroutine page */, 1 /* interrupt page */, "m58846", __FILE__) | |
28 | : melps4_cpu_device(mconfig, M58846, "M58846", tag, owner, clock, 11, ADDRESS_MAP_NAME(program_2kx9), 7, ADDRESS_MAP_NAME(data_128x4), 12 /* number of D pins */, 2 /* subroutine page */, 1 /* interrupt page */, "m58846", __FILE__) | |
29 | 29 | { } |
30 | 30 | |
31 | 31 |
r250315 | r250316 | |
---|---|---|
48 | 48 | // construction/destruction |
49 | 49 | mn10200_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor program, const char *shortname, const char *source) |
50 | 50 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
51 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, program), m_program(nullptr) | |
52 | , m_read_port0(*this), m_read_port1(*this), m_read_port2(*this), m_read_port3(*this), m_read_port4(*this) | |
53 | , m_write_port0(*this), m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_cycles(0), m_pc(0), m_psw(0), m_mdr(0), m_nmicr(0), m_iagr(0), | |
54 | m_extmdl(0), m_extmdh(0), m_possible_irq(false), m_pplul(0), m_ppluh(0), m_p3md(0), m_p4(0) | |
51 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, program) | |
52 | , m_read_port0(*this), m_read_port1(*this), m_read_port2(*this), m_read_port3(*this), m_read_port4(*this) | |
53 | , m_write_port0(*this), m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this) | |
55 | 54 | { } |
56 | 55 | |
57 | 56 | // static configuration helpers |
r250315 | r250316 | |
---|---|---|
46 | 46 | |
47 | 47 | tx0_device::tx0_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, int addr_bits, int address_mask, int ir_mask) |
48 | 48 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
49 | , m_program_config("program", ENDIANNESS_BIG, 32, addr_bits , -2), m_mbr(0), m_ac(0), m_mar(0), m_pc(0), m_ir(0), m_lr(0), m_xr(0), m_pf(0), m_tbr(0), m_tac(0), m_cm_sel(0), | |
50 | m_lr_sel(0), m_gbl_cm_sel(0), m_stop_cyc0(0), m_stop_cyc1(0), m_run(0), m_rim(0), m_cycle(0), m_ioh(0), m_ios(0), m_rim_step(0) | |
51 | , m_address_mask(address_mask) | |
52 | , m_ir_mask(ir_mask), m_icount(0), m_program(nullptr) | |
53 | , m_cpy_handler(*this) | |
49 | , m_program_config("program", ENDIANNESS_BIG, 32, addr_bits , -2) | |
50 | , m_address_mask(address_mask) | |
51 | , m_ir_mask(ir_mask) | |
52 | , m_cpy_handler(*this) | |
54 | 53 | , m_r1l_handler(*this) |
55 | 54 | , m_dis_handler(*this) |
56 | 55 | , m_r3l_handler(*this) |
r250315 | r250316 | |
---|---|---|
28 | 28 | const device_type PSX_DMA = &device_creator<psxdma_device>; |
29 | 29 | |
30 | 30 | psxdma_device::psxdma_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
31 | device_t(mconfig, PSX_DMA, "Sony PSX DMA", tag, owner, clock, "psxdma", __FILE__), | |
31 | device_t(mconfig, PSX_DMA, "Sony PSX DMA", tag, owner, clock, "psxdma", __FILE__), | |
32 | 32 | m_irq_handler(*this) |
33 | 33 | { |
34 | 34 | } |
r250315 | r250316 | |
---|---|---|
30 | 30 | const device_type PSX_IRQ = &device_creator<psxirq_device>; |
31 | 31 | |
32 | 32 | psxirq_device::psxirq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
33 | device_t(mconfig, PSX_IRQ, "Sony PSX IRQ", tag, owner, clock, "psxirq", __FILE__), | |
33 | device_t(mconfig, PSX_IRQ, "Sony PSX IRQ", tag, owner, clock, "psxirq", __FILE__), | |
34 | 34 | m_irq_handler(*this) |
35 | 35 | { |
36 | 36 | } |
r250315 | r250316 | |
---|---|---|
31 | 31 | const device_type PSX_MDEC = &device_creator<psxmdec_device>; |
32 | 32 | |
33 | 33 | psxmdec_device::psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
34 | : device_t(mconfig, PSX_MDEC, "Sony PSX MDEC", tag, owner, clock, "psxmdec", __FILE__) | |
34 | : device_t(mconfig, PSX_MDEC, "Sony PSX MDEC", tag, owner, clock, "psxmdec", __FILE__) | |
35 | 35 | { |
36 | 36 | } |
37 | 37 |
r250315 | r250316 | |
---|---|---|
39 | 39 | |
40 | 40 | psxsio_device::psxsio_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) : |
41 | 41 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
42 | m_status(SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY), m_mode(0), m_control(0), m_baud(0), | |
43 | m_rxd(1), m_tx_data(0), m_rx_data(0), m_tx_shift(0), m_rx_shift(0), m_tx_bits(0), m_rx_bits(0), m_timer(nullptr), | |
42 | m_status(SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY), | |
43 | m_rxd(1), | |
44 | 44 | m_irq_handler(*this), |
45 | 45 | m_sck_handler(*this), |
46 | 46 | m_txd_handler(*this), |
r250315 | r250316 | |
---|---|---|
35 | 35 | : cpu_device(mconfig, S2650, "S2650", tag, owner, clock, "s2650", __FILE__ ) |
36 | 36 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 15) |
37 | 37 | , m_io_config("io", ENDIANNESS_LITTLE, 8, 9) |
38 | , m_flag_handler(*this), m_ppc(0), m_page(0), m_iar(0), m_ea(0), m_psl(0), m_psu(0), m_r(0) | |
39 | , m_halt(0), m_ir(0), m_irq_state(0), m_icount(0), m_program(nullptr), m_direct(nullptr), m_io(nullptr) | |
40 | , m_debugger_temp(0) | |
38 | , m_flag_handler(*this) | |
39 | , m_halt(0) | |
40 | , m_debugger_temp(0) | |
41 | 41 | { |
42 | 42 | memset(m_reg, 0x00, sizeof(m_reg)); |
43 | 43 | } |
r250315 | r250316 | |
---|---|---|
52 | 52 | , m_unconfig_func(*this) |
53 | 53 | , m_id_func(*this) |
54 | 54 | , m_crc_func(*this) |
55 | , m_rsi_func(*this), m_pc(0), m_oldpc(0), m_p(0), m_out(0), m_carry(0), m_decimal(0), m_st(0), m_hst(0), m_nmi_state(0), m_irq_state(0), m_irq_enable(0), m_in_irq(0), | |
56 | m_pending_irq(0), m_sleeping(0), m_monitor_id(0), m_monitor_in(0), m_program(nullptr), m_direct(nullptr), m_icount(0), m_debugger_temp(0) | |
55 | , m_rsi_func(*this) | |
57 | 56 | { |
58 | 57 | } |
59 | 58 |
r250315 | r250316 | |
---|---|---|
23 | 23 | |
24 | 24 | scmp_device::scmp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
25 | 25 | : cpu_device(mconfig, SCMP, "INS 8050 SC/MP", tag, owner, clock, "ins8050", __FILE__) |
26 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0), m_AC(0), m_ER(0), m_SR(0), m_program(nullptr), m_direct(nullptr), m_icount(0) | |
27 | , m_flag_out_func(*this) | |
26 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) | |
27 | , m_flag_out_func(*this) | |
28 | 28 | , m_sout_func(*this) |
29 | 29 | , m_sin_func(*this) |
30 | 30 | , m_sensea_func(*this) |
r250315 | r250316 | |
36 | 36 | |
37 | 37 | scmp_device::scmp_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) |
38 | 38 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0), m_AC(0), m_ER(0), m_SR(0), m_program(nullptr), m_direct(nullptr), m_icount(0) | |
40 | , m_flag_out_func(*this) | |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) | |
40 | , m_flag_out_func(*this) | |
41 | 41 | , m_sout_func(*this) |
42 | 42 | , m_sin_func(*this) |
43 | 43 | , m_sensea_func(*this) |
r250315 | r250316 | |
---|---|---|
44 | 44 | |
45 | 45 | se3208_device::se3208_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
46 | 46 | : cpu_device(mconfig, SE3208, "SE3208", tag, owner, clock, "se3208", __FILE__) |
47 | , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) | |
47 | , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) | |
48 | 48 | { |
49 | 49 | } |
50 | 50 |
r250315 | r250316 | |
---|---|---|
37 | 37 | , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0) |
38 | 38 | , m_dma_func(*this) |
39 | 39 | , m_timer_func(*this) |
40 | , m_PC(0), m_IE0(0), m_IE1(0), m_IR0(0), m_IR1(0) | |
41 | , m_SYS(0), m_CKC(0), m_clock_changed(0) | |
42 | , m_SP(0) | |
40 | , m_PC(0) | |
41 | , m_SYS(0) | |
42 | , m_SP(0) | |
43 | 43 | , m_PS0(0) |
44 | , m_PS1(0) | |
44 | , m_PS1(0) | |
45 | 45 | { |
46 | 46 | } |
47 | 47 |
r250315 | r250316 | |
---|---|---|
10 | 10 | superfx_device::superfx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
11 | 11 | : cpu_device(mconfig, SUPERFX, "SuperFX", tag, owner, clock, "superfx", __FILE__) |
12 | 12 | , m_program_config("program", ENDIANNESS_LITTLE, 8, 32, 0) |
13 | , m_out_irq_func(*this), m_pipeline(0), m_ramaddr(0), m_sfr(0), m_pbr(0), m_rombr(0), m_rambr(0), m_cbr(0), m_scbr(0), m_scmr(0), m_colr(0), m_por(0), | |
14 | m_bramr(0), m_vcr(0), m_cfgr(0), m_clsr(0), m_romcl(0), m_romdr(0), m_ramcl(0), m_ramar(0), m_ramdr(0), m_sreg(nullptr), m_sreg_idx(0), m_dreg(nullptr), | |
15 | m_dreg_idx(0), m_r15_modified(0), m_irq(0), m_cache_access_speed(0), m_memory_access_speed(0), m_program(nullptr), m_icount(0), m_debugger_temp(0) | |
13 | , m_out_irq_func(*this) | |
16 | 14 | { |
17 | 15 | } |
18 | 16 |
r250315 | r250316 | |
---|---|---|
36 | 36 | tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname) |
37 | 37 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__) |
38 | 38 | , device_video_interface(mconfig, *this) |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3), m_pc(0), m_ppc(0), m_st(0), m_pixel_write(nullptr), m_pixel_read(nullptr), m_raster_op(nullptr), m_pixel_op(nullptr), m_pixel_op_timing(0), m_convsp(0), m_convdp(0), m_convmp(0), m_gfxcycles(0), m_pixelshift(0), m_is_34020(0), m_reset_deferred(false) | |
40 | , m_halt_on_reset(FALSE), m_hblank_stable(0), m_external_host_access(0), m_executing(0), m_program(nullptr), m_direct(nullptr) | |
41 | , m_pixclock(0) | |
42 | , m_pixperclock(0), m_scantimer(nullptr), m_icount(0) | |
43 | , m_output_int_cb(*this) | |
39 | , m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3) | |
40 | , m_halt_on_reset(FALSE) | |
41 | , m_pixclock(0) | |
42 | , m_pixperclock(0) | |
43 | , m_output_int_cb(*this) | |
44 | 44 | { |
45 | 45 | } |
46 | 46 |
r250315 | r250316 | |
---|---|---|
22 | 22 | |
23 | 23 | tms57002_device::tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
24 | 24 | : cpu_device(mconfig, TMS57002, "TMS57002", tag, owner, clock, "tms57002", __FILE__), |
25 | device_sound_interface(mconfig, *this), | |
25 | device_sound_interface(mconfig, *this), | |
26 | 26 | txrd(0), |
27 | 27 | program_config("program", ENDIANNESS_LITTLE, 32, 8, -2, ADDRESS_MAP_NAME(internal_pgm)), |
28 | 28 | data_config("data", ENDIANNESS_LITTLE, 8, 20) |
r250315 | r250316 | |
---|---|---|
18 | 18 | |
19 | 19 | unsp_device::unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
20 | 20 | : cpu_device(mconfig, UNSP, "u'nSP", tag, owner, clock, "unsp", __FILE__) |
21 | , m_program_config("program", ENDIANNESS_BIG, 16, 23, -1) | |
21 | , m_program_config("program", ENDIANNESS_BIG, 16, 23, -1) | |
22 | 22 | { |
23 | 23 | } |
24 | 24 |
r250315 | r250316 | |
---|---|---|
27 | 27 | necdsp_device::necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, UINT32 abits, UINT32 dbits, const char *name, const char *shortname, const char *source) |
28 | 28 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source), |
29 | 29 | m_program_config("program", ENDIANNESS_BIG, 32, abits, -2), // data bus width, address bus width, -2 means DWORD-addressable |
30 | m_data_config("data", ENDIANNESS_BIG, 16, dbits, -1), | |
30 | m_data_config("data", ENDIANNESS_BIG, 16, dbits, -1), // -1 for WORD-addressable | |
31 | 31 | m_irq(0), |
32 | 32 | m_program(NULL), |
33 | 33 | m_data(NULL), |
r250315 | r250316 | |
---|---|---|
37 | 37 | : cpu_device(mconfig, Z8002, "Z8002", tag, owner, clock, "z8002", __FILE__) |
38 | 38 | , m_program_config("program", ENDIANNESS_BIG, 16, 16, 0) |
39 | 39 | , m_io_config("io", ENDIANNESS_BIG, 8, 16, 0) |
40 | , m_mo_out(*this), m_ppc(0), m_pc(0), m_psapseg(0), m_psapoff(0), m_fcw(0), m_refresh(0), m_nspseg(0), m_nspoff(0), m_irq_req(0), m_irq_vec(0), m_op_valid(0), m_nmi_state(0), m_mi(0), m_program(nullptr), m_data(nullptr), m_direct(nullptr), m_io(nullptr), m_icount(0) | |
41 | , m_vector_mult(1) | |
40 | , m_mo_out(*this) | |
41 | , m_vector_mult(1) | |
42 | 42 | { |
43 | 43 | } |
44 | 44 | |
r250315 | r250316 | |
47 | 47 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
48 | 48 | , m_program_config("program", ENDIANNESS_BIG, 16, 20, 0) |
49 | 49 | , m_io_config("io", ENDIANNESS_BIG, 16, 16, 0) |
50 | , m_mo_out(*this) | |
50 | , m_mo_out(*this) | |
51 | 51 | , m_vector_mult(2) |
52 | 52 | { |
53 | 53 | } |
r250315 | r250316 | |
---|---|---|
81 | 81 | {0x2100,0x210f, 1,2, 7,&z8002_device::Z21_0000_dddd_imm16, "ld %rw3,%#w1", 0}, |
82 | 82 | {0x2110,0x21ff, 1,1, 7,&z8002_device::Z21_ssN0_dddd, "ld %rw3,@%rw2", 0}, |
83 | 83 | {0x2200,0x220f, 1,2, 10,&z8002_device::Z22_0000_ssss_0000_dddd_0000_0000, "resb %rb5,%rw3", 0}, |
84 | {0x2210,0x22ff, 1,1, 11,&z8002_device::Z22_ddN0_imm4, "resb @%rw | |
84 | {0x2210,0x22ff, 1,1, 11,&z8002_device::Z22_ddN0_imm4, "resb @%rw3,%3", 0}, | |
85 | 85 | {0x2300,0x230f, 1,2, 10,&z8002_device::Z23_0000_ssss_0000_dddd_0000_0000, "res %rw5,%rw3", 0}, |
86 | {0x2310,0x23ff, 1,1, 11,&z8002_device::Z23_ddN0_imm4, "res @%rw | |
86 | {0x2310,0x23ff, 1,1, 11,&z8002_device::Z23_ddN0_imm4, "res @%rw3,%3", 0}, | |
87 | 87 | {0x2400,0x240f, 1,2, 10,&z8002_device::Z24_0000_ssss_0000_dddd_0000_0000, "setb %rb5,%rw3", 0}, |
88 | {0x2410,0x24ff, 1,1, 11,&z8002_device::Z24_ddN0_imm4, "setb @%rw | |
88 | {0x2410,0x24ff, 1,1, 11,&z8002_device::Z24_ddN0_imm4, "setb @%rw3,%3", 0}, | |
89 | 89 | {0x2500,0x250f, 1,2, 10,&z8002_device::Z25_0000_ssss_0000_dddd_0000_0000, "set %rw5,%rw3", 0}, |
90 | {0x2510,0x25ff, 1,1, 11,&z8002_device::Z25_ddN0_imm4, "set @%rw | |
90 | {0x2510,0x25ff, 1,1, 11,&z8002_device::Z25_ddN0_imm4, "set @%rw3,%3", 0}, | |
91 | 91 | {0x2600,0x260f, 1,2, 10,&z8002_device::Z26_0000_ssss_0000_dddd_0000_0000, "bitb %rb5,%rw3", 0}, |
92 | {0x2610,0x26ff, 1,1, 8,&z8002_device::Z26_ddN0_imm4, "bitb @%rw | |
92 | {0x2610,0x26ff, 1,1, 8,&z8002_device::Z26_ddN0_imm4, "bitb @%rw3,%3", 0}, | |
93 | 93 | {0x2700,0x270f, 1,2, 10,&z8002_device::Z27_0000_ssss_0000_dddd_0000_0000, "bit %rw5,%rw3", 0}, |
94 | 94 | {0x2710,0x27ff, 1,1, 8,&z8002_device::Z27_ddN0_imm4, "bit @%rw2,%3", 0}, |
95 | 95 | {0x2810,0x28ff, 1,1, 11,&z8002_device::Z28_ddN0_imm4m1, "incb @%rw2,%+3", 0}, |
r250315 | r250316 | |
---|---|---|
37 | 37 | cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
38 | 38 | : device_t(mconfig, CMOS_40105, "40105", tag, owner, clock, "40105", __FILE__), |
39 | 39 | m_write_dir(*this), |
40 | m_write_dor(*this) | |
40 | m_write_dor(*this) | |
41 | 41 | { |
42 | 42 | } |
43 | 43 |
r250315 | r250316 | |
---|---|---|
31 | 31 | device_execute_interface (mconfig, *this) |
32 | 32 | , m_icount (0) |
33 | 33 | , m_write_pa (*this) |
34 | , m_write_h2 (*this), m_pgcr(0), m_psrr(0), m_paddr(0), m_pbddr(0), m_pcddr(0), m_pacr(0), m_pbcr(0), m_padr(0), m_pbdr(0), m_psr(0) | |
35 | { | |
34 | , m_write_h2 (*this) | |
35 | { | |
36 | 36 | } |
37 | 37 | |
38 | 38 | |
r250315 | r250316 | |
41 | 41 | device_execute_interface (mconfig, *this) |
42 | 42 | , m_icount (0) |
43 | 43 | , m_write_pa (*this) |
44 | , m_write_h2 (*this), m_pgcr(0), m_psrr(0), m_paddr(0), m_pbddr(0), m_pcddr(0), m_pacr(0), m_pbcr(0), m_padr(0), m_pbdr(0), m_psr(0) | |
45 | { | |
44 | , m_write_h2 (*this) | |
45 | { | |
46 | 46 | } |
47 | 47 | |
48 | 48 | //------------------------------------------------- |
r250315 | r250316 | |
---|---|---|
28 | 28 | ***************************************************************************/ |
29 | 29 | |
30 | 30 | mpcc68561_t::mpcc68561_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
31 | device_t(mconfig, MPCC68561, "Rockwell 68561 MPCC", tag, owner, clock, "mpcc68561", __FILE__), | |
31 | device_t(mconfig, MPCC68561, "Rockwell 68561 MPCC", tag, owner, clock, "mpcc68561", __FILE__), | |
32 | 32 | intrq_cb(*this) |
33 | 33 | { |
34 | 34 | } |
r250315 | r250316 | |
---|---|---|
21 | 21 | |
22 | 22 | fifo7200_device::fifo7200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
23 | 23 | : device_t(mconfig, FIFO7200, "IDT7200 FIFO", tag, owner, clock, "fifo7200", __FILE__), |
24 | m_ram_size(0), | |
24 | m_ram_size(0), | |
25 | 25 | m_ef_handler(*this), |
26 | 26 | m_ff_handler(*this), |
27 | 27 | m_hf_handler(*this) |
r250315 | r250316 | |
---|---|---|
29 | 29 | //------------------------------------------------- |
30 | 30 | |
31 | 31 | ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
32 | : device_t(mconfig, TTL74123, "74123 TTL", tag, owner, clock, "ttl74123", __FILE__), | |
32 | : device_t(mconfig, TTL74123, "74123 TTL", tag, owner, clock, "ttl74123", __FILE__), | |
33 | 33 | m_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE), |
34 | 34 | m_res(1.0), |
35 | 35 | m_cap(1.0), |
r250315 | r250316 | |
---|---|---|
32 | 32 | m_b(0), |
33 | 33 | m_s(0), |
34 | 34 | m_m(0), |
35 | m_c(0) | |
35 | m_c(0) | |
36 | 36 | { |
37 | 37 | } |
38 | 38 |
r250315 | r250316 | |
---|---|---|
26 | 26 | ***************************************************************************/ |
27 | 27 | |
28 | 28 | scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
29 | device_t(mconfig, SCC8530, "Zilog 8530 SCC (Legacy)", tag, owner, clock, "scc8530l", __FILE__), | |
29 | device_t(mconfig, SCC8530, "Zilog 8530 SCC (Legacy)", tag, owner, clock, "scc8530l", __FILE__), | |
30 | 30 | intrq_cb(*this) |
31 | 31 | { |
32 | 32 | } |
r250315 | r250316 | |
---|---|---|
40 | 40 | //------------------------------------------------- |
41 | 41 | |
42 | 42 | aakart_device::aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
43 | : device_t(mconfig, AAKART, "AAKART", tag, owner, clock, "aakart", __FILE__), | |
43 | : device_t(mconfig, AAKART, "AAKART", tag, owner, clock, "aakart", __FILE__), | |
44 | 44 | m_out_tx_cb(*this), |
45 | m_out_rx_cb(*this) | |
45 | m_out_rx_cb(*this) | |
46 | 46 | { |
47 | 47 | } |
48 | 48 |
r250315 | r250316 | |
---|---|---|
29 | 29 | m_address(0), |
30 | 30 | m_start(0), |
31 | 31 | m_eoc(0), |
32 | m_next_eoc(0), | |
32 | m_next_eoc(0), | |
33 | 33 | m_cycle(0), |
34 | m_bit(0) | |
34 | m_bit(0) | |
35 | 35 | { |
36 | 36 | } |
37 | 37 |
r250315 | r250316 | |
---|---|---|
16 | 16 | const device_type ADC1038 = &device_creator<adc1038_device>; |
17 | 17 | |
18 | 18 | adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
19 | : device_t(mconfig, ADC1038, "ADC1038", tag, owner, clock, "adc1038", __FILE__), | |
19 | : device_t(mconfig, ADC1038, "ADC1038", tag, owner, clock, "adc1038", __FILE__), | |
20 | 20 | m_gticlub_hack(0) |
21 | 21 | { |
22 | 22 | } |
r250315 | r250316 | |
---|---|---|
32 | 32 | |
33 | 33 | aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
34 | 34 | : device_t(mconfig, AICARTC, "AICA RTC", tag, owner, clock, "aicartc", __FILE__), |
35 | device_rtc_interface(mconfig, *this) | |
35 | device_rtc_interface(mconfig, *this) | |
36 | 36 | { |
37 | 37 | } |
38 | 38 |
r250315 | r250316 | |
---|---|---|
20 | 20 | |
21 | 21 | amiga_fdc::amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
22 | 22 | device_t(mconfig, AMIGA_FDC, "Amiga FDC", tag, owner, clock, "amiga_fdc", __FILE__), |
23 | m_write_index(*this) | |
23 | m_write_index(*this) | |
24 | 24 | { |
25 | 25 | } |
26 | 26 |
r250315 | r250316 | |
---|---|---|
9 | 9 | const device_type ATA_FLASH_PCCARD = &device_creator<ata_flash_pccard_device>; |
10 | 10 | |
11 | 11 | ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
12 | ide_hdd_device(mconfig, ATA_FLASH_PCCARD, "ATA Flash PCCARD", tag, owner, clock, "ataflash", __FILE__) | |
12 | ide_hdd_device(mconfig, ATA_FLASH_PCCARD, "ATA Flash PCCARD", tag, owner, clock, "ataflash", __FILE__) | |
13 | 13 | { |
14 | 14 | } |
15 | 15 |
r250315 | r250316 | |
---|---|---|
66 | 66 | m_pdiagin(0), |
67 | 67 | m_pdiagout(0), |
68 | 68 | m_single_device(0), |
69 | m_resetting(0) | |
69 | m_resetting(0) | |
70 | 70 | { |
71 | 71 | } |
72 | 72 |
r250315 | r250316 | |
---|---|---|
43 | 43 | m_read_mode(*this), |
44 | 44 | m_write_sr(*this), |
45 | 45 | m_read_data(*this), |
46 | m_write_data(*this) | |
46 | m_write_data(*this) | |
47 | 47 | { |
48 | 48 | } |
49 | 49 |
r250315 | r250316 | |
---|---|---|
21 | 21 | |
22 | 22 | dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, float bandwidth, const char *shortname, const char *source) |
23 | 23 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
24 | device_network_interface(mconfig, *this, bandwidth), | |
24 | device_network_interface(mconfig, *this, bandwidth), | |
25 | 25 | m_irq_cb(*this), |
26 | 26 | m_breq_cb(*this), |
27 | 27 | m_mem_read_cb(*this), |
28 | m_mem_write_cb(*this), m_reset(0), m_cs(false), m_rdma_active(0) | |
29 | { | |
28 | m_mem_write_cb(*this) | |
29 | { | |
30 | 30 | } |
31 | 31 | |
32 | 32 | void dp8390_device::device_start() { |
r250315 | r250316 | |
---|---|---|
34 | 34 | device_nvram_interface(mconfig, *this), |
35 | 35 | m_rst( 0 ), |
36 | 36 | m_clk( 0 ), |
37 | m_dqw( 0 ) | |
37 | m_dqw( 0 ) | |
38 | 38 | { |
39 | 39 | } |
40 | 40 |
r250315 | r250316 | |
---|---|---|
28 | 28 | const device_type DS1315 = &device_creator<ds1315_device>; |
29 | 29 | |
30 | 30 | ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
31 | : device_t(mconfig, DS1315, "Dallas Semiconductor DS1315", tag, owner, clock, "ds1315", __FILE__), m_mode(), m_count(0) | |
32 | { | |
31 | : device_t(mconfig, DS1315, "Dallas Semiconductor DS1315", tag, owner, clock, "ds1315", __FILE__) | |
32 | { | |
33 | 33 | } |
34 | 34 | |
35 | 35 | //------------------------------------------------- |
r250315 | r250316 | |
---|---|---|
30 | 30 | const device_type DS2401 = &device_creator<ds2401_device>; |
31 | 31 | |
32 | 32 | ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
33 | : device_t(mconfig, DS2401, "DS2401", tag, owner, clock, "ds2401", __FILE__) | |
33 | : device_t(mconfig, DS2401, "DS2401", tag, owner, clock, "ds2401", __FILE__) | |
34 | 34 | { |
35 | 35 | } |
36 | 36 |
r250315 | r250316 | |
---|---|---|
26 | 26 | |
27 | 27 | ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
28 | 28 | : device_t(mconfig, DS2404, "DS2404", tag, owner, clock, "ds2404", __FILE__), |
29 | device_nvram_interface(mconfig, *this), | |
29 | device_nvram_interface(mconfig, *this), | |
30 | 30 | m_address(0), |
31 | 31 | m_offset(0), |
32 | 32 | m_end_offset(0), |
r250315 | r250316 | |
---|---|---|
40 | 40 | |
41 | 41 | e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
42 | 42 | : device_t(mconfig, E0516, "E05-16", tag, owner, clock, "e0516", __FILE__), |
43 | device_rtc_interface(mconfig, *this) | |
43 | device_rtc_interface(mconfig, *this) | |
44 | 44 | { |
45 | 45 | } |
46 | 46 |
r250315 | r250316 | |
---|---|---|
35 | 35 | m_write_centronics_select(*this), |
36 | 36 | m_printhead(0), |
37 | 37 | m_pf_stepper(0), |
38 | m_cr_stepper(0) | |
38 | m_cr_stepper(0) | |
39 | 39 | { |
40 | 40 | } |
41 | 41 |
r250315 | r250316 | |
---|---|---|
36 | 36 | m_read_di(*this), |
37 | 37 | m_write_do(*this), |
38 | 38 | m_md(I8212_MODE_INPUT), |
39 | m_stb(0) | |
39 | m_stb(0) | |
40 | 40 | { |
41 | 41 | } |
42 | 42 |
r250315 | r250316 | |
---|---|---|
23 | 23 | //------------------------------------------------- |
24 | 24 | |
25 | 25 | i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
26 | : device_t(mconfig, I8243, "8243 I/O Expander", tag, owner, clock, "i8243", __FILE__), | |
26 | : device_t(mconfig, I8243, "8243 I/O Expander", tag, owner, clock, "i8243", __FILE__), | |
27 | 27 | m_readhandler(*this), |
28 | 28 | m_writehandler(*this) |
29 | 29 | { |
r250315 | r250316 | |
---|---|---|
6 | 6 | const device_type I8271 = &device_creator<i8271_device>; |
7 | 7 | |
8 | 8 | i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
9 | : device_t(mconfig, I8271, "Intel 8271", tag, owner, clock, "i8271", __FILE__), | |
9 | : device_t(mconfig, I8271, "Intel 8271", tag, owner, clock, "i8271", __FILE__), | |
10 | 10 | intrq_cb(*this), |
11 | 11 | drq_cb(*this), |
12 | 12 | hdl_cb(*this), |
13 | opt_cb(*this), irq(false), drq(false), scan_done(false), scan_match(false), command_pos(0), sectors_read(0), scan_len(0), dma_data(0), oport(0), rr(0), scan_sec(0), moder(0), | |
14 | precomp(0), perpmode(0), srate(0), hset(0), icnt(0), hload(0), sector_size(0), cur_rate(0) | |
13 | opt_cb(*this) | |
15 | 14 | { |
16 | 15 | select_connected = true; |
17 | 16 | external_ready = false; |
r250315 | r250316 | |
---|---|---|
26 | 26 | m_can_identify_device(0), |
27 | 27 | m_num_cylinders(0), |
28 | 28 | m_num_sectors(0), |
29 | m_num_heads(0), m_cur_lba(0), m_block_count(0), m_sectors_until_int(0), m_master_password_enable(0), m_user_password_enable(0), | |
30 | m_master_password(nullptr), | |
31 | m_user_password(nullptr) | |
29 | m_num_heads(0), | |
30 | m_master_password(NULL), | |
31 | m_user_password(NULL) | |
32 | 32 | { |
33 | 33 | } |
34 | 34 |
r250315 | r250316 | |
---|---|---|
48 | 48 | m_out_a_cb(*this), |
49 | 49 | m_in_b_cb(*this), |
50 | 50 | m_out_b_cb(*this), |
51 | m_out_irq_cb(*this) | |
51 | m_out_irq_cb(*this) | |
52 | 52 | { |
53 | 53 | } |
54 | 54 |
r250315 | r250316 | |
---|---|---|
10 | 10 | } |
11 | 11 | |
12 | 12 | jvs_device::jvs_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) |
13 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
13 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
14 | 14 | { |
15 | 15 | jvs_host_tag = 0; |
16 | 16 | next_device = 0; |
r250315 | r250316 | |
---|---|---|
29 | 29 | } |
30 | 30 | |
31 | 31 | jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) |
32 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
32 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
33 | 33 | { |
34 | 34 | first_device = 0; |
35 | 35 | } |
r250315 | r250316 | |
---|---|---|
23 | 23 | //------------------------------------------------- |
24 | 24 | |
25 | 25 | k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
26 | : device_t(mconfig, K033906, "K033906 PCI bridge", tag, owner, clock, "k033906", __FILE__) | |
26 | : device_t(mconfig, K033906, "K033906 PCI bridge", tag, owner, clock, "k033906", __FILE__) | |
27 | 27 | { |
28 | 28 | } |
29 | 29 |
r250315 | r250316 | |
---|---|---|
34 | 34 | m_portb_r_cb(*this), |
35 | 35 | m_portb_w_cb(*this), |
36 | 36 | m_portc_w_cb(*this), |
37 | m_out_int_cb(*this) | |
37 | m_out_int_cb(*this) | |
38 | 38 | { |
39 | 39 | } |
40 | 40 |
r250315 | r250316 | |
---|---|---|
5 | 5 | linear_flash_pccard_device::linear_flash_pccard_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) : |
6 | 6 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
7 | 7 | device_memory_interface(mconfig, *this), |
8 | device_slot_card_interface(mconfig, *this) | |
8 | device_slot_card_interface(mconfig, *this) | |
9 | 9 | { |
10 | 10 | } |
11 | 11 |
r250315 | r250316 | |
---|---|---|
15 | 15 | ADDRESS_MAP_END |
16 | 16 | |
17 | 17 | lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
18 | : lpc_device(mconfig, LPC_RTC, "LPC RTC", tag, owner, clock, "lpc_rtc", __FILE__) | |
18 | : lpc_device(mconfig, LPC_RTC, "LPC RTC", tag, owner, clock, "lpc_rtc", __FILE__) | |
19 | 19 | { |
20 | 20 | } |
21 | 21 |
r250315 | r250316 | |
---|---|---|
29 | 29 | |
30 | 30 | m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
31 | 31 | : device_t(mconfig, M6M80011AP, "M6M80011AP EEPROM", tag, owner, clock, "m6m80011ap", __FILE__), |
32 | device_nvram_interface(mconfig, *this) | |
32 | device_nvram_interface(mconfig, *this) | |
33 | 33 | { |
34 | 34 | } |
35 | 35 |
r250315 | r250316 | |
---|---|---|
18 | 18 | const device_type MB14241 = &device_creator<mb14241_device>; |
19 | 19 | |
20 | 20 | mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
21 | : device_t(mconfig, MB14241, "MB14241 Data Shifter", tag, owner, clock, "mb14241", __FILE__) | |
21 | : device_t(mconfig, MB14241, "MB14241 Data Shifter", tag, owner, clock, "mb14241", __FILE__) | |
22 | 22 | { |
23 | 23 | } |
24 | 24 |
r250315 | r250316 | |
---|---|---|
28 | 28 | //------------------------------------------------- |
29 | 29 | |
30 | 30 | mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock ) |
31 | : device_t(mconfig, MB3773, "MB3773 Power Supply Monitor", tag, owner, clock, "mb3773", __FILE__) | |
31 | : device_t(mconfig, MB3773, "MB3773 Power Supply Monitor", tag, owner, clock, "mb3773", __FILE__) | |
32 | 32 | { |
33 | 33 | } |
34 | 34 |
r250315 | r250316 | |
---|---|---|
20 | 20 | |
21 | 21 | mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
22 | 22 | device_t(mconfig, MB8795, "Fujitsu MB8795", tag, owner, clock, "mb8795", __FILE__), |
23 | device_network_interface(mconfig, *this, 10), txstat(0), txmask(0), rxstat(0), rxmask(0), txmode(0), rxmode(0), txlen(0), rxlen(0), txcount(0), drq_tx(false), | |
24 | drq_rx(false), irq_tx(false), irq_rx(false), timer_tx(nullptr), timer_rx(nullptr), | |
23 | device_network_interface(mconfig, *this, 10), | |
25 | 24 | irq_tx_cb(*this), |
26 | 25 | irq_rx_cb(*this), |
27 | 26 | drq_tx_cb(*this), |
r250315 | r250316 | |
---|---|---|
34 | 34 | : device_t(mconfig, MC146818, "MC146818 RTC", tag, owner, clock, "mc146818", __FILE__), |
35 | 35 | device_nvram_interface(mconfig, *this), |
36 | 36 | m_index(0), |
37 | m_last_refresh(attotime::zero), | |
37 | m_last_refresh(attotime::zero), | |
38 | 38 | m_write_irq(*this), |
39 | 39 | m_century_index(-1), |
40 | 40 | m_epoch(0), |
r250315 | r250316 | |
49 | 49 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
50 | 50 | device_nvram_interface(mconfig, *this), |
51 | 51 | m_index(0), |
52 | m_last_refresh(attotime::zero), | |
52 | m_last_refresh(attotime::zero), | |
53 | 53 | m_write_irq(*this), |
54 | 54 | m_century_index(-1), |
55 | 55 | m_epoch(0), |
r250315 | r250316 | |
---|---|---|
32 | 32 | |
33 | 33 | |
34 | 34 | mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
35 | : device_t(mconfig, MC68328, "MC68328 (DragonBall) Integrated Processor", tag, owner, clock, "mc68328", __FILE__), | |
35 | : device_t(mconfig, MC68328, "MC68328 (DragonBall) Integrated Processor", tag, owner, clock, "mc68328", __FILE__), | |
36 | 36 | m_out_port_a_cb(*this), |
37 | 37 | m_out_port_b_cb(*this), |
38 | 38 | m_out_port_c_cb(*this), |
r250315 | r250316 | |
---|---|---|
19 | 19 | |
20 | 20 | microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
21 | 21 | device_t(mconfig, MICROTOUCH, "Microtouch Touchscreen", tag, owner, clock, "microtouch", __FILE__), |
22 | device_serial_interface(mconfig, *this), m_rx_buffer_ptr(0), m_tx_buffer_num(0), m_tx_buffer_ptr(0), m_reset_done(0), m_format(0), m_mode(0), m_last_touch_state(0), | |
23 | m_last_x(0), m_last_y(0), | |
22 | device_serial_interface(mconfig, *this), | |
24 | 23 | m_out_stx_func(*this), |
25 | 24 | m_touch(*this, "TOUCH"), |
26 | 25 | m_touchx(*this, "TOUCH_X"), |
27 | m_touchy(*this, "TOUCH_Y") | |
26 | m_touchy(*this, "TOUCH_Y") | |
28 | 27 | { |
29 | 28 | } |
30 | 29 |
r250315 | r250316 | |
---|---|---|
43 | 43 | m_read_x2(*this), |
44 | 44 | m_read_x3(*this), |
45 | 45 | m_read_x4(*this), |
46 | m_read_x5(*this), | |
46 | m_read_x5(*this), | |
47 | 47 | m_max_y(5), // TODO 4 for 74C922, 5 for 74C923 |
48 | 48 | m_inhibit(0), |
49 | 49 | m_x(0), |
50 | m_y(0), | |
50 | m_y(0), | |
51 | 51 | m_da(0), |
52 | m_next_da(0) | |
52 | m_next_da(0) | |
53 | 53 | { |
54 | 54 | } |
55 | 55 |
r250315 | r250316 | |
---|---|---|
20 | 20 | m_rxc_handler(*this), |
21 | 21 | m_rts_handler(*this), |
22 | 22 | m_dtr_handler(*this), |
23 | m_control(0), | |
23 | m_control(0), | |
24 | 24 | m_status(0), |
25 | m_tdr(0), | |
25 | m_tdr(0), | |
26 | 26 | m_irq_state(0), |
27 | 27 | m_irq(0), |
28 | 28 | m_txd(0), |
r250315 | r250316 | |
34 | 34 | m_cts(1), |
35 | 35 | m_dsr(1), |
36 | 36 | m_dcd(1), |
37 | m_rxd(1), | |
37 | m_rxd(1), | |
38 | 38 | m_rx_state(STATE_START), |
39 | m_rx_clock(0), m_rx_bits(0), m_rx_shift(0), m_rx_parity(0), | |
40 | m_rx_counter(0), m_rx_irq_enable(0), | |
39 | m_rx_clock(0), | |
40 | m_rx_counter(0), | |
41 | 41 | m_rx_internal_clock(0), |
42 | 42 | m_tx_state(STATE_START), |
43 | 43 | m_tx_output(OUTPUT_MARK), |
44 | m_tx_clock(0), m_tx_bits(0), m_tx_shift(0), m_tx_parity(0), | |
45 | m_tx_counter(0), m_tx_enable(0), m_tx_irq_enable(0), m_tx_internal_clock(0) | |
44 | m_tx_clock(0), | |
45 | m_tx_counter(0) | |
46 | 46 | { |
47 | 47 | } |
48 | 48 |
r250315 | r250316 | |
---|---|---|
31 | 31 | ADDRESS_MAP_END |
32 | 32 | |
33 | 33 | ncr5380n_device::ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
34 | : nscsi_device(mconfig, NCR5380N, "5380 SCSI (new)", tag, owner, clock, "ncr5380", __FILE__), tm(nullptr), status(0), istatus(0), m_mode(0), | |
35 | m_outdata(0), m_busstatus(0), m_dmalatch(0), m_icommand(0), m_tcommand(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0), select_timeout(0), | |
36 | seq(0), tcount(0), mode(0), state(0), irq(false), drq(false), | |
34 | : nscsi_device(mconfig, NCR5380N, "5380 SCSI (new)", tag, owner, clock, "ncr5380", __FILE__), | |
37 | 35 | m_irq_handler(*this), |
38 | 36 | m_drq_handler(*this) |
39 | 37 | { |
r250315 | r250316 | |
---|---|---|
22 | 22 | ADDRESS_MAP_END |
23 | 23 | |
24 | 24 | ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
25 | : nscsi_device(mconfig, NCR5390, "5390 SCSI", tag, owner, clock, "ncr5390", __FILE__), tm(nullptr), config(0), status(0), istatus(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0), | |
26 | select_timeout(0), seq(0), tcount(0), mode(0), fifo_pos(0), command_pos(0), state(0), xfr_phase(0), command_length(0), dma_dir(0), irq(false), drq(false), | |
25 | : nscsi_device(mconfig, NCR5390, "5390 SCSI", tag, owner, clock, "ncr5390", __FILE__), | |
27 | 26 | m_irq_handler(*this), |
28 | 27 | m_drq_handler(*this) |
29 | 28 | { |
r250315 | r250316 | |
---|---|---|
23 | 23 | const device_type NSC810 = &device_creator<nsc810_device>; |
24 | 24 | |
25 | 25 | nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
26 | device_t(mconfig, NSC810, "National Semiconductor NSC810", tag, owner, clock, "nsc810", __FILE__), m_portA_latch(0), m_portB_latch(0), m_portC_latch(0), | |
27 | m_ddrA(0), m_ddrB(0), m_ddrC(0), m_mode(0), m_timer0(nullptr), m_timer1(nullptr), m_timer0_mode(0), m_timer1_mode(0), m_timer0_counter(0), m_timer1_counter(0), | |
28 | m_timer0_base(0), m_timer1_base(0), m_timer0_running(false), m_timer1_running(false), m_timer0_clock(0), m_timer1_clock(0), m_ramselect(false), | |
26 | device_t(mconfig, NSC810, "National Semiconductor NSC810", tag, owner, clock, "nsc810", __FILE__), | |
29 | 27 | m_portA_r(*this), |
30 | 28 | m_portB_r(*this), |
31 | 29 | m_portC_r(*this), |
r250315 | r250316 | |
---|---|---|
6 | 6 | const device_type NSCSI_CONNECTOR = &device_creator<nscsi_connector>; |
7 | 7 | |
8 | 8 | nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
9 | device_t(mconfig, NSCSI_BUS, "NSCSI Bus", tag, owner, clock, "nscsi_bus", __FILE__) | |
9 | device_t(mconfig, NSCSI_BUS, "NSCSI Bus", tag, owner, clock, "nscsi_bus", __FILE__) | |
10 | 10 | { |
11 | 11 | devcnt = 0; |
12 | 12 | memset(dev, 0, sizeof(dev)); |
r250315 | r250316 | |
---|---|---|
14 | 14 | m_write_io(*this), |
15 | 15 | m_write_cd(*this), |
16 | 16 | m_write_sel(*this), |
17 | m_write_bsy(*this) | |
17 | m_write_bsy(*this) | |
18 | 18 | { |
19 | 19 | } |
20 | 20 |
r250315 | r250316 | |
---|---|---|
6 | 6 | const device_type NSCSI_CDROM = &device_creator<nscsi_cdrom_device>; |
7 | 7 | |
8 | 8 | nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
9 | nscsi_full_device(mconfig, NSCSI_CDROM, "SCSI CDROM", tag, owner, clock, "scsi_cdrom", __FILE__) | |
9 | nscsi_full_device(mconfig, NSCSI_CDROM, "SCSI CDROM", tag, owner, clock, "scsi_cdrom", __FILE__) | |
10 | 10 | { |
11 | 11 | } |
12 | 12 |
r250315 | r250316 | |
---|---|---|
6 | 6 | const device_type NSCSI_HARDDISK = &device_creator<nscsi_harddisk_device>; |
7 | 7 | |
8 | 8 | nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
9 | nscsi_full_device(mconfig, NSCSI_HARDDISK, "SCSI HARDDISK", tag, owner, clock, "scsi_harddisk", __FILE__) | |
9 | nscsi_full_device(mconfig, NSCSI_HARDDISK, "SCSI HARDDISK", tag, owner, clock, "scsi_harddisk", __FILE__) | |
10 | 10 | { |
11 | 11 | } |
12 | 12 | |
13 | 13 | nscsi_harddisk_device::nscsi_harddisk_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) : |
14 | nscsi_full_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
14 | nscsi_full_device(mconfig, type, name, tag, owner, clock, shortname, source) | |
15 | 15 | { |
16 | 16 | } |
17 | 17 |
r250315 | r250316 | |
---|---|---|
15 | 15 | pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
16 | 16 | : device_t(mconfig, PC_LPT, "PC-LPT", tag, owner, clock, "pc_lpt", __FILE__), |
17 | 17 | m_irq(1), |
18 | m_data(0xff), | |
18 | m_data(0xff), | |
19 | 19 | m_irq_enabled(1), |
20 | 20 | m_centronics_ack(1), |
21 | 21 | m_irq_handler(*this), |
r250315 | r250316 | |
---|---|---|
24 | 24 | m_outputs(0), |
25 | 25 | m_terms(0), |
26 | 26 | m_input_mask(0), |
27 | m_xor(0) | |
27 | m_xor(0) | |
28 | 28 | { |
29 | 29 | } |
30 | 30 |
r250315 | r250316 | |
---|---|---|
7 | 7 | const device_type RF5C296 = &device_creator<rf5c296_device>; |
8 | 8 | |
9 | 9 | rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
10 | device_t(mconfig, PCCARD_SLOT, "PCCARD SLOT", tag, owner, clock, "pccard", __FILE__) | |
10 | device_t(mconfig, PCCARD_SLOT, "PCCARD SLOT", tag, owner, clock, "pccard", __FILE__) | |
11 | 11 | { |
12 | 12 | } |
13 | 13 |
r250315 | r250316 | |
---|---|---|
32 | 32 | rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
33 | 33 | : device_t(mconfig, RTC4543, "R4543 RTC", tag, owner, clock, "rtc4543", __FILE__), |
34 | 34 | device_rtc_interface(mconfig, *this), |
35 | data_cb(*this) | |
35 | data_cb(*this) | |
36 | 36 | { |
37 | 37 | } |
38 | 38 |
r250315 | r250316 | |
---|---|---|
37 | 37 | device_nvram_interface(mconfig, *this), |
38 | 38 | m_latch(0), |
39 | 39 | m_reset_line(CLEAR_LINE), |
40 | m_clock_line(CLEAR_LINE) | |
40 | m_clock_line(CLEAR_LINE) | |
41 | 41 | { |
42 | 42 | } |
43 | 43 |
r250315 | r250316 | |
---|---|---|
36 | 36 | //------------------------------------------------- |
37 | 37 | |
38 | 38 | s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
39 | : device_t(mconfig, S3520CF, "S-3520CF RTC", tag, owner, clock, "s3520cf", __FILE__) | |
39 | : device_t(mconfig, S3520CF, "S-3520CF RTC", tag, owner, clock, "s3520cf", __FILE__) | |
40 | 40 | { |
41 | 41 | } |
42 | 42 |
r250315 | r250316 | |
---|---|---|
33 | 33 | const device_type S3C44B0 = &device_creator<s3c44b0_device>; |
34 | 34 | |
35 | 35 | s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
36 | : device_t(mconfig, S3C44B0, "Samsung S3C44B0", tag, owner, clock, "s3c44b0", __FILE__), | |
36 | : device_t(mconfig, S3C44B0, "Samsung S3C44B0", tag, owner, clock, "s3c44b0", __FILE__), | |
37 | 37 | m_port_r_cb(*this), |
38 | 38 | m_port_w_cb(*this), |
39 | 39 | m_scl_w_cb(*this), |
r250315 | r250316 | |
---|---|---|
24 | 24 | serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
25 | 25 | : device_t(mconfig, SERFLASH, "Serial Flash", tag, owner, clock, "serflash", __FILE__), |
26 | 26 | device_nvram_interface(mconfig, *this), |
27 | m_length(0), m_region(nullptr), m_flash_state(), m_flash_enab(0), m_flash_cmd_seq(0), m_flash_cmd_prev(0), m_flash_addr_seq(0), m_flash_read_seq(0), m_flash_row(0), | |
28 | m_flash_col(0), m_flash_page_addr(0), m_flash_page_index(0), m_last_flash_cmd(0), m_flash_addr(0) | |
27 | m_length(0) | |
29 | 28 | { |
30 | 29 | } |
31 | 30 |
r250315 | r250316 | |
---|---|---|
26 | 26 | const device_type SPEECHROM = &device_creator<speechrom_device>; |
27 | 27 | |
28 | 28 | speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
29 | : device_t(mconfig, SPEECHROM, "SPEECHROM", tag, owner, clock, "speechrom", __FILE__), | |
29 | : device_t(mconfig, SPEECHROM, "SPEECHROM", tag, owner, clock, "speechrom", __FILE__), | |
30 | 30 | m_speechROMaddr(0), |
31 | 31 | m_load_pointer(0), |
32 | 32 | m_ROM_bits_count(0), |
r250315 | r250316 | |
---|---|---|
25 | 25 | //------------------------------------------------- |
26 | 26 | |
27 | 27 | tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
28 | : device_t(mconfig, TMS1024, "TMS1024 I/O Expander", tag, owner, clock, "tms1024", __FILE__), | |
28 | : device_t(mconfig, TMS1024, "TMS1024 I/O Expander", tag, owner, clock, "tms1024", __FILE__), | |
29 | 29 | m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this) |
30 | 30 | { |
31 | 31 | } |
32 | 32 | |
33 | 33 | tms1024_device::tms1024_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) |
34 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), | |
34 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), | |
35 | 35 | m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this) |
36 | 36 | { |
37 | 37 | } |
r250315 | r250316 | |
---|---|---|
19 | 19 | const device_type UPD4701 = &device_creator<upd4701_device>; |
20 | 20 | |
21 | 21 | upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
22 | : device_t(mconfig, UPD4701, "uPD4701 Encoder", tag, owner, clock, "upd4701", __FILE__), m_cs(0), m_xy(0), m_ul(0), m_resetx(0), m_resety(0), m_latchx(0), m_latchy(0), | |
23 | m_startx(0), m_starty(0), m_x(0), m_y(0), m_switches(0), m_latchswitches(0), m_cf(0) | |
22 | : device_t(mconfig, UPD4701, "uPD4701 Encoder", tag, owner, clock, "upd4701", __FILE__) | |
24 | 23 | { |
25 | 24 | } |
26 | 25 |
r250315 | r250316 | |
---|---|---|
35 | 35 | |
36 | 36 | upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
37 | 37 | : device_t(mconfig, UPD4992, "uPD4992 RTC", tag, owner, clock, "upd4992", __FILE__), |
38 | device_rtc_interface(mconfig, *this) | |
38 | device_rtc_interface(mconfig, *this) | |
39 | 39 | { |
40 | 40 | } |
41 | 41 |
r250315 | r250316 | |
---|---|---|
19 | 19 | const device_type UPD7002 = &device_creator<upd7002_device>; |
20 | 20 | |
21 | 21 | upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
22 | : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__) | |
22 | : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__) | |
23 | 23 | { |
24 | 24 | } |
25 | 25 |
r250315 | r250316 | |
---|---|---|
34 | 34 | //------------------------------------------------- |
35 | 35 | |
36 | 36 | v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
37 | : device_t(mconfig, v3021, "V3021 RTC", tag, owner, clock, "v3021", __FILE__) | |
37 | : device_t(mconfig, v3021, "V3021 RTC", tag, owner, clock, "v3021", __FILE__) | |
38 | 38 | { |
39 | 39 | } |
40 | 40 |
r250315 | r250316 | |
---|---|---|
29 | 29 | ADDRESS_MAP_END |
30 | 30 | |
31 | 31 | vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
32 | : pci_host_device(mconfig, VRC4373, "NEC VRC4373 System Controller", tag, owner, clock, "vrc4373", __FILE__), | |
32 | : pci_host_device(mconfig, VRC4373, "NEC VRC4373 System Controller", tag, owner, clock, "vrc4373", __FILE__), | |
33 | 33 | m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32), |
34 | m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32) | |
34 | m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32) | |
35 | 35 | |
36 | 36 | { |
37 | 37 | } |
r250315 | r250316 | |
---|---|---|
16 | 16 | |
17 | 17 | |
18 | 18 | vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
19 | : device_t(mconfig, VT82C496, "VIA VT82C496G system chipset", tag, owner, clock, "vt82c496", __FILE__), m_cpu_tag(nullptr), m_region_tag(nullptr), m_space(nullptr), m_ram(nullptr), m_rom(nullptr), m_reg_select(0) | |
20 | { | |
19 | : device_t(mconfig, VT82C496, "VIA VT82C496G system chipset", tag, owner, clock, "vt82c496", __FILE__) | |
20 | { | |
21 | 21 | } |
22 | 22 | |
23 | 23 | void vt82c496_device::device_start() |
r250315 | r250316 | |
---|---|---|
29 | 29 | , m_data_out(0) |
30 | 30 | , m_data_in(0) |
31 | 31 | , m_control(0) |
32 | , m_status(0), m_timer(nullptr) | |
33 | , m_rxd(1) | |
32 | , m_status(0) | |
33 | , m_rxd(1) | |
34 | 34 | , m_tx_busy(false) |
35 | 35 | { |
36 | 36 | } |
r250315 | r250316 | |
---|---|---|
6 | 6 | const device_type SEGA_315_5641_PCM = &device_creator<sega_315_5641_pcm_device>; |
7 | 7 | |
8 | 8 | sega_315_5641_pcm_device::sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
9 | : upd7759_device(mconfig, SEGA_315_5641_PCM, "315-5641 PCM", tag, owner, clock, "315-5641_pcm", __FILE__) | |
9 | : upd7759_device(mconfig, SEGA_315_5641_PCM, "315-5641 PCM", tag, owner, clock, "315-5641_pcm", __FILE__) | |
10 | 10 | { |
11 | 11 | } |
12 | 12 |
r250315 | r250316 | |
---|---|---|
26 | 26 | |
27 | 27 | awacs_device::awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
28 | 28 | : device_t(mconfig, AWACS, "AWACS", tag, owner, clock, "awacs", __FILE__), |
29 | device_sound_interface(mconfig, *this) | |
29 | device_sound_interface(mconfig, *this) | |
30 | 30 | { |
31 | 31 | } |
32 | 32 |
r250315 | r250316 | |
---|---|---|
24 | 24 | |
25 | 25 | es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
26 | 26 | : pci_device(mconfig, ES1373, "Creative Labs Ensoniq AudioPCI97 ES1373", tag, owner, clock, "es1373", __FILE__), |
27 | device_sound_interface(mconfig, *this), m_stream(nullptr), | |
28 | m_eslog(nullptr), m_tempCount(0), m_timer(nullptr), m_memory_space(nullptr), m_cpu_tag(nullptr), m_cpu(nullptr), | |
27 | device_sound_interface(mconfig, *this), | |
28 | m_eslog(NULL), | |
29 | 29 | m_irq_num(-1) |
30 | 30 | { |
31 | 31 | } |
r250315 | r250316 | |
---|---|---|
14 | 14 | |
15 | 15 | esq_5505_5510_pump::esq_5505_5510_pump(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
16 | 16 | : device_t(mconfig, ESQ_5505_5510_PUMP, "ESQ_5505_5510_PUMP", tag, owner, clock, "esq_5505_5510_pump", __FILE__), |
17 | device_sound_interface(mconfig, *this), m_stream(nullptr), m_timer(nullptr), m_otis(nullptr), m_esp(nullptr), | |
18 | m_esp_halted(true), ticks_spent_processing(0), samples_processed(0) | |
17 | device_sound_interface(mconfig, *this), | |
18 | m_esp_halted(true) | |
19 | 19 | { |
20 | 20 | } |
21 | 21 |
r250315 | r250316 | |
---|---|---|
25 | 25 | |
26 | 26 | i5000snd_device::i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
27 | 27 | : device_t(mconfig, I5000_SND, "I5000", tag, owner, clock, "i5000snd", __FILE__), |
28 | device_sound_interface(mconfig, *this) | |
28 | device_sound_interface(mconfig, *this) | |
29 | 29 | { |
30 | 30 | } |
31 | 31 |
r250315 | r250316 | |
---|---|---|
19 | 19 | |
20 | 20 | ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
21 | 21 | : device_t(mconfig, ICS2115, "ICS2115", tag, owner, clock, "ics2115", __FILE__), |
22 | device_sound_interface(mconfig, *this), | |
22 | device_sound_interface(mconfig, *this), | |
23 | 23 | m_rom(*this, DEVICE_SELF), |
24 | m_irq_cb(*this) | |
24 | m_irq_cb(*this) | |
25 | 25 | { |
26 | 26 | } |
27 | 27 |
r250315 | r250316 | |
---|---|---|
19 | 19 | |
20 | 20 | k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
21 | 21 | : device_t(mconfig, K054539, "K054539 ADPCM", tag, owner, clock, "k054539", __FILE__), |
22 | device_sound_interface(mconfig, *this), flags(0), ram(nullptr), reverb_pos(0), cur_ptr(0), cur_limit(0), | |
23 | cur_zone(nullptr), rom(nullptr), rom_size(0), rom_mask(0), stream(nullptr), m_timer(nullptr), m_timer_state(0), | |
22 | device_sound_interface(mconfig, *this), | |
24 | 23 | m_timer_handler(*this), |
25 | 24 | m_rgnoverride(NULL) |
26 | 25 | { |
r250315 | r250316 | |
---|---|---|
21 | 21 | //------------------------------------------------- |
22 | 22 | |
23 | 23 | k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
24 | : device_t(mconfig, K056800, "K056800 MIRAC", tag, owner, clock, "k056800", __FILE__), | |
24 | : device_t(mconfig, K056800, "K056800 MIRAC", tag, owner, clock, "k056800", __FILE__), | |
25 | 25 | m_int_handler(*this) |
26 | 26 | { |
27 | 27 | } |
r250315 | r250316 | |
---|---|---|
6 | 6 | |
7 | 7 | struct l7a1045_voice |
8 | 8 | { |
9 | l7a1045_voice() : end(0), mode(false), | |
10 | pos(0), | |
11 | frac(0), l_volume(0), r_volume(0) | |
9 | l7a1045_voice() : | |
10 | pos(0), | |
11 | frac(0) | |
12 | 12 | { |
13 | 13 | //memset(regs, 0, sizeof(UINT32)*8); |
14 | 14 | start = 0; |
r250315 | r250316 | |
---|---|---|
12 | 12 | |
13 | 13 | mas3507d_device::mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
14 | 14 | : device_t(mconfig, MAS3507D, "MAS3507D", tag, owner, clock, "mas3507d", __FILE__), |
15 | device_sound_interface(mconfig, *this), i2c_bus_state(), i2c_bus_address(), i2c_scli(false), i2c_sclo(false), i2c_sdai(false), i2c_sdao(false), | |
16 | i2c_bus_curbit(0), i2c_bus_curval(0), i2c_subdest(), i2c_command(), i2c_bytecount(0), i2c_io_bank(0), i2c_io_adr(0), i2c_io_count(0), i2c_io_val(0) | |
15 | device_sound_interface(mconfig, *this) | |
17 | 16 | { |
18 | 17 | } |
19 | 18 |
r250315 | r250316 | |
---|---|---|
15 | 15 | |
16 | 16 | msm5232_device::msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
17 | 17 | : device_t(mconfig, MSM5232, "MSM5232", tag, owner, clock, "msm5232", __FILE__), |
18 | device_sound_interface(mconfig, *this), | |
18 | device_sound_interface(mconfig, *this), | |
19 | 19 | m_gate_handler_cb(*this) |
20 | 20 | { |
21 | 21 | } |
r250315 | r250316 | |
---|---|---|
26 | 26 | |
27 | 27 | tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
28 | 28 | : device_t(mconfig, TC8830F, "TC8830F", tag, owner, clock, "tc8830f", __FILE__), |
29 | device_sound_interface(mconfig, *this), | |
29 | device_sound_interface(mconfig, *this), | |
30 | 30 | m_playing(false), |
31 | 31 | m_address(0), |
32 | 32 | m_stop_address(0), |
r250315 | r250316 | |
37 | 37 | m_output(0), |
38 | 38 | m_command(0), |
39 | 39 | m_cmd_rw(0), |
40 | m_phrase(0) | |
40 | m_phrase(0) | |
41 | 41 | { |
42 | 42 | } |
43 | 43 |
r250315 | r250316 | |
---|---|---|
37 | 37 | upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
38 | 38 | : device_t(mconfig, UPD7752, "uPD7752", tag, owner, clock, "upd7752", __FILE__), |
39 | 39 | device_sound_interface(mconfig, *this), |
40 | device_memory_interface(mconfig, *this), m_stream(nullptr), | |
41 | m_space_config("ram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(upd7752_ram)), m_status(0), m_ram_addr(0), m_mode(0) | |
40 | device_memory_interface(mconfig, *this), | |
41 | m_space_config("ram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(upd7752_ram)) | |
42 | 42 | { |
43 | 43 | } |
44 | 44 |
r250315 | r250316 | |
---|---|---|
31 | 31 | |
32 | 32 | vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
33 | 33 | : device_t(mconfig, VRC6, "VRC6 sound", tag, owner, clock, "vrc6snd", __FILE__), |
34 | device_sound_interface(mconfig, *this) | |
34 | device_sound_interface(mconfig, *this) | |
35 | 35 | { |
36 | 36 | } |
37 | 37 |
r250315 | r250316 | |
---|---|---|
32 | 32 | |
33 | 33 | wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
34 | 34 | : device_t(mconfig, WAVE, "Wave", tag, owner, clock, "wave", __FILE__), |
35 | device_sound_interface(mconfig, *this) | |
35 | device_sound_interface(mconfig, *this) | |
36 | 36 | { |
37 | m_cassette_tag = | |
37 | m_cassette_tag = 0; | |
38 | 38 | } |
39 | 39 | |
40 | 40 | //------------------------------------------------- |
r250315 | r250316 | |
---|---|---|
343 | 343 | #undef DV |
344 | 344 | |
345 | 345 | /* 0 / 3.0 / 1.5 / 6.0 dB/OCT */ |
346 | static const UINT32 ksl_shift[4] = { 31, | |
346 | static const UINT32 ksl_shift[4] = { 31, 2, 1, 0 }; | |
347 | 347 | |
348 | 348 | |
349 | 349 | /* sustain level table (3dB per step) */ |
r250315 | r250316 | |
---|---|---|
32 | 32 | |
33 | 33 | ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
34 | 34 | : device_t(mconfig, YMZ770, "Yamaha YMZ770", tag, owner, clock, "ymz770", __FILE__), |
35 | device_sound_interface(mconfig, *this), | |
35 | device_sound_interface(mconfig, *this), | |
36 | 36 | m_cur_reg(0), |
37 | 37 | m_mute(0), |
38 | 38 | m_doen(0), |
39 | 39 | m_vlma(0), |
40 | 40 | m_bsl(0), |
41 | m_cpl(0) | |
41 | m_cpl(0) | |
42 | 42 | { |
43 | 43 | } |
44 | 44 |
r250315 | r250316 | |
---|---|---|
15 | 15 | const device_type SEGA315_5313 = &device_creator<sega315_5313_device>; |
16 | 16 | |
17 | 17 | sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
18 | : sega315_5124_device(mconfig, SEGA315_5313, "Sega 315-5313 Megadrive VDP", tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0, true, "sega315_5313", __FILE__), m_render_bitmap(nullptr), | |
19 | m_render_line(nullptr), m_render_line_raw(nullptr), m_megadriv_scanline_timer(nullptr), | |
18 | : sega315_5124_device(mconfig, SEGA315_5313, "Sega 315-5313 Megadrive VDP", tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0, true, "sega315_5313", __FILE__), | |
20 | 19 | m_sndirqline_callback(*this), |
21 | 20 | m_lv6irqline_callback(*this), |
22 | m_lv4irqline_callback(*this), m_command_pending(0), m_command_part1(0), m_command_part2(0), m_vdp_code(0), m_vdp_address(0), m_vram_fill_pending(0), m_vram_fill_length(0), m_irq4counter(0), | |
23 | m_imode_odd_frame(0), m_sprite_collision(0), m_irq6_pending(0), m_irq4_pending(0), m_scanline_counter(0), m_vblank_flag(0), m_imode(0), m_visible_scanlines(0), m_irq6_scanline(0), | |
24 | m_z80irq_scanline(0), m_total_scanlines(0), m_base_total_scanlines(0), m_framerate(0), m_vdp_pal(0), m_use_cram(0), | |
25 | m_dma_delay(0), m_regs(nullptr), m_vram(nullptr), m_cram(nullptr), m_vsram(nullptr), m_internal_sprite_attribute_table(nullptr), m_irq6_on_timer(nullptr), m_irq4_on_timer(nullptr), | |
26 | m_render_timer(nullptr), m_sprite_renderline(nullptr), m_highpri_renderline(nullptr), m_video_renderline(nullptr), m_palette_lookup(nullptr), m_palette_lookup_sprite(nullptr), | |
27 | m_palette_lookup_shadow(nullptr), m_palette_lookup_highlight(nullptr), m_space68k(nullptr), m_cpu68k(nullptr) | |
21 | m_lv4irqline_callback(*this), | |
22 | m_dma_delay(0) | |
28 | 23 | { |
29 | 24 | m_use_alt_timing = 0; |
30 | 25 | m_palwrite_base = -1; |
r250315 | r250316 | |
---|---|---|
24 | 24 | m_res_out_de_cb(*this), |
25 | 25 | m_res_out_hsync_cb(*this), |
26 | 26 | m_res_out_vsync_cb(*this), |
27 | m_res_out_vblank_cb(*this), m_horiz_char_total(0), m_horiz_disp(0), m_horiz_blank_start(0), m_horiz_blank_end(0), m_ena_vert_access(0), m_de_skew(0), m_horiz_retr_start(0), m_horiz_retr_end(0), | |
28 | m_horiz_retr_skew(0), m_vert_total(0), m_preset_row_scan(0), m_byte_panning(0), m_max_ras_addr(0), m_scan_doubling(0), m_cursor_start_ras(0), m_cursor_disable(0), m_cursor_end_ras(0), m_cursor_skew(0), | |
29 | m_disp_start_addr(0), m_cursor_addr(0), m_light_pen_addr(0), m_vert_retr_start(0), m_vert_retr_end(0), m_protect(0), m_bandwidth(0), m_vert_disp_end(0), m_offset(0), m_underline_loc(0), m_vert_blank_start(0), | |
30 | m_vert_blank_end(0), m_mode_control(0), m_line_compare(0), m_register_address_latch(0), m_cursor_state(false), m_cursor_blink_count(0), | |
31 | m_hpixels_per_column(0), m_cur(0), m_hsync(0), m_vsync(0), m_vblank(0), m_de(0), m_character_counter(0), m_hsync_width_counter(0), m_line_counter(0), m_raster_counter(0), m_vsync_width_counter(0), | |
32 | m_line_enable_ff(false), m_vsync_ff(0), m_adjust_active(0), m_line_address(0), m_cursor_x(0), m_line_timer(nullptr), m_de_off_timer(nullptr), m_cur_on_timer(nullptr), m_cur_off_timer(nullptr), | |
33 | m_hsync_on_timer(nullptr), m_hsync_off_timer(nullptr), m_light_pen_latch_timer(nullptr), m_horiz_pix_total(0), m_vert_pix_total(0), m_max_visible_x(0), m_max_visible_y(0), m_hsync_on_pos(0), | |
34 | m_hsync_off_pos(0), m_vsync_on_pos(0), m_vsync_off_pos(0), m_current_disp_addr(0), m_light_pen_latched(0), m_has_valid_parameters(false) | |
27 | m_res_out_vblank_cb(*this), | |
28 | m_hpixels_per_column(0) | |
35 | 29 | { |
36 | 30 | } |
37 | 31 |
r250315 | r250316 | |
---|---|---|
25 | 25 | |
26 | 26 | ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
27 | 27 | : device_t(mconfig, EF9340_1, "EF9340+EF9341", tag, owner, clock, "ef9340_1", __FILE__) |
28 | , device_video_interface(mconfig, *this), m_line_timer(nullptr) | |
29 | //, m_start_vpos(START_Y) | |
28 | , device_video_interface(mconfig, *this) | |
29 | //, m_start_vpos(START_Y) | |
30 | 30 | //, m_start_vblank(START_Y + SCREEN_HEIGHT) |
31 | 31 | //, m_screen_lines(LINES) |
32 | 32 | { |
r250315 | r250316 | |
---|---|---|
11 | 11 | |
12 | 12 | epic12_device::epic12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
13 | 13 | : device_t(mconfig, EPIC12, "EP1C12 Blitter", tag, owner, clock, "epic12", __FILE__), |
14 | device_video_interface(mconfig, *this), m_ram16(nullptr), m_gfx_size(0), m_bitmaps(nullptr), m_use_ram(nullptr), | |
15 | m_main_ramsize(0), m_main_rammask(0), m_maincpu(nullptr), m_ram16_copy(nullptr), m_work_queue(nullptr) | |
14 | device_video_interface(mconfig, *this) | |
16 | 15 | { |
17 | 16 | m_is_unsafe = 0; |
18 | 17 | m_delay_scale = 0; |
r250315 | r250316 | |
---|---|---|
35 | 35 | |
36 | 36 | 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) |
37 | 37 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
38 | device_video_interface(mconfig, *this, false), | |
38 | device_video_interface(mconfig, *this, false), | |
39 | 39 | // default to NTSC "704x480@30i" |
40 | 40 | m_monitor_clock(13500000), |
41 | 41 | m_hvisible(704), |
r250315 | r250316 | |
48 | 48 | m_vbackporch(525), |
49 | 49 | m_fieldcount(2), |
50 | 50 | m_sync_threshold(0.3), |
51 | m_gain(1.0 / 3.7) | |
51 | m_gain(1.0 / 3.7) | |
52 | 52 | { |
53 | 53 | } |
54 | 54 |
r250315 | r250316 | |
---|---|---|
36 | 36 | |
37 | 37 | |
38 | 38 | gf4500_device::gf4500_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
39 | : device_t(mconfig, GF4500, "NVIDIA GoForce 4500", tag, owner, clock, "gf4500", __FILE__), m_data(nullptr), m_screen_x(0), m_screen_y(0), m_screen_x_max(0), m_screen_y_max(0), m_screen_x_min(0), m_screen_y_min(0) | |
40 | { | |
39 | : device_t(mconfig, GF4500, "NVIDIA GoForce 4500", tag, owner, clock, "gf4500", __FILE__) | |
40 | { | |
41 | 41 | } |
42 | 42 | |
43 | 43 |
r250315 | r250316 | |
---|---|---|
43 | 43 | m_org_dn(0), |
44 | 44 | m_org_dpd(0), |
45 | 45 | m_cl0(0), |
46 | m_cl1(0), | |
46 | m_cl1(0), | |
47 | 47 | m_dcr(0), |
48 | 48 | m_space_config("videoram", ENDIANNESS_BIG, 16, 20, -1, NULL, *ADDRESS_MAP_NAME(h63484_vram)) |
49 | 49 | { |
r250315 | r250316 | |
---|---|---|
27 | 27 | m_vsync_changed_1_cb(*this), |
28 | 28 | m_hsync_changed_1_cb(*this), |
29 | 29 | m_read_1_cb(*this), |
30 | m_write_1_cb(*this) | |
30 | m_write_1_cb(*this) | |
31 | 31 | { |
32 | 32 | } |
33 | 33 |
r250315 | r250316 | |
---|---|---|
27 | 27 | |
28 | 28 | huc6261_device::huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
29 | 29 | : device_t(mconfig, HUC6261, "HuC6261", tag, owner, clock, "huc6261", __FILE__), |
30 | device_video_interface(mconfig, *this) | |
30 | device_video_interface(mconfig, *this) | |
31 | 31 | { |
32 | 32 | // Set up UV lookup table |
33 | 33 | for ( int ur = 0; ur < 256; ur++ ) |
r250315 | r250316 | |
---|---|---|
22 | 22 | ROM_END |
23 | 23 | |
24 | 24 | msm6222b_device::msm6222b_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) : |
25 | device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
25 | device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
26 | 26 | { |
27 | 27 | } |
28 | 28 | |
29 | 29 | msm6222b_device::msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
30 | device_t(mconfig, MSM6222B, "msm6222b-xx", tag, owner, clock, "msm6222b", __FILE__) | |
30 | device_t(mconfig, MSM6222B, "msm6222b-xx", tag, owner, clock, "msm6222b", __FILE__) | |
31 | 31 | { |
32 | 32 | } |
33 | 33 |
r250315 | r250316 | |
---|---|---|
21 | 21 | : device_t(mconfig, SCN2674_VIDEO, "Signetics SCN2674 AVDC", tag, owner, clock, "scn2674_device", __FILE__), |
22 | 22 | device_video_interface(mconfig, *this), |
23 | 23 | device_memory_interface(mconfig, *this), |
24 | m_irq_cb(*this), m_IR_pointer(0), m_screen1_l(0), m_screen1_h(0), m_cursor_l(0), m_cursor_h(0), m_screen2_l(0), m_screen2_h(0), m_irq_register(0), m_status_register(0), m_irq_mask(0), | |
25 | m_gfx_enabled(0), m_display_enabled(0), m_display_enabled_field(0), m_display_enabled_scanline(0), m_cursor_enabled(0), m_hpixels_per_column(0), m_text_hpixels_per_column(0), | |
26 | m_gfx_hpixels_per_column(0), m_IR0_double_ht_wd(0), m_IR0_scanline_per_char_row(0), m_IR0_sync_select(0), m_IR0_buffer_mode_select(0), m_IR1_interlace_enable(0), m_IR1_equalizing_constant(0), | |
27 | m_IR2_row_table(0), m_IR2_horz_sync_width(0), m_IR2_horz_back_porch(0), m_IR3_vert_front_porch(0), m_IR3_vert_back_porch(0), m_IR4_rows_per_screen(0), m_IR4_character_blink_rate_divisor(0), | |
28 | m_IR5_character_per_row(0), m_IR6_cursor_first_scanline(0), m_IR6_cursor_last_scanline(0), m_IR7_cursor_underline_position(0), m_IR7_cursor_rate_divisor(0), m_IR7_cursor_blink(0), | |
29 | m_IR7_vsync_width(0), m_IR8_display_buffer_first_address_LSB(0), m_IR9_display_buffer_first_address_MSB(0), m_IR9_display_buffer_last_address(0), m_IR10_display_pointer_address_lower(0), | |
30 | m_IR11_display_pointer_address_upper(0), m_IR11_reset_scanline_counter_on_scrollup(0), m_IR11_reset_scanline_counter_on_scrolldown(0), m_IR12_scroll_start(0), m_IR12_split_register_1(0), | |
31 | m_IR13_scroll_end(0), m_IR13_split_register_2(0), m_IR14_scroll_lines(0), m_IR14_double_1(0), m_IR14_double_2(0), m_spl1(0), m_spl2(0), m_dbl1(0), m_buffer(0), m_linecounter(0), m_address(0), | |
32 | m_start1change(0), m_irq_state(0), m_scanline_timer(nullptr), | |
24 | m_irq_cb(*this), | |
33 | 25 | m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(scn2674_vram)) |
34 | 26 | { |
35 | 27 | } |
r250315 | r250316 | |
---|---|---|
32 | 32 | ROM_END |
33 | 33 | |
34 | 34 | sed1200_device::sed1200_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) : |
35 | device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
35 | device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
36 | 36 | { |
37 | 37 | } |
38 | 38 | |
r250315 | r250316 | |
83 | 83 | if(memregion("cgrom")) |
84 | 84 | cgrom = memregion("cgrom")->base(); |
85 | 85 | else |
86 | cgrom = | |
86 | cgrom = NULL; | |
87 | 87 | |
88 | 88 | soft_reset(); |
89 | 89 | } |
r250315 | r250316 | |
---|---|---|
29 | 29 | //------------------------------------------------- |
30 | 30 | |
31 | 31 | sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
32 | device_t(mconfig, SED1520, "SED1520", tag, owner, clock, "sed1520", __FILE__), m_lcd_on(0), m_busy(0), m_page(0), m_column(0), m_old_column(0), m_start_line(0), | |
33 | m_adc(0), m_static_drive(0), m_modify_write(false), | |
34 | m_screen_update_func(nullptr) | |
32 | device_t(mconfig, SED1520, "SED1520", tag, owner, clock, "sed1520", __FILE__), | |
33 | m_screen_update_func(NULL) | |
35 | 34 | { |
36 | 35 | } |
37 | 36 |
r250315 | r250316 | |
---|---|---|
37 | 37 | //------------------------------------------------- |
38 | 38 | |
39 | 39 | t6a04_device::t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
40 | device_t(mconfig, T6A04, "T6A04", tag, owner, clock, "t6a04", __FILE__), m_busy_flag(0), m_display_on(0), m_contrast(0), m_xpos(0), m_ypos(0), m_zpos(0), m_direction(0), | |
41 | m_active_counter(0), m_word_len(0), m_opa1(0), m_opa2(0), m_output_reg(0), | |
40 | device_t(mconfig, T6A04, "T6A04", tag, owner, clock, "t6a04", __FILE__), | |
42 | 41 | m_height(0), |
43 | 42 | m_width(0) |
44 | 43 | { |
r250315 | r250316 | |
---|---|---|
360 | 360 | { |
361 | 361 | // an initial parse to capture the initial set of values |
362 | 362 | bool result; |
363 | ||
363 | ||
364 | 364 | core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); |
365 | 365 | |
366 | 366 | // keep adding slot options until we stop seeing new stuff |
r250315 | r250316 | |
---|---|---|
924 | 924 | m_base_view(NULL), |
925 | 925 | m_base_orientation(ROT0), |
926 | 926 | m_maxtexwidth(65536), |
927 | m_maxtexheight(65536), | |
928 | m_transform_primitives(true) | |
927 | m_maxtexheight(65536) | |
929 | 928 | { |
930 | 929 | // determine the base layer configuration based on options |
931 | 930 | m_base_layerconfig.set_backdrops_enabled(manager.machine().options().use_backdrops()); |
r250315 | r250316 | |
1660 | 1659 | float yoffs = (container_xform.orientation & ORIENTATION_SWAP_XY) ? container.xoffset() : container.yoffset(); |
1661 | 1660 | if (container_xform.orientation & ORIENTATION_FLIP_X) xoffs = -xoffs; |
1662 | 1661 | if (container_xform.orientation & ORIENTATION_FLIP_Y) yoffs = -yoffs; |
1663 | if (!m_transform_primitives) | |
1664 | { | |
1665 | xscale = 1.0f; | |
1666 | yscale = 1.0f; | |
1667 | xoffs = 0.0f; | |
1668 | yoffs = 0.0f; | |
1669 | } | |
1670 | 1662 | container_xform.xscale = xform.xscale * xscale; |
1671 | 1663 | container_xform.yscale = xform.yscale * yscale; |
1672 | 1664 | if (xform.no_center) |
r250315 | r250316 | |
---|---|---|
898 | 898 | void set_orientation(int orientation) { m_orientation = orientation; } |
899 | 899 | void set_view(int viewindex); |
900 | 900 | void set_max_texture_size(int maxwidth, int maxheight); |
901 | void set_transform_primitives(bool transform_primitives) { m_transform_primitives = transform_primitives; } | |
902 | 901 | |
903 | 902 | // layer config getters |
904 | 903 | bool backdrops_enabled() const { return m_layerconfig.backdrops_enabled(); } |
r250315 | r250316 | |
997 | 996 | simple_list<render_container> m_debug_containers; // list of debug containers |
998 | 997 | INT32 m_clear_extent_count; // number of clear extents |
999 | 998 | INT32 m_clear_extents[MAX_CLEAR_EXTENTS]; // array of clear extents |
1000 | bool m_transform_primitives; // determines if the primitives shall be scaled/offset by screen settings, | |
1001 | // otherwise the respective render API will handle it (default is true) | |
1002 | 999 | |
1003 | 1000 | static render_screen_list s_empty_screen_list; |
1004 | 1001 | }; |
r250315 | r250316 | |
---|---|---|
131 | 131 | vector_device::vector_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) |
132 | 132 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
133 | 133 | device_video_interface(mconfig, *this), |
134 | m_vector_list(NULL), | |
135 | m_min_intensity(255), | |
136 | m_max_intensity(0) | |
134 | m_vector_list(NULL) | |
137 | 135 | { |
138 | 136 | } |
139 | 137 | |
140 | 138 | vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
141 | 139 | : device_t(mconfig, VECTOR, "VECTOR", tag, owner, clock, "vector_device", __FILE__), |
142 | device_video_interface(mconfig, *this), | |
143 | m_vector_list(NULL), | |
144 | m_min_intensity(255), | |
145 | m_max_intensity(0) | |
140 | device_video_interface(mconfig, *this), | |
141 | m_vector_list(NULL) | |
146 | 142 | { |
147 | 143 | } |
148 | 144 | |
r250315 | r250316 | |
225 | 221 | { |
226 | 222 | point *newpoint; |
227 | 223 | |
228 | intensity = MAX(0, MIN(255, intensity)); | |
224 | if (intensity > 255) | |
225 | { | |
226 | intensity = 255; | |
227 | } | |
229 | 228 | |
230 | m_min_intensity = intensity > 0 ? MIN(m_min_intensity, intensity) : m_min_intensity; | |
231 | m_max_intensity = intensity > 0 ? MAX(m_max_intensity, intensity) : m_max_intensity; | |
232 | ||
233 | 229 | if (m_flicker && (intensity > 0)) |
234 | 230 | { |
235 | 231 | float random = (float)(machine().rand() & 255) / 255.0f; // random value between 0.0 and 1.0 |
236 | 232 | |
237 | 233 | intensity -= (int)(intensity * random * m_flicker); |
238 | ||
239 | intensity = MAX(0, MIN(255, intensity)); | |
234 | if (intensity < 0) | |
235 | { | |
236 | intensity = 0; | |
237 | } | |
238 | if (intensity > 255) | |
239 | { | |
240 | intensity = 255; | |
241 | } | |
240 | 242 | } |
241 | 243 | |
242 | 244 | newpoint = &m_vector_list[m_vector_index]; |
r250315 | r250316 | |
332 | 334 | } |
333 | 335 | else |
334 | 336 | { |
335 | float beam_intensity_width = m_beam_width_min; | |
336 | ||
337 | 337 | float intensity = (float)curpoint->intensity / 255.0f; |
338 | float intensity_weight = normalized_sigmoid(intensity, m_beam_intensity_weight); | |
338 | 339 | |
339 | // check for dynamic intensity | |
340 | if (m_min_intensity != m_max_intensity) | |
341 | { | |
342 | float intensity_weight = normalized_sigmoid(intensity, m_beam_intensity_weight); | |
343 | beam_intensity_width = (m_beam_width_max - m_beam_width_min) * intensity_weight + m_beam_width_min; | |
344 | } | |
345 | ||
340 | float beam_intensity_width = (m_beam_width_max - m_beam_width_min) * intensity_weight + m_beam_width_min; | |
346 | 341 | float beam_width = beam_intensity_width * (1.0f / (float)VECTOR_WIDTH_DENOM); |
347 | 342 | |
348 | 343 | coords.x0 = ((float)lastx - xoffs) * xscale; |
r250315 | r250316 | |
---|---|---|
67 | 67 | static float m_beam_intensity_weight; |
68 | 68 | point *m_vector_list; |
69 | 69 | static int m_vector_index; |
70 | int m_min_intensity; | |
71 | int m_max_intensity; | |
72 | 70 | |
73 | 71 | float normalized_sigmoid(float n, float k); |
74 | 72 | }; |
r250315 | r250316 | |
---|---|---|
249 | 249 | { |
250 | 250 | UINT64 size; |
251 | 251 | size = floppy_image_size(floppy); |
252 | *vote = ( | |
252 | *vote = (size == APPLE2_TRACK_COUNT * APPLE2_SECTOR_COUNT * APPLE2_NIBBLE_SIZE) ? 100 : 0; | |
253 | 253 | return FLOPPY_ERROR_SUCCESS; |
254 | 254 | } |
255 | 255 | |
r250315 | r250316 | |
264 | 264 | |
265 | 265 | static floperr_t apple2_nib_read_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, void *buffer, size_t buflen) |
266 | 266 | { |
267 | if ((head != 0) || (track < 0) || (track > APPLE2_TRACK_COUNT)) | |
267 | if ((head != 0) || (track < 0) || (track >= APPLE2_TRACK_COUNT)) | |
268 | 268 | return FLOPPY_ERROR_SEEKERROR; |
269 | 269 | if (offset != 0) |
270 | 270 | return FLOPPY_ERROR_UNSUPPORTED; |
r250315 | r250316 | |
276 | 276 | |
277 | 277 | static floperr_t apple2_nib_write_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, const void *buffer, size_t buflen) |
278 | 278 | { |
279 | if ((head != 0) || (track < 0) || (track > APPLE2_TRACK_COUNT)) | |
279 | if ((head != 0) || (track < 0) || (track >= APPLE2_TRACK_COUNT)) | |
280 | 280 | return FLOPPY_ERROR_SEEKERROR; |
281 | 281 | if (offset != 0) |
282 | 282 | return FLOPPY_ERROR_UNSUPPORTED; |
r250315 | r250316 | |
---|---|---|
5149 | 5149 | pclub2v3 // 1999.03 Print Club 2 Vol. 3 |
5150 | 5150 | sanjeon // 1999.04 Sanjun Sujun (Sega / Deniam) |
5151 | 5151 | danchih // 1999.06 Danchi de Hanafuda Okusan Komeya Desuyo! (Altron (Tecmo License)) |
5152 | ffrevng10 // 1999.09 Final Fight Revenge (Capcom) (V1.000) | |
5153 | ffreveng // 1999.09 Final Fight Revenge (Capcom) (V1.100) | |
5152 | ffreveng // 1999.09 Final Fight Revenge (Capcom) | |
5154 | 5153 | pclubpok // 1999.11 Print Club Pokemon |
5155 | 5154 | pclubor // 1999.11 Print Club Goukakenran |
5156 | 5155 | danchiq // 2000.12 Danchi de Quiz Okusan Yontaku Desuyo! (Altron) |
r250315 | r250316 | |
5517 | 5516 | // 1999.?? Tokio Bus Guide |
5518 | 5517 | // 1999.?? Tokio Bus Guide (Rev A) |
5519 | 5518 | vtennisg // 1999.?? Virtua Tennis / Power Smash (GD-ROM) |
5520 | totdo // 1999.?? The Typing of the Dead | |
5521 | 5519 | 18wheelr // 2000.01 18 Wheeler Deluxe (Rev A) |
5522 | 5520 | 18wheels // 2000.01 18 Wheeler (Standard) |
5523 | 5521 | 18wheelu // 2000.01 18 Wheeler (Upright) |
r250315 | r250316 | |
11339 | 11337 | pokerdub // 198?, Unknown |
11340 | 11338 | pokerduc // 198?, Unknown |
11341 | 11339 | bchancep // 198?, Unknown |
11342 | bchanceq // 198?, Unknown | |
11343 | 11340 | pokermon // 1987, Unknown |
11344 | 11341 | pokersis // 198?, Sisteme France. |
11345 | 11342 | super98 // 199?, Unknown |
r250315 | r250316 | |
---|---|---|
655 | 655 | MCFG_SCREEN_VISIBLE_AREA(522, 1566, 394, 1182) |
656 | 656 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
657 | 657 | |
658 | MCFG_DEVICE_ADD("dvg", DVG, | |
658 | MCFG_DEVICE_ADD("dvg", DVG, 0) | |
659 | 659 | MCFG_AVGDVG_VECTOR("vector") |
660 | 660 | |
661 | 661 | /* sound hardware */ |
r250315 | r250316 | |
1019 | 1019 | * |
1020 | 1020 | *************************************/ |
1021 | 1021 | |
1022 | GAME( 1979, asteroid, 0, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 4)", MACHINE_SUPPORTS_SAVE ) | |
1023 | GAME( 1979, asteroid2, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
1024 | GAME( 1979, asteroid1, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 1)", MACHINE_SUPPORTS_SAVE ) | |
1025 | GAME( 1979, asteroidb, asteroid, asteroid, asteroidb, asteroid_state, asteroidb, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)", MACHINE_SUPPORTS_SAVE ) | |
1026 | GAME( 1980, aerolitos, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "bootleg (Rodmar Elec.)", "Aerolitos (Spanish bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) // 'Aerolitos' appears on the cabinet, this was distributed in Spain, the Spanish text is different to that contained in the original version (corrected) | |
1027 | GAME( 1979, asterock, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Sidam)", "Asterock (Sidam bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1028 | GAME( 1979, asterockv, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Videotron)", "Asterock (Videotron bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1029 | GAME( 1979, meteorts, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (VGG)", "Meteorites (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1030 | GAME( 1979, meteorho, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (Hoei)", "Meteor (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1031 | GAME( 1979, hyperspc, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (Rumiano)", "Hyperspace (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1022 | GAME( 1979, asteroid, 0, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 4)", MACHINE_SUPPORTS_SAVE ) | |
1023 | GAME( 1979, asteroid2, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
1024 | GAME( 1979, asteroid1, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 1)", MACHINE_SUPPORTS_SAVE ) | |
1025 | GAME( 1979, asteroidb, asteroid, asteroid, asteroidb, asteroid_state, asteroidb, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)", MACHINE_SUPPORTS_SAVE ) | |
1026 | GAME( 1980, aerolitos, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "bootleg (Rodmar Elec.)","Aerolitos (Spanish bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) // 'Aerolitos' appears on the cabinet, this was distributed in Spain, the Spanish text is different to that contained in the original version (corrected) | |
1027 | GAME( 1979, asterock, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Sidam)", "Asterock (Sidam bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1028 | GAME( 1979, asterockv, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Videotron)", "Asterock (Videotron bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1029 | GAME( 1979, meteorts, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (VGG)", "Meteorites (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1030 | GAME( 1979, meteorho, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (Hoei)", "Meteor (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1031 | GAME( 1979, hyperspc, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "bootleg (Rumiano)", "Hyperspace (bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) | |
1032 | 1032 | |
1033 | GAMEL(1980, astdelux, 0, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 3)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1034 | GAMEL(1980, astdelux2, astdelux, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 2)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1035 | GAMEL(1980, astdelux1, astdelux, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 1)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1033 | GAMEL(1980, astdelux, 0, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 3)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1034 | GAMEL(1980, astdelux2, astdelux, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 2)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1035 | GAMEL(1980, astdelux1, astdelux, astdelux, astdelux, driver_device, 0, ROT0, "Atari", "Asteroids Deluxe (rev 1)", MACHINE_SUPPORTS_SAVE, layout_astdelux ) | |
1036 | 1036 | |
1037 | GAME( 1979, llander, 0, llander, llander, driver_device, 0, ROT0, "Atari", "Lunar Lander (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
1038 | GAME( 1979, llander1, llander, llander, llander1, driver_device, 0, ROT0, "Atari", "Lunar Lander (rev 1)", MACHINE_SUPPORTS_SAVE ) | |
1039 | GAME( 1979, llandert, llander, llander, llandert, driver_device, 0, ROT0, "Atari", "Lunar Lander (screen test)", MACHINE_SUPPORTS_SAVE ) // no copyright shown, assume it's an in-house diagnostics romset (PCB came from a seller that has had Atari prototypes in his possession before) | |
1037 | GAME( 1979, llander, 0, llander, llander, driver_device, 0, ROT0, "Atari", "Lunar Lander (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
1038 | GAME( 1979, llander1, llander, llander, llander1, driver_device, 0, ROT0, "Atari", "Lunar Lander (rev 1)", MACHINE_SUPPORTS_SAVE ) | |
1039 | GAME( 1979, llandert, llander, llander, llandert, driver_device, 0, ROT0, "Atari", "Lunar Lander (screen test)", MACHINE_SUPPORTS_SAVE ) // no copyright shown, assume it's an in-house diagnostics romset (PCB came from a seller that has had Atari prototypes in his possession before) |
r250315 | r250316 | |
---|---|---|
745 | 745 | MCFG_SCREEN_VISIBLE_AREA(0, 480, 0, 440) |
746 | 746 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
747 | 747 | |
748 | MCFG_DEVICE_ADD("avg", AVG, | |
748 | MCFG_DEVICE_ADD("avg", AVG, 0) | |
749 | 749 | MCFG_AVGDVG_VECTOR("vector") |
750 | 750 | |
751 | 751 | /* sound hardware */ |
r250315 | r250316 | |
1062 | 1062 | GAME( 1980, spacduel, 0, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 2)", MACHINE_SUPPORTS_SAVE ) |
1063 | 1063 | GAME( 1980, spacduel1,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (version 1)", MACHINE_SUPPORTS_SAVE ) |
1064 | 1064 | GAME( 1980, spacduel0,spacduel, spacduel, spacduel, driver_device, 0, ROT0, "Atari", "Space Duel (prototype)", MACHINE_SUPPORTS_SAVE ) |
1065 | GAME( 1982, bwidow, 0, bwidow, bwidow, driver_device, 0, ROT0, "Atari", "Black Widow", MACHINE_SUPPORTS_SAVE ) | |
1066 | GAME( 1982, bwidowp, bwidow, bwidowp, bwidow, driver_device, 0, ROT0, "Atari", "Black Widow (prototype)", MACHINE_NOT_WORKING ) | |
1065 | GAME( 1982, bwidow, 0, bwidow, bwidow, driver_device, 0, ROT0, "Atari", "Black Widow", MACHINE_SUPPORTS_SAVE ) | |
1066 | GAME( 1982, bwidowp, bwidow, bwidowp, bwidow, driver_device, 0, ROT0, "Atari", "Black Widow (prototype)", MACHINE_NOT_WORKING ) | |
1067 | 1067 | GAME( 1982, gravitar, 0, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 3)", MACHINE_SUPPORTS_SAVE ) |
1068 | 1068 | GAME( 1982, gravitar2,gravitar, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 2)", MACHINE_SUPPORTS_SAVE ) |
1069 | 1069 | GAME( 1982, gravitar1,gravitar, gravitar, gravitar, driver_device, 0, ROT0, "Atari", "Gravitar (version 1)", MACHINE_SUPPORTS_SAVE ) |
r250315 | r250316 | |
---|---|---|
546 | 546 | MCFG_SCREEN_VISIBLE_AREA(0, 580, 0, 400) |
547 | 547 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
548 | 548 | |
549 | MCFG_DEVICE_ADD("avg", AVG_BZONE, | |
549 | MCFG_DEVICE_ADD("avg", AVG_BZONE, 0) | |
550 | 550 | MCFG_AVGDVG_VECTOR("vector") |
551 | 551 | |
552 | 552 | /* Drivers */ |
r250315 | r250316 | |
875 | 875 | * |
876 | 876 | *************************************/ |
877 | 877 | |
878 | GAMEL( 1980, bzone, 0, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (rev 2)", MACHINE_SUPPORTS_SAVE, layout_bzone ) | |
879 | GAMEL( 1980, bzonea, bzone, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (rev 1)", MACHINE_SUPPORTS_SAVE, layout_bzone ) | |
880 | GAMEL( 1980, bzonec, bzone, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (cocktail)", MACHINE_SUPPORTS_SAVE|MACHINE_NO_COCKTAIL, layout_bzone ) | |
881 | GAME ( 1980, bradley, 0, bzone, bradley, bzone_state, bradley, ROT0, "Atari", "Bradley Trainer", MACHINE_SUPPORTS_SAVE ) | |
882 | GAMEL( 1980, redbaron, 0, redbaron, redbaron, driver_device, 0, ROT0, "Atari", "Red Baron (Revised Hardware)", MACHINE_SUPPORTS_SAVE, layout_redbaron ) | |
883 | GAMEL( 1980, redbarona, redbaron, redbaron, redbaron, driver_device, 0, ROT0, "Atari", "Red Baron", MACHINE_SUPPORTS_SAVE, layout_redbaron ) | |
878 | GAMEL(1980, bzone, 0, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (rev 2)", MACHINE_SUPPORTS_SAVE, layout_bzone ) | |
879 | GAMEL(1980, bzonea, bzone, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (rev 1)", MACHINE_SUPPORTS_SAVE, layout_bzone ) | |
880 | GAMEL(1980, bzonec, bzone, bzone, bzone, driver_device, 0, ROT0, "Atari", "Battle Zone (cocktail)", MACHINE_SUPPORTS_SAVE|MACHINE_NO_COCKTAIL, layout_bzone ) | |
881 | GAME( 1980, bradley, 0, bzone, bradley, bzone_state, bradley, ROT0, "Atari", "Bradley Trainer", MACHINE_SUPPORTS_SAVE ) | |
882 | GAMEL(1980, redbaron, 0, redbaron, redbaron, driver_device, 0, ROT0, "Atari", "Red Baron (Revised Hardware)", MACHINE_SUPPORTS_SAVE, layout_redbaron ) | |
883 | GAMEL(1980, redbarona, redbaron, redbaron, redbaron, driver_device, 0, ROT0, "Atari", "Red Baron", MACHINE_SUPPORTS_SAVE, layout_redbaron ) |
r250315 | r250316 | |
---|---|---|
127 | 127 | * "Unknown French poker game", 198?, Unknown. |
128 | 128 | * "Unknown encrypted poker game", 198?, Unknown. |
129 | 129 | * "Unknown Sisteme France Poker", 198?, Sisteme France. |
130 | * Bonne Chance! (Golden Poker prequel HW, set 1), 198?, Unknown. | |
131 | * Bonne Chance! (Golden Poker prequel HW, set 2), 198?, Unknown. | |
130 | * Bonne Chance! (Golden Poker prequel hardware), 198?, Unknown. | |
132 | 131 | * Mundial/Mondial (Italian/French), 1987, Unknown. |
133 | 132 | * Super 98 (3-hands, ICP-1), 199?, Unknown. |
134 | 133 | |
r250315 | r250316 | |
10014 | 10013 | ROM_LOAD( "bchancep_bp.bin", 0x0000, 0x0100, CRC(70fe1582) SHA1(118c743d445a37ad760e4163b61c3c562d7adda6) ) |
10015 | 10014 | ROM_END |
10016 | 10015 | |
10017 | ROM_START( bchanceq ) | |
10018 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
10019 | ROM_LOAD( "pok4-5.014", 0x4000, 0x4000, CRC(92f1f515) SHA1(f79ab453458f71d7e62e895d04a2d6161dbf2aad) ) | |
10020 | ||
10021 | ROM_REGION( 0x1800, "gfx1", 0 ) | |
10022 | ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */ | |
10023 | ROM_LOAD( "pok3.014", 0x1000, 0x0800, CRC(fb00e263) SHA1(879660bc3a3eb3d41f80741b157cdefaa7bd9a18) ) /* char ROM, different cardback logo */ | |
10024 | ||
10025 | ROM_REGION( 0x1800, "gfx2", 0 ) | |
10026 | ROM_LOAD( "pok0.014", 0x0000, 0x0800, CRC(124f131f) SHA1(35b18d1d6b0146ecc5b52f3222a270c6b868742a) ) /* cards deck gfx, bitplane1 */ | |
10027 | ROM_LOAD( "pok1.014", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */ | |
10028 | ROM_LOAD( "pok2.014", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */ | |
10029 | ||
10030 | ROM_REGION( 0x0100, "proms", 0 ) | |
10031 | ROM_LOAD( "82s129.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) | |
10032 | ROM_END | |
10033 | ||
10034 | 10016 | /* |
10035 | 10017 | |
10036 | 10018 | PCB marked "MONDIAL" |
r250315 | r250316 | |
10677 | 10659 | GAMEL( 198?, superdbl, pottnpkr, goldnpkr, goldnpkr, driver_device, 0, ROT0, "Karateco", "Super Double (French)", 0, layout_goldnpkr ) |
10678 | 10660 | GAME( 198?, pokerdub, 0, pottnpkr, goldnpkr, driver_device, 0, ROT0, "<unknown>", "unknown French poker game", MACHINE_NOT_WORKING ) // lacks of 2nd program ROM. |
10679 | 10661 | GAME( 198?, pokerduc, 0, goldnpkr, goldnpkr, goldnpkr_state, icp1db, ROT0, "<unknown>", "unknown encrypted poker game", MACHINE_NOT_WORKING ) // encrypted. |
10680 | GAME( 198?, pokersis, 0, bchancep, goldnpkr, driver_device, 0, ROT0, "Sisteme France", "unknown Sisteme France Poker", MACHINE_NOT_WORKING ) // fix banking (4 prgs?)... | |
10681 | 10662 | |
10682 | GAMEL( 198?, bchancep, 0, bchancep, goldnpkr, goldnpkr_state, bchancep, ROT0, "<unknown>", "Bonne Chance! (Golden Poker prequel HW, set 1)", MACHINE_NOT_WORKING, layout_goldnpkr ) | |
10683 | GAMEL( 198?, bchanceq, 0, goldnpkr, goldnpkr, driver_device, 0, ROT0, "<unknown>", "Bonne Chance! (Golden Poker prequel HW, set 2)", MACHINE_NOT_WORKING, layout_goldnpkr ) | |
10684 | ||
10663 | GAMEL( 198?, bchancep, 0, bchancep, goldnpkr, goldnpkr_state, bchancep, ROT0, "<unknown>", "Bonne Chance! (Golden Poker prequel HW)", MACHINE_NOT_WORKING, layout_goldnpkr ) | |
10685 | 10664 | GAME( 1987, pokermon, 0, mondial, mondial, driver_device, 0, ROT0, "<unknown>", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program |
10665 | GAME( 198?, pokersis, 0, bchancep, goldnpkr, driver_device, 0, ROT0, "Sisteme France", "unknown Sisteme France Poker", MACHINE_NOT_WORKING ) // fix banking (4 prgs?)... | |
10666 | ||
10686 | 10667 | GAME( 1998, super98, bsuerte, witchcrd, super98, driver_device, 0, ROT0, "<unknown>", "Super 98 (3-hands, ICP-1)", MACHINE_NOT_WORKING ) // program checks zeropage registers for changes... |
r250315 | r250316 | |
---|---|---|
3 | 3 | /* |
4 | 4 | --------------------------- |
5 | 5 | Marine Date by TAITO (1981) |
6 | MAME driver by insideoutboy | |
7 | --------------------------- | |
8 | a static underwater scene with obstacles in it, like seaweed, | |
6 | --------------------------- | |
7 | ||
8 | Location Device File ID Checksum | |
9 | --------------------------------------------- | |
10 | LB 3D 2716 MG01 BB4B | |
11 | LB 4D 2716 MG02 89B3 | |
12 | LB 5D 2716 MG03 A5CE | |
13 | LB 6D 2716 MG04 CE20 | |
14 | LB 7D 2716 MG05 16B9 | |
15 | LB 9D 2716 MG06 39A9 | |
16 | LB 10D 2716 MG07 B7F1 | |
17 | LB 1F 2716 MG09 9934 | |
18 | LB 3F 2716 MG10 F185 | |
19 | LB 4F 2716 MG11 1603 | |
20 | MB 6C 2532 MG12 66C3 | |
21 | MB 6H 2532 MG13 23E2 | |
22 | MB 2A 82S123 MG14.BPR 1CB1 | |
23 | MB 1A 82S123 MG15.BPR 1471 | |
24 | MB 4E 82S123 MG16.BPR 0570 | |
25 | TB 5F 82S123 MG17.BPR 129B | |
26 | ||
27 | ||
28 | Notes: TB - Top PCB MG070001 MGN00001 | |
29 | MB - Middle PCB MG070002 MGN00002 | |
30 | LB - Lower PCB AA017779 MGN00002 | |
31 | ||
32 | ||
33 | Brief Hardware Overview | |
34 | ----------------------- | |
35 | ||
36 | Main processor - Z80 2.5MHz | |
37 | ||
38 | Sound - Discrete audio, like Space Invaders | |
39 | ||
40 | ------------------------------------------------------------------------- | |
41 | ||
42 | a static underwater scence with obstacles in it, like seaweed, | |
9 | 43 | crabs and other stuff. You have a limited number of "strokes" |
10 | 44 | per screen as well as a timer to work against. Your goal is |
11 | 45 | to *bounce* yourself around the screen using *Strokes* on the |
12 | trackball to try to reach a *female* octopus before you run out | |
46 | trackball to try to reach a *female* octopus before your run out | |
13 | 47 | of strokes or time. You sort of bounce yourself around the screen |
14 | 48 | like a billiard ball would bounce, but once in a while bubbles |
15 | 49 | and other stuff will come up from underneath you and carry you |
16 | 50 | away from where you are trying to get. When you reach your goal |
17 | 51 | you get another more difficult screen, etc. |
18 | 52 | |
19 | ------------------------------------------------------------------------- | |
53 | I think it was manufactured by Taito, I'm not sure but I seem to | |
54 | recall that it was a full blown Japanese machine. | |
20 | 55 | |
21 | Marine Date | |
22 | Taito 1981 | |
23 | 56 | |
24 | PCB Layout | |
25 | ---------- | |
26 | ||
27 | Top board | |
28 | ||
29 | MGO70001 | |
30 | MGN00001 | |
31 | |---------------------------------------------| | |
32 | | VOL VR1 VR2 VR3 VR4 VR5 VR6 VR7 | | |
33 | | LM3900 LM3900 LM3900 LM3900 LM3900 LM3900 |-| | |
34 | |MB3712 |P| | |
35 | | 4006 LM3900 LM3900 LM3900 | | | |
36 | |2 4030 |-| | |
37 | |2 | | |
38 | |W DSW(8) | | |
39 | |A |-| | |
40 | |Y HD14584 NE555 MG17 DSW(8) |Q| | |
41 | | | | | |
42 | | HD14584 |-| | |
43 | | HD14584 | | |
44 | |---------------------------------------------| | |
45 | Notes: (PCB contains lots of resistors/caps/transistors etc) | |
46 | MG17 - 82S123 bipolar PROM (no location on PCB) | |
47 | MB3712 - Hitachi MB3712 Audio Power Amplifier | |
48 | LM3900 - Texas Instruments LM3900 Quad Operational Amplifier | |
49 | HD14584 - Hitachi HD14584 Hex schmitt Trigger | |
50 | NE555 - NE555 Timer | |
51 | 4006 - RCA CD4006 18-Stage Static Register | |
52 | 4030 - RCA CD4030 Quad Exclusive-Or Gate | |
53 | VR* - Volume pots for each sound | |
54 | VOL - Master Volume pot | |
55 | ||
56 | ||
57 | Middle board | |
58 | ||
59 | MGO70002 | |
60 | MGN00002 | |
61 | |---------------------------------------------| | |
62 | | MG15.1A | | |
63 | |-| MG14.2A |-| | |
64 | |S| |Q| | |
65 | | | | | | |
66 | |-| MG16.4E |-| | |
67 | | | | |
68 | | | | |
69 | |-| MG13.6H MG12.6C |-| | |
70 | |R| |P| | |
71 | | | PC3259 | | | |
72 | |-| PC3259 |-| | |
73 | | | | |
74 | |---------------------------------------------| | |
75 | Notes: | |
76 | MG12/13 - Hitachi HN462532 4kx8 EPROM | |
77 | MG14/15/16 - 82S123 bipolar PROM | |
78 | PC3259 - PC3259 8025 H08 unknown DIP24 IC. Package design indicates it was manufactured by Fujitsu | |
79 | ||
80 | ||
81 | Lower board | |
82 | ||
83 | AA017779 | |
84 | sticker: MGN00003 | |
85 | sticker: CLN00002 | |
86 | |---------------------------------------------| | |
87 | | 9.987MHz 2114 | | |
88 | |-| 2114 | | |
89 | |R| MG07.10D 2114 | | |
90 | | | MG06.9D 2114 | | |
91 | |-| 2114 1| | |
92 | | MG05.7D 8|Edge | |
93 | | MG04.6D W|Connector 'T' | |
94 | |-| MG03.5D A| | |
95 | |S| MG02.4D Y| | |
96 | | | MG01.3D MG09.4F | | |
97 | |-| MG10.3F | | |
98 | | Z80 MG11.1F | | |
99 | |---------------------------------------------| | |
100 | Notes: | |
101 | Z80 - Clock 2.49675MHz [9.987/4] | |
102 | 2114 - 1kx4 SRAM | |
103 | All EPROMs are 2716 | |
104 | Wire jumpers for ROM configuration - J1 open | |
105 | J2 1-2, 3-9, 4-8, 5-7 | |
106 | J4 1-2, 4-5, 7-8, 10-11 | |
107 | ||
108 | Top and Middle PCBs are plugged in with the solder-sides together. | |
109 | Lower PCB is plugged in with components facing up. | |
110 | ------------------------------------------------------------------------- | |
111 | ||
112 | 57 | todo: |
113 | 58 | in cocktail mopde p1 is flipped |
114 | 59 | after inking the shark on the far right octi was moved to goal? |
115 | 60 | for the colours, goal has to be black otherwise it would register |
116 | as a hit, is goal pen 0 or 6? | |
61 | qas a hit, is goal pen 0 or 6? | |
117 | 62 | rom writes when finishing a game |
118 | 63 | worth looking at before the collision is correct? |
119 | 64 | playing dot hit when eaten by a shark? |
r250315 | r250316 | |
122 | 67 | tilemap |
123 | 68 | palette may only be around 4 colours |
124 | 69 | is 14 the palette? |
125 | how do you know if you've got an | |
70 | how do you know if you've got an ink left? | |
126 | 71 | prom 14 is the top bits? 4 bpp? or so? |
127 | 72 | why is level 37 chosen? |
128 | 73 | should it be 30fps? |
r250315 | r250316 | |
144 | 89 | done: |
145 | 90 | timer? |
146 | 91 | you get 200 for each shot, don't think it's actually a timer |
147 | have I been using x/y consistently, i.e. non rotated or rotated origin? | |
148 | yes, seems to be best using xy raw (i.e. non-rotated) | |
92 | have i been using x/y consistently, ie non rotated or rotated origin? | |
93 | yes, seems to be best using xy raw (ie non-rotated) | |
149 | 94 | p2 ink doesn't always light up in test mode |
150 | 95 | after p1 ink pressed, p2 ink doesn't light up |
151 | 96 | this is correct behavior if DSW set as Upright mode |
r250315 | r250316 | |
245 | 190 | } |
246 | 191 | |
247 | 192 | //are these returning only during a collision? |
248 | //I'd imagine they are returning the pf char where the collision took place? | |
249 | //what about where there is lots of collisions? | |
193 | //id imagine they are returning the pf char where the collission took place? | |
194 | //what about where there is lots of colls? | |
250 | 195 | //maybe the first on a scanline basis |
251 | 196 | READ8_MEMBER(marinedt_state::marinedt_obj1_x_r) |
252 | 197 | { |
r250315 | r250316 | |
453 | 398 | PORT_DIPSETTING( 0x01, "5000" ) |
454 | 399 | PORT_DIPSETTING( 0x00, "10000" ) |
455 | 400 | //cheat? |
456 | PORT_DIPNAME( 0x02, 0x00, "ignore internal bounce?" ) //maybe die | |
401 | PORT_DIPNAME( 0x02, 0x00, "ignore internal bounce?" ) //maybe die/bounce of rocks/coral? | |
457 | 402 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
458 | 403 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
459 | 404 | //freezes the game before the reset |
460 | //doesn't seem to be done as a dip, but what about mixing with dips like this? | |
405 | //doesn't seem to be done as a dip, but what about mixing with diops like this? | |
461 | 406 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) |
462 | 407 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
463 | 408 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
r250315 | r250316 | |
761 | 706 | |
762 | 707 | ROM_START( marinedt ) |
763 | 708 | ROM_REGION( 0x10000, "maincpu", 0 ) |
764 | ROM_LOAD( "mg01.3d", 0x0000, 0x0800, CRC(ad09f04d) SHA1(932fc973b4a2fbbebd7e6437ed30c8444e3d4afb)) | |
765 | ROM_LOAD( "mg02.4d", 0x0800, 0x0800, CRC(555a2b0f) SHA1(143a8953ce5070c31dc4c1f623833b2a5a2cf657)) | |
766 | ROM_LOAD( "mg03.5d", 0x1000, 0x0800, CRC(2abc79b3) SHA1(1afb331a2c0e320b6d026bc5cb47a53ac3356c2a)) | |
767 | ROM_LOAD( "mg04.6d", 0x1800, 0x0800, CRC(be928364) SHA1(8d9ae71e2751c009187e41d84fbad9519ab551e1) ) | |
768 | ROM_LOAD( "mg05.7d", 0x2000, 0x0800, CRC(44cd114a) SHA1(833165c5c00c6e505acf29fef4a3ae3f9647b443) ) | |
769 | ROM_LOAD( "mg06.9d", 0x2800, 0x0800, CRC(a7e2c69b) SHA1(614fc479d13c1726382fe7b4b0379c1dd4915af0) ) | |
770 | ROM_LOAD( "mg07.10d", 0x3000, 0x0800, CRC(b85d1f9a) SHA1(4fd3e76b1816912df84477dba4655d395f5e7072) ) | |
709 | ROM_LOAD( "mg01", 0x0000, 0x0800, CRC(ad09f04d) SHA1(932fc973b4a2fbbebd7e6437ed30c8444e3d4afb)) | |
710 | ROM_LOAD( "mg02", 0x0800, 0x0800, CRC(555a2b0f) SHA1(143a8953ce5070c31dc4c1f623833b2a5a2cf657)) | |
711 | ROM_LOAD( "mg03", 0x1000, 0x0800, CRC(2abc79b3) SHA1(1afb331a2c0e320b6d026bc5cb47a53ac3356c2a)) | |
712 | ROM_LOAD( "mg04", 0x1800, 0x0800, CRC(be928364) SHA1(8d9ae71e2751c009187e41d84fbad9519ab551e1) ) | |
713 | ROM_LOAD( "mg05", 0x2000, 0x0800, CRC(44cd114a) SHA1(833165c5c00c6e505acf29fef4a3ae3f9647b443) ) | |
714 | ROM_LOAD( "mg06", 0x2800, 0x0800, CRC(a7e2c69b) SHA1(614fc479d13c1726382fe7b4b0379c1dd4915af0) ) | |
715 | ROM_LOAD( "mg07", 0x3000, 0x0800, CRC(b85d1f9a) SHA1(4fd3e76b1816912df84477dba4655d395f5e7072) ) | |
771 | 716 | |
772 | 717 | ROM_REGION( 0x1800, "gfx1", 0 ) |
773 | ROM_LOAD( "mg09.4f", 0x0000, 0x0800, CRC(f4c349ca) SHA1(077f65eeac616a778d6c42bb95677fa2892ab697) ) | |
774 | ROM_LOAD( "mg10.3f", 0x0800, 0x0800, CRC(b41251e3) SHA1(e125a971b401c78efeb4b03d0fab43e392d3fc14) ) | |
775 | ROM_LOAD( "mg11.1f", 0x1000, 0x0800, CRC(50d66dd7) SHA1(858d1d2a75e091b0e382d964c5e4ddcd8e6f07dd)) | |
718 | ROM_LOAD( "mg09", 0x0000, 0x0800, CRC(f4c349ca) SHA1(077f65eeac616a778d6c42bb95677fa2892ab697) ) | |
719 | ROM_LOAD( "mg10", 0x0800, 0x0800, CRC(b41251e3) SHA1(e125a971b401c78efeb4b03d0fab43e392d3fc14) ) | |
720 | ROM_LOAD( "mg11", 0x1000, 0x0800, CRC(50d66dd7) SHA1(858d1d2a75e091b0e382d964c5e4ddcd8e6f07dd)) | |
776 | 721 | |
777 | 722 | ROM_REGION( 0x1000, "gfx2", 0 ) |
778 | ROM_LOAD( "mg12 | |
723 | ROM_LOAD( "mg12", 0x0000, 0x1000, CRC(7c6486d5) SHA1(a7f17a803937937f05fc90621883a0fd44b297a0) ) | |
779 | 724 | |
780 | 725 | ROM_REGION( 0x1000, "gfx3", 0 ) |
781 | ROM_LOAD( "mg13 | |
726 | ROM_LOAD( "mg13", 0x0000, 0x1000, CRC(17817044) SHA1(8c9b96620e3c414952e6d85c6e81b0df85c88e7a) ) | |
782 | 727 | |
783 | 728 | ROM_REGION( 0x0080, "proms", 0 ) |
784 | ROM_LOAD( "mg14.2a", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) ) //char clr | |
785 | ROM_LOAD( "mg15.1a", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) ) //obj clr | |
786 | ROM_LOAD( "mg16.4e", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) ) //?? collisions | |
729 | ROM_LOAD( "mg14.bpr", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) ) //char clr | |
730 | ROM_LOAD( "mg15.bpr", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) ) //obj clr | |
731 | ROM_LOAD( "mg16.bpr", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) ) //?? collisions | |
787 | 732 | ROM_LOAD( "mg17.bpr", 0x0060, 0x0020, CRC(13261a02) SHA1(050edd18e4f79d19d5206f55f329340432fd4099) ) //?? table of increasing values |
788 | 733 | ROM_END |
789 | 734 |
r250315 | r250316 | |
---|---|---|
505 | 505 | MCFG_SCREEN_VISIBLE_AREA(0, 300, 0, 260) |
506 | 506 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
507 | 507 | |
508 | MCFG_DEVICE_ADD("avg", AVG_MHAVOC, | |
508 | MCFG_DEVICE_ADD("avg", AVG_MHAVOC, 0) | |
509 | 509 | MCFG_AVGDVG_VECTOR("vector") |
510 | 510 | |
511 | 511 | /* sound hardware */ |
r250315 | r250316 | |
763 | 763 | * |
764 | 764 | *************************************/ |
765 | 765 | |
766 | GAME( 1983, mhavoc, 0, mhavoc, mhavoc, driver_device, 0, ROT0, "Atari", "Major Havoc (rev 3)", MACHINE_SUPPORTS_SAVE ) | |
767 | GAME( 1983, mhavoc2, mhavoc, mhavoc, mhavoc, driver_device, 0, ROT0, "Atari", "Major Havoc (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
768 | GAME( 1983, mhavocrv, mhavoc, mhavocrv, mhavocrv, mhavoc_state, mhavocrv, ROT0, "Atari / JMA", "Major Havoc (Return to Vax)", MACHINE_SUPPORTS_SAVE ) | |
769 | GAME( 1983, mhavocp, mhavoc, mhavoc, mhavocp, driver_device, 0, ROT0, "Atari", "Major Havoc (prototype)", MACHINE_SUPPORTS_SAVE ) | |
770 | GAME( 1983, alphaone, mhavoc, alphaone, alphaone, driver_device, 0, ROT0, "Atari", "Alpha One (prototype, 3 lives)", MACHINE_SUPPORTS_SAVE ) | |
771 | GAME( 1983, alphaonea,mhavoc, alphaone, alphaone, driver_device, 0, ROT0, "Atari", "Alpha One (prototype, 5 lives)", MACHINE_SUPPORTS_SAVE ) | |
766 | GAME( 1983, mhavoc, 0, mhavoc, mhavoc, driver_device, 0, ROT0, "Atari", "Major Havoc (rev 3)", MACHINE_SUPPORTS_SAVE ) | |
767 | GAME( 1983, mhavoc2, mhavoc, mhavoc, mhavoc, driver_device, 0, ROT0, "Atari", "Major Havoc (rev 2)", MACHINE_SUPPORTS_SAVE ) | |
768 | GAME( 1983, mhavocrv, mhavoc, mhavocrv, mhavocrv, mhavoc_state, mhavocrv, ROT0, "Atari / JMA", "Major Havoc (Return to Vax)", MACHINE_SUPPORTS_SAVE ) | |
769 | GAME( 1983, mhavocp, mhavoc, mhavoc, mhavocp, driver_device, 0, ROT0, "Atari", "Major Havoc (prototype)", MACHINE_SUPPORTS_SAVE ) | |
770 | GAME( 1983, alphaone, mhavoc, alphaone, alphaone, driver_device, 0, ROT0, "Atari", "Alpha One (prototype, 3 lives)", MACHINE_SUPPORTS_SAVE ) | |
771 | GAME( 1983, alphaonea,mhavoc, alphaone, alphaone, driver_device, 0, ROT0, "Atari", "Alpha One (prototype, 5 lives)", MACHINE_SUPPORTS_SAVE ) |
r250315 | r250316 | |
---|---|---|
5464 | 5464 | |
5465 | 5465 | */ |
5466 | 5466 | |
5467 | ROM_START( totdo ) | |
5468 | NAOMI_BIOS | |
5469 | NAOMI_DEFAULT_EEPROM | |
5470 | ||
5471 | ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF) | |
5472 | ROM_LOAD("epr-23021.ic22", 0x0000000, 0x0400000, CRC(d848c889) SHA1(824ef197d5956d9eb6ad5d841dd5b171e1b7c074) ) | |
5473 | ||
5474 | ROM_LOAD("mpr-23001.ic1", 0x0800000, 0x0800000, CRC(2eaab8ed) SHA1(e078bd8781e2a04e23fd18b11d118b2548fa59a8) ) | |
5475 | ROM_LOAD("mpr-23002.ic2", 0x1000000, 0x0800000, CRC(617edcc7) SHA1(10f92cd9be94739c7c2f94cf9a5fa54accbe6227) ) | |
5476 | ROM_LOAD("mpr-23003.ic3", 0x1800000, 0x0800000, CRC(37d6d9f8) SHA1(3ad3fa65f33d250eb8a620e7dc7c6b1209794a80) ) | |
5477 | ROM_LOAD("mpr-23004.ic4", 0x2000000, 0x0800000, CRC(e41186f2) SHA1(2f4b26d8dba1629db539736cf88ec85c21820aeb) ) | |
5478 | ROM_LOAD("mpr-23005.ic5", 0x2800000, 0x0800000, CRC(2b8e1fc6) SHA1(a5cd8c5840dd316dd1ad9500804b459476ca8ba0) ) | |
5479 | ROM_LOAD("mpr-23006.ic6", 0x3000000, 0x0800000, CRC(3de23e27) SHA1(d3aae2a7e5c78fc3bf8e296392d8f893961d946f) ) //on board but actually 0xff filled | |
5480 | ROM_LOAD("mpr-23007.ic7", 0x3800000, 0x0800000, CRC(ca16cfdf) SHA1(6279bc9bd661bde2d3e36ca52625f9b91867c4b4) ) | |
5481 | ROM_LOAD("mpr-23008.ic8", 0x4000000, 0x0800000, CRC(8c33191c) SHA1(6227fbb3d51c4301dd1fc60ec43df7c18eef06fa) ) | |
5482 | ROM_LOAD("mpr-23009.ic9", 0x4800000, 0x0800000, CRC(c982d24d) SHA1(d5a15d04f19f5569709b0b1cde64814230f4f0bb) ) | |
5483 | ROM_LOAD("mpr-23010.ic10", 0x5000000, 0x0800000, CRC(c6e129b4) SHA1(642a9e1052efcb43d2b809f13d10617b43bd38f3) ) | |
5484 | ROM_LOAD("mpr-23011.ic11", 0x5800000, 0x0800000, CRC(9e6942ff) SHA1(8c657d7d74c4c9106756a9934bc3c850f5069e29) ) | |
5485 | ROM_LOAD("mpr-23012.ic12s", 0x6000000, 0x0800000, CRC(20e1ebe8) SHA1(e24cb5f48101e665c90af9be333e54ec274004fb) ) | |
5486 | ROM_LOAD("mpr-23013.ic13s", 0x6800000, 0x0800000, CRC(3de23e27) SHA1(d3aae2a7e5c78fc3bf8e296392d8f893961d946f) ) //on board but actually 0xff filled | |
5487 | ROM_LOAD("mpr-23014.ic14s", 0x7000000, 0x0800000, CRC(c4f95fdb) SHA1(8c0e806e27d7bed274dcb20b932897ea8b8bbf86) ) | |
5488 | ROM_LOAD("mpr-23015.ic15s", 0x7800000, 0x0800000, CRC(5360c49d) SHA1(dbdf955d9bb9a387ded8ada18d26d222d73514d7) ) | |
5489 | ROM_LOAD("mpr-23016.ic16s", 0x8000000, 0x0800000, CRC(fae2958b) SHA1(2bfe164723b7b2f57ae0c6e2fe348459f00dc460) ) | |
5490 | ROM_LOAD("mpr-23017.ic17s", 0x8800000, 0x0800000, CRC(22337e15) SHA1(6a9f5569177c2936d8ff04da74e1fd036a093422) ) | |
5491 | ROM_LOAD("mpr-23018.ic18s", 0x9000000, 0x0800000, CRC(5a608e74) SHA1(4f2ec47dad71d77ad1b8c640db236332c06d7ab7) ) | |
5492 | ROM_LOAD("mpr-23019.ic19s", 0x9800000, 0x0800000, CRC(5cc91cc4) SHA1(66a68991f716ec23555784163aa5140b4e44c7ab) ) | |
5493 | ROM_LOAD("mpr-23020.ic20s", 0xa000000, 0x0800000, CRC(b5943007) SHA1(d0e95084aec5e05027c21a6b4a3331408853781b) ) | |
5494 | //ic21 not populated | |
5495 | ||
5496 | ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated | |
5497 | ROM_END | |
5498 | ||
5499 | 5467 | ROM_START( totd ) |
5500 | 5468 | NAOMI_BIOS |
5501 | 5469 | NAOMI_DEFAULT_EEPROM |
r250315 | r250316 | |
9187 | 9155 | /* 0022 */ GAME( 2000, tduno2, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Touch de Uno! 2", GAME_FLAGS ) |
9188 | 9156 | /* 0023 */ GAME( 2000, 18wheelr, naomi, naomim2, 18wheelr,naomi_state, naomi, ROT0, "Sega", "18 Wheeler (deluxe) (Rev A)", GAME_FLAGS ) |
9189 | 9157 | /* 0025 */ GAME( 1999, marstv, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Mars TV (JPN)", GAME_FLAGS ) |
9190 | /* 0026 */ GAME( 2000, totdo, totd, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "The Typing of the Dead (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS ) | |
9191 | 9158 | /* 0026 */ GAME( 2000, totd, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "The Typing of the Dead (JPN, USA, EXP, KOR, AUS) (Rev A)", GAME_FLAGS ) |
9192 | 9159 | /* 0027 */ GAME( 2000, smarinef, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Sega Marine Fishing", GAME_FLAGS ) |
9193 | 9160 | /* 0028 */ GAME( 2000, vonot, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtual On Oratorio Tangram M.S.B.S. ver5.66 2000 Edition", GAME_FLAGS ) |
r250315 | r250316 | |
---|---|---|
521 | 521 | MCFG_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566) |
522 | 522 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
523 | 523 | |
524 | MCFG_DEVICE_ADD("dvg", DVG, | |
524 | MCFG_DEVICE_ADD("dvg", DVG, 0) | |
525 | 525 | MCFG_AVGDVG_VECTOR("vector") |
526 | 526 | |
527 | 527 | /* sound hardware */ |
r250315 | r250316 | |
---|---|---|
278 | 278 | MCFG_SCREEN_VISIBLE_AREA(0, 900, 0, 600) |
279 | 279 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
280 | 280 | |
281 | MCFG_DEVICE_ADD("avg", AVG_QUANTUM, | |
281 | MCFG_DEVICE_ADD("avg", AVG_QUANTUM, 0) | |
282 | 282 | MCFG_AVGDVG_VECTOR("vector") |
283 | 283 | |
284 | 284 | /* sound hardware */ |
r250315 | r250316 | |
---|---|---|
355 | 355 | MCFG_SCREEN_VISIBLE_AREA(0, 250, 0, 280) |
356 | 356 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
357 | 357 | |
358 | MCFG_DEVICE_ADD("avg", AVG_STARWARS, | |
358 | MCFG_DEVICE_ADD("avg", AVG_STARWARS, 0) | |
359 | 359 | MCFG_AVGDVG_VECTOR("vector") |
360 | 360 | |
361 | 361 | /* sound hardware */ |
r250315 | r250316 | |
---|---|---|
1994 | 1994 | ROM_PARAMETER( ":315_5881:key", "05226d41" ) |
1995 | 1995 | ROM_END |
1996 | 1996 | |
1997 | ROM_START( ffrevng10 ) | |
1998 | STV_BIOS | |
1999 | ||
2000 | ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ | |
2001 | ROM_LOAD16_WORD_SWAP( "opr21872.7", 0x0200000, 0x0200000, CRC(32d36fee) SHA1(441c4254ef2e9301e1006d69462a850ce339314b) ) // good (was .11s) | |
2002 | ROM_LOAD16_WORD_SWAP( "mpr21873.2", 0x0400000, 0x0400000, CRC(dac5bd98) SHA1(6102035ce9eb2f83d7d9b20f989a151f45087c67) ) // good (was .12) | |
2003 | ROM_LOAD16_WORD_SWAP( "mpr21874.3", 0x0800000, 0x0400000, CRC(0a7be2f1) SHA1(e2d13f36e54d1e2cb9d584db829c04a6ff65108c) ) // good (was .13) | |
2004 | ROM_LOAD16_WORD_SWAP( "mpr21875.4", 0x0c00000, 0x0400000, CRC(ccb75029) SHA1(9611a08a2ad0e0e82137ded6205440a948a339a4) ) // good (was .14) | |
2005 | ROM_LOAD16_WORD_SWAP( "mpr21876.5", 0x1000000, 0x0400000, CRC(bb92a7fc) SHA1(d9e0fab1104a46adeb0a0cfc0d070d4c63a28d55) ) // good (was .15) | |
2006 | ROM_LOAD16_WORD_SWAP( "mpr21877.6", 0x1400000, 0x0400000, CRC(c22a4a75) SHA1(3276bc0628e71b432f21ba9a4f5ff7ccc8769cd9) ) // good (was .16) | |
2007 | ROM_LOAD16_WORD_SWAP( "opr21878.1", 0x1800000, 0x0200000, CRC(2ea4a64d) SHA1(928a973dce5eba0a1628d61ba56a530de990a946) ) // good (was .17) | |
2008 | ||
2009 | // 1998 317-5049-COM ST-V | |
2010 | ROM_PARAMETER( ":315_5881:key", "0524ac01" ) | |
2011 | ROM_END | |
2012 | ||
2013 | 1997 | ROM_START( ffreveng ) |
2014 | 1998 | STV_BIOS |
2015 | 1999 | |
2016 | 2000 | ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ |
2017 | ROM_LOAD16_BYTE( "ffr110.ic35", 0x0000001, 0x0100000, CRC(3ffea541) SHA1(715b070b1d574a99aeb12086de380b0b3aaa25a1) ) | |
2018 | ||
2019 | // actual source ROM board have 21x 16Mbit FlashROMs instead | |
2020 | 2001 | ROM_LOAD16_WORD_SWAP( "opr21872.7", 0x0200000, 0x0200000, CRC(32d36fee) SHA1(441c4254ef2e9301e1006d69462a850ce339314b) ) // good (was .11s) |
2021 | 2002 | ROM_LOAD16_WORD_SWAP( "mpr21873.2", 0x0400000, 0x0400000, CRC(dac5bd98) SHA1(6102035ce9eb2f83d7d9b20f989a151f45087c67) ) // good (was .12) |
2022 | 2003 | ROM_LOAD16_WORD_SWAP( "mpr21874.3", 0x0800000, 0x0400000, CRC(0a7be2f1) SHA1(e2d13f36e54d1e2cb9d584db829c04a6ff65108c) ) // good (was .13) |
r250315 | r250316 | |
3075 | 3056 | GAME( 1996, dnmtdeka, diehard, stv, stv, stv_state, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) |
3076 | 3057 | GAME( 1995, ejihon, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) |
3077 | 3058 | GAME( 1998, elandore, stvbios, stv_5881, stv6b, stv_state, elandore, ROT0, "Sai-Mate", "Touryuu Densetsu Elan-Doree / Elan Doree - Legend of Dragoon (JUET 980922 V1.006)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) |
3078 | GAME( 1999, ffrevng10, ffreveng,stv_5881, stv, stv_state, ffreveng, ROT0, "Capcom", "Final Fight Revenge (JUET 990714 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) | |
3079 | GAME( 1999, ffreveng, stvbios, stv_5881, stv, stv_state, ffreveng, ROT0, "Capcom", "Final Fight Revenge (JUET 990930 V1.100)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) | |
3059 | GAME( 1999, ffreveng, stvbios, stv_5881, stv, stv_state, ffreveng, ROT0, "Capcom", "Final Fight Revenge (JUET 990714 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) | |
3080 | 3060 | GAME( 1995, fhboxers, stvbios, stv, stv, stv_state, fhboxers, ROT0, "Sega", "Funky Head Boxers (JUETBKAL 951218 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) |
3081 | 3061 | GAME( 1997, findlove, stvbios, stv, stv, stv_state, stv, ROT0, "Daiki / FCF", "Zenkoku Seifuku Bishoujo Grand Prix Find Love (J 971212 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) |
3082 | 3062 | GAME( 1994, gaxeduel, stvbios, stv, stv6b, stv_state, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS) |
r250315 | r250316 | |
---|---|---|
3638 | 3638 | ROM_LOAD( "b1", 0x00000, 0x10000, CRC(3f7adf66) SHA1(6ff37d070c7866133853c7cb3e2fbcb5610d87e8) ) |
3639 | 3639 | |
3640 | 3640 | ROM_REGION( 0x100000, "tilemap", 0 ) |
3641 | ROM_LOAD( "-2.u30", 0x00000, 0x40000, CRC( | |
3641 | ROM_LOAD( "-2.u30", 0x00000, 0x40000, CRC(c7435727) SHA1(115f41fe8da7be1e3928c1539e901b4b54132616) ) | |
3642 | 3642 | ROM_LOAD( "b-3.u29", 0x40000, 0x40000, CRC(eb0968d3) SHA1(5313150725d9b7019ddaddc0b1cdb92330ab0b49) ) |
3643 | 3643 | ROM_LOAD( "b-4.u28", 0x80000, 0x40000, CRC(ee5024ba) SHA1(cf65bbee12f6aaf8bb22c2a03e7b360fa58f3b80) ) |
3644 | 3644 | ROM_LOAD( "a-5.u27", 0xc0000, 0x40000, CRC(6748c76d) SHA1(1013f5924c584df4bd6a1a3dbd0fff96c1313ed3) ) |
r250315 | r250316 | |
---|---|---|
603 | 603 | MCFG_SCREEN_VISIBLE_AREA(0, 580, 0, 570) |
604 | 604 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
605 | 605 | |
606 | MCFG_DEVICE_ADD("avg", AVG_TEMPEST, | |
606 | MCFG_DEVICE_ADD("avg", AVG_TEMPEST, 0) | |
607 | 607 | MCFG_AVGDVG_VECTOR("vector") |
608 | 608 | |
609 | 609 | /* Drivers */ |
r250315 | r250316 | |
---|---|---|
426 | 426 | MCFG_SCREEN_VISIBLE_AREA(0, 280, 0, 250) |
427 | 427 | MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) |
428 | 428 | |
429 | MCFG_DEVICE_ADD("avg", AVG_TOMCAT, | |
429 | MCFG_DEVICE_ADD("avg", AVG_TOMCAT, 0) | |
430 | 430 | MCFG_AVGDVG_VECTOR("vector") |
431 | 431 | |
432 | 432 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
r250315 | r250316 | |
454 | 454 | ROM_LOAD( "136021-105.1l", 0x0000, 0x0100, CRC(82fc3eb2) SHA1(184231c7baef598294860a7d2b8a23798c5c7da6) ) /* AVG PROM */ |
455 | 455 | ROM_END |
456 | 456 | |
457 | GAME( 1985, tomcat, 0, tomcat, tomcat, driver_device, 0, ROT0, "Atari", "TomCat (prototype)", MACHINE_SUPPORTS_SAVE ) | |
457 | GAME( 1985, tomcat, 0, tomcat, tomcat, driver_device, 0, ROT0, "Atari", "TomCat (prototype)", MACHINE_SUPPORTS_SAVE ) |
r250315 | r250316 | |
---|---|---|
4 | 4 | |
5 | 5 | machine.c |
6 | 6 | |
7 | Functions to emulate general aspects of the machine | |
8 | (RAM, ROM, interrupts, I/O ports) | |
7 | Functions to emulate general aspects of the machine (RAM, ROM, interrupts, | |
8 | I/O ports) | |
9 | 9 | |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | 12 | #include "emu.h" |
13 | 13 | #include "machine/atari_vg.h" |
14 | #include "video/avgdvg.h" | |
14 | 15 | #include "includes/asteroid.h" |
15 | 16 | |
16 | 17 |
r250315 | r250316 | |
---|---|---|
22 | 22 | * |
23 | 23 | *************************************/ |
24 | 24 | |
25 | #define MASTER_CLOCK (12096000) | |
26 | #define VGSLICE (10000) | |
25 | 27 | #define VGVECTOR 0 |
26 | 28 | #define VGCLIP 1 |
27 | 29 | |
r250315 | r250316 | |
41 | 43 | |
42 | 44 | void avgdvg_device::set_flip_x(int flip) |
43 | 45 | { |
44 | | |
46 | flip_x = flip; | |
45 | 47 | } |
46 | 48 | |
47 | 49 | void avgdvg_device::set_flip_y(int flip) |
48 | 50 | { |
49 | | |
51 | flip_y = flip; | |
50 | 52 | } |
51 | 53 | |
52 | 54 | void avgdvg_device::apply_flipping(int *x, int *y) |
53 | 55 | { |
54 | if (m_flipx) | |
55 | *x += (m_xcenter - *x) << 1; | |
56 | if (m_flipy) | |
57 | *y += (m_ycenter - *y) << 1; | |
56 | if (flip_x) | |
57 | *x += (xcenter - *x) << 1; | |
58 | if (flip_y) | |
59 | *y += (ycenter - *y) << 1; | |
58 | 60 | } |
59 | 61 | |
60 | 62 | |
r250315 | r250316 | |
72 | 74 | i++; |
73 | 75 | m_vector->add_point(vectbuf[i].x, vectbuf[i].y, vectbuf[i].color, 0); |
74 | 76 | |
75 | for (i = 0; i < | |
77 | for (i = 0; i < nvect; i++) | |
76 | 78 | { |
77 | 79 | if (vectbuf[i].status == VGVECTOR) |
78 | 80 | m_vector->add_point(vectbuf[i].x, vectbuf[i].y, vectbuf[i].color, vectbuf[i].intensity); |
r250315 | r250316 | |
81 | 83 | m_vector->add_clip(vectbuf[i].x, vectbuf[i].y, vectbuf[i].arg1, vectbuf[i].arg2); |
82 | 84 | } |
83 | 85 | |
84 | | |
86 | nvect=0; | |
85 | 87 | } |
86 | 88 | |
87 | 89 | void avgdvg_device::vg_add_point_buf(int x, int y, rgb_t color, int intensity) |
88 | 90 | { |
89 | if ( | |
91 | if (nvect < MAXVECT) | |
90 | 92 | { |
91 | vectbuf[m_nvect].status = VGVECTOR; | |
92 | vectbuf[m_nvect].x = x; | |
93 | vectbuf[m_nvect].y = y; | |
94 | vectbuf[m_nvect].color = color; | |
95 | vectbuf[m_nvect].intensity = intensity; | |
96 | m_nvect++; | |
93 | vectbuf[nvect].status = VGVECTOR; | |
94 | vectbuf[nvect].x = x; | |
95 | vectbuf[nvect].y = y; | |
96 | vectbuf[nvect].color = color; | |
97 | vectbuf[nvect].intensity = intensity; | |
98 | nvect++; | |
97 | 99 | } |
98 | 100 | } |
99 | 101 | |
100 | void avgdvg_device::vg_add_clip(int xmin, int ymin, int xmax, int ymax) | |
102 | void avgdvg_device::vg_add_clip (int xmin, int ymin, int xmax, int ymax) | |
101 | 103 | { |
102 | if ( | |
104 | if (nvect < MAXVECT) | |
103 | 105 | { |
104 | vectbuf[m_nvect].status = VGCLIP; | |
105 | vectbuf[m_nvect].x = xmin; | |
106 | vectbuf[m_nvect].y = ymin; | |
107 | vectbuf[m_nvect].arg1 = xmax; | |
108 | vectbuf[m_nvect].arg2 = ymax; | |
109 | m_nvect++; | |
106 | vectbuf[nvect].status = VGCLIP; | |
107 | vectbuf[nvect].x = xmin; | |
108 | vectbuf[nvect].y = ymin; | |
109 | vectbuf[nvect].arg1 = xmax; | |
110 | vectbuf[nvect].arg2 = ymax; | |
111 | nvect++; | |
110 | 112 | } |
111 | 113 | } |
112 | 114 | |
r250315 | r250316 | |
119 | 121 | |
120 | 122 | void dvg_device::update_databus() // dvg_data |
121 | 123 | { |
122 | // DVG uses low bit of state for address | |
124 | /* | |
125 | * DVG uses low bit of state for address | |
126 | */ | |
123 | 127 | m_data = avgdvg_vectorram[(m_pc << 1) | (m_state_latch & 1)]; |
124 | 128 | } |
125 | 129 | |
r250315 | r250316 | |
163 | 167 | void dvg_device::dvg_draw_to(int x, int y, int intensity) |
164 | 168 | { |
165 | 169 | if (((x | y) & 0x400) == 0) |
166 | vg_add_point_buf((m_xmin + x - 512) << 16, | |
167 | (m_ymin + 512 - y) << 16, | |
170 | vg_add_point_buf((xmin + x - 512) << 16, | |
171 | (ymin + 512 - y) << 16, | |
168 | 172 | VECTOR_COLOR111(7), intensity << 4); |
169 | 173 | } |
170 | 174 | |
r250315 | r250316 | |
590 | 594 | { |
591 | 595 | cycles = 0x8000 - m_timer; |
592 | 596 | m_timer = 0; |
593 | m_xpos = m_xcenter; | |
594 | m_ypos = m_ycenter; | |
597 | m_xpos = xcenter; | |
598 | m_ypos = ycenter; | |
595 | 599 | vg_add_point_buf(m_xpos, m_ypos, 0, 0); |
596 | 600 | } |
597 | 601 | |
r250315 | r250316 | |
623 | 627 | { |
624 | 628 | if ((OP2 == 0) && (m_dvy12 == 0)) |
625 | 629 | { |
626 | /* Contrary to previous documentation in MAME, Tempest does not have the m_enspkl bit. */ | |
630 | /* Contrary to previous documentation in MAME, | |
631 | Tempest does not have the m_enspkl bit. */ | |
627 | 632 | if (m_dvy & 0x800) |
628 | 633 | m_color = m_dvy & 0xf; |
629 | 634 | else |
r250315 | r250316 | |
657 | 662 | |
658 | 663 | apply_flipping(&x, &y); |
659 | 664 | |
660 | vg_add_point_buf(y - m_ycenter + m_xcenter, | |
661 | x - m_xcenter + m_ycenter, rgb_t(r, g, b), | |
665 | vg_add_point_buf(y - ycenter + xcenter, | |
666 | x - xcenter + ycenter, rgb_t(r, g, b), | |
662 | 667 | (((m_int_latch >> 1) == 1)? m_intensity: m_int_latch & 0xe) << 4); |
663 | 668 | } |
664 | 669 | |
r250315 | r250316 | |
676 | 681 | * avg_common_strobe2). If we don't discard all vectors in the |
677 | 682 | * current buffer at this point, the screen starts flickering. |
678 | 683 | */ |
679 | | |
684 | nvect = 0; | |
680 | 685 | } |
681 | 686 | #endif |
682 | 687 | |
r250315 | r250316 | |
694 | 699 | |
695 | 700 | if (m_lst == 0) |
696 | 701 | { |
697 | vg_add_clip(0, m_ypos, | |
702 | vg_add_clip(0, m_ypos, xmax << 16, ymax << 16); | |
698 | 703 | } |
699 | 704 | m_lst = 1; |
700 | 705 | |
r250315 | r250316 | |
817 | 822 | { |
818 | 823 | cycles = 0x8000 - m_timer; |
819 | 824 | m_timer = 0; |
820 | m_xpos = m_xcenter; | |
821 | m_ypos = m_ycenter; | |
825 | m_xpos = xcenter; | |
826 | m_ypos = ycenter; | |
822 | 827 | vg_add_point_buf(m_xpos, m_ypos, 0, 0); |
823 | 828 | } |
824 | 829 | |
r250315 | r250316 | |
905 | 910 | * avg_common_strobe2). If we don't discard all vectors in the |
906 | 911 | * current buffer at this point, the screen starts flickering. |
907 | 912 | */ |
908 | | |
913 | nvect = 0; | |
909 | 914 | } |
910 | 915 | |
911 | 916 | int avg_quantum_device::handler_0() // quantum_st2st3 |
r250315 | r250316 | |
1035 | 1040 | |
1036 | 1041 | apply_flipping(&x, &y); |
1037 | 1042 | |
1038 | vg_add_point_buf(y - m_ycenter + m_xcenter, x - m_xcenter + m_ycenter, | |
1039 | rgb_t(r, g, b), | |
1040 | ((m_int_latch == 2)? m_intensity: m_int_latch) << 4); | |
1043 | vg_add_point_buf(y - ycenter + xcenter, | |
1044 | x - xcenter + ycenter, rgb_t(r, g, b), | |
1045 | ((m_int_latch == 2)? m_intensity: m_int_latch) << 4); | |
1041 | 1046 | } |
1042 | 1047 | if (OP2) |
1043 | 1048 | { |
1044 | 1049 | cycles = 0x4000 - m_timer; |
1045 | 1050 | m_timer = 0; |
1046 | m_xpos = m_xcenter; | |
1047 | m_ypos = m_ycenter; | |
1051 | m_xpos = xcenter; | |
1052 | m_ypos = ycenter; | |
1048 | 1053 | vg_add_point_buf(m_xpos, m_ypos, 0, 0); |
1049 | 1054 | } |
1050 | 1055 | |
r250315 | r250316 | |
1160 | 1165 | |
1161 | 1166 | /************************************* |
1162 | 1167 | * |
1163 | * halt function | |
1168 | * halt functions | |
1164 | 1169 | * |
1165 | 1170 | *************************************/ |
1166 | 1171 | |
r250315 | r250316 | |
1170 | 1175 | m_sync_halt = dummy; |
1171 | 1176 | } |
1172 | 1177 | |
1178 | TIMER_CALLBACK_MEMBER( avgdvg_device::vg_set_halt_callback ) | |
1179 | { | |
1180 | vg_set_halt(param); | |
1181 | } | |
1173 | 1182 | |
1183 | ||
1174 | 1184 | /******************************************************************** |
1175 | 1185 | * |
1176 | 1186 | * State Machine |
r250315 | r250316 | |
1184 | 1194 | * |
1185 | 1195 | *******************************************************************/ |
1186 | 1196 | |
1187 | ||
1197 | TIMER_CALLBACK_MEMBER( avgdvg_device::run_state_machine ) | |
1188 | 1198 | { |
1189 | if (m_halt) | |
1190 | { | |
1191 | m_icount = 0; | |
1192 | return; | |
1193 | } | |
1194 | ||
1199 | int cycles = 0; | |
1195 | 1200 | UINT8 *state_prom = machine().root_device().memregion("user1")->base(); |
1196 | 1201 | |
1197 | while ( | |
1202 | while (cycles < VGSLICE) | |
1198 | 1203 | { |
1199 | 1204 | /* Get next state */ |
1200 | 1205 | m_state_latch = (m_state_latch & 0x10) |
r250315 | r250316 | |
1207 | 1212 | |
1208 | 1213 | /* Decode state and call the corresponding handler */ |
1209 | 1214 | switch(m_state_latch & 7) { |
1210 | case 0 : m_icount -= handler_0(); break; | |
1211 | case 1 : m_icount -= handler_1(); break; | |
1212 | case 2 : m_icount -= handler_2(); break; | |
1213 | case 3 : m_icount -= handler_3(); break; | |
1214 | case 4 : m_icount -= handler_4(); break; | |
1215 | case 5 : m_icount -= handler_5(); break; | |
1216 | case 6 : m_icount -= handler_6(); break; | |
1217 | case 7 : m_icount -= handler_7(); break; | |
1215 | case 0 : cycles += handler_0(); break; | |
1216 | case 1 : cycles += handler_1(); break; | |
1217 | case 2 : cycles += handler_2(); break; | |
1218 | case 3 : cycles += handler_3(); break; | |
1219 | case 4 : cycles += handler_4(); break; | |
1220 | case 5 : cycles += handler_5(); break; | |
1221 | case 6 : cycles += handler_6(); break; | |
1222 | case 7 : cycles += handler_7(); break; | |
1218 | 1223 | } |
1219 | 1224 | } |
1220 | 1225 | |
1221 | // Halt if flag was set | |
1222 | if (m_halt && !(m_state_latch & 0x10)) | |
1223 | { | |
1224 | vg_set_halt(1); | |
1225 | } | |
1226 | /* If halt flag was set, let CPU catch up before we make halt visible */ | |
1227 | if (m_halt && !(m_state_latch & 0x10)) | |
1228 | vg_halt_timer->adjust(attotime::from_hz(MASTER_CLOCK) * cycles, 1); | |
1226 | 1229 | |
1227 | 1230 | m_state_latch = (m_halt << 4) | (m_state_latch & 0xf); |
1228 | | |
1231 | cycles += 8; | |
1229 | 1232 | } |
1233 | ||
1234 | vg_run_timer->adjust(attotime::from_hz(MASTER_CLOCK) * cycles); | |
1230 | 1235 | } |
1231 | 1236 | |
1232 | 1237 | |
r250315 | r250316 | |
1245 | 1250 | { |
1246 | 1251 | vggo(); |
1247 | 1252 | |
1248 | if (m_sync_halt && ( | |
1253 | if (m_sync_halt && (nvect > 10)) | |
1249 | 1254 | { |
1250 | 1255 | /* |
1251 | 1256 | * This is a good time to start a new frame. Major Havoc |
r250315 | r250316 | |
1257 | 1262 | vg_flush(); |
1258 | 1263 | |
1259 | 1264 | vg_set_halt(0); |
1265 | vg_run_timer->adjust(attotime::zero); | |
1260 | 1266 | } |
1261 | 1267 | |
1262 | 1268 | WRITE16_MEMBER( avgdvg_device::go_word_w ) |
r250315 | r250316 | |
1279 | 1285 | |
1280 | 1286 | WRITE16_MEMBER( avgdvg_device::reset_word_w ) |
1281 | 1287 | { |
1282 | reset_w(space,0,0); | |
1288 | reset_w (space,0,0); | |
1283 | 1289 | } |
1284 | 1290 | |
1285 | 1291 | /************************************* |
r250315 | r250316 | |
1322 | 1328 | save_item(NAME(m_clipx_max)); |
1323 | 1329 | save_item(NAME(m_clipy_max)); |
1324 | 1330 | |
1325 | save_item(NAME(m_flipx)); | |
1326 | save_item(NAME(m_flipy)); | |
1331 | save_item(NAME(flip_x)); | |
1332 | save_item(NAME(flip_y)); | |
1327 | 1333 | save_pointer(NAME(avgdvg_vectorram), avgdvg_vectorram_size); |
1328 | 1334 | } |
1329 | 1335 | |
r250315 | r250316 | |
1339 | 1345 | |
1340 | 1346 | avgdvg_colorram = reinterpret_cast<UINT8 *>(machine().root_device().memshare("colorram")->ptr()); |
1341 | 1347 | |
1342 | m_xmin = visarea.min_x; | |
1343 | m_ymin = visarea.min_y; | |
1344 | m_xmax = visarea.max_x; | |
1345 | m_ymax = visarea.max_y; | |
1348 | xmin = visarea.min_x; | |
1349 | ymin = visarea.min_y; | |
1350 | xmax = visarea.max_x; | |
1351 | ymax = visarea.max_y; | |
1346 | 1352 | |
1347 | m_xcenter = ((m_xmax - m_xmin) / 2) << 16; | |
1348 | m_ycenter = ((m_ymax - m_ymin) / 2) << 16; | |
1353 | xcenter = ((xmax - xmin) / 2) << 16; | |
1354 | ycenter = ((ymax - ymin) / 2) << 16; | |
1349 | 1355 | |
1350 | | |
1356 | flip_x = flip_y = 0; | |
1351 | 1357 | |
1358 | vg_halt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(avgdvg_device::vg_set_halt_callback),this)); | |
1359 | vg_run_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(avgdvg_device::run_state_machine),this)); | |
1360 | ||
1352 | 1361 | /* |
1353 | 1362 | * The x and y DACs use 10 bit of the counter values which are in |
1354 | 1363 | * two's complement representation. The DAC input is xored with |
r250315 | r250316 | |
1357 | 1366 | m_xdac_xor = 0x200; |
1358 | 1367 | m_ydac_xor = 0x200; |
1359 | 1368 | |
1360 | m_icountptr = &m_icount; | |
1361 | ||
1362 | 1369 | register_state(); |
1363 | 1370 | } |
1364 | 1371 | |
r250315 | r250316 | |
1374 | 1381 | |
1375 | 1382 | avgdvg_colorram = reinterpret_cast<UINT8 *>(machine().root_device().memshare("colorram")->ptr()); |
1376 | 1383 | |
1377 | m_xmin = visarea.min_x; | |
1378 | m_ymin = visarea.min_y; | |
1384 | xmin = visarea.min_x; | |
1385 | ymin = visarea.min_y; | |
1379 | 1386 | |
1380 | m_icountptr = &m_icount; | |
1381 | ||
1387 | vg_halt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(avgdvg_device::vg_set_halt_callback),this)); | |
1388 | vg_run_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(avgdvg_device::run_state_machine),this)); | |
1389 | ||
1382 | 1390 | register_state(); |
1383 | 1391 | } |
1384 | 1392 | |
r250315 | r250316 | |
1387 | 1395 | downcast<avgdvg_device &>(device).m_vector.set_tag(tag); |
1388 | 1396 | } |
1389 | 1397 | |
1390 | avgdvg_device::avgdvg_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) | |
1391 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source) | |
1392 | , device_execute_interface(mconfig, *this) | |
1393 | , m_vector(*this) | |
1398 | avgdvg_device::avgdvg_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) : | |
1399 | device_t(mconfig, type, name, tag, owner, clock, shortname, source), | |
1400 | m_vector(*this) | |
1394 | 1401 | { |
1395 | 1402 | m_pc = 0; |
1396 | 1403 | m_sp = 0; |
r250315 | r250316 | |
1433 | 1440 | m_clipx_max = 0; |
1434 | 1441 | m_clipy_max = 0; |
1435 | 1442 | |
1436 | m_xmin = 0; | |
1437 | m_xmax = 0; | |
1438 | m_ymin = 0; | |
1439 | m_ymax = 0; | |
1440 | m_xcenter = 0; | |
1441 | m_ycenter = 0; | |
1442 | m_flipx = 0; | |
1443 | m_flipy = 0; | |
1444 | m_nvect = 0; | |
1443 | xmin = 0; | |
1444 | xmax = 0; | |
1445 | ymin = 0; | |
1446 | ymax = 0; | |
1447 | xcenter = 0; | |
1448 | ycenter = 0; | |
1449 | flip_x = 0; | |
1450 | flip_y = 0; | |
1451 | nvect = 0; | |
1445 | 1452 | } |
1446 | 1453 | |
1447 | 1454 | dvg_device::dvg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
r250315 | r250316 | |
---|---|---|
21 | 21 | |
22 | 22 | // ======================> avgdvg_device |
23 | 23 | |
24 | class avgdvg_device : public device_t, | |
25 | public device_execute_interface | |
24 | class avgdvg_device : public device_t | |
26 | 25 | { |
27 | 26 | public: |
28 | 27 | // construction/destruction |
r250315 | r250316 | |
41 | 40 | void set_flip_x(int flip); |
42 | 41 | void set_flip_y(int flip); |
43 | 42 | |
43 | TIMER_CALLBACK_MEMBER(vg_set_halt_callback); | |
44 | TIMER_CALLBACK_MEMBER(run_state_machine); | |
44 | 45 | protected: |
45 | 46 | void apply_flipping(int *x, int *y); |
46 | 47 | void vg_set_halt(int dummy); |
r250315 | r250316 | |
51 | 52 | |
52 | 53 | void register_state(); |
53 | 54 | |
54 | virtual void execute_run(); | |
55 | int m_icount; | |
56 | ||
57 | 55 | UINT8 *avgdvg_vectorram; |
58 | 56 | size_t avgdvg_vectorram_size; |
59 | 57 | |
60 | ||
58 | UINT8 *avgdvg_colorram; | |
61 | 59 | |
62 | int m_xmin, m_xmax, m_ymin, m_ymax; | |
63 | int m_xcenter, m_ycenter; | |
64 | int m_flipx, m_flipy; | |
65 | 60 | |
66 | int m_nvect; | |
61 | int xmin, xmax, ymin, ymax; | |
62 | int xcenter, ycenter; | |
63 | emu_timer *vg_run_timer, *vg_halt_timer; | |
64 | ||
65 | int flip_x, flip_y; | |
66 | ||
67 | int nvect; | |
67 | 68 | vgvector vectbuf[MAXVECT]; |
68 | 69 | |
70 | ||
69 | 71 | UINT16 m_pc; |
70 | 72 | UINT8 m_sp; |
71 | 73 | UINT16 m_dvx; |
r250315 | r250316 | |
---|---|---|
52 | 52 | |
53 | 53 | namespace d3d |
54 | 54 | { |
55 | hlsl_options shaders::s_hlsl_presets[4] = | |
56 | { | |
57 | { // 25% Shadow mask, 50% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation | |
58 | true, | |
59 | 0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f, | |
60 | 0.03f, 0.0f, 0.0f, 0.0f, 0.0f, | |
61 | 0.5f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f, | |
62 | { 0.0f, 0.0f }, | |
63 | { 0.0f, 0.0f, 0.0f }, | |
64 | { 0.0f, 0.0f, 0.0f }, | |
65 | { 0.0f, 0.0f, 0.0f }, | |
66 | { 0.0f, 0.0f, 0.0f }, | |
67 | { 1.0f, 0.0f, 0.0f }, | |
68 | { 0.0f, 1.0f, 0.0f }, | |
69 | { 0.0f, 0.0f, 1.0f }, | |
70 | { 0.0f, 0.0f, 0.0f }, | |
71 | { 1.0f, 1.0f, 1.0f }, | |
72 | { 0.9f, 0.9f, 0.9f }, | |
73 | { 0.05f,0.05f,0.05f}, | |
74 | { 0.25f,0.25f,0.25f}, | |
75 | 1.2f, | |
76 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, | |
77 | 0.9f, 4.0f, | |
78 | 1.0f, | |
79 | { 0.0f, 0.0f, 0.0f }, | |
80 | 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f | |
81 | }, | |
82 | { // 25% Shadow mask, 0% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation | |
83 | true, | |
84 | 0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f, | |
85 | 0.03f, 0.0f, 0.0f, 0.0f, 0.0f, | |
86 | 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f, | |
87 | { 0.0f, 0.0f }, | |
88 | { 0.0f, 0.0f, 0.0f }, | |
89 | { 0.0f, 0.0f, 0.0f }, | |
90 | { 0.0f, 0.0f, 0.0f }, | |
91 | { 0.0f, 0.0f, 0.0f }, | |
92 | { 1.0f, 0.0f, 0.0f }, | |
93 | { 0.0f, 1.0f, 0.0f }, | |
94 | { 0.0f, 0.0f, 1.0f }, | |
95 | { 0.0f, 0.0f, 0.0f }, | |
96 | { 1.0f, 1.0f, 1.0f }, | |
97 | { 0.9f, 0.9f, 0.9f }, | |
98 | { 0.05f,0.05f,0.05f}, | |
99 | { 0.25f,0.25f,0.25f}, | |
100 | 1.2f, | |
101 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, | |
102 | 0.9f, 4.0f, | |
103 | 1.0f, | |
104 | { 0.0f, 0.0f, 0.0f }, | |
105 | 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f | |
106 | }, | |
107 | { // 25% Shadow mask, 0% Scanlines, 0% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation | |
108 | true, | |
109 | 0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f, | |
110 | 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, | |
111 | 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f, | |
112 | { 0.0f, 0.0f }, | |
113 | { 0.0f, 0.0f, 0.0f }, | |
114 | { 0.0f, 0.0f, 0.0f }, | |
115 | { 0.0f, 0.0f, 0.0f }, | |
116 | { 0.0f, 0.0f, 0.0f }, | |
117 | { 1.0f, 0.0f, 0.0f }, | |
118 | { 0.0f, 1.0f, 0.0f }, | |
119 | { 0.0f, 0.0f, 1.0f }, | |
120 | { 0.0f, 0.0f, 0.0f }, | |
121 | { 1.0f, 1.0f, 1.0f }, | |
122 | { 0.9f, 0.9f, 0.9f }, | |
123 | { 0.05f,0.05f,0.05f}, | |
124 | { 0.25f,0.25f,0.25f}, | |
125 | 1.2f, | |
126 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, | |
127 | 0.9f, 4.0f, | |
128 | 1.0f, | |
129 | { 0.0f, 0.0f, 0.0f }, | |
130 | 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f | |
131 | }, | |
132 | { // 25% Shadow mask, 100% Scanlines, 15% Pincushion, 3 defocus, 24-degree Tint Out, 1.5 Exponent, 5% Floor, 70% Phosphor Return, 80% Saturation, Bad Convergence | |
133 | true, | |
134 | 0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f, | |
135 | 0.15f, 0.0f, 0.0f, 0.0f, 0.0f, | |
136 | 1.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.5f, | |
137 | { 3.0f, 3.0f }, | |
138 | { 0.5f,-0.33f,0.7f }, | |
139 | { 0.0f,-1.0f, 0.5f }, | |
140 | { 0.0f, 0.2f, 0.3f }, | |
141 | { 0.0f, 0.2f, 0.0f }, | |
142 | { 0.8f, 0.2f, 0.0f }, | |
143 | { 0.0f, 0.8f, 0.2f}, | |
144 | { 0.2f, 0.0f, 0.8f}, | |
145 | { 0.0f, 0.0f, 0.0f }, | |
146 | { 1.0f, 1.0f, 1.0f }, | |
147 | { 1.5f, 1.5f, 1.5f }, | |
148 | { 0.05f,0.05f,0.05f}, | |
149 | { 0.7f, 0.7f, 0.7f}, | |
150 | 0.8f, | |
151 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, | |
152 | 0.9f, 4.0f, | |
153 | 1.0f, | |
154 | { 0.0f, 0.0f, 0.0f }, | |
155 | 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f | |
156 | }, | |
157 | }; | |
55 | 158 | |
159 | ||
56 | 160 | //============================================================ |
57 | 161 | // PROTOTYPES |
58 | 162 | //============================================================ |
59 | 163 | |
60 | static void get_vector(const char *data, int count, float *out, | |
164 | static void get_vector(const char *data, int count, float *out, int report_error); | |
61 | 165 | |
62 | 166 | |
63 | 167 | //============================================================ |
r250315 | r250316 | |
72 | 176 | // shader manager constructor |
73 | 177 | //============================================================ |
74 | 178 | |
75 | shaders::shaders() | |
179 | shaders::shaders(): | |
76 | 180 | d3dintf(NULL), machine(NULL), d3d(NULL), num_screens(0), curr_screen(0), curr_frame(0), write_ini(false), read_ini(false), hlsl_prescale_x(0), hlsl_prescale_y(0), bloom_count(0), |
77 | 181 | vecbuf_type(), vecbuf_index(0), vecbuf_count(0), avi_output_file(NULL), avi_frame(0), avi_copy_surface(NULL), avi_copy_texture(NULL), avi_final_target(NULL), avi_final_texture(NULL), |
78 | 182 | black_surface(NULL), black_texture(NULL), render_snap(false), snap_rendered(false), snap_copy_target(NULL), snap_copy_texture(NULL), snap_target(NULL), snap_texture(NULL), |
79 | 183 | snap_width(0), snap_height(0), lines_pending(false), backbuffer(NULL), curr_effect(NULL), default_effect(NULL), prescale_effect(NULL), post_effect(NULL), distortion_effect(NULL), |
80 | 184 | focus_effect(NULL), phosphor_effect(NULL), deconverge_effect(NULL), color_effect(NULL), yiq_encode_effect(NULL), yiq_decode_effect(NULL), bloom_effect(NULL), |
81 | 185 | downsample_effect(NULL), vector_effect(NULL), fsfx_vertices(NULL), curr_texture(NULL), curr_render_target(NULL), curr_poly(NULL) |
186 | ||
82 | 187 | { |
83 | 188 | master_enable = false; |
84 | 189 | vector_enable = true; |
85 | hlsl_prescale_x = 1; | |
86 | hlsl_prescale_x = 1; | |
190 | prescale_size_x = 1; | |
191 | prescale_size_y = 1; | |
192 | prescale_force_x = 0; | |
193 | prescale_force_y = 0; | |
87 | 194 | preset = -1; |
88 | 195 | shadow_texture = NULL; |
89 | 196 | options = NULL; |
r250315 | r250316 | |
101 | 208 | |
102 | 209 | shaders::~shaders() |
103 | 210 | { |
104 | if (options != NULL) | |
105 | { | |
106 | last_options = *options; | |
107 | } | |
108 | options = NULL; | |
109 | ||
211 | global_free(options); | |
110 | 212 | cache_target *currcache = cachehead; |
111 | 213 | while(cachehead != NULL) |
112 | 214 | { |
r250315 | r250316 | |
422 | 524 | { |
423 | 525 | if (initialized) |
424 | 526 | { |
425 | // free shader resources before renderer resources | |
426 | 527 | delete_resources(false); |
427 | ||
428 | g_slider_list = NULL; | |
429 | 528 | } |
430 | ||
431 | 529 | master_enable = !master_enable; |
432 | ||
433 | // free shader resources and re-create | |
434 | d3d->device_delete_resources(); | |
435 | d3d->device_create_resources(); | |
436 | 530 | } |
437 | 531 | else |
438 | 532 | { |
439 | master_enable = !master_enable; | |
440 | ||
441 | // free shader resources and re-create | |
442 | d3d->device_delete_resources(); | |
443 | d3d->device_create_resources(); | |
444 | ||
445 | 533 | if (!initialized) |
446 | 534 | { |
447 | | |
535 | master_enable = !master_enable; | |
448 | 536 | bool failed = create_resources(false); |
449 | 537 | if (failed) |
450 | 538 | { |
451 | 539 | master_enable = false; |
452 | 540 | } |
453 | else | |
454 | { | |
455 | g_slider_list = init_slider_list(); | |
456 | } | |
457 | 541 | } |
542 | else | |
543 | { | |
544 | master_enable = !master_enable; | |
545 | } | |
458 | 546 | } |
459 | 547 | } |
460 | 548 | |
r250315 | r250316 | |
654 | 742 | |
655 | 743 | void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *renderer) |
656 | 744 | { |
657 | if (&machine->system() == &GAME_NAME(___empty)) | |
658 | { | |
659 | return; | |
660 | } | |
661 | ||
662 | 745 | if (!d3dintf->post_fx_available) |
663 | 746 | { |
664 | 747 | return; |
r250315 | r250316 | |
675 | 758 | this->d3dintf = d3dintf; |
676 | 759 | this->machine = machine; |
677 | 760 | this->d3d = renderer; |
678 | this->options = renderer->get_shaders_options(); | |
679 | 761 | |
762 | master_enable = downcast<windows_options &>(machine->options()).d3d_hlsl_enable(); | |
763 | prescale_size_x = 1; | |
764 | prescale_size_y = 1; | |
765 | preset = downcast<windows_options &>(machine->options()).d3d_hlsl_preset(); | |
766 | if (preset < -1 || preset > 3) | |
767 | { | |
768 | preset = -1; | |
769 | } | |
770 | ||
771 | snap_width = downcast<windows_options &>(machine->options()).d3d_snap_width(); | |
772 | snap_height = downcast<windows_options &>(machine->options()).d3d_snap_height(); | |
773 | prescale_force_x = 0; | |
774 | prescale_force_y = 0; | |
775 | ||
680 | 776 | windows_options &winoptions = downcast<windows_options &>(machine->options()); |
681 | 777 | |
682 | master_enable = winoptions.d3d_hlsl_enable(); | |
683 | hlsl_prescale_x = winoptions.d3d_hlsl_prescale_x(); | |
684 | hlsl_prescale_y = winoptions.d3d_hlsl_prescale_y(); | |
685 | snap_width = winoptions.d3d_snap_width(); | |
686 | snap_height = winoptions.d3d_snap_height(); | |
778 | options = (hlsl_options*)global_alloc_clear(hlsl_options); | |
687 | 779 | |
688 | if (last_options.params_init) | |
689 | { | |
690 | options = &last_options; | |
691 | } | |
780 | options->params_dirty = true; | |
781 | strcpy(options->shadow_mask_texture, downcast<windows_options &>(machine->options()).screen_shadow_mask_texture()); // unsafe | |
692 | 782 | |
693 | if (!options->params_init) | |
783 | prescale_force_x = winoptions.d3d_hlsl_prescale_x(); | |
784 | prescale_force_y = winoptions.d3d_hlsl_prescale_y(); | |
785 | if (preset == -1) | |
694 | 786 | { |
695 | strncpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture(), sizeof(options->shadow_mask_texture)); | |
696 | 787 | options->shadow_mask_alpha = winoptions.screen_shadow_mask_alpha(); |
697 | 788 | options->shadow_mask_count_x = winoptions.screen_shadow_mask_count_x(); |
698 | 789 | options->shadow_mask_count_y = winoptions.screen_shadow_mask_count_y(); |
r250315 | r250316 | |
725 | 816 | get_vector(winoptions.screen_floor(), 3, options->floor, TRUE); |
726 | 817 | get_vector(winoptions.screen_phosphor(), 3, options->phosphor, TRUE); |
727 | 818 | options->saturation = winoptions.screen_saturation(); |
728 | options->yiq_enable = winoptions.screen_yiq_enable(); | |
729 | options->yiq_cc = winoptions.screen_yiq_cc(); | |
730 | options->yiq_a = winoptions.screen_yiq_a(); | |
731 | options->yiq_b = winoptions.screen_yiq_b(); | |
732 | options->yiq_o = winoptions.screen_yiq_o(); | |
733 | options->yiq_p = winoptions.screen_yiq_p(); | |
734 | options->yiq_n = winoptions.screen_yiq_n(); | |
735 | options->yiq_y = winoptions.screen_yiq_y(); | |
736 | options->yiq_i = winoptions.screen_yiq_i(); | |
737 | options->yiq_q = winoptions.screen_yiq_q(); | |
738 | options->yiq_scan_time = winoptions.screen_yiq_scan_time(); | |
739 | options->yiq_phase_count = winoptions.screen_yiq_phase_count(); | |
740 | options->vector_length_scale = winoptions.screen_vector_length_scale(); | |
741 | options->vector_length_ratio = winoptions.screen_vector_length_ratio(); | |
742 | options->bloom_scale = winoptions.screen_bloom_scale(); | |
743 | get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE); | |
744 | options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight(); | |
745 | options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight(); | |
746 | options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight(); | |
747 | options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight(); | |
748 | options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight(); | |
749 | options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight(); | |
750 | options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight(); | |
751 | options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight(); | |
752 | options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight(); | |
753 | options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight(); | |
754 | options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight(); | |
755 | ||
756 | options->params_init = true; | |
757 | 819 | } |
820 | else | |
821 | { | |
822 | options = &s_hlsl_presets[preset]; | |
823 | } | |
758 | 824 | |
825 | options->yiq_enable = winoptions.screen_yiq_enable(); | |
826 | options->yiq_cc = winoptions.screen_yiq_cc(); | |
827 | options->yiq_a = winoptions.screen_yiq_a(); | |
828 | options->yiq_b = winoptions.screen_yiq_b(); | |
829 | options->yiq_o = winoptions.screen_yiq_o(); | |
830 | options->yiq_p = winoptions.screen_yiq_p(); | |
831 | options->yiq_n = winoptions.screen_yiq_n(); | |
832 | options->yiq_y = winoptions.screen_yiq_y(); | |
833 | options->yiq_i = winoptions.screen_yiq_i(); | |
834 | options->yiq_q = winoptions.screen_yiq_q(); | |
835 | options->yiq_scan_time = winoptions.screen_yiq_scan_time(); | |
836 | options->yiq_phase_count = winoptions.screen_yiq_phase_count(); | |
837 | options->vector_length_scale = winoptions.screen_vector_length_scale(); | |
838 | options->vector_length_ratio = winoptions.screen_vector_length_ratio(); | |
839 | options->bloom_scale = winoptions.screen_bloom_scale(); | |
840 | get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE); | |
841 | options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight(); | |
842 | options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight(); | |
843 | options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight(); | |
844 | options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight(); | |
845 | options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight(); | |
846 | options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight(); | |
847 | options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight(); | |
848 | options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight(); | |
849 | options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight(); | |
850 | options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight(); | |
851 | options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight(); | |
852 | ||
759 | 853 | options->params_dirty = true; |
760 | 854 | |
761 | 855 | g_slider_list = init_slider_list(); |
r250315 | r250316 | |
977 | 1071 | color_effect->add_uniform("Saturation", uniform::UT_FLOAT, uniform::CU_COLOR_SATURATION); |
978 | 1072 | |
979 | 1073 | prescale_effect->add_uniform("ScreenDims", uniform::UT_VEC2, uniform::CU_SCREEN_DIMS); |
1074 | prescale_effect->add_uniform("SourceDims", uniform::UT_VEC2, uniform::CU_SOURCE_DIMS); | |
980 | 1075 | |
981 | 1076 | deconverge_effect->add_uniform("ScreenDims", uniform::UT_VEC2, uniform::CU_SCREEN_DIMS); |
982 | 1077 | deconverge_effect->add_uniform("SourceDims", uniform::UT_VEC2, uniform::CU_SOURCE_DIMS); |
r250315 | r250316 | |
1000 | 1095 | bloom_effect->add_uniform("TargetDims", uniform::UT_VEC2, uniform::CU_TARGET_DIMS); |
1001 | 1096 | |
1002 | 1097 | post_effect->add_uniform("SourceDims", uniform::UT_VEC2, uniform::CU_SOURCE_DIMS); |
1003 | post_effect->add_uniform("SourceRect", uniform::UT_VEC2, uniform::CU_SOURCE_RECT); | |
1098 | post_effect->add_uniform("SourceRect", uniform::UT_VEC2, uniform::CU_SOURCE_RECT); // backward compatibility | |
1004 | 1099 | post_effect->add_uniform("ScreenDims", uniform::UT_VEC2, uniform::CU_SCREEN_DIMS); |
1005 | 1100 | post_effect->add_uniform("TargetDims", uniform::UT_VEC2, uniform::CU_TARGET_DIMS); |
1006 | 1101 | post_effect->add_uniform("QuadDims", uniform::UT_VEC2, uniform::CU_QUAD_DIMS); // backward compatibility |
r250315 | r250316 | |
1366 | 1461 | texture_info *texture = poly->get_texture(); |
1367 | 1462 | |
1368 | 1463 | bool prepare_vector = |
1369 | (machine->first_screen()->screen_type() & SCREEN_TYPE_VECTOR) == SCREEN_TYPE_VECTOR; | |
1370 | bool prepare_raster = | |
1371 | (machine->first_screen()->screen_type() & SCREEN_TYPE_RASTER) == SCREEN_TYPE_RASTER; | |
1464 | PRIMFLAG_GET_VECTORBUF(poly->get_flags()) && vector_enable; | |
1372 | 1465 | bool orientation_swap_xy = |
1373 | 1466 | (d3d->window().machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY; |
1374 | 1467 | bool rotation_swap_xy = |
r250315 | r250316 | |
1383 | 1476 | ? 3 |
1384 | 1477 | : 0; |
1385 | 1478 | |
1386 | screen_device_iterator screen_iterator(machine->root_device()); | |
1387 | screen_device *screen = screen_iterator.first(); | |
1388 | for (int i = 0; i < curr_screen; i++) | |
1389 | { | |
1390 | screen = screen_iterator.next(); | |
1391 | } | |
1392 | render_container &screen_container = screen->container(); | |
1393 | ||
1394 | float xscale = screen_container.xscale(); | |
1395 | float yscale = screen_container.yscale(); | |
1396 | float xoffset = -screen_container.xoffset(); | |
1397 | float yoffset = -screen_container.yoffset(); | |
1398 | ||
1399 | float screen_scale[2] = { xscale, yscale }; | |
1400 | float screen_offset[2] = { xoffset, yoffset }; | |
1401 | ||
1402 | 1479 | curr_effect = post_effect; |
1403 | 1480 | curr_effect->update_uniforms(); |
1404 | 1481 | curr_effect->set_texture("ShadowTexture", shadow_texture == NULL ? NULL : shadow_texture->get_finaltex()); |
1405 | 1482 | curr_effect->set_texture("DiffuseTexture", rt->prescale_texture[next_index]); |
1406 | curr_effect->set_vector("ScreenScale", 2, screen_scale); | |
1407 | curr_effect->set_vector("ScreenOffset", 2, screen_offset); | |
1408 | 1483 | curr_effect->set_float("ScanlineOffset", texture->get_cur_frame() == 0 ? 0.0f : options->scanline_offset); |
1409 | 1484 | curr_effect->set_bool("OrientationSwapXY", orientation_swap_xy); |
1410 | 1485 | curr_effect->set_bool("RotationSwapXY", rotation_swap_xy); |
1411 | 1486 | curr_effect->set_int("RotationType", rotation_type); // backward compatibility |
1412 | 1487 | curr_effect->set_bool("PrepareBloom", prepare_bloom); |
1413 | 1488 | curr_effect->set_bool("PrepareVector", prepare_vector); |
1414 | curr_effect->set_bool("PrepareRaster", prepare_raster); | |
1415 | 1489 | |
1416 | 1490 | next_index = rt->next_index(next_index); |
1417 | 1491 | blit(prepare_bloom ? rt->native_target[next_index] : rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count()); |
r250315 | r250316 | |
1424 | 1498 | int next_index = source_index; |
1425 | 1499 | |
1426 | 1500 | bool prepare_vector = |
1427 | | |
1501 | PRIMFLAG_GET_VECTORBUF(poly->get_flags()) && vector_enable; | |
1428 | 1502 | float bloom_rescale = options->bloom_scale; |
1429 | 1503 | |
1430 | 1504 | // skip downsample if no influencing settings |
r250315 | r250316 | |
1628 | 1702 | { |
1629 | 1703 | int next_index = source_index; |
1630 | 1704 | |
1631 | bool prepare_vector = | |
1632 | (machine->first_screen()->screen_type() & SCREEN_TYPE_VECTOR) == SCREEN_TYPE_VECTOR; | |
1705 | bool prepare_vector = PRIMFLAG_GET_VECTORBUF(poly->get_flags()) && vector_enable; | |
1633 | 1706 | |
1634 | 1707 | curr_effect = default_effect; |
1635 | 1708 | curr_effect->update_uniforms(); |
r250315 | r250316 | |
1683 | 1756 | |
1684 | 1757 | if (PRIMFLAG_GET_SCREENTEX(d3d->get_last_texture_flags()) && curr_texture != NULL) |
1685 | 1758 | { |
1686 | curr_screen = curr_screen < num_screens ? curr_screen : 0; | |
1687 | ||
1688 | 1759 | curr_render_target = find_render_target(curr_texture); |
1689 | 1760 | |
1690 | 1761 | render_target *rt = curr_render_target; |
r250315 | r250316 | |
1726 | 1797 | curr_texture->mask_frame_count(options->yiq_phase_count); |
1727 | 1798 | |
1728 | 1799 | options->params_dirty = false; |
1729 | ||
1730 | curr_screen++; | |
1731 | 1800 | } |
1732 | 1801 | else if (PRIMFLAG_GET_VECTOR(poly->get_flags()) && vector_enable) |
1733 | 1802 | { |
r250315 | r250316 | |
1994 | 2063 | |
1995 | 2064 | enumerate_screens(); |
1996 | 2065 | |
2066 | hlsl_prescale_x = prescale_force_x; | |
2067 | hlsl_prescale_y = prescale_force_y; | |
2068 | ||
1997 | 2069 | // Find the nearest prescale factor that is over our screen size |
1998 | 2070 | if (hlsl_prescale_x == 0) |
1999 | 2071 | { |
r250315 | r250316 | |
2173 | 2245 | // get_vector |
2174 | 2246 | //============================================================ |
2175 | 2247 | |
2176 | static void get_vector(const char *data, int count, float *out, | |
2248 | static void get_vector(const char *data, int count, float *out, int report_error) | |
2177 | 2249 | { |
2178 | 2250 | if (count > 3 && |
2179 | 2251 | sscanf(data, "%f,%f,%f,%f", &out[0], &out[1], &out[2], &out[3]) < 4 && report_error) |
r250315 | r250316 | |
2198 | 2270 | } |
2199 | 2271 | |
2200 | 2272 | |
2201 | //============================================================ | |
2202 | // slider_alloc - allocate a new slider entry | |
2203 | // currently duplicated from ui.c, this could | |
2204 | // be done in a more ideal way. | |
2205 | //============================================================ | |
2273 | /*------------------------------------------------- | |
2274 | slider_alloc - allocate a new slider entry | |
2275 | currently duplicated from ui.c, this could | |
2276 | be done in a more ideal way. | |
2277 | -------------------------------------------------*/ | |
2206 | 2278 | |
2207 | 2279 | static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg) |
2208 | 2280 | { |
r250315 | r250316 | |
2702 | 2774 | return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", str, newval); |
2703 | 2775 | } |
2704 | 2776 | |
2705 | hlsl_options shaders::last_options = { false }; | |
2706 | 2777 | |
2778 | //============================================================ | |
2779 | // init_slider_list | |
2780 | //============================================================ | |
2781 | ||
2707 | 2782 | shaders::slider_desc shaders::s_sliders[] = |
2708 | 2783 | { |
2709 | { "Vector Length Attenuation", 0, 50, 100, 1, 2, slider_vector_attenuation }, | |
2710 | { "Vector Attenuation Length Limit", 1, 500, 1000, 1, 2, slider_vector_length_max }, | |
2711 | { "Shadow Mask Darkness", 0, 0, 100, 1, 7, slider_shadow_mask_alpha }, | |
2712 | { "Shadow Mask X Count", 1, 1, 1024, 1, 7, slider_shadow_mask_x_count }, | |
2713 | { "Shadow Mask Y Count", 1, 1, 1024, 1, 7, slider_shadow_mask_y_count }, | |
2714 | { "Shadow Mask Pixel Count X", 1, 1, 64, 1, 7, slider_shadow_mask_usize }, | |
2715 | { "Shadow Mask Pixel Count Y", 1, 1, 64, 1, 7, slider_shadow_mask_vsize }, | |
2716 | { "Shadow Mask Offset X", -100, 0, 100, 1, 7, slider_shadow_mask_uoffset }, | |
2717 | { "Shadow Mask Offset Y", -100, 0, 100, 1, 7, slider_shadow_mask_voffset }, | |
2718 | { "Screen Curvature", 0, 0, 100, 1, 7, slider_curvature }, | |
2719 | { "Screen Round Corner", 0, 0, 100, 1, 7, slider_round_corner }, | |
2720 | { "Screen Smooth Border", 0, 0, 100, 1, 7, slider_smooth_border }, | |
2721 | { "Screen Reflection", 0, 0, 100, 1, 7, slider_reflection }, | |
2722 | { "Image Vignetting", 0, 0, 100, 1, 7, slider_vignetting }, | |
2723 | { "Scanline Darkness", 0, 0, 100, 1, 1, slider_scanline_alpha }, | |
2724 | { "Scanline Screen Height", 1, 20, 80, 1, 1, slider_scanline_scale }, | |
2725 | { "Scanline Indiv. Height", 1, 20, 80, 1, 1, slider_scanline_height }, | |
2726 | { "Scanline Brightness", 0, 20, 40, 1, 1, slider_scanline_bright_scale }, | |
2727 | { "Scanline Brightness Overdrive", 0, 0, 20, 1, 1, slider_scanline_bright_offset }, | |
2728 | { "Scanline Jitter", 0, 0, 40, 1, 1, slider_scanline_offset }, | |
2729 | { "Defocus X", 0, 0, 64, 1, 3, slider_defocus_x }, | |
2730 | { "Defocus Y", 0, 0, 64, 1, 3, slider_defocus_y }, | |
2731 | { "Red Position Offset X", -1500, 0, 1500, 1, 3, slider_red_converge_x }, | |
2732 | { "Red Position Offset Y", -1500, 0, 1500, 1, 3, slider_red_converge_y }, | |
2733 | { "Green Position Offset X", -1500, 0, 1500, 1, 3, slider_green_converge_x }, | |
2734 | { "Green Position Offset Y", -1500, 0, 1500, 1, 3, slider_green_converge_y }, | |
2735 | { "Blue Position Offset X", -1500, 0, 1500, 1, 3, slider_blue_converge_x }, | |
2736 | { "Blue Position Offset Y", -1500, 0, 1500, 1, 3, slider_blue_converge_y }, | |
2737 | { "Red Convergence X", -1500, 0, 1500, 1, 3, slider_red_radial_converge_x }, | |
2738 | { "Red Convergence Y", -1500, 0, 1500, 1, 3, slider_red_radial_converge_y }, | |
2739 | { "Green Convergence X", -1500, 0, 1500, 1, 3, slider_green_radial_converge_x }, | |
2740 | { "Green Convergence Y", -1500, 0, 1500, 1, 3, slider_green_radial_converge_y }, | |
2741 | { "Blue Convergence X", -1500, 0, 1500, 1, 3, slider_blue_radial_converge_x }, | |
2742 | { "Blue Convergence Y", -1500, 0, 1500, 1, 3, slider_blue_radial_converge_y }, | |
2743 | { "Red Output from Red Input", -400, 0, 400, 5, 7, slider_red_from_r }, | |
2744 | { "Red Output from Green Input", -400, 0, 400, 5, 7, slider_red_from_g }, | |
2745 | { "Red Output from Blue Input", -400, 0, 400, 5, 7, slider_red_from_b }, | |
2746 | { "Green Output from Red Input", -400, 0, 400, 5, 7, slider_green_from_r }, | |
2747 | { "Green Output from Green Input", -400, 0, 400, 5, 7, slider_green_from_g }, | |
2748 | { "Green Output from Blue Input", -400, 0, 400, 5, 7, slider_green_from_b }, | |
2749 | { "Blue Output from Red Input", -400, 0, 400, 5, 7, slider_blue_from_r }, | |
2750 | { "Blue Output from Green Input", -400, 0, 400, 5, 7, slider_blue_from_g }, | |
2751 | { "Blue Output from Blue Input", -400, 0, 400, 5, 7, slider_blue_from_b }, | |
2752 | { "Saturation", 0, 100, 400, 1, 7, slider_saturation }, | |
2753 | { "Red DC Offset", -100, 0, 100, 1, 7, slider_red_offset }, | |
2754 | { "Green DC Offset", -100, 0, 100, 1, 7, slider_green_offset }, | |
2755 | { "Blue DC Offset", -100, 0, 100, 1, 7, slider_blue_offset }, | |
2756 | { "Red Scale", -200, 100, 200, 1, 7, slider_red_scale }, | |
2757 | { "Green Scale", -200, 100, 200, 1, 7, slider_green_scale }, | |
2758 | { "Blue Scale", -200, 100, 200, 1, 7, slider_blue_scale }, | |
2759 | { "Red Gamma", -80, 0, 80, 1, 7, slider_red_power }, | |
2760 | { "Green Gamma", -80, 0, 80, 1, 7, slider_green_power }, | |
2761 | { "Blue Gamma", -80, 0, 80, 1, 7, slider_blue_power }, | |
2762 | { "Red Floor", 0, 0, 100, 1, 7, slider_red_floor }, | |
2763 | { "Green Floor", 0, 0, 100, 1, 7, slider_green_floor }, | |
2764 | { "Blue Floor", 0, 0, 100, 1, 7, slider_blue_floor }, | |
2765 | { "Red Phosphor Life", 0, 0, 100, 1, 7, slider_red_phosphor_life }, | |
2766 | { "Green Phosphor Life", 0, 0, 100, 1, 7, slider_green_phosphor_life }, | |
2767 | { "Blue Phosphor Life", 0, 0, 100, 1, 7, slider_blue_phosphor_life }, | |
2768 | { "Bloom Scale", 0, 0, 2000, 5, 7, slider_bloom_scale }, | |
2769 | { "Bloom Red Overdrive", 0, 0, 2000, 5, 7, slider_bloom_red_overdrive }, | |
2770 | { "Bloom Green Overdrive", 0, 0, 2000, 5, 7, slider_bloom_green_overdrive }, | |
2771 | { "Bloom Blue Overdrive", 0, 0, 2000, 5, 7, slider_bloom_blue_overdrive }, | |
2772 | { "Bloom Level 0 Scale", 0, 100, 100, 1, 7, slider_bloom_lvl0_scale }, | |
2773 | { "Bloom Level 1 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl1_scale }, | |
2774 | { "Bloom Level 2 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl2_scale }, | |
2775 | { "Bloom Level 3 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl3_scale }, | |
2776 | { "Bloom Level 4 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl4_scale }, | |
2777 | { "Bloom Level 5 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl5_scale }, | |
2778 | { "Bloom Level 6 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl6_scale }, | |
2779 | { "Bloom Level 7 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl7_scale }, | |
2780 | { "Bloom Level 8 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl8_scale }, | |
2781 | { "Bloom Level 9 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl9_scale }, | |
2782 | { "Bloom Level 10 Scale", 0, 0, 100, 1, 7, slider_bloom_lvl10_scale }, | |
2783 | { NULL, 0, 0, 0, 0, 0, NULL }, | |
2784 | { "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha }, | |
2785 | { "Shadow Mask X Count", 1, 6, 1024, 1, slider_shadow_mask_x_count }, | |
2786 | { "Shadow Mask Y Count", 1, 6, 1024, 1, slider_shadow_mask_y_count }, | |
2787 | { "Shadow Mask Pixel Count X", 1, 6, 64, 1, slider_shadow_mask_usize }, | |
2788 | { "Shadow Mask Pixel Count Y", 1, 6, 64, 1, slider_shadow_mask_vsize }, | |
2789 | { "Shadow Mask Offset X", -100, 0, 100, 1, slider_shadow_mask_uoffset }, | |
2790 | { "Shadow Mask Offset Y", -100, 0, 100, 1, slider_shadow_mask_voffset }, | |
2791 | { "Screen Curvature", 0, 0, 100, 1, slider_curvature }, | |
2792 | { "Screen Round Corner", 0, 0, 100, 1, slider_round_corner }, | |
2793 | { "Screen Smooth Border", 0, 0, 100, 1, slider_smooth_border }, | |
2794 | { "Screen Reflection", 0, 0, 100, 1, slider_reflection }, | |
2795 | { "Image Vignetting", 0, 0, 100, 1, slider_vignetting }, | |
2796 | { "Scanline Darkness", 0, 100, 100, 1, slider_scanline_alpha }, | |
2797 | { "Scanline Screen Height", 1, 20, 80, 1, slider_scanline_scale }, | |
2798 | { "Scanline Indiv. Height", 1, 20, 80, 1, slider_scanline_height }, | |
2799 | { "Scanline Brightness", 0, 20, 40, 1, slider_scanline_bright_scale }, | |
2800 | { "Scanline Brightness Overdrive", 0, 0, 20, 1, slider_scanline_bright_offset }, | |
2801 | { "Scanline Jitter", 0, 0, 40, 1, slider_scanline_offset }, | |
2802 | { "Defocus X", 0, 0, 64, 1, slider_defocus_x }, | |
2803 | { "Defocus Y", 0, 0, 64, 1, slider_defocus_y }, | |
2804 | { "Red Position Offset X", -1500, 3, 1500, 1, slider_red_converge_x }, | |
2805 | { "Red Position Offset Y", -1500, 0, 1500, 1, slider_red_converge_y }, | |
2806 | { "Green Position Offset X", -1500, 0, 1500, 1, slider_green_converge_x }, | |
2807 | { "Green Position Offset Y", -1500, 3, 1500, 1, slider_green_converge_y }, | |
2808 | { "Blue Position Offset X", -1500, 3, 1500, 1, slider_blue_converge_x }, | |
2809 | { "Blue Position Offset Y", -1500, 3, 1500, 1, slider_blue_converge_y }, | |
2810 | { "Red Convergence X", -1500, 0, 1500, 1, slider_red_radial_converge_x }, | |
2811 | { "Red Convergence Y", -1500, 0, 1500, 1, slider_red_radial_converge_y }, | |
2812 | { "Green Convergence X", -1500, 0, 1500, 1, slider_green_radial_converge_x }, | |
2813 | { "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y }, | |
2814 | { "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x }, | |
2815 | { "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y }, | |
2816 | { "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r }, | |
2817 | { "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g }, | |
2818 | { "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b }, | |
2819 | { "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r }, | |
2820 | { "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g }, | |
2821 | { "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b }, | |
2822 | { "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r }, | |
2823 | { "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g }, | |
2824 | { "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b }, | |
2825 | { "Saturation", 0, 140, 400, 1, slider_saturation }, | |
2826 | { "Red DC Offset", -100, 0, 100, 1, slider_red_offset }, | |
2827 | { "Green DC Offset", -100, 0, 100, 1, slider_green_offset }, | |
2828 | { "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset }, | |
2829 | { "Red Scale", -200, 95, 200, 1, slider_red_scale }, | |
2830 | { "Green Scale", -200, 95, 200, 1, slider_green_scale }, | |
2831 | { "Blue Scale", -200, 95, 200, 1, slider_blue_scale }, | |
2832 | { "Red Gamma", -80, 16, 80, 1, slider_red_power }, | |
2833 | { "Green Gamma", -80, 16, 80, 1, slider_green_power }, | |
2834 | { "Blue Gamma", -80, 16, 80, 1, slider_blue_power }, | |
2835 | { "Red Floor", 0, 5, 100, 1, slider_red_floor }, | |
2836 | { "Green Floor", 0, 5, 100, 1, slider_green_floor }, | |
2837 | { "Blue Floor", 0, 5, 100, 1, slider_blue_floor }, | |
2838 | { "Red Phosphor Life", 0, 40, 100, 1, slider_red_phosphor_life }, | |
2839 | { "Green Phosphor Life", 0, 40, 100, 1, slider_green_phosphor_life }, | |
2840 | { "Blue Phosphor Life", 0, 40, 100, 1, slider_blue_phosphor_life }, | |
2841 | { "Vector Length Attenuation", 0, 80, 100, 1, slider_vector_attenuation }, | |
2842 | { "Vector Attenuation Length Limit", 1, 500, 1000, 1, slider_vector_length_max }, | |
2843 | { "Bloom Scale", 0, 250, 2000, 5, slider_bloom_scale }, | |
2844 | { "Bloom Red Overdrive", 0, 250, 2000, 5, slider_bloom_red_overdrive }, | |
2845 | { "Bloom Green Overdrive", 0, 250, 2000, 5, slider_bloom_green_overdrive }, | |
2846 | { "Bloom Blue Overdrive", 0, 250, 2000, 5, slider_bloom_blue_overdrive }, | |
2847 | { "Bloom Level 0 Scale", 0, 100, 100, 1, slider_bloom_lvl0_scale }, | |
2848 | { "Bloom Level 1 Scale", 0, 21, 100, 1, slider_bloom_lvl1_scale }, | |
2849 | { "Bloom Level 2 Scale", 0, 19, 100, 1, slider_bloom_lvl2_scale }, | |
2850 | { "Bloom Level 3 Scale", 0, 17, 100, 1, slider_bloom_lvl3_scale }, | |
2851 | { "Bloom Level 4 Scale", 0, 15, 100, 1, slider_bloom_lvl4_scale }, | |
2852 | { "Bloom Level 5 Scale", 0, 14, 100, 1, slider_bloom_lvl5_scale }, | |
2853 | { "Bloom Level 6 Scale", 0, 13, 100, 1, slider_bloom_lvl6_scale }, | |
2854 | { "Bloom Level 7 Scale", 0, 12, 100, 1, slider_bloom_lvl7_scale }, | |
2855 | { "Bloom Level 8 Scale", 0, 11, 100, 1, slider_bloom_lvl8_scale }, | |
2856 | { "Bloom Level 9 Scale", 0, 10, 100, 1, slider_bloom_lvl9_scale }, | |
2857 | { "Bloom Level 10 Scale", 0, 9, 100, 1, slider_bloom_lvl10_scale }, | |
2858 | { NULL, 0, 0, 0, 0, NULL }, | |
2784 | 2859 | }; |
2785 | 2860 | |
2786 | ||
2787 | //============================================================ | |
2788 | // init_slider_list | |
2789 | //============================================================ | |
2790 | ||
2791 | 2861 | slider_state *shaders::init_slider_list() |
2792 | 2862 | { |
2793 | 2863 | if (!master_enable || !d3dintf->post_fx_available) |
r250315 | r250316 | |
2802 | 2872 | for (int index = 0; s_sliders[index].name != NULL; index++) |
2803 | 2873 | { |
2804 | 2874 | slider_desc *slider = &s_sliders[index]; |
2805 | ||
2806 | int screen_type = machine->first_screen()->screen_type(); | |
2807 | if ((screen_type == SCREEN_TYPE_VECTOR && (slider->screen_type & SLIDER_SCREEN_TYPE_VECTOR) == SLIDER_SCREEN_TYPE_VECTOR) || | |
2808 | (screen_type == SCREEN_TYPE_RASTER && (slider->screen_type & SLIDER_SCREEN_TYPE_RASTER) == SLIDER_SCREEN_TYPE_RASTER) || | |
2809 | (screen_type == SCREEN_TYPE_LCD && (slider->screen_type & SLIDER_SCREEN_TYPE_LCD) == SLIDER_SCREEN_TYPE_LCD)) | |
2810 | { | |
2811 | *tailptr = slider_alloc(*machine, slider->name, slider->minval, slider->defval, slider->maxval, slider->step, slider->adjustor, (void*)options); | |
2812 | tailptr = &(*tailptr)->next; | |
2813 | } | |
2875 | *tailptr = slider_alloc(*machine, slider->name, slider->minval, slider->defval, slider->maxval, slider->step, slider->adjustor, (void*)options); | |
2876 | tailptr = &(*tailptr)->next; | |
2814 | 2877 | } |
2815 | 2878 | |
2816 | 2879 | return listhead; |
r250315 | r250316 | |
---|---|---|
186 | 186 | /* in the future this will be moved into an OSD/emu shared buffer */ |
187 | 187 | struct hlsl_options |
188 | 188 | { |
189 | bool params_init; | |
190 | 189 | bool params_dirty; |
191 | 190 | float shadow_mask_alpha; |
192 | 191 | char shadow_mask_texture[1024]; |
r250315 | r250316 | |
310 | 309 | // slider-related functions |
311 | 310 | slider_state *init_slider_list(); |
312 | 311 | |
313 | enum slider_screen_type | |
314 | { | |
315 | SLIDER_SCREEN_TYPE_NONE = 0, | |
316 | SLIDER_SCREEN_TYPE_RASTER = 1, | |
317 | SLIDER_SCREEN_TYPE_VECTOR = 2, | |
318 | SLIDER_SCREEN_TYPE_LCD = 4 | |
319 | }; | |
320 | ||
321 | 312 | struct slider_desc |
322 | 313 | { |
323 | 314 | const char * name; |
r250315 | r250316 | |
325 | 316 | int defval; |
326 | 317 | int maxval; |
327 | 318 | int step; |
328 | int screen_type; | |
329 | 319 | INT32(*adjustor)(running_machine &, void *, std::string *, INT32); |
330 | 320 | }; |
331 | 321 | |
r250315 | r250316 | |
372 | 362 | int lastidx; // index of the last-encountered target |
373 | 363 | bool write_ini; // enable external ini saving |
374 | 364 | bool read_ini; // enable external ini loading |
365 | int prescale_force_x; // prescale force x | |
366 | int prescale_force_y; // prescale force y | |
367 | int prescale_size_x; // prescale size x | |
368 | int prescale_size_y; // prescale size y | |
375 | 369 | int hlsl_prescale_x; // hlsl prescale x |
376 | 370 | int hlsl_prescale_y; // hlsl prescale y |
377 | 371 | float bloom_dims[11][2]; // bloom texture dimensions |
r250315 | r250316 | |
379 | 373 | int preset; // preset, if relevant |
380 | 374 | bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader |
381 | 375 | texture_info * shadow_texture; // shadow mask texture for post-processing shader |
382 | hlsl_options * options; // current | |
376 | hlsl_options * options; // current uniform state | |
383 | 377 | D3DPRIMITIVETYPE vecbuf_type; |
384 | 378 | UINT32 vecbuf_index; |
385 | 379 | UINT32 vecbuf_count; |
r250315 | r250316 | |
430 | 424 | texture_info * curr_texture; |
431 | 425 | render_target * curr_render_target; |
432 | 426 | poly_info * curr_poly; |
427 | ||
428 | public: | |
433 | 429 | render_target * targethead; |
434 | 430 | cache_target * cachehead; |
435 | 431 | |
436 | 432 | static slider_desc s_sliders[]; |
437 | static hlsl_options l | |
433 | static hlsl_options s_hlsl_presets[4]; | |
438 | 434 | }; |
439 | 435 | |
440 | 436 | } |
r250315 | r250316 | |
---|---|---|
245 | 245 | window().target()->set_bounds(rect_width(&client), rect_height(&client), window().aspect()); |
246 | 246 | window().target()->set_max_update_rate((get_refresh() == 0) ? get_origmode().RefreshRate : get_refresh()); |
247 | 247 | } |
248 | if (m_shaders != NULL) | |
249 | { | |
250 | window().target()->set_transform_primitives(!m_shaders->enabled()); | |
251 | } | |
252 | 248 | return &window().target()->get_primitives(); |
253 | 249 | } |
254 | 250 | |
r250315 | r250316 | |
619 | 615 | : osd_renderer(window, FLAG_NONE), m_adapter(0), m_width(0), m_height(0), m_refresh(0), m_create_error_count(0), m_device(NULL), m_gamma_supported(0), m_pixformat(), |
620 | 616 | m_vertexbuf(NULL), m_lockedbuf(NULL), m_numverts(0), m_vectorbatch(NULL), m_batchindex(0), m_numpolys(0), m_restarting(false), m_mod2x_supported(0), m_mod4x_supported(0), |
621 | 617 | m_screen_format(), m_last_texture(NULL), m_last_texture_flags(0), m_last_blendenable(0), m_last_blendop(0), m_last_blendsrc(0), m_last_blenddst(0), m_last_filter(0), |
622 | m_last_wrap(), m_last_modmode(0), m_hlsl_buf(NULL), m_shaders(NULL), m_ | |
618 | m_last_wrap(), m_last_modmode(0), m_hlsl_buf(NULL), m_shaders(NULL), m_texture_manager(NULL), m_line_count(0) | |
623 | 619 | { |
624 | 620 | } |
625 | 621 | |
r250315 | r250316 | |
647 | 643 | { |
648 | 644 | m_shaders->toggle(); |
649 | 645 | |
646 | // free all existing resources and re-create | |
647 | device_delete_resources(); | |
648 | device_create_resources(); | |
649 | ||
650 | 650 | m_restarting = false; |
651 | 651 | } |
652 | 652 | |
r250315 | r250316 | |
796 | 796 | { |
797 | 797 | // if a device exists, free it |
798 | 798 | if (m_device != NULL) |
799 | { | |
800 | 799 | device_delete(); |
801 | } | |
802 | 800 | |
803 | // create shader options only once | |
804 | if (m_shaders_options == NULL) | |
805 | { | |
806 | m_shaders_options = (hlsl_options*)global_alloc_clear(hlsl_options); | |
807 | m_shaders_options->params_init = false; | |
808 | } | |
809 | ||
810 | 801 | // verify the caps |
811 | 802 | int verify = device_verify_caps(); |
812 | 803 | if (verify == 2) |
r250315 | r250316 | |
815 | 806 | return 1; |
816 | 807 | } |
817 | 808 | if (verify == 1) |
818 | { | |
819 | 809 | osd_printf_warning("Warning: Device may not perform well for Direct3D rendering\n"); |
820 | } | |
821 | 810 | |
822 | 811 | // verify texture formats |
823 | 812 | HRESULT result = (*d3dintf->d3d.check_device_format)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8); |
r250315 | r250316 | |
998 | 987 | |
999 | 988 | renderer::~renderer() |
1000 | 989 | { |
1001 | if (m_shaders_options != NULL) | |
1002 | { | |
1003 | global_free(m_shaders_options); | |
1004 | } | |
1005 | m_shaders_options = NULL; | |
1006 | ||
1007 | 990 | device_delete(); |
1008 | 991 | } |
1009 | 992 | |
r250315 | r250316 | |
1060 | 1043 | { |
1061 | 1044 | int retval = 0; |
1062 | 1045 | |
1063 | m_shaders = (shaders*)global_alloc_clear(shaders); | |
1046 | m_shaders = global_alloc_clear(shaders); | |
1047 | // FIXME: Dynamic cast | |
1064 | 1048 | m_shaders->init(d3dintf, &window().machine(), this); |
1065 | 1049 | |
1066 | 1050 | DWORD tempcaps; |
r250315 | r250316 | |
---|---|---|
178 | 178 | texture_info * get_vector_texture() { return m_texture_manager->get_vector_texture(); } |
179 | 179 | |
180 | 180 | shaders * get_shaders() { return m_shaders; } |
181 | hlsl_options * get_shaders_options() { return m_shaders_options; } | |
182 | 181 | |
183 | 182 | private: |
184 | 183 | int m_adapter; // ordinal adapter number |
r250315 | r250316 | |
221 | 220 | |
222 | 221 | void * m_hlsl_buf; // HLSL vertex data |
223 | 222 | shaders * m_shaders; // HLSL interface |
224 | hlsl_options * m_shaders_options; // HLSL options | |
225 | 223 | |
226 | 224 | texture_manager * m_texture_manager; // texture manager |
227 | 225 |
r250315 | r250316 | |
---|---|---|
269 | 269 | // performance options |
270 | 270 | { NULL, NULL, OPTION_HEADER, "WINDOWS PERFORMANCE OPTIONS" }, |
271 | 271 | { WINOPTION_PRIORITY "(-15-1)", "0", OPTION_INTEGER, "thread priority for the main game thread; range from -15 to 1" }, |
272 | { WINOPTION_PROFILE, "0", OPTION_INTEGER, "enable | |
272 | { WINOPTION_PROFILE, "0", OPTION_INTEGER, "enable profiling, specifying the stack depth to track" }, | |
273 | 273 | |
274 | 274 | // video options |
275 | 275 | { NULL, NULL, OPTION_HEADER, "WINDOWS VIDEO OPTIONS" }, |
276 | { WINOPTION_MENU, "0", OPTION_BOOLEAN, "enable | |
276 | { WINOPTION_MENU, "0", OPTION_BOOLEAN, "enable menu bar if available by UI implementation" }, | |
277 | 277 | |
278 | 278 | // DirectDraw-specific options |
279 | 279 | { NULL, NULL, OPTION_HEADER, "DIRECTDRAW-SPECIFIC OPTIONS" }, |
280 | { WINOPTION_HWSTRETCH ";hws", "1", OPTION_BOOLEAN, "enable | |
280 | { WINOPTION_HWSTRETCH ";hws", "1", OPTION_BOOLEAN, "enable hardware stretching" }, | |
281 | 281 | |
282 | 282 | // post-processing options |
283 | { NULL, NULL, OPTION_HEADER, "DIRECT3D POST-PROCESSING OPTIONS" }, | |
284 | { WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enables HLSL post-processing (PS3.0 required)" }, | |
285 | { WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" }, | |
286 | { WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" }, | |
287 | { WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" }, | |
288 | { WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enables HLSL AVI writing (huge disk bandwidth suggested)" }, | |
289 | { WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" }, | |
290 | { WINOPTION_HLSL_SNAP_HEIGHT, "1536", OPTION_STRING, "HLSL upscaled-snapshot height" }, | |
291 | { WINOPTION_SHADOW_MASK_ALPHA";fs_shadwa(0.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask alpha-blend value (1.0 is fully blended, 0.0 is no mask)" }, | |
292 | { WINOPTION_SHADOW_MASK_TEXTURE";fs_shadwt(0.0-1.0)", "shadow-mask.png", OPTION_STRING, "shadow mask texture name" }, | |
293 | { WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww", "6", OPTION_INTEGER, "shadow mask tile width, in screen dimensions" }, | |
294 | { WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "4", OPTION_INTEGER, "shadow mask tile height, in screen dimensions" }, | |
295 | { WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture width, in U/V dimensions" }, | |
296 | { WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.25", OPTION_FLOAT, "shadow mask texture height, in U/V dimensions" }, | |
297 | { WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset, in U direction" }, | |
298 | { WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset, in V direction" }, | |
299 | { WINOPTION_CURVATURE";fs_curv(0.0-1.0)", "0.0", OPTION_FLOAT, "screen curvature amount" }, | |
300 | { WINOPTION_ROUND_CORNER";fs_rndc(0.0-1.0)", "0.0", OPTION_FLOAT, "screen round corner amount" }, | |
301 | { WINOPTION_SMOOTH_BORDER";fs_smob(0.0-1.0)", "0.0", OPTION_FLOAT, "screen smooth border amount" }, | |
302 | { WINOPTION_REFLECTION";fs_ref(0.0-1.0)", "0.0", OPTION_FLOAT, "screen reflection amount" }, | |
303 | { WINOPTION_VIGNETTING";fs_vig(0.0-1.0)", "0.0", OPTION_FLOAT, "image vignetting amount" }, | |
283 | { NULL, NULL, OPTION_HEADER, "DIRECT3D POST-PROCESSING OPTIONS" }, | |
284 | { WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enable HLSL post-processing (PS3.0 required)" }, | |
285 | { WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" }, | |
286 | { WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" }, | |
287 | { WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" }, | |
288 | { WINOPTION_HLSL_PRESET";(-1-3)", "-1", OPTION_INTEGER, "HLSL preset to use (0-3)" }, | |
289 | { WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enable HLSL AVI writing (huge disk bandwidth suggested)" }, | |
290 | { WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" }, | |
291 | { WINOPTION_HLSL_SNAP_HEIGHT, "1536", OPTION_STRING, "HLSL upscaled-snapshot height" }, | |
292 | { WINOPTION_SHADOW_MASK_ALPHA";fs_shadwa(0.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask alpha-blend value (1.0 is fully blended, 0.0 is no mask)" }, | |
293 | { WINOPTION_SHADOW_MASK_TEXTURE";fs_shadwt(0.0-1.0)", "aperture.png", OPTION_STRING, "shadow mask texture name" }, | |
294 | { WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww", "6", OPTION_INTEGER, "shadow mask width, in phosphor dots" }, | |
295 | { WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "6", OPTION_INTEGER, "shadow mask height, in phosphor dots" }, | |
296 | { WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in U direction" }, | |
297 | { WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in V direction" }, | |
298 | { WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset in U direction" }, | |
299 | { WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset in V direction" }, | |
300 | { WINOPTION_CURVATURE";fs_curv(0.0-1.0)", "0.0", OPTION_FLOAT, "screen curvature amount" }, | |
301 | { WINOPTION_ROUND_CORNER";fs_rndc(0.0-1.0)", "0.0", OPTION_FLOAT, "screen round corner amount" }, | |
302 | { WINOPTION_SMOOTH_BORDER";fs_smob(0.0-1.0)", "0.0", OPTION_FLOAT, "screen smooth border amount" }, | |
303 | { WINOPTION_REFLECTION";fs_ref(0.0-1.0)", "0.0", OPTION_FLOAT, "screen reflection amount" }, | |
304 | { WINOPTION_VIGNETTING";fs_vig(0.0-1.0)", "0.0", OPTION_FLOAT, "image vignetting amount" }, | |
304 | 305 | /* Beam-related values below this line*/ |
305 | { WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "1.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" }, | |
306 | { WINOPTION_SCANLINE_SCALE";fs_scansc(0.0-4.0)", "1.0", OPTION_FLOAT, "overall height scaling value for scanlines" }, | |
307 | { WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "1.0", OPTION_FLOAT, "individual height scaling value for scanlines" }, | |
308 | { WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-2.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" }, | |
309 | { WINOPTION_SCANLINE_BRIGHT_OFFSET";fs_scanbo(0.0-1.0)", "0.0", OPTION_FLOAT, "overall brightness offset value for scanlines (additive)" }, | |
310 | { WINOPTION_SCANLINE_OFFSET";fs_scanjt(0.0-4.0)", "0.0", OPTION_FLOAT, "overall interlace jitter scaling value for scanlines" }, | |
311 | { WINOPTION_DEFOCUS";fs_focus", "1.0,0.0", OPTION_STRING, "overall defocus value in screen-relative coords" }, | |
312 | { WINOPTION_CONVERGE_X";fs_convx", "0.25,0.00,-0.25", OPTION_STRING, "convergence in screen-relative X direction" }, | |
313 | { WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.25,-0.25", OPTION_STRING, "convergence in screen-relative Y direction" }, | |
314 | { WINOPTION_RADIAL_CONVERGE_X";fs_rconvx", "0.0,0.0,0.0", OPTION_STRING, "radial convergence in screen-relative X direction" }, | |
315 | { WINOPTION_RADIAL_CONVERGE_Y";fs_rconvy", "0.0,0.0,0.0", OPTION_STRING, "radial convergence in screen-relative Y direction" }, | |
306 | { WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "1.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" }, | |
307 | { WINOPTION_SCANLINE_SCALE";fs_scansc(0.0-4.0)", "1.0", OPTION_FLOAT, "overall height scaling value for scanlines" }, | |
308 | { WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "1.0", OPTION_FLOAT, "individual height scaling value for scanlines" }, | |
309 | { WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-2.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" }, | |
310 | { WINOPTION_SCANLINE_BRIGHT_OFFSET";fs_scanbo(0.0-1.0)", "0.0", OPTION_FLOAT, "overall brightness offset value for scanlines (additive)" }, | |
311 | { WINOPTION_SCANLINE_OFFSET";fs_scanjt(0.0-4.0)", "0.0", OPTION_FLOAT, "overall interlace jitter scaling value for scanlines" }, | |
312 | { WINOPTION_DEFOCUS";fs_focus", "0.0,0.0", OPTION_STRING, "overall defocus value in screen-relative coords" }, | |
313 | { WINOPTION_CONVERGE_X";fs_convx", "0.3,0.0,-0.3",OPTION_STRING, "convergence in screen-relative X direction" }, | |
314 | { WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.3,-0.3",OPTION_STRING, "convergence in screen-relative Y direction" }, | |
315 | { WINOPTION_RADIAL_CONVERGE_X";fs_rconvx", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative X direction" }, | |
316 | { WINOPTION_RADIAL_CONVERGE_Y";fs_rconvy", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative Y direction" }, | |
316 | 317 | /* RGB colorspace convolution below this line */ |
317 | { WINOPTION_RED_RATIO";fs_redratio", "1.0,0.0,0.0", OPTION_STRING, "red output signal generated by input signal" }, | |
318 | { WINOPTION_GRN_RATIO";fs_grnratio", "0.0,1.0,0.0", OPTION_STRING, "green output signal generated by input signal" }, | |
319 | { WINOPTION_BLU_RATIO";fs_bluratio", "0.0,0.0,1.0", OPTION_STRING, "blue output signal generated by input signal" }, | |
320 | { WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.4", OPTION_FLOAT, "saturation scaling value" }, | |
321 | { WINOPTION_OFFSET";fs_offset", "0.0,0.0,0.0", OPTION_STRING, "signal offset value (additive)" }, | |
322 | { WINOPTION_SCALE";fs_scale", "0.95,0.95,0.95", OPTION_STRING, "signal scaling value (multiplicative)" }, | |
323 | { WINOPTION_POWER";fs_power", "0.8,0.8,0.8", OPTION_STRING, "signal power value (exponential)" }, | |
324 | { WINOPTION_FLOOR";fs_floor", "0.05,0.05,0.05", OPTION_STRING, "signal floor level" }, | |
325 | { WINOPTION_PHOSPHOR";fs_phosphor", "0.4,0.4,0.4", OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, | |
318 | { WINOPTION_RED_RATIO";fs_redratio", "1.0,0.0,0.0",OPTION_STRING, "red output signal generated by input signal" }, | |
319 | { WINOPTION_GRN_RATIO";fs_grnratio", "0.0,1.0,0.0",OPTION_STRING, "green output signal generated by input signal" }, | |
320 | { WINOPTION_BLU_RATIO";fs_bluratio", "0.0,0.0,1.0",OPTION_STRING, "blue output signal generated by input signal" }, | |
321 | { WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.4", OPTION_FLOAT, "saturation scaling value" }, | |
322 | { WINOPTION_OFFSET";fs_offset", "0.0,0.0,0.0",OPTION_STRING, "signal offset value (additive)" }, | |
323 | { WINOPTION_SCALE";fs_scale", "0.95,0.95,0.95",OPTION_STRING, "signal scaling value (multiplicative)" }, | |
324 | { WINOPTION_POWER";fs_power", "0.8,0.8,0.8",OPTION_STRING, "signal power value (exponential)" }, | |
325 | { WINOPTION_FLOOR";fs_floor", "0.05,0.05,0.05",OPTION_STRING, "signal floor level" }, | |
326 | { WINOPTION_PHOSPHOR";fs_phosphor", "0.4,0.4,0.4",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, | |
326 | 327 | /* NTSC simulation below this line */ |
327 | { NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, | |
328 | { WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enables YIQ-space HLSL post-processing" }, | |
329 | { WINOPTION_YIQ_CCVALUE";yiqcc", "3.59754545", OPTION_FLOAT, "Color Carrier frequency for NTSC signal processing" }, | |
330 | { WINOPTION_YIQ_AVALUE";yiqa", "0.5", OPTION_FLOAT, "A value for NTSC signal processing" }, | |
331 | { WINOPTION_YIQ_BVALUE";yiqb", "0.5", OPTION_FLOAT, "B value for NTSC signal processing" }, | |
332 | { WINOPTION_YIQ_OVALUE";yiqo", "1.570796325", OPTION_FLOAT, "Outgoing Color Carrier phase offset for NTSC signal processing" }, | |
333 | { WINOPTION_YIQ_PVALUE";yiqp", "1.0", OPTION_FLOAT, "Incoming Pixel Clock scaling value for NTSC signal processing" }, | |
334 | { WINOPTION_YIQ_NVALUE";yiqn", "1.0", OPTION_FLOAT, "Y filter notch width for NTSC signal processing" }, | |
335 | { WINOPTION_YIQ_YVALUE";yiqy", "6.0", OPTION_FLOAT, "Y filter cutoff frequency for NTSC signal processing" }, | |
336 | { WINOPTION_YIQ_IVALUE";yiqi", "1.2", OPTION_FLOAT, "I filter cutoff frequency for NTSC signal processing" }, | |
337 | { WINOPTION_YIQ_QVALUE";yiqq", "0.6", OPTION_FLOAT, "Q filter cutoff frequency for NTSC signal processing" }, | |
338 | { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, | |
339 | { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, | |
340 | { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, | |
341 | { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, | |
328 | { NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, | |
329 | { WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enable YIQ-space HLSL post-processing" }, | |
330 | { WINOPTION_YIQ_CCVALUE";yiqcc", "3.59754545",OPTION_FLOAT, "Color Carrier frequency for NTSC signal processing" }, | |
331 | { WINOPTION_YIQ_AVALUE";yiqa", "0.5", OPTION_FLOAT, "A value for NTSC signal processing" }, | |
332 | { WINOPTION_YIQ_BVALUE";yiqb", "0.5", OPTION_FLOAT, "B value for NTSC signal processing" }, | |
333 | { WINOPTION_YIQ_OVALUE";yiqo", "1.570796325",OPTION_FLOAT, "Outgoing Color Carrier phase offset for NTSC signal processing" }, | |
334 | { WINOPTION_YIQ_PVALUE";yiqp", "1.0", OPTION_FLOAT, "Incoming Pixel Clock scaling value for NTSC signal processing" }, | |
335 | { WINOPTION_YIQ_NVALUE";yiqn", "1.0", OPTION_FLOAT, "Y filter notch width for NTSC signal processing" }, | |
336 | { WINOPTION_YIQ_YVALUE";yiqy", "6.0", OPTION_FLOAT, "Y filter cutoff frequency for NTSC signal processing" }, | |
337 | { WINOPTION_YIQ_IVALUE";yiqi", "1.2", OPTION_FLOAT, "I filter cutoff frequency for NTSC signal processing" }, | |
338 | { WINOPTION_YIQ_QVALUE";yiqq", "0.6", OPTION_FLOAT, "Q filter cutoff frequency for NTSC signal processing" }, | |
339 | { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, | |
340 | { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, | |
341 | { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, | |
342 | { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, | |
342 | 343 | /* Vector simulation below this line */ |
343 | { NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, | |
344 | { WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.5", OPTION_FLOAT, "How much length affects vector fade" }, | |
345 | { WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "500.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" }, | |
344 | { NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, | |
345 | { WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.8", OPTION_FLOAT, "How much length affects vector fade" }, | |
346 | { WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "500.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" }, | |
346 | 347 | /* Bloom below this line */ |
347 | { NULL, NULL, OPTION_HEADER, "BLOOM POST-PROCESSING OPTIONS" }, | |
348 | { WINOPTION_BLOOM_SCALE, "0.25", OPTION_FLOAT, "Intensity factor for bloom" }, | |
349 | { WINOPTION_BLOOM_OVERDRIVE, "1.0,1.0,1.0", OPTION_STRING, "Overdrive factor for bloom" }, | |
350 | { WINOPTION_BLOOM_LEVEL0_WEIGHT, "1.0", OPTION_FLOAT, "Bloom level 0 (full-size target) weight" }, | |
351 | { WINOPTION_BLOOM_LEVEL1_WEIGHT, "0.64", OPTION_FLOAT, "Bloom level 1 (half-size target) weight" }, | |
352 | { WINOPTION_BLOOM_LEVEL2_WEIGHT, "0.32", OPTION_FLOAT, "Bloom level 2 (quarter-size target) weight" }, | |
353 | { WINOPTION_BLOOM_LEVEL3_WEIGHT, "0.16", OPTION_FLOAT, "Bloom level 3 (.) weight" }, | |
354 | { WINOPTION_BLOOM_LEVEL4_WEIGHT, "0.08", OPTION_FLOAT, "Bloom level 4 (.) weight" }, | |
355 | { WINOPTION_BLOOM_LEVEL5_WEIGHT, "0.04", OPTION_FLOAT, "Bloom level 5 (.) weight" }, | |
356 | { WINOPTION_BLOOM_LEVEL6_WEIGHT, "0.04", OPTION_FLOAT, "Bloom level 6 (.) weight" }, | |
357 | { WINOPTION_BLOOM_LEVEL7_WEIGHT, "0.02", OPTION_FLOAT, "Bloom level 7 (.) weight" }, | |
358 | { WINOPTION_BLOOM_LEVEL8_WEIGHT, "0.02", OPTION_FLOAT, "Bloom level 8 (.) weight" }, | |
359 | { WINOPTION_BLOOM_LEVEL9_WEIGHT, "0.01", OPTION_FLOAT, "Bloom level 9 (.) weight" }, | |
360 | { WINOPTION_BLOOM_LEVEL10_WEIGHT, "0.01", OPTION_FLOAT, "Bloom level 10 (1x1 target) weight" }, | |
348 | { NULL, NULL, OPTION_HEADER, "BLOOM POST-PROCESSING OPTIONS" }, | |
349 | { WINOPTION_BLOOM_SCALE, "0.25", OPTION_FLOAT, "Intensity factor for bloom" }, | |
350 | { WINOPTION_BLOOM_OVERDRIVE, "0.0,0.0,0.0",OPTION_STRING, "Overdrive factor for bloom" }, | |
351 | { WINOPTION_BLOOM_LEVEL0_WEIGHT, "1.0", OPTION_FLOAT, "Bloom level 0 (full-size target) weight" }, | |
352 | { WINOPTION_BLOOM_LEVEL1_WEIGHT, "0.21", OPTION_FLOAT, "Bloom level 1 (half-size target) weight" }, | |
353 | { WINOPTION_BLOOM_LEVEL2_WEIGHT, "0.19", OPTION_FLOAT, "Bloom level 2 (quarter-size target) weight" }, | |
354 | { WINOPTION_BLOOM_LEVEL3_WEIGHT, "0.17", OPTION_FLOAT, "Bloom level 3 (.) weight" }, | |
355 | { WINOPTION_BLOOM_LEVEL4_WEIGHT, "0.15", OPTION_FLOAT, "Bloom level 4 (.) weight" }, | |
356 | { WINOPTION_BLOOM_LEVEL5_WEIGHT, "0.14", OPTION_FLOAT, "Bloom level 5 (.) weight" }, | |
357 | { WINOPTION_BLOOM_LEVEL6_WEIGHT, "0.13", OPTION_FLOAT, "Bloom level 6 (.) weight" }, | |
358 | { WINOPTION_BLOOM_LEVEL7_WEIGHT, "0.12", OPTION_FLOAT, "Bloom level 7 (.) weight" }, | |
359 | { WINOPTION_BLOOM_LEVEL8_WEIGHT, "0.11", OPTION_FLOAT, "Bloom level 8 (.) weight" }, | |
360 | { WINOPTION_BLOOM_LEVEL9_WEIGHT, "0.10", OPTION_FLOAT, "Bloom level 9 (.) weight" }, | |
361 | { WINOPTION_BLOOM_LEVEL10_WEIGHT, "0.09", OPTION_FLOAT, "Bloom level 10 (1x1 target) weight" }, | |
361 | 362 | |
362 | 363 | // full screen options |
363 | 364 | { NULL, NULL, OPTION_HEADER, "FULL SCREEN OPTIONS" }, |
364 | { WINOPTION_TRIPLEBUFFER ";tb", "0", OPTION_BOOLEAN, "enable | |
365 | { WINOPTION_TRIPLEBUFFER ";tb", "0", OPTION_BOOLEAN, "enable triple buffering" }, | |
365 | 366 | { WINOPTION_FULLSCREENBRIGHTNESS ";fsb(0.1-2.0)", "1.0", OPTION_FLOAT, "brightness value in full screen mode" }, |
366 | 367 | { WINOPTION_FULLSCREENCONTRAST ";fsc(0.1-2.0)", "1.0", OPTION_FLOAT, "contrast value in full screen mode" }, |
367 | 368 | { WINOPTION_FULLSCREENGAMMA ";fsg(0.1-3.0)", "1.0", OPTION_FLOAT, "gamma value in full screen mode" }, |
368 | 369 | |
369 | 370 | // input options |
370 | 371 | { NULL, NULL, OPTION_HEADER, "INPUT DEVICE OPTIONS" }, |
371 | { WINOPTION_GLOBAL_INPUTS ";global_inputs", "0", OPTION_BOOLEAN, "enables global inputs" }, | |
372 | { WINOPTION_DUAL_LIGHTGUN ";dual", "0", OPTION_BOOLEAN, "enables dual lightgun input" }, | |
372 | { WINOPTION_GLOBAL_INPUTS ";global_inputs", "0", OPTION_BOOLEAN, "enable global inputs" }, | |
373 | { WINOPTION_DUAL_LIGHTGUN ";dual", "0", OPTION_BOOLEAN, "enable dual lightgun input" }, | |
373 | 374 | |
374 | 375 | { NULL } |
375 | 376 | }; |
r250315 | r250316 | |
---|---|---|
33 | 33 | #define WINOPTION_HLSLPATH "hlslpath" |
34 | 34 | #define WINOPTION_HLSL_PRESCALE_X "hlsl_prescale_x" |
35 | 35 | #define WINOPTION_HLSL_PRESCALE_Y "hlsl_prescale_y" |
36 | #define WINOPTION_HLSL_PRESET "hlsl_preset" | |
36 | 37 | #define WINOPTION_HLSL_WRITE "hlsl_write" |
37 | 38 | #define WINOPTION_HLSL_SNAP_WIDTH "hlsl_snap_width" |
38 | 39 | #define WINOPTION_HLSL_SNAP_HEIGHT "hlsl_snap_height" |
r250315 | r250316 | |
136 | 137 | const char *d3d_hlsl_write() const { return value(WINOPTION_HLSL_WRITE); } |
137 | 138 | int d3d_hlsl_prescale_x() const { return int_value(WINOPTION_HLSL_PRESCALE_X); } |
138 | 139 | int d3d_hlsl_prescale_y() const { return int_value(WINOPTION_HLSL_PRESCALE_Y); } |
140 | int d3d_hlsl_preset() const { return int_value(WINOPTION_HLSL_PRESET); } | |
139 | 141 | int d3d_snap_width() const { return int_value(WINOPTION_HLSL_SNAP_WIDTH); } |
140 | 142 | int d3d_snap_height() const { return int_value(WINOPTION_HLSL_SNAP_HEIGHT); } |
141 | 143 | float screen_shadow_mask_alpha() const { return float_value(WINOPTION_SHADOW_MASK_ALPHA); } |
https://github.com/mamedev/mame/commit/2a857842ecadd86b34bc3bf1a569a4b0aa48bd46 |
Previous | 199869 Revisions | Next |