Previous 199869 Revisions Next

r41413 Wednesday 28th October, 2015 at 07:06:12 UTC by Miodrag Milanović
Cleanup and version bump
[hash]a2600.xml bbc_32016_flop.xml bbc_z80_flop.xml bbcb_cass.xml bbcb_flop.xml pico.xml pro128s_flop.xml sg1000.xml sms.xml spectrum_cass.xml tandy2k.xml unichamp.xml
[src]version.c
[src/devices/bus/a2bus]a2themill.c
[src/devices/bus/cpc]ddi1.h doubler.c doubler.h
[src/devices/bus/isa]omti8621.c
[src/devices/bus/rs232]pty.c pty.h rs232.c
[src/devices/bus/tiki100]8088.c 8088.h exp.h hdc.c hdc.h
[src/devices/cpu/mips]mips3.h
[src/devices/imagedev]floppy.c floppy.h
[src/devices/machine]z80scc.c z80scc.h z80sio.c z80sio.h
[src/devices/video]poly.h
[src/emu]dipty.c dipty.h emuopts.c screen.h
[src/emu/ui]info_pty.c mainmenu.c mainmenu.h
[src/emu/video]vector.c
[src/lib/formats]apollo_dsk.c tzx_cas.c
[src/mame]arcade.lst mess.lst
[src/mame/audio]hng64.c
[src/mame/drivers]apple2e.c aristmk5.c beathead.c bublbobl.c by17.c by35.c cardline.c cave.c chicago.c cntsteer.c cubeqst.c dec0.c ec184x.c electron.c eti660.c firefox.c galaxian.c galaxold.c gatron.c i7000.c imds2.c konamigq.c konamim2.c lindbergh.c m107.c m72.c m92.c macpci.c merit.c micral.c namcops2.c namcos11.c namcos12.c namcos23.c nmg5.c othunder.c peplus.c rd100.c replicator.c segac2.c segas24.c shougi.c slotcarn.c subhuntr.c timeplt.c unichamp.c vicdual.c vpoker.c wecleman.c
[src/mame/includes]hng64.h m107.h m92.h osborne1.h
[src/mame/layout]by17.lay by17_matahari.lay by17_pwerplay.lay by35.lay by35_playboy.lay
[src/mame/machine]apollo.c electron.c mm1kb.c mm1kb.h psxcd.c
[src/mame/video]apple2.c btoads.c cloak.c decbac06.h dkong.c galaxian.c gic.c gic.h gyruss.c hng64.c hng64_3d.c m72.c meadows.c mikromik.c model3.c qix.c sega16sp.c segaic16.c spacefb.c system1.c timeplt.c tp84.c
[src/osd]osdnet.c
[src/osd/modules/render/d3d]d3dhlsl.c
[src/osd/osdmini]minifile.c
[src/osd/sdl]sdlfile.c sdlptty_os2.c sdlptty_unix.c
[src/osd/windows]winfile.c

trunk/hash/a2600.xml
r249924r249925
1794117941      </part>
1794217942   </software>
1794317943
17944  <!-- The AtariAge logo looks incorrect, but games function, there are probably other version too, YouTube shows a 2007 version. -->
17944   <!-- The AtariAge logo looks incorrect, but games function, there are probably other version too, YouTube shows a 2007 version. -->
1794517945   <software name="stelstok">
1794617946      <description>Stella's Stocking 2008</description>
1794717947      <year>2008</year>
r249924r249925
1795517955      </part>
1795617956   </software>
1795717957
17958  <!-- This was released by the author, also available via Atariage, are both versions the same? needs DPC+ emulation -->
17959  <software name="stayfr2" supported="no">
17960    <description>Stay Frosty 2 (NTSC)</description>
17961    <year>2013</year>
17962    <publisher>Spiceware</publisher>
17963    <sharedfeat name="compatibility" value="NTSC" />
17964    <part name="cart" interface="a2600_cart">
17965      <feature name="slot" value="a26_dpcplus" />
17966      <dataarea name="rom" size="0x8000">
17967        <rom name="SF2_20131217_RC8_NTSC.bin" size="0x8000" crc="4eb739ab" sha1="5eceaf8e90bd9a002f4935f082df7b25716dceb0" offset="0" />
17968      </dataarea>
17969    </part>
17970  </software>
17958   <!-- This was released by the author, also available via Atariage, are both versions the same? needs DPC+ emulation -->
17959   <software name="stayfr2" supported="no">
17960   <description>Stay Frosty 2 (NTSC)</description>
17961   <year>2013</year>
17962   <publisher>Spiceware</publisher>
17963   <sharedfeat name="compatibility" value="NTSC" />
17964   <part name="cart" interface="a2600_cart">
17965      <feature name="slot" value="a26_dpcplus" />
17966      <dataarea name="rom" size="0x8000">
17967      <rom name="SF2_20131217_RC8_NTSC.bin" size="0x8000" crc="4eb739ab" sha1="5eceaf8e90bd9a002f4935f082df7b25716dceb0" offset="0" />
17968      </dataarea>
17969   </part>
17970   </software>
1797117971
17972  <software name="stayfr2d" cloneof="stayfr2" supported="no">
17973    <description>Stay Frosty 2 (NTSC, demo)</description>
17974    <year>2013</year>
17975    <publisher>Spiceware</publisher>
17976    <sharedfeat name="compatibility" value="NTSC" />
17977    <part name="cart" interface="a2600_cart">
17978      <feature name="slot" value="a26_dpcplus" />
17979      <dataarea name="rom" size="0x8000">
17980        <rom name="SF2_demo_NTSC.bin" size="0x8000" crc="fd850bd6" sha1="bd8166da7777c66e6bb3ab0c77563193d8289f5f" offset="0" />
17981      </dataarea>
17982    </part>
17983  </software>
17972   <software name="stayfr2d" cloneof="stayfr2" supported="no">
17973   <description>Stay Frosty 2 (NTSC, demo)</description>
17974   <year>2013</year>
17975   <publisher>Spiceware</publisher>
17976   <sharedfeat name="compatibility" value="NTSC" />
17977   <part name="cart" interface="a2600_cart">
17978      <feature name="slot" value="a26_dpcplus" />
17979      <dataarea name="rom" size="0x8000">
17980      <rom name="SF2_demo_NTSC.bin" size="0x8000" crc="fd850bd6" sha1="bd8166da7777c66e6bb3ab0c77563193d8289f5f" offset="0" />
17981      </dataarea>
17982   </part>
17983   </software>
1798417984
1798517985
17986  <software name="stayfr2e" cloneof="stayfr2" supported="no">
17987    <description>Stay Frosty 2 (PAL)</description>
17988    <year>2013</year>
17989    <publisher>Spiceware</publisher>
17990    <sharedfeat name="compatibility" value="PAL" />
17991    <part name="cart" interface="a2600_cart">
17992      <feature name="slot" value="a26_dpcplus" />
17993      <dataarea name="rom" size="0x8000">
17994        <rom name="SF2_20131217_RC8_PAL.bin" size="0x8000" crc="7b495dc3" sha1="1625ef74b0a48c2968fad832ab8e2edc8187a53f" offset="0" />
17995      </dataarea>
17996    </part>
17997  </software>
17986   <software name="stayfr2e" cloneof="stayfr2" supported="no">
17987   <description>Stay Frosty 2 (PAL)</description>
17988   <year>2013</year>
17989   <publisher>Spiceware</publisher>
17990   <sharedfeat name="compatibility" value="PAL" />
17991   <part name="cart" interface="a2600_cart">
17992      <feature name="slot" value="a26_dpcplus" />
17993      <dataarea name="rom" size="0x8000">
17994      <rom name="SF2_20131217_RC8_PAL.bin" size="0x8000" crc="7b495dc3" sha1="1625ef74b0a48c2968fad832ab8e2edc8187a53f" offset="0" />
17995      </dataarea>
17996   </part>
17997   </software>
1799817998
17999  <software name="stayfr2de" cloneof="stayfr2" supported="no">
18000    <description>Stay Frosty 2 (PAL, demo)</description>
18001    <year>2013</year>
18002    <publisher>Spiceware</publisher>
18003    <sharedfeat name="compatibility" value="PAL" />
18004    <part name="cart" interface="a2600_cart">
18005      <feature name="slot" value="a26_dpcplus" />
18006      <dataarea name="rom" size="0x8000">
18007        <rom name="SF2_demo_PAL.bin" size="0x8000" crc="b47582f3" sha1="73625429e73f1b354e0cbe6a360d79590032de2b" offset="0" />
18008      </dataarea>
18009    </part>
18010  </software>
17999   <software name="stayfr2de" cloneof="stayfr2" supported="no">
18000   <description>Stay Frosty 2 (PAL, demo)</description>
18001   <year>2013</year>
18002   <publisher>Spiceware</publisher>
18003   <sharedfeat name="compatibility" value="PAL" />
18004   <part name="cart" interface="a2600_cart">
18005      <feature name="slot" value="a26_dpcplus" />
18006      <dataarea name="rom" size="0x8000">
18007      <rom name="SF2_demo_PAL.bin" size="0x8000" crc="b47582f3" sha1="73625429e73f1b354e0cbe6a360d79590032de2b" offset="0" />
18008      </dataarea>
18009   </part>
18010   </software>
1801118011
1801218012</softwarelist>
1801318013
trunk/hash/bbc_32016_flop.xml
r249924r249925
2222         </dataarea>
2323      </part>
2424   </software>
25   
25
2626   <software name="panos112" supported="no">
2727      <description>2 PanOS System v1.1</description>
2828      <year>1985</year>
r249924r249925
3535         </dataarea>
3636      </part>
3737   </software>
38   
38
3939   <software name="panos113" supported="no">
4040      <description>3 FORTRAN 77 (PanOS) v1.1</description>
4141      <year>1985</year>
r249924r249925
4848         </dataarea>
4949      </part>
5050   </software>
51   
51
5252   <software name="panos114" supported="no">
5353      <description>4 ISO PASCAL (PanOS) v1.1</description>
5454      <year>1985</year>
r249924r249925
6161         </dataarea>
6262      </part>
6363   </software>
64   
64
6565   <software name="panos115" supported="no">
6666      <description>5 C (PanOS) v1.1</description>
6767      <year>1985</year>
r249924r249925
7474         </dataarea>
7575      </part>
7676   </software>
77   
77
7878   <software name="panos116" supported="no">
7979      <description>6 Cambridge LISP (PanOS) v1.1</description>
8080      <year>1985</year>
r249924r249925
8787         </dataarea>
8888      </part>
8989   </software>
90   
90
9191   <software name="panos117" supported="no">
9292      <description>7 Welcome Programs v1.1</description>
9393      <year>1985</year>
r249924r249925
100100         </dataarea>
101101      </part>
102102   </software>
103   
103
104104   <software name="panos141" supported="no">
105105      <description>1 PanOS Startup and Utilities v1.4</description>
106106      <year>1985</year>
r249924r249925
113113         </dataarea>
114114      </part>
115115   </software>
116   
116
117117   <software name="panos142" supported="no">
118118      <description>2 PanOS System v1.4</description>
119119      <year>1985</year>
r249924r249925
126126         </dataarea>
127127      </part>
128128   </software>
129   
129
130130   <software name="panos143" supported="no">
131131      <description>3 FORTRAN 77 (PanOS) v1.4</description>
132132      <year>1985</year>
r249924r249925
139139         </dataarea>
140140      </part>
141141   </software>
142   
142
143143   <software name="panos144" supported="no">
144144      <description>4 ISO PASCAL (PanOS) v1.4</description>
145145      <year>1985</year>
r249924r249925
152152         </dataarea>
153153      </part>
154154   </software>
155   
155
156156   <software name="panos145" supported="no">
157157      <description>5 C (PanOS) v1.4</description>
158158      <year>1985</year>
r249924r249925
165165         </dataarea>
166166      </part>
167167   </software>
168   
168
169169   <software name="panos146" supported="no">
170170      <description>6 Cambridge LISP (PanOS) v1.4</description>
171171      <year>1985</year>
r249924r249925
178178         </dataarea>
179179      </part>
180180   </software>
181   
181
182182   <software name="panos147" supported="no">
183183      <description>7 Welcome Programs v1.4</description>
184184      <year>1985</year>
trunk/hash/bbc_z80_flop.xml
r249924r249925
3737         </dataarea>
3838      </part>
3939   </software>
40   
40
4141   <software name="cpmsys3" supported="no">
4242      <description>Acorn CP/M System Disc 3</description>
4343      <year>1984</year>
trunk/hash/bbcb_cass.xml
r249924r249925
19411941         </dataarea>
19421942      </part>
19431943   </software>
1944   
1944
19451945   <software name="carwarsp">
19461946      <description>Car Wars/Planet of the Aliens</description>
19471947      <year>1982</year>
r249924r249925
52285228         </dataarea>
52295229      </part>
52305230   </software>
5231   
5231
52325232   <software name="golddigg">
52335233      <description>Gold Digger</description>
52345234      <year>1984</year>
trunk/hash/bbcb_flop.xml
r249924r249925
3636         </dataarea>
3737      </part>
3838   </software>
39   
39
4040   <software name="elite">
4141      <description>Elite</description>
4242      <year>1984</year>
trunk/hash/pico.xml
r249924r249925
38233823         <dataarea name="rom" size="524288">
38243824            <rom name="mpr-18458-t.ic1" size="524288" crc="6340c18a" sha1="101d5652ffd704788f1f44b671be843e3430e58a" offset="000000" loadflag="load16_word_swap" />
38253825         </dataarea>
3826      <!-- this is a 22 track companion audio CD (to be played on standalone CD player while operating the game?) -->
3827      <!-- dumping software / drive: BurnAtOnce 0.99.5 / TS-L633R -->
3826      <!-- this is a 22 track companion audio CD (to be played on standalone CD player while operating the game?) -->
3827      <!-- dumping software / drive: BurnAtOnce 0.99.5 / TS-L633R -->
38283828         <diskarea name="cdrom">
38293829            <disk name="sanouk5cd" sha1="c9330bbf118405c02347bd83a1cc24ab2bb4310d"/>
38303830         </diskarea>
trunk/hash/pro128s_flop.xml
r249924r249925
403403         </dataarea>
404404      </part>
405405   </software>
406   
406
407407</softwarelist>
trunk/hash/sg1000.xml
r249924r249925
12961296      </part>
12971297   </software>
12981298
1299  <software name="herotw" cloneof="hero"> <!-- English logo version -->
1300    <description>H.E.R.O. (Tw)</description>
1301    <year>1985</year>
1302    <publisher>Aaronix</publisher>
1303    <part name="cart" interface="sg1000_cart">
1304      <dataarea name="rom" size="32768">
1305        <rom name="H.E.R.O. [english logo] (TW).sg" size="32768" crc="96f09c6d" sha1="82b530feef7c011361e21b62d2c359c626ab8a9c" offset="000000" />
1306      </dataarea>
1307    </part>
1308  </software>
1299   <software name="herotw" cloneof="hero"> <!-- English logo version -->
1300   <description>H.E.R.O. (Tw)</description>
1301   <year>1985</year>
1302   <publisher>Aaronix</publisher>
1303   <part name="cart" interface="sg1000_cart">
1304      <dataarea name="rom" size="32768">
1305      <rom name="H.E.R.O. [english logo] (TW).sg" size="32768" crc="96f09c6d" sha1="82b530feef7c011361e21b62d2c359c626ab8a9c" offset="000000" />
1306      </dataarea>
1307   </part>
1308   </software>
13091309
1310  <software name="homemj">
1310   <software name="homemj">
13111311      <description>Home Mahjong (Jpn, v1)</description>
13121312      <year>1984</year>
13131313      <publisher>Sega</publisher>
r249924r249925
13581358      </part>
13591359   </software>
13601360
1361  <software name="hustletw" cloneof="hustle">
1362    <description>Hustle Chumy / Wanpi shu (Tw)</description>
1363    <year>1984</year>
1364    <publisher>Aaronix</publisher>
1365    <part name="cart" interface="sg1000_cart">
1366      <dataarea name="rom" size="16384">
1367        <rom name="Hustle Chumy (TW).sg" size="16384" crc="c4ed1fd9" sha1="e7800d107ef0a7773eea2d482b5db9d866ba74f9" offset="000000" />
1368      </dataarea>
1369    </part>
1370  </software>
1361   <software name="hustletw" cloneof="hustle">
1362   <description>Hustle Chumy / Wanpi shu (Tw)</description>
1363   <year>1984</year>
1364   <publisher>Aaronix</publisher>
1365   <part name="cart" interface="sg1000_cart">
1366      <dataarea name="rom" size="16384">
1367      <rom name="Hustle Chumy (TW).sg" size="16384" crc="c4ed1fd9" sha1="e7800d107ef0a7773eea2d482b5db9d866ba74f9" offset="000000" />
1368      </dataarea>
1369   </part>
1370   </software>
13711371
1372  <software name="hyperspt">
1372   <software name="hyperspt">
13731373      <description>Hyper Sports (Jpn)</description>
13741374      <year>1985</year>
13751375      <publisher>Sega / Konami</publisher>
r249924r249925
21012101      </part>
21022102   </software>
21032103
2104  <software name="rocknboltw" cloneof="rocknbol"> <!-- English logo version -->
2105    <description>Rock n' Bolt (Tw)</description>
2106    <year>1985</year>
2107    <publisher>Aaronix</publisher>
2108    <part name="cart" interface="sg1000_cart">
2109      <dataarea name="rom" size="32768">
2110        <rom name="Rock n' Bolt [english logo] (TW).sg" size="32768" crc="09a82af7" sha1="e3be08bda8459fc60836abe332e9864e7c596202" offset="000000" />
2111      </dataarea>
2112    </part>
2113  </software>
2104   <software name="rocknboltw" cloneof="rocknbol"> <!-- English logo version -->
2105   <description>Rock n' Bolt (Tw)</description>
2106   <year>1985</year>
2107   <publisher>Aaronix</publisher>
2108   <part name="cart" interface="sg1000_cart">
2109      <dataarea name="rom" size="32768">
2110      <rom name="Rock n' Bolt [english logo] (TW).sg" size="32768" crc="09a82af7" sha1="e3be08bda8459fc60836abe332e9864e7c596202" offset="000000" />
2111      </dataarea>
2112   </part>
2113   </software>
21142114
2115  <software name="safarihu" supported="no">
2115   <software name="safarihu" supported="no">
21162116      <description>Safari Hunting (Jpn)</description>
21172117      <year>1983</year>
21182118      <publisher>Sega</publisher>
trunk/hash/sms.xml
r249924r249925
120120      </part>
121121   </software>
122122
123  <software name="actionfgtw" cloneof="actionfg">
124    <description>Action Fighter / Mo zhan che (Taiwan)</description>
125    <year>1986</year>
126    <publisher>&lt;unknown&gt;</publisher>
127    <part name="cart" interface="sms_cart">
128      <dataarea name="rom" size="131072">
129        <rom name="Action Fighter (TW).sms" size="131072" crc="8418f438" sha1="4f514dc568466f6b0424086edeb3fa0014f9c887" offset="000000" />
130      </dataarea>
131    </part>
132  </software>
123   <software name="actionfgtw" cloneof="actionfg">
124   <description>Action Fighter / Mo zhan che (Taiwan)</description>
125   <year>1986</year>
126   <publisher>&lt;unknown&gt;</publisher>
127   <part name="cart" interface="sms_cart">
128      <dataarea name="rom" size="131072">
129      <rom name="Action Fighter (TW).sms" size="131072" crc="8418f438" sha1="4f514dc568466f6b0424086edeb3fa0014f9c887" offset="000000" />
130      </dataarea>
131   </part>
132   </software>
133133
134134
135  <software name="addfam">
135   <software name="addfam">
136136      <description>The Addams Family (Euro)</description>
137137      <year>1993</year>
138138      <publisher>Flying Edge</publisher>
r249924r249925
21032103      </part>
21042104   </software>
21052105
2106  <software name="eswatp0" cloneof="eswatc"> <!-- early build, alt subtitle -->
2107    <description>E-SWAT - The Ultimate Battle In The Factor Against Crime (prototype 0)</description>
2108    <year>1990</year>
2109    <publisher>Sega</publisher>
2110    <info name="serial" value="7042"/>
2111    <part name="cart" interface="sms_cart">
2112      <dataarea name="rom" size="262144">
2113        <rom name="E-SWAT [Proto 0].sms" size="262144" crc="4f20694a" sha1="855c2f54b700663cedd6484aab396d849dcb5290" offset="000000" />
2114      </dataarea>
2115    </part>
2116  </software>
2106   <software name="eswatp0" cloneof="eswatc"> <!-- early build, alt subtitle -->
2107   <description>E-SWAT - The Ultimate Battle In The Factor Against Crime (prototype 0)</description>
2108   <year>1990</year>
2109   <publisher>Sega</publisher>
2110   <info name="serial" value="7042"/>
2111   <part name="cart" interface="sms_cart">
2112      <dataarea name="rom" size="262144">
2113      <rom name="E-SWAT [Proto 0].sms" size="262144" crc="4f20694a" sha1="855c2f54b700663cedd6484aab396d849dcb5290" offset="000000" />
2114      </dataarea>
2115   </part>
2116   </software>
21172117
2118  <software name="eswatp1" cloneof="eswatc">
2119    <description>E-SWAT - City Under Siege (prototype 1)</description>
2120    <year>1990</year>
2121    <publisher>Sega</publisher>
2122    <info name="serial" value="7042"/>
2123    <part name="cart" interface="sms_cart">
2124      <dataarea name="rom" size="262144">
2125        <rom name="E-SWAT [Proto 1].sms" size="262144" crc="f7ca9801" sha1="12c5005f8a0d78c75704b61bf87961875b9d29d4" offset="000000" />
2126      </dataarea>
2127    </part>
2128  </software>
2118   <software name="eswatp1" cloneof="eswatc">
2119   <description>E-SWAT - City Under Siege (prototype 1)</description>
2120   <year>1990</year>
2121   <publisher>Sega</publisher>
2122   <info name="serial" value="7042"/>
2123   <part name="cart" interface="sms_cart">
2124      <dataarea name="rom" size="262144">
2125      <rom name="E-SWAT [Proto 1].sms" size="262144" crc="f7ca9801" sha1="12c5005f8a0d78c75704b61bf87961875b9d29d4" offset="000000" />
2126      </dataarea>
2127   </part>
2128   </software>
21292129
2130  <software name="eswatp2" cloneof="eswatc">
2131    <description>E-SWAT - City Under Siege (prototype 2)</description>
2132    <year>1990</year>
2133    <publisher>Sega</publisher>
2134    <info name="serial" value="7042"/>
2135    <part name="cart" interface="sms_cart">
2136      <dataarea name="rom" size="262144">
2137        <rom name="E-SWAT [Proto 2].sms" size="262144" crc="fd91cc7e" sha1="63fa1fcbf941b0e0ce601b3094c6c31f997c95d8" offset="000000" />
2138      </dataarea>
2139    </part>
2140  </software>
2130   <software name="eswatp2" cloneof="eswatc">
2131   <description>E-SWAT - City Under Siege (prototype 2)</description>
2132   <year>1990</year>
2133   <publisher>Sega</publisher>
2134   <info name="serial" value="7042"/>
2135   <part name="cart" interface="sms_cart">
2136      <dataarea name="rom" size="262144">
2137      <rom name="E-SWAT [Proto 2].sms" size="262144" crc="fd91cc7e" sha1="63fa1fcbf941b0e0ce601b3094c6c31f997c95d8" offset="000000" />
2138      </dataarea>
2139   </part>
2140   </software>
21412141
2142  <software name="excdizzy" supported="no">
2142   <software name="excdizzy" supported="no">
21432143      <description>The Excellent Dizzy Collection (Euro, USA, Prototype)</description>
21442144      <year>19??</year>
21452145      <publisher>Codemasters</publisher>
r249924r249925
57295729      </part>
57305730   </software>
57315731
5732  <software name="supcol">
5733    <description>Super Columns &amp; Tetris (Kor)</description>
5734    <year>1990</year>
5735    <publisher>Hi-Com</publisher>
5736    <part name="cart" interface="sms_cart">
5737      <dataarea name="rom" size="262144">
5738        <rom name="Super Columns (KR).sms" size="32768" crc="6ce7f694" sha1="9d696b6eda1d13b8d439509beeb64210987e308e" offset="000000" />
5739      </dataarea>
5740    </part>
5741  </software>
5732   <software name="supcol">
5733   <description>Super Columns &amp; Tetris (Kor)</description>
5734   <year>1990</year>
5735   <publisher>Hi-Com</publisher>
5736   <part name="cart" interface="sms_cart">
5737      <dataarea name="rom" size="262144">
5738      <rom name="Super Columns (KR).sms" size="32768" crc="6ce7f694" sha1="9d696b6eda1d13b8d439509beeb64210987e308e" offset="000000" />
5739      </dataarea>
5740   </part>
5741   </software>
57425742
5743  <software name="smgp">
5743   <software name="smgp">
57445744      <description>Super Monaco GP (Euro, Bra)</description>
57455745      <year>1990</year>
57465746      <publisher>Sega</publisher>
trunk/hash/spectrum_cass.xml
r249924r249925
709709      </part>
710710   </software>
711711
712  <!-- Homebrew released at http://spectralinterlude.com/#download for use on real systems & emulators -->
712   <!-- Homebrew released at http://spectralinterlude.com/#download for use on real systems & emulators -->
713713   <software name="castlvsi">
714714      <description>Castlevania - Spectral Interlude (v1.1, English, 128K)</description>
715715      <year>2015</year>
r249924r249925
798798      </part>
799799   </software>
800800
801  <!-- V1.0 doesn't exist in Spanish? or Italian (translations were made after the 1.1 release) -->
801   <!-- V1.0 doesn't exist in Spanish? or Italian (translations were made after the 1.1 release) -->
802802
803  <!-- what are these? were there unannounced updates at some point? check data, remove if just duplicate -->
804  <software name="castlvsia" cloneof="castlvsi">
805    <description>Castlevania - Spectral Interlude (alt, English, 128K)</description>
806    <year>2015</year>
807    <publisher>Rewind</publisher>
808    <part name="cass" interface="spectrum_cass">
809      <dataarea name="cass" size="126416">
810        <rom name="castlevania_si_en.tap" size="126416" crc="c7fb2adf" sha1="22fdb537a3e4b3ed05aac82f34103212c179db4a" offset="0"/>
811      </dataarea>
812    </part>
813  </software>
803   <!-- what are these? were there unannounced updates at some point? check data, remove if just duplicate -->
804   <software name="castlvsia" cloneof="castlvsi">
805   <description>Castlevania - Spectral Interlude (alt, English, 128K)</description>
806   <year>2015</year>
807   <publisher>Rewind</publisher>
808   <part name="cass" interface="spectrum_cass">
809      <dataarea name="cass" size="126416">
810      <rom name="castlevania_si_en.tap" size="126416" crc="c7fb2adf" sha1="22fdb537a3e4b3ed05aac82f34103212c179db4a" offset="0"/>
811      </dataarea>
812   </part>
813   </software>
814814
815  <software name="castlvsirua" cloneof="castlvsi">
816    <description>Castlevania - Spectral Interlude (alt, Russian, 128K)</description>
817    <year>2015</year>
818    <publisher>Rewind</publisher>
819    <part name="cass" interface="spectrum_cass">
820      <dataarea name="cass" size="127075">
821        <rom name="castlevania_si_ru.tap" size="127075" crc="e4e9bd2a" sha1="8bae5e5d2e310335f3aba96b2a0ed6c5c447eb18" offset="0"/>
822      </dataarea>
823    </part>
824  </software>
815   <software name="castlvsirua" cloneof="castlvsi">
816   <description>Castlevania - Spectral Interlude (alt, Russian, 128K)</description>
817   <year>2015</year>
818   <publisher>Rewind</publisher>
819   <part name="cass" interface="spectrum_cass">
820      <dataarea name="cass" size="127075">
821      <rom name="castlevania_si_ru.tap" size="127075" crc="e4e9bd2a" sha1="8bae5e5d2e310335f3aba96b2a0ed6c5c447eb18" offset="0"/>
822      </dataarea>
823   </part>
824   </software>
825825
826  <software name="castlvsipla" cloneof="castlvsi">
827    <description>Castlevania - Spectral Interlude (alt, Polish, 128K)</description>
828    <year>2015</year>
829    <publisher>Rewind</publisher>
830    <part name="cass" interface="spectrum_cass">
831      <dataarea name="cass" size="127413">
832        <rom name="castlevania_si_pl.tap" size="127413" crc="98e2c6a6" sha1="6eb777aa7c0c057cf04f3162e7e80f6c4286e406" offset="0"/>
833      </dataarea>
834    </part>
835  </software>
826   <software name="castlvsipla" cloneof="castlvsi">
827   <description>Castlevania - Spectral Interlude (alt, Polish, 128K)</description>
828   <year>2015</year>
829   <publisher>Rewind</publisher>
830   <part name="cass" interface="spectrum_cass">
831      <dataarea name="cass" size="127413">
832      <rom name="castlevania_si_pl.tap" size="127413" crc="98e2c6a6" sha1="6eb777aa7c0c057cf04f3162e7e80f6c4286e406" offset="0"/>
833      </dataarea>
834   </part>
835   </software>
836836
837  <software name="castlvsiesa" cloneof="castlvsi">
838    <description>Castlevania - Spectral Interlude (alt, Spanish, 128K)</description>
839    <year>2015</year>
840    <publisher>Rewind</publisher>
841    <part name="cass" interface="spectrum_cass">
842      <dataarea name="cass" size="126973">
843        <rom name="castlevania_si_es.tap" size="126973" crc="4479be59" sha1="c5c816d4b02526c37ea44cbac8d1836ca03fd2fe" offset="0"/>
844      </dataarea>
845    </part>
846  </software> 
837   <software name="castlvsiesa" cloneof="castlvsi">
838   <description>Castlevania - Spectral Interlude (alt, Spanish, 128K)</description>
839   <year>2015</year>
840   <publisher>Rewind</publisher>
841   <part name="cass" interface="spectrum_cass">
842      <dataarea name="cass" size="126973">
843      <rom name="castlevania_si_es.tap" size="126973" crc="4479be59" sha1="c5c816d4b02526c37ea44cbac8d1836ca03fd2fe" offset="0"/>
844      </dataarea>
845   </part>
846   </software>
847847</softwarelist>
848848
849849
trunk/hash/tandy2k.xml
r249924r249925
1515      <year>1983</year>
1616      <publisher>Lotus</publisher>
1717
18<!--      <part name="flop1" interface="floppy_5_25">
19         <dataarea name="flop" size="331572">
20            <rom name="123-sys.td0" size="331572" crc="a7cacc1e" sha1="8720bb7614821403c269012adea81f6cb6d84f7d" offset="0"/>
21         </dataarea>
22      </part>
18<!--        <part name="flop1" interface="floppy_5_25">
19            <dataarea name="flop" size="331572">
20                <rom name="123-sys.td0" size="331572" crc="a7cacc1e" sha1="8720bb7614821403c269012adea81f6cb6d84f7d" offset="0"/>
21            </dataarea>
22        </part>
2323
24      <part name="flop2" interface="floppy_5_25">
25         <dataarea name="flop" size="533442">
26            <rom name="123_sys.td0" size="533442" crc="cc6845f9" sha1="a819783b18c35f7ad2531c108acfa0acdf3225bf" offset="0"/>
27         </dataarea>
28      </part> -->
24        <part name="flop2" interface="floppy_5_25">
25            <dataarea name="flop" size="533442">
26                <rom name="123_sys.td0" size="533442" crc="cc6845f9" sha1="a819783b18c35f7ad2531c108acfa0acdf3225bf" offset="0"/>
27            </dataarea>
28        </part> -->
2929      <!-- repaired copy protected by hand -->
3030      <part name="flop1" interface="floppy_5_25">
3131         <dataarea name="flop" size="331572">
trunk/hash/unichamp.xml
r249924r249925
3737            <rom name="pac-04.bin" size="0x1000" crc="cac09841" sha1="bc9db83f26ed0810938156db6b104b4576754225" offset="0x0000"/>
3838         </dataarea>
3939      </part>
40   </software>   
40   </software>
4141
4242   <software name="pac-05">
4343      <description>Math</description>
r249924r249925
4949            <rom name="pac-05.bin" size="0x1000" crc="d54a6090" sha1="e85593096f43dcf14b08fd2c9fda277008a8df8b" offset="0x0000"/>
5050         </dataarea>
5151      </part>
52   </software>   
53   
52   </software>
53
5454</softwarelist>
trunk/src/devices/bus/a2bus/a2themill.c
r249924r249925
255255      {
256256         return slot_dma_read(space, (offset&0xfff) + 0xc000);
257257      }
258      else if (offset <= 0xcfff)   // 6809 Cxxx -> 6502 ZP
258      else if (offset <= 0xcfff)  // 6809 Cxxx -> 6502 ZP
259259      {
260260         return slot_dma_read(space, (offset&0xfff));
261261      }
trunk/src/devices/bus/cpc/ddi1.h
r249924r249925
4242
4343   required_device<upd765_family_device> m_fdc;
4444   required_device<floppy_connector> m_connector;
45   
45
4646   bool m_rom_active;
4747   bool m_romen;
4848};
trunk/src/devices/bus/cpc/doubler.c
r249924r249925
11// license:BSD-3-Clause
22// copyright-holders:Barry Rodewald
33/*
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
55 *                intended for use in duplicating cassette software
66 *
77 */
8 
9 #include "doubler.h"
10 #include "includes/amstrad.h"
118
12 //**************************************************************************
9   #include "doubler.h"
10   #include "includes/amstrad.h"
11
12   //**************************************************************************
1313//  DEVICE DEFINITIONS
1414//**************************************************************************
1515
r249924r249925
7272      data |= 0x20;
7373   return data;
7474}
75
trunk/src/devices/bus/cpc/doubler.h
r249924r249925
11// license:BSD-3-Clause
22// copyright-holders:Barry Rodewald
33/*
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
55 *                intended for use in duplicating cassette software
66 *
77 * Uses only port F0E0 (may conflict with other peripherals, PPI port A is not usable while Doubler software is running)
88 *
99 */
10
10
1111#ifndef DOUBLER_H_
1212#define DOUBLER_H_
1313
r249924r249925
2727   virtual machine_config_constructor device_mconfig_additions() const;
2828
2929   DECLARE_READ8_MEMBER(ext_tape_r);
30   
30
3131protected:
3232   // device-level overrides
3333   virtual void device_start();
r249924r249925
3535
3636private:
3737   cpc_expansion_slot_device *m_slot;
38   
38
3939   required_device<cassette_image_device> m_tape;
4040};
4141
4242// device type definition
4343extern const device_type CPC_DOUBLER;
44
44
4545#endif /* DOUBLER_H_ */
trunk/src/devices/bus/isa/omti8621.c
r249924r249925
216216   MCFG_PC_FDC_DRQ_CALLBACK(WRITELINE(omti8621_device, fdc_drq_w))
217217   MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":0", pc_hd_floppies, "525hd", omti8621_device::floppy_formats)
218218// Apollo workstations never have more then 1 floppy drive
219//   MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":1", pc_hd_floppies, "525hd", omti8621_device::floppy_formats)
219//  MCFG_FLOPPY_DRIVE_ADD(OMTI_FDC_TAG":1", pc_hd_floppies, "525hd", omti8621_device::floppy_formats)
220220MACHINE_CONFIG_END
221221
222222FLOPPY_FORMATS_MEMBER( omti8621_device::floppy_formats )
trunk/src/devices/bus/rs232/pty.c
r249924r249925
77static const int TIMER_POLL = 1;
88
99pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
10        device_t(mconfig, PSEUDO_TERMINAL, "Pseudo terminal", tag, owner, clock, "pseudo_terminal", __FILE__),
11        device_serial_interface(mconfig, *this),
12        device_rs232_port_interface(mconfig, *this),
13        device_pty_interface(mconfig, *this),
14        m_rs232_txbaud(*this, "RS232_TXBAUD"),
15        m_rs232_rxbaud(*this, "RS232_RXBAUD"),
16        m_rs232_startbits(*this, "RS232_STARTBITS"),
17        m_rs232_databits(*this, "RS232_DATABITS"),
18        m_rs232_parity(*this, "RS232_PARITY"),
19        m_rs232_stopbits(*this, "RS232_STOPBITS"),
20        m_input_count(0),
21        m_input_index(0)
10      device_t(mconfig, PSEUDO_TERMINAL, "Pseudo terminal", tag, owner, clock, "pseudo_terminal", __FILE__),
11      device_serial_interface(mconfig, *this),
12      device_rs232_port_interface(mconfig, *this),
13      device_pty_interface(mconfig, *this),
14      m_rs232_txbaud(*this, "RS232_TXBAUD"),
15      m_rs232_rxbaud(*this, "RS232_RXBAUD"),
16      m_rs232_startbits(*this, "RS232_STARTBITS"),
17      m_rs232_databits(*this, "RS232_DATABITS"),
18      m_rs232_parity(*this, "RS232_PARITY"),
19      m_rs232_stopbits(*this, "RS232_STOPBITS"),
20      m_input_count(0),
21      m_input_index(0)
2222{
2323}
2424
2525WRITE_LINE_MEMBER(pseudo_terminal_device::update_serial)
2626{
27        int startbits = convert_startbits(m_rs232_startbits->read());
28        int databits = convert_databits(m_rs232_databits->read());
29        parity_t parity = convert_parity(m_rs232_parity->read());
30        stop_bits_t stopbits = convert_stopbits(m_rs232_stopbits->read());
27      int startbits = convert_startbits(m_rs232_startbits->read());
28      int databits = convert_databits(m_rs232_databits->read());
29      parity_t parity = convert_parity(m_rs232_parity->read());
30      stop_bits_t stopbits = convert_stopbits(m_rs232_stopbits->read());
3131
32        set_data_frame(startbits, databits, parity, stopbits);
32      set_data_frame(startbits, databits, parity, stopbits);
3333
34        int txbaud = convert_baud(m_rs232_txbaud->read());
35        set_tra_rate(txbaud);
34      int txbaud = convert_baud(m_rs232_txbaud->read());
35      set_tra_rate(txbaud);
3636
37        int rxbaud = convert_baud(m_rs232_rxbaud->read());
38        set_rcv_rate(rxbaud);
37      int rxbaud = convert_baud(m_rs232_rxbaud->read());
38      set_rcv_rate(rxbaud);
3939
40        output_rxd(1);
40      output_rxd(1);
4141
42        // TODO: make this configurable
43        output_dcd(0);
44        output_dsr(0);
45        output_cts(0);
42      // TODO: make this configurable
43      output_dcd(0);
44      output_dsr(0);
45      output_cts(0);
4646}
4747
4848static INPUT_PORTS_START(pseudo_terminal)
49        MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial)
50        MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial)
51        MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial)
52        MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial)
53        MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial)
54        MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial)
49      MCFG_RS232_BAUD("RS232_TXBAUD", RS232_BAUD_9600, "TX Baud", pseudo_terminal_device, update_serial)
50      MCFG_RS232_BAUD("RS232_RXBAUD", RS232_BAUD_9600, "RX Baud", pseudo_terminal_device, update_serial)
51      MCFG_RS232_STARTBITS("RS232_STARTBITS", RS232_STARTBITS_1, "Start Bits", pseudo_terminal_device, update_serial)
52      MCFG_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial)
53      MCFG_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial)
54      MCFG_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial)
5555INPUT_PORTS_END
5656
5757ioport_constructor pseudo_terminal_device::device_input_ports() const
5858{
59        return INPUT_PORTS_NAME(pseudo_terminal);
59      return INPUT_PORTS_NAME(pseudo_terminal);
6060}
6161
6262void pseudo_terminal_device::device_start()
6363{
64        m_timer_poll = timer_alloc(TIMER_POLL);
64      m_timer_poll = timer_alloc(TIMER_POLL);
6565
66        open();
66      open();
6767}
6868
6969void pseudo_terminal_device::device_stop()
7070{
71        close();
71      close();
7272}
7373
7474void pseudo_terminal_device::device_reset()
7575{
76        update_serial(0);
77        queue();
76      update_serial(0);
77      queue();
7878}
7979
8080void pseudo_terminal_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
8181{
82        switch (id)
83        {
84        case TIMER_POLL:
85                queue();
86                break;
82      switch (id)
83      {
84      case TIMER_POLL:
85            queue();
86            break;
8787
88        default:
89                device_serial_interface::device_timer(timer, id, param, ptr);
90        }
88      default:
89            device_serial_interface::device_timer(timer, id, param, ptr);
90      }
9191}
9292
9393void pseudo_terminal_device::tra_callback()
9494{
95        output_rxd(transmit_register_get_data_bit());
95      output_rxd(transmit_register_get_data_bit());
9696}
9797
9898void pseudo_terminal_device::tra_complete()
9999{
100        queue();
100      queue();
101101}
102102
103103void pseudo_terminal_device::rcv_complete()
104104{
105        receive_register_extract();
106        write(get_received_char());
105      receive_register_extract();
106      write(get_received_char());
107107}
108108
109109void pseudo_terminal_device::queue(void)
110110{
111        if (is_transmit_register_empty())
112        {
113                if (m_input_index == m_input_count)
114                {
115                    m_input_index = 0;
116                    int tmp = read(m_input_buffer , sizeof(m_input_buffer));
117                    if (tmp > 0) {
118                        m_input_count = tmp;
119                    } else {
120                        m_input_count = 0;
121                    }
122                }
111      if (is_transmit_register_empty())
112      {
113            if (m_input_index == m_input_count)
114            {
115               m_input_index = 0;
116               int tmp = read(m_input_buffer , sizeof(m_input_buffer));
117               if (tmp > 0) {
118                  m_input_count = tmp;
119               } else {
120                  m_input_count = 0;
121               }
122            }
123123
124                if (m_input_count != 0)
125                {
126                        transmit_register_setup(m_input_buffer[ m_input_index++ ]);
124            if (m_input_count != 0)
125            {
126                  transmit_register_setup(m_input_buffer[ m_input_index++ ]);
127127
128                        m_timer_poll->adjust(attotime::never);
129                }
130                else
131                {
132                        int txbaud = convert_baud(m_rs232_txbaud->read());
133                        m_timer_poll->adjust(attotime::from_hz(txbaud));
134                }
135        }
128                  m_timer_poll->adjust(attotime::never);
129            }
130            else
131            {
132                  int txbaud = convert_baud(m_rs232_txbaud->read());
133                  m_timer_poll->adjust(attotime::from_hz(txbaud));
134            }
135      }
136136}
137137
138138const device_type PSEUDO_TERMINAL = &device_creator<pseudo_terminal_device>;
trunk/src/devices/bus/rs232/pty.h
r249924r249925
77#include "rs232.h"
88
99class pseudo_terminal_device : public device_t,
10                               public device_serial_interface,
11                               public device_rs232_port_interface,
12                               public device_pty_interface
10                        public device_serial_interface,
11                        public device_rs232_port_interface,
12                        public device_pty_interface
1313{
1414public:
15        pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
15      pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1616
17        virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) {
18                device_serial_interface::rx_w(state);
19        }
17      virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) {
18            device_serial_interface::rx_w(state);
19      }
2020
21        DECLARE_WRITE_LINE_MEMBER(update_serial);
21      DECLARE_WRITE_LINE_MEMBER(update_serial);
2222
2323protected:
24        virtual ioport_constructor device_input_ports() const;
25        virtual void device_start();
26        virtual void device_stop();
27        virtual void device_reset();
28        virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
24      virtual ioport_constructor device_input_ports() const;
25      virtual void device_start();
26      virtual void device_stop();
27      virtual void device_reset();
28      virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
2929
30        virtual void tra_callback();
31        virtual void tra_complete();
32        virtual void rcv_complete();
30      virtual void tra_callback();
31      virtual void tra_complete();
32      virtual void rcv_complete();
3333
3434private:
35        required_ioport m_rs232_txbaud;
36        required_ioport m_rs232_rxbaud;
37        required_ioport m_rs232_startbits;
38        required_ioport m_rs232_databits;
39        required_ioport m_rs232_parity;
40        required_ioport m_rs232_stopbits;
35      required_ioport m_rs232_txbaud;
36      required_ioport m_rs232_rxbaud;
37      required_ioport m_rs232_startbits;
38      required_ioport m_rs232_databits;
39      required_ioport m_rs232_parity;
40      required_ioport m_rs232_stopbits;
4141
42        UINT8 m_input_buffer[ 1024 ];
43        UINT32 m_input_count;
44        UINT32 m_input_index;
45        emu_timer *m_timer_poll;
42      UINT8 m_input_buffer[ 1024 ];
43      UINT32 m_input_count;
44      UINT32 m_input_index;
45      emu_timer *m_timer_poll;
4646
47        void queue(void);
47      void queue(void);
4848};
4949
5050extern const device_type PSEUDO_TERMINAL;
trunk/src/devices/bus/rs232/rs232.c
r249924r249925
111111   SLOT_INTERFACE("null_modem", NULL_MODEM)
112112   SLOT_INTERFACE("printer", SERIAL_PRINTER)
113113   SLOT_INTERFACE("terminal", SERIAL_TERMINAL)
114        SLOT_INTERFACE("pty", PSEUDO_TERMINAL)
114      SLOT_INTERFACE("pty", PSEUDO_TERMINAL)
115115SLOT_INTERFACE_END
trunk/src/devices/bus/tiki100/8088.c
r249924r249925
1414//  MACROS/CONSTANTS
1515//**************************************************************************
1616
17#define I8088_TAG   "u3"
17#define I8088_TAG   "u3"
1818
1919
2020
trunk/src/devices/bus/tiki100/8088.h
r249924r249925
2424// ======================> tiki100_8088_t
2525
2626class tiki100_8088_t : public device_t,
27                  public device_tiki100bus_card_interface
27                  public device_tiki100bus_card_interface
2828{
2929public:
3030   // construction/destruction
trunk/src/devices/bus/tiki100/exp.h
r249924r249925
105105// ======================> tiki100_bus_slot_t
106106
107107class tiki100_bus_slot_t : public device_t,
108                     public device_slot_interface,
109                     public device_z80daisy_interface
108                     public device_slot_interface,
109                     public device_z80daisy_interface
110110{
111111public:
112112   // construction/destruction
trunk/src/devices/bus/tiki100/hdc.c
r249924r249925
1414//  MACROS/CONSTANTS
1515//**************************************************************************
1616
17#define WD1010_TAG   "hdc"
17#define WD1010_TAG  "hdc"
1818
1919
2020
trunk/src/devices/bus/tiki100/hdc.h
r249924r249925
2525// ======================> tiki100_hdc_t
2626
2727class tiki100_hdc_t : public device_t,
28                 public device_tiki100bus_card_interface
28                  public device_tiki100bus_card_interface
2929{
3030public:
3131   // construction/destruction
trunk/src/devices/cpu/mips/mips3.h
r249924r249925
366366   UINT32      m_nextpc;
367367   UINT32      m_pcbase;
368368   UINT8       m_cf[4][8];
369   bool       m_delayslot;
369   bool        m_delayslot;
370370   int         m_op;
371371   int         m_interrupt_cycles;
372372   UINT32      m_ll_value;
trunk/src/devices/imagedev/floppy.c
r249924r249925
415415   if (!cur_load_cb.isnull())
416416      return cur_load_cb(this);
417417
418        if (motor_always_on) {
419                // When disk is inserted, start motor
420                mon_w(0);
421        } else if(!mon)
418      if (motor_always_on) {
419            // When disk is inserted, start motor
420            mon_w(0);
421      } else if(!mon)
422422      ready_counter = 2;
423423
424424   return IMAGE_INIT_PASS;
r249924r249925
446446   if (!cur_unload_cb.isnull())
447447      cur_unload_cb(this);
448448
449        if (motor_always_on) {
450                // When disk is removed, stop motor
451                mon_w(1);
452        } else if(!ready) {
449      if (motor_always_on) {
450            // When disk is removed, stop motor
451            mon_w(1);
452      } else if(!ready) {
453453      ready = true;
454454      if(!cur_ready_cb.isnull())
455455         cur_ready_cb(this, ready);
r249924r249925
497497   if (!mon && image)
498498   {
499499      revolution_start_time = machine().time();
500                if (motor_always_on) {
501                    // Drives with motor that is always spinning are immediately ready when a disk is loaded
502                    // because there is no spin-up time
503                    ready = false;
504                    if(!cur_ready_cb.isnull())
505                        cur_ready_cb(this, ready);
506                } else {
507                    ready_counter = 2;
508                }
500            if (motor_always_on) {
501               // Drives with motor that is always spinning are immediately ready when a disk is loaded
502               // because there is no spin-up time
503               ready = false;
504               if(!cur_ready_cb.isnull())
505                  cur_ready_cb(this, ready);
506            } else {
507               ready_counter = 2;
508            }
509509      index_resync();
510510   }
511511
trunk/src/devices/imagedev/floppy.h
r249924r249925
290290
291291   sound_stream*   m_sound;
292292   bool            m_loaded;
293   bool         m_is525; // true if this is a 5.25" floppy drive
293   bool            m_is525; // true if this is a 5.25" floppy drive
294294
295   int            m_sampleindex_motor_start;
296   int            m_sampleindex_motor_loop;
297   int            m_sampleindex_motor_end;
295   int             m_sampleindex_motor_start;
296   int             m_sampleindex_motor_loop;
297   int             m_sampleindex_motor_end;
298298   int             m_samplesize_motor_start;
299299   int             m_samplesize_motor_loop;
300300   int             m_samplesize_motor_end;
r249924r249925
302302   int             m_motor_playback_state;
303303   bool            m_motor_on;
304304
305   int            m_step_samples;
306   int            m_sampleindex_step1;
305   int             m_step_samples;
306   int             m_sampleindex_step1;
307307   int             m_samplesize_step[MAX_STEP_SAMPLES];
308308   int             m_samplepos_step;
309309   int             m_step_playback_state;
trunk/src/devices/machine/z80scc.c
r249924r249925
7373#include "z80scc.h"
7474
7575//**************************************************************************
76//   MACROS / CONSTANTS
76//  MACROS / CONSTANTS
7777//**************************************************************************
7878
7979#define VERBOSE 0
r249924r249925
8989#define FUNCNAME __PRETTY_FUNCTION__
9090#endif
9191
92#define CHANA_TAG   "cha"
93#define CHANB_TAG   "chb"
92#define CHANA_TAG   "cha"
93#define CHANB_TAG   "chb"
9494
9595//**************************************************************************
96//   DEVICE DEFINITIONS
96//  DEVICE DEFINITIONS
9797//**************************************************************************
9898// device type definition
9999const device_type Z80SCC   = &device_creator<z80scc_device>;
r249924r249925
108108const device_type SCC8523L = &device_creator<scc8523L_device>;
109109
110110//-------------------------------------------------
111//   device_mconfig_additions -
111//  device_mconfig_additions -
112112//-------------------------------------------------
113113MACHINE_CONFIG_FRAGMENT( z80scc )
114114   MCFG_DEVICE_ADD(CHANA_TAG, Z80SCC_CHANNEL, 0)
r249924r249925
121121}
122122
123123//**************************************************************************
124//   LIVE DEVICE
124//  LIVE DEVICE
125125//**************************************************************************
126126
127127//-------------------------------------------------
128//   z80scc_device - constructor
128//  z80scc_device - constructor
129129//-------------------------------------------------
130130
131131z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
r249924r249925
213213   : z80scc_device(mconfig, SCC8523L, "SCC 8523L", tag, owner, clock, TYPE_SCC8523L, "scc8523L", __FILE__){ }
214214
215215//-------------------------------------------------
216//   device_start - device-specific startup
216//  device_start - device-specific startup
217217//-------------------------------------------------
218218
219219void z80scc_device::device_start()
r249924r249925
252252
253253
254254//-------------------------------------------------
255//   device_reset - device-specific reset
255//  device_reset - device-specific reset
256256//-------------------------------------------------
257257
258258void z80scc_device::device_reset()
r249924r249925
269269sources. These three sources of interrupts are: 1) Receiver, 2) Transmitter, and 3) External/Status
270270conditions. In addition, there are several conditions that may cause these interrupts.*/
271271//-------------------------------------------------
272//   z80daisy_irq_state - get interrupt status
272//  z80daisy_irq_state - get interrupt status
273273//-------------------------------------------------
274274
275275int z80scc_device::z80daisy_irq_state()
r249924r249925
278278   int i;
279279
280280   LOG(("%s %s A:%d%d%d B:%d%d%d ",FUNCNAME, tag(),
281       m_int_state[0], m_int_state[1], m_int_state[2],
282       m_int_state[3], m_int_state[4], m_int_state[5]));
281         m_int_state[0], m_int_state[1], m_int_state[2],
282         m_int_state[3], m_int_state[4], m_int_state[5]));
283283
284284   // loop over all interrupt sources
285285   for (i = 0; i < 6; i++)
r249924r249925
300300
301301
302302//-------------------------------------------------
303//   z80daisy_irq_ack - interrupt acknowledge
303//  z80daisy_irq_ack - interrupt acknowledge
304304//-------------------------------------------------
305305
306306int z80scc_device::z80daisy_irq_ack()
r249924r249925
333333
334334
335335//-------------------------------------------------
336//   z80daisy_irq_reti - return from interrupt
336//  z80daisy_irq_reti - return from interrupt
337337//-------------------------------------------------
338338
339339void z80scc_device::z80daisy_irq_reti()
r249924r249925
360360
361361
362362//-------------------------------------------------
363//   check_interrupts -
363//  check_interrupts -
364364//-------------------------------------------------
365365
366366void z80scc_device::check_interrupts()
r249924r249925
372372
373373
374374//-------------------------------------------------
375//   reset_interrupts -
375//  reset_interrupts -
376376//-------------------------------------------------
377377
378378void z80scc_device::reset_interrupts()
r249924r249925
394394        Interrupt Vector Modification
395395        V3 V2 V1 Status High/Status Low =0
396396        V4 V5 V6 Status High/Status Low =1
397        0    0   0 Ch B Transmit Buffer Empty
398        0    0   1 Ch B External/Status Change
399        0    1   0 Ch B Receive Char. Available
400        0    1   1 Ch B Special Receive Condition
401        1    0   0 Ch A Transmit Buffer Empty
402        1    0   1 Ch A External/Status Change
403        1    1   0 Ch A Receive Char. Available
404        1    1   1 Ch A Special Receive Condition
397        0  0  0 Ch B Transmit Buffer Empty
398        0  0  1 Ch B External/Status Change
399        0  1  0 Ch B Receive Char. Available
400        0  1  1 Ch B Special Receive Condition
401        1  0  0 Ch A Transmit Buffer Empty
402        1  0  1 Ch A External/Status Change
403        1  1  0 Ch A Receive Char. Available
404        1  1  1 Ch A Special Receive Condition
405405      */
406406      // Add channel offset according to table above
407   src |= (i == CHANNEL_A   ? 0x04 : 0x00 );
407   src |= (i == CHANNEL_A  ? 0x04 : 0x00 );
408408
409409   // Modify vector according to Hi/lo bit of WR9
410410   if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_SHSL) // Affect V4-V6
411411   {
412412      vec |= src << 4;
413413   }
414   else           // Affect V1-V3
414   else              // Affect V1-V3
415415   {
416416      vec |= src << 1;
417417   }
r249924r249925
420420
421421
422422//-------------------------------------------------
423//   trigger_interrupt -
423//  trigger_interrupt -
424424//-------------------------------------------------
425425void z80scc_device::trigger_interrupt(int index, int state)
426426{
r249924r249925
438438      LOG(("Master Interrupt Enable is not set, blocking attempt to interrupt\n"));
439439      return;
440440   }
441   
441
442442   switch(state)
443443   {
444444   case z80scc_channel::INT_RECEIVE:
r249924r249925
477477      logerror("Attempt to trigger interrupt of unknown origin blocked: %02x on channel %c\n", state, 'A' + index);
478478      return;
479479   }
480   
480
481481   // Vector modification requested?
482482   if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_VIS)
483483   {
484484      vector = modify_vector(vector, index, source);
485485   }
486   
486
487487   //LOG(("Z80SCC \"%s\": %c : Interrupt Request %u\n", tag(), 'A' + index, state));
488488
489489   // update vector register // TODO: What if interrupts are nested? May we loose the modified vector or even get the wrong one?
r249924r249925
500500   */
501501   // Add channel offset to priority according to table above
502502   priority = prio_level + (index == CHANNEL_A ? 3 : 0 );
503   
503
504504   // trigger interrupt
505505   m_int_state[priority] |= Z80_DAISY_INT;
506   
506
507507   // Based on the fact that prio levels are aligned with the bitorder of rr3 we can do this...
508508   m_chanA->m_rr3 |= (prio_level << (index == CHANNEL_A ? 3 : 0 ));
509   
509
510510   // check for interrupt
511511   check_interrupts();
512512}
513513
514514
515515//-------------------------------------------------
516//   m1_r - interrupt acknowledge
516//  m1_r - interrupt acknowledge
517517//-------------------------------------------------
518518
519519int z80scc_device::m1_r()
r249924r249925
523523
524524
525525//-------------------------------------------------
526//   cd_ba_r - Universal Bus read
526//  cd_ba_r - Universal Bus read
527527//-------------------------------------------------
528528READ8_MEMBER( z80scc_device::cd_ba_r )
529529{
r249924r249925
537537      logerror("Z80SCC cd_ba_r not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n");
538538      return 0;
539539   }
540   
541   //     LOG(("z80scc_device::cd_ba_r ba:%02x cd:%02x\n", ba, cd));
540
541   //    LOG(("z80scc_device::cd_ba_r ba:%02x cd:%02x\n", ba, cd));
542542   return cd ? channel->control_read() : channel->data_read();
543543}
544544
545545//-------------------------------------------------
546//   cd_ba_w - Universal Bus write
546//  cd_ba_w - Universal Bus write
547547//-------------------------------------------------
548548WRITE8_MEMBER( z80scc_device::cd_ba_w )
549549{
550550   int ba = BIT(offset, 0);
551551   int cd = BIT(offset, 1);
552552   z80scc_channel *channel = ba ? m_chanB : m_chanA;
553   
553
554554   /* Expell non-Universal Bus variants */
555555   if ( !(m_variant & SET_Z85X3X) )
556556   {
557557      logerror("Z80SCC cd_ba_w not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n");
558558      return;
559559   }
560   
561   //     LOG(("z80scc_device::cd_ba_w ba:%02x cd:%02x\n", ba, cd));
560
561   //    LOG(("z80scc_device::cd_ba_w ba:%02x cd:%02x\n", ba, cd));
562562   if (cd)
563563      channel->control_write(data);
564564   else
r249924r249925
567567
568568
569569//-------------------------------------------------
570//   ba_cd_r - Universal Bus read
570//  ba_cd_r - Universal Bus read
571571//-------------------------------------------------
572572
573573READ8_MEMBER( z80scc_device::ba_cd_r )
r249924r249925
575575   int ba = BIT(offset, 1);
576576   int cd = BIT(offset, 0);
577577   z80scc_channel *channel = ba ? m_chanB : m_chanA;
578   
578
579579   /* Expell non-Universal Bus variants */
580580   if ( !(m_variant & SET_Z85X3X) )
581581   {
582582      logerror("Z80SCC ba_cd_r not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n");
583583      return 0;
584584   }
585   
586   //     LOG(("z80scc_device::ba_cd_r ba:%02x cd:%02x\n", ba, cd));
585
586   //    LOG(("z80scc_device::ba_cd_r ba:%02x cd:%02x\n", ba, cd));
587587   return cd ? channel->control_read() : channel->data_read();
588588}
589589
590590
591591//-------------------------------------------------
592//   ba_cd_w -
592//  ba_cd_w -
593593//-------------------------------------------------
594594
595595WRITE8_MEMBER( z80scc_device::ba_cd_w )
r249924r249925
597597   int ba = BIT(offset, 1);
598598   int cd = BIT(offset, 0);
599599   z80scc_channel *channel = ba ? m_chanB : m_chanA;
600   
600
601601   /* Expell non-Universal Bus variants */
602602   if ( !(m_variant & SET_Z85X3X) )
603603   {
604604      logerror("Z80SCC ba_cd_w not supported by this device variant, you should probably use combinations of c*_r/w and d*_r/w (see z80scc.h)\n");
605605      return;
606606   }
607   
607
608608   LOG(("z80scc_device::ba_cd_w ba:%02x cd:%02x\n", ba, cd));
609609
610610   if (cd)
r249924r249925
614614}
615615
616616//**************************************************************************
617//   SCC CHANNEL
617//  SCC CHANNEL
618618//**************************************************************************
619619
620620//-------------------------------------------------
621//   SCC_channel - constructor
621//  SCC_channel - constructor
622622//-------------------------------------------------
623623
624624z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r249924r249925
641641   LOG(("%s\n",FUNCNAME));
642642
643643   // Reset all registers
644   m_rr0 = m_rr1 = m_rr2 = m_rr3  = m_rr4   = m_rr5    = m_rr6  = m_rr7 = m_rr8 
644   m_rr0 = m_rr1 = m_rr2 = m_rr3  = m_rr4  = m_rr5 = m_rr6  = m_rr7 = m_rr8
645645      = m_rr9 = m_rr10 = m_rr11 = m_rr12 = m_rr13 = m_rr14 = m_rr15 = 0;
646   m_wr0 = m_wr1 = m_wr2 = m_wr3  = m_wr4   = m_wr5    = m_wr6  = m_wr7 = m_wr8 
646   m_wr0 = m_wr1 = m_wr2 = m_wr3  = m_wr4  = m_wr5 = m_wr6  = m_wr7 = m_wr8
647647      = m_wr9 = m_wr10 = m_wr11 = m_wr12 = m_wr13 = m_wr14 = m_wr15 = 0;
648   
648
649649   for (int i = 0; i < 3; i++) // TODO adapt to SCC fifos
650650   {
651651      m_rx_data_fifo[i] = 0;
r249924r249925
655655
656656
657657//-------------------------------------------------
658//   start - channel startup
658//  start - channel startup
659659//-------------------------------------------------
660660
661661void z80scc_channel::device_start()
r249924r249925
665665   m_index = m_uart->get_channel_index(this);
666666
667667   m_uart->m_wr0_ptrbits = 0;
668   
668
669669   m_rx_fifo_sz = (m_uart->m_variant & SET_ESCC) ? 8 : 3;
670670   m_rx_fifo_wp = m_rx_fifo_rp = 0;
671   
671
672672   // state saving
673673   save_item(NAME(m_rr0));
674674   save_item(NAME(m_rr1));
r249924r249925
725725
726726
727727//-------------------------------------------------
728//   reset - reset channel status
728//  reset - reset channel status
729729//-------------------------------------------------
730730
731731void z80scc_channel::device_reset()
r249924r249925
737737   transmit_register_reset();
738738
739739   // Soft/Channel Reset values according to SCC users manual
740   m_wr0   = 0x00;
740   m_wr0   = 0x00;
741741   m_wr1  &= 0x24;
742742   m_wr3  &= 0x01;
743743   m_wr4  |= 0x04;
744744   m_wr5  &= 0x61;
745745   if (m_uart->m_variant & (z80scc_device::TYPE_SCC85C30 | SET_ESCC))
746746      m_wr7 = 0x20;
747   m_wr9  &= 0xdf; //   WR9 has a different hard reset value
747   m_wr9  &= 0xdf; //  WR9 has a different hard reset value
748748   m_wr10 &= 0x60; // WR10 has a different hard reset value
749749   m_wr11 &= 0xff; // WR11 has a different hard reset value
750750   m_wr14 &= 0xc3; // WR14 has a different hard reset value
751751   m_wr14 |= 0x20;
752   m_wr15   = 0xf8;
752   m_wr15  = 0xf8;
753753   m_rr0  &= 0xfc;
754754   m_rr0  |= 0x44;
755755   m_rr1  &= 0x07;
756756   m_rr1  |= 0x06;
757   m_rr3   = 0x00;
757   m_rr3   = 0x00;
758758   m_rr10 &= 0x40;
759759
760760#if 1 // old reset code
r249924r249925
786786
787787
788788//-------------------------------------------------
789//   tra_callback -
789//  tra_callback -
790790//-------------------------------------------------
791791
792792void z80scc_channel::tra_callback()
r249924r249925
812812   else if (!is_transmit_register_empty())
813813   {
814814      int db = transmit_register_get_data_bit();
815     
815
816816      LOG(("%" I64FMT "d %s() \"%s \"Channel %c transmit data bit %d m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, db, m_wr5));
817817      // transmit data
818818      if (m_index == z80scc_device::CHANNEL_A)
r249924r249925
829829
830830
831831//-------------------------------------------------
832//   tra_complete -
832//  tra_complete -
833833//-------------------------------------------------
834834
835835void z80scc_channel::tra_complete()
r249924r249925
880880
881881
882882//-------------------------------------------------
883//   rcv_callback -
883//  rcv_callback -
884884//-------------------------------------------------
885885
886886void z80scc_channel::rcv_callback()
r249924r249925
900900
901901
902902//-------------------------------------------------
903//   rcv_complete -
903//  rcv_complete -
904904//-------------------------------------------------
905905
906906void z80scc_channel::rcv_complete()
r249924r249925
915915
916916
917917//-------------------------------------------------
918//   get_clock_mode - get clock divisor
918//  get_clock_mode - get clock divisor
919919//-------------------------------------------------
920920
921921int z80scc_channel::get_clock_mode()
r249924r249925
924924
925925   switch (m_wr4 & WR4_CLOCK_RATE_MASK)
926926   {
927   case WR4_CLOCK_RATE_X1:   clocks = 1;   break;
928   case WR4_CLOCK_RATE_X16:   clocks = 16;   break;
929   case WR4_CLOCK_RATE_X32:   clocks = 32;   break;
930   case WR4_CLOCK_RATE_X64:   clocks = 64;   break;
927   case WR4_CLOCK_RATE_X1: clocks = 1; break;
928   case WR4_CLOCK_RATE_X16:    clocks = 16;    break;
929   case WR4_CLOCK_RATE_X32:    clocks = 32;    break;
930   case WR4_CLOCK_RATE_X64:    clocks = 64;    break;
931931   }
932932
933933   return clocks;
r249924r249925
955955
956956void z80scc_channel::update_rts()
957957{
958//     LOG(("%s(%d) \"%s\": %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index));
958//    LOG(("%s(%d) \"%s\": %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index));
959959      if (m_wr5 & WR5_RTS)
960960      {
961961            // when the RTS bit is set, the _RTS output goes low
r249924r249925
973973}
974974
975975//-------------------------------------------------
976//   get_stop_bits - get number of stop bits
976//  get_stop_bits - get number of stop bits
977977//-------------------------------------------------
978978
979979device_serial_interface::stop_bits_t z80scc_channel::get_stop_bits()
r249924r249925
990990
991991
992992//-------------------------------------------------
993//   get_rx_word_length - get receive word length
993//  get_rx_word_length - get receive word length
994994//-------------------------------------------------
995995
996996int z80scc_channel::get_rx_word_length()
r249924r249925
999999
10001000   switch (m_wr3 & WR3_RX_WORD_LENGTH_MASK)
10011001   {
1002   case WR3_RX_WORD_LENGTH_5:   bits = 5;   break;
1003   case WR3_RX_WORD_LENGTH_6:   bits = 6;   break;
1004   case WR3_RX_WORD_LENGTH_7:   bits = 7;   break;
1005   case WR3_RX_WORD_LENGTH_8:   bits = 8;   break;
1002   case WR3_RX_WORD_LENGTH_5:  bits = 5;   break;
1003   case WR3_RX_WORD_LENGTH_6:  bits = 6;   break;
1004   case WR3_RX_WORD_LENGTH_7:  bits = 7;   break;
1005   case WR3_RX_WORD_LENGTH_8:  bits = 8;   break;
10061006   }
10071007
10081008   return bits;
r249924r249925
10101010
10111011
10121012//-------------------------------------------------
1013//   get_tx_word_length - get transmit word length
1013//  get_tx_word_length - get transmit word length
10141014//-------------------------------------------------
10151015
10161016int z80scc_channel::get_tx_word_length()
r249924r249925
10191019
10201020   switch (m_wr5 & WR5_TX_WORD_LENGTH_MASK)
10211021   {
1022   case WR5_TX_WORD_LENGTH_5:   bits = 5;   break;
1023   case WR5_TX_WORD_LENGTH_6:   bits = 6;   break;
1024   case WR5_TX_WORD_LENGTH_7:   bits = 7;   break;
1025   case WR5_TX_WORD_LENGTH_8:   bits = 8;   break;
1022   case WR5_TX_WORD_LENGTH_5:  bits = 5;   break;
1023   case WR5_TX_WORD_LENGTH_6:  bits = 6;   break;
1024   case WR5_TX_WORD_LENGTH_7:  bits = 7;   break;
1025   case WR5_TX_WORD_LENGTH_8:  bits = 8;   break;
10261026   }
10271027
10281028   return bits;
r249924r249925
12311231}
12321232
12331233//-------------------------------------------------
1234//   control_read - read control register
1234//  control_read - read control register
12351235//-------------------------------------------------
12361236UINT8 z80scc_channel::control_read()
12371237{
r249924r249925
12391239   int reg = m_uart->m_wr0_ptrbits; //m_wr0;
12401240   int regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH));
12411241
1242   //   LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", __func__, data, reg, regmask, m_wr0));
1242   //  LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", __func__, data, reg, regmask, m_wr0));
12431243   m_uart->m_wr0_ptrbits = 0;
12441244   reg &= regmask;
12451245
r249924r249925
12521252   /* TODO. Sort out 80X30 limitations in register access */
12531253   switch (reg)
12541254   {
1255   case REG_RR0_STATUS:    data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1
1256   case REG_RR1_SPEC_RCV_COND:    data = do_sccreg_rr1(); break;
1255   case REG_RR0_STATUS:     data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1
1256   case REG_RR1_SPEC_RCV_COND:  data = do_sccreg_rr1(); break;
12571257   case REG_RR2_INTERRUPT_VECT: data = do_sccreg_rr2(); break; // Channel dependent and SCC specific handling compared to SIO
12581258      /* registers 3-7 are specific to SCC. TODO: Check variant and log/stop misuse */
12591259   case REG_RR3_INTERUPPT_PEND: data = do_sccreg_rr3(); break;
1260   case REG_RR4_WR4_OR_RR0:    data = do_sccreg_rr4(); break;
1261   case REG_RR5_WR5_OR_RR0:    data = do_sccreg_rr5(); break;
1262   case REG_RR6_LSB_OR_RR2:    data = do_sccreg_rr6(); break;
1263   case REG_RR7_MSB_OR_RR3:    data = do_sccreg_rr7(); break;
1260   case REG_RR4_WR4_OR_RR0:     data = do_sccreg_rr4(); break;
1261   case REG_RR5_WR5_OR_RR0:     data = do_sccreg_rr5(); break;
1262   case REG_RR6_LSB_OR_RR2:     data = do_sccreg_rr6(); break;
1263   case REG_RR7_MSB_OR_RR3:     data = do_sccreg_rr7(); break;
12641264      /* registers 8-15 are specific to SCC */
1265   case REG_RR8_RECEIVE_DATA:    data = data_read(); break;
1266   case REG_RR9_WR3_OR_RR13:    data = do_sccreg_rr9(); break;
1267   case REG_RR10_MISC_STATUS:    data = do_sccreg_rr10(); break;
1268   case REG_RR11_WR10_OR_RR15:    data = do_sccreg_rr11(); break;
1265   case REG_RR8_RECEIVE_DATA:   data = data_read(); break;
1266   case REG_RR9_WR3_OR_RR13:    data = do_sccreg_rr9(); break;
1267   case REG_RR10_MISC_STATUS:   data = do_sccreg_rr10(); break;
1268   case REG_RR11_WR10_OR_RR15:  data = do_sccreg_rr11(); break;
12691269   case REG_RR12_LO_TIME_CONST: data = do_sccreg_rr12(); break;
12701270   case REG_RR13_HI_TIME_CONST: data = do_sccreg_rr13(); break;
1271   case REG_RR14_WR7_OR_R10:    data = do_sccreg_rr14(); break;
1271   case REG_RR14_WR7_OR_R10:    data = do_sccreg_rr14(); break;
12721272   case REG_RR15_WR15_EXT_STAT: data = do_sccreg_rr15(); break;
12731273   default:
12741274      logerror("Z80SCC \"%s\" %s: %c : Unsupported RRx register:%02x\n", m_owner->tag(), __func__, 'A' + m_index, reg);
r249924r249925
13081308   m_wr0 = data;
13091309   m_uart->m_wr0_ptrbits = data & WR0_REGISTER_MASK;
13101310
1311   /* Sort out SCC specific behaviours    from legacy SIO behaviour */
1311   /* Sort out SCC specific behaviours from legacy SIO behaviour */
13121312   /* WR0_Z_* are Z80X30 specific commands */
13131313   switch (data & WR0_COMMAND_MASK)
13141314   {
r249924r249925
13401340        External/Status interrupt. However, if this second status change does not persist
13411341        (there are two transitions), another interrupt is not generated. Exceptions to this
13421342        rule are detailed in the RR0 description.*/
1343      //        do_sccreg_wr0(data);
1343      //        do_sccreg_wr0(data);
13441344      if (!m_zc)
13451345      {
13461346         m_rr0 |= RR0_ZC;
r249924r249925
14411441   LOG(("- Wait/Ready Enable %u\n", (data & WR1_WRDY_ENABLE) ? 1 : 0));
14421442   LOG(("- Wait/Ready Function %s\n", (data & WR1_WRDY_FUNCTION) ? "Ready" : "Wait"));
14431443   LOG(("- Wait/Ready on %s\n", (data & WR1_WRDY_ON_RX_TX) ? "Receive" : "Transmit"));
1444   
1444
14451445   switch (data & WR1_RX_INT_MODE_MASK)
14461446   {
14471447   case WR1_RX_INT_DISABLE:
14481448      LOG(("- Receiver Interrupt Disabled\n"));
14491449      break;
1450     
1450
14511451   case WR1_RX_INT_FIRST:
14521452      LOG(("- Receiver Interrupt on First Character\n"));
14531453      break;
1454     
1454
14551455   case WR1_RX_INT_ALL_PARITY:
14561456      LOG(("- Receiver Interrupt on All Characters, Parity Affects Vector\n"));
14571457      break;
1458     
1458
14591459   case WR1_RX_INT_ALL:
14601460      LOG(("- Receiver Interrupt on All Characters\n"));
14611461      break;
r249924r249925
14721472   m_wr2 = data;
14731473   m_uart->m_chanA->m_rr2 = data;
14741474   m_uart->m_chanB->m_rr2 = data; /* TODO: Sort out the setting of ChanB depending on bits in WR9 */
1475   
1475
14761476   m_uart->check_interrupts();
14771477}
14781478
r249924r249925
15891589     /SYNC pin is unavailable for other use. The /SYNC signal is forced to zero internally. A hardware
15901590     reset forces /NO XTAL. (At least 20 ms should be allowed after this bit is set to allow the oscillator
15911591     to stabilize.)*/
1592   LOG(("   Clock type %s\n", data & WR11_RCVCLK_TYPE ? "Crystal oscillator between RTxC and /SYNC pins" : "TTL level on RTxC pin"));
1592   LOG(("  Clock type %s\n", data & WR11_RCVCLK_TYPE ? "Crystal oscillator between RTxC and /SYNC pins" : "TTL level on RTxC pin"));
15931593   /*Bits 6 and 5: Receiver Clock select bits 1 and 0
15941594     These bits determine the source of the receive clock as listed below. They do not
15951595     interfere with any of the modes of operation in the SCC, but simply control a multiplexer just
15961596     before the internal receive clock input. A hardware reset forces the receive clock to come from the
15971597     /RTxC pin.*/
1598   LOG(("   Receive clock source is: "));
1598   LOG(("  Receive clock source is: "));
15991599   switch (data & WR11_RCVCLK_SRC_MASK)
16001600   {
16011601   case WR11_RCVCLK_SRC_RTXC: LOG(("RTxC\n")); break;
r249924r249925
16111611     degrees the output of the DPLL used by the receiver. This makes the received and transmitted bit
16121612     cells occur simultaneously, neglecting delays. A hardware reset selects the /TRxC pin as the
16131613     source of the transmit clocks.*/
1614   LOG(("   Transmit clock source is: "));
1614   LOG(("  Transmit clock source is: "));
16151615   switch (data & WR11_TRACLK_SRC_MASK)
16161616   {
16171617   case WR11_TRACLK_SRC_RTXC: LOG(("RTxC\n")); break;
r249924r249925
16261626      transmit clock is programmed to come from the /TRxC pin, /TRxC is an input, regardless of the
16271627      state of this bit. The /TRxC pin is also an input if this bit is set to 0. A hardware reset forces this bit
16281628      to 0.*/
1629   LOG(("   TRxC pin is %s\n", data & WR11_TRXC_DIRECTION ? "Output" : "Input"));
1629   LOG(("  TRxC pin is %s\n", data & WR11_TRXC_DIRECTION ? "Output" : "Input"));
16301630   /*Bits 1 and 0: /TRxC Output Source select bits 1 and 0
16311631     These bits determine the signal to be echoed out of the SCC via the /TRxC pin as listed in Table
16321632     on page 167. No signal is produced if /TRxC has been programmed as the source of either the
r249924r249925
16341634     If the XTAL oscillator output is programmed to be echoed, and the XTAL oscillator is not enabled,
16351635     the /TRxC pin goes High. The DPLL signal that is echoed is the DPLL signal used by the receiver.
16361636     Hardware reset selects the XTAL oscillator as the output source*/
1637   LOG(("   TRxC clock source is: "));
1637   LOG(("  TRxC clock source is: "));
16381638   switch (data & WR11_TRXSRC_SRC_MASK)
16391639   {
16401640   case WR11_TRXSRC_SRC_XTAL: LOG(("the Oscillator\n")); break;
r249924r249925
16561656  the desired rate in bits per second and the BR clock period in seconds. This formula is derived
16571657  because the counter decrements from N down to zero-plus-one-cycle for reloading the time constant.
16581658  This is then fed to a toggle flip-flop to make the output a square wave.
1659 
1659
16601660  Time Constant = Clock Frequency / (2 * Desired Rate * Baud Rate Clock Period) - 2
1661 
1661
16621662*/
16631663void z80scc_channel::do_sccreg_wr12(UINT8 data)
16641664{
r249924r249925
16701670void z80scc_channel::do_sccreg_wr13(UINT8 data)
16711671{
16721672   m_wr13 = data;
1673   LOG(("Z80SCC \"%s\": %c : %s  %02x   High byte of Time Constant for Baudrate generator - not implemented \n", m_owner->tag(), 'A' + m_index, __func__, data));
1673   LOG(("Z80SCC \"%s\": %c : %s  %02x  High byte of Time Constant for Baudrate generator - not implemented \n", m_owner->tag(), 'A' + m_index, __func__, data));
16741674}
16751675
16761676/*
r249924r249925
17431743   interrupt. This is true, even if an External/Status condition is pending at the time the bit is set*/
17441744void z80scc_channel::do_sccreg_wr15(UINT8 data)
17451745{
1746   LOG(("%s(%d) \"%s\": %c : External/Status Control Bits - not implemented\n",
1747       FUNCNAME, data, m_owner->tag(), 'A' + m_index));
1746   LOG(("%s(%d) \"%s\": %c : External/Status Control Bits - not implemented\n",
1747         FUNCNAME, data, m_owner->tag(), 'A' + m_index));
17481748   m_wr15 = data;
17491749}
17501750
17511751/*TODO: Z80X30 Register Access
17521752  ----------------------------
1753The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are decoded to form the register
1753The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are decoded to form the register
17541754address. See do_sccreg_wr0() for details */
17551755
17561756/*Z85X30 Register Access
r249924r249925
17711771RR0 may also be accessed in a single cycle. That is, it is not necessary to write the pointer bits
17721772with 0 before accessing WR0 or RR0.*/
17731773//-------------------------------------------------
1774//   control_write - write control register
1774//  control_write - write control register
17751775//-------------------------------------------------
17761776
17771777void z80scc_channel::control_write(UINT8 data)
r249924r249925
17821782   m_uart->m_wr0_ptrbits = 0; // The "Point High" command is only valid for one access
17831783
17841784   reg &= regmask;
1785   
1785
17861786   if (reg != 0)
17871787   {
17881788      // mask out register index
17891789      m_wr0 &= ~regmask;
17901790   }
1791   
1791
17921792   LOG(("\n%s(%02x) reg %02x, regmask %02x\n", FUNCNAME, data, reg, regmask));
1793   
1793
17941794   /* TODO. Sort out 80X30 & other SCC variants limitations in register access */
17951795   switch (reg)
17961796   {
1797   case REG_WR0_COMMAND_REGPT:     do_sccreg_wr0(data); ;break;
1797   case REG_WR0_COMMAND_REGPT:   do_sccreg_wr0(data); ;break;
17981798   case REG_WR1_INT_DMA_ENABLE:  do_sccreg_wr1(data); m_uart->check_interrupts(); break;
1799   case REG_WR2_INT_VECTOR:     do_sccreg_wr2(data); break;
1799   case REG_WR2_INT_VECTOR:      do_sccreg_wr2(data); break;
18001800   case REG_WR3_RX_CONTROL:
18011801      do_sccreg_wr3(data);
18021802      update_serial();
r249924r249925
18161816      break;
18171817   case REG_WR6_SYNC_OR_SDLC_A:  do_sccreg_wr6(data); break;
18181818   case REG_WR7_SYNC_OR_SDLC_F:  do_sccreg_wr7(data); break;
1819   case REG_WR8_TRANSMIT_DATA:     do_sccreg_wr8(data); break;
1819   case REG_WR8_TRANSMIT_DATA:   do_sccreg_wr8(data); break;
18201820   case REG_WR9_MASTER_INT_CTRL: do_sccreg_wr9(data); break;
18211821   case REG_WR10_MSC_RX_TX_CTRL: do_sccreg_wr10(data); break;
1822   case REG_WR11_CLOCK_MODES:     do_sccreg_wr11(data); break;
1823   case REG_WR12_LO_BAUD_GEN:     do_sccreg_wr12(data); break;
1824   case REG_WR13_HI_BAUD_GEN:     do_sccreg_wr13(data); break;
1825   case REG_WR14_MISC_CTRL:     do_sccreg_wr14(data); break;
1822   case REG_WR11_CLOCK_MODES:    do_sccreg_wr11(data); break;
1823   case REG_WR12_LO_BAUD_GEN:    do_sccreg_wr12(data); break;
1824   case REG_WR13_HI_BAUD_GEN:    do_sccreg_wr13(data); break;
1825   case REG_WR14_MISC_CTRL:      do_sccreg_wr14(data); break;
18261826   case REG_WR15_EXT_ST_INT_CTRL:do_sccreg_wr15(data); break;
18271827   default:
18281828      logerror("Z80SCC \"%s\": %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg);
r249924r249925
18311831
18321832
18331833//-------------------------------------------------
1834//   data_read - read data register from fifo
1834//  data_read - read data register from fifo
18351835//-------------------------------------------------
18361836
18371837UINT8 z80scc_channel::data_read()
r249924r249925
18551855         FIFO to preserve the status, it is necessary to issue the Error Reset command to
18561856         unlock it. Only the exit location of the FIFO is locked allowing more data to be
18571857         received into the other bytes of the Receive FIFO.*/
1858     
1858
18591859      // load data from the FIFO
18601860      data = m_rx_fifo_rp_data();
1861     
1861
18621862      // load error status from the FIFO
18631863      m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo_rp];
1864     
1864
18651865      // trigger interrup and lock the fifo if an error is present
18661866      if (m_rr1 & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR))
18671867      {
r249924r249925
19251925      }
19261926}
19271927
1928READ8_MEMBER (z80scc_device::da_r)   { return m_chanA->data_read(); }
1928READ8_MEMBER (z80scc_device::da_r)  { return m_chanA->data_read(); }
19291929WRITE8_MEMBER (z80scc_device::da_w) { m_chanA->data_write(data); }
1930READ8_MEMBER (z80scc_device::db_r)   { return m_chanB->data_read(); }
1930READ8_MEMBER (z80scc_device::db_r)  { return m_chanB->data_read(); }
19311931WRITE8_MEMBER (z80scc_device::db_w) { m_chanB->data_write(data); }
19321932
19331933//-------------------------------------------------
1934//   data_write - write data register
1934//  data_write - write data register
19351935//-------------------------------------------------
19361936void z80scc_channel::data_write(UINT8 data)
19371937{
r249924r249925
19621962
19631963
19641964//-------------------------------------------------
1965//   receive_data - receive data word into fifo
1965//  receive_data - receive data word into fifo
19661966//-------------------------------------------------
19671967
19681968void z80scc_channel::receive_data(UINT8 data)
r249924r249925
20132013
20142014
20152015//-------------------------------------------------
2016//   cts_w - clear to send handler
2016//  cts_w - clear to send handler
20172017//-------------------------------------------------
20182018
20192019WRITE_LINE_MEMBER( z80scc_channel::cts_w )
r249924r249925
20522052
20532053
20542054//-------------------------------------------------
2055//   dcd_w - data carrier detected handler
2055//  dcd_w - data carrier detected handler
20562056//-------------------------------------------------
20572057
20582058WRITE_LINE_MEMBER( z80scc_channel::dcd_w )
r249924r249925
20902090
20912091
20922092//-------------------------------------------------
2093//   ri_w - ring indicator handler
2093//  ri_w - ring indicator handler
20942094//-------------------------------------------------
20952095
20962096WRITE_LINE_MEMBER( z80scc_channel::ri_w )
r249924r249925
21222122}
21232123
21242124//-------------------------------------------------
2125//   sync_w - sync handler
2125//  sync_w - sync handler
21262126//-------------------------------------------------
21272127WRITE_LINE_MEMBER( z80scc_channel::sync_w )
21282128{
r249924r249925
21302130}
21312131
21322132//-------------------------------------------------
2133//   rxc_w - receive clock
2133//  rxc_w - receive clock
21342134//-------------------------------------------------
21352135WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
21362136{
r249924r249925
21432143      else if(state)
21442144      {
21452145         rx_clock_w(m_rx_clock < clocks/2);
2146         
2146
21472147         m_rx_clock++;
21482148         if (m_rx_clock == clocks)
21492149            m_rx_clock = 0;
2150         
2150
21512151      }
21522152   }
21532153}
21542154
21552155//-------------------------------------------------
2156//   txc_w - transmit clock
2156//  txc_w - transmit clock
21572157//-------------------------------------------------
21582158WRITE_LINE_MEMBER( z80scc_channel::txc_w )
21592159{
r249924r249925
21662166      else if(state)
21672167      {
21682168         tx_clock_w(m_tx_clock < clocks/2);
2169         
2169
21702170         m_tx_clock++;
21712171         if (m_tx_clock == clocks)
21722172            m_tx_clock = 0;
r249924r249925
21752175}
21762176
21772177//-------------------------------------------------
2178//   update_serial -
2178//  update_serial -
21792179//-------------------------------------------------
21802180void z80scc_channel::update_serial()
21812181{
r249924r249925
22022202   if (m_rxc > 0)
22032203   {
22042204      set_rcv_rate(m_rxc / clocks);
2205            LOG(("    - Receiver clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks));
2205            LOG(("  - Receiver clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks));
22062206   }
22072207
22082208   if (m_txc > 0)
22092209   {
22102210      set_tra_rate(m_txc / clocks);
2211            LOG(("    - Transmit clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks));
2211            LOG(("  - Transmit clock: %d mode: %d rate: %d/%xh\n", m_rxc, clocks, m_rxc / clocks, m_rxc / clocks));
22122212   }
22132213}
22142214
22152215//-------------------------------------------------
2216//   set_dtr -
2216//  set_dtr -
22172217//-------------------------------------------------
22182218void z80scc_channel::set_dtr(int state)
22192219{
r249924r249925
22292229
22302230
22312231//-------------------------------------------------
2232//   write_rx - called by terminal through rs232/diserial
2233//         when character is sent to board
2232//  write_rx - called by terminal through rs232/diserial
2233//         when character is sent to board
22342234//-------------------------------------------------
22352235WRITE_LINE_MEMBER(z80scc_channel::write_rx)
22362236{
trunk/src/devices/machine/z80scc.h
r249924r249925
22// copyright-holders:Joakim Larsson Edstrom
33/***************************************************************************
44
5   Z80-SCC Serial Communications Controller emulation
5    Z80-SCC Serial Communications Controller emulation
66
77****************************************************************************
88               _____   _____                          _____   _____
r249924r249925
3838#include "cpu/z80/z80daisy.h"
3939
4040//**************************************************************************
41//   DEVICE CONFIGURATION MACROS
41//  DEVICE CONFIGURATION MACROS
4242//**************************************************************************
4343
4444#define MCFG_Z80SCC_ADD(_tag, _clock, _rxa, _txa, _rxb, _txb) \
r249924r249925
101101
102102
103103//**************************************************************************
104//   TYPE DEFINITIONS
104//  TYPE DEFINITIONS
105105//**************************************************************************
106106
107107// ======================> z80scc_channel
r249924r249925
187187   int m_txc;
188188
189189   // Register state
190   // read registers     enum
190   // read registers     enum
191191   UINT8 m_rr0; // REG_RR0_STATUS
192192   UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND
193193   UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT
r249924r249925
197197   UINT8 m_rr6; // REG_RR6_LSB_OR_RR2
198198   UINT8 m_rr7; // REG_RR7_MSB_OR_RR3
199199   UINT8 m_rr8; // REG_RR8_RECEIVE_DATA
200   UINT8 m_rr9; //    REG_RR9_WR3_OR_RR13
200   UINT8 m_rr9; // REG_RR9_WR3_OR_RR13
201201   UINT8 m_rr10; // REG_RR10_MISC_STATUS
202202   UINT8 m_rr11; // REG_RR11_WR10_OR_RR15
203203   UINT8 m_rr12; // REG_RR12_LO_TIME_CONST
r249924r249925
205205   UINT8 m_rr14; // REG_RR14_WR7_OR_R10
206206   UINT8 m_rr15; // REG_RR15_WR15_EXT_STAT
207207
208      // write registers     enum
208      // write registers    enum
209209   UINT8 m_wr0; // REG_WR0_COMMAND_REGPT
210210   UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE
211211   UINT8 m_wr2; // REG_WR2_INT_VECTOR
r249924r249925
229229   {
230230      INT_TRANSMIT = 0,
231231      INT_EXTERNAL = 1,
232      INT_RECEIVE    = 2,
233            INT_SPECIAL    = 3
232      INT_RECEIVE  = 2,
233            INT_SPECIAL  = 3
234234   };
235235
236236   // Read registers
237237   enum
238238   {
239      REG_RR0_STATUS      = 0, // SIO
240      REG_RR1_SPEC_RCV_COND   = 1, // SIO
241      REG_RR2_INTERRUPT_VECT   = 2, // SIO
242      REG_RR3_INTERUPPT_PEND   = 3,
243      REG_RR4_WR4_OR_RR0   = 4,
244      REG_RR5_WR5_OR_RR0   = 5,
245      REG_RR6_LSB_OR_RR2   = 6,
246      REG_RR7_MSB_OR_RR3   = 7,
247      REG_RR8_RECEIVE_DATA   = 8,
248      REG_RR9_WR3_OR_RR13   = 9,
249      REG_RR10_MISC_STATUS   = 10,
250      REG_RR11_WR10_OR_RR15   = 11,
251      REG_RR12_LO_TIME_CONST   = 12,
252      REG_RR13_HI_TIME_CONST   = 13,
253      REG_RR14_WR7_OR_R10   = 14,
254      REG_RR15_WR15_EXT_STAT   = 15
239      REG_RR0_STATUS      = 0, // SIO
240      REG_RR1_SPEC_RCV_COND   = 1, // SIO
241      REG_RR2_INTERRUPT_VECT  = 2, // SIO
242      REG_RR3_INTERUPPT_PEND  = 3,
243      REG_RR4_WR4_OR_RR0  = 4,
244      REG_RR5_WR5_OR_RR0  = 5,
245      REG_RR6_LSB_OR_RR2  = 6,
246      REG_RR7_MSB_OR_RR3  = 7,
247      REG_RR8_RECEIVE_DATA    = 8,
248      REG_RR9_WR3_OR_RR13 = 9,
249      REG_RR10_MISC_STATUS    = 10,
250      REG_RR11_WR10_OR_RR15   = 11,
251      REG_RR12_LO_TIME_CONST  = 12,
252      REG_RR13_HI_TIME_CONST  = 13,
253      REG_RR14_WR7_OR_R10 = 14,
254      REG_RR15_WR15_EXT_STAT  = 15
255255   };
256   
256
257257   // Write registers
258258   enum
259259   {
260      REG_WR0_COMMAND_REGPT   = 0, // SIO
261      REG_WR1_INT_DMA_ENABLE   = 1, // SIO
262      REG_WR2_INT_VECTOR   = 2, // SIO
263      REG_WR3_RX_CONTROL   = 3, // SIO
264      REG_WR4_RX_TX_MODES   = 4, // SIO
265      REG_WR5_TX_CONTROL   = 5, // SIO
266      REG_WR6_SYNC_OR_SDLC_A   = 6, // SIO
267      REG_WR7_SYNC_OR_SDLC_F   = 7, // SIO
268      REG_WR8_TRANSMIT_DATA   = 8,
260      REG_WR0_COMMAND_REGPT   = 0, // SIO
261      REG_WR1_INT_DMA_ENABLE  = 1, // SIO
262      REG_WR2_INT_VECTOR  = 2, // SIO
263      REG_WR3_RX_CONTROL  = 3, // SIO
264      REG_WR4_RX_TX_MODES = 4, // SIO
265      REG_WR5_TX_CONTROL  = 5, // SIO
266      REG_WR6_SYNC_OR_SDLC_A  = 6, // SIO
267      REG_WR7_SYNC_OR_SDLC_F  = 7, // SIO
268      REG_WR8_TRANSMIT_DATA   = 8,
269269      REG_WR9_MASTER_INT_CTRL = 9,
270270      REG_WR10_MSC_RX_TX_CTRL = 10,
271      REG_WR11_CLOCK_MODES   = 11,
272      REG_WR12_LO_BAUD_GEN   = 12,
273      REG_WR13_HI_BAUD_GEN   = 13,
274      REG_WR14_MISC_CTRL   = 14,
271      REG_WR11_CLOCK_MODES    = 11,
272      REG_WR12_LO_BAUD_GEN    = 12,
273      REG_WR13_HI_BAUD_GEN    = 13,
274      REG_WR14_MISC_CTRL  = 14,
275275      REG_WR15_EXT_ST_INT_CTRL= 15
276276   };
277277
278278   enum
279279   {
280      RR0_RX_CHAR_AVAILABLE     = 0x01, // SIO bit
281      RR0_ZC           = 0x02, // SCC bit
282      RR0_TX_BUFFER_EMPTY     = 0x04, // SIO
283      RR0_DCD           = 0x08, // SIO
284      RR0_RI           = 0x10, // DART bit?   TODO: investigate function and remove
285      RR0_SYNC_HUNT        = 0x10, // SIO bit, not supported
286      RR0_CTS           = 0x20, // SIO bit
287      RR0_TX_UNDERRUN        = 0x40, // SIO bit, not supported
288      RR0_BREAK_ABORT        = 0x80  // SIO bit, not supported
280      RR0_RX_CHAR_AVAILABLE     = 0x01, // SIO bit
281      RR0_ZC            = 0x02, // SCC bit
282      RR0_TX_BUFFER_EMPTY   = 0x04, // SIO
283      RR0_DCD           = 0x08, // SIO
284      RR0_RI            = 0x10, // DART bit?  TODO: investigate function and remove
285      RR0_SYNC_HUNT         = 0x10, // SIO bit, not supported
286      RR0_CTS           = 0x20, // SIO bit
287      RR0_TX_UNDERRUN       = 0x40, // SIO bit, not supported
288      RR0_BREAK_ABORT       = 0x80  // SIO bit, not supported
289289   };
290290
291291   enum
292292   {
293      RR1_ALL_SENT        = 0x01, // SIO/SCC bit
294      RR1_RESIDUE_CODE_MASK     = 0x0e, // SIO/SCC bits, not supported
295      RR1_PARITY_ERROR     = 0x10, // SIO/SCC bits
296      RR1_RX_OVERRUN_ERROR     = 0x20, // SIO/SCC bits
297      RR1_CRC_FRAMING_ERROR     = 0x40, // SIO/SCC bits
298      RR1_END_OF_FRAME     = 0x80  // SIO/SCC bits, not supported
293      RR1_ALL_SENT          = 0x01, // SIO/SCC bit
294      RR1_RESIDUE_CODE_MASK     = 0x0e, // SIO/SCC bits, not supported
295      RR1_PARITY_ERROR      = 0x10, // SIO/SCC bits
296      RR1_RX_OVERRUN_ERROR      = 0x20, // SIO/SCC bits
297      RR1_CRC_FRAMING_ERROR     = 0x40, // SIO/SCC bits
298      RR1_END_OF_FRAME      = 0x80  // SIO/SCC bits, not supported
299299   };
300300
301301   enum
302   {                 // TODO: overload SIO functionality
303      RR2_INT_VECTOR_MASK     = 0xff, // SCC channel A, SIO channel B (special case)
304      RR2_INT_VECTOR_V1     = 0x02, // SIO (special case) /SCC Channel B
305      RR2_INT_VECTOR_V2     = 0x04, // SIO (special case) /SCC Channel B
306      RR2_INT_VECTOR_V3     = 0x08  // SIO (special case) /SCC Channel B
302   {                     // TODO: overload SIO functionality
303      RR2_INT_VECTOR_MASK   = 0xff, // SCC channel A, SIO channel B (special case)
304      RR2_INT_VECTOR_V1     = 0x02, // SIO (special case) /SCC Channel B
305      RR2_INT_VECTOR_V2     = 0x04, // SIO (special case) /SCC Channel B
306      RR2_INT_VECTOR_V3     = 0x08  // SIO (special case) /SCC Channel B
307307   };
308   
308
309309   enum
310310   {
311      RR3_CHANB_EXT_IP     = 0x01, // SCC IP pending registers
312      RR3_CHANB_TX_IP        = 0x02, //  only read in Channel A (for both channels)
313      RR3_CHANB_RX_IP        = 0x04, //  channel B return all zero
314      RR3_CHANA_EXT_IP     = 0x08,
315      RR3_CHANA_TX_IP        = 0x10,
316      RR3_CHANA_RX_IP        = 0x20
311      RR3_CHANB_EXT_IP      = 0x01, // SCC IP pending registers
312      RR3_CHANB_TX_IP       = 0x02, //  only read in Channel A (for both channels)
313      RR3_CHANB_RX_IP       = 0x04, //  channel B return all zero
314      RR3_CHANA_EXT_IP      = 0x08,
315      RR3_CHANA_TX_IP       = 0x10,
316      RR3_CHANA_RX_IP       = 0x20
317317   };
318   
318
319319   enum // Universal Bus WR0 commands for 85X30
320320   {
321      WR0_REGISTER_MASK     = 0x07,
322      WR0_COMMAND_MASK     = 0x38, // COMMANDS
323      WR0_NULL        = 0x00, // 0 0 0
324      WR0_POINT_HIGH        = 0x08, // 0 0 1
325      WR0_RESET_EXT_STATUS     = 0x10, // 0 1 0
326      WR0_SEND_ABORT        = 0x18, // 0 1 1
327      WR0_ENABLE_INT_NEXT_RX     = 0x20, // 1 0 0
328      WR0_RESET_TX_INT     = 0x28, // 1 0 1
329      WR0_ERROR_RESET        = 0x30, // 1 1 0
330      WR0_RESET_HIGHEST_IUS     = 0x38, // 1 1 1
331      WR0_CRC_RESET_CODE_MASK     = 0xc0, // RESET
332      WR0_CRC_RESET_NULL     = 0x00, // 0 0
333      WR0_CRC_RESET_RX     = 0x40, // 0 1
334      WR0_CRC_RESET_TX     = 0x80, // 1 0
321      WR0_REGISTER_MASK     = 0x07,
322      WR0_COMMAND_MASK      = 0x38, // COMMANDS
323      WR0_NULL          = 0x00, // 0 0 0
324      WR0_POINT_HIGH        = 0x08, // 0 0 1
325      WR0_RESET_EXT_STATUS      = 0x10, // 0 1 0
326      WR0_SEND_ABORT        = 0x18, // 0 1 1
327      WR0_ENABLE_INT_NEXT_RX    = 0x20, // 1 0 0
328      WR0_RESET_TX_INT      = 0x28, // 1 0 1
329      WR0_ERROR_RESET       = 0x30, // 1 1 0
330      WR0_RESET_HIGHEST_IUS     = 0x38, // 1 1 1
331      WR0_CRC_RESET_CODE_MASK   = 0xc0, // RESET
332      WR0_CRC_RESET_NULL    = 0x00, // 0 0
333      WR0_CRC_RESET_RX      = 0x40, // 0 1
334      WR0_CRC_RESET_TX      = 0x80, // 1 0
335335      WR0_CRC_RESET_TX_UNDERRUN = 0xc0  // 1 1
336336   };
337337
338338   enum // ZBUS WR0 commands or 80X30
339339   {
340      WR0_Z_COMMAND_MASK      = 0x38, // COMMANDS
341      WR0_Z_NULL_1      = 0x00, // 0 0 0
342      WR0_Z_NULL_2      = 0x08, // 0 0 1
343            WR0_Z_RESET_EXT_STATUS   = 0x10, // 0 1 0
344      WR0_Z_SEND_ABORT      = 0x18, // 0 1 1
345      WR0_Z_ENABLE_INT_NEXT_RX   = 0x20, // 1 0 0
346      WR0_Z_RESET_TX_INT      = 0x28, // 1 0 1
347      WR0_Z_ERROR_RESET      = 0x30, // 1 1 0
348      WR0_Z_RESET_HIGHEST_IUS   = 0x38, // 1 1 1
349      WR0_Z_SHIFT_MASK      = 0x03, // SHIFT mode SDLC chan B
350      WR0_Z_SEL_SHFT_LEFT      = 0x02, // 1 0
351      WR0_Z_SEL_SHFT_RIGHT   = 0x03   // 1 1
340      WR0_Z_COMMAND_MASK      = 0x38, // COMMANDS
341      WR0_Z_NULL_1        = 0x00, // 0 0 0
342      WR0_Z_NULL_2        = 0x08, // 0 0 1
343            WR0_Z_RESET_EXT_STATUS  = 0x10, // 0 1 0
344      WR0_Z_SEND_ABORT        = 0x18, // 0 1 1
345      WR0_Z_ENABLE_INT_NEXT_RX    = 0x20, // 1 0 0
346      WR0_Z_RESET_TX_INT      = 0x28, // 1 0 1
347      WR0_Z_ERROR_RESET       = 0x30, // 1 1 0
348      WR0_Z_RESET_HIGHEST_IUS = 0x38, // 1 1 1
349      WR0_Z_SHIFT_MASK        = 0x03, // SHIFT mode SDLC chan B
350      WR0_Z_SEL_SHFT_LEFT     = 0x02, // 1 0
351      WR0_Z_SEL_SHFT_RIGHT    = 0x03  // 1 1
352352   };
353353
354354   enum
355355   {
356      WR1_EXT_INT_ENABLE     = 0x01,
357      WR1_TX_INT_ENABLE     = 0x02,
358      WR1_PARITY_IS_SPEC_COND     = 0x04,
359      WR1_RX_INT_MODE_MASK     = 0x18,
360      WR1_RX_INT_DISABLE     = 0x00,
361      WR1_RX_INT_FIRST     = 0x08,
362      WR1_RX_INT_ALL_PARITY     = 0x10, // not supported
363      WR1_RX_INT_ALL        = 0x18,
364      WR1_WRDY_ON_RX_TX     = 0x20, // not supported
365      WR1_WRDY_FUNCTION     = 0x40, // not supported
366      WR1_WRDY_ENABLE        = 0x80  // not supported
356      WR1_EXT_INT_ENABLE    = 0x01,
357      WR1_TX_INT_ENABLE     = 0x02,
358      WR1_PARITY_IS_SPEC_COND   = 0x04,
359      WR1_RX_INT_MODE_MASK      = 0x18,
360      WR1_RX_INT_DISABLE    = 0x00,
361      WR1_RX_INT_FIRST      = 0x08,
362      WR1_RX_INT_ALL_PARITY     = 0x10, // not supported
363      WR1_RX_INT_ALL        = 0x18,
364      WR1_WRDY_ON_RX_TX     = 0x20, // not supported
365      WR1_WRDY_FUNCTION     = 0x40, // not supported
366      WR1_WRDY_ENABLE       = 0x80  // not supported
367367   };
368368
369369   enum
370370   {
371      WR3_RX_ENABLE        = 0x01,
371      WR3_RX_ENABLE         = 0x01,
372372      WR3_SYNC_CHAR_LOAD_INHIBIT= 0x02, // not supported
373      WR3_ADDRESS_SEARCH_MODE     = 0x04, // not supported
374      WR3_RX_CRC_ENABLE     = 0x08, // not supported
375      WR3_ENTER_HUNT_PHASE     = 0x10, // not supported
376      WR3_AUTO_ENABLES     = 0x20,
377      WR3_RX_WORD_LENGTH_MASK     = 0xc0,
378      WR3_RX_WORD_LENGTH_5     = 0x00,
379      WR3_RX_WORD_LENGTH_7     = 0x40,
380      WR3_RX_WORD_LENGTH_6     = 0x80,
381      WR3_RX_WORD_LENGTH_8     = 0xc0
373      WR3_ADDRESS_SEARCH_MODE   = 0x04, // not supported
374      WR3_RX_CRC_ENABLE     = 0x08, // not supported
375      WR3_ENTER_HUNT_PHASE      = 0x10, // not supported
376      WR3_AUTO_ENABLES      = 0x20,
377      WR3_RX_WORD_LENGTH_MASK   = 0xc0,
378      WR3_RX_WORD_LENGTH_5      = 0x00,
379      WR3_RX_WORD_LENGTH_7      = 0x40,
380      WR3_RX_WORD_LENGTH_6      = 0x80,
381      WR3_RX_WORD_LENGTH_8      = 0xc0
382382   };
383383
384384   enum
385385   {
386      WR4_PARITY_ENABLE     = 0x01,
387      WR4_PARITY_EVEN        = 0x02,
388      WR4_STOP_BITS_MASK     = 0x0c,
389      WR4_STOP_BITS_1        = 0x04,
390      WR4_STOP_BITS_1_5     = 0x08, // not supported
391      WR4_STOP_BITS_2        = 0x0c,
392      WR4_SYNC_MODE_MASK     = 0x30, // not supported
393      WR4_SYNC_MODE_8_BIT     = 0x00, // not supported
394      WR4_SYNC_MODE_16_BIT     = 0x10, // not supported
395      WR4_SYNC_MODE_SDLC     = 0x20, // not supported
396      WR4_SYNC_MODE_EXT     = 0x30, // not supported
397      WR4_CLOCK_RATE_MASK     = 0xc0,
398      WR4_CLOCK_RATE_X1     = 0x00,
399      WR4_CLOCK_RATE_X16     = 0x40,
400      WR4_CLOCK_RATE_X32     = 0x80,
401      WR4_CLOCK_RATE_X64     = 0xc0
386      WR4_PARITY_ENABLE     = 0x01,
387      WR4_PARITY_EVEN       = 0x02,
388      WR4_STOP_BITS_MASK    = 0x0c,
389      WR4_STOP_BITS_1       = 0x04,
390      WR4_STOP_BITS_1_5     = 0x08, // not supported
391      WR4_STOP_BITS_2       = 0x0c,
392      WR4_SYNC_MODE_MASK    = 0x30, // not supported
393      WR4_SYNC_MODE_8_BIT   = 0x00, // not supported
394      WR4_SYNC_MODE_16_BIT      = 0x10, // not supported
395      WR4_SYNC_MODE_SDLC    = 0x20, // not supported
396      WR4_SYNC_MODE_EXT     = 0x30, // not supported
397      WR4_CLOCK_RATE_MASK   = 0xc0,
398      WR4_CLOCK_RATE_X1     = 0x00,
399      WR4_CLOCK_RATE_X16    = 0x40,
400      WR4_CLOCK_RATE_X32    = 0x80,
401      WR4_CLOCK_RATE_X64    = 0xc0
402402   };
403403
404404   enum
405405   {
406      WR5_TX_CRC_ENABLE     = 0x01, // not supported
407      WR5_RTS           = 0x02,
408      WR5_CRC16        = 0x04, // not supported
409      WR5_TX_ENABLE        = 0x08,
410      WR5_SEND_BREAK        = 0x10,
411      WR5_TX_WORD_LENGTH_MASK     = 0x60,
412      WR5_TX_WORD_LENGTH_5     = 0x00,
413      WR5_TX_WORD_LENGTH_6     = 0x40,
414      WR5_TX_WORD_LENGTH_7     = 0x20,
415      WR5_TX_WORD_LENGTH_8     = 0x60,
416      WR5_DTR           = 0x80
406      WR5_TX_CRC_ENABLE     = 0x01, // not supported
407      WR5_RTS           = 0x02,
408      WR5_CRC16         = 0x04, // not supported
409      WR5_TX_ENABLE         = 0x08,
410      WR5_SEND_BREAK        = 0x10,
411      WR5_TX_WORD_LENGTH_MASK   = 0x60,
412      WR5_TX_WORD_LENGTH_5      = 0x00,
413      WR5_TX_WORD_LENGTH_6      = 0x40,
414      WR5_TX_WORD_LENGTH_7      = 0x20,
415      WR5_TX_WORD_LENGTH_8      = 0x60,
416      WR5_DTR           = 0x80
417417   };
418418
419419   /* SCC specifics */
420420   enum
421421   {
422      WR9_CMD_MASK     = 0xC0,
423      WR9_CMD_NORESET     = 0x00,
424      WR9_CMD_CHNB_RESET     = 0x40,
425      WR9_CMD_CHNA_RESET     = 0x80,
426      WR9_CMD_HW_RESET     = 0xC0,
427      WR9_BIT_VIS        = 0x01,
428      WR9_BIT_NV        = 0x02,
429      WR9_BIT_DLC        = 0x04,
430      WR9_BIT_MIE        = 0x08,
431      WR9_BIT_SHSL     = 0x10,
432      WR9_BIT_IACK     = 0x20
422      WR9_CMD_MASK      = 0xC0,
423      WR9_CMD_NORESET   = 0x00,
424      WR9_CMD_CHNB_RESET    = 0x40,
425      WR9_CMD_CHNA_RESET    = 0x80,
426      WR9_CMD_HW_RESET      = 0xC0,
427      WR9_BIT_VIS       = 0x01,
428      WR9_BIT_NV        = 0x02,
429      WR9_BIT_DLC       = 0x04,
430      WR9_BIT_MIE       = 0x08,
431      WR9_BIT_SHSL      = 0x10,
432      WR9_BIT_IACK      = 0x20
433433   };
434434
435435   enum
436436   {
437      WR11_RCVCLK_TYPE     = 0x80,
437      WR11_RCVCLK_TYPE      = 0x80,
438438      WR11_RCVCLK_SRC_MASK  = 0x60, // RCV CLOCK
439439      WR11_RCVCLK_SRC_RTXC  = 0x00, //  0 0
440440      WR11_RCVCLK_SRC_TRXC  = 0x20, //  0 1
441      WR11_RCVCLK_SRC_BR     = 0x40, //  1 0
441      WR11_RCVCLK_SRC_BR    = 0x40, //  1 0
442442      WR11_RCVCLK_SRC_DPLL  = 0x60, //  1 1
443443      WR11_TRACLK_SRC_MASK  = 0x18, // TRA CLOCK
444444      WR11_TRACLK_SRC_RTXC  = 0x00, //  0 0
445445      WR11_TRACLK_SRC_TRXC  = 0x08, //  0 1
446      WR11_TRACLK_SRC_BR     = 0x10, //  1 0
446      WR11_TRACLK_SRC_BR    = 0x10, //  1 0
447447      WR11_TRACLK_SRC_DPLL  = 0x18, //  1 1
448      WR11_TRXC_DIRECTION     = 0x04,
448      WR11_TRXC_DIRECTION   = 0x04,
449449      WR11_TRXSRC_SRC_MASK  = 0x03, // TRXX CLOCK
450450      WR11_TRXSRC_SRC_XTAL  = 0x00, //  0 0
451      WR11_TRXSRC_SRC_TRA     = 0x01, //  0 1
452      WR11_TRXSRC_SRC_BR     = 0x02, //  1 0
451      WR11_TRXSRC_SRC_TRA   = 0x01, //  0 1
452      WR11_TRXSRC_SRC_BR    = 0x02, //  1 0
453453      WR11_TRXSRC_SRC_DPLL  = 0x03  //  1 1
454454   };
455455
456456   enum
457457   {
458      WR14_DPLL_CMD_MASK     = 0xe0, // Command
459      WR14_CMD_NULL     = 0x00, // 0 0 0
460      WR14_CMD_ESM     = 0x20, // 0 0 1
461      WR14_CMD_RMC     = 0x40, // 0 1 0
458      WR14_DPLL_CMD_MASK    = 0xe0, // Command
459      WR14_CMD_NULL     = 0x00, // 0 0 0
460      WR14_CMD_ESM      = 0x20, // 0 0 1
461      WR14_CMD_RMC      = 0x40, // 0 1 0
462462      WR14_CMD_DISABLE_DPLL = 0x60, // 0 1 1
463      WR14_CMD_SS_BGR     = 0x80, // 1 0 0
464      WR14_CMD_SS_RTXC     = 0xa0, // 1 0 1
465      WR14_CMD_SET_FM     = 0xc0, // 1 1 0
466      WR14_CMD_SET_NRZI     = 0xe0  // 1 1 1
463      WR14_CMD_SS_BGR   = 0x80, // 1 0 0
464      WR14_CMD_SS_RTXC      = 0xa0, // 1 0 1
465      WR14_CMD_SET_FM   = 0xc0, // 1 1 0
466      WR14_CMD_SET_NRZI     = 0xe0  // 1 1 1
467467   };
468468
469469   void update_serial();
r249924r249925
477477   int get_tx_word_length();
478478
479479   // receiver state
480   UINT8 m_rx_data_fifo[8];   // receive data FIFO
481   UINT8 m_rx_error_fifo[8];   // receive error FIFO
482   UINT8 m_rx_error;      // current receive error
483   //int m_rx_fifo      // receive FIFO pointer
484      int m_rx_fifo_rp;      // receive FIFO read pointer
485   int m_rx_fifo_wp;      // receive FIFO write pointer
486   int m_rx_fifo_sz;      // receive FIFO size
480   UINT8 m_rx_data_fifo[8];    // receive data FIFO
481   UINT8 m_rx_error_fifo[8];   // receive error FIFO
482   UINT8 m_rx_error;       // current receive error
483   //int m_rx_fifo     // receive FIFO pointer
484      int m_rx_fifo_rp;       // receive FIFO read pointer
485   int m_rx_fifo_wp;       // receive FIFO write pointer
486   int m_rx_fifo_sz;       // receive FIFO size
487487
488   int m_rx_clock;      // receive clock pulse count
489   int m_rx_first;      // first character received
490   int m_rx_break;      // receive break condition
491   UINT8 m_rx_rr0_latch;   // read register 0 latched
488   int m_rx_clock;     // receive clock pulse count
489   int m_rx_first;     // first character received
490   int m_rx_break;     // receive break condition
491   UINT8 m_rx_rr0_latch;   // read register 0 latched
492492
493493   int m_rxd;
494   int m_ri;         // ring indicator latch
495   int m_cts;         // clear to send latch
496   int m_dcd;         // data carrier detect latch
494   int m_ri;           // ring indicator latch
495   int m_cts;          // clear to send latch
496   int m_dcd;          // data carrier detect latch
497497
498498   // transmitter state
499   UINT8 m_tx_data;      // transmit data register
500   int m_tx_clock;      // transmit clock pulse count
499   UINT8 m_tx_data;        // transmit data register
500   int m_tx_clock;     // transmit clock pulse count
501501
502   int m_dtr;         // data terminal ready
503   int m_rts;         // request to send
502   int m_dtr;          // data terminal ready
503   int m_rts;          // request to send
504504
505505   // synchronous state
506   UINT16 m_sync;      // sync character
506   UINT16 m_sync;      // sync character
507507
508508   int m_index;
509509   z80scc_device *m_uart;
510510
511511   // SCC specifics
512   int m_ph;         // Point high command to access regs 08-0f
512   int m_ph;           // Point high command to access regs 08-0f
513513   UINT8 m_zc;
514514};
515515
r249924r249925
607607      // Variants in the SCC family
608608   enum
609609   {
610      TYPE_Z80SCC     = 0x001,
610      TYPE_Z80SCC   = 0x001,
611611      TYPE_SCC8030  = 0x002,
612612      TYPE_SCC80C30 = 0x004,
613613      TYPE_SCC80230 = 0x008,
r249924r249925
621621#define SET_NMOS   ( z80scc_device::TYPE_SCC8030  | z80scc_device::TYPE_SCC8530 )
622622#define SET_CMOS   ( z80scc_device::TYPE_SCC80C30 | z80scc_device::TYPE_SCC85C30 )
623623#define SET_ESCC   ( z80scc_device::TYPE_SCC80230 | z80scc_device::TYPE_SCC85230 | z80scc_device::TYPE_SCC8523L )
624#define SET_EMSCC    z80scc_device::TYPE_SCC85233
624#define SET_EMSCC    z80scc_device::TYPE_SCC85233
625625#define SET_Z80X30 ( z80scc_device::TYPE_SCC8030  | z80scc_device::TYPE_SCC80C30 | z80scc_device::TYPE_SCC80230 )
626626#define SET_Z85X3X ( z80scc_device::TYPE_SCC8530  | z80scc_device::TYPE_SCC85C30 | z80scc_device::TYPE_SCC85230 \
627          | z80scc_device::TYPE_SCC8523L | z80scc_device::TYPE_SCC85233 )
627            | z80scc_device::TYPE_SCC8523L | z80scc_device::TYPE_SCC85233 )
628628
629629   enum
630630   {
r249924r249925
641641   int m_rxcb;
642642   int m_txcb;
643643
644   devcb_write_line   m_out_txda_cb;
645   devcb_write_line   m_out_dtra_cb;
646   devcb_write_line   m_out_rtsa_cb;
647   devcb_write_line   m_out_wrdya_cb;
648   devcb_write_line   m_out_synca_cb;
644   devcb_write_line    m_out_txda_cb;
645   devcb_write_line    m_out_dtra_cb;
646   devcb_write_line    m_out_rtsa_cb;
647   devcb_write_line    m_out_wrdya_cb;
648   devcb_write_line    m_out_synca_cb;
649649
650   devcb_write_line   m_out_txdb_cb;
651   devcb_write_line   m_out_dtrb_cb;
652   devcb_write_line   m_out_rtsb_cb;
653   devcb_write_line   m_out_wrdyb_cb;
654   devcb_write_line   m_out_syncb_cb;
650   devcb_write_line    m_out_txdb_cb;
651   devcb_write_line    m_out_dtrb_cb;
652   devcb_write_line    m_out_rtsb_cb;
653   devcb_write_line    m_out_wrdyb_cb;
654   devcb_write_line    m_out_syncb_cb;
655655
656   devcb_write_line   m_out_int_cb;
657   devcb_write_line   m_out_rxdrqa_cb;
658   devcb_write_line   m_out_txdrqa_cb;
659   devcb_write_line   m_out_rxdrqb_cb;
660   devcb_write_line   m_out_txdrqb_cb;
656   devcb_write_line    m_out_int_cb;
657   devcb_write_line    m_out_rxdrqa_cb;
658   devcb_write_line    m_out_txdrqa_cb;
659   devcb_write_line    m_out_rxdrqb_cb;
660   devcb_write_line    m_out_txdrqb_cb;
661661
662   int m_int_state[6];   // interrupt state
662   int m_int_state[6]; // interrupt state
663663
664664   int m_variant;
665665   UINT8 m_wr0_ptrbits;
trunk/src/devices/machine/z80sio.c
r249924r249925
5050#include "z80sio.h"
5151
5252//**************************************************************************
53//   MACROS / CONSTANTS
53//  MACROS / CONSTANTS
5454//**************************************************************************
5555
5656#define VERBOSE 0
r249924r249925
6868#define FUNCNAME __PRETTY_FUNCTION__
6969#endif
7070
71#define CHANA_TAG   "cha"
72#define CHANB_TAG   "chb"
71#define CHANA_TAG   "cha"
72#define CHANB_TAG   "chb"
7373
7474
7575
7676//**************************************************************************
77//   DEVICE DEFINITIONS
77//  DEVICE DEFINITIONS
7878//**************************************************************************
7979
8080// device type definition
r249924r249925
8282const device_type Z80SIO_CHANNEL = &device_creator<z80sio_channel>;
8383
8484//-------------------------------------------------
85//   device_mconfig_additions -
85//  device_mconfig_additions -
8686//-------------------------------------------------
8787
8888MACHINE_CONFIG_FRAGMENT( z80sio )
r249924r249925
9696}
9797
9898//**************************************************************************
99//   LIVE DEVICE
99//  LIVE DEVICE
100100//**************************************************************************
101101
102102//-------------------------------------------------
103//   z80sio_device - constructor
103//  z80sio_device - constructor
104104//-------------------------------------------------
105105
106106z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
r249924r249925
164164}
165165
166166//-------------------------------------------------
167//   device_start - device-specific startup
167//  device_start - device-specific startup
168168//-------------------------------------------------
169169void z80sio_device::device_start()
170170{
r249924r249925
200200
201201
202202//-------------------------------------------------
203//   device_reset - device-specific reset
203//  device_reset - device-specific reset
204204//-------------------------------------------------
205205void z80sio_device::device_reset()
206206{
r249924r249925
211211}
212212
213213//-------------------------------------------------
214//   z80daisy_irq_state - get interrupt status
214//  z80daisy_irq_state - get interrupt status
215215//-------------------------------------------------
216216int z80sio_device::z80daisy_irq_state()
217217{
r249924r249925
220220
221221
222222   LOG(("%s %s A:%d%d%d%d B:%d%d%d%d ",FUNCNAME, tag(),
223       m_int_state[0], m_int_state[1], m_int_state[2], m_int_state[3],
224       m_int_state[4], m_int_state[5], m_int_state[6], m_int_state[7]));
223         m_int_state[0], m_int_state[1], m_int_state[2], m_int_state[3],
224         m_int_state[4], m_int_state[5], m_int_state[6], m_int_state[7]));
225225
226226   // loop over all interrupt sources
227227   for (i = 0; i < 8; i++)
r249924r249925
236236   }
237237
238238   LOG(("Interrupt State %u\n", state));
239   
239
240240   return state;
241241}
242242
243243
244244//-------------------------------------------------
245//   z80daisy_irq_ack - interrupt acknowledge
245//  z80daisy_irq_ack - interrupt acknowledge
246246//-------------------------------------------------
247247int z80sio_device::z80daisy_irq_ack()
248248{
r249924r249925
274274
275275
276276//-------------------------------------------------
277//   z80daisy_irq_reti - return from interrupt
277//  z80daisy_irq_reti - return from interrupt
278278//-------------------------------------------------
279279void z80sio_device::z80daisy_irq_reti()
280280{
r249924r249925
300300
301301
302302//-------------------------------------------------
303//   check_interrupts -
303//  check_interrupts -
304304//-------------------------------------------------
305305void z80sio_device::check_interrupts()
306306{
r249924r249925
311311
312312
313313//-------------------------------------------------
314//   reset_interrupts -
314//  reset_interrupts -
315315//-------------------------------------------------
316316void z80sio_device::reset_interrupts()
317317{
r249924r249925
327327
328328
329329//-------------------------------------------------
330//   trigger_interrupt - TODO: needs attention for SIO
330//  trigger_interrupt - TODO: needs attention for SIO
331331//-------------------------------------------------
332332void z80sio_device::trigger_interrupt(int index, int state)
333333{
r249924r249925
384384         // status affects vector
385385         vector = (m_chanB->m_wr2 & 0xf1) | (!index << 3) | (state << 1);
386386      }
387//   }
387//  }
388388   // update vector register
389389   m_chanB->m_rr2 = vector;
390390
r249924r249925
398398
399399
400400//-------------------------------------------------
401//   m1_r - interrupt acknowledge
401//  m1_r - interrupt acknowledge
402402//-------------------------------------------------
403403int z80sio_device::m1_r()
404404{
r249924r249925
408408
409409
410410//-------------------------------------------------
411//   cd_ba_r -
411//  cd_ba_r -
412412//-------------------------------------------------
413413READ8_MEMBER( z80sio_device::cd_ba_r )
414414{
r249924r249925
423423
424424
425425//-------------------------------------------------
426//   cd_ba_w -
426//  cd_ba_w -
427427//-------------------------------------------------
428428WRITE8_MEMBER( z80sio_device::cd_ba_w )
429429{
r249924r249925
441441
442442
443443//-------------------------------------------------
444//   ba_cd_r -
444//  ba_cd_r -
445445//-------------------------------------------------
446446READ8_MEMBER( z80sio_device::ba_cd_r )
447447{
r249924r249925
456456
457457
458458//-------------------------------------------------
459//   ba_cd_w -
459//  ba_cd_w -
460460//-------------------------------------------------
461461WRITE8_MEMBER( z80sio_device::ba_cd_w )
462462{
r249924r249925
473473}
474474
475475//**************************************************************************
476//   SIO CHANNEL
476//  SIO CHANNEL
477477//**************************************************************************
478478
479479//-------------------------------------------------
480//   z80sio_channel - constructor
480//  z80sio_channel - constructor
481481//-------------------------------------------------
482482z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
483483   : device_t(mconfig, Z80SIO_CHANNEL, "Z80 SIO channel", tag, owner, clock, "z80sio_channel", __FILE__),
r249924r249925
512512
513513
514514//-------------------------------------------------
515//   start - channel startup
515//  start - channel startup
516516//-------------------------------------------------
517517void z80sio_channel::device_start()
518518{
r249924r249925
555555
556556
557557//-------------------------------------------------
558//   reset - reset channel status
558//  reset - reset channel status
559559//-------------------------------------------------
560560void z80sio_channel::device_reset()
561561{
r249924r249925
590590}
591591
592592//-------------------------------------------------
593//   tra_callback -
593//  tra_callback -
594594//-------------------------------------------------
595595void z80sio_channel::tra_callback()
596596{
r249924r249925
615615   else if (!is_transmit_register_empty())
616616   {
617617      int db = transmit_register_get_data_bit();
618     
618
619619      LOG(("%" I64FMT "d %s() \"%s \"Channel %c transmit data bit %d m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, db, m_wr5));
620620      // transmit data
621621      if (m_index == z80sio_device::CHANNEL_A)
r249924r249925
632632
633633
634634//-------------------------------------------------
635//   tra_complete -
635//  tra_complete -
636636//-------------------------------------------------
637637void z80sio_channel::tra_complete()
638638{
r249924r249925
683683
684684
685685//-------------------------------------------------
686//   rcv_callback -
686//  rcv_callback -
687687//-------------------------------------------------
688688void z80sio_channel::rcv_callback()
689689{
r249924r249925
703703
704704
705705//-------------------------------------------------
706//   rcv_complete -
706//  rcv_complete -
707707//-------------------------------------------------
708708void z80sio_channel::rcv_complete()
709709{
r249924r249925
717717
718718
719719//-------------------------------------------------
720//   get_clock_mode - get clock divisor
720//  get_clock_mode - get clock divisor
721721//-------------------------------------------------
722722
723723int z80sio_channel::get_clock_mode()
r249924r249925
727727
728728   switch (m_wr4 & WR4_CLOCK_RATE_MASK)
729729   {
730   case WR4_CLOCK_RATE_X1:   clocks = 1;   break;
731   case WR4_CLOCK_RATE_X16:   clocks = 16;   break;
732   case WR4_CLOCK_RATE_X32:   clocks = 32;   break;
733   case WR4_CLOCK_RATE_X64:   clocks = 64;   break;
730   case WR4_CLOCK_RATE_X1: clocks = 1; break;
731   case WR4_CLOCK_RATE_X16:    clocks = 16;    break;
732   case WR4_CLOCK_RATE_X32:    clocks = 32;    break;
733   case WR4_CLOCK_RATE_X64:    clocks = 64;    break;
734734   }
735735
736736   return clocks;
r249924r249925
758758
759759void z80sio_channel::update_rts()
760760{
761   //     LOG(("%s(%d) \"%s\" Channel %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index));
761   //    LOG(("%s(%d) \"%s\" Channel %c \n", FUNCNAME, state, m_owner->tag(), 'A' + m_index));
762762   LOG(("%s() \"%s\" Channel %c \n", FUNCNAME, m_owner->tag(), 'A' + m_index));
763763   if (m_wr5 & WR5_RTS)
764764   {
r249924r249925
771771      // when the RTS bit is reset, the _RTS output goes high after the transmitter empties
772772      m_rts = 0;
773773   }
774   
774
775775   // data terminal ready output follows the state programmed into the DTR bit*/
776776   set_dtr((m_wr5 & WR5_DTR) ? 0 : 1);
777777}
778778
779779//-------------------------------------------------
780//   get_stop_bits - get number of stop bits
780//  get_stop_bits - get number of stop bits
781781//-------------------------------------------------
782782
783783device_serial_interface::stop_bits_t z80sio_channel::get_stop_bits()
r249924r249925
795795
796796
797797//-------------------------------------------------
798//   get_rx_word_length - get receive word length
798//  get_rx_word_length - get receive word length
799799//-------------------------------------------------
800800
801801int z80sio_channel::get_rx_word_length()
r249924r249925
805805
806806   switch (m_wr3 & WR3_RX_WORD_LENGTH_MASK)
807807   {
808   case WR3_RX_WORD_LENGTH_5:   bits = 5;   break;
809   case WR3_RX_WORD_LENGTH_6:   bits = 6;   break;
810   case WR3_RX_WORD_LENGTH_7:   bits = 7;   break;
811   case WR3_RX_WORD_LENGTH_8:   bits = 8;   break;
808   case WR3_RX_WORD_LENGTH_5:  bits = 5;   break;
809   case WR3_RX_WORD_LENGTH_6:  bits = 6;   break;
810   case WR3_RX_WORD_LENGTH_7:  bits = 7;   break;
811   case WR3_RX_WORD_LENGTH_8:  bits = 8;   break;
812812   }
813813
814814   return bits;
r249924r249925
816816
817817
818818//-------------------------------------------------
819//   get_tx_word_length - get transmit word length
819//  get_tx_word_length - get transmit word length
820820//-------------------------------------------------
821821
822822int z80sio_channel::get_tx_word_length()
r249924r249925
826826
827827   switch (m_wr5 & WR5_TX_WORD_LENGTH_MASK)
828828   {
829   case WR5_TX_WORD_LENGTH_5:   bits = 5;   break;
830   case WR5_TX_WORD_LENGTH_6:   bits = 6;   break;
831   case WR5_TX_WORD_LENGTH_7:   bits = 7;   break;
832   case WR5_TX_WORD_LENGTH_8:   bits = 8;   break;
829   case WR5_TX_WORD_LENGTH_5:  bits = 5;   break;
830   case WR5_TX_WORD_LENGTH_6:  bits = 6;   break;
831   case WR5_TX_WORD_LENGTH_7:  bits = 7;   break;
832   case WR5_TX_WORD_LENGTH_8:  bits = 8;   break;
833833   }
834834
835835   return bits;
r249924r249925
869869
870870
871871//-------------------------------------------------
872//   control_read - read control register
872//  control_read - read control register
873873//-------------------------------------------------
874874
875875UINT8 z80sio_channel::control_read()
r249924r249925
886886
887887   switch (reg)
888888   {
889   case REG_RR0_STATUS:    data = do_sioreg_rr0(); break;
890   case REG_RR1_SPEC_RCV_COND:    data = do_sioreg_rr1(); break;
889   case REG_RR0_STATUS:     data = do_sioreg_rr0(); break;
890   case REG_RR1_SPEC_RCV_COND:  data = do_sioreg_rr1(); break;
891891   case REG_RR2_INTERRUPT_VECT: data = do_sioreg_rr2(); break;
892892   default:
893893      logerror("Z80SIO \"%s\" Channel %c : Unsupported RRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg);
r249924r249925
937937      // update register to reflect wire values TODO: Check if this will fire new interrupts
938938      if (!m_dcd) m_rr0 |= RR0_DCD;
939939      if (m_sync) m_rr0 |= RR0_SYNC_HUNT;
940      if (m_cts)   m_rr0 |= RR0_CTS;
941     
940      if (m_cts)  m_rr0 |= RR0_CTS;
941
942942      LOG(("Z80SIO \"%s\" Channel %c : Reset External/Status Interrupt\n", m_owner->tag(), 'A' + m_index));
943943      break;
944944   case WR0_CHANNEL_RESET:
r249924r249925
968968      break;
969969   default:
970970      LOG(("Z80SIO \"%s\" Channel %c : Unsupported WR0 command %02x mask %02x\n", m_owner->tag(), 'A' + m_index, data, WR0_REGISTER_MASK));
971     
971
972972   }
973973   do_sioreg_wr0_resets(data);
974974}
r249924r249925
983983   LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready Enable %u\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_ENABLE) ? 1 : 0));
984984   LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready Function %s\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_FUNCTION) ? "Ready" : "Wait"));
985985   LOG(("Z80SIO \"%s\" Channel %c : Wait/Ready on %s\n", m_owner->tag(), 'A' + m_index, (data & WR1_WRDY_ON_RX_TX) ? "Receive" : "Transmit"));
986   
986
987987   switch (data & WR1_RX_INT_MODE_MASK)
988988   {
989989   case WR1_RX_INT_DISABLE:
990990      LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt Disabled\n", m_owner->tag(), 'A' + m_index));
991991      break;
992     
992
993993   case WR1_RX_INT_FIRST:
994994      LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on First Character\n", m_owner->tag(), 'A' + m_index));
995995      break;
996     
996
997997   case WR1_RX_INT_ALL_PARITY:
998998      LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on All Characters, Parity Affects Vector\n", m_owner->tag(), 'A' + m_index));
999999      break;
1000     
1000
10011001   case WR1_RX_INT_ALL:
10021002      LOG(("Z80SIO \"%s\" Channel %c : Receiver Interrupt on All Characters\n", m_owner->tag(), 'A' + m_index));
10031003      break;
r249924r249925
10581058}
10591059
10601060//-------------------------------------------------
1061//   control_write - write control register
1061//  control_write - write control register
10621062//-------------------------------------------------
10631063void z80sio_channel::control_write(UINT8 data)
10641064{
1065   UINT8   reg = m_wr0 & WR0_REGISTER_MASK;
1065   UINT8   reg = m_wr0 & WR0_REGISTER_MASK;
10661066
10671067   if (reg != 0)
10681068   {
10691069      // mask out register index
10701070      m_wr0 &= ~WR0_REGISTER_MASK;
10711071   }
1072   
1072
10731073   LOG(("\n%s(%02x) reg %02x\n", FUNCNAME, data, reg));
1074   
1074
10751075   switch (reg)
10761076   {
1077   case REG_WR0_COMMAND_REGPT:    do_sioreg_wr0(data); break;
1078   case REG_WR1_INT_DMA_ENABLE:    do_sioreg_wr1(data); m_uart->check_interrupts(); break;
1079   case REG_WR2_INT_VECTOR:    do_sioreg_wr2(data); break;
1080   case REG_WR3_RX_CONTROL:    do_sioreg_wr3(data); update_serial(); break;
1081   case REG_WR4_RX_TX_MODES:    do_sioreg_wr4(data); update_serial(); break;
1082   case REG_WR5_TX_CONTROL:    do_sioreg_wr5(data); update_serial(); update_rts(); break;
1083   case REG_WR6_SYNC_OR_SDLC_A:    do_sioreg_wr6(data); break;
1084   case REG_WR7_SYNC_OR_SDLC_F:    do_sioreg_wr7(data); break;
1077   case REG_WR0_COMMAND_REGPT:  do_sioreg_wr0(data); break;
1078   case REG_WR1_INT_DMA_ENABLE:     do_sioreg_wr1(data); m_uart->check_interrupts(); break;
1079   case REG_WR2_INT_VECTOR:     do_sioreg_wr2(data); break;
1080   case REG_WR3_RX_CONTROL:     do_sioreg_wr3(data); update_serial(); break;
1081   case REG_WR4_RX_TX_MODES:    do_sioreg_wr4(data); update_serial(); break;
1082   case REG_WR5_TX_CONTROL:     do_sioreg_wr5(data); update_serial(); update_rts(); break;
1083   case REG_WR6_SYNC_OR_SDLC_A:     do_sioreg_wr6(data); break;
1084   case REG_WR7_SYNC_OR_SDLC_F:     do_sioreg_wr7(data); break;
10851085   default:
10861086      logerror("Z80SIO \"%s\" Channel %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg);
10871087   }
r249924r249925
10891089
10901090
10911091//-------------------------------------------------
1092//   data_read - read data register
1092//  data_read - read data register
10931093//-------------------------------------------------
10941094UINT8 z80sio_channel::data_read()
10951095{
r249924r249925
10991099   {
11001100      // load data from the FIFO
11011101      data = m_rx_data_fifo[m_rx_fifo];
1102     
1102
11031103      // load error status from the FIFO
11041104      m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo];
1105     
1105
11061106      // decrease FIFO pointer
11071107      m_rx_fifo--;
1108     
1108
11091109      if (m_rx_fifo < 0)
11101110      {
11111111         // no more characters available in the FIFO
11121112         m_rr0 &= ~ RR0_RX_CHAR_AVAILABLE;
11131113      }
11141114   }
1115   
1115
11161116   LOG(("Z80SIO \"%s\" Channel %c : Data Register Read '%02x'\n", m_owner->tag(), 'A' + m_index, data));
1117   
1117
11181118   return data;
11191119}
1120 
11211120
1121
11221122//-------------------------------------------------
1123//   data_write - write data register
1123//  data_write - write data register
11241124//-------------------------------------------------
11251125void z80sio_channel::data_write(UINT8 data)
11261126{
r249924r249925
11401140   }
11411141   else
11421142   {
1143      LOG(("   Transmitter %s, data byte dropped\n", m_wr5 & WR5_TX_ENABLE ? "not enabled" : "not emptied"));
1143      LOG(("  Transmitter %s, data byte dropped\n", m_wr5 & WR5_TX_ENABLE ? "not enabled" : "not emptied"));
11441144      m_rr0 &= ~RR0_TX_BUFFER_EMPTY;
11451145   }
11461146
r249924r249925
11491149
11501150
11511151//-------------------------------------------------
1152//   receive_data - receive data word
1152//  receive_data - receive data word
11531153//-------------------------------------------------
11541154void z80sio_channel::receive_data(UINT8 data)
11551155{
r249924r249925
11571157
11581158   if (m_rx_fifo == 2)
11591159   {
1160      LOG(("   Overrun detected\n"));
1160      LOG(("  Overrun detected\n"));
11611161      // receive overrun error detected
11621162      m_rx_error |= RR1_RX_OVERRUN_ERROR;
11631163
r249924r249925
11801180   {
11811181      m_rx_fifo++;
11821182   }
1183   
1183
11841184   // store received character and error status into FIFO
11851185   m_rx_data_fifo[m_rx_fifo] = data;
11861186   m_rx_error_fifo[m_rx_fifo] = m_rx_error;
1187   
1187
11881188   m_rr0 |= RR0_RX_CHAR_AVAILABLE;
1189   
1189
11901190   // receive interrupt
11911191   switch (m_wr1 & WR1_RX_INT_MODE_MASK)
11921192   {
r249924r249925
12101210
12111211
12121212//-------------------------------------------------
1213//   cts_w - clear to send handler
1213//  cts_w - clear to send handler
12141214//-------------------------------------------------
12151215
12161216WRITE_LINE_MEMBER( z80sio_channel::cts_w )
r249924r249925
12491249
12501250
12511251//-------------------------------------------------
1252//   dcd_w - data carrier detected handler
1252//  dcd_w - data carrier detected handler
12531253//-------------------------------------------------
12541254
12551255WRITE_LINE_MEMBER( z80sio_channel::dcd_w )
r249924r249925
12871287
12881288
12891289//-------------------------------------------------
1290//   sh_w - Sync Hunt handler
1290//  sh_w - Sync Hunt handler
12911291//-------------------------------------------------
12921292
12931293WRITE_LINE_MEMBER( z80sio_channel::sync_w )
r249924r249925
13201320
13211321
13221322//-------------------------------------------------
1323//   rxc_w - receive clock
1323//  rxc_w - receive clock
13241324//-------------------------------------------------
13251325
13261326WRITE_LINE_MEMBER( z80sio_channel::rxc_w )
r249924r249925
13421342
13431343
13441344//-------------------------------------------------
1345//   txc_w - transmit clock
1345//  txc_w - transmit clock
13461346//-------------------------------------------------
13471347
13481348WRITE_LINE_MEMBER( z80sio_channel::txc_w )
r249924r249925
13641364
13651365
13661366//-------------------------------------------------
1367//   update_serial -
1367//  update_serial -
13681368//-------------------------------------------------
13691369void z80sio_channel::update_serial()
13701370{
r249924r249925
14021402
14031403
14041404//-------------------------------------------------
1405//   set_dtr -
1405//  set_dtr -
14061406//-------------------------------------------------
14071407
14081408void z80sio_channel::set_dtr(int state)
r249924r249925
14171417}
14181418
14191419//-------------------------------------------------
1420//   write_rx -
1420//  write_rx -
14211421//-------------------------------------------------
14221422
14231423WRITE_LINE_MEMBER(z80sio_channel::write_rx)
trunk/src/devices/machine/z80sio.h
r249924r249925
5959#include "cpu/z80/z80daisy.h"
6060
6161//**************************************************************************
62//   DEVICE CONFIGURATION MACROS
62//  DEVICE CONFIGURATION MACROS
6363//**************************************************************************
6464
6565#define MCFG_Z80SIO_ADD(_tag, _clock, _rxa, _txa, _rxb, _txb) \
r249924r249925
116116
117117
118118//**************************************************************************
119//   TYPE DEFINITIONS
119//  TYPE DEFINITIONS
120120//**************************************************************************
121121
122122// ======================> z80sio_channel
r249924r249925
146146   UINT8 do_sioreg_rr0();
147147   UINT8 do_sioreg_rr1();
148148   UINT8 do_sioreg_rr2();
149   
149
150150   // write register handlers
151151   void do_sioreg_wr0(UINT8 data);
152152   void do_sioreg_wr0_resets(UINT8 data);
r249924r249925
157157   void do_sioreg_wr5(UINT8 data);
158158   void do_sioreg_wr6(UINT8 data);
159159   void do_sioreg_wr7(UINT8 data);
160   
160
161161   UINT8 control_read();
162162   void control_write(UINT8 data);
163163
r249924r249925
178178   int m_txc;
179179
180180   // Register state
181      // read registers     enum
181      // read registers     enum
182182   UINT8 m_rr0; // REG_RR0_STATUS
183183   UINT8 m_rr1; // REG_RR1_SPEC_RCV_COND
184184   UINT8 m_rr2; // REG_RR2_INTERRUPT_VECT
185      // write registers     enum
185      // write registers    enum
186186   UINT8 m_wr0; // REG_WR0_COMMAND_REGPT
187187   UINT8 m_wr1; // REG_WR1_INT_DMA_ENABLE
188188   UINT8 m_wr2; // REG_WR2_INT_VECTOR
r249924r249925
206206   // Read registers
207207   enum
208208   {
209      REG_RR0_STATUS      = 0,
210      REG_RR1_SPEC_RCV_COND   = 1,
211      REG_RR2_INTERRUPT_VECT   = 2
209      REG_RR0_STATUS      = 0,
210      REG_RR1_SPEC_RCV_COND   = 1,
211      REG_RR2_INTERRUPT_VECT  = 2
212212   };
213   
213
214214   // Write registers
215215   enum
216216   {
217      REG_WR0_COMMAND_REGPT   = 0,
218      REG_WR1_INT_DMA_ENABLE   = 1,
219      REG_WR2_INT_VECTOR   = 2,
220      REG_WR3_RX_CONTROL   = 3,
221      REG_WR4_RX_TX_MODES   = 4,
222      REG_WR5_TX_CONTROL   = 5,
223      REG_WR6_SYNC_OR_SDLC_A   = 6,
224      REG_WR7_SYNC_OR_SDLC_F   = 7
217      REG_WR0_COMMAND_REGPT   = 0,
218      REG_WR1_INT_DMA_ENABLE  = 1,
219      REG_WR2_INT_VECTOR  = 2,
220      REG_WR3_RX_CONTROL  = 3,
221      REG_WR4_RX_TX_MODES = 4,
222      REG_WR5_TX_CONTROL  = 5,
223      REG_WR6_SYNC_OR_SDLC_A  = 6,
224      REG_WR7_SYNC_OR_SDLC_F  = 7
225225   };
226   
226
227227   enum
228228   {
229      RR0_RX_CHAR_AVAILABLE     = 0x01,
230      RR0_INTERRUPT_PENDING     = 0x02,
231      RR0_TX_BUFFER_EMPTY     = 0x04,
232      RR0_DCD           = 0x08,
233      RR0_SYNC_HUNT        = 0x10,
234      RR0_CTS           = 0x20,
235      RR0_TX_UNDERRUN        = 0x40,
236      RR0_BREAK_ABORT        = 0x80
229      RR0_RX_CHAR_AVAILABLE     = 0x01,
230      RR0_INTERRUPT_PENDING     = 0x02,
231      RR0_TX_BUFFER_EMPTY   = 0x04,
232      RR0_DCD           = 0x08,
233      RR0_SYNC_HUNT         = 0x10,
234      RR0_CTS           = 0x20,
235      RR0_TX_UNDERRUN       = 0x40,
236      RR0_BREAK_ABORT       = 0x80
237237   };
238238
239239   enum
240240   {
241      RR1_ALL_SENT        = 0x01,
242      RR1_RESIDUE_CODE_MASK     = 0x0e,
243      RR1_PARITY_ERROR     = 0x10,
244      RR1_RX_OVERRUN_ERROR     = 0x20,
245      RR1_CRC_FRAMING_ERROR     = 0x40,
246      RR1_END_OF_FRAME     = 0x80
241      RR1_ALL_SENT          = 0x01,
242      RR1_RESIDUE_CODE_MASK     = 0x0e,
243      RR1_PARITY_ERROR      = 0x10,
244      RR1_RX_OVERRUN_ERROR      = 0x20,
245      RR1_CRC_FRAMING_ERROR     = 0x40,
246      RR1_END_OF_FRAME      = 0x80
247247   };
248248
249249   enum
250   {                 // TODO: overload SIO functionality
251      RR2_INT_VECTOR_MASK     = 0xff, // SCC channel A, SIO channel B (special case)
252      RR2_INT_VECTOR_V1     = 0x02, // SIO (special case) /SCC Channel B
253      RR2_INT_VECTOR_V2     = 0x04, // SIO (special case) /SCC Channel B
254      RR2_INT_VECTOR_V3     = 0x08  // SIO (special case) /SCC Channel B
250   {                     // TODO: overload SIO functionality
251      RR2_INT_VECTOR_MASK   = 0xff, // SCC channel A, SIO channel B (special case)
252      RR2_INT_VECTOR_V1     = 0x02, // SIO (special case) /SCC Channel B
253      RR2_INT_VECTOR_V2     = 0x04, // SIO (special case) /SCC Channel B
254      RR2_INT_VECTOR_V3     = 0x08  // SIO (special case) /SCC Channel B
255255   };
256   
256
257257   enum
258258   {
259      WR0_REGISTER_MASK     = 0x07,
260      WR0_COMMAND_MASK     = 0x38,
261      WR0_NULL        = 0x00,
262      WR0_SEND_ABORT        = 0x08, // not supported
263      WR0_RESET_EXT_STATUS     = 0x10,
264      WR0_CHANNEL_RESET     = 0x18,
265      WR0_ENABLE_INT_NEXT_RX     = 0x20,
266      WR0_RESET_TX_INT     = 0x28, // not supported
267      WR0_ERROR_RESET        = 0x30,
268      WR0_RETURN_FROM_INT     = 0x38, // not supported
269      WR0_CRC_RESET_CODE_MASK     = 0xc0, // not supported
270      WR0_CRC_RESET_NULL     = 0x00, // not supported
271      WR0_CRC_RESET_RX     = 0x40, // not supported
272      WR0_CRC_RESET_TX     = 0x80, // not supported
259      WR0_REGISTER_MASK     = 0x07,
260      WR0_COMMAND_MASK      = 0x38,
261      WR0_NULL          = 0x00,
262      WR0_SEND_ABORT        = 0x08, // not supported
263      WR0_RESET_EXT_STATUS      = 0x10,
264      WR0_CHANNEL_RESET     = 0x18,
265      WR0_ENABLE_INT_NEXT_RX    = 0x20,
266      WR0_RESET_TX_INT      = 0x28, // not supported
267      WR0_ERROR_RESET       = 0x30,
268      WR0_RETURN_FROM_INT   = 0x38, // not supported
269      WR0_CRC_RESET_CODE_MASK   = 0xc0, // not supported
270      WR0_CRC_RESET_NULL    = 0x00, // not supported
271      WR0_CRC_RESET_RX      = 0x40, // not supported
272      WR0_CRC_RESET_TX      = 0x80, // not supported
273273      WR0_CRC_RESET_TX_UNDERRUN = 0xc0  // not supported
274274   };
275275
276276   enum
277277   {
278      WR1_EXT_INT_ENABLE     = 0x01,
279      WR1_TX_INT_ENABLE     = 0x02,
280      WR1_STATUS_VECTOR     = 0x04,
281      WR1_RX_INT_MODE_MASK     = 0x18,
282      WR1_RX_INT_DISABLE     = 0x00,
283      WR1_RX_INT_FIRST     = 0x08,
284      WR1_RX_INT_ALL_PARITY     = 0x10, // not supported
285      WR1_RX_INT_ALL        = 0x18,
286      WR1_WRDY_ON_RX_TX     = 0x20, // not supported
287      WR1_WRDY_FUNCTION     = 0x40, // not supported
288      WR1_WRDY_ENABLE        = 0x80  // not supported
278      WR1_EXT_INT_ENABLE    = 0x01,
279      WR1_TX_INT_ENABLE     = 0x02,
280      WR1_STATUS_VECTOR     = 0x04,
281      WR1_RX_INT_MODE_MASK      = 0x18,
282      WR1_RX_INT_DISABLE    = 0x00,
283      WR1_RX_INT_FIRST      = 0x08,
284      WR1_RX_INT_ALL_PARITY     = 0x10, // not supported
285      WR1_RX_INT_ALL        = 0x18,
286      WR1_WRDY_ON_RX_TX     = 0x20, // not supported
287      WR1_WRDY_FUNCTION     = 0x40, // not supported
288      WR1_WRDY_ENABLE       = 0x80  // not supported
289289   };
290290
291291   enum
292292   {
293      WR2_DATA_XFER_INT     = 0x00, // not supported
294      WR2_DATA_XFER_DMA_INT     = 0x01, // not supported
295      WR2_DATA_XFER_DMA     = 0x02, // not supported
296      WR2_DATA_XFER_ILLEGAL     = 0x03, // not supported
297      WR2_DATA_XFER_MASK     = 0x03, // not supported
298      WR2_PRIORITY        = 0x04, // not supported
299      WR2_MODE_8085_1        = 0x00, // not supported
300      WR2_MODE_8085_2        = 0x08, // not supported
301      WR2_MODE_8086_8088     = 0x10, // not supported
302      WR2_MODE_ILLEGAL     = 0x18, // not supported
303      WR2_MODE_MASK        = 0x18, // not supported
304      WR2_VECTORED_INT     = 0x20, // not supported
305      WR2_PIN10_SYNDETB_RTSB     = 0x80  // not supported
293      WR2_DATA_XFER_INT     = 0x00, // not supported
294      WR2_DATA_XFER_DMA_INT     = 0x01, // not supported
295      WR2_DATA_XFER_DMA     = 0x02, // not supported
296      WR2_DATA_XFER_ILLEGAL     = 0x03, // not supported
297      WR2_DATA_XFER_MASK    = 0x03, // not supported
298      WR2_PRIORITY          = 0x04, // not supported
299      WR2_MODE_8085_1       = 0x00, // not supported
300      WR2_MODE_8085_2       = 0x08, // not supported
301      WR2_MODE_8086_8088    = 0x10, // not supported
302      WR2_MODE_ILLEGAL      = 0x18, // not supported
303      WR2_MODE_MASK         = 0x18, // not supported
304      WR2_VECTORED_INT      = 0x20, // not supported
305      WR2_PIN10_SYNDETB_RTSB    = 0x80  // not supported
306306   };
307307
308308   enum
309309   {
310      WR3_RX_ENABLE        = 0x01,
310      WR3_RX_ENABLE         = 0x01,
311311      WR3_SYNC_CHAR_LOAD_INHIBIT= 0x02, // not supported
312      WR3_ADDRESS_SEARCH_MODE     = 0x04, // not supported
313      WR3_RX_CRC_ENABLE     = 0x08, // not supported
314      WR3_ENTER_HUNT_PHASE     = 0x10, // not supported
315      WR3_AUTO_ENABLES     = 0x20,
316      WR3_RX_WORD_LENGTH_MASK     = 0xc0,
317      WR3_RX_WORD_LENGTH_5     = 0x00,
318      WR3_RX_WORD_LENGTH_7     = 0x40,
319      WR3_RX_WORD_LENGTH_6     = 0x80,
320      WR3_RX_WORD_LENGTH_8     = 0xc0
312      WR3_ADDRESS_SEARCH_MODE   = 0x04, // not supported
313      WR3_RX_CRC_ENABLE     = 0x08, // not supported
314      WR3_ENTER_HUNT_PHASE      = 0x10, // not supported
315      WR3_AUTO_ENABLES      = 0x20,
316      WR3_RX_WORD_LENGTH_MASK   = 0xc0,
317      WR3_RX_WORD_LENGTH_5      = 0x00,
318      WR3_RX_WORD_LENGTH_7      = 0x40,
319      WR3_RX_WORD_LENGTH_6      = 0x80,
320      WR3_RX_WORD_LENGTH_8      = 0xc0
321321   };
322322
323323   enum
324324   {
325      WR4_PARITY_ENABLE     = 0x01,
326      WR4_PARITY_EVEN        = 0x02,
327      WR4_STOP_BITS_MASK     = 0x0c,
328      WR4_STOP_BITS_1        = 0x04,
329      WR4_STOP_BITS_1_5     = 0x08, // not supported
330      WR4_STOP_BITS_2        = 0x0c,
331      WR4_SYNC_MODE_MASK     = 0x30, // not supported
332      WR4_SYNC_MODE_8_BIT     = 0x00, // not supported
333      WR4_SYNC_MODE_16_BIT     = 0x10, // not supported
334      WR4_SYNC_MODE_SDLC     = 0x20, // not supported
335      WR4_SYNC_MODE_EXT     = 0x30, // not supported
336      WR4_CLOCK_RATE_MASK     = 0xc0,
337      WR4_CLOCK_RATE_X1     = 0x00,
338      WR4_CLOCK_RATE_X16     = 0x40,
339      WR4_CLOCK_RATE_X32     = 0x80,
340      WR4_CLOCK_RATE_X64     = 0xc0
325      WR4_PARITY_ENABLE     = 0x01,
326      WR4_PARITY_EVEN       = 0x02,
327      WR4_STOP_BITS_MASK    = 0x0c,
328      WR4_STOP_BITS_1       = 0x04,
329      WR4_STOP_BITS_1_5     = 0x08, // not supported
330      WR4_STOP_BITS_2       = 0x0c,
331      WR4_SYNC_MODE_MASK    = 0x30, // not supported
332      WR4_SYNC_MODE_8_BIT   = 0x00, // not supported
333      WR4_SYNC_MODE_16_BIT      = 0x10, // not supported
334      WR4_SYNC_MODE_SDLC    = 0x20, // not supported
335      WR4_SYNC_MODE_EXT     = 0x30, // not supported
336      WR4_CLOCK_RATE_MASK   = 0xc0,
337      WR4_CLOCK_RATE_X1     = 0x00,
338      WR4_CLOCK_RATE_X16    = 0x40,
339      WR4_CLOCK_RATE_X32    = 0x80,
340      WR4_CLOCK_RATE_X64    = 0xc0
341341   };
342342
343343   enum
344344   {
345      WR5_TX_CRC_ENABLE     = 0x01, // not supported
346      WR5_RTS           = 0x02,
347      WR5_CRC16        = 0x04, // not supported
348      WR5_TX_ENABLE        = 0x08,
349      WR5_SEND_BREAK        = 0x10,
350      WR5_TX_WORD_LENGTH_MASK     = 0x60,
351      WR5_TX_WORD_LENGTH_5     = 0x00,
352      WR5_TX_WORD_LENGTH_6     = 0x40,
353      WR5_TX_WORD_LENGTH_7     = 0x20,
354      WR5_TX_WORD_LENGTH_8     = 0x60,
355      WR5_DTR           = 0x80
345      WR5_TX_CRC_ENABLE     = 0x01, // not supported
346      WR5_RTS           = 0x02,
347      WR5_CRC16         = 0x04, // not supported
348      WR5_TX_ENABLE         = 0x08,
349      WR5_SEND_BREAK        = 0x10,
350      WR5_TX_WORD_LENGTH_MASK   = 0x60,
351      WR5_TX_WORD_LENGTH_5      = 0x00,
352      WR5_TX_WORD_LENGTH_6      = 0x40,
353      WR5_TX_WORD_LENGTH_7      = 0x20,
354      WR5_TX_WORD_LENGTH_8      = 0x60,
355      WR5_DTR           = 0x80
356356   };
357357
358358   void update_serial();
r249924r249925
366366   int get_tx_word_length();
367367
368368   // receiver state
369   UINT8 m_rx_data_fifo[3];   // receive data FIFO
370   UINT8 m_rx_error_fifo[3];   // receive error FIFO
371   UINT8 m_rx_error;      // current receive error
372   int m_rx_fifo;      // receive FIFO pointer
369   UINT8 m_rx_data_fifo[3];    // receive data FIFO
370   UINT8 m_rx_error_fifo[3];   // receive error FIFO
371   UINT8 m_rx_error;       // current receive error
372   int m_rx_fifo;      // receive FIFO pointer
373373
374   int m_rx_clock;      // receive clock pulse count
375   int m_rx_first;      // first character received
376   int m_rx_break;      // receive break condition
377   UINT8 m_rx_rr0_latch;   // read register 0 latched
374   int m_rx_clock;     // receive clock pulse count
375   int m_rx_first;     // first character received
376   int m_rx_break;     // receive break condition
377   UINT8 m_rx_rr0_latch;   // read register 0 latched
378378
379379   int m_rxd;
380   int m_sh;         // sync hunt
381   int m_cts;         // clear to send latch
382   int m_dcd;         // data carrier detect latch
380   int m_sh;           // sync hunt
381   int m_cts;          // clear to send latch
382   int m_dcd;          // data carrier detect latch
383383
384384   // transmitter state
385   UINT8 m_tx_data;      // transmit data register
386   int m_tx_clock;      // transmit clock pulse count
385   UINT8 m_tx_data;        // transmit data register
386   int m_tx_clock;     // transmit clock pulse count
387387
388   int m_dtr;         // data terminal ready
389   int m_rts;         // request to send
388   int m_dtr;          // data terminal ready
389   int m_rts;          // request to send
390390
391391   // synchronous state
392   UINT16 m_sync;      // sync character
392   UINT16 m_sync;      // sync character
393393
394394   int m_index;
395395   z80sio_device *m_uart;
r249924r249925
403403{
404404   friend class z80sio_channel;
405405
406 public:
406   public:
407407   // construction/destruction
408408   z80sio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
409409   z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
410   
410
411411   template<class _Object> static devcb_base &set_out_txda_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_txda_cb.set_callback(object); }
412412   template<class _Object> static devcb_base &set_out_dtra_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_dtra_cb.set_callback(object); }
413413   template<class _Object> static devcb_base &set_out_rtsa_callback(device_t &device, _Object object) { return downcast<z80sio_device &>(device).m_out_rtsa_cb.set_callback(object); }
r249924r249925
504504   int m_rxcb;
505505   int m_txcb;
506506
507   devcb_write_line   m_out_txda_cb;
508   devcb_write_line   m_out_dtra_cb;
509   devcb_write_line   m_out_rtsa_cb;
510   devcb_write_line   m_out_wrdya_cb;
511   devcb_write_line   m_out_synca_cb;
507   devcb_write_line    m_out_txda_cb;
508   devcb_write_line    m_out_dtra_cb;
509   devcb_write_line    m_out_rtsa_cb;
510   devcb_write_line    m_out_wrdya_cb;
511   devcb_write_line    m_out_synca_cb;
512512
513   devcb_write_line   m_out_txdb_cb;
514   devcb_write_line   m_out_dtrb_cb;
515   devcb_write_line   m_out_rtsb_cb;
516   devcb_write_line   m_out_wrdyb_cb;
517   devcb_write_line   m_out_syncb_cb;
513   devcb_write_line    m_out_txdb_cb;
514   devcb_write_line    m_out_dtrb_cb;
515   devcb_write_line    m_out_rtsb_cb;
516   devcb_write_line    m_out_wrdyb_cb;
517   devcb_write_line    m_out_syncb_cb;
518518
519   devcb_write_line   m_out_int_cb;
520   devcb_write_line   m_out_rxdrqa_cb;
521   devcb_write_line   m_out_txdrqa_cb;
522   devcb_write_line   m_out_rxdrqb_cb;
523   devcb_write_line   m_out_txdrqb_cb;
519   devcb_write_line    m_out_int_cb;
520   devcb_write_line    m_out_rxdrqa_cb;
521   devcb_write_line    m_out_txdrqa_cb;
522   devcb_write_line    m_out_rxdrqb_cb;
523   devcb_write_line    m_out_txdrqb_cb;
524524
525   int m_int_state[8];   // interrupt state
525   int m_int_state[8]; // interrupt state
526526   int m_variant;
527527};
528528
trunk/src/devices/video/poly.h
r249924r249925
11771177struct frustum_clip_vertex
11781178{
11791179   _BaseType x, y, z, w;       // A 3d coordinate already transformed by a projection matrix
1180    _BaseType p[_MaxParams];    // Additional parameters to clip
1180   _BaseType p[_MaxParams];    // Additional parameters to clip
11811181};
11821182
11831183
r249924r249925
12121212         clipv[clip_verts].y = v[previ].y + ((v[i].y - v[previ].y) * t);
12131213         clipv[clip_verts].z = v[previ].z + ((v[i].z - v[previ].z) * t);
12141214         clipv[clip_verts].w = v[previ].w + ((v[i].w - v[previ].w) * t);
1215           
1216            // Interpolate the rest of the parameters
1217            for (int pi = 0; pi < _MaxParams; pi++)
1218                clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
1219           
1215
1216         // Interpolate the rest of the parameters
1217         for (int pi = 0; pi < _MaxParams; pi++)
1218            clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
1219
12201220         ++clip_verts;
12211221      }
12221222      if (v1_side > 0)                // current point is inside
r249924r249925
12801280         clipv[clip_verts].y = v[previ].y + ((v[i].y - v[previ].y) * t);
12811281         clipv[clip_verts].z = v[previ].z + ((v[i].z - v[previ].z) * t);
12821282         clipv[clip_verts].w = v[previ].w + ((v[i].w - v[previ].w) * t);
1283           
1284            // Interpolate the rest of the parameters
1285            for (int pi = 0; pi < _MaxParams; pi++)
1286                clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
12871283
1288            ++clip_verts;
1284         // Interpolate the rest of the parameters
1285         for (int pi = 0; pi < _MaxParams; pi++)
1286            clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
1287
1288         ++clip_verts;
12891289      }
12901290      if (v1_side > 0)                // current point is inside
12911291      {
r249924r249925
13041304template<typename _BaseType, int _MaxParams>
13051305int frustum_clip_all(frustum_clip_vertex<_BaseType, _MaxParams>* clip_vert, int num_vertices, frustum_clip_vertex<_BaseType, _MaxParams>* out)
13061306{
1307    num_vertices = frustum_clip_w<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert);
1308    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 0);      // W <= -X
1309    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 1);      // W <= +X
1310    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 0);      // W <= -Y
1311    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 1);      // W <= +X
1312    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 0);      // W <= -Z
1313    num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 1);      // W <= +Z
1314    out = clip_vert;
1315    return num_vertices;
1307   num_vertices = frustum_clip_w<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert);
1308   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 0);      // W <= -X
1309   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 0, 1);      // W <= +X
1310   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 0);      // W <= -Y
1311   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 1, 1);      // W <= +X
1312   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 0);      // W <= -Z
1313   num_vertices = frustum_clip<_BaseType, _MaxParams>(clip_vert, num_vertices, clip_vert, 2, 1);      // W <= +Z
1314   out = clip_vert;
1315   return num_vertices;
13161316}
13171317
13181318
trunk/src/emu/dipty.c
r249924r249925
1212#include "osdcore.h"
1313
1414device_pty_interface::device_pty_interface(const machine_config &mconfig, device_t &device)
15    : device_interface(device, "pty"),
16      m_pty_master(NULL),
17      m_slave_name(),
18      m_opened(false)
15   : device_interface(device, "pty"),
16      m_pty_master(NULL),
17      m_slave_name(),
18      m_opened(false)
1919{
2020}
2121
r249924r249925
2525
2626bool device_pty_interface::open(void)
2727{
28    if (!m_opened) {
29        char buffer[ 128 ];
28   if (!m_opened) {
29      char buffer[ 128 ];
3030
31        if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) {
32            m_opened = true;
33            m_slave_name.assign(buffer);
34        } else {
35            m_opened = false;
36            m_pty_master = NULL;
37        }
38    }
31      if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) {
32         m_opened = true;
33         m_slave_name.assign(buffer);
34      } else {
35         m_opened = false;
36         m_pty_master = NULL;
37      }
38   }
3939
40    return m_opened;
40   return m_opened;
4141}
4242
4343void device_pty_interface::close(void)
4444{
45    if (m_opened) {
46        osd_close(m_pty_master);
47        m_opened = false;
48    }
45   if (m_opened) {
46      osd_close(m_pty_master);
47      m_opened = false;
48   }
4949}
5050
5151bool device_pty_interface::is_open(void) const
5252{
53    return m_opened;
53   return m_opened;
5454}
5555
5656ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count)
5757{
58    UINT32 actual_bytes;
58   UINT32 actual_bytes;
5959
60    if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) {
61        return actual_bytes;
62    } else {
63        return -1;
64    }
60   if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) {
61      return actual_bytes;
62   } else {
63      return -1;
64   }
6565}
6666
6767void device_pty_interface::write(UINT8 tx_char)
6868{
69    UINT32 actual_bytes;
69   UINT32 actual_bytes;
7070
71    if (m_opened) {
72        osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes);
73    }
71   if (m_opened) {
72      osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes);
73   }
7474}
7575
7676bool device_pty_interface::is_slave_connected(void) const
7777{
78    // TODO: really check for slave status
79    return m_opened;
78   // TODO: really check for slave status
79   return m_opened;
8080}
8181
8282const char *device_pty_interface::slave_name(void) const
8383{
84    return m_slave_name.c_str();
84   return m_slave_name.c_str();
8585}
trunk/src/emu/dipty.h
r249924r249925
2020class device_pty_interface : public device_interface
2121{
2222public:
23        // construction/destruction
24        device_pty_interface(const machine_config &mconfig, device_t &device);
25        virtual ~device_pty_interface();
23      // construction/destruction
24      device_pty_interface(const machine_config &mconfig, device_t &device);
25      virtual ~device_pty_interface();
2626
27        bool open(void);
28        void close(void);
27      bool open(void);
28      void close(void);
2929
30        bool is_open(void) const;
30      bool is_open(void) const;
3131
32        ssize_t read(UINT8 *rx_chars , size_t count);
33        void write(UINT8 tx_char);
32      ssize_t read(UINT8 *rx_chars , size_t count);
33      void write(UINT8 tx_char);
3434
35        bool is_slave_connected(void) const;
35      bool is_slave_connected(void) const;
3636
37        const char *slave_name(void) const;
37      const char *slave_name(void) const;
3838
3939protected:
40        osd_file *m_pty_master;
41        std::string m_slave_name;
42        bool m_opened;
40      osd_file *m_pty_master;
41      std::string m_slave_name;
42      bool m_opened;
4343};
4444
4545// iterator
trunk/src/emu/emuopts.c
r249924r249925
445445      parse_one_ini("computer", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
446446   else if (cursystem->flags & MACHINE_TYPE_OTHER)
447447      parse_one_ini("othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
448   
448
449449   machine_config config(*cursystem, *this);
450450   screen_device_iterator iter(config.root_device());
451451   for (const screen_device *device = iter.first(); device != NULL; device = iter.next())
trunk/src/emu/screen.h
r249924r249925
285285   UINT8               m_curtexture;               // current texture index
286286   bool                m_changed;                  // has this bitmap changed?
287287   INT32               m_last_partial_scan;        // scanline of last partial update
288   INT32            m_partial_scan_hpos;      // horizontal pixel last rendered on this partial scanline
288   INT32               m_partial_scan_hpos;        // horizontal pixel last rendered on this partial scanline
289289   bitmap_argb32       m_screen_overlay_bitmap;    // screen overlay bitmap
290290   UINT32              m_unique_id;                // unique id for this screen_device
291291   rgb_t               m_color;                    // render color
trunk/src/emu/ui/info_pty.c
r249924r249925
1313#include "ui/info_pty.h"
1414
1515ui_menu_pty_info::ui_menu_pty_info(running_machine &machine, render_container *container) :
16    ui_menu(machine, container)
16   ui_menu(machine, container)
1717{
1818}
1919
r249924r249925
2323
2424void ui_menu_pty_info::populate()
2525{
26    item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL);
27    item_append("", NULL, MENU_FLAG_DISABLE, NULL);
26   item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL);
27   item_append("", NULL, MENU_FLAG_DISABLE, NULL);
2828
29    pty_interface_iterator iter(machine().root_device());
30    for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) {
31        const char *port_name = pty->device().owner()->tag() + 1;
32        if (pty->is_open()) {
33            item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL);
34        } else {
35            item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL);
36        }
37        item_append("", NULL, MENU_FLAG_DISABLE, NULL);
38    }
29   pty_interface_iterator iter(machine().root_device());
30   for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) {
31      const char *port_name = pty->device().owner()->tag() + 1;
32      if (pty->is_open()) {
33         item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL);
34      } else {
35         item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL);
36      }
37      item_append("", NULL, MENU_FLAG_DISABLE, NULL);
38   }
3939}
4040
4141void ui_menu_pty_info::handle()
4242{
43    process(0);
43   process(0);
4444}
trunk/src/emu/ui/mainmenu.c
r249924r249925
9191         item_append("Tape Control", NULL, 0, (void *)TAPE_CONTROL);
9292   }
9393
94        pty_interface_iterator ptyiter(machine().root_device());
95        if (ptyiter.first() != NULL) {
96            item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO);
97        }
94      pty_interface_iterator ptyiter(machine().root_device());
95      if (ptyiter.first() != NULL) {
96         item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO);
97      }
9898   if (machine().ioport().has_bioses())
9999      item_append("Bios Selection", NULL, 0, (void *)BIOS_SELECTION);
100100
r249924r249925
196196         ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_tape_control(machine(), container, NULL)));
197197         break;
198198
199                case PTY_INFO:
200                        ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container)));
199            case PTY_INFO:
200                  ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container)));
201201         break;
202202
203203      case SLOT_DEVICES:
trunk/src/emu/ui/mainmenu.h
r249924r249925
4545      SELECT_GAME,
4646      BIOS_SELECTION,
4747      BARCODE_READ,
48                PTY_INFO
48            PTY_INFO
4949   };
5050};
5151
trunk/src/emu/video/vector.c
r249924r249925
227227   if (m_flicker && (intensity > 0))
228228   {
229229      float random = (float)(machine().rand() & 255) / 255.0f; // random value between 0.0 and 1.0
230     
230
231231      intensity -= (int)(intensity * random * m_flicker);
232232      if (intensity < 0)
233233      {
234234         intensity = 0;
235      }     
235      }
236236      if (intensity > 255)
237237      {
238238         intensity = 255;
r249924r249925
344344         coords.y1 = ((float)curpoint->y - yoffs) * yscale;
345345
346346         // extend zero-length vector line (vector point) by quarter beam_width on both sides
347         if (fabs(coords.x0 - coords.x1) < FLT_EPSILON &&
347         if (fabs(coords.x0 - coords.x1) < FLT_EPSILON &&
348348            fabs(coords.y0 - coords.y1) < FLT_EPSILON)
349349         {
350350            coords.x0 += xratio * beam_width * 0.25f;
trunk/src/lib/formats/apollo_dsk.c
r249924r249925
5353
5454   return ((size == expected_size) || (size == 0)) ? 1 : 0;
5555}
56
trunk/src/lib/formats/tzx_cas.c
r249924r249925
314314
315315         tzx_output_wave(buffer, samples);
316316         size += samples;
317         
317
318318      }
319319   }
320320
trunk/src/mame/arcade.lst
r249924r249925
18271827rtypejp         // (c) 1987 (Japan)
18281828rtypeu          // (c) 1987 + Nintendo USA license (US)
18291829rtypeb          // bootleg
1830rtypem82b      // bootleg
1830rtypem82b       // bootleg
18311831bchopper        // (c) 1987
18321832mrheli          // (c) 1987 (Japan)
18331833nspirit         // (c) 1988
r249924r249925
18451845rtype2          // (c) 1989
18461846rtype2j         // (c) 1989 (Japan)
18471847rtype2jc        // (c) 1989 (Japan)
1848rtype2m82b      // bootleg
1848rtype2m82b      // bootleg
18491849majtitle        // (c) 1990 (World)
18501850majtitlej       // (c) 1990 (Japan)
18511851hharry          // (c) 1990 (World)
r249924r249925
18561856poundforj       // (c) 1990 (Japan)
18571857poundforu       // (c) 1990 Irem America (US)
18581858airduelm72      // (c) 1990 (Japan)
1859airduel         // (c) 1990 (World)
1859airduel         // (c) 1990 (World)
18601860cosmccop        // (c) 1991 (World)
18611861gallop          // (c) 1991 (Japan)
18621862ltswords        // (c) 1991 (World)
18631863kengo           // (c) 1991 (Japan)
1864kengoa         // (c) 1991 (Japan)
1864kengoa          // (c) 1991 (Japan)
18651865// not M72, but same sound hardware
18661866sichuan2        // (c) 1989 Tamtex
18671867sichuan2a       // (c) 1989 Tamtex
r249924r249925
20972097sboblbobl       // bootleg
20982098sboblbobla      // bootleg
20992099sboblboblb      // bootleg
2100sboblboblc      // bootleg
2101bublboblb      // bootleg
2100sboblboblc      // bootleg
2101bublboblb       // bootleg
21022102bub68705        // bootleg
21032103dland           // bootleg
2104bbredux         // bootleg / hack
2105bublcave      // hack
2106boblcave      // hack
2107bublcave11      // hack
2108bublcave10      // hack
2104bbredux         // bootleg / hack
2105bublcave        // hack
2106boblcave        // hack
2107bublcave11      // hack
2108bublcave10      // hack
21092109missb2          // bootleg on enhanced hardware
21102110bublpong        // bootleg on enhanced hardware
21112111kikikai         // A85 (c) 1986 Taito Corporation
r249924r249925
28712871ppsatan         // (c) 1996 <unknown>
28722872ddonpach        // (c) 1997 Atlus/Cave
28732873ddonpachj       // (c) 1997 Atlus/Cave
2874ddonpacha      // hack
2874ddonpacha       // hack
28752875dfeveron        // (c) 1998 Cave + Nihon System license
28762876feversos        // (c) 1998 Cave + Nihon System license
28772877esprade         // (c) 1998 Atlus/Cave
r249924r249925
31053105madgearj        //  2/1989 (c) 1989 (Japan)
31063106ledstorm        //  1988 (c) 1988 (US)
31073107leds2011        //  1988 (c) 1988 (World)
3108leds2011u      //  1988 (c) 1988 (US)
3108leds2011u       //  1988 (c) 1988 (US)
31093109//  3/1989 Dokaben (baseball) - see below among "Mitchell" games
31103110//  8/1989 Dokaben 2 (baseball) - see below among "Mitchell" games
31113111// 10/1989 Capcom Baseball - see below among "Mitchell" games
r249924r249925
38743874soulclbrja      // 1998.?? Soul Calibur (Japan, SOC11/VER.A2)
38753875technodr        // 1998.07 Techno Drive
38763876mdhorse         // 1998.11 Derby Quiz My Dream Horse (Japan, MDH1/VER.A2)
3877aplarail      // 1998.12 Attack Pla Rail
3877aplarail        // 1998.12 Attack Pla Rail
38783878tenkomor        // 1998.?? Tenkomori Shooting (Asia, TKM2/VER.A1)
38793879tenkomorja      // 1998.12 Tenkomori Shooting (Japan, TKM1/VER.A1)
38803880pacapp          // 1998.12 Paca Paca Passion (Japan, PPP1/VER.A2)
r249924r249925
45104510wbdeluxe        // (c) 1986 + Escape license (S1)
45114511wboysys2        // 834-5984  (c) 1986 + Escape license (S1)
45124512gardia          // 834-6119 (S2?)
4513gardiaj         //
4513gardiaj         //
45144514gardiab         // bootleg
45154515nob             // (c) Data East
45164516nobb            // bootleg
r249924r249925
46954695ryukyu          // (c) 1990 (FD1094)
46964696sdib            // (c) 1987 (FD1089A)
46974697sdibl           // (c) 1987 bootleg
4698sdibl2         // bootleg
4699sdibl3         // bootleg
4700sdibl4         // bootleg
4701sdibl5         // bootleg
4702sdibl6         // bootleg
4698sdibl2          // bootleg
4699sdibl3          // bootleg
4700sdibl4          // bootleg
4701sdibl5          // bootleg
4702sdibl6          // bootleg
47034703defense         // (c) 1987 (FD1094)
47044704shinobi5        // (c) 1987 (Unprotected)
47054705shinobi4        // (c) 1987 (MC-8123B)
r249924r249925
48894889toutrunjd       // bootleg
48904890toutrun3d       // bootleg
48914891toutrunj1d      // bootleg
4892toutrun2d      // bootleg
4892toutrun2d       // bootleg
48934893shangon3d       // bootleg
48944894
48954895// X Board
r249924r249925
66356635mogura          // GX141 (c) 1991
66366636wecleman        // GX602 (c) 1986
66376637weclemana       // GX602?(c) 1988
6638weclemanb      // GX602 (c) 1986
6638weclemanb       // GX602 (c) 1986
66396639hotchase        // GX763 (c) 1988
66406640hotchasea
66416641chqflag         // GX717 (c) 1988
r249924r249925
90879087// Gaelco 2D games
90889088mastboy         // (c) 1987 - No Ref on the PCB
90899089mastboyi        // (c) 1987 - No Ref on the PCB
9090mastboyia      // (c) 1987 - No Ref on the PCB
9090mastboyia       // (c) 1987 - No Ref on the PCB
90919091xorworld        // (c) 1990 - prototype
90929092bigkarnk        // (c) 1991 - Ref 901112-1
90939093// Master Boy 2 // (c) 1991 - Ref ???
r249924r249925
97299729garogun         // (c) 2000 Yun Sung
973097307ordi           // (c) 2002 Yun Sung
97319731wondstck        // (c) ???? Yun Sung
9732wondstcka      // (c) ???? Yun Sung
9732wondstcka       // (c) ???? Yun Sung
97339733
97349734// Zilec games
97359735blueprnt        // (c) 1982 Bally Midway (Zilec in ROM 3U, and the programmer names)
r249924r249925
1018710187svgtw
1018810188svgpcb          //
1018910189ket             // (c) 2002 Ketsui
10190ket1         //
10190ket1            //
1019110191keta            //
1019210192ketb            //
1019310193ketarr          // hack
r249924r249925
1019510195ketarr15        // hack
1019610196ketarr10        // hack
1019710197ketarrs151      // hack
10198ketarrs15      // hack
10199ketarrf         // hack
10198ketarrs15       // hack
10199ketarrf         // hack
1020010200ddpdoj          // (c) 2002 DoDonPachi Dai-Ou-Jou
1020110201ddpdoja         //
1020210202ddpdojb         //
r249924r249925
1118911189xplan           // (c) 2006 Subsino
1119011190
1119111191sliver          // (c) 1996 Hollow Corp
11192slivera         //
11192slivera         //
1119311193intrscti        // ????
1119411194pasha2          // (c) 1998 Dong Sung
1119511195trvmadns        // (c) 1985 Thunderhead Inc.
r249924r249925
1321213212kas89           // 1989, SFC S.R.L.
1321313213caspoker        // 1987, PM / Beck Elektronik.
1321413214wildpkr         // 199?, TAB Austria.
13215subhuntr      // 1979 Model Racing
13215subhuntr        // 1979 Model Racing
1321613216
1321713217manohman        // 199?, Merkur.
1321813218
trunk/src/mame/audio/hng64.c
r249924r249925
277277         /* correct? */
278278         m_audiocpu->set_input_line(5, CLEAR_LINE);
279279         //if(data)
280         //   printf("IRQ ACK %02x?\n",data);
280         //  printf("IRQ ACK %02x?\n",data);
281281         return;
282282   }
283283
trunk/src/mame/drivers/apple2e.c
r249924r249925
11531153
11541154      case 0x50:  // graphics mode
11551155         machine().first_screen()->update_now();
1156         m_video->m_graphics = true;
1156         m_video->m_graphics = true;
11571157         break;
11581158
11591159      case 0x51:  // text mode
11601160         machine().first_screen()->update_now();
1161         m_video->m_graphics = false;
1161         m_video->m_graphics = false;
11621162         break;
11631163
11641164      case 0x52:  // no mix
11651165         machine().first_screen()->update_now();
1166         m_video->m_mix = false;
1166         m_video->m_mix = false;
11671167         break;
11681168
11691169      case 0x53:  // mixed mode
11701170         machine().first_screen()->update_now();
1171         m_video->m_mix = true;
1171         m_video->m_mix = true;
11721172         break;
11731173
11741174      case 0x54:  // set page 1
trunk/src/mame/drivers/aristmk5.c
r249924r249925
522522
523523
524524static MACHINE_CONFIG_START( aristmk5, aristmk5_state )
525   MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6)   // 12000000
525   MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6)    // 12000000
526526   MCFG_CPU_PROGRAM_MAP(aristmk5_drame_map)
527527   MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2))  /* 1.6 - 2 seconds */
528528
r249924r249925
568568MACHINE_CONFIG_END
569569
570570static MACHINE_CONFIG_START( aristmk5_usa, aristmk5_state )
571   MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6)   // 12000000
571   MCFG_CPU_ADD("maincpu", ARM, MASTER_CLOCK/6)    // 12000000
572572   MCFG_CPU_PROGRAM_MAP(aristmk5_map)
573573   MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2))  /* 1.6 - 2 seconds */
574574
r249924r249925
815815
816816   ROM_REGION( 0x100, "eeproms", 0 )
817817   ROM_LOAD( "st93c46.u27", 0x0000, 0x0080, CRC(115c305a) SHA1(684a70d74ec92564e17c4292cd357e603842c485) )
818   ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) )   // blank... all 0xff's
818   ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) ) // blank... all 0xff's
819819
820820   ROM_REGION( 0x0005, "plds", 0 )
821821   ROM_LOAD( "gal20v8b.u22", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */
r249924r249925
982982ROM_START( bumblbug )
983983   ARISTOCRAT_MK5_BIOS
984984   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
985   ROM_LOAD32_WORD( "bumble_bugs_export.u7",  0x000000, 0x80000, CRC(ec605a36) SHA1(114e0840cfbd0c64645a5a33065db85462a0ba2d) )   // 92.691%
986   ROM_LOAD32_WORD( "bumble_bugs_export.u11", 0x000002, 0x80000, CRC(17b154bd) SHA1(efdf307670a3d74f7980fec2d2197d837d4c26e2) )   // 92.691%
987   ROM_LOAD32_WORD( "bumble_bugs_export.u8",  0x100000, 0x80000, CRC(e0c01d01) SHA1(9153129fd348a97da7cccf002e5d03e4b4db9264) )   // base
988   ROM_LOAD32_WORD( "bumble_bugs_export.u12", 0x100002, 0x80000, CRC(28700d5d) SHA1(87a583cd487da6cb4c2da5f62297f0e577269fae) )   // base
985   ROM_LOAD32_WORD( "bumble_bugs_export.u7",  0x000000, 0x80000, CRC(ec605a36) SHA1(114e0840cfbd0c64645a5a33065db85462a0ba2d) )    // 92.691%
986   ROM_LOAD32_WORD( "bumble_bugs_export.u11", 0x000002, 0x80000, CRC(17b154bd) SHA1(efdf307670a3d74f7980fec2d2197d837d4c26e2) )    // 92.691%
987   ROM_LOAD32_WORD( "bumble_bugs_export.u8",  0x100000, 0x80000, CRC(e0c01d01) SHA1(9153129fd348a97da7cccf002e5d03e4b4db9264) )    // base
988   ROM_LOAD32_WORD( "bumble_bugs_export.u12", 0x100002, 0x80000, CRC(28700d5d) SHA1(87a583cd487da6cb4c2da5f62297f0e577269fae) )    // base
989989
990990   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
991991
r249924r249925
995995ROM_END
996996
997997// 586/7(b) - 10 Credit Multiplier / 9 Line Multiline.
998// Penguin Pays - Export B - 14/07/97.       
998// Penguin Pays - Export B - 14/07/97.
999999// All devices are 27c4002 instead of 27c4096.
10001000ROM_START( pengpays )
10011001   ARISTOCRAT_MK5_BIOS
r249924r249925
10181018// Marked as GHG1012 and 92.767%
10191019ROM_START( bootsctn )
10201020   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
1021   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u7",  0x000000, 0x80000, CRC(ca26f31e) SHA1(e8da31cc8d12bf8a28f1ca4d796259ae9010f8af) )   // 92.767%
1022   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u11", 0x000002, 0x80000, CRC(61da1767) SHA1(83d4df1060975f03f291b9119c0d2b8debb0fb60) )   // 92.767%
1023   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u8",  0x100000, 0x80000, CRC(9ae4d616) SHA1(60d4d36f75685dfe21f914fa4682cd6a64fcfa58) )   // base
1024   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u12", 0x100002, 0x80000, CRC(2c50c083) SHA1(ae3b01200d152df9b2966b5308c71e9d1ad43d78) )   // base
1025   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u9",  0x200000, 0x80000, CRC(c0a4920d) SHA1(d2c6d259d2e067b6e5ad72a6ef164aac7d72bc5a) )   // base
1026   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u13", 0x200002, 0x80000, CRC(55716d82) SHA1(5b9982a49201842e9551a9c763a6babbb47a863e) )   // base
1027   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u10", 0x300000, 0x80000, CRC(3ecdf7ee) SHA1(9d658a22da737daafdf6cb0d49009796036d04b1) )   // base
1028   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u14", 0x300002, 0x80000, CRC(18934c51) SHA1(f7c9c95c687dbfe89747e7877157fde37bc1119e) )   // base
1021   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u7",  0x000000, 0x80000, CRC(ca26f31e) SHA1(e8da31cc8d12bf8a28f1ca4d796259ae9010f8af) )  // 92.767%
1022   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u11", 0x000002, 0x80000, CRC(61da1767) SHA1(83d4df1060975f03f291b9119c0d2b8debb0fb60) )  // 92.767%
1023   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u8",  0x100000, 0x80000, CRC(9ae4d616) SHA1(60d4d36f75685dfe21f914fa4682cd6a64fcfa58) )  // base
1024   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u12", 0x100002, 0x80000, CRC(2c50c083) SHA1(ae3b01200d152df9b2966b5308c71e9d1ad43d78) )  // base
1025   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u9",  0x200000, 0x80000, CRC(c0a4920d) SHA1(d2c6d259d2e067b6e5ad72a6ef164aac7d72bc5a) )  // base
1026   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u13", 0x200002, 0x80000, CRC(55716d82) SHA1(5b9982a49201842e9551a9c763a6babbb47a863e) )  // base
1027   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u10", 0x300000, 0x80000, CRC(3ecdf7ee) SHA1(9d658a22da737daafdf6cb0d49009796036d04b1) )  // base
1028   ROM_LOAD32_WORD( "ghg1012_boot_scootin.u14", 0x300002, 0x80000, CRC(18934c51) SHA1(f7c9c95c687dbfe89747e7877157fde37bc1119e) )  // base
10291029
10301030   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
10311031
r249924r249925
10341034   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
10351035ROM_END
10361036
1037// MV4104  3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline.
1037// MV4104  3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline.
10381038// CUCKOO - Export C - 02/02/00.
10391039// All devices are 27c4002 instead of 27c4096.
10401040ROM_START( cuckoo )
10411041   ARISTOCRAT_MK5_BIOS
10421042   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
1043   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) )   //
1043   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) ) //
10441044   ROM_LOAD32_WORD( "mv4104_cuckoo.u11", 0x000002, 0x80000, CRC(4c407deb) SHA1(57589e61a376ddff99cd420eb47bf8c902c6a249) )
10451045   ROM_LOAD32_WORD( "mv4104_cuckoo.u8",  0x100000, 0x80000, CRC(33f52052) SHA1(89cbfe588d91244adff4c520fa94962d69ff20bf) )
10461046   ROM_LOAD32_WORD( "mv4104_cuckoo.u12", 0x100002, 0x80000, CRC(00bb7597) SHA1(f4d6b21091e320a82d59477469340633b001ed0d) )
r249924r249925
10531053ROM_END
10541054
10551055// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
1056// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1056// Magic Mask [Reel Game] - Export A - 09/05/2000.
10571057ROM_START( magicmsk )
10581058   ARISTOCRAT_MK5_BIOS
10591059   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
r249924r249925
10701070ROM_END
10711071
10721072// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
1073// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1073// Magic Mask [Reel Game] - Export A - 09/05/2000.
10741074// Alternate set with identical description, but way different
10751075// than the parent. All devices are 27c4002 instead of 27c4096.
10761076//
r249924r249925
11681168GAME( 2001, geishanz,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Geisha (0101408V, New Zealand)",               MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4127,   A - 05/03/01
11691169GAME( 2001, adonise,   aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Adonis (MV4124/1, Export)",                    MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4124/1, B - 31/07/01
11701170GAME( 2001, partygrs,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Party Gras (MV4115/6, Export)",                MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4115/6, A - 10/11/01
1171
trunk/src/mame/drivers/beathead.c
r249924r249925
120120   int scanline = param;
121121
122122   /* update the video */
123//   m_screen->update_now();
123//  m_screen->update_now();
124124   m_screen->update_partial(m_screen->vpos());
125125
126126   /* on scanline zero, clear any halt condition */
trunk/src/mame/drivers/bublbobl.c
r249924r249925
265265- tokio: sound support is probably incomplete. There are a couple of unknown
266266  accesses done by the CPU, including to the YM2203 I/O ports. At the
267267  very least, there should be some filters.
268
268
269269 there are also Bubble Bobble bootlegs with a P8749H MCU, however the MCU
270270 is protected against reading and the main code only differs by 1 byte from
271271 Bubble Bobble.  If the MCU were to be dumped that would also make for
r249924r249925
16461646   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
16471647
16481648   ROM_REGION( 0x0100, "proms", 0 )
1649   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1649   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
16501650ROM_END
16511651
16521652
r249924r249925
17171717   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
17181718
17191719   ROM_REGION( 0x0100, "proms", 0 )
1720   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1720   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
17211721ROM_END
17221722
17231723ROM_START( bublcave10 )
r249924r249925
17491749   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
17501750
17511751   ROM_REGION( 0x0100, "proms", 0 )
1752   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1752   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
17531753ROM_END
17541754
17551755ROM_START( bublboblb )
r249924r249925
18741874
18751875GAME( 2012, bublcave11, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.1", MACHINE_SUPPORTS_SAVE )
18761876GAME( 2012, bublcave10, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.0", MACHINE_SUPPORTS_SAVE )
1877
1878
trunk/src/mame/drivers/by17.c
r249924r249925
9191   UINT8 m_segment[6];
9292   UINT8 m_lamp_decode;
9393   UINT8 m_solenoid_features[20][4];
94   UINT8 m_io_hold_x[5];      // Used to hold switches closed (drop targets, balls in outholes/saucers etc). Solenoid activity release them.
94   UINT8 m_io_hold_x[5];       // Used to hold switches closed (drop targets, balls in outholes/saucers etc). Solenoid activity release them.
9595   required_device<m6800_cpu_device> m_maincpu;
9696   required_shared_ptr<UINT8> m_nvram;
9797   required_device<pia6821_device> m_pia_u10;
r249924r249925
125125   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity")  PORT_CHANGED_MEMBER(DEVICE_SELF, by17_state, activity_button, NULL)
126126
127127   PORT_START("DSW0")
128   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1")            PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03
128   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1")                PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03
129129   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ))
130130   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
131131   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
r249924r249925
157157   PORT_DIPSETTING(    0x1d, "2 Coins/14 Credits")
158158   PORT_DIPSETTING(    0x1e, "1 Coin/15 Credits")
159159   PORT_DIPSETTING(    0x1f, "2 Coins/15 Credits")
160   PORT_DIPNAME( 0x20, 0x20, "Score Level Award")         PORT_DIPLOCATION("SW0:!6")
160   PORT_DIPNAME( 0x20, 0x20, "Score Level Award")          PORT_DIPLOCATION("SW0:!6")
161161   PORT_DIPSETTING(    0x00, "Extra Ball")
162162   PORT_DIPSETTING(    0x20, "Replay")
163   PORT_DIPNAME( 0x40, 0x00, "S07")                  PORT_DIPLOCATION("SW0:!7")
163   PORT_DIPNAME( 0x40, 0x00, "S07")                        PORT_DIPLOCATION("SW0:!7")
164164   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
165165   PORT_DIPSETTING(    0x40, DEF_STR( On ))
166   PORT_DIPNAME( 0x80, 0x80, "Play Melodies")            PORT_DIPLOCATION("SW0:!8")
166   PORT_DIPNAME( 0x80, 0x80, "Play Melodies")              PORT_DIPLOCATION("SW0:!8")
167167   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
168168   PORT_DIPSETTING(    0x80, DEF_STR( On ))
169169
170170   PORT_START("DSW1")
171   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3")            PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01
171   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3")                PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01
172172   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ))
173173   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
174174   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
r249924r249925
200200   PORT_DIPSETTING(    0x1d, "2 Coins/14 Credits")
201201   PORT_DIPSETTING(    0x1e, "1 Coin/15 Credits")
202202   PORT_DIPSETTING(    0x1f, "2 Coins/15 Credits")
203   PORT_DIPNAME( 0x20, 0x00, "S14")                        PORT_DIPLOCATION("SW1:!6")
203   PORT_DIPNAME( 0x20, 0x00, "S14")                                PORT_DIPLOCATION("SW1:!6")
204204   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
205205   PORT_DIPSETTING(    0x20, DEF_STR( On ))
206   PORT_DIPNAME( 0x40, 0x40, "Award for Beating Highest Score")   PORT_DIPLOCATION("SW1:!7")
206   PORT_DIPNAME( 0x40, 0x40, "Award for Beating Highest Score")    PORT_DIPLOCATION("SW1:!7")
207207   PORT_DIPSETTING(    0x00, "Novelty")
208208   PORT_DIPSETTING(    0x40, "3 Credits")
209   PORT_DIPNAME( 0x80, 0x80, "Balls per Game")                  PORT_DIPLOCATION("SW1:!8")
209   PORT_DIPNAME( 0x80, 0x80, "Balls per Game")                     PORT_DIPLOCATION("SW1:!8")
210210   PORT_DIPSETTING(    0x00, "3")
211211   PORT_DIPSETTING(    0x80, "5")
212212
213213   PORT_START("DSW2")
214   PORT_DIPNAME( 0x07, 0x01, "Maximum Credits")      PORT_DIPLOCATION("SW2:!1,!2,!3")
214   PORT_DIPNAME( 0x07, 0x01, "Maximum Credits")        PORT_DIPLOCATION("SW2:!1,!2,!3")
215215   PORT_DIPSETTING(    0x00, "5")
216216   PORT_DIPSETTING(    0x01, "10")
217217   PORT_DIPSETTING(    0x02, "15")
r249924r249925
220220   PORT_DIPSETTING(    0x05, "30")
221221   PORT_DIPSETTING(    0x06, "35")
222222   PORT_DIPSETTING(    0x07, "40")
223   PORT_DIPNAME( 0x08, 0x08, "Credits Displayed")      PORT_DIPLOCATION("SW2:!4")
223   PORT_DIPNAME( 0x08, 0x08, "Credits Displayed")      PORT_DIPLOCATION("SW2:!4")
224224   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
225225   PORT_DIPSETTING(    0x08, DEF_STR( On ))
226226   PORT_DIPNAME( 0x10, 0x10, "Match")
227   PORT_DIPSETTING(    0x00, DEF_STR( Off ))         PORT_DIPLOCATION("SW2:!5")
227   PORT_DIPSETTING(    0x00, DEF_STR( Off ))           PORT_DIPLOCATION("SW2:!5")
228228   PORT_DIPSETTING(    0x10, DEF_STR( On ))
229229   // from here, game-specific options
230   PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)")   PORT_DIPLOCATION("SW2:!6")
230   PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)")    PORT_DIPLOCATION("SW2:!6")
231231   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
232232   PORT_DIPSETTING(    0x20, DEF_STR( On ))
233   PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)")   PORT_DIPLOCATION("SW2:!7")
233   PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)")    PORT_DIPLOCATION("SW2:!7")
234234   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
235235   PORT_DIPSETTING(    0x40, DEF_STR( On ))
236   PORT_DIPNAME( 0x80, 0x00, "No Free Balls or Games")   PORT_DIPLOCATION("SW2:!8")   // night rider
236   PORT_DIPNAME( 0x80, 0x00, "No Free Balls or Games") PORT_DIPLOCATION("SW2:!8")   // night rider
237237   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
238238   PORT_DIPSETTING(    0x80, DEF_STR( On ))
239239
240240   PORT_START("DSW3")
241   PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2")         PORT_DIPLOCATION("SW3:!1,!2,!3,!4")
241   PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2")            PORT_DIPLOCATION("SW3:!1,!2,!3,!4")
242242   PORT_DIPSETTING(    0x00, "Same as Slot 1")
243243   PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ))
244244   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ))
r249924r249925
255255   PORT_DIPSETTING(    0x0d, "1 Coin/13 Credits")
256256   PORT_DIPSETTING(    0x0e, "1 Coin/14 Credits")
257257   PORT_DIPSETTING(    0x0f, "1 Coin/15 Credits")
258   PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)")   PORT_DIPLOCATION("SW3:!5")
258   PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)")    PORT_DIPLOCATION("SW3:!5")
259259   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
260260   PORT_DIPSETTING(    0x10, DEF_STR( On ))
261   PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)")   PORT_DIPLOCATION("SW3:!6")
261   PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)")    PORT_DIPLOCATION("SW3:!6")
262262   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
263263   PORT_DIPSETTING(    0x20, DEF_STR( On ))
264   PORT_DIPNAME( 0x40, 0x00, "Awards")               PORT_DIPLOCATION("SW3:!7") // night rider
264   PORT_DIPNAME( 0x40, 0x00, "Awards")                 PORT_DIPLOCATION("SW3:!7") // night rider
265265   PORT_DIPSETTING(    0x00, "Conservative")
266266   PORT_DIPSETTING(    0x40, "Liberal")
267   PORT_DIPNAME( 0x80, 0x00, "Lane Adjustment")      PORT_DIPLOCATION("SW3:!8") // night rider
267   PORT_DIPNAME( 0x80, 0x00, "Lane Adjustment")        PORT_DIPLOCATION("SW3:!8") // night rider
268268   PORT_DIPSETTING(    0x00, "Conservative")
269269   PORT_DIPSETTING(    0x80, "Liberal")
270270
r249924r249925
278278   // standard
279279   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
280280   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
281//   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
282   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, outhole_x0, (void *)0x07)   //  PORT_CODE(KEYCODE_BACKSPACE)
281//  PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
282   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, outhole_x0, (void *)0x07)  //  PORT_CODE(KEYCODE_BACKSPACE)
283283
284284   PORT_START("X1")
285285   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
r249924r249925
327327   PORT_INCLUDE( by17 )
328328
329329   PORT_MODIFY("DSW0")
330   PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score")      PORT_DIPLOCATION("SW0:!6,!7")
330   PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score")        PORT_DIPLOCATION("SW0:!6,!7")
331331   PORT_DIPSETTING(    0x00, "Nothing")
332332   PORT_DIPSETTING(    0x20, "1 Credit")
333333   PORT_DIPSETTING(    0x40, "2 Credits")
334334   PORT_DIPSETTING(    0x60, "3 Credits")
335335
336336   PORT_MODIFY("DSW1")
337   PORT_DIPNAME( 0x40, 0x00, "S15")                           PORT_DIPLOCATION("SW1:!7")
337   PORT_DIPNAME( 0x40, 0x00, "S15")                                    PORT_DIPLOCATION("SW1:!7")
338338   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
339339   PORT_DIPSETTING(    0x40, DEF_STR( On ))
340340
341341   PORT_MODIFY("DSW2")
342   PORT_DIPNAME( 0x20, 0x00, "S22")                           PORT_DIPLOCATION("SW2:!6")
342   PORT_DIPNAME( 0x20, 0x00, "S22")                                    PORT_DIPLOCATION("SW2:!6")
343343   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
344344   PORT_DIPSETTING(    0x20, DEF_STR( On ))
345   PORT_DIPNAME( 0x40, 0x00, "Saucer Award Feature")               PORT_DIPLOCATION("SW2:!7")
345   PORT_DIPNAME( 0x40, 0x00, "Saucer Award Feature")                   PORT_DIPLOCATION("SW2:!7")
346346   PORT_DIPSETTING(    0x00, "Start at 3000 Points")
347347   PORT_DIPSETTING(    0x40, "Start at 2X Bonus")
348   PORT_DIPNAME( 0x80, 0x00, "A & B Special Award Feature Per Ball")   PORT_DIPLOCATION("SW2:!8")
348   PORT_DIPNAME( 0x80, 0x00, "A & B Special Award Feature Per Ball")   PORT_DIPLOCATION("SW2:!8")
349349   PORT_DIPSETTING(    0x00, "Award Special Once")
350350   PORT_DIPSETTING(    0x80, "Award Special Alternates")
351351
352352   PORT_MODIFY("DSW3")
353   PORT_DIPNAME( 0x10, 0x00, "S29")                           PORT_DIPLOCATION("SW3:!5")
353   PORT_DIPNAME( 0x10, 0x00, "S29")                                    PORT_DIPLOCATION("SW3:!5")
354354   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
355355   PORT_DIPSETTING(    0x10, DEF_STR( On ))
356   PORT_DIPNAME( 0x60, 0x60, "Extra Ball / Specials Award Mode")      PORT_DIPLOCATION("SW3:!6,!7")
356   PORT_DIPNAME( 0x60, 0x60, "Extra Ball / Specials Award Mode")       PORT_DIPLOCATION("SW3:!6,!7")
357357   PORT_DIPSETTING(    0x00, "Novelty / 50,000")
358//   PORT_DIPSETTING(    0x20, "")
358//  PORT_DIPSETTING(    0x20, "")
359359   PORT_DIPSETTING(    0x40, "Extra Ball / 50,000")
360360   PORT_DIPSETTING(    0x60, "Extra Ball / Replay")
361   PORT_DIPNAME( 0x80, 0x80, "Score Level Award")                  PORT_DIPLOCATION("SW3:!8")
361   PORT_DIPNAME( 0x80, 0x80, "Score Level Award")                      PORT_DIPLOCATION("SW3:!8")
362362   PORT_DIPSETTING(    0x00, "Extra Ball")
363363   PORT_DIPSETTING(    0x80, "Replay")
364364
365   PORT_MODIFY("X2")   /* Drop Target switches */
366   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20)   // PORT_CODE(KEYCODE_K)
367   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21)   // PORT_CODE(KEYCODE_J)
368   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22)   // PORT_CODE(KEYCODE_H)
369   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23)   // PORT_CODE(KEYCODE_G)
370   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24)   // PORT_CODE(KEYCODE_F)
371   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25)   // PORT_CODE(KEYCODE_D)
372   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26)   // PORT_CODE(KEYCODE_S)
373   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27)   // PORT_CODE(KEYCODE_A)
365   PORT_MODIFY("X2")   /* Drop Target switches */
366   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20)  // PORT_CODE(KEYCODE_K)
367   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21)  // PORT_CODE(KEYCODE_J)
368   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22)  // PORT_CODE(KEYCODE_H)
369   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23)  // PORT_CODE(KEYCODE_G)
370   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24)  // PORT_CODE(KEYCODE_F)
371   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25)  // PORT_CODE(KEYCODE_D)
372   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26)  // PORT_CODE(KEYCODE_S)
373   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27)  // PORT_CODE(KEYCODE_A)
374374
375375   PORT_MODIFY("X3")
376   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37)   // PORT_CODE(KEYCODE_Q)
376   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37)   // PORT_CODE(KEYCODE_Q)
377377INPUT_PORTS_END
378378
379379static INPUT_PORTS_START( pwerplay )
380380   PORT_INCLUDE( by17 )
381381
382382   PORT_MODIFY("DSW0")
383   PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score")   PORT_DIPLOCATION("SW0:!6,!7")
383   PORT_DIPNAME( 0x60, 0x60, "Award for Beating Highest Score")    PORT_DIPLOCATION("SW0:!6,!7")
384384   PORT_DIPSETTING(    0x00, "Nothing")
385385   PORT_DIPSETTING(    0x20, "1 Credit")
386386   PORT_DIPSETTING(    0x40, "2 Credits")
387387   PORT_DIPSETTING(    0x60, "3 Credits")
388388
389389   PORT_MODIFY("DSW1")
390   PORT_DIPNAME( 0x20, 0x00, "Drop Target Award Sequence")         PORT_DIPLOCATION("SW1:!6")
390   PORT_DIPNAME( 0x20, 0x00, "Drop Target Award Sequence")         PORT_DIPLOCATION("SW1:!6")
391391   PORT_DIPSETTING(    0x00, "5X then Extra Ball")
392392   PORT_DIPSETTING(    0x20, "5X and Extra Ball")
393   PORT_DIPNAME( 0x40, 0x00, "Rollover Button Score")            PORT_DIPLOCATION("SW1:!7")
393   PORT_DIPNAME( 0x40, 0x00, "Rollover Button Score")              PORT_DIPLOCATION("SW1:!7")
394394   PORT_DIPSETTING(    0x00, "Conservative - 100 Points")
395395   PORT_DIPSETTING(    0x40, "Liberal - 1,000 Points")
396396
397397   PORT_MODIFY("DSW2")
398   PORT_DIPNAME( 0x20, 0x00, "Drop Target Bank Reset")            PORT_DIPLOCATION("SW2:!6")
398   PORT_DIPNAME( 0x20, 0x00, "Drop Target Bank Reset")             PORT_DIPLOCATION("SW2:!6")
399399   PORT_DIPSETTING(    0x00, "Reset Both Banks")
400400   PORT_DIPSETTING(    0x20, "Reset Completed Bank Only")
401   PORT_DIPNAME( 0x40, 0x00, "Pop Bumper Scores")               PORT_DIPLOCATION("SW2:!7")
401   PORT_DIPNAME( 0x40, 0x00, "Pop Bumper Scores")                  PORT_DIPLOCATION("SW2:!7")
402402   PORT_DIPSETTING(    0x00, "Alternate 1,000 Points Top and Bottom")
403403   PORT_DIPSETTING(    0x40, "All score 1,000 Points When Lit")
404404
405405   PORT_MODIFY("DSW3")
406   PORT_DIPNAME( 0x30, 0x20, "Top Saucer Specials Feature")      PORT_DIPLOCATION("SW3:!5,!6")
406   PORT_DIPNAME( 0x30, 0x20, "Top Saucer Specials Feature")        PORT_DIPLOCATION("SW3:!5,!6")
407407   PORT_DIPSETTING(    0x00, "Outlane Specials do Not Light")
408//   PORT_DIPSETTING(    0x10, "")
408//  PORT_DIPSETTING(    0x10, "")
409409   PORT_DIPSETTING(    0x20, "Outlane Specials Alternate")
410410   PORT_DIPSETTING(    0x30, "Outlane Specials Both Light")
411   PORT_DIPNAME( 0xc0, 0xc0, "Award Mode")                     PORT_DIPLOCATION("SW3:!7,!8")
411   PORT_DIPNAME( 0xc0, 0xc0, "Award Mode")                         PORT_DIPLOCATION("SW3:!7,!8")
412412   PORT_DIPSETTING(    0x00, "Novelty / 50,000")
413//   PORT_DIPSETTING(    0x40, "")
413//  PORT_DIPSETTING(    0x40, "")
414414   PORT_DIPSETTING(    0x80, "Extra Ball / 50,000")
415415   PORT_DIPSETTING(    0xc0, "Extra Ball / Replay")
416416
417   PORT_MODIFY("X2")   /* Drop Target switches */
418   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20)   // PORT_CODE(KEYCODE_K)
419   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21)   // PORT_CODE(KEYCODE_J)
420   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22)   // PORT_CODE(KEYCODE_H)
421   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23)   // PORT_CODE(KEYCODE_G)
422   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24)   // PORT_CODE(KEYCODE_F)
423   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25)   // PORT_CODE(KEYCODE_D)
424   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26)   // PORT_CODE(KEYCODE_S)
425   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27)   // PORT_CODE(KEYCODE_A)
417   PORT_MODIFY("X2")   /* Drop Target switches */
418   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20)  // PORT_CODE(KEYCODE_K)
419   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21)  // PORT_CODE(KEYCODE_J)
420   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22)  // PORT_CODE(KEYCODE_H)
421   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23)  // PORT_CODE(KEYCODE_G)
422   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24)  // PORT_CODE(KEYCODE_F)
423   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25)  // PORT_CODE(KEYCODE_D)
424   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26)  // PORT_CODE(KEYCODE_S)
425   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27)  // PORT_CODE(KEYCODE_A)
426426
427427   PORT_MODIFY("X3")
428   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37)   // PORT_CODE(KEYCODE_Q)
428   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37)   // PORT_CODE(KEYCODE_Q)
429429INPUT_PORTS_END
430430
431431
r249924r249925
465465
466466   switch (bit_shift)
467467   {
468      case 0:   if (machine().input().code_pressed_once(KEYCODE_K))
468      case 0: if (machine().input().code_pressed_once(KEYCODE_K))
469469                  m_io_hold_x[port] |= (1 << bit_shift);
470470               break;
471      case 1:   if (machine().input().code_pressed_once(KEYCODE_J))
471      case 1: if (machine().input().code_pressed_once(KEYCODE_J))
472472                  m_io_hold_x[port] |= (1 << bit_shift);
473473               break;
474      case 2:   if (machine().input().code_pressed_once(KEYCODE_H))
474      case 2: if (machine().input().code_pressed_once(KEYCODE_H))
475475                  m_io_hold_x[port] |= (1 << bit_shift);
476476               break;
477      case 3:   if (machine().input().code_pressed_once(KEYCODE_G))
477      case 3: if (machine().input().code_pressed_once(KEYCODE_G))
478478                  m_io_hold_x[port] |= (1 << bit_shift);
479479               break;
480      case 4:   if (machine().input().code_pressed_once(KEYCODE_F))
480      case 4: if (machine().input().code_pressed_once(KEYCODE_F))
481481                  m_io_hold_x[port] |= (1 << bit_shift);
482482               break;
483      case 5:   if (machine().input().code_pressed_once(KEYCODE_D))
483      case 5: if (machine().input().code_pressed_once(KEYCODE_D))
484484                  m_io_hold_x[port] |= (1 << bit_shift);
485485               break;
486      case 6:   if (machine().input().code_pressed_once(KEYCODE_S))
486      case 6: if (machine().input().code_pressed_once(KEYCODE_S))
487487                  m_io_hold_x[port] |= (1 << bit_shift);
488488               break;
489      case 7:   if (machine().input().code_pressed_once(KEYCODE_A))
489      case 7: if (machine().input().code_pressed_once(KEYCODE_A))
490490                  m_io_hold_x[port] |= (1 << bit_shift);
491491               break;
492492   }
r249924r249925
526526
527527WRITE_LINE_MEMBER( by17_state::u10_ca2_w )
528528{
529#if 0               // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled
529#if 0                   // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled
530530   if (state == 0)
531531   {
532532      int digit;
r249924r249925
547547
548548WRITE_LINE_MEMBER( by17_state::u10_cb2_w )
549549{
550//   logerror("New U10 CB2 state %01x, was %01x.   PIA=%02x\n", state, m_u10_cb2, m_u10a);
550//  logerror("New U10 CB2 state %01x, was %01x.   PIA=%02x\n", state, m_u10_cb2, m_u10a);
551551
552552   if (state == TRUE)
553553      m_lamp_decode = m_u10a & 0x0f;
r249924r249925
583583
584584WRITE8_MEMBER( by17_state::u10_a_w )
585585{
586//   logerror("Writing %02x to U10 PIA, CB2 state is %01x,  CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f));
586//  logerror("Writing %02x to U10 PIA, CB2 state is %01x,  CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f));
587587
588588   if (!m_u10_ca2)
589589   {
590      if (BIT(data, 0)==0)         // Display 1
590      if (BIT(data, 0)==0)            // Display 1
591591         m_segment[1] = data>>4;
592592      else
593      if (BIT(data, 1)==0)         // Display 2
593      if (BIT(data, 1)==0)            // Display 2
594594         m_segment[2] = data>>4;
595595      else
596      if (BIT(data, 2)==0)         // Display 3
596      if (BIT(data, 2)==0)            // Display 3
597597         m_segment[3] = data>>4;
598598      else
599      if (BIT(data, 3)==0)         // Display 4
599      if (BIT(data, 3)==0)            // Display 4
600600         m_segment[4] = data>>4;
601601   }
602602
r249924r249925
665665
666666WRITE8_MEMBER( by17_state::u11_a_w )
667667{
668   if (BIT(data, 0)==0)         // Display Credit/Ball
668   if (BIT(data, 0)==0)            // Display Credit/Ball
669669   {
670670      m_segment[5] = m_u10a>>4;
671671   }
r249924r249925
691691   if BIT(data, 2)
692692      m_digit = 6;
693693   else
694   if (BIT(data, 2) && BIT(data, 3))   // Aftermarket 7th digit strobe for 6 digit games
694   if (BIT(data, 2) && BIT(data, 3))   // Aftermarket 7th digit strobe for 6 digit games
695695      m_digit = 7;
696696
697697   if ((m_u10_ca2==0) && m_digit)
r249924r249925
713713{
714714   if (!m_u11_cb2)
715715   {
716      if ((data & 0x0f) < 0x0f)   // Momentary Solenoids
716      if ((data & 0x0f) < 0x0f)   // Momentary Solenoids
717717      {
718718         output_set_indexed_value( "solenoid", (data & 0x0f), TRUE);
719719
720         if (m_solenoid_features[(data & 0x0f)][3])   // Reset/release relevant switch after firing Solenoid
720         if (m_solenoid_features[(data & 0x0f)][3])  // Reset/release relevant switch after firing Solenoid
721721            m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]);
722722
723         if (m_solenoid_features[(data & 0x0f)][0] != 0xff)   // Play solenoid audio sample
723         if (m_solenoid_features[(data & 0x0f)][0] != 0xff)  // Play solenoid audio sample
724724            m_samples->start(m_solenoid_features[(data & 0x0f)][0], m_solenoid_features[(data & 0x0f)][1]);
725725      }
726      else                  // Rest output - all momentary solenoids are off
726      else                        // Rest output - all momentary solenoids are off
727727      {
728728         for (int i=0; i<15; i++)
729729         {
r249924r249925
747747   }
748748   if ((m_u11b & 0x20) && ((data & 0x20)==0))
749749   {
750      output_set_value("solenoid17", TRUE);               // Coin Lockout Coil engage
750      output_set_value("solenoid17", TRUE);                   // Coin Lockout Coil engage
751751      if (m_solenoid_features[17][0] != 0xff)
752752         m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]);
753753   }
754754   else if ((data & 0x20) && ((m_u11b & 0x20)==0))
755755   {
756      output_set_value("solenoid17", FALSE);               // Coin Lockout Coil release
756      output_set_value("solenoid17", FALSE);                  // Coin Lockout Coil release
757757      if (m_solenoid_features[17][0] != 0xff)
758758         m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]);
759759   }
760760   if ((m_u11b & 0x40) && ((data & 0x40)==0))
761761   {
762      output_set_value("solenoid18", TRUE);               // Flipper Enable Relay engage
762      output_set_value("solenoid18", TRUE);                   // Flipper Enable Relay engage
763763      if (m_solenoid_features[18][0] != 0xff)
764764         m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]);
765765   }
766766   else if ((data & 0x40) && ((m_u11b & 0x40)==0))
767767   {
768      output_set_value("solenoid18", FALSE);               // Flipper Enable Relay release
768      output_set_value("solenoid18", FALSE);                  // Flipper Enable Relay release
769769      if (m_solenoid_features[18][0] != 0xff)
770770         m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]);
771771   }
r249924r249925
789789// zero-cross detection
790790TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
791791{
792
793792/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
794793
795   -+                          +---+
794    -+                          +---+
796795     |                          |   |
797796     |<-------- 9.30ms -------->|<->|700us
798797     |                          |   |
799    +--------------------------+   +-----
798    +--------------------------+   +-----
800799*/
801800
802801   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249924r249925
825824// 555 timer for display refresh
826825TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer )
827826{
828
829827/*   +--------------------------+   +-----
830828     |                          |   |
831829     |<-------- 2.85ms -------->|<->|300us
r249924r249925
851849
852850DRIVER_INIT_MEMBER( by17_state, by17 )
853851{
854
855852   static const UINT8 solenoid_features_default[20][4] =
856853   {
857854   // This table serves two functions and is configured on a per game basis:
r249924r249925
860857
861858   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
862859   /*00*/  { 0x00, 0x00,  0x00, 0x00 },
863   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
864   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
865   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
866   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
867   /*05*/  { 0x04, 0x00,  0x00, 0x00 },      // Knocker
868   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
860   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
861   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
862   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
863   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
864   /*05*/  { 0x04, 0x00,  0x00, 0x00 },        // Knocker
865   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
869866   /*07*/  { 0x00, 0x00,  0x00, 0x00 },
870867   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
871868   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249924r249925
874871   /*12*/  { 0x00, 0x00,  0x00, 0x00 },
875872   /*13*/  { 0x02, 0x00,  0x00, 0x00 },
876873   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
877   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
874   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
878875   //  { Sound Channel, Sound engage, Sound release, Not Used }
879876   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
880   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
881   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
877   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
878   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
882879   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
883880   };
884881
r249924r249925
892889
893890DRIVER_INIT_MEMBER( by17_state, matahari )
894891{
895
896892   static const UINT8 solenoid_features_matahari[20][4] =
897893   {
898894   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
899   /*00*/  { 0x02, 0x05,  0x03, 0x7f },      // Saucer
900   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
901   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
902   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
903   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
904   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
905   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
906   /*07*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left Bottom
907   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left Top
908   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right Top
909   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right Bottom
910   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
911   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },      // Drop Target Reset Left
912   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
913   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },      // Drop Target Reset Right
914   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
895   /*00*/  { 0x02, 0x05,  0x03, 0x7f },        // Saucer
896   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
897   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
898   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
899   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
900   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
901   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
902   /*07*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left Bottom
903   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left Top
904   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right Top
905   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right Bottom
906   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
907   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },        // Drop Target Reset Left
908   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
909   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },        // Drop Target Reset Right
910   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
915911   //  { Sound Channel, Sound engage, Sound release, Not Used }
916912   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
917   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
918   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
913   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
914   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
919915   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
920916   };
921917
r249924r249925
929925
930926DRIVER_INIT_MEMBER( by17_state, pwerplay )
931927{
932
933928   static const UINT8 solenoid_features_pwerplay[20][4] =
934929   {
935930   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
936   /*00*/  { 0x00, 0x10,  0x00, 0x00 },      // Post Down
937   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
938   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
939   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
940   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
941   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
942   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
943   /*07*/  { 0x02, 0x05,  0x03, 0x7f },      // Saucer
944   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left
945   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right
946   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Bottom
947   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
948   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },      // Drop Target Reset Left
949   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
950   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },      // Drop Target Reset Right
951   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
931   /*00*/  { 0x00, 0x10,  0x00, 0x00 },        // Post Down
932   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
933   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
934   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
935   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
936   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
937   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
938   /*07*/  { 0x02, 0x05,  0x03, 0x7f },        // Saucer
939   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left
940   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right
941   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Bottom
942   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
943   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },        // Drop Target Reset Left
944   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
945   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },        // Drop Target Reset Right
946   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
952947   //  { Sound Channel, Sound engage, Sound release, Not Used }
953   /*16*/  { 0x00, 0x11, 0x0f,  0x00 },      // Post Up
954   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
955   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
948   /*16*/  { 0x00, 0x11, 0x0f,  0x00 },        // Post Up
949   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
950   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
956951   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
957952   };
958953
r249924r249925
977972   m_u11a = 0;
978973   m_u11b = 0;
979974   m_lamp_decode = 0x0f;
980   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
975   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
981976   m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = 0;
982977}
983978
r249924r249925
985980
986981static MACHINE_CONFIG_START( by17, by17_state )
987982   /* basic machine hardware */
988   MCFG_CPU_ADD("maincpu", M6800, 530000)   // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
983   MCFG_CPU_ADD("maincpu", M6800, 530000)  // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
989984   MCFG_CPU_PROGRAM_MAP(by17_map)
990985
991986   MCFG_MACHINE_RESET_OVERRIDE( by17_state, by17 )
992987
993   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
988   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
994989
995990   /* Video */
996991   MCFG_DEFAULT_LAYOUT(layout_by17)
trunk/src/mame/drivers/by35.c
r249924r249925
173173
174174
175175static ADDRESS_MAP_START( by35_map, AS_PROGRAM, 8, by35_state )
176   ADDRESS_MAP_GLOBAL_MASK(0x7fff)      // A15 is not connected
176   ADDRESS_MAP_GLOBAL_MASK(0x7fff)     // A15 is not connected
177177   AM_RANGE(0x0000, 0x007f) AM_RAM
178178   AM_RANGE(0x0088, 0x008b) AM_DEVREADWRITE("pia_u10", pia6821_device, read, write)
179179   AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia_u11", pia6821_device, read, write)
r249924r249925
182182ADDRESS_MAP_END
183183
184184static ADDRESS_MAP_START( nuovo_map, AS_PROGRAM, 8, by35_state )
185//   AM_RANGE(0x0000, 0x007f) AM_RAM    // Schematics infer that the M6802 internal RAM is disabled.
185//  AM_RANGE(0x0000, 0x007f) AM_RAM     // Schematics infer that the M6802 internal RAM is disabled.
186186   AM_RANGE(0x0088, 0x008b) AM_DEVREADWRITE("pia_u10", pia6821_device, read, write)
187187   AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia_u11", pia6821_device, read, write)
188188   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
r249924r249925
197197   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Activity")  PORT_CHANGED_MEMBER(DEVICE_SELF, by35_state, activity_button, 0)
198198
199199   PORT_START("DSW0")
200   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1")         PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03
200   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 1")            PORT_DIPLOCATION("SW0:!1,!2,!3,!4,!5") // same as 03
201201   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ))
202202   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
203203   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
r249924r249925
229229   PORT_DIPSETTING(    0x1d, "2 Coins/14 Credits")
230230   PORT_DIPSETTING(    0x1e, "1 Coin/15 Credits")
231231   PORT_DIPSETTING(    0x1f, "2 Coins/15 Credits")
232   PORT_DIPNAME( 0x60, 0x40, "Award for Beating Highest Score")   PORT_DIPLOCATION("SW0:!6,!7")
232   PORT_DIPNAME( 0x60, 0x40, "Award for Beating Highest Score")    PORT_DIPLOCATION("SW0:!6,!7")
233233   PORT_DIPSETTING(    0x00, "Nothing")
234234   PORT_DIPSETTING(    0x20, "1 Credit")
235235   PORT_DIPSETTING(    0x40, "2 Credits")
236236   PORT_DIPSETTING(    0x60, "3 Credits")
237   PORT_DIPNAME( 0x80, 0x80, "Melody Option 1")               PORT_DIPLOCATION("SW0:!8")
237   PORT_DIPNAME( 0x80, 0x80, "Melody Option 1")                    PORT_DIPLOCATION("SW0:!8")
238238   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
239239   PORT_DIPSETTING(    0x80, DEF_STR( On ))
240240
241241   PORT_START("DSW1")
242   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3")         PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01
242   PORT_DIPNAME( 0x1f, 0x02, "Coin Slot 3")            PORT_DIPLOCATION("SW1:!1,!2,!3,!4,!5") // same as 01
243243   PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ))
244244   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ))
245245   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ))
r249924r249925
271271   PORT_DIPSETTING(    0x1d, "2 Coins/14 Credits")
272272   PORT_DIPSETTING(    0x1e, "1 Coin/15 Credits")
273273   PORT_DIPSETTING(    0x1f, "2 Coins/15 Credits")
274   PORT_DIPNAME( 0x60, 0x60, "Score Level Award")      PORT_DIPLOCATION("SW1:!6,!7")
274   PORT_DIPNAME( 0x60, 0x60, "Score Level Award")      PORT_DIPLOCATION("SW1:!6,!7")
275275   PORT_DIPSETTING(    0x00, "Nothing")
276276   PORT_DIPSETTING(    0x40, "Extra Ball")
277277   PORT_DIPSETTING(    0x60, "Replay")
278   PORT_DIPNAME( 0x80, 0x80, "Balls Per Game")         PORT_DIPLOCATION("SW1:!8")
278   PORT_DIPNAME( 0x80, 0x80, "Balls Per Game")         PORT_DIPLOCATION("SW1:!8")
279279   PORT_DIPSETTING(    0x00, "3")
280280   PORT_DIPSETTING(    0x80, "5")
281281
282282   PORT_START("DSW2")
283   PORT_DIPNAME( 0x07, 0x01, "Maximum Credits")      PORT_DIPLOCATION("SW2:!1,!2,!3")
283   PORT_DIPNAME( 0x07, 0x01, "Maximum Credits")        PORT_DIPLOCATION("SW2:!1,!2,!3")
284284   PORT_DIPSETTING(    0x00, "5")
285285   PORT_DIPSETTING(    0x01, "10")
286286   PORT_DIPSETTING(    0x02, "15")
r249924r249925
289289   PORT_DIPSETTING(    0x05, "30")
290290   PORT_DIPSETTING(    0x06, "35")
291291   PORT_DIPSETTING(    0x07, "40")
292   PORT_DIPNAME( 0x08, 0x08, "Credits Displayed")      PORT_DIPLOCATION("SW2:!4")
292   PORT_DIPNAME( 0x08, 0x08, "Credits Displayed")      PORT_DIPLOCATION("SW2:!4")
293293   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
294294   PORT_DIPSETTING(    0x08, DEF_STR( On ))
295   PORT_DIPNAME( 0x10, 0x10, "Match Feature")         PORT_DIPLOCATION("SW2:!5")
295   PORT_DIPNAME( 0x10, 0x10, "Match Feature")          PORT_DIPLOCATION("SW2:!5")
296296   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
297297   PORT_DIPSETTING(    0x10, DEF_STR( On ))
298   PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)")   PORT_DIPLOCATION("SW2:!6")
298   PORT_DIPNAME( 0x20, 0x00, "S22 (game specific)")    PORT_DIPLOCATION("SW2:!6")
299299   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
300300   PORT_DIPSETTING(    0x20, DEF_STR( On ))
301   PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)")   PORT_DIPLOCATION("SW2:!7")
301   PORT_DIPNAME( 0x40, 0x00, "S23 (game specific)")    PORT_DIPLOCATION("SW2:!7")
302302   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
303303   PORT_DIPSETTING(    0x40, DEF_STR( On ))
304   PORT_DIPNAME( 0x80, 0x00, "S24 (game specific)")   PORT_DIPLOCATION("SW2:!8")
304   PORT_DIPNAME( 0x80, 0x00, "S24 (game specific)")    PORT_DIPLOCATION("SW2:!8")
305305   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
306306   PORT_DIPSETTING(    0x80, DEF_STR( On ))
307307
308308   PORT_START("DSW3")
309   PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2")         PORT_DIPLOCATION("SW3:!1,!2,!3,!4")
309   PORT_DIPNAME( 0x0f, 0x00, "Coin Slot 2")            PORT_DIPLOCATION("SW3:!1,!2,!3,!4")
310310   PORT_DIPSETTING(    0x00, "Same as Slot 1")
311311   PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ))
312312   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ))
r249924r249925
323323   PORT_DIPSETTING(    0x0d, "1 Coin/13 Credits")
324324   PORT_DIPSETTING(    0x0e, "1 Coin/14 Credits")
325325   PORT_DIPSETTING(    0x0f, "1 Coin/15 Credits")
326   PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)")   PORT_DIPLOCATION("SW3:!5")
326   PORT_DIPNAME( 0x10, 0x00, "S29 (game specific)")    PORT_DIPLOCATION("SW3:!5")
327327   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
328328   PORT_DIPSETTING(    0x10, DEF_STR( On ))
329   PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)")   PORT_DIPLOCATION("SW3:!6")
329   PORT_DIPNAME( 0x20, 0x00, "S30 (game specific)")    PORT_DIPLOCATION("SW3:!6")
330330   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
331331   PORT_DIPSETTING(    0x20, DEF_STR( On ))
332   PORT_DIPNAME( 0x40, 0x00, "S31 (game specific)")   PORT_DIPLOCATION("SW3:!7")
332   PORT_DIPNAME( 0x40, 0x00, "S31 (game specific)")    PORT_DIPLOCATION("SW3:!7")
333333   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
334334   PORT_DIPSETTING(    0x40, DEF_STR( On ))
335   PORT_DIPNAME( 0x80, 0x80, "Melody Option 2")      PORT_DIPLOCATION("SW3:!8")
335   PORT_DIPNAME( 0x80, 0x80, "Melody Option 2")        PORT_DIPLOCATION("SW3:!8")
336336   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
337337   PORT_DIPSETTING(    0x80, DEF_STR( On ))
338338
r249924r249925
344344   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH)
345345   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
346346   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
347//   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
347//  PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
348348   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
349349
350350   PORT_START("X1")
r249924r249925
392392   PORT_INCLUDE( by35 )
393393
394394   PORT_MODIFY("DSW2")
395   PORT_DIPNAME( 0x20, 0x00, "Drop Target Special")      PORT_DIPLOCATION("SW2:!6")
395   PORT_DIPNAME( 0x20, 0x00, "Drop Target Special")        PORT_DIPLOCATION("SW2:!6")
396396   PORT_DIPSETTING(    0x00, "Lit Until Next Ball")
397397   PORT_DIPSETTING(    0x20, "Lit Until Collected")
398   PORT_DIPNAME( 0x40, 0x00, "Playmate Keys")            PORT_DIPLOCATION("SW2:!7")
398   PORT_DIPNAME( 0x40, 0x00, "Playmate Keys")              PORT_DIPLOCATION("SW2:!7")
399399   PORT_DIPSETTING(    0x00, "Reset At Next Ball")
400400   PORT_DIPSETTING(    0x40, "Remembered Next Ball")
401   PORT_DIPNAME( 0x80, 0x00, "25000 Outlanes")            PORT_DIPLOCATION("SW2:!8")
401   PORT_DIPNAME( 0x80, 0x00, "25000 Outlanes")             PORT_DIPLOCATION("SW2:!8")
402402   PORT_DIPSETTING(    0x00, "Alternate")
403403   PORT_DIPSETTING(    0x80, "Both")
404404
405405   PORT_MODIFY("DSW3")
406   PORT_DIPNAME( 0x10, 0x00, "2 and 3 Key Lanes")         PORT_DIPLOCATION("SW3:!5")
406   PORT_DIPNAME( 0x10, 0x00, "2 and 3 Key Lanes")          PORT_DIPLOCATION("SW3:!5")
407407   PORT_DIPSETTING(    0x00, "Separate")
408408   PORT_DIPSETTING(    0x10, "Tied Together")
409   PORT_DIPNAME( 0x20, 0x00, "1 and 4 Key Lanes")         PORT_DIPLOCATION("SW3:!6")
409   PORT_DIPNAME( 0x20, 0x00, "1 and 4 Key Lanes")          PORT_DIPLOCATION("SW3:!6")
410410   PORT_DIPSETTING(    0x00, "Separate")
411411   PORT_DIPSETTING(    0x20, "Tied Together")
412   PORT_DIPNAME( 0x40, 0x00, "Rollover Button Award")      PORT_DIPLOCATION("SW3:!7")
412   PORT_DIPNAME( 0x40, 0x00, "Rollover Button Award")      PORT_DIPLOCATION("SW3:!7")
413413   PORT_DIPSETTING(    0x00, "Extra Ball or Special Reset At Next Ball")
414414   PORT_DIPSETTING(    0x40, "Extra Ball or Special Held Until Collected")
415415
416   PORT_MODIFY("X0")   /* Drop Target switches */
416   PORT_MODIFY("X0")   /* Drop Target switches */
417417   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP)
418418   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH)
419419   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE)
r249924r249925
463463
464464   switch (bit_shift)
465465   {
466      case 0:   if (machine().input().code_pressed_once(KEYCODE_STOP))
466      case 0: if (machine().input().code_pressed_once(KEYCODE_STOP))
467467                  m_io_hold_x[port] |= (1 << bit_shift);
468468               break;
469      case 1:   if (machine().input().code_pressed_once(KEYCODE_SLASH))
469      case 1: if (machine().input().code_pressed_once(KEYCODE_SLASH))
470470                  m_io_hold_x[port] |= (1 << bit_shift);
471471               break;
472      case 2:   if (machine().input().code_pressed_once(KEYCODE_OPENBRACE))
472      case 2: if (machine().input().code_pressed_once(KEYCODE_OPENBRACE))
473473                  m_io_hold_x[port] |= (1 << bit_shift);
474474               break;
475      case 3:   if (machine().input().code_pressed_once(KEYCODE_CLOSEBRACE))
475      case 3: if (machine().input().code_pressed_once(KEYCODE_CLOSEBRACE))
476476                  m_io_hold_x[port] |= (1 << bit_shift);
477477               break;
478      case 4:   if (machine().input().code_pressed_once(KEYCODE_BACKSLASH))
478      case 4: if (machine().input().code_pressed_once(KEYCODE_BACKSLASH))
479479                  m_io_hold_x[port] |= (1 << bit_shift);
480480               break;
481481   }
r249924r249925
514514
515515WRITE_LINE_MEMBER( by35_state::u10_ca2_w )
516516{
517#if 0               // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled
517#if 0                   // Display Blanking - Out of sync with video redraw rate and causes flicker so it's disabled
518518   if (state == 0)
519519   {
520520      int digit;
r249924r249925
535535
536536WRITE_LINE_MEMBER( by35_state::u10_cb2_w )
537537{
538//   logerror("New U10 CB2 state %01x, was %01x.   PIA=%02x\n", state, m_u10_cb2, m_u10a);
538//  logerror("New U10 CB2 state %01x, was %01x.   PIA=%02x\n", state, m_u10_cb2, m_u10a);
539539
540540   if (state == TRUE)
541541      m_lamp_decode = m_u10a & 0x0f;
r249924r249925
574574      snd_sustain_timer->adjust(attotime::from_msec(5));
575575      m_timer_as2888 = true;
576576
577      m_discrete->write(space, NODE_08, 11);   // 11 volt pulse
577      m_discrete->write(space, NODE_08, 11);  // 11 volt pulse
578578   }
579579
580580   m_u11_cb2 = state;
r249924r249925
587587
588588WRITE8_MEMBER( by35_state::u10_a_w )
589589{
590//   logerror("Writing %02x to U10 PIA, CB2 state is %01x,  CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f));
590//  logerror("Writing %02x to U10 PIA, CB2 state is %01x,  CA2 state is %01x, Lamp_Dec is %02x\n",data, m_u10_cb2, m_u10_ca2, (m_lamp_decode & 0x0f));
591591
592592   if (!m_u10_ca2)
593593   {
594      if (BIT(data, 0)==0)         // Display 1
594      if (BIT(data, 0)==0)            // Display 1
595595         m_segment[1] = data>>4;
596596      else
597      if (BIT(data, 1)==0)         // Display 2
597      if (BIT(data, 1)==0)            // Display 2
598598         m_segment[2] = data>>4;
599599      else
600      if (BIT(data, 2)==0)         // Display 3
600      if (BIT(data, 2)==0)            // Display 3
601601         m_segment[3] = data>>4;
602602      else
603      if (BIT(data, 3)==0)         // Display 4
603      if (BIT(data, 3)==0)            // Display 4
604604         m_segment[4] = data>>4;
605605   }
606606
r249924r249925
669669
670670WRITE8_MEMBER( by35_state::u11_a_w )
671671{
672   if (BIT(data, 0)==0)         // Display Credit/Ball
672   if (BIT(data, 0)==0)            // Display Credit/Ball
673673   {
674674      m_segment[5] = m_u10a>>4;
675675   }
r249924r249925
695695   if BIT(data, 2)
696696      m_digit = 6;
697697   else
698   if (BIT(data, 2) && BIT(data, 3))   // Aftermarket 7th digit strobe for 6 digit games
698   if (BIT(data, 2) && BIT(data, 3))   // Aftermarket 7th digit strobe for 6 digit games
699699      m_digit = 7;
700700   else
701701   if (BIT(data, 1) && m_7d)
r249924r249925
720720{
721721   if (!m_u11_cb2)
722722   {
723      if ((data & 0x0f) < 0x0f)   // Momentary Solenoids
723      if ((data & 0x0f) < 0x0f)   // Momentary Solenoids
724724      {
725         if (m_solenoid_features[(data & 0x0f)][0] != 0xff) {   // Play solenoid audio sample
725         if (m_solenoid_features[(data & 0x0f)][0] != 0xff) {    // Play solenoid audio sample
726726            if (output_get_indexed_value("solenoid", (data & 0x0f)) == FALSE)
727727               m_samples->start(m_solenoid_features[(data & 0x0f)][0], m_solenoid_features[(data & 0x0f)][1]);
728728         }
729729
730730         output_set_indexed_value( "solenoid", (data & 0x0f), TRUE);
731731
732         if (m_solenoid_features[(data & 0x0f)][3])   // Reset/release relevant switch after firing Solenoid
732         if (m_solenoid_features[(data & 0x0f)][3])  // Reset/release relevant switch after firing Solenoid
733733            m_io_hold_x[(m_solenoid_features[(data & 0x0f)][2])] &= (m_solenoid_features[(data & 0x0f)][3]);
734734      }
735      else                  // Rest output - all momentary solenoids are off
735      else                        // Rest output - all momentary solenoids are off
736736      {
737737         for (int i=0; i<15; i++)
738738         {
r249924r249925
756756   }
757757   if ((m_u11b & 0x20) && ((data & 0x20)==0))
758758   {
759      output_set_value("solenoid17", TRUE);               // Coin Lockout Coil engage
759      output_set_value("solenoid17", TRUE);                   // Coin Lockout Coil engage
760760      if (m_solenoid_features[17][0] != 0xff)
761761         m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][1]);
762762   }
763763   else if ((data & 0x20) && ((m_u11b & 0x20)==0))
764764   {
765      output_set_value("solenoid17", FALSE);               // Coin Lockout Coil release
765      output_set_value("solenoid17", FALSE);                  // Coin Lockout Coil release
766766      if (m_solenoid_features[17][0] != 0xff)
767767         m_samples->start(m_solenoid_features[17][0], m_solenoid_features[17][2]);
768768   }
769769   if ((m_u11b & 0x40) && ((data & 0x40)==0))
770770   {
771      output_set_value("solenoid18", TRUE);               // Flipper Enable Relay engage
771      output_set_value("solenoid18", TRUE);                   // Flipper Enable Relay engage
772772      if (m_solenoid_features[18][0] != 0xff)
773773         m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][1]);
774774   }
775775   else if ((data & 0x40) && ((m_u11b & 0x40)==0))
776776   {
777      output_set_value("solenoid18", FALSE);               // Flipper Enable Relay release
777      output_set_value("solenoid18", FALSE);                  // Flipper Enable Relay release
778778      if (m_solenoid_features[18][0] != 0xff)
779779         m_samples->start(m_solenoid_features[18][0], m_solenoid_features[18][2]);
780780   }
r249924r249925
803803// zero-cross detection
804804TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
805805{
806
807806/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
808807
809   -+                          +---+
808    -+                          +---+
810809     |                          |   |
811810     |<-------- 9.30ms -------->|<->|700us
812811     |                          |   |
813    +--------------------------+   +-----
812    +--------------------------+   +-----
814813*/
815814
816815   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249924r249925
839838// 555 timer for display refresh
840839TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer )
841840{
842
843841/*   +--------------------------+   +-----
844842     |                          |   |
845843     |<-------- 2.85ms -------->|<->|300us
r249924r249925
875873      m_discrete->write(space, NODE_04, ((m_snd_div & 0x04)>>2) * 1);
876874      m_discrete->write(space, NODE_01, ((m_snd_div & 0x01)>>0) * 1);
877875
878//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
876//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
879877   }
880878}
881879
r249924r249925
887885   if ((m_u11a & 0x02) == 0) offs |= 0x10;
888886   {
889887      m_snd_sel = m_snd_prom[offs];
890//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
888//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
891889      m_snd_sel = BITSWAP8(m_snd_sel,0,1,2,3,4,5,6,7);
892890
893891      m_snd_tone_gen = m_snd_sel;
894//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
892//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
895893   }
896894
897895   m_discrete->write(space, NODE_08, 0);
r249924r249925
905903
906904DRIVER_INIT_MEMBER( by35_state, by35_6 )
907905{
908
909906   static const UINT8 solenoid_features_default[20][4] =
910907   {
911908   // This table serves two functions and is configured on a per game basis:
r249924r249925
918915   /*02*/  { 0x00, 0x00,  0x00, 0x00 },
919916   /*03*/  { 0x00, 0x00,  0x00, 0x00 },
920917   /*04*/  { 0x00, 0x00,  0x00, 0x00 },
921   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
922   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
918   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
919   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
923920   /*07*/  { 0x00, 0x0a,  0x00, 0x00 },
924921   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
925922   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249924r249925
928925   /*12*/  { 0x00, 0x0b,  0x00, 0x00 },
929926   /*13*/  { 0x02, 0x07,  0x00, 0x00 },
930927   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
931   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
928   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
932929   //  { Sound Channel, Sound engage, Sound release, Not Used }
933930   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
934   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
935   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
931   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
932   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
936933   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
937934   };
938935
r249924r249925
949946
950947DRIVER_INIT_MEMBER( by35_state, playboy )
951948{
952
953949   static const UINT8 solenoid_features_playboy[20][4] =
954950   {
955951   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
r249924r249925
958954   /*02*/  { 0xff, 0xff,  0x00, 0x00 },
959955   /*03*/  { 0xff, 0xff,  0x00, 0x00 },
960956   /*04*/  { 0xff, 0xff,  0x00, 0x00 },
961   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
962   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
963   /*07*/  { 0x02, 0x0a,  0x03, 0x7f },      // Kickback Grotto
964   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left
965   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right
966   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Bottom
967   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
968   /*12*/  { 0x03, 0x0b,  0x00, 0xe0 },      // Drop Target Reset
969   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
957   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
958   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
959   /*07*/  { 0x02, 0x0a,  0x03, 0x7f },        // Kickback Grotto
960   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left
961   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right
962   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Bottom
963   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
964   /*12*/  { 0x03, 0x0b,  0x00, 0xe0 },        // Drop Target Reset
965   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
970966   /*14*/  { 0xff, 0xff,  0x00, 0x00 },
971   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
967   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
972968   //  { Sound Channel, Sound engage, Sound release, Not Used }
973969   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
974   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
975   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
970   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
971   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
976972   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
977973   };
978974
r249924r249925
10091005   m_u11a = 0;
10101006   m_u11b = 0;
10111007   m_lamp_decode = 0x0f;
1012   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
1008   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
10131009   m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = m_io_hold_x[5] = 0;
10141010}
10151011
r249924r249925
10261022      {0, 0, 0, 0},                                 /* r_node */
10271023      {0, 0},                                       /* c{} */
10281024      0,                                            /* rI  */
1029//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
1025//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
10301026      RES_K(10),                                    /* rF  */   // not really
10311027      CAP_U(0.01),                                  /* cF  */
10321028      0,                                            /* cAmp */
r249924r249925
10481044
10491045static DISCRETE_SOUND_START(as2888)
10501046
1051   DISCRETE_INPUT_DATA(NODE_08)      // Start Sustain Attenuation from 555 circuit
1052   DISCRETE_INPUT_LOGIC(NODE_01)      // Binary Counter B output (divide by 1) T2
1053   DISCRETE_INPUT_LOGIC(NODE_04)      // Binary Counter D output (divide by 4) T3
1047   DISCRETE_INPUT_DATA(NODE_08)        // Start Sustain Attenuation from 555 circuit
1048   DISCRETE_INPUT_LOGIC(NODE_01)       // Binary Counter B output (divide by 1) T2
1049   DISCRETE_INPUT_LOGIC(NODE_04)       // Binary Counter D output (divide by 4) T3
10541050
1055   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1)   // 2
1051   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1) // 2
10561052   DISCRETE_DIVIDE(NODE_14, 1, NODE_04, 1)
10571053
10581054
1059   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
1055   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
10601056#if 0
1061   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))      // T1 filter
1057   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))     // T1 filter
10621058   DISCRETE_ADDER2(NODE_07, 1, NODE_05, NODE_06)
10631059#else
10641060
1065   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
1061   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
10661062#endif
10671063   DISCRETE_RCDISC5(NODE_87, 1, NODE_08, RES_K(150), CAP_U(1.0))
10681064
10691065   DISCRETE_RCFILTER_VREF(NODE_88,NODE_87,RES_M(1),CAP_U(0.01),2)
1070   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)   // Apply sustain
1066   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)    // Apply sustain
10711067
10721068   DISCRETE_OP_AMP_FILTER(NODE_20, 1, NODE_09, 0, DISC_OP_AMP_FILTER_IS_HIGH_PASS_1, &as2888_preamp_info)
10731069
1074   DISCRETE_CRFILTER(NODE_25, NODE_20, RES_M(100), CAP_U(0.05))   // Resistor is fake. Capacitor in series between pre-amp and output amp.
1070   DISCRETE_CRFILTER(NODE_25, NODE_20, RES_M(100), CAP_U(0.05))    // Resistor is fake. Capacitor in series between pre-amp and output amp.
10751071
1076   DISCRETE_GAIN(NODE_30, NODE_25, 50)   // Output amplifier LM380 fixed inbuilt gain of 50
1072   DISCRETE_GAIN(NODE_30, NODE_25, 50) // Output amplifier LM380 fixed inbuilt gain of 50
10771073
10781074   DISCRETE_OUTPUT(NODE_30, 10000000)  //  17000000
10791075DISCRETE_SOUND_END
r249924r249925
10871083
10881084   MCFG_MACHINE_RESET_OVERRIDE( by35_state, by35 )
10891085
1090   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
1086   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
10911087
10921088   /* Video */
10931089   MCFG_DEFAULT_LAYOUT(layout_by35)
r249924r249925
21272123/ 301/Bulls Eye
21282124/-------------------------------*/
21292125ROM_START(bullseye)
2130   ROM_REGION(0x8000, "maincpu", 0)   // Actually seems to have an address mask of 0x3fff
2126   ROM_REGION(0x8000, "maincpu", 0)    // Actually seems to have an address mask of 0x3fff
21312127   ROM_LOAD("bull.u2", 0x2000, 0x1000, CRC(a2951aa2) SHA1(f9c0826c5d1d6d904286678ed90de3850a13b5f4))
21322128   ROM_LOAD("bull.u6", 0x3000, 0x1000, CRC(64d4b9c4) SHA1(bf4d0671372fd3a445c4c7330b9849171ca8048c))
21332129   ROM_RELOAD( 0x7000, 0x1000)
trunk/src/mame/drivers/cardline.c
r249924r249925
139139{
140140   /* update any video up to the current scanline */
141141   m_hsync_q = (state ? 0x00 : 0x10);
142//   m_screen->update_now();
142//  m_screen->update_now();
143143   m_screen->update_partial(m_screen->vpos());
144144}
145145
trunk/src/mame/drivers/cave.c
r249924r249925
31523152
31533153
31543154ROM_START( ddonpacha )
3155   ROM_REGION( 0x100000, "maincpu", 0 )      /* 68000 Code */
3155   ROM_REGION( 0x100000, "maincpu", 0 )        /* 68000 Code */
31563156   ROM_LOAD16_BYTE( "arrange_u27.bin", 0x000000, 0x080000, CRC(44b899ae) SHA1(798ec437d861b94fcd90c99a7015dd420887c788) )
31573157   ROM_LOAD16_BYTE( "arrange_u26.bin", 0x000001, 0x080000, CRC(727a09a8) SHA1(91876386855f19e8a3d8d1df71dfe9b3d98e9ea9) )
31583158
3159   ROM_REGION( 0x800000 * 2, "sprites0", 0 )      /* Sprites: * 2 */
3159   ROM_REGION( 0x800000 * 2, "sprites0", 0 )       /* Sprites: * 2 */
31603160   ROM_LOAD( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) )
31613161   ROM_LOAD( "arrange_u51.bin", 0x200000, 0x200000, CRC(0f3e5148) SHA1(3016f4d075940feae691389606cd2aa7ac53849e) )
31623162   ROM_LOAD( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) )
31633163   ROM_LOAD( "u53.bin", 0x600000, 0x200000, CRC(cb4c10f0) SHA1(a622e8bd0c938b5d38b392b247400b744d8be288) )
31643164
3165   ROM_REGION( 0x200000, "layer0", 0 )   /* Layer 0 */
3165   ROM_REGION( 0x200000, "layer0", 0 ) /* Layer 0 */
31663166   ROM_LOAD( "u60.bin", 0x000000, 0x200000, CRC(903096a7) SHA1(a243e903fef7c4a7b71383263e82e42acd869261) )
31673167
3168   ROM_REGION( 0x200000, "layer1", 0 )   /* Layer 1 */
3168   ROM_REGION( 0x200000, "layer1", 0 ) /* Layer 1 */
31693169   ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(d89b7631) SHA1(a66bb4955ca58fab8973ca37a0f971e9a67ce017) )
31703170
3171   ROM_REGION( 0x200000, "layer2", 0 )   /* Layer 2 */
3171   ROM_REGION( 0x200000, "layer2", 0 ) /* Layer 2 */
31723172   ROM_LOAD( "arrange_u62.bin", 0x000000, 0x200000, CRC(42e4c6c5) SHA1(4d282f7592f5fc5e11839c57f39cae20b8422aa1) )
31733173
3174   ROM_REGION( 0x400000, "ymz", 0 )   /* Samples */
3174   ROM_REGION( 0x400000, "ymz", 0 )    /* Samples */
31753175   ROM_LOAD( "u6.bin", 0x000000, 0x200000, CRC(9dfdafaf) SHA1(f5cb450cdc78a20c3a74c6dac05c9ac3cba08327) )
31763176   ROM_LOAD( "u7.bin", 0x200000, 0x200000, CRC(795b17d5) SHA1(cbfc29f1df9600c82e0fdae00edd00da5b73e14c) )
31773177
r249924r249925
50615061GAME( 1997, ddonpach,   0,        ddonpach, cave, cave_state,     ddonpach, ROT270, "Cave (Atlus license)",                   "DoDonPachi (International, Master Ver. 97/02/05)", MACHINE_SUPPORTS_SAVE )
50625062GAME( 1997, ddonpachj,  ddonpach, ddonpach, cave, cave_state,     ddonpach, ROT270, "Cave (Atlus license)",                   "DoDonPachi (Japan, Master Ver. 97/02/05)",         MACHINE_SUPPORTS_SAVE )
50635063// NOT an official CAVE release, but several PCBs have been converted to it and used on location.
5064GAME( 2012, ddonpacha,  ddonpach, ddonpach, cave, cave_state,     ddonpach, ROT270, "hack (trap15)",                          "DoDonPachi (2012/02/12 Arrange Ver. 1.1) (hack)",     MACHINE_SUPPORTS_SAVE )
5064GAME( 2012, ddonpacha,  ddonpach, ddonpach, cave, cave_state,     ddonpach, ROT270, "hack (trap15)",                          "DoDonPachi (2012/02/12 Arrange Ver. 1.1) (hack)",     MACHINE_SUPPORTS_SAVE )
50655065
50665066
50675067GAME( 1998, dfeveron,   feversos, dfeveron, cave, cave_state,     dfeveron, ROT270, "Cave (Nihon System license)",            "Dangun Feveron (Japan, Ver. 98/09/17)",    MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/chicago.c
r249924r249925
1414 TV Pingame (1975)                #451
1515 Super Flipper (1975)             #458
1616 Demolition Derby (1976)          #466
17
17
1818***************************************************************************/
1919
2020
trunk/src/mame/drivers/cntsteer.c
r249924r249925
1919        - In Back Rotate Test, rotation is tested with the following arrangement (upper bits of rotation parameter):
2020          04 -> 05 -> 02 -> 03 -> 00 -> 01 -> 06 -> 07 -> 04 and backwards
2121          Anything with bit 0 set is tested from 0xff to 0, with bit 0 clear that's 0 -> 0xff, fun.
22   - Understand how irq communication works between CPUs. Buffer $415-6 seems involved in the protocol.
23     We currently have slave CPU irq hooked up to vblank, might or might not be correct.
24   - invert order between maincpu and subcpu, subcpu is clearly the master CPU here.
25   - understand why background mirroring causes wrong gfxs on title screen (wrong tilemap paging, missing video bit or it's actually a RMW thing);
22    - Understand how irq communication works between CPUs. Buffer $415-6 seems involved in the protocol.
23      We currently have slave CPU irq hooked up to vblank, might or might not be correct.
24    - invert order between maincpu and subcpu, subcpu is clearly the master CPU here.
25    - understand why background mirroring causes wrong gfxs on title screen (wrong tilemap paging, missing video bit or it's actually a RMW thing);
2626    cleanup
2727        - split into driver/video;
2828
r249924r249925
633633   //       That's my best guess so far about how Slave is supposed to stop execution on Master CPU, the lack of any realistic write
634634   //       between these operations brings us to this.
635635   //       Game currently returns error on MIX CPU RAM because halt-ing BACK CPU doesn't happen when it should of course ...
636//   UINT8 dp_r = (UINT8)device.state().state_int(M6809_DP);
637//   m_maincpu->set_input_line(INPUT_LINE_HALT, dp_r ? ASSERT_LINE : CLEAR_LINE);
636//  UINT8 dp_r = (UINT8)device.state().state_int(M6809_DP);
637//  m_maincpu->set_input_line(INPUT_LINE_HALT, dp_r ? ASSERT_LINE : CLEAR_LINE);
638638   m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
639639}
640640
trunk/src/mame/drivers/cubeqst.c
r249924r249925
101101
102102WRITE16_MEMBER(cubeqst_state::palette_w)
103103{
104//   m_screen->update_now();
104//  m_screen->update_now();
105105   m_screen->update_partial(m_screen->vpos());
106106
107107   COMBINE_DATA(&m_generic_paletteram_16[offset]);
trunk/src/mame/drivers/dec0.c
r249924r249925
16331633   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
16341634
16351635   // bootleg doesn't seem to support row/col scroll (or enable is different)
1636//   MCFG_DEVICE_MODIFY("tilegen1")
1637//   MCFG_BAC06_BOOTLEG_DISABLE_16x16
1638//   MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL
1636//  MCFG_DEVICE_MODIFY("tilegen1")
1637//  MCFG_BAC06_BOOTLEG_DISABLE_16x16
1638//  MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL
16391639   MCFG_DEVICE_MODIFY("tilegen2")
1640//   MCFG_BAC06_BOOTLEG_DISABLE_8x8
1640//  MCFG_BAC06_BOOTLEG_DISABLE_8x8
16411641   MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL
16421642   MCFG_DEVICE_MODIFY("tilegen3")
1643//   MCFG_BAC06_BOOTLEG_DISABLE_8x8
1643//  MCFG_BAC06_BOOTLEG_DISABLE_8x8
16441644   MCFG_BAC06_BOOTLEG_DISABLE_RC_SCROLL
16451645
16461646MACHINE_CONFIG_END
trunk/src/mame/drivers/ec184x.c
r249924r249925
1818#include "cpu/i86/i86.h"
1919#include "machine/ram.h"
2020
21#define EC1841_MEMBOARD_SIZE   (512*1024)
21#define EC1841_MEMBOARD_SIZE    (512*1024)
2222
2323#define VERBOSE_DBG 1       /* general debug messages */
2424
trunk/src/mame/drivers/electron.c
r249924r249925
11// license:BSD-3-Clause
22// copyright-holders:Wilbert Pol
33/******************************************************************************
4    Acorn Electron driver
4    Acorn Electron driver
55    By Wilbert Pol
6   
6
77Hardware Overview
88-----------------
99The Acorn Electron is a budget version of the BBC Micro home computer
r249924r249925
1818Various expansions can be added via the rear expansion port
1919
2020PCB Layout
21----------                           |-------------------|   
21----------                           |-------------------|
2222                            |--------|  EXPANSION PORT   |
2323|-----|---------------------|                            |---||---------|
2424|MOD  | SPKR     16MHz                            LS169 18VAC||         []18VAC INPUT
r249924r249925
3333Notes: (all IC's shown. Only 16 ICs are used)
3434     6502 - 6502 CPU, clock input 2.000MHz [16/8]
3535      ULA - Custom logic chip 12CO21, also containing most of the BBC Micro circuitry
36            Early PCB revisions used a PLCC68 chip in a socket. Later revisions used a
36            Early PCB revisions used a PLCC68 chip in a socket. Later revisions used a
3737            PGA68 chip soldered directly into the motherboard
3838     4164 - 4164 64k x4-bit DRAM (4 chips for 32kbytes total)
3939      ROM - Hitachi HN613256 32k x8-bit MASK ROM containing OS & BASIC
r249924r249925
4545      PWR - 3-pin power input from internal power supply
4646 KBD_CONN - 22-pin keyboard connector
4747     SPKR - 2-pin internal speaker connector
48     
48
4949******************************************************************************
5050Emulation notes:
51
51
5252I don't have a real system to verify the behaviour of the emulation. The things
5353that can be done through BASIC programs seem to behave properly (most of the time :).
5454
trunk/src/mame/drivers/eti660.c
r249924r249925
219219   */
220220
221221   UINT8 i, data = 0xff;
222   
222
223223   for (i = 0; i < 4; i++)
224224      if BIT(m_keylatch, i)
225225         return m_io_keyboard[i]->read();
trunk/src/mame/drivers/firefox.c
r249924r249925
267267
268268TIMER_DEVICE_CALLBACK_MEMBER(firefox_state::video_timer_callback)
269269{
270//   m_screen->update_now();
270//  m_screen->update_now();
271271   m_screen->update_partial(m_screen->vpos());
272272
273273   m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE );
trunk/src/mame/drivers/galaxian.c
r249924r249925
52355235   // change spriteram base per each 64-line part of the screen
52365236   if ((split & 0x3f) == 0)
52375237   {
5238//      m_screen->update_now();
5238//      m_screen->update_now();
52395239      m_screen->update_partial(m_screen->vpos());
52405240      m_sprites_base = 0x40 | (split << 2 & 0x300);
52415241   }
r249924r249925
53465346   /* alternate memory map */
53475347   MCFG_CPU_MODIFY("maincpu")
53485348   MCFG_CPU_PROGRAM_MAP(mooncrst_map_base)     /* no discrete sound ! */
5349   
5349
53505350   MCFG_CPU_MODIFY("audiocpu")
53515351   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, galaxian_state, froggermc_audiocpu_irq_ack)
53525352MACHINE_CONFIG_END
trunk/src/mame/drivers/galaxold.c
r249924r249925
34803480
34813481ROM_START( spcwarp )
34823482   // conversion of 'cosmos' (cvs.c) to Galaxian hardware
3483   // notes:
3483   // notes:
34843484   // -came out of an unemulated games collection - may or may not be actually spcwarp but it's unique
34853485   // -uses hunchbkg hardware with a different map
34863486   // -the game likely calls a checksum check every 10 frames, causes game to freeze (probably because of bad ROM)
trunk/src/mame/drivers/gatron.c
r249924r249925
188188  Press "BIG BAR TICKET" (key C) to play with Big Bar (right) Ticket.
189189
190190  A curiosity...
191 
191
192192  The Pull Tabs flyer shows the following paytable:
193193
194194  - Super Star -      - Lady Luck -         - Big Bar -
r249924r249925
199199   3x Crowns  1     3x Bells         2     3x Bananas   2
200200
201201  ...but the game seems to have inverted objects importance:
202
202
203203  - Super Star -      - Lady Luck -         - Big Bar -
204204   3x Crowns 75     3x Bells       100     3x Bananas  75
205205   3x Clubs   8     3x Licquors     25     3x Plums    10
206206   3x Cups    4     3x Horseshoes   10     3x Pears     6
207207   3x Hearts  3     3x Watermelons   5     3x Cherries  4
208208   3x Stars   1     3x Oranges       2     3x Bars      2
209
209
210210  Can't get an input or combination of them that change this logic.
211211  Maybe the paytable is different in this set, or just the flyer doesn't
212212  reflect the real thing.
trunk/src/mame/drivers/i7000.c
r249924r249925
389389
390390   ROM_REGION( 0x0800, "gfx1", 0 )
391391   ROM_LOAD( "i7000_chargen.rom", 0x0000, 0x0800, CRC(fb7383e9) SHA1(71a6561bb9ff3cbf74711fa7ab445f9b43f15626) )
392        /*
393      The character generator ROM originally dumped had
394      some corrupt data that was manually fixed:
392      /*
393      The character generator ROM originally dumped had
394      some corrupt data that was manually fixed:
395395
396      ROM address | Originally dumped value | Manually fixed value | Comment
397           0x06A2 |                    0xF7 | 0xFE                 | This is a fix to the upper right portion of a 2x2 tile image of a big filled circle
398           0x06A3 |                    0xF7 | 0xFE                 | This is another fix to the same tile (character value: 0xD4)
396      ROM address | Originally dumped value | Manually fixed value | Comment
397          0x06A2 |                    0xF7 | 0xFE                 | This is a fix to the upper right portion of a 2x2 tile image of a big filled circle
398          0x06A3 |                    0xF7 | 0xFE                 | This is another fix to the same tile (character value: 0xD4)
399399
400      Also, characters 0x05, 0x06, 0x07 and 0x08
401      as well as lowercase 'x' (0x78), uppercase 'Y' (0x59)
402      may contain corrupt data, but we can't be sure,
403      unless we find another Itautec I7000 computer and
404      redump it's ROMs to double-check.
400      Also, characters 0x05, 0x06, 0x07 and 0x08
401      as well as lowercase 'x' (0x78), uppercase 'Y' (0x59)
402      may contain corrupt data, but we can't be sure,
403      unless we find another Itautec I7000 computer and
404      redump it's ROMs to double-check.
405405   */
406406
407407   ROM_REGION( 0x1000, "drive", 0 )
trunk/src/mame/drivers/imds2.c
r249924r249925
566566
567567void imds2_state::machine_start()
568568{
569        m_iocfdc->set_ready_line_connected(true);
569      m_iocfdc->set_ready_line_connected(true);
570570}
571571
572572void imds2_state::video_start()
r249924r249925
812812      MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2)
813813      MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w))
814814      MCFG_FLOPPY_DRIVE_ADD("iocfdc:0", imds2_floppies, "8sssd", floppy_image_device::default_floppy_formats)
815                MCFG_SLOT_FIXED(true)
815            MCFG_SLOT_FIXED(true)
816816
817817      MCFG_CPU_ADD("iocpio" , I8041 , IOC_XTAL_Y3)
818818      MCFG_CPU_IO_MAP(pio_io_map)
trunk/src/mame/drivers/konamigq.c
r249924r249925
4747                  3- trigger
4848                  4- +5v
4949                  5- reload (see below)
50                 
50
5151                  The Crypt Killer shotguns have 6 wires coming out of the gun.
5252                  The wire colors and connections are....
5353                  Black  - Ground; joined to CN6/7/8 pin 2
r249924r249925
5656                  White  - Trigger; joined to CN6/7/8 pin 3
5757                  Purple - Reload; joined to CN6/7/8 pin 5
5858                  Grey   - Reload ground; this wire must be joined to any ground for the reload to work
59                 
59
6060        CN3     - For connection of extra controls/buttons (e.g. player 3 start etc)
6161        CN14    - For connection of additional speaker for stereo output
6262        68000   - Clock input 8.000MHz [32/4]
trunk/src/mame/drivers/konamim2.c
r249924r249925
11871187
11881188   MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB("palette")
11891189
1190        /*cd-rom*/
1190      /*cd-rom*/
11911191   MCFG_CDROM_ADD( "cdrom" )
11921192   MCFG_CDROM_INTERFACE("3do_m2_cdrom")
11931193
trunk/src/mame/drivers/lindbergh.c
r249924r249925
168168|                  |SLOT     |     IDE40       ATX_POWER     |
169169|------------------|---------|-------------------------------|
170170Notes:
171           CPU - Lindbergh RED: Intel Celeron D 335 SL8HM 2.8GHz 256k L2 cache, 533MHz FSB.
172                 Lindbergh YELLOW: Intel Pentium 4 3.00GHz/1M/800 SL8JZ
171           CPU - Lindbergh RED: Intel Celeron D 335 SL8HM 2.8GHz 256k L2 cache, 533MHz FSB.
172                 Lindbergh YELLOW: Intel Pentium 4 3.00GHz/1M/800 SL8JZ
173173         SIMM1 - Lindbergh RED: 512M DDR PC3200
174174                 Lindbergh YELLOW: 1GB DDR PC3200
175175       82541PI - Intel Gigabit Ethernet Controller
trunk/src/mame/drivers/m107.c
r249924r249925
4545#define M107_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */
4646// not used due to HOLD LINE logic
4747#define M107_CLEAR_IRQ0 ;
48#define M107_CLEAR_IRQ1 ;
48#define M107_CLEAR_IRQ1 ;
4949#define M107_CLEAR_IRQ2 ;
5050#define M107_CLEAR_IRQ3 ;
5151
5252#else
5353
54#define M107_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
55#define M107_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
56#define M107_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
57#define M107_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
54#define M107_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
55#define M107_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
56#define M107_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
57#define M107_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
5858// not sure when these should happen, probably the source of our issues
59#define M107_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
60#define M107_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
61#define M107_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
62#define M107_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
59#define M107_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
60#define M107_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
61#define M107_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
62#define M107_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
6363
6464#endif
6565
trunk/src/mame/drivers/m72.c
r249924r249925
1313
1414      M72-B-D (bottom) / M72-A-C (middle) / M72-ROM-C (top)
1515
16     This is the original hardware used by R-type
16      This is the original hardware used by R-type
1717      Z80 program uploaded to RAM rather than having a ROM
1818      each of the 2 tile layers uses it's own set of ROMs.
19     Flip bits are with the tile num, so 0x3fff max tiles
20     per layer
19      Flip bits are with the tile num, so 0x3fff max tiles
20      per layer
2121
22     M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top)
22      M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top)
2323
24     This is used by all other M72 games, adds support
25     for an I8751 MCU and sample playback
24      This is used by all other M72 games, adds support
25      for an I8751 MCU and sample playback
2626
2727
2828M81 - 2 PCB Stack
2929
30     M81-A-B (top board) (seen on Dragon Breed)
31     CPUs, program roms etc.
30      M81-A-B (top board) (seen on Dragon Breed)
31      CPUs, program roms etc.
3232
33     M81-B-B (bottom board) (seen on Dragon Breed)
34     supports
35     8 sprite ROMS
36     4 tile roms for FG layer (A0-A3)
37      (Jumper J3 also allows them to be used for BG)
38     4 tile roms for BG layer (B0-B3)
33      M81-B-B (bottom board) (seen on Dragon Breed)
34      supports
35      8 sprite ROMS
36      4 tile roms for FG layer (A0-A3)
37       (Jumper J3 also allows them to be used for BG)
38      4 tile roms for BG layer (B0-B3)
3939
40     The Jumper at J3 seems to be an important difference
41     from M72, it allows both the FG and BG layers to
42     operate from a single set of ROMs.
43     W - use both sets of ROMs
44     S - use a single set of ROMs (A0-A3)
40      The Jumper at J3 seems to be an important difference
41      from M72, it allows both the FG and BG layers to
42      operate from a single set of ROMs.
43      W - use both sets of ROMs
44      S - use a single set of ROMs (A0-A3)
4545
4646
47     revised hardware, Z80 uses a ROM, no MCU, same video
47      revised hardware, Z80 uses a ROM, no MCU, same video
4848      system as M72 (some layer offsets - why?)
4949
5050
5151M82 - board made for Major Title, Z80 has a rom, no MCU
5252      has an extra sprite layer, rowscroll, and a larger
53     tilemap.  Tile data from both tile layers now comes
54     from a single set of ROMs, flip bits moved to 2nd
55     word meaning max of 0xffff tiles.
53      tilemap.  Tile data from both tile layers now comes
54      from a single set of ROMs, flip bits moved to 2nd
55      word meaning max of 0xffff tiles.
5656
57     * Some games were converted to run on this board,
58     leaving the extra sprite HW unused.
57      * Some games were converted to run on this board,
58      leaving the extra sprite HW unused.
5959
6060M84 -   2 PCB stack
6161        functionally same as M82 but without the extra sprite hw??
62     
63      M84-A-A (bottom board) (most games)
64      supports
65      4 program roms
66      8 tile roms
67      1 snd prg, 1 voice rom
68      CPUs and some customs etc.
6962
70      M84-D-B (bottom board) (found on lightning swords / kengo)
71      redesigned version of above but
72      for V35 CPU? (seems to lack the UPD71059C interrupt
73      controller which isn't needed when with the V35)
63        M84-A-A (bottom board) (most games)
64        supports
65        4 program roms
66        8 tile roms
67        1 snd prg, 1 voice rom
68        CPUs and some customs etc.
7469
75      M84-C-A (top board) (listed as for Hammering Harry)
76      4 sprite roms (in a row)
77      6 larger chips with detail removed
78      etc.
70        M84-D-B (bottom board) (found on lightning swords / kengo)
71        redesigned version of above but
72        for V35 CPU? (seems to lack the UPD71059C interrupt
73        controller which isn't needed when with the V35)
7974
80      M84-B-A (top board) (found on rytpe 2)
81      M84-B-B (top board) (lightning swords / kengo)
82      these both look very similar, if not the same
75        M84-C-A (top board) (listed as for Hammering Harry)
76        4 sprite roms (in a row)
77        6 larger chips with detail removed
78        etc.
8379
84      4 sprite roms (in a square)
85      various NANAO marked customs
86      KNA70H016(12)  NANAO 0201
87      KNA65005 17 NANAO 9048KS
88      KNA71H010(15) NANAO 0X2002
89      KNA72H010(14) NANAO 0Z2001
90      KNA71H009(13) NANAO 122001
91      KNA70H015(11) NANAO 092002
92      KNA91H014 NANAO 0Z2001V
93      etc.
80        M84-B-A (top board) (found on rytpe 2)
81        M84-B-B (top board) (lightning swords / kengo)
82        these both look very similar, if not the same
9483
84        4 sprite roms (in a square)
85        various NANAO marked customs
86        KNA70H016(12)  NANAO 0201
87        KNA65005 17 NANAO 9048KS
88        KNA71H010(15) NANAO 0X2002
89        KNA72H010(14) NANAO 0Z2001
90        KNA71H009(13) NANAO 122001
91        KNA70H015(11) NANAO 092002
92        KNA91H014 NANAO 0Z2001V
93        etc.
9594
9695
96
9797M85 - Pound for Pound uses this, possibly just M84 with
9898      a modified sound section?
99     - most Jamma inputs not connected, trackball only
99      - most Jamma inputs not connected, trackball only
100100
101101
102102                                   Year Board                Protected?
r249924r249925
147147
148148IRQ controller
149149--------------
150The IRQ controller is a UPD71059C
150The IRQ controller is a UPD71059C
151151
152152The initialization consists of one write to port 0x40 and multiple writes
153153(2 or 3) to port 0x42. The first value written to 0x42 is the IRQ vector base.
r249924r249925
212212#define M72_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */
213213// not used due to HOLD LINE logic
214214#define M72_CLEAR_IRQ0 ;
215#define M72_CLEAR_IRQ1 ;
215#define M72_CLEAR_IRQ1 ;
216216#define M72_CLEAR_IRQ2 ;
217217#define M72_CLEAR_IRQ3 ;
218218
219219#else
220220
221#define M72_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
222#define M72_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
223#define M72_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
224#define M72_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
221#define M72_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
222#define M72_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
223#define M72_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
224#define M72_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
225225// not sure when these should happen, probably the source of our issues
226#define M72_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
227#define M72_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
228#define M72_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
229#define M72_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
226#define M72_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
227#define M72_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
228#define M72_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
229#define M72_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
230230
231231#endif
232232
r249924r249925
957957   AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(videoram1_w) AM_SHARE("videoram1") \
958958   AM_RANGE(0xd8000, 0xdbfff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") \
959959   AM_RANGE(0xffff0, 0xfffff) AM_ROM \
960ADDRESS_MAP_END \
961
960ADDRESS_MAP_END
962961/*                         WORKRAM */
963962M81_CPU1_MEMORY( xmultipl, 0x9c000 )
964963M81_CPU1_MEMORY( dbreed,   0x88000 )
r249924r249925
979978   AM_RANGE(PALETTERAM2, PALETTERAM2+0xbff) AM_READWRITE(palette2_r, palette2_w) AM_SHARE("paletteram2") \
980979   AM_RANGE(0xe0000, 0xe3fff) AM_RAM   /* work RAM */ \
981980   AM_RANGE(0xffff0, 0xfffff) AM_ROM \
982ADDRESS_MAP_END \
983
981ADDRESS_MAP_END
984982M84_CPU1_MEMORY( rtype2,  0xd0000, 0xc8000, 0xd8000 )
985983M84_CPU1_MEMORY( hharryu, 0xd0000, 0xa0000, 0xa8000 )
986984M84_CPU1_MEMORY( kengo,   0x80000, 0xa0000, 0xa8000 )
r249924r249925
19881986
19891987   MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) // different offsets
19901988MACHINE_CONFIG_END
1991
1989
19921990static MACHINE_CONFIG_DERIVED( m81_dbreed, m81_xmultipl )
19931991   MCFG_CPU_MODIFY("maincpu")
19941992   MCFG_CPU_PROGRAM_MAP(dbreed_map)
r249924r249925
20492047   MCFG_CPU_PROGRAM_MAP(kengo_map)
20502048   MCFG_CPU_IO_MAP(m84_v33_portmap)
20512049//#ifndef USE_HACKED_IRQS
2052//   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
2050//  MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
20532051//#endif
20542052
20552053   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
r249924r249925
20582056   MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
20592057                        /* IRQs are generated by main Z80 and YM2151 */
20602058
2061//   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2062                       
2059//  MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2060
20632061   MCFG_MACHINE_START_OVERRIDE(m72_state,kengo)
20642062   MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo)
20652063
r249924r249925
20852083
20862084/****************************************** M82 ***********************************************/
20872085
2088/* Major Title uses
2086/* Major Title uses
20892087
20902088M82-A-A as the top board
20912089M82-B-A and as the bottom board
r249924r249925
21232121MACHINE_CONFIG_END
21242122
21252123
2126/* Pound for Pound uses
2124/* Pound for Pound uses
21272125  M85-A-B / M85-B
21282126*/
21292127
r249924r249925
21432141                        /* IRQs are generated by main Z80 and YM2151 */
21442142
21452143   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2146         
2144
21472145   /* video hardware */
21482146   MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2)
21492147   MCFG_PALETTE_ADD("palette", 512)
r249924r249925
34743472
34753473   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-A */
34763474   ROM_LOAD( "rt2_b-4n-.bin", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3477   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
3475   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
34783476ROM_END
34793477
34803478ROM_START( rtype2jc )
r249924r249925
36773675
36783676   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-B */
36793677   ROM_LOAD( "KEN_B-4N-.IC23", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3680   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
3678   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
36813679ROM_END
36823680
36833681
trunk/src/mame/drivers/m92.c
r249924r249925
223223#define M92_TRIGGER_IRQ3 m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_upd71059c->HACK_get_base_vector()+3 ); /* Sound cpu->Main cpu interrupt */
224224// not used due to HOLD LINE logic
225225#define M92_CLEAR_IRQ0 ;
226#define M92_CLEAR_IRQ1 ;
226#define M92_CLEAR_IRQ1 ;
227227#define M92_CLEAR_IRQ2 ;
228228#define M92_CLEAR_IRQ3 ;
229229
230230#else
231231
232#define M92_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
233#define M92_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
234#define M92_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
235#define M92_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
232#define M92_TRIGGER_IRQ0 m_upd71059c->ir0_w(1);
233#define M92_TRIGGER_IRQ1 m_upd71059c->ir1_w(1);
234#define M92_TRIGGER_IRQ2 m_upd71059c->ir2_w(1);
235#define M92_TRIGGER_IRQ3 m_upd71059c->ir3_w(1);
236236// not sure when these should happen, probably the source of our issues
237#define M92_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
238#define M92_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
239#define M92_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
240#define M92_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
237#define M92_CLEAR_IRQ0 m_upd71059c->ir0_w(0);
238#define M92_CLEAR_IRQ1 m_upd71059c->ir1_w(0);
239#define M92_CLEAR_IRQ2 m_upd71059c->ir2_w(0);
240#define M92_CLEAR_IRQ3 m_upd71059c->ir3_w(0);
241241
242242#endif
243243
trunk/src/mame/drivers/macpci.c
r249924r249925
111111
112112   MCFG_CDROM_ADD("cdrom")
113113   MCFG_CDROM_INTERFACE("pippin_cdrom")
114   MCFG_SOFTWARE_LIST_ADD("cd_list","pippin")   
114   MCFG_SOFTWARE_LIST_ADD("cd_list","pippin")
115115
116116   MCFG_RAM_ADD(RAM_TAG)
117117   MCFG_RAM_DEFAULT_SIZE("32M")
trunk/src/mame/drivers/merit.c
r249924r249925
232232{
233233   int co;
234234
235//   m_screen->update_now();
235//  m_screen->update_now();
236236   m_screen->update_partial(m_screen->vpos());
237237   data &= 0x0f;
238238
r249924r249925
306306WRITE_LINE_MEMBER(merit_state::hsync_changed)
307307{
308308   /* update any video up to the current scanline */
309//   m_screen->update_now();
309//  m_screen->update_now();
310310   m_screen->update_partial(m_screen->vpos());
311311}
312312
trunk/src/mame/drivers/micral.c
r249924r249925
200200
201201UINT32 micral_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
202202{
203//   for (int y = 0; y < 32*8; y++)
204//   {
205//      offs_t offset = (y / 8) * 128;
203//  for (int y = 0; y < 32*8; y++)
204//  {
205//      offs_t offset = (y / 8) * 128;
206206
207//      for (int sx = 0; sx < 64; sx++)
208//      {
209//         UINT8 code = m_video_ram[offset++];
210//         UINT8 attr = m_video_ram[offset++];
207//      for (int sx = 0; sx < 64; sx++)
208//      {
209//          UINT8 code = m_video_ram[offset++];
210//          UINT8 attr = m_video_ram[offset++];
211211
212//         offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07);
213//         if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07);
212//          offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07);
213//          if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07);
214214
215//         UINT8 data = m_char_rom->base()[char_offs];
215//          UINT8 data = m_char_rom->base()[char_offs];
216216
217//         rgb_t fg = m_palette->pen_color(attr & 0x07);
218//         rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07);
217//          rgb_t fg = m_palette->pen_color(attr & 0x07);
218//          rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07);
219219
220//         for (int x = 0; x < 6; x++)
221//         {
222//            bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg;
220//          for (int x = 0; x < 6; x++)
221//          {
222//              bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg;
223223
224//            data <<= 1;
225//         }
226//      }
227//   }
224//              data <<= 1;
225//          }
226//      }
227//  }
228228
229229   return 0;
230230}
r249924r249925
251251   MCFG_CPU_ADD( "maincpu", Z80, XTAL_4MHz )
252252   MCFG_CPU_PROGRAM_MAP(micral_mem)
253253   // no i/o ports on main cpu
254   MCFG_CPU_ADD( "keyboard", Z80, XTAL_1MHz ) // freq unknown
254   MCFG_CPU_ADD( "keyboard", Z80, XTAL_1MHz ) // freq unknown
255255   MCFG_CPU_PROGRAM_MAP(micral_kbd_mem)
256256   MCFG_CPU_IO_MAP(micral_kbd_io)
257257
trunk/src/mame/drivers/namcops2.c
r249924r249925
538538        J9 - 6-pin connector (not used)
539539       J10 - 80-pin Namco connector (not used, probably for an add-on PCB with ROMs for diagnostics)
540540
541This PCB is used with Cobra The Arcade. The game will boot with several I/O boards but in the test mode in 'I/O TEST'
541This PCB is used with Cobra The Arcade. The game will boot with several I/O boards but in the test mode in 'I/O TEST'
542542the I/O board is only reported as good with the RAYS PCB, otherwise it reports 'NG'.
543543This same PCB is also used with the DX rear-projection-screen version of Crisis Zone (on System 23 Evolution 2 hardware).
544544Note this board requires a CCD camera and infrared guns and infrared sensors.
r249924r249925
599599      J101 - 6 pin connector for power input
600600      J102 - 60 pin flat cable connector
601601      J104 - 5 pin connector (not populated)
602      J204 - USB-B connector (also wired in-line with J104. Note the signal is still the
602      J204 - USB-B connector (also wired in-line with J104. Note the signal is still the
603603             normal Namco communication signal; i.e. RS485)
604604      J106 - 30 pin flat cable connector
605605      J108 - 4 pin connector
r249924r249925
613613
614614V290 FCB PCB is almost identical to FCA PCB. The main differences are changed internal MCU code & PIC code,
615615some extra/different connectors, less D1017 driver transistors and an added RS-232 IC.
616The V290 FCB PCB is used with touchscreen games such as Dragon Chronicles, Druaga Online, Idol Master etc.
616The V290 FCB PCB is used with touchscreen games such as Dragon Chronicles, Druaga Online, Idol Master etc.
617617It supports a serial touchscreen interface, card readers and buttons.
618The additional devices are supported via J108 which connects to another PCB 'XOU020-A' which contains a
618The additional devices are supported via J108 which connects to another PCB 'XOU020-A' which contains a
619619Texas Instruments TMS32VC540x DSP, TSOP32 flash ROM and other components.
620620
621621
r249924r249925
738738|        |EP20K100E   LC35256     RS5C348       J14           |
739739|        |QC208   |            32.768kHz BR9080F              |
740740| 16M    |--------|                                |----------|
741| 16M            66.666MHz               C807U-1V86|                           
742|                                              4MHz|                       
743|                                    J11     MM1537|                       
744|   |------|         J10                           |             
745|   | C448 |  61C256    EPM3128                    |                       
746|   |      |                                       |                             
747|   |------|                                       |                             
748|                                       J9         |                             
749|    TMP95C061                                     |                             
741| 16M            66.666MHz               C807U-1V86|
742|                                              4MHz|
743|                                    J11     MM1537|
744|   |------|         J10                           |
745|   | C448 |  61C256    EPM3128                    |
746|   |      |                                       |
747|   |------|                                       |
748|                                       J9         |
749|    TMP95C061                                     |
750750J8               CXA2055P                          |
751751|  MAX232    ADM485       6358N                   J7
752752|             J3                                   |
r249924r249925
764764       J10 - 6-pin connector for programming EPM3128 CPLD (not populated)
765765       J11 - Flat cable connector joining to PS2 main board
766766       J12 - 40-pin IDE connector for CD/DVD/HDD drives
767       J13 - 4-pin power input connector (+5V/GND)
767       J13 - 4-pin power input connector (+5V/GND)
768768       J14 - 34-pin connector plugged directly into PS2 main board
769769       J15 - 4-pin power output connector plugged directly into PS2 main board (the PS2 main board PSU is not populated)
770770C807U-1V86 - Toshiba TMP87PH47U microcontroller with 16k x8-bit OTP EPROM re-badged as 'SONY C8707U-1V86 (C)2000 SCEI'
r249924r249925
783783   RS5C348 - Ricoh RS5C348 RTC
784784   BR9080F - ROHN BR9080F 512 word x16-bit serial EEPROM
785785    MM1537 - Mitsumi MM1537 reset chip. No info available but pin 2 of MM1537 tied to TMP87PH47 reset pin 14 so it's a reset chip
786    MAX232 - Maxim MAX232 dual serial to TTL logic level driver/receiver
786    MAX232 - Maxim MAX232 dual serial to TTL logic level driver/receiver
787787   BATTERY - CR2032 3.0V battery
788   
788
789789This revision was initially used with Tekken 4, Time Crisis 3, Battle Gear 3 and Soul Calibur II. There are reports
790790that the DVD-based games on this system are fussy about the model of DVD-ROM drive used. Powering the drive from an
791791external PSU will help in some cases.
792792
793A PS2 main board (such as GH-006) is required and plugs into J14 & J15 directly and two flat cables
793A PS2 main board (such as GH-006) is required and plugs into J14 & J15 directly and two flat cables
794794from J9 & J11 also connect to the PS2 main board.
795795The board documented here is green. A blue PCB has been seen used in Time Crisis 3. It's not known if the PCB
796796is different to this one.
trunk/src/mame/drivers/namcos11.c
r249924r249925
289289Pin 1 Parts Side - GND
290290Pin 3 Parts Side - +5V
291291Pin 22 Parts Side - Gun 1 Trigger
292Pin 22 Solder Side - Gun 2 Trigger
292Pin 22 Solder Side - Gun 2 Trigger
293293
294294***************************************************************************/
295295
trunk/src/mame/drivers/namcos12.c
r249924r249925
966966
967967      This PCB was found on the following games (so far)....
968968      Ghoul Panic (OB2/VER.A)
969      Oh! Bakyuuun (OB1/VER.A)
970      Gunbarl (GNB4/VER.A)
969      Oh! Bakyuuun (OB1/VER.A)
970      Gunbarl (GNB4/VER.A)
971971      Point Blank 2 (GNB5/VER.A)
972972
973973To connect a normal (i.e. HAPP) light gun only 4 wires are needed.
r249924r249925
990990Pin 1 Parts Side - GND
991991Pin 3 Parts Side - +5V
992992Pin 22 Parts Side - Gun 1 Trigger
993Pin 22 Solder Side - Gun 2 Trigger
993Pin 22 Solder Side - Gun 2 Trigger
994994
995995
996996CDXA PCB
r249924r249925
10701070      J1/2/3/8     - Multi-pin connectors joining to controls and main PCB
10711071      J9           - Power input connector
10721072
1073I/O board (for Attack Pla-Rail)     
1073I/O board (for Attack Pla-Rail)
10741074-------------------------------
1075Attack Pla-Rail requires an I/O board to boot. Several I/O boards are accepted including TSS-I/O, FCA, ASCA3, ASCA5
1075Attack Pla-Rail requires an I/O board to boot. Several I/O boards are accepted including TSS-I/O, FCA, ASCA3, ASCA5
10761076and also the common JVS I/O boards manufactured by Sega.
10771077The game uses 3 buttons and a 5k potentiometer for the lever. The button signals come from the I/O board.
10781078The lever must be wired to analog port 0 (pin B22 parts side) of the Namco 48-way edge connector.
r249924r249925
15271527   AM_RANGE(0x280000, 0x287fff) AM_DEVREADWRITE("c352", c352_device, read, write)
15281528   AM_RANGE(0x300000, 0x300001) AM_READ_PORT("DIN0")
15291529   AM_RANGE(0x300002, 0x300003) AM_READ_PORT("DIN1")
1530   AM_RANGE(0x300010, 0x300011) AM_NOP
1530   AM_RANGE(0x300010, 0x300011) AM_NOP
15311531   AM_RANGE(0x300030, 0x300031) AM_NOP // most S12 bioses write here simply to generate a wait state.  there is no deeper meaning.
15321532ADDRESS_MAP_END
15331533
r249924r249925
15721572
15731573READ16_MEMBER(namcos12_state::s12_mcu_jvs_p8_r)
15741574{
1575   return 0x12;   // bit 4 = JVS enable.  aplarail requires it to be on, soulclbr & others will require JVS I/O if it's on
1575   return 0x12;    // bit 4 = JVS enable.  aplarail requires it to be on, soulclbr & others will require JVS I/O if it's on
15761576}
15771577
15781578static ADDRESS_MAP_START( s12h8iomap, AS_IO, 16, namcos12_state )
r249924r249925
20172017   PORT_BIT( 0xff3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
20182018
20192019   PORT_START("IN01")
2020   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON1 )   // left
2021   PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_START1 )   // OK / Start
2022   PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 )   // right
2020   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON1 )  // left
2021   PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_START1 )   // OK / Start
2022   PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 )  // right
20232023   PORT_BIT( 0xc7ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
20242024
20252025   PORT_START("IN23")
20262026   PORT_BIT( 0xf7ff, IP_ACTIVE_LOW, IPT_UNKNOWN)
2027   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 )      // coin
2027   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 )        // coin
20282028
20292029   PORT_START("DIN0")
20302030   PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN)
r249924r249925
20352035
20362036   PORT_START("LEVER")
20372037   PORT_BIT( 0x07ff, 0x03ff, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Speed Lever") PORT_REVERSE
2038   
2038
20392039   PORT_START("SERVICE")
20402040   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNKNOWN)
20412041INPUT_PORTS_END
r249924r249925
31473147   ROM_REGION( 0x40000, "iocpu", 0)  /* Truck K. I/O board */
31483148   ROM_LOAD( "asca1_io-a.ic2", 0x000000, 0x040000, CRC(77cdf69a) SHA1(497af1059f85c07bea2dd0d303481623f6019dcf) )
31493149
3150   ROM_REGION( 0x800, "at28c16", 0)   /* pre-calibrated NVRAM */
3150   ROM_REGION( 0x800, "at28c16", 0)    /* pre-calibrated NVRAM */
31513151   ROM_LOAD( "at28c16",      0x000000, 0x000800, CRC(db1b63c5) SHA1(01fc3386a2d1cb1bed1b7fd9bd2fd59e503832d3) )
31523152ROM_END
31533153
trunk/src/mame/drivers/namcos23.c
r249924r249925
15861586
15871587namcos23_renderer::namcos23_renderer(namcos23_state &state)
15881588   : poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>(state.machine()),
1589     m_state(state)
1589      m_state(state)
15901590{
15911591}
15921592
r249924r249925
18921892   float du = extent.param[1].dpdx;
18931893   float dv = extent.param[2].dpdx;
18941894   float dl = extent.param[3].dpdx;
1895   
1895
18961896   UINT32 *img = &object.bitmap->pix32(scanline, extent.startx);
1897   
1897
18981898   for(int x = extent.startx; x < extent.stopx; x++) {
18991899      float z = w ? 1/w : 0;
19001900      UINT32 pcol = rd.texture_lookup(*rd.machine, rd.pens, u*z, v*z);
19011901      float ll = l*z;
19021902      *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll);
1903     
1903
19041904      w += dw;
19051905      u += du;
19061906      v += dv;
r249924r249925
20352035
20362036      namcos23_poly_entry *p = render.polys + render.poly_count;
20372037
2038        // Should be unnecessary now that frustum clipping happens, but this still culls polys behind the camera
2038      // Should be unnecessary now that frustum clipping happens, but this still culls polys behind the camera
20392039      p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 4, 0.00001f);
2040       
2041        // Project if you don't clip on the near plane
2040
2041      // Project if you don't clip on the near plane
20422042      if(p->vertex_count >= 3) {
2043            // Project the eye points
2044            frustum_clip_vertex<float, 3> clipVerts[10];
2045            for(int i=0; i<p->vertex_count; i++) {
2046                // Construct a frustum clipping vert from the NDCoords
2047                const float Z = p->pv[i].p[0];
2048                clipVerts[i].x = p->pv[i].x / Z;
2049                clipVerts[i].y = p->pv[i].y / Z;
2050                clipVerts[i].z = Z;
2051                clipVerts[i].w = Z;
2052                clipVerts[i].p[0] = p->pv[i].p[1];
2053                clipVerts[i].p[1] = p->pv[i].p[2];
2054                clipVerts[i].p[2] = p->pv[i].p[3];
2055            }
2043         // Project the eye points
2044         frustum_clip_vertex<float, 3> clipVerts[10];
2045         for(int i=0; i<p->vertex_count; i++) {
2046            // Construct a frustum clipping vert from the NDCoords
2047            const float Z = p->pv[i].p[0];
2048            clipVerts[i].x = p->pv[i].x / Z;
2049            clipVerts[i].y = p->pv[i].y / Z;
2050            clipVerts[i].z = Z;
2051            clipVerts[i].w = Z;
2052            clipVerts[i].p[0] = p->pv[i].p[1];
2053            clipVerts[i].p[1] = p->pv[i].p[2];
2054            clipVerts[i].p[2] = p->pv[i].p[3];
2055         }
20562056
2057            // Clip against all edges of the view frustum
2058            int num_vertices = frustum_clip_all<float, 3>(clipVerts, p->vertex_count, clipVerts);
2059           
2060            if (num_vertices != 0)
2061            {
2062                // Push the results back into the main vertices
2063                for (int i=0; i < num_vertices; i++)
2064                {
2065                    p->pv[i].x = clipVerts[i].x;
2066                    p->pv[i].y = clipVerts[i].y;
2067                    p->pv[i].p[0] = clipVerts[i].w;
2068                    p->pv[i].p[1] = clipVerts[i].p[0];
2069                    p->pv[i].p[2] = clipVerts[i].p[1];
2070                    p->pv[i].p[3] = clipVerts[i].p[2];
2071                }
2072                p->vertex_count = num_vertices;
2073               
2074                // This is our poor-man's projection matrix
2075                for(int i=0; i<p->vertex_count; i++)
2076                {
2077                    render_project(p->pv[i]);
2078                   
2079                    float w = p->pv[i].p[0];
2080                    p->pv[i].p[1] *= w;
2081                    p->pv[i].p[2] *= w;
2082                    p->pv[i].p[3] *= w;
2083                }
2084               
2085                // Compute an odd sorta'-Z thing that can situate the polygon wherever you want in Z-depth
2086                p->zkey = 0.5f*(minz+maxz);
2087                p->front = !(h & 0x00000001);
2088                p->rd.machine = &machine();
2089                p->rd.texture_lookup = render_texture_lookup_nocache_point;
2090                p->rd.pens = m_palette->pens() + (color << 8);
2091                render.poly_count++;
2092            }
2057         // Clip against all edges of the view frustum
2058         int num_vertices = frustum_clip_all<float, 3>(clipVerts, p->vertex_count, clipVerts);
2059
2060         if (num_vertices != 0)
2061         {
2062            // Push the results back into the main vertices
2063            for (int i=0; i < num_vertices; i++)
2064            {
2065               p->pv[i].x = clipVerts[i].x;
2066               p->pv[i].y = clipVerts[i].y;
2067               p->pv[i].p[0] = clipVerts[i].w;
2068               p->pv[i].p[1] = clipVerts[i].p[0];
2069               p->pv[i].p[2] = clipVerts[i].p[1];
2070               p->pv[i].p[3] = clipVerts[i].p[2];
2071            }
2072            p->vertex_count = num_vertices;
2073
2074            // This is our poor-man's projection matrix
2075            for(int i=0; i<p->vertex_count; i++)
2076            {
2077               render_project(p->pv[i]);
2078
2079               float w = p->pv[i].p[0];
2080               p->pv[i].p[1] *= w;
2081               p->pv[i].p[2] *= w;
2082               p->pv[i].p[3] *= w;
2083            }
2084
2085            // Compute an odd sorta'-Z thing that can situate the polygon wherever you want in Z-depth
2086            p->zkey = 0.5f*(minz+maxz);
2087            p->front = !(h & 0x00000001);
2088            p->rd.machine = &machine();
2089            p->rd.texture_lookup = render_texture_lookup_nocache_point;
2090            p->rd.pens = m_palette->pens() + (color << 8);
2091            render.poly_count++;
2092         }
20932093      }
20942094
20952095      if(type & 0x000010000)
trunk/src/mame/drivers/nmg5.c
r249924r249925
14421442
14431443   ROM_REGION( 0x280000, "gfx2", 0 )   /* 16x16x5 */
14441444   ROM_LOAD( "8.u83 ",  0x000000, 0x80000, CRC(f51cf9c6) SHA1(6d0fc749bab918ff6a9d7fae8be7c65823349283) )
1445//   ROM_LOAD( "9.u82",   0x080000, 0x80000, CRC(8c6cff4d) SHA1(5a217ff60f10bf5c58091c189b3509d1361a16b3) ) // bad dump
1445//  ROM_LOAD( "9.u82",   0x080000, 0x80000, CRC(8c6cff4d) SHA1(5a217ff60f10bf5c58091c189b3509d1361a16b3) ) // bad dump
14461446   ROM_LOAD( "9.u82",   0x080000, 0x80000, CRC(ddd3c60c) SHA1(19b68a44c877d0bf630d07b18541ef9636f5adac) )
14471447   ROM_LOAD( "7.u105",  0x100000, 0x80000, CRC(a7fc624d) SHA1(b336ab6e16555db30f9366bf5b797b5ba3ea767c) )
14481448   ROM_LOAD( "6.u96",   0x180000, 0x80000, CRC(2369d8a3) SHA1(4224f50c9c31624dfcac6215d60a2acdd39bb477) )
trunk/src/mame/drivers/othunder.c
r249924r249925
5858      6116.56 & 54 - Sprite attribute/enable RAM, tied to TC0320OBR
5959      Other 6116 RAM - Sprite RAM, connected to TC0020VAR & TC0050VDZ
6060      6264.73 & 74 - Color RAM
61     
61
6262      Taito Custom ICs -
6363                         TC0220IOC
6464                         TC0110PCR
r249924r249925
6767                         TC0320OBR
6868                         TC0020VAR
6969                         TC0050VDZ (x3)
70                         TC0070RGB (ceramic module)
70                         TC0070RGB (ceramic module)
7171                         TC0310FAM (ceramic module)
7272      VSync: 60.0552Hz
7373      HSync: 15.4938kHz
r249924r249925
7575      Note: The hardware outputs reversed video because the cabinet uses a mirror.
7676      The video can't be flipped/reversed with the DIPs, it's fixed in hardware.
7777
78      PCB edge connector is 28-way non-JAMMA.
78      PCB edge connector is 28-way non-JAMMA.
7979      The gun is NOT a light gun, it uses two 5k-ohm potentiometers for the X-Y position
8080
8181               Solder | Parts
trunk/src/mame/drivers/peplus.c
r249924r249925
88808880  P435A     1    1    3   4    5   8  50  80 160  50 250    800
88818881  % Range: 90.2-92.2%  Optimum: 94.2%  Hit Frequency: 45.1%
88828882     Programs Available: X002179P
8883   
8883
88848884NOTE: Same as X000726P, except MAX Coin (set to 5) CANNOT be changed - NJ jurisdiction
88858885*/
88868886   ROM_REGION( 0x10000, "maincpu", 0 )
r249924r249925
89078907  P437A     1    1    3   4    5   6  50  80 160  50 250    800
89088908  % Range: 88.0-90.0%  Optimum: 92.0%  Hit Frequency: 45.1%
89098909     Programs Available: X002180P
8910   
8910
89118911NOTE: Same as X000728P, except MAX Coin (set to 5) CANNOT be changed - NJ jurisdiction
89128912*/
89138913   ROM_REGION( 0x10000, "maincpu", 0 )
r249924r249925
1029010290   ROM_LOAD( "mgo-cg2174.u78",  0x08000, 0x8000, CRC(cc46adb0) SHA1(6065aa5dcb9091ad80e499c7ee6dc629e79c865a) )
1029110291   ROM_LOAD( "mbo-cg2174.u79",  0x10000, 0x8000, CRC(7291a0c8) SHA1(1068f35e6ef5fd88c584922860231840a90fb623) )
1029210292   ROM_LOAD( "mxo-cg2174.u80",  0x18000, 0x8000, CRC(14f9480c) SHA1(59323f9fc5995277aea86d088893b6eb95b4e89b) )
10293   
10293
1029410294   ROM_REGION( 0x200, "proms", 0 )
1029510295   ROM_LOAD( "capx2174.u43", 0x0000, 0x0200, CRC(50bdad55) SHA1(958d463c7effb3457c1f9c44c9b7822339c04e8b) )
1029610296ROM_END
trunk/src/mame/drivers/rd100.c
r249924r249925
4848
4949UINT32 rd100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
5050{
51//   for (int y = 0; y < 32*8; y++)
52//   {
53//      offs_t offset = (y / 8) * 128;
51//  for (int y = 0; y < 32*8; y++)
52//  {
53//      offs_t offset = (y / 8) * 128;
5454
55//      for (int sx = 0; sx < 64; sx++)
56//      {
57//         UINT8 code = m_video_ram[offset++];
58//         UINT8 attr = m_video_ram[offset++];
55//      for (int sx = 0; sx < 64; sx++)
56//      {
57//          UINT8 code = m_video_ram[offset++];
58//          UINT8 attr = m_video_ram[offset++];
5959
60//         offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07);
61//         if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07);
60//          offs_t char_offs = ((code & 0x7f) << 3) | (y & 0x07);
61//          if (BIT(code, 7)) char_offs = ((code & 0x7f) << 3) | ((y >> 1) & 0x07);
6262
63//         UINT8 data = m_char_rom->base()[char_offs];
63//          UINT8 data = m_char_rom->base()[char_offs];
6464
65//         rgb_t fg = m_palette->pen_color(attr & 0x07);
66//         rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07);
65//          rgb_t fg = m_palette->pen_color(attr & 0x07);
66//          rgb_t bg = m_palette->pen_color((attr >> 3) & 0x07);
6767
68//         for (int x = 0; x < 6; x++)
69//         {
70//            bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg;
68//          for (int x = 0; x < 6; x++)
69//          {
70//              bitmap.pix32(y, (sx * 6) + x) = BIT(data, 7) ? fg : bg;
7171
72//            data <<= 1;
73//         }
74//      }
75//   }
72//              data <<= 1;
73//          }
74//      }
75//  }
7676
7777   return 0;
7878}
trunk/src/mame/drivers/replicator.c
r249924r249925
151151class replicator_state : public driver_device
152152{
153153public:
154    replicator_state(const machine_config &mconfig, device_type type, const char *tag)
155        : driver_device(mconfig, type, tag),
156        m_maincpu(*this, "maincpu"),
157        m_lcdc(*this, "hd44780"),
158        m_dac(*this, "dac")
159    {
160    }
154   replicator_state(const machine_config &mconfig, device_type type, const char *tag)
155      : driver_device(mconfig, type, tag),
156      m_maincpu(*this, "maincpu"),
157      m_lcdc(*this, "hd44780"),
158      m_dac(*this, "dac")
159   {
160   }
161161
162    virtual void machine_start();
162   virtual void machine_start();
163163
164    UINT8 m_port_a;
165    UINT8 m_port_b;
166    UINT8 m_port_c;
167    UINT8 m_port_d;
168    UINT8 m_port_e;
169    UINT8 m_port_f;
170    UINT8 m_port_g;
171    UINT8 m_port_h;
172    UINT8 m_port_j;
173    UINT8 m_port_k;
174    UINT8 m_port_l;
164   UINT8 m_port_a;
165   UINT8 m_port_b;
166   UINT8 m_port_c;
167   UINT8 m_port_d;
168   UINT8 m_port_e;
169   UINT8 m_port_f;
170   UINT8 m_port_g;
171   UINT8 m_port_h;
172   UINT8 m_port_j;
173   UINT8 m_port_k;
174   UINT8 m_port_l;
175175
176    UINT8 shift_register_value;
176   UINT8 shift_register_value;
177177
178    required_device<avr8_device> m_maincpu;
179    required_device<hd44780_device> m_lcdc;
180    required_device<dac_device> m_dac;
178   required_device<avr8_device> m_maincpu;
179   required_device<hd44780_device> m_lcdc;
180   required_device<dac_device> m_dac;
181181
182    DECLARE_READ8_MEMBER(port_r);
183    DECLARE_WRITE8_MEMBER(port_w);
184    DECLARE_DRIVER_INIT(replicator);
185    virtual void machine_reset();
186    DECLARE_PALETTE_INIT(replicator);
182   DECLARE_READ8_MEMBER(port_r);
183   DECLARE_WRITE8_MEMBER(port_w);
184   DECLARE_DRIVER_INIT(replicator);
185   virtual void machine_reset();
186   DECLARE_PALETTE_INIT(replicator);
187187};
188188
189189void replicator_state::machine_start()
r249924r249925
192192
193193READ8_MEMBER(replicator_state::port_r)
194194{
195    switch( offset )
196    {
197        case AVR8_IO_PORTA:
198        {
195   switch( offset )
196   {
197      case AVR8_IO_PORTA:
198      {
199199#if LOG_PORTS
200        printf("[%08X] Port A READ (A-axis signals + B-axis STEP&DIR)\n", m_maincpu->m_shifted_pc);
200      printf("[%08X] Port A READ (A-axis signals + B-axis STEP&DIR)\n", m_maincpu->m_shifted_pc);
201201#endif
202        return 0x00;
203        }
204        case AVR8_IO_PORTB:
205        {
202      return 0x00;
203      }
204      case AVR8_IO_PORTB:
205      {
206206#if LOG_PORTS
207        printf("[%08X] Port B READ (SD-CS; 1280-MISO/MOSI/SCK; EX2-FAN/HEAT/PWR-CHECK; BLINK)\n", m_maincpu->m_shifted_pc);
207      printf("[%08X] Port B READ (SD-CS; 1280-MISO/MOSI/SCK; EX2-FAN/HEAT/PWR-CHECK; BLINK)\n", m_maincpu->m_shifted_pc);
208208#endif
209        return 0x00;
210        }
211        case AVR8_IO_PORTC:
212        {
209      return 0x00;
210      }
211      case AVR8_IO_PORTC:
212      {
213213#if LOG_PORTS
214        printf("[%08X] Port C READ (1280-EX1/EX2; LCD-signals; R&G-LED; DETECT)\n", m_maincpu->m_shifted_pc);
214      printf("[%08X] Port C READ (1280-EX1/EX2; LCD-signals; R&G-LED; DETECT)\n", m_maincpu->m_shifted_pc);
215215#endif
216        return DETECT; //indicated that the Interface board is present.
217        }
218        case AVR8_IO_PORTD:
219        {
216      return DETECT; //indicated that the Interface board is present.
217      }
218      case AVR8_IO_PORTD:
219      {
220220#if LOG_PORTS
221        printf("[%08X] Port D READ (SDA/SCL; 1280-EX-TX/RX)\n", m_maincpu->m_shifted_pc);
221      printf("[%08X] Port D READ (SDA/SCL; 1280-EX-TX/RX)\n", m_maincpu->m_shifted_pc);
222222#endif
223        return 0x00;
224        }
225        case AVR8_IO_PORTE:
226        {
223      return 0x00;
224      }
225      case AVR8_IO_PORTE:
226      {
227227#if LOG_PORTS
228        printf("[%08X] Port E READ (1280-TX/RX; THERMO-signals)\n", m_maincpu->m_shifted_pc);
228      printf("[%08X] Port E READ (1280-TX/RX; THERMO-signals)\n", m_maincpu->m_shifted_pc);
229229#endif
230        return 0x00;
231        }
232        case AVR8_IO_PORTF:
233        {
230      return 0x00;
231      }
232      case AVR8_IO_PORTF:
233      {
234234#if LOG_PORTS
235        printf("[%08X] Port F READ (X-axis & Y-axis signals)\n", m_maincpu->m_shifted_pc);
235      printf("[%08X] Port F READ (X-axis & Y-axis signals)\n", m_maincpu->m_shifted_pc);
236236#endif
237        return 0x00;
238        }
239        case AVR8_IO_PORTG:
240        {
237      return 0x00;
238      }
239      case AVR8_IO_PORTG:
240      {
241241#if LOG_PORTS
242        printf("[%08X] Port G READ (BUZZ; Cutoff-sr-check; B-axis EN; 1280-EX3/EX4)\n", m_maincpu->m_shifted_pc);
242      printf("[%08X] Port G READ (BUZZ; Cutoff-sr-check; B-axis EN; 1280-EX3/EX4)\n", m_maincpu->m_shifted_pc);
243243#endif
244        return 0x00;
245        }
246        case AVR8_IO_PORTH:
247        {
244      return 0x00;
245      }
246      case AVR8_IO_PORTH:
247      {
248248#if LOG_PORTS
249        printf("[%08X] Port H READ (cuttoff-text/reset; EX1-FAN/HEAT/PWR-CHECK; SD-CD/SD-WP)\n", m_maincpu->m_shifted_pc);
249      printf("[%08X] Port H READ (cuttoff-text/reset; EX1-FAN/HEAT/PWR-CHECK; SD-CD/SD-WP)\n", m_maincpu->m_shifted_pc);
250250#endif
251        return 0x00;
252        }
253        case AVR8_IO_PORTJ:
254        {
251      return 0x00;
252      }
253      case AVR8_IO_PORTJ:
254      {
255255#if LOG_PORTS
256        printf("[%08X] Port J READ (Interface buttons; POTS-SCL; B-axis-POT)\n", m_maincpu->m_shifted_pc);
256      printf("[%08X] Port J READ (Interface buttons; POTS-SCL; B-axis-POT)\n", m_maincpu->m_shifted_pc);
257257#endif
258        return ioport("keypad")->read();
259        }
260        case AVR8_IO_PORTK:
261        {
258      return ioport("keypad")->read();
259      }
260      case AVR8_IO_PORTK:
261      {
262262#if LOG_PORTS
263        printf("[%08X] Port K READ (Z-axis signals; HBP-THERM; 1280-EX5/6/7)\n", m_maincpu->m_shifted_pc);
263      printf("[%08X] Port K READ (Z-axis signals; HBP-THERM; 1280-EX5/6/7)\n", m_maincpu->m_shifted_pc);
264264#endif
265        return 0x00;
266        }
267        case AVR8_IO_PORTL:
268        {
265      return 0x00;
266      }
267      case AVR8_IO_PORTL:
268      {
269269#if LOG_PORTS
270        printf("[%08X] Port L READ (HBP; EXTRA-FET; X-MIN/MAX; Y-MIN/MAX; Z-MIN/MAX)\n", m_maincpu->m_shifted_pc);
270      printf("[%08X] Port L READ (HBP; EXTRA-FET; X-MIN/MAX; Y-MIN/MAX; Z-MIN/MAX)\n", m_maincpu->m_shifted_pc);
271271#endif
272        return 0x00;
273        }
274    }
275    return 0;
272      return 0x00;
273      }
274   }
275   return 0;
276276}
277277
278278WRITE8_MEMBER(replicator_state::port_w)
279279{
280    switch( offset )
281    {
282        case AVR8_IO_PORTA:
283        {
284            if (data == m_port_a) break;
280   switch( offset )
281   {
282      case AVR8_IO_PORTA:
283      {
284         if (data == m_port_a) break;
285285#if LOG_PORTS
286            UINT8 old_port_a = m_port_a;
287            UINT8 changed = data ^ old_port_a;
286         UINT8 old_port_a = m_port_a;
287         UINT8 changed = data ^ old_port_a;
288288
289            printf("[%08X] ", m_maincpu->m_shifted_pc);
290            if(changed & A_AXIS_DIR) printf("[A] A_AXIS_DIR: %s\n", data & A_AXIS_DIR ? "HIGH" : "LOW");
291            if(changed & A_AXIS_STEP) printf("[A] A_AXIS_STEP: %s\n", data & A_AXIS_STEP ? "HIGH" : "LOW");
292            if(changed & A_AXIS_EN) printf("[A] A_AXIS_EN: %s\n", data & A_AXIS_EN ? "HIGH" : "LOW");
293            if(changed & A_AXIS_POT) printf("[A] A_AXIS_POT: %s\n", data & A_AXIS_POT ? "HIGH" : "LOW");
294            if(changed & B_AXIS_DIR) printf("[A] B_AXIS_DIR: %s\n", data & B_AXIS_DIR ? "HIGH" : "LOW");
295            if(changed & B_AXIS_STEP) printf("[A] B_AXIS_STEP: %s\n", data & B_AXIS_STEP ? "HIGH" : "LOW");
289         printf("[%08X] ", m_maincpu->m_shifted_pc);
290         if(changed & A_AXIS_DIR) printf("[A] A_AXIS_DIR: %s\n", data & A_AXIS_DIR ? "HIGH" : "LOW");
291         if(changed & A_AXIS_STEP) printf("[A] A_AXIS_STEP: %s\n", data & A_AXIS_STEP ? "HIGH" : "LOW");
292         if(changed & A_AXIS_EN) printf("[A] A_AXIS_EN: %s\n", data & A_AXIS_EN ? "HIGH" : "LOW");
293         if(changed & A_AXIS_POT) printf("[A] A_AXIS_POT: %s\n", data & A_AXIS_POT ? "HIGH" : "LOW");
294         if(changed & B_AXIS_DIR) printf("[A] B_AXIS_DIR: %s\n", data & B_AXIS_DIR ? "HIGH" : "LOW");
295         if(changed & B_AXIS_STEP) printf("[A] B_AXIS_STEP: %s\n", data & B_AXIS_STEP ? "HIGH" : "LOW");
296296#endif
297            m_port_a = data;
298            break;
299        }
300        case AVR8_IO_PORTB:
301        {
302            if (data == m_port_b) break;
297         m_port_a = data;
298         break;
299      }
300      case AVR8_IO_PORTB:
301      {
302         if (data == m_port_b) break;
303303#if LOG_PORTS
304            UINT8 old_port_b = m_port_b;
305            UINT8 changed = data ^ old_port_b;
304         UINT8 old_port_b = m_port_b;
305         UINT8 changed = data ^ old_port_b;
306306
307            printf("[%08X] ", m_maincpu->m_shifted_pc);
308            if(changed & SD_CS) printf("[B] SD Card Chip Select: %s\n", data & SD_CS ? "HIGH" : "LOW");
309            if(changed & SCK_1280) printf("[B] 1280-SCK: %s\n", data & SCK_1280 ? "HIGH" : "LOW");
310            if(changed & MOSI_1280) printf("[B] 1280-MOSI: %s\n", data & MOSI_1280 ? "HIGH" : "LOW");
311            if(changed & MISO_1280) printf("[B] 1280-MISO: %s\n", data & MISO_1280 ? "HIGH" : "LOW");
312            if(changed & EX2_PWR_CHECK) printf("[B] EX2-PWR-CHECK: %s\n", data & EX2_PWR_CHECK ? "HIGH" : "LOW");
313            if(changed & EX2_HEAT) printf("[B] EX2_HEAT: %s\n", data & EX2_HEAT ? "HIGH" : "LOW");
314            if(changed & EX2_FAN) printf("[B] EX2_FAN: %s\n", data & EX2_FAN ? "HIGH" : "LOW");
315            if(changed & BLINK) printf("[B] BLINK: %s\n", data & BLINK ? "HIGH" : "LOW");
307         printf("[%08X] ", m_maincpu->m_shifted_pc);
308         if(changed & SD_CS) printf("[B] SD Card Chip Select: %s\n", data & SD_CS ? "HIGH" : "LOW");
309         if(changed & SCK_1280) printf("[B] 1280-SCK: %s\n", data & SCK_1280 ? "HIGH" : "LOW");
310         if(changed & MOSI_1280) printf("[B] 1280-MOSI: %s\n", data & MOSI_1280 ? "HIGH" : "LOW");
311         if(changed & MISO_1280) printf("[B] 1280-MISO: %s\n", data & MISO_1280 ? "HIGH" : "LOW");
312         if(changed & EX2_PWR_CHECK) printf("[B] EX2-PWR-CHECK: %s\n", data & EX2_PWR_CHECK ? "HIGH" : "LOW");
313         if(changed & EX2_HEAT) printf("[B] EX2_HEAT: %s\n", data & EX2_HEAT ? "HIGH" : "LOW");
314         if(changed & EX2_FAN) printf("[B] EX2_FAN: %s\n", data & EX2_FAN ? "HIGH" : "LOW");
315         if(changed & BLINK) printf("[B] BLINK: %s\n", data & BLINK ? "HIGH" : "LOW");
316316#endif
317            m_port_b = data;
318            break;
319        }
320        case AVR8_IO_PORTC:
321        {
322            if (data == m_port_c) break;
317         m_port_b = data;
318         break;
319      }
320      case AVR8_IO_PORTC:
321      {
322         if (data == m_port_c) break;
323323
324            UINT8 old_port_c = m_port_c;
325            UINT8 changed = data ^ old_port_c;
324         UINT8 old_port_c = m_port_c;
325         UINT8 changed = data ^ old_port_c;
326326#if LOG_PORTS
327            printf("[%08X] ", m_maincpu->m_shifted_pc);
328            if(changed & EX2_1280) printf("[C] EX2_1280: %s\n", data & EX2_1280 ? "HIGH" : "LOW");
329            if(changed & EX1_1280) printf("[C] EX1_1280: %s\n", data & EX1_1280 ? "HIGH" : "LOW");
330            if(changed & LCD_CLK) printf("[C] LCD_CLK: %s\n", data & LCD_CLK ? "HIGH" : "LOW");
331            if(changed & LCD_DATA) printf("[C] LCD_DATA: %s\n", data & LCD_DATA ? "HIGH" : "LOW");
332            if(changed & LCD_STROBE) printf("[C] LCD_STROBE: %s\n", data & LCD_STROBE ? "HIGH" : "LOW");
333            if(changed & RLED) printf("[C] RLED: %s\n", data & RLED ? "HIGH" : "LOW");
334            if(changed & GLED) printf("[C] GLED: %s\n", data & GLED ? "HIGH" : "LOW");
335            if(changed & DETECT) printf("[C] DETECT: %s\n", data & DETECT ? "HIGH" : "LOW");
327         printf("[%08X] ", m_maincpu->m_shifted_pc);
328         if(changed & EX2_1280) printf("[C] EX2_1280: %s\n", data & EX2_1280 ? "HIGH" : "LOW");
329         if(changed & EX1_1280) printf("[C] EX1_1280: %s\n", data & EX1_1280 ? "HIGH" : "LOW");
330         if(changed & LCD_CLK) printf("[C] LCD_CLK: %s\n", data & LCD_CLK ? "HIGH" : "LOW");
331         if(changed & LCD_DATA) printf("[C] LCD_DATA: %s\n", data & LCD_DATA ? "HIGH" : "LOW");
332         if(changed & LCD_STROBE) printf("[C] LCD_STROBE: %s\n", data & LCD_STROBE ? "HIGH" : "LOW");
333         if(changed & RLED) printf("[C] RLED: %s\n", data & RLED ? "HIGH" : "LOW");
334         if(changed & GLED) printf("[C] GLED: %s\n", data & GLED ? "HIGH" : "LOW");
335         if(changed & DETECT) printf("[C] DETECT: %s\n", data & DETECT ? "HIGH" : "LOW");
336336#endif
337            if (changed & LCD_CLK){
338                /* The LCD is interfaced by an 8-bit shift register (74HC4094). */
339                if (data & LCD_CLK){//CLK positive edge
340                    shift_register_value = (shift_register_value << 1) | ((data & LCD_DATA) >> 3);
341                    //printf("[%08X] ", m_maincpu->m_shifted_pc);
342                    //printf("[C] LCD CLK positive edge. shift_register=0x%02X\n", shift_register_value);
343                }
344            }
337         if (changed & LCD_CLK){
338            /* The LCD is interfaced by an 8-bit shift register (74HC4094). */
339            if (data & LCD_CLK){//CLK positive edge
340               shift_register_value = (shift_register_value << 1) | ((data & LCD_DATA) >> 3);
341               //printf("[%08X] ", m_maincpu->m_shifted_pc);
342               //printf("[C] LCD CLK positive edge. shift_register=0x%02X\n", shift_register_value);
343            }
344         }
345345
346            if(changed & LCD_STROBE){
347                if (data & LCD_STROBE){ //STROBE positive edge
348                    bool RS = (shift_register_value >> 1) & 1;
349                    bool RW = (shift_register_value >> 2) & 1;
350                    bool enable = (shift_register_value >> 3) & 1;
351                    UINT8 lcd_data = shift_register_value & 0xF0;
346         if(changed & LCD_STROBE){
347            if (data & LCD_STROBE){ //STROBE positive edge
348               bool RS = (shift_register_value >> 1) & 1;
349               bool RW = (shift_register_value >> 2) & 1;
350               bool enable = (shift_register_value >> 3) & 1;
351               UINT8 lcd_data = shift_register_value & 0xF0;
352352
353                    if (enable && RW==0){
354                        if (RS==0){
355                            m_lcdc->control_write(space, 0, lcd_data);
356                        } else {
357                            m_lcdc->data_write(space, 0, lcd_data);
358                        }
359                    }
360                }
361            }
362            m_port_c = data;
353               if (enable && RW==0){
354                  if (RS==0){
355                     m_lcdc->control_write(space, 0, lcd_data);
356                  } else {
357                     m_lcdc->data_write(space, 0, lcd_data);
358                  }
359               }
360            }
361         }
362         m_port_c = data;
363363
364            break;
365        }
366        case AVR8_IO_PORTD:
367        {
368            if (data == m_port_d) break;
364         break;
365      }
366      case AVR8_IO_PORTD:
367      {
368         if (data == m_port_d) break;
369369#if LOG_PORTS
370            UINT8 old_port_d = m_port_d;
371            UINT8 changed = data ^ old_port_d;
370         UINT8 old_port_d = m_port_d;
371         UINT8 changed = data ^ old_port_d;
372372
373            printf("[%08X] ", m_maincpu->m_shifted_pc);
374            if(changed & PORTD_SCL) printf("[D] PORTD_SCL: %s\n", data & PORTD_SCL ? "HIGH" : "LOW");
375            if(changed & PORTD_SDA) printf("[D] PORTD_SDA: %s\n", data & PORTD_SDA ? "HIGH" : "LOW");
376            if(changed & EX_RX_1280) printf("[D] EX_RX_1280: %s\n", data & EX_RX_1280 ? "HIGH" : "LOW");
377            if(changed & EX_TX_1280) printf("[D] EX_TX_1280: %s\n", data & EX_TX_1280 ? "HIGH" : "LOW");
373         printf("[%08X] ", m_maincpu->m_shifted_pc);
374         if(changed & PORTD_SCL) printf("[D] PORTD_SCL: %s\n", data & PORTD_SCL ? "HIGH" : "LOW");
375         if(changed & PORTD_SDA) printf("[D] PORTD_SDA: %s\n", data & PORTD_SDA ? "HIGH" : "LOW");
376         if(changed & EX_RX_1280) printf("[D] EX_RX_1280: %s\n", data & EX_RX_1280 ? "HIGH" : "LOW");
377         if(changed & EX_TX_1280) printf("[D] EX_TX_1280: %s\n", data & EX_TX_1280 ? "HIGH" : "LOW");
378378#endif
379            m_port_d = data;
380            break;
381        }
382        case AVR8_IO_PORTE:
383        {
384            if (data == m_port_e) break;
379         m_port_d = data;
380         break;
381      }
382      case AVR8_IO_PORTE:
383      {
384         if (data == m_port_e) break;
385385#if LOG_PORTS
386            UINT8 old_port_e = m_port_e;
387            UINT8 changed = data ^ old_port_e;
386         UINT8 old_port_e = m_port_e;
387         UINT8 changed = data ^ old_port_e;
388388
389            printf("[%08X] ", m_maincpu->m_shifted_pc);
390            if(changed & RX_1280) printf("[E] 1280-RX: %s\n", data & RX_1280 ? "HIGH" : "LOW");
391            if(changed & TX_1280) printf("[E] 1280-TX: %s\n", data & TX_1280 ? "HIGH" : "LOW");
392            if(changed & THERMO_SCK) printf("[E] THERMO-SCK: %s\n", data & THERMO_SCK ? "HIGH" : "LOW");
393            if(changed & THERMO_CS1) printf("[E] THERMO-CS1: %s\n", data & THERMO_CS1 ? "HIGH" : "LOW");
394            if(changed & THERMO_CS2) printf("[E] THERMO-CS2: %s\n", data & THERMO_CS2 ? "HIGH" : "LOW");
395            if(changed & THERMO_DO) printf("[E] THERMO-DO: %s\n", data & THERMO_DO ? "HIGH" : "LOW");
389         printf("[%08X] ", m_maincpu->m_shifted_pc);
390         if(changed & RX_1280) printf("[E] 1280-RX: %s\n", data & RX_1280 ? "HIGH" : "LOW");
391         if(changed & TX_1280) printf("[E] 1280-TX: %s\n", data & TX_1280 ? "HIGH" : "LOW");
392         if(changed & THERMO_SCK) printf("[E] THERMO-SCK: %s\n", data & THERMO_SCK ? "HIGH" : "LOW");
393         if(changed & THERMO_CS1) printf("[E] THERMO-CS1: %s\n", data & THERMO_CS1 ? "HIGH" : "LOW");
394         if(changed & THERMO_CS2) printf("[E] THERMO-CS2: %s\n", data & THERMO_CS2 ? "HIGH" : "LOW");
395         if(changed & THERMO_DO) printf("[E] THERMO-DO: %s\n", data & THERMO_DO ? "HIGH" : "LOW");
396396#endif
397            m_port_e = data;
398            break;
399        }
400        case AVR8_IO_PORTF:
401        {
402            if (data == m_port_f) break;
397         m_port_e = data;
398         break;
399      }
400      case AVR8_IO_PORTF:
401      {
402         if (data == m_port_f) break;
403403#if LOG_PORTS
404            UINT8 old_port_f = m_port_f;
405            UINT8 changed = data ^ old_port_f;
404         UINT8 old_port_f = m_port_f;
405         UINT8 changed = data ^ old_port_f;
406406
407            printf("[%08X] ", m_maincpu->m_shifted_pc);
408            if(changed & X_AXIS_DIR) printf("[F] X_AXIS_DIR: %s\n", data & X_AXIS_DIR ? "HIGH" : "LOW");
409            if(changed & X_AXIS_STEP) printf("[F] X_AXIS_STEP: %s\n", data & X_AXIS_STEP ? "HIGH" : "LOW");
410            if(changed & X_AXIS_EN) printf("[F] X_AXIS_EN: %s\n", data & X_AXIS_EN ? "HIGH" : "LOW");
411            if(changed & X_AXIS_POT) printf("[F] X_AXIS_POT: %s\n", data & X_AXIS_POT ? "HIGH" : "LOW");
412            if(changed & Y_AXIS_DIR) printf("[F] Y_AXIS_DIR: %s\n", data & Y_AXIS_DIR ? "HIGH" : "LOW");
413            if(changed & Y_AXIS_STEP) printf("[F] Y_AXIS_STEP: %s\n", data & Y_AXIS_STEP ? "HIGH" : "LOW");
414            if(changed & Y_AXIS_EN) printf("[F] Y_AXIS_EN: %s\n", data & Y_AXIS_EN ? "HIGH" : "LOW");
415            if(changed & Y_AXIS_POT) printf("[F] Y_AXIS_POT: %s\n", data & Y_AXIS_POT ? "HIGH" : "LOW");
407         printf("[%08X] ", m_maincpu->m_shifted_pc);
408         if(changed & X_AXIS_DIR) printf("[F] X_AXIS_DIR: %s\n", data & X_AXIS_DIR ? "HIGH" : "LOW");
409         if(changed & X_AXIS_STEP) printf("[F] X_AXIS_STEP: %s\n", data & X_AXIS_STEP ? "HIGH" : "LOW");
410         if(changed & X_AXIS_EN) printf("[F] X_AXIS_EN: %s\n", data & X_AXIS_EN ? "HIGH" : "LOW");
411         if(changed & X_AXIS_POT) printf("[F] X_AXIS_POT: %s\n", data & X_AXIS_POT ? "HIGH" : "LOW");
412         if(changed & Y_AXIS_DIR) printf("[F] Y_AXIS_DIR: %s\n", data & Y_AXIS_DIR ? "HIGH" : "LOW");
413         if(changed & Y_AXIS_STEP) printf("[F] Y_AXIS_STEP: %s\n", data & Y_AXIS_STEP ? "HIGH" : "LOW");
414         if(changed & Y_AXIS_EN) printf("[F] Y_AXIS_EN: %s\n", data & Y_AXIS_EN ? "HIGH" : "LOW");
415         if(changed & Y_AXIS_POT) printf("[F] Y_AXIS_POT: %s\n", data & Y_AXIS_POT ? "HIGH" : "LOW");
416416#endif
417            m_port_f = data;
418            break;
419        }
420        case AVR8_IO_PORTG:
421        {
422            if (data == m_port_g) break;
417         m_port_f = data;
418         break;
419      }
420      case AVR8_IO_PORTG:
421      {
422         if (data == m_port_g) break;
423423
424            UINT8 old_port_g = m_port_g;
425            UINT8 changed = data ^ old_port_g;
424         UINT8 old_port_g = m_port_g;
425         UINT8 changed = data ^ old_port_g;
426426
427427#if LOG_PORTS
428            printf("[%08X] ", m_maincpu->m_shifted_pc);
429            if(changed & EX4_1280) printf("[G] EX4_1280: %s\n", data & EX4_1280 ? "HIGH" : "LOW");
430            if(changed & EX3_1280) printf("[G] EX3_1280: %s\n", data & EX3_1280 ? "HIGH" : "LOW");
431            if(changed & B_AXIS_EN) printf("[G] B_AXIS_EN: %s\n", data & B_AXIS_EN ? "HIGH" : "LOW");
432            if(changed & CUTOFF_SR_CHECK) printf("[G] CUTOFF_SR_CHECK: %s\n", data & CUTOFF_SR_CHECK ? "HIGH" : "LOW");
433            if(changed & BUZZ) printf("[G] BUZZ: %s\n", data & BUZZ ? "HIGH" : "LOW");
428         printf("[%08X] ", m_maincpu->m_shifted_pc);
429         if(changed & EX4_1280) printf("[G] EX4_1280: %s\n", data & EX4_1280 ? "HIGH" : "LOW");
430         if(changed & EX3_1280) printf("[G] EX3_1280: %s\n", data & EX3_1280 ? "HIGH" : "LOW");
431         if(changed & B_AXIS_EN) printf("[G] B_AXIS_EN: %s\n", data & B_AXIS_EN ? "HIGH" : "LOW");
432         if(changed & CUTOFF_SR_CHECK) printf("[G] CUTOFF_SR_CHECK: %s\n", data & CUTOFF_SR_CHECK ? "HIGH" : "LOW");
433         if(changed & BUZZ) printf("[G] BUZZ: %s\n", data & BUZZ ? "HIGH" : "LOW");
434434#endif
435435
436            if(changed & BUZZ){
437                /* FIX-ME: What is the largest sample value allowed?
438                I'm using 0x3F based on what I see in src/mame/drivers/craft.c
439                But as the method is called "write_unsigned8", I guess we could have samples with values up to 0xFF, right?
440                Anyway... With the 0x3F value we'll get a sound that is not so loud, which may be less annoying... :-)
441                */
442                UINT8 audio_sample = (data & BUZZ) ? 0x3F : 0;
443                m_dac->write_unsigned8(audio_sample << 1);
444            }
436         if(changed & BUZZ){
437            /* FIX-ME: What is the largest sample value allowed?
438            I'm using 0x3F based on what I see in src/mame/drivers/craft.c
439            But as the method is called "write_unsigned8", I guess we could have samples with values up to 0xFF, right?
440            Anyway... With the 0x3F value we'll get a sound that is not so loud, which may be less annoying... :-)
441            */
442            UINT8 audio_sample = (data & BUZZ) ? 0x3F : 0;
443            m_dac->write_unsigned8(audio_sample << 1);
444         }
445445
446            m_port_g = data;
447            break;
448        }
449        case AVR8_IO_PORTH:
450        {
451            if (data == m_port_h) break;
446         m_port_g = data;
447         break;
448      }
449      case AVR8_IO_PORTH:
450      {
451         if (data == m_port_h) break;
452452#if LOG_PORTS
453            UINT8 old_port_h = m_port_h;
454            UINT8 changed = data ^ old_port_h;
453         UINT8 old_port_h = m_port_h;
454         UINT8 changed = data ^ old_port_h;
455455
456            printf("[%08X] ", m_maincpu->m_shifted_pc);
457            if(changed & CUTOFF_TEST) printf("[H] CUTOFF_TEST: %s\n", data & CUTOFF_TEST ? "HIGH" : "LOW");
458            if(changed & CUTOFF_RESET) printf("[H] CUTOFF_RESET: %s\n", data & CUTOFF_RESET ? "HIGH" : "LOW");
459            if(changed & EX1_PWR_CHECK) printf("[H] EX1_PWR_CHECK: %s\n", data & EX1_PWR_CHECK ? "HIGH" : "LOW");
460            if(changed & EX1_HEAT) printf("[H] EX1_HEAT: %s\n", data & EX1_HEAT ? "HIGH" : "LOW");
461            if(changed & EX1_FAN) printf("[H] EX1_FAN: %s\n", data & EX1_FAN ? "HIGH" : "LOW");
462            if(changed & SD_WP) printf("[H] SD_WP: %s\n", data & SD_WP ? "HIGH" : "LOW");
463            if(changed & SD_CD) printf("[H] SD_CD: %s\n", data & SD_CD ? "HIGH" : "LOW");
456         printf("[%08X] ", m_maincpu->m_shifted_pc);
457         if(changed & CUTOFF_TEST) printf("[H] CUTOFF_TEST: %s\n", data & CUTOFF_TEST ? "HIGH" : "LOW");
458         if(changed & CUTOFF_RESET) printf("[H] CUTOFF_RESET: %s\n", data & CUTOFF_RESET ? "HIGH" : "LOW");
459         if(changed & EX1_PWR_CHECK) printf("[H] EX1_PWR_CHECK: %s\n", data & EX1_PWR_CHECK ? "HIGH" : "LOW");
460         if(changed & EX1_HEAT) printf("[H] EX1_HEAT: %s\n", data & EX1_HEAT ? "HIGH" : "LOW");
461         if(changed & EX1_FAN) printf("[H] EX1_FAN: %s\n", data & EX1_FAN ? "HIGH" : "LOW");
462         if(changed & SD_WP) printf("[H] SD_WP: %s\n", data & SD_WP ? "HIGH" : "LOW");
463         if(changed & SD_CD) printf("[H] SD_CD: %s\n", data & SD_CD ? "HIGH" : "LOW");
464464#endif
465            m_port_h = data;
466            break;
467        }
468        case AVR8_IO_PORTJ:
469        {
470            if (data == m_port_j) break;
465         m_port_h = data;
466         break;
467      }
468      case AVR8_IO_PORTJ:
469      {
470         if (data == m_port_j) break;
471471#if LOG_PORTS
472            UINT8 old_port_j = m_port_j;
473            UINT8 changed = data ^ old_port_j;
472         UINT8 old_port_j = m_port_j;
473         UINT8 changed = data ^ old_port_j;
474474
475            printf("[%08X] ", m_maincpu->m_shifted_pc);
476            if(changed & BUTTON_CENTER) printf("[J] BUTTON_CENTER: %s\n", data & BUTTON_CENTER ? "HIGH" : "LOW");
477            if(changed & BUTTON_RIGHT) printf("[J] BUTTON_RIGHT: %s\n", data & BUTTON_RIGHT ? "HIGH" : "LOW");
478            if(changed & BUTTON_LEFT) printf("[J] BUTTON_LEFT: %s\n", data & BUTTON_LEFT ? "HIGH" : "LOW");
479            if(changed & BUTTON_DOWN) printf("[J] BUTTON_DOWN: %s\n", data & BUTTON_DOWN ? "HIGH" : "LOW");
480            if(changed & BUTTON_UP) printf("[J] BUTTON_UP: %s\n", data & BUTTON_UP ? "HIGH" : "LOW");
481            if(changed & POTS_SCL) printf("[J] POTS_SCL: %s\n", data & POTS_SCL ? "HIGH" : "LOW");
482            if(changed & B_AXIS_POT) printf("[J] B_AXIS_POT: %s\n", data & B_AXIS_POT ? "HIGH" : "LOW");
475         printf("[%08X] ", m_maincpu->m_shifted_pc);
476         if(changed & BUTTON_CENTER) printf("[J] BUTTON_CENTER: %s\n", data & BUTTON_CENTER ? "HIGH" : "LOW");
477         if(changed & BUTTON_RIGHT) printf("[J] BUTTON_RIGHT: %s\n", data & BUTTON_RIGHT ? "HIGH" : "LOW");
478         if(changed & BUTTON_LEFT) printf("[J] BUTTON_LEFT: %s\n", data & BUTTON_LEFT ? "HIGH" : "LOW");
479         if(changed & BUTTON_DOWN) printf("[J] BUTTON_DOWN: %s\n", data & BUTTON_DOWN ? "HIGH" : "LOW");
480         if(changed & BUTTON_UP) printf("[J] BUTTON_UP: %s\n", data & BUTTON_UP ? "HIGH" : "LOW");
481         if(changed & POTS_SCL) printf("[J] POTS_SCL: %s\n", data & POTS_SCL ? "HIGH" : "LOW");
482         if(changed & B_AXIS_POT) printf("[J] B_AXIS_POT: %s\n", data & B_AXIS_POT ? "HIGH" : "LOW");
483483#endif
484            m_port_j = data;
485            break;
486        }
487        case AVR8_IO_PORTK:
488        {
489            if (data == m_port_k) break;
484         m_port_j = data;
485         break;
486      }
487      case AVR8_IO_PORTK:
488      {
489         if (data == m_port_k) break;
490490#if LOG_PORTS
491            UINT8 old_port_k = m_port_k;
492            UINT8 changed = data ^ old_port_k;
491         UINT8 old_port_k = m_port_k;
492         UINT8 changed = data ^ old_port_k;
493493
494            printf("[%08X] ", m_maincpu->m_shifted_pc);
495            if(changed & Z_AXIS_DIR) printf("[K] Z_AXIS_DIR: %s\n", data & Z_AXIS_DIR ? "HIGH" : "LOW");
496            if(changed & Z_AXIS_STEP) printf("[K] Z_AXIS_STEP: %s\n", data & Z_AXIS_STEP ? "HIGH" : "LOW");
497            if(changed & Z_AXIS_EN) printf("[K] Z_AXIS_EN: %s\n", data & Z_AXIS_EN ? "HIGH" : "LOW");
498            if(changed & Z_AXIS_POT) printf("[K] Z_AXIS_POT: %s\n", data & Z_AXIS_POT ? "HIGH" : "LOW");
499            if(changed & EX7_1280) printf("[K] EX7_1280: %s\n", data & EX7_1280 ? "HIGH" : "LOW");
500            if(changed & EX6_1280) printf("[K] EX6_1280: %s\n", data & EX6_1280 ? "HIGH" : "LOW");
501            if(changed & EX5_1280) printf("[K] EX5_1280: %s\n", data & EX5_1280 ? "HIGH" : "LOW");
502            if(changed & HBP_THERM) printf("[K] HBP_THERM: %s\n", data & HBP_THERM ? "HIGH" : "LOW");
494         printf("[%08X] ", m_maincpu->m_shifted_pc);
495         if(changed & Z_AXIS_DIR) printf("[K] Z_AXIS_DIR: %s\n", data & Z_AXIS_DIR ? "HIGH" : "LOW");
496         if(changed & Z_AXIS_STEP) printf("[K] Z_AXIS_STEP: %s\n", data & Z_AXIS_STEP ? "HIGH" : "LOW");
497         if(changed & Z_AXIS_EN) printf("[K] Z_AXIS_EN: %s\n", data & Z_AXIS_EN ? "HIGH" : "LOW");
498         if(changed & Z_AXIS_POT) printf("[K] Z_AXIS_POT: %s\n", data & Z_AXIS_POT ? "HIGH" : "LOW");
499         if(changed & EX7_1280) printf("[K] EX7_1280: %s\n", data & EX7_1280 ? "HIGH" : "LOW");
500         if(changed & EX6_1280) printf("[K] EX6_1280: %s\n", data & EX6_1280 ? "HIGH" : "LOW");
501         if(changed & EX5_1280) printf("[K] EX5_1280: %s\n", data & EX5_1280 ? "HIGH" : "LOW");
502         if(changed & HBP_THERM) printf("[K] HBP_THERM: %s\n", data & HBP_THERM ? "HIGH" : "LOW");
503503#endif
504            m_port_k = data;
505            break;
506        }
507        case AVR8_IO_PORTL:
508        {
509            if (data == m_port_l) break;
504         m_port_k = data;
505         break;
506      }
507      case AVR8_IO_PORTL:
508      {
509         if (data == m_port_l) break;
510510#if LOG_PORTS
511            UINT8 old_port_l = m_port_l;
512            UINT8 changed = data ^ old_port_l;
511         UINT8 old_port_l = m_port_l;
512         UINT8 changed = data ^ old_port_l;
513513
514            printf("[%08X] ", m_maincpu->m_shifted_pc);
515            if(changed & X_MIN) printf("[L] X_MIN: %s\n", data & X_MIN ? "HIGH" : "LOW");
516            if(changed & X_MAX) printf("[L] X_MAX: %s\n", data & X_MAX ? "HIGH" : "LOW");
517            if(changed & Y_MIN) printf("[L] Y_MIN: %s\n", data & Y_MIN ? "HIGH" : "LOW");
518            if(changed & Y_MAX) printf("[L] Y_MAX: %s\n", data & Y_MAX ? "HIGH" : "LOW");
519            if(changed & HBP) printf("[L] HBP: %s\n", data & HBP ? "HIGH" : "LOW");
520            if(changed & EXTRA_FET) printf("[L] EXTRA_FET: %s\n", data & EXTRA_FET ? "HIGH" : "LOW");
521            if(changed & Z_MIN) printf("[L] Z_MIN: %s\n", data & Z_MIN ? "HIGH" : "LOW");
522            if(changed & Z_MAX) printf("[L] Z_MAX: %s\n", data & Z_MAX ? "HIGH" : "LOW");
514         printf("[%08X] ", m_maincpu->m_shifted_pc);
515         if(changed & X_MIN) printf("[L] X_MIN: %s\n", data & X_MIN ? "HIGH" : "LOW");
516         if(changed & X_MAX) printf("[L] X_MAX: %s\n", data & X_MAX ? "HIGH" : "LOW");
517         if(changed & Y_MIN) printf("[L] Y_MIN: %s\n", data & Y_MIN ? "HIGH" : "LOW");
518         if(changed & Y_MAX) printf("[L] Y_MAX: %s\n", data & Y_MAX ? "HIGH" : "LOW");
519         if(changed & HBP) printf("[L] HBP: %s\n", data & HBP ? "HIGH" : "LOW");
520         if(changed & EXTRA_FET) printf("[L] EXTRA_FET: %s\n", data & EXTRA_FET ? "HIGH" : "LOW");
521         if(changed & Z_MIN) printf("[L] Z_MIN: %s\n", data & Z_MIN ? "HIGH" : "LOW");
522         if(changed & Z_MAX) printf("[L] Z_MAX: %s\n", data & Z_MAX ? "HIGH" : "LOW");
523523#endif
524            m_port_l = data;
525            break;
526        }
527    }
524         m_port_l = data;
525         break;
526      }
527   }
528528}
529529
530530/****************************************************\
r249924r249925
532532\****************************************************/
533533
534534static ADDRESS_MAP_START( replicator_prg_map, AS_PROGRAM, 8, replicator_state )
535    AM_RANGE(0x0000, 0x1FFFF) AM_ROM
535   AM_RANGE(0x0000, 0x1FFFF) AM_ROM
536536ADDRESS_MAP_END
537537
538538static ADDRESS_MAP_START( replicator_data_map, AS_DATA, 8, replicator_state )
539    AM_RANGE(0x0200, 0x21FF) AM_RAM  /* ATMEGA1280 Internal SRAM */
539   AM_RANGE(0x0200, 0x21FF) AM_RAM  /* ATMEGA1280 Internal SRAM */
540540ADDRESS_MAP_END
541541
542542static ADDRESS_MAP_START( replicator_io_map, AS_IO, 8, replicator_state )
543    AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w )
543   AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w )
544544ADDRESS_MAP_END
545545
546546/****************************************************\
r249924r249925
548548\****************************************************/
549549
550550static INPUT_PORTS_START( replicator )
551    PORT_START("keypad")
552    PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CENTER") PORT_CODE(KEYCODE_M)
553    PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_D)
554    PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_A)
555    PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_S)
556    PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_W)
551   PORT_START("keypad")
552   PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CENTER") PORT_CODE(KEYCODE_M)
553   PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_D)
554   PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_A)
555   PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_S)
556   PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("UP") PORT_CODE(KEYCODE_W)
557557INPUT_PORTS_END
558558
559559/****************************************************\
r249924r249925
566566
567567void replicator_state::machine_reset()
568568{
569    shift_register_value = 0;
570    m_port_a = 0;
571    m_port_b = 0;
572    m_port_c = 0;
573    m_port_d = 0;
574    m_port_e = 0;
575    m_port_f = 0;
576    m_port_g = 0;
577    m_port_h = 0;
578    m_port_j = 0;
579    m_port_k = 0;
580    m_port_l = 0;
569   shift_register_value = 0;
570   m_port_a = 0;
571   m_port_b = 0;
572   m_port_c = 0;
573   m_port_d = 0;
574   m_port_e = 0;
575   m_port_f = 0;
576   m_port_g = 0;
577   m_port_h = 0;
578   m_port_j = 0;
579   m_port_k = 0;
580   m_port_l = 0;
581581}
582582
583583PALETTE_INIT_MEMBER(replicator_state, replicator)
584584{
585585//These colors were picked with the color picker in Inkscape, based on a photo of the LCD used in the Replicator 1 3d printer:
586    palette.set_pen_color(0, rgb_t(0xCA, 0xE7, 0xEB));
587    palette.set_pen_color(1, rgb_t(0x78, 0xAB, 0xA8));
586   palette.set_pen_color(0, rgb_t(0xCA, 0xE7, 0xEB));
587   palette.set_pen_color(1, rgb_t(0x78, 0xAB, 0xA8));
588588}
589589
590590static const gfx_layout hd44780_charlayout =
591591{
592    5, 8,                   /* 5 x 8 characters */
593    256,                    /* 256 characters */
594    1,                      /* 1 bits per pixel */
595    { 0 },                  /* no bitplanes */
596    { 3, 4, 5, 6, 7},
597    { 0, 8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8},
598    8*8                     /* 8 bytes */
592   5, 8,                   /* 5 x 8 characters */
593   256,                    /* 256 characters */
594   1,                      /* 1 bits per pixel */
595   { 0 },                  /* no bitplanes */
596   { 3, 4, 5, 6, 7},
597   { 0, 8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8},
598   8*8                     /* 8 bytes */
599599};
600600
601601static GFXDECODE_START( replicator )
602    GFXDECODE_ENTRY( "hd44780:cgrom", 0x0000, hd44780_charlayout, 0, 1 )
602   GFXDECODE_ENTRY( "hd44780:cgrom", 0x0000, hd44780_charlayout, 0, 1 )
603603GFXDECODE_END
604604
605605static MACHINE_CONFIG_START( replicator, replicator_state )
606606
607    MCFG_CPU_ADD("maincpu", ATMEGA1280, MASTER_CLOCK)
608    MCFG_CPU_PROGRAM_MAP(replicator_prg_map)
609    MCFG_CPU_DATA_MAP(replicator_data_map)
610    MCFG_CPU_IO_MAP(replicator_io_map)
607   MCFG_CPU_ADD("maincpu", ATMEGA1280, MASTER_CLOCK)
608   MCFG_CPU_PROGRAM_MAP(replicator_prg_map)
609   MCFG_CPU_DATA_MAP(replicator_data_map)
610   MCFG_CPU_IO_MAP(replicator_io_map)
611611
612    MCFG_CPU_AVR8_EEPROM("eeprom")
613    MCFG_CPU_AVR8_LFUSE(0xFF)
614    MCFG_CPU_AVR8_HFUSE(0xDA)
615    MCFG_CPU_AVR8_EFUSE(0xF4)
616    MCFG_CPU_AVR8_LOCK(0x0F)
612   MCFG_CPU_AVR8_EEPROM("eeprom")
613   MCFG_CPU_AVR8_LFUSE(0xFF)
614   MCFG_CPU_AVR8_HFUSE(0xDA)
615   MCFG_CPU_AVR8_EFUSE(0xF4)
616   MCFG_CPU_AVR8_LOCK(0x0F)
617617
618    /*TODO: Add an ATMEGA8U2 for USB-Serial communications */
618   /*TODO: Add an ATMEGA8U2 for USB-Serial communications */
619619
620    /* video hardware */
621    MCFG_SCREEN_ADD("screen", LCD)
622    MCFG_SCREEN_REFRESH_RATE(50)
623    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
624    MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
625    MCFG_SCREEN_SIZE(120, 18*2) //4x20 chars
626    MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 18*2-1)
627    MCFG_SCREEN_PALETTE("palette")
620   /* video hardware */
621   MCFG_SCREEN_ADD("screen", LCD)
622   MCFG_SCREEN_REFRESH_RATE(50)
623   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
624   MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
625   MCFG_SCREEN_SIZE(120, 18*2) //4x20 chars
626   MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 18*2-1)
627   MCFG_SCREEN_PALETTE("palette")
628628
629    MCFG_PALETTE_ADD("palette", 2)
630    MCFG_PALETTE_INIT_OWNER(replicator_state, replicator)
631    MCFG_GFXDECODE_ADD("gfxdecode", "palette", replicator)
632    MCFG_DEFAULT_LAYOUT(layout_lcd)
629   MCFG_PALETTE_ADD("palette", 2)
630   MCFG_PALETTE_INIT_OWNER(replicator_state, replicator)
631   MCFG_GFXDECODE_ADD("gfxdecode", "palette", replicator)
632   MCFG_DEFAULT_LAYOUT(layout_lcd)
633633
634    MCFG_HD44780_ADD("hd44780")
635    MCFG_HD44780_LCD_SIZE(4, 20)
634   MCFG_HD44780_ADD("hd44780")
635   MCFG_HD44780_LCD_SIZE(4, 20)
636636
637    /* sound hardware */
638    /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */
639    MCFG_SPEAKER_STANDARD_MONO("buzzer")
640    MCFG_SOUND_ADD("dac", DAC, 0)
641    MCFG_SOUND_ROUTE(0, "buzzer", 1.00)
637   /* sound hardware */
638   /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */
639   MCFG_SPEAKER_STANDARD_MONO("buzzer")
640   MCFG_SOUND_ADD("dac", DAC, 0)
641   MCFG_SOUND_ROUTE(0, "buzzer", 1.00)
642642
643643MACHINE_CONFIG_END
644644
645645ROM_START( replica1 )
646    ROM_REGION( 0x20000, "maincpu", 0 )
647    ROM_DEFAULT_BIOS("v750")
646   ROM_REGION( 0x20000, "maincpu", 0 )
647   ROM_DEFAULT_BIOS("v750")
648648
649    /* Version 5.1 release:
650    - Initial firmware release
651    */
652    ROM_SYSTEM_BIOS( 0, "v51", "V 5.1" )
653    ROMX_LOAD("mighty-mb40-v5.1.bin", 0x0000, 0x10b90, CRC(20d65cd1) SHA1(da18c3eb5a29a6bc1eecd92eaae6063fe29d0305), ROM_BIOS(1))
649   /* Version 5.1 release:
650   - Initial firmware release
651   */
652   ROM_SYSTEM_BIOS( 0, "v51", "V 5.1" )
653   ROMX_LOAD("mighty-mb40-v5.1.bin", 0x0000, 0x10b90, CRC(20d65cd1) SHA1(da18c3eb5a29a6bc1eecd92eaae6063fe29d0305), ROM_BIOS(1))
654654
655    /* Version 5.2 release:
656    - Nozzle Tolerance added to EEPROM
657    - Updated onboard menus
658    - X,Y calibration tool added
659    */
660    ROM_SYSTEM_BIOS( 1, "v52", "V 5.2" )
661    ROMX_LOAD("mighty-mb40-v5.2.bin", 0x0000, 0x126c4, CRC(555e47cf) SHA1(9d24a3dbeddce16669bb4d29c3366220ddf15d2a), ROM_BIOS(2))
655   /* Version 5.2 release:
656   - Nozzle Tolerance added to EEPROM
657   - Updated onboard menus
658   - X,Y calibration tool added
659   */
660   ROM_SYSTEM_BIOS( 1, "v52", "V 5.2" )
661   ROMX_LOAD("mighty-mb40-v5.2.bin", 0x0000, 0x126c4, CRC(555e47cf) SHA1(9d24a3dbeddce16669bb4d29c3366220ddf15d2a), ROM_BIOS(2))
662662
663    /* Version 5.5 release:
664    - Acceleration added to motor motion
665    - Digipot updates
666    */
667    ROM_SYSTEM_BIOS( 2, "v55", "V 5.5" )
668    ROMX_LOAD("mighty-mb40-v5.5.bin", 0x0000, 0x1a420, CRC(9327d7e4) SHA1(d734ba2bda12f50ec3ac0035ab11591909d9edde), ROM_BIOS(3))
663   /* Version 5.5 release:
664   - Acceleration added to motor motion
665   - Digipot updates
666   */
667   ROM_SYSTEM_BIOS( 2, "v55", "V 5.5" )
668   ROMX_LOAD("mighty-mb40-v5.5.bin", 0x0000, 0x1a420, CRC(9327d7e4) SHA1(d734ba2bda12f50ec3ac0035ab11591909d9edde), ROM_BIOS(3))
669669
670    /* Version 6.2.0 release:
671    - Bug fix release to firmware 6.0
672    - Addresses wavy print issue above 1cm
673    - Left extruder prints with makerware.
674    */
675    ROM_SYSTEM_BIOS( 3, "v620", "V 6.2.0" )
676    ROMX_LOAD("mighty_one_v6.2.0.bin", 0x0000, 0x1cf54, CRC(00df6f48) SHA1(db05afc2e1ebc104fb04753634a911187e396556), ROM_BIOS(4))
670   /* Version 6.2.0 release:
671   - Bug fix release to firmware 6.0
672   - Addresses wavy print issue above 1cm
673   - Left extruder prints with makerware.
674   */
675   ROM_SYSTEM_BIOS( 3, "v620", "V 6.2.0" )
676   ROMX_LOAD("mighty_one_v6.2.0.bin", 0x0000, 0x1cf54, CRC(00df6f48) SHA1(db05afc2e1ebc104fb04753634a911187e396556), ROM_BIOS(4))
677677
678    /* Version 7.0.0 release:
679    - Major upgrade to Stepper Motor Smoothness (via Sailfish team)
680    - X3G format introduced
681    - Heaters default to leaving 'preheat' on more of the time
682    */
683    ROM_SYSTEM_BIOS( 4, "v700", "V 7.0.0" )
684    ROMX_LOAD("mighty_one_v7.0.0.bin", 0x0000, 0x1cb52, CRC(aa2a5fcf) SHA1(934e642b0b2d007689249680bad03c9255ae016a), ROM_BIOS(5))
678   /* Version 7.0.0 release:
679   - Major upgrade to Stepper Motor Smoothness (via Sailfish team)
680   - X3G format introduced
681   - Heaters default to leaving 'preheat' on more of the time
682   */
683   ROM_SYSTEM_BIOS( 4, "v700", "V 7.0.0" )
684   ROMX_LOAD("mighty_one_v7.0.0.bin", 0x0000, 0x1cb52, CRC(aa2a5fcf) SHA1(934e642b0b2d007689249680bad03c9255ae016a), ROM_BIOS(5))
685685
686    /* Version 7.2.0 release:
687    - Removes support for S3G files
688    - X3G is the recognized format
689    - Minor bug fixes
690    */
691    ROM_SYSTEM_BIOS( 5, "v720", "V 7.2.0" )
692    ROMX_LOAD("mighty_one_v7.2.0.bin", 0x0000, 0x1cb80, CRC(5e546706) SHA1(ed4aaf7522d5a5beea7eb69bf2c85d7a89f8f188), ROM_BIOS(6))
686   /* Version 7.2.0 release:
687   - Removes support for S3G files
688   - X3G is the recognized format
689   - Minor bug fixes
690   */
691   ROM_SYSTEM_BIOS( 5, "v720", "V 7.2.0" )
692   ROMX_LOAD("mighty_one_v7.2.0.bin", 0x0000, 0x1cb80, CRC(5e546706) SHA1(ed4aaf7522d5a5beea7eb69bf2c85d7a89f8f188), ROM_BIOS(6))
693693
694    /* Version 7.3.0 release:
695    - Pause at Z Height
696    - Elapsed time displays during prints
697    - Minor bug fixes
698    */
699    ROM_SYSTEM_BIOS( 6, "v730", "V 7.3.0" )
700    ROMX_LOAD("mighty_one_v7.3.0.bin", 0x0000, 0x1d738, CRC(71811ff5) SHA1(6728ea600ab3ff4b589adca90b0d700d9b70bd18), ROM_BIOS(7))
694   /* Version 7.3.0 release:
695   - Pause at Z Height
696   - Elapsed time displays during prints
697   - Minor bug fixes
698   */
699   ROM_SYSTEM_BIOS( 6, "v730", "V 7.3.0" )
700   ROMX_LOAD("mighty_one_v7.3.0.bin", 0x0000, 0x1d738, CRC(71811ff5) SHA1(6728ea600ab3ff4b589adca90b0d700d9b70bd18), ROM_BIOS(7))
701701
702    /* Version 7.4.0 (bugfix) release:
703    - Fixes issues with Z Pause and elapsed print time
704    */
705    ROM_SYSTEM_BIOS( 7, "v740", "V 7.4.0" )
706    ROMX_LOAD("mighty_one_v7.4.0.bin", 0x0000, 0x1b9e2, CRC(97b05a27) SHA1(76ca2c9c1db2e006e501c3177a8a1aa693dda0f9), ROM_BIOS(8))
702   /* Version 7.4.0 (bugfix) release:
703   - Fixes issues with Z Pause and elapsed print time
704   */
705   ROM_SYSTEM_BIOS( 7, "v740", "V 7.4.0" )
706   ROMX_LOAD("mighty_one_v7.4.0.bin", 0x0000, 0x1b9e2, CRC(97b05a27) SHA1(76ca2c9c1db2e006e501c3177a8a1aa693dda0f9), ROM_BIOS(8))
707707
708    /* Version 7.5.0 (bugfix) release:
709    - Fixes issue with Heat Hold
710    */
711    ROM_SYSTEM_BIOS( 8, "v750", "V 7.5.0" )
712    ROMX_LOAD("mighty_one_v7.5.0.bin", 0x0000, 0x1b9c4, CRC(169d6709) SHA1(62b5aacd1bc46969042aea7a50531ec467a4ff1f), ROM_BIOS(9))
708   /* Version 7.5.0 (bugfix) release:
709   - Fixes issue with Heat Hold
710   */
711   ROM_SYSTEM_BIOS( 8, "v750", "V 7.5.0" )
712   ROMX_LOAD("mighty_one_v7.5.0.bin", 0x0000, 0x1b9c4, CRC(169d6709) SHA1(62b5aacd1bc46969042aea7a50531ec467a4ff1f), ROM_BIOS(9))
713713
714    /* Sailfish firmware image - Metam??quina experimental build v7.5.0 */
715    ROM_SYSTEM_BIOS( 9, "v750mm", "V 7.5.0 - Metam??quina" )
716    ROMX_LOAD("mighty_one_v7.5.0.mm.bin", 0x0000, 0x1ef9a, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69), ROM_BIOS(10))
714   /* Sailfish firmware image - Metam??quina experimental build v7.5.0 */
715   ROM_SYSTEM_BIOS( 9, "v750mm", "V 7.5.0 - Metam??quina" )
716   ROMX_LOAD("mighty_one_v7.5.0.mm.bin", 0x0000, 0x1ef9a, CRC(0d36d9e7) SHA1(a53899775b4c4eea87b6903758ebb75f06710a69), ROM_BIOS(10))
717717
718718
719    /*Arduino MEGA bootloader */
720    ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) )
719   /*Arduino MEGA bootloader */
720   ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) )
721721
722    /* on-die 4kbyte eeprom */
723    ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF )
722   /* on-die 4kbyte eeprom */
723   ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF )
724724ROM_END
725725
726726/*   YEAR  NAME      PARENT    COMPAT    MACHINE   INPUT     INIT      COMPANY          FULLNAME */
trunk/src/mame/drivers/segac2.c
r249924r249925
3030    1992  Puyo Puyo                  Sega / Compile    317-0203         C2     171-5992A
3131    1992  Tant-R (Japan)             Sega              317-0211         C2
3232    1992  Tant-R (Korea)             Sega              ?                C2
33   1993  SegaSonic Popcorn Shop     Sega              317-0140         C2
33    1993  SegaSonic Popcorn Shop     Sega              317-0140         C2
3434    1994  PotoPoto (Japan)           Sega              317-0218         C2
3535    1994  Stack Columns (Japan)      Sega              317-0219         C2
3636    1994  Stack Columns (World)      Sega              317-0223         C2
trunk/src/mame/drivers/segas24.c
r249924r249925
880880
881881   if (irq_tmode == 1 || irq_tmode == 2)
882882   {
883   //   m_screen->update_now();
883   //  m_screen->update_now();
884884      m_screen->update_partial(m_screen->vpos());
885885   }
886886}
trunk/src/mame/drivers/shougi.c
r249924r249925
122122{
123123   m_nmi_enabled = 0;
124124   m_r = 0;
125   
125
126126   save_item(NAME(m_nmi_enabled));
127127   save_item(NAME(m_r));
128128}
r249924r249925
236236         // 0: sharedram = sub
237237         // 1: sharedram = main
238238         break;
239     
239
240240      case 1:
241241         m_nmi_enabled = data;
242242
r249924r249925
247247            m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
248248         }
249249         break;
250     
250
251251      case 4:
252252         m_mcu->set_input_line(INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE);
253253         break;
254     
254
255255      default:
256256         // 7: ?????? connected to +5v via resistor
257257         break;
trunk/src/mame/drivers/slotcarn.c
r249924r249925
8282{
8383   int co;
8484
85//   m_screen->update_now();
85//  m_screen->update_now();
8686   m_screen->update_partial(m_screen->vpos());
8787   data &= 0x0f;
8888
r249924r249925
158158WRITE_LINE_MEMBER(slotcarn_state::hsync_changed)
159159{
160160   /* update any video up to the current scanline */
161//   m_screen->update_now();
161//  m_screen->update_now();
162162   m_screen->update_partial(m_screen->vpos());
163163}
164164
trunk/src/mame/drivers/subhuntr.c
r249924r249925
22// copyright-holders:David Haywood
33/*
44
5QTY    Type    clock    position    function
62x    2636          Programmable Video Interface
71x    2650    OSC/2 = 1.7897725 MHz       8-bit Microprocessor - main
81x    oscillator    3.579545 MHz       
5QTY     Type    clock   position    function
62x  2636            Programmable Video Interface
71x  2650    OSC/2 = 1.7897725 MHz       8-bit Microprocessor - main
81x  oscillator  3.579545 MHz
99
1010ROMs
11QTY    Type    position    status
124x    2708    6F,6H,6L,6N    dumped
131x    N82S115    2B    dumped
11QTY     Type    position    status
124x  2708    6F,6H,6L,6N     dumped
131x  N82S115     2B  dumped
1414
1515RAMs
16QTY    Type    position
172x    2101   
16QTY     Type    position
172x  2101
1818
1919*/
2020
r249924r249925
3333   }
3434
3535   required_device<cpu_device> m_maincpu;
36   
36
3737   INTERRUPT_GEN_MEMBER(subhuntr_interrupt);
3838
3939   virtual void machine_start();
r249924r249925
7676ADDRESS_MAP_END
7777
7878static ADDRESS_MAP_START( subhuntr_io_map, AS_IO, 8, subhuntr_state )
79//   AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE( ,  )
80//   AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE( ,  )
79//  AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE( ,  )
80//  AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE( ,  )
8181   AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
8282ADDRESS_MAP_END
8383
r249924r249925
136136   MCFG_CPU_IO_MAP(subhuntr_io_map)
137137   MCFG_CPU_VBLANK_INT_DRIVER("screen", subhuntr_state, subhuntr_interrupt)
138138
139//   MCFG_DEVICE_ADD("s2636", S2636, 0)
140//   MCFG_S2636_WORKRAM_SIZE(0x100)
141//   MCFG_S2636_OFFSETS(3, -21)
142//   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
139//  MCFG_DEVICE_ADD("s2636", S2636, 0)
140//  MCFG_S2636_WORKRAM_SIZE(0x100)
141//  MCFG_S2636_OFFSETS(3, -21)
142//  MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
143143
144144   /* video hardware */
145145   MCFG_SCREEN_ADD("screen", RASTER)
r249924r249925
150150   MCFG_SCREEN_VISIBLE_AREA(1*8, 29*8-1, 2*8, 32*8-1)
151151   MCFG_SCREEN_UPDATE_DRIVER(subhuntr_state, screen_update_subhuntr)
152152   MCFG_SCREEN_PALETTE("palette")
153   
153
154154   MCFG_GFXDECODE_ADD("gfxdecode", "palette", subhuntr)
155155
156156   MCFG_PALETTE_ADD("palette", 26)
trunk/src/mame/drivers/timeplt.c
r249924r249925
452452   MCFG_CPU_MODIFY("maincpu")
453453   MCFG_CPU_PROGRAM_MAP(psurge_main_map)
454454   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  nmi_line_pulse)
455   
455
456456   MCFG_VIDEO_START_OVERRIDE(timeplt_state,psurge)
457457MACHINE_CONFIG_END
458458
trunk/src/mame/drivers/unichamp.c
r249924r249925
55 *
66 *  Driver from plgDavid (David Viens)
77 *
8 *  Thanks to Sylvain De Chantal (Sly D.C.) for the 2 test units,
8 *  Thanks to Sylvain De Chantal (Sly D.C.) for the 2 test units,
99 *  carts and FAQ: http://www.ccjvq.com/slydc/index/faq/2711
1010 *
1111 *  Thanks to Paul Robson for the GIC font rom.
1212 *  (http://worstconsole.blogspot.ca/2012/12/the-worstconsoleever.html)
1313 *  Note a spare dead GIC has been given to Lord Nightmare and should be sent for decap!
14 *
14 *
1515 *  The Unisonc Champion is the only known GI "Gimini Mid-Range 8950 Programmable Game Set"
1616 *  to ever reach the market, and only in limited quantities (aprox 500 units ever built)
1717 *
r249924r249925
2121 *  EXEC ROM  : 9501-01009 (40 pin) at 0x0800 (factory mapped)
2222 *
2323 *  The GIC generates the CPU Clock, the video signals and the audio.
24 *  The CPU does NOT access the GIC directly.
25 *  One way CPU->GIC 'communication' takes place through 256 bytes of shared RAM
24 *  The CPU does NOT access the GIC directly.
25 *  One way CPU->GIC 'communication' takes place through 256 bytes of shared RAM
2626 *  (using two 4x256 TMS4043NL-2 (2112-1) Static Rams at U3 and U4)
2727 *
28 *  In this design the GIC only allows the CPU to use the BUS (and shared RAM)
28 *  In this design the GIC only allows the CPU to use the BUS (and shared RAM)
2929 *  a fraction of the frame time. (4.33ms for each 16.69ms, or 26% of the time)
3030 *  (the real ratio of clocks is 7752/29868 )
3131 *
3232 *  Boot: When the GIC let go of !RESET_OUT the EXEC Rom pushes 0x800 onto
3333 *  the bus for the CPU to fetch and place in R7 to start execution.
34 *  This first CPU slice only last 3ms, then the GIC sets the CPU's BUSRQ low,
35 *  stalling it for 12.36ms, then sets it high for 4.33ms etc...
34 *  This first CPU slice only last 3ms, then the GIC sets the CPU's BUSRQ low,
35 *  stalling it for 12.36ms, then sets it high for 4.33ms etc...
3636 *  59.95 times a second - NTSC
3737 ************************************************************************/
3838
r249924r249925
6262   virtual void machine_start();
6363   virtual void machine_reset();
6464   DECLARE_PALETTE_INIT(unichamp);
65   
65
6666   DECLARE_READ8_MEMBER(bext_r);
6767
6868   DECLARE_READ16_MEMBER(unichamp_gicram_r);
r249924r249925
7070
7171   DECLARE_READ16_MEMBER(unichamp_trapl_r);
7272   DECLARE_WRITE16_MEMBER(unichamp_trapl_w);
73   
73
7474   UINT32 screen_update_unichamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7575
7676protected:
r249924r249925
8686   palette.set_pen_color(GIC_GREEN, rgb_t(0x62, 0x95, 0x88));//(from box shot)
8787   palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFF, 0xFF));
8888   */
89   
89
9090   //using from intv.c instead as suggested by RB
9191   palette.set_pen_color(GIC_BLACK, rgb_t(0x00, 0x00, 0x00));
9292   palette.set_pen_color(GIC_RED,   rgb_t(0xFF, 0x3D, 0x10));
93  //palette.set_pen_color(GIC_GREEN, rgb_t(0x38, 0x6B, 0x3F)); //intv's DARK GREEN
94   palette.set_pen_color(GIC_GREEN, rgb_t(0x00, 0xA7, 0x56)); //intv's GREEN
95   palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFC, 0xFF));   
93   //palette.set_pen_color(GIC_GREEN, rgb_t(0x38, 0x6B, 0x3F)); //intv's DARK GREEN
94   palette.set_pen_color(GIC_GREEN, rgb_t(0x00, 0xA7, 0x56)); //intv's GREEN
95   palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFC, 0xFF));
9696}
9797
9898
9999static ADDRESS_MAP_START( unichamp_mem, AS_PROGRAM, 16, unichamp_state )
100100   ADDRESS_MAP_GLOBAL_MASK(0x1FFF) //B13/B14/B15 are grounded!
101101   AM_RANGE(0x0000, 0x00FF) AM_READWRITE(unichamp_gicram_r, unichamp_gicram_w)
102   AM_RANGE(0x0100, 0x07FF) AM_READWRITE(unichamp_trapl_r, unichamp_trapl_w)   
102   AM_RANGE(0x0100, 0x07FF) AM_READWRITE(unichamp_trapl_r, unichamp_trapl_w)
103103   AM_RANGE(0x0800, 0x17FF) AM_ROM AM_REGION("maincpu", 0x0800 << 1)   // Carts and EXE ROM, 10-bits wide
104104ADDRESS_MAP_END
105105
r249924r249925
112112   PORT_BIT( 0x08,  IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')// P2 NO  (EBCA3)
113113   PORT_BIT( 0x10,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED
114114   PORT_BIT( 0x20,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED
115   PORT_BIT( 0x40,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED     
116   PORT_BIT( 0x80,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED   
115   PORT_BIT( 0x40,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED
116   PORT_BIT( 0x80,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED
117117INPUT_PORTS_END
118118
119119
r249924r249925
129129   //and reads the ECBI input pin for HIGH or LOW signal to know whether or not to branch
130130
131131   //The unisonic control system couldnt be simpler in desing.
132   //Each of the two player controllers has three buttons:
132   //Each of the two player controllers has three buttons:
133133   //one tying !RESET(GIC pin 21) to ground when closed - resetting the WHOLE system.
134134   //a YES button (connecting EBCA0 to EBCI for Player1 and EBC2 to EBCI for Player2)
135135   //a NO  button (connecting EBCA1 to EBCI for Player1 and EBC3 to EBCI for Player2)
r249924r249925
138138   //EG: Any player can choose if one or two players are going to play the game for instance
139139
140140   UINT8 port = ioport("CTRLS")->read() & 0x0F; ////only lower nibble
141         
141
142142   //We need to return logical high or low on the EBCI pin
143143   return (port & offset)>0?1:0;
144144}
r249924r249925
152152void unichamp_state::machine_start()
153153{
154154   m_gic->set_shared_memory(m_ram);
155   
156   if (m_cart->exists()){     
155
156   if (m_cart->exists()){
157157      //flip endians in more "this surely exists in MAME" way?
158158      //NOTE The unichamp roms have the same endianness as intv on disk and in memory
159159      UINT8*ptr   = m_cart->get_rom_base();
r249924r249925
163163         ptr[i] = ptr[i+1];
164164         ptr[i+1] = TEMP;
165165      }
166     
167      m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1800,
168                  read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart));   
166
167      m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1800,
168               read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart));
169169   }
170170}
171171
r249924r249925
174174{
175175   /*
176176   the intv driver did not explain this but from the CP1600 manual:
177   When MSYNC* goes inactive (high), the bus control signals issue lAB, 
178    and the CPU inputs from the bus into the PC the starting address of the main program. 
177   When MSYNC* goes inactive (high), the bus control signals issue lAB,
178   and the CPU inputs from the bus into the PC the starting address of the main program.
179179   Note that the initialization address can be defined by the user at any desired bus address or
180   can be the default address resulting from the logical state of the non-driven bus   
180   can be the default address resulting from the logical state of the non-driven bus
181181   */
182   
182
183183   //The Unisonic EXEC ROM chip (9501-01009) is self mapped at 0x0800
184   //The cart ROMS are self mapped to 0x1000
184   //The cart ROMS are self mapped to 0x1000
185185   //upon boot the EXEC ROM puts 0x0800 on the bus for the CPU to use as first INT vector
186186
187187   m_maincpu->set_input_line_vector(CP1610_RESET,     0x0800);
r249924r249925
221221
222222static MACHINE_CONFIG_START( unichamp, unichamp_state )
223223   /* basic machine hardware */
224   
224
225225   //The CPU is really clocked this way:
226   //MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4)   
226   //MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4)
227227   //But since it is only running 7752/29868 th's of the time...
228228   //TODO find a more accurate method? (the emulation will me the same though)
229   MCFG_CPU_ADD("maincpu", CP1610, (int)((7752.0/29868.0)*XTAL_3_579545MHz/4))
230   
229   MCFG_CPU_ADD("maincpu", CP1610, (int)((7752.0/29868.0)*XTAL_3_579545MHz/4))
230
231231   MCFG_CPU_PROGRAM_MAP(unichamp_mem)
232232   MCFG_QUANTUM_TIME(attotime::from_hz(60))
233    MCFG_CP1610_BEXT_CALLBACK(READ8(unichamp_state, bext_r))
234   
233   MCFG_CP1610_BEXT_CALLBACK(READ8(unichamp_state, bext_r))
234
235235   /* video hardware */
236236   MCFG_SCREEN_ADD("screen", RASTER)
237   MCFG_SCREEN_RAW_PARAMS( XTAL_3_579545MHz,
238                           gic_device::LINE_CLOCKS,
239                     gic_device::START_ACTIVE_SCAN,
240                     gic_device::END_ACTIVE_SCAN,
241                     gic_device::LINES,
242                     gic_device::START_Y,
237   MCFG_SCREEN_RAW_PARAMS( XTAL_3_579545MHz,
238                     gic_device::LINE_CLOCKS,
239                     gic_device::START_ACTIVE_SCAN,
240                     gic_device::END_ACTIVE_SCAN,
241                     gic_device::LINES,
242                     gic_device::START_Y,
243243                     gic_device::START_Y + gic_device::SCREEN_HEIGHT )
244                     
244
245245   MCFG_SCREEN_UPDATE_DRIVER(unichamp_state, screen_update_unichamp)
246246   MCFG_SCREEN_PALETTE("palette")
247   
247
248248   MCFG_PALETTE_ADD("palette", 4)
249249   MCFG_PALETTE_INIT_OWNER(unichamp_state, unichamp)
250   
250
251251   /* sound hardware */
252252   MCFG_SPEAKER_STANDARD_MONO("mono")
253253   MCFG_GIC_ADD( "gic", XTAL_3_579545MHz, "screen" )
254254   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
255   
255
256256   /* cartridge */
257257   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "unichamp_cart")
258258   MCFG_GENERIC_EXTENSIONS("bin,rom")
259259   MCFG_SOFTWARE_LIST_ADD("cart_list", "unichamp")
260   
260
261261MACHINE_CONFIG_END
262262
263263
264ROM_START(unichamp)   
264ROM_START(unichamp)
265265   ROM_REGION(0x10000<<1,"maincpu", ROMREGION_ERASEFF)
266   
266
267267   ROM_LOAD16_WORD( "9501-01009.u2", 0x0800<<1, 0x1000, CRC(49a0bd8f) SHA1(f4d126d3462ad351da4b75d76c75942d5a6f27ef))
268268
269269   //these below are for local tests. you can use them in softlist or -cart
270   //ROM_LOAD16_WORD( "pac-02.bin",   0x1000<<1, 0x1000, CRC(fe3213be) SHA1(5b9c407fe86865f3454d4be824a7f2bf53478f73))   
271   //ROM_LOAD16_WORD( "pac-03.bin",   0x1000<<1, 0x1000, CRC(f81f04bd) SHA1(82e2a0fda1787d5835c457ee5745b0db0cebe079))   
270   //ROM_LOAD16_WORD( "pac-02.bin",   0x1000<<1, 0x1000, CRC(fe3213be) SHA1(5b9c407fe86865f3454d4be824a7f2bf53478f73))
271   //ROM_LOAD16_WORD( "pac-03.bin",   0x1000<<1, 0x1000, CRC(f81f04bd) SHA1(82e2a0fda1787d5835c457ee5745b0db0cebe079))
272272   //ROM_LOAD16_WORD( "pac-04.bin",   0x1000<<1, 0x1000, CRC(cac09841) SHA1(bc9db83f26ed0810938156db6b104b4576754225))
273273   //ROM_LOAD16_WORD( "pac-05.bin",   0x1000<<1, 0x1000, CRC(d54a6090) SHA1(e85593096f43dcf14b08fd2c9fda277008a8df8b))
274274ROM_END
trunk/src/mame/drivers/vicdual.c
r249924r249925
207207
208208WRITE8_MEMBER(vicdual_state::videoram_w)
209209{
210//   m_screen->update_now();
210//  m_screen->update_now();
211211   m_screen->update_partial(m_screen->vpos());
212212   m_videoram[offset] = data;
213213}
r249924r249925
215215
216216WRITE8_MEMBER(vicdual_state::characterram_w)
217217{
218//   m_screen->update_now();
218//  m_screen->update_now();
219219   m_screen->update_partial(m_screen->vpos());
220220   m_characterram[offset] = data;
221221}
trunk/src/mame/drivers/vpoker.c
r249924r249925
1212
1313    1) "Challenger Draw Poker", from Bend Electronics Co. Inc.
1414    2) "VHI Draw Poker", from Video Horizons, Inc.
15 
15
1616    Both companies shared the same address and phone number:
1717     63353 Nels Anderson Road. Bend, Oregon 97701.
1818     Tel: 503-389-7626.
trunk/src/mame/drivers/wecleman.c
r249924r249925
16891689
16901690GAMEL( 1986, wecleman,  0,        wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v2.00, set 1)", 0, layout_wecleman )
16911691GAMEL( 1986, weclemana, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v2.00, set 2)", 0, layout_wecleman ) // 1988 release (maybe date hacked?)
1692GAMEL( 1986, weclemanb, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v1.26)", 0, layout_wecleman )
1692GAMEL( 1986, weclemanb, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (v1.26)", 0, layout_wecleman )
16931693
16941694GAMEL( 1988, hotchase,  0,        hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 1)", 0, layout_wecleman )
16951695GAMEL( 1988, hotchasea, hotchase, hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 2)", 0, layout_wecleman )
trunk/src/mame/includes/hng64.h
r249924r249925
111111class hng64_poly_renderer : public poly_manager<float, hng64_poly_data, 7, HNG64_MAX_POLYGONS>
112112{
113113public:
114    hng64_poly_renderer(hng64_state& state);
115   
116    void drawShaded(polygon *p);
117    void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid);
114   hng64_poly_renderer(hng64_state& state);
118115
119    hng64_state& state() { return m_state; }
120    bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; }
121    float* depthBuffer3d() { return m_depthBuffer3d; }
122   
116   void drawShaded(polygon *p);
117   void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid);
118
119   hng64_state& state() { return m_state; }
120   bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; }
121   float* depthBuffer3d() { return m_depthBuffer3d; }
122
123123private:
124124   hng64_state& m_state;
125125
r249924r249925
318318   TIMER_DEVICE_CALLBACK_MEMBER(hng64_irq);
319319   void do_dma(address_space &space);
320320
321    void hng64_mark_all_tiles_dirty(int tilemap);
321   void hng64_mark_all_tiles_dirty(int tilemap);
322322   void hng64_mark_tile_dirty(int tilemap, int tile_index);
323    void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm);
323   void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm);
324324
325    void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit,
326        UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound);
325   void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit,
326      UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound);
327327
328    void hng64_tilemap_draw_roz(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap,
328   void hng64_tilemap_draw_roz(screen_device &screen, bitmap_rgb32 &dest, const rectangle &cliprect, tilemap_t *tmap,
329329      UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
330330      int wraparound, UINT32 flags, UINT8 priority, hng64trans_t drawformat);
331331
r249924r249925
333333      UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
334334      int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat);
335335
336   
337336
337
338338   DECLARE_CUSTOM_INPUT_MEMBER(left_handle_r);
339339   DECLARE_CUSTOM_INPUT_MEMBER(right_handle_r);
340340   DECLARE_CUSTOM_INPUT_MEMBER(acc_down_r);
341341   DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r);
342342
343    hng64_poly_renderer* m_poly_renderer;
344   
345    TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
343   hng64_poly_renderer* m_poly_renderer;
346344
347    UINT8 *m_texturerom;
345   TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
346
347   UINT8 *m_texturerom;
348348   UINT16* m_vertsrom;
349349   int m_vertsrom_size;
350    std::vector<polygon> m_polys;  // HNG64_MAX_POLYGONS
351   
352    void clear3d();
350   std::vector<polygon> m_polys;  // HNG64_MAX_POLYGONS
351
352   void clear3d();
353353   void hng64_command3d(const UINT16* packet);
354354   void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
355355   void transition_control(bitmap_rgb32 &bitmap, const rectangle &cliprect);
r249924r249925
359359   void setCameraProjectionMatrix(const UINT16* packet);
360360   void recoverPolygonBlock(const UINT16* packet, int& numPolys);
361361   void printPacket(const UINT16* packet, int hex);
362    float uToF(UINT16 input);
362   float uToF(UINT16 input);
363363   void matmul4(float *product, const float *a, const float *b);
364364   void vecmatmul4(float *product, const float *a, const float *b);
365365   float vecDotProduct(const float *a, const float *b);
366366   void setIdentity(float *matrix);
367367   void normalize(float* x);
368   
368
369369   void reset_sound();
370370   void reset_net();
371371
r249924r249925
399399   DECLARE_READ16_MEMBER(sound_comms_r);
400400   DECLARE_WRITE16_MEMBER(sound_comms_w);
401401   UINT16 main_latch[2];
402    UINT16 sound_latch[2];
402   UINT16 sound_latch[2];
403403};
trunk/src/mame/includes/m107.h
r249924r249925
2626         m_palette(*this, "palette"),
2727         m_spriteram(*this, "spriteram"),
2828         m_vram_data(*this, "vram_data"),
29         m_upd71059c(*this, "upd71059c")   
29         m_upd71059c(*this, "upd71059c")
3030         { }
3131
3232   required_device<cpu_device> m_maincpu;
trunk/src/mame/includes/m92.h
r249924r249925
3737         m_gfxdecode(*this, "gfxdecode"),
3838         m_screen(*this, "screen"),
3939         m_palette(*this, "palette"),
40         m_upd71059c(*this, "upd71059c")
40         m_upd71059c(*this, "upd71059c")
4141   { }
4242
4343   required_device<buffered_spriteram16_device> m_spriteram;
trunk/src/mame/includes/osborne1.h
r249924r249925
9292   /* video related */
9393   UINT8   m_screen_pac;
9494   UINT8   m_resolution;
95   UINT8   m_hc_left;
95   UINT8   m_hc_left;
9696   UINT8   m_new_start_x;
9797   UINT8   m_new_start_y;
9898   emu_timer *m_video_timer;
trunk/src/mame/layout/by17.lay
r249924r249925
255255      <disk state="0"><color red="0.15" green="0.15" blue="0.00" /></disk>
256256      <disk state="1"><color red="1.00" green="1.00" blue="0.00" /></disk>
257257   </element>
258   <element name="Lamp_Red" defstate="0">                              <!-- Usually for Specials -->
258   <element name="Lamp_Red" defstate="0">                                      <!-- Usually for Specials -->
259259      <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk>
260260      <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk>
261261   </element>
262   <element name="Lamp_Amber" defstate="0">                           <!-- Usually for Extra Ball-->
262   <element name="Lamp_Amber" defstate="0">                                    <!-- Usually for Extra Ball-->
263263      <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk>
264264      <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk>
265265   </element>
r249924r249925
517517      <text string="3k"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="12" height="12" /></text>
518518   </element>
519519
520   <element name="Lamp_Green_Arrow_04_2x" defstate="1">   <!-- Point at 4 o clock -->
520   <element name="Lamp_Green_Arrow_04_2x" defstate="1">    <!-- Point at 4 o clock -->
521521      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
522522      <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
523523      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
539539      <text string="2x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
540540   </element>
541541
542   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
542   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
543543      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
544544      <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
545545      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
561561      <text string="3x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
562562   </element>
563563
564   <element name="Lamp_White_Arrow_08_5x" defstate="1">   <!-- Point at 8 o clock -->
564   <element name="Lamp_White_Arrow_08_5x" defstate="1">    <!-- Point at 8 o clock -->
565565      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
566566      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect>
567567      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
583583      <text string="5x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="15" height="15" /></text>
584584   </element>
585585
586   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
586   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
587587      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
588588      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
589589      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
604604      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect>
605605   </element>
606606
607   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
607   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
608608      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
609609      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
610610      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
625625      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
626626   </element>
627627
628   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
628   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
629629      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
630630      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
631631      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect>
r249924r249925
646646      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect>
647647   </element>
648648
649   <element name="Lamp_Red_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
649   <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock -->
650650      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
651651      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
652652      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
667667      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
668668   </element>
669669
670   <element name="Lamp_White_Arrow_11_A" defstate="1">   <!-- Point at 11 o clock -->
670   <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock -->
671671      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect>
672672      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect>
673673      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect>
r249924r249925
689689      <text string="A"><color red="0.0" green="0.0" blue="0.0"   /><bounds x="-2" y="03" width="18" height="18" /></text>
690690   </element>
691691
692   <element name="Lamp_White_Arrow_01_B" defstate="1">   <!-- Point at 1 o clock -->
692   <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock -->
693693      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
694694      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
695695      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
996996      <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel>
997997      <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel>
998998      <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel>
999      <!--   <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel>   -->
999      <!--    <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> -->
10001000
10011001
10021002      <bezel element="Title_Bally"><bounds x="430" y="18" width="105" height="30" /></bezel>
r249924r249925
10181018
10191019
10201020      <!-- Player 1 Score -->
1021      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
1021      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
10221022      <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel>
10231023      <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel>
10241024      <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel>
r249924r249925
10281028      <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel>
10291029
10301030      <!-- Player 2 Score -->
1031      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
1031      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
10321032      <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel>
10331033      <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel>
10341034      <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel>
r249924r249925
10381038      <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel>
10391039
10401040      <!-- Player 3 Score -->
1041      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 3rd Player Up -->
1041      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 3rd Player Up -->
10421042      <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel>
10431043      <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel>
10441044      <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel>
r249924r249925
10481048      <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel>
10491049
10501050      <!-- Player 4 Score -->
1051      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 4th Player Up -->
1051      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 4th Player Up -->
10521052      <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel>
10531053      <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel>
10541054      <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel>
r249924r249925
10591059
10601060      <!-- Credits and Ball In Play / Match -->
10611061      <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel>
1062      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>   <!-- Backbox ~ Ball In Play -->
1063      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
1062      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>  <!-- Backbox ~ Ball In Play -->
1063      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
10641064      <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel>
10651065      <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel>
10661066      <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel>
10671067      <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel>
10681068
1069      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>   <!-- Backbox ~ Same Player Shoots Again -->
1070      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 1 Player Game -->
1071      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 2 Player Game -->
1072      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 3 Player Game -->
1073      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 4 Player Game -->
1074      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
1075      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
1076      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>         <!-- Backbox ~ Tilt -->
1069      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>    <!-- Backbox ~ Same Player Shoots Again -->
1070      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 1 Player Game -->
1071      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 2 Player Game -->
1072      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 3 Player Game -->
1073      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 4 Player Game -->
1074      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
1075      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
1076      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>           <!-- Backbox ~ Tilt -->
10771077
10781078
10791079
r249924r249925
11961196      <bezel element="Text_Knocker">   <!-- Knocker -->   <bounds x="322" y="342" width="40" height="10" /></bezel>
11971197
11981198      <!-- Misc Lamps -->
1199      <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel>   <!-- Credit Indicator -->
1199      <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel>    <!-- Credit Indicator -->
12001200
12011201
12021202      <!-- Outhole -->
trunk/src/mame/layout/by17_matahari.lay
r249924r249925
185185      <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk>
186186      <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk>
187187   </element>
188   <element name="Lamp_Red" defstate="0">                              <!-- Usually for Specials -->
188   <element name="Lamp_Red" defstate="0">                                      <!-- Usually for Specials -->
189189      <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk>
190190      <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk>
191191   </element>
192   <element name="Lamp_Amber" defstate="0">                           <!-- Usually for Extra Ball-->
192   <element name="Lamp_Amber" defstate="0">                                    <!-- Usually for Extra Ball-->
193193      <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk>
194194      <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk>
195195   </element>
r249924r249925
384384      <text string="3k"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="12" height="12" /></text>
385385   </element>
386386
387   <element name="Lamp_Green_Arrow_04_2x" defstate="1">   <!-- Point at 4 o clock -->
387   <element name="Lamp_Green_Arrow_04_2x" defstate="1">    <!-- Point at 4 o clock -->
388388      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
389389      <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
390390      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
406406      <text string="2x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
407407   </element>
408408
409   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
409   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
410410      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
411411      <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
412412      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
428428      <text string="3x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
429429   </element>
430430
431   <element name="Lamp_White_Arrow_08_5x" defstate="1">   <!-- Point at 8 o clock -->
431   <element name="Lamp_White_Arrow_08_5x" defstate="1">    <!-- Point at 8 o clock -->
432432      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
433433      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect>
434434      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
450450      <text string="5x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="15" height="15" /></text>
451451   </element>
452452
453   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
453   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
454454      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
455455      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
456456      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
471471      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
472472   </element>
473473
474   <element name="Lamp_White_Arrow_11_A" defstate="1">   <!-- Point at 11 o clock -->
474   <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock -->
475475      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect>
476476      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect>
477477      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect>
r249924r249925
493493      <text string="A"><color red="0.0" green="0.0" blue="0.0"   /><bounds x="-2" y="03" width="18" height="18" /></text>
494494   </element>
495495
496   <element name="Lamp_White_Arrow_01_B" defstate="1">   <!-- Point at 1 o clock -->
496   <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock -->
497497      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
498498      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
499499      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
710710
711711      <!-- Background -->
712712      <backdrop element="Canvas"><bounds x="0" y="0" width="640" height="480" /></backdrop>
713     
713
714714      <bezel element="Draw_White"><bounds x="0" y="0" width="640" height="1" /></bezel>
715715      <bezel element="Draw_White"><bounds x="0" y="0" width="1" height="480" /></bezel>
716716      <bezel element="Draw_White"><bounds x="640" y="0" width="1" height="480" /></bezel>
r249924r249925
735735
736736
737737      <!-- Player 1 Score -->
738      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
738      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
739739      <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel>
740740      <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel>
741741      <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel>
r249924r249925
745745      <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel>
746746
747747      <!-- Player 2 Score -->
748      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
748      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
749749      <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel>
750750      <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel>
751751      <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel>
r249924r249925
755755      <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel>
756756
757757      <!-- Player 3 Score -->
758      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 3rd Player Up -->
758      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 3rd Player Up -->
759759      <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel>
760760      <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel>
761761      <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel>
r249924r249925
765765      <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel>
766766
767767      <!-- Player 4 Score -->
768      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 4th Player Up -->
768      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 4th Player Up -->
769769      <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel>
770770      <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel>
771771      <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel>
r249924r249925
776776
777777      <!-- Credits and Ball In Play / Match -->
778778      <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel>
779      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>   <!-- Backbox ~ Ball In Play -->
780      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
779      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>  <!-- Backbox ~ Ball In Play -->
780      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
781781      <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel>
782782      <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel>
783783      <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel>
784784      <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel>
785785
786      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>   <!-- Backbox ~ Same Player Shoots Again -->
787      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 1 Player Game -->
788      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 2 Player Game -->
789      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 3 Player Game -->
790      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 4 Player Game -->
791      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
792      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
793      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>         <!-- Backbox ~ Tilt -->
786      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>    <!-- Backbox ~ Same Player Shoots Again -->
787      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 1 Player Game -->
788      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 2 Player Game -->
789      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 3 Player Game -->
790      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 4 Player Game -->
791      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
792      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
793      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>           <!-- Backbox ~ Tilt -->
794794
795795
796796
r249924r249925
801801      <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel>
802802
803803      <!-- Lamps controlled by U1 on Lamp Driver Board -->
804      <bezel name="lamp0"  element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel>   <!-- U1 00 -->
805      <bezel name="lamp1"  element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel>   <!-- U1 01 -->
806      <bezel name="lamp2"  element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel>   <!-- U1 02 -->
807      <bezel name="lamp3"  element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel>   <!-- U1 03 -->
808      <bezel name="lamp4"  element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel>   <!-- U1 04 -->
809      <bezel name="lamp5"  element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel>   <!-- U1 05 -->
810      <bezel name="lamp6"  element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel>   <!-- U1 06 -->
811      <bezel name="lamp7"  element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel>   <!-- U1 07 -->
812      <bezel name="lamp8"  element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel>   <!-- U1 08 -->
813      <bezel name="lamp9"  element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel>   <!-- U1 09 -->
814      <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel>   <!-- U1 10 -->
815      <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel>   <!-- U1 11 -->
816      <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel>   <!-- U1 12 -->
817      <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel>   <!-- U1 13 -->
818      <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel>   <!-- U1 14 -->
804      <bezel name="lamp0"  element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel>   <!-- U1 00 -->
805      <bezel name="lamp1"  element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel>   <!-- U1 01 -->
806      <bezel name="lamp2"  element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel>   <!-- U1 02 -->
807      <bezel name="lamp3"  element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel>   <!-- U1 03 -->
808      <bezel name="lamp4"  element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel>   <!-- U1 04 -->
809      <bezel name="lamp5"  element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel>   <!-- U1 05 -->
810      <bezel name="lamp6"  element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel>   <!-- U1 06 -->
811      <bezel name="lamp7"  element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel>   <!-- U1 07 -->
812      <bezel name="lamp8"  element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel>   <!-- U1 08 -->
813      <bezel name="lamp9"  element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel>   <!-- U1 09 -->
814      <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel>   <!-- U1 10 -->
815      <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel>   <!-- U1 11 -->
816      <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel>   <!-- U1 12 -->
817      <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel>   <!-- U1 13 -->
818      <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel>   <!-- U1 14 -->
819819
820820      <!-- Lamps controlled by U2 on Lamp Driver Board -->
821      <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel>   <!-- U2 00 -->
822      <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel>   <!-- U2 01 -->
823      <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel>   <!-- U2 02 -->
824      <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel>   <!-- U2 03 -->
825      <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel>   <!-- U2 04 -->
826      <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel>   <!-- U2 05 -->
827      <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel>   <!-- U2 06 -->
828      <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel>   <!-- U2 07 -->
829      <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel>   <!-- U2 08 -->
830      <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel>   <!-- U2 09 -->
831      <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel>   <!-- U2 10 -->
832      <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel>   <!-- U2 11 -->
833      <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel>   <!-- U2 12 -->
834      <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel>   <!-- U2 13 -->
835      <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel>   <!-- U2 14 -->
821      <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel>   <!-- U2 00 -->
822      <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel>   <!-- U2 01 -->
823      <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel>   <!-- U2 02 -->
824      <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel>   <!-- U2 03 -->
825      <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel>   <!-- U2 04 -->
826      <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel>   <!-- U2 05 -->
827      <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel>   <!-- U2 06 -->
828      <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel>   <!-- U2 07 -->
829      <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel>   <!-- U2 08 -->
830      <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel>   <!-- U2 09 -->
831      <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel>   <!-- U2 10 -->
832      <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel>   <!-- U2 11 -->
833      <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel>   <!-- U2 12 -->
834      <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel>   <!-- U2 13 -->
835      <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel>   <!-- U2 14 -->
836836
837837      <!-- Lamps controlled by U3 on Lamp Driver Board -->
838      <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel>   <!-- U3 00 -->
839      <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel>   <!-- U3 01 -->
840      <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel>   <!-- U3 02 -->
841      <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel>   <!-- U3 03 -->
842      <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel>   <!-- U3 04 -->
843      <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel>   <!-- U3 05 -->
844      <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel>   <!-- U3 06 -->
845      <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel>   <!-- U3 07 -->
846      <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel>   <!-- U3 08 -->
847      <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel>   <!-- U3 09 -->
848      <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel>   <!-- U3 10 -->
849      <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel>   <!-- U3 11 -->
850      <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel>   <!-- U3 12 -->
851      <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel>   <!-- U3 13 -->
852      <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel>   <!-- U3 14 -->
838      <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel>   <!-- U3 00 -->
839      <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel>   <!-- U3 01 -->
840      <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel>   <!-- U3 02 -->
841      <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel>   <!-- U3 03 -->
842      <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel>   <!-- U3 04 -->
843      <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel>   <!-- U3 05 -->
844      <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel>   <!-- U3 06 -->
845      <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel>   <!-- U3 07 -->
846      <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel>   <!-- U3 08 -->
847      <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel>   <!-- U3 09 -->
848      <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel>   <!-- U3 10 -->
849      <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel>   <!-- U3 11 -->
850      <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel>   <!-- U3 12 -->
851      <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel>   <!-- U3 13 -->
852      <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel>   <!-- U3 14 -->
853853
854854      <!-- Lamps controlled by U4 on Lamp Driver Board -->
855      <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel>   <!-- U4 00 -->
856      <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel>   <!-- U4 01 -->
857      <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel>   <!-- U4 02 -->
858      <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel>   <!-- U4 03 -->
859      <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel>   <!-- U4 04 -->
860      <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel>   <!-- U4 05 -->
861      <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel>   <!-- U4 06 -->
862      <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel>   <!-- U4 07 -->
863      <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel>   <!-- U4 08 -->
864      <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel>   <!-- U4 09 -->
865      <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel>   <!-- U4 10 -->
866      <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel>   <!-- U4 11 -->
867      <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel>   <!-- U4 12 -->
868      <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel>   <!-- U4 13 -->
869      <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel>   <!-- U4 14 -->
855      <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel>   <!-- U4 00 -->
856      <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel>   <!-- U4 01 -->
857      <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel>   <!-- U4 02 -->
858      <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel>   <!-- U4 03 -->
859      <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel>   <!-- U4 04 -->
860      <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel>   <!-- U4 05 -->
861      <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel>   <!-- U4 06 -->
862      <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel>   <!-- U4 07 -->
863      <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel>   <!-- U4 08 -->
864      <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel>   <!-- U4 09 -->
865      <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel>   <!-- U4 10 -->
866      <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel>   <!-- U4 11 -->
867      <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel>   <!-- U4 12 -->
868      <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel>   <!-- U4 13 -->
869      <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel>   <!-- U4 14 -->
870870
871871
872872      <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel>
r249924r249925
914914
915915
916916      <!-- Misc Lamps -->
917      <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel>   <!-- Credit Indicator -->
917      <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel>    <!-- Credit Indicator -->
918918
919      <bezel name="lamp52" element="Lamp_White_50k"><bounds x="009" y="322" width="09" height="09" /></bezel>      <!-- 50,000 Outlane Left -->
920      <bezel name="lamp37" element="Lamp_White_50k"><bounds x="301" y="322" width="09" height="09" /></bezel>      <!-- 50,000 Outlane Right -->
919      <bezel name="lamp52" element="Lamp_White_50k"><bounds x="009" y="322" width="09" height="09" /></bezel>     <!-- 50,000 Outlane Left -->
920      <bezel name="lamp37" element="Lamp_White_50k"><bounds x="301" y="322" width="09" height="09" /></bezel>     <!-- 50,000 Outlane Right -->
921921      <!-- Bonus End of Ball Lamps -->
922      <bezel name="lamp0"  element="Lamp_White_1k"> <bounds x="155" y="413" width="09" height="09" /></bezel>      <!-- Bonus 1000 -->
923      <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="155" y="400" width="09" height="09" /></bezel>      <!-- Bonus 2000 -->
924      <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="155" y="387" width="09" height="09" /></bezel>      <!-- Bonus 3000 -->
925      <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="155" y="374" width="09" height="09" /></bezel>      <!-- Bonus 4000 -->
926      <bezel name="lamp1"  element="Lamp_White_5k"> <bounds x="155" y="361" width="09" height="09" /></bezel>      <!-- Bonus 5000 -->
927      <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="155" y="348" width="09" height="09" /></bezel>      <!-- Bonus 6000 -->
928      <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="155" y="335" width="09" height="09" /></bezel>      <!-- Bonus 7000 -->
929      <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="155" y="322" width="09" height="09" /></bezel>      <!-- Bonus 8000 -->
930      <bezel name="lamp2"  element="Lamp_White_9k"> <bounds x="155" y="309" width="09" height="09" /></bezel>      <!-- Bonus 9000 -->
931      <bezel name="lamp17" element="Lamp_White_10k"><bounds x="140" y="292" width="12" height="12" /></bezel>      <!-- Bonus 10000 -->
932      <bezel name="lamp32" element="Lamp_White_20k"><bounds x="167" y="292" width="12" height="12" /></bezel>      <!-- Bonus 20000 -->
922      <bezel name="lamp0"  element="Lamp_White_1k"> <bounds x="155" y="413" width="09" height="09" /></bezel>     <!-- Bonus 1000 -->
923      <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="155" y="400" width="09" height="09" /></bezel>     <!-- Bonus 2000 -->
924      <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="155" y="387" width="09" height="09" /></bezel>     <!-- Bonus 3000 -->
925      <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="155" y="374" width="09" height="09" /></bezel>     <!-- Bonus 4000 -->
926      <bezel name="lamp1"  element="Lamp_White_5k"> <bounds x="155" y="361" width="09" height="09" /></bezel>     <!-- Bonus 5000 -->
927      <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="155" y="348" width="09" height="09" /></bezel>     <!-- Bonus 6000 -->
928      <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="155" y="335" width="09" height="09" /></bezel>     <!-- Bonus 7000 -->
929      <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="155" y="322" width="09" height="09" /></bezel>     <!-- Bonus 8000 -->
930      <bezel name="lamp2"  element="Lamp_White_9k"> <bounds x="155" y="309" width="09" height="09" /></bezel>     <!-- Bonus 9000 -->
931      <bezel name="lamp17" element="Lamp_White_10k"><bounds x="140" y="292" width="12" height="12" /></bezel>     <!-- Bonus 10000 -->
932      <bezel name="lamp32" element="Lamp_White_20k"><bounds x="167" y="292" width="12" height="12" /></bezel>     <!-- Bonus 20000 -->
933933      <!-- Bonus Multiplier Lamps -->
934      <bezel name="lamp56" element="Lamp_Green_Arrow_04_2x"> <bounds x="111" y="317" width="20" height="12.5" /></bezel>      <!-- 2X Bonus -->
935      <bezel name="lamp41" element="Lamp_Yellow_Arrow_04_3x"><bounds x="111" y="337" width="20" height="12.5" /></bezel>      <!-- 3X Bonus -->
936      <bezel name="lamp26" element="Lamp_White_Arrow_08_5x"> <bounds x="188" y="317" width="20" height="12.5" /></bezel>      <!-- 5X Bonus -->
937      <bezel name="lamp40" element="Lamp_Amber_Arrow_08">    <bounds x="188" y="337" width="20" height="12.5" /></bezel>      <!-- Extra Ball -->
934      <bezel name="lamp56" element="Lamp_Green_Arrow_04_2x"> <bounds x="111" y="317" width="20" height="12.5" /></bezel>      <!-- 2X Bonus -->
935      <bezel name="lamp41" element="Lamp_Yellow_Arrow_04_3x"><bounds x="111" y="337" width="20" height="12.5" /></bezel>      <!-- 3X Bonus -->
936      <bezel name="lamp26" element="Lamp_White_Arrow_08_5x"> <bounds x="188" y="317" width="20" height="12.5" /></bezel>      <!-- 5X Bonus -->
937      <bezel name="lamp40" element="Lamp_Amber_Arrow_08">    <bounds x="188" y="337" width="20" height="12.5" /></bezel>      <!-- Extra Ball -->
938938
939939      <!-- Saucer Lamps -->
940      <bezel name="lamp24" element="Lamp_White_Arrow_Up_5x"> <bounds x="154" y="102" width="11" height="22" /></bezel>   <!-- 5X Bonus Potential -->
941      <bezel name="lamp39" element="Lamp_Yellow_Arrow_Up_3x"><bounds x="154" y="128" width="11" height="22" /></bezel>   <!-- 3X Bonus Potential -->
942      <bezel name="lamp54" element="Lamp_Green_Arrow_Up_2x"> <bounds x="154" y="154" width="11" height="22" /></bezel>   <!-- 2X Bonus Potential -->
943      <bezel               element="Lamp_White_Arrow_Up_3k"> <bounds x="154" y="180" width="11" height="22" /></bezel>   <!-- Upper 3000 -->
940      <bezel name="lamp24" element="Lamp_White_Arrow_Up_5x"> <bounds x="154" y="102" width="11" height="22" /></bezel>    <!-- 5X Bonus Potential -->
941      <bezel name="lamp39" element="Lamp_Yellow_Arrow_Up_3x"><bounds x="154" y="128" width="11" height="22" /></bezel>    <!-- 3X Bonus Potential -->
942      <bezel name="lamp54" element="Lamp_Green_Arrow_Up_2x"> <bounds x="154" y="154" width="11" height="22" /></bezel>    <!-- 2X Bonus Potential -->
943      <bezel               element="Lamp_White_Arrow_Up_3k"> <bounds x="154" y="180" width="11" height="22" /></bezel>    <!-- Upper 3000 -->
944944
945945      <!-- "A" & "B" Potential Lamps -->
946      <bezel name="lamp5"  element="Lamp_White_1k"><bounds x="095" y="265" width="10" height="10" /></bezel>      <!-- Upper 1000 -->
947      <bezel name="lamp20" element="Lamp_White_2k"><bounds x="115" y="265" width="10" height="10" /></bezel>      <!-- Upper 2000 -->
948      <bezel name="lamp35" element="Lamp_White_3k"><bounds x="135" y="265" width="10" height="10" /></bezel>      <!-- Upper 3000 -->
949      <bezel name="lamp50" element="Lamp_White_4k"><bounds x="155" y="265" width="10" height="10" /></bezel>      <!-- Upper 4000 -->
950      <bezel name="lamp6"  element="Lamp_White_5k"><bounds x="175" y="265" width="10" height="10" /></bezel>      <!-- Upper 5000 -->
951      <bezel name="lamp21" element="Lamp_Amber">   <bounds x="195" y="265" width="10" height="10" /></bezel>      <!-- Extra Ball Potential -->
952      <bezel name="lamp36" element="Lamp_Red">     <bounds x="215" y="265" width="10" height="10" /></bezel>      <!-- Special Potential -->
946      <bezel name="lamp5"  element="Lamp_White_1k"><bounds x="095" y="265" width="10" height="10" /></bezel>      <!-- Upper 1000 -->
947      <bezel name="lamp20" element="Lamp_White_2k"><bounds x="115" y="265" width="10" height="10" /></bezel>      <!-- Upper 2000 -->
948      <bezel name="lamp35" element="Lamp_White_3k"><bounds x="135" y="265" width="10" height="10" /></bezel>      <!-- Upper 3000 -->
949      <bezel name="lamp50" element="Lamp_White_4k"><bounds x="155" y="265" width="10" height="10" /></bezel>      <!-- Upper 4000 -->
950      <bezel name="lamp6"  element="Lamp_White_5k"><bounds x="175" y="265" width="10" height="10" /></bezel>      <!-- Upper 5000 -->
951      <bezel name="lamp21" element="Lamp_Amber">   <bounds x="195" y="265" width="10" height="10" /></bezel>      <!-- Extra Ball Potential -->
952      <bezel name="lamp36" element="Lamp_Red">     <bounds x="215" y="265" width="10" height="10" /></bezel>      <!-- Special Potential -->
953953
954954      <!-- Drop Target Lamps -->
955      <bezel name="lamp47" element="Lamp_Red"><bounds x="153" y="225" width="14" height="14" /></bezel>         <!-- Special Potential -->
955      <bezel name="lamp47" element="Lamp_Red"><bounds x="153" y="225" width="14" height="14" /></bezel>           <!-- Special Potential -->
956956
957957      <!-- Outhole -->
958958      <bezel name="solenoid6"  element="Solenoid_Outhole">                        <bounds x="150" y="455" width="58" height="22" /></bezel>
trunk/src/mame/layout/by17_pwerplay.lay
r249924r249925
198198      <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk>
199199      <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk>
200200   </element>
201   <element name="Lamp_Red" defstate="0">                              <!-- Usually for Specials -->
201   <element name="Lamp_Red" defstate="0">                                      <!-- Usually for Specials -->
202202      <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk>
203203      <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk>
204204   </element>
205   <element name="Lamp_Amber" defstate="0">                           <!-- Usually for Extra Ball-->
205   <element name="Lamp_Amber" defstate="0">                                    <!-- Usually for Extra Ball-->
206206      <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk>
207207      <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk>
208208   </element>
r249924r249925
540540
541541      <!-- Background -->
542542      <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop>
543     
543
544544      <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel>
545545      <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel>
546546      <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel>
547547      <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel>
548548      <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel>
549549      <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel>
550      <!--   <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel>   -->
550      <!--    <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> -->
551551
552552      <bezel element="Title_PowerPlay"><bounds x="430" y="18" width="105" height="30" /></bezel>
553553
r249924r249925
565565
566566
567567      <!-- Player 1 Score -->
568      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
568      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
569569      <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel>
570570      <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel>
571571      <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel>
r249924r249925
575575      <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel>
576576
577577      <!-- Player 2 Score -->
578      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
578      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
579579      <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel>
580580      <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel>
581581      <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel>
r249924r249925
585585      <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel>
586586
587587      <!-- Player 3 Score -->
588      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 3rd Player Up -->
588      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 3rd Player Up -->
589589      <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel>
590590      <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel>
591591      <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel>
r249924r249925
595595      <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel>
596596
597597      <!-- Player 4 Score -->
598      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 4th Player Up -->
598      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 4th Player Up -->
599599      <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel>
600600      <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel>
601601      <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel>
r249924r249925
606606
607607      <!-- Credits and Ball In Play / Match -->
608608      <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel>
609      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>   <!-- Backbox ~ Ball In Play -->
610      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
609      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>  <!-- Backbox ~ Ball In Play -->
610      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
611611      <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel>
612612      <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel>
613613      <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel>
614614      <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel>
615615
616      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>   <!-- Backbox ~ Same Player Shoots Again -->
617      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 1 Player Game -->
618      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 2 Player Game -->
619      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 3 Player Game -->
620      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 4 Player Game -->
621      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
622      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
623      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>         <!-- Backbox ~ Tilt -->
616      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>    <!-- Backbox ~ Same Player Shoots Again -->
617      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 1 Player Game -->
618      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 2 Player Game -->
619      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 3 Player Game -->
620      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 4 Player Game -->
621      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
622      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
623      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>           <!-- Backbox ~ Tilt -->
624624
625625
626626
r249924r249925
745745
746746      <!-- Misc Lamps -->
747747      <bezel name="lamp55" element="Credit_Indicator"><bounds x="23" y="456" width="70" height="21" /></bezel><!-- Credit Indicator -->
748      <bezel name="lamp40" element="Lamp_Amber"><bounds x="100" y="330" width="13" height="13" /></bezel>      <!-- Extra Ball -->
749      <bezel name="lamp56" element="Lamp_Red">  <bounds x="009" y="318" width="09" height="09" /></bezel>      <!-- Special Outlane Left -->
750      <bezel name="lamp41" element="Lamp_Red">  <bounds x="301" y="318" width="09" height="09" /></bezel>      <!-- Special Outlane Right -->
748      <bezel name="lamp40" element="Lamp_Amber"><bounds x="100" y="330" width="13" height="13" /></bezel>     <!-- Extra Ball -->
749      <bezel name="lamp56" element="Lamp_Red">  <bounds x="009" y="318" width="09" height="09" /></bezel>     <!-- Special Outlane Left -->
750      <bezel name="lamp41" element="Lamp_Red">  <bounds x="301" y="318" width="09" height="09" /></bezel>     <!-- Special Outlane Right -->
751751      <!-- Bonus End of Ball Lamps -->
752      <bezel name="lamp0"  element="Lamp_White_1k"> <bounds x="126" y="298" width="09" height="09" /></bezel>   <!-- Bonus 1000 -->
753      <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="133" y="316" width="09" height="09" /></bezel>   <!-- Bonus 2000 -->
754      <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="140" y="334" width="09" height="09" /></bezel>   <!-- Bonus 3000 -->
755      <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="148" y="352" width="09" height="09" /></bezel>   <!-- Bonus 4000 -->
756      <bezel name="lamp1"  element="Lamp_White_5k"> <bounds x="155" y="370" width="09" height="09" /></bezel>   <!-- Bonus 5000 -->
757      <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="162" y="352" width="09" height="09" /></bezel>   <!-- Bonus 6000 -->
758      <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="170" y="334" width="09" height="09" /></bezel>   <!-- Bonus 7000 -->
759      <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="177" y="316" width="09" height="09" /></bezel>   <!-- Bonus 8000 -->
760      <bezel name="lamp2"  element="Lamp_White_9k"> <bounds x="184" y="298" width="09" height="09" /></bezel>   <!-- Bonus 9000 -->
761      <bezel name="lamp17" element="Lamp_White_10k"><bounds x="154" y="320" width="12" height="12" /></bezel>   <!-- Bonus 10000 -->
762      <bezel name="lamp32" element="Lamp_White_20k"><bounds x="154" y="296" width="12" height="12" /></bezel>   <!-- Bonus 20000 -->
752      <bezel name="lamp0"  element="Lamp_White_1k"> <bounds x="126" y="298" width="09" height="09" /></bezel> <!-- Bonus 1000 -->
753      <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="133" y="316" width="09" height="09" /></bezel> <!-- Bonus 2000 -->
754      <bezel name="lamp30" element="Lamp_White_3k"> <bounds x="140" y="334" width="09" height="09" /></bezel> <!-- Bonus 3000 -->
755      <bezel name="lamp45" element="Lamp_White_4k"> <bounds x="148" y="352" width="09" height="09" /></bezel> <!-- Bonus 4000 -->
756      <bezel name="lamp1"  element="Lamp_White_5k"> <bounds x="155" y="370" width="09" height="09" /></bezel> <!-- Bonus 5000 -->
757      <bezel name="lamp16" element="Lamp_White_6k"> <bounds x="162" y="352" width="09" height="09" /></bezel> <!-- Bonus 6000 -->
758      <bezel name="lamp31" element="Lamp_White_7k"> <bounds x="170" y="334" width="09" height="09" /></bezel> <!-- Bonus 7000 -->
759      <bezel name="lamp46" element="Lamp_White_8k"> <bounds x="177" y="316" width="09" height="09" /></bezel> <!-- Bonus 8000 -->
760      <bezel name="lamp2"  element="Lamp_White_9k"> <bounds x="184" y="298" width="09" height="09" /></bezel> <!-- Bonus 9000 -->
761      <bezel name="lamp17" element="Lamp_White_10k"><bounds x="154" y="320" width="12" height="12" /></bezel> <!-- Bonus 10000 -->
762      <bezel name="lamp32" element="Lamp_White_20k"><bounds x="154" y="296" width="12" height="12" /></bezel> <!-- Bonus 20000 -->
763763      <!-- Bonus Multiplier Lamps -->
764      <bezel name="lamp53" element="Lamp_2x"><bounds x="135" y="392" width="10" height="10" /></bezel>      <!-- 2X Bonus -->
765      <bezel name="lamp38" element="Lamp_3x"><bounds x="155" y="390" width="10" height="10" /></bezel>      <!-- 3X Bonus -->
766      <bezel name="lamp23" element="Lamp_5x"><bounds x="175" y="392" width="10" height="10" /></bezel>      <!-- 5X Bonus -->
764      <bezel name="lamp53" element="Lamp_2x"><bounds x="135" y="392" width="10" height="10" /></bezel>        <!-- 2X Bonus -->
765      <bezel name="lamp38" element="Lamp_3x"><bounds x="155" y="390" width="10" height="10" /></bezel>        <!-- 3X Bonus -->
766      <bezel name="lamp23" element="Lamp_5x"><bounds x="175" y="392" width="10" height="10" /></bezel>        <!-- 5X Bonus -->
767767      <!-- Drop Target Lamps -->
768      <bezel name="lamp4"  element="Lamp_2x">   <bounds x="125" y="198" width="10" height="10" /></bezel>      <!-- 2X Bonus Potential -->
769      <bezel name="lamp19" element="Lamp_3x">   <bounds x="140" y="198" width="10" height="10" /></bezel>      <!-- 3X Bonus Potential -->
770      <bezel name="lamp34" element="Lamp_5x">   <bounds x="155" y="198" width="10" height="10" /></bezel>      <!-- 5X Bonus Potential -->
771      <bezel name="lamp49" element="Lamp_Amber"><bounds x="170" y="198" width="10" height="10" /></bezel>      <!-- Extra Ball Potential -->
772      <bezel name="lamp5"  element="Lamp_Red">  <bounds x="185" y="198" width="10" height="10" /></bezel>      <!-- Special Potential -->
768      <bezel name="lamp4"  element="Lamp_2x">   <bounds x="125" y="198" width="10" height="10" /></bezel>     <!-- 2X Bonus Potential -->
769      <bezel name="lamp19" element="Lamp_3x">   <bounds x="140" y="198" width="10" height="10" /></bezel>     <!-- 3X Bonus Potential -->
770      <bezel name="lamp34" element="Lamp_5x">   <bounds x="155" y="198" width="10" height="10" /></bezel>     <!-- 5X Bonus Potential -->
771      <bezel name="lamp49" element="Lamp_Amber"><bounds x="170" y="198" width="10" height="10" /></bezel>     <!-- Extra Ball Potential -->
772      <bezel name="lamp5"  element="Lamp_Red">  <bounds x="185" y="198" width="10" height="10" /></bezel>     <!-- Special Potential -->
773773      <!-- Saucer Lamps -->
774      <bezel name="lamp6"  element="Lamp_White_3k"> <bounds x="128" y="30" width="9" height="9" /></bezel>   <!-- Upper 3000 -->
775      <bezel name="lamp21" element="Lamp_White_6k"> <bounds x="142" y="42" width="9" height="9" /></bezel>   <!-- Upper 6000 -->
776      <bezel name="lamp36" element="Lamp_White_9k"> <bounds x="156" y="54" width="9" height="9" /></bezel>   <!-- Upper 9000 -->
777      <bezel name="lamp51" element="Lamp_White_12k"><bounds x="170" y="42" width="9" height="9" /></bezel>   <!-- Upper 12000 -->
778      <bezel name="lamp7"  element="Lamp_White_15k"><bounds x="184" y="30" width="9" height="9" /></bezel>   <!-- Upper 15000 -->
774      <bezel name="lamp6"  element="Lamp_White_3k"> <bounds x="128" y="30" width="9" height="9" /></bezel>    <!-- Upper 3000 -->
775      <bezel name="lamp21" element="Lamp_White_6k"> <bounds x="142" y="42" width="9" height="9" /></bezel>    <!-- Upper 6000 -->
776      <bezel name="lamp36" element="Lamp_White_9k"> <bounds x="156" y="54" width="9" height="9" /></bezel>    <!-- Upper 9000 -->
777      <bezel name="lamp51" element="Lamp_White_12k"><bounds x="170" y="42" width="9" height="9" /></bezel>    <!-- Upper 12000 -->
778      <bezel name="lamp7"  element="Lamp_White_15k"><bounds x="184" y="30" width="9" height="9" /></bezel>    <!-- Upper 15000 -->
779779
780780
781781
trunk/src/mame/layout/by35.lay
r249924r249925
256256      <disk state="0"><color red="0.15" green="0.15" blue="0.00" /></disk>
257257      <disk state="1"><color red="1.00" green="1.00" blue="0.00" /></disk>
258258   </element>
259   <element name="Lamp_Red" defstate="0">                              <!-- Usually for Specials -->
259   <element name="Lamp_Red" defstate="0">                                      <!-- Usually for Specials -->
260260      <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk>
261261      <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk>
262262   </element>
263   <element name="Lamp_Amber" defstate="0">                           <!-- Usually for Extra Ball-->
263   <element name="Lamp_Amber" defstate="0">                                    <!-- Usually for Extra Ball-->
264264      <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk>
265265      <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk>
266266   </element>
r249924r249925
518518      <text string="3k"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="12" height="12" /></text>
519519   </element>
520520
521   <element name="Lamp_Green_Arrow_04_2x" defstate="1">   <!-- Point at 4 o clock -->
521   <element name="Lamp_Green_Arrow_04_2x" defstate="1">    <!-- Point at 4 o clock -->
522522      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
523523      <rect state="0"><color red="0.00" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
524524      <rect state="1"><color red="0.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
540540      <text string="2x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
541541   </element>
542542
543   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
543   <element name="Lamp_Yellow_Arrow_04_3x" defstate="1">   <!-- Point at 4 o clock -->
544544      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
545545      <rect state="0"><color red="0.15" green="0.15" blue="0.00" /><bounds x="00" y="00" width="08" height="03" /></rect>
546546      <rect state="1"><color red="1.00" green="1.00" blue="0.00" /><bounds x="05" y="03" width="08" height="03" /></rect>
r249924r249925
562562      <text string="3x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="18" y="08" width="15" height="15" /></text>
563563   </element>
564564
565   <element name="Lamp_White_Arrow_08_5x" defstate="1">   <!-- Point at 8 o clock -->
565   <element name="Lamp_White_Arrow_08_5x" defstate="1">    <!-- Point at 8 o clock -->
566566      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
567567      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="28" y="00" width="08" height="03" /></rect>
568568      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
584584      <text string="5x"><color red="0.0" green="0.0" blue="0.0"  /><bounds x="06" y="08" width="15" height="15" /></text>
585585   </element>
586586
587   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
587   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
588588      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
589589      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
590590      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
605605      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="28" width="03" height="08" /></rect>
606606   </element>
607607
608   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
608   <element name="Lamp_Amber_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
609609      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
610610      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
611611      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
626626      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
627627   </element>
628628
629   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
629   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
630630      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
631631      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
632632      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect>
r249924r249925
647647      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect>
648648   </element>
649649
650   <element name="Lamp_Red_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
650   <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock -->
651651      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
652652      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
653653      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
668668      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
669669   </element>
670670
671   <element name="Lamp_White_Arrow_11_A" defstate="1">   <!-- Point at 11 o clock -->
671   <element name="Lamp_White_Arrow_11_A" defstate="1"> <!-- Point at 11 o clock -->
672672      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="00" y="00" width="03" height="20" /></rect>
673673      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="00" y="00" width="03" height="20" /></rect>
674674      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="03" y="02" width="03" height="17" /></rect>
r249924r249925
690690      <text string="A"><color red="0.0" green="0.0" blue="0.0"   /><bounds x="-2" y="03" width="18" height="18" /></text>
691691   </element>
692692
693   <element name="Lamp_White_Arrow_01_B" defstate="1">   <!-- Point at 1 o clock -->
693   <element name="Lamp_White_Arrow_01_B" defstate="1"> <!-- Point at 1 o clock -->
694694      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
695695      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
696696      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
10011001      <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel>
10021002      <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel>
10031003      <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel>
1004      <!--   <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel>   -->
1004      <!--    <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> -->
10051005
10061006
10071007      <bezel element="Title_Bally"><bounds x="430" y="18" width="105" height="30" /></bezel>
r249924r249925
10241024
10251025
10261026      <!-- Player 1 Score -->
1027      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
1027      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
10281028      <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel>
10291029      <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel>
10301030      <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel>
r249924r249925
10341034      <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel>
10351035
10361036      <!-- Player 2 Score -->
1037      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
1037      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
10381038      <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel>
10391039      <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel>
10401040      <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel>
r249924r249925
10441044      <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel>
10451045
10461046      <!-- Player 3 Score -->
1047      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 3rd Player Up -->
1047      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 3rd Player Up -->
10481048      <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel>
10491049      <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel>
10501050      <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel>
r249924r249925
10541054      <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel>
10551055
10561056      <!-- Player 4 Score -->
1057      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 4th Player Up -->
1057      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 4th Player Up -->
10581058      <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel>
10591059      <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel>
10601060      <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel>
r249924r249925
10651065
10661066      <!-- Credits and Ball In Play / Match -->
10671067      <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel>
1068      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>   <!-- Backbox ~ Ball In Play -->
1069      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
1068      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>  <!-- Backbox ~ Ball In Play -->
1069      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
10701070      <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel>
10711071      <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel>
10721072      <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel>
10731073      <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel>
10741074
1075      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>   <!-- Backbox ~ Same Player Shoots Again -->
1076      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 1 Player Game -->
1077      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 2 Player Game -->
1078      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 3 Player Game -->
1079      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 4 Player Game -->
1080      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
1081      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
1082      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>         <!-- Backbox ~ Tilt -->
1075      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>    <!-- Backbox ~ Same Player Shoots Again -->
1076      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 1 Player Game -->
1077      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 2 Player Game -->
1078      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 3 Player Game -->
1079      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 4 Player Game -->
1080      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
1081      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
1082      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>           <!-- Backbox ~ Tilt -->
10831083
10841084
10851085
trunk/src/mame/layout/by35_playboy.lay
r249924r249925
216216      <disk state="0"><color red="0.15" green="0.15" blue="0.15" /></disk>
217217      <disk state="1"><color red="1.00" green="1.00" blue="1.00" /></disk>
218218   </element>
219   <element name="Lamp_Red" defstate="0">                              <!-- Usually for Specials -->
219   <element name="Lamp_Red" defstate="0">                                      <!-- Usually for Specials -->
220220      <disk state="0"><color red="0.15" green="0.00" blue="0.00" /></disk>
221221      <disk state="1"><color red="1.00" green="0.00" blue="0.00" /></disk>
222222   </element>
223   <element name="Lamp_Amber" defstate="0">                           <!-- Usually for Extra Ball-->
223   <element name="Lamp_Amber" defstate="0">                                    <!-- Usually for Extra Ball-->
224224      <disk state="0"><color red="0.15" green="0.06" blue="0.00" /></disk>
225225      <disk state="1"><color red="1.00" green="0.40" blue="0.00" /></disk>
226226   </element>
r249924r249925
409409   </element>
410410
411411
412   <element name="Lamp_Red_Arrow_08" defstate="1">   <!-- Point at 8 o clock -->
412   <element name="Lamp_Red_Arrow_08" defstate="1"> <!-- Point at 8 o clock -->
413413      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
414414      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="28" y="00" width="08" height="03" /></rect>
415415      <rect state="1"><color red="1.00" green="0.00" blue="0.00" /><bounds x="23" y="03" width="08" height="03" /></rect>
r249924r249925
430430      <rect state="0"><color red="0.15" green="0.00" blue="0.00" /><bounds x="00" y="18" width="20" height="03" /></rect>
431431   </element>
432432
433   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
433   <element name="Lamp_Amber_Arrow_10" defstate="1">   <!-- Point at 10 o clock -->
434434      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
435435      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="28" y="18" width="08" height="03" /></rect>
436436      <rect state="1"><color red="1.00" green="0.40" blue="0.00" /><bounds x="23" y="15" width="08" height="03" /></rect>
r249924r249925
451451      <rect state="0"><color red="0.15" green="0.06" blue="0.00" /><bounds x="00" y="00" width="20" height="03" /></rect>
452452   </element>
453453
454   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
454   <element name="Lamp_White_Arrow_01" defstate="1">   <!-- Point at 1 o clock -->
455455      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="18" y="00" width="03" height="20" /></rect>
456456      <rect state="0"><color red="0.15" green="0.15" blue="0.15" /><bounds x="18" y="00" width="03" height="20" /></rect>
457457      <rect state="1"><color red="1.00" green="1.00" blue="1.00" /><bounds x="15" y="02" width="03" height="17" /></rect>
r249924r249925
527527      <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk>
528528      <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk>
529529   </element>
530   
531530
532531
532
533533<!-- Solenoids -->
534534
535535   <element name="Solenoid_PullDown">
r249924r249925
633633
634634      <!-- Background -->
635635      <backdrop element="Canvas"><bounds x="000" y="000" width="640" height="480" /></backdrop>
636     
636
637637      <bezel element="Draw_White"><bounds x="000" y="000" width="640" height="001" /></bezel>
638638      <bezel element="Draw_White"><bounds x="000" y="000" width="001" height="480" /></bezel>
639639      <bezel element="Draw_White"><bounds x="640" y="000" width="001" height="480" /></bezel>
640640      <bezel element="Draw_White"><bounds x="000" y="480" width="640" height="001" /></bezel>
641641      <bezel element="Draw_White"><bounds x="320" y="000" width="001" height="480" /></bezel>
642642      <bezel element="Draw_White"><bounds x="320" y="320" width="320" height="001" /></bezel>
643      <!--   <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel>   -->
643      <!--    <bezel element="Draw_White"><bounds x="159" y="000" width="001" height="480" /></bezel> -->
644644
645645      <bezel element="Title_Playboy"><bounds x="430" y="18" width="105" height="30" /></bezel>
646646
r249924r249925
658658
659659
660660      <!-- Player 1 Score -->
661      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
661      <bezel name="lamp14" element="Lamp_P1"><bounds x="330" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 1st Player Up -->
662662      <bezel name="digit17" element="Digit"><bounds x="360" y="55" width="10" height="15" /></bezel>
663663      <bezel name="digit16" element="Digit"><bounds x="374" y="55" width="10" height="15" /></bezel>
664664      <bezel name="digit15" element="Digit"><bounds x="388" y="55" width="10" height="15" /></bezel>
r249924r249925
668668      <bezel name="digit11" element="Digit"><bounds x="444" y="55" width="10" height="15" /></bezel>
669669
670670      <!-- Player 2 Score -->
671      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
671      <bezel name="lamp29" element="Lamp_P2"><bounds x="615" y="55" width="15" height="15" /></bezel>         <!-- Backbox ~ 2nd Player Up -->
672672      <bezel name="digit27" element="Digit"><bounds x="506" y="55" width="10" height="15" /></bezel>
673673      <bezel name="digit26" element="Digit"><bounds x="520" y="55" width="10" height="15" /></bezel>
674674      <bezel name="digit25" element="Digit"><bounds x="534" y="55" width="10" height="15" /></bezel>
r249924r249925
678678      <bezel name="digit21" element="Digit"><bounds x="590" y="55" width="10" height="15" /></bezel>
679679
680680      <!-- Player 3 Score -->
681      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 3rd Player Up -->
681      <bezel name="lamp44" element="Lamp_P3"><bounds x="330" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 3rd Player Up -->
682682      <bezel name="digit37" element="Digit"><bounds x="360" y="250" width="10" height="15" /></bezel>
683683      <bezel name="digit36" element="Digit"><bounds x="374" y="250" width="10" height="15" /></bezel>
684684      <bezel name="digit35" element="Digit"><bounds x="388" y="250" width="10" height="15" /></bezel>
r249924r249925
688688      <bezel name="digit31" element="Digit"><bounds x="444" y="250" width="10" height="15" /></bezel>
689689
690690      <!-- Player 4 Score -->
691      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>      <!-- Backbox ~ 4th Player Up -->
691      <bezel name="lamp59" element="Lamp_P4"><bounds x="615" y="250" width="15" height="15" /></bezel>        <!-- Backbox ~ 4th Player Up -->
692692      <bezel name="digit47" element="Digit"><bounds x="506" y="250" width="10" height="15" /></bezel>
693693      <bezel name="digit46" element="Digit"><bounds x="520" y="250" width="10" height="15" /></bezel>
694694      <bezel name="digit45" element="Digit"><bounds x="534" y="250" width="10" height="15" /></bezel>
r249924r249925
699699
700700      <!-- Credits and Ball In Play / Match -->
701701      <bezel element="Text_Credit"><bounds x="542" y="142" width="48" height="8" /></bezel>
702      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>   <!-- Backbox ~ Ball In Play -->
703      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
702      <bezel name="lamp12"  element="Ball_In_Play"><bounds x="586" y="105" width="50" height="11" /></bezel>  <!-- Backbox ~ Ball In Play -->
703      <bezel name="lamp25"  element="Match"><bounds x="596" y="152" width="25" height="11" /></bezel>         <!-- Backbox ~ Match -->
704704      <bezel name="digit55" element="Digit"><bounds x="554" y="125" width="10" height="15" /></bezel>
705705      <bezel name="digit54" element="Digit"><bounds x="568" y="125" width="10" height="15" /></bezel>
706706      <bezel name="digit52" element="Digit"><bounds x="596" y="125" width="10" height="15" /></bezel>
707707      <bezel name="digit51" element="Digit"><bounds x="610" y="125" width="10" height="15" /></bezel>
708708
709      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>   <!-- Backbox ~ Same Player Shoots Again -->
710      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 1 Player Game -->
711      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 2 Player Game -->
712      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 3 Player Game -->
713      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>      <!-- Backbox ~ 4 Player Game -->
714      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
715      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
716      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>         <!-- Backbox ~ Tilt -->
709      <bezel name="lamp10" element="Shoot_Again"><bounds x="420" y="295" width="60" height="19" /></bezel>    <!-- Backbox ~ Same Player Shoots Again -->
710      <bezel name="lamp13" element="Lamp_1P"><bounds x="345" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 1 Player Game -->
711      <bezel name="lamp28" element="Lamp_2P"><bounds x="360" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 2 Player Game -->
712      <bezel name="lamp43" element="Lamp_3P"><bounds x="375" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 3 Player Game -->
713      <bezel name="lamp58" element="Lamp_4P"><bounds x="390" y="297" width="15" height="15" /></bezel>        <!-- Backbox ~ 4 Player Game -->
714      <bezel name="lamp27" element="High_Score_To_Date"><bounds x="438" y="6" width="90" height="11" /></bezel>   <!-- Backbox ~ High Score To Date -->
715      <bezel name="lamp42" element="Game_Over"><bounds x="580" y="300" width="45" height="11" /></bezel>      <!-- Backbox ~ Game Over -->
716      <bezel name="lamp57" element="Tilt"><bounds x="480" y="297" width="50" height="16" /></bezel>           <!-- Backbox ~ Tilt -->
717717
718718
719719
r249924r249925
724724      <bezel element="Text_60"><bounds x="552" y="418" width="30" height="11" /></bezel>
725725
726726      <!-- Lamps controlled by U1 on Lamp Driver Board -->
727      <bezel name="lamp0"  element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel>   <!-- U1 00 -->
728      <bezel name="lamp1"  element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel>   <!-- U1 01 -->
729      <bezel name="lamp2"  element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel>   <!-- U1 02 -->
730      <bezel name="lamp3"  element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel>   <!-- U1 03 -->
731      <bezel name="lamp4"  element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel>   <!-- U1 04 -->
732      <bezel name="lamp5"  element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel>   <!-- U1 05 -->
733      <bezel name="lamp6"  element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel>   <!-- U1 06 -->
734      <bezel name="lamp7"  element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel>   <!-- U1 07 -->
735      <bezel name="lamp8"  element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel>   <!-- U1 08 -->
736      <bezel name="lamp9"  element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel>   <!-- U1 09 -->
737      <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel>   <!-- U1 10 -->
738      <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel>   <!-- U1 11 -->
739      <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel>   <!-- U1 12 -->
740      <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel>   <!-- U1 13 -->
741      <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel>   <!-- U1 14 -->
727      <bezel name="lamp0"  element="Lamp_White"><bounds x="330" y="375" width="8" height="8" /></bezel>   <!-- U1 00 -->
728      <bezel name="lamp1"  element="Lamp_White"><bounds x="345" y="375" width="8" height="8" /></bezel>   <!-- U1 01 -->
729      <bezel name="lamp2"  element="Lamp_White"><bounds x="360" y="375" width="8" height="8" /></bezel>   <!-- U1 02 -->
730      <bezel name="lamp3"  element="Lamp_White"><bounds x="375" y="375" width="8" height="8" /></bezel>   <!-- U1 03 -->
731      <bezel name="lamp4"  element="Lamp_White"><bounds x="390" y="375" width="8" height="8" /></bezel>   <!-- U1 04 -->
732      <bezel name="lamp5"  element="Lamp_White"><bounds x="405" y="375" width="8" height="8" /></bezel>   <!-- U1 05 -->
733      <bezel name="lamp6"  element="Lamp_White"><bounds x="420" y="375" width="8" height="8" /></bezel>   <!-- U1 06 -->
734      <bezel name="lamp7"  element="Lamp_White"><bounds x="435" y="375" width="8" height="8" /></bezel>   <!-- U1 07 -->
735      <bezel name="lamp8"  element="Lamp_White"><bounds x="450" y="375" width="8" height="8" /></bezel>   <!-- U1 08 -->
736      <bezel name="lamp9"  element="Lamp_White"><bounds x="465" y="375" width="8" height="8" /></bezel>   <!-- U1 09 -->
737      <bezel name="lamp10" element="Lamp_White"><bounds x="480" y="375" width="8" height="8" /></bezel>   <!-- U1 10 -->
738      <bezel name="lamp11" element="Lamp_White"><bounds x="495" y="375" width="8" height="8" /></bezel>   <!-- U1 11 -->
739      <bezel name="lamp12" element="Lamp_White"><bounds x="510" y="375" width="8" height="8" /></bezel>   <!-- U1 12 -->
740      <bezel name="lamp13" element="Lamp_White"><bounds x="525" y="375" width="8" height="8" /></bezel>   <!-- U1 13 -->
741      <bezel name="lamp14" element="Lamp_White"><bounds x="540" y="375" width="8" height="8" /></bezel>   <!-- U1 14 -->
742742
743743      <!-- Lamps controlled by U2 on Lamp Driver Board -->
744      <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel>   <!-- U2 00 -->
745      <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel>   <!-- U2 01 -->
746      <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel>   <!-- U2 02 -->
747      <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel>   <!-- U2 03 -->
748      <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel>   <!-- U2 04 -->
749      <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel>   <!-- U2 05 -->
750      <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel>   <!-- U2 06 -->
751      <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel>   <!-- U2 07 -->
752      <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel>   <!-- U2 08 -->
753      <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel>   <!-- U2 09 -->
754      <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel>   <!-- U2 10 -->
755      <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel>   <!-- U2 11 -->
756      <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel>   <!-- U2 12 -->
757      <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel>   <!-- U2 13 -->
758      <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel>   <!-- U2 14 -->
744      <bezel name="lamp15" element="Lamp_White"><bounds x="330" y="390" width="8" height="8" /></bezel>   <!-- U2 00 -->
745      <bezel name="lamp16" element="Lamp_White"><bounds x="345" y="390" width="8" height="8" /></bezel>   <!-- U2 01 -->
746      <bezel name="lamp17" element="Lamp_White"><bounds x="360" y="390" width="8" height="8" /></bezel>   <!-- U2 02 -->
747      <bezel name="lamp18" element="Lamp_White"><bounds x="375" y="390" width="8" height="8" /></bezel>   <!-- U2 03 -->
748      <bezel name="lamp19" element="Lamp_White"><bounds x="390" y="390" width="8" height="8" /></bezel>   <!-- U2 04 -->
749      <bezel name="lamp20" element="Lamp_White"><bounds x="405" y="390" width="8" height="8" /></bezel>   <!-- U2 05 -->
750      <bezel name="lamp21" element="Lamp_White"><bounds x="420" y="390" width="8" height="8" /></bezel>   <!-- U2 06 -->
751      <bezel name="lamp22" element="Lamp_White"><bounds x="435" y="390" width="8" height="8" /></bezel>   <!-- U2 07 -->
752      <bezel name="lamp23" element="Lamp_White"><bounds x="450" y="390" width="8" height="8" /></bezel>   <!-- U2 08 -->
753      <bezel name="lamp24" element="Lamp_White"><bounds x="465" y="390" width="8" height="8" /></bezel>   <!-- U2 09 -->
754      <bezel name="lamp25" element="Lamp_White"><bounds x="480" y="390" width="8" height="8" /></bezel>   <!-- U2 10 -->
755      <bezel name="lamp26" element="Lamp_White"><bounds x="495" y="390" width="8" height="8" /></bezel>   <!-- U2 11 -->
756      <bezel name="lamp27" element="Lamp_White"><bounds x="510" y="390" width="8" height="8" /></bezel>   <!-- U2 12 -->
757      <bezel name="lamp28" element="Lamp_White"><bounds x="525" y="390" width="8" height="8" /></bezel>   <!-- U2 13 -->
758      <bezel name="lamp29" element="Lamp_White"><bounds x="540" y="390" width="8" height="8" /></bezel>   <!-- U2 14 -->
759759
760760      <!-- Lamps controlled by U3 on Lamp Driver Board -->
761      <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel>   <!-- U3 00 -->
762      <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel>   <!-- U3 01 -->
763      <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel>   <!-- U3 02 -->
764      <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel>   <!-- U3 03 -->
765      <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel>   <!-- U3 04 -->
766      <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel>   <!-- U3 05 -->
767      <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel>   <!-- U3 06 -->
768      <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel>   <!-- U3 07 -->
769      <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel>   <!-- U3 08 -->
770      <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel>   <!-- U3 09 -->
771      <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel>   <!-- U3 10 -->
772      <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel>   <!-- U3 11 -->
773      <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel>   <!-- U3 12 -->
774      <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel>   <!-- U3 13 -->
775      <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel>   <!-- U3 14 -->
761      <bezel name="lamp30" element="Lamp_White"><bounds x="330" y="405" width="8" height="8" /></bezel>   <!-- U3 00 -->
762      <bezel name="lamp31" element="Lamp_White"><bounds x="345" y="405" width="8" height="8" /></bezel>   <!-- U3 01 -->
763      <bezel name="lamp32" element="Lamp_White"><bounds x="360" y="405" width="8" height="8" /></bezel>   <!-- U3 02 -->
764      <bezel name="lamp33" element="Lamp_White"><bounds x="375" y="405" width="8" height="8" /></bezel>   <!-- U3 03 -->
765      <bezel name="lamp34" element="Lamp_White"><bounds x="390" y="405" width="8" height="8" /></bezel>   <!-- U3 04 -->
766      <bezel name="lamp35" element="Lamp_White"><bounds x="405" y="405" width="8" height="8" /></bezel>   <!-- U3 05 -->
767      <bezel name="lamp36" element="Lamp_White"><bounds x="420" y="405" width="8" height="8" /></bezel>   <!-- U3 06 -->
768      <bezel name="lamp37" element="Lamp_White"><bounds x="435" y="405" width="8" height="8" /></bezel>   <!-- U3 07 -->
769      <bezel name="lamp38" element="Lamp_White"><bounds x="450" y="405" width="8" height="8" /></bezel>   <!-- U3 08 -->
770      <bezel name="lamp39" element="Lamp_White"><bounds x="465" y="405" width="8" height="8" /></bezel>   <!-- U3 09 -->
771      <bezel name="lamp40" element="Lamp_White"><bounds x="480" y="405" width="8" height="8" /></bezel>   <!-- U3 10 -->
772      <bezel name="lamp41" element="Lamp_White"><bounds x="495" y="405" width="8" height="8" /></bezel>   <!-- U3 11 -->
773      <bezel name="lamp42" element="Lamp_White"><bounds x="510" y="405" width="8" height="8" /></bezel>   <!-- U3 12 -->
774      <bezel name="lamp43" element="Lamp_White"><bounds x="525" y="405" width="8" height="8" /></bezel>   <!-- U3 13 -->
775      <bezel name="lamp44" element="Lamp_White"><bounds x="540" y="405" width="8" height="8" /></bezel>   <!-- U3 14 -->
776776
777777      <!-- Lamps controlled by U4 on Lamp Driver Board -->
778      <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel>   <!-- U4 00 -->
779      <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel>   <!-- U4 01 -->
780      <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel>   <!-- U4 02 -->
781      <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel>   <!-- U4 03 -->
782      <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel>   <!-- U4 04 -->
783      <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel>   <!-- U4 05 -->
784      <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel>   <!-- U4 06 -->
785      <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel>   <!-- U4 07 -->
786      <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel>   <!-- U4 08 -->
787      <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel>   <!-- U4 09 -->
788      <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel>   <!-- U4 10 -->
789      <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel>   <!-- U4 11 -->
790      <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel>   <!-- U4 12 -->
791      <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel>   <!-- U4 13 -->
792      <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel>   <!-- U4 14 -->
778      <bezel name="lamp45" element="Lamp_White"><bounds x="330" y="420" width="8" height="8" /></bezel>   <!-- U4 00 -->
779      <bezel name="lamp46" element="Lamp_White"><bounds x="345" y="420" width="8" height="8" /></bezel>   <!-- U4 01 -->
780      <bezel name="lamp47" element="Lamp_White"><bounds x="360" y="420" width="8" height="8" /></bezel>   <!-- U4 02 -->
781      <bezel name="lamp48" element="Lamp_White"><bounds x="375" y="420" width="8" height="8" /></bezel>   <!-- U4 03 -->
782      <bezel name="lamp49" element="Lamp_White"><bounds x="390" y="420" width="8" height="8" /></bezel>   <!-- U4 04 -->
783      <bezel name="lamp50" element="Lamp_White"><bounds x="405" y="420" width="8" height="8" /></bezel>   <!-- U4 05 -->
784      <bezel name="lamp51" element="Lamp_White"><bounds x="420" y="420" width="8" height="8" /></bezel>   <!-- U4 06 -->
785      <bezel name="lamp52" element="Lamp_White"><bounds x="435" y="420" width="8" height="8" /></bezel>   <!-- U4 07 -->
786      <bezel name="lamp53" element="Lamp_White"><bounds x="450" y="420" width="8" height="8" /></bezel>   <!-- U4 08 -->
787      <bezel name="lamp54" element="Lamp_White"><bounds x="465" y="420" width="8" height="8" /></bezel>   <!-- U4 09 -->
788      <bezel name="lamp55" element="Lamp_White"><bounds x="480" y="420" width="8" height="8" /></bezel>   <!-- U4 10 -->
789      <bezel name="lamp56" element="Lamp_White"><bounds x="495" y="420" width="8" height="8" /></bezel>   <!-- U4 11 -->
790      <bezel name="lamp57" element="Lamp_White"><bounds x="510" y="420" width="8" height="8" /></bezel>   <!-- U4 12 -->
791      <bezel name="lamp58" element="Lamp_White"><bounds x="525" y="420" width="8" height="8" /></bezel>   <!-- U4 13 -->
792      <bezel name="lamp59" element="Lamp_White"><bounds x="540" y="420" width="8" height="8" /></bezel>   <!-- U4 14 -->
793793
794794
795795      <bezel element="Text_Solenoids"><bounds x="382" y="437" width="100" height="11" /></bezel>
r249924r249925
837837
838838
839839      <!-- Misc Lamps -->
840      <bezel name="lamp55" element="Credit_Indicator">   <bounds x="023"   y="456" width="70"   height="21" /></bezel>   <!-- Credit Indicator -->
841      <bezel name="lamp40" element="Lamp_Amber">         <bounds x="153.5" y="420" width="12"   height="12" /></bezel>   <!-- Extra Ball -->
842      <bezel name="lamp49" element="Lamp_Red">           <bounds x="209"   y="192" width="14"   height="14" /></bezel>   <!-- Special Drop Targets -->
843      <bezel name="lamp47" element="Lamp_Red">           <bounds x="155"   y="023" width="09"   height="9" /></bezel>      <!-- Special 1 - 5 Keys -->
844      <bezel name="lamp56" element="Lamp_White_25k">     <bounds x="009"   y="333" width="09"   height="9" /></bezel>      <!-- 25,000 Outlane Left -->
845      <bezel name="lamp41" element="Lamp_White_25k">     <bounds x="301"   y="333" width="09"   height="9" /></bezel>      <!-- 25,000 Outlane Right -->
846      <bezel name="lamp53" element="Lamp_Amber_Arrow_10"><bounds x="055"   y="198" width="20"   height="12.5" /></bezel>   <!-- Extra Ball Potential Rollover Button -->
847      <bezel name="lamp38" element="Lamp_Red_Arrow_08">  <bounds x="055"   y="148" width="20"   height="12.5" /></bezel>   <!-- Special Potential Rollover Button -->
840      <bezel name="lamp55" element="Credit_Indicator">   <bounds x="023"   y="456" width="70"   height="21" /></bezel>    <!-- Credit Indicator -->
841      <bezel name="lamp40" element="Lamp_Amber">         <bounds x="153.5" y="420" width="12"   height="12" /></bezel>    <!-- Extra Ball -->
842      <bezel name="lamp49" element="Lamp_Red">           <bounds x="209"   y="192" width="14"   height="14" /></bezel>    <!-- Special Drop Targets -->
843      <bezel name="lamp47" element="Lamp_Red">           <bounds x="155"   y="023" width="09"   height="9" /></bezel>     <!-- Special 1 - 5 Keys -->
844      <bezel name="lamp56" element="Lamp_White_25k">     <bounds x="009"   y="333" width="09"   height="9" /></bezel>     <!-- 25,000 Outlane Left -->
845      <bezel name="lamp41" element="Lamp_White_25k">     <bounds x="301"   y="333" width="09"   height="9" /></bezel>     <!-- 25,000 Outlane Right -->
846      <bezel name="lamp53" element="Lamp_Amber_Arrow_10"><bounds x="055"   y="198" width="20"   height="12.5" /></bezel>  <!-- Extra Ball Potential Rollover Button -->
847      <bezel name="lamp38" element="Lamp_Red_Arrow_08">  <bounds x="055"   y="148" width="20"   height="12.5" /></bezel>  <!-- Special Potential Rollover Button -->
848848      <!-- Bonus End of Ball Lamps -->
849849      <bezel name="lamp0"  element="Lamp_White_1k"> <bounds x="126" y="395" width="09" height="09" /></bezel>
850850      <bezel name="lamp15" element="Lamp_White_2k"> <bounds x="126" y="380" width="09" height="09" /></bezel>
r249924r249925
858858      <bezel name="lamp17" element="Lamp_White_10k"><bounds x="184" y="395" width="09" height="09" /></bezel>
859859      <bezel name="lamp32" element="Lamp_White_20k"><bounds x="154" y="330" width="12" height="12" /></bezel>
860860      <!-- Bonus Multiplier Lamps -->
861      <bezel name="lamp51" element="Lamp_2x"><bounds x="134" y="318" width="14" height="14" /></bezel>      <!-- 2X Bonus -->
862      <bezel name="lamp36" element="Lamp_3x"><bounds x="172" y="318" width="14" height="14" /></bezel>      <!-- 3X Bonus -->
863      <bezel name="lamp21" element="Lamp_5x"><bounds x="153" y="310" width="14" height="14" /></bezel>      <!-- 5X Bonus -->
861      <bezel name="lamp51" element="Lamp_2x"><bounds x="134" y="318" width="14" height="14" /></bezel>        <!-- 2X Bonus -->
862      <bezel name="lamp36" element="Lamp_3x"><bounds x="172" y="318" width="14" height="14" /></bezel>        <!-- 3X Bonus -->
863      <bezel name="lamp21" element="Lamp_5x"><bounds x="153" y="310" width="14" height="14" /></bezel>        <!-- 5X Bonus -->
864864      <!-- Grotto Lamps -->
865      <bezel name="lamp19" element="Lamp_White_25k"><bounds x="17" y="090" width="12" height="12" /></bezel>      <!-- 25,000 Grotto -->
866      <bezel name="lamp5"  element="Lamp_White_1">  <bounds x="09" y="132" width="09" height="09" /></bezel>      <!-- 1 -->
867      <bezel name="lamp20" element="Lamp_White_2">  <bounds x="09" y="147" width="09" height="09" /></bezel>      <!-- 2 -->
868      <bezel name="lamp35" element="Lamp_White_3">  <bounds x="09" y="162" width="09" height="09" /></bezel>      <!-- 3 -->
869      <bezel name="lamp50" element="Lamp_White_4">  <bounds x="09" y="177" width="09" height="09" /></bezel>      <!-- 4 -->
870      <bezel name="lamp6"  element="Lamp_White_5">  <bounds x="09" y="192" width="09" height="09" /></bezel>      <!-- 5 -->
865      <bezel name="lamp19" element="Lamp_White_25k"><bounds x="17" y="090" width="12" height="12" /></bezel>      <!-- 25,000 Grotto -->
866      <bezel name="lamp5"  element="Lamp_White_1">  <bounds x="09" y="132" width="09" height="09" /></bezel>      <!-- 1 -->
867      <bezel name="lamp20" element="Lamp_White_2">  <bounds x="09" y="147" width="09" height="09" /></bezel>      <!-- 2 -->
868      <bezel name="lamp35" element="Lamp_White_3">  <bounds x="09" y="162" width="09" height="09" /></bezel>      <!-- 3 -->
869      <bezel name="lamp50" element="Lamp_White_4">  <bounds x="09" y="177" width="09" height="09" /></bezel>      <!-- 4 -->
870      <bezel name="lamp6"  element="Lamp_White_5">  <bounds x="09" y="192" width="09" height="09" /></bezel>      <!-- 5 -->
871871      <!-- Playmate of the Month Lamps -->
872      <bezel name="lamp7"  element="Lamp_White_March">    <bounds x="56" y="225" width="21" height="18" /></bezel>   <!-- March -->
873      <bezel name="lamp22" element="Lamp_White_May">      <bounds x="50" y="244" width="13" height="18" /></bezel>   <!-- May -->
874      <bezel name="lamp37" element="Lamp_White_January">  <bounds x="44" y="263" width="29" height="18" /></bezel>   <!-- January -->
875      <bezel name="lamp52" element="Lamp_White_July">     <bounds x="38" y="282" width="16" height="18" /></bezel>   <!-- July -->
876      <bezel name="lamp8"  element="Lamp_White_September"><bounds x="32" y="301" width="37" height="18" /></bezel>   <!-- September -->
872      <bezel name="lamp7"  element="Lamp_White_March">    <bounds x="56" y="225" width="21" height="18" /></bezel>    <!-- March -->
873      <bezel name="lamp22" element="Lamp_White_May">      <bounds x="50" y="244" width="13" height="18" /></bezel>    <!-- May -->
874      <bezel name="lamp37" element="Lamp_White_January">  <bounds x="44" y="263" width="29" height="18" /></bezel>    <!-- January -->
875      <bezel name="lamp52" element="Lamp_White_July">     <bounds x="38" y="282" width="16" height="18" /></bezel>    <!-- July -->
876      <bezel name="lamp8"  element="Lamp_White_September"><bounds x="32" y="301" width="37" height="18" /></bezel>    <!-- September -->
877877
878878
879879
trunk/src/mame/machine/apollo.c
r249924r249925
970970   CLOG1(("apollo_ni::call_load: %s", filename()));
971971
972972   UINT64 size = length();
973    if (size != 32)
973      if (size != 32)
974974   {
975975      CLOG(("apollo_ni::call_load: %s has unexpected file size %" I64FMT "d", filename(), size));
976976   }
trunk/src/mame/machine/electron.c
r249924r249925
249249      {
250250      /* GUESS
251251       * the Advanced Users manual says this is the correct algorithm
252       * but the divider is wrong(?), says 16 but results in high pitch,
252       * but the divider is wrong(?), says 16 but results in high pitch,
253253       * 32 is more close
254254       */
255255         m_beeper->set_frequency( 1000000 / ( 32 * ( data + 1 ) ) );
trunk/src/mame/machine/mm1kb.c
r249924r249925
4343static const char *const mm1_kb_sample_names[] =
4444{
4545   "*MM1_keyboard",
46   "beep",         // beep at 2.6 kHz
46   "beep",         // beep at 2.6 kHz
4747   "power_switch", // not actually on the keyboard, but close enough :)
4848   0
4949};
trunk/src/mame/machine/mm1kb.h
r249924r249925
8787   int m_drive;
8888   UINT8 m_data;
8989
90   static bool first_time;               // for power switch sound
91   emu_timer *m_scan_timer;            // scan timer
90   static bool first_time;                 // for power switch sound
91   emu_timer *m_scan_timer;                // scan timer
9292};
9393
9494
trunk/src/mame/machine/psxcd.c
r249924r249925
12441244 *
12451245 */
12461246ROM_START( psxcd )
1247    ROM_REGION( 0x10000, "cdrom_mcu", 0 )
1247   ROM_REGION( 0x10000, "cdrom_mcu", 0 )
12481248
1249    /* Retail PlayStation CD-ROM Firmware:
1250     *
1251     * Still missing:
1252     * SCPH-1001, 3000, 3500, 5003, 5502, 5503, 7000W, 7001, 7002, 7003, 7503, 9003, 100, 101, 102 and 103.
1253     */
1249   /* Retail PlayStation CD-ROM Firmware:
1250    *
1251    * Still missing:
1252    * SCPH-1001, 3000, 3500, 5003, 5502, 5503, 7000W, 7001, 7002, 7003, 7503, 9003, 100, 101, 102 and 103.
1253    */
12541254
1255    ROM_SYSTEM_BIOS( 0, "SCPH-1000-later", "SCPH-1000 NTSC:J (Later Ver.) [424660]" )
1256    ROMX_LOAD( "424660.bin", 0x0000, 0x4200, CRC(f82a2a46) SHA1(095434948d4c71cdfaa069e91053443887a6d139), ROM_BIOS(1) )
1255   ROM_SYSTEM_BIOS( 0, "SCPH-1000-later", "SCPH-1000 NTSC:J (Later Ver.) [424660]" )
1256   ROMX_LOAD( "424660.bin", 0x0000, 0x4200, CRC(f82a2a46) SHA1(095434948d4c71cdfaa069e91053443887a6d139), ROM_BIOS(1) )
12571257
1258    ROM_SYSTEM_BIOS( 1, "SCPH-1000-early", "SCPH-1000 NTSC:J (Early Ver.) [424666]" )
1259    ROMX_LOAD( "424666.bin", 0x0000, 0x4200, CRC(60bc954e) SHA1(80674353daf95ffb4bd15cc4bb8cfa713370dd45), ROM_BIOS(2) )
1258   ROM_SYSTEM_BIOS( 1, "SCPH-1000-early", "SCPH-1000 NTSC:J (Early Ver.) [424666]" )
1259   ROMX_LOAD( "424666.bin", 0x0000, 0x4200, CRC(60bc954e) SHA1(80674353daf95ffb4bd15cc4bb8cfa713370dd45), ROM_BIOS(2) )
12601260
1261    ROM_SYSTEM_BIOS( 2, "SCPH-1002-early", "SCPH-1002 PAL (Early PU-8) [424684]" )
1262    ROMX_LOAD( "424684.bin", 0x0000, 0x4200, CRC(84d46b2a) SHA1(9b06b1d407b784095ddbd45aeabafd689d2ee347), ROM_BIOS(3) )
1261   ROM_SYSTEM_BIOS( 2, "SCPH-1002-early", "SCPH-1002 PAL (Early PU-8) [424684]" )
1262   ROMX_LOAD( "424684.bin", 0x0000, 0x4200, CRC(84d46b2a) SHA1(9b06b1d407b784095ddbd45aeabafd689d2ee347), ROM_BIOS(3) )
12631263
1264    /* Chip markings: C 1021 / SC430916PB / G63C 185 / JSAB9624F */
1265    ROM_SYSTEM_BIOS( 3, "SCPH-5000", "SCPH-5000 NTSC:J [SC430916]" )
1266    ROMX_LOAD( "sc430916.s19", 0x0000, 0xb195, CRC(487c8a40) SHA1(0ae8348fb43ab80845b0166494edc3e1565a3ef7), ROM_BIOS(4) )
1264   /* Chip markings: C 1021 / SC430916PB / G63C 185 / JSAB9624F */
1265   ROM_SYSTEM_BIOS( 3, "SCPH-5000", "SCPH-5000 NTSC:J [SC430916]" )
1266   ROMX_LOAD( "sc430916.s19", 0x0000, 0xb195, CRC(487c8a40) SHA1(0ae8348fb43ab80845b0166494edc3e1565a3ef7), ROM_BIOS(4) )
12671267
1268    /* Chip markings: C 1030 / SC430925PB / G63C 185 / JSBK9708C
1269       Board Type: PU-18 / 1-664-537-11 */
1270    ROM_SYSTEM_BIOS( 4, "SCPH-5500", "SCPH-5500 NTSC:J [SC430925]" )
1271    ROMX_LOAD( "sc430925.s19", 0x0000, 0xb195, CRC(c09aa0c2) SHA1(b9ad66cc8ea4d6e2eb2709ffb77c9647f679097a), ROM_BIOS(5) )
1268   /* Chip markings: C 1030 / SC430925PB / G63C 185 / JSBK9708C
1269      Board Type: PU-18 / 1-664-537-11 */
1270   ROM_SYSTEM_BIOS( 4, "SCPH-5500", "SCPH-5500 NTSC:J [SC430925]" )
1271   ROMX_LOAD( "sc430925.s19", 0x0000, 0xb195, CRC(c09aa0c2) SHA1(b9ad66cc8ea4d6e2eb2709ffb77c9647f679097a), ROM_BIOS(5) )
12721272
1273    /* Chip markings: C 2030 / SC430930PB / G63C 185 / SSJZ9748A
1274       Board Type: PU-18 / 1-664-537-62 */
1275    ROM_SYSTEM_BIOS( 5, "SCPH-5501", "SCPH-5501 NTSC:U/C [SC430930]" )
1276    ROMX_LOAD( "sc430930.s19", 0x0000, 0xb195, CRC(587b84c2) SHA1(556c3adc37e4eb64fd463c54f7a310c483e0e835), ROM_BIOS(6) )
1273   /* Chip markings: C 2030 / SC430930PB / G63C 185 / SSJZ9748A
1274      Board Type: PU-18 / 1-664-537-62 */
1275   ROM_SYSTEM_BIOS( 5, "SCPH-5501", "SCPH-5501 NTSC:U/C [SC430930]" )
1276   ROMX_LOAD( "sc430930.s19", 0x0000, 0xb195, CRC(587b84c2) SHA1(556c3adc37e4eb64fd463c54f7a310c483e0e835), ROM_BIOS(6) )
12771277
1278    /* ROM dump is the same as SCPH-5552 */
1279    ROM_SYSTEM_BIOS( 6, "SCPH-5502", "SCPH-5502 PAL [SC430929]" )
1280    ROMX_LOAD( "sc430929.bin", 0x0000, 0x4200, CRC(ba87a3e0) SHA1(f23458d13a518616a8592b8ddd668c052bc9be5a), ROM_BIOS(7) )
1278   /* ROM dump is the same as SCPH-5552 */
1279   ROM_SYSTEM_BIOS( 6, "SCPH-5502", "SCPH-5502 PAL [SC430929]" )
1280   ROMX_LOAD( "sc430929.bin", 0x0000, 0x4200, CRC(ba87a3e0) SHA1(f23458d13a518616a8592b8ddd668c052bc9be5a), ROM_BIOS(7) )
12811281
1282    ROM_SYSTEM_BIOS( 7, "SCPH-5903", "SCPH-5903 NTSC:J [SC430924PB]" )
1283    ROMX_LOAD( "sc430924.s19", 0x0000, 0xb195, CRC(dbe694b2) SHA1(ac72cb616b1449fe29e52faf6aad389118852d73), ROM_BIOS(8) )
1282   ROM_SYSTEM_BIOS( 7, "SCPH-5903", "SCPH-5903 NTSC:J [SC430924PB]" )
1283   ROMX_LOAD( "sc430924.s19", 0x0000, 0xb195, CRC(dbe694b2) SHA1(ac72cb616b1449fe29e52faf6aad389118852d73), ROM_BIOS(8) )
12841284
1285    /* Chip markings: C 1040 / SC430934PB / G63C 185 / SSDG9745D */
1286    ROM_SYSTEM_BIOS( 8, "SCPH-7000", "SCPH-7000 NTSC:J [SC430934]" )
1287    ROMX_LOAD( "sc430934.s19", 0x0000, 0xb195, CRC(6443740c) SHA1(d9734c7135c75dbe7733079a2d4244a28c9e966e), ROM_BIOS(9) )
1285   /* Chip markings: C 1040 / SC430934PB / G63C 185 / SSDG9745D */
1286   ROM_SYSTEM_BIOS( 8, "SCPH-7000", "SCPH-7000 NTSC:J [SC430934]" )
1287   ROMX_LOAD( "sc430934.s19", 0x0000, 0xb195, CRC(6443740c) SHA1(d9734c7135c75dbe7733079a2d4244a28c9e966e), ROM_BIOS(9) )
12881288
1289    /* Chip markings: C 1050 / SC430938PB / G63C 185 / SSAM9850C */
1290    ROM_SYSTEM_BIOS( 9, "SCPH-7500", "SCPH-7500 NTSC:J [SC430938]" )
1291    ROMX_LOAD( "sc430938.s19", 0x0000, 0xb195, CRC(9744977a) SHA1(f017d34a98a8a023f6752ba9ed749bb9e2b836d5), ROM_BIOS(10) )
1289   /* Chip markings: C 1050 / SC430938PB / G63C 185 / SSAM9850C */
1290   ROM_SYSTEM_BIOS( 9, "SCPH-7500", "SCPH-7500 NTSC:J [SC430938]" )
1291   ROMX_LOAD( "sc430938.s19", 0x0000, 0xb195, CRC(9744977a) SHA1(f017d34a98a8a023f6752ba9ed749bb9e2b836d5), ROM_BIOS(10) )
12921292
1293    /* Chip markings: C 2050 / SC430940PB / G63C 185 / SSDL9838A */
1294    ROM_SYSTEM_BIOS( 10, "SCPH-7501", "SCPH-7501 NTSC:U/C [SC430940]" )
1295    ROMX_LOAD( "sc430940.s19", 0x0000, 0xb195, CRC(fd1c6ee7) SHA1(e72b5093a3e25de1548be7668179ff3e001e3ec5), ROM_BIOS(11) )
1293   /* Chip markings: C 2050 / SC430940PB / G63C 185 / SSDL9838A */
1294   ROM_SYSTEM_BIOS( 10, "SCPH-7501", "SCPH-7501 NTSC:U/C [SC430940]" )
1295   ROMX_LOAD( "sc430940.s19", 0x0000, 0xb195, CRC(fd1c6ee7) SHA1(e72b5093a3e25de1548be7668179ff3e001e3ec5), ROM_BIOS(11) )
12961296
1297    ROM_SYSTEM_BIOS( 11, "SCPH-7502", "SCPH-7502 PAL [SC430939]" )
1298    ROMX_LOAD( "sc430939.bin", 0x0000, 0x4200, CRC(9eafb045) SHA1(25d98454e567e064c06f840d57f763fb7c8b7219), ROM_BIOS(12) )
1297   ROM_SYSTEM_BIOS( 11, "SCPH-7502", "SCPH-7502 PAL [SC430939]" )
1298   ROMX_LOAD( "sc430939.bin", 0x0000, 0x4200, CRC(9eafb045) SHA1(25d98454e567e064c06f840d57f763fb7c8b7219), ROM_BIOS(12) )
12991299
1300    ROM_SYSTEM_BIOS( 12, "SCPH-9000", "SCPH-9000 NTSC:J [SC430942]" )
1301    ROMX_LOAD( "sc430942.bin", 0x0000, 0x4200, NO_DUMP, ROM_BIOS(13) )
1300   ROM_SYSTEM_BIOS( 12, "SCPH-9000", "SCPH-9000 NTSC:J [SC430942]" )
1301   ROMX_LOAD( "sc430942.bin", 0x0000, 0x4200, NO_DUMP, ROM_BIOS(13) )
13021302
1303    /* Chip markings: C 2060 / SC430944PB / G63C 185 / SSBR9924C */
1304    ROM_SYSTEM_BIOS( 13, "SCPH-9001", "SCPH-9001 NTSC:U/C [SC430944]" )
1305    ROMX_LOAD( "sc430944.s19", 0x0000, 0xb195, CRC(24011dfd) SHA1(db72ba02466942d1a1a07c4d855edd18f84de92e), ROM_BIOS(14) )
1303   /* Chip markings: C 2060 / SC430944PB / G63C 185 / SSBR9924C */
1304   ROM_SYSTEM_BIOS( 13, "SCPH-9001", "SCPH-9001 NTSC:U/C [SC430944]" )
1305   ROMX_LOAD( "sc430944.s19", 0x0000, 0xb195, CRC(24011dfd) SHA1(db72ba02466942d1a1a07c4d855edd18f84de92e), ROM_BIOS(14) )
13061306
1307    ROM_SYSTEM_BIOS( 14, "SCPH-9002", "SCPH-9002 PAL [SC430943]" )
1308    ROMX_LOAD( "sc430943.bin", 0x0000, 0x4200, CRC(2669a1a7) SHA1(62999e7f8429f381e19d44d2399b6017959f4f13), ROM_BIOS(15) )
1307   ROM_SYSTEM_BIOS( 14, "SCPH-9002", "SCPH-9002 PAL [SC430943]" )
1308   ROMX_LOAD( "sc430943.bin", 0x0000, 0x4200, CRC(2669a1a7) SHA1(62999e7f8429f381e19d44d2399b6017959f4f13), ROM_BIOS(15) )
13091309
1310    /* Development PlayStation CD-ROM Firmware:
1311     *
1312     * Still missing:
1313     * DTL-H1000, 1000H, 1001, 1001H, 1002, 1100, 1101, 1102, 1200, 1201, 2000, 2500, 2700, 3000, 3001 and 3002.
1314     */
1310   /* Development PlayStation CD-ROM Firmware:
1311    *
1312    * Still missing:
1313    * DTL-H1000, 1000H, 1001, 1001H, 1002, 1100, 1101, 1102, 1200, 1201, 2000, 2500, 2700, 3000, 3001 and 3002.
1314    */
13151315
1316    /* Chip markings: D 2021 / SC430920PB / G63C 185 / JSAA9810A
1317     * Note: Although this is a PAL unit, the ID string in the
1318     * code is "for US/AEP", so it may be the same for all the
1319     * debug consoles.
1320     */
1321    ROM_SYSTEM_BIOS( 15, "DTL-H1202", "DTL-H1202 PAL [SC430920]" )
1322    ROMX_LOAD( "sc430920.s19", 0x0000, 0xb195, CRC(8380a5a2) SHA1(6fe45fd6fb96b12a25a45f39b5efd0be5e3f3e86), ROM_BIOS(16) )
1316   /* Chip markings: D 2021 / SC430920PB / G63C 185 / JSAA9810A
1317    * Note: Although this is a PAL unit, the ID string in the
1318    * code is "for US/AEP", so it may be the same for all the
1319    * debug consoles.
1320    */
1321   ROM_SYSTEM_BIOS( 15, "DTL-H1202", "DTL-H1202 PAL [SC430920]" )
1322   ROMX_LOAD( "sc430920.s19", 0x0000, 0xb195, CRC(8380a5a2) SHA1(6fe45fd6fb96b12a25a45f39b5efd0be5e3f3e86), ROM_BIOS(16) )
13231323ROM_END
13241324
13251325const rom_entry *psxcd_device::device_rom_region() const
13261326{
13271327   return ROM_NAME( psxcd );
13281328}
1329
trunk/src/mame/mess.lst
r249924r249925
8181picou    // 1994 Sega Pico (USA)
8282picoj    // 1993 Sega Pico (Japan)
8383copera  // 1993 Sega / Yamaha
84sawatte   //
84sawatte //
8585segacd  // 1992 Sega Sega CD (USA)
8686megacd  // 1993 Sega Mega-CD (Europe)
8787megacda // 1993 Sega Mega-CD (Asia)
r249924r249925
16641664
16651665// Exidy, Inc.
16661666sorcerer     // Sorcerer
1667sorcerer2   // monitor 1.1 1979
1667sorcerer2   // monitor 1.1 1979
16681668sorcererd    // Sorcerer with floppies
16691669
16701670// Galaksija
trunk/src/mame/video/apple2.c
r249924r249925
13171317               for (b = 0; b < 7; b++)
13181318               {
13191319                  v = (w & 1);
1320                  w >>= 1;                           
1320                  w >>= 1;
13211321                  *(p++) = v ? GREEN : BLACK;
13221322                  *(p++) = v ? GREEN : BLACK;
13231323               }
trunk/src/mame/video/btoads.c
r249924r249925
9393WRITE16_MEMBER( btoads_state::scroll0_w )
9494{
9595   /* allow multiple changes during display */
96//   m_screen->update_now();
96//  m_screen->update_now();
9797   m_screen->update_partial(m_screen->vpos());
9898
9999   /* upper bits are Y scroll, lower bits are X scroll */
r249924r249925
107107WRITE16_MEMBER( btoads_state::scroll1_w )
108108{
109109   /* allow multiple changes during display */
110//   m_screen->update_now();
110//  m_screen->update_now();
111111   m_screen->update_partial(m_screen->vpos());
112112
113113   /* upper bits are Y scroll, lower bits are X scroll */
trunk/src/mame/video/cloak.c
r249924r249925
9292
9393WRITE8_MEMBER(cloak_state::cloak_clearbmp_w)
9494{
95//   m_screen->update_now();
95//  m_screen->update_now();
9696   m_screen->update_partial(m_screen->vpos());
9797
9898   m_bitmap_videoram_selected = data & 0x01;
trunk/src/mame/video/decbac06.h
r249924r249925
3030   int    m_tile_region_16;
3131
3232   // some bootlegs (eg midresb / midresbj) don't appear to actually support the alt modes, they set them and end up with broken gfx on later levels.
33   bool   m_supports_8x8;
33   bool    m_supports_8x8;
3434   bool    m_supports_16x16;
3535   bool    m_supports_rc_scroll;
3636
trunk/src/mame/video/dkong.c
r249924r249925
876876      radarscp_scanline(scanline);
877877
878878   /* update any video up to the current scanline */
879//   m_screen->update_now();
879//  m_screen->update_now();
880880   m_screen->update_partial(m_screen->vpos());
881881
882882   scanline = (scanline+1) % VTOTAL;
trunk/src/mame/video/galaxian.c
r249924r249925
480480{
481481   UINT8 *videoram = m_videoram;
482482   /* update any video up to the current scanline */
483//   m_screen->update_now();
483//  m_screen->update_now();
484484   m_screen->update_partial(m_screen->vpos());
485485
486486   /* store the data and mark the corresponding tile dirty */
r249924r249925
492492WRITE8_MEMBER(galaxian_state::galaxian_objram_w)
493493{
494494   /* update any video up to the current scanline */
495//   m_screen->update_now();
495//  m_screen->update_now();
496496   m_screen->update_partial(m_screen->vpos());
497497
498498   /* store the data */
r249924r249925
643643{
644644   if (m_flipscreen_x != (data & 0x01))
645645   {
646//      m_screen->update_now();
646//      m_screen->update_now();
647647      m_screen->update_partial(m_screen->vpos());
648648
649649      /* when the direction changes, we count a different number of clocks */
r249924r249925
660660{
661661   if (m_flipscreen_y != (data & 0x01))
662662   {
663//      m_screen->update_now();
663//      m_screen->update_now();
664664      m_screen->update_partial(m_screen->vpos());
665665
666666      m_flipscreen_y = data & 0x01;
r249924r249925
686686{
687687   if ((m_stars_enabled ^ data) & 0x01)
688688   {
689//      m_screen->update_now();
689//      m_screen->update_now();
690690      m_screen->update_partial(m_screen->vpos());
691691   }
692692
r249924r249925
706706{
707707   if ((m_background_enable ^ data) & 0x01)
708708   {
709   //   m_screen->update_now();
709   //  m_screen->update_now();
710710      m_screen->update_partial(m_screen->vpos());
711711   }
712712
r249924r249925
718718{
719719   if ((m_background_red ^ data) & 0x01)
720720   {
721   //   m_screen->update_now();
721   //  m_screen->update_now();
722722      m_screen->update_partial(m_screen->vpos());
723723   }
724724
r249924r249925
730730{
731731   if ((m_background_green ^ data) & 0x01)
732732   {
733   //   m_screen->update_now();
733   //  m_screen->update_now();
734734      m_screen->update_partial(m_screen->vpos());
735735   }
736736
r249924r249925
742742{
743743   if ((m_background_blue ^ data) & 0x01)
744744   {
745   //   m_screen->update_now();
745   //  m_screen->update_now();
746746      m_screen->update_partial(m_screen->vpos());
747747   }
748748
trunk/src/mame/video/gic.c
r249924r249925
66
77   GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip)
88   For the GIMINI "Challenger" programmable game system.
9   
9
1010   Really only ever used in the Unisonic Champion 2711
1111
1212   More LA tests made by plgDavid on hardware pretty much confirmed what is found
1313   in the AY-3-8950-1 datasheet, but with more fine grained detail.
1414
15   the GIC does not have internal ram of any sort apart from shift registers,
15   the GIC does not have internal ram of any sort apart from shift registers,
1616   instead it relies on the external shared ram, (see page 7-85) Appendix AY-3-8950-1
17   
17
1818   Unverified on LA (since the video pins are all connected into a composite mix):
1919   at line 46 it lowers GIC_BUSY, until line 240
2020
r249924r249925
2222   It will read the external ram areas continuously while GIC_BUSY is low (for 12.36ms)
2323
2424   (NOTE: OCTAL)
25   
25
2626   000,001,002,003,004,005,  110,111,112,113,114,115,116,117,120,121,122,123,124,125 (15 times - No first bg line?)
2727   006,007,010,011,012,013,  110,111,112,113,114,115,116,117,120,121,122,123,124,125 (16 times)
28   
28
2929   014,015,016,017,020,021,  125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times)
3030   022,023,024,025,026,027,  125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times)
3131
r249924r249925
4646   for a total of (12*20*16) = 3840 RAM reads (3 clocks per read at 1.79MHz)
4747
4848   Then it relingishes control to the CPU by raising BUSREQ.
49   
49
5050   Cloking in more detail: (in 1.79MHz clocks)
5151   boot:
52   busy:1  5360 clocks
53   busy:0 22116 clocks
54   busy:1  7752 clocks
55   busy:0 22116 clocks
56   busy:1  7752 clocks   
57   (...)
52    busy:1  5360 clocks
53    busy:0 22116 clocks
54    busy:1  7752 clocks
55    busy:0 22116 clocks
56    busy:1  7752 clocks
57    (...)
5858
5959   There are NO IRQ handshakes, just BUSREQ sync shared RAM
6060
r249924r249925
7272//A real AY-3-8800-1 (dead) is going to decap for a good dump
7373ROM_START( gic_font )
7474   ROM_REGION( 0x200, "cgrom", 0 )
75   ROM_LOAD( "ay-3-8800-1.bin", 0x0000, 0x200,  BAD_DUMP CRC(d9f11d2b) SHA1(60ef45d51d102cd3af78787008d9aed848137bee))
75   ROM_LOAD( "ay-3-8800-1.bin", 0x0000, 0x200,  BAD_DUMP CRC(d9f11d2b) SHA1(60ef45d51d102cd3af78787008d9aed848137bee))
7676ROM_END
7777
7878
r249924r249925
8686   , device_video_interface(mconfig, *this)
8787   , m_cgrom(0)
8888   , m_audiocnt(0)
89   , m_audioval(0)   
90    , m_audioreset(0)
91    , m_ram(0)   
89   , m_audioval(0)
90   , m_audioreset(0)
91   , m_ram(0)
9292{
9393}
9494
r249924r249925
9797   : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
9898   , device_sound_interface(mconfig, *this)
9999   , device_video_interface(mconfig, *this)
100   , m_cgrom(0)   
100   , m_cgrom(0)
101101   , m_audiocnt(0)
102102   , m_audioval(0)
103    , m_audioreset(0)
104    , m_ram(0)   
103   , m_audioreset(0)
104   , m_ram(0)
105105{
106106}
107107
r249924r249925
126126   m_vblank_timer->adjust( m_screen->time_until_pos(1, END_ACTIVE_SCAN + 18 ), 0, m_screen->scan_period() );
127127
128128   // allocate the audio stream
129   m_stream = stream_alloc( 0, 1, clock()/(2*228) );
129   m_stream = stream_alloc( 0, 1, clock()/(2*228) );
130130}
131131
132132
r249924r249925
137137void gic_device::device_reset()
138138{
139139   m_audiocnt=0;
140   m_audioval=0;   
140   m_audioval=0;
141141   m_audioreset=0;
142142}
143143
144144#define GIC_CLUB    28
145145#define GIC_SPACE    0
146   
146
147147void gic_device::draw_char_left(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap){
148   
149148   UINT8*ptr = &m_cgrom[code*GIC_CHAR_H];
150     
149
151150   for (size_t y=0;y<GIC_CHAR_H;y++){
152      UINT8 current = *ptr++;   
151      UINT8 current = *ptr++;
153152      UINT8 nextx=0;
154      UINT8 curry= starty+y;     
155      for(UINT8 x=0x20;x!=0;x=x/2){   
153      UINT8 curry= starty+y;
154      for(UINT8 x=0x20;x!=0;x=x/2){
156155         if (current&x)
157156            m_bitmap.pix16(curry,startx+nextx) = GIC_WHITE;
158157         nextx++;
r249924r249925
161160}
162161
163162void gic_device::draw_char_right(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap, int bg_col){
164   
165163   UINT8*ptr = &m_cgrom[code*GIC_CHAR_H];
166   
164
167165   for (size_t y=0;y<GIC_CHAR_H;y++){
168      UINT8 current = *ptr++;   
166      UINT8 current = *ptr++;
169167      UINT8 nextx=0;
170168      UINT8 curry= starty+y;
171169
172170      m_bitmap.pix16(curry,startx+nextx) = bg_col;
173      nextx++;   
174      for(UINT8 x=0x20;x!=0;x=x/2){         
175         m_bitmap.pix16(curry,startx+nextx) = (current&x)?GIC_WHITE:bg_col;   
171      nextx++;
172      for(UINT8 x=0x20;x!=0;x=x/2){
173         m_bitmap.pix16(curry,startx+nextx) = (current&x)?GIC_WHITE:bg_col;
176174         nextx++;
177175      }
178176      m_bitmap.pix16(curry,startx+nextx) = bg_col;
179      nextx++;     
180      m_bitmap.pix16(curry,startx+nextx) = bg_col;     
177      nextx++;
178      m_bitmap.pix16(curry,startx+nextx) = bg_col;
181179   }
182180}
183181
r249924r249925
187185
188186   size_t XSTART = BORDER_SIZE;
189187   size_t YSTART = START_ACTIVE_SCAN;
190   
188
191189   //left hand side first
192190   UINT8 current=0;
193191   for(UINT8 cy=0;cy<GIC_LEFT_H;cy++){
194192      for(UINT8 cx=0;cx<GIC_LEFT_W;cx++){
195193         draw_char_left(XSTART+(cx*GIC_CHAR_W),
196                        YSTART+(cy*GIC_CHAR_H),
197                        m_ram[current],
198                       m_bitmap);
194                     YSTART+(cy*GIC_CHAR_H),
195                     m_ram[current],
196                     m_bitmap);
199197         current++;
200198      }
201199   }
r249924r249925
203201   //right hand side is next
204202   current=0x48;//110 octal
205203   XSTART+=(GIC_LEFT_W*GIC_CHAR_W)+1;
206   
204
207205   for(UINT8 cy=0;cy<GIC_RIGHT_H;cy++){
208206      for(UINT8 cx=0;cx<GIC_RIGHT_W;cx++){
209207         //complex case
210208         UINT8 data = m_ram[current++];
211         
209
212210         size_t currX   = (XSTART+           (cx*(3+GIC_CHAR_W)));
213211         size_t currUP  = (YSTART+           (cy*(2*GIC_CHAR_H)));
214212         size_t currLOW = (YSTART+GIC_CHAR_H+(cy*(2*GIC_CHAR_H)));
215         
213
216214         switch(data&0xC0){
217215            case 0x00:{
218216               //lower rectangle only, normal char
219217               draw_char_right(currX,currLOW,data,m_bitmap,GIC_GREEN);
220218            }break;
221           
219
222220            //White block
223221            case 0xC0:{
224222               //upper rectangle
225               draw_char_right(currX,currUP, GIC_SPACE,m_bitmap,GIC_WHITE);   
226               //lower rectangle                   
223               draw_char_right(currX,currUP, GIC_SPACE,m_bitmap,GIC_WHITE);
224               //lower rectangle
227225               draw_char_right(currX,currLOW,GIC_SPACE,m_bitmap,GIC_WHITE);
228226            }break;
229           
227
230228            //Draw a card
231229            case 0x40:{
232               int bgColor = (data&0x10)?GIC_RED:GIC_BLACK;   
230               int bgColor = (data&0x10)?GIC_RED:GIC_BLACK;
233231               //upper rectangle
234               draw_char_right(currX,currUP,           (data&0xF)+0x30,m_bitmap,bgColor);               
235               //lower rectangle     
236               draw_char_right(currX,currLOW,GIC_CLUB+((data&0x30)>>4),m_bitmap,bgColor);   
232               draw_char_right(currX,currUP,           (data&0xF)+0x30,m_bitmap,bgColor);
233               //lower rectangle
234               draw_char_right(currX,currLOW,GIC_CLUB+((data&0x30)>>4),m_bitmap,bgColor);
237235            }break;
238           
236
239237            default:printf("gic unknown char! %02X\n",data); break;
240238         }
241239      }
r249924r249925
254252      case TIMER_VBLANK:
255253         //flag the audio to reset
256254         m_audioreset = 1;//phase need to reset! on next clock/228
257      break;   
255      break;
258256   }
259257}
260258
r249924r249925
264262{
265263   stream_sample_t *buffer = outputs[0];
266264
267    //Audio is basic and badly implemented (doubt that was the intent)
265   //Audio is basic and badly implemented (doubt that was the intent)
268266   //The datasheet list the 3 different frequencies the GIC can generate: 500,1000 and 2000Hz
269   //but it is clear (for an audio guy at least) that the resulting spectrum
267   //but it is clear (for an audio guy at least) that the resulting spectrum
270268   //is not a pure square wav. In fact, the counter is reset on vertical sync!
271269   //http://twitter.com/plgDavid/status/527269086016077825
272   //...thus creating a buzzing sound.
270   //...thus creating a buzzing sound.
273271
274   //Dumping the audio pin value each time
272   //Dumping the audio pin value each time
275273   // either (PHI2 made a 0->1 transition (1.789MHz)
276274   //     or (PHI1 made a 1->1 transition (1.789MHz)
277   //I found that the granularity of audio transitions
275   //I found that the granularity of audio transitions
278276   //(including phase resets and silences) was 228 clocks
279277   //The audio subsystem thus runs at 1.789MHz/228 = 7849.88Hz
280   
278
281279   //when 1
282280   //normal period:912 clocks (228*4)
283281   //hi for 456 clocks
r249924r249925
295293   //hi for 912   (228*4)
296294   //when 4
297295   //normal period lasts 3648 clocks (228*16)
298   //hi for 1824(228*8)
299   //lo for 1824(228*8)   
296   //hi for 1824(228*8)
297   //lo for 1824(228*8)
300298   //Reset period:
301   //lo for 1824(228*8)
299   //lo for 1824(228*8)
302300   //hi for 2508(228*11)
303301   //lo for 1824(228*8)
304302   //hi for 1824(228*8)
305   
303
306304   if(!m_ram) return;
307305
308306   UINT8 audioByte = m_ram[GIC_AUDIO_BYTE]*2;
309   
307
310308   if(!audioByte){
311309      for(size_t i = 0; i < samples; i++)
312         *buffer++ = 0;   
310         *buffer++ = 0;
313311
314         m_audioval   = 0;
315      m_audiocnt   = 0;     
316        m_audioreset = 0;
317      return;//early   
312      m_audioval   = 0;
313      m_audiocnt   = 0;
314      m_audioreset = 0;
315      return;//early
318316   }
319   
320    //forced resynch @ 59.95Hz
321    if(m_audioreset){
322         m_audioval   = 0;//forced low
323      m_audiocnt   = 0;     
324        m_audioreset = 0;
325    }
326317
318   //forced resynch @ 59.95Hz
319   if(m_audioreset){
320      m_audioval   = 0;//forced low
321      m_audiocnt   = 0;
322      m_audioreset = 0;
323   }
324
327325   for(size_t i=0; i < samples; i++){
328        m_audiocnt++;
326      m_audiocnt++;
329327      if(m_audiocnt >= audioByte){
330328         m_audioval = !m_audioval;
331329         m_audiocnt=0;
332330      }
333331      *buffer++ = m_audioval<<13;
334    }
332   }
335333}
trunk/src/mame/video/gic.h
r249924r249925
66
77   GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip)
88   For the GIMINI "Challenger" programmable game system.
9   
9
1010   Really only ever used in the Unisonic Champion 2711
1111
1212***************************************************************************/
r249924r249925
2525
2626#define MCFG_GIC_ADD(_tag, _clock, _screen_tag) \
2727   MCFG_DEVICE_ADD(_tag, GIC, _clock) \
28   MCFG_VIDEO_SET_SCREEN(_screen_tag)
28   MCFG_VIDEO_SET_SCREEN(_screen_tag)
2929
3030/***************************************************************************
3131    TYPE DEFINITIONS
r249924r249925
4949#define GIC_RIGHT_W 13
5050
5151class gic_device :  public device_t
52              , public device_sound_interface
53              , public device_video_interface
52               , public device_sound_interface
53               , public device_video_interface
5454{
5555public:
5656   // construction/destruction
r249924r249925
6868
6969   //plgDavid please change this to a MESS friendly handshake
7070   void set_shared_memory(const UINT8*m){ m_ram = m;};
71   
71
7272   // Global constants (non mesured figures)
7373   static const int START_ACTIVE_SCAN = 10;
7474   static const int BORDER_SIZE       = GIC_CHAR_W*3;
r249924r249925
8686
8787   // optional information overrides
8888   virtual const rom_entry *device_rom_region() const;
89   
89
9090   // device_sound_interface overrides
9191   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
9292
r249924r249925
9595
9696   void draw_char_left (int x, int y, UINT8 code, bitmap_ind16 &bitmap);
9797   void draw_char_right(int x, int y, UINT8 code, bitmap_ind16 &bitmap,int bg_col);
98   
98
9999   bitmap_ind16 m_bitmap;
100100   UINT8 *      m_cgrom;          // internal chargen ROM
101   
101
102102   emu_timer    *m_vblank_timer;
103103   sound_stream *m_stream;
104   
104
105105   int m_audiocnt;
106   int m_audioval;   
107   int m_audioreset;   
106   int m_audioval;
107   int m_audioreset;
108108   const UINT8* m_ram;
109109};
110110
trunk/src/mame/video/gyruss.c
r249924r249925
9393
9494WRITE8_MEMBER(gyruss_state::gyruss_spriteram_w)
9595{
96//   m_screen->update_now();
96//  m_screen->update_now();
9797   m_screen->update_partial(m_screen->vpos());
9898   m_spriteram[offset] = data;
9999}
trunk/src/mame/video/hng64.c
r249924r249925
168168   {
169169      hng64_mark_tile_dirty(3, offset&0x3fff);
170170   }
171    // Offsets 0x40000 - 0x58000 are for "floor" scanline control
172   
171   // Offsets 0x40000 - 0x58000 are for "floor" scanline control
172
173173   /* 400000 - 7fffff is scroll regs etc. */
174174}
175175
r249924r249925
435435{
436436   blit_parameters blit;
437437
438    // notes:
439    // - startx and starty MUST be UINT32 for calculations to work correctly
440    // - srcbitmap->width and height are assumed to be a power of 2 to speed up wraparound
438   // notes:
439   // - startx and starty MUST be UINT32 for calculations to work correctly
440   // - srcbitmap->width and height are assumed to be a power of 2 to speed up wraparound
441441
442442   // skip if disabled
443443   //if (!tmap->enable)
r249924r249925
474474 * -------+-1098-7654-3210-9876-5432-1098-7654-3210-+----------------
475475 *   0    | ---- -Cdd ---- -??Z ---- ---- ---- ---- |  C = global complex zoom
476476          | 0000 0011  - road edge alt 1            | dd = global tilemap dimension selector
477          | 0000 0111  - road edge alt 2            |  ? = Always Set?
477          | 0000 0111  - road edge alt 2            |  ? = Always Set?
478478          |                                         |  Z = Global Zoom Disable?
479479 *   1    | oooo oooo oooo oooo ---- ---- ---- ---- | unknown - 0001 is a popular value.  Explore.
480480 *   1    | ---- ---- ---- ---- oooo oooo oooo oooo | unknown - untouched in sams64 games, initialized elsewhere
r249924r249925
514514    // b = 4bpp/8bpp (seems correct) (beast busters, samsh64, sasm64 2, xrally switch it for some screens)
515515    // r = tile size (seems correct)
516516    // e = tilemap enable bit according to sams64_2
517    // z = z depth/priority? tilemaps might also be affected by min / max clip values somewhere?
517    // z = z depth/priority? tilemaps might also be affected by min / max clip values somewhere?
518518    //              (debug layer on buriki has priority 0x020, which would be highest)
519519 */
520520
521521
522522void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int tm)
523523{
524    // Useful bits from the global tilemap flags
525    const UINT32& global_tileregs = m_videoregs[0x00];
524   // Useful bits from the global tilemap flags
525   const UINT32& global_tileregs = m_videoregs[0x00];
526526   const int global_dimensions = (global_tileregs & 0x03000000) >> 24;
527    const int global_alt_scroll_register_format = global_tileregs & 0x04000000;
528    const int global_zoom_disable = global_tileregs & 0x00010000;
529   
530    // Debug blending on/off based on m_additive_tilemap_debug
531    int debug_blend_enabled = 0;
527   const int global_alt_scroll_register_format = global_tileregs & 0x04000000;
528   const int global_zoom_disable = global_tileregs & 0x00010000;
529
530   // Debug blending on/off based on m_additive_tilemap_debug
531   int debug_blend_enabled = 0;
532532   if ((m_additive_tilemap_debug&(1 << tm)))
533533      debug_blend_enabled = 1;
534534
r249924r249925
537537      popmessage("unsupported global_dimensions on tilemaps");
538538#endif
539539
540    // Determine which tilemap registers and scroll base this tilemap uses
541    UINT16 tileregs = 0;
542    UINT16 scrollbase = 0;
540   // Determine which tilemap registers and scroll base this tilemap uses
541   UINT16 tileregs = 0;
542   UINT16 scrollbase = 0;
543543   if (tm==0)
544544   {
545545      scrollbase = (m_videoregs[0x04]&0x3fff0000)>>16;
r249924r249925
561561      tileregs   = (m_videoregs[0x03]&0x0000ffff)>>0;
562562   }
563563
564    // Useful bits from the tilemap registers
565    const UINT8 mosaicValueBits  = (tileregs & 0xf000) >> 12; (void)mosaicValueBits;
566    const UINT8 floorModeBit     = (tileregs & 0x0800) >> 11;
567    const UINT8 bppBit           = (tileregs & 0x0400) >> 10;
568    const UINT8 bigTilemapBit    = (tileregs & 0x0200) >>  9;
569    const UINT8 tilemapEnableBit = (tileregs & 0x0040) >>  6; (void)tilemapEnableBit;
570   
571    // Tilemap drawing enable (sams64_2 demo mode says this is legit)
572    //if (!tilemapEnableBit)
573    //{
574    //    return;
575    //}
576   
577    // Select the proper tilemap size
578    tilemap_t* tilemap = NULL;
564   // Useful bits from the tilemap registers
565   const UINT8 mosaicValueBits  = (tileregs & 0xf000) >> 12; (void)mosaicValueBits;
566   const UINT8 floorModeBit     = (tileregs & 0x0800) >> 11;
567   const UINT8 bppBit           = (tileregs & 0x0400) >> 10;
568   const UINT8 bigTilemapBit    = (tileregs & 0x0200) >>  9;
569   const UINT8 tilemapEnableBit = (tileregs & 0x0040) >>  6; (void)tilemapEnableBit;
570
571   // Tilemap drawing enable (sams64_2 demo mode says this is legit)
572   //if (!tilemapEnableBit)
573   //{
574   //    return;
575   //}
576
577   // Select the proper tilemap size
578   tilemap_t* tilemap = NULL;
579579   if (global_dimensions==0)
580580   {
581581      if (bigTilemapBit) tilemap = m_tilemap[tm].m_tilemap_16x16;
r249924r249925
588588   }
589589
590590   // Set the transmask so our manual copy is correct
591    int transmask = 0x00;
591   int transmask = 0x00;
592592   if (bppBit)
593593      transmask = 0xff;
594594   else
r249924r249925
596596
597597   if (floorModeBit == 0x0000)
598598   {
599        // floor mode
600        // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well
599      // floor mode
600      // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well
601601
602        // fprintf(stderr, "Tilemap %d is a floor using :\n", tm);
603        const UINT32 floorAddress = 0x40000 + (scrollbase << 4);
602      // fprintf(stderr, "Tilemap %d is a floor using :\n", tm);
603      const UINT32 floorAddress = 0x40000 + (scrollbase << 4);
604604
605        // TODO: The row count is correct, but how is this layer clipped? m_tcram?
606       
607        // See how many lines we have in the data region
608        // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now
609        //int lineCount = 0;
610        //for (int ii = 0; ii < 0x2000/4; ii += 4)
611        //{
612        //    const int realAddress = floorAddress/4;
613        //    if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00)
614        //        continue;
615        //    if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000)
616        //        continue;
617        //   
618        //    lineCount++;
619        //}
620        //printf("lines %d\n", lineCount);
605      // TODO: The row count is correct, but how is this layer clipped? m_tcram?
621606
622        // Buriki uses a 2x mosaic effect on its floor, so its line count is half
623        // (but so does fatfurwa - maybe it overdraws a bunch of pixels?)
624        //if (m_mcu_type == BURIKI_MCU)
625        //    lineCount *= 2;
607      // See how many lines we have in the data region
608      // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now
609      //int lineCount = 0;
610      //for (int ii = 0; ii < 0x2000/4; ii += 4)
611      //{
612      //    const int realAddress = floorAddress/4;
613      //    if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00)
614      //        continue;
615      //    if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000)
616      //        continue;
617      //
618      //    lineCount++;
619      //}
620      //printf("lines %d\n", lineCount);
626621
627        // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn
628        const rectangle &visarea = screen.visible_area();
629        //if (lineCount < visarea.height())
630        //{
631        //    for (int ii = 0; ii < visarea.width(); ii++)
632        //        bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00;
633        //}
634       
635        // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does)
636        //        Figure out what the difference between the two programs is.  It's possible writing to
637        //        the linescroll ram fills a buffer and it's cleared automatically between frames?
638        for (int ii = 0; ii < 0x2000/4; ii++)
639        {
640            const int realAddress = floorAddress/4;
641            m_videoram[realAddress+ii] = 0x00000000;
642        }
643       
644       
645        // Floor mode - per pixel simple / complex modes? -- every other line?
622      // Buriki uses a 2x mosaic effect on its floor, so its line count is half
623      // (but so does fatfurwa - maybe it overdraws a bunch of pixels?)
624      //if (m_mcu_type == BURIKI_MCU)
625      //    lineCount *= 2;
626
627      // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn
628      const rectangle &visarea = screen.visible_area();
629      //if (lineCount < visarea.height())
630      //{
631      //    for (int ii = 0; ii < visarea.width(); ii++)
632      //        bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00;
633      //}
634
635      // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does)
636      //        Figure out what the difference between the two programs is.  It's possible writing to
637      //        the linescroll ram fills a buffer and it's cleared automatically between frames?
638      for (int ii = 0; ii < 0x2000/4; ii++)
639      {
640         const int realAddress = floorAddress/4;
641         m_videoram[realAddress+ii] = 0x00000000;
642      }
643
644
645      // Floor mode - per pixel simple / complex modes? -- every other line?
646646      //  (there doesn't seem to be enough data in Buriki for every line at least)
647647      rectangle clip = visarea;
648648
r249924r249925
650650      {
651651         // Logic would dictate that this should be the 'complex' scroll register layout,
652652         // but per-line.  That doesn't work however.
653            //
653         //
654654         // You only have line data for the number of lines on the screen, not enough for
655655         // the complex register layout
656            //
656         //
657657         // HOWEVER, using the code below doesn't work either.  This might be because
658658         // they have mosaic turned on, and it adopts a new meaning in linescroll modes?
659            //
659         //
660660         // The code below could also be wrong, and rowscroll simply acts the same in all
661661         // modes, this is hard to know because ss64_2 barely uses it.
662            //
662         //
663663         // buriki line data is at 20146000 (physical)
664664
665665#if HNG64_VIDEO_DEBUG
r249924r249925
668668      }
669669      else // 'simple' mode with linescroll, used in some ss64_2 levels (assumed to be correct, but doesn't do much with it.. so could be wrong)
670670      {
671            INT32 xtopleft, xmiddle;
672            INT32 ytopleft, ymiddle;
673           
671         INT32 xtopleft, xmiddle;
672         INT32 ytopleft, ymiddle;
673
674674         for (int line=0; line < 448; line++)
675675         {
676676            clip.min_y = clip.max_y = line;
r249924r249925
913913
914914UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
915915{
916
917916#if 1
918917   // press in sams64_2 attract mode for a nice debug screen from the game
919918   // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.)
r249924r249925
939938#endif
940939
941940
942    // Initialize some buffers
941   // Initialize some buffers
943942   bitmap.fill(m_tcram[0x50/4] & 0x10000 ? m_palette->black_pen() : m_palette->pen(0), cliprect); //FIXME: Is the register correct? check with HW tests
944943   screen.priority().fill(0x00, cliprect);
945944
946    // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
945   // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
947946   if (m_screen_dis)
948947      return 0;
949948
950949   // If the auto-animation mask or bits have changed search for tiles using them and mark as dirty
951    const UINT32 animmask = m_videoregs[0x0b];
950   const UINT32 animmask = m_videoregs[0x0b];
952951   const UINT32 animbits = m_videoregs[0x0c];
953952   if ((m_old_animmask != animmask) || (m_old_animbits != animbits))
954953   {
r249924r249925
977976      m_old_animbits = animbits;
978977   }
979978
980    // If any magic bits have been touched, mark every tilemap dirty
981    UINT16 tileflags[4];
982    tileflags[0] = m_videoregs[0x02] >> 16;
979   // If any magic bits have been touched, mark every tilemap dirty
980   UINT16 tileflags[4];
981   tileflags[0] = m_videoregs[0x02] >> 16;
983982   tileflags[1] = m_videoregs[0x02] & 0xffff;
984983   tileflags[2] = m_videoregs[0x03] >> 16;
985984   tileflags[3] = m_videoregs[0x03] & 0xffff;
986    const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
985   const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
987986   for (int i = 0; i < 4; i++)
988987   {
989988      if ((m_old_tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK) != (tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK))
r249924r249925
993992      }
994993   }
995994
996    // Draw the four tilemaps
995   // Draw the four tilemaps
997996   hng64_drawtilemap(screen,bitmap,cliprect, 3);
998997   hng64_drawtilemap(screen,bitmap,cliprect, 2);
999998   hng64_drawtilemap(screen,bitmap,cliprect, 1);
r249924r249925
10211020      }
10221021   }
10231022
1024    // Draw the sprites on top of everything
1023   // Draw the sprites on top of everything
10251024   draw_sprites(screen, bitmap, cliprect);
10261025
1027    // Layer the global frame buffer operations on top of everything
1028    // transition_control(bitmap, cliprect);
1026   // Layer the global frame buffer operations on top of everything
1027   // transition_control(bitmap, cliprect);
10291028
1030   
1029
10311030#if HNG64_VIDEO_DEBUG
10321031   if (0)
10331032      popmessage("%08x %08x %08x %08x %08x", m_spriteregs[0], m_spriteregs[1], m_spriteregs[2], m_spriteregs[3], m_spriteregs[4]);
r249924r249925
10361035   popmessage("%08x %08x TR(%04x %04x %04x %04x) SB(%04x %04x %04x %04x) %08x %08x %08x %08x %08x AA(%08x %08x) %08x",
10371036      m_videoregs[0x00],
10381037      m_videoregs[0x01],
1039        (m_videoregs[0x02]>>16)&0xffff,
1040        (m_videoregs[0x02]>>0)&0xffff,  //       ss64_2 debug mode indicates that 0x0040 is enable!
1041        (m_videoregs[0x03]>>16)&0xffff, //       buriki agrees (debug data on text layer) xrally agress (pink layer)
1042        (m_videoregs[0x03]>>0)&0xffff,  //       fatal fury doesn't (all backgrounds have it set) joy
1043        (m_videoregs[0x04]>>16)&0xffff,
1044        (m_videoregs[0x04]>>0)&0xffff,
1045        (m_videoregs[0x05]>>16)&0xffff,
1046        (m_videoregs[0x05]>>0)&0xffff,
1038      (m_videoregs[0x02]>>16)&0xffff,
1039      (m_videoregs[0x02]>>0)&0xffff,  //       ss64_2 debug mode indicates that 0x0040 is enable!
1040      (m_videoregs[0x03]>>16)&0xffff, //       buriki agrees (debug data on text layer) xrally agress (pink layer)
1041      (m_videoregs[0x03]>>0)&0xffff,  //       fatal fury doesn't (all backgrounds have it set) joy
1042      (m_videoregs[0x04]>>16)&0xffff,
1043      (m_videoregs[0x04]>>0)&0xffff,
1044      (m_videoregs[0x05]>>16)&0xffff,
1045      (m_videoregs[0x05]>>0)&0xffff,
10471046      m_videoregs[0x06],
10481047      m_videoregs[0x07],
10491048      m_videoregs[0x08],
r249924r249925
11071106      popmessage("blend changed %02x", m_additive_tilemap_debug);
11081107   }
11091108#endif
1110   
1109
11111110   return 0;
11121111}
11131112
trunk/src/mame/video/hng64_3d.c
r249924r249925
5858
5959WRITE32_MEMBER(hng64_state::dl_upload_w)
6060{
61    // Data is:
62    // 00000b50 for the sams64 games
63    // 00000f00 for everything else
64    // TODO: different param for the two sams64 games, less FIFO to process?
65   
61   // Data is:
62   // 00000b50 for the sams64 games
63   // 00000f00 for everything else
64   // TODO: different param for the two sams64 games, less FIFO to process?
65
6666   // This is written after the game uploads 16 packets, each 16 words long
6767   // We're assuming it to be a 'send to 3d hardware' trigger.
6868   // This can be called multiple times per frame (at least 2, as long as it gets the expected interrupt / status flags)
r249924r249925
7373      hng64_command3d(&m_dl[packetStart]);
7474   }
7575
76    // Schedule a small amount of time to let the 3d hardware rasterize the display buffer
76   // Schedule a small amount of time to let the 3d hardware rasterize the display buffer
7777   machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(0x200*8), timer_expired_delegate(FUNC(hng64_state::hng64_3dfifo_processed), this));
7878g_profiler.stop();
7979}
r249924r249925
8585
8686WRITE32_MEMBER(hng64_state::dl_control_w)
8787{
88    // This could be a multiple display list thing, but the palette seems to be lost between lists?
89    // Many games briefly set this to 0x4 on startup. Maybe there are 3 display lists?
90    // The sams64 games briefly set this value to 0x0c00 on boot.  Maybe there are 4 lists and they can be combined?
91    if (data & 0x01)
92        m_activeDisplayList = 0;
93    else if (data & 0x02)
94        m_activeDisplayList = 1;
95   
88   // This could be a multiple display list thing, but the palette seems to be lost between lists?
89   // Many games briefly set this to 0x4 on startup. Maybe there are 3 display lists?
90   // The sams64 games briefly set this value to 0x0c00 on boot.  Maybe there are 4 lists and they can be combined?
91   if (data & 0x01)
92      m_activeDisplayList = 0;
93   else if (data & 0x02)
94      m_activeDisplayList = 1;
95
9696//  printf("dl_control_w %08x %08x\n", data, mem_mask);
9797//
9898//  if(data & 2) // swap buffers
r249924r249925
274274   const float top     = uToF(packet[12]);
275275   const float bottom  = uToF(packet[13]);
276276
277    // TODO: It's unclear how the 3 values combine to make a near clipping plane
278    const float near_   = uToF(packet[6]) + (uToF(packet[6]) * uToF(packet[4]));
277   // TODO: It's unclear how the 3 values combine to make a near clipping plane
278   const float near_   = uToF(packet[6]) + (uToF(packet[6]) * uToF(packet[4]));
279279   const float far_    = 0.9f;             // uToF(packet[9]) + (uToF(packet[9]) * uToF(packet[7]));
280280
281281   m_projectionMatrix[0]  = (2.0f*near_)/(right-left);
r249924r249925
303303// Polygon rasterization.
304304void hng64_state::recoverPolygonBlock(const UINT16* packet, int& numPolys)
305305{
306    //printPacket(packet, 1);
307   
306   //printPacket(packet, 1);
307
308308   /*//////////////
309309   // PACKET FORMAT
310310   // [0]  - 0100 ... ID
r249924r249925
369369   UINT32 size[4];
370370   UINT32 address[4];
371371   UINT32 megaOffset;
372    polygon lastPoly = { 0 };
372   polygon lastPoly = { 0 };
373373
374374
375375   //////////////////////////////////////////////////////////
r249924r249925
493493            continue;
494494         }
495495
496            // Syntactical simplification
497            polygon& currentPoly = m_polys[numPolys];
498           
496         // Syntactical simplification
497         polygon& currentPoly = m_polys[numPolys];
498
499499         // Debug - Colors polygons with certain flags bright blue! ajg
500500         currentPoly.debugColor = 0;
501501         //currentPoly.debugColor = tdColor;
r249924r249925
743743         ////////////////////////////////////
744744         // Perform the world transformations...
745745         // TODO: We can eliminate this step with a matrix stack (maybe necessary?)
746            // Note: fatfurwa's helicopter tracking in scene 3 of its intro shows one of these matrices isn't quite correct
746         // Note: fatfurwa's helicopter tracking in scene 3 of its intro shows one of these matrices isn't quite correct
747747         setIdentity(m_modelViewMatrix);
748748         if (m_mcu_type != SAMSHO_MCU)
749749         {
r249924r249925
798798         // Cast a ray out of the camera towards the polygon's point in eyespace.
799799         vecmatmul4(cullRay, modelViewMatrix, currentPoly.vert[0].worldCoords);
800800         normalize(cullRay);
801           
801
802802         // Dot product that with the normal to see if you're negative...
803803         vecmatmul4(cullNorm, modelViewMatrix, currentPoly.faceNormal);
804         
805            const float backfaceCullResult = vecDotProduct(cullRay, cullNorm);
804
805         const float backfaceCullResult = vecDotProduct(cullRay, cullNorm);
806806         if (backfaceCullResult < 0.0f)
807807            currentPoly.visible = 1;
808808         else
r249924r249925
811811
812812
813813         // BEHIND-THE-CAMERA CULL //
814            float cullRay[4];
814         float cullRay[4];
815815         vecmatmul4(cullRay, m_modelViewMatrix, currentPoly.vert[0].worldCoords);
816816         if (cullRay[2] > 0.0f)              // Camera is pointing down -Z
817817         {
r249924r249925
822822         // TRANSFORM THE TRIANGLE INTO HOMOGENEOUS SCREEN SPACE //
823823         if (currentPoly.visible)
824824         {
825                hng64_clip_vertex clipVerts[10];
826               
827                // Transform and project each vertex into pre-divided homogeneous coordinates
825            hng64_clip_vertex clipVerts[10];
826
827            // Transform and project each vertex into pre-divided homogeneous coordinates
828828            for (int m = 0; m < currentPoly.n; m++)
829829            {
830                    float eyeCoords[4];     // World coordinates transformed by the modelViewMatrix
830               float eyeCoords[4];     // World coordinates transformed by the modelViewMatrix
831831               vecmatmul4(eyeCoords, m_modelViewMatrix, currentPoly.vert[m].worldCoords);
832832               vecmatmul4(currentPoly.vert[m].clipCoords, m_projectionMatrix, eyeCoords);
833                   
834                    clipVerts[m].x = currentPoly.vert[m].clipCoords[0];
835                    clipVerts[m].y = currentPoly.vert[m].clipCoords[1];
836                    clipVerts[m].z = currentPoly.vert[m].clipCoords[2];
837                    clipVerts[m].w = currentPoly.vert[m].clipCoords[3];
838                    clipVerts[m].p[0] = currentPoly.vert[m].texCoords[0];
839                    clipVerts[m].p[1] = currentPoly.vert[m].texCoords[1];
840                    clipVerts[m].p[2] = currentPoly.vert[m].light[0];
841                    clipVerts[m].p[3] = currentPoly.vert[m].light[1];
842                    clipVerts[m].p[4] = currentPoly.vert[m].light[2];
833
834               clipVerts[m].x = currentPoly.vert[m].clipCoords[0];
835               clipVerts[m].y = currentPoly.vert[m].clipCoords[1];
836               clipVerts[m].z = currentPoly.vert[m].clipCoords[2];
837               clipVerts[m].w = currentPoly.vert[m].clipCoords[3];
838               clipVerts[m].p[0] = currentPoly.vert[m].texCoords[0];
839               clipVerts[m].p[1] = currentPoly.vert[m].texCoords[1];
840               clipVerts[m].p[2] = currentPoly.vert[m].light[0];
841               clipVerts[m].p[3] = currentPoly.vert[m].light[1];
842               clipVerts[m].p[4] = currentPoly.vert[m].light[2];
843843            }
844844
845845            if (currentPoly.visible)
846846            {
847                    // Clip against all edges of the view frustum
848                    int num_vertices = frustum_clip_all<float, 5>(clipVerts, currentPoly.n, clipVerts);
847               // Clip against all edges of the view frustum
848               int num_vertices = frustum_clip_all<float, 5>(clipVerts, currentPoly.n, clipVerts);
849849
850                    // Copy the results of
851                    currentPoly.n = num_vertices;
852                    for (int m = 0; m < num_vertices; m++)
853                    {
854                        currentPoly.vert[m].clipCoords[0] = clipVerts[m].x;
855                        currentPoly.vert[m].clipCoords[1] = clipVerts[m].y;
856                        currentPoly.vert[m].clipCoords[2] = clipVerts[m].z;
857                        currentPoly.vert[m].clipCoords[3] = clipVerts[m].w;
858                        currentPoly.vert[m].texCoords[0] = clipVerts[m].p[0];
859                        currentPoly.vert[m].texCoords[1] = clipVerts[m].p[1];
860                        currentPoly.vert[m].light[0] = clipVerts[m].p[2];
861                        currentPoly.vert[m].light[1] = clipVerts[m].p[3];
862                        currentPoly.vert[m].light[2] = clipVerts[m].p[4];
863                    }
850               // Copy the results of
851               currentPoly.n = num_vertices;
852               for (int m = 0; m < num_vertices; m++)
853               {
854                  currentPoly.vert[m].clipCoords[0] = clipVerts[m].x;
855                  currentPoly.vert[m].clipCoords[1] = clipVerts[m].y;
856                  currentPoly.vert[m].clipCoords[2] = clipVerts[m].z;
857                  currentPoly.vert[m].clipCoords[3] = clipVerts[m].w;
858                  currentPoly.vert[m].texCoords[0] = clipVerts[m].p[0];
859                  currentPoly.vert[m].texCoords[1] = clipVerts[m].p[1];
860                  currentPoly.vert[m].light[0] = clipVerts[m].p[2];
861                  currentPoly.vert[m].light[1] = clipVerts[m].p[3];
862                  currentPoly.vert[m].light[2] = clipVerts[m].p[4];
863               }
864864
865                    const rectangle& visarea = m_screen->visible_area();
865               const rectangle& visarea = m_screen->visible_area();
866866               for (int m = 0; m < currentPoly.n; m++)
867867               {
868868                  // Convert into normalized device coordinates...
869                        float ndCoords[4];      // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w)
869                  float ndCoords[4];      // Normalized device coordinates/clipCoordinates (x/w, y/w, z/w)
870870                  ndCoords[0] = currentPoly.vert[m].clipCoords[0] / currentPoly.vert[m].clipCoords[3];
871871                  ndCoords[1] = currentPoly.vert[m].clipCoords[1] / currentPoly.vert[m].clipCoords[3];
872872                  ndCoords[2] = currentPoly.vert[m].clipCoords[2] / currentPoly.vert[m].clipCoords[3];
873873                  ndCoords[3] = currentPoly.vert[m].clipCoords[3];
874874
875875                  // Final pixel values are garnered here :
876                        float windowCoords[4];  // Mapped ndCoordinates to screen space
876                  float windowCoords[4];  // Mapped ndCoordinates to screen space
877877                  windowCoords[0] = (ndCoords[0]+1.0f) * ((float)(visarea.max_x) / 2.0f) + 0.0f;
878878                  windowCoords[1] = (ndCoords[1]+1.0f) * ((float)(visarea.max_y) / 2.0f) + 0.0f;
879879                  windowCoords[2] = (ndCoords[2]+1.0f) * 0.5f;
880880
881                        // Flip Y
881                  // Flip Y
882882                  windowCoords[1] = (float)visarea.max_y - windowCoords[1];
883883
884884                  // Store the points in a list for later use...
r249924r249925
899899}
900900
901901// note 0x0102 packets are only 8 words, it appears they can be in either the upper or lower half of the 16 word packet.
902// We currently only draw 0x0102 packets where both halves contain 0x0102 (2 calls), but this causes graphics to vanish in
902// We currently only draw 0x0102 packets where both halves contain 0x0102 (2 calls), but this causes graphics to vanish in
903903// xrally because in some cases the 0x0102 packet only exists in the upper or lower half with another value (often 0x0000 - NOP) in the other.
904// If we also treat (0x0000 - NOP) as 8 word  instead of 16 so that we can access a 0x0102 in the 2nd half of the 16 word packet
904// If we also treat (0x0000 - NOP) as 8 word  instead of 16 so that we can access a 0x0102 in the 2nd half of the 16 word packet
905905// then we end up with other invalid packets in the 2nd half which should be ignored.
906906// This would suggest our processing if flawed in other ways, or there is something else to indicate packet length.
907907
r249924r249925
991991void hng64_state::clear3d()
992992{
993993   // Reset the buffers...
994    const rectangle& visarea = m_screen->visible_area();
994   const rectangle& visarea = m_screen->visible_area();
995995   for (int i = 0; i < (visarea.max_x)*(visarea.max_y); i++)
996996   {
997997      m_poly_renderer->depthBuffer3d()[i] = 100.0f;
trunk/src/mame/video/m72.c
r249924r249925
1212inline void m72_state::m72_m81_get_tile_info(tile_data &tileinfo,int tile_index,const UINT16 *vram,int gfxnum)
1313{
1414   int code,attr,color,pri;
15   
15
1616   // word 0               word 1
1717   // fftt tttt tttt tttt  ---- ---- zz-? pppp
1818
r249924r249925
149149
150150   m_fg_tilemap->set_scrolldx(4,64);
151151   m_fg_tilemap->set_scrolldy(-128, 0);
152   
152
153153   m_bg_tilemap->set_scrolldx(6,0);
154154   m_bg_tilemap->set_scrolldy(-128,-128);
155155
r249924r249925
202202
203203   m_fg_tilemap->set_scrolldx(4,0);
204204   m_fg_tilemap->set_scrolldy(-128,-128);
205   
205
206206   m_bg_tilemap->set_scrolldx(6-256,0);
207207   m_bg_tilemap->set_scrolldy(-128,-128);
208208
r249924r249925
345345WRITE16_MEMBER(m72_state::irq_line_w)
346346{
347347   COMBINE_DATA(&m_raster_irq_position);
348//   printf("m_raster_irq_position %04x\n", m_raster_irq_position);
348//  printf("m_raster_irq_position %04x\n", m_raster_irq_position);
349349}
350350
351351WRITE16_MEMBER(m72_state::scrollx1_w)
r249924r249925
435435      if (data & 0xff00) m_m82_rowscroll = 1;
436436      else m_m82_rowscroll = 0;
437437   }
438//   printf("m82_gfx_ctrl_w %04x\n", data);
438//  printf("m82_gfx_ctrl_w %04x\n", data);
439439
440440}
441441
442442WRITE16_MEMBER(m72_state::m82_tm_ctrl_w)
443443{
444444   COMBINE_DATA(&m_m82_tmcontrol);
445//   printf("tmcontrol %04x\n", m_m82_tmcontrol);
445//  printf("tmcontrol %04x\n", m_m82_tmcontrol);
446446}
447447
448448
trunk/src/mame/video/meadows.c
r249924r249925
6464
6565WRITE8_MEMBER(meadows_state::meadows_spriteram_w)
6666{
67//   m_screen->update_now();
67//  m_screen->update_now();
6868   m_screen->update_partial(m_screen->vpos());
6969   m_spriteram[offset] = data;
7070}
trunk/src/mame/video/mikromik.c
r249924r249925
1212{
1313   UINT8 romdata = m_char_rom->base()[(charcode << 4) | linecount];
1414
15   int gpa0 = BIT(gpa, 0);      // general purpose attribute 0
16   int llen = m_llen;         // light enable
17   int compl_in = rvv;         // reverse video
18   int hlt_in = hlgt;         // highlight;
19   int color;               // 0 = black, 1 = dk green, 2 = lt green; on MikroMikko 1, "highlight" is actually the darker shade of green
15   int gpa0 = BIT(gpa, 0);     // general purpose attribute 0
16   int llen = m_llen;          // light enable
17   int compl_in = rvv;         // reverse video
18   int hlt_in = hlgt;          // highlight;
19   int color;                  // 0 = black, 1 = dk green, 2 = lt green; on MikroMikko 1, "highlight" is actually the darker shade of green
2020   int i, qh, video_in;
2121
22   int d7 = BIT(romdata, 7);   // save MSB (1 indicates that this is a Visual Attribute or Special Code instead of a normal display character)
23   int d6 = BIT(romdata, 6);   // save also first and last char bitmap bits before shifting out the MSB
22   int d7 = BIT(romdata, 7);   // save MSB (1 indicates that this is a Visual Attribute or Special Code instead of a normal display character)
23   int d6 = BIT(romdata, 6);   // save also first and last char bitmap bits before shifting out the MSB
2424   int d0 = BIT(romdata, 0);
2525   UINT8 data = (romdata << 1) | (d7 & d0); // get rid of MSB, duplicate LSB for special characters
2626
r249924r249925
2929      if (HORIZONTAL_CHARACTER_PIXELS == 10)
3030      {
3131         // Hack to stretch 8 pixels wide character bitmap to 10 pixels on screen.
32         // This was needed because high res graphics use 800 pixels wide bitmap but
32         // This was needed because high res graphics use 800 pixels wide bitmap but
3333         // 80 chars * 8 pixels is only 640 -> characters would cover only 80% of the screen width.
3434         // Step 1: Instead of 8, set MCFG_I8275_CHARACTER_WIDTH(10) at the end of this file
3535         // Step 2: Make sure i8275_device::recompute_parameters() is called in i8275_device::device_start()
trunk/src/mame/video/model3.c
r249924r249925
16131613         clip_vert[i].z = p[i][2];
16141614         clip_vert[i].w = p[i][3];
16151615
1616            clip_vert[i].p[0] = vertex[i].u * texture_coord_scale * 256.0f;        // 8 bits of subtexel accuracy for bilinear filtering
1616         clip_vert[i].p[0] = vertex[i].u * texture_coord_scale * 256.0f;        // 8 bits of subtexel accuracy for bilinear filtering
16171617         clip_vert[i].p[1] = vertex[i].v * texture_coord_scale * 256.0f;
16181618
16191619         // transform vertex normal
r249924r249925
16561656      }
16571657
16581658      /* clip against all edges of the view frustum */
1659        num_vertices = frustum_clip_all<float, 4>(clip_vert, num_vertices, clip_vert);
1659      num_vertices = frustum_clip_all<float, 4>(clip_vert, num_vertices, clip_vert);
16601660
16611661      /* divide by W, transform to screen coords */
16621662      for(i=0; i < num_vertices; i++)
r249924r249925
20382038            v[i].y = tri->v[i].y;
20392039            v[i].p[0] = tri->v[i].w;
20402040            v[i].p[1] = 1.0f / tri->v[i].w;
2041                v[i].p[2] = tri->v[i].p[0];
2042                v[i].p[3] = tri->v[i].p[1];
2043                v[i].p[4] = tri->v[i].p[2];
2041            v[i].p[2] = tri->v[i].p[0];
2042            v[i].p[3] = tri->v[i].p[1];
2043            v[i].p[4] = tri->v[i].p[2];
20442044         }
20452045
20462046         model3_polydata &extra = object_data_alloc();
r249924r249925
20682068            v[i].x = tri->v[i].x;
20692069            v[i].y = tri->v[i].y;
20702070            v[i].p[0] = tri->v[i].w;
2071                v[i].p[1] = tri->v[i].p[2];
2071            v[i].p[1] = tri->v[i].p[2];
20722072         }
20732073
20742074         model3_polydata &extra = object_data_alloc();
r249924r249925
21032103            v[i].y = tri->v[i].y;
21042104            v[i].p[0] = tri->v[i].w;
21052105            v[i].p[1] = 1.0f / tri->v[i].w;
2106                v[i].p[2] = tri->v[i].p[0];
2106            v[i].p[2] = tri->v[i].p[0];
21072107            v[i].p[3] = tri->v[i].p[1];
21082108            v[i].p[4] = tri->v[i].p[2];
21092109         }
trunk/src/mame/video/qix.c
r249924r249925
9999{
100100   /* update the screen in case the game is writing "behind" the beam -
101101      Zookeeper likes to do this */
102//   m_screen->update_now();
102//  m_screen->update_now();
103103   m_screen->update_partial(m_screen->vpos());
104104
105105   /* add in the upper bit of the address latch */
r249924r249925
114114{
115115   /* update the screen in case the game is writing "behind" the beam -
116116      Zookeeper likes to do this */
117//   m_screen->update_now();
117//  m_screen->update_now();
118118   m_screen->update_partial(m_screen->vpos());
119119
120120   /* add in the upper bit of the address latch */
r249924r249925
152152WRITE8_MEMBER(qix_state::qix_addresslatch_w)
153153{
154154   /* update the screen in case the game is writing "behind" the beam */
155//   m_screen->update_now();
155//  m_screen->update_now();
156156   m_screen->update_partial(m_screen->vpos());
157157
158158   /* compute the value at the address latch */
r249924r249925
166166WRITE8_MEMBER(qix_state::slither_addresslatch_w)
167167{
168168   /* update the screen in case the game is writing "behind" the beam */
169//   m_screen->update_now();
169//  m_screen->update_now();
170170   m_screen->update_partial(m_screen->vpos());
171171
172172   /* compute the value at the address latch */
r249924r249925
196196   if (((offset >> 8) == m_palette_bank) &&
197197      (old_data != data))
198198   {
199   //   m_screen->update_now();
199   //  m_screen->update_now();
200200      m_screen->update_partial(m_screen->vpos());
201201   }
202202
trunk/src/mame/video/sega16sp.c
r249924r249925
10411041sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
10421042   : sega_outrun_sprite_device(mconfig, tag, owner, clock, true, "sega_xboard_sprite", __FILE__)
10431043{
1044
10451044}
10461045
10471046
r249924r249925
10861085   //            ----cccc cccc----  Sprite color palette
10871086   //            -------- ----llll  4-bit pixel data
10881087   //
1089   
1088
10901089   set_origin(m_xoffs, m_yoffs);
10911090
10921091   // render the sprites in order
trunk/src/mame/video/segaic16.c
r249924r249925
529529      temp = bottommax;
530530      bottommax = topmin;
531531      topmin = temp;
532   
532
533533      if (leftmin != -1) leftmin = width - 1 - leftmin;
534534      if (leftmax != -1) leftmax = width - 1 - leftmax;
535535      if (rightmin != -1) rightmin = width - 1 - rightmin;
trunk/src/mame/video/spacefb.c
r249924r249925
1919
2020WRITE8_MEMBER(spacefb_state::port_0_w)
2121{
22//   m_screen->update_now();
22//  m_screen->update_now();
2323   m_screen->update_partial(m_screen->vpos());
2424   m_port_0 = data;
2525}
r249924r249925
2727
2828WRITE8_MEMBER(spacefb_state::port_2_w)
2929{
30//   m_screen->update_now();
30//  m_screen->update_now();
3131   m_screen->update_partial(m_screen->vpos());
3232   m_port_2 = data;
3333}
trunk/src/mame/video/system1.c
r249924r249925
190190
191191READ8_MEMBER(system1_state::system1_mixer_collision_r)
192192{
193//   m_screen->update_now();
193//  m_screen->update_now();
194194   m_screen->update_partial(m_screen->vpos());
195195   return m_mix_collide[offset & 0x3f] | 0x7e | (m_mix_collide_summary << 7);
196196}
197197
198198WRITE8_MEMBER(system1_state::system1_mixer_collision_w)
199199{
200//   m_screen->update_now();
200//  m_screen->update_now();
201201   m_screen->update_partial(m_screen->vpos());
202202   m_mix_collide[offset & 0x3f] = 0;
203203}
204204
205205WRITE8_MEMBER(system1_state::system1_mixer_collision_reset_w)
206206{
207//   m_screen->update_now();
207//  m_screen->update_now();
208208   m_screen->update_partial(m_screen->vpos());
209209   m_mix_collide_summary = 0;
210210}
r249924r249925
219219
220220READ8_MEMBER(system1_state::system1_sprite_collision_r)
221221{
222//   m_screen->update_now();
222//  m_screen->update_now();
223223   m_screen->update_partial(m_screen->vpos());
224224   return m_sprite_collide[offset & 0x3ff] | 0x7e | (m_sprite_collide_summary << 7);
225225}
226226
227227WRITE8_MEMBER(system1_state::system1_sprite_collision_w)
228228{
229//   m_screen->update_now();
229//  m_screen->update_now();
230230   m_screen->update_partial(m_screen->vpos());
231231   m_sprite_collide[offset & 0x3ff] = 0;
232232}
233233
234234WRITE8_MEMBER(system1_state::system1_sprite_collision_reset_w)
235235{
236//   m_screen->update_now();
236//  m_screen->update_now();
237237   m_screen->update_partial(m_screen->vpos());
238238   m_sprite_collide_summary = 0;
239239}
trunk/src/mame/video/timeplt.c
r249924r249925
125125void timeplt_state::video_start()
126126{
127127   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(timeplt_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
128   m_video_enable = 0;
129   
128   m_video_enable = 0;
129
130130   save_item(NAME(m_video_enable));
131131}
132132
trunk/src/mame/video/tp84.c
r249924r249925
106106WRITE8_MEMBER(tp84_state::tp84_spriteram_w)
107107{
108108   /* the game multiplexes the sprites, so update now */
109//   m_screen->update_now();
109//  m_screen->update_now();
110110   m_screen->update_partial(m_screen->vpos());
111111   m_spriteram[offset] = data;
112112}
trunk/src/osd/modules/render/d3d/d3dhlsl.c
r249924r249925
22662266
22672267
22682268/*-------------------------------------------------
2269   slider_alloc - allocate a new slider entry
2270   currently duplicated from ui.c, this could
2271   be done in a more ideal way.
2269    slider_alloc - allocate a new slider entry
2270    currently duplicated from ui.c, this could
2271    be done in a more ideal way.
22722272-------------------------------------------------*/
22732273
22742274static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg)
trunk/src/osd/osdmini/minifile.c
r249924r249925
107107
108108file_error osd_openpty(osd_file **file, char *name, size_t name_len)
109109{
110    return FILERR_FAILURE;
110   return FILERR_FAILURE;
111111}
112112
113113//============================================================
trunk/src/osd/osdnet.c
r249924r249925
5050{
5151   m_stop = true;
5252// nasty hack to prevent Segmentation fault on emulation stop
53//   m_timer->reset();
53//  m_timer->reset();
5454}
5555
5656int osd_netdev::send(UINT8 *buf, int len)
trunk/src/osd/sdl/sdlfile.c
r249924r249925
365365
366366file_error osd_openpty(osd_file **file, char *name, size_t name_len)
367367{
368        file_error res;
369        UINT64 filesize;
368      file_error res;
369      UINT64 filesize;
370370
371        if ((res = osd_open(sdlfile_ptty_identifier , 0 , file , &filesize)) != FILERR_NONE) {
372                return res;
373        }
371      if ((res = osd_open(sdlfile_ptty_identifier , 0 , file , &filesize)) != FILERR_NONE) {
372            return res;
373      }
374374
375        if ((res = sdl_slave_name_ptty(*file , name , name_len)) != FILERR_NONE) {
376                osd_close(*file);
377        }
375      if ((res = sdl_slave_name_ptty(*file , name , name_len)) != FILERR_NONE) {
376            osd_close(*file);
377      }
378378
379        return res;
379      return res;
380380}
381381
382382//============================================================
trunk/src/osd/sdl/sdlptty_os2.c
r249924r249925
3535
3636file_error sdl_slave_name_ptty(osd_file *file)
3737{
38        return FILERR_ACCESS_DENIED;
38      return FILERR_ACCESS_DENIED;
3939}
trunk/src/osd/sdl/sdlptty_unix.c
r249924r249925
4040
4141file_error sdl_open_ptty(const char *path, UINT32 openflags, osd_file **file, UINT64 *filesize)
4242{
43        int master;
44        int aslave;
45        struct termios tios;
46        int oldflags;
43      int master;
44      int aslave;
45      struct termios tios;
46      int oldflags;
4747
48        memset(&tios , 0 , sizeof(tios));
49        cfmakeraw(&tios);
48      memset(&tios , 0 , sizeof(tios));
49      cfmakeraw(&tios);
5050
51        if (openpty(&master, &aslave, NULL, &tios, NULL) >= 0)
52        {
53                oldflags = fcntl(master, F_GETFL, 0);
54                if (oldflags == -1) {
55                        close(master);
56                        return FILERR_FAILURE;
57                }
51      if (openpty(&master, &aslave, NULL, &tios, NULL) >= 0)
52      {
53            oldflags = fcntl(master, F_GETFL, 0);
54            if (oldflags == -1) {
55                  close(master);
56                  return FILERR_FAILURE;
57            }
5858
59                fcntl(master, F_SETFL, oldflags | O_NONBLOCK);
60                close(aslave);
61                (*file)->handle = master;
62                *filesize = 0;
63        }
64        else
65        {
66                return FILERR_ACCESS_DENIED;
67        }
59            fcntl(master, F_SETFL, oldflags | O_NONBLOCK);
60            close(aslave);
61            (*file)->handle = master;
62            *filesize = 0;
63      }
64      else
65      {
66            return FILERR_ACCESS_DENIED;
67      }
6868
69        return FILERR_NONE;
69      return FILERR_NONE;
7070}
7171
7272file_error sdl_read_ptty(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
7373{
74        ssize_t result;
74      ssize_t result;
7575
76        result = read(file->handle, buffer, count);
76      result = read(file->handle, buffer, count);
7777
78        if (result < 0)
79        {
80                return error_to_file_error(errno);
81        }
78      if (result < 0)
79      {
80            return error_to_file_error(errno);
81      }
8282
83        if (actual != NULL )
84        {
85                *actual = result;
86        }
83      if (actual != NULL )
84      {
85            *actual = result;
86      }
8787
88        return FILERR_NONE;
88      return FILERR_NONE;
8989}
9090
9191file_error sdl_write_ptty(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
9292{
93        ssize_t result;
94        result = write(file->handle, buffer, count);
93      ssize_t result;
94      result = write(file->handle, buffer, count);
9595
96        if (result < 0)
97        {
98                return error_to_file_error(errno);
99        }
96      if (result < 0)
97      {
98            return error_to_file_error(errno);
99      }
100100
101        if (actual != NULL )
102        {
103                *actual = result;
104        }
101      if (actual != NULL )
102      {
103            *actual = result;
104      }
105105
106        return FILERR_NONE;
106      return FILERR_NONE;
107107}
108108
109109file_error sdl_close_ptty(osd_file *file)
110110{
111        close(file->handle);
112        osd_free(file);
111      close(file->handle);
112      osd_free(file);
113113
114        return FILERR_NONE;
114      return FILERR_NONE;
115115}
116116
117117file_error sdl_slave_name_ptty(osd_file *file , char *name , size_t name_len)
118118{
119        const char *slave_name = ptsname(file->handle);
119      const char *slave_name = ptsname(file->handle);
120120
121        if (slave_name == NULL || strlen(slave_name) >= name_len) {
122                return FILERR_INVALID_ACCESS;
123        }
121      if (slave_name == NULL || strlen(slave_name) >= name_len) {
122            return FILERR_INVALID_ACCESS;
123      }
124124
125        strcpy(name , slave_name);
125      strcpy(name , slave_name);
126126
127        return FILERR_NONE;
127      return FILERR_NONE;
128128}
129129
130130#else
r249924r249925
134134
135135file_error sdl_open_ptty(const char *path, UINT32 openflags, osd_file **file, UINT64 *filesize)
136136{
137        return FILERR_ACCESS_DENIED;
137      return FILERR_ACCESS_DENIED;
138138}
139139
140140file_error sdl_read_ptty(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
141141{
142        return FILERR_ACCESS_DENIED;
142      return FILERR_ACCESS_DENIED;
143143}
144144
145145file_error sdl_write_ptty(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
146146{
147        return FILERR_ACCESS_DENIED;
147      return FILERR_ACCESS_DENIED;
148148}
149149
150150file_error sdl_close_ptty(osd_file *file)
151151{
152        return FILERR_ACCESS_DENIED;
152      return FILERR_ACCESS_DENIED;
153153}
154154
155155file_error sdl_slave_name_ptty(osd_file *file)
156156{
157        return FILERR_ACCESS_DENIED;
157      return FILERR_ACCESS_DENIED;
158158}
159159
160160#endif
trunk/src/osd/windows/winfile.c
r249924r249925
241241
242242file_error osd_openpty(osd_file **file, char *name, size_t name_len)
243243{
244    return FILERR_FAILURE;
244   return FILERR_FAILURE;
245245}
246246
247247//============================================================
trunk/src/version.c
r249924r249925
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.166"
11#define BARE_BUILD_VERSION "0.167"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team