Previous 199869 Revisions Next

r41428 Tuesday 27th October, 2015 at 19:08:04 UTC by rfka01
Correct number of ISA slots
[3rdparty/bgfx/3rdparty/dxsdk/include]dxgitype.h
[hash]a2600.xml a5200.xml apple2gs.xml bbc_32016_flop.xml bbc_z80_flop.xml bbcb_cass.xml bbcb_flop.xml coleco.xml cpc_cass.xml cpc_flop.xml dmv.xml gameboy.xml ibm5150.xml ibm5170.xml lisa.xml megadriv.xml msx1_cart.xml msx1_flop.xml osborne1.xml pc8801_flop.xml pc98.xml pico.xml pro128s_flop.xml psion1.xml saturn.xml sg1000.xml sms.xml specpls3_flop.xml spectrum_cass.xml studio2.xml svmu.xml tandy2k.xml tvc_cass.xml unichamp.xml vic1001_cart.xml wscolor.xml
[hlsl]vector.fx
[scripts/src]bus.lua
[scripts/src/osd]sdl.lua
[scripts/target/mame]arcade.lua mess.lua
[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/bus/vcs]dpcplus.c dpcplus.h vcs_slot.c vcs_slot.h
[src/devices/cpu/avr8]avr8.c
[src/devices/cpu/dsp56k]pmove.h
[src/devices/cpu/e132xs]e132xs.c
[src/devices/cpu/esrip]esrip.c
[src/devices/cpu/i86]i86.c
[src/devices/cpu/m6805]m6805.c
[src/devices/cpu/mips]mips3.h
[src/devices/cpu/ssem]ssem.c
[src/devices/cpu/upd7725]upd7725.c
[src/devices/cpu/z80]z80.c z80.h
[src/devices/imagedev]floppy.c floppy.h
[src/devices/machine]atahle.c r10696.c z80scc.c z80scc.h z80sio.c z80sio.h
[src/devices/video]mc6845.c mc6845.h poly.h
[src/emu]diimage.c dipty.c dipty.h emuopts.c emuopts.h info.c machine.c machine.h memory.c romload.c screen.h softlist.c validity.c video.c
[src/emu/ui]filemngr.c info_pty.c inputmap.c mainmenu.c mainmenu.h ui.c
[src/emu/video]rgbvmx.c rgbvmx.h vector.c vector.h
[src/lib/formats]apollo_dsk.c tzx_cas.c
[src/mame]arcade.lst mess.lst
[src/mame/audio]hng64.c
[src/mame/drivers]a2600.c amstrad.c apple2e.c aristmk5.c atari400.c bbc.c beathead.c bublbobl.c by17.c by35.c cardline.c cave.c champbas.c chicago.c cntsteer.c cubeqst.c dec0.c dkong.c ec184x.c electron.c eti660.c exelv.c firefox.c galaxian.c galaxold.c gatron.c goldstar.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 osborne1.c othunder.c pc.c peplus.c pgm.c playch10.c rd100.c replicator.c sega_sawatte.c segac2.c segas24.c shougi.c slotcarn.c subhuntr.c suna16.c system1.c timeplt.c unichamp.c vicdual.c vpoker.c wacky_gator.c wecleman.c zx.c
[src/mame/includes]amstrad.h champbas.h hng64.h m107.h m92.h neogeo.h osborne1.h timeplt.h zx.h
[src/mame/layout]by17.lay by17_matahari.lay by17_pwerplay.lay by35.lay by35_playboy.lay
[src/mame/machine]315-5881_crypt.c apollo.c electron.c mm1kb.c mm1kb.h naomim1.c osborne1.c psxcd.c zx.c
[src/mame/video]apple2.c btoads.c champbas.c cloak.c decbac06.h dkong.c galaxian.c gic.c gic.h gyruss.c hng64.c hng64_3d.c itech8.c m72.c meadows.c mikromik.c model3.c qix.c sega16sp.c segaic16.c spacefb.c system1.c timeplt.c tp84.c zx.c
[src/osd]osdnet.c
[src/osd/modules/debugger/osx]debugview.m
[src/osd/modules/render/d3d]d3dhlsl.c
[src/osd/osdmini]minifile.c
[src/osd/sdl]sdlfile.c sdlptty_os2.c sdlptty_unix.c video.c
[src/osd/windows]input.c winfile.c

trunk/3rdparty/bgfx/3rdparty/dxsdk/include/dxgitype.h
r249939r249940
1010#define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code)
1111#define MAKE_DXGI_STATUS(code)  MAKE_HRESULT(0, _FACDXGI, code)
1212
13#if !defined(DXGI_ERROR_INVALID_CALL)
13#if defined(__MINGW32__) || !defined(DXGI_ERROR_INVALID_CALL)
1414#   define DXGI_STATUS_OCCLUDED                     MAKE_DXGI_STATUS(1)
1515#   define DXGI_STATUS_CLIPPED                      MAKE_DXGI_STATUS(2)
1616#   define DXGI_STATUS_NO_REDIRECTION               MAKE_DXGI_STATUS(4)
trunk/hash/a2600.xml
r249939r249940
1121111211      </part>
1121211212   </software>
1121311213
11214   <software name="pitfallsg" cloneof="pitfall">   <!-- significant visual changes -->
11215      <description>Pitfall (Star Game) (aka Tom Boy)</description>
11214   <software name="pitfallsg" cloneof="pitfall">
11215      <description>Pitfall (Star Game)</description>
1121611216      <year>19??</year>
1121711217      <publisher>Star Game</publisher>
1121811218      <part name="cart" interface="a2600_cart">
r249939r249940
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>
1794817948      <publisher>AtariAge</publisher>
17949      <sharedfeat name="compatibility" value="NTSC" />
17949    <sharedfeat name="compatibility" value="NTSC" />
1795017950      <part name="cart" interface="a2600_cart">
1795117951         <feature name="slot" value="a26_x07" />
1795217952         <dataarea name="rom" size="65536">
1795317953            <rom name="m27c512.bin" size="65536" crc="c1da7d3b" sha1="4d9c06940754ba03e2eca2d88ea4201b8d9e7805" offset="0" />
1795417954         </dataarea>
1795517955      </part>
17956   </software>
17957
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>
17971
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>
17984
17985
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>
17998
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>
18011
17956   </software>   
1801217957</softwarelist>
18013
18014
trunk/hash/a5200.xml
r249939r249940
14721472         </dataarea>
14731473      </part>
14741474   </software>
1475
1476   <software name="5200temp">
1477      <description>5200 Tempest</description>
1478      <year>2012</year>
1479      <publisher>Atariage</publisher> <!-- unlicensed? -->
1480      <info name="developer" value="Keithen" />
1481      <part name="cart" interface="a8bit_cart">
1482         <feature name="slot" value="a5200" />
1483         <dataarea name="rom" size="32768">
1484            <rom name="tempest (atariage).bin" size="32768" crc="a6400e17" sha1="0cb2bd6ed89ce6710ac092533a24f1248688c88c" offset="0" />
1485         </dataarea>
1486      </part>
1487   </software>
1488
14891475</softwarelist>
trunk/hash/apple2gs.xml
r249939r249940
28232823   </software>
28242824
28252825   <software name="kingqst4">
2826      <description>King's Quest IV</description>
2826      <description>King's Quest IV </description>
28272827      <year>1989</year>
28282828      <publisher>Sierra</publisher>
28292829
r249939r249940
32033203   <software name="mathblst">
32043204      <description>Math Blaster Plus!</description>
32053205      <year>1989</year>
3206      <publisher>Davidson and Associates</publisher>
3206      <publisher>Davidson and Associates </publisher>
32073207
32083208      <part name="flop1" interface="floppy_3_5">
32093209         <dataarea name="flop" size="819264">
trunk/hash/bbc_32016_flop.xml
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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
r249939r249940
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>
r249939r249940
51015101   </software>
51025102
51035103   <software name="gatecras">
5104      <description>Gatecrasher</description>
5104      <description>Gatecrasher </description>
51055105      <year>198?</year>
51065106      <publisher>Quicksilva</publisher>
51075107      <part name="cass" interface="bbc_cass">
r249939r249940
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
r249939r249940
3636         </dataarea>
3737      </part>
3838   </software>
39
39   
4040   <software name="elite">
4141      <description>Elite</description>
4242      <year>1984</year>
trunk/hash/coleco.xml
r249939r249940
22362236
22372237   <software name="startrek">
22382238      <!-- Star Trek - Strategic Operations Simulator (1984)(Coleco).bin -->
2239      <description>Star Trek: Strategic Operations Simulator</description>
2239      <description>Star Trek: Strategic Operations Simulator </description>
22402240      <year>1984</year>
22412241      <publisher>Coleco / CBS</publisher>
22422242      <info name="developer" value="Sega" />
trunk/hash/cpc_cass.xml
r249939r249940
26912691   </software>
26922692
26932693   <software name="avm" supported="no">
2694      <description>Animal / Vegetable / Mineral (UK)</description>
2694      <description>Animal / Vegetable / Mineral (UK) </description>
26952695      <year>1984</year>
26962696      <publisher>Amsoft</publisher>
26972697      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
47594759   </software>
47604760
47614761   <software name="billykidlg" cloneof="billykid" supported="no">
4762      <description>Billy The Kid (UK, LightGun)</description>
4762      <description>Billy The Kid (UK, LightGun) </description>
47634763      <year>1989</year>
47644764      <publisher>Mastertronic</publisher>
47654765      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
47954795   </software>
47964796
47974797   <software name="bionicc" supported="no">
4798      <description>Bionic Commando (UK, Colour Screen)</description>
4798      <description>Bionic Commando (UK, Colour Screen) </description>
47994799      <year>1988</year>
48004800      <publisher>Go!</publisher>
48014801      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
48074807   </software>
48084808
48094809   <software name="bioniccgs" cloneof="bionicc" supported="no">
4810      <description>Bionic Commando (UK, Green Screen)</description>
4810      <description>Bionic Commando (UK, Green Screen) </description>
48114811      <year>1988</year>
48124812      <publisher>Go!</publisher>
48134813      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
62196219   <software name="caldrmag" supported="no">
62206220      <description>El Caldero Magico (Spa)</description>
62216221      <year>1986</year>
6222      <publisher>Humanes</publisher>
6222      <publisher>Humanes </publisher>
62236223      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
62246224      <part name="cass1" interface="cpc_cass">
62256225         <dataarea name="cass" size="24785">
r249939r249940
67136713   </software>
67146714
67156715   <software name="catastrp" supported="no">
6716      <description>Catastrophes - Ile Infernale (UK)</description>
6716      <description>Catastrophes - Ile Infernale (UK) </description>
67176717      <year>1985</year>
67186718      <publisher>Amsoft</publisher>
67196719      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
71717171   </software>
71727172
71737173   <software name="cheatmd2" supported="no">
7174      <description>Cheat Mode II The Revenge! (UK)</description>
7174      <description>Cheat Mode II The Revenge! (UK) </description>
71757175      <year>1990</year>
71767176      <publisher>Amstrad Action</publisher>
71777177      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
87398739   </software>
87408740
87418741   <software name="copout" supported="no">
8742      <description>Cop-Out (UK)</description>
8742      <description>Cop-Out (UK) </description>
87438743      <year>1986</year>
87448744      <publisher>Mikrogen</publisher>
87458745      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
97559755   </software>
97569756
97579757   <software name="dandare" supported="no">
9758      <description>Dan Dare - Pilot of the Future (UK)</description>
9758      <description>Dan Dare - Pilot of the Future (UK) </description>
97599759      <year>1986</year>
97609760      <publisher>Virgin Games</publisher>
97619761      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
1044010440   </software>
1044110441
1044210442   <software name="defordie" supported="no">
10443      <description>Defend or Die (UK)</description>
10443      <description>Defend or Die (UK) </description>
1044410444      <year>1985</year>
1044510445      <publisher>Alligata Software</publisher>
1044610446      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
r249939r249940
1139311393   <software name="ddragon" supported="no">
1139411394      <description>Double Dragon (UK)</description>
1139511395      <year>1988</year>
11396      <publisher>Animagic</publisher>
11396      <publisher> Animagic </publisher>
1139711397      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
1139811398      <part name="cass1" interface="cpc_cass">
1139911399         <dataarea name="cass" size="151797">
r249939r249940
1140511405   <software name="ddragons" cloneof="ddragon" supported="no">
1140611406      <description>Double Dragon (Spa)</description>
1140711407      <year>1988</year>
11408      <publisher>Animagic</publisher>
11408      <publisher> Animagic </publisher>
1140911409      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
1141011410      <part name="cass1" interface="cpc_cass">
1141111411         <dataarea name="cass" size="145958">
r249939r249940
2067220672   <software name="knightlr" supported="no">
2067320673      <description>Knight Lore (UK, Ricochet)</description>
2067420674      <year>1984</year>
20675      <publisher>Ricochet</publisher>
20675      <publisher> Ricochet </publisher>
2067620676      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
2067720677      <part name="cass1" interface="cpc_cass">
2067820678         <dataarea name="cass" size="42795">
r249939r249940
3763037630   </software>
3763137631
3763237632   <software name="totrecal" supported="no">
37633      <description>Total Recall (UK)</description>
37633      <description>Total Recall (UK) </description>
3763437634      <year>1990</year>
3763537635      <publisher>Ocean Software</publisher>
3763637636      <info name="usage" value="Load with |TAPE and then RUN&quot;&quot;" />
trunk/hash/cpc_flop.xml
r249939r249940
2216722167   <software name="climbit" supported="no">
2216822168      <description>Climb-It (UK)</description>
2216922169      <year>1985</year>
22170      <publisher>Tynesoft</publisher>
22170      <publisher> Tynesoft </publisher>
2217122171      <part name="flop1" interface="floppy_3">
2217222172         <dataarea name="flop" size="194816">
2217322173            <rom name="climb-it (uk) (1985).dsk" size="194816" crc="aa513c20" sha1="7bbd3dcc7c3a425d2fe30184dd921ec93b6327f4" offset="0" />
r249939r249940
2217922179   <software name="climbita" cloneof="climbit" supported="no">
2218022180      <description>Climb-It (UK, Alt)</description>
2218122181      <year>1985</year>
22182      <publisher>Tynesoft</publisher>
22182      <publisher> Tynesoft </publisher>
2218322183      <part name="flop1" interface="floppy_3">
2218422184         <dataarea name="flop" size="194816">
2218522185            <rom name="climbit (1984)(tynesoft).dsk" size="194816" crc="8ee28f87" sha1="a4469759a7393d799bd608e41f444b4840efc758" offset="0" />
trunk/hash/dmv.xml
r249939r249940
382382   <software name="zcom20"> <!-- CP/M-80 -->
383383      <description>Z-Com v2.0</description>
384384      <year>1988</year>
385      <publisher>Alpha Systems</publisher>
385      <publisher>Alpha Systems </publisher>
386386      <part name="flop" interface="floppy_5_25">
387387         <dataarea name="flop" size="235708">
388388            <rom name="580nzbk.td0" size="235708" crc="a5b9fab9" sha1="d96c46c32227b4959844729cb54602b809e45d04" offset="0" />
trunk/hash/gameboy.xml
r249939r249940
2273422734   </software>
2273522735
2273622736   <software name="wcup94">
22737      <description>World Cup USA '94 (Euro)</description>
22737      <description>World Cup USA '94 (Euro) </description>
2273822738      <year>1994</year>
2273922739      <publisher>U.S. Gold</publisher>
2274022740      <info name="serial" value="DMG-W9-UKV"/>
trunk/hash/ibm5150.xml
r249939r249940
559559   </software>
560560
561561   <software name="defcrown">
562      <description>Defender of the Crown [ega] (PC Booter)</description>
562      <description>Defender of the Crown [ega] (PC Booter) </description>
563563      <year>1987</year>
564564      <publisher>Mindscape</publisher>
565565      <info name="developer" value="Master Designer Software" />
trunk/hash/ibm5170.xml
r249939r249940
32763276   </software>
32773277
32783278   <software name="cldispdu">
3279      <description>Cirrus Logic Display Drivers and Utilities (Version 1.30)</description>
3279      <description>Cirrus Logic Display Drivers and Utilities (Version 1.30) </description>
32803280      <year>1993</year>
32813281      <publisher>Knowledge Dynamics Corp,</publisher>
32823282      <part name="flop1" interface="floppy_3_5">
trunk/hash/lisa.xml
r249939r249940
581581   </software>
582582
583583   <software name="macwrk3">
584      <description>Lisa Macworks XL 3.0</description>
584      <description>Lisa Macworks XL 3.0 </description>
585585      <year>1985</year>
586586      <publisher>Apple Computer Inc.</publisher>
587587      <info name="finder" value="4.1" />
trunk/hash/megadriv.xml
r249939r249940
2179121791      </part>
2179221792   </software>
2179321793
21794
21795   <software name="puttsqup" >
21796      <description>Putty Squad (prototype)</description>
21797      <year>1992</year>
21798      <publisher>System 3 / Ocean</publisher>
21799      <part name="cart" interface="megadriv_cart">
21800         <dataarea name="rom" width="16" endianness="big" size="0x100000">
21801            <rom name="PS-md.BIN" size="0x100000" crc="2348da80" sha1="f529598f56c581854d2bde2ee960100273813539" offset="0x000000"/>
21802         </dataarea>
21803      </part>
21804   </software>
21805
21806
2180721794   <software name="putter">
2180821795      <description>Putter Golf (Jpn, SegaNet)</description>
2180921796      <year>1991</year>
trunk/hash/msx1_cart.xml
r249939r249940
1345613456   <software name="supersyn">
1345713457      <description>Super Synth (Jpn)</description>
1345813458      <year>1984</year>
13459      <publisher>Victor</publisher>
13459      <publisher>Victor </publisher>
1346013460      <info name="serial" value="M-20001" />
1346113461      <info name="alt_title" value="スーパーシンセ" />
1346213462      <part name="cart" interface="msx_cart">
r249939r249940
1346913469   <software name="supersyna" cloneof="supersyn">
1347013470      <description>Super Synth (Jpn, Alt)</description>
1347113471      <year>1984</year>
13472      <publisher>Victor</publisher>
13472      <publisher>Victor </publisher>
1347313473      <info name="serial" value="M-20001" />
1347413474      <info name="alt_title" value="スーパーシンセ" />
1347513475      <part name="cart" interface="msx_cart">
trunk/hash/msx1_flop.xml
r249939r249940
33333333   </software>
33343334
33353335   <software name="odysseyk">
3336      <description>Odyssey-K</description>
3336      <description>Odyssey-K </description>
33373337      <year>19??</year>
33383338      <publisher>&lt;tape2disk hack&gt;</publisher>
33393339      <part name="flop1" interface="floppy_3_5">
r249939r249940
78877887   </software>
78887888
78897889   <software name="flashgor">
7890      <description>Flash Gordon</description>
7890      <description>Flash Gordon </description>
78917891      <year>19??</year>
78927892      <publisher>&lt;tape2disk hack&gt;</publisher>
78937893      <part name="flop1" interface="floppy_3_5">
r249939r249940
95049504   </software>
95059505
95069506   <software name="jumpland">
9507      <description>Jump Land</description>
9507      <description>Jump Land </description>
95089508      <year>19??</year>
95099509      <publisher>&lt;cart2disk hack&gt;</publisher>
95109510      <part name="flop1" interface="floppy_3_5">
r249939r249940
1468514685   </software>
1468614686
1468714687   <software name="wbells">
14688      <description>Wedding Bells</description>
14688      <description>Wedding Bells </description>
1468914689      <year>19??</year>
1469014690      <publisher>&lt;cart2disk hack&gt;</publisher>
1469114691      <part name="flop1" interface="floppy_3_5">
trunk/hash/osborne1.xml
r249939r249940
123123   </software>
124124
125125   <software name="actcpm">
126      <description>60K CP/M vers 2.20 for Osborne</description>
126      <description>60K CP/M vers 2.20 for Osborne </description>
127127      <year>19??</year>
128128      <publisher>Australian Computer &amp; Telecommunications</publisher>
129129      <part name="flop1" interface="floppy_5_25">
r249939r249940
280280      </part>
281281   </software>
282282
283</softwarelist>
283</softwarelist>
No newline at end of file
trunk/hash/pc8801_flop.xml
r249939r249940
4379743797   </software>
4379843798
4379943799   <software name="nt3mus05">
43800      <description>NT-3 Music Disk - Yume no Fantasia - SBII</description>
43800      <description>NT-3 Music Disk - Yume no Fantasia - SBII </description>
4380143801      <year>1991</year>
4380243802      <publisher>&lt;doujin&gt;</publisher>
4380343803      <info name="developer" value="Active Gamers" />
r249939r249940
5362153621   </software>
5362253622
5362353623   <software name="pc8801gb">
53624      <description>PC-8801 Game Pack</description>
53624      <description>PC-8801 Game Pack </description>
5362553625      <year>19??</year>
5362653626      <publisher>&lt;unknown&gt;</publisher>
5362753627      <part name="flop1" interface="floppy_5_25">
trunk/hash/pc98.xml
r249939r249940
4837048370   </software>
4837148371
4837248372   <software name="microms2" supported="no">
48373      <description>Micro Musician II</description>
48373      <description>Micro Musician II </description>
4837448374      <year>19??</year>
4837548375      <publisher>Music Network</publisher>
4837648376      <part name="flop1" interface="floppy_5_25">
trunk/hash/pico.xml
r249939r249940
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
r249939r249940
403403         </dataarea>
404404      </part>
405405   </software>
406
406   
407407</softwarelist>
trunk/hash/psion1.xml
r249939r249940
8989   </software>
9090
9191   <software name="restaur" supported="no">
92      <description>Restaurant Guide</description>
92      <description>Restaurant Guide </description>
9393      <year>198?</year>
9494      <publisher>Psion</publisher>
9595      <part name="cart" interface="psion_pack">
trunk/hash/saturn.xml
r249939r249940
3121431214
3121531215   <!-- Identifying EXHUMED... -->
3121631216   <software name="exhumed" supported="no">
31217      <description>Exhumed (Euro)</description>
31217      <description>Exhumed (Euro) </description>
3121831218      <year>1998</year>
3121931219      <publisher>Sega</publisher>
3122031220      <info name="serial" value="MK81084-50"/>
r249939r249940
3155031550
3155131551   <!-- Identifying Gun Griffon - The Eurasian Conflict v1.00 (1996)(Sega)(PAL)[!]... -->
3155231552   <software name="gungriff" supported="no">
31553      <description>Gungriffon (Euro)</description>
31553      <description>Gungriffon (Euro) </description>
3155431554      <year>1996</year>
3155531555      <publisher>Sega</publisher>
3155631556      <info name="serial" value="MK81046-50"/>
r249939r249940
3194331943
3194431944   <!-- Identifying The Lost World Jurassic Park... -->
3194531945   <software name="lostwrld" supported="no">
31946      <description>The Lost World - Jurassic Park (Euro)</description>
31946      <description>The Lost World - Jurassic Park (Euro) </description>
3194731947      <year>1997</year>
3194831948      <publisher>Sega</publisher>
3194931949      <info name="serial" value="MK81065-50"/>
r249939r249940
3250932509
3251032510   <!-- Identifying nights... -->
3251132511   <software name="nights" supported="no">
32512      <description>NiGHTS - into Dreams... (Euro)</description>
32512      <description>NiGHTS - into Dreams... (Euro) </description>
3251332513      <year>1996</year>
3251432514      <publisher>Sega</publisher>
3251532515      <info name="serial" value="MK81020-50"/>
r249939r249940
3369933699
3370033700   <!-- Identifying Ultimate Mortal Kombat 3 v1.007 (1996)(GT Interactive)(PAL)[!]... -->
3370133701   <software name="umk3" supported="no">
33702      <description>Ultimate Mortal Kombat 3 (Euro)</description>
33702      <description>Ultimate Mortal Kombat 3 (Euro) </description>
3370333703      <year>1996</year>
3370433704      <publisher>GT Interactive</publisher>
3370533705      <info name="serial" value="T-25403H-50?"/>
r249939r249940
3862038620
3862138621   <!-- Identifying vc2alpha... -->
3862238622   <software name="vcop2p" cloneof="vcop2" supported="no">
38623      <description>Virtua Cop 2 (Euro, Prototype 19951020)</description>
38623      <description>Virtua Cop 2 (Euro, Prototype 19951020) </description>
3862438624      <year>1996</year>
3862538625      <publisher>Sega</publisher>
3862638626      <sharedfeat name="compatibility" value="PAL"/>
r249939r249940
3874538745   -->
3874638746   <!-- Identifying ejim2beta... -->
3874738747   <software name="ejim2p" cloneof="ejim2" supported="no">
38748      <description>Earthworm Jim 2 (Prototype 19951229)</description>
38748      <description>Earthworm Jim 2 (Prototype 19951229) </description>
3874938749      <year>1996</year>
3875038750      <publisher>Playmates Interactive</publisher>
3875138751      <part name="cdrom" interface="sat_cdrom">
trunk/hash/sg1000.xml
r249939r249940
12831283      </part>
12841284   </software>
12851285
1286   <software name="herot" cloneof="hero"> <!-- Taiwanese logo version -->
1286   <software name="herot" cloneof="hero">
12871287      <description>Qing Feng Xia (Tw)</description>
12881288      <year>1985?</year>
12891289      <publisher>&lt;unknown&gt;</publisher>
r249939r249940
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>
1309
13101299   <software name="homemj">
13111300      <description>Home Mahjong (Jpn, v1)</description>
13121301      <year>1984</year>
r249939r249940
13581347      </part>
13591348   </software>
13601349
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>
1371
13721350   <software name="hyperspt">
13731351      <description>Hyper Sports (Jpn)</description>
13741352      <year>1985</year>
r249939r249940
20882066      </part>
20892067   </software>
20902068
2091   <software name="motianda" cloneof="rocknbol"> <!-- Taiwanese logo version -->
2069   <software name="motianda" cloneof="rocknbol">
20922070      <description>Mo Tian Da Lou (Tw)</description>
20932071      <year>1985?</year>
20942072      <publisher>Aaronix</publisher>
r249939r249940
21012079      </part>
21022080   </software>
21032081
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>
2114
21152082   <software name="safarihu" supported="no">
21162083      <description>Safari Hunting (Jpn)</description>
21172084      <year>1983</year>
trunk/hash/sms.xml
r249939r249940
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>
133
134
135123   <software name="addfam">
136124      <description>The Addams Family (Euro)</description>
137125      <year>1993</year>
r249939r249940
21032091      </part>
21042092   </software>
21052093
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>
2117
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>
2129
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>
2141
21422094   <software name="excdizzy" supported="no">
21432095      <description>The Excellent Dizzy Collection (Euro, USA, Prototype)</description>
21442096      <year>19??</year>
r249939r249940
23652317   <software name="finalbb" cloneof="bublbobl">
23662318      <description>Final Bubble Bobble (Jpn)</description>
23672319      <year>1988</year>
2368      <publisher>Sega</publisher>
2320      <publisher>Sega </publisher>
23692321      <info name="serial" value="G-1362"/>
23702322      <info name="release" value="19880702"/>
23712323      <info name="alt_title" value="ファイナル バブル ボブル" />
r249939r249940
57295681      </part>
57305682   </software>
57315683
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>
5742
57435684   <software name="smgp">
57445685      <description>Super Monaco GP (Euro, Bra)</description>
57455686      <year>1990</year>
trunk/hash/specpls3_flop.xml
r249939r249940
144144      <!-- SPS (CAPS) release 3557 -->
145145      <description>Butcher Hill</description>
146146      <year>1989</year>
147      <publisher>Gremlin Graphics Software</publisher>
147      <publisher>Gremlin Graphics Software </publisher>
148148
149149      <part name="flop1" interface="floppy_3">
150150         <dataarea name="flop" size="237460">
r249939r249940
339339      <!-- SPS (CAPS) release 3568 -->
340340      <description>Espionage</description>
341341      <year>1988</year>
342      <publisher>Grandslam Entertainments</publisher>
342      <publisher>Grandslam Entertainments </publisher>
343343      <info name="alt_title" value="Espionage - The Computer Game (Box)" />
344344
345345      <part name="flop1" interface="floppy_3">
r249939r249940
417417      <!-- SPS (CAPS) release 3572 -->
418418      <description>Footballer of the Year 2</description>
419419      <year>1989</year>
420      <publisher>Gremlin Graphics Software</publisher>
420      <publisher>Gremlin Graphics Software </publisher>
421421
422422      <part name="flop1" interface="floppy_3">
423423         <dataarea name="flop" size="259471">
r249939r249940
926926      <!-- SPS (CAPS) release 3595 -->
927927      <description>Pac-Land</description>
928928      <year>1989</year>
929      <publisher>Grandslam Entertainments</publisher>
929      <publisher>Grandslam Entertainments </publisher>
930930
931931      <part name="flop1" interface="floppy_3">
932932         <dataarea name="flop" size="114805">
trunk/hash/spectrum_cass.xml
r249939r249940
709709      </part>
710710   </software>
711711
712   <!-- Homebrew released at http://spectralinterlude.com/#download for use on real systems & emulators -->
713   <software name="castlvsi">
714      <description>Castlevania - Spectral Interlude (v1.1, English, 128K)</description>
715      <year>2015</year>
716      <publisher>Rewind</publisher>
717      <part name="cass" interface="spectrum_cass">
718         <dataarea name="cass" size="126394">
719            <rom name="castlevania_si_en_v11.tap" size="126394" crc="c100bb38" sha1="ba89e73dbc16621fc52f886c6b1abb2d6a93ffc7" offset="0"/>
720         </dataarea>
721      </part>
722   </software>
723712
724   <software name="castlvsiru" cloneof="castlvsi">
725      <description>Castlevania - Spectral Interlude (v1.1, Russian, 128K)</description>
726      <year>2015</year>
727      <publisher>Rewind</publisher>
728      <part name="cass" interface="spectrum_cass">
729         <dataarea name="cass" size="127054">
730            <rom name="castlevania_si_ru_v11.tap" size="127054" crc="45561b70" sha1="b44b7e93c8fbf74d23ad694182d99e5a5ec01f98" offset="0"/>
731         </dataarea>
732      </part>
733   </software>
734
735   <software name="castlvsipl" cloneof="castlvsi">
736      <description>Castlevania - Spectral Interlude (v1.1, Polish, 128K)</description>
737      <year>2015</year>
738      <publisher>Rewind</publisher>
739      <part name="cass" interface="spectrum_cass">
740         <dataarea name="cass" size="127378">
741            <rom name="castlevania_si_pl_v11.tap" size="127378" crc="2f11f5bd" sha1="4f4448f6f70eebdf6af81977cac61d0f41b7744f" offset="0"/>
742         </dataarea>
743      </part>
744   </software>
745
746   <software name="castlvsies" cloneof="castlvsi">
747      <description>Castlevania - Spectral Interlude (v1.1, Spanish, 128K)</description>
748      <year>2015</year>
749      <publisher>Rewind</publisher>
750      <part name="cass" interface="spectrum_cass">
751         <dataarea name="cass" size="126950">
752            <rom name="castlevania_si_es_v11.tap" size="126950" crc="27e8ae63" sha1="1dced2991e51854fdf31fe323aa6ee75b25d55a2" offset="0"/>
753         </dataarea>
754      </part>
755   </software>
756
757   <software name="castlvsiit" cloneof="castlvsi">
758      <description>Castlevania - Spectral Interlude (v1.1, Italian, 128K)</description>
759      <year>2015</year>
760      <publisher>Rewind</publisher>
761      <part name="cass" interface="spectrum_cass">
762         <dataarea name="cass" size="127355">
763            <rom name="castlevania_si_it_v11.tap" size="127355" crc="d9a89fc5" sha1="885d3489c94937b0db8a536a1aa6435629942d77" offset="0"/>
764         </dataarea>
765      </part>
766   </software>
767
768   <software name="castlvsi10" cloneof="castlvsi">
769      <description>Castlevania - Spectral Interlude (v1.0, English, 128K)</description>
770      <year>2015</year>
771      <publisher>Rewind</publisher>
772      <part name="cass" interface="spectrum_cass">
773         <dataarea name="cass" size="126410">
774            <rom name="castlevania_si_en_v10.tap" size="126410" crc="0d022bc5" sha1="450dfd57ea7407f47bbfd785d981e4a92e166029" offset="0"/>
775         </dataarea>
776      </part>
777   </software>
778
779   <software name="castlvsiru10" cloneof="castlvsi">
780      <description>Castlevania - Spectral Interlude (v1.0, Russian, 128K)</description>
781      <year>2015</year>
782      <publisher>Rewind</publisher>
783      <part name="cass" interface="spectrum_cass">
784         <dataarea name="cass" size="127066">
785            <rom name="castlevania_si_ru_v10.tap" size="127066" crc="2dceb444" sha1="10ca28195652a9f3f20a48e8e761f0dd138abcf6" offset="0"/>
786         </dataarea>
787      </part>
788   </software>
789
790   <software name="castlvsipl10" cloneof="castlvsi">
791      <description>Castlevania - Spectral Interlude (v1.0, Polish, 128K)</description>
792      <year>2015</year>
793      <publisher>Rewind</publisher>
794      <part name="cass" interface="spectrum_cass">
795         <dataarea name="cass" size="127361">
796            <rom name="castlevania_si_pl_v10.tap" size="127361" crc="e8dc0e6b" sha1="4802a4cef916466ccbf25cabb3f447db17b802bd" offset="0"/>
797         </dataarea>
798      </part>
799   </software>
800
801   <!-- V1.0 doesn't exist in Spanish? or Italian (translations were made after the 1.1 release) -->
802
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>
814
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>
825
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>
836
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>
847713</softwarelist>
848714
849715
trunk/hash/studio2.xml
r249939r249940
159159   </software>
160160
161161   <software name="bjack">
162      <description>TV Casino I: Blackjack</description>
162      <description>TV Casino I: Blackjack </description>
163163      <year>1977</year>
164164      <publisher>RCA</publisher>
165165      <info name="serial" value="18V600" />
trunk/hash/svmu.xml
r249939r249940
208208   </software>
209209
210210   <software name="scvmugp">
211      <description>SoulCalibur VMU Game Pack</description>
211      <description>SoulCalibur VMU Game Pack </description>
212212      <year>1999</year>
213213      <publisher>Namco</publisher>
214214      <info name="source" value="SoulCalibur" />
r249939r249940
257257
258258
259259<!-- Samples from the Katana SDK -->
260</softwarelist>
260</softwarelist>
No newline at end of file
trunk/hash/tandy2k.xml
r249939r249940
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/tvc_cass.xml
r249939r249940
21102110   </software>
21112111
21122112   <software name="sajtvajo">
2113      <description>Sajtvájó</description>
2113      <description>Sajtvájó </description>
21142114      <year>1991</year>
21152115      <publisher>Vindics</publisher>
21162116
trunk/hash/unichamp.xml
r249939r249940
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
4<softwarelist name="unichamp" description="Unisonic Champion 2711 cartridges">
5
6   <software name="pac-02">
7      <description>Professional Poker Games</description>
8      <year>1977</year>
9      <publisher>Unisonic</publisher>
10      <info name="serial" value="PAC-02"/>
11      <part name="cart" interface="unichamp_cart">
12         <dataarea name="rom" size="0x1000">
13            <rom name="pac-02.bin" size="0x1000" crc="fe3213be" sha1="5b9c407fe86865f3454d4be824a7f2bf53478f73" offset="0x0000"/>
14         </dataarea>
15      </part>
16   </software>
17
18   <software name="pac-03">
19      <description>Assorted Family Fun</description>
20      <year>1977</year>
21      <publisher>Unisonic</publisher>
22      <info name="serial" value="PAC-03"/>
23      <part name="cart" interface="unichamp_cart">
24         <dataarea name="rom" size="0x1000">
25            <rom name="pac-03.bin" size="0x1000" crc="f81f04bd" sha1="82e2a0fda1787d5835c457ee5745b0db0cebe079" offset="0x0000"/>
26         </dataarea>
27      </part>
28   </software>
29
30   <software name="pac-04">
31      <description>Family Card Games</description>
32      <year>1977</year>
33      <publisher>Unisonic</publisher>
34      <info name="serial" value="PAC-04"/>
35      <part name="cart" interface="unichamp_cart">
36         <dataarea name="rom" size="0x1000">
37            <rom name="pac-04.bin" size="0x1000" crc="cac09841" sha1="bc9db83f26ed0810938156db6b104b4576754225" offset="0x0000"/>
38         </dataarea>
39      </part>
40   </software>
41
42   <software name="pac-05">
43      <description>Math</description>
44      <year>1977</year>
45      <publisher>Unisonic</publisher>
46      <info name="serial" value="PAC-05"/>
47      <part name="cart" interface="unichamp_cart">
48         <dataarea name="rom" size="0x1000">
49            <rom name="pac-05.bin" size="0x1000" crc="d54a6090" sha1="e85593096f43dcf14b08fd2c9fda277008a8df8b" offset="0x0000"/>
50         </dataarea>
51      </part>
52   </software>
53
54</softwarelist>
trunk/hash/vic1001_cart.xml
r249939r249940
24232423   </software>
24242424
24252425   <software name="progaid">
2426      <description>Programmer's Aid Cartridge</description>
2426      <description>Programmer's Aid Cartridge </description>
24272427      <year>198?</year>
24282428      <publisher>Commodore</publisher>
24292429      <info name="serial" value="VIC-1212" />
trunk/hash/wscolor.xml
r249939r249940
418418
419419   <software name="flashkk">
420420      <!-- WSC -->
421      <description>Flash Koibito-kun</description>
421      <description>Flash Koibito-kun </description>
422422      <year>2000</year>
423423      <publisher>Kobunsha</publisher>
424424      <info name="serial" value="SWJ-KBSC01"/>
trunk/hlsl/vector.fx
r249939r249940
4242VS_OUTPUT vs_main(VS_INPUT Input)
4343{
4444   VS_OUTPUT Output = (VS_OUTPUT)0;
45
45   
4646   Output.Position = float4(Input.Position.xyz, 1.0f);
4747   Output.Position.xy /= ScreenDims;
48   Output.Position.y = 1.0f - Output.Position.y; // flip y
49   Output.Position.xy -= 0.5f; // center
50   Output.Position.xy *= 2.0f; // zoom
51
52   Output.TexCoord = Input.Position.xy / ScreenDims;
53
48   Output.Position.y = 1.0f - Output.Position.y;
49   Output.Position.xy -= 0.5f;
50   Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
5451   Output.Color = Input.Color;
55
52   Output.TexCoord = Input.Position.xy / ScreenDims;
5653   Output.LineInfo = Input.LineInfo;
57
5854   return Output;
5955}
6056
r249939r249940
6864// LengthParams.z: Size at which fade is maximum
6965float4 ps_main(PS_INPUT Input) : COLOR
7066{
71   float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y);
67   float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y) * 1.0;
7268
7369   float lengthModulate = 1.0f - clamp(Input.LineInfo.x / LengthParams.z, 0.0f, 1.0f);
7470   float minLength = 2.0f - clamp(Input.LineInfo.x - 1.0f, 0.0f, 2.0f);
7571   lengthModulate = lerp(lengthModulate, 4.0f, minLength * 0.5f);
76   lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y);
72   lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y) * 1.0;
7773
78   float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f);
74   float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f) * 2.0;
7975   return outColor;
8076}
8177
trunk/scripts/src/bus.lua
r249939r249940
11611161      MAME_DIR .. "src/devices/bus/vcs/compumat.h",
11621162      MAME_DIR .. "src/devices/bus/vcs/dpc.c",
11631163      MAME_DIR .. "src/devices/bus/vcs/dpc.h",
1164      MAME_DIR .. "src/devices/bus/vcs/dpcplus.c",
1165      MAME_DIR .. "src/devices/bus/vcs/dpcplus.h",
11661164      MAME_DIR .. "src/devices/bus/vcs/scharger.c",
11671165      MAME_DIR .. "src/devices/bus/vcs/scharger.h",
11681166   }
r249939r249940
22032201      MAME_DIR .. "src/devices/bus/cpc/ddi1.h",
22042202      MAME_DIR .. "src/devices/bus/cpc/magicsound.c",
22052203      MAME_DIR .. "src/devices/bus/cpc/magicsound.h",
2206      MAME_DIR .. "src/devices/bus/cpc/doubler.c",
2207      MAME_DIR .. "src/devices/bus/cpc/doubler.h",
22082204   }
22092205end
22102206
trunk/scripts/src/osd/sdl.lua
r249939r249940
5555            "SDL.dll",
5656         }
5757      end
58      links {
59         "psapi",
60      }
6158
6259      configuration { "mingw*-gcc" }
6360         linkoptions{
r249939r249940
470467               "SDL.dll",
471468            }
472469         end
473         links {
474            "psapi",
475         }
476470         linkoptions{
477471            "-municode",
478472         }
trunk/scripts/target/mame/arcade.lua
r249939r249940
35463546   MAME_DIR .. "src/mame/drivers/stellafr.c",
35473547   MAME_DIR .. "src/mame/drivers/stuntair.c",
35483548   MAME_DIR .. "src/mame/drivers/su2000.c",
3549   MAME_DIR .. "src/mame/drivers/subhuntr.c",
35503549   MAME_DIR .. "src/mame/drivers/summit.c",
35513550   MAME_DIR .. "src/mame/drivers/sumt8035.c",
35523551   MAME_DIR .. "src/mame/drivers/supercrd.c",
trunk/scripts/target/mame/mess.lua
r249939r249940
849849      "trs",
850850      "ultimachine",
851851      "ultratec",
852      "unisonic",
853852      "unisys",
854853      "veb",
855854      "vidbrain",
r249939r249940
21372136   MAME_DIR .. "src/mame/drivers/megadriv.c",
21382137   MAME_DIR .. "src/mame/drivers/saturn.c",
21392138   MAME_DIR .. "src/mame/drivers/segapico.c",
2140   MAME_DIR .. "src/mame/drivers/sega_sawatte.c",
21412139   MAME_DIR .. "src/mame/drivers/segapm.c",
21422140   MAME_DIR .. "src/mame/drivers/sg1000.c",
21432141   MAME_DIR .. "src/mame/drivers/sms.c",
r249939r249940
24832481   MAME_DIR .. "src/mame/drivers/minicom.c",
24842482}
24852483
2486createMESSProjects(_target, _subtarget, "unisonic")
2487files {
2488   MAME_DIR .. "src/mame/drivers/unichamp.c",
2489   MAME_DIR .. "src/mame/video/gic.c",
2490   MAME_DIR .. "src/mame/video/gic.c",
2491}
2492
2493
24942484createMESSProjects(_target, _subtarget, "unisys")
24952485files {
24962486   MAME_DIR .. "src/mame/drivers/univac.c",
trunk/src/devices/bus/a2bus/a2themill.c
r249939r249940
77    Implementation of the Stellation Two The Mill 6809 card
88
99    The OS9 add-on changes the address mapping as follows:
10    6809 0x0000-0x7fff -> 6502 0x1000-0x8fff
11    6809 0x8000-0xafff -> 6502 0xd000-0xffff
12    6809 0xb000-0xbfff -> 6502 0xc000-0xcfff
13    6809 0xc000-0xcfff -> 6502 0x0000-0x0fff
14    6809 0xd000-0xffff -> 6502 0x9000-0xbfff
10    6809 0x0000-0xafff -> 6502 0x1000-0xbfff
11    6809 0xb000-0xdfff -> 6502 0xd000-0xffff
12    6809 0xe000-0xefff -> 6502 0xc000-0xcfff
13    6809 0xf000-0xffff -> 6502 0x0000-0x0fff
1514
16    (reference: "6809.txt" on one of the disks for The Mill)
15    (reference: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mill.6809 )
1716
1817    ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
1918    the disc and type "-DEMO1" and press Enter to launch the simple demo.
2019
21    TODO: Add DIP switch to select standard and OS-9 modes.
20    The OS9 disk image available around the internet seems to be bad - the
21    6809 boot vector is 0x4144 which maps to 6502 0x5144 and there's all
22    zeros from 6502 1000-8fff.  There is valid 6809 code from 9000-BFFF
23    at the point where it wants to boot the 6809, but I don't know what
24    is supposed to be the entry point.
2225
2326*********************************************************************/
2427
r249939r249940
100103{
101104   m_bEnabled = false;
102105   m_flipAddrSpace = false;
103   m_6809Mode = true;
106   m_6809Mode = false;
104107   m_status = 0xc0;    // OS9 loader relies on this
105108   m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
106109   m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
r249939r249940
235238
236239READ8_MEMBER( a2bus_themill_device::dma_r )
237240{
238   // MAME startup ordering has the 6809 free-running at boot, which is undesirable
239   if (!m_bEnabled)
240   {
241      m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
242   }
243
244241   if (m_6809Mode)
245242   {
246      if (offset <= 0x7fff)
243      if (offset <= 0xafff)
247244      {
248245         return slot_dma_read(space, offset+0x1000);
249246      }
250      else if (offset <= 0xafff)
247      else if (offset <= 0xbfff)
251248      {
252         return slot_dma_read(space, (offset&0x3fff) + 0xd000);
249         return slot_dma_read(space, (offset&0xfff) + 0xd000);
253250      }
254      else if (offset <= 0xbfff)
251      else if (offset <= 0xcfff)
255252      {
256         return slot_dma_read(space, (offset&0xfff) + 0xc000);
253         return slot_dma_read(space, (offset&0xfff) + 0xe000);
257254      }
258      else if (offset <= 0xcfff)  // 6809 Cxxx -> 6502 ZP
255      else if (offset <= 0xdfff)
259256      {
260         return slot_dma_read(space, (offset&0xfff));
257         return slot_dma_read(space, (offset&0xfff) + 0xf000);
261258      }
262      else    // 6809 Dxxx -> 6502 9000
259      else if (offset <= 0xefff)
263260      {
264         return slot_dma_read(space, (offset-0xd000)+0x9000);
261         return slot_dma_read(space, (offset&0xfff) + 0xc000);
265262      }
263      else    // 6809 Fxxx -> 6502 ZP
264      {
265         return slot_dma_read(space, offset&0xfff);
266      }
266267   }
267268   else
268269   {
r249939r249940
288289{
289290   if (m_6809Mode)
290291   {
291      if (offset <= 0x7fff)
292      if (offset <= 0xafff)
292293      {
293294         slot_dma_write(space, offset+0x1000, data);
294295      }
295      else if (offset <= 0xafff)
296      {
297         slot_dma_write(space, (offset&0x3fff) + 0xd000, data);
298      }
299296      else if (offset <= 0xbfff)
300297      {
301         slot_dma_write(space, (offset&0xfff) + 0xc000, data);
298         slot_dma_write(space, (offset&0xfff) + 0xd000, data);
302299      }
303300      else if (offset <= 0xcfff)
304301      {
305         slot_dma_write(space, (offset&0xfff), data);
302         slot_dma_write(space, (offset&0xfff) + 0xe000, data);
306303      }
307      else    // 6809 Dxxx -> 6502 9000
304      else if (offset <= 0xdfff)
308305      {
309         slot_dma_write(space, (offset-0xd000)+0x9000, data);
306         slot_dma_write(space, (offset&0xfff) + 0xf000, data);
310307      }
308      else if (offset <= 0xefff)
309      {
310         slot_dma_write(space, (offset&0xfff) + 0xc000, data);
311      }
312      else    // 6809 Fxxx -> 6502 ZP
313      {
314         slot_dma_write(space, offset&0xfff, data);
315      }
311316   }
312317   else
313318   {
trunk/src/devices/bus/cpc/ddi1.h
r249939r249940
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
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:Barry Rodewald
3/*
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
5 *                intended for use in duplicating cassette software
6 *
7 */
8
9   #include "doubler.h"
10   #include "includes/amstrad.h"
11
12   //**************************************************************************
13//  DEVICE DEFINITIONS
14//**************************************************************************
15
16const device_type CPC_DOUBLER = &device_creator<cpc_doubler_device>;
17
18
19static MACHINE_CONFIG_FRAGMENT( cpc_doubler )
20   MCFG_CASSETTE_ADD( "doubler_tape" )
21   MCFG_CASSETTE_FORMATS(cdt_cassette_formats)
22   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED)
23   MCFG_CASSETTE_INTERFACE("cpc_cass")
24
25   // no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not
26MACHINE_CONFIG_END
27
28
29machine_config_constructor cpc_doubler_device::device_mconfig_additions() const
30{
31   return MACHINE_CONFIG_NAME( cpc_doubler );
32}
33
34
35//**************************************************************************
36//  LIVE DEVICE
37//**************************************************************************
38
39cpc_doubler_device::cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
40   device_t(mconfig, CPC_DOUBLER, "Draysoft Doubler", tag, owner, clock, "cpc_doubler", __FILE__),
41   device_cpc_expansion_card_interface(mconfig, *this),
42   m_tape(*this,"doubler_tape")
43{
44}
45
46//-------------------------------------------------
47//  device_start - device-specific startup
48//-------------------------------------------------
49
50void cpc_doubler_device::device_start()
51{
52   device_t* cpu = machine().device("maincpu");
53   address_space& space = cpu->memory().space(AS_IO);
54   m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner());
55
56   space.install_read_handler(0xf0e0,0xf0e0,0,0,read8_delegate(FUNC(cpc_doubler_device::ext_tape_r),this));
57}
58
59//-------------------------------------------------
60//  device_reset - device-specific reset
61//-------------------------------------------------
62
63void cpc_doubler_device::device_reset()
64{
65   // TODO
66}
67
68READ8_MEMBER(cpc_doubler_device::ext_tape_r)
69{
70   UINT8 data = 0;
71   if(m_tape->input() > 0.03)
72      data |= 0x20;
73   return data;
74}
trunk/src/devices/bus/cpc/doubler.h
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:Barry Rodewald
3/*
4 * doubler.c  --  Draysoft Doubler - external cassette interface for the 464 (works on 664/6128 with external cassette?),
5 *                intended for use in duplicating cassette software
6 *
7 * Uses only port F0E0 (may conflict with other peripherals, PPI port A is not usable while Doubler software is running)
8 *
9 */
10
11#ifndef DOUBLER_H_
12#define DOUBLER_H_
13
14#include "emu.h"
15#include "cpcexp.h"
16#include "imagedev/cassette.h"
17#include "formats/tzx_cas.h"
18
19class cpc_doubler_device  : public device_t,
20                  public device_cpc_expansion_card_interface
21{
22public:
23   // construction/destruction
24   cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
25
26   // optional information overrides
27   virtual machine_config_constructor device_mconfig_additions() const;
28
29   DECLARE_READ8_MEMBER(ext_tape_r);
30
31protected:
32   // device-level overrides
33   virtual void device_start();
34   virtual void device_reset();
35
36private:
37   cpc_expansion_slot_device *m_slot;
38
39   required_device<cassette_image_device> m_tape;
40};
41
42// device type definition
43extern const device_type CPC_DOUBLER;
44
45#endif /* DOUBLER_H_ */
trunk/src/devices/bus/isa/omti8621.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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/bus/vcs/dpcplus.c
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:
3/***************************************************************************
4
5Atari 2600 cart with DPC+
6
7the DPC+ adds an ARM CPU amongst other things (display improvements, etc.)
8
9map (according to a blogpost on atariage):
10   NOTE: All banks are accessible via $F000
11
12   * ARM RAM mapped at $40000000 in this area
13   $0000-$0BFF: DPC+ driver (not accessible by 2600 itself)
14   $0C00-$1BFF: Bank 0
15   $1C00-$2BFF: Bank 1
16   $2C00-$3BFF: Bank 2
17   $3C00-$4BFF: Bank 3
18   $4C00-$5BFF: Bank 4
19   $5C00-$6BFF: Bank 5
20   * ARM RAM mapped at $40000C00 in this area
21   $6C00-$7BFF: Display Data (indirect access)
22   * ARM RAM mapped at $40001C00 in this area
23   $7C00-$7FFF: Frequency Data (not accessible by 2600 itself)
24
25***************************************************************************/
26
27
28#include "emu.h"
29#include "dpcplus.h"
30
31
32
33
34
35// cart device
36
37const device_type A26_ROM_DPCPLUS = &device_creator<a26_rom_dpcplus_device>;
38
39
40a26_rom_dpcplus_device::a26_rom_dpcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
41                  : a26_rom_f8_device(mconfig, A26_ROM_DPCPLUS, "Atari 2600 ROM Cart DPC+", tag, owner, clock, "a2600_dpcplus", __FILE__)
42{
43}
44
45//-------------------------------------------------
46//  mapper specific start/reset
47//-------------------------------------------------
48
49void a26_rom_dpcplus_device::device_start()
50{
51   save_item(NAME(m_base_bank));
52}
53
54void a26_rom_dpcplus_device::device_reset()
55{
56   m_base_bank = 0;
57}
58
59static ADDRESS_MAP_START( dpcplus_arm7_map, AS_PROGRAM, 32, a26_rom_dpcplus_device )
60   // todo: implement all this correctly
61   //AM_RANGE(0x00000000, 0x00007fff) AM_ROM // flash, 32k
62   AM_RANGE(0x40000000, 0x40001fff) AM_RAM // sram, 8k
63ADDRESS_MAP_END
64
65static MACHINE_CONFIG_FRAGMENT( a26_dpcplus )
66   MCFG_CPU_ADD("arm", ARM7, 70000000)    // correct type?
67   MCFG_CPU_PROGRAM_MAP(dpcplus_arm7_map)
68MACHINE_CONFIG_END
69
70machine_config_constructor a26_rom_dpcplus_device::device_mconfig_additions() const
71{
72   return MACHINE_CONFIG_NAME( a26_dpcplus );
73}
74
75
76READ8_MEMBER(a26_rom_dpcplus_device::read_rom)
77{
78   return a26_rom_f8_device::read_rom(space, offset);
79}
80
81WRITE8_MEMBER(a26_rom_dpcplus_device::write_bank)
82{
83   a26_rom_f8_device::write_bank(space, offset, data);
84}
trunk/src/devices/bus/vcs/dpcplus.h
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:
3#ifndef __VCS_DPCPLUS_H
4#define __VCS_DPCPLUS_H
5
6#include "rom.h"
7#include "cpu/arm7/arm7.h"
8
9
10// ======================> a26_rom_dpcplus_device
11
12class a26_rom_dpcplus_device : public a26_rom_f8_device
13{
14public:
15   // construction/destruction
16   a26_rom_dpcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
17
18   // device-level overrides
19   virtual void device_start();
20   virtual machine_config_constructor device_mconfig_additions() const;
21   virtual void device_reset();
22
23   // reading and writing
24   virtual DECLARE_READ8_MEMBER(read_rom);
25   virtual DECLARE_WRITE8_MEMBER(write_bank);
26
27
28protected:
29};
30
31
32// device type definition
33extern const device_type A26_ROM_DPCPLUS;
34
35#endif
trunk/src/devices/bus/vcs/vcs_slot.c
r249939r249940
157157   { A26_8IN1, "a26_8in1" },
158158   { A26_32IN1, "a26_32in1" },
159159   { A26_X07, "a26_x07" },
160   { A26_DPCPLUS, "a26_dpcplus" },
161160};
162161
163162static int vcs_get_pcb_id(const char *slot)
trunk/src/devices/bus/vcs/vcs_slot.h
r249939r249940
3535   A26_DPC,
3636   A26_SS,
3737   A26_CM,
38   A26_X07,
39   A26_DPCPLUS,
38   A26_X07
4039};
4140
4241
trunk/src/devices/cpu/avr8/avr8.c
r249939r249940
752752   m_io = &space(AS_IO);
753753
754754   // register our state for the debugger
755   std::string tempstr;
755756   state_add(STATE_GENPC,     "GENPC",     m_shifted_pc).noshow();
756757   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow();
757758   state_add(AVR8_SREG,       "STATUS",    m_r[AVR8_REGIDX_SREG]).mask(0xff);
trunk/src/devices/cpu/dsp56k/pmove.h
r249939r249940
315315   {
316316      INT8 b;
317317      reg_id SD;
318      std::string args;
319
318320      b = (char)(word0 & 0x00ff);
319321      decode_HHH_table(BITSn(word1,0x0e00), SD);
320322      assemble_reg_from_W_table(BITSn(word1,0x0100), 'X', SD, b, m_source, m_destination);
trunk/src/devices/cpu/e132xs/e132xs.c
r249939r249940
15621562   m_clock_scale_mask = scale_mask;
15631563
15641564   // register our state for the debugger
1565   std::string tempstr;
15651566   state_add(STATE_GENPC,    "GENPC",     m_global_regs[0]).noshow();
15661567   state_add(STATE_GENFLAGS, "GENFLAGS",  m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow();
15671568   state_add(E132XS_PC,      "PC", m_global_regs[0]).mask(0xffffffff);
trunk/src/devices/cpu/esrip/esrip.c
r249939r249940
193193   m_direct = &m_program->direct();
194194
195195   // register our state for the debugger
196   std::string tempstr;
196197   state_add(STATE_GENPC,     "GENPC",     m_rip_pc).noshow();
197198   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_status).callimport().callexport().formatstr("%8s").noshow();
198199   state_add(ESRIP_PC,        "PC:",       m_rip_pc).mask(0xffff);
trunk/src/devices/cpu/i86/i86.c
r249939r249940
11491149
11501150// 8086 'invalid opcodes', as documented at http://www.os2museum.com/wp/?p=2147 and tested on real hardware
11511151// - 0x60 - 0x6f are aliases to 0x70 - 0x7f.
1152// - 0xc0, 0xc1, 0xc8, 0xc9 are also aliases where the CPU ignores BIT 1 (*).
1152// - 0xc0, 0xc1, 0xc8, 0xc9 are also aliases where the CPU ignores BIT 1 (*).
11531153// - 0xf1 is an alias to 0xf0.
11541154//
11551155//      Instructions are used in the boot sector for some versions of
r249939r249940
20182018
20192019
20202020      case 0xf0: // i_lock
2021      case 0xf1: // 0xf1 is 0xf0; verified on real CPU
2021      case 0xf1: // 0xf1 is 0xf0; verified on custom hardware
20222022         logerror("%s: %06x: Warning - BUSLOCK\n", tag(), pc());
20232023         m_lock = true;
20242024         m_no_interrupt = 1;
trunk/src/devices/cpu/m6805/m6805.c
r249939r249940
424424   m_icountptr = &m_icount;
425425
426426   // register our state for the debugger
427   std::string tempstr;
427428   state_add(STATE_GENPC,     "GENPC",     m_pc.w.l).noshow();
428429   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_cc).callimport().callexport().formatstr("%8s").noshow();
429430   state_add(M6805_A,         "A",         m_a).mask(0xff);
trunk/src/devices/cpu/mips/mips3.h
r249939r249940
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/cpu/ssem/ssem.c
r249939r249940
100100   m_program = &space(AS_PROGRAM);
101101
102102   // register our state for the debugger
103   std::string tempstr;
103104   state_add(STATE_GENPC,     "GENPC",     m_pc).noshow();
104105   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_halt).callimport().callexport().formatstr("%1s").noshow();
105106   state_add(SSEM_PC,         "PC",        m_shifted_pc).mask(0xffff);
trunk/src/devices/cpu/upd7725/upd7725.c
r249939r249940
6969   m_direct = &m_program->direct();
7070
7171   // register our state for the debugger
72   std::string tempstr;
7273   state_add(STATE_GENPC, "GENPC", regs.pc).noshow();
7374   state_add(UPD7725_PC, "PC", regs.pc);
7475   state_add(UPD7725_RP, "RP", regs.rp);
trunk/src/devices/cpu/z80/z80.c
r249939r249940
473473{
474474   unsigned pc = PCD;
475475   PC++;
476   UINT8 res = m_decrypted_opcodes_direct->read_byte(pc);
477   m_icount -= 2;
478   m_refresh_cb((m_i << 8) | (m_r2 & 0x80) | ((m_r-1) & 0x7f));
479   m_icount += 2;
480   return res;
476   return m_decrypted_opcodes_direct->read_byte(pc);
481477}
482478
483479/****************************************************************
r249939r249940
31453141   else
31463142      irq_vector = m_irq_callback(*this, 0);
31473143
3148   /* Say hi */
3149   m_irqack_cb(true);
3150
31513144   LOG(("Z80 '%s' single int. irq_vector $%02x\n", tag(), irq_vector));
31523145
31533146   /* Interrupt mode 2. Call [i:databyte] */
r249939r249940
34363429   m_cc_xy = cc_xy;
34373430   m_cc_xycb = cc_xycb;
34383431   m_cc_ex = cc_ex;
3439
3440   m_irqack_cb.resolve_safe();
3441   m_refresh_cb.resolve_safe();
34423432}
34433433
34443434void nsc800_device::device_start()
r249939r249940
37153705   cpu_device(mconfig, Z80, "Z80", tag, owner, clock, "z80", __FILE__),
37163706   m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0),
37173707   m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0),
3718   m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0),
3719   m_irqack_cb(*this),
3720   m_refresh_cb(*this)
3708   m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0)
37213709{
37223710}
37233711
r249939r249940
37253713   cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
37263714   m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0),
37273715   m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0),
3728   m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0),
3729   m_irqack_cb(*this),
3730   m_refresh_cb(*this)
3716   m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0)
37313717{
37323718}
37333719
trunk/src/devices/cpu/z80/z80.h
r249939r249940
77
88#include "z80daisy.h"
99
10#define MCFG_Z80_SET_IRQACK_CALLBACK(_devcb) \
11   devcb = &z80_device::set_irqack_cb(*device, DEVCB_##_devcb);
12
13#define MCFG_Z80_SET_REFRESH_CALLBACK(_devcb) \
14   devcb = &z80_device::set_refresh_cb(*device, DEVCB_##_devcb);
15
1610enum
1711{
1812   NSC800_RSTA = INPUT_LINE_IRQ0 + 1,
r249939r249940
4438   DECLARE_WRITE_LINE_MEMBER( irq_line );
4539
4640   void z80_set_cycle_tables(const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex);
47   template<class _Object> static devcb_base &set_irqack_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_irqack_cb.set_callback(object); }
48   template<class _Object> static devcb_base &set_refresh_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_refresh_cb.set_callback(object); }
4941
5042protected:
5143   z80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
r249939r249940
248240   address_space *m_io;
249241   direct_read_data *m_direct;
250242   direct_read_data *m_decrypted_opcodes_direct;
251   devcb_write_line m_irqack_cb;
252   devcb_write16 m_refresh_cb;
253243
254244   PAIR            m_prvpc;
255245   PAIR            m_pc;
trunk/src/devices/imagedev/floppy.c
r249939r249940
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;
r249939r249940
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);
r249939r249940
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
r249939r249940
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;
r249939r249940
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/atahle.c
r249939r249940
470470   if ((multi_word_dma_mode() >= 0) || (ultra_dma_mode() >= 0))
471471      set_dmarq(CLEAR_LINE);
472472
473   if (ultra_dma_mode() >= 0) {
474      m_buffer_empty_timer->enable(true);
475      m_buffer_empty_timer->adjust(attotime::zero);
476   }
477   else
478      fill_buffer();
473   m_buffer_empty_timer->enable(true);
474   m_buffer_empty_timer->adjust(attotime::zero);
479475}
480476
481477void ata_hle_device::write_buffer_full()
trunk/src/devices/machine/r10696.c
r249939r249940
154154      io_a = m_iord(0);
155155      io_b = m_iord(1);
156156      io_c = m_iord(2);
157      data = (io_a | io_b | io_c) & 0x0f;
157      data = (io_a | io_b | io_a) & 0x0f;
158158      break;
159159   case 0x01: // Read Groups B | C
160160      io_b = m_iord(1);
trunk/src/devices/machine/z80scc.c
r249939r249940
7373#include "z80scc.h"
7474
7575//**************************************************************************
76//  MACROS / CONSTANTS
76//   MACROS / CONSTANTS
7777//**************************************************************************
7878
7979#define VERBOSE 0
r249939r249940
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>;
r249939r249940
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)
r249939r249940
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)
r249939r249940
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()
r249939r249940
252252
253253
254254//-------------------------------------------------
255//  device_reset - device-specific reset
255//   device_reset - device-specific reset
256256//-------------------------------------------------
257257
258258void z80scc_device::device_reset()
r249939r249940
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()
r249939r249940
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++)
r249939r249940
300300
301301
302302//-------------------------------------------------
303//  z80daisy_irq_ack - interrupt acknowledge
303//   z80daisy_irq_ack - interrupt acknowledge
304304//-------------------------------------------------
305305
306306int z80scc_device::z80daisy_irq_ack()
r249939r249940
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()
r249939r249940
360360
361361
362362//-------------------------------------------------
363//  check_interrupts -
363//   check_interrupts -
364364//-------------------------------------------------
365365
366366void z80scc_device::check_interrupts()
r249939r249940
372372
373373
374374//-------------------------------------------------
375//  reset_interrupts -
375//   reset_interrupts -
376376//-------------------------------------------------
377377
378378void z80scc_device::reset_interrupts()
r249939r249940
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   }
r249939r249940
420420
421421
422422//-------------------------------------------------
423//  trigger_interrupt -
423//   trigger_interrupt -
424424//-------------------------------------------------
425425void z80scc_device::trigger_interrupt(int index, int state)
426426{
r249939r249940
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:
r249939r249940
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?
r249939r249940
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()
r249939r249940
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{
r249939r249940
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
r249939r249940
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 )
r249939r249940
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 )
r249939r249940
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)
r249939r249940
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)
r249939r249940
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;
r249939r249940
655655
656656
657657//-------------------------------------------------
658//  start - channel startup
658//   start - channel startup
659659//-------------------------------------------------
660660
661661void z80scc_channel::device_start()
r249939r249940
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));
r249939r249940
725725
726726
727727//-------------------------------------------------
728//  reset - reset channel status
728//   reset - reset channel status
729729//-------------------------------------------------
730730
731731void z80scc_channel::device_reset()
r249939r249940
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
r249939r249940
786786
787787
788788//-------------------------------------------------
789//  tra_callback -
789//   tra_callback -
790790//-------------------------------------------------
791791
792792void z80scc_channel::tra_callback()
r249939r249940
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)
r249939r249940
829829
830830
831831//-------------------------------------------------
832//  tra_complete -
832//   tra_complete -
833833//-------------------------------------------------
834834
835835void z80scc_channel::tra_complete()
r249939r249940
880880
881881
882882//-------------------------------------------------
883//  rcv_callback -
883//   rcv_callback -
884884//-------------------------------------------------
885885
886886void z80scc_channel::rcv_callback()
r249939r249940
900900
901901
902902//-------------------------------------------------
903//  rcv_complete -
903//   rcv_complete -
904904//-------------------------------------------------
905905
906906void z80scc_channel::rcv_complete()
r249939r249940
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()
r249939r249940
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;
r249939r249940
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
r249939r249940
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()
r249939r249940
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()
r249939r249940
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;
r249939r249940
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()
r249939r249940
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;
r249939r249940
12311231}
12321232
12331233//-------------------------------------------------
1234//  control_read - read control register
1234//   control_read - read control register
12351235//-------------------------------------------------
12361236UINT8 z80scc_channel::control_read()
12371237{
r249939r249940
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
r249939r249940
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);
r249939r249940
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   {
r249939r249940
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;
r249939r249940
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;
r249939r249940
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
r249939r249940
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;
r249939r249940
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;
r249939r249940
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
r249939r249940
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;
r249939r249940
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{
r249939r249940
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/*
r249939r249940
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
r249939r249940
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)
r249939r249940
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();
r249939r249940
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);
r249939r249940
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()
r249939r249940
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      {
r249939r249940
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{
r249939r249940
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)
r249939r249940
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 )
r249939r249940
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 )
r249939r249940
20902090
20912091
20922092//-------------------------------------------------
2093//  ri_w - ring indicator handler
2093//   ri_w - ring indicator handler
20942094//-------------------------------------------------
20952095
20962096WRITE_LINE_MEMBER( z80scc_channel::ri_w )
r249939r249940
21222122}
21232123
21242124//-------------------------------------------------
2125//  sync_w - sync handler
2125//   sync_w - sync handler
21262126//-------------------------------------------------
21272127WRITE_LINE_MEMBER( z80scc_channel::sync_w )
21282128{
r249939r249940
21302130}
21312131
21322132//-------------------------------------------------
2133//  rxc_w - receive clock
2133//   rxc_w - receive clock
21342134//-------------------------------------------------
21352135WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
21362136{
r249939r249940
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{
r249939r249940
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;
r249939r249940
21752175}
21762176
21772177//-------------------------------------------------
2178//  update_serial -
2178//   update_serial -
21792179//-------------------------------------------------
21802180void z80scc_channel::update_serial()
21812181{
r249939r249940
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{
r249939r249940
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
r249939r249940
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               _____   _____                          _____   _____
r249939r249940
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) \
r249939r249940
101101
102102
103103//**************************************************************************
104//  TYPE DEFINITIONS
104//   TYPE DEFINITIONS
105105//**************************************************************************
106106
107107// ======================> z80scc_channel
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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();
r249939r249940
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
r249939r249940
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,
r249939r249940
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   {
r249939r249940
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
r249939r249940
5050#include "z80sio.h"
5151
5252//**************************************************************************
53//  MACROS / CONSTANTS
53//   MACROS / CONSTANTS
5454//**************************************************************************
5555
5656#define VERBOSE 0
r249939r249940
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
r249939r249940
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 )
r249939r249940
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)
r249939r249940
164164}
165165
166166//-------------------------------------------------
167//  device_start - device-specific startup
167//   device_start - device-specific startup
168168//-------------------------------------------------
169169void z80sio_device::device_start()
170170{
r249939r249940
200200
201201
202202//-------------------------------------------------
203//  device_reset - device-specific reset
203//   device_reset - device-specific reset
204204//-------------------------------------------------
205205void z80sio_device::device_reset()
206206{
r249939r249940
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{
r249939r249940
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++)
r249939r249940
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{
r249939r249940
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{
r249939r249940
300300
301301
302302//-------------------------------------------------
303//  check_interrupts -
303//   check_interrupts -
304304//-------------------------------------------------
305305void z80sio_device::check_interrupts()
306306{
r249939r249940
311311
312312
313313//-------------------------------------------------
314//  reset_interrupts -
314//   reset_interrupts -
315315//-------------------------------------------------
316316void z80sio_device::reset_interrupts()
317317{
r249939r249940
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{
r249939r249940
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
r249939r249940
398398
399399
400400//-------------------------------------------------
401//  m1_r - interrupt acknowledge
401//   m1_r - interrupt acknowledge
402402//-------------------------------------------------
403403int z80sio_device::m1_r()
404404{
r249939r249940
408408
409409
410410//-------------------------------------------------
411//  cd_ba_r -
411//   cd_ba_r -
412412//-------------------------------------------------
413413READ8_MEMBER( z80sio_device::cd_ba_r )
414414{
r249939r249940
423423
424424
425425//-------------------------------------------------
426//  cd_ba_w -
426//   cd_ba_w -
427427//-------------------------------------------------
428428WRITE8_MEMBER( z80sio_device::cd_ba_w )
429429{
r249939r249940
441441
442442
443443//-------------------------------------------------
444//  ba_cd_r -
444//   ba_cd_r -
445445//-------------------------------------------------
446446READ8_MEMBER( z80sio_device::ba_cd_r )
447447{
r249939r249940
456456
457457
458458//-------------------------------------------------
459//  ba_cd_w -
459//   ba_cd_w -
460460//-------------------------------------------------
461461WRITE8_MEMBER( z80sio_device::ba_cd_w )
462462{
r249939r249940
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__),
r249939r249940
512512
513513
514514//-------------------------------------------------
515//  start - channel startup
515//   start - channel startup
516516//-------------------------------------------------
517517void z80sio_channel::device_start()
518518{
r249939r249940
555555
556556
557557//-------------------------------------------------
558//  reset - reset channel status
558//   reset - reset channel status
559559//-------------------------------------------------
560560void z80sio_channel::device_reset()
561561{
r249939r249940
590590}
591591
592592//-------------------------------------------------
593//  tra_callback -
593//   tra_callback -
594594//-------------------------------------------------
595595void z80sio_channel::tra_callback()
596596{
r249939r249940
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)
r249939r249940
632632
633633
634634//-------------------------------------------------
635//  tra_complete -
635//   tra_complete -
636636//-------------------------------------------------
637637void z80sio_channel::tra_complete()
638638{
r249939r249940
683683
684684
685685//-------------------------------------------------
686//  rcv_callback -
686//   rcv_callback -
687687//-------------------------------------------------
688688void z80sio_channel::rcv_callback()
689689{
r249939r249940
703703
704704
705705//-------------------------------------------------
706//  rcv_complete -
706//   rcv_complete -
707707//-------------------------------------------------
708708void z80sio_channel::rcv_complete()
709709{
r249939r249940
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()
r249939r249940
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;
r249939r249940
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   {
r249939r249940
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()
r249939r249940
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()
r249939r249940
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;
r249939r249940
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()
r249939r249940
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;
r249939r249940
869869
870870
871871//-------------------------------------------------
872//  control_read - read control register
872//   control_read - read control register
873873//-------------------------------------------------
874874
875875UINT8 z80sio_channel::control_read()
r249939r249940
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);
r249939r249940
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:
r249939r249940
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}
r249939r249940
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;
r249939r249940
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   }
r249939r249940
10891089
10901090
10911091//-------------------------------------------------
1092//  data_read - read data register
1092//   data_read - read data register
10931093//-------------------------------------------------
10941094UINT8 z80sio_channel::data_read()
10951095{
r249939r249940
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 
11201121
1121
11221122//-------------------------------------------------
1123//  data_write - write data register
1123//   data_write - write data register
11241124//-------------------------------------------------
11251125void z80sio_channel::data_write(UINT8 data)
11261126{
r249939r249940
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
r249939r249940
11491149
11501150
11511151//-------------------------------------------------
1152//  receive_data - receive data word
1152//   receive_data - receive data word
11531153//-------------------------------------------------
11541154void z80sio_channel::receive_data(UINT8 data)
11551155{
r249939r249940
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
r249939r249940
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   {
r249939r249940
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 )
r249939r249940
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 )
r249939r249940
12871287
12881288
12891289//-------------------------------------------------
1290//  sh_w - Sync Hunt handler
1290//   sh_w - Sync Hunt handler
12911291//-------------------------------------------------
12921292
12931293WRITE_LINE_MEMBER( z80sio_channel::sync_w )
r249939r249940
13201320
13211321
13221322//-------------------------------------------------
1323//  rxc_w - receive clock
1323//   rxc_w - receive clock
13241324//-------------------------------------------------
13251325
13261326WRITE_LINE_MEMBER( z80sio_channel::rxc_w )
r249939r249940
13421342
13431343
13441344//-------------------------------------------------
1345//  txc_w - transmit clock
1345//   txc_w - transmit clock
13461346//-------------------------------------------------
13471347
13481348WRITE_LINE_MEMBER( z80sio_channel::txc_w )
r249939r249940
13641364
13651365
13661366//-------------------------------------------------
1367//  update_serial -
1367//   update_serial -
13681368//-------------------------------------------------
13691369void z80sio_channel::update_serial()
13701370{
r249939r249940
14021402
14031403
14041404//-------------------------------------------------
1405//  set_dtr -
1405//   set_dtr -
14061406//-------------------------------------------------
14071407
14081408void z80sio_channel::set_dtr(int state)
r249939r249940
14171417}
14181418
14191419//-------------------------------------------------
1420//  write_rx -
1420//   write_rx -
14211421//-------------------------------------------------
14221422
14231423WRITE_LINE_MEMBER(z80sio_channel::write_rx)
trunk/src/devices/machine/z80sio.h
r249939r249940
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) \
r249939r249940
116116
117117
118118//**************************************************************************
119//  TYPE DEFINITIONS
119//   TYPE DEFINITIONS
120120//**************************************************************************
121121
122122// ======================> z80sio_channel
r249939r249940
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);
r249939r249940
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
r249939r249940
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
r249939r249940
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();
r249939r249940
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;
r249939r249940
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); }
r249939r249940
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/mc6845.c
r249939r249940
536536         if ( m_screen != NULL )
537537            m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh);
538538
539         if(!m_reconfigure_cb.isnull())
540            m_reconfigure_cb(horiz_pix_total, vert_pix_total, visarea, refresh);
541
542539         m_has_valid_parameters = true;
543540      }
544541      else
r249939r249940
552549      m_hsync_off_pos = hsync_off_pos;
553550      m_vsync_on_pos = vsync_on_pos;
554551      m_vsync_off_pos = vsync_off_pos;
555      m_line_counter = 0;
556552   }
557553}
558554
r249939r249940
671667      if ( m_line_counter == m_vert_disp )
672668      {
673669         m_line_enable_ff = false;
674         m_current_disp_addr = m_disp_start_addr;
675670      }
676671
677672      /* Check if VSYNC should be enabled */
r249939r249940
10101005   m_out_vsync_cb.resolve_safe();
10111006
10121007   /* bind delegates */
1013   m_reconfigure_cb.bind_relative_to(*owner());
10141008   m_begin_update_cb.bind_relative_to(*owner());
10151009   m_update_row_cb.bind_relative_to(*owner());
10161010   m_end_update_cb.bind_relative_to(*owner());
trunk/src/devices/video/mc6845.h
r249939r249940
3939#define MCFG_MC6845_CHAR_WIDTH(_pixels) \
4040   mc6845_device::set_char_width(*device, _pixels);
4141
42#define MCFG_MC6845_RECONFIGURE_CB(_class, _method) \
43   mc6845_device::set_reconfigure_callback(*device, mc6845_reconfigure_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
44
4542#define MCFG_MC6845_BEGIN_UPDATE_CB(_class, _method) \
4643   mc6845_device::set_begin_update_callback(*device, mc6845_begin_update_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
4744
r249939r249940
6865
6966
7067/* callback definitions */
71typedef device_delegate<void (int width, int height, const rectangle &visarea, attoseconds_t frame_period)> mc6845_reconfigure_delegate;
72#define MC6845_RECONFIGURE(name)  void name(int width, int height, const rectangle &visarea, attoseconds_t frame_period)
73
7468typedef device_delegate<void (bitmap_rgb32 &bitmap, const rectangle &cliprect)> mc6845_begin_update_delegate;
7569#define MC6845_BEGIN_UPDATE(name)  void name(bitmap_rgb32 &bitmap, const rectangle &cliprect)
7670
r249939r249940
116110   }
117111   static void set_char_width(device_t &device, int pixels) { downcast<mc6845_device &>(device).m_hpixels_per_column = pixels; }
118112
119   static void set_reconfigure_callback(device_t &device, mc6845_reconfigure_delegate callback) { downcast<mc6845_device &>(device).m_reconfigure_cb = callback; }
120113   static void set_begin_update_callback(device_t &device, mc6845_begin_update_delegate callback) { downcast<mc6845_device &>(device).m_begin_update_cb = callback; }
121114   static void set_update_row_callback(device_t &device, mc6845_update_row_delegate callback) { downcast<mc6845_device &>(device).m_update_row_cb = callback; }
122115   static void set_end_update_callback(device_t &device, mc6845_end_update_delegate callback) { downcast<mc6845_device &>(device).m_end_update_cb = callback; }
r249939r249940
293286
294287   int m_hpixels_per_column;       /* number of pixels per video memory address */
295288
296   mc6845_reconfigure_delegate m_reconfigure_cb;
297
298289   /* if specified, this gets called before any pixel update,
299290    optionally return a pointer that will be passed to the
300291    update and tear down callbacks */
trunk/src/devices/video/poly.h
r249939r249940
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
r249939r249940
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
r249939r249940
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);
12831287
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;
1288            ++clip_verts;
12891289      }
12901290      if (v1_side > 0)                // current point is inside
12911291      {
r249939r249940
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/diimage.c
r249939r249940
758758{
759759   std::string locationtag, breakstr("%");
760760   const rom_entry *region;
761   std::string regiontag;
761762   bool retVal = FALSE;
762763   int warningcount = 0;
763764   for (region = start; region != NULL; region = rom_next_region(region))
trunk/src/emu/dipty.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
112112   // vector options
113113   { NULL,                                              NULL,        OPTION_HEADER,     "CORE VECTOR OPTIONS" },
114114   { OPTION_ANTIALIAS ";aa",                            "1",         OPTION_BOOLEAN,    "use antialiasing when drawing vectors" },
115   { OPTION_BEAM_WIDTH_MIN,                             "1.0",       OPTION_FLOAT,      "set vector beam width minimum" },
116   { OPTION_BEAM_WIDTH_MAX,                             "1.0",       OPTION_FLOAT,      "set vector beam width maximum" },
117   { OPTION_BEAM_INTENSITY_WEIGHT,                      "0",         OPTION_FLOAT,      "set vector beam intensity weight " },
115   { OPTION_BEAM,                                       "1.0",       OPTION_FLOAT,      "set vector beam width" },
118116   { OPTION_FLICKER,                                    "0",         OPTION_FLOAT,      "set vector flicker effect" },
119117
120118   // sound options
r249939r249940
445443      parse_one_ini("computer", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
446444   else if (cursystem->flags & MACHINE_TYPE_OTHER)
447445      parse_one_ini("othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
448
446   
449447   machine_config config(*cursystem, *this);
450448   screen_device_iterator iter(config.root_device());
451449   for (const screen_device *device = iter.first(); device != NULL; device = iter.next())
r249939r249940
582580{
583581   std::string tmp = std::string(",").append(subname).append("=");
584582   buffer = value(name);
585   int pos = buffer.find(tmp);
583   int pos = buffer.find(tmp.c_str());
586584   if (pos != -1)
587585   {
588586      int endpos = buffer.find_first_of(',', pos + 1);
trunk/src/emu/emuopts.h
r249939r249940
119119
120120// core vector options
121121#define OPTION_ANTIALIAS            "antialias"
122#define OPTION_BEAM_WIDTH_MIN       "beam_width_min"
123#define OPTION_BEAM_WIDTH_MAX       "beam_width_max"
124#define OPTION_BEAM_INTENSITY_WEIGHT   "beam_intensity_weight"
122#define OPTION_BEAM                 "beam"
125123#define OPTION_FLICKER              "flicker"
126124
127125// core sound options
r249939r249940
298296
299297   // core vector options
300298   bool antialias() const { return bool_value(OPTION_ANTIALIAS); }
301   float beam_width_min() const { return float_value(OPTION_BEAM_WIDTH_MIN); }
302   float beam_width_max() const { return float_value(OPTION_BEAM_WIDTH_MAX); }
303   float beam_intensity_weight() const { return float_value(OPTION_BEAM_INTENSITY_WEIGHT); }
299   float beam() const { return float_value(OPTION_BEAM); }
304300   float flicker() const { return float_value(OPTION_FLICKER); }
305301
306302   // core sound options
trunk/src/emu/info.c
r249939r249940
645645      if (strcmp(exec->device().tag(), device.tag()))
646646      {
647647         std::string newtag(exec->device().tag()), oldtag(":");
648         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
648         newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
649649
650650         fprintf(m_output, "\t\t<chip");
651651         fprintf(m_output, " type=\"cpu\"");
r249939r249940
663663      if (strcmp(sound->device().tag(), device.tag()))
664664      {
665665         std::string newtag(sound->device().tag()), oldtag(":");
666         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
666         newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
667667
668668         fprintf(m_output, "\t\t<chip");
669669         fprintf(m_output, " type=\"audio\"");
r249939r249940
691691      if (strcmp(screendev->tag(), device.tag()))
692692      {
693693         std::string newtag(screendev->tag()), oldtag(":");
694         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
694         newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
695695
696696         fprintf(m_output, "\t\t<display");
697697         fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str()));
r249939r249940
10971097            std::string output;
10981098
10991099            std::string newtag(port->tag()), oldtag(":");
1100            newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
1100            newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
11011101
11021102            // output the switch name information
11031103            std::string normalized_field_name(xml_normalize_string(field->name()));
r249939r249940
12281228      if (strcmp(imagedev->device().tag(), device.tag()))
12291229      {
12301230         std::string newtag(imagedev->device().tag()), oldtag(":");
1231         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
1231         newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
12321232
12331233         // print m_output device type
12341234         fprintf(m_output, "\t\t<device type=\"%s\"", xml_normalize_string(imagedev->image_type_name()));
r249939r249940
12861286      if (strcmp(slot->device().tag(), device.tag()))
12871287      {
12881288         std::string newtag(slot->device().tag()), oldtag(":");
1289         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
1289         newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
12901290
12911291         // print m_output device type
12921292         fprintf(m_output, "\t\t<slot name=\"%s\">\n", xml_normalize_string(newtag.c_str()));
trunk/src/emu/machine.c
r249939r249940
206206   else if (strlen(options().autoboot_command())!=0) {
207207      std::string cmd = std::string(options().autoboot_command());
208208      strreplace(cmd, "'", "\\'");
209      std::string val = std::string("emu.keypost('").append(cmd).append("')");
209      std::string val = std::string("emu.keypost('").append(cmd.c_str()).append("')").c_str();
210210      manager().lua()->load_string(val.c_str());
211211   }
212212}
r249939r249940
256256   m_memory.initialize();
257257
258258   // initialize the watchdog
259   m_watchdog_counter = 0;
260259   m_watchdog_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::watchdog_fired), this));
261260   if (config().m_watchdog_vblank_count != 0 && primary_screen != NULL)
262261      primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this));
r249939r249940
563562
564563   // handle %d in the template (for image devices)
565564   std::string statename_dev("%d_");
566   int pos = statename_str.find(statename_dev);
565   int pos = statename_str.find(statename_dev.c_str());
567566
568567   if (pos != -1)
569568   {
trunk/src/emu/machine.h
r249939r249940
226226   // watchdog control
227227   void watchdog_reset();
228228   void watchdog_enable(bool enable = true);
229   INT32 get_vblank_watchdog_counter() { return m_watchdog_counter; }
230229
231230   // misc
232231   void CLIB_DECL vlogerror(const char *format, va_list args);
trunk/src/emu/memory.c
r249939r249940
19291929void address_space::populate_map_entry(const address_map_entry &entry, read_or_write readorwrite)
19301930{
19311931   const map_handler_data &data = (readorwrite == ROW_READ) ? entry.m_read : entry.m_write;
1932   std::string fulltag;
1933
19321934   // based on the handler type, alter the bits, name, funcptr, and object
19331935   switch (data.m_type)
19341936   {
trunk/src/emu/romload.c
r249939r249940
675675         }
676676
677677         // prepare locations where we have to load from: list/parentname & list/clonename
678         std::string swlist(tag1);
678         std::string swlist(tag1.c_str());
679679         tag2.assign(swlist.append(tag4));
680680         if (has_parent)
681681         {
r249939r249940
10761076         }
10771077
10781078         // prepare locations where we have to load from: list/parentname (if any) & list/clonename
1079         std::string swlist(tag1);
1079         std::string swlist(tag1.c_str());
10801080         tag2.assign(swlist.append(tag4));
10811081         if (has_parent)
10821082         {
trunk/src/emu/screen.h
r249939r249940
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/softlist.c
r249939r249940
158158   for (int start = 0, end = filt.find_first_of(',',start); end != -1; start = end + 1, end = filt.find_first_of(',', start))
159159   {
160160      std::string token(filt, start, end - start + 1);
161      if (comp.find(token) != -1)
161      if (comp.find(token.c_str()) != -1)
162162         return true;
163163   }
164164   return false;
r249939r249940
181181
182182   // then add a comma to the end of our interface and return true if we find it in the list string
183183   std::string our_interface = std::string(m_interface).append(",");
184   return (interfaces.find(our_interface) != -1);
184   return (interfaces.find(our_interface.c_str()) != -1);
185185}
186186
187187
trunk/src/emu/ui/filemngr.c
r249939r249940
104104{
105105   std::string buffer, tmp_inst, tmp_name;
106106   bool first_entry = true;
107   std::string prev_owner;
107108
108109   if (!m_warnings.empty())
109110   {
trunk/src/emu/ui/info_pty.c
r249939r249940
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
r249939r249940
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/inputmap.c
r249939r249940
9191{
9292   input_item_data *itemlist = NULL;
9393   int suborder[SEQ_TYPE_TOTAL];
94   std::string tempstring;
9495   int sortorder = 1;
9596
9697   /* create a mini lookup table for sort order based on sequence type */
r249939r249940
153154{
154155   input_item_data *itemlist = NULL;
155156   int suborder[SEQ_TYPE_TOTAL];
157   std::string tempstring;
156158   int port_count = 0;
157159
158160   /* create a mini lookup table for sort order based on sequence type */
trunk/src/emu/ui/mainmenu.c
r249939r249940
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
r249939r249940
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
r249939r249940
4545      SELECT_GAME,
4646      BIOS_SELECTION,
4747      BARCODE_READ,
48            PTY_INFO
48                PTY_INFO
4949   };
5050};
5151
trunk/src/emu/ui/ui.c
r249939r249940
124124static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
125125static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
126126static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval);
127static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval);
128static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval);
129static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval);
127static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, INT32 newval);
130128static char *slider_get_screen_desc(screen_device &screen);
131129#ifdef MAME_DEBUG
132130static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
r249939r249940
19661964   for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
19671965      if (screen->screen_type() == SCREEN_TYPE_VECTOR)
19681966      {
1969         // add vector control
1967         // add flicker control
19701968         *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL);
19711969         tailptr = &(*tailptr)->next;
1972         *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, NULL);
1970         *tailptr = slider_alloc(machine, "Beam Width", 10, 100, 1000, 10, slider_beam, NULL);
19731971         tailptr = &(*tailptr)->next;
1974         *tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, NULL);
1975         tailptr = &(*tailptr)->next;
1976         *tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, NULL);
1977         tailptr = &(*tailptr)->next;
19781972         break;
19791973      }
19801974
r249939r249940
23462340{
23472341   vector_device *vector = NULL;
23482342   if (newval != SLIDER_NOCHANGE)
2349      vector->set_flicker((float)newval * 0.001f);
2343      vector->set_flicker((float)newval * 0.1f);
23502344   if (str != NULL)
23512345      strprintf(*str,"%1.2f", (double) vector->get_flicker());
2352   return floor(vector->get_flicker() * 1000.0f + 0.5f);
2346   return floor(vector->get_flicker() * 10.0f + 0.5f);
23532347}
23542348
23552349
23562350//-------------------------------------------------
2357//  slider_beam_width_min - minimum vector beam width slider
2351//  slider_beam - vector beam width slider
23582352//  callback
23592353//-------------------------------------------------
23602354
2361static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
2355static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, INT32 newval)
23622356{
23632357   vector_device *vector = NULL;
23642358   if (newval != SLIDER_NOCHANGE)
2365      vector->set_beam_width_min(MIN((float)newval * 0.01f, vector->get_beam_width_max()));
2359      vector->set_beam((float)newval * 0.01f);
23662360   if (str != NULL)
2367      strprintf(*str,"%1.2f", (double) vector->get_beam_width_min());
2368   return floor(vector->get_beam_width_min() * 100.0f + 0.5f);
2361      strprintf(*str,"%1.2f", (double) vector->get_beam());
2362   return floor(vector->get_beam() * 100.0f + 0.5f);
23692363}
23702364
23712365
23722366//-------------------------------------------------
2373//  slider_beam_width_max - maximum vector beam width slider
2374//  callback
2375//-------------------------------------------------
2376
2377static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval)
2378{
2379   vector_device *vector = NULL;
2380   if (newval != SLIDER_NOCHANGE)
2381      vector->set_beam_width_max(MAX((float)newval * 0.01f, vector->get_beam_width_min()));
2382   if (str != NULL)
2383      strprintf(*str,"%1.2f", (double) vector->get_beam_width_max());
2384   return floor(vector->get_beam_width_max() * 100.0f + 0.5f);
2385}
2386
2387
2388//-------------------------------------------------
2389//  slider_beam_intensity_weight - vector beam intensity weight slider
2390//  callback
2391//-------------------------------------------------
2392
2393static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval)
2394{
2395   vector_device *vector = NULL;
2396   if (newval != SLIDER_NOCHANGE)
2397      vector->set_beam_intensity_weight((float)newval * 0.001f);
2398   if (str != NULL)
2399      strprintf(*str,"%1.2f", (double) vector->get_beam_intensity_weight());
2400   return floor(vector->get_beam_intensity_weight() * 1000.0f + 0.5f);
2401}
2402
2403
2404//-------------------------------------------------
24052367//  slider_get_screen_desc - returns the
24062368//  description for a given screen
24072369//-------------------------------------------------
trunk/src/emu/validity.c
r249939r249940
196196   // if we had warnings or errors, output
197197   if (m_errors > 0 || m_warnings > 0)
198198   {
199      std::string tempstr;
199200      output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings);
200201      if (m_errors > 0)
201202      {
trunk/src/emu/video.c
r249939r249940
11261126
11271127   // handle %d in the template (for image devices)
11281128   std::string snapdev("%d_");
1129   int pos = snapstr.find(snapdev);
1129   int pos = snapstr.find(snapdev.c_str());
11301130
11311131   if (pos != -1)
11321132   {
trunk/src/emu/video/rgbvmx.c
r249939r249940
175175{
176176   mul(scale);
177177   sra_imm(8);
178   clamp_to_uint8();
178   max(0);
179   min(255);
179180}
180181
181182void rgbaint_t::scale_imm_and_clamp(const INT32 scale)
182183{
183184   mul_imm(scale);
184185   sra_imm(8);
185   clamp_to_uint8();
186   max(0);
187   min(255);
186188}
187189
190void rgbaint_t::scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2)
191{
192   rgbaint_t color2(other);
193   color2.mul(scale2);
194
195   mul(scale);
196   add(color2);
197   sra_imm(8);
198   max(0);
199   min(255);
200}
201
202void rgbaint_t::scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other)
203{
204   mul_imm(scale);
205   sra_imm(8);
206   add(other);
207   max(0);
208   min(255);
209}
210
211void rgbaint_t::scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other)
212{
213   mul(scale);
214   sra_imm(8);
215   add(other);
216   max(0);
217   min(255);
218}
219
188220#endif // defined(__ALTIVEC__)
trunk/src/emu/video/rgbvmx.h
r249939r249940
1919
2020class rgbaint_t
2121{
22protected:
23   typedef __vector signed char    VECS8;
24   typedef __vector unsigned char  VECU8;
25   typedef __vector signed short   VECS16;
26   typedef __vector unsigned short VECU16;
27   typedef __vector signed int     VECS32;
28   typedef __vector unsigned int   VECU32;
29
3022public:
3123   inline rgbaint_t() { }
3224   inline rgbaint_t(UINT32 rgba) { set(rgba); }
3325   inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
3426   inline rgbaint_t(rgb_t& rgb) { set(rgb); }
35   inline rgbaint_t(VECS32 rgba) { m_value = rgba; }
3627
3728   inline void set(rgbaint_t& other) { m_value = other.m_value; }
3829
r249939r249940
5849
5950   inline rgb_t to_rgba()
6051   {
61      VECU32 temp = vec_packs(m_value, m_value);
62      temp = vec_packsu((VECS16)temp, (VECS16)temp);
52      VECU32 temp = vec_pack(m_value, m_value);
53      temp = vec_pack((VECU16)temp, (VECU16)temp);
6354      UINT32 result;
6455      vec_ste(temp, 0, &result);
6556      return result;
r249939r249940
6859   inline rgb_t to_rgba_clamp()
6960   {
7061      VECU32 temp = vec_packs(m_value, m_value);
71      temp = vec_packsu((VECS16)temp, (VECS16)temp);
62      temp = vec_packsu((VECU16)temp, (VECU16)temp);
7263      UINT32 result;
7364      vec_ste(temp, 0, &result);
7465      return result;
r249939r249940
231222   inline void shl(const rgbaint_t& shift)
232223   {
233224      const VECU32 limit = { 32, 32, 32, 32 };
234      m_value = vec_and(vec_sl(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value));
225      const VECU32 temp = vec_splat(shift.m_value, 3);
226      m_value = vec_and(vec_sl(m_value, temp), vec_cmpgt(limit, temp));
235227   }
236228
237229   inline void shl_imm(const UINT8 shift)
r249939r249940
243235   inline void shr(const rgbaint_t& shift)
244236   {
245237      const VECU32 limit = { 32, 32, 32, 32 };
246      m_value = vec_and(vec_sr(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value));
238      const VECU32 temp = vec_splat(shift.m_value, 3);
239      m_value = vec_and(vec_sr(m_value, temp), vec_cmpgt(limit, temp));
247240   }
248241
249242   inline void shr_imm(const UINT8 shift)
r249939r249940
255248   inline void sra(const rgbaint_t& shift)
256249   {
257250      const VECU32 limit = { 31, 31, 31, 31 };
258      m_value = vec_sra(m_value, vec_min((VECU32)shift.m_value, limit));
251      m_value = vec_sra(m_value, vec_min((VECU32)vec_splat(shift.m_value, 3), limit));
259252   }
260253
261254   inline void sra_imm(const UINT8 shift)
r249939r249940
286279      m_value = vec_and(m_value, color.m_value);
287280   }
288281
289   inline void andnot_reg(const rgbaint_t& color)
290   {
291      m_value = vec_andc(m_value, color.m_value);
292   }
293
294282   inline void and_imm(const INT32 value)
295283   {
296284      const VECS32 temp = { value, value, value, value };
r249939r249940
330318      m_value = vec_or(vec_and(vsign, mask), vec_and(m_value, vec_nor(mask, vzero)));
331319   }
332320
333   inline void clamp_to_uint8()
334   {
335      const VECU32 zero = { 0, 0, 0, 0 };
336      m_value = vec_packs(m_value, m_value);
337      m_value = vec_packsu((VECS16)m_value, (VECS16)m_value);
338      m_value = vec_mergeh((VECU8)zero, (VECU8)m_value);
339      m_value = vec_mergeh((VECS16)zero, (VECS16)m_value);
340   }
341
342321   inline void sign_extend(const UINT32 compare, const UINT32 sign)
343322   {
344323      const VECS32 compare_vec = { compare, compare, compare, compare };
r249939r249940
363342
364343   void scale_and_clamp(const rgbaint_t& scale);
365344   void scale_imm_and_clamp(const INT32 scale);
345   void scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2);
346   void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other);
347   void scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other);
366348
367   void scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other)
368   {
369      mul_imm(scale);
370      sra_imm(8);
371      add(other);
372      clamp_to_uint8();
373   }
374
375   void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other)
376   {
377      mul(scale);
378      sra_imm(8);
379      add(other);
380      clamp_to_uint8();
381   }
382
383   void scale2_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other, const rgbaint_t& scale2)
384   {
385      rgbaint_t color2(other);
386      color2.mul(scale2);
387
388      mul(scale);
389      add(color2);
390      sra_imm(8);
391      clamp_to_uint8();
392   }
393
394349   inline void cmpeq(const rgbaint_t& value)
395350   {
396351      m_value = vec_cmpeq(m_value, value.m_value);
r249939r249940
525480      return result;
526481   }
527482
528   inline void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
529   {
530      const VECS32 zero = vec_splat_s32(0);
531
532      VECS32 color00 = vec_perm((VECS32)vec_lde(0, &rgb00), zero, vec_lvsl(0, &rgb00));
533      VECS32 color01 = vec_perm((VECS32)vec_lde(0, &rgb01), zero, vec_lvsl(0, &rgb01));
534      VECS32 color10 = vec_perm((VECS32)vec_lde(0, &rgb10), zero, vec_lvsl(0, &rgb10));
535      VECS32 color11 = vec_perm((VECS32)vec_lde(0, &rgb11), zero, vec_lvsl(0, &rgb11));
536
537      /* interleave color01 and color00 at the byte level */
538      color01 = vec_mergeh((VECU8)color01, (VECU8)color00);
539      color11 = vec_mergeh((VECU8)color11, (VECU8)color10);
540      color01 = vec_mergeh((VECU8)zero, (VECU8)color01);
541      color11 = vec_mergeh((VECU8)zero, (VECU8)color11);
542      color01 = vec_msum((VECS16)color01, scale_table[u], zero);
543      color11 = vec_msum((VECS16)color11, scale_table[u], zero);
544      color01 = vec_sl(color01, vec_splat_u32(15));
545      color11 = vec_sr(color11, vec_splat_u32(1));
546      color01 = vec_max((VECS16)color01, (VECS16)color11);
547      color01 = vec_msum((VECS16)color01, scale_table[v], zero);
548      m_value = vec_sr(color01, vec_splat_u32(15));
549   }
550
551483protected:
484   typedef __vector signed char    VECS8;
485   typedef __vector unsigned char  VECU8;
486   typedef __vector signed short   VECS16;
487   typedef __vector unsigned short VECU16;
488   typedef __vector signed int     VECS32;
489   typedef __vector unsigned int   VECU32;
490
552491   VECS32                          m_value;
553492
554493   static const VECU8              alpha_perm;
trunk/src/emu/video/vector.c
r249939r249940
3535#include "vector.h"
3636
3737
38#define FLT_EPSILON 1E-5
3938
40#define VECTOR_WIDTH_DENOM 512
39#define VECTOR_WIDTH_DENOM          512
4140
42#define MAX_POINTS 10000
4341
42#define MAX_POINTS  10000
43
4444#define VECTOR_TEAM \
4545   "-* Vector Heads *-\n" \
4646   "Brad Oliver\n" \
r249939r249940
140140{
141141}
142142
143float vector_device::m_flicker = 0.0f;
144float vector_device::m_beam_width_min = 0.0f;
145float vector_device::m_beam_width_max = 0.0f;
146float vector_device::m_beam_intensity_weight = 0.0f;
143float vector_device::m_flicker_correction = 0.0f;
144float vector_device::m_beam_width = 0.0f;
145int vector_device::m_flicker;
147146int vector_device::m_vector_index;
148147
149148void vector_device::device_start()
150149{
150   m_beam_width = machine().options().beam();
151
151152   /* Grab the settings for this session */
152   m_beam_width_min = machine().options().beam_width_min();
153   m_beam_width_max = machine().options().beam_width_max();
154   m_beam_intensity_weight = machine().options().beam_intensity_weight();
155   m_flicker = machine().options().flicker();
153   set_flicker(machine().options().flicker());
156154
157155   m_vector_index = 0;
158156
r249939r249940
160158   m_vector_list = auto_alloc_array_clear(machine(), point, MAX_POINTS);
161159}
162160
163void vector_device::set_flicker(float newval)
161void vector_device::set_flicker(float _flicker)
164162{
165   m_flicker = newval;
163   m_flicker_correction = _flicker;
164   m_flicker = (int)(m_flicker_correction * 2.55f);
166165}
167166
168167float vector_device::get_flicker()
169168{
170   return m_flicker;
169   return m_flicker_correction;
171170}
172171
173void vector_device::set_beam_width_min(float newval)
172void vector_device::set_beam(float _beam)
174173{
175   m_beam_width_min = newval;
174   m_beam_width = _beam;
176175}
177176
178float vector_device::get_beam_width_min()
177float vector_device::get_beam()
179178{
180   return m_beam_width_min;
179   return m_beam_width;
181180}
182181
183void vector_device::set_beam_width_max(float newval)
184{
185   m_beam_width_max = newval;
186}
187182
188float vector_device::get_beam_width_max()
189{
190   return m_beam_width_max;
191}
192
193void vector_device::set_beam_intensity_weight(float newval)
194{
195   m_beam_intensity_weight = newval;
196}
197
198float vector_device::get_beam_intensity_weight()
199{
200   return m_beam_intensity_weight;
201}
202
203
204183/*
205 * www.dinodini.wordpress.com/2010/04/05/normalized-tunable-sigmoid-functions/
206 */
207float vector_device::normalized_sigmoid(float n, float k)
208{
209   // valid for n and k in range of -1.0 and 1.0
210   return (n - n * k) / (k - fabs(n) * 2.0f * k + 1.0f);
211}
212
213
214/*
215184 * Adds a line end point to the vertices list. The vector processor emulation
216185 * needs to call this.
217186 */
218void vector_device::add_point(int x, int y, rgb_t color, int intensity)
187void vector_device::add_point (int x, int y, rgb_t color, int intensity)
219188{
220189   point *newpoint;
221190
222   if (intensity > 255)
223   {
224      intensity = 255;
225   }
191   if (intensity > 0xff)
192      intensity = 0xff;
226193
227194   if (m_flicker && (intensity > 0))
228195   {
229      float random = (float)(machine().rand() & 255) / 255.0f; // random value between 0.0 and 1.0
230
231      intensity -= (int)(intensity * random * m_flicker);
196      intensity += (intensity * (0x80-(machine().rand()&0xff)) * m_flicker)>>16;
232197      if (intensity < 0)
233      {
234198         intensity = 0;
235      }
236      if (intensity > 255)
237      {
238         intensity = 255;
239      }
199      if (intensity > 0xff)
200         intensity = 0xff;
240201   }
241
242202   newpoint = &m_vector_list[m_vector_index];
243203   newpoint->x = x;
244204   newpoint->y = y;
r249939r249940
254214   }
255215}
256216
257
258217/*
259218 * Add new clipping info to the list
260219 */
261void vector_device::add_clip(int x1, int yy1, int x2, int y2)
220void vector_device::add_clip (int x1, int yy1, int x2, int y2)
262221{
263222   point *newpoint;
264223
r249939r249940
282241 * The vector CPU creates a new display list. We save the old display list,
283242 * but only once per refresh.
284243 */
285void vector_device::clear_list(void)
244void vector_device::clear_list (void)
286245{
287246   m_vector_index = 0;
288247}
r249939r249940
296255   float yscale = 1.0f / (65536 * visarea.height());
297256   float xoffs = (float)visarea.min_x;
298257   float yoffs = (float)visarea.min_y;
299   float xratio = xscale / yscale;
300   float yratio = yscale / xscale;
301   xratio = (xratio < 1.0f) ? xratio : 1.0f;
302   xratio = (yratio < 1.0f) ? yratio : 1.0f;
303
304258   point *curpoint;
305259   render_bounds clip;
306   int lastx = 0;
307   int lasty = 0;
260   int lastx = 0, lasty = 0;
261   int i;
308262
309263   curpoint = m_vector_list;
310264
r249939r249940
314268   clip.x0 = clip.y0 = 0.0f;
315269   clip.x1 = clip.y1 = 1.0f;
316270
317   for (int i = 0; i < m_vector_index; i++)
271   for (i = 0; i < m_vector_index; i++)
318272   {
319273      render_bounds coords;
320274
r249939r249940
332286      }
333287      else
334288      {
335         float intensity = (float)curpoint->intensity / 255.0f;
336         float intensity_weight = normalized_sigmoid(intensity, m_beam_intensity_weight);
337
338         float beam_intensity_width = (m_beam_width_max - m_beam_width_min) * intensity_weight + m_beam_width_min;
339         float beam_width = beam_intensity_width * (1.0f / (float)VECTOR_WIDTH_DENOM);
340
341289         coords.x0 = ((float)lastx - xoffs) * xscale;
342290         coords.y0 = ((float)lasty - yoffs) * yscale;
343291         coords.x1 = ((float)curpoint->x - xoffs) * xscale;
344292         coords.y1 = ((float)curpoint->y - yoffs) * yscale;
345293
346         // extend zero-length vector line (vector point) by quarter beam_width on both sides
347         if (fabs(coords.x0 - coords.x1) < FLT_EPSILON &&
348            fabs(coords.y0 - coords.y1) < FLT_EPSILON)
349         {
350            coords.x0 += xratio * beam_width * 0.25f;
351            coords.y0 += yratio * beam_width * 0.25f;
352            coords.x1 -= xratio * beam_width * 0.25f;
353            coords.y1 -= yratio * beam_width * 0.25f;
354         }
294         if (curpoint->intensity != 0)
295            if (!render_clip_line(&coords, &clip))
296               screen.container().add_line(coords.x0, coords.y0, coords.x1, coords.y1,
297                     m_beam_width * (1.0f / (float)VECTOR_WIDTH_DENOM),
298                     (curpoint->intensity << 24) | (curpoint->col & 0xffffff),
299                     flags);
355300
356         if (curpoint->intensity != 0 && !render_clip_line(&coords, &clip))
357         {
358            screen.container().add_line(
359               coords.x0, coords.y0, coords.x1, coords.y1,
360               beam_width,
361               (curpoint->intensity << 24) | (curpoint->col & 0xffffff),
362               flags);
363         }
364
365301         lastx = curpoint->x;
366302         lasty = curpoint->y;
367303      }
368
369304      curpoint++;
370305   }
371
372306   return 0;
373307}
trunk/src/emu/video/vector.h
r249939r249940
1616/* The vertices are buffered here */
1717struct point
1818{
19   point() :
19      point():
2020      x(0),
2121      y(0),
2222      col(0),
r249939r249940
3232   int status;         /* for dirty and clipping handling */
3333};
3434
35class vector_device : public device_t, public device_video_interface
35class vector_device :  public device_t,
36                     public device_video_interface
3637{
3738public:
3839   // construction/destruction
r249939r249940
4546   void add_point(int x, int y, rgb_t color, int intensity);
4647   void add_clip(int minx, int miny, int maxx, int maxy);
4748
48   void set_flicker(float newval);
49   void set_flicker(float m_flicker_correction);
4950   float get_flicker();
5051
51   void set_beam_width_min(float newval);
52   float get_beam_width_min();
52   void set_beam(float _beam);
53   float get_beam();
5354
54   void set_beam_width_max(float newval);
55   float get_beam_width_max();
56
57   void set_beam_intensity_weight(float newval);
58   float get_beam_intensity_weight();
59
6055   // device-level overrides
6156   virtual void device_start();
6257
6358private:
64   static float m_flicker;
65   static float m_beam_width_min;
66   static float m_beam_width_max;
67   static float m_beam_intensity_weight;
59   static int m_flicker;                              /* beam flicker value     */
60   static float m_flicker_correction;
61   static float m_beam_width;
6862   point *m_vector_list;
6963   static int m_vector_index;
70
71   float normalized_sigmoid(float n, float k);
7264};
7365
7466
trunk/src/lib/formats/apollo_dsk.c
r249939r249940
5353
5454   return ((size == expected_size) || (size == 0)) ? 1 : 0;
5555}
56
trunk/src/lib/formats/tzx_cas.c
r249939r249940
296296   return size;
297297}
298298
299static int tzx_handle_direct(INT16 **buffer, const UINT8 *bytes, int pause, int data_size, int tstates, int bits_in_last_byte)
300{
301   int size = 0;
302   int samples = tcycles_to_samplecount(tstates);
303
304   /* data */
305   for (int data_index = 0; data_index < data_size; data_index++)
306   {
307      UINT8 byte = bytes[data_index];
308      int bits_to_go = (data_index == (data_size - 1)) ? bits_in_last_byte : 8;
309
310      for ( ; bits_to_go > 0; byte <<= 1, bits_to_go--)
311      {
312         if (byte & 0x80) wave_data = WAVE_HIGH;
313         else wave_data = WAVE_LOW;
314
315         tzx_output_wave(buffer, samples);
316         size += samples;
317
318      }
319   }
320
321   /* pause */
322   if (pause > 0)
323   {
324      int start_pause_samples = millisec_to_samplecount(1);
325      int rest_pause_samples = millisec_to_samplecount(pause - 1);
326
327      tzx_output_wave(buffer, start_pause_samples);
328      size += start_pause_samples;
329      wave_data = WAVE_LOW;
330      tzx_output_wave(buffer, rest_pause_samples);
331      size += rest_pause_samples;
332   }
333   return size;
334}
335
336
337299static void ascii_block_common_log( const char *block_type_string, UINT8 block_type )
338300{
339301   LOG_FORMATS("%s (type %02x) encountered.\n", block_type_string, block_type);
r249939r249940
381343      int bit0, bit1, bits_in_last_byte;
382344      UINT8 *cur_block = blocks[current_block];
383345      UINT8 block_type = cur_block[0];
384      UINT16 tstates = 0;
385346
347
386348   /* Uncomment this to include into error.log a list of the types each block */
387349   LOG_FORMATS("tzx_cas_fill_wave: block %d, block_type %02x\n", current_block, block_type);
388350
r249939r249940
554516         current_block++;
555517         break;
556518
557      case 0x15:  /* Direct Recording */ // used on 'bombscar' in the cpc_cass list
519      case 0x15:  /* Direct Recording */
558520         // having this missing is fatal
559         tstates = cur_block[1] + (cur_block[2] << 8);
560         pause_time= cur_block[3] + (cur_block[4] << 8);
561         bits_in_last_byte = cur_block[5];
562         data_size = cur_block[6] + (cur_block[7] << 8) + (cur_block[8] << 16);
563         size += tzx_handle_direct(buffer, &cur_block[9], pause_time, data_size, tstates, bits_in_last_byte);
521         printf("Unsupported block type (0x15 - Direct Recording) encountered.\n");
564522         current_block++;
565523         break;
566524
trunk/src/mame/arcade.lst
r249939r249940
12321232dkongjo         // (c) 1981 Nintendo
12331233dkongjo1        // (c) 1981 Nintendo
12341234dkongf          // hack from Jeff's Romhack
1235dkongpe         // hack Pauline Edition
12361235dkongx          // hack
12371236dkongx11        // hack
12381237dkongjr         // (c) 1982 Nintendo of America
r249939r249940
18271826rtypejp         // (c) 1987 (Japan)
18281827rtypeu          // (c) 1987 + Nintendo USA license (US)
18291828rtypeb          // bootleg
1830rtypem82b       // bootleg
1829rtypem82b      // bootleg
18311830bchopper        // (c) 1987
18321831mrheli          // (c) 1987 (Japan)
18331832nspirit         // (c) 1988
r249939r249940
18451844rtype2          // (c) 1989
18461845rtype2j         // (c) 1989 (Japan)
18471846rtype2jc        // (c) 1989 (Japan)
1848rtype2m82b      // bootleg
1847rtype2m82b      // bootleg
18491848majtitle        // (c) 1990 (World)
18501849majtitlej       // (c) 1990 (Japan)
18511850hharry          // (c) 1990 (World)
r249939r249940
18561855poundforj       // (c) 1990 (Japan)
18571856poundforu       // (c) 1990 Irem America (US)
18581857airduelm72      // (c) 1990 (Japan)
1859airduel         // (c) 1990 (World)
1858airduel         // (c) 1990 (World)
18601859cosmccop        // (c) 1991 (World)
18611860gallop          // (c) 1991 (Japan)
18621861ltswords        // (c) 1991 (World)
18631862kengo           // (c) 1991 (Japan)
1864kengoa          // (c) 1991 (Japan)
1863kengoa         // (c) 1991 (Japan)
18651864// not M72, but same sound hardware
18661865sichuan2        // (c) 1989 Tamtex
18671866sichuan2a       // (c) 1989 Tamtex
r249939r249940
20972096sboblbobl       // bootleg
20982097sboblbobla      // bootleg
20992098sboblboblb      // bootleg
2100sboblboblc      // bootleg
2101bublboblb       // bootleg
21022099bub68705        // bootleg
21032100dland           // bootleg
2104bbredux         // bootleg / hack
2105bublcave        // hack
2106boblcave        // hack
2107bublcave11      // hack
2108bublcave10      // hack
21092101missb2          // bootleg on enhanced hardware
21102102bublpong        // bootleg on enhanced hardware
21112103kikikai         // A85 (c) 1986 Taito Corporation
r249939r249940
28712863ppsatan         // (c) 1996 <unknown>
28722864ddonpach        // (c) 1997 Atlus/Cave
28732865ddonpachj       // (c) 1997 Atlus/Cave
2874ddonpacha       // hack
28752866dfeveron        // (c) 1998 Cave + Nihon System license
28762867feversos        // (c) 1998 Cave + Nihon System license
28772868esprade         // (c) 1998 Atlus/Cave
r249939r249940
31053096madgearj        //  2/1989 (c) 1989 (Japan)
31063097ledstorm        //  1988 (c) 1988 (US)
31073098leds2011        //  1988 (c) 1988 (World)
3108leds2011u       //  1988 (c) 1988 (US)
3099leds2011u      //  1988 (c) 1988 (US)
31093100//  3/1989 Dokaben (baseball) - see below among "Mitchell" games
31103101//  8/1989 Dokaben 2 (baseball) - see below among "Mitchell" games
31113102// 10/1989 Capcom Baseball - see below among "Mitchell" games
r249939r249940
38743865soulclbrja      // 1998.?? Soul Calibur (Japan, SOC11/VER.A2)
38753866technodr        // 1998.07 Techno Drive
38763867mdhorse         // 1998.11 Derby Quiz My Dream Horse (Japan, MDH1/VER.A2)
3877aplarail        // 1998.12 Attack Pla Rail
3868aplarail      // 1998.12 Attack Pla Rail
38783869tenkomor        // 1998.?? Tenkomori Shooting (Asia, TKM2/VER.A1)
38793870tenkomorja      // 1998.12 Tenkomori Shooting (Japan, TKM1/VER.A1)
38803871pacapp          // 1998.12 Paca Paca Passion (Japan, PPP1/VER.A2)
r249939r249940
45104501wbdeluxe        // (c) 1986 + Escape license (S1)
45114502wboysys2        // 834-5984  (c) 1986 + Escape license (S1)
45124503gardia          // 834-6119 (S2?)
4513gardiaj         //
45144504gardiab         // bootleg
45154505nob             // (c) Data East
45164506nobb            // bootleg
r249939r249940
46954685ryukyu          // (c) 1990 (FD1094)
46964686sdib            // (c) 1987 (FD1089A)
46974687sdibl           // (c) 1987 bootleg
4698sdibl2          // bootleg
4699sdibl3          // bootleg
4700sdibl4          // bootleg
4701sdibl5          // bootleg
4702sdibl6          // bootleg
4688sdibl2         // bootleg
4689sdibl3         // bootleg
4690sdibl4         // bootleg
4691sdibl5         // bootleg
4692sdibl6         // bootleg
47034693defense         // (c) 1987 (FD1094)
47044694shinobi5        // (c) 1987 (Unprotected)
47054695shinobi4        // (c) 1987 (MC-8123B)
r249939r249940
48894879toutrunjd       // bootleg
48904880toutrun3d       // bootleg
48914881toutrunj1d      // bootleg
4892toutrun2d       // bootleg
4882toutrun2d      // bootleg
48934883shangon3d       // bootleg
48944884
48954885// X Board
r249939r249940
53465336tfrceacb        // bootleg
53475337twinsqua        // (c) 1991 Sega
53485338soniccar        // (c) 1991 Sega
5349sonicpop
53505339ribbit          // (c) 1991 Sega
53515340tantr           // (c) 1992 Sega
53525341tantrkor        // (c) 1992 Sega
r249939r249940
66356624mogura          // GX141 (c) 1991
66366625wecleman        // GX602 (c) 1986
66376626weclemana       // GX602?(c) 1988
6638weclemanb       // GX602 (c) 1986
6627weclemanb      // GX602 (c) 1986
66396628hotchase        // GX763 (c) 1988
66406629hotchasea
66416630chqflag         // GX717 (c) 1988
r249939r249940
90879076// Gaelco 2D games
90889077mastboy         // (c) 1987 - No Ref on the PCB
90899078mastboyi        // (c) 1987 - No Ref on the PCB
9090mastboyia       // (c) 1987 - No Ref on the PCB
9079mastboyia      // (c) 1987 - No Ref on the PCB
90919080xorworld        // (c) 1990 - prototype
90929081bigkarnk        // (c) 1991 - Ref 901112-1
90939082// Master Boy 2 // (c) 1991 - Ref ???
r249939r249940
97299718garogun         // (c) 2000 Yun Sung
973097197ordi           // (c) 2002 Yun Sung
97319720wondstck        // (c) ???? Yun Sung
9732wondstcka       // (c) ???? Yun Sung
9721wondstcka      // (c) ???? Yun Sung
97339722
97349723// Zilec games
97359724blueprnt        // (c) 1982 Bally Midway (Zilec in ROM 3U, and the programmer names)
r249939r249940
99789967tdoboon         // (c) 2000 Sammy
99799968haekaka         // (c) 2001 Sammy
99809969
9981// IGS games (www.igs.com.tw)
9970// IGS games ( www.igs.com.tw
99829971goldstar        // (c) 198? IGS
99839972goldstbl        // (c) 198? IGS
99849973moonlght        // bootleg
r249939r249940
1018710176svgtw
1018810177svgpcb          //
1018910178ket             // (c) 2002 Ketsui
10190ket1            //
1019110179keta            //
1019210180ketb            //
10193ketarr          // hack
10194ketarr151       // hack
10195ketarr15        // hack
10196ketarr10        // hack
10197ketarrs151      // hack
10198ketarrs15       // hack
10199ketarrf         // hack
1020010181ddpdoj          // (c) 2002 DoDonPachi Dai-Ou-Jou
1020110182ddpdoja         //
1020210183ddpdojb         //
r249939r249940
1118911170xplan           // (c) 2006 Subsino
1119011171
1119111172sliver          // (c) 1996 Hollow Corp
11192slivera         //
11173slivera         //
1119311174intrscti        // ????
1119411175pasha2          // (c) 1998 Dong Sung
1119511176trvmadns        // (c) 1985 Thunderhead Inc.
r249939r249940
1201511996cmast91         // (c) 1991 Dyna Electronics
1201611997cmast92         // (c) 1992 Dyna Electronics
1201711998cmast97         // (c) 1996 Dyna Electronics
12018cmast99         // 1999?
1201911999
1202012000tonypok         // (c) 1991 Corsica
1202112001jkrmast         // (c) 199? unknown
r249939r249940
1207612056dolphntr        // (c) 1996
1207712057dolphtra        // (c) 1996
1207812058dolphtre        // (c) 1996
12079cashcham        // (c) 1996
1208012059goldprmd        // (c) 1997
1208112060qotn            // (c) 1997
12082qotna           // (c) 1997
1208312061dmdtouch        // (c) 1997
12084wldcougr        // (c) 1997
12085bumblbug        // (c) 1997
1208612062pengpays        // (c) 1997
1208712063adonis          // (c) 1998
1208812064adonisa         // (c) 1998
1208912065reelrock        // (c) 1998
1209012066indiandr        // (c) 1998
12091chariotc        // (c) 1998
12092wtiger          // (c) 1999
12093bootsctn        // (c) 1999
1209412067cuckoo          // (c) 2000
1209512068magicmsk        // (c) 2000
1209612069magicmska       // (c) 2000
1209712070margmgc         // (c) 2000
1209812071geishanz        // (c) 2001
12099adonise         // (c) 2001
12072wtiger          // (c) 2001
1210012073partygrs        // (c) 2001
1210112074
1210212075// Aristocrat Mk6 hardware
r249939r249940
1321313186kas89           // 1989, SFC S.R.L.
1321413187caspoker        // 1987, PM / Beck Elektronik.
1321513188wildpkr         // 199?, TAB Austria.
13216subhuntr        // 1979 Model Racing
1321713189
1321813190manohman        // 199?, Merkur.
1321913191
trunk/src/mame/audio/hng64.c
r249939r249940
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/a2600.c
r249939r249940
1818#include "bus/vcs/vcs_slot.h"
1919#include "bus/vcs/rom.h"
2020#include "bus/vcs/dpc.h"
21#include "bus/vcs/dpcplus.h"
2221#include "bus/vcs/scharger.h"
2322#include "bus/vcs/compumat.h"
2423#include "bus/vcs_ctrl/ctrl.h"
r249939r249940
390389      case A26_X07:
391390         m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_bank),(vcs_cart_slot_device*)m_cart));
392391         m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x0fff, read8_delegate(FUNC(a2600_state::cart_over_all_r), this), write8_delegate(FUNC(a2600_state::cart_over_all_w), this));
392
393393         break;
394      case A26_DPCPLUS:
395         m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x1000, 0x1fff, read8_delegate(FUNC(vcs_cart_slot_device::read_rom),(vcs_cart_slot_device*)m_cart), write8_delegate(FUNC(vcs_cart_slot_device::write_bank),(vcs_cart_slot_device*)m_cart));
396         break;
397394   }
398395
399396   /* Banks may have changed, reset the cpu so it uses the correct reset vector */
r249939r249940
528525   SLOT_INTERFACE_INTERNAL("a26_8in1",  A26_ROM_8IN1)
529526   SLOT_INTERFACE_INTERNAL("a26_32in1", A26_ROM_32IN1)
530527   SLOT_INTERFACE_INTERNAL("a26_x07",    A26_ROM_X07)
531   SLOT_INTERFACE_INTERNAL("a26_dpcplus",   A26_ROM_DPCPLUS)
532528SLOT_INTERFACE_END
533529
534530static MACHINE_CONFIG_FRAGMENT(a2600_cartslot)
trunk/src/mame/drivers/amstrad.c
r249939r249940
814814   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
815815   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
816816   SLOT_INTERFACE("hd20", CPC_HD20)
817   SLOT_INTERFACE("doubler", CPC_DOUBLER)
818817SLOT_INTERFACE_END
819818
820819SLOT_INTERFACE_START(cpc_exp_cards)
r249939r249940
831830   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
832831   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
833832   SLOT_INTERFACE("hd20", CPC_HD20)
834   SLOT_INTERFACE("doubler", CPC_DOUBLER)
835833SLOT_INTERFACE_END
836834
837835SLOT_INTERFACE_START(cpcplus_exp_cards)
r249939r249940
846844   SLOT_INTERFACE("playcity", CPC_PLAYCITY)
847845   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
848846   SLOT_INTERFACE("hd20", CPC_HD20)
849   SLOT_INTERFACE("doubler", CPC_DOUBLER)
850847SLOT_INTERFACE_END
851848
852849SLOT_INTERFACE_START(aleste_exp_cards)
r249939r249940
863860   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
864861   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
865862   SLOT_INTERFACE("hd20", CPC_HD20)
866   SLOT_INTERFACE("doubler", CPC_DOUBLER)
867863   SLOT_INTERFACE("magicsound", AL_MAGICSOUND)
868864SLOT_INTERFACE_END
869865
trunk/src/mame/drivers/apple2e.c
r249939r249940
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
r249939r249940
11// license:BSD-3-Clause
2// copyright-holders:David Haywood, Palindrome, Roberto Fresca
2// copyright-holders:David Haywood, Palindrome
33/****************************************************************************************************************
44
55    Aristocrat MK5 / MKV hardware
r249939r249940
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
r249939r249940
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
r249939r249940
712712   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
713713ROM_END
714714
715// MV4091 - 10 Credit Multiplier / 9 Line Multiline.
716// QUEEN OF THE NILE - NSW/ACT  B - 13/05/97.
717// Marked as GHG409102
718// All devices are 27c4002 instead of 27c4096.
719// Even when it's a NSW/ACT, the program seems to be for US-Export platforms...
720ROM_START( qotna )
721   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
722   ROM_LOAD32_WORD( "mv4091_qotn.u7",  0x000000, 0x80000, CRC(a00ab2cf) SHA1(eb3120fe4b1d0554c224c7646e727e86fd35975e) )
723   ROM_LOAD32_WORD( "mv4091_qotn.u11", 0x000002, 0x80000, CRC(c4a35337) SHA1(d469ed154caed1f0a4cf89e67d852924c95172ed) )
724   ROM_LOAD32_WORD( "mv4091_qotn.u8",  0x100000, 0x80000, CRC(16a629e1) SHA1(0dee11a2f1b2068a86b3e0b6c01d115555a657c9) )
725   ROM_LOAD32_WORD( "mv4091_qotn.u12", 0x100002, 0x80000, CRC(7871a846) SHA1(ac1d741092afda842e1864f1a7a14137a9ee46d9) )
726
727   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
728
729   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
730
731   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
732ROM_END
733
734715ROM_START( swthrt2v )
735716   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
736717   ROM_LOAD32_WORD( "01j01986.u7",  0x000000, 0x80000, CRC(f51b2faa) SHA1(dbcfdbee92af5f89a8a2611bbc687ee0cc907642) )
r249939r249940
815796
816797   ROM_REGION( 0x100, "eeproms", 0 )
817798   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
799   ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) )   // blank... all 0xff's
819800
820801   ROM_REGION( 0x0005, "plds", 0 )
821802   ROM_LOAD( "gal20v8b.u22", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */
r249939r249940
825806   ROM_LOAD( "gal20v8b.u65", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */
826807ROM_END
827808
828// 630 - 10 Credit Multiplier / 9 Line Multiline.
829// The Chariot Challenge - NSW/ACT - A - 10/08/98.
830// 04J00714
831ROM_START( chariotc )
832   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
833   ROM_LOAD32_WORD( "04j00714_chariot_challenge.u7",  0x000000, 0x80000, CRC(2f3a1af7) SHA1(e1448116a81687cb79dd380dfbc8decf1f83e649) )
834   ROM_LOAD32_WORD( "04j00714_chariot_challenge.u11", 0x000002, 0x80000, CRC(ef4f49e8) SHA1(8ff21f679a55cdfebcf22c109dfd3b41773293bd) )
835   ROM_LOAD32_WORD( "04j00714_chariot_challenge.u8",  0x100000, 0x80000, CRC(fa24cfde) SHA1(1725c38a8a15915d8aa8e59afef9ce1d6e8d01c5) )
836   ROM_LOAD32_WORD( "04j00714_chariot_challenge.u12", 0x100002, 0x80000, CRC(b8d4a5ec) SHA1(097e44cdb30b9aafd7f5358c8f0cdd130ec0615e) )
837
838   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
839
840   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
841
842   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
843ROM_END
844
845809ROM_START( wtiger )
846810   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
847811   ROM_LOAD32_WORD( "0200954v.u7",  0x000000, 0x80000, CRC(752e54c5) SHA1(9317544a7cf2d9bf29347d31fe72331fc3d018ef) )
r249939r249940
924888   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
925889ROM_END
926890
927// 603(a) - 3,5,10,25,50 Credit Multiplier / 20 Line Multiline.
928// Cash Chameleon 100cm - Export B - 06/12/96.
929// Marked as DHG4078.
930ROM_START( cashcham )
931   ARISTOCRAT_MK5_BIOS
932   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
933   ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u7",  0x000000, 0x80000, CRC(cb407a19) SHA1(d98421d6548e48b413f6dfcab4e240e98fcc9a69) )
934   ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u11", 0x000002, 0x80000, CRC(94d73843) SHA1(ab236750c67e7fff3af831f1d03f45c45f280fd1) )
935   ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u8",  0x100000, 0x80000, CRC(4cae8a5d) SHA1(3232461afd75ce71f8a2cb4ac7e9a3caeb8aabcd) )
936   ROM_LOAD32_WORD( "dhg4078_cash_chameleon.u12", 0x100002, 0x80000, CRC(39e17f0b) SHA1(25a0364fa45e4e78d6c365b0739606e71597bd71) )
937
938   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
939
940   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
941
942   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
943ROM_END
944
945891ROM_START( goldprmd )
946892   ARISTOCRAT_MK5_BIOS
947893   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
r249939r249940
957903   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
958904ROM_END
959905
960// 569/8 - 10 Credit Multiplier / 9 Line Multiline.
961// Wild Cougar - Export D - 19/05/97.
962// All devices are 27c4002 instead of 27c4096.
963ROM_START( wldcougr )
964   ARISTOCRAT_MK5_BIOS
965   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
966   ROM_LOAD32_WORD( "wild_cougar_export.u7",  0x000000, 0x80000, CRC(7ada053f) SHA1(5102b0b9db505454624750a3fd6db455682538f3) )
967   ROM_LOAD32_WORD( "wild_cougar_export.u11", 0x000002, 0x80000, CRC(69a78695) SHA1(1ed89cf38dc85f752449a858cd9558bed235af58) )
968   ROM_LOAD32_WORD( "wild_cougar_export.u8",  0x100000, 0x80000, CRC(496b0295) SHA1(237183a192ad9b4bc133014cc83149d4a7062785) )
969   ROM_LOAD32_WORD( "wild_cougar_export.u12", 0x100002, 0x80000, CRC(fe2bafdc) SHA1(e8b454db44a532d75b3aff323855340695688f0f) )
970
971   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
972
973   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
974
975   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
976ROM_END
977
978// 593 - 10 Credit Multiplier / 9 Line Multiline.
979// Bumble Bugs - Export D - 05/07/97.
980// All devices are 27c4002 instead of 27c4096.
981// Marked as CHG029604 and 92.691%
982ROM_START( bumblbug )
983   ARISTOCRAT_MK5_BIOS
984   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
989
990   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
991
992   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
993
994   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
995ROM_END
996
997906// 586/7(b) - 10 Credit Multiplier / 9 Line Multiline.
998// Penguin Pays - Export B - 14/07/97.
907// Penguin Pays - Export B - 14/07/97.       
999908// All devices are 27c4002 instead of 27c4096.
1000909ROM_START( pengpays )
1001910   ARISTOCRAT_MK5_BIOS
r249939r249940
1012921   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
1013922ROM_END
1014923
1015// MV4098 - 10 Credit Multiplier / 9 Line Multiline.
1016// BOOT SCOOTIN' - Export A - 25/08/99.
1017// All devices are 27c4002 instead of 27c4096.
1018// Marked as GHG1012 and 92.767%
1019ROM_START( bootsctn )
1020   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
1029
1030   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
1031
1032   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
1033
1034   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
1035ROM_END
1036
1037// MV4104  3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline.
924// MV4104  3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline.
1038925// CUCKOO - Export C - 02/02/00.
1039926// All devices are 27c4002 instead of 27c4096.
1040927ROM_START( cuckoo )
1041928   ARISTOCRAT_MK5_BIOS
1042929   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
1043   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) ) //
930   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) )   //
1044931   ROM_LOAD32_WORD( "mv4104_cuckoo.u11", 0x000002, 0x80000, CRC(4c407deb) SHA1(57589e61a376ddff99cd420eb47bf8c902c6a249) )
1045932   ROM_LOAD32_WORD( "mv4104_cuckoo.u8",  0x100000, 0x80000, CRC(33f52052) SHA1(89cbfe588d91244adff4c520fa94962d69ff20bf) )
1046933   ROM_LOAD32_WORD( "mv4104_cuckoo.u12", 0x100002, 0x80000, CRC(00bb7597) SHA1(f4d6b21091e320a82d59477469340633b001ed0d) )
r249939r249940
1053940ROM_END
1054941
1055942// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
1056// Magic Mask [Reel Game] - Export A - 09/05/2000.
943// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1057944ROM_START( magicmsk )
1058945   ARISTOCRAT_MK5_BIOS
1059946   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
r249939r249940
1070957ROM_END
1071958
1072959// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
1073// Magic Mask [Reel Game] - Export A - 09/05/2000.
960// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1074961// Alternate set with identical description, but way different
1075962// than the parent. All devices are 27c4002 instead of 27c4096.
1076963//
r249939r249940
1095982   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
1096983ROM_END
1097984
1098// MV4124/1 - 5,10,25,50 Credit Multiplier / 20 Line Multiline.
1099// Adonis [Reel Game] - Export B - 31/07/01.
1100// Marked as BHG1284.
1101ROM_START( adonise )
1102   ARISTOCRAT_MK5_BIOS
1103   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
1104   ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u7",  0x000000, 0x80000, CRC(ed6254d7) SHA1(d2b790fdd7f5fc7b78fcfc4c96d0fc272ccf8da6) )
1105   ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u11", 0x000002, 0x80000, CRC(1f629286) SHA1(bce380a6a76c77bc790436bd6f94474a1db0c231) )
1106   ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u8",  0x100000, 0x80000, CRC(b756c96d) SHA1(494df20090d415e83d599023203c13273e7925ad) )
1107   ROM_LOAD32_WORD( "bhg1284_mv4124_adonis.u12", 0x100002, 0x80000, CRC(1d3b6b8f) SHA1(1ddcfd7323cc7e79d3e39d913fdb5cf5cd53d56d) )
1108
1109   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */
1110
1111   ROM_REGION( 0x200000, "vram", ROMREGION_ERASE00 )
1112
1113   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
1114ROM_END
1115
1116985// MV4115/6 - 9/20 Line Multiline Multiplier.
1117986// Party Gras [Reel Game] - Export A - 10/11/2001.
1118987// All devices are 27c4002 instead of 27c4096.
r249939r249940
11461015GAME( 1996, dolphntr,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Dolphin Treasure (0200424V, NSW/ACT)",         MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/1,    B - 06/12/96, Rev 3
11471016GAME( 1996, dolphtra,  dolphntr, aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Dolphin Treasure (0100424V, NSW/ACT)",         MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/1,    B - 06/12/96, Rev 1.24.4.0
11481017GAME( 1996, dolphtre,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Dolphin Treasure (Export)",                    MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/1,    B - 06/12/96
1149GAME( 1996, cashcham,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Cash Chameleon (Export)",                      MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 603(a),   B - 06/12/96
11501018GAME( 1997, goldprmd,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Golden Pyramids (MV4091, USA)",                MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4091,   B - 13/05/97
11511019GAME( 1997, qotn,      0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Queen of the Nile (0200439V, NSW/ACT)",        MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/4,    B - 13/05/97
1152GAME( 1997, qotna,     aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Queen of the Nile (MV4091, NSW/ACT)",          MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4091,   B - 13/05/97 (US-Export HW?)
1153GAME( 1997, wldcougr,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Wild Cougar (Export)",                         MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 569/8,    D - 19/05/97
11541020GAME( 1997, dmdtouch,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Diamond Touch (0400433V, Local)",              MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 604,      E - 30/06/97
1155GAME( 1997, bumblbug,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Bumble Bugs (Export, 92.691%)",                MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 593,      D - 05/07/97
11561021GAME( 1997, pengpays,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Penguin Pays (Export)",                        MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 586/7(b)  B - 14/07/97
11571022GAME( 1998, adonis,    0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Adonis (0200751V, NSW/ACT)",                   MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/9,    A - 25/05/98, Rev 10
11581023GAME( 1998, adonisa,   adonis,   aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Adonis (0100751V, NSW/ACT)",                   MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 602/9,    A - 25/05/98, Rev 9
11591024GAME( 1998, reelrock,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Reelin-n-Rockin (0100779V, Local)",            MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 628,      A - 13/07/98
11601025GAME( 1998, indiandr,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Indian Dreaming (0100845V, Local)",            MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 628/1,    B - 15/12/98
1161GAME( 1998, chariotc,  0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "The Chariot Challenge (04J00714, NSW/ACT)",    MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 630,      A - 10/08/98, Rev 12
11621026GAME( 1999, wtiger,    0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "White Tiger Classic (0200954V, NSW/ACT)",      MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // 638/1,    B - 08/07/99
1163GAME( 1999, bootsctn,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Boot Scootin' (Export, 92.767%)",              MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4098,   A - 25/08/99
11641027GAME( 2000, cuckoo,    aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Cuckoo (MV4104, Export)",                      MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4104,   C - 02/02/00
11651028GAME( 2000, magicmsk,  aristmk5, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Magic Mask (MV4115, Export, set 1)",           MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4115,   A - 09/05/00
11661029GAME( 2000, magicmska, magicmsk, aristmk5_usa, aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Magic Mask (MV4115, Export, set 2)",           MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // MV4115,   A - 09/05/00
11671030GAME( 2000, margmgc,   0,        aristmk5,     aristmk5, aristmk5_state, aristmk5, ROT0,  "Aristocrat", "Margarita Magic (01J00101, NSW/ACT)",          MACHINE_NOT_WORKING|MACHINE_IMPERFECT_SOUND )  // JB005,    A - 07/07/00
11681031GAME( 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
1169GAME( 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
11701032GAME( 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
trunk/src/mame/drivers/atari400.c
r249939r249940
739739
740740   PORT_START("keyboard.1")
741741   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
742   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
742   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) // None!
743743   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
744744   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
745745   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
trunk/src/mame/drivers/bbc.c
r249939r249940
12051205
12061206
12071207static MACHINE_CONFIG_DERIVED( bbcmet, bbcm )
1208   /* sound hardware */
1209   MCFG_DEVICE_REMOVE("mono")
1210   MCFG_DEVICE_REMOVE("sn76489")
1211
12081212   /* printer */
12091213   MCFG_DEVICE_REMOVE("centronics")
12101214
r249939r249940
14991503   ROMX_LOAD("usmos10.rom",  0x40000, 0x4000, CRC(c8e946a9) SHA1(83d91d089dca092d2c8b7c3650ff8143c9069b89), ROM_BIOS(1))
15001504   ROMX_LOAD("usbasic3.rom", 0x3c000, 0x4000, CRC(161b9539) SHA1(b39014610a968789afd7695aa04d1277d874405c), ROM_BIOS(1)) /* rom page 15 3c000 */
15011505
1502   ROM_LOAD("viewa210.rom", 0x30000, 0x4000, CRC(4345359f) SHA1(88c93df1854f5fbe6cd6e5f0e29a8bf4ea3b5614))
1506   ROM_LOAD("viewa210.rom", 0x30000, 0x2e50, CRC(0abd418b) SHA1(e23e5bbc59339cbda87e8dafa8d80116378ac305)) /* Valid size? */
15031507   ROM_LOAD("usdnfs10.rom", 0x38000, 0x4000, CRC(7e367e8c) SHA1(161f585dc45665ea77433c84afd2f95049f7f5a0))
15041508
15051509   ROM_REGION(0x4000, "os", 0)
r249939r249940
19371941COMP ( 1986, bbcm,     0,        bbcb,  bbcm,     bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master 128",                MACHINE_IMPERFECT_GRAPHICS)
19381942COMP ( 1986, bbcmt,    bbcm,     0,     bbcmt,    bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master Turbo",              MACHINE_NOT_WORKING)
19391943COMP ( 1986, bbcmaiv,  bbcm,     0,     bbcmaiv,  bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master AIV",                MACHINE_NOT_WORKING)
1940COMP ( 1986, bbcmet,   bbcm,     0,     bbcmet,   bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master ET",                 MACHINE_IMPERFECT_GRAPHICS)
1944COMP ( 1986, bbcmet,   bbcm,     0,     bbcmet,   bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master ET",                 MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS)
19411945COMP ( 1986, bbcm512,  bbcm,     0,     bbcm512,  bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master 512",                MACHINE_NOT_WORKING)
19421946COMP ( 1986, bbcmarm,  bbcm,     0,     bbcmarm,  bbcm,  bbc_state,   bbc,     "Acorn",    "ARM Evaluation System",         MACHINE_NOT_WORKING)
19431947COMP ( 1986, bbcmc,    0,        bbcm,  bbcmc,    bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master Compact",            MACHINE_IMPERFECT_GRAPHICS)
trunk/src/mame/drivers/beathead.c
r249939r249940
120120   int scanline = param;
121121
122122   /* update the video */
123//  m_screen->update_now();
124   m_screen->update_partial(m_screen->vpos());
123   m_screen->update_now();
125124
126125   /* on scanline zero, clear any halt condition */
127126   if (scanline == 0)
trunk/src/mame/drivers/bublbobl.c
r249939r249940
266266  accesses done by the CPU, including to the YM2203 I/O ports. At the
267267  very least, there should be some filters.
268268
269 there are also Bubble Bobble bootlegs with a P8749H MCU, however the MCU
270 is protected against reading and the main code only differs by 1 byte from
271 Bubble Bobble.  If the MCU were to be dumped that would also make for
272 interesting comparisons.
273
274269***************************************************************************/
275270
276271#include "emu.h"
r249939r249940
561556   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
562557INPUT_PORTS_END
563558
564
565static INPUT_PORTS_START( boblcave )
566   PORT_INCLUDE( boblbobl )
567
568   PORT_MODIFY( "DSW1" ) // not monster speed on this, causes startup hangs just like original bublbobl
569   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )          PORT_DIPLOCATION("DSW-B:7")
570   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )              // must be off (see notes)
571   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
572   PORT_DIPNAME( 0x80, 0x80, "ROM Type" )                  PORT_DIPLOCATION("DSW-B:8")
573   PORT_DIPSETTING(    0x80, "IC52=512kb, IC53=none" )     // will hang on startup if set to wrong type
574   PORT_DIPSETTING(    0x00, "IC52=256kb, IC53=256kb" )
575INPUT_PORTS_END
576
577559static INPUT_PORTS_START( sboblboblb )
578560   PORT_INCLUDE( boblbobl )
579561
r249939r249940
13771359   ROM_LOAD( "pal16l8.u4",  0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) )
13781360ROM_END
13791361
1380ROM_START( bbredux )
1381   ROM_REGION( 0x30000, "maincpu", 0 )
1382   ROM_LOAD( "redux_bb3",          0x00000, 0x8000, CRC(d51de9f3) SHA1(dc6bc93692145563a88c146eeb1d0361e25af840) )
1383   /* ROMs banked at 8000-bfff */
1384   ROM_LOAD( "redux_bb5",          0x10000, 0x8000, CRC(d29d3444) SHA1(3db694a6ba2ba2ed85d31c2bc4c7c94911b99b85) )
1385   ROM_LOAD( "redux_bb4",          0x18000, 0x8000, CRC(984149bd) SHA1(9a0f96eee038712277f652545a343587f711b9aa) )
1386
1387   ROM_REGION( 0x10000, "slave", 0 )   /* 64k for the second CPU */
1388   ROM_LOAD( "a78-08.37",    0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
1389
1390   ROM_REGION( 0x10000, "audiocpu", 0 )    /* 64k for the third CPU */
1391   ROM_LOAD( "a78-07.46",    0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1392
1393   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1394   ROM_LOAD( "a78-09.12",    0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) )    /* 1st plane */
1395   ROM_LOAD( "a78-10.13",    0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) )
1396   ROM_LOAD( "a78-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1397   ROM_LOAD( "a78-12.15",    0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) )
1398   ROM_LOAD( "a78-13.16",    0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) )
1399   ROM_LOAD( "a78-14.17",    0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) )
1400   /* 0x30000-0x3ffff empty */
1401   ROM_LOAD( "a78-15.30",    0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) )    /* 2nd plane */
1402   ROM_LOAD( "a78-16.31",    0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) )
1403   ROM_LOAD( "a78-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1404   ROM_LOAD( "a78-18.33",    0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) )
1405   ROM_LOAD( "a78-19.34",    0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) )
1406   ROM_LOAD( "a78-20.35",    0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) )
1407   /* 0x70000-0x7ffff empty */
1408
1409   ROM_REGION( 0x0100, "proms", 0 )
1410   ROM_LOAD( "a71-25.41",    0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )    /* video timing */
1411
1412   ROM_REGION( 0x0600, "plds", 0 )
1413   ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) )
1414   ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) )
1415   ROM_LOAD( "pal16l8.u4",  0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) )
1416ROM_END
1417
14181362ROM_START( sboblbobl )
14191363   ROM_REGION( 0x30000, "maincpu", 0 )
14201364   ROM_LOAD( "cpu2-3.bin",   0x00000, 0x08000, CRC(2d9107b6) SHA1(ab1a4a20f4b533cd06cc458668f407a8a14c9d70) )
r249939r249940
15151459
15161460
15171461
1518ROM_START( sboblboblc )
1519   ROM_REGION( 0x30000, "maincpu", 0 )
1520   ROM_LOAD( "3",    0x00000, 0x08000, CRC(f2d44846) SHA1(dd1a29f2ff1938c31d4c6199cf970483ceb52485) )
1521   /* ROMs banked at 8000-bfff */
1522   ROM_LOAD( "5",          0x10000, 0x08000, CRC(3c5e4441) SHA1(b85da9d7e0148e950b76036d3f9a3d4a9dfa039c) )
1523   ROM_LOAD( "4",          0x18000, 0x08000, CRC(1f29b5c0) SHA1(c15c84ca11cc10edac6340468bca463ecb2d89e6) )
1524   /* 20000-2ffff empty */
1525
1526   ROM_REGION( 0x10000, "slave", 0 )   /* 64k for the second CPU */
1527   ROM_LOAD( "1",    0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
1528
1529   ROM_REGION( 0x10000, "audiocpu", 0 )    /* 64k for the third CPU */
1530   ROM_LOAD( "2",    0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1531
1532   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1533   ROM_LOAD( "12",    0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) )    /* 1st plane */
1534   ROM_LOAD( "13",    0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) )
1535   ROM_LOAD( "14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1536   ROM_LOAD( "15",    0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) )
1537   ROM_LOAD( "16",    0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) )
1538   ROM_LOAD( "17",    0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) )
1539   /* 0x30000-0x3ffff empty */
1540   ROM_LOAD( "6",     0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) )    /* 2nd plane */
1541   ROM_LOAD( "7",     0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) )
1542   ROM_LOAD( "8",     0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1543   ROM_LOAD( "9",     0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) )
1544   ROM_LOAD( "10",    0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) )
1545   ROM_LOAD( "11",    0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) )
1546   /* 0x70000-0x7ffff empty */
1547
1548   ROM_REGION( 0x0100, "proms", 0 )
1549   ROM_LOAD( "a71-25.41",    0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )    /* video timing */
1550
1551ROM_END
1552
15531462ROM_START( bub68705 )
15541463   ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */
15551464   ROM_LOAD( "2.bin",    0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) )
r249939r249940
16171526ROM_END
16181527
16191528
1620ROM_START( bublcave )
1621   ROM_REGION( 0x30000, "maincpu", 0 )
1622   ROM_LOAD( "bublcave-06.51",    0x00000, 0x08000, CRC(e8b9af5e) SHA1(dec44e47634a402df212806e84e3a810f8442776) )
1623   ROM_LOAD( "bublcave-05.52",    0x10000, 0x10000, CRC(cfe14cb8) SHA1(17d463c755f630ae9d05943515fa4828972bd7b0) )
16241529
1625   ROM_REGION( 0x10000, "slave", 0 )
1626   ROM_LOAD( "bublcave-08.37",    0x0000, 0x08000, CRC(a9384086) SHA1(26e686671d6d3ba3759716bf46e7f951bbb8a291) )
1627
1628   ROM_REGION( 0x10000, "audiocpu", 0 )
1629   ROM_LOAD( "a78-07.46",         0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1630
1631   ROM_REGION( 0x10000, "mcu", 0 )
1632   ROM_LOAD( "a78-01.17",         0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) )
1633
1634   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1635   ROM_LOAD( "bublcave-09.12",    0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) )    /* 1st plane */
1636   ROM_LOAD( "bublcave-10.13",    0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) )
1637   ROM_LOAD( "bublcave-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1638   ROM_LOAD( "bublcave-12.15",    0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) )
1639   ROM_LOAD( "bublcave-13.16",    0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) )
1640   ROM_LOAD( "bublcave-14.17",    0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) )
1641   ROM_LOAD( "bublcave-15.30",    0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) )    /* 2nd plane */
1642   ROM_LOAD( "bublcave-16.31",    0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) )
1643   ROM_LOAD( "bublcave-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1644   ROM_LOAD( "bublcave-18.33",    0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) )
1645   ROM_LOAD( "bublcave-19.34",    0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) )
1646   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
1647
1648   ROM_REGION( 0x0100, "proms", 0 )
1649   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1650ROM_END
1651
1652
1653ROM_START( boblcave )
1654   ROM_REGION( 0x30000, "maincpu", 0 )
1655   ROM_LOAD( "lc12_bb3",          0x00000, 0x08000, CRC(dddc9a24) SHA1(c0b31dd64d7359ae0ea5067db6ac8b54f9415e5a) )
1656   /* ROMs banked at 8000-bfff */
1657   ROM_LOAD( "lc12_bb5",          0x10000, 0x08000, CRC(0bc4de52) SHA1(55581a557dfd60d93642b89eb702c7170458b826) )
1658   ROM_LOAD( "lc12_bb4",          0x18000, 0x08000, CRC(bd7afdf4) SHA1(a9bcdc857b1f252c36a5a70f5027a11737f8dd59) )
1659   /* 20000-2ffff empty */
1660
1661   ROM_REGION( 0x10000, "slave", 0 )   /* 64k for the second CPU */
1662   ROM_LOAD( "bublcave-08.37",    0x0000, 0x08000, CRC(a9384086) SHA1(26e686671d6d3ba3759716bf46e7f951bbb8a291) )
1663
1664   ROM_REGION( 0x10000, "audiocpu", 0 )    /* 64k for the third CPU */
1665   ROM_LOAD( "a78-07.46",    0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1666
1667   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1668   ROM_LOAD( "bublcave-09.12",    0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) )    /* 1st plane */
1669   ROM_LOAD( "bublcave-10.13",    0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) )
1670   ROM_LOAD( "bublcave-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1671   ROM_LOAD( "bublcave-12.15",    0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) )
1672   ROM_LOAD( "bublcave-13.16",    0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) )
1673   ROM_LOAD( "bublcave-14.17",    0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) )
1674   ROM_LOAD( "bublcave-15.30",    0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) )    /* 2nd plane */
1675   ROM_LOAD( "bublcave-16.31",    0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) )
1676   ROM_LOAD( "bublcave-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1677   ROM_LOAD( "bublcave-18.33",    0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) )
1678   ROM_LOAD( "bublcave-19.34",    0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) )
1679   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
1680
1681   ROM_REGION( 0x0100, "proms", 0 )
1682   ROM_LOAD( "a71-25.41",    0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )    /* video timing */
1683
1684   ROM_REGION( 0x0600, "plds", 0 )
1685   ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) )
1686   ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) )
1687   ROM_LOAD( "pal16l8.u4",  0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) )
1688ROM_END
1689
1690
1691ROM_START( bublcave11 )
1692   ROM_REGION( 0x30000, "maincpu", 0 )
1693   ROM_LOAD( "bublcave10-06.51",  0x00000, 0x08000, CRC(185cc219) SHA1(dfb312f144fb01c07581cb8ea55ab0dc92ccd5b2) )
1694   ROM_LOAD( "bublcave11-05.52",  0x10000, 0x10000, CRC(b6b02df3) SHA1(542589544216a54f84c213b161d7145934875d2b) )
1695
1696   ROM_REGION( 0x10000, "slave", 0 )
1697   ROM_LOAD( "bublcave11-08.37",  0x0000, 0x08000, CRC(c5d14e62) SHA1(b32b1ca76b54755a69a7a346d01545f2699e1363) )
1698
1699   ROM_REGION( 0x10000, "audiocpu", 0 )
1700   ROM_LOAD( "a78-07.46",         0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1701
1702   ROM_REGION( 0x10000, "mcu", 0 )
1703   ROM_LOAD( "a78-01.17",         0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) )
1704
1705   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1706   ROM_LOAD( "bublcave-09.12",    0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) )    /* 1st plane */
1707   ROM_LOAD( "bublcave-10.13",    0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) )
1708   ROM_LOAD( "bublcave-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1709   ROM_LOAD( "bublcave-12.15",    0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) )
1710   ROM_LOAD( "bublcave-13.16",    0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) )
1711   ROM_LOAD( "bublcave-14.17",    0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) )
1712   ROM_LOAD( "bublcave-15.30",    0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) )    /* 2nd plane */
1713   ROM_LOAD( "bublcave-16.31",    0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) )
1714   ROM_LOAD( "bublcave-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1715   ROM_LOAD( "bublcave-18.33",    0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) )
1716   ROM_LOAD( "bublcave-19.34",    0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) )
1717   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
1718
1719   ROM_REGION( 0x0100, "proms", 0 )
1720   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1721ROM_END
1722
1723ROM_START( bublcave10 )
1724   ROM_REGION( 0x30000, "maincpu", 0 )
1725   ROM_LOAD( "bublcave10-06.51",  0x00000, 0x08000, CRC(185cc219) SHA1(dfb312f144fb01c07581cb8ea55ab0dc92ccd5b2) )
1726   ROM_LOAD( "bublcave10-05.52",  0x10000, 0x10000, CRC(381cdde7) SHA1(0c9de44d7dbad754e873af8ddb5a2736f5ec2096) )
1727
1728   ROM_REGION( 0x10000, "slave", 0 )
1729   ROM_LOAD( "bublcave10-08.37",  0x0000, 0x08000, CRC(026a68e1) SHA1(9e54310a9f1f5187ea6eb49d9189865b44708a7e) )
1730
1731   ROM_REGION( 0x10000, "audiocpu", 0 )
1732   ROM_LOAD( "a78-07.46",         0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1733
1734   ROM_REGION( 0x10000, "mcu", 0 )
1735   ROM_LOAD( "a78-01.17",         0xf000, 0x1000, CRC(b1bfb53d) SHA1(31b8f31acd3aa394acd80db362774749842e1285) )
1736
1737   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1738   ROM_LOAD( "bublcave-09.12",    0x00000, 0x8000, CRC(b90b7eef) SHA1(de72e4635843ad76248aa3b4aa8f8a0bfd53879e) )    /* 1st plane */
1739   ROM_LOAD( "bublcave-10.13",    0x08000, 0x8000, CRC(4fb22f05) SHA1(880104e86dbd00ae657cbc768722427503b6a59f) )
1740   ROM_LOAD( "bublcave-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1741   ROM_LOAD( "bublcave-12.15",    0x18000, 0x8000, CRC(e49eb49e) SHA1(2e05dc8833e10bef1a317d238c39fb9f362e9997) )
1742   ROM_LOAD( "bublcave-13.16",    0x20000, 0x8000, CRC(61919734) SHA1(2c07e29f3dcc972d5eb47679ad81a0d7656b0cb2) )
1743   ROM_LOAD( "bublcave-14.17",    0x28000, 0x8000, CRC(7e3a13bd) SHA1(bd4dba799340fa599f11cc68e03efe70ba6ba99b) )
1744   ROM_LOAD( "bublcave-15.30",    0x40000, 0x8000, CRC(c253c73a) SHA1(3e187f6b9ca769772990068abe7b309417147d39) )    /* 2nd plane */
1745   ROM_LOAD( "bublcave-16.31",    0x48000, 0x8000, CRC(e66c92ee) SHA1(12ea193c54121d08ad110c94cc075e29fef3ff85) )
1746   ROM_LOAD( "bublcave-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1747   ROM_LOAD( "bublcave-18.33",    0x58000, 0x8000, CRC(47ee2544) SHA1(c6946e824043a312ed437e548a64ef599effbd42) )
1748   ROM_LOAD( "bublcave-19.34",    0x60000, 0x8000, CRC(1ceeb1fa) SHA1(eb29ff896d149f7ab4cf38a338df39df14ccc20c) )
1749   ROM_LOAD( "bublcave-20.35",    0x68000, 0x8000, CRC(64322e24) SHA1(acff8a9fcaf74f198653080759898d15cccf04e8) )
1750
1751   ROM_REGION( 0x0100, "proms", 0 )
1752   ROM_LOAD( "a71-25.41",         0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )   /* video timing */
1753ROM_END
1754
1755ROM_START( bublboblb )
1756   ROM_REGION( 0x30000, "maincpu", 0 )
1757   ROM_LOAD( "bbaladar.3",   0x00000, 0x8000, CRC(31bfc6fb) SHA1(6a72086d415a69b9e5c003ec6cf7858e8c4b346f) )
1758   /* ROMs banked at 8000-bfff */
1759   ROM_LOAD( "bbaladar.5",   0x10000, 0x8000, CRC(16386e9a) SHA1(77fa3f5ecce5c79ba52098c0870482459926b415) )
1760   ROM_LOAD( "bbaladar.4",   0x18000, 0x8000, CRC(0c4bcb07) SHA1(3e3f7fa098d6be61d265cab5258dbd0e279bd8ed) )
1761
1762   ROM_REGION( 0x10000, "slave", 0 )   /* 64k for the second CPU */
1763   ROM_LOAD( "a78-08.37",    0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
1764
1765   ROM_REGION( 0x10000, "audiocpu", 0 )    /* 64k for the third CPU */
1766   ROM_LOAD( "a78-07.46",    0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
1767
1768   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
1769   ROM_LOAD( "a78-09.12",    0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) )    /* 1st plane */
1770   ROM_LOAD( "a78-10.13",    0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) )
1771   ROM_LOAD( "a78-11.14",    0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
1772   ROM_LOAD( "a78-12.15",    0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) )
1773   ROM_LOAD( "a78-13.16",    0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) )
1774   ROM_LOAD( "a78-14.17",    0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) )
1775   /* 0x30000-0x3ffff empty */
1776   ROM_LOAD( "a78-15.30",    0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) )    /* 2nd plane */
1777   ROM_LOAD( "a78-16.31",    0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) )
1778   ROM_LOAD( "a78-17.32",    0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
1779   ROM_LOAD( "a78-18.33",    0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) )
1780   ROM_LOAD( "a78-19.34",    0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) )
1781   ROM_LOAD( "a78-20.35",    0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) )
1782   /* 0x70000-0x7ffff empty */
1783
1784   ROM_REGION( 0x0100, "proms", 0 )
1785   ROM_LOAD( "a71-25.41",    0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) )    /* video timing */
1786
1787   ROM_REGION( 0x0600, "plds", 0 )
1788   ROM_LOAD( "pal16r4.u36", 0x0000, 0x0104, CRC(22fe26ac) SHA1(bbbfcbe6faded4af7ceec57b800297c054a997da) )
1789   ROM_LOAD( "pal16l8.u38", 0x0200, 0x0104, CRC(c02d9663) SHA1(5d23cfd96f072981fd5fcf0dd7e98459da58b662) )
1790   ROM_LOAD( "pal16l8.u4",  0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) )
1791ROM_END
1792
17931530/*************************************
17941531 *
17951532 *  Driver initialization
r249939r249940
18611598GAME( 1986, sboblbobl,  bublbobl, boblbobl, sboblbobl,  bublbobl_state, bublbobl, ROT0,  "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
18621599GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
18631600GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
1864GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked
18651601GAME( 1986, bub68705,   bublbobl, bub68705, bublbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
18661602
18671603GAME( 1987, dland,      bublbobl, boblbobl, dland,      bublbobl_state, dland,    ROT0,  "bootleg", "Dream Land / Super Dream Land (bootleg of Bubble Bobble)", MACHINE_SUPPORTS_SAVE )
1868
1869GAME( 2013, bbredux,    bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Punji)",  "Bubble Bobble ('bootleg redux' hack for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE ) // for use on non-MCU bootleg boards (Bobble Bobble etc.) has more faithful simulation of the protection device (JAN-04-2015 release)
1870GAME( 2013, bublboblb,  bublbobl, boblbobl, boblcave, bublbobl_state, bublbobl, ROT0, "bootleg (Aladar)", "Bubble Bobble (for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE ) // alt bootleg/hack to restore proper MCU behavior to bootleg boards
1871
1872GAME( 2013, bublcave,   bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.2", MACHINE_SUPPORTS_SAVE )
1873GAME( 2013, boblcave,   bublbobl, boblbobl, boblcave, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.2 (for Bobble Bobble PCB)", MACHINE_SUPPORTS_SAVE )
1874
1875GAME( 2012, bublcave11, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.1", MACHINE_SUPPORTS_SAVE )
1876GAME( 2012, bublcave10, bublbobl, bublbobl, bublbobl, bublbobl_state, bublbobl, ROT0, "hack (Bisboch and Aladar)", "Bubble Bobble: Lost Cave V1.0", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/by17.c
r249939r249940
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;
r249939r249940
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 ))
r249939r249940
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 ))
r249939r249940
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")
r249939r249940
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 ))
r249939r249940
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
r249939r249940
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 )
r249939r249940
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
r249939r249940
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   }
r249939r249940
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;
r249939r249940
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;
r249939r249940
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
r249939r249940
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   }
r249939r249940
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)
r249939r249940
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         {
r249939r249940
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   }
r249939r249940
789789// zero-cross detection
790790TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
791791{
792
792793/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
793794
794    -+                          +---+
795   -+                          +---+
795796     |                          |   |
796797     |<-------- 9.30ms -------->|<->|700us
797798     |                          |   |
798    +--------------------------+   +-----
799    +--------------------------+   +-----
799800*/
800801
801802   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249939r249940
824825// 555 timer for display refresh
825826TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer )
826827{
828
827829/*   +--------------------------+   +-----
828830     |                          |   |
829831     |<-------- 2.85ms -------->|<->|300us
r249939r249940
849851
850852DRIVER_INIT_MEMBER( by17_state, by17 )
851853{
854
852855   static const UINT8 solenoid_features_default[20][4] =
853856   {
854857   // This table serves two functions and is configured on a per game basis:
r249939r249940
857860
858861   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
859862   /*00*/  { 0x00, 0x00,  0x00, 0x00 },
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
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
866869   /*07*/  { 0x00, 0x00,  0x00, 0x00 },
867870   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
868871   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249939r249940
871874   /*12*/  { 0x00, 0x00,  0x00, 0x00 },
872875   /*13*/  { 0x02, 0x00,  0x00, 0x00 },
873876   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
874   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
877   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
875878   //  { Sound Channel, Sound engage, Sound release, Not Used }
876879   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
877   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
878   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
880   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
881   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
879882   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
880883   };
881884
r249939r249940
889892
890893DRIVER_INIT_MEMBER( by17_state, matahari )
891894{
895
892896   static const UINT8 solenoid_features_matahari[20][4] =
893897   {
894898   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
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
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
911915   //  { Sound Channel, Sound engage, Sound release, Not Used }
912916   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
913   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
914   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
917   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
918   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
915919   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
916920   };
917921
r249939r249940
925929
926930DRIVER_INIT_MEMBER( by17_state, pwerplay )
927931{
932
928933   static const UINT8 solenoid_features_pwerplay[20][4] =
929934   {
930935   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
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
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
947952   //  { Sound Channel, Sound engage, Sound release, Not Used }
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
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
951956   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
952957   };
953958
r249939r249940
972977   m_u11a = 0;
973978   m_u11b = 0;
974979   m_lamp_decode = 0x0f;
975   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
980   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
976981   m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = 0;
977982}
978983
r249939r249940
980985
981986static MACHINE_CONFIG_START( by17, by17_state )
982987   /* basic machine hardware */
983   MCFG_CPU_ADD("maincpu", M6800, 530000)  // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
988   MCFG_CPU_ADD("maincpu", M6800, 530000)   // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
984989   MCFG_CPU_PROGRAM_MAP(by17_map)
985990
986991   MCFG_MACHINE_RESET_OVERRIDE( by17_state, by17 )
987992
988   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
993   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
989994
990995   /* Video */
991996   MCFG_DEFAULT_LAYOUT(layout_by17)
trunk/src/mame/drivers/by35.c
r249939r249940
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)
r249939r249940
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")
r249939r249940
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 ))
r249939r249940
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 ))
r249939r249940
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")
r249939r249940
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 ))
r249939r249940
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
r249939r249940
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")
r249939r249940
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)
r249939r249940
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   }
r249939r249940
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;
r249939r249940
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;
r249939r249940
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;
r249939r249940
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
r249939r249940
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   }
r249939r249940
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)
r249939r249940
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         {
r249939r249940
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   }
r249939r249940
803803// zero-cross detection
804804TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
805805{
806
806807/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
807808
808    -+                          +---+
809   -+                          +---+
809810     |                          |   |
810811     |<-------- 9.30ms -------->|<->|700us
811812     |                          |   |
812    +--------------------------+   +-----
813    +--------------------------+   +-----
813814*/
814815
815816   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249939r249940
838839// 555 timer for display refresh
839840TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer )
840841{
842
841843/*   +--------------------------+   +-----
842844     |                          |   |
843845     |<-------- 2.85ms -------->|<->|300us
r249939r249940
873875      m_discrete->write(space, NODE_04, ((m_snd_div & 0x04)>>2) * 1);
874876      m_discrete->write(space, NODE_01, ((m_snd_div & 0x01)>>0) * 1);
875877
876//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
878//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
877879   }
878880}
879881
r249939r249940
885887   if ((m_u11a & 0x02) == 0) offs |= 0x10;
886888   {
887889      m_snd_sel = m_snd_prom[offs];
888//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
890//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
889891      m_snd_sel = BITSWAP8(m_snd_sel,0,1,2,3,4,5,6,7);
890892
891893      m_snd_tone_gen = m_snd_sel;
892//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
894//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
893895   }
894896
895897   m_discrete->write(space, NODE_08, 0);
r249939r249940
903905
904906DRIVER_INIT_MEMBER( by35_state, by35_6 )
905907{
908
906909   static const UINT8 solenoid_features_default[20][4] =
907910   {
908911   // This table serves two functions and is configured on a per game basis:
r249939r249940
915918   /*02*/  { 0x00, 0x00,  0x00, 0x00 },
916919   /*03*/  { 0x00, 0x00,  0x00, 0x00 },
917920   /*04*/  { 0x00, 0x00,  0x00, 0x00 },
918   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
919   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
921   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
922   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
920923   /*07*/  { 0x00, 0x0a,  0x00, 0x00 },
921924   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
922925   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249939r249940
925928   /*12*/  { 0x00, 0x0b,  0x00, 0x00 },
926929   /*13*/  { 0x02, 0x07,  0x00, 0x00 },
927930   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
928   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
931   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
929932   //  { Sound Channel, Sound engage, Sound release, Not Used }
930933   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
931   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
932   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
934   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
935   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
933936   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
934937   };
935938
r249939r249940
946949
947950DRIVER_INIT_MEMBER( by35_state, playboy )
948951{
952
949953   static const UINT8 solenoid_features_playboy[20][4] =
950954   {
951955   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
r249939r249940
954958   /*02*/  { 0xff, 0xff,  0x00, 0x00 },
955959   /*03*/  { 0xff, 0xff,  0x00, 0x00 },
956960   /*04*/  { 0xff, 0xff,  0x00, 0x00 },
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
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
966970   /*14*/  { 0xff, 0xff,  0x00, 0x00 },
967   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
971   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
968972   //  { Sound Channel, Sound engage, Sound release, Not Used }
969973   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
970   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
971   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
974   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
975   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
972976   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
973977   };
974978
r249939r249940
10051009   m_u11a = 0;
10061010   m_u11b = 0;
10071011   m_lamp_decode = 0x0f;
1008   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
1012   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
10091013   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;
10101014}
10111015
r249939r249940
10221026      {0, 0, 0, 0},                                 /* r_node */
10231027      {0, 0},                                       /* c{} */
10241028      0,                                            /* rI  */
1025//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
1029//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
10261030      RES_K(10),                                    /* rF  */   // not really
10271031      CAP_U(0.01),                                  /* cF  */
10281032      0,                                            /* cAmp */
r249939r249940
10441048
10451049static DISCRETE_SOUND_START(as2888)
10461050
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
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
10501054
1051   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1) // 2
1055   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1)   // 2
10521056   DISCRETE_DIVIDE(NODE_14, 1, NODE_04, 1)
10531057
10541058
1055   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
1059   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
10561060#if 0
1057   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))     // T1 filter
1061   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))      // T1 filter
10581062   DISCRETE_ADDER2(NODE_07, 1, NODE_05, NODE_06)
10591063#else
10601064
1061   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
1065   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
10621066#endif
10631067   DISCRETE_RCDISC5(NODE_87, 1, NODE_08, RES_K(150), CAP_U(1.0))
10641068
10651069   DISCRETE_RCFILTER_VREF(NODE_88,NODE_87,RES_M(1),CAP_U(0.01),2)
1066   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)    // Apply sustain
1070   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)   // Apply sustain
10671071
10681072   DISCRETE_OP_AMP_FILTER(NODE_20, 1, NODE_09, 0, DISC_OP_AMP_FILTER_IS_HIGH_PASS_1, &as2888_preamp_info)
10691073
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.
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.
10711075
1072   DISCRETE_GAIN(NODE_30, NODE_25, 50) // Output amplifier LM380 fixed inbuilt gain of 50
1076   DISCRETE_GAIN(NODE_30, NODE_25, 50)   // Output amplifier LM380 fixed inbuilt gain of 50
10731077
10741078   DISCRETE_OUTPUT(NODE_30, 10000000)  //  17000000
10751079DISCRETE_SOUND_END
r249939r249940
10831087
10841088   MCFG_MACHINE_RESET_OVERRIDE( by35_state, by35 )
10851089
1086   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
1090   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
10871091
10881092   /* Video */
10891093   MCFG_DEFAULT_LAYOUT(layout_by35)
r249939r249940
21232127/ 301/Bulls Eye
21242128/-------------------------------*/
21252129ROM_START(bullseye)
2126   ROM_REGION(0x8000, "maincpu", 0)    // Actually seems to have an address mask of 0x3fff
2130   ROM_REGION(0x8000, "maincpu", 0)   // Actually seems to have an address mask of 0x3fff
21272131   ROM_LOAD("bull.u2", 0x2000, 0x1000, CRC(a2951aa2) SHA1(f9c0826c5d1d6d904286678ed90de3850a13b5f4))
21282132   ROM_LOAD("bull.u6", 0x3000, 0x1000, CRC(64d4b9c4) SHA1(bf4d0671372fd3a445c4c7330b9849171ca8048c))
21292133   ROM_RELOAD( 0x7000, 0x1000)
trunk/src/mame/drivers/cardline.c
r249939r249940
139139{
140140   /* update any video up to the current scanline */
141141   m_hsync_q = (state ? 0x00 : 0x10);
142//  m_screen->update_now();
143   m_screen->update_partial(m_screen->vpos());
142   m_screen->update_now();
144143}
145144
146145WRITE_LINE_MEMBER(cardline_state::vsync_changed)
trunk/src/mame/drivers/cave.c
r249939r249940
7272     PCBs were shown running (and could be played) at a Cave fan show known as Cave Festival 2006. There are
7373     videos of the game being played floating around the internet and on YouTube. AKA DDP-CV or DDP BLUE ROM
7474
75  Dodonpachi Arrange: This version is a hack by trap15 and ment to be a tribute to the game. It is neither a
76                      long lost version or official release from Cave and therefore not suitable for MAME.
77
78     Known rom version 1.1:
79        File     CRC32    SHA1
80       ---------------------------------------------------------
81       u27.bin 44b899ae 798ec437d861b94fcd90c99a7015dd420887c788
82       u26.bin 727a09a8 91876386855f19e8a3d8d1df71dfe9b3d98e9ea9
83       u51.bin 0f3e5148 3016f4d075940feae691389606cd2aa7ac53849e
84       u62.bin 42e4c6c5 4d282f7592f5fc5e11839c57f39cae20b8422aa1
85
7586***************************************************************************/
7687
7788#include "emu.h"
r249939r249940
31513162ROM_END
31523163
31533164
3154ROM_START( ddonpacha )
3155   ROM_REGION( 0x100000, "maincpu", 0 )        /* 68000 Code */
3156   ROM_LOAD16_BYTE( "arrange_u27.bin", 0x000000, 0x080000, CRC(44b899ae) SHA1(798ec437d861b94fcd90c99a7015dd420887c788) )
3157   ROM_LOAD16_BYTE( "arrange_u26.bin", 0x000001, 0x080000, CRC(727a09a8) SHA1(91876386855f19e8a3d8d1df71dfe9b3d98e9ea9) )
3158
3159   ROM_REGION( 0x800000 * 2, "sprites0", 0 )       /* Sprites: * 2 */
3160   ROM_LOAD( "u50.bin", 0x000000, 0x200000, CRC(14b260ec) SHA1(33bda210302428d5500115d0c7a839cdfcb67d17) )
3161   ROM_LOAD( "arrange_u51.bin", 0x200000, 0x200000, CRC(0f3e5148) SHA1(3016f4d075940feae691389606cd2aa7ac53849e) )
3162   ROM_LOAD( "u52.bin", 0x400000, 0x200000, CRC(02492ee0) SHA1(64d9cc64a4ad189a8b03cf6a749ddb732b4a0014) )
3163   ROM_LOAD( "u53.bin", 0x600000, 0x200000, CRC(cb4c10f0) SHA1(a622e8bd0c938b5d38b392b247400b744d8be288) )
3164
3165   ROM_REGION( 0x200000, "layer0", 0 ) /* Layer 0 */
3166   ROM_LOAD( "u60.bin", 0x000000, 0x200000, CRC(903096a7) SHA1(a243e903fef7c4a7b71383263e82e42acd869261) )
3167
3168   ROM_REGION( 0x200000, "layer1", 0 ) /* Layer 1 */
3169   ROM_LOAD( "u61.bin", 0x000000, 0x200000, CRC(d89b7631) SHA1(a66bb4955ca58fab8973ca37a0f971e9a67ce017) )
3170
3171   ROM_REGION( 0x200000, "layer2", 0 ) /* Layer 2 */
3172   ROM_LOAD( "arrange_u62.bin", 0x000000, 0x200000, CRC(42e4c6c5) SHA1(4d282f7592f5fc5e11839c57f39cae20b8422aa1) )
3173
3174   ROM_REGION( 0x400000, "ymz", 0 )    /* Samples */
3175   ROM_LOAD( "u6.bin", 0x000000, 0x200000, CRC(9dfdafaf) SHA1(f5cb450cdc78a20c3a74c6dac05c9ac3cba08327) )
3176   ROM_LOAD( "u7.bin", 0x200000, 0x200000, CRC(795b17d5) SHA1(cbfc29f1df9600c82e0fdae00edd00da5b73e14c) )
3177
3178   ROM_REGION16_BE( 0x80, "eeprom", 0 )
3179   ROM_LOAD16_WORD( "eeprom-ddonpach.bin", 0x0000, 0x0080, CRC(2df16438) SHA1(4881b70589a97e2420feb6d6e6737273beeff303) )
3180ROM_END
3181
31823165/***************************************************************************
31833166
31843167                                Donpachi
r249939r249940
50605043
50615044GAME( 1997, ddonpach,   0,        ddonpach, cave, cave_state,     ddonpach, ROT270, "Cave (Atlus license)",                   "DoDonPachi (International, Master Ver. 97/02/05)", MACHINE_SUPPORTS_SAVE )
50625045GAME( 1997, ddonpachj,  ddonpach, ddonpach, cave, cave_state,     ddonpach, ROT270, "Cave (Atlus license)",                   "DoDonPachi (Japan, Master Ver. 97/02/05)",         MACHINE_SUPPORTS_SAVE )
5063// 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 )
50655046
5066
50675047GAME( 1998, dfeveron,   feversos, dfeveron, cave, cave_state,     dfeveron, ROT270, "Cave (Nihon System license)",            "Dangun Feveron (Japan, Ver. 98/09/17)",    MACHINE_SUPPORTS_SAVE )
50685048GAME( 1998, feversos,   0,        dfeveron, cave, cave_state,     feversos, ROT270, "Cave (Nihon System license)",            "Fever SOS (International, Ver. 98/09/25)", MACHINE_SUPPORTS_SAVE )
50695049
trunk/src/mame/drivers/champbas.c
r249939r249940
40407001      8910 control
41418ff0-8fff sprites
4242a000      ?
43a006      MCU HALT control
43a006      MCU HALT controll
4444a007      NOP (MCU shared RAM switch)
4545a060-a06f sprites
4646a080      command for the sound CPU
r249939r249940
8686#include "emu.h"
8787#include "cpu/z80/z80.h"
8888#include "cpu/alph8201/alph8201.h"
89//#include "cpu/hmcs40/hmcs40.h"
9089#include "sound/ay8910.h"
9190#include "sound/dac.h"
9291#include "includes/champbas.h"
r249939r249940
568567
569568/*************************************
570569 *
571 *  Machine drivers
570 *  Machine driver
572571 *
573572 *************************************/
574573
r249939r249940
582581MACHINE_START_MEMBER(champbas_state,exctsccr)
583582{
584583   // FIXME
585   // I dun wanna
586584   machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */
587585
588586   MACHINE_START_CALL_MEMBER(champbas);
r249939r249940
597595
598596INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq)
599597{
600   if (m_irq_mask)
598   if(m_irq_mask)
601599      device.execute().set_input_line(0, ASSERT_LINE);
602600}
603601
r249939r249940
610608   MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state,  vblank_irq)
611609
612610   /* MCU */
613   MCFG_CPU_ADD("mcu", ALPHA8201, XTAL_18_432MHz/6/8)
611   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8)
614612   MCFG_CPU_PROGRAM_MAP(mcu_map)
615613
616614   MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
r249939r249940
683681   /* basic machine hardware */
684682
685683   /* MCU */
686   MCFG_CPU_ADD("mcu", ALPHA8201, XTAL_18_432MHz/6/8)
684   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8)
687685   MCFG_CPU_PROGRAM_MAP(mcu_map)
688686
689687   /* to MCU timeout champbbj */
r249939r249940
704702   MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse,  4000) /* 4 kHz, updates the dac */
705703
706704   /* MCU */
707   MCFG_CPU_ADD("mcu", ALPHA8301, XTAL_18_432MHz/6/8)     /* Actually 8302 */
705   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8301, XTAL_18_432MHz/6/8)     /* Actually 8302 */
708706   MCFG_CPU_PROGRAM_MAP(mcu_map)
709707
710708   MCFG_MACHINE_START_OVERRIDE(champbas_state,exctsccr)
trunk/src/mame/drivers/chicago.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
101101
102102WRITE16_MEMBER(cubeqst_state::palette_w)
103103{
104//  m_screen->update_now();
105   m_screen->update_partial(m_screen->vpos());
106
104   m_screen->update_now();
107105   COMBINE_DATA(&m_generic_paletteram_16[offset]);
108106}
109107
trunk/src/mame/drivers/dec0.c
r249939r249940
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/dkong.c
r249939r249940
21272127   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
21282128ROM_END
21292129
2130ROM_START( dkongpe )
2131   ROM_REGION( 0x10000, "maincpu", 0 )
2132   ROM_LOAD( "c_5et_g.bin",  0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) )
2133   ROM_LOAD( "c_5ct_gp.bin", 0x1000, 0x1000, CRC(45af403e) SHA1(6030a4af7df98bfdf5b35a9a42541566f7d12901) )
2134   ROM_LOAD( "c_5bt_gp.bin", 0x2000, 0x1000, CRC(3a9783b7) SHA1(e98d757c048f2180ba22c774e0e425ddc661ba8c) )
2135   ROM_LOAD( "c_5at_gp.bin", 0x3000, 0x1000, CRC(32bc20ff) SHA1(ef141f437912923625722b83a33ea182eaa31427) )
2136
2137   ROM_REGION( 0x1800, "soundcpu", 0 )
2138   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
2139   ROM_RELOAD(               0x0800, 0x0800 )
2140   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
2141
2142   ROM_REGION( 0x1000, "gfx1", 0 )
2143   ROM_LOAD( "v_5h_bp.bin",  0x0000, 0x0800, CRC(007aa348) SHA1(ff2ae583fef6da9d260fda8f4a896dd0414c3388) )
2144   ROM_LOAD( "v_3ptp.bin",   0x0800, 0x0800, CRC(a967aff0) SHA1(7bcfdbeb0a5cdfec604eb8450664bc4b789526be) )
2145
2146   ROM_REGION( 0x2000, "gfx2", 0 )
2147   ROM_LOAD( "l_4m_bp.bin",  0x0000, 0x0800, CRC(766ae006) SHA1(0ec53798aa2c30b2c5c8b2f99b811a187faa2549) )
2148   ROM_LOAD( "l_4n_bp.bin",  0x0800, 0x0800, CRC(39e7ca4b) SHA1(b77ddd39608d08013fa8bb764c8e5aa4e03181dc) )
2149   ROM_LOAD( "l_4r_bp.bin",  0x1000, 0x0800, CRC(012f2f25) SHA1(836709192a249b00ded783be542ee844eb930c7a) )
2150   ROM_LOAD( "l_4s_bp.bin",  0x1800, 0x0800, CRC(84eb5bfb) SHA1(c1f38efb8670f1a489275eb8ff576a95d140cfb9) )
2151
2152   ROM_REGION( 0x0300, "proms", 0 )
2153   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) )
2154   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) )
2155   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) )
2156ROM_END
2157
21582130ROM_START( dkongf ) /* Donkey Kong Foundry (hack) from Jeff's Romhack */
21592131   ROM_REGION( 0x10000, "maincpu", 0 )
21602132   ROM_LOAD( "dk_f.5et",  0x0000, 0x1000, CRC(00b7efaf) SHA1(97ed5930eb5d0cb98a9008b1d329ba7f3b8b8dbf) )
r249939r249940
33233295GAME( 2004, dkongf,    dkong,    dkong2b,   dkongf,   driver_device, 0,        ROT90,  "hack (Jeff Kulczycki)", "Donkey Kong Foundry (hack)", MACHINE_SUPPORTS_SAVE ) /* from Jeff's Romhack */
33243296GAME( 2006, dkongx,    dkong,    braze,     dkongx,   dkong_state,   dkongx,   ROT90,  "hack (Braze Technologies)", "Donkey Kong II: Jumpman Returns (hack, V1.2)", MACHINE_SUPPORTS_SAVE )
33253297GAME( 2006, dkongx11,  dkong,    braze,     dkongx,   dkong_state,   dkongx,   ROT90,  "hack (Braze Technologies)", "Donkey Kong II: Jumpman Returns (hack, V1.1)", MACHINE_SUPPORTS_SAVE )
3326GAME( 2013, dkongpe,   dkong,    dkong2b,   dkong,    driver_device, 0,        ROT90,  "hack (Clay Cowgill and Mike Mika)", "Donkey Kong: Pauline Edition Rev 5 (2013-04-22)", MACHINE_SUPPORTS_SAVE )
33273298
33283299GAME( 1982, dkongjr,   0,        dkongjr,   dkongjr,  driver_device, 0,        ROT90,  "Nintendo of America", "Donkey Kong Junior (US set F-2)", MACHINE_SUPPORTS_SAVE )
33293300GAME( 1982, dkongjrj,  dkongjr,  dkongjr,   dkongjr,  driver_device, 0,        ROT90,  "Nintendo", "Donkey Kong Jr. (Japan)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/ec184x.c
r249939r249940
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
r249939r249940
4343
4444   required_device<cpu_device> m_maincpu;
4545
46   DECLARE_MACHINE_RESET(ec1841);
46   DECLARE_MACHINE_RESET(ec184x);
4747   DECLARE_DRIVER_INIT(ec1841);
4848
4949   struct {
r249939r249940
7979   UINT8 data;
8080
8181   data = offset % 4;
82   if (data >= m_memory.boards)
82   if (data > m_memory.boards)
8383      data = 0xff;
8484   else
8585      data = m_memory.enable[data];
86   DBG_LOG(1,"ec1841_memboard",("R (%d of %d) == %02X\n", offset+1, m_memory.boards, data ));
86   DBG_LOG(1,"ec1841_memboard",("R (%d of %d) == %02X\n", offset, m_memory.boards, data ));
8787
8888   return data;
8989}
r249939r249940
9696
9797   current = m_memory.enable[offset];
9898
99   DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset+1, m_memory.boards, data, current));
99   DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset, m_memory.boards, data, current));
100100
101   if (offset >= m_memory.boards) {
101   if (offset > m_memory.boards) {
102102      return;
103103   }
104104
r249939r249940
140140   address_space &program = m_maincpu->space(AS_PROGRAM);
141141   ram_device *m_ram = machine().device<ram_device>(RAM_TAG);
142142
143   m_memory.boards = m_ram->size()/EC1841_MEMBOARD_SIZE;
144   if (m_memory.boards > 4)
145      m_memory.boards = 4;
143   m_memory.boards = m_ram->size()/EC1841_MEMBOARD_SIZE - 1;
144   if (m_memory.boards > 3)
145      m_memory.boards = 3;
146146
147147   // 640K configuration is special -- 512K board mapped at 0 + 128K board mapped at 512K
148148   // XXX verify this was actually the case
r249939r249940
157157   membank( "bank20" )->set_base( m_ram->pointer() );
158158}
159159
160MACHINE_RESET_MEMBER( ec184x_state, ec1841 )
160MACHINE_RESET_MEMBER( ec184x_state, ec184x )
161161{
162162   memset(m_memory.enable, 0, sizeof(m_memory.enable));
163163   // mark 1st board enabled
r249939r249940
255255   MCFG_CPU_IO_MAP(ec1841_io)
256256   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
257257
258   MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec1841)
258   MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec184x)
259259
260260   MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu")
261261   MCFG_DEVICE_INPUT_DEFAULTS(ec1841)
trunk/src/mame/drivers/electron.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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/exelv.c
r249939r249940
523523   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "exelvision_cart")
524524   MCFG_GENERIC_EXTENSIONS("bin,rom")
525525
526   MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100")
526   MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100_cart")
527527MACHINE_CONFIG_END
528528
529529
trunk/src/mame/drivers/firefox.c
r249939r249940
267267
268268TIMER_DEVICE_CALLBACK_MEMBER(firefox_state::video_timer_callback)
269269{
270//  m_screen->update_now();
271   m_screen->update_partial(m_screen->vpos());
270   m_screen->update_now();
272271
273272   m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE );
274273}
trunk/src/mame/drivers/galaxian.c
r249939r249940
52355235   // change spriteram base per each 64-line part of the screen
52365236   if ((split & 0x3f) == 0)
52375237   {
5238//      m_screen->update_now();
5239      m_screen->update_partial(m_screen->vpos());
5238      m_screen->update_now();
52405239      m_sprites_base = 0x40 | (split << 2 & 0x300);
52415240   }
52425241}
r249939r249940
53465345   /* alternate memory map */
53475346   MCFG_CPU_MODIFY("maincpu")
53485347   MCFG_CPU_PROGRAM_MAP(mooncrst_map_base)     /* no discrete sound ! */
5349
5348   
53505349   MCFG_CPU_MODIFY("audiocpu")
53515350   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, galaxian_state, froggermc_audiocpu_irq_ack)
53525351MACHINE_CONFIG_END
trunk/src/mame/drivers/galaxold.c
r249939r249940
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
r249939r249940
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 -
r249939r249940
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/goldstar.c
r249939r249940
90339033ROM_END
90349034
90359035
9036ROM_START( cmast99 )
9037   ROM_REGION( 0x10000, "maincpu", 0 )
9038   ROM_LOAD( "cm99-041-8.u81", 0x0000, 0x1000, CRC(e0872d9f) SHA1(6d8f5e09e5c9daf834d5c74434eae86e5dd7e194) )
9039   ROM_CONTINUE(0x4000,0x1000)
9040   ROM_CONTINUE(0x3000,0x1000)
9041   ROM_CONTINUE(0x7000,0x1000)
9042   ROM_CONTINUE(0x1000,0x1000)
9043   ROM_CONTINUE(0x6000,0x1000) /* maybe wrong */
9044   ROM_CONTINUE(0x2000,0x1000)
9045   ROM_CONTINUE(0x5000,0x1000) /* maybe wrong */
9046   ROM_CONTINUE(0x8000,0x1000)
9047   ROM_CONTINUE(0x9000,0x1000) /* maybe wrong */
9048   ROM_CONTINUE(0xa000,0x1000) /* maybe wrong */
9049   ROM_CONTINUE(0xb000,0x1000) /* maybe wrong */
9050   ROM_CONTINUE(0xc000,0x1000) /* maybe wrong */
9051   ROM_CONTINUE(0xd000,0x3000) /* padding that isn't visible to CPU (RAM mapped here) */
9052
9053   ROM_REGION( 0x18000, "gfx1", 0 )
9054   ROM_LOAD( "cm99-041-7.u16", 0x00000, 0x8000, CRC(69e2aef2) SHA1(195faec239734650dcd777d55a8da84e3a0ed50c) )
9055   ROM_LOAD( "cm99-041-6.u11", 0x08000, 0x8000, CRC(900f36f5) SHA1(0fd41f8c8cb2f7940b653a1fad93df2e3f28a34b) )
9056   ROM_LOAD( "cm99-041-5.u4",  0x10000, 0x8000, CRC(3e465e38) SHA1(847dc27e45d495cb924b3fd5ce8e68a1cb83ffc8) )
9057
9058   ROM_REGION( 0x8000, "gfx2", 0 )
9059   ROM_LOAD( "cm99-041-4.u15", 0x0000, 0x2000, CRC(6b870b29) SHA1(d65f24817d9d45c148cb857439b46e9e75dabfe7) )
9060   ROM_LOAD( "cm99-041-3.u10", 0x2000, 0x2000, CRC(8a0b205f) SHA1(3afea0464b793526bf23610cac6736a31edc7ec2) )
9061   ROM_LOAD( "cm99-041-2.u14", 0x4000, 0x2000, CRC(c84dba45) SHA1(ab4ac891a23d6b9a216df046d516e868c77e8a36) )
9062   ROM_LOAD( "cm99-041-1.u9",  0x6000, 0x2000, CRC(44046c31) SHA1(c9703ce2371cf86bc597e5fdb9c0d4dd6d91f7dc) )
9063
9064   ROM_REGION( 0x10000, "user1", 0 )
9065   ROM_FILL( 0x0000, 0x10000, 0xff ) // U53 (girl bitmaps) not populated
9066
9067   /* proms taken from cmv4, probably wrong  */
9068   ROM_REGION( 0x200, "proms", 0 )
9069   ROM_LOAD( "82s129.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) BAD_DUMP )
9070   ROM_LOAD( "82s129.u70", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) BAD_DUMP )
9071
9072   ROM_REGION( 0x100, "proms2", 0 )
9073   ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) BAD_DUMP )
9074ROM_END
9075
9076
90779036ROM_START( chryangl )
90789037   ROM_REGION( 0x10000, "maincpu", 0 )
90799038   ROM_LOAD( "8.u6",  0x0000, 0x10000, CRC(331961e4) SHA1(50c7e0e983aed1f199f238442bb8fafce1849f84) )
r249939r249940
1331613275GAMEL( 1991, cmasterd,  cmaster,  cm,       cmasterb, cmaster_state,  cmv4,      ROT0, "Dyna",              "Cherry Master I (ver.1.01, set 5)",           0,                 layout_cmasterb )
1331713276GAMEL( 1991, cmastere,  cmaster,  cm,       cmasterb, cmaster_state,  cmv4,      ROT0, "Dyna",              "Cherry Master I (ver.1.01, set 6)",           0,                 layout_cmasterb )
1331813277GAMEL( 1991, cmasterf,  cmaster,  cm,       cmasterb, cmaster_state,  cmv4,      ROT0, "Dyna",              "Cherry Master I (ver.1.01, set 7)",           0,                 layout_cmasterb )
13319GAME(  199?, cmast99,   0,        cm,       cmv4,     cmaster_state,  cmv4,      ROT0, "????",              "Cherry Master '99",                           MACHINE_NOT_WORKING )
1332013278
1332113279
1332213280GAMEL( 1991, tonypok,   0,        cm,       tonypok,  cmaster_state,  tonypok,   ROT0, "Corsica",           "Poker Master (Tony-Poker V3.A, hack?)",       0 ,                layout_tonypok )
trunk/src/mame/drivers/i7000.c
r249939r249940
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
r249939r249940
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()
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
191191#include "emu.h"
192192#include "cdrom.h"
193193#include "cpu/powerpc/ppc.h"
194#include "imagedev/chd_cd.h"
195194
195
196196struct CDE_DMA
197197{
198198   UINT32 dst_addr;
r249939r249940
11871187
11881188   MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB("palette")
11891189
1190      /*cd-rom*/
1191   MCFG_CDROM_ADD( "cdrom" )
1192   MCFG_CDROM_INTERFACE("3do_m2_cdrom")
11931190
1194   MCFG_SOFTWARE_LIST_ADD("cd_list","3do_m2")
1195
11961191MACHINE_CONFIG_END
11971192
11981193
trunk/src/mame/drivers/lindbergh.c
r249939r249940
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
r249939r249940
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
r249939r249940
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.
6269
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.
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)
6974
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)
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.
7479
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.
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
7983
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
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.
8394
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.
9495
9596
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?
r249939r249940
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.
r249939r249940
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
r249939r249940
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
960ADDRESS_MAP_END \
961
961962/*                         WORKRAM */
962963M81_CPU1_MEMORY( xmultipl, 0x9c000 )
963964M81_CPU1_MEMORY( dbreed,   0x88000 )
r249939r249940
978979   AM_RANGE(PALETTERAM2, PALETTERAM2+0xbff) AM_READWRITE(palette2_r, palette2_w) AM_SHARE("paletteram2") \
979980   AM_RANGE(0xe0000, 0xe3fff) AM_RAM   /* work RAM */ \
980981   AM_RANGE(0xffff0, 0xfffff) AM_ROM \
981ADDRESS_MAP_END
982ADDRESS_MAP_END \
983
982984M84_CPU1_MEMORY( rtype2,  0xd0000, 0xc8000, 0xd8000 )
983985M84_CPU1_MEMORY( hharryu, 0xd0000, 0xa0000, 0xa8000 )
984986M84_CPU1_MEMORY( kengo,   0x80000, 0xa0000, 0xa8000 )
r249939r249940
19861988
19871989   MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) // different offsets
19881990MACHINE_CONFIG_END
1989
1991
19901992static MACHINE_CONFIG_DERIVED( m81_dbreed, m81_xmultipl )
19911993   MCFG_CPU_MODIFY("maincpu")
19921994   MCFG_CPU_PROGRAM_MAP(dbreed_map)
r249939r249940
20472049   MCFG_CPU_PROGRAM_MAP(kengo_map)
20482050   MCFG_CPU_IO_MAP(m84_v33_portmap)
20492051//#ifndef USE_HACKED_IRQS
2050//  MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
2052//   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
20512053//#endif
20522054
20532055   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
r249939r249940
20562058   MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
20572059                        /* IRQs are generated by main Z80 and YM2151 */
20582060
2059//  MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2060
2061//   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2062                       
20612063   MCFG_MACHINE_START_OVERRIDE(m72_state,kengo)
20622064   MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo)
20632065
r249939r249940
20832085
20842086/****************************************** M82 ***********************************************/
20852087
2086/* Major Title uses
2088/* Major Title uses
20872089
20882090M82-A-A as the top board
20892091M82-B-A and as the bottom board
r249939r249940
21212123MACHINE_CONFIG_END
21222124
21232125
2124/* Pound for Pound uses
2126/* Pound for Pound uses
21252127  M85-A-B / M85-B
21262128*/
21272129
r249939r249940
21412143                        /* IRQs are generated by main Z80 and YM2151 */
21422144
21432145   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2144
2146         
21452147   /* video hardware */
21462148   MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2)
21472149   MCFG_PALETTE_ADD("palette", 512)
r249939r249940
34723474
34733475   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-A */
34743476   ROM_LOAD( "rt2_b-4n-.bin", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3475   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
3477   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
34763478ROM_END
34773479
34783480ROM_START( rtype2jc )
r249939r249940
36753677
36763678   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-B */
36773679   ROM_LOAD( "KEN_B-4N-.IC23", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3678   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
3680   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
36793681ROM_END
36803682
36813683
trunk/src/mame/drivers/m92.c
r249939r249940
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
r249939r249940
110110   MCFG_SOUND_ROUTE( 1, "rspeaker", 1.00 )
111111
112112   MCFG_CDROM_ADD("cdrom")
113   MCFG_CDROM_INTERFACE("pippin_cdrom")
114   MCFG_SOFTWARE_LIST_ADD("cd_list","pippin")
115113
116114   MCFG_RAM_ADD(RAM_TAG)
117115   MCFG_RAM_DEFAULT_SIZE("32M")
trunk/src/mame/drivers/merit.c
r249939r249940
232232{
233233   int co;
234234
235//  m_screen->update_now();
236   m_screen->update_partial(m_screen->vpos());
235   m_screen->update_now();
237236   data &= 0x0f;
238237
239238   co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07);
r249939r249940
306305WRITE_LINE_MEMBER(merit_state::hsync_changed)
307306{
308307   /* update any video up to the current scanline */
309//  m_screen->update_now();
310   m_screen->update_partial(m_screen->vpos());
308   m_screen->update_now();
311309}
312310
313311WRITE_LINE_MEMBER(merit_state::vsync_changed)
trunk/src/mame/drivers/micral.c
r249939r249940
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}
r249939r249940
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
r249939r249940
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.
r249939r249940
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
r249939r249940
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
r249939r249940
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                                   |
r249939r249940
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'
r249939r249940
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
r249939r249940
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
r249939r249940
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.
r249939r249940
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
r249939r249940
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.
r249939r249940
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
r249939r249940
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 )
r249939r249940
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)
r249939r249940
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
r249939r249940
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
r249939r249940
12921292
12931293class namcos23_state;
12941294
1295class namcos23_renderer : public poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>
1295class namcos23_renderer : public poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES>
12961296{
12971297public:
12981298   namcos23_renderer(namcos23_state &state);
r249939r249940
13121312   namcos23_render_data rd;
13131313   int front;
13141314   int vertex_count;
1315   float zkey;
13161315   poly_vertex pv[16];
13171316};
13181317
r249939r249940
13681367   int count[2];
13691368   namcos23_render_entry entries[2][RENDER_MAX_ENTRIES];
13701369   namcos23_poly_entry polys[POLY_MAX_ENTRIES];
1371   namcos23_poly_entry *poly_order[POLY_MAX_ENTRIES];
13721370};
13731371
13741372class namcos23_state : public driver_device
r249939r249940
15851583***************************************************************************/
15861584
15871585namcos23_renderer::namcos23_renderer(namcos23_state &state)
1588   : poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>(state.machine()),
1589      m_state(state)
1586   : poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES>(state.machine()),
1587     m_state(state)
15901588{
1589   const INT32 bufferSize = state.m_screen->visible_area().width() * state.m_screen->visible_area().height();
1590   m_zBuffer = auto_alloc_array(state.machine(), float, bufferSize);
15911591}
15921592
15931593// 3D hardware, to throw at least in part in video/namcos23.c
r249939r249940
18841884{
18851885   const namcos23_render_data& rd = object;
18861886
1887   float w = extent.param[0].start;
1888   float u = extent.param[1].start;
1889   float v = extent.param[2].start;
1890   float l = extent.param[3].start;
1891   float dw = extent.param[0].dpdx;
1892   float du = extent.param[1].dpdx;
1893   float dv = extent.param[2].dpdx;
1894   float dl = extent.param[3].dpdx;
1895
1887   float zz = extent.param[0].start;
1888   float w = extent.param[1].start;
1889   float u = extent.param[2].start;
1890   float v = extent.param[3].start;
1891   float l = extent.param[4].start;
1892   float dz = extent.param[0].dpdx;
1893   float dw = extent.param[1].dpdx;
1894   float du = extent.param[2].dpdx;
1895   float dv = extent.param[3].dpdx;
1896   float dl = extent.param[4].dpdx;
1897   
18961898   UINT32 *img = &object.bitmap->pix32(scanline, extent.startx);
1897
1899   float* zBuffer = &m_zBuffer[(scanline * m_state.m_screen->visible_area().width()) + extent.startx];
1900   
18981901   for(int x = extent.startx; x < extent.stopx; x++) {
1899      float z = w ? 1/w : 0;
1900      UINT32 pcol = rd.texture_lookup(*rd.machine, rd.pens, u*z, v*z);
1901      float ll = l*z;
1902      *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll);
1903
1902      if (zz < *zBuffer)
1903      {
1904         float z = w ? 1/w : 0;
1905         UINT32 pcol = rd.texture_lookup(*rd.machine, rd.pens, u*z, v*z);
1906         float ll = l*z;
1907         *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll);
1908   
1909         *zBuffer = zz;
1910      }
1911     
1912      zz += dz;
19041913      w += dw;
19051914      u += du;
19061915      v += dv;
19071916      l += dl;
19081917      img++;
1918      zBuffer++;
19091919   }
19101920}
19111921
r249939r249940
19321942
19331943   pv.x = 320 + 768 * pv.x;
19341944   pv.y = 240 - 768 * pv.y;
1935   pv.p[0] = 1.0f / pv.p[0];
1945   pv.p[1] = 1.0f / pv.p[1];
19361946}
19371947
19381948static UINT32 render_texture_lookup_nocache_point(running_machine &machine, const pen_t *pens, float x, float y)
r249939r249940
20362046      namcos23_poly_entry *p = render.polys + render.poly_count;
20372047
20382048      // Should be unnecessary now that frustum clipping happens, but this still culls polys behind the camera
2039      p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 4, 0.00001f);
2040
2049      p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 5, 0.001f);
2050     
20412051      // Project if you don't clip on the near plane
20422052      if(p->vertex_count >= 3) {
20432053         // Project the eye points
20442054         frustum_clip_vertex<float, 3> clipVerts[10];
20452055         for(int i=0; i<p->vertex_count; i++) {
2056            // A basic perspective transform
2057            const float Z = p->pv[i].p[0];
2058            const float projX = p->pv[i].x / Z;
2059            const float projY = p->pv[i].y / Z;
2060           
2061            const float near = 0.001f;
2062            const float far = 1000.0f;
2063            const float m22 = -(far / (far-near));
2064            const float m23 = -((far * near) / (far - near));
2065            const float projZ = -(Z * m22) + m23;
2066           
20462067            // 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;
2068            clipVerts[i].x = projX;
2069            clipVerts[i].y = projY;
2070            clipVerts[i].z = projZ;
2071            clipVerts[i].w = p->pv[i].p[0];
20522072            clipVerts[i].p[0] = p->pv[i].p[1];
20532073            clipVerts[i].p[1] = p->pv[i].p[2];
20542074            clipVerts[i].p[2] = p->pv[i].p[3];
r249939r249940
20562076
20572077         // Clip against all edges of the view frustum
20582078         int num_vertices = frustum_clip_all<float, 3>(clipVerts, p->vertex_count, clipVerts);
2059
2079         
20602080         if (num_vertices != 0)
20612081         {
20622082            // Push the results back into the main vertices
r249939r249940
20642084            {
20652085               p->pv[i].x = clipVerts[i].x;
20662086               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];
2087               p->pv[i].p[0] = clipVerts[i].z;
2088               p->pv[i].p[1] = clipVerts[i].w;
2089               p->pv[i].p[2] = clipVerts[i].p[0];
2090               p->pv[i].p[3] = clipVerts[i].p[1];
2091               p->pv[i].p[4] = clipVerts[i].p[2];
20712092            }
20722093            p->vertex_count = num_vertices;
2073
2094           
20742095            // This is our poor-man's projection matrix
2075            for(int i=0; i<p->vertex_count; i++)
2096            for(int i=0; i<p->vertex_count; i++)
20762097            {
20772098               render_project(p->pv[i]);
2078
2079               float w = p->pv[i].p[0];
2080               p->pv[i].p[1] *= w;
2099               
2100               const float w = p->pv[i].p[1];
20812101               p->pv[i].p[2] *= w;
20822102               p->pv[i].p[3] *= w;
2103               p->pv[i].p[4] *= w;
20832104            }
2084
2105           
20852106            // Compute an odd sorta'-Z thing that can situate the polygon wherever you want in Z-depth
2086            p->zkey = 0.5f*(minz+maxz);
20872107            p->front = !(h & 0x00000001);
20882108            p->rd.machine = &machine();
20892109            p->rd.texture_lookup = render_texture_lookup_nocache_point;
r249939r249940
20972117   }
20982118}
20992119
2100static int render_poly_compare(const void *i1, const void *i2)
2101{
2102   const namcos23_poly_entry *p1 = *(const namcos23_poly_entry **)i1;
2103   const namcos23_poly_entry *p2 = *(const namcos23_poly_entry **)i2;
2104
2105   if(p1->front != p2->front)
2106      return p1->front ? 1 : -1;
2107
2108   return p1->zkey < p2->zkey ? 1 : p1->zkey > p2->zkey ? -1 : 0;
2109}
2110
21112120void namcos23_renderer::render_flush(bitmap_rgb32& bitmap)
21122121{
21132122   render_t &render = m_state.m_render;
r249939r249940
21152124   if(!render.poly_count)
21162125      return;
21172126
2118   for(int i=0; i<render.poly_count; i++)
2119      render.poly_order[i] = &render.polys[i];
2120
2121   qsort(render.poly_order, render.poly_count, sizeof(namcos23_poly_entry *), render_poly_compare);
2122
21232127   const static rectangle scissor(0, 639, 0, 479);
21242128
21252129   for(int i=0; i<render.poly_count; i++) {
2126      const namcos23_poly_entry *p = render.poly_order[i];
2130      const namcos23_poly_entry *p = &render.polys[i];
21272131      namcos23_render_data& extra = render.polymgr->object_data_alloc();
21282132      extra = p->rd;
21292133      extra.bitmap = &bitmap;
21302134
21312135      // We should probably split the polygons into triangles ourselves to insure everything is being rendered properly
21322136      if (p->vertex_count == 3)
2133         render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv[0], p->pv[1], p->pv[2]);
2137         render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv[0], p->pv[1], p->pv[2]);
21342138      else if (p->vertex_count == 4)
2135         render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
2139         render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
21362140      else if (p->vertex_count == 5)
2137         render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
2141         render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
21382142      else if (p->vertex_count == 6)
2139         render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
2143         render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
21402144   }
21412145   render.poly_count = 0;
2146   render.polymgr->wait();
2147
2148   // Reset the buffers
2149   for (int i = 0; i < (m_state.m_screen->visible_area().width())*(m_state.m_screen->visible_area().height()); i++)
2150   {
2151      m_zBuffer[i] = 1000.0f;     // TODO: set to far clipping plane value
2152   }
21422153}
21432154
21442155void namcos23_state::render_run(bitmap_rgb32 &bitmap)
r249939r249940
21592170      re++;
21602171   }
21612172   render.polymgr->render_flush(bitmap);
2162   render.polymgr->wait();
21632173}
21642174
21652175
trunk/src/mame/drivers/nmg5.c
r249939r249940
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/osborne1.c
r249939r249940
1010bit of video RAM entries.
1111
1212Bank 2 holds the BIOS ROM and I/O area. Only addresses 0000-3FFF are used
13by bank 2 (4000-FFFF mirrors bank 1). Bank 2 is divided as follows:
143000-3FFF Nominally unused but acts as mirror of 2000-2FFF
13by bank 2. Bank 2 is divided as follows:
143000-3FFF Unused
15152C00-2C03 Video PIA
16162A00-2A01 Serial interface
17172900-2903 488 PIA
182400-2400 SCREEN-PAC (if present)
19182201-2280 Keyboard
20192100-2103 Floppy
211000-1FFF Nominally unused but acts as read mirror of BIOS ROM
201000-1FFF Unused
22210000-0FFF BIOS ROM
2322
24The logic is actually quite sloppy, and will cause bus fighting under many
25circumstances since it doesn't actually check all four bits, just that two
26are in the desired state.
27
2823Bank 3 has the ninth bit needed to complete the full Video RAM. These bits
2924are stored at F000-FFFF. Only the highest bit is used.
3025
3126On bootup bank 2 is active.
3227
33Banking is controlled by writes to I/O space.  Only two low address bits are
34used, and the value on the data bus is completley ignored.
3500 - Activate bank 2 (also triggered by CPU reset)
3601 - Activate bank 1
3702 - Set BIT 9 signal (map bank 3 into F000-FFFF)
3803 - Clear BIT 9 signal (map bank 1/2 into F000-FFFF)
28The actual banking is done through I/O ports 00-03.
2900 - Have both bank 2 and bank 1 active. This seems to be the power up default.
3001 - Only have bank 1 active.
3102 - Have both bank 2 and bank 3 active. (Not 100% sure, also bank 1 from 4000-EFFF?)
3203 - Have both bank 2 and bank 1 active.
3933
4034TODO:
41  - Implement ROM/IO bank selection properly
42  - Implement serial port
43  - Implement reset key (generates NMI and affects bank selection)
4435  - Verify frequency of the beep/audio alarm.
4536
4637***************************************************************************/
r249939r249940
5445static ADDRESS_MAP_START( osborne1_mem, AS_PROGRAM, 8, osborne1_state )
5546   AM_RANGE( 0x0000, 0x0FFF ) AM_READ_BANK("bank1") AM_WRITE( osborne1_0000_w )
5647   AM_RANGE( 0x1000, 0x1FFF ) AM_READ_BANK("bank2") AM_WRITE( osborne1_1000_w )
57   AM_RANGE( 0x2000, 0x3FFF ) AM_READWRITE( osborne1_2000_r, osborne1_2000_w )
48   AM_RANGE( 0x2000, 0x2FFF ) AM_READWRITE( osborne1_2000_r, osborne1_2000_w )
49   AM_RANGE( 0x3000, 0x3FFF ) AM_READ_BANK("bank3") AM_WRITE( osborne1_3000_w )
5850   AM_RANGE( 0x4000, 0xEFFF ) AM_RAM
59   AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank3") AM_WRITE( osborne1_videoram_w )
51   AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank4") AM_WRITE( osborne1_videoram_w )
6052ADDRESS_MAP_END
6153
6254
6355static ADDRESS_MAP_START( osborne1_io, AS_IO, 8, osborne1_state )
6456   ADDRESS_MAP_UNMAP_HIGH
6557   ADDRESS_MAP_GLOBAL_MASK(0xff)
66   AM_RANGE( 0x00, 0xff ) AM_WRITE( osborne1_bankswitch_w )
58   AM_RANGE( 0x00, 0x03 ) AM_WRITE( osborne1_bankswitch_w )
6759ADDRESS_MAP_END
6860
6961
r249939r249940
149141   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
150142   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
151143   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
152
153   PORT_START("CNF")
154   PORT_CONFNAME(0x01, 0x00, "Video Output")
155   PORT_CONFSETTING(0x00, "Standard")
156   PORT_CONFSETTING(0x01, "SCREEN-PAC")
157144INPUT_PORTS_END
158145
159146
r249939r249940
210197
211198   MCFG_SCREEN_ADD("screen", RASTER)
212199   MCFG_SCREEN_UPDATE_DRIVER(osborne1_state, screen_update)
213   MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK, 1024, 0, 104*8, 260, 0, 24*10 )
200   MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 512, 0, 416, 260, 0, 240 )
214201   MCFG_SCREEN_PALETTE("palette")
215202   MCFG_GFXDECODE_ADD("gfxdecode", "palette", osborne1)
216203   MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
trunk/src/mame/drivers/othunder.c
r249939r249940
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
r249939r249940
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
r249939r249940
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/pc.c
r249939r249940
285285   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false)
286286   MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "lpt", false)
287287   MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "com", false)
288   MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "hdc", false)
289   MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
288290
289291   /* keyboard */
290292   MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
r249939r249940
323325   MCFG_SLOT_DEFAULT_OPTION("cga_ec1841")
324326MACHINE_CONFIG_END
325327
326static MACHINE_CONFIG_DERIVED(eagle1600, pccga)
327   MCFG_DEVICE_REMOVE("maincpu")
328   MCFG_CPU_PC(pc16, pc16, I8086, 8000000)
329MACHINE_CONFIG_END
330328
331329ROM_START( bw230 )
332330   ROM_REGION(0x100000,"maincpu", 0)
r249939r249940
479477   ROM_LOAD( "c101681 6ffb.u60",0x000, 0x100, NO_DUMP ) // PAL20L10NC
480478ROM_END
481479
482ROM_START( eagle1600 )
483   ROM_REGION(0x100000,"maincpu", 0)
484   ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xfe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1))
485   ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xfe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1))
486
487   ROM_REGION(0x8000,"gfx1", 0)
488   ROM_LOAD("eagle 1600 video char gen u301.bin", 0x00000, 0x1000, CRC(1a7e552f) SHA1(749058783eec9d96a70dc5fdbfccb56196f889dc))
489ROM_END
490
491480/***************************************************************************
492481
493482  Game driver(s)
r249939r249940
520509
521510COMP( 198?, ataripc3,   ibm5150,    0,          pccga,      pccga, driver_device,      0,      "Atari", "PC-3" , MACHINE_NOT_WORKING)
522511COMP( 1989, ssam88s,    ibm5150,    0,          pccga,      pccga, driver_device,      0,      "Samsung", "Samtron 88S" , MACHINE_NOT_WORKING)
523COMP( 1983, eagle1600,  ibm5150,    0,          eagle1600,  pccga, driver_device,      0,      "Eagle", "1600" , MACHINE_NOT_WORKING)
trunk/src/mame/drivers/peplus.c
r249939r249940
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 )
r249939r249940
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 )
r249939r249940
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/pgm.c
r249939r249940
39043904   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
39053905   /* doesn't use a separate BIOS rom */
39063906   ROM_LOAD16_WORD_SWAP( "ketsui_v100.u38", 0x000000, 0x200000, CRC(dfe62f3b) SHA1(baa58d1ce47a707f84f65779ac0689894793e9d9) )
3907   // an alt version of this rom exists with 0xff fill in the unused area after 0x1443bc rather than random data like the one above, there are no code changes.
3908   //ROM_LOAD16_WORD_SWAP( "ketsui_v100.u38", 0x000000, 0x200000, CRC(e140f8a4) SHA1(34fd25f8896935503d7537e89a4cd174e8995070) )
39073909
39083910   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
39093911   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
r249939r249940
39273929   ROM_LOAD( "ket_defaults.nv",  0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
39283930ROM_END
39293931
3930ROM_START( ket1 ) // only difference between this and ket1 is the rom fill on the unused area
3931   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
3932   /* doesn't use a separate BIOS rom */
3933   ROM_LOAD16_WORD_SWAP( "ketsui_v100_alt_fill.u38", 0x000000, 0x200000, CRC(e140f8a4) SHA1(34fd25f8896935503d7537e89a4cd174e8995070) )
3934
3935   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3936   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3937
3938   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3939   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
3940   ROM_LOAD( "t04701w064.u19",   0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
3941
3942   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
3943   ROM_LOAD( "a04701w064.u7",    0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
3944   ROM_LOAD( "a04702w064.u8",    0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
3945
3946   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
3947   ROM_LOAD( "b04701w064.u1",    0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
3948
3949   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
3950   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
3951   ROM_LOAD( "m04701b032.u17",    0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
3952
3953   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
3954   ROM_LOAD( "ket_defaults.nv",  0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
3955ROM_END
3956
39573932ROM_START( keta )
39583933   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
39593934   /* doesn't use a separate BIOS rom */
r249939r249940
40083983   ROM_LOAD( "ket_defaults.nv",  0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
40093984ROM_END
40103985
4011
4012ROM_START( ketarr10 )
4013   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4014   /* doesn't use a separate BIOS rom */
4015   ROM_LOAD16_WORD_SWAP( "ketarr_v100.u38", 0x000000, 0x200000, CRC(d4c7a8ab) SHA1(65d104d17bd4fd03a2b44297a003ba03d746c7ee) )
4016
4017   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4018   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4019
4020   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4021   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4022   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4023
4024   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4025   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4026   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4027
4028   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4029   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4030
4031   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4032   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4033   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4034
4035   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4036   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4037ROM_END
4038
4039
4040ROM_START( ketarrf )
4041   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4042   /* doesn't use a separate BIOS rom */
4043   ROM_LOAD16_WORD_SWAP( "ketarrf_v100.u38", 0x000000, 0x200000, CRC(6ad17aa4) SHA1(791bd1a107433a3811c8a79ea26a73e66ddd296f) )
4044
4045   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4046   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4047
4048   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4049   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4050   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4051
4052   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4053   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4054   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4055
4056   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4057   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4058
4059   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4060   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4061   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4062
4063   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4064   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4065ROM_END
4066
4067ROM_START( ketarr15 )
4068   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4069   /* doesn't use a separate BIOS rom */
4070   ROM_LOAD16_WORD_SWAP( "ketarr15_v100.u38", 0x000000, 0x200000, CRC(552a7d95) SHA1(4f3fb13f34d58a7482e1d26623d38aa0b54ca8dd) )
4071
4072   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4073   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4074
4075   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4076   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4077   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4078
4079   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4080   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4081   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4082
4083   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4084   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4085
4086   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4087   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4088   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4089
4090   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4091   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4092ROM_END
4093
4094ROM_START( ketarrs15 )
4095   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4096   /* doesn't use a separate BIOS rom */
4097   ROM_LOAD16_WORD_SWAP( "ketarrs15_v100.u38", 0x000000, 0x200000, CRC(a95e71e0) SHA1(182c12e3581ebb20176d8abca41ee62aadcd63e0) )
4098
4099   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4100   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4101
4102   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4103   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4104   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4105
4106   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4107   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4108   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4109
4110   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4111   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4112
4113   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4114   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4115   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4116
4117   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4118   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4119ROM_END
4120
4121ROM_START( ketarr151 )
4122   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4123   /* doesn't use a separate BIOS rom */
4124   ROM_LOAD16_WORD_SWAP( "ketarr151_v100.u38", 0x000000, 0x200000, CRC(2b7c030d) SHA1(9aaba1242d7ce29915a31d40341da82985927f9d) )
4125
4126   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4127   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4128
4129   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4130   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4131   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4132
4133   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4134   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4135   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4136
4137   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4138   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4139
4140   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4141   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4142   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4143
4144   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4145   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4146ROM_END
4147
4148ROM_START( ketarrs151 )
4149   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4150   /* doesn't use a separate BIOS rom */
4151   ROM_LOAD16_WORD_SWAP( "ketarrs151_v100.u38", 0x000000, 0x200000, CRC(35c984e4) SHA1(d4517f318de0c40a3b30e41374f33bb355581434) )
4152
4153   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4154   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
4155
4156   ROM_REGION( 0xc00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4157   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // same as standard PGM text bios - surface scratched to remove details
4158   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4159
4160   ROM_REGION( 0x1000000, "sprcol", 0 ) /* Sprite Colour Data */
4161   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4162   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4163
4164   ROM_REGION( 0x0800000, "sprmask", 0 ) /* Sprite Masks + Colour Indexes */
4165   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4166
4167   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
4168   /* there is a position for the PGM audio bios rom, but it's unpopulated, and the M of PGM has been scratched off the PCB */
4169   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4170
4171   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4172   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4173ROM_END
4174
4175ROM_START( ketarr )
4176   ROM_REGION( 0x600000, "maincpu", 0 )
4177   ROM_LOAD16_WORD_SWAP( "ketarr17_v100.u38", 0x000000, 0x200000, CRC(2cb80b89) SHA1(e1aa072b8344890486e11795e02703aa2d234bb1) )
4178
4179   ROM_REGION( 0x4000, "prot", 0 )
4180   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, CRC(ab54d286) SHA1(897256b6709e1a4da9daba92b6bde39ccfccd8c1) )
4181
4182   ROM_REGION( 0xc00000, "tiles", 0 )
4183   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) )
4184   ROM_LOAD( "t04701w064.u19", 0x180000, 0x800000, CRC(2665b041) SHA1(fb1107778b66f2af0de77ac82e1ee2902f53a959) ) //text-1
4185
4186   ROM_REGION( 0x1000000, "sprcol", 0 )
4187   ROM_LOAD( "a04701w064.u7", 0x0000000, 0x0800000, CRC(5ef1b94b) SHA1(f10dfa46e0a4d297c3a856aea5b49d648f98935c) ) //image-1
4188   ROM_LOAD( "a04702w064.u8", 0x0800000, 0x0800000, CRC(26d6da7f) SHA1(f20e07a7994f41b5ed917f8b0119dc5542f3541c) ) //image-2
4189
4190   ROM_REGION( 0x0800000, "sprmask", 0 )
4191   ROM_LOAD( "b04701w064.u1", 0x0000000, 0x0800000, CRC(1bec008d) SHA1(07d117dc2eebb35727fb18a7c563acbaf25a8d36) ) //bitmap-1
4192
4193   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 )
4194   ROM_LOAD( "m04701b032.u17", 0x400000, 0x400000, CRC(b46e22d1) SHA1(670853dc485942fb96380568494bdf3235f446ee) ) //music-1
4195
4196   ROM_REGION( 0x20000, "sram", 0 ) /* default settings */
4197   ROM_LOAD( "ket_defaults.nv", 0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
4198ROM_END
4199
42003986ROM_START( espgal )
42013987   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
42023988   /* doesn't use a separate BIOS rom */
r249939r249940
45264312GAME( 2002, ddpdojblka, ddpdoj,      pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     ddp3,      ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (2002.10.07 Black Ver)",                MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07 Black Ver" (new)
45274313
45284314// the exact text of the 'version' shows which revision of the game it is; the newest has 2 '.' symbols in the string, the oldest, none.
4529// the only difference between 'ket' and 'ket1' is the ROM fill at 0x1443bc-0x1c88cd, on ket1 it seems to be randomized / garbage data, on ket it's all 0xff, both have been seen on more than one PCB.
45304315GAME( 2002, ket,          0,         pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     ket,       ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
4531GAME( 2002, ket1,         ket,       pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     ket,       ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.) (alt rom fill)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
45324316GAME( 2002, keta,         ket,       pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     ket,       ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver.)",  MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
45334317GAME( 2002, ketb,         ket,       pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     ket,       ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver)",   MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
45344318
4535// these are modern hacks, some of them have been seen on original PCBs, also reportedly on a bootleg PCB with mostly original components but the ARM replaced with a custom chip.
4536// this is a significantly reworked version of the game
4537GAME( 2014, ketarr,    ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2014/07/16 ARRANGE 1.7 VER) (hack)", MACHINE_SUPPORTS_SAVE )
4538GAME( 2012, ketarr151, ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE ) // this apparently crashes on an original PGM PCB when displaying the text after starting a game, find out why and reproduce the issue in MAME.
4539GAME( 2012, ketarr15,  ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
4540GAME( 2012, ketarr10,  ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 ARRANGE VER) (hack)", MACHINE_SUPPORTS_SAVE )
4541
4542// these simplify the scoring system
4543GAME( 2012, ketarrs151, ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE )
4544GAME( 2012, ketarrs15,  ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
4545
4546// this has the 'programmed slowdown' removed.
4547GAME( 2012, ketarrf,    ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 FAST. VER) (hack)", MACHINE_SUPPORTS_SAVE )
4548
4549// this version is stupid, it just simulates what happens if the protection chip isn't returning proper values
4550// ROM_LOAD16_WORD_SWAP( "ketarrb_v100.u38", 0x000000, 0x200000, CRC(ec7a4f92) SHA1(6351fb386586956fbdb5f0730c481fb539cc267a) )
4551// GAME( 2002, ketarrb,    ket,       pgm_arm_type1_cave, pgm,      pgm_arm_type1_state, ket,        ROT270, "trap15", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 BACK. VER)", MACHINE_SUPPORTS_SAVE )
4552
4553
45544319GAME( 2003, espgal,       0,         pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     espgal,    ROT270, "Cave (AMI license)", "Espgaluda (2003/10/15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
45554320
45564321// protection simulated, but should be correct
trunk/src/mame/drivers/playch10.c
r249939r249940
734734   ROM_SYSTEM_BIOS( 0, "dual",   "Dual Monitor Version" ) \
735735   ROM_LOAD_BIOS( 0, "pch1-c__8t_e-2.8t", 0x00000, 0x4000, CRC(d52fa07a) SHA1(55cabf52ae10c050c2229081a80b9fe5454ab8c5) ) \
736736   ROM_SYSTEM_BIOS( 1, "single", "Single Monitor Version" ) \
737   ROM_LOAD_BIOS( 1, "pck1-c.8t", 0x00000, 0x4000, CRC(503ee8b1) SHA1(3bd20bc71cac742d1b8c1430a6426d0a19db7ad0) ) \
738   ROM_SYSTEM_BIOS( 2, "alt", "Alt Bios" ) /* this bios doens't work properly, selecting service mode causes it to hang, is it good? maybe different hw? */ \
739   ROM_LOAD_BIOS( 2, "pch1-c_8te.8t", 0x00000, 0x4000, CRC(123ffa37) SHA1(3bef754a5a85a8498bb6222ddf5cb9021f264db5) )
740
741
737   ROM_LOAD_BIOS( 1, "pck1-c.8t", 0x00000, 0x4000, CRC(503ee8b1) SHA1(3bd20bc71cac742d1b8c1430a6426d0a19db7ad0) )
742738#define BIOS_GFX                                            \
743739   ROM_REGION( 0x6000, "gfx1", 0 ) \
744   ROM_LOAD_BIOS( 0, "pch1-c__8p_e-1.8p",    0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) )   \
745   ROM_LOAD_BIOS( 0, "pch1-c__8m_e-1.8m",    0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) )   \
746   ROM_LOAD_BIOS( 0, "pch1-c__8k.8k",    0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) )   \
747   \
748   ROM_LOAD_BIOS( 1, "pch1-c__8p_e-1.8p",    0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) )   \
749   ROM_LOAD_BIOS( 1, "pch1-c__8m_e-1.8m",    0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) )   \
750   ROM_LOAD_BIOS( 1, "pch1-c__8k.8k",    0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) )   \
751   \
752   ROM_LOAD_BIOS( 2, "pch1-c_8p-8p",    0x00000, 0x2000, CRC(90e1b80c) SHA1(c4f4b135b2a11743518aaa0554c365b4a8cf299a) )   \
753   ROM_LOAD_BIOS( 2, "pch1-c_8m.8m",    0x02000, 0x2000, CRC(83ebc7a3) SHA1(a7c607138f4f9b96ab5d3a82c47895f77672e296) )   \
754   ROM_LOAD_BIOS( 2, "pch1-c__8k.8k",    0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) ) \
755   \
740   ROM_LOAD( "pch1-c__8p_e-1.8p",    0x00000, 0x2000, CRC(30c15e23) SHA1(69166afdb2fe827c7f1919cdf4197caccbd961fa) )   \
741   ROM_LOAD( "pch1-c__8m_e-1.8m",    0x02000, 0x2000, CRC(c1232eee) SHA1(beaf9fa2d091a3c7f70c51e966d885b1f9f0935f) )   \
742   ROM_LOAD( "pch1-c__8k.8k",    0x04000, 0x2000, CRC(9acffb30) SHA1(b814f10ef23f2ca445fabafcbf7f25e2d454ba8c) )   \
756743   ROM_REGION( 0x0300, "proms", 0 )                        \
757744   ROM_LOAD( "pch1-c-6f.82s129an.6f",    0x0000, 0x0100, CRC(e5414ca3) SHA1(d2878411cda84ffe0afb2e538a67457f51bebffb) )    \
758745   ROM_LOAD( "pch1-c-6e.82s129an.6e",    0x0100, 0x0100, CRC(a2625c6e) SHA1(a448b47c9289902e26a3d3c4c7d5a7968c385e81) )    \
r249939r249940
760747   ROM_REGION( 0xc0, "palette", 0 )                        \
761748   ROM_LOAD( "rp2c0x.pal", 0x00, 0xc0, CRC(48de65dc) SHA1(d10acafc8da9ff479c270ec01180cca61efe62f5) )
762749
763
764
765
766750/******************************************************************************/
767751
768752/* Standard Games */
trunk/src/mame/drivers/rd100.c
r249939r249940
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
r249939r249940
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()
r249939r249940
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/****************************************************\
r249939r249940
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/****************************************************\
r249939r249940
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/****************************************************\
r249939r249940
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/sega_sawatte.c
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:
3
4/* Sega Sawatte / S-Pico
5
6a sound-only Pico type system (one of the boards even says S-PICO)
7
8CPU is unknown (I can't see one?!) cartridge dumps should be good, but not confirmed, might be data only for an MCU?
9driver does nothing except allow the softlist to be connected to the -romident commands etc.
10
11
12images supplied by Team Europe
13
14http://mamedev.emulab.it/haze/reference/sawatte/cartridge_pcb_front.jpg
15http://mamedev.emulab.it/haze/reference/sawatte/cartridge_pcb_back.jpg
16
17http://mamedev.emulab.it/haze/reference/sawatte/PCB_Front.jpg
18http://mamedev.emulab.it/haze/reference/sawatte/PCB_Back.jpg
19
20http://mamedev.emulab.it/haze/reference/sawatte/Console_Front.JPG
21http://mamedev.emulab.it/haze/reference/sawatte/Console_Back.JPG
22
23http://mamedev.emulab.it/haze/reference/sawatte/cartridge_example.jpg
24
25*/
26
27#include "emu.h"
28
29
30
31class sawatte_state : public driver_device
32{
33public:
34   sawatte_state(const machine_config &mconfig, device_type type, const char *tag)
35      : driver_device(mconfig, type, tag)
36   { }
37
38protected:
39};
40
41
42static INPUT_PORTS_START( sawatte )
43INPUT_PORTS_END
44
45
46static MACHINE_CONFIG_START( sawatte, sawatte_state )
47   MCFG_SOFTWARE_LIST_ADD("cart_list", "sawatte")
48MACHINE_CONFIG_END
49
50ROM_START( sawatte )
51ROM_END
52
53
54GAME( 1996?, sawatte,    0,       sawatte,  sawatte, driver_device,  0,  ROT0,  "Sega",    "Sawatte",          MACHINE_IS_SKELETON )
trunk/src/mame/drivers/segac2.c
r249939r249940
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
3433    1994  PotoPoto (Japan)           Sega              317-0218         C2
3534    1994  Stack Columns (Japan)      Sega              317-0219         C2
3635    1994  Stack Columns (World)      Sega              317-0223         C2
r249939r249940
932931INPUT_PORTS_END
933932
934933
935
936static INPUT_PORTS_START( sonicpop )
937   PORT_INCLUDE( systemc_generic )
938
939   PORT_MODIFY("P1")
940   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Relay")  // relay (must be ON by default or machine will instantly give an 'assistance' error) - pressing this advances the stages of operation (from type select, and during the turning of the wheel)
941   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Coinblock") // coinblock (inverted)
942   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Sensor") // sensor - causes an extra animation to play if you press it during attract and 'Sensor Advertise' dip is on
943   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
944   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Cup Select 2")  // cup select 2 - pressing Cup Select 1 and 2 registers as 'Cup Select 3', I presume these are lines from the mechanical part.
945   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Cup Select 1") // cup select 1
946   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Handle B")  // handle B
947   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Handle A")  // handle A
948
949   PORT_MODIFY("P2")
950   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 )  PORT_NAME("Sold Out LED1") // sold out LED 1 - are these actually output lines?
951   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Sold Out LED2") // sold out LED 2
952   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Sold Out LED3") // sold out LED 3
953   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
954   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Sold Out SW2") // sold out SW 2 - holding these while coining up will show popcorn as unavailable, pressing all 3 will fault the machine
955   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Sold Out SW3") // sold out SW 3
956   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
957   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Sold Out SW1") // sold out SW 1
958
959   PORT_MODIFY("SERVICE")
960   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // coin
961   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // 'reset'
962   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
963   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
964   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
965   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
966   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
967   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
968
969   PORT_MODIFY("DSW")
970   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
971   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
972   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
973   PORT_DIPNAME( 0x02, 0x02, "Trouble BGM" ) PORT_DIPLOCATION("SW2:2")
974   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
975   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
976   PORT_DIPNAME( 0x0c, 0x00, "Region" ) PORT_DIPLOCATION("SW2:3,4")
977   PORT_DIPSETTING(    0x00, DEF_STR( USA ) )
978   PORT_DIPSETTING(    0x04, "Export" )
979   PORT_DIPSETTING(    0x08, "USA (duplicate)" )
980   PORT_DIPSETTING(    0x0c, DEF_STR( Japan ) )
981   PORT_DIPNAME( 0x10, 0x10, "Sensor Advertise" ) PORT_DIPLOCATION("SW2:5")
982   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
983   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
984   PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
985   PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" )
986   PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
987INPUT_PORTS_END
988
989
990934static INPUT_PORTS_START( ribbit )
991935   PORT_INCLUDE( systemc_generic )
992936
r249939r249940
16911635   ROM_LOAD( "epr-14394.ic4", 0x000000, 0x040000, CRC(476e30dd) SHA1(c9d381160c58b05763ea286a53c7ca6de074fda2) )
16921636ROM_END
16931637
1694ROM_START( sonicpop ) /* Sega Sonic Popcorn Shop (Rev.B) (c)1993 Sega - 834-9555-02 (EMP5032 labeled 317-0140) */
1695   ROM_REGION( 0x200000, "maincpu", 0 )
1696   ROM_LOAD16_BYTE( "epr-14592b.ic32", 0x000000, 0x040000, CRC(bac586a1) SHA1(0208213bfa1a5093e76edb1a7e0ba5ebc862801d) )
1697   ROM_LOAD16_BYTE( "epr-15491b.ic31", 0x000001, 0x040000, CRC(527106c3) SHA1(97f08006bba4b87c304c7ad3b1480b77e99dff10) )
1698   ROM_LOAD16_BYTE( "epr-15494.ic34", 0x100000, 0x040000, CRC(0520df5e) SHA1(5a795a1630d841406a106a566228223583deef44) )
1699   ROM_LOAD16_BYTE( "epr-15493.ic33", 0x100001, 0x040000, CRC(d51b3b85) SHA1(66f6b4656841ab70ffde0141a613eaf91c06f86b) )
17001638
1701   ROM_REGION( 0x040000, "upd", 0 )
1702   ROM_LOAD( "epr-15495.ic4", 0x000000, 0x040000, CRC(d3ee4c68) SHA1(557c57b22521339d94d9a3e6fd2af68a67a153b6) )
1703ROM_END
1704
17051639ROM_START( ribbit ) /* Ribbit  (c)1991 Sega */
17061640   ROM_REGION( 0x200000, "maincpu", 0 )
17071641   ROM_LOAD16_BYTE( "epr-13833.ic32", 0x000000, 0x040000, CRC(5347f8ce) SHA1(b95b99536157edfbf0d74a42f64235f47dca7ee1) )
r249939r249940
23852319//    YEAR, NAME,      PARENT,   MACHINE,INPUT,    INIT,     MONITOR,COMPANY,FULLNAME,FLAGS
23862320/* System C Games */
23872321GAME( 1989, bloxeedc,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (World, C System)", 0 )
2388GAME( 1989, bloxeedu,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (US, C System, Rev A)", 0 )
2322GAME( 1989, bloxeedu,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (US, C System)", 0 )
23892323
23902324GAME( 1990, columns,   0,        segac,  columns, segac2_state,  columns,  ROT0,   "Sega", "Columns (World)", 0 )
2391GAME( 1990, columnsu,  columns,  segac,  columnsu, segac2_state, columns,  ROT0,   "Sega", "Columns (US, cocktail, Rev A)", 0 ) // has cocktail mode dsw
2325GAME( 1990, columnsu,  columns,  segac,  columnsu, segac2_state, columns,  ROT0,   "Sega", "Columns (US, cocktail)", 0 ) // has cocktail mode dsw
23922326GAME( 1990, columnsj,  columns,  segac,  columns, segac2_state,  columns,  ROT0,   "Sega", "Columns (Japan)", 0 )
23932327
23942328GAME( 1990, columns2,  0,        segac,  columns2, segac2_state, columns2, ROT0,   "Sega", "Columns II: The Voyage Through Time (World)", 0 )
r249939r249940
24192353GAME( 1994, tantrbl2,  tantr,    segac,  ichir, segac2_state,    tantr,    ROT0,   "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 2)", 0 ) // Common bootleg in Europe, C board, no samples
24202354GAME( 1994, tantrbl3,  tantr,    segac,  ichir, segac2_state,    tantr,    ROT0,   "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 3)", 0 ) // Common bootleg in Europe, C board, no samples
24212355
2422// not really sure how this should hook up, things like the 'sold out' flags could be mechanical sensors, or from another MCU / CPU board in the actual popcorn part of the machine?
2423GAME( 1993, sonicpop,   0,       segac2, sonicpop, segac2_state, bloxeedc, ROT0,   "Sega", "SegaSonic Popcorn Shop (Rev B)", MACHINE_MECHANICAL ) // region DSW for USA / Export / Japan, still speaks Japanese tho.  'Mechanical' part isn't emulated
2424
24252356GAME( 1994, potopoto,  0,        segac2, potopoto, segac2_state, potopoto, ROT0,   "Sega", "Poto Poto (Japan)", 0 )
24262357
24272358GAME( 1994, stkclmns,  0,        segac2, stkclmns, segac2_state, stkclmns, ROT0,   "Sega", "Stack Columns (World)", 0 )
trunk/src/mame/drivers/segas24.c
r249939r249940
878878   if(irq_allow1 & (1 << IRQ_TIMER))
879879      m_subcpu->set_input_line(IRQ_TIMER+1, ASSERT_LINE);
880880
881   if (irq_tmode == 1 || irq_tmode == 2)
882   {
883   //  m_screen->update_now();
884      m_screen->update_partial(m_screen->vpos());
885   }
881   if(irq_tmode == 1 || irq_tmode == 2)
882      m_screen->update_now();
886883}
887884
888885TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_clear_cb)
trunk/src/mame/drivers/shougi.c
r249939r249940
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}
r249939r249940
236236         // 0: sharedram = sub
237237         // 1: sharedram = main
238238         break;
239
239     
240240      case 1:
241241         m_nmi_enabled = data;
242242
r249939r249940
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
r249939r249940
8282{
8383   int co;
8484
85//  m_screen->update_now();
86   m_screen->update_partial(m_screen->vpos());
85   m_screen->update_now();
8786   data &= 0x0f;
8887
8988   co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07);
r249939r249940
158157WRITE_LINE_MEMBER(slotcarn_state::hsync_changed)
159158{
160159   /* update any video up to the current scanline */
161//  m_screen->update_now();
162   m_screen->update_partial(m_screen->vpos());
160   m_screen->update_now();
163161}
164162
165163WRITE_LINE_MEMBER(slotcarn_state::vsync_changed)
trunk/src/mame/drivers/subhuntr.c
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:David Haywood
3/*
4
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
9
10ROMs
11QTY     Type    position    status
124x  2708    6F,6H,6L,6N     dumped
131x  N82S115     2B  dumped
14
15RAMs
16QTY     Type    position
172x  2101
18
19*/
20
21#include "emu.h"
22#include "cpu/s2650/s2650.h"
23#include "machine/s2636.h"
24
25
26class subhuntr_state : public driver_device
27{
28public:
29   subhuntr_state(const machine_config &mconfig, device_type type, const char *tag)
30      : driver_device(mconfig, type, tag),
31      m_maincpu(*this, "maincpu")
32   {
33   }
34
35   required_device<cpu_device> m_maincpu;
36
37   INTERRUPT_GEN_MEMBER(subhuntr_interrupt);
38
39   virtual void machine_start();
40   virtual void machine_reset();
41   virtual void video_start();
42   DECLARE_PALETTE_INIT(subhuntr);
43   UINT32 screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
44};
45
46
47/***************************************************************************
48
49  Video
50
51***************************************************************************/
52
53PALETTE_INIT_MEMBER(subhuntr_state, subhuntr)
54{
55}
56
57UINT32 subhuntr_state::screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
58{
59   return 0;
60}
61
62void subhuntr_state::video_start()
63{
64}
65
66
67/***************************************************************************
68
69  Memory Maps, I/O
70
71***************************************************************************/
72
73static ADDRESS_MAP_START( subhuntr_map, AS_PROGRAM, 8, subhuntr_state )
74   AM_RANGE(0x0000, 0x0fff) AM_ROM
75   AM_RANGE(0x1c00, 0x1fff) AM_RAM
76ADDRESS_MAP_END
77
78static 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( ,  )
81   AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
82ADDRESS_MAP_END
83
84/***************************************************************************
85
86  Inputs
87
88***************************************************************************/
89
90static INPUT_PORTS_START( subhuntr )
91   PORT_START("SENSE")
92   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
93INPUT_PORTS_END
94
95
96/***************************************************************************
97
98  Machine Config/Interface
99
100***************************************************************************/
101
102void subhuntr_state::machine_start()
103{
104}
105
106void subhuntr_state::machine_reset()
107{
108}
109
110INTERRUPT_GEN_MEMBER(subhuntr_state::subhuntr_interrupt)
111{
112   device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x03);
113}
114
115static const gfx_layout tiles8x8_layout =
116{
117   8,8,
118   RGN_FRAC(1,1),
119   1,
120   { 0 },
121   { 0, 1, 2, 3, 4, 5, 6, 7 },
122   { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 },
123   8*8
124};
125
126static GFXDECODE_START( subhuntr )
127   GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 1 )
128GFXDECODE_END
129
130
131static MACHINE_CONFIG_START( subhuntr, subhuntr_state )
132
133   /* basic machine hardware */
134   MCFG_CPU_ADD("maincpu", S2650, 14318180/4/2)
135   MCFG_CPU_PROGRAM_MAP(subhuntr_map)
136   MCFG_CPU_IO_MAP(subhuntr_io_map)
137   MCFG_CPU_VBLANK_INT_DRIVER("screen", subhuntr_state, subhuntr_interrupt)
138
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)
143
144   /* video hardware */
145   MCFG_SCREEN_ADD("screen", RASTER)
146   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
147   MCFG_SCREEN_REFRESH_RATE(50)
148   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
149   MCFG_SCREEN_SIZE(256, 256)
150   MCFG_SCREEN_VISIBLE_AREA(1*8, 29*8-1, 2*8, 32*8-1)
151   MCFG_SCREEN_UPDATE_DRIVER(subhuntr_state, screen_update_subhuntr)
152   MCFG_SCREEN_PALETTE("palette")
153
154   MCFG_GFXDECODE_ADD("gfxdecode", "palette", subhuntr)
155
156   MCFG_PALETTE_ADD("palette", 26)
157   MCFG_PALETTE_INIT_OWNER(subhuntr_state, subhuntr)
158
159   /* sound hardware */
160   MCFG_SPEAKER_STANDARD_MONO("mono")
161
162   /* discrete sound */
163MACHINE_CONFIG_END
164
165
166
167/******************************************************************************/
168
169ROM_START( subhuntr )
170   ROM_REGION( 0x1000, "maincpu", 0 )
171   ROM_LOAD( "MR21.6F",  0x0000, 0x0400, CRC(27847939) SHA1(e6b41b511fefac1e1e207eff2dac8c2963d47c5c) )
172   ROM_LOAD( "MR22.6G",  0x0400, 0x0400, CRC(e9af1ee8) SHA1(451e88407a120444377a58b06b65152c57503533) )
173   ROM_LOAD( "MR25.6L",  0x0800, 0x0400, CRC(8271c975) SHA1(c7192658b50d781ab1b94c2e8cb75c5be3539820) )
174   ROM_LOAD( "MR24.6N",  0x0c00, 0x0400, CRC(385c4944) SHA1(84050b0356c9a3a36528dba768f2684e28c6c7c4) )
175
176   ROM_REGION( 0x0200, "gfx1", 0 )
177   ROM_LOAD( "82S115.2B",   0x0000, 0x0200, CRC(6946c9de) SHA1(956b4bebe6960a73609deb75e1493c4127fd7f77) ) // ASCII, not much else
178ROM_END
179
180GAME(1979, subhuntr,  0,        subhuntr, subhuntr, driver_device, 0, ROT0, "Model Racing", "Sub Hunter (Model Racing)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
trunk/src/mame/drivers/suna16.c
r249939r249940
939939
940940   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
941941
942   MCFG_MACHINE_START_OVERRIDE(suna16_state,uballoon)
943   MCFG_MACHINE_RESET_OVERRIDE(suna16_state,uballoon)
944
945
946942   /* video hardware */
947943   MCFG_SCREEN_ADD("screen", RASTER)
948944   MCFG_SCREEN_REFRESH_RATE(60)
trunk/src/mame/drivers/system1.c
r249939r249940
41504150   ROM_LOAD( "pr5317.4",     0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
41514151ROM_END
41524152
4153ROM_START( gardiaj )
4154   ROM_REGION( 0x20000, "maincpu", 0 )
4155   ROM_LOAD( "epr-10250.ic90",   0x00000, 0x8000, CRC(c97943a7) SHA1(eb201987c7a78f7eb6838211c0af3394c0b2d95f) ) /* encrypted */
4156   ROM_LOAD( "epr-10251.ic91",   0x10000, 0x8000, CRC(b2ed05dc) SHA1(c520bf7024c85dc759c27eccb0a31998f4d72b5f) )
4157   ROM_LOAD( "epr-10252.ic92",   0x18000, 0x8000, CRC(0a490588) SHA1(18df754ebdf062096f2d631a722b168901610345) )
41584153
4159   ROM_REGION( 0x10000, "soundcpu", 0 )
4160   ROM_LOAD( "epr-10243.ic126", 0x0000, 0x4000, CRC(87220660) SHA1(3f2bfc03e0f1053a4aa0ec5ebb0d573f2e20964c) )
4161
4162   ROM_REGION( 0x18000, "tiles", 0 )
4163   ROM_LOAD( "epr-10240.ic4",   0x00000, 0x8000, CRC(998ce090) SHA1(78929f471c5aa8b32d1693e8af2ef3e86efd3d7d) )
4164   ROM_LOAD( "epr-10241.ic5",   0x08000, 0x8000, CRC(81ab0b07) SHA1(7f776dccd66ad097a1a906823786a52d31a8c4e8) )
4165   ROM_LOAD( "epr-10242.ic6",   0x10000, 0x8000, CRC(2dc4c4c7) SHA1(0347170b941a5c567eed114833656e8abd16a8ab) )
4166
4167   ROM_REGION( 0x20000, "sprites", 0 )
4168   ROM_LOAD( "epr-10234.ic87", 0x00000, 0x8000, CRC(8a6aed33) SHA1(044836885ace8294124b1be9b3a4828f772bb9ee) )
4169   ROM_LOAD( "epr-10233.ic86", 0x08000, 0x8000, CRC(c52784d3) SHA1(b37d7f261be12616dbe11dfa375eaf6878e4a0f3) )
4170   ROM_LOAD( "epr-10236.ic89", 0x10000, 0x8000, CRC(b35ab227) SHA1(616f6097afddffa9af89fe84d8b6df59c567c1e6) )
4171   ROM_LOAD( "epr-10235.ic88", 0x18000, 0x8000, CRC(006a3151) SHA1(a575f9d5c026e6b18e990720ec7520b6b5ae94e3) )
4172
4173   ROM_REGION( 0x0300, "palette", 0 )
4174   ROM_LOAD( "pr-7345.ic20",      0x0000, 0x0100, CRC(8eee0f72) SHA1(b5694c120f604a5f7cc95618a71ab16a1a6151ed) ) /* palette red component */
4175   ROM_LOAD( "pr-7344.ic14",      0x0100, 0x0100, CRC(3e7babd7) SHA1(d4f8790db4dce75e27156a4c6de2dcef2baf6d76) ) /* palette green component */
4176   ROM_LOAD( "pr-7343.ic8",       0x0200, 0x0100, CRC(371c44a6) SHA1(ac37458d1feb6566b09a795b20c21953d4ab109d) ) /* palette blue component */
4177
4178   ROM_REGION( 0x0100, "proms", 0 )
4179   ROM_LOAD( "pr5317.ic28",     0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) )
4180ROM_END
4181
4182
41834154ROM_START( brain )
41844155   ROM_REGION( 0x20000, "maincpu", 0 )
41854156   ROM_LOAD( "brain.1",      0x00000, 0x8000, CRC(2d2aec31) SHA1(02dfbb0e9ca01b864e3aa594cf38306fe82a4b5d) )
r249939r249940
57275698GAME( 1985, shtngmst,   0,        sys2m,     shtngmst,  system1_state, shtngmst, ROT0,   "Sega", "Shooting Master (8751 315-5159)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
57285699GAME( 1985, shtngmste,  shtngmst, sys2m,     shtngmst,  system1_state, shtngmst, ROT0,   "Sega / EVG", "Shooting Master (EVG, 8751 315-5159a)", MACHINE_SUPPORTS_SAVE )
57295700GAME( 1986, gardiab,    gardia,   sys2x,     gardia,    system1_state, gardiab,  ROT270, "bootleg", "Gardia (317-0007?, bootleg)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
5730GAME( 1986, gardiaj,    gardia,   sys2x,     gardia,    system1_state, gardia,   ROT270, "Coreland / Sega", "Gardia (Japan, 317-0006)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
57315701GAME( 1986, wboysys2,   wboy,     sys2x,     wboysys2,  system1_state, wboysys2, ROT0,   "Escape (Sega license)", "Wonder Boy (system 2)", MACHINE_SUPPORTS_SAVE )
57325702GAME( 1987, tokisens,   0,        sys2,      tokisens,  system1_state, bank0c,   ROT90,  "Sega", "Toki no Senshi - Chrono Soldier", MACHINE_SUPPORTS_SAVE )
57335703GAME( 1987, wbml,       0,        sys2xb,    wbml,      system1_state, wbml,     ROT0,   "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/timeplt.c
r249939r249940
3434    c300      interrupt enable
3535    c302      flip screen
3636    c304      trigger interrupt on audio CPU
37    c308      video enable (?). Protection ??? Stuffs in some values computed
38              from ROM content
37    c308      Protection ???  Stuffs in some values computed from ROM content
3938    c30a      coin counter 1
4039    c30c      coin counter 2
4140
r249939r249940
6261 *
6362 *************************************/
6463
65INTERRUPT_GEN_MEMBER(timeplt_state::interrupt)
64INTERRUPT_GEN_MEMBER(timeplt_state::timeplt_interrupt)
6665{
6766   if (m_nmi_enable)
6867      device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
6968}
7069
7170
72WRITE8_MEMBER(timeplt_state::nmi_enable_w)
71WRITE8_MEMBER(timeplt_state::timeplt_nmi_enable_w)
7372{
7473   m_nmi_enable = data & 1;
7574   if (!m_nmi_enable)
r249939r249940
8483 *
8584 *************************************/
8685
87WRITE8_MEMBER(timeplt_state::coincounter_w)
86WRITE8_MEMBER(timeplt_state::timeplt_coin_counter_w)
8887{
8988   coin_counter_w(machine(), offset >> 1, data);
9089}
r249939r249940
122121 *
123122 *************************************/
124123
125static ADDRESS_MAP_START( common_main_map, AS_PROGRAM, 8, timeplt_state )
124static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state )
126125   ADDRESS_MAP_UNMAP_HIGH
127126   AM_RANGE(0x0000, 0x5fff) AM_ROM
128   AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
129   AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
127   AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram")
128   AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram")
130129   AM_RANGE(0xa800, 0xafff) AM_RAM
131130   AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram")
132131   AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2")
133   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(scanline_r) AM_WRITE(soundlatch_byte_w)
134   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1") AM_WRITE(watchdog_reset_w)
132   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w)
133   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
134   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w)
135   AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
136   AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
137   AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
138   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
139   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
135140   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0")
136   AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(flipscreen_w)
137   AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
138   AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(coincounter_w)
139141   AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1")
140142   AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2")
141143   AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0")
142144ADDRESS_MAP_END
143145
144static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state )
145   AM_IMPORT_FROM(common_main_map)
146   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(nmi_enable_w)
147   AM_RANGE(0xc308, 0xc308) AM_MIRROR(0x0cf1) AM_WRITE(video_enable_w)
148ADDRESS_MAP_END
149
150146static ADDRESS_MAP_START( psurge_main_map, AS_PROGRAM, 8, timeplt_state )
151   AM_IMPORT_FROM(common_main_map)
147   ADDRESS_MAP_UNMAP_HIGH
148   AM_RANGE(0x0000, 0x5fff) AM_ROM
152149   AM_RANGE(0x6004, 0x6004) AM_READ(psurge_protection_r)
150   AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram")
151   AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram")
152   AM_RANGE(0xa800, 0xafff) AM_RAM
153   AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram")
154   AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2")
155   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w)
156   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
157   AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
158   AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
159   AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
160   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
161   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
162   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0")
163   AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1")
164   AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2")
165   AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0")
153166ADDRESS_MAP_END
154167
155168static ADDRESS_MAP_START( chkun_main_map, AS_PROGRAM, 8, timeplt_state )
156   AM_IMPORT_FROM(timeplt_main_map)
169   ADDRESS_MAP_UNMAP_HIGH
170   AM_RANGE(0x0000, 0x5fff) AM_ROM
157171   AM_RANGE(0x6000, 0x67ff) AM_RAM
172   AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(timeplt_colorram_w) AM_SHARE("colorram")
173   AM_RANGE(0xa400, 0xa7ff) AM_RAM_WRITE(timeplt_videoram_w) AM_SHARE("videoram")
174   AM_RANGE(0xa800, 0xafff) AM_RAM
175   AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram")
176   AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2")
177   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w)
178   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
179   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w)
180   AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
181   AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
182   AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
183   AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
184   AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
185   AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0c9f) AM_READ_PORT("IN0")
186   AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1")
187   AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2")
188   AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0")
158189ADDRESS_MAP_END
159190
160191
r249939r249940
426457   /* basic machine hardware */
427458   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2)  /* not confirmed, but common for Konami games of the era */
428459   MCFG_CPU_PROGRAM_MAP(timeplt_main_map)
429   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  interrupt)
460   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  timeplt_interrupt)
430461
431462   /* video hardware */
432463   MCFG_SCREEN_ADD("screen", RASTER)
r249939r249940
434465   MCFG_SCREEN_REFRESH_RATE(60)
435466   MCFG_SCREEN_SIZE(32*8, 32*8)
436467   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
437   MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update)
468   MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update_timeplt)
438469   MCFG_SCREEN_PALETTE("palette")
439470
440471   MCFG_GFXDECODE_ADD("gfxdecode", "palette", timeplt)
r249939r249940
452483   MCFG_CPU_MODIFY("maincpu")
453484   MCFG_CPU_PROGRAM_MAP(psurge_main_map)
454485   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  nmi_line_pulse)
455
456   MCFG_VIDEO_START_OVERRIDE(timeplt_state,psurge)
457486MACHINE_CONFIG_END
458487
459488static MACHINE_CONFIG_DERIVED( bikkuric, timeplt )
trunk/src/mame/drivers/unichamp.c
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:David Viens
3/************************************************************************
4 *  Unisonic Champion 2711 (late 1977 based on part dates)
5 *
6 *  Driver from plgDavid (David Viens)
7 *
8 *  Thanks to Sylvain De Chantal (Sly D.C.) for the 2 test units,
9 *  carts and FAQ: http://www.ccjvq.com/slydc/index/faq/2711
10 *
11 *  Thanks to Paul Robson for the GIC font rom.
12 *  (http://worstconsole.blogspot.ca/2012/12/the-worstconsoleever.html)
13 *  Note a spare dead GIC has been given to Lord Nightmare and should be sent for decap!
14 *
15 *  The Unisonc Champion is the only known GI "Gimini Mid-Range 8950 Programmable Game Set"
16 *  to ever reach the market, and only in limited quantities (aprox 500 units ever built)
17 *
18 *  Architecture:
19 *  Master IC : AY-3-8800-1 Graphics Interface (A.K.A. GIC, 40 pin)
20 *  Slave  IC : CP1610 CPU (40 pin, same as in the Intellivision)
21 *  EXEC ROM  : 9501-01009 (40 pin) at 0x0800 (factory mapped)
22 *
23 *  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
26 *  (using two 4x256 TMS4043NL-2 (2112-1) Static Rams at U3 and U4)
27 *
28 *  In this design the GIC only allows the CPU to use the BUS (and shared RAM)
29 *  a fraction of the frame time. (4.33ms for each 16.69ms, or 26% of the time)
30 *  (the real ratio of clocks is 7752/29868 )
31 *
32 *  Boot: When the GIC let go of !RESET_OUT the EXEC Rom pushes 0x800 onto
33 *  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...
36 *  59.95 times a second - NTSC
37 ************************************************************************/
38
39#include "emu.h"
40#include "cpu/cp1610/cp1610.h"
41#include "video/gic.h"
42
43#include "bus/generic/slot.h"
44#include "bus/generic/carts.h"
45
46class unichamp_state : public driver_device
47{
48public:
49   unichamp_state(const machine_config &mconfig, device_type type, const char *tag)
50      : driver_device(mconfig, type, tag),
51      m_maincpu(*this, "maincpu"),
52      m_gic(*this, "gic"),
53      m_cart(*this, "cartslot"),
54      m_ctrls(*this, "CTRLS"){}
55
56   required_device<cpu_device> m_maincpu;
57   required_device<gic_device> m_gic;
58   required_device<generic_slot_device> m_cart;
59
60   UINT8 m_ram[256];
61   DECLARE_DRIVER_INIT(unichamp);
62   virtual void machine_start();
63   virtual void machine_reset();
64   DECLARE_PALETTE_INIT(unichamp);
65
66   DECLARE_READ8_MEMBER(bext_r);
67
68   DECLARE_READ16_MEMBER(unichamp_gicram_r);
69   DECLARE_WRITE16_MEMBER(unichamp_gicram_w);
70
71   DECLARE_READ16_MEMBER(unichamp_trapl_r);
72   DECLARE_WRITE16_MEMBER(unichamp_trapl_w);
73
74   UINT32 screen_update_unichamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
75
76protected:
77   required_ioport m_ctrls;
78   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
79};
80
81PALETTE_INIT_MEMBER(unichamp_state, unichamp)
82{
83   /*
84   palette.set_pen_color(GIC_BLACK, rgb_t(0x00, 0x00, 0x00));
85   palette.set_pen_color(GIC_RED,   rgb_t(0xAE, 0x49, 0x41));//(from box shot)
86   palette.set_pen_color(GIC_GREEN, rgb_t(0x62, 0x95, 0x88));//(from box shot)
87   palette.set_pen_color(GIC_WHITE, rgb_t(0xFF, 0xFF, 0xFF));
88   */
89
90   //using from intv.c instead as suggested by RB
91   palette.set_pen_color(GIC_BLACK, rgb_t(0x00, 0x00, 0x00));
92   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));
96}
97
98
99static ADDRESS_MAP_START( unichamp_mem, AS_PROGRAM, 16, unichamp_state )
100   ADDRESS_MAP_GLOBAL_MASK(0x1FFF) //B13/B14/B15 are grounded!
101   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)
103   AM_RANGE(0x0800, 0x17FF) AM_ROM AM_REGION("maincpu", 0x0800 << 1)   // Carts and EXE ROM, 10-bits wide
104ADDRESS_MAP_END
105
106
107static INPUT_PORTS_START( unichamp )
108   PORT_START( "CTRLS" )
109   PORT_BIT( 0x01,  IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')// P1 YES (EBCA0)
110   PORT_BIT( 0x02,  IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')// P1 NO  (EBCA1)
111   PORT_BIT( 0x04,  IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')// P2 YES (EBCA2)
112   PORT_BIT( 0x08,  IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')// P2 NO  (EBCA3)
113   PORT_BIT( 0x10,  IP_ACTIVE_HIGH, IPT_UNUSED )   PORT_UNUSED
114   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
117INPUT_PORTS_END
118
119
120void unichamp_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
121{
122   //TODO should we add an explicit Reset button in there just like the controller?
123}
124
125
126READ8_MEMBER(unichamp_state::bext_r)
127{
128   //The BEXT instruction pushes a user-defined nibble out on the four EBCA pins (EBCA0 to EBCA3)
129   //and reads the ECBI input pin for HIGH or LOW signal to know whether or not to branch
130
131   //The unisonic control system couldnt be simpler in desing.
132   //Each of the two player controllers has three buttons:
133   //one tying !RESET(GIC pin 21) to ground when closed - resetting the WHOLE system.
134   //a YES button (connecting EBCA0 to EBCI for Player1 and EBC2 to EBCI for Player2)
135   //a NO  button (connecting EBCA1 to EBCI for Player1 and EBC3 to EBCI for Player2)
136
137   //The CPU outputs a MASK of whatever it needs and checks the result.
138   //EG: Any player can choose if one or two players are going to play the game for instance
139
140   UINT8 port = ioport("CTRLS")->read() & 0x0F; ////only lower nibble
141
142   //We need to return logical high or low on the EBCI pin
143   return (port & offset)>0?1:0;
144}
145
146
147DRIVER_INIT_MEMBER(unichamp_state,unichamp)
148{
149   m_gic->set_shared_memory(m_ram);
150}
151
152void unichamp_state::machine_start()
153{
154   m_gic->set_shared_memory(m_ram);
155
156   if (m_cart->exists()){
157      //flip endians in more "this surely exists in MAME" way?
158      //NOTE The unichamp roms have the same endianness as intv on disk and in memory
159      UINT8*ptr   = m_cart->get_rom_base();
160      size_t size = m_cart->get_rom_size();
161      for(size_t i=0;i<size;i+=2){
162         UINT8 TEMP = ptr[i];
163         ptr[i] = ptr[i+1];
164         ptr[i+1] = TEMP;
165      }
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));
169   }
170}
171
172/* Set Reset and INTR/INTRM Vector */
173void unichamp_state::machine_reset()
174{
175   /*
176   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.
179   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
181   */
182
183   //The Unisonic EXEC ROM chip (9501-01009) is self mapped at 0x0800
184   //The cart ROMS are self mapped to 0x1000
185   //upon boot the EXEC ROM puts 0x0800 on the bus for the CPU to use as first INT vector
186
187   m_maincpu->set_input_line_vector(CP1610_RESET,     0x0800);
188   m_maincpu->set_input_line_vector(CP1610_INT_INTRM, 0x0804);//not used anyway
189   m_maincpu->set_input_line_vector(CP1610_INT_INTR,  0x0804);//not used anyway
190
191   /* Set initial PC */
192   m_maincpu->set_state_int(CP1610_R7, 0x0800);
193}
194
195
196UINT32 unichamp_state::screen_update_unichamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
197{
198   return m_gic->screen_update(screen, bitmap, cliprect);
199}
200
201READ16_MEMBER( unichamp_state::unichamp_gicram_r )
202{
203   return (int)m_ram[offset];
204}
205
206WRITE16_MEMBER( unichamp_state::unichamp_gicram_w )
207{
208   m_ram[offset] = data&0xff;
209}
210
211READ16_MEMBER( unichamp_state::unichamp_trapl_r )
212{
213   logerror("trapl_r(%x)\n",offset);
214   return (int)0;
215}
216
217WRITE16_MEMBER( unichamp_state::unichamp_trapl_w )
218{
219   logerror("trapl_w(%x) = %x\n",offset,data);
220}
221
222static MACHINE_CONFIG_START( unichamp, unichamp_state )
223   /* basic machine hardware */
224
225   //The CPU is really clocked this way:
226   //MCFG_CPU_ADD("maincpu", CP1610, XTAL_3_579545MHz/4)
227   //But since it is only running 7752/29868 th's of the time...
228   //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
231   MCFG_CPU_PROGRAM_MAP(unichamp_mem)
232   MCFG_QUANTUM_TIME(attotime::from_hz(60))
233   MCFG_CP1610_BEXT_CALLBACK(READ8(unichamp_state, bext_r))
234
235   /* video hardware */
236   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,
243                     gic_device::START_Y + gic_device::SCREEN_HEIGHT )
244
245   MCFG_SCREEN_UPDATE_DRIVER(unichamp_state, screen_update_unichamp)
246   MCFG_SCREEN_PALETTE("palette")
247
248   MCFG_PALETTE_ADD("palette", 4)
249   MCFG_PALETTE_INIT_OWNER(unichamp_state, unichamp)
250
251   /* sound hardware */
252   MCFG_SPEAKER_STANDARD_MONO("mono")
253   MCFG_GIC_ADD( "gic", XTAL_3_579545MHz, "screen" )
254   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
255
256   /* cartridge */
257   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "unichamp_cart")
258   MCFG_GENERIC_EXTENSIONS("bin,rom")
259   MCFG_SOFTWARE_LIST_ADD("cart_list", "unichamp")
260
261MACHINE_CONFIG_END
262
263
264ROM_START(unichamp)
265   ROM_REGION(0x10000<<1,"maincpu", ROMREGION_ERASEFF)
266
267   ROM_LOAD16_WORD( "9501-01009.u2", 0x0800<<1, 0x1000, CRC(49a0bd8f) SHA1(f4d126d3462ad351da4b75d76c75942d5a6f27ef))
268
269   //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))
272   //ROM_LOAD16_WORD( "pac-04.bin",   0x1000<<1, 0x1000, CRC(cac09841) SHA1(bc9db83f26ed0810938156db6b104b4576754225))
273   //ROM_LOAD16_WORD( "pac-05.bin",   0x1000<<1, 0x1000, CRC(d54a6090) SHA1(e85593096f43dcf14b08fd2c9fda277008a8df8b))
274ROM_END
275
276
277CONS( 1977, unichamp, 0,  0, unichamp, unichamp,  unichamp_state,   unichamp,  "Unisonic", "Champion 2711", 0/*MACHINE_IMPERFECT_GRAPHICS*/)
trunk/src/mame/drivers/vicdual.c
r249939r249940
207207
208208WRITE8_MEMBER(vicdual_state::videoram_w)
209209{
210//  m_screen->update_now();
211   m_screen->update_partial(m_screen->vpos());
210   m_screen->update_now();
212211   m_videoram[offset] = data;
213212}
214213
215214
216215WRITE8_MEMBER(vicdual_state::characterram_w)
217216{
218//  m_screen->update_now();
219   m_screen->update_partial(m_screen->vpos());
217   m_screen->update_now();
220218   m_characterram[offset] = data;
221219}
222220
r249939r249940
36073605
36083606GAMEL(1977, depthch,    0,        depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin", "Depthcharge", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
36093607GAMEL(1977, depthcho,   depthch,  depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin", "Depthcharge (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
3610GAMEL(1977, subhunt,    depthch,  depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin (Taito license)", "Sub Hunter (Gremlin / Taito)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
3608GAMEL(1977, subhunt,    depthch,  depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin (Taito license)", "Sub Hunter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
36113609GAME( 1977, safari,     0,        safari,    safari,    driver_device, 0, ROT0,   "Gremlin", "Safari (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
36123610GAME( 1977, safaria,    safari,   safari,    safari,    driver_device, 0, ROT0,   "Gremlin", "Safari (set 2, bootleg?)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // on a bootleg board, but seems a different code revision too
36133611GAME( 1978, frogs,      0,        frogs,     frogs,     driver_device, 0, ROT0,   "Gremlin", "Frogs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/vpoker.c
r249939r249940
88  Notes:
99  - Looks like the 2nd generation of Noraut Poker / Draw Poker Hi-Lo HW.
1010
11  - I found two companies that sold the same game with different name...
12
13    1) "Challenger Draw Poker", from Bend Electronics Co. Inc.
14    2) "VHI Draw Poker", from Video Horizons, Inc.
15
16    Both companies shared the same address and phone number:
17     63353 Nels Anderson Road. Bend, Oregon 97701.
18     Tel: 503-389-7626.
19
20    Bend Electronics Co. Inc. claims that they are worldwide distributors for Videotronics, Inc.
21
22    There are some legal issues between all these companies...
23    https://scholar.google.com/scholar_case?case=7993095852400122011
24    http://www.plainsite.org/dockets/201rtodjb/nevada-district-court/videotronics-inc-v-bend-electronics/
25
26
2711  TODO:
2812  - Understand how the 6840PTM hooks up, needed to let it work properly;
2913  - I/Os;
r249939r249940
6852  MC6840P
6953  mm74c920J/mmc6551j-9    x2
7054
55
7156**************************************************************************************************************
7257
7358 - Added 5-Aces Poker (Roberto Fresca)
r249939r249940
701686ROM_END
702687
703688
704/*    YEAR  NAME      PARENT  MACHINE  INPUT     STATE          INIT  ROT    COMPANY               FULLNAME                  FLAGS... */
705GAME( 198?, vpoker,   0,      vpoker,  vpoker,   driver_device, 0,    ROT0, "Videotronics, Inc.", "Videotronics Draw Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
706GAME( 198?, 5acespkr, 0,      vpoker,  5acespkr, driver_device, 0,    ROT0, "<unknown>",          "5-Aces Poker",            MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
689/*    YEAR  NAME      PARENT  MACHINE  INPUT     STATE          INIT  ROT    COMPANY         FULLNAME             FLAGS... */
690GAME( 198?, vpoker,   0,      vpoker,  vpoker,   driver_device, 0,    ROT0, "Videotronics", "Videotronics Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
691GAME( 198?, 5acespkr, 0,      vpoker,  5acespkr, driver_device, 0,    ROT0, "<unknown>",    "5-Aces Poker",       MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
trunk/src/mame/drivers/wacky_gator.c
r249939r249940
11// license:GPL2+
2// copyright-holders:FelipeSanches, Sandro Ronco
2// copyright-holders:FelipeSanches
33//
44// Wacky Gator
55//
6// Driver by Sandro Ronco and
7//  Felipe Correa da Silva Sanches <juca@members.fsf.org>
6// Driver by Felipe Correa da Silva Sanches <juca@members.fsf.org>
87//
98
109/*
trunk/src/mame/drivers/wecleman.c
r249939r249940
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/drivers/zx.c
r249939r249940
11// license:GPL-2.0+
2// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249939r249940
99    Fixes and additions by Krzysztof Strzecha:
1010    07.06.2004 Tape loading added. Some cleanups of debug code.
1111           Fixed stupid bug in timings (vblank duration).
12           GAME_NOT_WORKING flag removed.
12           MACHINE_NOT_WORKING flag removed.
1313        29.05.2004 CPU clock, number of scanlines, vblank duration corrected.
1414           Some cleanups. Two non-working TESTDRIVERS added.
1515        14.05.2004 Finally fixed and readded.
r249939r249940
3131    - Modernised.
3232
3333    To do / problems:
34    - Halt-on-nmi emulation needs a cycle-exact z80
3534    - Some memory areas are not mirrored as they should.
35    - Video hardware is not fully emulated, so it does not support pseudo hi-res and hi-res modes.
3636    - The screen in pc8300/pow3000/lambda jumps when you type something.
3737    - lambda/pow3000 32k memory pack is unemulated, because where is the upper 16k mirror going to be?
3838    - h4th and tree4th need their address maps worked out (eg, the stack is set to FB80)
r249939r249940
4747/* Memory Maps */
4848
4949static ADDRESS_MAP_START( zx80_map, AS_PROGRAM, 8, zx_state )
50   AM_RANGE(0x0000, 0x0fff) AM_ROM AM_MIRROR(0x3000)
51   AM_RANGE(0x4000, 0xffff) AM_RAM
52ADDRESS_MAP_END
53
54static ADDRESS_MAP_START( zx81_map, AS_PROGRAM, 8, zx_state )
5550   AM_RANGE(0x0000, 0x1fff) AM_ROM AM_MIRROR(0x2000)
56   AM_RANGE(0x4000, 0xffff) AM_RAM
51   AM_RANGE(0xc000, 0xffff) AM_RAM_READ(zx_ram_r)
5752ADDRESS_MAP_END
5853
59static ADDRESS_MAP_START( ula_map, AS_DECRYPTED_OPCODES, 8, zx_state )
60   AM_RANGE(0x0000, 0x7fff) AM_READ(ula_low_r)
61   AM_RANGE(0x8000, 0xffff) AM_READ(ula_high_r)
62ADDRESS_MAP_END
63
6454static ADDRESS_MAP_START( zx80_io_map, AS_IO, 8, zx_state )
6555   AM_RANGE(0x0000, 0xffff) AM_READWRITE(zx80_io_r, zx80_io_w)
6656ADDRESS_MAP_END
r249939r249940
301291INPUT_PORTS_END
302292
303293
294/* F4 character display */
295
296static const gfx_layout zx_gfx_layout =
297{
298   8, 8,                              /* 8x8 pixels */
299   64,                                /* 64 codes */
300   1,                                 /* 1 bit per pixel */
301   {0},                               /* no bitplanes */
302   /* x offsets */
303   {0, 1, 2, 3, 4, 5, 6, 7},
304   /* y offsets */
305   {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8},
306   8 * 8                              /* eight bytes per code */
307};
308
309
310/* Graphics Decode Information */
311
312static GFXDECODE_START( zx80 )
313   GFXDECODE_ENTRY( "maincpu", 0x0e00, zx_gfx_layout,  0, 2 )
314GFXDECODE_END
315
316static GFXDECODE_START( zx81 )
317   GFXDECODE_ENTRY( "maincpu", 0x1e00, zx_gfx_layout,  0, 2 )
318GFXDECODE_END
319
320static GFXDECODE_START( pc8300 )
321   GFXDECODE_ENTRY( "gfx1", 0, zx_gfx_layout,  0, 2 )
322GFXDECODE_END
323
324
325
304326/* Palette Initialization */
305327
306328
r249939r249940
308330{
309331   palette.set_pen_color(0,rgb_t::white); /* white */
310332   palette.set_pen_color(1,rgb_t::black); /* black */
333   palette.set_pen_color(2,rgb_t::black); /* black */
334   palette.set_pen_color(3,rgb_t::white); /* white */
311335}
312336
313337PALETTE_INIT_MEMBER(zx_state,ts1000)
314338{
315339   palette.set_pen_color(0,rgb_t(64, 244, 244)); /* cyan */
316340   palette.set_pen_color(1,rgb_t::black); /* black */
341   palette.set_pen_color(2,rgb_t::black); /* black */
342   palette.set_pen_color(3,rgb_t(64, 244, 244)); /* cyan */
317343}
318344
345
346#define ZX81_CPU_CLOCK          3250000
347#define ZX81_CYCLES_PER_SCANLINE    207
348#define ZX81_PIXELS_PER_SCANLINE    256
349#define ZX81_CYCLES_PER_VBLANK      1235
350#define ZX81_VBLANK_DURATION        (1.0*ZX81_CYCLES_PER_VBLANK/ZX81_CPU_CLOCK*1000*1000)
351
352#define ZX81_PAL_SCANLINES      304
353#define ZX81_PAL_FRAMES_PER_SECOND  (1.0*ZX81_CPU_CLOCK/(ZX81_PAL_SCANLINES*ZX81_CYCLES_PER_SCANLINE+ZX81_CYCLES_PER_VBLANK))
354
355#define ZX81_NTSC_SCANLINES     256
356#define ZX81_NTSC_FRAMES_PER_SECOND (1.0*ZX81_CPU_CLOCK/(ZX81_NTSC_SCANLINES*ZX81_CYCLES_PER_SCANLINE+ZX81_CYCLES_PER_VBLANK))
357
358/* Machine Drivers */
359
319360static MACHINE_CONFIG_START( zx80, zx_state )
320361   /* basic machine hardware */
321   MCFG_CPU_ADD("maincpu", Z80, XTAL_6_5MHz/2)
362   MCFG_CPU_ADD("maincpu", Z80, ZX81_CPU_CLOCK)
322363   MCFG_CPU_PROGRAM_MAP(zx80_map)
323364   MCFG_CPU_IO_MAP(zx80_io_map)
324   MCFG_CPU_DECRYPTED_OPCODES_MAP(ula_map)
325   MCFG_Z80_SET_REFRESH_CALLBACK(WRITE16(zx_state, refresh_w))
326
327365   MCFG_SCREEN_ADD("screen", RASTER)
328   MCFG_SCREEN_REFRESH_RATE(XTAL_6_5MHz/2/64159.0) // 54223 for NTSC
366   MCFG_SCREEN_REFRESH_RATE(ZX81_PAL_FRAMES_PER_SECOND)
367   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(ZX81_VBLANK_DURATION))
329368
369
330370   /* video hardware */
331371   MCFG_SCREEN_UPDATE_DRIVER(zx_state, screen_update)
332   MCFG_SCREEN_SIZE(384, 311)
333   MCFG_SCREEN_VISIBLE_AREA(0, 383, 0, 310)
372   MCFG_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_PAL_SCANLINES)
373   MCFG_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_PAL_SCANLINES-1)
374   MCFG_SCREEN_VBLANK_DRIVER(zx_state, screen_eof_zx)
334375   MCFG_SCREEN_PALETTE("palette")
335376
336   MCFG_PALETTE_ADD("palette", 2)
377   MCFG_GFXDECODE_ADD("gfxdecode", "palette", zx80)
378   MCFG_PALETTE_ADD("palette", 4)
337379   MCFG_PALETTE_INIT_OWNER(zx_state,zx)
338380
381   /* sound hardware */
382   MCFG_SPEAKER_STANDARD_MONO("mono")
383   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)   /* Used by pc8300/lambda/pow3000 */
384   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
385   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
386   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
387
339388   MCFG_CASSETTE_ADD( "cassette" )
340389   MCFG_CASSETTE_FORMATS(zx80_o_format)
341390   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
r249939r249940
343392   /* internal ram */
344393   MCFG_RAM_ADD(RAM_TAG)
345394   MCFG_RAM_DEFAULT_SIZE("1K")
346   MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K")
395   MCFG_RAM_EXTRA_OPTIONS("16K")
347396MACHINE_CONFIG_END
348397
349398static MACHINE_CONFIG_DERIVED( zx81, zx80 )
399
350400   MCFG_CPU_MODIFY("maincpu")
351   MCFG_CPU_PROGRAM_MAP(zx81_map)
352401   MCFG_CPU_IO_MAP(zx81_io_map)
353402
403   MCFG_GFXDECODE_MODIFY("gfxdecode", zx81)
404
354405   MCFG_CASSETTE_MODIFY( "cassette" )
355406   MCFG_CASSETTE_FORMATS(zx81_p_format)
356407MACHINE_CONFIG_END
357408
358static MACHINE_CONFIG_DERIVED( zx81_spk, zx81 )
359   /* sound hardware */
360   /* Used by pc8300/lambda/pow3000 */
361   MCFG_SPEAKER_STANDARD_MONO("mono")
362   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
363   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
364   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
365   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
366MACHINE_CONFIG_END
367
368409static MACHINE_CONFIG_DERIVED( ts1000, zx81 )
369410   MCFG_PALETTE_MODIFY("palette")
370   MCFG_PALETTE_INIT_OWNER(zx_state, ts1000)
411   MCFG_PALETTE_INIT_OWNER(zx_state,ts1000)
371412MACHINE_CONFIG_END
372413
373414static MACHINE_CONFIG_DERIVED( ts1500, ts1000 )
415
374416   /* internal ram */
375417   MCFG_RAM_MODIFY(RAM_TAG)
376418   MCFG_RAM_DEFAULT_SIZE("16K")
377419MACHINE_CONFIG_END
378420
379static MACHINE_CONFIG_DERIVED( pc8300, zx81_spk )
421static MACHINE_CONFIG_DERIVED( pc8300, zx81 )
422
380423   MCFG_CPU_MODIFY("maincpu")
381424   MCFG_CPU_IO_MAP(pc8300_io_map)
382425
426   MCFG_MACHINE_RESET_OVERRIDE(zx_state,pc8300)
427
428   MCFG_SCREEN_MODIFY("screen")
429   MCFG_SCREEN_REFRESH_RATE(ZX81_NTSC_FRAMES_PER_SECOND)
430   MCFG_SCREEN_SIZE(ZX81_PIXELS_PER_SCANLINE, ZX81_NTSC_SCANLINES)
431   MCFG_SCREEN_VISIBLE_AREA(0, ZX81_PIXELS_PER_SCANLINE-1, 0, ZX81_NTSC_SCANLINES-1)
432
433   MCFG_GFXDECODE_MODIFY("gfxdecode", pc8300)
434
383435   /* internal ram */
384436   MCFG_RAM_MODIFY(RAM_TAG)
385437   MCFG_RAM_DEFAULT_SIZE("16K")
386438MACHINE_CONFIG_END
387439
388static MACHINE_CONFIG_DERIVED( pow3000, zx81_spk )
440static MACHINE_CONFIG_DERIVED( pow3000, zx81 )
441
389442   MCFG_CPU_MODIFY("maincpu")
390443   MCFG_CPU_IO_MAP(pow3000_io_map)
391444
445   MCFG_MACHINE_RESET_OVERRIDE(zx_state,pow3000)
446
447   MCFG_GFXDECODE_MODIFY("gfxdecode", pc8300)
448
392449   /* internal ram */
393450   MCFG_RAM_MODIFY(RAM_TAG)
394451   MCFG_RAM_DEFAULT_SIZE("2K")
r249939r249940
399456/* ROMs */
400457
401458ROM_START(zx80)
402   ROM_REGION( 0x1000, "maincpu",0 )
459   ROM_REGION( 0x10000, "maincpu",0 )
403460   ROM_SYSTEM_BIOS(0, "default", "BASIC")
404461   ROMX_LOAD( "zx80.rom",   0x0000, 0x1000, CRC(4c7fc597) SHA1(b6769a3197c77009e0933e038c15b43cf4c98c7a), ROM_BIOS(1) )
405462   ROM_SYSTEM_BIOS(1, "aszmic", "ASZMIC")
r249939r249940
407464ROM_END
408465
409466ROM_START(zx81)
410   ROM_REGION( 0x2000, "maincpu",0 )
467   ROM_REGION( 0x10000, "maincpu",0 )
411468   ROM_SYSTEM_BIOS(0, "3rd", "3rd rev.")
412469   ROMX_LOAD( "zx81b.rom",   0x0000, 0x2000, CRC(522c37b8) SHA1(c6d8e06cb936989f6e1cc7a56d1f092da854a515), ROM_BIOS(1) )
413470   ROM_SYSTEM_BIOS(1, "1st", "1st rev.")
r249939r249940
421478ROM_END
422479
423480ROM_START(ts1000)
424   ROM_REGION( 0x2000, "maincpu",0 )
481   ROM_REGION( 0x10000, "maincpu",0 )
425482   ROM_LOAD( "zx81a.rom", 0x0000, 0x2000, CRC(4b1dd6eb) SHA1(7b143ee964e9ada89d1f9e88f0bd48d919184cfc) )
426483ROM_END
427484
428485ROM_START(ts1500)
429   ROM_REGION( 0x2000, "maincpu",0 )
486   ROM_REGION( 0x10000, "maincpu",0 )
430487   ROM_LOAD( "d2364c_649.u2", 0x0000, 0x2000, CRC(7dd19c48) SHA1(3eb437359221b4406d236085ec66fa02278e7495) )
431488ROM_END
432489
433490ROM_START(ringo470)
434   ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF )
491   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
435492   ROM_LOAD( "ringo470.rom", 0x0000, 0x2000, CRC(b9c5abec) SHA1(191c4994adfffe4f83b98dc3959dde2724b1dbac) )
436493ROM_END
437494
438495ROM_START(pc8300)
439   ROM_REGION( 0x2000, "maincpu",0 )
496   ROM_REGION( 0x10000, "maincpu",0 )
440497   ROM_LOAD( "8300_org.rom", 0x0000, 0x2000, CRC(a350f2b1) SHA1(6a9be484556cc27a9cd9d71085d2027c6243333f) )
441498
442499   ROM_REGION( 0x200, "gfx1", 0 )
r249939r249940
444501ROM_END
445502
446503ROM_START(pow3000)
447   ROM_REGION( 0x2000, "maincpu",0 )
504   ROM_REGION( 0x10000, "maincpu",0 )
448505   ROM_LOAD( "pow3000.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) )
449506
450507   ROM_REGION( 0x200, "gfx1", 0 )
r249939r249940
452509ROM_END
453510
454511ROM_START(lambda)
455   ROM_REGION( 0x2000, "maincpu",0 )
512   ROM_REGION( 0x10000, "maincpu",0 )
456513   ROM_LOAD( "lambda.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) )
457514
458515   ROM_REGION( 0x200, "gfx1", 0 )
r249939r249940
460517ROM_END
461518
462519ROM_START( tk85 )
463   ROM_REGION( 0x2800, "maincpu", 0 )
520   ROM_REGION( 0x10000, "maincpu", 0 )
464521   ROM_LOAD( "tk85.rom", 0x0000, 0x2800, CRC(8972d756) SHA1(7b961a1733fc047eb682150a32e17bca10a018d2) )
465522ROM_END
466523
467524/* This homebrew has 192k of RAM and 32k of ROM via bankswitching. One of the primary bankswitching lines is /M1,
468525    which is not emulated by MAME's z80. */
469526ROM_START( zx97 )
470   ROM_REGION( 0x8000, "maincpu", 0 )
471   ROM_LOAD( "zx97.rom", 0x0000, 0x8000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) )
527   ROM_REGION( 0x10000, "maincpu", 0 )
528   ROM_LOAD( "zx97.rom", 0x0000, 0x2000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) )
529   ROM_IGNORE( 0x6000 )    /* Unemulated bankswitched part */
472530ROM_END
473531
474532/* Game Drivers */
475533
476COMP( 1980, zx80,       0,      0,      zx80,       zx80,    zx_state,    zx,     "Sinclair Research Ltd",    "ZX-80",               MACHINE_NO_SOUND )
477COMP( 1981, zx81,       0,      0,      zx81,       zx81,    zx_state,    zx,     "Sinclair Research Ltd",    "ZX-81",               MACHINE_NO_SOUND )
478COMP( 1982, ts1000,     zx81,   0,      ts1000,     zx81,    zx_state,    zx,     "Timex Sinclair",           "Timex Sinclair 1000", MACHINE_NO_SOUND )
479COMP( 1983, ts1500,     zx81,   0,      ts1500,     zx81,    zx_state,    zx,     "Timex Sinclair",           "Timex Sinclair 1500", MACHINE_NO_SOUND )
480COMP( 1983, tk85,       zx81,   0,      ts1000,     zx81,    zx_state,    zx,     "Microdigital",             "TK85",                MACHINE_NO_SOUND )
481COMP( 1983, ringo470,   zx81,   0,      ts1000,     zx81,    zx_state,    zx,     "Ritas do Brasil Ltda",     "Ringo 470",           MACHINE_NO_SOUND )
482COMP( 1984, pc8300,     zx81,   0,      pc8300,     pc8300,  zx_state,    zx,     "Your Computer",            "PC8300",              0 )
534/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    COMPANY                     FULLNAME                FLAGS */
535COMP( 1980, zx80,       0,      0,      zx80,       zx80, zx_state,       zx,     "Sinclair Research Ltd",    "ZX-80",               0 )
536COMP( 1981, zx81,       0,      0,      zx81,       zx81, zx_state,       zx,     "Sinclair Research Ltd",    "ZX-81",               0 )
537COMP( 1982, ts1000,     zx81,   0,      ts1000,     zx81, zx_state,       zx,     "Timex Sinclair",           "Timex Sinclair 1000", 0 )
538COMP( 1983, ts1500,     zx81,   0,      ts1500,     zx81, zx_state,       zx,     "Timex Sinclair",           "Timex Sinclair 1500", 0 )
539COMP( 1983, tk85,       zx81,   0,      ts1000,     zx81, zx_state,       zx,     "Microdigital",             "TK85",                0 )
540COMP( 1983, ringo470,   zx81,   0,      ts1000,     zx81, zx_state,       zx,     "Ritas do Brasil Ltda",     "Ringo 470",           0 )
541COMP( 1984, pc8300,     zx81,   0,      pc8300,     pc8300, zx_state,     zx,     "Your Computer",            "PC8300",              0 )
483542COMP( 1983, pow3000,    zx81,   0,      pow3000,    pow3000, zx_state,    zx,     "Creon Enterprises",        "Power 3000",          0 )
484543COMP( 1982, lambda,     zx81,   0,      pow3000,    pow3000, zx_state,    zx,     "Lambda Electronics Ltd",   "Lambda 8300",         0 )
485COMP( 1997, zx97,       zx81,   0,      zx81,       zx81,    zx_state,    zx,     "Wilf Rigter",              "ZX97", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_UNOFFICIAL )
544COMP( 1997, zx97,       zx81,   0,      zx81,       zx81, zx_state,       zx,     "Wilf Rigter",              "ZX97", MACHINE_NOT_WORKING | MACHINE_UNOFFICIAL )
trunk/src/mame/includes/amstrad.h
r249939r249940
3030#include "bus/cpc/brunword4.h"
3131#include "bus/cpc/hd20.h"
3232#include "bus/cpc/magicsound.h"
33#include "bus/cpc/doubler.h"
3433#include "machine/ram.h"
3534#include "imagedev/cassette.h"
3635#include "bus/centronics/ctronics.h"
trunk/src/mame/includes/champbas.h
r249939r249940
66
77*************************************************************************/
88
9
10#define CPUTAG_MCU "mcu"
911#include "sound/dac.h"
1012
11
1213class champbas_state : public driver_device
1314{
1415public:
r249939r249940
1920      m_spriteram_2(*this, "spriteram_2"),
2021      m_maincpu(*this, "maincpu"),
2122      m_audiocpu(*this, "audiocpu"),
22      m_mcu(*this, "mcu"),
23      m_mcu(*this, CPUTAG_MCU),
2324      m_dac(*this, "dac"),
2425      m_dac1(*this, "dac1"),
2526      m_dac2(*this, "dac2"),
2627      m_gfxdecode(*this, "gfxdecode"),
27      m_palette(*this, "palette")
28   { }
28      m_palette(*this, "palette"){ }
2929
3030   /* memory pointers */
3131   required_shared_ptr<UINT8> m_bg_videoram;
trunk/src/mame/includes/hng64.h
r249939r249940
111111class hng64_poly_renderer : public poly_manager<float, hng64_poly_data, 7, HNG64_MAX_POLYGONS>
112112{
113113public:
114   hng64_poly_renderer(hng64_state& state);
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);
115118
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
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
r249939r249940
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
r249939r249940
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   
336337
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;
343    hng64_poly_renderer* m_poly_renderer;
344   
345    TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
344346
345   TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
346
347   UINT8 *m_texturerom;
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);
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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/neogeo.h
r249939r249940
392392   ROM_LOAD16_WORD_SWAP_BIOS( 0, "sp-s2.sp1",         0x00000, 0x020000, CRC(9036d879) SHA1(4f5ed7105b7128794654ce82b51723e16e389543) ) /* Europe, 1 Slot, has also been found on 2 Slot and 4 Slot (the old hacks were designed for this one) */ \
393393   ROM_SYSTEM_BIOS( 1, "euro-s1", "Europe MVS (Ver. 1)" ) \
394394   ROM_LOAD16_WORD_SWAP_BIOS( 1, "sp-s.sp1",          0x00000, 0x020000, CRC(c7f2fa45) SHA1(09576ff20b4d6b365e78e6a5698ea450262697cd) ) /* Europe, 4 Slot */ \
395   \
396395   ROM_SYSTEM_BIOS( 2, "us", "US MVS (Ver. 2?)" ) \
397396   ROM_LOAD16_WORD_SWAP_BIOS( 2, "sp-u2.sp1",         0x00000, 0x020000, CRC(e72943de) SHA1(5c6bba07d2ec8ac95776aa3511109f5e1e2e92eb) ) /* US, 2 Slot */ \
398397   ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \
399398   ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1",          0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \
400   ROM_SYSTEM_BIOS( 4, "us-v2", "US MVS (4 slot, Ver 2)" ) \
401   ROM_LOAD16_WORD_SWAP_BIOS(4, "v2.bin",            0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \
402   \
403   ROM_SYSTEM_BIOS( 5, "asia", "Asia MVS (Ver. 3)" ) \
404   ROM_LOAD16_WORD_SWAP_BIOS( 5, "asia-s3.rom",       0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \
405   \
406   ROM_SYSTEM_BIOS( 6, "japan", "Japan MVS (Ver. 3)" ) \
407   ROM_LOAD16_WORD_SWAP_BIOS( 6, "vs-bios.rom",       0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \
408   ROM_SYSTEM_BIOS( 7, "japan-s2", "Japan MVS (Ver. 2)" ) \
409   ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp-j2.sp1",         0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \
410   ROM_SYSTEM_BIOS( 8, "japan-s1", "Japan MVS (Ver. 1)" ) \
411   ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp1.jipan.1024",    0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \
412   ROM_SYSTEM_BIOS( 9, "mv1c", "NEO-MVH MV1C" ) \
413   ROM_LOAD16_WORD_SWAP_BIOS( 9, "sp-45.sp1",         0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \
414   ROM_SYSTEM_BIOS( 10, "japan-j3", "Japan MVS (J3)" ) \
415   ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin",      0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
416   ROM_SYSTEM_BIOS(11, "japan-hotel", "Custom Japanese Hotel" ) \
417   ROM_LOAD16_WORD_SWAP_BIOS(11, "sp-1v1_3db8c.bin",  0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
418   \
419   ROM_SYSTEM_BIOS(12, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
420   ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_1.rom",  0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
421   ROM_SYSTEM_BIOS(13, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
422   ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_3_0.rom",  0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
423   ROM_SYSTEM_BIOS(14, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
424   ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3.rom",  0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
425   ROM_SYSTEM_BIOS(15, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
426   ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
427   ROM_SYSTEM_BIOS(16, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
428   ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_2.rom",  0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
429   ROM_SYSTEM_BIOS(17, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
430   ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_1.rom",  0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
431   ROM_SYSTEM_BIOS(18, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
432   ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_2_0.rom",  0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
433   ROM_SYSTEM_BIOS(19, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
434   ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_3.rom",  0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \
435   ROM_SYSTEM_BIOS(20, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
436   ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2.rom",  0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
437   ROM_SYSTEM_BIOS(21, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
438   ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
439   ROM_SYSTEM_BIOS(22, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
440   ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_1.rom",  0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
441   ROM_SYSTEM_BIOS(23, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
442   ROM_LOAD16_WORD_SWAP_BIOS(23, "uni-bios_1_0.rom",  0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
399   ROM_SYSTEM_BIOS( 4, "asia", "Asia MVS (Ver. 3)" ) \
400   ROM_LOAD16_WORD_SWAP_BIOS( 4, "asia-s3.rom",       0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \
401   ROM_SYSTEM_BIOS( 5, "japan", "Japan MVS (Ver. 3)" ) \
402   ROM_LOAD16_WORD_SWAP_BIOS( 5, "vs-bios.rom",       0x00000, 0x020000, CRC(f0e8f27d) SHA1(ecf01eda815909f1facec62abf3594eaa8d11075) ) /* Japan, Ver 6 VS Bios */ \
403   ROM_SYSTEM_BIOS( 6, "japan-s2", "Japan MVS (Ver. 2)" ) \
404   ROM_LOAD16_WORD_SWAP_BIOS( 6, "sp-j2.sp1",         0x00000, 0x020000, CRC(acede59c) SHA1(b6f97acd282fd7e94d9426078a90f059b5e9dd91) ) /* Japan, Older */ \
405   ROM_SYSTEM_BIOS( 7, "japan-s1", "Japan MVS (Ver. 1)" ) \
406   ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp1.jipan.1024",    0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \
407   ROM_SYSTEM_BIOS( 8, "mv1c", "NEO-MVH MV1C" ) \
408   ROM_LOAD16_WORD_SWAP_BIOS( 8, "sp-45.sp1",         0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \
409   ROM_SYSTEM_BIOS( 9, "japan-j3", "Japan MVS (J3)" ) \
410   ROM_LOAD16_WORD_SWAP_BIOS( 9, "japan-j3.bin",      0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
411   ROM_SYSTEM_BIOS(10, "japan-hotel", "Custom Japanese Hotel" ) \
412   ROM_LOAD16_WORD_SWAP_BIOS(10, "sp-1v1_3db8c.bin",  0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
413   ROM_SYSTEM_BIOS(11, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
414   ROM_LOAD16_WORD_SWAP_BIOS(11, "uni-bios_3_1.rom",  0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
415   ROM_SYSTEM_BIOS(12, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
416   ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_0.rom",  0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
417   ROM_SYSTEM_BIOS(13, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
418   ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_2_3.rom",  0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
419   ROM_SYSTEM_BIOS(14, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
420   ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
421   ROM_SYSTEM_BIOS(15, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
422   ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_2.rom",  0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
423   ROM_SYSTEM_BIOS(16, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
424   ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_1.rom",  0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
425   ROM_SYSTEM_BIOS(17, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
426   ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_0.rom",  0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
427   ROM_SYSTEM_BIOS(18, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
428   ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_1_3.rom",  0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \
429   ROM_SYSTEM_BIOS(19, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
430   ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_2.rom",  0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
431   ROM_SYSTEM_BIOS(20, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
432   ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
433   ROM_SYSTEM_BIOS(21, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
434   ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_1.rom",  0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
435   ROM_SYSTEM_BIOS(22, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
436   ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_0.rom",  0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
443437
444438
445439
trunk/src/mame/includes/osborne1.h
r249939r249940
4747      m_row5(*this, "ROW5"),
4848      m_row6(*this, "ROW6"),
4949      m_row7(*this, "ROW7"),
50      m_cnf(*this, "CNF"),
5150      m_bank1(*this, "bank1"),
5251      m_bank2(*this, "bank2"),
5352      m_bank3(*this, "bank3"),
53      m_bank4(*this, "bank4"),
5454      m_region_maincpu(*this, "maincpu") { }
5555
5656   virtual void video_start();
r249939r249940
7373   DECLARE_WRITE8_MEMBER(osborne1_1000_w);
7474   DECLARE_READ8_MEMBER(osborne1_2000_r);
7575   DECLARE_WRITE8_MEMBER(osborne1_2000_w);
76   DECLARE_WRITE8_MEMBER(osborne1_3000_w);
7677   DECLARE_WRITE8_MEMBER(osborne1_videoram_w);
7778   DECLARE_WRITE8_MEMBER(osborne1_bankswitch_w);
7879   DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func);
r249939r249940
8586   DECLARE_DIRECT_UPDATE_MEMBER(osborne1_opbase);
8687
8788   bool m_bank2_enabled;
88   UINT8   m_bit_9;
89   bool m_bank3_enabled;
90   UINT8   *m_bank4_ptr;
91   UINT8   *m_empty_4K;
8992   /* IRQ states */
9093   bool m_pia_0_irq_state;
9194   bool m_pia_1_irq_state;
9295   /* video related */
93   UINT8   m_screen_pac;
94   UINT8   m_resolution;
95   UINT8   m_hc_left;
9696   UINT8   m_new_start_x;
9797   UINT8   m_new_start_y;
9898   emu_timer *m_video_timer;
r249939r249940
115115   required_ioport m_row5;
116116   required_ioport m_row6;
117117   required_ioport m_row7;
118   required_ioport m_cnf;
119118   required_memory_bank m_bank1;
120119   required_memory_bank m_bank2;
121120   required_memory_bank m_bank3;
121   required_memory_bank m_bank4;
122122   required_memory_region m_region_maincpu;
123123
124124   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
trunk/src/mame/includes/timeplt.h
r249939r249940
1515      : driver_device(mconfig, type, tag),
1616      m_maincpu(*this, "maincpu"),
1717      m_tc8830f(*this, "tc8830f"),
18      m_gfxdecode(*this, "gfxdecode"),
19      m_screen(*this, "screen"),
20      m_palette(*this, "palette"),
2118      m_colorram(*this, "colorram"),
2219      m_videoram(*this, "videoram"),
2320      m_spriteram(*this, "spriteram"),
24      m_spriteram2(*this, "spriteram2")
21      m_spriteram2(*this, "spriteram2"),
22      m_gfxdecode(*this, "gfxdecode"),
23      m_screen(*this, "screen"),
24      m_palette(*this, "palette")
2525   { }
2626
2727   required_device<cpu_device> m_maincpu;
2828   optional_device<tc8830f_device> m_tc8830f;
29   required_device<gfxdecode_device> m_gfxdecode;
30   required_device<screen_device> m_screen;
31   required_device<palette_device> m_palette;
3229
3330   /* memory pointers */
3431   required_shared_ptr<UINT8> m_colorram;
r249939r249940
3633   required_shared_ptr<UINT8> m_spriteram;
3734   required_shared_ptr<UINT8> m_spriteram2;
3835
36   required_device<gfxdecode_device> m_gfxdecode;
37   required_device<screen_device> m_screen;
38   required_device<palette_device> m_palette;
39
3940   /* video-related */
4041   tilemap_t  *m_bg_tilemap;
4142
4243   /* misc */
4344   UINT8    m_nmi_enable;
44   bool    m_video_enable;
4545
46   /* common */
47   DECLARE_WRITE8_MEMBER(coincounter_w);
48   DECLARE_WRITE8_MEMBER(videoram_w);
49   DECLARE_WRITE8_MEMBER(colorram_w);
50   DECLARE_WRITE8_MEMBER(flipscreen_w);
51   DECLARE_READ8_MEMBER(scanline_r);
52
53   /* all but psurge */
54   DECLARE_WRITE8_MEMBER(nmi_enable_w);
55   DECLARE_WRITE8_MEMBER(video_enable_w);
56
57   /* psurge */
46   DECLARE_WRITE8_MEMBER(timeplt_nmi_enable_w);
47   DECLARE_WRITE8_MEMBER(timeplt_coin_counter_w);
5848   DECLARE_READ8_MEMBER(psurge_protection_r);
59
60   /* chkun */
49   DECLARE_WRITE8_MEMBER(timeplt_videoram_w);
50   DECLARE_WRITE8_MEMBER(timeplt_colorram_w);
51   DECLARE_WRITE8_MEMBER(timeplt_flipscreen_w);
52   DECLARE_READ8_MEMBER(timeplt_scanline_r);
6153   DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r);
6254   DECLARE_WRITE8_MEMBER(chkun_sound_w);
63
6455   TILE_GET_INFO_MEMBER(get_tile_info);
6556   TILE_GET_INFO_MEMBER(get_chkun_tile_info);
66
6757   virtual void machine_start();
6858   virtual void machine_reset();
6959   virtual void video_start();
7060   DECLARE_PALETTE_INIT(timeplt);
7161   DECLARE_VIDEO_START(chkun);
72   DECLARE_VIDEO_START(psurge);
73
74   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
62   UINT32 screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
63   INTERRUPT_GEN_MEMBER(timeplt_interrupt);
7564   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
76
77   INTERRUPT_GEN_MEMBER(interrupt);
7865};
trunk/src/mame/includes/zx.h
r249939r249940
2121class zx_state : public driver_device
2222{
2323public:
24   enum
25   {
26      TIMER_TAPE_PULSE,
27      TIMER_ULA_NMI,
28      TIMER_ULA_IRQ
29   };
30
2431   zx_state(const machine_config &mconfig, device_type type, const char *tag)
2532      : driver_device(mconfig, type, tag),
2633      m_maincpu(*this, "maincpu"),
r249939r249940
4249
4350   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4451
45   DECLARE_READ8_MEMBER(ula_high_r);
46   DECLARE_READ8_MEMBER(ula_low_r);
47   DECLARE_WRITE16_MEMBER(refresh_w);
52   bitmap_ind16 m_bitmap;
53
54   DECLARE_READ8_MEMBER(zx_ram_r);
4855   DECLARE_READ8_MEMBER(zx80_io_r);
4956   DECLARE_READ8_MEMBER(zx81_io_r);
5057   DECLARE_READ8_MEMBER(pc8300_io_r);
5158   DECLARE_READ8_MEMBER(pow3000_io_r);
5259   DECLARE_WRITE8_MEMBER(zx80_io_w);
5360   DECLARE_WRITE8_MEMBER(zx81_io_w);
61   emu_timer *m_ula_nmi;
62   int m_ula_irq_active;
63   int m_ula_frame_vsync;
64   int m_ula_scanline_count;
65   UINT8 m_tape_bit;
66   UINT8 m_speaker_state;
67   int m_old_x;
68   int m_old_y;
69   UINT8 m_old_c;
70   UINT8 m_charline[32];
71   UINT8 m_charline_ptr;
72   int m_offs1;
73   void zx_ula_bkgnd(UINT8 color);
74   DECLARE_WRITE8_MEMBER(zx_ram_w);
75   DECLARE_DIRECT_UPDATE_MEMBER(zx_setdirect);
76   DECLARE_DIRECT_UPDATE_MEMBER(pc8300_setdirect);
77   DECLARE_DIRECT_UPDATE_MEMBER(pow3000_setdirect);
5478   DECLARE_DRIVER_INIT(zx);
5579   virtual void machine_reset();
5680   virtual void video_start();
5781   DECLARE_PALETTE_INIT(zx);
5882   DECLARE_PALETTE_INIT(ts1000);
59   void zx_tape_input();
60   void zx_ula_hsync();
83   DECLARE_MACHINE_RESET(pc8300);
84   DECLARE_MACHINE_RESET(pow3000);
85   void screen_eof_zx(screen_device &screen, bool state);
86   TIMER_CALLBACK_MEMBER(zx_tape_pulse);
87   TIMER_CALLBACK_MEMBER(zx_ula_nmi);
88   TIMER_CALLBACK_MEMBER(zx_ula_irq);
6189
62   UINT32 get_ram_size();
63
6490protected:
65   enum
66   {
67      TIMER_TAPE_INPUT,
68      TIMER_ULA_HSYNC
69   };
70
7191   required_device<cpu_device> m_maincpu;
7292   required_device<ram_device> m_ram;
7393   required_device<cassette_image_device> m_cassette;
74   optional_device<speaker_sound_device> m_speaker;
94   required_device<speaker_sound_device> m_speaker;
7595   required_memory_region m_region_maincpu;
7696   optional_memory_region m_region_gfx1;
7797   required_ioport m_io_row0;
r249939r249940
85105   optional_ioport m_io_config;
86106   required_device<screen_device> m_screen;
87107
88   address_space *m_program;
89   emu_timer *m_tape_input, *m_ula_hsync;
90
91   bool m_vsync_active, m_hsync_active, m_nmi_on, m_nmi_generator_active;
92   UINT64 m_base_vsync_clock, m_vsync_start_time;
93   UINT32 m_ypos;
94
95   UINT8 m_prev_refresh;
96   UINT8 m_speaker_state;
97
98   bitmap_ind16 *m_bitmap_render, *m_bitmap_buffer;
99
100   UINT16 m_ula_char_buffer;
101   double m_cassette_cur_level;
102
108   void zx_ula_r(int offs, memory_region *region, const UINT8 param);
103109   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
104
105   void drop_sync();
106   void recalc_hsync();
107110};
108111
109112#endif /* ZX_H_ */
trunk/src/mame/layout/by17.lay
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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>
r249939r249940
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
r249939r249940
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>
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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   
530531
531532
532
533533<!-- Solenoids -->
534534
535535   <element name="Solenoid_PullDown">
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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>
r249939r249940
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
r249939r249940
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>
r249939r249940
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>
r249939r249940
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/315-5881_crypt.c
r249939r249940
4747   save_item(NAME(line_buffer_pos));
4848   save_item(NAME(line_buffer_size));
4949
50   std::string skey = parameter("key");
50   std::string skey = parameter("key").c_str();
5151   if(!skey.empty())
5252      key = strtoll(skey.c_str(), 0, 16);
5353   else
trunk/src/mame/machine/apollo.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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/naomim1.c
r249939r249940
3232{
3333   naomi_board::device_start();
3434
35   std::string skey = parameter("key");
35   std::string skey = parameter("key").c_str();
3636   if(!skey.empty())
3737      key = strtoll(skey.c_str(), 0, 16);
3838   else
trunk/src/mame/machine/osborne1.c
r249939r249940
2424WRITE8_MEMBER( osborne1_state::osborne1_0000_w )
2525{
2626   /* Check whether regular RAM is enabled */
27   if ( !m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE) )
27   if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) )
2828   {
2929      m_ram->pointer()[ offset ] = data;
3030   }
r249939r249940
3434WRITE8_MEMBER( osborne1_state::osborne1_1000_w )
3535{
3636   /* Check whether regular RAM is enabled */
37   if ( !m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE) )
37   if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) )
3838   {
3939      m_ram->pointer()[ 0x1000 + offset ] = data;
4040   }
r249939r249940
4646   UINT8   data = 0xFF;
4747
4848   /* Check whether regular RAM is enabled */
49   if ( !m_bank2_enabled )
49   if ( ! m_bank2_enabled )
5050   {
5151      data = m_ram->pointer()[ 0x2000 + offset ];
5252   }
5353   else
5454   {
55      // This isn't really accurate - bus fighting will occur for many values
56      // since each peripheral only checks two bits.  We just return 0xFF for
57      // any undocumented address.
58      switch ( offset & 0x0F00 )
55      switch( offset & 0x0F00 )
5956      {
6057      case 0x100: /* Floppy */
6158         data = m_fdc->read( space, offset & 0x03 );
r249939r249940
7875         /* Row 7 */
7976         if ( offset & 0x80 )    data &= m_row7->read();
8077         break;
81      case 0x400: /* SCREEN-PAC */
82         if (m_screen_pac) data &= 0xFB;
83         break;
8478      case 0x900: /* IEEE488 PIA */
85         data = m_pia0->read(space, offset & 0x03);
79         data = m_pia0->read(space, offset & 0x03 );
8680         break;
8781      case 0xA00: /* Serial */
8882         break;
8983      case 0xC00: /* Video PIA */
90         data = m_pia1->read(space, offset & 0x03);
84         data = m_pia1->read(space, offset & 0x03 );
9185         break;
9286      }
9387   }
r249939r249940
9791
9892WRITE8_MEMBER( osborne1_state::osborne1_2000_w )
9993{
100#if 0
10194   /* Check whether regular RAM is enabled */
102   if ( !m_bank2_enabled ||  (m_in_irq_handler && m_bankswitch == RAMMODE) )
103   {
104      m_ram->pointer()[ 0x2000 + offset ] = data;
105   }
106   else
107   {
108      /* Handle writes to the I/O area */
109      if ( 0x100 == (offset & 0x900) ) /* Floppy */
110         m_fdc->write(space, offset & 0x03, data);
111      if ( 0x400 == (offset & 0xC00) ) /* SCREEN-PAC */
112      {
113         m_resolution = data & 0x01;
114         m_hc_left = (data >> 1) & 0x01;
115      }
116      if ( 0x900 == (offset & 0x900) ) /* IEEE488 PIA */
117         m_pia0->write(space, offset & 0x03, data);
118      if ( 0xA00 == (offset & 0xA00) ) /* Serial */
119         /* not implemented */;
120      if ( 0xC00 == (offset & 0xC00) ) /* Video PIA */
121         m_pia1->write(space, offset & 0x03, data);
122   }
123#else
124   // This code is a nasty hack that doesn't reflect hardware operation,
125   // but it gets us by while the bank selection implementation is inadequate
12695   if ( ! m_bank2_enabled )
12796   {
12897      m_ram->pointer()[ 0x2000 + offset ] = data;
r249939r249940
134103         m_ram->pointer()[ 0x2000 + offset ] = data;
135104      }
136105      /* Handle writes to the I/O area */
137      switch( offset & 0x1F00 )
106      switch( offset & 0x0F00 )
138107      {
139108      case 0x100: /* Floppy */
140         m_fdc->write(space, offset & 0x03, data);
109         m_fdc->write(space, offset & 0x03, data );
141110         break;
142      case 0x400: /* SCREEN-PAC */
143         m_resolution = data & 0x01;
144         m_hc_left = (data >> 1) & 0x01;
145         break;
146111      case 0x900: /* IEEE488 PIA */
147112         m_pia0->write(space, offset & 0x03, data );
148113         break;
r249939r249940
153118         break;
154119      }
155120   }
156#endif
157121}
158122
159123
124WRITE8_MEMBER( osborne1_state::osborne1_3000_w )
125{
126   /* Check whether regular RAM is enabled */
127   if ( ! m_bank2_enabled || ( m_in_irq_handler && m_bankswitch == RAMMODE ) )
128   {
129      m_ram->pointer()[ 0x3000 + offset ] = data;
130   }
131}
132
133
160134WRITE8_MEMBER( osborne1_state::osborne1_videoram_w )
161135{
162136   /* Check whether the video attribute section is enabled */
163   if ( m_bit_9 )
137   if ( m_bank3_enabled )
164138      data |= 0x7F;
165139
166   reinterpret_cast<UINT8 *>(m_bank3->base())[offset] = data;
140   m_bank4_ptr[offset] = data;
167141}
168142
169143
170144WRITE8_MEMBER( osborne1_state::osborne1_bankswitch_w )
171145{
172   switch ( offset & 0x03 )
146   switch( offset )
173147   {
174148   case 0x00:
175149      m_bank2_enabled = 1;
176      m_bankswitch = 0x00;
150      m_bank3_enabled = 0;
177151      break;
178152   case 0x01:
179153      m_bank2_enabled = 0;
180      m_bankswitch = 0x01;
154      m_bank3_enabled = 0;
181155      break;
182156   case 0x02:
183      m_bit_9 = 1;
157      m_bank2_enabled = 1;
158      m_bank3_enabled = 1;
184159      break;
185160   case 0x03:
186      m_bit_9 = 0;
161      m_bank2_enabled = 1;
162      m_bank3_enabled = 0;
187163      break;
188164   }
189165   if ( m_bank2_enabled )
190166   {
191      m_bank1->set_base(m_region_maincpu->base());
192      m_bank2->set_base(m_region_maincpu->base());
167      m_bank1->set_base(m_region_maincpu->base() );
168      m_bank2->set_base(m_empty_4K );
169      m_bank3->set_base(m_empty_4K );
193170   }
194171   else
195172   {
196      m_bank1->set_base(m_ram->pointer());
197      m_bank2->set_base(m_ram->pointer() + 0x1000);
173      m_bank1->set_base(m_ram->pointer() );
174      m_bank2->set_base(m_ram->pointer() + 0x1000 );
175      m_bank3->set_base(m_ram->pointer() + 0x3000 );
198176   }
199   m_bank3->set_base(m_ram->pointer() + (m_bit_9 ? 0x10000 : 0xF000));
177   m_bank4_ptr = m_ram->pointer() + ( ( m_bank3_enabled ) ? 0x10000 : 0xF000 );
178   m_bank4->set_base(m_bank4_ptr );
179   m_bankswitch = offset;
200180   m_in_irq_handler = 0;
201181}
202182
r249939r249940
356336
357337TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
358338{
359   int const y = machine().first_screen()->vpos();
360   UINT8 ra=0;
339   int y = machine().first_screen()->vpos();
340   UINT8 ra=0,chr,gfx,dim;
341   UINT16 x,ma;
361342
362343   /* Check for start of frame */
363344   if ( y == 0 )
r249939r249940
374355   {
375356      ra = y % 10;
376357      /* Draw a line of the display */
377      bool const hires = m_screen_pac & m_resolution;
378      UINT16 const row = (m_new_start_y + (y/10)) * 128 & 0xF80;
379      UINT16 const col = (m_new_start_x & (hires ? 0x60 : 0x7F)) - ((hires && m_hc_left) ? 8 : 0);
358      ma = (m_new_start_y + (y/10)) * 128 + m_new_start_x;
380359      UINT16 *p = &m_bitmap.pix16(y);
381360
382      for ( UINT16 x = 0; x < (hires ? 104 : 52); x++ )
361      for ( x = 0; x < 52; x++ )
383362      {
384         UINT16 offs = row | ((col + x) & 0x7F);
385         UINT8 const chr = m_ram->pointer()[ 0xF000 + offs ];
386         UINT8 const dim = m_ram->pointer()[ 0x10000 + offs ] & 0x80;
363         chr = m_ram->pointer()[ 0xF000 + ( (ma+x) & 0xFFF ) ];
364         dim = m_ram->pointer()[ 0x10000 + ( (ma+x) & 0xFFF ) ] & 0x80;
387365
388         UINT8 const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[ (ra << 7) | (chr & 0x7F) ];
366         if ( (chr & 0x80) && (ra == 9) )
367            gfx = 0xFF;
368         else
369            gfx = m_p_chargen[ (ra << 7) | ( chr & 0x7F ) ];
389370
390371         /* Display a scanline of a character */
391372         *p++ = BIT(gfx, 7) ? ( dim ? 2 : 1 ) : 0;
392         if (!hires) { p[0] = p[-1]; p++; }
393373         *p++ = BIT(gfx, 6) ? ( dim ? 2 : 1 ) : 0;
394         if (!hires) { p[0] = p[-1]; p++; }
395374         *p++ = BIT(gfx, 5) ? ( dim ? 2 : 1 ) : 0;
396         if (!hires) { p[0] = p[-1]; p++; }
397375         *p++ = BIT(gfx, 4) ? ( dim ? 2 : 1 ) : 0;
398         if (!hires) { p[0] = p[-1]; p++; }
399376         *p++ = BIT(gfx, 3) ? ( dim ? 2 : 1 ) : 0;
400         if (!hires) { p[0] = p[-1]; p++; }
401377         *p++ = BIT(gfx, 2) ? ( dim ? 2 : 1 ) : 0;
402         if (!hires) { p[0] = p[-1]; p++; }
403378         *p++ = BIT(gfx, 1) ? ( dim ? 2 : 1 ) : 0;
404         if (!hires) { p[0] = p[-1]; p++; }
405379         *p++ = BIT(gfx, 0) ? ( dim ? 2 : 1 ) : 0;
406         if (!hires) { p[0] = p[-1]; p++; }
407380      }
408381   }
409382
410   if ( (ra==2) || (ra==6) )
383   if ( (ra==2) || (ra== 6) )
411384   {
412385      m_beep->set_state( m_beep_state );
413386   }
r249939r249940
428401
429402void osborne1_state::machine_reset()
430403{
404   address_space& space = m_maincpu->space(AS_PROGRAM);
431405   /* Initialize memory configuration */
432   osborne1_bankswitch_w( m_maincpu->space(AS_IO), 0x00, 0 );
406   osborne1_bankswitch_w( space, 0x00, 0 );
433407
434408   m_pia_0_irq_state = FALSE;
435409   m_pia_1_irq_state = FALSE;
436410   m_in_irq_handler = 0;
437411
438   m_screen_pac = 0 != (m_cnf->read() & 0x01);
439   m_resolution = 0;
440   m_hc_left = 0;
441412   m_p_chargen = memregion( "chargen" )->base();
442413
443414   memset( m_ram->pointer() + 0x10000, 0xFF, 0x1000 );
444415
445   address_space& space = m_maincpu->space(AS_PROGRAM);
446416   space.set_direct_update_handler(direct_update_delegate(FUNC(osborne1_state::osborne1_opbase), this));
447417}
448418
449419
450420DRIVER_INIT_MEMBER(osborne1_state,osborne1)
451421{
422   m_empty_4K = auto_alloc_array(machine(), UINT8, 0x1000 );
423   memset( m_empty_4K, 0xFF, 0x1000 );
424
452425   /* Configure the 6850 ACIA */
453426//  acia6850_config( 0, &osborne1_6850_config );
454427   m_video_timer = timer_alloc(TIMER_VIDEO);
r249939r249940
522495   osborne1_state *state = machine().driver_data<osborne1_state>();
523496   /* Enable ROM and I/O when IRQ is acknowledged */
524497   UINT8 old_bankswitch = state->m_bankswitch;
498   address_space& space = state->m_maincpu->space(AS_PROGRAM);
525499
526   state->osborne1_bankswitch_w( state->m_maincpu->space(AS_IO), 0, 0 );
500   state->osborne1_bankswitch_w( space, 0, 0 );
527501   state->m_bankswitch = old_bankswitch;
528502   state->m_in_irq_handler = 1;
529503   return 0xF8;
trunk/src/mame/machine/psxcd.c
r249939r249940
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/machine/zx.c
r249939r249940
11// license:GPL-2.0+
2// copyright Olivier Galibert, Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249939r249940
1010
1111#include "includes/zx.h"
1212
13DRIVER_INIT_MEMBER(zx_state,zx)
13#define video_screen_get_refresh(screen)    (((screen_config *)(screen)->inline_config)->refresh)
14
15#define DEBUG_ZX81_PORTS    1
16#define DEBUG_ZX81_VSYNC    1
17
18#define LOG_ZX81_IOR(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOR: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0)
19#define LOG_ZX81_IOW(_comment) do { if (DEBUG_ZX81_PORTS) logerror("ZX81 IOW: %04x, Data: %02x, Scanline: %d (%s)\n", offset, data, space.machine().first_screen()->vpos(), _comment); } while (0)
20#define LOG_ZX81_VSYNC do { if (DEBUG_ZX81_VSYNC) logerror("VSYNC starts in scanline: %d\n", space.machine().first_screen()->vpos()); } while (0)
21
22
23WRITE8_MEMBER(zx_state::zx_ram_w)
1424{
15   m_program = &m_maincpu->space(AS_PROGRAM);
16   m_tape_input = timer_alloc(TIMER_TAPE_INPUT);
25   UINT8 *RAM = m_region_maincpu->base();
26   RAM[offset + 0x4000] = data;
1727
18   if(m_ram->size() == 32768)
19      m_program->unmap_readwrite(0x8000, 0xbfff);
20   else if(m_ram->size() == 16384)
21      m_program->unmap_readwrite(0x8000, 0xffff);
22   else if(m_ram->size() < 16384)
23      m_program->unmap_readwrite(0x4000 + m_ram->size(), 0xffff);
28   if (data & 0x40)
29   {
30      space.write_byte(offset | 0xc000, data);
31      RAM[offset | 0xc000] = data;
32   }
33   else
34   {
35      space.write_byte(offset | 0xc000, 0);
36      RAM[offset | 0xc000] = 0;
37   }
2438}
2539
26void zx_state::machine_reset()
40/* I know this looks really pointless... but it has to be here */
41READ8_MEMBER( zx_state::zx_ram_r )
2742{
28   m_prev_refresh = 0xff;
43   UINT8 *RAM = m_region_maincpu->base();
44   return RAM[offset | 0xc000];
45}
2946
30   m_vsync_active = false;
31   m_base_vsync_clock = 0;
32   m_ypos = 0;
47DRIVER_INIT_MEMBER(zx_state,zx)
48{
49   address_space &space = m_maincpu->space(AS_PROGRAM);
3350
34   m_nmi_on = false;
35   m_nmi_generator_active = false;
51   space.install_read_bank(0x4000, 0x4000 + m_ram->size() - 1, "bank1");
52   space.install_write_handler(0x4000, 0x4000 + m_ram->size() - 1, write8_delegate(FUNC(zx_state::zx_ram_w),this));
53   membank("bank1")->set_base(m_region_maincpu->base() + 0x4000);
54}
3655
37   m_cassette_cur_level = 0;
56DIRECT_UPDATE_MEMBER(zx_state::zx_setdirect)
57{
58   if (address & 0xc000)
59      zx_ula_r(address, m_region_maincpu, 0);
60   return address;
61}
3862
39   m_tape_input->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100));
63DIRECT_UPDATE_MEMBER(zx_state::pc8300_setdirect)
64{
65   if (address & 0xc000)
66      zx_ula_r(address, m_region_gfx1, 0);
67   return address;
4068}
4169
42void zx_state::zx_tape_input()
70DIRECT_UPDATE_MEMBER(zx_state::pow3000_setdirect)
4371{
44   m_cassette_cur_level = m_cassette->input();
72   if (address & 0xc000)
73      zx_ula_r(address, m_region_gfx1, 1);
74   return address;
4575}
4676
47void zx_state::drop_sync()
77void zx_state::machine_reset()
4878{
49   if (m_vsync_active) {
50      UINT64 time = m_maincpu->total_cycles();
51      m_vsync_active = false;
52      m_cassette->output(-1.0);
79   m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::zx_setdirect), this));
80   m_tape_bit = 0x80;
81}
5382
54      int xs = 2*((m_vsync_start_time - m_base_vsync_clock) % 207);
55      int ys = (m_vsync_start_time - m_base_vsync_clock) / 207;
56      int xe = 2*((time - m_base_vsync_clock) % 207);
57      int ye = (time - m_base_vsync_clock) / 207;
58      if(xs >= 384) {
59         xs = 0;
60         ys++;
61      }
62      if(xe >= 384) {
63         xe = 0;
64         ye++;
65      }
66      if(ys < 311) {
67         if(ye > 310) {
68            ye = 311;
69            xe = 0;
70         }
71         if(ys == ye) {
72            UINT16 *dest = &m_bitmap_render->pix16(ys, xs);
73            for(int x = xs; x < xe; x++)
74               *dest++ = 1;
75         } else {
76            UINT16 *dest = &m_bitmap_render->pix16(ys, xs);
77            for(int x = xs; x < 384; x++)
78               *dest++ = 1;
79            for(int y = ys+1; y < ye; y++) {
80               dest = &m_bitmap_render->pix16(y, 0);
81               for(int x = 0; x<384; x++)
82                  *dest++ = 1;
83            }
84            dest = &m_bitmap_render->pix16(ye, 0);
85            for(int x = 0; x < xe; x++)
86               *dest++ = 1;
87         }
88      }
83MACHINE_RESET_MEMBER(zx_state,pow3000)
84{
85   m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::pow3000_setdirect), this));
86   m_tape_bit = 0x80;
87}
8988
90      // Short is hsync
91      if(time - m_vsync_start_time > 1000) {
92         // Ignore too short frame times, they're cassette output
93         if(time - m_base_vsync_clock > 52000) {
94            logerror("frame time %d\n", int(time - m_base_vsync_clock));
95           
96            rectangle rect(0, 383, 0, 310);
97            copybitmap(*m_bitmap_buffer, *m_bitmap_render, 0, 0, 0, 0, rect);
98            m_bitmap_render->fill(0);         
99            m_base_vsync_clock = time;
100            m_ypos = 0;
101         }
102         if(m_nmi_on)
103            m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
104         m_nmi_on = m_hsync_active = false;
105         recalc_hsync();
106      } else
107         m_ypos = ((time-m_base_vsync_clock)%207) < 192 ? 0 : -1;
108   }
89MACHINE_RESET_MEMBER(zx_state,pc8300)
90{
91   m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(zx_state::pc8300_setdirect), this));
92   m_tape_bit = 0x80;
10993}
11094
95TIMER_CALLBACK_MEMBER(zx_state::zx_tape_pulse)
96{
97   m_tape_bit = 0x80;
98}
99
111100READ8_MEMBER( zx_state::zx80_io_r )
112101{
113   /* port FE = read keyboard, NTSC/PAL diode, and cass bit; turn off HSYNC-generator/cass-out
114       The upper 8 bits are used to select a keyboard scan line */
102/* port FE = read keyboard, NTSC/PAL diode, and cass bit; turn off HSYNC-generator/cass-out
103    The upper 8 bits are used to select a keyboard scan line */
115104
116105   UINT8 data = 0xff;
106   UINT8 offs = offset & 0xff;
117107
118   if (!(offset & 0x01))
108   if (offs == 0xfe)
119109   {
120110      if ((offset & 0x0100) == 0)
121111         data &= m_io_row0->read();
r249939r249940
139129
140130      m_cassette->output(+1.0);
141131
142      if (!m_vsync_active && !m_nmi_generator_active) {
143         m_vsync_active = true;
144         m_vsync_start_time = m_maincpu->total_cycles();
132      if (m_ula_irq_active)
133      {
134         zx_ula_bkgnd(0);
135         m_ula_irq_active = 0;
145136      }
137//      else
138//      {
139         if ((m_cassette->input() < -0.75) && m_tape_bit)
140         {
141            m_tape_bit = 0x00;
142            timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE);
143         }
146144
147      if(m_cassette_cur_level <= 0)
148         data &= 0x7f;
145         data &= ~m_tape_bit;
146//      }
147      if (m_ula_frame_vsync == 3)
148      {
149         m_ula_frame_vsync = 2;
150      }
149151   }
150152
151153   return data;
r249939r249940
158160    The upper 8 bits are used to select a keyboard scan line */
159161
160162   UINT8 data = 0xff;
163   UINT8 offs = offset & 0xff;
161164
162   if (!(offset & 0x01))
165   if (offs == 0xfe)
163166   {
164167      if ((offset & 0x0100) == 0)
165168         data &= m_io_row0->read();
r249939r249940
183186
184187      m_cassette->output(+1.0);
185188
186      if (!m_vsync_active && !m_nmi_generator_active) {
187         m_vsync_active = true;
188         m_vsync_start_time = m_maincpu->total_cycles();
189      if (m_ula_irq_active)
190      {
191         zx_ula_bkgnd(0);
192         m_ula_irq_active = 0;
189193      }
194      else
195      {
196         if ((m_cassette->input() < -0.75) && m_tape_bit)
197         {
198            m_tape_bit = 0x00;
199            timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE);
200         }
190201
191      if(m_cassette_cur_level <= 0)
192         data &= 0x7f;
202         data &= ~m_tape_bit;
203      }
204      if (m_ula_frame_vsync == 3)
205      {
206         m_ula_frame_vsync = 2;
207      }
193208   }
194209
195210   return data;
r249939r249940
233248         data &= m_io_row7->read();
234249
235250      m_cassette->output(+1.0);
236      if(m_cassette_cur_level <= 0)
237         data &= 0x7f;
251
252      if (m_ula_irq_active)
253      {
254         zx_ula_bkgnd(0);
255         m_ula_irq_active = 0;
256      }
257      else
258      {
259         if ((m_cassette->input() < -0.75) && m_tape_bit)
260         {
261            m_tape_bit = 0x00;
262            timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE);
263         }
264
265         data &= ~m_tape_bit;
266      }
267      if (m_ula_frame_vsync == 3)
268      {
269         m_ula_frame_vsync = 2;
270      }
238271   }
239272
240273   return data;
r249939r249940
283316         data &= m_io_row7->read();
284317
285318      m_cassette->output(+1.0);
286      if(m_cassette_cur_level <= 0)
287         data &= 0x7f;
319
320      if (m_ula_irq_active)
321      {
322         zx_ula_bkgnd(0);
323         m_ula_irq_active = 0;
324      }
325      else
326      {
327         if ((m_cassette->input() < -0.75) && m_tape_bit)
328         {
329            m_tape_bit = 0x00;
330            timer_set(attotime::from_usec(362), TIMER_TAPE_PULSE);
331         }
332
333         data &= ~m_tape_bit;
334      }
335      if (m_ula_frame_vsync == 3)
336      {
337         m_ula_frame_vsync = 2;
338      }
288339   }
289340
290341   return data;
r249939r249940
309360    FE = turn on NMI generator
310361    FF = write HSYNC and cass data */
311362
312   if (!(offset & 0x01) && !m_nmi_generator_active) {
313      m_nmi_generator_active = true;
314      m_nmi_on = m_hsync_active;
315      m_maincpu->set_input_line(INPUT_LINE_NMI, m_nmi_on ? ASSERT_LINE : CLEAR_LINE);
316      recalc_hsync();
363   int height = m_screen->height();
364   UINT8 offs = offset & 0xff;
365
366   if (offs == 0xfd)
367   {
368      m_ula_nmi->reset();
317369   }
370   else
371   if (offs == 0xfe)
372   {
373      m_ula_nmi->adjust(attotime::zero, 0, m_maincpu->cycles_to_attotime(207));
318374
319   if (!(offset & 0x02) && m_nmi_generator_active) {
320      m_nmi_generator_active = false;
321      if(m_nmi_on) {
322         m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
323         m_nmi_on = false;
375      /* remove the IRQ */
376      m_ula_irq_active = 0;
377   }
378   else
379   if (offs == 0xff)
380   {
381      m_cassette->output(-1.0);
382      zx_ula_bkgnd(1);
383      if (m_ula_frame_vsync == 2)
384      {
385         m_maincpu->spin_until_time(m_screen->time_until_pos(height - 1, 0));
386         m_ula_scanline_count = height - 1;
387         logerror ("S: %d B: %d\n", m_screen->vpos(), m_screen->hpos());
324388      }
325389   }
326
327   drop_sync();
328390}
trunk/src/mame/mess.lst
r249939r249940
8181picou    // 1994 Sega Pico (USA)
8282picoj    // 1993 Sega Pico (Japan)
8383copera  // 1993 Sega / Yamaha
84sawatte //
8584segacd  // 1992 Sega Sega CD (USA)
8685megacd  // 1993 Sega Mega-CD (Europe)
8786megacda // 1993 Sega Mega-CD (Asia)
r249939r249940
763762ataripc3
764763ssam88s
765764sicpc1605
766eagle1600
767765
768766// Non-PC msdos
769767pcd     // Siemens PC-D
r249939r249940
16641662
16651663// Exidy, Inc.
16661664sorcerer     // Sorcerer
1667sorcerer2   // monitor 1.1 1979
1665sorcerer2   // monitor 1.1 1979
16681666sorcererd    // Sorcerer with floppies
16691667
16701668// Galaksija
r249939r249940
27652763micral
27662764rd100
27672765proteus3
2768unichamp
trunk/src/mame/video/apple2.c
r249939r249940
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
r249939r249940
9393WRITE16_MEMBER( btoads_state::scroll0_w )
9494{
9595   /* allow multiple changes during display */
96//  m_screen->update_now();
97   m_screen->update_partial(m_screen->vpos());
96   m_screen->update_now();
9897
9998   /* upper bits are Y scroll, lower bits are X scroll */
10099   if (ACCESSING_BITS_8_15)
r249939r249940
107106WRITE16_MEMBER( btoads_state::scroll1_w )
108107{
109108   /* allow multiple changes during display */
110//  m_screen->update_now();
111   m_screen->update_partial(m_screen->vpos());
109   m_screen->update_now();
112110
113111   /* upper bits are Y scroll, lower bits are X scroll */
114112   if (ACCESSING_BITS_8_15)
trunk/src/mame/video/champbas.c
r249939r249940
11// license:BSD-3-Clause
22// copyright-holders:Ernesto Corvi, Jarek Parchanski, Nicola Salmoria
3/*************************************************************************
4
5    Talbot - Champion Base Ball - Exciting Soccer
6
7*************************************************************************/
8
93#include "emu.h"
104#include "video/resnet.h"
115#include "includes/champbas.h"
r249939r249940
3428   static const int resistances_rg[3] = { 1000, 470, 220 };
3529   static const int resistances_b [2] = { 470, 220 };
3630   double rweights[3], gweights[3], bweights[2];
31   int i;
3732
3833   /* compute the color output resistor weights */
3934   compute_resistor_weights(0, 255, -1.0,
r249939r249940
4237         2, &resistances_b[0],  bweights, 0, 0);
4338
4439   /* create a lookup table for the palette */
45   for (int i = 0; i < 0x20; i++)
40   for (i = 0; i < 0x20; i++)
4641   {
4742      int bit0, bit1, bit2;
4843      int r, g, b;
r249939r249940
6964
7065   color_prom += 0x20;
7166
72   for (int i = 0; i < 0x200; i++)
67   for (i = 0; i < 0x200; i++)
7368   {
7469      UINT8 ctabentry = (color_prom[i & 0xff] & 0x0f) | ((i & 0x100) >> 4);
7570      palette.set_pen_indirect(i, ctabentry);
r249939r249940
8075PALETTE_INIT_MEMBER(champbas_state,exctsccr)
8176{
8277   const UINT8 *color_prom = memregion("proms")->base();
78   int i;
8379
8480   /* create a lookup table for the palette */
85   for (int i = 0; i < 0x20; i++)
81   for (i = 0; i < 0x20; i++)
8682   {
8783      int bit0, bit1, bit2;
8884      int r, g, b;
r249939r249940
112108   color_prom += 0x20;
113109
114110   /* characters / sprites (3bpp) */
115   for (int i = 0; i < 0x100; i++)
111   for (i = 0; i < 0x100; i++)
116112   {
117113      int swapped_i = BITSWAP8(i, 2, 7, 6, 5, 4, 3, 1, 0);
118114      UINT8 ctabentry = (color_prom[swapped_i] & 0x0f) | ((i & 0x80) >> 3);
r249939r249940
120116   }
121117
122118   /* sprites (4bpp) */
123   for (int i = 0; i < 0x100; i++)
119   for (i = 0; i < 0x100; i++)
124120   {
125121      UINT8 ctabentry = (color_prom[0x100 + i] & 0x0f) | 0x10;
126122      palette.set_pen_indirect(i + 0x100, ctabentry);
r249939r249940
190186
191187void champbas_state::champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
192188{
189   int offs;
193190   gfx_element* const gfx = m_gfxdecode->gfx(1);
194191
195   for (int offs = m_spriteram.bytes() - 2; offs >= 0; offs -= 2)
192   for (offs = m_spriteram.bytes() - 2; offs >= 0; offs -= 2)
196193   {
197194      int code = (m_spriteram[offs] >> 2) | (m_gfx_bank << 6);
198195      int color = (m_spriteram[offs + 1] & 0x1f) | (m_palette_bank << 6);
r249939r249940
201198      int sx = m_spriteram_2[offs + 1] - 16;
202199      int sy = 255 - m_spriteram_2[offs];
203200
204      gfx->transmask(bitmap,cliprect,
205         code, color,
206         flipx, flipy,
207         sx, sy,
208         m_palette->transpen_mask(*gfx, color, 0));
209201
202            gfx->transmask(bitmap,cliprect,
203            code, color,
204            flipx, flipy,
205            sx, sy,
206            m_palette->transpen_mask(*gfx, color, 0));
207
210208      // wraparound
211      gfx->transmask(bitmap,cliprect,
212         code, color,
213         flipx, flipy,
214         sx + 256, sy,
215         m_palette->transpen_mask(*gfx, color, 0));
209
210            gfx->transmask(bitmap,cliprect,
211            code, color,
212            flipx, flipy,
213            sx + 256, sy,
214            m_palette->transpen_mask(*gfx, color, 0));
216215   }
217216}
218217
219218void champbas_state::exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
220219{
220   int offs;
221221   UINT8 *obj1, *obj2;
222222
223223   obj1 = m_bg_videoram;
224224   obj2 = &(m_spriteram[0x20]);
225225
226   for (int offs = 0x0e; offs >= 0; offs -= 2)
226   for (offs = 0x0e; offs >= 0; offs -= 2)
227227   {
228228      int sx, sy, code, bank, flipx, flipy, color;
229229
r249939r249940
236236      color = (obj1[offs + 1]) & 0x0f;
237237      bank = ((obj1[offs + 1] >> 4) & 1);
238238
239      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
240         code + (bank << 6),
241         color,
242         flipx, flipy,
243         sx,sy,0);
239
240            m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
241            code + (bank << 6),
242            color,
243            flipx, flipy,
244            sx,sy,0);
244245   }
245246
246247   obj1 = m_spriteram_2;
247248   obj2 = m_spriteram;
248249
249   for (int offs = 0x0e; offs >= 0; offs -= 2)
250   for (offs = 0x0e; offs >= 0; offs -= 2)
250251   {
251252      int sx, sy, code, flipx, flipy, color;
252253
r249939r249940
258259      flipy = (~obj1[offs]) & 0x02;
259260      color = (obj1[offs + 1]) & 0x0f;
260261
261      m_gfxdecode->gfx(2)->transmask(bitmap,cliprect,
262         code,
263         color,
264         flipx, flipy,
265         sx,sy,
266         m_palette->transpen_mask(*m_gfxdecode->gfx(2), color, 0x10));
262
263            m_gfxdecode->gfx(2)->transmask(bitmap,cliprect,
264            code,
265            color,
266            flipx, flipy,
267            sx,sy,
268            m_palette->transpen_mask(*m_gfxdecode->gfx(2), color, 0x10));
267269   }
268270}
269271
trunk/src/mame/video/cloak.c
r249939r249940
9292
9393WRITE8_MEMBER(cloak_state::cloak_clearbmp_w)
9494{
95//  m_screen->update_now();
96   m_screen->update_partial(m_screen->vpos());
97
95   m_screen->update_now();
9896   m_bitmap_videoram_selected = data & 0x01;
9997   set_current_bitmap_videoram_pointer();
10098
trunk/src/mame/video/decbac06.h
r249939r249940
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
r249939r249940
876876      radarscp_scanline(scanline);
877877
878878   /* update any video up to the current scanline */
879//  m_screen->update_now();
880   m_screen->update_partial(m_screen->vpos());
879   m_screen->update_now();
881880
882881   scanline = (scanline+1) % VTOTAL;
883882   /* come back at the next appropriate scanline */
trunk/src/mame/video/galaxian.c
r249939r249940
480480{
481481   UINT8 *videoram = m_videoram;
482482   /* update any video up to the current scanline */
483//  m_screen->update_now();
484   m_screen->update_partial(m_screen->vpos());
483   m_screen->update_now();
485484
486485   /* store the data and mark the corresponding tile dirty */
487486   videoram[offset] = data;
r249939r249940
492491WRITE8_MEMBER(galaxian_state::galaxian_objram_w)
493492{
494493   /* update any video up to the current scanline */
495//  m_screen->update_now();
496   m_screen->update_partial(m_screen->vpos());
494   m_screen->update_now();
497495
498496   /* store the data */
499497   m_spriteram[offset] = data;
r249939r249940
643641{
644642   if (m_flipscreen_x != (data & 0x01))
645643   {
646//      m_screen->update_now();
647      m_screen->update_partial(m_screen->vpos());
644      m_screen->update_now();
648645
649646      /* when the direction changes, we count a different number of clocks */
650647      /* per frame, so we need to reset the origin of the stars to the current */
r249939r249940
660657{
661658   if (m_flipscreen_y != (data & 0x01))
662659   {
663//      m_screen->update_now();
664      m_screen->update_partial(m_screen->vpos());
665
660      m_screen->update_now();
666661      m_flipscreen_y = data & 0x01;
667662      m_bg_tilemap->set_flip((m_flipscreen_x ? TILEMAP_FLIPX : 0) | (m_flipscreen_y ? TILEMAP_FLIPY : 0));
668663   }
r249939r249940
685680WRITE8_MEMBER(galaxian_state::galaxian_stars_enable_w)
686681{
687682   if ((m_stars_enabled ^ data) & 0x01)
688   {
689//      m_screen->update_now();
690      m_screen->update_partial(m_screen->vpos());
691   }
683      m_screen->update_now();
692684
693685   if (!m_stars_enabled && (data & 0x01))
694686   {
r249939r249940
705697WRITE8_MEMBER(galaxian_state::scramble_background_enable_w)
706698{
707699   if ((m_background_enable ^ data) & 0x01)
708   {
709   //  m_screen->update_now();
710      m_screen->update_partial(m_screen->vpos());
711   }
700      m_screen->update_now();
712701
713702   m_background_enable = data & 0x01;
714703}
r249939r249940
717706WRITE8_MEMBER(galaxian_state::scramble_background_red_w)
718707{
719708   if ((m_background_red ^ data) & 0x01)
720   {
721   //  m_screen->update_now();
722      m_screen->update_partial(m_screen->vpos());
723   }
709      m_screen->update_now();
724710
725711   m_background_red = data & 0x01;
726712}
r249939r249940
729715WRITE8_MEMBER(galaxian_state::scramble_background_green_w)
730716{
731717   if ((m_background_green ^ data) & 0x01)
732   {
733   //  m_screen->update_now();
734      m_screen->update_partial(m_screen->vpos());
735   }
718      m_screen->update_now();
736719
737720   m_background_green = data & 0x01;
738721}
r249939r249940
741724WRITE8_MEMBER(galaxian_state::scramble_background_blue_w)
742725{
743726   if ((m_background_blue ^ data) & 0x01)
744   {
745   //  m_screen->update_now();
746      m_screen->update_partial(m_screen->vpos());
747   }
727      m_screen->update_now();
748728
749729   m_background_blue = data & 0x01;
750730}
r249939r249940
761741{
762742   if (m_gfxbank[offset] != data)
763743   {
764      //m_screen->update_now();
765      m_screen->update_partial(m_screen->vpos());
744      m_screen->update_now();
766745      m_gfxbank[offset] = data;
767746      m_bg_tilemap->mark_all_dirty();
768747   }
trunk/src/mame/video/gic.c
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:David Viens
3/***************************************************************************
4
5   gic.c
6
7   GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip)
8   For the GIMINI "Challenger" programmable game system.
9
10   Really only ever used in the Unisonic Champion 2711
11
12   More LA tests made by plgDavid on hardware pretty much confirmed what is found
13   in the AY-3-8950-1 datasheet, but with more fine grained detail.
14
15   the GIC does not have internal ram of any sort apart from shift registers,
16   instead it relies on the external shared ram, (see page 7-85) Appendix AY-3-8950-1
17
18   Unverified on LA (since the video pins are all connected into a composite mix):
19   at line 46 it lowers GIC_BUSY, until line 240
20
21   Verified using LA:
22   It will read the external ram areas continuously while GIC_BUSY is low (for 12.36ms)
23
24   (NOTE: OCTAL)
25
26   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?)
27   006,007,010,011,012,013,  110,111,112,113,114,115,116,117,120,121,122,123,124,125 (16 times)
28
29   014,015,016,017,020,021,  125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times)
30   022,023,024,025,026,027,  125,126,127,130,131,132,133,134,135,136,137,140,141,142 (16 times)
31
32   030,031,032,033,034,035,  142,143,144,145,146,147,150,151,152,153,154,155,156,157 (16 times)
33   036,037,040,041,042,043,  142,143,144,145,146,147,150,151,152,153,154,155,156,157 (16 times)
34
35   044,045,046,047,050,051,  157,160,161,162,163,164,165,166,167,170,171,172,173,174 (16 times)
36   052,053,054,055,056,057,  157,160,161,162,163,164,165,166,167,170,171,172,173,174 (16 times)
37
38   060,061,062,063,064,065,  174,175,176,177,200,201,202,203,204,205,206,207,210,211 (16 times)
39   066,067,070,071,072,073,  174,175,176,177,200,201,202,203,204,205,206,207,210,211 (16 times)
40
41   074,075,076,077,100,101,  211,212,213,214,215,216,217,220,221,222,223,224,225,226 (16 times)
42   102,103,104,105,106,107,  211,212,213,214,215,216,217,220,221,222,223,224,225,226 (16 times)
43
44   000,001,002,003,004,005,  000,001,002,003,004,005,006,007,010,011,012,013,014,015 (once! padding?)
45
46   for a total of (12*20*16) = 3840 RAM reads (3 clocks per read at 1.79MHz)
47
48   Then it relingishes control to the CPU by raising BUSREQ.
49
50   Cloking in more detail: (in 1.79MHz clocks)
51   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    (...)
58
59   There are NO IRQ handshakes, just BUSREQ sync shared RAM
60
61***************************************************************************/
62
63#include "emu.h"
64#include "gic.h"
65
66// device type definition
67const device_type GIC = &device_creator<gic_device>;
68
69
70//Font data taken from Paul Robson's simulator
71//http://worstconsole.blogspot.ca/2012/12/the-worstconsoleever.html
72//A real AY-3-8800-1 (dead) is going to decap for a good dump
73ROM_START( gic_font )
74   ROM_REGION( 0x200, "cgrom", 0 )
75   ROM_LOAD( "ay-3-8800-1.bin", 0x0000, 0x200,  BAD_DUMP CRC(d9f11d2b) SHA1(60ef45d51d102cd3af78787008d9aed848137bee))
76ROM_END
77
78
79//-------------------------------------------------
80//  gic_device - constructor
81//-------------------------------------------------
82
83gic_device::gic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
84   : device_t(mconfig, GIC, "GIC", tag, owner, clock, "gic", __FILE__)
85   , device_sound_interface(mconfig, *this)
86   , device_video_interface(mconfig, *this)
87   , m_cgrom(0)
88   , m_audiocnt(0)
89   , m_audioval(0)
90   , m_audioreset(0)
91   , m_ram(0)
92{
93}
94
95
96gic_device::gic_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source)
97   : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
98   , device_sound_interface(mconfig, *this)
99   , device_video_interface(mconfig, *this)
100   , m_cgrom(0)
101   , m_audiocnt(0)
102   , m_audioval(0)
103   , m_audioreset(0)
104   , m_ram(0)
105{
106}
107
108const rom_entry *gic_device::device_rom_region() const
109{
110   //there is only one... how do I get rid of this?
111   return ROM_NAME( gic_font );
112}
113
114//-------------------------------------------------
115//  device_start - device-specific startup
116//-------------------------------------------------
117
118void gic_device::device_start()
119{
120   m_cgrom = memregion("cgrom")->base();
121
122   // Let the screen create our temporary bitmap with the screen's dimensions
123   m_screen->register_screen_bitmap(m_bitmap);
124
125   m_vblank_timer = timer_alloc(TIMER_VBLANK);
126   m_vblank_timer->adjust( m_screen->time_until_pos(1, END_ACTIVE_SCAN + 18 ), 0, m_screen->scan_period() );
127
128   // allocate the audio stream
129   m_stream = stream_alloc( 0, 1, clock()/(2*228) );
130}
131
132
133//-------------------------------------------------
134//  device_reset - device-specific reset
135//-------------------------------------------------
136
137void gic_device::device_reset()
138{
139   m_audiocnt=0;
140   m_audioval=0;
141   m_audioreset=0;
142}
143
144#define GIC_CLUB    28
145#define GIC_SPACE    0
146
147void gic_device::draw_char_left(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap){
148   UINT8*ptr = &m_cgrom[code*GIC_CHAR_H];
149
150   for (size_t y=0;y<GIC_CHAR_H;y++){
151      UINT8 current = *ptr++;
152      UINT8 nextx=0;
153      UINT8 curry= starty+y;
154      for(UINT8 x=0x20;x!=0;x=x/2){
155         if (current&x)
156            m_bitmap.pix16(curry,startx+nextx) = GIC_WHITE;
157         nextx++;
158      }
159   }
160}
161
162void gic_device::draw_char_right(int startx, int starty, UINT8 code, bitmap_ind16 &bitmap, int bg_col){
163   UINT8*ptr = &m_cgrom[code*GIC_CHAR_H];
164
165   for (size_t y=0;y<GIC_CHAR_H;y++){
166      UINT8 current = *ptr++;
167      UINT8 nextx=0;
168      UINT8 curry= starty+y;
169
170      m_bitmap.pix16(curry,startx+nextx) = 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;
174         nextx++;
175      }
176      m_bitmap.pix16(curry,startx+nextx) = bg_col;
177      nextx++;
178      m_bitmap.pix16(curry,startx+nextx) = bg_col;
179   }
180}
181
182UINT32 gic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
183{
184   m_bitmap.fill(GIC_GREEN);
185
186   size_t XSTART = BORDER_SIZE;
187   size_t YSTART = START_ACTIVE_SCAN;
188
189   //left hand side first
190   UINT8 current=0;
191   for(UINT8 cy=0;cy<GIC_LEFT_H;cy++){
192      for(UINT8 cx=0;cx<GIC_LEFT_W;cx++){
193         draw_char_left(XSTART+(cx*GIC_CHAR_W),
194                     YSTART+(cy*GIC_CHAR_H),
195                     m_ram[current],
196                     m_bitmap);
197         current++;
198      }
199   }
200
201   //right hand side is next
202   current=0x48;//110 octal
203   XSTART+=(GIC_LEFT_W*GIC_CHAR_W)+1;
204
205   for(UINT8 cy=0;cy<GIC_RIGHT_H;cy++){
206      for(UINT8 cx=0;cx<GIC_RIGHT_W;cx++){
207         //complex case
208         UINT8 data = m_ram[current++];
209
210         size_t currX   = (XSTART+           (cx*(3+GIC_CHAR_W)));
211         size_t currUP  = (YSTART+           (cy*(2*GIC_CHAR_H)));
212         size_t currLOW = (YSTART+GIC_CHAR_H+(cy*(2*GIC_CHAR_H)));
213
214         switch(data&0xC0){
215            case 0x00:{
216               //lower rectangle only, normal char
217               draw_char_right(currX,currLOW,data,m_bitmap,GIC_GREEN);
218            }break;
219
220            //White block
221            case 0xC0:{
222               //upper rectangle
223               draw_char_right(currX,currUP, GIC_SPACE,m_bitmap,GIC_WHITE);
224               //lower rectangle
225               draw_char_right(currX,currLOW,GIC_SPACE,m_bitmap,GIC_WHITE);
226            }break;
227
228            //Draw a card
229            case 0x40:{
230               int bgColor = (data&0x10)?GIC_RED:GIC_BLACK;
231               //upper rectangle
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);
235            }break;
236
237            default:printf("gic unknown char! %02X\n",data); break;
238         }
239      }
240   }
241
242   copybitmap( bitmap, m_bitmap, 0, 0, 0, 0, cliprect );
243   return 0;
244}
245
246/* AUDIO SECTION */
247
248void gic_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
249{
250   switch ( id )
251   {
252      case TIMER_VBLANK:
253         //flag the audio to reset
254         m_audioreset = 1;//phase need to reset! on next clock/228
255      break;
256   }
257}
258
259#define GIC_AUDIO_BYTE 0x96
260
261void gic_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
262{
263   stream_sample_t *buffer = outputs[0];
264
265   //Audio is basic and badly implemented (doubt that was the intent)
266   //The datasheet list the 3 different frequencies the GIC can generate: 500,1000 and 2000Hz
267   //but it is clear (for an audio guy at least) that the resulting spectrum
268   //is not a pure square wav. In fact, the counter is reset on vertical sync!
269   //http://twitter.com/plgDavid/status/527269086016077825
270   //...thus creating a buzzing sound.
271
272   //Dumping the audio pin value each time
273   // either (PHI2 made a 0->1 transition (1.789MHz)
274   //     or (PHI1 made a 1->1 transition (1.789MHz)
275   //I found that the granularity of audio transitions
276   //(including phase resets and silences) was 228 clocks
277   //The audio subsystem thus runs at 1.789MHz/228 = 7849.88Hz
278
279   //when 1
280   //normal period:912 clocks (228*4)
281   //hi for 456 clocks
282   //lo for 456 clocks
283   //reset period: (each frame)
284   //hi for 228 clocks
285   //lo for 456 clocks
286   //when 2
287   //normal period lasts 1824 clocks (228*8)
288   //hi for 912 clocks
289   //lo for 912 clocks
290   //reset period: (each frame)
291   //hi for 912   (228*4)
292   //lo for 1596  (228*7)
293   //hi for 912   (228*4)
294   //when 4
295   //normal period lasts 3648 clocks (228*16)
296   //hi for 1824(228*8)
297   //lo for 1824(228*8)
298   //Reset period:
299   //lo for 1824(228*8)
300   //hi for 2508(228*11)
301   //lo for 1824(228*8)
302   //hi for 1824(228*8)
303
304   if(!m_ram) return;
305
306   UINT8 audioByte = m_ram[GIC_AUDIO_BYTE]*2;
307
308   if(!audioByte){
309      for(size_t i = 0; i < samples; i++)
310         *buffer++ = 0;
311
312      m_audioval   = 0;
313      m_audiocnt   = 0;
314      m_audioreset = 0;
315      return;//early
316   }
317
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
325   for(size_t i=0; i < samples; i++){
326      m_audiocnt++;
327      if(m_audiocnt >= audioByte){
328         m_audioval = !m_audioval;
329         m_audiocnt=0;
330      }
331      *buffer++ = m_audioval<<13;
332   }
333}
trunk/src/mame/video/gic.h
r249939r249940
1// license:BSD-3-Clause
2// copyright-holders:David Viens
3/***************************************************************************
4
5    gic.h
6
7   GI AY-3-8800-1 (Datasheet exists as AY-3-8500-1 Graphics Interface Chip)
8   For the GIMINI "Challenger" programmable game system.
9
10   Really only ever used in the Unisonic Champion 2711
11
12***************************************************************************/
13
14#pragma once
15
16#ifndef __GIC_H__
17#define __GIC_H__
18
19#include "emu.h"
20
21
22/***************************************************************************
23    DEVICE CONFIGURATION MACROS
24***************************************************************************/
25
26#define MCFG_GIC_ADD(_tag, _clock, _screen_tag) \
27   MCFG_DEVICE_ADD(_tag, GIC, _clock) \
28   MCFG_VIDEO_SET_SCREEN(_screen_tag)
29
30/***************************************************************************
31    TYPE DEFINITIONS
32***************************************************************************/
33
34// ======================> gic_device
35
36//Palette entries
37#define GIC_BLACK 0
38#define GIC_RED   1
39#define GIC_GREEN 2
40#define GIC_WHITE 3
41
42#define GIC_CHAR_W 6
43#define GIC_CHAR_H 8
44
45#define GIC_LEFT_H 12
46#define GIC_LEFT_W 6
47
48#define GIC_RIGHT_H 6
49#define GIC_RIGHT_W 13
50
51class gic_device :  public device_t
52               , public device_sound_interface
53               , public device_video_interface
54{
55public:
56   // construction/destruction
57   gic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
58   gic_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source);
59
60   // static configuration helpers
61   static void set_screen_tag(device_t &device, const char *screen_tag) { downcast<gic_device &>(device).m_screen_tag = screen_tag; }
62
63   DECLARE_PALETTE_INIT(gic);
64
65   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
66
67   inline bitmap_ind16 *get_bitmap() { return &m_bitmap; }
68
69   //plgDavid please change this to a MESS friendly handshake
70   void set_shared_memory(const UINT8*m){ m_ram = m;};
71
72   // Global constants (non mesured figures)
73   static const int START_ACTIVE_SCAN = 10;
74   static const int BORDER_SIZE       = GIC_CHAR_W*3;
75   static const int END_ACTIVE_SCAN   = 10 + GIC_CHAR_W*2 + 150 + GIC_CHAR_W*2;
76   static const int START_Y           = 1;
77   static const int SCREEN_HEIGHT     = GIC_CHAR_H*(GIC_LEFT_H+2);
78   static const int LINE_CLOCKS       = 455;
79   static const int LINES             = 262;
80
81protected:
82   // device-level overrides
83   virtual void device_start();
84   virtual void device_reset();
85   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
86
87   // optional information overrides
88   virtual const rom_entry *device_rom_region() const;
89
90   // device_sound_interface overrides
91   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
92
93   /* timers */
94   static const device_timer_id TIMER_VBLANK = 0;
95
96   void draw_char_left (int x, int y, UINT8 code, bitmap_ind16 &bitmap);
97   void draw_char_right(int x, int y, UINT8 code, bitmap_ind16 &bitmap,int bg_col);
98
99   bitmap_ind16 m_bitmap;
100   UINT8 *      m_cgrom;          // internal chargen ROM
101
102   emu_timer    *m_vblank_timer;
103   sound_stream *m_stream;
104
105   int m_audiocnt;
106   int m_audioval;
107   int m_audioreset;
108   const UINT8* m_ram;
109};
110
111// device type definition
112extern const device_type GIC;
113
114#endif  /* __GIC_H__ */
trunk/src/mame/video/gyruss.c
r249939r249940
9393
9494WRITE8_MEMBER(gyruss_state::gyruss_spriteram_w)
9595{
96//  m_screen->update_now();
97   m_screen->update_partial(m_screen->vpos());
96   m_screen->update_now();
9897   m_spriteram[offset] = data;
9998}
10099
trunk/src/mame/video/hng64.c
r249939r249940
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
r249939r249940
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)
r249939r249940
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
r249939r249940
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
r249939r249940
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;
r249939r249940
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;
r249939r249940
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
r249939r249940
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?
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);
606621
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);
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;
621626
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?
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
r249939r249940
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
r249939r249940
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;
r249939r249940
913913
914914UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
915915{
916
916917#if 1
917918   // press in sams64_2 attract mode for a nice debug screen from the game
918919   // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.)
r249939r249940
938939#endif
939940
940941
941   // Initialize some buffers
942    // Initialize some buffers
942943   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
943944   screen.priority().fill(0x00, cliprect);
944945
945   // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
946    // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
946947   if (m_screen_dis)
947948      return 0;
948949
949950   // If the auto-animation mask or bits have changed search for tiles using them and mark as dirty
950   const UINT32 animmask = m_videoregs[0x0b];
951    const UINT32 animmask = m_videoregs[0x0b];
951952   const UINT32 animbits = m_videoregs[0x0c];
952953   if ((m_old_animmask != animmask) || (m_old_animbits != animbits))
953954   {
r249939r249940
976977      m_old_animbits = animbits;
977978   }
978979
979   // If any magic bits have been touched, mark every tilemap dirty
980   UINT16 tileflags[4];
981   tileflags[0] = m_videoregs[0x02] >> 16;
980    // If any magic bits have been touched, mark every tilemap dirty
981    UINT16 tileflags[4];
982    tileflags[0] = m_videoregs[0x02] >> 16;
982983   tileflags[1] = m_videoregs[0x02] & 0xffff;
983984   tileflags[2] = m_videoregs[0x03] >> 16;
984985   tileflags[3] = m_videoregs[0x03] & 0xffff;
985   const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
986    const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
986987   for (int i = 0; i < 4; i++)
987988   {
988989      if ((m_old_tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK) != (tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK))
r249939r249940
992993      }
993994   }
994995
995   // Draw the four tilemaps
996    // Draw the four tilemaps
996997   hng64_drawtilemap(screen,bitmap,cliprect, 3);
997998   hng64_drawtilemap(screen,bitmap,cliprect, 2);
998999   hng64_drawtilemap(screen,bitmap,cliprect, 1);
r249939r249940
10201021      }
10211022   }
10221023
1023   // Draw the sprites on top of everything
1024    // Draw the sprites on top of everything
10241025   draw_sprites(screen, bitmap, cliprect);
10251026
1026   // Layer the global frame buffer operations on top of everything
1027   // transition_control(bitmap, cliprect);
1027    // Layer the global frame buffer operations on top of everything
1028    // transition_control(bitmap, cliprect);
10281029
1029
1030   
10301031#if HNG64_VIDEO_DEBUG
10311032   if (0)
10321033      popmessage("%08x %08x %08x %08x %08x", m_spriteregs[0], m_spriteregs[1], m_spriteregs[2], m_spriteregs[3], m_spriteregs[4]);
r249939r249940
10351036   popmessage("%08x %08x TR(%04x %04x %04x %04x) SB(%04x %04x %04x %04x) %08x %08x %08x %08x %08x AA(%08x %08x) %08x",
10361037      m_videoregs[0x00],
10371038      m_videoregs[0x01],
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,
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,
10461047      m_videoregs[0x06],
10471048      m_videoregs[0x07],
10481049      m_videoregs[0x08],
r249939r249940
11061107      popmessage("blend changed %02x", m_additive_tilemap_debug);
11071108   }
11081109#endif
1109
1110   
11101111   return 0;
11111112}
11121113
trunk/src/mame/video/hng64_3d.c
r249939r249940
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)
r249939r249940
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}
r249939r249940
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
r249939r249940
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);
r249939r249940
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
r249939r249940
369369   UINT32 size[4];
370370   UINT32 address[4];
371371   UINT32 megaOffset;
372   polygon lastPoly = { 0 };
372    polygon lastPoly = { 0 };
373373
374374
375375   //////////////////////////////////////////////////////////
r249939r249940
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;
r249939r249940
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         {
r249939r249940
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
r249939r249940
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         {
r249939r249940
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...
r249939r249940
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
r249939r249940
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/itech8.c
r249939r249940
537537WRITE8_MEMBER(itech8_state::grmatch_xscroll_w)
538538{
539539   /* update the X scroll value */
540   //m_screen->update_now();
541   m_screen->update_partial(m_screen->vpos());
540   m_screen->update_now();
542541   m_grmatch_xscroll = data;
543542}
544543
trunk/src/mame/video/m72.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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)
r249939r249940
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
r249939r249940
6464
6565WRITE8_MEMBER(meadows_state::meadows_spriteram_w)
6666{
67//  m_screen->update_now();
68   m_screen->update_partial(m_screen->vpos());
67   m_screen->update_now();
6968   m_spriteram[offset] = data;
7069}
7170
trunk/src/mame/video/mikromik.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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++)
r249939r249940
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();
r249939r249940
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();
r249939r249940
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
r249939r249940
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();
103   m_screen->update_partial(m_screen->vpos());
102   m_screen->update_now();
104103
105104   /* add in the upper bit of the address latch */
106105   offset += (m_videoram_address[0] & 0x80) << 8;
r249939r249940
114113{
115114   /* update the screen in case the game is writing "behind" the beam -
116115      Zookeeper likes to do this */
117//  m_screen->update_now();
118   m_screen->update_partial(m_screen->vpos());
116   m_screen->update_now();
119117
120118   /* add in the upper bit of the address latch */
121119   offset += (m_videoram_address[0] & 0x80) << 8;
r249939r249940
152150WRITE8_MEMBER(qix_state::qix_addresslatch_w)
153151{
154152   /* update the screen in case the game is writing "behind" the beam */
155//  m_screen->update_now();
156   m_screen->update_partial(m_screen->vpos());
153   m_screen->update_now();
157154
158155   /* compute the value at the address latch */
159156   offset = (m_videoram_address[0] << 8) | m_videoram_address[1];
r249939r249940
166163WRITE8_MEMBER(qix_state::slither_addresslatch_w)
167164{
168165   /* update the screen in case the game is writing "behind" the beam */
169//  m_screen->update_now();
170   m_screen->update_partial(m_screen->vpos());
166   m_screen->update_now();
171167
172168   /* compute the value at the address latch */
173169   offset = (m_videoram_address[0] << 8) | m_videoram_address[1];
r249939r249940
195191   /* trigger an update if a currently visible pen has changed */
196192   if (((offset >> 8) == m_palette_bank) &&
197193      (old_data != data))
198   {
199   //  m_screen->update_now();
200      m_screen->update_partial(m_screen->vpos());
201   }
194      m_screen->update_now();
202195
203196   set_pen(offset);
204197}
r249939r249940
209202   /* set the bank value */
210203   if (m_palette_bank != (data & 3))
211204   {
212      //m_screen->update_now();
213      m_screen->update_partial(m_screen->vpos());
205      m_screen->update_now();
214206      m_palette_bank = data & 3;
215207   }
216208
trunk/src/mame/video/sega16sp.c
r249939r249940
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
10441045}
10451046
10461047
r249939r249940
10851086   //            ----cccc cccc----  Sprite color palette
10861087   //            -------- ----llll  4-bit pixel data
10871088   //
1088
1089   
10891090   set_origin(m_xoffs, m_yoffs);
10901091
10911092   // render the sprites in order
trunk/src/mame/video/segaic16.c
r249939r249940
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
r249939r249940
1919
2020WRITE8_MEMBER(spacefb_state::port_0_w)
2121{
22//  m_screen->update_now();
23   m_screen->update_partial(m_screen->vpos());
22   m_screen->update_now();
2423   m_port_0 = data;
2524}
2625
2726
2827WRITE8_MEMBER(spacefb_state::port_2_w)
2928{
30//  m_screen->update_now();
31   m_screen->update_partial(m_screen->vpos());
29   m_screen->update_now();
3230   m_port_2 = data;
3331}
3432
trunk/src/mame/video/system1.c
r249939r249940
190190
191191READ8_MEMBER(system1_state::system1_mixer_collision_r)
192192{
193//  m_screen->update_now();
194   m_screen->update_partial(m_screen->vpos());
193   m_screen->update_now();
195194   return m_mix_collide[offset & 0x3f] | 0x7e | (m_mix_collide_summary << 7);
196195}
197196
198197WRITE8_MEMBER(system1_state::system1_mixer_collision_w)
199198{
200//  m_screen->update_now();
201   m_screen->update_partial(m_screen->vpos());
199   m_screen->update_now();
202200   m_mix_collide[offset & 0x3f] = 0;
203201}
204202
205203WRITE8_MEMBER(system1_state::system1_mixer_collision_reset_w)
206204{
207//  m_screen->update_now();
208   m_screen->update_partial(m_screen->vpos());
205   m_screen->update_now();
209206   m_mix_collide_summary = 0;
210207}
211208
r249939r249940
219216
220217READ8_MEMBER(system1_state::system1_sprite_collision_r)
221218{
222//  m_screen->update_now();
223   m_screen->update_partial(m_screen->vpos());
219   m_screen->update_now();
224220   return m_sprite_collide[offset & 0x3ff] | 0x7e | (m_sprite_collide_summary << 7);
225221}
226222
227223WRITE8_MEMBER(system1_state::system1_sprite_collision_w)
228224{
229//  m_screen->update_now();
230   m_screen->update_partial(m_screen->vpos());
225   m_screen->update_now();
231226   m_sprite_collide[offset & 0x3ff] = 0;
232227}
233228
234229WRITE8_MEMBER(system1_state::system1_sprite_collision_reset_w)
235230{
236//  m_screen->update_now();
237   m_screen->update_partial(m_screen->vpos());
231   m_screen->update_now();
238232   m_sprite_collide_summary = 0;
239233}
240234
r249939r249940
280274
281275   /* force a partial update if the page is changing */
282276   if (m_tilemap_pages > 2 && offset >= 0x740 && offset < 0x748 && offset % 2 == 0)
283   {
284      //m_screen->update_now();
285      m_screen->update_partial(m_screen->vpos());
286   }
277      m_screen->update_now();
287278}
288279
289280WRITE8_MEMBER(system1_state::system1_videoram_bank_w)
trunk/src/mame/video/timeplt.c
r249939r249940
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
130   save_item(NAME(m_video_enable));
131128}
132129
133VIDEO_START_MEMBER(timeplt_state,psurge)
134{
135   video_start();
136   m_video_enable = 1; //psurge doesn't seem to have the video enable
137}
138
139130VIDEO_START_MEMBER(timeplt_state,chkun)
140131{
141132   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(timeplt_state::get_chkun_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
r249939r249940
149140 *
150141 *************************************/
151142
152WRITE8_MEMBER(timeplt_state::videoram_w)
143WRITE8_MEMBER(timeplt_state::timeplt_videoram_w)
153144{
154145   m_videoram[offset] = data;
155146   m_bg_tilemap->mark_tile_dirty(offset);
156147}
157148
158149
159WRITE8_MEMBER(timeplt_state::colorram_w)
150WRITE8_MEMBER(timeplt_state::timeplt_colorram_w)
160151{
161152   m_colorram[offset] = data;
162153   m_bg_tilemap->mark_tile_dirty(offset);
163154}
164155
165156
166WRITE8_MEMBER(timeplt_state::flipscreen_w)
157WRITE8_MEMBER(timeplt_state::timeplt_flipscreen_w)
167158{
168159   flip_screen_set(~data & 1);
169160}
170161
171WRITE8_MEMBER(timeplt_state::video_enable_w)
172{
173   m_video_enable = data & 1;
174}
175162
176READ8_MEMBER(timeplt_state::scanline_r)
163READ8_MEMBER(timeplt_state::timeplt_scanline_r)
177164{
178165   return m_screen->vpos();
179166}
r249939r249940
188175
189176void timeplt_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
190177{
191   for (int offs = 0x3e;offs >= 0x10;offs -= 2)
178   UINT8 *spriteram = m_spriteram;
179   UINT8 *spriteram_2 = m_spriteram2;
180   int offs;
181
182   for (offs = 0x3e;offs >= 0x10;offs -= 2)
192183   {
193      int sx = m_spriteram[offs];
194      int sy = 241 - m_spriteram2[offs + 1];
184      int sx = spriteram[offs];
185      int sy = 241 - spriteram_2[offs + 1];
195186
196      int code = m_spriteram[offs + 1];
197      int color = m_spriteram2[offs] & 0x3f;
198      int flipx = ~m_spriteram2[offs] & 0x40;
199      int flipy = m_spriteram2[offs] & 0x80;
187      int code = spriteram[offs + 1];
188      int color = spriteram_2[offs] & 0x3f;
189      int flipx = ~spriteram_2[offs] & 0x40;
190      int flipy = spriteram_2[offs] & 0x80;
200191
201192      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
202193            code,
r249939r249940
214205 *
215206 *************************************/
216207
217UINT32 timeplt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
208UINT32 timeplt_state::screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
218209{
219   if (m_video_enable)
220   {
221      m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
222      draw_sprites(bitmap, cliprect);
223      m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0);
224   }
210   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
211   draw_sprites(bitmap, cliprect);
212   m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0);
225213   return 0;
226214}
trunk/src/mame/video/tp84.c
r249939r249940
106106WRITE8_MEMBER(tp84_state::tp84_spriteram_w)
107107{
108108   /* the game multiplexes the sprites, so update now */
109//  m_screen->update_now();
110   m_screen->update_partial(m_screen->vpos());
109   m_screen->update_now();
111110   m_spriteram[offset] = data;
112111}
113112
trunk/src/mame/video/zx.c
r249939r249940
11// license:GPL-2.0+
2// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249939r249940
2525{
2626   switch (id)
2727   {
28   case TIMER_TAPE_INPUT:
29      zx_tape_input();
28   case TIMER_TAPE_PULSE:
29      zx_tape_pulse(ptr, param);
3030      break;
31   case TIMER_ULA_HSYNC:
32      zx_ula_hsync();
31   case TIMER_ULA_NMI:
32      zx_ula_nmi(ptr, param);
3333      break;
34   case TIMER_ULA_IRQ:
35      zx_ula_irq(ptr, param);
36      break;
3437   default:
3538      assert_always(FALSE, "Unknown id in zx_state::device_timer");
3639   }
3740}
3841
3942
40void zx_state::zx_ula_hsync()
43/*
44 * Toggle the video output between black and white.
45 * This happens whenever the ULA scanline IRQs are enabled/disabled.
46 * Normally this is done during the synchronized zx_ula_r() function,
47 * which outputs 8 pixels per code, but if the video sync is off
48 * (during tape IO or sound output) zx_ula_bkgnd() is used to
49 * simulate the display of a ZX80/ZX81.
50 */
51void zx_state::zx_ula_bkgnd(UINT8 color)
4152{
42   m_hsync_active = !m_hsync_active;
43   if(m_hsync_active)
44      m_ypos++;
45   if(m_nmi_generator_active) {
46      m_nmi_on = m_hsync_active;
47      m_maincpu->set_input_line(INPUT_LINE_NMI, m_nmi_on ? ASSERT_LINE : CLEAR_LINE);
48   }
49   recalc_hsync();
50}
53   int width = m_screen->width();
54   int height = m_screen->height();
55   const rectangle &visarea = m_screen->visible_area();
5156
52WRITE16_MEMBER(zx_state::refresh_w)
53{
54   if((data ^ m_prev_refresh) & 0x40)
55      m_maincpu->set_input_line(INPUT_LINE_IRQ0, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);
56   m_prev_refresh = data;
57   if(m_ula_char_buffer != 0xffff) {
58      UINT64 time = m_maincpu->total_cycles();
59      int x = 2*((time-m_base_vsync_clock) % 207);
60      int y = (time-m_base_vsync_clock) / 207;
61      UINT8 pixels;
62      if(m_region_gfx1)
63         pixels = m_region_gfx1->base()[((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7)];
64      else
65         pixels = m_program->read_byte((data & 0xfe00) | ((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7));
66      if(m_ula_char_buffer & 0x80)
67         pixels = ~pixels;
68      if(x < 384-8 && y < 311) {
69         UINT16 *dest = &m_bitmap_render->pix16(y, x);
70         for(int i=0; i<8; i++)
71            *dest++ |= pixels & (0x80 >> i) ? 1 : 0;
57   if (m_ula_frame_vsync == 0 && color != m_old_c)
58   {
59      int y, new_x, new_y;
60      rectangle r;
61      bitmap_ind16 &bitmap = m_bitmap;
62
63      new_y = machine().first_screen()->vpos();
64      new_x = machine().first_screen()->hpos();
65/*      logerror("zx_ula_bkgnd: %3d,%3d - %3d,%3d\n", state->m_old_x, state->m_old_y, new_x, new_y);*/
66      y = m_old_y;
67      for (;;)
68      {
69         if (y == new_y)
70         {
71            r.set(m_old_x, new_x, y, y);
72            bitmap.fill(color, r);
73            break;
74         }
75         else
76         {
77            r.set(m_old_x, visarea.max_x, y, y);
78            bitmap.fill(color, r);
79            m_old_x = 0;
80         }
81         if (++y == height)
82            y = 0;
7283      }
73      m_ula_char_buffer = 0xffff;
84      m_old_x = (new_x + 1) % width;
85      m_old_y = new_y;
86      m_old_c = color;
7487   }
7588}
7689
77void zx_state::recalc_hsync()
90/*
91 * PAL:  310 total lines,
92 *            0.. 55 vblank
93 *           56..247 192 visible lines
94 *          248..303 vblank
95 *          304...   vsync
96 * NTSC: 262 total lines
97 *            0.. 31 vblank
98 *           32..223 192 visible lines
99 *          224..233 vblank
100 */
101TIMER_CALLBACK_MEMBER(zx_state::zx_ula_nmi)
78102{
79   UINT64 time = machine().time().as_ticks(m_maincpu->clock());
80   UINT32 step = (time - m_base_vsync_clock) % 207;
81   UINT32 delta;
82   if (m_hsync_active)
83      delta = 207 - step;
84   else {
85      if(step < 192)
86         delta = 192 - step;
87      else
88         delta = 399 - step;
89   }   
103   /*
104    * An NMI is issued on the ZX81 every 64us for the blanked
105    * scanlines at the top and bottom of the display.
106    */
107   int height = m_screen->height();
108   const rectangle& r1 = m_screen->visible_area();
109   rectangle r;
90110
91   m_ula_hsync->adjust(m_maincpu->cycles_to_attotime(delta));
111   bitmap_ind16 &bitmap = m_bitmap;
112   r.set(r1.min_x, r1.max_x, m_ula_scanline_count, m_ula_scanline_count);
113   bitmap.fill(1, r);
114//  logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
115   m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
116   if (++m_ula_scanline_count == height)
117      m_ula_scanline_count = 0;
92118}
93119
94READ8_MEMBER(zx_state::ula_low_r)
120TIMER_CALLBACK_MEMBER(zx_state::zx_ula_irq)
95121{
96   UINT8 cdata = m_program->read_byte(offset);
97   if(space.debugger_access())
98      return cdata;
122   /*
123    * An IRQ is issued on the ZX80/81 whenever the R registers
124    * bit 6 goes low. In MESS this IRQ timed from the first read
125    * from the copy of the DFILE in the upper 32K in zx_ula_r().
126    */
127   if (m_ula_irq_active)
128   {
129//      logerror("ULA %3d[%d] IRQ, R:$%02X, $%04x\n", machine().first_screen()->vpos(), ula_scancode_count, (unsigned) m_maincpu->state_int(Z80_R), (unsigned) m_maincpu->state_int(Z80_PC));
99130
100   if(m_maincpu->state_int(Z80_HALT))
101      return cdata;
102
103   if(m_nmi_on) {
104      UINT64 time = m_maincpu->total_cycles();
105      int pos = (time-m_base_vsync_clock) % 207;
106      if(pos >= 192)
107         m_maincpu->adjust_icount(pos - 207);
131      m_ula_irq_active = 0;
132      m_maincpu->set_input_line(0, HOLD_LINE);
108133   }
109   return cdata;
110134}
111135
112READ8_MEMBER(zx_state::ula_high_r)
136void zx_state::zx_ula_r(int offs, memory_region *region, const UINT8 param)
113137{
114   UINT8 cdata = m_program->read_byte(offset);
138   int offs0 = offs & 0x7fff;
139   UINT8 *rom = m_region_maincpu->base();
140   UINT8 chr = rom[offs0];
115141
116   if(space.debugger_access())
117      return cdata;
142   if ((!m_ula_irq_active) && (chr == 0x76))
143   {
144      bitmap_ind16 &bitmap = m_bitmap;
145      UINT16 y, *scanline;
146      UINT16 ireg = m_maincpu->state_int(Z80_I) << 8;
147      UINT8 data, *chrgen, creg;
118148
119   if(m_maincpu->state_int(Z80_HALT))
120      return cdata;
149      if (param)
150         creg = m_maincpu->state_int(Z80_B);
151      else
152         creg = m_maincpu->state_int(Z80_C);
121153
122   if(m_nmi_on) {
123      UINT64 time = m_maincpu->total_cycles();
124      int pos = (time-m_base_vsync_clock) % 207;
125      if(pos >= 192)
126         m_maincpu->adjust_icount(pos - 207);
127   }
154      chrgen = region->base();
128155
129   if(cdata & 0x40)
130      return cdata;
156      if ((++m_ula_scanline_count == m_screen->height()) || (creg == 32))
157      {
158         m_ula_scanline_count = 0;
159         m_offs1 = offs0;
160      }
131161
132   m_ula_char_buffer = cdata;
133   return 0x00; // nop
162      m_ula_frame_vsync = 3;
163
164      m_charline_ptr = 0;
165
166      for (y = m_offs1+1; ((y < offs0) && (m_charline_ptr < ARRAY_LENGTH(m_charline))); y++)
167      {
168         m_charline[m_charline_ptr] = rom[y];
169         m_charline_ptr++;
170      }
171      for (y = m_charline_ptr; y < ARRAY_LENGTH(m_charline); y++)
172         m_charline[y] = 0;
173
174      timer_set(m_maincpu->cycles_to_attotime(((32 - m_charline_ptr) << 2)), TIMER_ULA_IRQ);
175      m_ula_irq_active++;
176
177      scanline = &bitmap.pix16(m_ula_scanline_count);
178      y = 0;
179
180      for (m_charline_ptr = 0; m_charline_ptr < ARRAY_LENGTH(m_charline); m_charline_ptr++)
181      {
182         chr = m_charline[m_charline_ptr];
183         data = chrgen[ireg | ((chr & 0x3f) << 3) | ((8 - creg)&7) ];
184         if (chr & 0x80) data ^= 0xff;
185
186         scanline[y++] = (data >> 7) & 1;
187         scanline[y++] = (data >> 6) & 1;
188         scanline[y++] = (data >> 5) & 1;
189         scanline[y++] = (data >> 4) & 1;
190         scanline[y++] = (data >> 3) & 1;
191         scanline[y++] = (data >> 2) & 1;
192         scanline[y++] = (data >> 1) & 1;
193         scanline[y++] = (data >> 0) & 1;
194         m_charline[m_charline_ptr] = 0;
195      }
196
197      if (creg == 1) m_offs1 = offs0;
198   }
134199}
135200
136201void zx_state::video_start()
137202{
138   m_ula_hsync = timer_alloc(TIMER_ULA_HSYNC);
139   m_ula_char_buffer = 0xffff;
203   m_ula_nmi = timer_alloc(TIMER_ULA_NMI);
204   m_ula_irq_active = 0;
205   m_screen->register_screen_bitmap(m_bitmap);
206}
140207
141   m_bitmap_render = auto_bitmap_ind16_alloc(machine(), 384, 311);
142   m_bitmap_buffer = auto_bitmap_ind16_alloc(machine(), 384, 311);
208void zx_state::screen_eof_zx(screen_device &screen, bool state)
209{
210   // rising edge
211   if (state)
212   {
213      /* decrement video synchronization counter */
214      if (m_ula_frame_vsync)
215         --m_ula_frame_vsync;
216   }
143217}
144218
145219UINT32 zx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
146220{
147   copybitmap(bitmap, *m_bitmap_buffer, 0, 0, 0, 0, cliprect);
221   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
148222   return 0;
149223}
trunk/src/osd/modules/debugger/osx/debugview.m
r249939r249940
404404   [text addAttribute:NSFontAttributeName value:font range:run];
405405   NSPasteboard *const board = [NSPasteboard generalPasteboard];
406406   [board declareTypes:[NSArray arrayWithObject:NSRTFPboardType] owner:nil];
407   [board setData:[text RTFFromRange:run documentAttributes:[NSDictionary dictionary]] forType:NSRTFPboardType];
407   [board setData:[text RTFFromRange:run documentAttributes:@{}] forType:NSRTFPboardType];
408408   [text deleteCharactersInRange:run];
409409}
410410
trunk/src/osd/modules/render/d3d/d3dhlsl.c
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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
r249939r249940
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/sdl/video.c
r249939r249940
9696   sdl_monitor_info::init();
9797
9898   // we need the beam width in a float, contrary to what the core does.
99   video_config.beamwidth = options().beam_width_min();
99   video_config.beamwidth = options().beam();
100100
101101   // initialize the window system so we can make windows
102102   if (!window_init())
trunk/src/osd/windows/input.c
r249939r249940
18261826{
18271827   device_info *devinfo = NULL;
18281828   TCHAR *tname = NULL;
1829   INT name_length = 0;
1829   INT name_length;
18301830
1831   // determine the length of the device name, allocate it, and fetch it if not nameless
1831   // determine the length of the device name, allocate it, and fetch it
18321832   if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, NULL, &name_length) != 0)
18331833      goto error;
1834   tname = global_alloc_array_clear(TCHAR, name_length+1);
1835   if (name_length > 1 && (*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, tname, &name_length) == -1)
1834   tname = global_alloc_array(TCHAR, name_length);
1835   if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, tname, &name_length) == -1)
18361836      goto error;
18371837
18381838   // if this is an RDP name, skip it
trunk/src/osd/windows/winfile.c
r249939r249940
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
r249939r249940
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.167"
11#define BARE_BUILD_VERSION "0.166"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team