Previous 199869 Revisions Next

r41429 Wednesday 28th October, 2015 at 15:44:41 UTC by R. Belmont
Merge pull request #438 from rfka01/master

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
r249940r249941
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(__MINGW32__) || !defined(DXGI_ERROR_INVALID_CALL)
13#if !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
r249940r249941
1121111211      </part>
1121211212   </software>
1121311213
11214   <software name="pitfallsg" cloneof="pitfall">
11215      <description>Pitfall (Star Game)</description>
11214   <software name="pitfallsg" cloneof="pitfall">   <!-- significant visual changes -->
11215      <description>Pitfall (Star Game) (aka Tom Boy)</description>
1121611216      <year>19??</year>
1121711217      <publisher>Star Game</publisher>
1121811218      <part name="cart" interface="a2600_cart">
r249940r249941
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>   
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
1795718012</softwarelist>
18013
18014
trunk/hash/a5200.xml
r249940r249941
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
14751489</softwarelist>
trunk/hash/apple2gs.xml
r249940r249941
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
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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
r249940r249941
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>
r249940r249941
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">
r249940r249941
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
r249940r249941
3636         </dataarea>
3737      </part>
3838   </software>
39   
39
4040   <software name="elite">
4141      <description>Elite</description>
4242      <year>1984</year>
trunk/hash/coleco.xml
r249940r249941
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
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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">
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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;" />
r249940r249941
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">
r249940r249941
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">
r249940r249941
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">
r249940r249941
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
r249940r249941
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" />
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
2179421807   <software name="putter">
2179521808      <description>Putter Golf (Jpn, SegaNet)</description>
2179621809      <year>1991</year>
trunk/hash/msx1_cart.xml
r249940r249941
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">
r249940r249941
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
r249940r249941
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">
r249940r249941
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">
r249940r249941
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">
r249940r249941
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
r249940r249941
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">
r249940r249941
280280      </part>
281281   </software>
282282
283</softwarelist>
No newline at end of file
283</softwarelist>
trunk/hash/pc8801_flop.xml
r249940r249941
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" />
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
403403         </dataarea>
404404      </part>
405405   </software>
406   
406
407407</softwarelist>
trunk/hash/psion1.xml
r249940r249941
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
r249940r249941
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"/>
r249940r249941
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"/>
r249940r249941
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"/>
r249940r249941
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"/>
r249940r249941
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?"/>
r249940r249941
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"/>
r249940r249941
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
r249940r249941
12831283      </part>
12841284   </software>
12851285
1286   <software name="herot" cloneof="hero">
1286   <software name="herot" cloneof="hero"> <!-- Taiwanese logo version -->
12871287      <description>Qing Feng Xia (Tw)</description>
12881288      <year>1985?</year>
12891289      <publisher>&lt;unknown&gt;</publisher>
r249940r249941
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
12991310   <software name="homemj">
13001311      <description>Home Mahjong (Jpn, v1)</description>
13011312      <year>1984</year>
r249940r249941
13471358      </part>
13481359   </software>
13491360
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
13501372   <software name="hyperspt">
13511373      <description>Hyper Sports (Jpn)</description>
13521374      <year>1985</year>
r249940r249941
20662088      </part>
20672089   </software>
20682090
2069   <software name="motianda" cloneof="rocknbol">
2091   <software name="motianda" cloneof="rocknbol"> <!-- Taiwanese logo version -->
20702092      <description>Mo Tian Da Lou (Tw)</description>
20712093      <year>1985?</year>
20722094      <publisher>Aaronix</publisher>
r249940r249941
20792101      </part>
20802102   </software>
20812103
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
20822115   <software name="safarihu" supported="no">
20832116      <description>Safari Hunting (Jpn)</description>
20842117      <year>1983</year>
trunk/hash/sms.xml
r249940r249941
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
123135   <software name="addfam">
124136      <description>The Addams Family (Euro)</description>
125137      <year>1993</year>
r249940r249941
20912103      </part>
20922104   </software>
20932105
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
20942142   <software name="excdizzy" supported="no">
20952143      <description>The Excellent Dizzy Collection (Euro, USA, Prototype)</description>
20962144      <year>19??</year>
r249940r249941
23172365   <software name="finalbb" cloneof="bublbobl">
23182366      <description>Final Bubble Bobble (Jpn)</description>
23192367      <year>1988</year>
2320      <publisher>Sega </publisher>
2368      <publisher>Sega</publisher>
23212369      <info name="serial" value="G-1362"/>
23222370      <info name="release" value="19880702"/>
23232371      <info name="alt_title" value="ファイナル バブル ボブル" />
r249940r249941
56815729      </part>
56825730   </software>
56835731
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
56845743   <software name="smgp">
56855744      <description>Super Monaco GP (Euro, Bra)</description>
56865745      <year>1990</year>
trunk/hash/specpls3_flop.xml
r249940r249941
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">
r249940r249941
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">
r249940r249941
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">
r249940r249941
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
r249940r249941
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>
712723
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>
713847</softwarelist>
714848
715849
trunk/hash/studio2.xml
r249940r249941
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
r249940r249941
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" />
r249940r249941
257257
258258
259259<!-- Samples from the Katana SDK -->
260</softwarelist>
No newline at end of file
260</softwarelist>
trunk/hash/tandy2k.xml
r249940r249941
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
r249940r249941
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
r0r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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;
49   Output.Position.xy -= 0.5f;
50   Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
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
5154   Output.Color = Input.Color;
52   Output.TexCoord = Input.Position.xy / ScreenDims;
55
5356   Output.LineInfo = Input.LineInfo;
57
5458   return Output;
5559}
5660
r249940r249941
6468// LengthParams.z: Size at which fade is maximum
6569float4 ps_main(PS_INPUT Input) : COLOR
6670{
67   float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y) * 1.0;
71   float timeModulate = lerp(1.0f, TimeParams.x, TimeParams.y);
6872
6973   float lengthModulate = 1.0f - clamp(Input.LineInfo.x / LengthParams.z, 0.0f, 1.0f);
7074   float minLength = 2.0f - clamp(Input.LineInfo.x - 1.0f, 0.0f, 2.0f);
7175   lengthModulate = lerp(lengthModulate, 4.0f, minLength * 0.5f);
72   lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y) * 1.0;
76   lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y);
7377
74   float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f) * 2.0;
78   float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f);
7579   return outColor;
7680}
7781
trunk/scripts/src/bus.lua
r249940r249941
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",
11641166      MAME_DIR .. "src/devices/bus/vcs/scharger.c",
11651167      MAME_DIR .. "src/devices/bus/vcs/scharger.h",
11661168   }
r249940r249941
22012203      MAME_DIR .. "src/devices/bus/cpc/ddi1.h",
22022204      MAME_DIR .. "src/devices/bus/cpc/magicsound.c",
22032205      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",
22042208   }
22052209end
22062210
trunk/scripts/src/osd/sdl.lua
r249940r249941
5555            "SDL.dll",
5656         }
5757      end
58      links {
59         "psapi",
60      }
5861
5962      configuration { "mingw*-gcc" }
6063         linkoptions{
r249940r249941
467470               "SDL.dll",
468471            }
469472         end
473         links {
474            "psapi",
475         }
470476         linkoptions{
471477            "-municode",
472478         }
trunk/scripts/target/mame/arcade.lua
r249940r249941
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",
35493550   MAME_DIR .. "src/mame/drivers/summit.c",
35503551   MAME_DIR .. "src/mame/drivers/sumt8035.c",
35513552   MAME_DIR .. "src/mame/drivers/supercrd.c",
trunk/scripts/target/mame/mess.lua
r249940r249941
849849      "trs",
850850      "ultimachine",
851851      "ultratec",
852      "unisonic",
852853      "unisys",
853854      "veb",
854855      "vidbrain",
r249940r249941
21362137   MAME_DIR .. "src/mame/drivers/megadriv.c",
21372138   MAME_DIR .. "src/mame/drivers/saturn.c",
21382139   MAME_DIR .. "src/mame/drivers/segapico.c",
2140   MAME_DIR .. "src/mame/drivers/sega_sawatte.c",
21392141   MAME_DIR .. "src/mame/drivers/segapm.c",
21402142   MAME_DIR .. "src/mame/drivers/sg1000.c",
21412143   MAME_DIR .. "src/mame/drivers/sms.c",
r249940r249941
24812483   MAME_DIR .. "src/mame/drivers/minicom.c",
24822484}
24832485
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
24842494createMESSProjects(_target, _subtarget, "unisys")
24852495files {
24862496   MAME_DIR .. "src/mame/drivers/univac.c",
trunk/src/devices/bus/a2bus/a2themill.c
r249940r249941
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-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
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
1415
15    (reference: http://mirrors.apple2.org.za/ground.icaen.uiowa.edu/MiscInfo/Hardware/mill.6809 )
16    (reference: "6809.txt" on one of the disks for The Mill)
1617
1718    ProDOS "Stellation The Mill Disk.po" requires Mill in slot 2; boot
1819    the disc and type "-DEMO1" and press Enter to launch the simple demo.
1920
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.
21    TODO: Add DIP switch to select standard and OS-9 modes.
2522
2623*********************************************************************/
2724
r249940r249941
103100{
104101   m_bEnabled = false;
105102   m_flipAddrSpace = false;
106   m_6809Mode = false;
103   m_6809Mode = true;
107104   m_status = 0xc0;    // OS9 loader relies on this
108105   m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
109106   m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
r249940r249941
238235
239236READ8_MEMBER( a2bus_themill_device::dma_r )
240237{
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
241244   if (m_6809Mode)
242245   {
243      if (offset <= 0xafff)
246      if (offset <= 0x7fff)
244247      {
245248         return slot_dma_read(space, offset+0x1000);
246249      }
247      else if (offset <= 0xbfff)
250      else if (offset <= 0xafff)
248251      {
249         return slot_dma_read(space, (offset&0xfff) + 0xd000);
252         return slot_dma_read(space, (offset&0x3fff) + 0xd000);
250253      }
251      else if (offset <= 0xcfff)
254      else if (offset <= 0xbfff)
252255      {
253         return slot_dma_read(space, (offset&0xfff) + 0xe000);
256         return slot_dma_read(space, (offset&0xfff) + 0xc000);
254257      }
255      else if (offset <= 0xdfff)
258      else if (offset <= 0xcfff)  // 6809 Cxxx -> 6502 ZP
256259      {
257         return slot_dma_read(space, (offset&0xfff) + 0xf000);
260         return slot_dma_read(space, (offset&0xfff));
258261      }
259      else if (offset <= 0xefff)
262      else    // 6809 Dxxx -> 6502 9000
260263      {
261         return slot_dma_read(space, (offset&0xfff) + 0xc000);
264         return slot_dma_read(space, (offset-0xd000)+0x9000);
262265      }
263      else    // 6809 Fxxx -> 6502 ZP
264      {
265         return slot_dma_read(space, offset&0xfff);
266      }
267266   }
268267   else
269268   {
r249940r249941
289288{
290289   if (m_6809Mode)
291290   {
292      if (offset <= 0xafff)
291      if (offset <= 0x7fff)
293292      {
294293         slot_dma_write(space, offset+0x1000, data);
295294      }
295      else if (offset <= 0xafff)
296      {
297         slot_dma_write(space, (offset&0x3fff) + 0xd000, data);
298      }
296299      else if (offset <= 0xbfff)
297300      {
298         slot_dma_write(space, (offset&0xfff) + 0xd000, data);
301         slot_dma_write(space, (offset&0xfff) + 0xc000, data);
299302      }
300303      else if (offset <= 0xcfff)
301304      {
302         slot_dma_write(space, (offset&0xfff) + 0xe000, data);
305         slot_dma_write(space, (offset&0xfff), data);
303306      }
304      else if (offset <= 0xdfff)
307      else    // 6809 Dxxx -> 6502 9000
305308      {
306         slot_dma_write(space, (offset&0xfff) + 0xf000, data);
309         slot_dma_write(space, (offset-0xd000)+0x9000, data);
307310      }
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      }
316311   }
317312   else
318313   {
trunk/src/devices/bus/cpc/ddi1.h
r249940r249941
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
r0r249941
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
r0r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r0r249941
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
r0r249941
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
r249940r249941
157157   { A26_8IN1, "a26_8in1" },
158158   { A26_32IN1, "a26_32in1" },
159159   { A26_X07, "a26_x07" },
160   { A26_DPCPLUS, "a26_dpcplus" },
160161};
161162
162163static int vcs_get_pcb_id(const char *slot)
trunk/src/devices/bus/vcs/vcs_slot.h
r249940r249941
3535   A26_DPC,
3636   A26_SS,
3737   A26_CM,
38   A26_X07
38   A26_X07,
39   A26_DPCPLUS,
3940};
4041
4142
trunk/src/devices/cpu/avr8/avr8.c
r249940r249941
752752   m_io = &space(AS_IO);
753753
754754   // register our state for the debugger
755   std::string tempstr;
756755   state_add(STATE_GENPC,     "GENPC",     m_shifted_pc).noshow();
757756   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow();
758757   state_add(AVR8_SREG,       "STATUS",    m_r[AVR8_REGIDX_SREG]).mask(0xff);
trunk/src/devices/cpu/dsp56k/pmove.h
r249940r249941
315315   {
316316      INT8 b;
317317      reg_id SD;
318      std::string args;
319
320318      b = (char)(word0 & 0x00ff);
321319      decode_HHH_table(BITSn(word1,0x0e00), SD);
322320      assemble_reg_from_W_table(BITSn(word1,0x0100), 'X', SD, b, m_source, m_destination);
trunk/src/devices/cpu/e132xs/e132xs.c
r249940r249941
15621562   m_clock_scale_mask = scale_mask;
15631563
15641564   // register our state for the debugger
1565   std::string tempstr;
15661565   state_add(STATE_GENPC,    "GENPC",     m_global_regs[0]).noshow();
15671566   state_add(STATE_GENFLAGS, "GENFLAGS",  m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow();
15681567   state_add(E132XS_PC,      "PC", m_global_regs[0]).mask(0xffffffff);
trunk/src/devices/cpu/esrip/esrip.c
r249940r249941
193193   m_direct = &m_program->direct();
194194
195195   // register our state for the debugger
196   std::string tempstr;
197196   state_add(STATE_GENPC,     "GENPC",     m_rip_pc).noshow();
198197   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_status).callimport().callexport().formatstr("%8s").noshow();
199198   state_add(ESRIP_PC,        "PC:",       m_rip_pc).mask(0xffff);
trunk/src/devices/cpu/i86/i86.c
r249940r249941
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
r249940r249941
20182018
20192019
20202020      case 0xf0: // i_lock
2021      case 0xf1: // 0xf1 is 0xf0; verified on custom hardware
2021      case 0xf1: // 0xf1 is 0xf0; verified on real CPU
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
r249940r249941
424424   m_icountptr = &m_icount;
425425
426426   // register our state for the debugger
427   std::string tempstr;
428427   state_add(STATE_GENPC,     "GENPC",     m_pc.w.l).noshow();
429428   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_cc).callimport().callexport().formatstr("%8s").noshow();
430429   state_add(M6805_A,         "A",         m_a).mask(0xff);
trunk/src/devices/cpu/mips/mips3.h
r249940r249941
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
r249940r249941
100100   m_program = &space(AS_PROGRAM);
101101
102102   // register our state for the debugger
103   std::string tempstr;
104103   state_add(STATE_GENPC,     "GENPC",     m_pc).noshow();
105104   state_add(STATE_GENFLAGS,  "GENFLAGS",  m_halt).callimport().callexport().formatstr("%1s").noshow();
106105   state_add(SSEM_PC,         "PC",        m_shifted_pc).mask(0xffff);
trunk/src/devices/cpu/upd7725/upd7725.c
r249940r249941
6969   m_direct = &m_program->direct();
7070
7171   // register our state for the debugger
72   std::string tempstr;
7372   state_add(STATE_GENPC, "GENPC", regs.pc).noshow();
7473   state_add(UPD7725_PC, "PC", regs.pc);
7574   state_add(UPD7725_RP, "RP", regs.rp);
trunk/src/devices/cpu/z80/z80.c
r249940r249941
473473{
474474   unsigned pc = PCD;
475475   PC++;
476   return m_decrypted_opcodes_direct->read_byte(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;
477481}
478482
479483/****************************************************************
r249940r249941
31413145   else
31423146      irq_vector = m_irq_callback(*this, 0);
31433147
3148   /* Say hi */
3149   m_irqack_cb(true);
3150
31443151   LOG(("Z80 '%s' single int. irq_vector $%02x\n", tag(), irq_vector));
31453152
31463153   /* Interrupt mode 2. Call [i:databyte] */
r249940r249941
34293436   m_cc_xy = cc_xy;
34303437   m_cc_xycb = cc_xycb;
34313438   m_cc_ex = cc_ex;
3439
3440   m_irqack_cb.resolve_safe();
3441   m_refresh_cb.resolve_safe();
34323442}
34333443
34343444void nsc800_device::device_start()
r249940r249941
37053715   cpu_device(mconfig, Z80, "Z80", tag, owner, clock, "z80", __FILE__),
37063716   m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0),
37073717   m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0),
3708   m_io_config("io", 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)
37093721{
37103722}
37113723
r249940r249941
37133725   cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
37143726   m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0),
37153727   m_decrypted_opcodes_config("decrypted_opcodes", ENDIANNESS_LITTLE, 8, 16, 0),
3716   m_io_config("io", 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)
37173731{
37183732}
37193733
trunk/src/devices/cpu/z80/z80.h
r249940r249941
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
1016enum
1117{
1218   NSC800_RSTA = INPUT_LINE_IRQ0 + 1,
r249940r249941
3844   DECLARE_WRITE_LINE_MEMBER( irq_line );
3945
4046   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); }
4149
4250protected:
4351   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);
r249940r249941
240248   address_space *m_io;
241249   direct_read_data *m_direct;
242250   direct_read_data *m_decrypted_opcodes_direct;
251   devcb_write_line m_irqack_cb;
252   devcb_write16 m_refresh_cb;
243253
244254   PAIR            m_prvpc;
245255   PAIR            m_pc;
trunk/src/devices/imagedev/floppy.c
r249940r249941
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;
r249940r249941
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);
r249940r249941
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
r249940r249941
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;
r249940r249941
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
r249940r249941
470470   if ((multi_word_dma_mode() >= 0) || (ultra_dma_mode() >= 0))
471471      set_dmarq(CLEAR_LINE);
472472
473   m_buffer_empty_timer->enable(true);
474   m_buffer_empty_timer->adjust(attotime::zero);
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();
475479}
476480
477481void ata_hle_device::write_buffer_full()
trunk/src/devices/machine/r10696.c
r249940r249941
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_a) & 0x0f;
157      data = (io_a | io_b | io_c) & 0x0f;
158158      break;
159159   case 0x01: // Read Groups B | C
160160      io_b = m_iord(1);
trunk/src/devices/machine/z80scc.c
r249940r249941
7373#include "z80scc.h"
7474
7575//**************************************************************************
76//   MACROS / CONSTANTS
76//  MACROS / CONSTANTS
7777//**************************************************************************
7878
7979#define VERBOSE 0
r249940r249941
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>;
r249940r249941
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)
r249940r249941
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)
r249940r249941
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()
r249940r249941
252252
253253
254254//-------------------------------------------------
255//   device_reset - device-specific reset
255//  device_reset - device-specific reset
256256//-------------------------------------------------
257257
258258void z80scc_device::device_reset()
r249940r249941
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()
r249940r249941
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++)
r249940r249941
300300
301301
302302//-------------------------------------------------
303//   z80daisy_irq_ack - interrupt acknowledge
303//  z80daisy_irq_ack - interrupt acknowledge
304304//-------------------------------------------------
305305
306306int z80scc_device::z80daisy_irq_ack()
r249940r249941
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()
r249940r249941
360360
361361
362362//-------------------------------------------------
363//   check_interrupts -
363//  check_interrupts -
364364//-------------------------------------------------
365365
366366void z80scc_device::check_interrupts()
r249940r249941
372372
373373
374374//-------------------------------------------------
375//   reset_interrupts -
375//  reset_interrupts -
376376//-------------------------------------------------
377377
378378void z80scc_device::reset_interrupts()
r249940r249941
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   }
r249940r249941
420420
421421
422422//-------------------------------------------------
423//   trigger_interrupt -
423//  trigger_interrupt -
424424//-------------------------------------------------
425425void z80scc_device::trigger_interrupt(int index, int state)
426426{
r249940r249941
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:
r249940r249941
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?
r249940r249941
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()
r249940r249941
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{
r249940r249941
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
r249940r249941
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 )
r249940r249941
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 )
r249940r249941
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)
r249940r249941
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)
r249940r249941
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;
r249940r249941
655655
656656
657657//-------------------------------------------------
658//   start - channel startup
658//  start - channel startup
659659//-------------------------------------------------
660660
661661void z80scc_channel::device_start()
r249940r249941
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));
r249940r249941
725725
726726
727727//-------------------------------------------------
728//   reset - reset channel status
728//  reset - reset channel status
729729//-------------------------------------------------
730730
731731void z80scc_channel::device_reset()
r249940r249941
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
r249940r249941
786786
787787
788788//-------------------------------------------------
789//   tra_callback -
789//  tra_callback -
790790//-------------------------------------------------
791791
792792void z80scc_channel::tra_callback()
r249940r249941
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)
r249940r249941
829829
830830
831831//-------------------------------------------------
832//   tra_complete -
832//  tra_complete -
833833//-------------------------------------------------
834834
835835void z80scc_channel::tra_complete()
r249940r249941
880880
881881
882882//-------------------------------------------------
883//   rcv_callback -
883//  rcv_callback -
884884//-------------------------------------------------
885885
886886void z80scc_channel::rcv_callback()
r249940r249941
900900
901901
902902//-------------------------------------------------
903//   rcv_complete -
903//  rcv_complete -
904904//-------------------------------------------------
905905
906906void z80scc_channel::rcv_complete()
r249940r249941
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()
r249940r249941
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;
r249940r249941
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
r249940r249941
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()
r249940r249941
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()
r249940r249941
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;
r249940r249941
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()
r249940r249941
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;
r249940r249941
12311231}
12321232
12331233//-------------------------------------------------
1234//   control_read - read control register
1234//  control_read - read control register
12351235//-------------------------------------------------
12361236UINT8 z80scc_channel::control_read()
12371237{
r249940r249941
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
r249940r249941
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);
r249940r249941
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   {
r249940r249941
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;
r249940r249941
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;
r249940r249941
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
r249940r249941
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;
r249940r249941
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;
r249940r249941
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
r249940r249941
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;
r249940r249941
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{
r249940r249941
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/*
r249940r249941
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
r249940r249941
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)
r249940r249941
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();
r249940r249941
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);
r249940r249941
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()
r249940r249941
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      {
r249940r249941
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{
r249940r249941
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)
r249940r249941
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 )
r249940r249941
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 )
r249940r249941
20902090
20912091
20922092//-------------------------------------------------
2093//   ri_w - ring indicator handler
2093//  ri_w - ring indicator handler
20942094//-------------------------------------------------
20952095
20962096WRITE_LINE_MEMBER( z80scc_channel::ri_w )
r249940r249941
21222122}
21232123
21242124//-------------------------------------------------
2125//   sync_w - sync handler
2125//  sync_w - sync handler
21262126//-------------------------------------------------
21272127WRITE_LINE_MEMBER( z80scc_channel::sync_w )
21282128{
r249940r249941
21302130}
21312131
21322132//-------------------------------------------------
2133//   rxc_w - receive clock
2133//  rxc_w - receive clock
21342134//-------------------------------------------------
21352135WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
21362136{
r249940r249941
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{
r249940r249941
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;
r249940r249941
21752175}
21762176
21772177//-------------------------------------------------
2178//   update_serial -
2178//  update_serial -
21792179//-------------------------------------------------
21802180void z80scc_channel::update_serial()
21812181{
r249940r249941
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{
r249940r249941
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
r249940r249941
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               _____   _____                          _____   _____
r249940r249941
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) \
r249940r249941
101101
102102
103103//**************************************************************************
104//   TYPE DEFINITIONS
104//  TYPE DEFINITIONS
105105//**************************************************************************
106106
107107// ======================> z80scc_channel
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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();
r249940r249941
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
r249940r249941
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,
r249940r249941
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   {
r249940r249941
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
r249940r249941
5050#include "z80sio.h"
5151
5252//**************************************************************************
53//   MACROS / CONSTANTS
53//  MACROS / CONSTANTS
5454//**************************************************************************
5555
5656#define VERBOSE 0
r249940r249941
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
r249940r249941
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 )
r249940r249941
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)
r249940r249941
164164}
165165
166166//-------------------------------------------------
167//   device_start - device-specific startup
167//  device_start - device-specific startup
168168//-------------------------------------------------
169169void z80sio_device::device_start()
170170{
r249940r249941
200200
201201
202202//-------------------------------------------------
203//   device_reset - device-specific reset
203//  device_reset - device-specific reset
204204//-------------------------------------------------
205205void z80sio_device::device_reset()
206206{
r249940r249941
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{
r249940r249941
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++)
r249940r249941
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{
r249940r249941
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{
r249940r249941
300300
301301
302302//-------------------------------------------------
303//   check_interrupts -
303//  check_interrupts -
304304//-------------------------------------------------
305305void z80sio_device::check_interrupts()
306306{
r249940r249941
311311
312312
313313//-------------------------------------------------
314//   reset_interrupts -
314//  reset_interrupts -
315315//-------------------------------------------------
316316void z80sio_device::reset_interrupts()
317317{
r249940r249941
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{
r249940r249941
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
r249940r249941
398398
399399
400400//-------------------------------------------------
401//   m1_r - interrupt acknowledge
401//  m1_r - interrupt acknowledge
402402//-------------------------------------------------
403403int z80sio_device::m1_r()
404404{
r249940r249941
408408
409409
410410//-------------------------------------------------
411//   cd_ba_r -
411//  cd_ba_r -
412412//-------------------------------------------------
413413READ8_MEMBER( z80sio_device::cd_ba_r )
414414{
r249940r249941
423423
424424
425425//-------------------------------------------------
426//   cd_ba_w -
426//  cd_ba_w -
427427//-------------------------------------------------
428428WRITE8_MEMBER( z80sio_device::cd_ba_w )
429429{
r249940r249941
441441
442442
443443//-------------------------------------------------
444//   ba_cd_r -
444//  ba_cd_r -
445445//-------------------------------------------------
446446READ8_MEMBER( z80sio_device::ba_cd_r )
447447{
r249940r249941
456456
457457
458458//-------------------------------------------------
459//   ba_cd_w -
459//  ba_cd_w -
460460//-------------------------------------------------
461461WRITE8_MEMBER( z80sio_device::ba_cd_w )
462462{
r249940r249941
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__),
r249940r249941
512512
513513
514514//-------------------------------------------------
515//   start - channel startup
515//  start - channel startup
516516//-------------------------------------------------
517517void z80sio_channel::device_start()
518518{
r249940r249941
555555
556556
557557//-------------------------------------------------
558//   reset - reset channel status
558//  reset - reset channel status
559559//-------------------------------------------------
560560void z80sio_channel::device_reset()
561561{
r249940r249941
590590}
591591
592592//-------------------------------------------------
593//   tra_callback -
593//  tra_callback -
594594//-------------------------------------------------
595595void z80sio_channel::tra_callback()
596596{
r249940r249941
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)
r249940r249941
632632
633633
634634//-------------------------------------------------
635//   tra_complete -
635//  tra_complete -
636636//-------------------------------------------------
637637void z80sio_channel::tra_complete()
638638{
r249940r249941
683683
684684
685685//-------------------------------------------------
686//   rcv_callback -
686//  rcv_callback -
687687//-------------------------------------------------
688688void z80sio_channel::rcv_callback()
689689{
r249940r249941
703703
704704
705705//-------------------------------------------------
706//   rcv_complete -
706//  rcv_complete -
707707//-------------------------------------------------
708708void z80sio_channel::rcv_complete()
709709{
r249940r249941
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()
r249940r249941
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;
r249940r249941
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   {
r249940r249941
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()
r249940r249941
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()
r249940r249941
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;
r249940r249941
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()
r249940r249941
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;
r249940r249941
869869
870870
871871//-------------------------------------------------
872//   control_read - read control register
872//  control_read - read control register
873873//-------------------------------------------------
874874
875875UINT8 z80sio_channel::control_read()
r249940r249941
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);
r249940r249941
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:
r249940r249941
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}
r249940r249941
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;
r249940r249941
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   }
r249940r249941
10891089
10901090
10911091//-------------------------------------------------
1092//   data_read - read data register
1092//  data_read - read data register
10931093//-------------------------------------------------
10941094UINT8 z80sio_channel::data_read()
10951095{
r249940r249941
10991099   {
11001100      // load data from the FIFO
11011101      data = m_rx_data_fifo[m_rx_fifo];
1102     
1102
11031103      // load error status from the FIFO
11041104      m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo];
1105     
1105
11061106      // decrease FIFO pointer
11071107      m_rx_fifo--;
1108     
1108
11091109      if (m_rx_fifo < 0)
11101110      {
11111111         // no more characters available in the FIFO
11121112         m_rr0 &= ~ RR0_RX_CHAR_AVAILABLE;
11131113      }
11141114   }
1115   
1115
11161116   LOG(("Z80SIO \"%s\" Channel %c : Data Register Read '%02x'\n", m_owner->tag(), 'A' + m_index, data));
1117   
1117
11181118   return data;
11191119}
1120 
11211120
1121
11221122//-------------------------------------------------
1123//   data_write - write data register
1123//  data_write - write data register
11241124//-------------------------------------------------
11251125void z80sio_channel::data_write(UINT8 data)
11261126{
r249940r249941
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
r249940r249941
11491149
11501150
11511151//-------------------------------------------------
1152//   receive_data - receive data word
1152//  receive_data - receive data word
11531153//-------------------------------------------------
11541154void z80sio_channel::receive_data(UINT8 data)
11551155{
r249940r249941
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
r249940r249941
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   {
r249940r249941
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 )
r249940r249941
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 )
r249940r249941
12871287
12881288
12891289//-------------------------------------------------
1290//   sh_w - Sync Hunt handler
1290//  sh_w - Sync Hunt handler
12911291//-------------------------------------------------
12921292
12931293WRITE_LINE_MEMBER( z80sio_channel::sync_w )
r249940r249941
13201320
13211321
13221322//-------------------------------------------------
1323//   rxc_w - receive clock
1323//  rxc_w - receive clock
13241324//-------------------------------------------------
13251325
13261326WRITE_LINE_MEMBER( z80sio_channel::rxc_w )
r249940r249941
13421342
13431343
13441344//-------------------------------------------------
1345//   txc_w - transmit clock
1345//  txc_w - transmit clock
13461346//-------------------------------------------------
13471347
13481348WRITE_LINE_MEMBER( z80sio_channel::txc_w )
r249940r249941
13641364
13651365
13661366//-------------------------------------------------
1367//   update_serial -
1367//  update_serial -
13681368//-------------------------------------------------
13691369void z80sio_channel::update_serial()
13701370{
r249940r249941
14021402
14031403
14041404//-------------------------------------------------
1405//   set_dtr -
1405//  set_dtr -
14061406//-------------------------------------------------
14071407
14081408void z80sio_channel::set_dtr(int state)
r249940r249941
14171417}
14181418
14191419//-------------------------------------------------
1420//   write_rx -
1420//  write_rx -
14211421//-------------------------------------------------
14221422
14231423WRITE_LINE_MEMBER(z80sio_channel::write_rx)
trunk/src/devices/machine/z80sio.h
r249940r249941
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) \
r249940r249941
116116
117117
118118//**************************************************************************
119//   TYPE DEFINITIONS
119//  TYPE DEFINITIONS
120120//**************************************************************************
121121
122122// ======================> z80sio_channel
r249940r249941
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);
r249940r249941
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
r249940r249941
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
r249940r249941
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();
r249940r249941
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;
r249940r249941
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); }
r249940r249941
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
r249940r249941
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
539542         m_has_valid_parameters = true;
540543      }
541544      else
r249940r249941
549552      m_hsync_off_pos = hsync_off_pos;
550553      m_vsync_on_pos = vsync_on_pos;
551554      m_vsync_off_pos = vsync_off_pos;
555      m_line_counter = 0;
552556   }
553557}
554558
r249940r249941
667671      if ( m_line_counter == m_vert_disp )
668672      {
669673         m_line_enable_ff = false;
674         m_current_disp_addr = m_disp_start_addr;
670675      }
671676
672677      /* Check if VSYNC should be enabled */
r249940r249941
10051010   m_out_vsync_cb.resolve_safe();
10061011
10071012   /* bind delegates */
1013   m_reconfigure_cb.bind_relative_to(*owner());
10081014   m_begin_update_cb.bind_relative_to(*owner());
10091015   m_update_row_cb.bind_relative_to(*owner());
10101016   m_end_update_cb.bind_relative_to(*owner());
trunk/src/devices/video/mc6845.h
r249940r249941
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
4245#define MCFG_MC6845_BEGIN_UPDATE_CB(_class, _method) \
4346   mc6845_device::set_begin_update_callback(*device, mc6845_begin_update_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
4447
r249940r249941
6568
6669
6770/* 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
6874typedef device_delegate<void (bitmap_rgb32 &bitmap, const rectangle &cliprect)> mc6845_begin_update_delegate;
6975#define MC6845_BEGIN_UPDATE(name)  void name(bitmap_rgb32 &bitmap, const rectangle &cliprect)
7076
r249940r249941
110116   }
111117   static void set_char_width(device_t &device, int pixels) { downcast<mc6845_device &>(device).m_hpixels_per_column = pixels; }
112118
119   static void set_reconfigure_callback(device_t &device, mc6845_reconfigure_delegate callback) { downcast<mc6845_device &>(device).m_reconfigure_cb = callback; }
113120   static void set_begin_update_callback(device_t &device, mc6845_begin_update_delegate callback) { downcast<mc6845_device &>(device).m_begin_update_cb = callback; }
114121   static void set_update_row_callback(device_t &device, mc6845_update_row_delegate callback) { downcast<mc6845_device &>(device).m_update_row_cb = callback; }
115122   static void set_end_update_callback(device_t &device, mc6845_end_update_delegate callback) { downcast<mc6845_device &>(device).m_end_update_cb = callback; }
r249940r249941
286293
287294   int m_hpixels_per_column;       /* number of pixels per video memory address */
288295
296   mc6845_reconfigure_delegate m_reconfigure_cb;
297
289298   /* if specified, this gets called before any pixel update,
290299    optionally return a pointer that will be passed to the
291300    update and tear down callbacks */
trunk/src/devices/video/poly.h
r249940r249941
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
r249940r249941
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
r249940r249941
12801280         clipv[clip_verts].y = v[previ].y + ((v[i].y - v[previ].y) * t);
12811281         clipv[clip_verts].z = v[previ].z + ((v[i].z - v[previ].z) * t);
12821282         clipv[clip_verts].w = v[previ].w + ((v[i].w - v[previ].w) * t);
1283           
1284            // Interpolate the rest of the parameters
1285            for (int pi = 0; pi < _MaxParams; pi++)
1286                clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
12871283
1288            ++clip_verts;
1284         // Interpolate the rest of the parameters
1285         for (int pi = 0; pi < _MaxParams; pi++)
1286            clipv[clip_verts].p[pi] = v[previ].p[pi] + ((v[i].p[pi] - v[previ].p[pi]) * t);
1287
1288         ++clip_verts;
12891289      }
12901290      if (v1_side > 0)                // current point is inside
12911291      {
r249940r249941
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
r249940r249941
758758{
759759   std::string locationtag, breakstr("%");
760760   const rom_entry *region;
761   std::string regiontag;
762761   bool retVal = FALSE;
763762   int warningcount = 0;
764763   for (region = start; region != NULL; region = rom_next_region(region))
trunk/src/emu/dipty.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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,                                       "1.0",       OPTION_FLOAT,      "set vector beam width" },
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 " },
116118   { OPTION_FLICKER,                                    "0",         OPTION_FLOAT,      "set vector flicker effect" },
117119
118120   // sound options
r249940r249941
443445      parse_one_ini("computer", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
444446   else if (cursystem->flags & MACHINE_TYPE_OTHER)
445447      parse_one_ini("othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
446   
448
447449   machine_config config(*cursystem, *this);
448450   screen_device_iterator iter(config.root_device());
449451   for (const screen_device *device = iter.first(); device != NULL; device = iter.next())
r249940r249941
580582{
581583   std::string tmp = std::string(",").append(subname).append("=");
582584   buffer = value(name);
583   int pos = buffer.find(tmp.c_str());
585   int pos = buffer.find(tmp);
584586   if (pos != -1)
585587   {
586588      int endpos = buffer.find_first_of(',', pos + 1);
trunk/src/emu/emuopts.h
r249940r249941
119119
120120// core vector options
121121#define OPTION_ANTIALIAS            "antialias"
122#define OPTION_BEAM                 "beam"
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"
123125#define OPTION_FLICKER              "flicker"
124126
125127// core sound options
r249940r249941
296298
297299   // core vector options
298300   bool antialias() const { return bool_value(OPTION_ANTIALIAS); }
299   float beam() const { return float_value(OPTION_BEAM); }
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); }
300304   float flicker() const { return float_value(OPTION_FLICKER); }
301305
302306   // core sound options
trunk/src/emu/info.c
r249940r249941
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).c_str()) + oldtag.length());
648         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
649649
650650         fprintf(m_output, "\t\t<chip");
651651         fprintf(m_output, " type=\"cpu\"");
r249940r249941
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).c_str()) + oldtag.length());
666         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
667667
668668         fprintf(m_output, "\t\t<chip");
669669         fprintf(m_output, " type=\"audio\"");
r249940r249941
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).c_str()) + oldtag.length());
694         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
695695
696696         fprintf(m_output, "\t\t<display");
697697         fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str()));
r249940r249941
10971097            std::string output;
10981098
10991099            std::string newtag(port->tag()), oldtag(":");
1100            newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length());
1100            newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
11011101
11021102            // output the switch name information
11031103            std::string normalized_field_name(xml_normalize_string(field->name()));
r249940r249941
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).c_str()) + oldtag.length());
1231         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + 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()));
r249940r249941
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).c_str()) + oldtag.length());
1289         newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + 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
r249940r249941
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.c_str()).append("')").c_str();
209      std::string val = std::string("emu.keypost('").append(cmd).append("')");
210210      manager().lua()->load_string(val.c_str());
211211   }
212212}
r249940r249941
256256   m_memory.initialize();
257257
258258   // initialize the watchdog
259   m_watchdog_counter = 0;
259260   m_watchdog_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::watchdog_fired), this));
260261   if (config().m_watchdog_vblank_count != 0 && primary_screen != NULL)
261262      primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this));
r249940r249941
562563
563564   // handle %d in the template (for image devices)
564565   std::string statename_dev("%d_");
565   int pos = statename_str.find(statename_dev.c_str());
566   int pos = statename_str.find(statename_dev);
566567
567568   if (pos != -1)
568569   {
trunk/src/emu/machine.h
r249940r249941
226226   // watchdog control
227227   void watchdog_reset();
228228   void watchdog_enable(bool enable = true);
229   INT32 get_vblank_watchdog_counter() { return m_watchdog_counter; }
229230
230231   // misc
231232   void CLIB_DECL vlogerror(const char *format, va_list args);
trunk/src/emu/memory.c
r249940r249941
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
19341932   // based on the handler type, alter the bits, name, funcptr, and object
19351933   switch (data.m_type)
19361934   {
trunk/src/emu/romload.c
r249940r249941
675675         }
676676
677677         // prepare locations where we have to load from: list/parentname & list/clonename
678         std::string swlist(tag1.c_str());
678         std::string swlist(tag1);
679679         tag2.assign(swlist.append(tag4));
680680         if (has_parent)
681681         {
r249940r249941
10761076         }
10771077
10781078         // prepare locations where we have to load from: list/parentname (if any) & list/clonename
1079         std::string swlist(tag1.c_str());
1079         std::string swlist(tag1);
10801080         tag2.assign(swlist.append(tag4));
10811081         if (has_parent)
10821082         {
trunk/src/emu/screen.h
r249940r249941
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
r249940r249941
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.c_str()) != -1)
161      if (comp.find(token) != -1)
162162         return true;
163163   }
164164   return false;
r249940r249941
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.c_str()) != -1);
184   return (interfaces.find(our_interface) != -1);
185185}
186186
187187
trunk/src/emu/ui/filemngr.c
r249940r249941
104104{
105105   std::string buffer, tmp_inst, tmp_name;
106106   bool first_entry = true;
107   std::string prev_owner;
108107
109108   if (!m_warnings.empty())
110109   {
trunk/src/emu/ui/info_pty.c
r249940r249941
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
r249940r249941
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
r249940r249941
9191{
9292   input_item_data *itemlist = NULL;
9393   int suborder[SEQ_TYPE_TOTAL];
94   std::string tempstring;
9594   int sortorder = 1;
9695
9796   /* create a mini lookup table for sort order based on sequence type */
r249940r249941
154153{
155154   input_item_data *itemlist = NULL;
156155   int suborder[SEQ_TYPE_TOTAL];
157   std::string tempstring;
158156   int port_count = 0;
159157
160158   /* create a mini lookup table for sort order based on sequence type */
trunk/src/emu/ui/mainmenu.c
r249940r249941
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
r249940r249941
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
r249940r249941
4545      SELECT_GAME,
4646      BIOS_SELECTION,
4747      BARCODE_READ,
48                PTY_INFO
48            PTY_INFO
4949   };
5050};
5151
trunk/src/emu/ui/ui.c
r249940r249941
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(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);
128130static char *slider_get_screen_desc(screen_device &screen);
129131#ifdef MAME_DEBUG
130132static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval);
r249940r249941
19641966   for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
19651967      if (screen->screen_type() == SCREEN_TYPE_VECTOR)
19661968      {
1967         // add flicker control
1969         // add vector control
19681970         *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL);
19691971         tailptr = &(*tailptr)->next;
1970         *tailptr = slider_alloc(machine, "Beam Width", 10, 100, 1000, 10, slider_beam, NULL);
1972         *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, NULL);
19711973         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;
19721978         break;
19731979      }
19741980
r249940r249941
23402346{
23412347   vector_device *vector = NULL;
23422348   if (newval != SLIDER_NOCHANGE)
2343      vector->set_flicker((float)newval * 0.1f);
2349      vector->set_flicker((float)newval * 0.001f);
23442350   if (str != NULL)
23452351      strprintf(*str,"%1.2f", (double) vector->get_flicker());
2346   return floor(vector->get_flicker() * 10.0f + 0.5f);
2352   return floor(vector->get_flicker() * 1000.0f + 0.5f);
23472353}
23482354
23492355
23502356//-------------------------------------------------
2351//  slider_beam - vector beam width slider
2357//  slider_beam_width_min - minimum vector beam width slider
23522358//  callback
23532359//-------------------------------------------------
23542360
2355static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, INT32 newval)
2361static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
23562362{
23572363   vector_device *vector = NULL;
23582364   if (newval != SLIDER_NOCHANGE)
2359      vector->set_beam((float)newval * 0.01f);
2365      vector->set_beam_width_min(MIN((float)newval * 0.01f, vector->get_beam_width_max()));
23602366   if (str != NULL)
2361      strprintf(*str,"%1.2f", (double) vector->get_beam());
2362   return floor(vector->get_beam() * 100.0f + 0.5f);
2367      strprintf(*str,"%1.2f", (double) vector->get_beam_width_min());
2368   return floor(vector->get_beam_width_min() * 100.0f + 0.5f);
23632369}
23642370
23652371
23662372//-------------------------------------------------
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//-------------------------------------------------
23672405//  slider_get_screen_desc - returns the
23682406//  description for a given screen
23692407//-------------------------------------------------
trunk/src/emu/validity.c
r249940r249941
196196   // if we had warnings or errors, output
197197   if (m_errors > 0 || m_warnings > 0)
198198   {
199      std::string tempstr;
200199      output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings);
201200      if (m_errors > 0)
202201      {
trunk/src/emu/video.c
r249940r249941
11261126
11271127   // handle %d in the template (for image devices)
11281128   std::string snapdev("%d_");
1129   int pos = snapstr.find(snapdev.c_str());
1129   int pos = snapstr.find(snapdev);
11301130
11311131   if (pos != -1)
11321132   {
trunk/src/emu/video/rgbvmx.c
r249940r249941
175175{
176176   mul(scale);
177177   sra_imm(8);
178   max(0);
179   min(255);
178   clamp_to_uint8();
180179}
181180
182181void rgbaint_t::scale_imm_and_clamp(const INT32 scale)
183182{
184183   mul_imm(scale);
185184   sra_imm(8);
186   max(0);
187   min(255);
185   clamp_to_uint8();
188186}
189187
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
220188#endif // defined(__ALTIVEC__)
trunk/src/emu/video/rgbvmx.h
r249940r249941
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
2230public:
2331   inline rgbaint_t() { }
2432   inline rgbaint_t(UINT32 rgba) { set(rgba); }
2533   inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
2634   inline rgbaint_t(rgb_t& rgb) { set(rgb); }
35   inline rgbaint_t(VECS32 rgba) { m_value = rgba; }
2736
2837   inline void set(rgbaint_t& other) { m_value = other.m_value; }
2938
r249940r249941
4958
5059   inline rgb_t to_rgba()
5160   {
52      VECU32 temp = vec_pack(m_value, m_value);
53      temp = vec_pack((VECU16)temp, (VECU16)temp);
61      VECU32 temp = vec_packs(m_value, m_value);
62      temp = vec_packsu((VECS16)temp, (VECS16)temp);
5463      UINT32 result;
5564      vec_ste(temp, 0, &result);
5665      return result;
r249940r249941
5968   inline rgb_t to_rgba_clamp()
6069   {
6170      VECU32 temp = vec_packs(m_value, m_value);
62      temp = vec_packsu((VECU16)temp, (VECU16)temp);
71      temp = vec_packsu((VECS16)temp, (VECS16)temp);
6372      UINT32 result;
6473      vec_ste(temp, 0, &result);
6574      return result;
r249940r249941
222231   inline void shl(const rgbaint_t& shift)
223232   {
224233      const VECU32 limit = { 32, 32, 32, 32 };
225      const VECU32 temp = vec_splat(shift.m_value, 3);
226      m_value = vec_and(vec_sl(m_value, temp), vec_cmpgt(limit, temp));
234      m_value = vec_and(vec_sl(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value));
227235   }
228236
229237   inline void shl_imm(const UINT8 shift)
r249940r249941
235243   inline void shr(const rgbaint_t& shift)
236244   {
237245      const VECU32 limit = { 32, 32, 32, 32 };
238      const VECU32 temp = vec_splat(shift.m_value, 3);
239      m_value = vec_and(vec_sr(m_value, temp), vec_cmpgt(limit, temp));
246      m_value = vec_and(vec_sr(m_value, (VECU32)shift.m_value), vec_cmpgt(limit, (VECU32)shift.m_value));
240247   }
241248
242249   inline void shr_imm(const UINT8 shift)
r249940r249941
248255   inline void sra(const rgbaint_t& shift)
249256   {
250257      const VECU32 limit = { 31, 31, 31, 31 };
251      m_value = vec_sra(m_value, vec_min((VECU32)vec_splat(shift.m_value, 3), limit));
258      m_value = vec_sra(m_value, vec_min((VECU32)shift.m_value, limit));
252259   }
253260
254261   inline void sra_imm(const UINT8 shift)
r249940r249941
279286      m_value = vec_and(m_value, color.m_value);
280287   }
281288
289   inline void andnot_reg(const rgbaint_t& color)
290   {
291      m_value = vec_andc(m_value, color.m_value);
292   }
293
282294   inline void and_imm(const INT32 value)
283295   {
284296      const VECS32 temp = { value, value, value, value };
r249940r249941
318330      m_value = vec_or(vec_and(vsign, mask), vec_and(m_value, vec_nor(mask, vzero)));
319331   }
320332
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
321342   inline void sign_extend(const UINT32 compare, const UINT32 sign)
322343   {
323344      const VECS32 compare_vec = { compare, compare, compare, compare };
r249940r249941
342363
343364   void scale_and_clamp(const rgbaint_t& scale);
344365   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);
348366
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
349394   inline void cmpeq(const rgbaint_t& value)
350395   {
351396      m_value = vec_cmpeq(m_value, value.m_value);
r249940r249941
480525      return result;
481526   }
482527
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
483551protected:
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
491552   VECS32                          m_value;
492553
493554   static const VECU8              alpha_perm;
trunk/src/emu/video/vector.c
r249940r249941
3535#include "vector.h"
3636
3737
38#define FLT_EPSILON 1E-5
3839
39#define VECTOR_WIDTH_DENOM          512
40#define VECTOR_WIDTH_DENOM 512
4041
42#define MAX_POINTS 10000
4143
42#define MAX_POINTS  10000
43
4444#define VECTOR_TEAM \
4545   "-* Vector Heads *-\n" \
4646   "Brad Oliver\n" \
r249940r249941
140140{
141141}
142142
143float vector_device::m_flicker_correction = 0.0f;
144float vector_device::m_beam_width = 0.0f;
145int vector_device::m_flicker;
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;
146147int vector_device::m_vector_index;
147148
148149void vector_device::device_start()
149150{
150   m_beam_width = machine().options().beam();
151
152151   /* Grab the settings for this session */
153   set_flicker(machine().options().flicker());
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();
154156
155157   m_vector_index = 0;
156158
r249940r249941
158160   m_vector_list = auto_alloc_array_clear(machine(), point, MAX_POINTS);
159161}
160162
161void vector_device::set_flicker(float _flicker)
163void vector_device::set_flicker(float newval)
162164{
163   m_flicker_correction = _flicker;
164   m_flicker = (int)(m_flicker_correction * 2.55f);
165   m_flicker = newval;
165166}
166167
167168float vector_device::get_flicker()
168169{
169   return m_flicker_correction;
170   return m_flicker;
170171}
171172
172void vector_device::set_beam(float _beam)
173void vector_device::set_beam_width_min(float newval)
173174{
174   m_beam_width = _beam;
175   m_beam_width_min = newval;
175176}
176177
177float vector_device::get_beam()
178float vector_device::get_beam_width_min()
178179{
179   return m_beam_width;
180   return m_beam_width_min;
180181}
181182
183void vector_device::set_beam_width_max(float newval)
184{
185   m_beam_width_max = newval;
186}
182187
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
183204/*
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/*
184215 * Adds a line end point to the vertices list. The vector processor emulation
185216 * needs to call this.
186217 */
187void vector_device::add_point (int x, int y, rgb_t color, int intensity)
218void vector_device::add_point(int x, int y, rgb_t color, int intensity)
188219{
189220   point *newpoint;
190221
191   if (intensity > 0xff)
192      intensity = 0xff;
222   if (intensity > 255)
223   {
224      intensity = 255;
225   }
193226
194227   if (m_flicker && (intensity > 0))
195228   {
196      intensity += (intensity * (0x80-(machine().rand()&0xff)) * m_flicker)>>16;
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);
197232      if (intensity < 0)
233      {
198234         intensity = 0;
199      if (intensity > 0xff)
200         intensity = 0xff;
235      }
236      if (intensity > 255)
237      {
238         intensity = 255;
239      }
201240   }
241
202242   newpoint = &m_vector_list[m_vector_index];
203243   newpoint->x = x;
204244   newpoint->y = y;
r249940r249941
214254   }
215255}
216256
257
217258/*
218259 * Add new clipping info to the list
219260 */
220void vector_device::add_clip (int x1, int yy1, int x2, int y2)
261void vector_device::add_clip(int x1, int yy1, int x2, int y2)
221262{
222263   point *newpoint;
223264
r249940r249941
241282 * The vector CPU creates a new display list. We save the old display list,
242283 * but only once per refresh.
243284 */
244void vector_device::clear_list (void)
285void vector_device::clear_list(void)
245286{
246287   m_vector_index = 0;
247288}
r249940r249941
255296   float yscale = 1.0f / (65536 * visarea.height());
256297   float xoffs = (float)visarea.min_x;
257298   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
258304   point *curpoint;
259305   render_bounds clip;
260   int lastx = 0, lasty = 0;
261   int i;
306   int lastx = 0;
307   int lasty = 0;
262308
263309   curpoint = m_vector_list;
264310
r249940r249941
268314   clip.x0 = clip.y0 = 0.0f;
269315   clip.x1 = clip.y1 = 1.0f;
270316
271   for (i = 0; i < m_vector_index; i++)
317   for (int i = 0; i < m_vector_index; i++)
272318   {
273319      render_bounds coords;
274320
r249940r249941
286332      }
287333      else
288334      {
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
289341         coords.x0 = ((float)lastx - xoffs) * xscale;
290342         coords.y0 = ((float)lasty - yoffs) * yscale;
291343         coords.x1 = ((float)curpoint->x - xoffs) * xscale;
292344         coords.y1 = ((float)curpoint->y - yoffs) * yscale;
293345
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);
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         }
300355
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
301365         lastx = curpoint->x;
302366         lasty = curpoint->y;
303367      }
368
304369      curpoint++;
305370   }
371
306372   return 0;
307373}
trunk/src/emu/video/vector.h
r249940r249941
1616/* The vertices are buffered here */
1717struct point
1818{
19      point():
19   point() :
2020      x(0),
2121      y(0),
2222      col(0),
r249940r249941
3232   int status;         /* for dirty and clipping handling */
3333};
3434
35class vector_device :  public device_t,
36                     public device_video_interface
35class vector_device : public device_t, public device_video_interface
3736{
3837public:
3938   // construction/destruction
r249940r249941
4645   void add_point(int x, int y, rgb_t color, int intensity);
4746   void add_clip(int minx, int miny, int maxx, int maxy);
4847
49   void set_flicker(float m_flicker_correction);
48   void set_flicker(float newval);
5049   float get_flicker();
5150
52   void set_beam(float _beam);
53   float get_beam();
51   void set_beam_width_min(float newval);
52   float get_beam_width_min();
5453
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
5560   // device-level overrides
5661   virtual void device_start();
5762
5863private:
59   static int m_flicker;                              /* beam flicker value     */
60   static float m_flicker_correction;
61   static float m_beam_width;
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;
6268   point *m_vector_list;
6369   static int m_vector_index;
70
71   float normalized_sigmoid(float n, float k);
6472};
6573
6674
trunk/src/lib/formats/apollo_dsk.c
r249940r249941
5353
5454   return ((size == expected_size) || (size == 0)) ? 1 : 0;
5555}
56
trunk/src/lib/formats/tzx_cas.c
r249940r249941
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
299337static void ascii_block_common_log( const char *block_type_string, UINT8 block_type )
300338{
301339   LOG_FORMATS("%s (type %02x) encountered.\n", block_type_string, block_type);
r249940r249941
343381      int bit0, bit1, bits_in_last_byte;
344382      UINT8 *cur_block = blocks[current_block];
345383      UINT8 block_type = cur_block[0];
384      UINT16 tstates = 0;
346385
347
348386   /* Uncomment this to include into error.log a list of the types each block */
349387   LOG_FORMATS("tzx_cas_fill_wave: block %d, block_type %02x\n", current_block, block_type);
350388
r249940r249941
516554         current_block++;
517555         break;
518556
519      case 0x15:  /* Direct Recording */
557      case 0x15:  /* Direct Recording */ // used on 'bombscar' in the cpc_cass list
520558         // having this missing is fatal
521         printf("Unsupported block type (0x15 - Direct Recording) encountered.\n");
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);
522564         current_block++;
523565         break;
524566
trunk/src/mame/arcade.lst
r249940r249941
12321232dkongjo         // (c) 1981 Nintendo
12331233dkongjo1        // (c) 1981 Nintendo
12341234dkongf          // hack from Jeff's Romhack
1235dkongpe         // hack Pauline Edition
12351236dkongx          // hack
12361237dkongx11        // hack
12371238dkongjr         // (c) 1982 Nintendo of America
r249940r249941
18261827rtypejp         // (c) 1987 (Japan)
18271828rtypeu          // (c) 1987 + Nintendo USA license (US)
18281829rtypeb          // bootleg
1829rtypem82b      // bootleg
1830rtypem82b       // bootleg
18301831bchopper        // (c) 1987
18311832mrheli          // (c) 1987 (Japan)
18321833nspirit         // (c) 1988
r249940r249941
18441845rtype2          // (c) 1989
18451846rtype2j         // (c) 1989 (Japan)
18461847rtype2jc        // (c) 1989 (Japan)
1847rtype2m82b      // bootleg
1848rtype2m82b      // bootleg
18481849majtitle        // (c) 1990 (World)
18491850majtitlej       // (c) 1990 (Japan)
18501851hharry          // (c) 1990 (World)
r249940r249941
18551856poundforj       // (c) 1990 (Japan)
18561857poundforu       // (c) 1990 Irem America (US)
18571858airduelm72      // (c) 1990 (Japan)
1858airduel         // (c) 1990 (World)
1859airduel         // (c) 1990 (World)
18591860cosmccop        // (c) 1991 (World)
18601861gallop          // (c) 1991 (Japan)
18611862ltswords        // (c) 1991 (World)
18621863kengo           // (c) 1991 (Japan)
1863kengoa         // (c) 1991 (Japan)
1864kengoa          // (c) 1991 (Japan)
18641865// not M72, but same sound hardware
18651866sichuan2        // (c) 1989 Tamtex
18661867sichuan2a       // (c) 1989 Tamtex
r249940r249941
20962097sboblbobl       // bootleg
20972098sboblbobla      // bootleg
20982099sboblboblb      // bootleg
2100sboblboblc      // bootleg
2101bublboblb       // bootleg
20992102bub68705        // bootleg
21002103dland           // bootleg
2104bbredux         // bootleg / hack
2105bublcave        // hack
2106boblcave        // hack
2107bublcave11      // hack
2108bublcave10      // hack
21012109missb2          // bootleg on enhanced hardware
21022110bublpong        // bootleg on enhanced hardware
21032111kikikai         // A85 (c) 1986 Taito Corporation
r249940r249941
28632871ppsatan         // (c) 1996 <unknown>
28642872ddonpach        // (c) 1997 Atlus/Cave
28652873ddonpachj       // (c) 1997 Atlus/Cave
2874ddonpacha       // hack
28662875dfeveron        // (c) 1998 Cave + Nihon System license
28672876feversos        // (c) 1998 Cave + Nihon System license
28682877esprade         // (c) 1998 Atlus/Cave
r249940r249941
30963105madgearj        //  2/1989 (c) 1989 (Japan)
30973106ledstorm        //  1988 (c) 1988 (US)
30983107leds2011        //  1988 (c) 1988 (World)
3099leds2011u      //  1988 (c) 1988 (US)
3108leds2011u       //  1988 (c) 1988 (US)
31003109//  3/1989 Dokaben (baseball) - see below among "Mitchell" games
31013110//  8/1989 Dokaben 2 (baseball) - see below among "Mitchell" games
31023111// 10/1989 Capcom Baseball - see below among "Mitchell" games
r249940r249941
38653874soulclbrja      // 1998.?? Soul Calibur (Japan, SOC11/VER.A2)
38663875technodr        // 1998.07 Techno Drive
38673876mdhorse         // 1998.11 Derby Quiz My Dream Horse (Japan, MDH1/VER.A2)
3868aplarail      // 1998.12 Attack Pla Rail
3877aplarail        // 1998.12 Attack Pla Rail
38693878tenkomor        // 1998.?? Tenkomori Shooting (Asia, TKM2/VER.A1)
38703879tenkomorja      // 1998.12 Tenkomori Shooting (Japan, TKM1/VER.A1)
38713880pacapp          // 1998.12 Paca Paca Passion (Japan, PPP1/VER.A2)
r249940r249941
45014510wbdeluxe        // (c) 1986 + Escape license (S1)
45024511wboysys2        // 834-5984  (c) 1986 + Escape license (S1)
45034512gardia          // 834-6119 (S2?)
4513gardiaj         //
45044514gardiab         // bootleg
45054515nob             // (c) Data East
45064516nobb            // bootleg
r249940r249941
46854695ryukyu          // (c) 1990 (FD1094)
46864696sdib            // (c) 1987 (FD1089A)
46874697sdibl           // (c) 1987 bootleg
4688sdibl2         // bootleg
4689sdibl3         // bootleg
4690sdibl4         // bootleg
4691sdibl5         // bootleg
4692sdibl6         // bootleg
4698sdibl2          // bootleg
4699sdibl3          // bootleg
4700sdibl4          // bootleg
4701sdibl5          // bootleg
4702sdibl6          // bootleg
46934703defense         // (c) 1987 (FD1094)
46944704shinobi5        // (c) 1987 (Unprotected)
46954705shinobi4        // (c) 1987 (MC-8123B)
r249940r249941
48794889toutrunjd       // bootleg
48804890toutrun3d       // bootleg
48814891toutrunj1d      // bootleg
4882toutrun2d      // bootleg
4892toutrun2d       // bootleg
48834893shangon3d       // bootleg
48844894
48854895// X Board
r249940r249941
53365346tfrceacb        // bootleg
53375347twinsqua        // (c) 1991 Sega
53385348soniccar        // (c) 1991 Sega
5349sonicpop
53395350ribbit          // (c) 1991 Sega
53405351tantr           // (c) 1992 Sega
53415352tantrkor        // (c) 1992 Sega
r249940r249941
66246635mogura          // GX141 (c) 1991
66256636wecleman        // GX602 (c) 1986
66266637weclemana       // GX602?(c) 1988
6627weclemanb      // GX602 (c) 1986
6638weclemanb       // GX602 (c) 1986
66286639hotchase        // GX763 (c) 1988
66296640hotchasea
66306641chqflag         // GX717 (c) 1988
r249940r249941
90769087// Gaelco 2D games
90779088mastboy         // (c) 1987 - No Ref on the PCB
90789089mastboyi        // (c) 1987 - No Ref on the PCB
9079mastboyia      // (c) 1987 - No Ref on the PCB
9090mastboyia       // (c) 1987 - No Ref on the PCB
90809091xorworld        // (c) 1990 - prototype
90819092bigkarnk        // (c) 1991 - Ref 901112-1
90829093// Master Boy 2 // (c) 1991 - Ref ???
r249940r249941
97189729garogun         // (c) 2000 Yun Sung
971997307ordi           // (c) 2002 Yun Sung
97209731wondstck        // (c) ???? Yun Sung
9721wondstcka      // (c) ???? Yun Sung
9732wondstcka       // (c) ???? Yun Sung
97229733
97239734// Zilec games
97249735blueprnt        // (c) 1982 Bally Midway (Zilec in ROM 3U, and the programmer names)
r249940r249941
99679978tdoboon         // (c) 2000 Sammy
99689979haekaka         // (c) 2001 Sammy
99699980
9970// IGS games ( www.igs.com.tw
9981// IGS games (www.igs.com.tw)
99719982goldstar        // (c) 198? IGS
99729983goldstbl        // (c) 198? IGS
99739984moonlght        // bootleg
r249940r249941
1017610187svgtw
1017710188svgpcb          //
1017810189ket             // (c) 2002 Ketsui
10190ket1            //
1017910191keta            //
1018010192ketb            //
10193ketarr          // hack
10194ketarr151       // hack
10195ketarr15        // hack
10196ketarr10        // hack
10197ketarrs151      // hack
10198ketarrs15       // hack
10199ketarrf         // hack
1018110200ddpdoj          // (c) 2002 DoDonPachi Dai-Ou-Jou
1018210201ddpdoja         //
1018310202ddpdojb         //
r249940r249941
1117011189xplan           // (c) 2006 Subsino
1117111190
1117211191sliver          // (c) 1996 Hollow Corp
11173slivera         //
11192slivera         //
1117411193intrscti        // ????
1117511194pasha2          // (c) 1998 Dong Sung
1117611195trvmadns        // (c) 1985 Thunderhead Inc.
r249940r249941
1199612015cmast91         // (c) 1991 Dyna Electronics
1199712016cmast92         // (c) 1992 Dyna Electronics
1199812017cmast97         // (c) 1996 Dyna Electronics
12018cmast99         // 1999?
1199912019
1200012020tonypok         // (c) 1991 Corsica
1200112021jkrmast         // (c) 199? unknown
r249940r249941
1205612076dolphntr        // (c) 1996
1205712077dolphtra        // (c) 1996
1205812078dolphtre        // (c) 1996
12079cashcham        // (c) 1996
1205912080goldprmd        // (c) 1997
1206012081qotn            // (c) 1997
12082qotna           // (c) 1997
1206112083dmdtouch        // (c) 1997
12084wldcougr        // (c) 1997
12085bumblbug        // (c) 1997
1206212086pengpays        // (c) 1997
1206312087adonis          // (c) 1998
1206412088adonisa         // (c) 1998
1206512089reelrock        // (c) 1998
1206612090indiandr        // (c) 1998
12091chariotc        // (c) 1998
12092wtiger          // (c) 1999
12093bootsctn        // (c) 1999
1206712094cuckoo          // (c) 2000
1206812095magicmsk        // (c) 2000
1206912096magicmska       // (c) 2000
1207012097margmgc         // (c) 2000
1207112098geishanz        // (c) 2001
12072wtiger          // (c) 2001
12099adonise         // (c) 2001
1207312100partygrs        // (c) 2001
1207412101
1207512102// Aristocrat Mk6 hardware
r249940r249941
1318613213kas89           // 1989, SFC S.R.L.
1318713214caspoker        // 1987, PM / Beck Elektronik.
1318813215wildpkr         // 199?, TAB Austria.
13216subhuntr        // 1979 Model Racing
1318913217
1319013218manohman        // 199?, Merkur.
1319113219
trunk/src/mame/audio/hng64.c
r249940r249941
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
r249940r249941
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"
2122#include "bus/vcs/scharger.h"
2223#include "bus/vcs/compumat.h"
2324#include "bus/vcs_ctrl/ctrl.h"
r249940r249941
389390      case A26_X07:
390391         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));
391392         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;
394397   }
395398
396399   /* Banks may have changed, reset the cpu so it uses the correct reset vector */
r249940r249941
525528   SLOT_INTERFACE_INTERNAL("a26_8in1",  A26_ROM_8IN1)
526529   SLOT_INTERFACE_INTERNAL("a26_32in1", A26_ROM_32IN1)
527530   SLOT_INTERFACE_INTERNAL("a26_x07",    A26_ROM_X07)
531   SLOT_INTERFACE_INTERNAL("a26_dpcplus",   A26_ROM_DPCPLUS)
528532SLOT_INTERFACE_END
529533
530534static MACHINE_CONFIG_FRAGMENT(a2600_cartslot)
trunk/src/mame/drivers/amstrad.c
r249940r249941
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)
817818SLOT_INTERFACE_END
818819
819820SLOT_INTERFACE_START(cpc_exp_cards)
r249940r249941
830831   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
831832   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
832833   SLOT_INTERFACE("hd20", CPC_HD20)
834   SLOT_INTERFACE("doubler", CPC_DOUBLER)
833835SLOT_INTERFACE_END
834836
835837SLOT_INTERFACE_START(cpcplus_exp_cards)
r249940r249941
844846   SLOT_INTERFACE("playcity", CPC_PLAYCITY)
845847   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
846848   SLOT_INTERFACE("hd20", CPC_HD20)
849   SLOT_INTERFACE("doubler", CPC_DOUBLER)
847850SLOT_INTERFACE_END
848851
849852SLOT_INTERFACE_START(aleste_exp_cards)
r249940r249941
860863   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
861864   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
862865   SLOT_INTERFACE("hd20", CPC_HD20)
866   SLOT_INTERFACE("doubler", CPC_DOUBLER)
863867   SLOT_INTERFACE("magicsound", AL_MAGICSOUND)
864868SLOT_INTERFACE_END
865869
trunk/src/mame/drivers/apple2e.c
r249940r249941
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
r249940r249941
11// license:BSD-3-Clause
2// copyright-holders:David Haywood, Palindrome
2// copyright-holders:David Haywood, Palindrome, Roberto Fresca
33/****************************************************************************************************************
44
55    Aristocrat MK5 / MKV hardware
r249940r249941
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
r249940r249941
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
r249940r249941
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
715734ROM_START( swthrt2v )
716735   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
717736   ROM_LOAD32_WORD( "01j01986.u7",  0x000000, 0x80000, CRC(f51b2faa) SHA1(dbcfdbee92af5f89a8a2611bbc687ee0cc907642) )
r249940r249941
796815
797816   ROM_REGION( 0x100, "eeproms", 0 )
798817   ROM_LOAD( "st93c46.u27", 0x0000, 0x0080, CRC(115c305a) SHA1(684a70d74ec92564e17c4292cd357e603842c485) )
799   ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) )   // blank... all 0xff's
818   ROM_LOAD( "st93c46.u26", 0x0080, 0x0080, CRC(652d544c) SHA1(cd5bd20e9a0f22d7367cc169e2844a02751c7c91) ) // blank... all 0xff's
800819
801820   ROM_REGION( 0x0005, "plds", 0 )
802821   ROM_LOAD( "gal20v8b.u22", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */
r249940r249941
806825   ROM_LOAD( "gal20v8b.u65", 0x0000, 0x0001, NO_DUMP ) /* 28-Lead PLCC package. Unable to read */
807826ROM_END
808827
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
809845ROM_START( wtiger )
810846   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
811847   ROM_LOAD32_WORD( "0200954v.u7",  0x000000, 0x80000, CRC(752e54c5) SHA1(9317544a7cf2d9bf29347d31fe72331fc3d018ef) )
r249940r249941
888924   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
889925ROM_END
890926
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
891945ROM_START( goldprmd )
892946   ARISTOCRAT_MK5_BIOS
893947   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
r249940r249941
903957   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
904958ROM_END
905959
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
906997// 586/7(b) - 10 Credit Multiplier / 9 Line Multiline.
907// Penguin Pays - Export B - 14/07/97.       
998// Penguin Pays - Export B - 14/07/97.
908999// All devices are 27c4002 instead of 27c4096.
9091000ROM_START( pengpays )
9101001   ARISTOCRAT_MK5_BIOS
r249940r249941
9211012   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
9221013ROM_END
9231014
924// MV4104  3,5,10,20,25,50 Credit Multiplier / 9-20 Line Multiline.
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.
9251038// CUCKOO - Export C - 02/02/00.
9261039// All devices are 27c4002 instead of 27c4096.
9271040ROM_START( cuckoo )
9281041   ARISTOCRAT_MK5_BIOS
9291042   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
930   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) )   //
1043   ROM_LOAD32_WORD( "mv4104_cuckoo.u7",  0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) ) //
9311044   ROM_LOAD32_WORD( "mv4104_cuckoo.u11", 0x000002, 0x80000, CRC(4c407deb) SHA1(57589e61a376ddff99cd420eb47bf8c902c6a249) )
9321045   ROM_LOAD32_WORD( "mv4104_cuckoo.u8",  0x100000, 0x80000, CRC(33f52052) SHA1(89cbfe588d91244adff4c520fa94962d69ff20bf) )
9331046   ROM_LOAD32_WORD( "mv4104_cuckoo.u12", 0x100002, 0x80000, CRC(00bb7597) SHA1(f4d6b21091e320a82d59477469340633b001ed0d) )
r249940r249941
9401053ROM_END
9411054
9421055// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
943// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1056// Magic Mask [Reel Game] - Export A - 09/05/2000.
9441057ROM_START( magicmsk )
9451058   ARISTOCRAT_MK5_BIOS
9461059   ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF )
r249940r249941
9571070ROM_END
9581071
9591072// MV4115 - 5,10,20 Credit Multiplier / 9 Line Multiline.
960// Magic Mask [Reel Game] - Export A - 09/05/2000.   
1073// Magic Mask [Reel Game] - Export A - 09/05/2000.
9611074// Alternate set with identical description, but way different
9621075// than the parent. All devices are 27c4002 instead of 27c4096.
9631076//
r249940r249941
9821095   ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 )
9831096ROM_END
9841097
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
9851116// MV4115/6 - 9/20 Line Multiline Multiplier.
9861117// Party Gras [Reel Game] - Export A - 10/11/2001.
9871118// All devices are 27c4002 instead of 27c4096.
r249940r249941
10151146GAME( 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
10161147GAME( 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
10171148GAME( 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
10181150GAME( 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
10191151GAME( 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
10201154GAME( 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
10211156GAME( 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
10221157GAME( 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
10231158GAME( 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
10241159GAME( 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
10251160GAME( 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
10261162GAME( 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
10271164GAME( 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
10281165GAME( 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
10291166GAME( 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
10301167GAME( 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
10311168GAME( 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
10321170GAME( 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
r249940r249941
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_KEYBOARD) // None!
742   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED)
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
r249940r249941
12051205
12061206
12071207static MACHINE_CONFIG_DERIVED( bbcmet, bbcm )
1208   /* sound hardware */
1209   MCFG_DEVICE_REMOVE("mono")
1210   MCFG_DEVICE_REMOVE("sn76489")
1211
12121208   /* printer */
12131209   MCFG_DEVICE_REMOVE("centronics")
12141210
r249940r249941
15031499   ROMX_LOAD("usmos10.rom",  0x40000, 0x4000, CRC(c8e946a9) SHA1(83d91d089dca092d2c8b7c3650ff8143c9069b89), ROM_BIOS(1))
15041500   ROMX_LOAD("usbasic3.rom", 0x3c000, 0x4000, CRC(161b9539) SHA1(b39014610a968789afd7695aa04d1277d874405c), ROM_BIOS(1)) /* rom page 15 3c000 */
15051501
1506   ROM_LOAD("viewa210.rom", 0x30000, 0x2e50, CRC(0abd418b) SHA1(e23e5bbc59339cbda87e8dafa8d80116378ac305)) /* Valid size? */
1502   ROM_LOAD("viewa210.rom", 0x30000, 0x4000, CRC(4345359f) SHA1(88c93df1854f5fbe6cd6e5f0e29a8bf4ea3b5614))
15071503   ROM_LOAD("usdnfs10.rom", 0x38000, 0x4000, CRC(7e367e8c) SHA1(161f585dc45665ea77433c84afd2f95049f7f5a0))
15081504
15091505   ROM_REGION(0x4000, "os", 0)
r249940r249941
19411937COMP ( 1986, bbcm,     0,        bbcb,  bbcm,     bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master 128",                MACHINE_IMPERFECT_GRAPHICS)
19421938COMP ( 1986, bbcmt,    bbcm,     0,     bbcmt,    bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master Turbo",              MACHINE_NOT_WORKING)
19431939COMP ( 1986, bbcmaiv,  bbcm,     0,     bbcmaiv,  bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master AIV",                MACHINE_NOT_WORKING)
1944COMP ( 1986, bbcmet,   bbcm,     0,     bbcmet,   bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master ET",                 MACHINE_NO_SOUND | MACHINE_IMPERFECT_GRAPHICS)
1940COMP ( 1986, bbcmet,   bbcm,     0,     bbcmet,   bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master ET",                 MACHINE_IMPERFECT_GRAPHICS)
19451941COMP ( 1986, bbcm512,  bbcm,     0,     bbcm512,  bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master 512",                MACHINE_NOT_WORKING)
19461942COMP ( 1986, bbcmarm,  bbcm,     0,     bbcmarm,  bbcm,  bbc_state,   bbc,     "Acorn",    "ARM Evaluation System",         MACHINE_NOT_WORKING)
19471943COMP ( 1986, bbcmc,    0,        bbcm,  bbcmc,    bbcm,  bbc_state,   bbc,     "Acorn",    "BBC Master Compact",            MACHINE_IMPERFECT_GRAPHICS)
trunk/src/mame/drivers/beathead.c
r249940r249941
120120   int scanline = param;
121121
122122   /* update the video */
123   m_screen->update_now();
123//  m_screen->update_now();
124   m_screen->update_partial(m_screen->vpos());
124125
125126   /* on scanline zero, clear any halt condition */
126127   if (scanline == 0)
trunk/src/mame/drivers/bublbobl.c
r249940r249941
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
269274***************************************************************************/
270275
271276#include "emu.h"
r249940r249941
556561   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
557562INPUT_PORTS_END
558563
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
559577static INPUT_PORTS_START( sboblboblb )
560578   PORT_INCLUDE( boblbobl )
561579
r249940r249941
13591377   ROM_LOAD( "pal16l8.u4",  0x0400, 0x0104, CRC(077d20a8) SHA1(8e568ffd6f66c3dd61708dd0f3be9c2ed488ae4b) )
13601378ROM_END
13611379
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
13621418ROM_START( sboblbobl )
13631419   ROM_REGION( 0x30000, "maincpu", 0 )
13641420   ROM_LOAD( "cpu2-3.bin",   0x00000, 0x08000, CRC(2d9107b6) SHA1(ab1a4a20f4b533cd06cc458668f407a8a14c9d70) )
r249940r249941
14591515
14601516
14611517
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
14621553ROM_START( bub68705 )
14631554   ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */
14641555   ROM_LOAD( "2.bin",    0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) )
r249940r249941
15261617ROM_END
15271618
15281619
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) )
15291624
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
15301793/*************************************
15311794 *
15321795 *  Driver initialization
r249940r249941
15981861GAME( 1986, sboblbobl,  bublbobl, boblbobl, sboblbobl,  bublbobl_state, bublbobl, ROT0,  "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
15991862GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
16001863GAME( 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
16011865GAME( 1986, bub68705,   bublbobl, bub68705, bublbobl,   bublbobl_state, bublbobl, ROT0,  "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
16021866
16031867GAME( 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
r249940r249941
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;
r249940r249941
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 ))
r249940r249941
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 ))
r249940r249941
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")
r249940r249941
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 ))
r249940r249941
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
r249940r249941
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 )
r249940r249941
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
r249940r249941
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   }
r249940r249941
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;
r249940r249941
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;
r249940r249941
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
r249940r249941
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   }
r249940r249941
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)
r249940r249941
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         {
r249940r249941
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   }
r249940r249941
789789// zero-cross detection
790790TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
791791{
792
793792/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
794793
795   -+                          +---+
794    -+                          +---+
796795     |                          |   |
797796     |<-------- 9.30ms -------->|<->|700us
798797     |                          |   |
799    +--------------------------+   +-----
798    +--------------------------+   +-----
800799*/
801800
802801   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249940r249941
825824// 555 timer for display refresh
826825TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer )
827826{
828
829827/*   +--------------------------+   +-----
830828     |                          |   |
831829     |<-------- 2.85ms -------->|<->|300us
r249940r249941
851849
852850DRIVER_INIT_MEMBER( by17_state, by17 )
853851{
854
855852   static const UINT8 solenoid_features_default[20][4] =
856853   {
857854   // This table serves two functions and is configured on a per game basis:
r249940r249941
860857
861858   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
862859   /*00*/  { 0x00, 0x00,  0x00, 0x00 },
863   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
864   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
865   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
866   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
867   /*05*/  { 0x04, 0x00,  0x00, 0x00 },      // Knocker
868   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
860   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
861   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
862   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
863   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
864   /*05*/  { 0x04, 0x00,  0x00, 0x00 },        // Knocker
865   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
869866   /*07*/  { 0x00, 0x00,  0x00, 0x00 },
870867   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
871868   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249940r249941
874871   /*12*/  { 0x00, 0x00,  0x00, 0x00 },
875872   /*13*/  { 0x02, 0x00,  0x00, 0x00 },
876873   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
877   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
874   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
878875   //  { Sound Channel, Sound engage, Sound release, Not Used }
879876   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
880   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
881   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
877   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
878   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
882879   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
883880   };
884881
r249940r249941
892889
893890DRIVER_INIT_MEMBER( by17_state, matahari )
894891{
895
896892   static const UINT8 solenoid_features_matahari[20][4] =
897893   {
898894   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
899   /*00*/  { 0x02, 0x05,  0x03, 0x7f },      // Saucer
900   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
901   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
902   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
903   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
904   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
905   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
906   /*07*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left Bottom
907   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left Top
908   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right Top
909   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right Bottom
910   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
911   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },      // Drop Target Reset Left
912   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
913   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },      // Drop Target Reset Right
914   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
895   /*00*/  { 0x02, 0x05,  0x03, 0x7f },        // Saucer
896   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
897   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
898   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
899   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
900   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
901   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
902   /*07*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left Bottom
903   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left Top
904   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right Top
905   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right Bottom
906   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
907   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },        // Drop Target Reset Left
908   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
909   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },        // Drop Target Reset Right
910   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
915911   //  { Sound Channel, Sound engage, Sound release, Not Used }
916912   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
917   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
918   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
913   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
914   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
919915   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
920916   };
921917
r249940r249941
929925
930926DRIVER_INIT_MEMBER( by17_state, pwerplay )
931927{
932
933928   static const UINT8 solenoid_features_pwerplay[20][4] =
934929   {
935930   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
936   /*00*/  { 0x00, 0x10,  0x00, 0x00 },      // Post Down
937   /*01*/  { 0x05, 0x01,  0x00, 0x00 },      // Chime 10
938   /*02*/  { 0x05, 0x02,  0x00, 0x00 },      // Chime 100
939   /*03*/  { 0x05, 0x03,  0x00, 0x00 },      // Chime 1000
940   /*04*/  { 0x05, 0x04,  0x00, 0x00 },      // Chime 10000
941   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
942   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
943   /*07*/  { 0x02, 0x05,  0x03, 0x7f },      // Saucer
944   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left
945   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right
946   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Bottom
947   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
948   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },      // Drop Target Reset Left
949   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
950   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },      // Drop Target Reset Right
951   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
931   /*00*/  { 0x00, 0x10,  0x00, 0x00 },        // Post Down
932   /*01*/  { 0x05, 0x01,  0x00, 0x00 },        // Chime 10
933   /*02*/  { 0x05, 0x02,  0x00, 0x00 },        // Chime 100
934   /*03*/  { 0x05, 0x03,  0x00, 0x00 },        // Chime 1000
935   /*04*/  { 0x05, 0x04,  0x00, 0x00 },        // Chime 10000
936   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
937   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
938   /*07*/  { 0x02, 0x05,  0x03, 0x7f },        // Saucer
939   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left
940   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right
941   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Bottom
942   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
943   /*12*/  { 0x00, 0x0b,  0x02, 0x0f },        // Drop Target Reset Left
944   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
945   /*14*/  { 0x03, 0x0b,  0x02, 0xf0 },        // Drop Target Reset Right
946   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
952947   //  { Sound Channel, Sound engage, Sound release, Not Used }
953   /*16*/  { 0x00, 0x11, 0x0f,  0x00 },      // Post Up
954   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
955   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper Enable relay
948   /*16*/  { 0x00, 0x11, 0x0f,  0x00 },        // Post Up
949   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
950   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper Enable relay
956951   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
957952   };
958953
r249940r249941
977972   m_u11a = 0;
978973   m_u11b = 0;
979974   m_lamp_decode = 0x0f;
980   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
975   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
981976   m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = 0;
982977}
983978
r249940r249941
985980
986981static MACHINE_CONFIG_START( by17, by17_state )
987982   /* basic machine hardware */
988   MCFG_CPU_ADD("maincpu", M6800, 530000)   // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
983   MCFG_CPU_ADD("maincpu", M6800, 530000)  // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz
989984   MCFG_CPU_PROGRAM_MAP(by17_map)
990985
991986   MCFG_MACHINE_RESET_OVERRIDE( by17_state, by17 )
992987
993   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
988   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
994989
995990   /* Video */
996991   MCFG_DEFAULT_LAYOUT(layout_by17)
trunk/src/mame/drivers/by35.c
r249940r249941
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)
r249940r249941
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")
r249940r249941
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 ))
r249940r249941
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 ))
r249940r249941
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")
r249940r249941
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 ))
r249940r249941
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
r249940r249941
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")
r249940r249941
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)
r249940r249941
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   }
r249940r249941
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;
r249940r249941
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;
r249940r249941
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;
r249940r249941
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
r249940r249941
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   }
r249940r249941
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)
r249940r249941
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         {
r249940r249941
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   }
r249940r249941
803803// zero-cross detection
804804TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
805805{
806
807806/*  Zero Crossing Detector - this timing is based on 50Hz AC line power input converted to unregulated DC
808807
809   -+                          +---+
808    -+                          +---+
810809     |                          |   |
811810     |<-------- 9.30ms -------->|<->|700us
812811     |                          |   |
813    +--------------------------+   +-----
812    +--------------------------+   +-----
814813*/
815814
816815   timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
r249940r249941
839838// 555 timer for display refresh
840839TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer )
841840{
842
843841/*   +--------------------------+   +-----
844842     |                          |   |
845843     |<-------- 2.85ms -------->|<->|300us
r249940r249941
875873      m_discrete->write(space, NODE_04, ((m_snd_div & 0x04)>>2) * 1);
876874      m_discrete->write(space, NODE_01, ((m_snd_div & 0x01)>>0) * 1);
877875
878//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
876//      if (m_snd_sel == 0x01) logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
879877   }
880878}
881879
r249940r249941
887885   if ((m_u11a & 0x02) == 0) offs |= 0x10;
888886   {
889887      m_snd_sel = m_snd_prom[offs];
890//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
888//      logerror("SndSel read %02x from PROM addr %02x\n",m_snd_sel, offs );
891889      m_snd_sel = BITSWAP8(m_snd_sel,0,1,2,3,4,5,6,7);
892890
893891      m_snd_tone_gen = m_snd_sel;
894//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
892//      logerror("SndSel=%02x, Tone=%02x, Div=%02x\n",m_snd_sel, m_snd_tone_gen, m_snd_div);
895893   }
896894
897895   m_discrete->write(space, NODE_08, 0);
r249940r249941
905903
906904DRIVER_INIT_MEMBER( by35_state, by35_6 )
907905{
908
909906   static const UINT8 solenoid_features_default[20][4] =
910907   {
911908   // This table serves two functions and is configured on a per game basis:
r249940r249941
918915   /*02*/  { 0x00, 0x00,  0x00, 0x00 },
919916   /*03*/  { 0x00, 0x00,  0x00, 0x00 },
920917   /*04*/  { 0x00, 0x00,  0x00, 0x00 },
921   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
922   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
918   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
919   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
923920   /*07*/  { 0x00, 0x0a,  0x00, 0x00 },
924921   /*08*/  { 0x02, 0x00,  0x00, 0x00 },
925922   /*09*/  { 0x02, 0x00,  0x00, 0x00 },
r249940r249941
928925   /*12*/  { 0x00, 0x0b,  0x00, 0x00 },
929926   /*13*/  { 0x02, 0x07,  0x00, 0x00 },
930927   /*14*/  { 0x00, 0x00,  0x00, 0x00 },
931   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
928   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
932929   //  { Sound Channel, Sound engage, Sound release, Not Used }
933930   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
934   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
935   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
931   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
932   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
936933   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
937934   };
938935
r249940r249941
949946
950947DRIVER_INIT_MEMBER( by35_state, playboy )
951948{
952
953949   static const UINT8 solenoid_features_playboy[20][4] =
954950   {
955951   //  { Sound Channel, Sound Sample, Switch Strobe, Switch Return Mask }
r249940r249941
958954   /*02*/  { 0xff, 0xff,  0x00, 0x00 },
959955   /*03*/  { 0xff, 0xff,  0x00, 0x00 },
960956   /*04*/  { 0xff, 0xff,  0x00, 0x00 },
961   /*05*/  { 0x04, 0x06,  0x00, 0x00 },      // Knocker
962   /*06*/  { 0x01, 0x09,  0x00, 0x7f },      // Outhole
963   /*07*/  { 0x02, 0x0a,  0x03, 0x7f },      // Kickback Grotto
964   /*08*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Left
965   /*09*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Right
966   /*10*/  { 0x02, 0x00,  0x00, 0x00 },      // Pop Bumper Bottom
967   /*11*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Left
968   /*12*/  { 0x03, 0x0b,  0x00, 0xe0 },      // Drop Target Reset
969   /*13*/  { 0x02, 0x07,  0x00, 0x00 },      // Slingshot Right
957   /*05*/  { 0x04, 0x06,  0x00, 0x00 },        // Knocker
958   /*06*/  { 0x01, 0x09,  0x00, 0x7f },        // Outhole
959   /*07*/  { 0x02, 0x0a,  0x03, 0x7f },        // Kickback Grotto
960   /*08*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Left
961   /*09*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Right
962   /*10*/  { 0x02, 0x00,  0x00, 0x00 },        // Pop Bumper Bottom
963   /*11*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Left
964   /*12*/  { 0x03, 0x0b,  0x00, 0xe0 },        // Drop Target Reset
965   /*13*/  { 0x02, 0x07,  0x00, 0x00 },        // Slingshot Right
970966   /*14*/  { 0xff, 0xff,  0x00, 0x00 },
971   /*15*/  { 0xff, 0xff,  0x00, 0x00 },      // None - all momentary solenoids off
967   /*15*/  { 0xff, 0xff,  0x00, 0x00 },        // None - all momentary solenoids off
972968   //  { Sound Channel, Sound engage, Sound release, Not Used }
973969   /*16*/  { 0xff, 0xff, 0xff,  0x00 },
974   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },      // Coin Lockout coil
975   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },      // Flipper enable relay
970   /*17*/  { 0x00, 0x0c, 0x0d,  0x00 },        // Coin Lockout coil
971   /*18*/  { 0x00, 0x0e, 0x0f,  0x00 },        // Flipper enable relay
976972   /*19*/  { 0xff, 0xff, 0xff,  0x00 }
977973   };
978974
r249940r249941
10091005   m_u11a = 0;
10101006   m_u11b = 0;
10111007   m_lamp_decode = 0x0f;
1012   m_io_hold_x[0] = 0x80;   // Put ball in Outhole on startup
1008   m_io_hold_x[0] = 0x80;  // Put ball in Outhole on startup
10131009   m_io_hold_x[1] = m_io_hold_x[2] = m_io_hold_x[3] = m_io_hold_x[4] = m_io_hold_x[5] = 0;
10141010}
10151011
r249940r249941
10261022      {0, 0, 0, 0},                                 /* r_node */
10271023      {0, 0},                                       /* c{} */
10281024      0,                                            /* rI  */
1029//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
1025//      RES_VOLTAGE_DIVIDER(RES_K(10), RES_R(360)),   /* rF  */
10301026      RES_K(10),                                    /* rF  */   // not really
10311027      CAP_U(0.01),                                  /* cF  */
10321028      0,                                            /* cAmp */
r249940r249941
10481044
10491045static DISCRETE_SOUND_START(as2888)
10501046
1051   DISCRETE_INPUT_DATA(NODE_08)      // Start Sustain Attenuation from 555 circuit
1052   DISCRETE_INPUT_LOGIC(NODE_01)      // Binary Counter B output (divide by 1) T2
1053   DISCRETE_INPUT_LOGIC(NODE_04)      // Binary Counter D output (divide by 4) T3
1047   DISCRETE_INPUT_DATA(NODE_08)        // Start Sustain Attenuation from 555 circuit
1048   DISCRETE_INPUT_LOGIC(NODE_01)       // Binary Counter B output (divide by 1) T2
1049   DISCRETE_INPUT_LOGIC(NODE_04)       // Binary Counter D output (divide by 4) T3
10541050
1055   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1)   // 2
1051   DISCRETE_DIVIDE(NODE_11, 1, NODE_01, 1) // 2
10561052   DISCRETE_DIVIDE(NODE_14, 1, NODE_04, 1)
10571053
10581054
1059   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
1055   DISCRETE_RCFILTER(NODE_06, NODE_14, RES_K(15), CAP_U(0.1))      // T4 filter
10601056#if 0
1061   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))      // T1 filter
1057   DISCRETE_RCFILTER(NODE_05, NODE_11, RES_K(33), CAP_U(0.01))     // T1 filter
10621058   DISCRETE_ADDER2(NODE_07, 1, NODE_05, NODE_06)
10631059#else
10641060
1065   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
1061   DISCRETE_MIXER2(NODE_07, 1, NODE_11, NODE_06, &as2888_digital_mixer_info)   // Mix and filter T1 and T4 together
10661062#endif
10671063   DISCRETE_RCDISC5(NODE_87, 1, NODE_08, RES_K(150), CAP_U(1.0))
10681064
10691065   DISCRETE_RCFILTER_VREF(NODE_88,NODE_87,RES_M(1),CAP_U(0.01),2)
1070   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)   // Apply sustain
1066   DISCRETE_MULTIPLY(NODE_09, NODE_07, NODE_88)    // Apply sustain
10711067
10721068   DISCRETE_OP_AMP_FILTER(NODE_20, 1, NODE_09, 0, DISC_OP_AMP_FILTER_IS_HIGH_PASS_1, &as2888_preamp_info)
10731069
1074   DISCRETE_CRFILTER(NODE_25, NODE_20, RES_M(100), CAP_U(0.05))   // Resistor is fake. Capacitor in series between pre-amp and output amp.
1070   DISCRETE_CRFILTER(NODE_25, NODE_20, RES_M(100), CAP_U(0.05))    // Resistor is fake. Capacitor in series between pre-amp and output amp.
10751071
1076   DISCRETE_GAIN(NODE_30, NODE_25, 50)   // Output amplifier LM380 fixed inbuilt gain of 50
1072   DISCRETE_GAIN(NODE_30, NODE_25, 50) // Output amplifier LM380 fixed inbuilt gain of 50
10771073
10781074   DISCRETE_OUTPUT(NODE_30, 10000000)  //  17000000
10791075DISCRETE_SOUND_END
r249940r249941
10871083
10881084   MCFG_MACHINE_RESET_OVERRIDE( by35_state, by35 )
10891085
1090   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
1086   MCFG_NVRAM_ADD_0FILL("nvram")   // 'F' filled causes Credit Display to be blank on first startup
10911087
10921088   /* Video */
10931089   MCFG_DEFAULT_LAYOUT(layout_by35)
r249940r249941
21272123/ 301/Bulls Eye
21282124/-------------------------------*/
21292125ROM_START(bullseye)
2130   ROM_REGION(0x8000, "maincpu", 0)   // Actually seems to have an address mask of 0x3fff
2126   ROM_REGION(0x8000, "maincpu", 0)    // Actually seems to have an address mask of 0x3fff
21312127   ROM_LOAD("bull.u2", 0x2000, 0x1000, CRC(a2951aa2) SHA1(f9c0826c5d1d6d904286678ed90de3850a13b5f4))
21322128   ROM_LOAD("bull.u6", 0x3000, 0x1000, CRC(64d4b9c4) SHA1(bf4d0671372fd3a445c4c7330b9849171ca8048c))
21332129   ROM_RELOAD( 0x7000, 0x1000)
trunk/src/mame/drivers/cardline.c
r249940r249941
139139{
140140   /* update any video up to the current scanline */
141141   m_hsync_q = (state ? 0x00 : 0x10);
142   m_screen->update_now();
142//  m_screen->update_now();
143   m_screen->update_partial(m_screen->vpos());
143144}
144145
145146WRITE_LINE_MEMBER(cardline_state::vsync_changed)
trunk/src/mame/drivers/cave.c
r249940r249941
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
8675***************************************************************************/
8776
8877#include "emu.h"
r249940r249941
31623151ROM_END
31633152
31643153
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
31653182/***************************************************************************
31663183
31673184                                Donpachi
r249940r249941
50435060
50445061GAME( 1997, ddonpach,   0,        ddonpach, cave, cave_state,     ddonpach, ROT270, "Cave (Atlus license)",                   "DoDonPachi (International, Master Ver. 97/02/05)", MACHINE_SUPPORTS_SAVE )
50455062GAME( 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 )
50465065
5066
50475067GAME( 1998, dfeveron,   feversos, dfeveron, cave, cave_state,     dfeveron, ROT270, "Cave (Nihon System license)",            "Dangun Feveron (Japan, Ver. 98/09/17)",    MACHINE_SUPPORTS_SAVE )
50485068GAME( 1998, feversos,   0,        dfeveron, cave, cave_state,     feversos, ROT270, "Cave (Nihon System license)",            "Fever SOS (International, Ver. 98/09/25)", MACHINE_SUPPORTS_SAVE )
50495069
trunk/src/mame/drivers/champbas.c
r249940r249941
40407001      8910 control
41418ff0-8fff sprites
4242a000      ?
43a006      MCU HALT controll
43a006      MCU HALT control
4444a007      NOP (MCU shared RAM switch)
4545a060-a06f sprites
4646a080      command for the sound CPU
r249940r249941
8686#include "emu.h"
8787#include "cpu/z80/z80.h"
8888#include "cpu/alph8201/alph8201.h"
89//#include "cpu/hmcs40/hmcs40.h"
8990#include "sound/ay8910.h"
9091#include "sound/dac.h"
9192#include "includes/champbas.h"
r249940r249941
567568
568569/*************************************
569570 *
570 *  Machine driver
571 *  Machine drivers
571572 *
572573 *************************************/
573574
r249940r249941
581582MACHINE_START_MEMBER(champbas_state,exctsccr)
582583{
583584   // FIXME
585   // I dun wanna
584586   machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */
585587
586588   MACHINE_START_CALL_MEMBER(champbas);
r249940r249941
595597
596598INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq)
597599{
598   if(m_irq_mask)
600   if (m_irq_mask)
599601      device.execute().set_input_line(0, ASSERT_LINE);
600602}
601603
r249940r249941
608610   MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state,  vblank_irq)
609611
610612   /* MCU */
611   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8)
613   MCFG_CPU_ADD("mcu", ALPHA8201, XTAL_18_432MHz/6/8)
612614   MCFG_CPU_PROGRAM_MAP(mcu_map)
613615
614616   MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
r249940r249941
681683   /* basic machine hardware */
682684
683685   /* MCU */
684   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8201, XTAL_18_432MHz/6/8)
686   MCFG_CPU_ADD("mcu", ALPHA8201, XTAL_18_432MHz/6/8)
685687   MCFG_CPU_PROGRAM_MAP(mcu_map)
686688
687689   /* to MCU timeout champbbj */
r249940r249941
702704   MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse,  4000) /* 4 kHz, updates the dac */
703705
704706   /* MCU */
705   MCFG_CPU_ADD(CPUTAG_MCU, ALPHA8301, XTAL_18_432MHz/6/8)     /* Actually 8302 */
707   MCFG_CPU_ADD("mcu", ALPHA8301, XTAL_18_432MHz/6/8)     /* Actually 8302 */
706708   MCFG_CPU_PROGRAM_MAP(mcu_map)
707709
708710   MCFG_MACHINE_START_OVERRIDE(champbas_state,exctsccr)
trunk/src/mame/drivers/chicago.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
101101
102102WRITE16_MEMBER(cubeqst_state::palette_w)
103103{
104   m_screen->update_now();
104//  m_screen->update_now();
105   m_screen->update_partial(m_screen->vpos());
106
105107   COMBINE_DATA(&m_generic_paletteram_16[offset]);
106108}
107109
trunk/src/mame/drivers/dec0.c
r249940r249941
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
r249940r249941
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
21302158ROM_START( dkongf ) /* Donkey Kong Foundry (hack) from Jeff's Romhack */
21312159   ROM_REGION( 0x10000, "maincpu", 0 )
21322160   ROM_LOAD( "dk_f.5et",  0x0000, 0x1000, CRC(00b7efaf) SHA1(97ed5930eb5d0cb98a9008b1d329ba7f3b8b8dbf) )
r249940r249941
32953323GAME( 2004, dkongf,    dkong,    dkong2b,   dkongf,   driver_device, 0,        ROT90,  "hack (Jeff Kulczycki)", "Donkey Kong Foundry (hack)", MACHINE_SUPPORTS_SAVE ) /* from Jeff's Romhack */
32963324GAME( 2006, dkongx,    dkong,    braze,     dkongx,   dkong_state,   dkongx,   ROT90,  "hack (Braze Technologies)", "Donkey Kong II: Jumpman Returns (hack, V1.2)", MACHINE_SUPPORTS_SAVE )
32973325GAME( 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 )
32983327
32993328GAME( 1982, dkongjr,   0,        dkongjr,   dkongjr,  driver_device, 0,        ROT90,  "Nintendo of America", "Donkey Kong Junior (US set F-2)", MACHINE_SUPPORTS_SAVE )
33003329GAME( 1982, dkongjrj,  dkongjr,  dkongjr,   dkongjr,  driver_device, 0,        ROT90,  "Nintendo", "Donkey Kong Jr. (Japan)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/ec184x.c
r249940r249941
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
r249940r249941
4343
4444   required_device<cpu_device> m_maincpu;
4545
46   DECLARE_MACHINE_RESET(ec184x);
46   DECLARE_MACHINE_RESET(ec1841);
4747   DECLARE_DRIVER_INIT(ec1841);
4848
4949   struct {
r249940r249941
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, m_memory.boards, data ));
86   DBG_LOG(1,"ec1841_memboard",("R (%d of %d) == %02X\n", offset+1, m_memory.boards, data ));
8787
8888   return data;
8989}
r249940r249941
9696
9797   current = m_memory.enable[offset];
9898
99   DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset, m_memory.boards, data, current));
99   DBG_LOG(1,"ec1841_memboard",("W (%d of %d) <- %02X (%02X)\n", offset+1, m_memory.boards, data, current));
100100
101   if (offset > m_memory.boards) {
101   if (offset >= m_memory.boards) {
102102      return;
103103   }
104104
r249940r249941
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 - 1;
144   if (m_memory.boards > 3)
145      m_memory.boards = 3;
143   m_memory.boards = m_ram->size()/EC1841_MEMBOARD_SIZE;
144   if (m_memory.boards > 4)
145      m_memory.boards = 4;
146146
147147   // 640K configuration is special -- 512K board mapped at 0 + 128K board mapped at 512K
148148   // XXX verify this was actually the case
r249940r249941
157157   membank( "bank20" )->set_base( m_ram->pointer() );
158158}
159159
160MACHINE_RESET_MEMBER( ec184x_state, ec184x )
160MACHINE_RESET_MEMBER( ec184x_state, ec1841 )
161161{
162162   memset(m_memory.enable, 0, sizeof(m_memory.enable));
163163   // mark 1st board enabled
r249940r249941
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, ec184x)
258   MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec1841)
259259
260260   MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu")
261261   MCFG_DEVICE_INPUT_DEFAULTS(ec1841)
trunk/src/mame/drivers/electron.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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_cart")
526   MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100")
527527MACHINE_CONFIG_END
528528
529529
trunk/src/mame/drivers/firefox.c
r249940r249941
267267
268268TIMER_DEVICE_CALLBACK_MEMBER(firefox_state::video_timer_callback)
269269{
270   m_screen->update_now();
270//  m_screen->update_now();
271   m_screen->update_partial(m_screen->vpos());
271272
272273   m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE );
273274}
trunk/src/mame/drivers/galaxian.c
r249940r249941
52355235   // change spriteram base per each 64-line part of the screen
52365236   if ((split & 0x3f) == 0)
52375237   {
5238      m_screen->update_now();
5238//      m_screen->update_now();
5239      m_screen->update_partial(m_screen->vpos());
52395240      m_sprites_base = 0x40 | (split << 2 & 0x300);
52405241   }
52415242}
r249940r249941
53455346   /* alternate memory map */
53465347   MCFG_CPU_MODIFY("maincpu")
53475348   MCFG_CPU_PROGRAM_MAP(mooncrst_map_base)     /* no discrete sound ! */
5348   
5349
53495350   MCFG_CPU_MODIFY("audiocpu")
53505351   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, galaxian_state, froggermc_audiocpu_irq_ack)
53515352MACHINE_CONFIG_END
trunk/src/mame/drivers/galaxold.c
r249940r249941
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
r249940r249941
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 -
r249940r249941
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
r249940r249941
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
90369077ROM_START( chryangl )
90379078   ROM_REGION( 0x10000, "maincpu", 0 )
90389079   ROM_LOAD( "8.u6",  0x0000, 0x10000, CRC(331961e4) SHA1(50c7e0e983aed1f199f238442bb8fafce1849f84) )
r249940r249941
1327513316GAMEL( 1991, cmasterd,  cmaster,  cm,       cmasterb, cmaster_state,  cmv4,      ROT0, "Dyna",              "Cherry Master I (ver.1.01, set 5)",           0,                 layout_cmasterb )
1327613317GAMEL( 1991, cmastere,  cmaster,  cm,       cmasterb, cmaster_state,  cmv4,      ROT0, "Dyna",              "Cherry Master I (ver.1.01, set 6)",           0,                 layout_cmasterb )
1327713318GAMEL( 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 )
1327813320
1327913321
1328013322GAMEL( 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
r249940r249941
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
r249940r249941
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()
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
191191#include "emu.h"
192192#include "cdrom.h"
193193#include "cpu/powerpc/ppc.h"
194#include "imagedev/chd_cd.h"
194195
195
196196struct CDE_DMA
197197{
198198   UINT32 dst_addr;
r249940r249941
11871187
11881188   MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB("palette")
11891189
1190      /*cd-rom*/
1191   MCFG_CDROM_ADD( "cdrom" )
1192   MCFG_CDROM_INTERFACE("3do_m2_cdrom")
11901193
1194   MCFG_SOFTWARE_LIST_ADD("cd_list","3do_m2")
1195
11911196MACHINE_CONFIG_END
11921197
11931198
trunk/src/mame/drivers/lindbergh.c
r249940r249941
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
r249940r249941
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
r249940r249941
1313
1414      M72-B-D (bottom) / M72-A-C (middle) / M72-ROM-C (top)
1515
16     This is the original hardware used by R-type
16      This is the original hardware used by R-type
1717      Z80 program uploaded to RAM rather than having a ROM
1818      each of the 2 tile layers uses it's own set of ROMs.
19     Flip bits are with the tile num, so 0x3fff max tiles
20     per layer
19      Flip bits are with the tile num, so 0x3fff max tiles
20      per layer
2121
22     M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top)
22      M72-B-D (bottom) / M72-A-C (middle) / M72-C-A (top)
2323
24     This is used by all other M72 games, adds support
25     for an I8751 MCU and sample playback
24      This is used by all other M72 games, adds support
25      for an I8751 MCU and sample playback
2626
2727
2828M81 - 2 PCB Stack
2929
30     M81-A-B (top board) (seen on Dragon Breed)
31     CPUs, program roms etc.
30      M81-A-B (top board) (seen on Dragon Breed)
31      CPUs, program roms etc.
3232
33     M81-B-B (bottom board) (seen on Dragon Breed)
34     supports
35     8 sprite ROMS
36     4 tile roms for FG layer (A0-A3)
37      (Jumper J3 also allows them to be used for BG)
38     4 tile roms for BG layer (B0-B3)
33      M81-B-B (bottom board) (seen on Dragon Breed)
34      supports
35      8 sprite ROMS
36      4 tile roms for FG layer (A0-A3)
37       (Jumper J3 also allows them to be used for BG)
38      4 tile roms for BG layer (B0-B3)
3939
40     The Jumper at J3 seems to be an important difference
41     from M72, it allows both the FG and BG layers to
42     operate from a single set of ROMs.
43     W - use both sets of ROMs
44     S - use a single set of ROMs (A0-A3)
40      The Jumper at J3 seems to be an important difference
41      from M72, it allows both the FG and BG layers to
42      operate from a single set of ROMs.
43      W - use both sets of ROMs
44      S - use a single set of ROMs (A0-A3)
4545
4646
47     revised hardware, Z80 uses a ROM, no MCU, same video
47      revised hardware, Z80 uses a ROM, no MCU, same video
4848      system as M72 (some layer offsets - why?)
4949
5050
5151M82 - board made for Major Title, Z80 has a rom, no MCU
5252      has an extra sprite layer, rowscroll, and a larger
53     tilemap.  Tile data from both tile layers now comes
54     from a single set of ROMs, flip bits moved to 2nd
55     word meaning max of 0xffff tiles.
53      tilemap.  Tile data from both tile layers now comes
54      from a single set of ROMs, flip bits moved to 2nd
55      word meaning max of 0xffff tiles.
5656
57     * Some games were converted to run on this board,
58     leaving the extra sprite HW unused.
57      * Some games were converted to run on this board,
58      leaving the extra sprite HW unused.
5959
6060M84 -   2 PCB stack
6161        functionally same as M82 but without the extra sprite hw??
62     
63      M84-A-A (bottom board) (most games)
64      supports
65      4 program roms
66      8 tile roms
67      1 snd prg, 1 voice rom
68      CPUs and some customs etc.
6962
70      M84-D-B (bottom board) (found on lightning swords / kengo)
71      redesigned version of above but
72      for V35 CPU? (seems to lack the UPD71059C interrupt
73      controller which isn't needed when with the V35)
63        M84-A-A (bottom board) (most games)
64        supports
65        4 program roms
66        8 tile roms
67        1 snd prg, 1 voice rom
68        CPUs and some customs etc.
7469
75      M84-C-A (top board) (listed as for Hammering Harry)
76      4 sprite roms (in a row)
77      6 larger chips with detail removed
78      etc.
70        M84-D-B (bottom board) (found on lightning swords / kengo)
71        redesigned version of above but
72        for V35 CPU? (seems to lack the UPD71059C interrupt
73        controller which isn't needed when with the V35)
7974
80      M84-B-A (top board) (found on rytpe 2)
81      M84-B-B (top board) (lightning swords / kengo)
82      these both look very similar, if not the same
75        M84-C-A (top board) (listed as for Hammering Harry)
76        4 sprite roms (in a row)
77        6 larger chips with detail removed
78        etc.
8379
84      4 sprite roms (in a square)
85      various NANAO marked customs
86      KNA70H016(12)  NANAO 0201
87      KNA65005 17 NANAO 9048KS
88      KNA71H010(15) NANAO 0X2002
89      KNA72H010(14) NANAO 0Z2001
90      KNA71H009(13) NANAO 122001
91      KNA70H015(11) NANAO 092002
92      KNA91H014 NANAO 0Z2001V
93      etc.
80        M84-B-A (top board) (found on rytpe 2)
81        M84-B-B (top board) (lightning swords / kengo)
82        these both look very similar, if not the same
9483
84        4 sprite roms (in a square)
85        various NANAO marked customs
86        KNA70H016(12)  NANAO 0201
87        KNA65005 17 NANAO 9048KS
88        KNA71H010(15) NANAO 0X2002
89        KNA72H010(14) NANAO 0Z2001
90        KNA71H009(13) NANAO 122001
91        KNA70H015(11) NANAO 092002
92        KNA91H014 NANAO 0Z2001V
93        etc.
9594
9695
96
9797M85 - Pound for Pound uses this, possibly just M84 with
9898      a modified sound section?
99     - most Jamma inputs not connected, trackball only
99      - most Jamma inputs not connected, trackball only
100100
101101
102102                                   Year Board                Protected?
r249940r249941
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.
r249940r249941
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
r249940r249941
957957   AM_RANGE(0xd0000, 0xd3fff) AM_RAM_WRITE(videoram1_w) AM_SHARE("videoram1") \
958958   AM_RANGE(0xd8000, 0xdbfff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2") \
959959   AM_RANGE(0xffff0, 0xfffff) AM_ROM \
960ADDRESS_MAP_END \
961
960ADDRESS_MAP_END
962961/*                         WORKRAM */
963962M81_CPU1_MEMORY( xmultipl, 0x9c000 )
964963M81_CPU1_MEMORY( dbreed,   0x88000 )
r249940r249941
979978   AM_RANGE(PALETTERAM2, PALETTERAM2+0xbff) AM_READWRITE(palette2_r, palette2_w) AM_SHARE("paletteram2") \
980979   AM_RANGE(0xe0000, 0xe3fff) AM_RAM   /* work RAM */ \
981980   AM_RANGE(0xffff0, 0xfffff) AM_ROM \
982ADDRESS_MAP_END \
983
981ADDRESS_MAP_END
984982M84_CPU1_MEMORY( rtype2,  0xd0000, 0xc8000, 0xd8000 )
985983M84_CPU1_MEMORY( hharryu, 0xd0000, 0xa0000, 0xa8000 )
986984M84_CPU1_MEMORY( kengo,   0x80000, 0xa0000, 0xa8000 )
r249940r249941
19881986
19891987   MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) // different offsets
19901988MACHINE_CONFIG_END
1991
1989
19921990static MACHINE_CONFIG_DERIVED( m81_dbreed, m81_xmultipl )
19931991   MCFG_CPU_MODIFY("maincpu")
19941992   MCFG_CPU_PROGRAM_MAP(dbreed_map)
r249940r249941
20492047   MCFG_CPU_PROGRAM_MAP(kengo_map)
20502048   MCFG_CPU_IO_MAP(m84_v33_portmap)
20512049//#ifndef USE_HACKED_IRQS
2052//   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
2050//  MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
20532051//#endif
20542052
20552053   MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK)
r249940r249941
20582056   MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
20592057                        /* IRQs are generated by main Z80 and YM2151 */
20602058
2061//   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2062                       
2059//  MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2060
20632061   MCFG_MACHINE_START_OVERRIDE(m72_state,kengo)
20642062   MCFG_MACHINE_RESET_OVERRIDE(m72_state,kengo)
20652063
r249940r249941
20852083
20862084/****************************************** M82 ***********************************************/
20872085
2088/* Major Title uses
2086/* Major Title uses
20892087
20902088M82-A-A as the top board
20912089M82-B-A and as the bottom board
r249940r249941
21232121MACHINE_CONFIG_END
21242122
21252123
2126/* Pound for Pound uses
2124/* Pound for Pound uses
21272125  M85-A-B / M85-B
21282126*/
21292127
r249940r249941
21432141                        /* IRQs are generated by main Z80 and YM2151 */
21442142
21452143   MCFG_PIC8259_ADD( "upd71059c", INPUTLINE("maincpu", 0), VCC, NULL)
2146         
2144
21472145   /* video hardware */
21482146   MCFG_GFXDECODE_ADD("gfxdecode", "palette", rtype2)
21492147   MCFG_PALETTE_ADD("palette", 512)
r249940r249941
34743472
34753473   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-A */
34763474   ROM_LOAD( "rt2_b-4n-.bin", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3477   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
3475   ROM_LOAD( "rt2_b-4p-.bin", 0x0100, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) )
34783476ROM_END
34793477
34803478ROM_START( rtype2jc )
r249940r249941
36773675
36783676   ROM_REGION( 0x0200, "proms", 0 ) /* located on M84-B-B */
36793677   ROM_LOAD( "KEN_B-4N-.IC23", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) )
3680   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
3678   ROM_LOAD( "KEN_B-4P-.IC24", 0x0100, 0x0100, CRC(526f10ca) SHA1(e0ecd4db0720a4a37489e4d725843a2fbf266ebf) ) // differs from rtype 2 / ninja spirit
36813679ROM_END
36823680
36833681
trunk/src/mame/drivers/m92.c
r249940r249941
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
r249940r249941
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")
113115
114116   MCFG_RAM_ADD(RAM_TAG)
115117   MCFG_RAM_DEFAULT_SIZE("32M")
trunk/src/mame/drivers/merit.c
r249940r249941
232232{
233233   int co;
234234
235   m_screen->update_now();
235//  m_screen->update_now();
236   m_screen->update_partial(m_screen->vpos());
236237   data &= 0x0f;
237238
238239   co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07);
r249940r249941
305306WRITE_LINE_MEMBER(merit_state::hsync_changed)
306307{
307308   /* update any video up to the current scanline */
308   m_screen->update_now();
309//  m_screen->update_now();
310   m_screen->update_partial(m_screen->vpos());
309311}
310312
311313WRITE_LINE_MEMBER(merit_state::vsync_changed)
trunk/src/mame/drivers/micral.c
r249940r249941
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}
r249940r249941
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
r249940r249941
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.
r249940r249941
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
r249940r249941
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
r249940r249941
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                                   |
r249940r249941
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'
r249940r249941
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
r249940r249941
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
r249940r249941
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.
r249940r249941
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
r249940r249941
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.
r249940r249941
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
r249940r249941
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 )
r249940r249941
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)
r249940r249941
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
r249940r249941
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
r249940r249941
12921292
12931293class namcos23_state;
12941294
1295class namcos23_renderer : public poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES>
1295class namcos23_renderer : public poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>
12961296{
12971297public:
12981298   namcos23_renderer(namcos23_state &state);
r249940r249941
13121312   namcos23_render_data rd;
13131313   int front;
13141314   int vertex_count;
1315   float zkey;
13151316   poly_vertex pv[16];
13161317};
13171318
r249940r249941
13671368   int count[2];
13681369   namcos23_render_entry entries[2][RENDER_MAX_ENTRIES];
13691370   namcos23_poly_entry polys[POLY_MAX_ENTRIES];
1371   namcos23_poly_entry *poly_order[POLY_MAX_ENTRIES];
13701372};
13711373
13721374class namcos23_state : public driver_device
r249940r249941
15831585***************************************************************************/
15841586
15851587namcos23_renderer::namcos23_renderer(namcos23_state &state)
1586   : poly_manager<float, namcos23_render_data, 5, POLY_MAX_ENTRIES>(state.machine()),
1587     m_state(state)
1588   : poly_manager<float, namcos23_render_data, 4, POLY_MAX_ENTRIES>(state.machine()),
1589      m_state(state)
15881590{
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
r249940r249941
18841884{
18851885   const namcos23_render_data& rd = object;
18861886
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   
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
18981896   UINT32 *img = &object.bitmap->pix32(scanline, extent.startx);
1899   float* zBuffer = &m_zBuffer[(scanline * m_state.m_screen->visible_area().width()) + extent.startx];
1900   
1897
19011898   for(int x = extent.startx; x < extent.stopx; x++) {
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;
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
19131904      w += dw;
19141905      u += du;
19151906      v += dv;
19161907      l += dl;
19171908      img++;
1918      zBuffer++;
19191909   }
19201910}
19211911
r249940r249941
19421932
19431933   pv.x = 320 + 768 * pv.x;
19441934   pv.y = 240 - 768 * pv.y;
1945   pv.p[1] = 1.0f / pv.p[1];
1935   pv.p[0] = 1.0f / pv.p[0];
19461936}
19471937
19481938static UINT32 render_texture_lookup_nocache_point(running_machine &machine, const pen_t *pens, float x, float y)
r249940r249941
20462036      namcos23_poly_entry *p = render.polys + render.poly_count;
20472037
20482038      // Should be unnecessary now that frustum clipping happens, but this still culls polys behind the camera
2049      p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 5, 0.001f);
2050     
2039      p->vertex_count = render.polymgr->zclip_if_less(ne, pv, p->pv, 4, 0.00001f);
2040
20512041      // Project if you don't clip on the near plane
20522042      if(p->vertex_count >= 3) {
20532043         // Project the eye points
20542044         frustum_clip_vertex<float, 3> clipVerts[10];
20552045         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           
20672046            // Construct a frustum clipping vert from the NDCoords
2068            clipVerts[i].x = projX;
2069            clipVerts[i].y = projY;
2070            clipVerts[i].z = projZ;
2071            clipVerts[i].w = p->pv[i].p[0];
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;
20722052            clipVerts[i].p[0] = p->pv[i].p[1];
20732053            clipVerts[i].p[1] = p->pv[i].p[2];
20742054            clipVerts[i].p[2] = p->pv[i].p[3];
r249940r249941
20762056
20772057         // Clip against all edges of the view frustum
20782058         int num_vertices = frustum_clip_all<float, 3>(clipVerts, p->vertex_count, clipVerts);
2079         
2059
20802060         if (num_vertices != 0)
20812061         {
20822062            // Push the results back into the main vertices
r249940r249941
20842064            {
20852065               p->pv[i].x = clipVerts[i].x;
20862066               p->pv[i].y = clipVerts[i].y;
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];
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];
20922071            }
20932072            p->vertex_count = num_vertices;
2094           
2073
20952074            // This is our poor-man's projection matrix
2096            for(int i=0; i<p->vertex_count; i++)
2075            for(int i=0; i<p->vertex_count; i++)
20972076            {
20982077               render_project(p->pv[i]);
2099               
2100               const float w = p->pv[i].p[1];
2078
2079               float w = p->pv[i].p[0];
2080               p->pv[i].p[1] *= w;
21012081               p->pv[i].p[2] *= w;
21022082               p->pv[i].p[3] *= w;
2103               p->pv[i].p[4] *= w;
21042083            }
2105           
2084
21062085            // Compute an odd sorta'-Z thing that can situate the polygon wherever you want in Z-depth
2086            p->zkey = 0.5f*(minz+maxz);
21072087            p->front = !(h & 0x00000001);
21082088            p->rd.machine = &machine();
21092089            p->rd.texture_lookup = render_texture_lookup_nocache_point;
r249940r249941
21172097   }
21182098}
21192099
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
21202111void namcos23_renderer::render_flush(bitmap_rgb32& bitmap)
21212112{
21222113   render_t &render = m_state.m_render;
r249940r249941
21242115   if(!render.poly_count)
21252116      return;
21262117
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
21272123   const static rectangle scissor(0, 639, 0, 479);
21282124
21292125   for(int i=0; i<render.poly_count; i++) {
2130      const namcos23_poly_entry *p = &render.polys[i];
2126      const namcos23_poly_entry *p = render.poly_order[i];
21312127      namcos23_render_data& extra = render.polymgr->object_data_alloc();
21322128      extra = p->rd;
21332129      extra.bitmap = &bitmap;
21342130
21352131      // We should probably split the polygons into triangles ourselves to insure everything is being rendered properly
21362132      if (p->vertex_count == 3)
2137         render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv[0], p->pv[1], p->pv[2]);
2133         render_triangle(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv[0], p->pv[1], p->pv[2]);
21382134      else if (p->vertex_count == 4)
2139         render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
2135         render_polygon<4>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
21402136      else if (p->vertex_count == 5)
2141         render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
2137         render_polygon<5>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
21422138      else if (p->vertex_count == 6)
2143         render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 5, p->pv);
2139         render_polygon<6>(scissor, render_delegate(FUNC(namcos23_renderer::render_scanline), this), 4, p->pv);
21442140   }
21452141   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   }
21532142}
21542143
21552144void namcos23_state::render_run(bitmap_rgb32 &bitmap)
r249940r249941
21702159      re++;
21712160   }
21722161   render.polymgr->render_flush(bitmap);
2162   render.polymgr->wait();
21732163}
21742164
21752165
trunk/src/mame/drivers/nmg5.c
r249940r249941
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
r249940r249941
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. Bank 2 is divided as follows:
143000-3FFF Unused
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
15152C00-2C03 Video PIA
16162A00-2A01 Serial interface
17172900-2903 488 PIA
182400-2400 SCREEN-PAC (if present)
18192201-2280 Keyboard
19202100-2103 Floppy
201000-1FFF Unused
211000-1FFF Nominally unused but acts as read mirror of BIOS ROM
21220000-0FFF BIOS ROM
2223
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
2328Bank 3 has the ninth bit needed to complete the full Video RAM. These bits
2429are stored at F000-FFFF. Only the highest bit is used.
2530
2631On bootup bank 2 is active.
2732
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.
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)
3339
3440TODO:
41  - Implement ROM/IO bank selection properly
42  - Implement serial port
43  - Implement reset key (generates NMI and affects bank selection)
3544  - Verify frequency of the beep/audio alarm.
3645
3746***************************************************************************/
r249940r249941
4554static ADDRESS_MAP_START( osborne1_mem, AS_PROGRAM, 8, osborne1_state )
4655   AM_RANGE( 0x0000, 0x0FFF ) AM_READ_BANK("bank1") AM_WRITE( osborne1_0000_w )
4756   AM_RANGE( 0x1000, 0x1FFF ) AM_READ_BANK("bank2") AM_WRITE( osborne1_1000_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 )
57   AM_RANGE( 0x2000, 0x3FFF ) AM_READWRITE( osborne1_2000_r, osborne1_2000_w )
5058   AM_RANGE( 0x4000, 0xEFFF ) AM_RAM
51   AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank4") AM_WRITE( osborne1_videoram_w )
59   AM_RANGE( 0xF000, 0xFFFF ) AM_READ_BANK("bank3") AM_WRITE( osborne1_videoram_w )
5260ADDRESS_MAP_END
5361
5462
5563static ADDRESS_MAP_START( osborne1_io, AS_IO, 8, osborne1_state )
5664   ADDRESS_MAP_UNMAP_HIGH
5765   ADDRESS_MAP_GLOBAL_MASK(0xff)
58   AM_RANGE( 0x00, 0x03 ) AM_WRITE( osborne1_bankswitch_w )
66   AM_RANGE( 0x00, 0xff ) AM_WRITE( osborne1_bankswitch_w )
5967ADDRESS_MAP_END
6068
6169
r249940r249941
141149   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
142150   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
143151   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")
144157INPUT_PORTS_END
145158
146159
r249940r249941
197210
198211   MCFG_SCREEN_ADD("screen", RASTER)
199212   MCFG_SCREEN_UPDATE_DRIVER(osborne1_state, screen_update)
200   MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 512, 0, 416, 260, 0, 240 )
213   MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK, 1024, 0, 104*8, 260, 0, 24*10 )
201214   MCFG_SCREEN_PALETTE("palette")
202215   MCFG_GFXDECODE_ADD("gfxdecode", "palette", osborne1)
203216   MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
trunk/src/mame/drivers/othunder.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
325325   MCFG_SLOT_DEFAULT_OPTION("cga_ec1841")
326326MACHINE_CONFIG_END
327327
328static MACHINE_CONFIG_DERIVED(eagle1600, pccga)
329   MCFG_DEVICE_REMOVE("maincpu")
330   MCFG_CPU_PC(pc16, pc16, I8086, 8000000)
331MACHINE_CONFIG_END
328332
329333ROM_START( bw230 )
330334   ROM_REGION(0x100000,"maincpu", 0)
r249940r249941
477481   ROM_LOAD( "c101681 6ffb.u60",0x000, 0x100, NO_DUMP ) // PAL20L10NC
478482ROM_END
479483
484ROM_START( eagle1600 )
485   ROM_REGION(0x100000,"maincpu", 0)
486   ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xfe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1))
487   ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xfe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1))
488
489   ROM_REGION(0x8000,"gfx1", 0)
490   ROM_LOAD("eagle 1600 video char gen u301.bin", 0x00000, 0x1000, CRC(1a7e552f) SHA1(749058783eec9d96a70dc5fdbfccb56196f889dc))
491ROM_END
492
480493/***************************************************************************
481494
482495  Game driver(s)
r249940r249941
509522
510523COMP( 198?, ataripc3,   ibm5150,    0,          pccga,      pccga, driver_device,      0,      "Atari", "PC-3" , MACHINE_NOT_WORKING)
511524COMP( 1989, ssam88s,    ibm5150,    0,          pccga,      pccga, driver_device,      0,      "Samsung", "Samtron 88S" , MACHINE_NOT_WORKING)
525COMP( 1983, eagle1600,  ibm5150,    0,          eagle1600,  pccga, driver_device,      0,      "Eagle", "1600" , MACHINE_NOT_WORKING)
trunk/src/mame/drivers/peplus.c
r249940r249941
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 )
r249940r249941
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 )
r249940r249941
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
r249940r249941
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) )
39093907
39103908   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
39113909   ROM_LOAD( "ket_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
r249940r249941
39293927   ROM_LOAD( "ket_defaults.nv",  0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
39303928ROM_END
39313929
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
39323957ROM_START( keta )
39333958   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
39343959   /* doesn't use a separate BIOS rom */
r249940r249941
39834008   ROM_LOAD( "ket_defaults.nv",  0x0000000, 0x020000, CRC(3ca892d8) SHA1(67430df5217e453ae8140c5653deeadfad8fa684) )
39844009ROM_END
39854010
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
39864200ROM_START( espgal )
39874201   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
39884202   /* doesn't use a separate BIOS rom */
r249940r249941
43124526GAME( 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)
43134527
43144528// 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.
43154530GAME( 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 )
43164532GAME( 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 )
43174533GAME( 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 )
43184534
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
43194554GAME( 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 )
43204555
43214556// protection simulated, but should be correct
trunk/src/mame/drivers/playch10.c
r249940r249941
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) )
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
738742#define BIOS_GFX                                            \
739743   ROM_REGION( 0x6000, "gfx1", 0 ) \
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) )   \
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   \
743756   ROM_REGION( 0x0300, "proms", 0 )                        \
744757   ROM_LOAD( "pch1-c-6f.82s129an.6f",    0x0000, 0x0100, CRC(e5414ca3) SHA1(d2878411cda84ffe0afb2e538a67457f51bebffb) )    \
745758   ROM_LOAD( "pch1-c-6e.82s129an.6e",    0x0100, 0x0100, CRC(a2625c6e) SHA1(a448b47c9289902e26a3d3c4c7d5a7968c385e81) )    \
r249940r249941
747760   ROM_REGION( 0xc0, "palette", 0 )                        \
748761   ROM_LOAD( "rp2c0x.pal", 0x00, 0xc0, CRC(48de65dc) SHA1(d10acafc8da9ff479c270ec01180cca61efe62f5) )
749762
763
764
765
750766/******************************************************************************/
751767
752768/* Standard Games */
trunk/src/mame/drivers/rd100.c
r249940r249941
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
r249940r249941
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()
r249940r249941
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/****************************************************\
r249940r249941
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/****************************************************\
r249940r249941
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/****************************************************\
r249940r249941
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
r0r249941
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
r249940r249941
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
3334    1994  PotoPoto (Japan)           Sega              317-0218         C2
3435    1994  Stack Columns (Japan)      Sega              317-0219         C2
3536    1994  Stack Columns (World)      Sega              317-0223         C2
r249940r249941
931932INPUT_PORTS_END
932933
933934
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
934990static INPUT_PORTS_START( ribbit )
935991   PORT_INCLUDE( systemc_generic )
936992
r249940r249941
16351691   ROM_LOAD( "epr-14394.ic4", 0x000000, 0x040000, CRC(476e30dd) SHA1(c9d381160c58b05763ea286a53c7ca6de074fda2) )
16361692ROM_END
16371693
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) )
16381700
1701   ROM_REGION( 0x040000, "upd", 0 )
1702   ROM_LOAD( "epr-15495.ic4", 0x000000, 0x040000, CRC(d3ee4c68) SHA1(557c57b22521339d94d9a3e6fd2af68a67a153b6) )
1703ROM_END
1704
16391705ROM_START( ribbit ) /* Ribbit  (c)1991 Sega */
16401706   ROM_REGION( 0x200000, "maincpu", 0 )
16411707   ROM_LOAD16_BYTE( "epr-13833.ic32", 0x000000, 0x040000, CRC(5347f8ce) SHA1(b95b99536157edfbf0d74a42f64235f47dca7ee1) )
r249940r249941
23192385//    YEAR, NAME,      PARENT,   MACHINE,INPUT,    INIT,     MONITOR,COMPANY,FULLNAME,FLAGS
23202386/* System C Games */
23212387GAME( 1989, bloxeedc,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (World, C System)", 0 )
2322GAME( 1989, bloxeedu,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (US, C System)", 0 )
2388GAME( 1989, bloxeedu,  bloxeed,  segac,  bloxeedc, segac2_state, bloxeedc, ROT0,   "Sega / Elorg", "Bloxeed (US, C System, Rev A)", 0 )
23232389
23242390GAME( 1990, columns,   0,        segac,  columns, segac2_state,  columns,  ROT0,   "Sega", "Columns (World)", 0 )
2325GAME( 1990, columnsu,  columns,  segac,  columnsu, segac2_state, columns,  ROT0,   "Sega", "Columns (US, cocktail)", 0 ) // has cocktail mode dsw
2391GAME( 1990, columnsu,  columns,  segac,  columnsu, segac2_state, columns,  ROT0,   "Sega", "Columns (US, cocktail, Rev A)", 0 ) // has cocktail mode dsw
23262392GAME( 1990, columnsj,  columns,  segac,  columns, segac2_state,  columns,  ROT0,   "Sega", "Columns (Japan)", 0 )
23272393
23282394GAME( 1990, columns2,  0,        segac,  columns2, segac2_state, columns2, ROT0,   "Sega", "Columns II: The Voyage Through Time (World)", 0 )
r249940r249941
23532419GAME( 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
23542420GAME( 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
23552421
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
23562425GAME( 1994, potopoto,  0,        segac2, potopoto, segac2_state, potopoto, ROT0,   "Sega", "Poto Poto (Japan)", 0 )
23572426
23582427GAME( 1994, stkclmns,  0,        segac2, stkclmns, segac2_state, stkclmns, ROT0,   "Sega", "Stack Columns (World)", 0 )
trunk/src/mame/drivers/segas24.c
r249940r249941
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      m_screen->update_now();
881   if (irq_tmode == 1 || irq_tmode == 2)
882   {
883   //  m_screen->update_now();
884      m_screen->update_partial(m_screen->vpos());
885   }
883886}
884887
885888TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_clear_cb)
trunk/src/mame/drivers/shougi.c
r249940r249941
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}
r249940r249941
236236         // 0: sharedram = sub
237237         // 1: sharedram = main
238238         break;
239     
239
240240      case 1:
241241         m_nmi_enabled = data;
242242
r249940r249941
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
r249940r249941
8282{
8383   int co;
8484
85   m_screen->update_now();
85//  m_screen->update_now();
86   m_screen->update_partial(m_screen->vpos());
8687   data &= 0x0f;
8788
8889   co = ((m_ram_attr[offset] & 0x7F) << 3) | (offset & 0x07);
r249940r249941
157158WRITE_LINE_MEMBER(slotcarn_state::hsync_changed)
158159{
159160   /* update any video up to the current scanline */
160   m_screen->update_now();
161//  m_screen->update_now();
162   m_screen->update_partial(m_screen->vpos());
161163}
162164
163165WRITE_LINE_MEMBER(slotcarn_state::vsync_changed)
trunk/src/mame/drivers/subhuntr.c
r0r249941
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
r249940r249941
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
942946   /* video hardware */
943947   MCFG_SCREEN_ADD("screen", RASTER)
944948   MCFG_SCREEN_REFRESH_RATE(60)
trunk/src/mame/drivers/system1.c
r249940r249941
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) )
41534158
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
41544183ROM_START( brain )
41554184   ROM_REGION( 0x20000, "maincpu", 0 )
41564185   ROM_LOAD( "brain.1",      0x00000, 0x8000, CRC(2d2aec31) SHA1(02dfbb0e9ca01b864e3aa594cf38306fe82a4b5d) )
r249940r249941
56985727GAME( 1985, shtngmst,   0,        sys2m,     shtngmst,  system1_state, shtngmst, ROT0,   "Sega", "Shooting Master (8751 315-5159)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
56995728GAME( 1985, shtngmste,  shtngmst, sys2m,     shtngmst,  system1_state, shtngmst, ROT0,   "Sega / EVG", "Shooting Master (EVG, 8751 315-5159a)", MACHINE_SUPPORTS_SAVE )
57005729GAME( 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 )
57015731GAME( 1986, wboysys2,   wboy,     sys2x,     wboysys2,  system1_state, wboysys2, ROT0,   "Escape (Sega license)", "Wonder Boy (system 2)", MACHINE_SUPPORTS_SAVE )
57025732GAME( 1987, tokisens,   0,        sys2,      tokisens,  system1_state, bank0c,   ROT90,  "Sega", "Toki no Senshi - Chrono Soldier", MACHINE_SUPPORTS_SAVE )
57035733GAME( 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
r249940r249941
3434    c300      interrupt enable
3535    c302      flip screen
3636    c304      trigger interrupt on audio CPU
37    c308      Protection ???  Stuffs in some values computed from ROM content
37    c308      video enable (?). Protection ??? Stuffs in some values computed
38              from ROM content
3839    c30a      coin counter 1
3940    c30c      coin counter 2
4041
r249940r249941
6162 *
6263 *************************************/
6364
64INTERRUPT_GEN_MEMBER(timeplt_state::timeplt_interrupt)
65INTERRUPT_GEN_MEMBER(timeplt_state::interrupt)
6566{
6667   if (m_nmi_enable)
6768      device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
6869}
6970
7071
71WRITE8_MEMBER(timeplt_state::timeplt_nmi_enable_w)
72WRITE8_MEMBER(timeplt_state::nmi_enable_w)
7273{
7374   m_nmi_enable = data & 1;
7475   if (!m_nmi_enable)
r249940r249941
8384 *
8485 *************************************/
8586
86WRITE8_MEMBER(timeplt_state::timeplt_coin_counter_w)
87WRITE8_MEMBER(timeplt_state::coincounter_w)
8788{
8889   coin_counter_w(machine(), offset >> 1, data);
8990}
r249940r249941
121122 *
122123 *************************************/
123124
124static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state )
125static ADDRESS_MAP_START( common_main_map, AS_PROGRAM, 8, timeplt_state )
125126   ADDRESS_MAP_UNMAP_HIGH
126127   AM_RANGE(0x0000, 0x5fff) AM_ROM
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")
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")
129130   AM_RANGE(0xa800, 0xafff) AM_RAM
130131   AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram")
131132   AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2")
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")
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)
140135   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)
141139   AM_RANGE(0xc320, 0xc320) AM_MIRROR(0x0c9f) AM_READ_PORT("IN1")
142140   AM_RANGE(0xc340, 0xc340) AM_MIRROR(0x0c9f) AM_READ_PORT("IN2")
143141   AM_RANGE(0xc360, 0xc360) AM_MIRROR(0x0c9f) AM_READ_PORT("DSW0")
144142ADDRESS_MAP_END
145143
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
146150static ADDRESS_MAP_START( psurge_main_map, AS_PROGRAM, 8, timeplt_state )
147   ADDRESS_MAP_UNMAP_HIGH
148   AM_RANGE(0x0000, 0x5fff) AM_ROM
151   AM_IMPORT_FROM(common_main_map)
149152   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")
166153ADDRESS_MAP_END
167154
168155static ADDRESS_MAP_START( chkun_main_map, AS_PROGRAM, 8, timeplt_state )
169   ADDRESS_MAP_UNMAP_HIGH
170   AM_RANGE(0x0000, 0x5fff) AM_ROM
156   AM_IMPORT_FROM(timeplt_main_map)
171157   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")
189158ADDRESS_MAP_END
190159
191160
r249940r249941
457426   /* basic machine hardware */
458427   MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2)  /* not confirmed, but common for Konami games of the era */
459428   MCFG_CPU_PROGRAM_MAP(timeplt_main_map)
460   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  timeplt_interrupt)
429   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  interrupt)
461430
462431   /* video hardware */
463432   MCFG_SCREEN_ADD("screen", RASTER)
r249940r249941
465434   MCFG_SCREEN_REFRESH_RATE(60)
466435   MCFG_SCREEN_SIZE(32*8, 32*8)
467436   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
468   MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update_timeplt)
437   MCFG_SCREEN_UPDATE_DRIVER(timeplt_state, screen_update)
469438   MCFG_SCREEN_PALETTE("palette")
470439
471440   MCFG_GFXDECODE_ADD("gfxdecode", "palette", timeplt)
r249940r249941
483452   MCFG_CPU_MODIFY("maincpu")
484453   MCFG_CPU_PROGRAM_MAP(psurge_main_map)
485454   MCFG_CPU_VBLANK_INT_DRIVER("screen", timeplt_state,  nmi_line_pulse)
455
456   MCFG_VIDEO_START_OVERRIDE(timeplt_state,psurge)
486457MACHINE_CONFIG_END
487458
488459static MACHINE_CONFIG_DERIVED( bikkuric, timeplt )
trunk/src/mame/drivers/unichamp.c
r0r249941
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
r249940r249941
207207
208208WRITE8_MEMBER(vicdual_state::videoram_w)
209209{
210   m_screen->update_now();
210//  m_screen->update_now();
211   m_screen->update_partial(m_screen->vpos());
211212   m_videoram[offset] = data;
212213}
213214
214215
215216WRITE8_MEMBER(vicdual_state::characterram_w)
216217{
217   m_screen->update_now();
218//  m_screen->update_now();
219   m_screen->update_partial(m_screen->vpos());
218220   m_characterram[offset] = data;
219221}
220222
r249940r249941
36053607
36063608GAMEL(1977, depthch,    0,        depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin", "Depthcharge", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
36073609GAMEL(1977, depthcho,   depthch,  depthch,   depthch,   driver_device, 0, ROT0,   "Gremlin", "Depthcharge (older)", 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 )
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 )
36093611GAME( 1977, safari,     0,        safari,    safari,    driver_device, 0, ROT0,   "Gremlin", "Safari (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
36103612GAME( 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
36113613GAME( 1978, frogs,      0,        frogs,     frogs,     driver_device, 0, ROT0,   "Gremlin", "Frogs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/vpoker.c
r249940r249941
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
1127  TODO:
1228  - Understand how the 6840PTM hooks up, needed to let it work properly;
1329  - I/Os;
r249940r249941
5268  MC6840P
5369  mm74c920J/mmc6551j-9    x2
5470
55
5671**************************************************************************************************************
5772
5873 - Added 5-Aces Poker (Roberto Fresca)
r249940r249941
686701ROM_END
687702
688703
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 )
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 )
trunk/src/mame/drivers/wacky_gator.c
r249940r249941
11// license:GPL2+
2// copyright-holders:FelipeSanches
2// copyright-holders:FelipeSanches, Sandro Ronco
33//
44// Wacky Gator
55//
6// Driver by Felipe Correa da Silva Sanches <juca@members.fsf.org>
6// Driver by Sandro Ronco and
7//  Felipe Correa da Silva Sanches <juca@members.fsf.org>
78//
89
910/*
trunk/src/mame/drivers/wecleman.c
r249940r249941
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
r249940r249941
11// license:GPL-2.0+
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249940r249941
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           MACHINE_NOT_WORKING flag removed.
12           GAME_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.
r249940r249941
3131    - Modernised.
3232
3333    To do / problems:
34    - Halt-on-nmi emulation needs a cycle-exact z80
3435    - 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)
r249940r249941
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 )
5055   AM_RANGE(0x0000, 0x1fff) AM_ROM AM_MIRROR(0x2000)
51   AM_RANGE(0xc000, 0xffff) AM_RAM_READ(zx_ram_r)
56   AM_RANGE(0x4000, 0xffff) AM_RAM
5257ADDRESS_MAP_END
5358
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
5464static ADDRESS_MAP_START( zx80_io_map, AS_IO, 8, zx_state )
5565   AM_RANGE(0x0000, 0xffff) AM_READWRITE(zx80_io_r, zx80_io_w)
5666ADDRESS_MAP_END
r249940r249941
291301INPUT_PORTS_END
292302
293303
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
326304/* Palette Initialization */
327305
328306
r249940r249941
330308{
331309   palette.set_pen_color(0,rgb_t::white); /* white */
332310   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 */
335311}
336312
337313PALETTE_INIT_MEMBER(zx_state,ts1000)
338314{
339315   palette.set_pen_color(0,rgb_t(64, 244, 244)); /* cyan */
340316   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 */
343317}
344318
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
360319static MACHINE_CONFIG_START( zx80, zx_state )
361320   /* basic machine hardware */
362   MCFG_CPU_ADD("maincpu", Z80, ZX81_CPU_CLOCK)
321   MCFG_CPU_ADD("maincpu", Z80, XTAL_6_5MHz/2)
363322   MCFG_CPU_PROGRAM_MAP(zx80_map)
364323   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
365327   MCFG_SCREEN_ADD("screen", RASTER)
366   MCFG_SCREEN_REFRESH_RATE(ZX81_PAL_FRAMES_PER_SECOND)
367   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(ZX81_VBLANK_DURATION))
328   MCFG_SCREEN_REFRESH_RATE(XTAL_6_5MHz/2/64159.0) // 54223 for NTSC
368329
369
370330   /* video hardware */
371331   MCFG_SCREEN_UPDATE_DRIVER(zx_state, screen_update)
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)
332   MCFG_SCREEN_SIZE(384, 311)
333   MCFG_SCREEN_VISIBLE_AREA(0, 383, 0, 310)
375334   MCFG_SCREEN_PALETTE("palette")
376335
377   MCFG_GFXDECODE_ADD("gfxdecode", "palette", zx80)
378   MCFG_PALETTE_ADD("palette", 4)
336   MCFG_PALETTE_ADD("palette", 2)
379337   MCFG_PALETTE_INIT_OWNER(zx_state,zx)
380338
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
388339   MCFG_CASSETTE_ADD( "cassette" )
389340   MCFG_CASSETTE_FORMATS(zx80_o_format)
390341   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
r249940r249941
392343   /* internal ram */
393344   MCFG_RAM_ADD(RAM_TAG)
394345   MCFG_RAM_DEFAULT_SIZE("1K")
395   MCFG_RAM_EXTRA_OPTIONS("16K")
346   MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K")
396347MACHINE_CONFIG_END
397348
398349static MACHINE_CONFIG_DERIVED( zx81, zx80 )
399
400350   MCFG_CPU_MODIFY("maincpu")
351   MCFG_CPU_PROGRAM_MAP(zx81_map)
401352   MCFG_CPU_IO_MAP(zx81_io_map)
402353
403   MCFG_GFXDECODE_MODIFY("gfxdecode", zx81)
404
405354   MCFG_CASSETTE_MODIFY( "cassette" )
406355   MCFG_CASSETTE_FORMATS(zx81_p_format)
407356MACHINE_CONFIG_END
408357
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
409368static MACHINE_CONFIG_DERIVED( ts1000, zx81 )
410369   MCFG_PALETTE_MODIFY("palette")
411   MCFG_PALETTE_INIT_OWNER(zx_state,ts1000)
370   MCFG_PALETTE_INIT_OWNER(zx_state, ts1000)
412371MACHINE_CONFIG_END
413372
414373static MACHINE_CONFIG_DERIVED( ts1500, ts1000 )
415
416374   /* internal ram */
417375   MCFG_RAM_MODIFY(RAM_TAG)
418376   MCFG_RAM_DEFAULT_SIZE("16K")
419377MACHINE_CONFIG_END
420378
421static MACHINE_CONFIG_DERIVED( pc8300, zx81 )
422
379static MACHINE_CONFIG_DERIVED( pc8300, zx81_spk )
423380   MCFG_CPU_MODIFY("maincpu")
424381   MCFG_CPU_IO_MAP(pc8300_io_map)
425382
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
435383   /* internal ram */
436384   MCFG_RAM_MODIFY(RAM_TAG)
437385   MCFG_RAM_DEFAULT_SIZE("16K")
438386MACHINE_CONFIG_END
439387
440static MACHINE_CONFIG_DERIVED( pow3000, zx81 )
441
388static MACHINE_CONFIG_DERIVED( pow3000, zx81_spk )
442389   MCFG_CPU_MODIFY("maincpu")
443390   MCFG_CPU_IO_MAP(pow3000_io_map)
444391
445   MCFG_MACHINE_RESET_OVERRIDE(zx_state,pow3000)
446
447   MCFG_GFXDECODE_MODIFY("gfxdecode", pc8300)
448
449392   /* internal ram */
450393   MCFG_RAM_MODIFY(RAM_TAG)
451394   MCFG_RAM_DEFAULT_SIZE("2K")
r249940r249941
456399/* ROMs */
457400
458401ROM_START(zx80)
459   ROM_REGION( 0x10000, "maincpu",0 )
402   ROM_REGION( 0x1000, "maincpu",0 )
460403   ROM_SYSTEM_BIOS(0, "default", "BASIC")
461404   ROMX_LOAD( "zx80.rom",   0x0000, 0x1000, CRC(4c7fc597) SHA1(b6769a3197c77009e0933e038c15b43cf4c98c7a), ROM_BIOS(1) )
462405   ROM_SYSTEM_BIOS(1, "aszmic", "ASZMIC")
r249940r249941
464407ROM_END
465408
466409ROM_START(zx81)
467   ROM_REGION( 0x10000, "maincpu",0 )
410   ROM_REGION( 0x2000, "maincpu",0 )
468411   ROM_SYSTEM_BIOS(0, "3rd", "3rd rev.")
469412   ROMX_LOAD( "zx81b.rom",   0x0000, 0x2000, CRC(522c37b8) SHA1(c6d8e06cb936989f6e1cc7a56d1f092da854a515), ROM_BIOS(1) )
470413   ROM_SYSTEM_BIOS(1, "1st", "1st rev.")
r249940r249941
478421ROM_END
479422
480423ROM_START(ts1000)
481   ROM_REGION( 0x10000, "maincpu",0 )
424   ROM_REGION( 0x2000, "maincpu",0 )
482425   ROM_LOAD( "zx81a.rom", 0x0000, 0x2000, CRC(4b1dd6eb) SHA1(7b143ee964e9ada89d1f9e88f0bd48d919184cfc) )
483426ROM_END
484427
485428ROM_START(ts1500)
486   ROM_REGION( 0x10000, "maincpu",0 )
429   ROM_REGION( 0x2000, "maincpu",0 )
487430   ROM_LOAD( "d2364c_649.u2", 0x0000, 0x2000, CRC(7dd19c48) SHA1(3eb437359221b4406d236085ec66fa02278e7495) )
488431ROM_END
489432
490433ROM_START(ringo470)
491   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
434   ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF )
492435   ROM_LOAD( "ringo470.rom", 0x0000, 0x2000, CRC(b9c5abec) SHA1(191c4994adfffe4f83b98dc3959dde2724b1dbac) )
493436ROM_END
494437
495438ROM_START(pc8300)
496   ROM_REGION( 0x10000, "maincpu",0 )
439   ROM_REGION( 0x2000, "maincpu",0 )
497440   ROM_LOAD( "8300_org.rom", 0x0000, 0x2000, CRC(a350f2b1) SHA1(6a9be484556cc27a9cd9d71085d2027c6243333f) )
498441
499442   ROM_REGION( 0x200, "gfx1", 0 )
r249940r249941
501444ROM_END
502445
503446ROM_START(pow3000)
504   ROM_REGION( 0x10000, "maincpu",0 )
447   ROM_REGION( 0x2000, "maincpu",0 )
505448   ROM_LOAD( "pow3000.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) )
506449
507450   ROM_REGION( 0x200, "gfx1", 0 )
r249940r249941
509452ROM_END
510453
511454ROM_START(lambda)
512   ROM_REGION( 0x10000, "maincpu",0 )
455   ROM_REGION( 0x2000, "maincpu",0 )
513456   ROM_LOAD( "lambda.rom", 0x0000, 0x2000, CRC(8a49b2c3) SHA1(9b22daf2f3a991aa6a358ef95b091654c3ca1bdf) )
514457
515458   ROM_REGION( 0x200, "gfx1", 0 )
r249940r249941
517460ROM_END
518461
519462ROM_START( tk85 )
520   ROM_REGION( 0x10000, "maincpu", 0 )
463   ROM_REGION( 0x2800, "maincpu", 0 )
521464   ROM_LOAD( "tk85.rom", 0x0000, 0x2800, CRC(8972d756) SHA1(7b961a1733fc047eb682150a32e17bca10a018d2) )
522465ROM_END
523466
524467/* This homebrew has 192k of RAM and 32k of ROM via bankswitching. One of the primary bankswitching lines is /M1,
525468    which is not emulated by MAME's z80. */
526469ROM_START( zx97 )
527   ROM_REGION( 0x10000, "maincpu", 0 )
528   ROM_LOAD( "zx97.rom", 0x0000, 0x2000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) )
529   ROM_IGNORE( 0x6000 )    /* Unemulated bankswitched part */
470   ROM_REGION( 0x8000, "maincpu", 0 )
471   ROM_LOAD( "zx97.rom", 0x0000, 0x8000, CRC(5cf49744) SHA1(b2a486efdc7b2bc3dc8e5a441ea5532bfa3207bd) )
530472ROM_END
531473
532474/* Game Drivers */
533475
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 )
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 )
542483COMP( 1983, pow3000,    zx81,   0,      pow3000,    pow3000, zx_state,    zx,     "Creon Enterprises",        "Power 3000",          0 )
543484COMP( 1982, lambda,     zx81,   0,      pow3000,    pow3000, zx_state,    zx,     "Lambda Electronics Ltd",   "Lambda 8300",         0 )
544COMP( 1997, zx97,       zx81,   0,      zx81,       zx81, zx_state,       zx,     "Wilf Rigter",              "ZX97", MACHINE_NOT_WORKING | MACHINE_UNOFFICIAL )
485COMP( 1997, zx97,       zx81,   0,      zx81,       zx81,    zx_state,    zx,     "Wilf Rigter",              "ZX97", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_UNOFFICIAL )
trunk/src/mame/includes/amstrad.h
r249940r249941
3030#include "bus/cpc/brunword4.h"
3131#include "bus/cpc/hd20.h"
3232#include "bus/cpc/magicsound.h"
33#include "bus/cpc/doubler.h"
3334#include "machine/ram.h"
3435#include "imagedev/cassette.h"
3536#include "bus/centronics/ctronics.h"
trunk/src/mame/includes/champbas.h
r249940r249941
66
77*************************************************************************/
88
9
10#define CPUTAG_MCU "mcu"
119#include "sound/dac.h"
1210
11
1312class champbas_state : public driver_device
1413{
1514public:
r249940r249941
2019      m_spriteram_2(*this, "spriteram_2"),
2120      m_maincpu(*this, "maincpu"),
2221      m_audiocpu(*this, "audiocpu"),
23      m_mcu(*this, CPUTAG_MCU),
22      m_mcu(*this, "mcu"),
2423      m_dac(*this, "dac"),
2524      m_dac1(*this, "dac1"),
2625      m_dac2(*this, "dac2"),
2726      m_gfxdecode(*this, "gfxdecode"),
28      m_palette(*this, "palette"){ }
27      m_palette(*this, "palette")
28   { }
2929
3030   /* memory pointers */
3131   required_shared_ptr<UINT8> m_bg_videoram;
trunk/src/mame/includes/hng64.h
r249940r249941
111111class hng64_poly_renderer : public poly_manager<float, hng64_poly_data, 7, HNG64_MAX_POLYGONS>
112112{
113113public:
114    hng64_poly_renderer(hng64_state& state);
115   
116    void drawShaded(polygon *p);
117    void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid);
114   hng64_poly_renderer(hng64_state& state);
118115
119    hng64_state& state() { return m_state; }
120    bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; }
121    float* depthBuffer3d() { return m_depthBuffer3d; }
122   
116   void drawShaded(polygon *p);
117   void render_scanline(INT32 scanline, const extent_t& extent, const hng64_poly_data& renderData, int threadid);
118
119   hng64_state& state() { return m_state; }
120   bitmap_rgb32& colorBuffer3d() { return m_colorBuffer3d; }
121   float* depthBuffer3d() { return m_depthBuffer3d; }
122
123123private:
124124   hng64_state& m_state;
125125
r249940r249941
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
r249940r249941
333333      UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
334334      int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask, hng64trans_t drawformat);
335335
336   
337336
337
338338   DECLARE_CUSTOM_INPUT_MEMBER(left_handle_r);
339339   DECLARE_CUSTOM_INPUT_MEMBER(right_handle_r);
340340   DECLARE_CUSTOM_INPUT_MEMBER(acc_down_r);
341341   DECLARE_CUSTOM_INPUT_MEMBER(brake_down_r);
342342
343    hng64_poly_renderer* m_poly_renderer;
344   
345    TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
343   hng64_poly_renderer* m_poly_renderer;
346344
347    UINT8 *m_texturerom;
345   TIMER_CALLBACK_MEMBER(hng64_3dfifo_processed);
346
347   UINT8 *m_texturerom;
348348   UINT16* m_vertsrom;
349349   int m_vertsrom_size;
350    std::vector<polygon> m_polys;  // HNG64_MAX_POLYGONS
351   
352    void clear3d();
350   std::vector<polygon> m_polys;  // HNG64_MAX_POLYGONS
351
352   void clear3d();
353353   void hng64_command3d(const UINT16* packet);
354354   void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
355355   void transition_control(bitmap_rgb32 &bitmap, const rectangle &cliprect);
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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   \
395396   ROM_SYSTEM_BIOS( 2, "us", "US MVS (Ver. 2?)" ) \
396397   ROM_LOAD16_WORD_SWAP_BIOS( 2, "sp-u2.sp1",         0x00000, 0x020000, CRC(e72943de) SHA1(5c6bba07d2ec8ac95776aa3511109f5e1e2e92eb) ) /* US, 2 Slot */ \
397398   ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \
398399   ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1",          0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \
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) */
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) */
437443
438444
439445
trunk/src/mame/includes/osborne1.h
r249940r249941
4747      m_row5(*this, "ROW5"),
4848      m_row6(*this, "ROW6"),
4949      m_row7(*this, "ROW7"),
50      m_cnf(*this, "CNF"),
5051      m_bank1(*this, "bank1"),
5152      m_bank2(*this, "bank2"),
5253      m_bank3(*this, "bank3"),
53      m_bank4(*this, "bank4"),
5454      m_region_maincpu(*this, "maincpu") { }
5555
5656   virtual void video_start();
r249940r249941
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);
7776   DECLARE_WRITE8_MEMBER(osborne1_videoram_w);
7877   DECLARE_WRITE8_MEMBER(osborne1_bankswitch_w);
7978   DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func);
r249940r249941
8685   DECLARE_DIRECT_UPDATE_MEMBER(osborne1_opbase);
8786
8887   bool m_bank2_enabled;
89   bool m_bank3_enabled;
90   UINT8   *m_bank4_ptr;
91   UINT8   *m_empty_4K;
88   UINT8   m_bit_9;
9289   /* IRQ states */
9390   bool m_pia_0_irq_state;
9491   bool m_pia_1_irq_state;
9592   /* 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;
r249940r249941
115115   required_ioport m_row5;
116116   required_ioport m_row6;
117117   required_ioport m_row7;
118   required_ioport m_cnf;
118119   required_memory_bank m_bank1;
119120   required_memory_bank m_bank2;
120121   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
r249940r249941
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"),
1821      m_colorram(*this, "colorram"),
1922      m_videoram(*this, "videoram"),
2023      m_spriteram(*this, "spriteram"),
21      m_spriteram2(*this, "spriteram2"),
22      m_gfxdecode(*this, "gfxdecode"),
23      m_screen(*this, "screen"),
24      m_palette(*this, "palette")
24      m_spriteram2(*this, "spriteram2")
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;
2932
3033   /* memory pointers */
3134   required_shared_ptr<UINT8> m_colorram;
r249940r249941
3336   required_shared_ptr<UINT8> m_spriteram;
3437   required_shared_ptr<UINT8> m_spriteram2;
3538
36   required_device<gfxdecode_device> m_gfxdecode;
37   required_device<screen_device> m_screen;
38   required_device<palette_device> m_palette;
39
4039   /* video-related */
4140   tilemap_t  *m_bg_tilemap;
4241
4342   /* misc */
4443   UINT8    m_nmi_enable;
44   bool    m_video_enable;
4545
46   DECLARE_WRITE8_MEMBER(timeplt_nmi_enable_w);
47   DECLARE_WRITE8_MEMBER(timeplt_coin_counter_w);
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 */
4858   DECLARE_READ8_MEMBER(psurge_protection_r);
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);
59
60   /* chkun */
5361   DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r);
5462   DECLARE_WRITE8_MEMBER(chkun_sound_w);
63
5564   TILE_GET_INFO_MEMBER(get_tile_info);
5665   TILE_GET_INFO_MEMBER(get_chkun_tile_info);
66
5767   virtual void machine_start();
5868   virtual void machine_reset();
5969   virtual void video_start();
6070   DECLARE_PALETTE_INIT(timeplt);
6171   DECLARE_VIDEO_START(chkun);
62   UINT32 screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
63   INTERRUPT_GEN_MEMBER(timeplt_interrupt);
72   DECLARE_VIDEO_START(psurge);
73
74   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6475   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
76
77   INTERRUPT_GEN_MEMBER(interrupt);
6578};
trunk/src/mame/includes/zx.h
r249940r249941
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
3124   zx_state(const machine_config &mconfig, device_type type, const char *tag)
3225      : driver_device(mconfig, type, tag),
3326      m_maincpu(*this, "maincpu"),
r249940r249941
4942
5043   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5144
52   bitmap_ind16 m_bitmap;
53
54   DECLARE_READ8_MEMBER(zx_ram_r);
45   DECLARE_READ8_MEMBER(ula_high_r);
46   DECLARE_READ8_MEMBER(ula_low_r);
47   DECLARE_WRITE16_MEMBER(refresh_w);
5548   DECLARE_READ8_MEMBER(zx80_io_r);
5649   DECLARE_READ8_MEMBER(zx81_io_r);
5750   DECLARE_READ8_MEMBER(pc8300_io_r);
5851   DECLARE_READ8_MEMBER(pow3000_io_r);
5952   DECLARE_WRITE8_MEMBER(zx80_io_w);
6053   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);
7854   DECLARE_DRIVER_INIT(zx);
7955   virtual void machine_reset();
8056   virtual void video_start();
8157   DECLARE_PALETTE_INIT(zx);
8258   DECLARE_PALETTE_INIT(ts1000);
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);
59   void zx_tape_input();
60   void zx_ula_hsync();
8961
62   UINT32 get_ram_size();
63
9064protected:
65   enum
66   {
67      TIMER_TAPE_INPUT,
68      TIMER_ULA_HSYNC
69   };
70
9171   required_device<cpu_device> m_maincpu;
9272   required_device<ram_device> m_ram;
9373   required_device<cassette_image_device> m_cassette;
94   required_device<speaker_sound_device> m_speaker;
74   optional_device<speaker_sound_device> m_speaker;
9575   required_memory_region m_region_maincpu;
9676   optional_memory_region m_region_gfx1;
9777   required_ioport m_io_row0;
r249940r249941
10585   optional_ioport m_io_config;
10686   required_device<screen_device> m_screen;
10787
108   void zx_ula_r(int offs, memory_region *region, const UINT8 param);
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
109103   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
104
105   void drop_sync();
106   void recalc_hsync();
110107};
111108
112109#endif /* ZX_H_ */
trunk/src/mame/layout/by17.lay
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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>
r249940r249941
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
r249940r249941
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>
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
527527      <disk state="0"><color red="0.0" green="0.25" blue="0.0" /></disk>
528528      <disk state="1"><color red="0.0" green="1.00" blue="0.0" /></disk>
529529   </element>
530   
531530
532531
532
533533<!-- Solenoids -->
534534
535535   <element name="Solenoid_PullDown">
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
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>
r249940r249941
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>
r249940r249941
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
r249940r249941
4747   save_item(NAME(line_buffer_pos));
4848   save_item(NAME(line_buffer_size));
4949
50   std::string skey = parameter("key").c_str();
50   std::string skey = parameter("key");
5151   if(!skey.empty())
5252      key = strtoll(skey.c_str(), 0, 16);
5353   else
trunk/src/mame/machine/apollo.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
3232{
3333   naomi_board::device_start();
3434
35   std::string skey = parameter("key").c_str();
35   std::string skey = parameter("key");
3636   if(!skey.empty())
3737      key = strtoll(skey.c_str(), 0, 16);
3838   else
trunk/src/mame/machine/osborne1.c
r249940r249941
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   }
r249940r249941
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   }
r249940r249941
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      switch( offset & 0x0F00 )
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 )
5659      {
5760      case 0x100: /* Floppy */
5861         data = m_fdc->read( space, offset & 0x03 );
r249940r249941
7578         /* Row 7 */
7679         if ( offset & 0x80 )    data &= m_row7->read();
7780         break;
81      case 0x400: /* SCREEN-PAC */
82         if (m_screen_pac) data &= 0xFB;
83         break;
7884      case 0x900: /* IEEE488 PIA */
79         data = m_pia0->read(space, offset & 0x03 );
85         data = m_pia0->read(space, offset & 0x03);
8086         break;
8187      case 0xA00: /* Serial */
8288         break;
8389      case 0xC00: /* Video PIA */
84         data = m_pia1->read(space, offset & 0x03 );
90         data = m_pia1->read(space, offset & 0x03);
8591         break;
8692      }
8793   }
r249940r249941
9197
9298WRITE8_MEMBER( osborne1_state::osborne1_2000_w )
9399{
100#if 0
94101   /* 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
95126   if ( ! m_bank2_enabled )
96127   {
97128      m_ram->pointer()[ 0x2000 + offset ] = data;
r249940r249941
103134         m_ram->pointer()[ 0x2000 + offset ] = data;
104135      }
105136      /* Handle writes to the I/O area */
106      switch( offset & 0x0F00 )
137      switch( offset & 0x1F00 )
107138      {
108139      case 0x100: /* Floppy */
109         m_fdc->write(space, offset & 0x03, data );
140         m_fdc->write(space, offset & 0x03, data);
110141         break;
142      case 0x400: /* SCREEN-PAC */
143         m_resolution = data & 0x01;
144         m_hc_left = (data >> 1) & 0x01;
145         break;
111146      case 0x900: /* IEEE488 PIA */
112147         m_pia0->write(space, offset & 0x03, data );
113148         break;
r249940r249941
118153         break;
119154      }
120155   }
156#endif
121157}
122158
123159
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
134160WRITE8_MEMBER( osborne1_state::osborne1_videoram_w )
135161{
136162   /* Check whether the video attribute section is enabled */
137   if ( m_bank3_enabled )
163   if ( m_bit_9 )
138164      data |= 0x7F;
139165
140   m_bank4_ptr[offset] = data;
166   reinterpret_cast<UINT8 *>(m_bank3->base())[offset] = data;
141167}
142168
143169
144170WRITE8_MEMBER( osborne1_state::osborne1_bankswitch_w )
145171{
146   switch( offset )
172   switch ( offset & 0x03 )
147173   {
148174   case 0x00:
149175      m_bank2_enabled = 1;
150      m_bank3_enabled = 0;
176      m_bankswitch = 0x00;
151177      break;
152178   case 0x01:
153179      m_bank2_enabled = 0;
154      m_bank3_enabled = 0;
180      m_bankswitch = 0x01;
155181      break;
156182   case 0x02:
157      m_bank2_enabled = 1;
158      m_bank3_enabled = 1;
183      m_bit_9 = 1;
159184      break;
160185   case 0x03:
161      m_bank2_enabled = 1;
162      m_bank3_enabled = 0;
186      m_bit_9 = 0;
163187      break;
164188   }
165189   if ( m_bank2_enabled )
166190   {
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 );
191      m_bank1->set_base(m_region_maincpu->base());
192      m_bank2->set_base(m_region_maincpu->base());
170193   }
171194   else
172195   {
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 );
196      m_bank1->set_base(m_ram->pointer());
197      m_bank2->set_base(m_ram->pointer() + 0x1000);
176198   }
177   m_bank4_ptr = m_ram->pointer() + ( ( m_bank3_enabled ) ? 0x10000 : 0xF000 );
178   m_bank4->set_base(m_bank4_ptr );
179   m_bankswitch = offset;
199   m_bank3->set_base(m_ram->pointer() + (m_bit_9 ? 0x10000 : 0xF000));
180200   m_in_irq_handler = 0;
181201}
182202
r249940r249941
336356
337357TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
338358{
339   int y = machine().first_screen()->vpos();
340   UINT8 ra=0,chr,gfx,dim;
341   UINT16 x,ma;
359   int const y = machine().first_screen()->vpos();
360   UINT8 ra=0;
342361
343362   /* Check for start of frame */
344363   if ( y == 0 )
r249940r249941
355374   {
356375      ra = y % 10;
357376      /* Draw a line of the display */
358      ma = (m_new_start_y + (y/10)) * 128 + m_new_start_x;
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);
359380      UINT16 *p = &m_bitmap.pix16(y);
360381
361      for ( x = 0; x < 52; x++ )
382      for ( UINT16 x = 0; x < (hires ? 104 : 52); x++ )
362383      {
363         chr = m_ram->pointer()[ 0xF000 + ( (ma+x) & 0xFFF ) ];
364         dim = m_ram->pointer()[ 0x10000 + ( (ma+x) & 0xFFF ) ] & 0x80;
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;
365387
366         if ( (chr & 0x80) && (ra == 9) )
367            gfx = 0xFF;
368         else
369            gfx = m_p_chargen[ (ra << 7) | ( chr & 0x7F ) ];
388         UINT8 const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[ (ra << 7) | (chr & 0x7F) ];
370389
371390         /* Display a scanline of a character */
372391         *p++ = BIT(gfx, 7) ? ( dim ? 2 : 1 ) : 0;
392         if (!hires) { p[0] = p[-1]; p++; }
373393         *p++ = BIT(gfx, 6) ? ( dim ? 2 : 1 ) : 0;
394         if (!hires) { p[0] = p[-1]; p++; }
374395         *p++ = BIT(gfx, 5) ? ( dim ? 2 : 1 ) : 0;
396         if (!hires) { p[0] = p[-1]; p++; }
375397         *p++ = BIT(gfx, 4) ? ( dim ? 2 : 1 ) : 0;
398         if (!hires) { p[0] = p[-1]; p++; }
376399         *p++ = BIT(gfx, 3) ? ( dim ? 2 : 1 ) : 0;
400         if (!hires) { p[0] = p[-1]; p++; }
377401         *p++ = BIT(gfx, 2) ? ( dim ? 2 : 1 ) : 0;
402         if (!hires) { p[0] = p[-1]; p++; }
378403         *p++ = BIT(gfx, 1) ? ( dim ? 2 : 1 ) : 0;
404         if (!hires) { p[0] = p[-1]; p++; }
379405         *p++ = BIT(gfx, 0) ? ( dim ? 2 : 1 ) : 0;
406         if (!hires) { p[0] = p[-1]; p++; }
380407      }
381408   }
382409
383   if ( (ra==2) || (ra== 6) )
410   if ( (ra==2) || (ra==6) )
384411   {
385412      m_beep->set_state( m_beep_state );
386413   }
r249940r249941
401428
402429void osborne1_state::machine_reset()
403430{
404   address_space& space = m_maincpu->space(AS_PROGRAM);
405431   /* Initialize memory configuration */
406   osborne1_bankswitch_w( space, 0x00, 0 );
432   osborne1_bankswitch_w( m_maincpu->space(AS_IO), 0x00, 0 );
407433
408434   m_pia_0_irq_state = FALSE;
409435   m_pia_1_irq_state = FALSE;
410436   m_in_irq_handler = 0;
411437
438   m_screen_pac = 0 != (m_cnf->read() & 0x01);
439   m_resolution = 0;
440   m_hc_left = 0;
412441   m_p_chargen = memregion( "chargen" )->base();
413442
414443   memset( m_ram->pointer() + 0x10000, 0xFF, 0x1000 );
415444
445   address_space& space = m_maincpu->space(AS_PROGRAM);
416446   space.set_direct_update_handler(direct_update_delegate(FUNC(osborne1_state::osborne1_opbase), this));
417447}
418448
419449
420450DRIVER_INIT_MEMBER(osborne1_state,osborne1)
421451{
422   m_empty_4K = auto_alloc_array(machine(), UINT8, 0x1000 );
423   memset( m_empty_4K, 0xFF, 0x1000 );
424
425452   /* Configure the 6850 ACIA */
426453//  acia6850_config( 0, &osborne1_6850_config );
427454   m_video_timer = timer_alloc(TIMER_VIDEO);
r249940r249941
495522   osborne1_state *state = machine().driver_data<osborne1_state>();
496523   /* Enable ROM and I/O when IRQ is acknowledged */
497524   UINT8 old_bankswitch = state->m_bankswitch;
498   address_space& space = state->m_maincpu->space(AS_PROGRAM);
499525
500   state->osborne1_bankswitch_w( space, 0, 0 );
526   state->osborne1_bankswitch_w( state->m_maincpu->space(AS_IO), 0, 0 );
501527   state->m_bankswitch = old_bankswitch;
502528   state->m_in_irq_handler = 1;
503529   return 0xF8;
trunk/src/mame/machine/psxcd.c
r249940r249941
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
r249940r249941
11// license:GPL-2.0+
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright Olivier Galibert, Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249940r249941
1010
1111#include "includes/zx.h"
1212
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)
13DRIVER_INIT_MEMBER(zx_state,zx)
2414{
25   UINT8 *RAM = m_region_maincpu->base();
26   RAM[offset + 0x4000] = data;
15   m_program = &m_maincpu->space(AS_PROGRAM);
16   m_tape_input = timer_alloc(TIMER_TAPE_INPUT);
2717
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   }
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);
3824}
3925
40/* I know this looks really pointless... but it has to be here */
41READ8_MEMBER( zx_state::zx_ram_r )
26void zx_state::machine_reset()
4227{
43   UINT8 *RAM = m_region_maincpu->base();
44   return RAM[offset | 0xc000];
45}
28   m_prev_refresh = 0xff;
4629
47DRIVER_INIT_MEMBER(zx_state,zx)
48{
49   address_space &space = m_maincpu->space(AS_PROGRAM);
30   m_vsync_active = false;
31   m_base_vsync_clock = 0;
32   m_ypos = 0;
5033
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}
34   m_nmi_on = false;
35   m_nmi_generator_active = false;
5536
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}
37   m_cassette_cur_level = 0;
6238
63DIRECT_UPDATE_MEMBER(zx_state::pc8300_setdirect)
64{
65   if (address & 0xc000)
66      zx_ula_r(address, m_region_gfx1, 0);
67   return address;
39   m_tape_input->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100));
6840}
6941
70DIRECT_UPDATE_MEMBER(zx_state::pow3000_setdirect)
42void zx_state::zx_tape_input()
7143{
72   if (address & 0xc000)
73      zx_ula_r(address, m_region_gfx1, 1);
74   return address;
44   m_cassette_cur_level = m_cassette->input();
7545}
7646
77void zx_state::machine_reset()
47void zx_state::drop_sync()
7848{
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}
49   if (m_vsync_active) {
50      UINT64 time = m_maincpu->total_cycles();
51      m_vsync_active = false;
52      m_cassette->output(-1.0);
8253
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}
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      }
8889
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;
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   }
93109}
94110
95TIMER_CALLBACK_MEMBER(zx_state::zx_tape_pulse)
96{
97   m_tape_bit = 0x80;
98}
99
100111READ8_MEMBER( zx_state::zx80_io_r )
101112{
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 */
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 */
104115
105116   UINT8 data = 0xff;
106   UINT8 offs = offset & 0xff;
107117
108   if (offs == 0xfe)
118   if (!(offset & 0x01))
109119   {
110120      if ((offset & 0x0100) == 0)
111121         data &= m_io_row0->read();
r249940r249941
129139
130140      m_cassette->output(+1.0);
131141
132      if (m_ula_irq_active)
133      {
134         zx_ula_bkgnd(0);
135         m_ula_irq_active = 0;
142      if (!m_vsync_active && !m_nmi_generator_active) {
143         m_vsync_active = true;
144         m_vsync_start_time = m_maincpu->total_cycles();
136145      }
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         }
144146
145         data &= ~m_tape_bit;
146//      }
147      if (m_ula_frame_vsync == 3)
148      {
149         m_ula_frame_vsync = 2;
150      }
147      if(m_cassette_cur_level <= 0)
148         data &= 0x7f;
151149   }
152150
153151   return data;
r249940r249941
160158    The upper 8 bits are used to select a keyboard scan line */
161159
162160   UINT8 data = 0xff;
163   UINT8 offs = offset & 0xff;
164161
165   if (offs == 0xfe)
162   if (!(offset & 0x01))
166163   {
167164      if ((offset & 0x0100) == 0)
168165         data &= m_io_row0->read();
r249940r249941
186183
187184      m_cassette->output(+1.0);
188185
189      if (m_ula_irq_active)
190      {
191         zx_ula_bkgnd(0);
192         m_ula_irq_active = 0;
186      if (!m_vsync_active && !m_nmi_generator_active) {
187         m_vsync_active = true;
188         m_vsync_start_time = m_maincpu->total_cycles();
193189      }
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         }
201190
202         data &= ~m_tape_bit;
203      }
204      if (m_ula_frame_vsync == 3)
205      {
206         m_ula_frame_vsync = 2;
207      }
191      if(m_cassette_cur_level <= 0)
192         data &= 0x7f;
208193   }
209194
210195   return data;
r249940r249941
248233         data &= m_io_row7->read();
249234
250235      m_cassette->output(+1.0);
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      }
236      if(m_cassette_cur_level <= 0)
237         data &= 0x7f;
271238   }
272239
273240   return data;
r249940r249941
316283         data &= m_io_row7->read();
317284
318285      m_cassette->output(+1.0);
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      }
286      if(m_cassette_cur_level <= 0)
287         data &= 0x7f;
339288   }
340289
341290   return data;
r249940r249941
360309    FE = turn on NMI generator
361310    FF = write HSYNC and cass data */
362311
363   int height = m_screen->height();
364   UINT8 offs = offset & 0xff;
365
366   if (offs == 0xfd)
367   {
368      m_ula_nmi->reset();
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();
369317   }
370   else
371   if (offs == 0xfe)
372   {
373      m_ula_nmi->adjust(attotime::zero, 0, m_maincpu->cycles_to_attotime(207));
374318
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());
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;
388324      }
389325   }
326
327   drop_sync();
390328}
trunk/src/mame/mess.lst
r249940r249941
8181picou    // 1994 Sega Pico (USA)
8282picoj    // 1993 Sega Pico (Japan)
8383copera  // 1993 Sega / Yamaha
84sawatte //
8485segacd  // 1992 Sega Sega CD (USA)
8586megacd  // 1993 Sega Mega-CD (Europe)
8687megacda // 1993 Sega Mega-CD (Asia)
r249940r249941
762763ataripc3
763764ssam88s
764765sicpc1605
766eagle1600
765767
766768// Non-PC msdos
767769pcd     // Siemens PC-D
r249940r249941
16621664
16631665// Exidy, Inc.
16641666sorcerer     // Sorcerer
1665sorcerer2   // monitor 1.1 1979
1667sorcerer2   // monitor 1.1 1979
16661668sorcererd    // Sorcerer with floppies
16671669
16681670// Galaksija
r249940r249941
27632765micral
27642766rd100
27652767proteus3
2768unichamp
trunk/src/mame/video/apple2.c
r249940r249941
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
r249940r249941
9393WRITE16_MEMBER( btoads_state::scroll0_w )
9494{
9595   /* allow multiple changes during display */
96   m_screen->update_now();
96//  m_screen->update_now();
97   m_screen->update_partial(m_screen->vpos());
9798
9899   /* upper bits are Y scroll, lower bits are X scroll */
99100   if (ACCESSING_BITS_8_15)
r249940r249941
106107WRITE16_MEMBER( btoads_state::scroll1_w )
107108{
108109   /* allow multiple changes during display */
109   m_screen->update_now();
110//  m_screen->update_now();
111   m_screen->update_partial(m_screen->vpos());
110112
111113   /* upper bits are Y scroll, lower bits are X scroll */
112114   if (ACCESSING_BITS_8_15)
trunk/src/mame/video/champbas.c
r249940r249941
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
39#include "emu.h"
410#include "video/resnet.h"
511#include "includes/champbas.h"
r249940r249941
2834   static const int resistances_rg[3] = { 1000, 470, 220 };
2935   static const int resistances_b [2] = { 470, 220 };
3036   double rweights[3], gweights[3], bweights[2];
31   int i;
3237
3338   /* compute the color output resistor weights */
3439   compute_resistor_weights(0, 255, -1.0,
r249940r249941
3742         2, &resistances_b[0],  bweights, 0, 0);
3843
3944   /* create a lookup table for the palette */
40   for (i = 0; i < 0x20; i++)
45   for (int i = 0; i < 0x20; i++)
4146   {
4247      int bit0, bit1, bit2;
4348      int r, g, b;
r249940r249941
6469
6570   color_prom += 0x20;
6671
67   for (i = 0; i < 0x200; i++)
72   for (int i = 0; i < 0x200; i++)
6873   {
6974      UINT8 ctabentry = (color_prom[i & 0xff] & 0x0f) | ((i & 0x100) >> 4);
7075      palette.set_pen_indirect(i, ctabentry);
r249940r249941
7580PALETTE_INIT_MEMBER(champbas_state,exctsccr)
7681{
7782   const UINT8 *color_prom = memregion("proms")->base();
78   int i;
7983
8084   /* create a lookup table for the palette */
81   for (i = 0; i < 0x20; i++)
85   for (int i = 0; i < 0x20; i++)
8286   {
8387      int bit0, bit1, bit2;
8488      int r, g, b;
r249940r249941
108112   color_prom += 0x20;
109113
110114   /* characters / sprites (3bpp) */
111   for (i = 0; i < 0x100; i++)
115   for (int i = 0; i < 0x100; i++)
112116   {
113117      int swapped_i = BITSWAP8(i, 2, 7, 6, 5, 4, 3, 1, 0);
114118      UINT8 ctabentry = (color_prom[swapped_i] & 0x0f) | ((i & 0x80) >> 3);
r249940r249941
116120   }
117121
118122   /* sprites (4bpp) */
119   for (i = 0; i < 0x100; i++)
123   for (int i = 0; i < 0x100; i++)
120124   {
121125      UINT8 ctabentry = (color_prom[0x100 + i] & 0x0f) | 0x10;
122126      palette.set_pen_indirect(i + 0x100, ctabentry);
r249940r249941
186190
187191void champbas_state::champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
188192{
189   int offs;
190193   gfx_element* const gfx = m_gfxdecode->gfx(1);
191194
192   for (offs = m_spriteram.bytes() - 2; offs >= 0; offs -= 2)
195   for (int offs = m_spriteram.bytes() - 2; offs >= 0; offs -= 2)
193196   {
194197      int code = (m_spriteram[offs] >> 2) | (m_gfx_bank << 6);
195198      int color = (m_spriteram[offs + 1] & 0x1f) | (m_palette_bank << 6);
r249940r249941
198201      int sx = m_spriteram_2[offs + 1] - 16;
199202      int sy = 255 - m_spriteram_2[offs];
200203
204      gfx->transmask(bitmap,cliprect,
205         code, color,
206         flipx, flipy,
207         sx, sy,
208         m_palette->transpen_mask(*gfx, color, 0));
201209
202            gfx->transmask(bitmap,cliprect,
203            code, color,
204            flipx, flipy,
205            sx, sy,
206            m_palette->transpen_mask(*gfx, color, 0));
207
208210      // wraparound
209
210            gfx->transmask(bitmap,cliprect,
211            code, color,
212            flipx, flipy,
213            sx + 256, sy,
214            m_palette->transpen_mask(*gfx, color, 0));
211      gfx->transmask(bitmap,cliprect,
212         code, color,
213         flipx, flipy,
214         sx + 256, sy,
215         m_palette->transpen_mask(*gfx, color, 0));
215216   }
216217}
217218
218219void champbas_state::exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
219220{
220   int offs;
221221   UINT8 *obj1, *obj2;
222222
223223   obj1 = m_bg_videoram;
224224   obj2 = &(m_spriteram[0x20]);
225225
226   for (offs = 0x0e; offs >= 0; offs -= 2)
226   for (int offs = 0x0e; offs >= 0; offs -= 2)
227227   {
228228      int sx, sy, code, bank, flipx, flipy, color;
229229
r249940r249941
236236      color = (obj1[offs + 1]) & 0x0f;
237237      bank = ((obj1[offs + 1] >> 4) & 1);
238238
239
240            m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
241            code + (bank << 6),
242            color,
243            flipx, flipy,
244            sx,sy,0);
239      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
240         code + (bank << 6),
241         color,
242         flipx, flipy,
243         sx,sy,0);
245244   }
246245
247246   obj1 = m_spriteram_2;
248247   obj2 = m_spriteram;
249248
250   for (offs = 0x0e; offs >= 0; offs -= 2)
249   for (int offs = 0x0e; offs >= 0; offs -= 2)
251250   {
252251      int sx, sy, code, flipx, flipy, color;
253252
r249940r249941
259258      flipy = (~obj1[offs]) & 0x02;
260259      color = (obj1[offs + 1]) & 0x0f;
261260
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));
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));
269267   }
270268}
271269
trunk/src/mame/video/cloak.c
r249940r249941
9292
9393WRITE8_MEMBER(cloak_state::cloak_clearbmp_w)
9494{
95   m_screen->update_now();
95//  m_screen->update_now();
96   m_screen->update_partial(m_screen->vpos());
97
9698   m_bitmap_videoram_selected = data & 0x01;
9799   set_current_bitmap_videoram_pointer();
98100
trunk/src/mame/video/decbac06.h
r249940r249941
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
r249940r249941
876876      radarscp_scanline(scanline);
877877
878878   /* update any video up to the current scanline */
879   m_screen->update_now();
879//  m_screen->update_now();
880   m_screen->update_partial(m_screen->vpos());
880881
881882   scanline = (scanline+1) % VTOTAL;
882883   /* come back at the next appropriate scanline */
trunk/src/mame/video/galaxian.c
r249940r249941
480480{
481481   UINT8 *videoram = m_videoram;
482482   /* update any video up to the current scanline */
483   m_screen->update_now();
483//  m_screen->update_now();
484   m_screen->update_partial(m_screen->vpos());
484485
485486   /* store the data and mark the corresponding tile dirty */
486487   videoram[offset] = data;
r249940r249941
491492WRITE8_MEMBER(galaxian_state::galaxian_objram_w)
492493{
493494   /* update any video up to the current scanline */
494   m_screen->update_now();
495//  m_screen->update_now();
496   m_screen->update_partial(m_screen->vpos());
495497
496498   /* store the data */
497499   m_spriteram[offset] = data;
r249940r249941
641643{
642644   if (m_flipscreen_x != (data & 0x01))
643645   {
644      m_screen->update_now();
646//      m_screen->update_now();
647      m_screen->update_partial(m_screen->vpos());
645648
646649      /* when the direction changes, we count a different number of clocks */
647650      /* per frame, so we need to reset the origin of the stars to the current */
r249940r249941
657660{
658661   if (m_flipscreen_y != (data & 0x01))
659662   {
660      m_screen->update_now();
663//      m_screen->update_now();
664      m_screen->update_partial(m_screen->vpos());
665
661666      m_flipscreen_y = data & 0x01;
662667      m_bg_tilemap->set_flip((m_flipscreen_x ? TILEMAP_FLIPX : 0) | (m_flipscreen_y ? TILEMAP_FLIPY : 0));
663668   }
r249940r249941
680685WRITE8_MEMBER(galaxian_state::galaxian_stars_enable_w)
681686{
682687   if ((m_stars_enabled ^ data) & 0x01)
683      m_screen->update_now();
688   {
689//      m_screen->update_now();
690      m_screen->update_partial(m_screen->vpos());
691   }
684692
685693   if (!m_stars_enabled && (data & 0x01))
686694   {
r249940r249941
697705WRITE8_MEMBER(galaxian_state::scramble_background_enable_w)
698706{
699707   if ((m_background_enable ^ data) & 0x01)
700      m_screen->update_now();
708   {
709   //  m_screen->update_now();
710      m_screen->update_partial(m_screen->vpos());
711   }
701712
702713   m_background_enable = data & 0x01;
703714}
r249940r249941
706717WRITE8_MEMBER(galaxian_state::scramble_background_red_w)
707718{
708719   if ((m_background_red ^ data) & 0x01)
709      m_screen->update_now();
720   {
721   //  m_screen->update_now();
722      m_screen->update_partial(m_screen->vpos());
723   }
710724
711725   m_background_red = data & 0x01;
712726}
r249940r249941
715729WRITE8_MEMBER(galaxian_state::scramble_background_green_w)
716730{
717731   if ((m_background_green ^ data) & 0x01)
718      m_screen->update_now();
732   {
733   //  m_screen->update_now();
734      m_screen->update_partial(m_screen->vpos());
735   }
719736
720737   m_background_green = data & 0x01;
721738}
r249940r249941
724741WRITE8_MEMBER(galaxian_state::scramble_background_blue_w)
725742{
726743   if ((m_background_blue ^ data) & 0x01)
727      m_screen->update_now();
744   {
745   //  m_screen->update_now();
746      m_screen->update_partial(m_screen->vpos());
747   }
728748
729749   m_background_blue = data & 0x01;
730750}
r249940r249941
741761{
742762   if (m_gfxbank[offset] != data)
743763   {
744      m_screen->update_now();
764      //m_screen->update_now();
765      m_screen->update_partial(m_screen->vpos());
745766      m_gfxbank[offset] = data;
746767      m_bg_tilemap->mark_all_dirty();
747768   }
trunk/src/mame/video/gic.c
r0r249941
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
r0r249941
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
r249940r249941
9393
9494WRITE8_MEMBER(gyruss_state::gyruss_spriteram_w)
9595{
96   m_screen->update_now();
96//  m_screen->update_now();
97   m_screen->update_partial(m_screen->vpos());
9798   m_spriteram[offset] = data;
9899}
99100
trunk/src/mame/video/hng64.c
r249940r249941
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
r249940r249941
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)
r249940r249941
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
r249940r249941
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
r249940r249941
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;
r249940r249941
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;
r249940r249941
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
r249940r249941
596596
597597   if (floorModeBit == 0x0000)
598598   {
599        // floor mode
600        // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well
599      // floor mode
600      // life would be easier if the roz we're talking about for complex zoom wasn't setting this as well
601601
602        // fprintf(stderr, "Tilemap %d is a floor using :\n", tm);
603        const UINT32 floorAddress = 0x40000 + (scrollbase << 4);
602      // fprintf(stderr, "Tilemap %d is a floor using :\n", tm);
603      const UINT32 floorAddress = 0x40000 + (scrollbase << 4);
604604
605        // TODO: The row count is correct, but how is this layer clipped? m_tcram?
606       
607        // See how many lines we have in the data region
608        // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now
609        //int lineCount = 0;
610        //for (int ii = 0; ii < 0x2000/4; ii += 4)
611        //{
612        //    const int realAddress = floorAddress/4;
613        //    if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00)
614        //        continue;
615        //    if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000)
616        //        continue;
617        //   
618        //    lineCount++;
619        //}
620        //printf("lines %d\n", lineCount);
605      // TODO: The row count is correct, but how is this layer clipped? m_tcram?
621606
622        // Buriki uses a 2x mosaic effect on its floor, so its line count is half
623        // (but so does fatfurwa - maybe it overdraws a bunch of pixels?)
624        //if (m_mcu_type == BURIKI_MCU)
625        //    lineCount *= 2;
607      // See how many lines we have in the data region
608      // DEBUG: Change this to a loop that goes over each line and draws them - it's just for visualization now
609      //int lineCount = 0;
610      //for (int ii = 0; ii < 0x2000/4; ii += 4)
611      //{
612      //    const int realAddress = floorAddress/4;
613      //    if (m_videoram[realAddress+ii] == 0xffffff00 && m_videoram[realAddress+ii+1] == 0xffffff00)
614      //        continue;
615      //    if (m_videoram[realAddress+ii] == 0x00000000 && m_videoram[realAddress+ii+1] == 0x00000000)
616      //        continue;
617      //
618      //    lineCount++;
619      //}
620      //printf("lines %d\n", lineCount);
626621
627        // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn
628        const rectangle &visarea = screen.visible_area();
629        //if (lineCount < visarea.height())
630        //{
631        //    for (int ii = 0; ii < visarea.width(); ii++)
632        //        bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00;
633        //}
634       
635        // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does)
636        //        Figure out what the difference between the two programs is.  It's possible writing to
637        //        the linescroll ram fills a buffer and it's cleared automatically between frames?
638        for (int ii = 0; ii < 0x2000/4; ii++)
639        {
640            const int realAddress = floorAddress/4;
641            m_videoram[realAddress+ii] = 0x00000000;
642        }
643       
644       
645        // Floor mode - per pixel simple / complex modes? -- every other line?
622      // Buriki uses a 2x mosaic effect on its floor, so its line count is half
623      // (but so does fatfurwa - maybe it overdraws a bunch of pixels?)
624      //if (m_mcu_type == BURIKI_MCU)
625      //    lineCount *= 2;
626
627      // DEBUG - draw a horizontal green line where the uppermost line of the floor is drawn
628      const rectangle &visarea = screen.visible_area();
629      //if (lineCount < visarea.height())
630      //{
631      //    for (int ii = 0; ii < visarea.width(); ii++)
632      //        bitmap.pix32((visarea.height()-lineCount), ii) = 0xff00ff00;
633      //}
634
635      // HACK : Clear RAM - this is "needed" in fatfurwa since it doesn't clear its own ram (buriki does)
636      //        Figure out what the difference between the two programs is.  It's possible writing to
637      //        the linescroll ram fills a buffer and it's cleared automatically between frames?
638      for (int ii = 0; ii < 0x2000/4; ii++)
639      {
640         const int realAddress = floorAddress/4;
641         m_videoram[realAddress+ii] = 0x00000000;
642      }
643
644
645      // Floor mode - per pixel simple / complex modes? -- every other line?
646646      //  (there doesn't seem to be enough data in Buriki for every line at least)
647647      rectangle clip = visarea;
648648
r249940r249941
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
r249940r249941
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;
r249940r249941
913913
914914UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
915915{
916
917916#if 1
918917   // press in sams64_2 attract mode for a nice debug screen from the game
919918   // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.)
r249940r249941
939938#endif
940939
941940
942    // Initialize some buffers
941   // Initialize some buffers
943942   bitmap.fill(m_tcram[0x50/4] & 0x10000 ? m_palette->black_pen() : m_palette->pen(0), cliprect); //FIXME: Is the register correct? check with HW tests
944943   screen.priority().fill(0x00, cliprect);
945944
946    // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
945   // If the screen is disabled, don't draw anything (m_screen_dis is a shady variable at best)
947946   if (m_screen_dis)
948947      return 0;
949948
950949   // If the auto-animation mask or bits have changed search for tiles using them and mark as dirty
951    const UINT32 animmask = m_videoregs[0x0b];
950   const UINT32 animmask = m_videoregs[0x0b];
952951   const UINT32 animbits = m_videoregs[0x0c];
953952   if ((m_old_animmask != animmask) || (m_old_animbits != animbits))
954953   {
r249940r249941
977976      m_old_animbits = animbits;
978977   }
979978
980    // If any magic bits have been touched, mark every tilemap dirty
981    UINT16 tileflags[4];
982    tileflags[0] = m_videoregs[0x02] >> 16;
979   // If any magic bits have been touched, mark every tilemap dirty
980   UINT16 tileflags[4];
981   tileflags[0] = m_videoregs[0x02] >> 16;
983982   tileflags[1] = m_videoregs[0x02] & 0xffff;
984983   tileflags[2] = m_videoregs[0x03] >> 16;
985984   tileflags[3] = m_videoregs[0x03] & 0xffff;
986    const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
985   const UINT16 IMPORTANT_DIRTY_TILEFLAG_MASK = 0x0600;
987986   for (int i = 0; i < 4; i++)
988987   {
989988      if ((m_old_tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK) != (tileflags[i] & IMPORTANT_DIRTY_TILEFLAG_MASK))
r249940r249941
993992      }
994993   }
995994
996    // Draw the four tilemaps
995   // Draw the four tilemaps
997996   hng64_drawtilemap(screen,bitmap,cliprect, 3);
998997   hng64_drawtilemap(screen,bitmap,cliprect, 2);
999998   hng64_drawtilemap(screen,bitmap,cliprect, 1);
r249940r249941
10211020      }
10221021   }
10231022
1024    // Draw the sprites on top of everything
1023   // Draw the sprites on top of everything
10251024   draw_sprites(screen, bitmap, cliprect);
10261025
1027    // Layer the global frame buffer operations on top of everything
1028    // transition_control(bitmap, cliprect);
1026   // Layer the global frame buffer operations on top of everything
1027   // transition_control(bitmap, cliprect);
10291028
1030   
1029
10311030#if HNG64_VIDEO_DEBUG
10321031   if (0)
10331032      popmessage("%08x %08x %08x %08x %08x", m_spriteregs[0], m_spriteregs[1], m_spriteregs[2], m_spriteregs[3], m_spriteregs[4]);
r249940r249941
10361035   popmessage("%08x %08x TR(%04x %04x %04x %04x) SB(%04x %04x %04x %04x) %08x %08x %08x %08x %08x AA(%08x %08x) %08x",
10371036      m_videoregs[0x00],
10381037      m_videoregs[0x01],
1039        (m_videoregs[0x02]>>16)&0xffff,
1040        (m_videoregs[0x02]>>0)&0xffff,  //       ss64_2 debug mode indicates that 0x0040 is enable!
1041        (m_videoregs[0x03]>>16)&0xffff, //       buriki agrees (debug data on text layer) xrally agress (pink layer)
1042        (m_videoregs[0x03]>>0)&0xffff,  //       fatal fury doesn't (all backgrounds have it set) joy
1043        (m_videoregs[0x04]>>16)&0xffff,
1044        (m_videoregs[0x04]>>0)&0xffff,
1045        (m_videoregs[0x05]>>16)&0xffff,
1046        (m_videoregs[0x05]>>0)&0xffff,
1038      (m_videoregs[0x02]>>16)&0xffff,
1039      (m_videoregs[0x02]>>0)&0xffff,  //       ss64_2 debug mode indicates that 0x0040 is enable!
1040      (m_videoregs[0x03]>>16)&0xffff, //       buriki agrees (debug data on text layer) xrally agress (pink layer)
1041      (m_videoregs[0x03]>>0)&0xffff,  //       fatal fury doesn't (all backgrounds have it set) joy
1042      (m_videoregs[0x04]>>16)&0xffff,
1043      (m_videoregs[0x04]>>0)&0xffff,
1044      (m_videoregs[0x05]>>16)&0xffff,
1045      (m_videoregs[0x05]>>0)&0xffff,
10471046      m_videoregs[0x06],
10481047      m_videoregs[0x07],
10491048      m_videoregs[0x08],
r249940r249941
11071106      popmessage("blend changed %02x", m_additive_tilemap_debug);
11081107   }
11091108#endif
1110   
1109
11111110   return 0;
11121111}
11131112
trunk/src/mame/video/hng64_3d.c
r249940r249941
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)
r249940r249941
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}
r249940r249941
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
r249940r249941
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);
r249940r249941
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
r249940r249941
369369   UINT32 size[4];
370370   UINT32 address[4];
371371   UINT32 megaOffset;
372    polygon lastPoly = { 0 };
372   polygon lastPoly = { 0 };
373373
374374
375375   //////////////////////////////////////////////////////////
r249940r249941
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;
r249940r249941
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         {
r249940r249941
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
r249940r249941
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         {
r249940r249941
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...
r249940r249941
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
r249940r249941
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
r249940r249941
537537WRITE8_MEMBER(itech8_state::grmatch_xscroll_w)
538538{
539539   /* update the X scroll value */
540   m_screen->update_now();
540   //m_screen->update_now();
541   m_screen->update_partial(m_screen->vpos());
541542   m_grmatch_xscroll = data;
542543}
543544
trunk/src/mame/video/m72.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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)
r249940r249941
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
r249940r249941
6464
6565WRITE8_MEMBER(meadows_state::meadows_spriteram_w)
6666{
67   m_screen->update_now();
67//  m_screen->update_now();
68   m_screen->update_partial(m_screen->vpos());
6869   m_spriteram[offset] = data;
6970}
7071
trunk/src/mame/video/mikromik.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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++)
r249940r249941
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();
r249940r249941
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();
r249940r249941
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
r249940r249941
9999{
100100   /* update the screen in case the game is writing "behind" the beam -
101101      Zookeeper likes to do this */
102   m_screen->update_now();
102//  m_screen->update_now();
103   m_screen->update_partial(m_screen->vpos());
103104
104105   /* add in the upper bit of the address latch */
105106   offset += (m_videoram_address[0] & 0x80) << 8;
r249940r249941
113114{
114115   /* update the screen in case the game is writing "behind" the beam -
115116      Zookeeper likes to do this */
116   m_screen->update_now();
117//  m_screen->update_now();
118   m_screen->update_partial(m_screen->vpos());
117119
118120   /* add in the upper bit of the address latch */
119121   offset += (m_videoram_address[0] & 0x80) << 8;
r249940r249941
150152WRITE8_MEMBER(qix_state::qix_addresslatch_w)
151153{
152154   /* update the screen in case the game is writing "behind" the beam */
153   m_screen->update_now();
155//  m_screen->update_now();
156   m_screen->update_partial(m_screen->vpos());
154157
155158   /* compute the value at the address latch */
156159   offset = (m_videoram_address[0] << 8) | m_videoram_address[1];
r249940r249941
163166WRITE8_MEMBER(qix_state::slither_addresslatch_w)
164167{
165168   /* update the screen in case the game is writing "behind" the beam */
166   m_screen->update_now();
169//  m_screen->update_now();
170   m_screen->update_partial(m_screen->vpos());
167171
168172   /* compute the value at the address latch */
169173   offset = (m_videoram_address[0] << 8) | m_videoram_address[1];
r249940r249941
191195   /* trigger an update if a currently visible pen has changed */
192196   if (((offset >> 8) == m_palette_bank) &&
193197      (old_data != data))
194      m_screen->update_now();
198   {
199   //  m_screen->update_now();
200      m_screen->update_partial(m_screen->vpos());
201   }
195202
196203   set_pen(offset);
197204}
r249940r249941
202209   /* set the bank value */
203210   if (m_palette_bank != (data & 3))
204211   {
205      m_screen->update_now();
212      //m_screen->update_now();
213      m_screen->update_partial(m_screen->vpos());
206214      m_palette_bank = data & 3;
207215   }
208216
trunk/src/mame/video/sega16sp.c
r249940r249941
10411041sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
10421042   : sega_outrun_sprite_device(mconfig, tag, owner, clock, true, "sega_xboard_sprite", __FILE__)
10431043{
1044
10451044}
10461045
10471046
r249940r249941
10861085   //            ----cccc cccc----  Sprite color palette
10871086   //            -------- ----llll  4-bit pixel data
10881087   //
1089   
1088
10901089   set_origin(m_xoffs, m_yoffs);
10911090
10921091   // render the sprites in order
trunk/src/mame/video/segaic16.c
r249940r249941
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
r249940r249941
1919
2020WRITE8_MEMBER(spacefb_state::port_0_w)
2121{
22   m_screen->update_now();
22//  m_screen->update_now();
23   m_screen->update_partial(m_screen->vpos());
2324   m_port_0 = data;
2425}
2526
2627
2728WRITE8_MEMBER(spacefb_state::port_2_w)
2829{
29   m_screen->update_now();
30//  m_screen->update_now();
31   m_screen->update_partial(m_screen->vpos());
3032   m_port_2 = data;
3133}
3234
trunk/src/mame/video/system1.c
r249940r249941
190190
191191READ8_MEMBER(system1_state::system1_mixer_collision_r)
192192{
193   m_screen->update_now();
193//  m_screen->update_now();
194   m_screen->update_partial(m_screen->vpos());
194195   return m_mix_collide[offset & 0x3f] | 0x7e | (m_mix_collide_summary << 7);
195196}
196197
197198WRITE8_MEMBER(system1_state::system1_mixer_collision_w)
198199{
199   m_screen->update_now();
200//  m_screen->update_now();
201   m_screen->update_partial(m_screen->vpos());
200202   m_mix_collide[offset & 0x3f] = 0;
201203}
202204
203205WRITE8_MEMBER(system1_state::system1_mixer_collision_reset_w)
204206{
205   m_screen->update_now();
207//  m_screen->update_now();
208   m_screen->update_partial(m_screen->vpos());
206209   m_mix_collide_summary = 0;
207210}
208211
r249940r249941
216219
217220READ8_MEMBER(system1_state::system1_sprite_collision_r)
218221{
219   m_screen->update_now();
222//  m_screen->update_now();
223   m_screen->update_partial(m_screen->vpos());
220224   return m_sprite_collide[offset & 0x3ff] | 0x7e | (m_sprite_collide_summary << 7);
221225}
222226
223227WRITE8_MEMBER(system1_state::system1_sprite_collision_w)
224228{
225   m_screen->update_now();
229//  m_screen->update_now();
230   m_screen->update_partial(m_screen->vpos());
226231   m_sprite_collide[offset & 0x3ff] = 0;
227232}
228233
229234WRITE8_MEMBER(system1_state::system1_sprite_collision_reset_w)
230235{
231   m_screen->update_now();
236//  m_screen->update_now();
237   m_screen->update_partial(m_screen->vpos());
232238   m_sprite_collide_summary = 0;
233239}
234240
r249940r249941
274280
275281   /* force a partial update if the page is changing */
276282   if (m_tilemap_pages > 2 && offset >= 0x740 && offset < 0x748 && offset % 2 == 0)
277      m_screen->update_now();
283   {
284      //m_screen->update_now();
285      m_screen->update_partial(m_screen->vpos());
286   }
278287}
279288
280289WRITE8_MEMBER(system1_state::system1_videoram_bank_w)
trunk/src/mame/video/timeplt.c
r249940r249941
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));
128131}
129132
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
130139VIDEO_START_MEMBER(timeplt_state,chkun)
131140{
132141   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);
r249940r249941
140149 *
141150 *************************************/
142151
143WRITE8_MEMBER(timeplt_state::timeplt_videoram_w)
152WRITE8_MEMBER(timeplt_state::videoram_w)
144153{
145154   m_videoram[offset] = data;
146155   m_bg_tilemap->mark_tile_dirty(offset);
147156}
148157
149158
150WRITE8_MEMBER(timeplt_state::timeplt_colorram_w)
159WRITE8_MEMBER(timeplt_state::colorram_w)
151160{
152161   m_colorram[offset] = data;
153162   m_bg_tilemap->mark_tile_dirty(offset);
154163}
155164
156165
157WRITE8_MEMBER(timeplt_state::timeplt_flipscreen_w)
166WRITE8_MEMBER(timeplt_state::flipscreen_w)
158167{
159168   flip_screen_set(~data & 1);
160169}
161170
171WRITE8_MEMBER(timeplt_state::video_enable_w)
172{
173   m_video_enable = data & 1;
174}
162175
163READ8_MEMBER(timeplt_state::timeplt_scanline_r)
176READ8_MEMBER(timeplt_state::scanline_r)
164177{
165178   return m_screen->vpos();
166179}
r249940r249941
175188
176189void timeplt_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
177190{
178   UINT8 *spriteram = m_spriteram;
179   UINT8 *spriteram_2 = m_spriteram2;
180   int offs;
181
182   for (offs = 0x3e;offs >= 0x10;offs -= 2)
191   for (int offs = 0x3e;offs >= 0x10;offs -= 2)
183192   {
184      int sx = spriteram[offs];
185      int sy = 241 - spriteram_2[offs + 1];
193      int sx = m_spriteram[offs];
194      int sy = 241 - m_spriteram2[offs + 1];
186195
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;
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;
191200
192201      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
193202            code,
r249940r249941
205214 *
206215 *************************************/
207216
208UINT32 timeplt_state::screen_update_timeplt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
217UINT32 timeplt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
209218{
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);
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   }
213225   return 0;
214226}
trunk/src/mame/video/tp84.c
r249940r249941
106106WRITE8_MEMBER(tp84_state::tp84_spriteram_w)
107107{
108108   /* the game multiplexes the sprites, so update now */
109   m_screen->update_now();
109//  m_screen->update_now();
110   m_screen->update_partial(m_screen->vpos());
110111   m_spriteram[offset] = data;
111112}
112113
trunk/src/mame/video/zx.c
r249940r249941
11// license:GPL-2.0+
2// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert
2// copyright-holders: Olivier Galibert, Juergen Buchmueller, Krzysztof Strzecha, Robbbert
33/***************************************************************************
44    zx.c
55
r249940r249941
2525{
2626   switch (id)
2727   {
28   case TIMER_TAPE_PULSE:
29      zx_tape_pulse(ptr, param);
28   case TIMER_TAPE_INPUT:
29      zx_tape_input();
3030      break;
31   case TIMER_ULA_NMI:
32      zx_ula_nmi(ptr, param);
31   case TIMER_ULA_HSYNC:
32      zx_ula_hsync();
3333      break;
34   case TIMER_ULA_IRQ:
35      zx_ula_irq(ptr, param);
36      break;
3734   default:
3835      assert_always(FALSE, "Unknown id in zx_state::device_timer");
3936   }
4037}
4138
4239
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)
40void zx_state::zx_ula_hsync()
5241{
53   int width = m_screen->width();
54   int height = m_screen->height();
55   const rectangle &visarea = m_screen->visible_area();
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}
5651
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;
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;
8372      }
84      m_old_x = (new_x + 1) % width;
85      m_old_y = new_y;
86      m_old_c = color;
73      m_ula_char_buffer = 0xffff;
8774   }
8875}
8976
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)
77void zx_state::recalc_hsync()
10278{
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;
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   }   
11090
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;
91   m_ula_hsync->adjust(m_maincpu->cycles_to_attotime(delta));
11892}
11993
120TIMER_CALLBACK_MEMBER(zx_state::zx_ula_irq)
94READ8_MEMBER(zx_state::ula_low_r)
12195{
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));
96   UINT8 cdata = m_program->read_byte(offset);
97   if(space.debugger_access())
98      return cdata;
13099
131      m_ula_irq_active = 0;
132      m_maincpu->set_input_line(0, HOLD_LINE);
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);
133108   }
109   return cdata;
134110}
135111
136void zx_state::zx_ula_r(int offs, memory_region *region, const UINT8 param)
112READ8_MEMBER(zx_state::ula_high_r)
137113{
138   int offs0 = offs & 0x7fff;
139   UINT8 *rom = m_region_maincpu->base();
140   UINT8 chr = rom[offs0];
114   UINT8 cdata = m_program->read_byte(offset);
141115
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;
116   if(space.debugger_access())
117      return cdata;
148118
149      if (param)
150         creg = m_maincpu->state_int(Z80_B);
151      else
152         creg = m_maincpu->state_int(Z80_C);
119   if(m_maincpu->state_int(Z80_HALT))
120      return cdata;
153121
154      chrgen = region->base();
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   }
155128
156      if ((++m_ula_scanline_count == m_screen->height()) || (creg == 32))
157      {
158         m_ula_scanline_count = 0;
159         m_offs1 = offs0;
160      }
129   if(cdata & 0x40)
130      return cdata;
161131
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   }
132   m_ula_char_buffer = cdata;
133   return 0x00; // nop
199134}
200135
201136void zx_state::video_start()
202137{
203   m_ula_nmi = timer_alloc(TIMER_ULA_NMI);
204   m_ula_irq_active = 0;
205   m_screen->register_screen_bitmap(m_bitmap);
206}
138   m_ula_hsync = timer_alloc(TIMER_ULA_HSYNC);
139   m_ula_char_buffer = 0xffff;
207140
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   }
141   m_bitmap_render = auto_bitmap_ind16_alloc(machine(), 384, 311);
142   m_bitmap_buffer = auto_bitmap_ind16_alloc(machine(), 384, 311);
217143}
218144
219145UINT32 zx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
220146{
221   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
147   copybitmap(bitmap, *m_bitmap_buffer, 0, 0, 0, 0, cliprect);
222148   return 0;
223149}
trunk/src/osd/modules/debugger/osx/debugview.m
r249940r249941
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:@{}] forType:NSRTFPboardType];
407   [board setData:[text RTFFromRange:run documentAttributes:[NSDictionary dictionary]] forType:NSRTFPboardType];
408408   [text deleteCharactersInRange:run];
409409}
410410
trunk/src/osd/modules/render/d3d/d3dhlsl.c
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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
r249940r249941
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();
99   video_config.beamwidth = options().beam_width_min();
100100
101101   // initialize the window system so we can make windows
102102   if (!window_init())
trunk/src/osd/windows/input.c
r249940r249941
18261826{
18271827   device_info *devinfo = NULL;
18281828   TCHAR *tname = NULL;
1829   INT name_length;
1829   INT name_length = 0;
18301830
1831   // determine the length of the device name, allocate it, and fetch it
1831   // determine the length of the device name, allocate it, and fetch it if not nameless
18321832   if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, NULL, &name_length) != 0)
18331833      goto error;
1834   tname = global_alloc_array(TCHAR, name_length);
1835   if ((*get_rawinput_device_info)(device->hDevice, RIDI_DEVICENAME, tname, &name_length) == -1)
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)
18361836      goto error;
18371837
18381838   // if this is an RDP name, skip it
trunk/src/osd/windows/winfile.c
r249940r249941
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
r249940r249941
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.166"
11#define BARE_BUILD_VERSION "0.167"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team