Previous 199869 Revisions Next

r34192 Thursday 25th December, 2014 at 20:06:30 UTC by Luca Bruno
luaengine: add screen drawing/HUD capabilities

This commit allows LUA scripts to implement HUD capabilities,
by overlaying elements (lines, boxes, text) to screen.
Mostly used to draw custom graphic helpers for trainings and
TAS runs development.

Signed-off-by: Luca Bruno <lucab@debian.org>
[/trunk]makefile
[hash]adam_cass.xml adam_flop.xml apollo_ctape.xml archimedes.xml gamate.xml gba.xml gbcolor.xml megacdj.xml megadriv.xml mtx_cass.xml n64.xml neogeo.xml nes.xml pc98.xml pico.xml sms.xml sol20_cass.xml timex_dock.xml vz_cass.xml
[src]version.c
[src/build]build.mak
[src/emu]emucore.h luaengine.c luaengine.h machine.c render.c render.h rendersw.inc rendlay.c rendlay.h
[src/emu/bus]bus.mak
[src/emu/bus/a8sio]a8sio.c a8sio.h cassette.c cassette.h
[src/emu/bus/abckb]abc99.c
[src/emu/bus/centronics]epson_lx810l.c
[src/emu/bus/dmv]k220.c
[src/emu/bus/gamegear]gear2gear.c gear2gear.h smsctrladp.c smsctrladp.h
[src/emu/bus/ieee488]c8050fdc.c
[src/emu/bus/isa]cga.c sc499.h
[src/emu/bus/megadrive]md_slot.c rom.c
[src/emu/bus/sega8]rom.c rom.h
[src/emu/bus/sms_ctrl]multitap.c sportsjp.c sportsjp.h
[src/emu/cpu]cpu.mak
[src/emu/cpu/arc]arc.c arcdasm.c
[src/emu/cpu/arcompact]arcompact.c arcompact.h arcompact_common.c arcompact_common.h arcompact_execute.c arcompact_make.py arcompactdasm.c arcompactdasm_dispatch.c arcompactdasm_dispatch.h arcompactdasm_ops.c arcompactdasm_ops.h
[src/emu/cpu/h8]h8_sci.c h8_timer16.c
[src/emu/cpu/m68000]m68000.h m68k_in.c m68kcpu.c m68kdasm.c m68kfpu.inc
[src/emu/cpu/pps4]pps4.c pps4.h pps4dasm.c
[src/emu/cpu/sh2]sh2comn.c
[src/emu/cpu/tms0980]tms0980.c tms0980.h
[src/emu/machine]8530scc.c am9517a.c e05a30.c i6300esb.c i82875p.h r10696.c r10696.h r10788.c r10788.h ra17xx.c ra17xx.h smpc.c steppers.c steppers.h z80dart.c z80dma.c
[src/emu/netlist]nl_base.h
[src/emu/netlist/analog]nld_ms_direct.h nld_ms_gauss_seidel.h nld_opamps.c nld_solver.c nld_solver.h
[src/emu/netlist/devices]net_lib.c nld_4020.c nld_cmos.h nld_system.h
[src/emu/sound]pokey.c pokey.h tms5110.c
[src/emu/video]315_5124.c snes_ppu.c snes_ppu.h stvvdp2.c tea1002.c tea1002.h video.mak
[src/lib]lib.mak
[src/lib/formats]ap2_dsk.c ap_dsk35.c coco_cas.c cpis_dsk.c d88_dsk.c dcp_dsk.c dim_dsk.c dip_dsk.c dsk_dsk.c fdd_dsk.c imd_dsk.c m20_dsk.c nfd_dsk.c pasti_dsk.c victor9k_dsk.c
[src/lib/util]chd.c chd.h coretmpl.h palette.h
[src/mame]mame.lst
[src/mame/audio]dkong.c
[src/mame/drivers]5clown.c aleck64.c asteroid.c atvtrack.c barata.c bfm_sc1.c bfm_sc2.c bfm_sc4.c bfm_sc4h.c bwidow.c chihiro.c cps1.c cps2.c cultures.c dreamwld.c ecoinfr.c f-32.c galpani2.c gts1.c gundealr.c igs009.c jpmimpct.c ksys573.c lindbergh.c maygay1b.c maygay1bsw.c metro.c mjkjidai.c mpu3.c mpu4.c mpu4hw.c namcops2.c overdriv.c relief.c renegade.c sbrkout.c segahang.c segas16b.c snowbros.c sprint2.c taito_f3.c tigeroad.c vicdual.c viper.c wallc.c wrally.c yunsun16.c zac2650.c zaccaria.c
[src/mame/includes]asteroid.h bionicc.h chihiro.h galaxold.h renegade.h scramble.h sprint2.h yunsun16.h zac2650.h zaccaria.h
[src/mame/machine]asteroid.c atarigen.c cps2crpt.c scramble.c snes.c
[src/mame/video]chihiro.c galaxold.c galpani2.c k001005.c segaic16.c tigeroad.c tigeroad_spr.c zac2650.c zaccaria.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]altos5.c amaztron.c aquarius.c atari400.c bitgraph.c c128.c cnsector.c comp4.c ec184x.c excali64.c gamate.c hp16500.c hp9k_3xx.c intv.c leapster.c mac.c mathmagi.c mbee.c mc1502.c megadriv.c merlin.c nes.c ngen.c sage2.c sdk86.c simon.c sms.c starwbc.c stopthie.c super6.c tandy12.c ticalc1x.c tispeak.c trs80.c unk3403.c victor9k.c vt240.c
[src/mess/includes]aquarius.h sms.h victor9k.h
[src/mess/layout]amaztron.lay starwbc.lay
[src/mess/machine]gamecom.c mac.c ngen_kb.c pce_cd.c sms.c trs80.c victor9k_fdc.c victor9kb.c
[src/mess/tools/castool]castool.mak
[src/mess/tools/floptool]floptool.mak
[src/mess/tools/imgtool]imgtool.mak
[src/mess/video]apple2.c aquarius.c gb_lcd.c maria.c wswan_video.c
[src/osd/modules/debugger]debugosx.m
[src/osd/modules/debugger/qt]debugqtdeviceswindow.c debugqtdeviceswindow.h
[src/osd/sdl]blit13.h draw13.c drawogl.c drawsdl.c input.c sdl.mak sdlsync_tc.c sdlwork.c video.c video.h window.c window.h
[src/osd/windows]d3dhlsl.c drawd3d.c vconv.c windows.mak winprefix.h winwork.c
[src/tools]nltool.c tools.mak

trunk/hash/adam_cass.xml
r242703r242704
968968   </software>
969969
970970<!--
971    <software name="macadam">
972        <description>MacADAM (Fra)</description>
973        <year>1984</year>
974        <publisher>CBS Loisors - Coleco of France</publisher>
971   <software name="macadam">
972       <description>MacADAM (Fra)</description>
973       <year>1984</year>
974       <publisher>CBS Loisors - Coleco of France</publisher>
975975
976        <part name="cass1" interface="adam_cass">
977            <dataarea name="cass" size="262144">
978                <rom name="macadam (1984) (cbs loisors - coleco of france).ddp" size="262144" crc="2fe95d33" sha1="e27e3515644c2fcd28b94b1aed69ae0b2cb76afc" offset="0" />
979            </dataarea>
980        </part>
981    </software>
976       <part name="cass1" interface="adam_cass">
977           <dataarea name="cass" size="262144">
978               <rom name="macadam (1984) (cbs loisors - coleco of france).ddp" size="262144" crc="2fe95d33" sha1="e27e3515644c2fcd28b94b1aed69ae0b2cb76afc" offset="0" />
979           </dataarea>
980       </part>
981   </software>
982982
983    <software name="macadama" cloneof="macadam">
984        <description>MacADAM (Fra, Alt)</description>
985        <year>1984</year>
986        <publisher>CBS Loisors - Coleco of France</publisher>
983   <software name="macadama" cloneof="macadam">
984       <description>MacADAM (Fra, Alt)</description>
985       <year>1984</year>
986       <publisher>CBS Loisors - Coleco of France</publisher>
987987
988        <part name="cass1" interface="adam_cass">
989            <dataarea name="cass" size="262144">
990                <rom name="macadam (1984) (cbs loisors - coleco of france) [a1].ddp" size="262144" crc="5288e332" sha1="4c1de35afefc356db7303f8f584946bbf0f7c528" offset="0" />
991            </dataarea>
992        </part>
993    </software>
988       <part name="cass1" interface="adam_cass">
989           <dataarea name="cass" size="262144">
990               <rom name="macadam (1984) (cbs loisors - coleco of france) [a1].ddp" size="262144" crc="5288e332" sha1="4c1de35afefc356db7303f8f584946bbf0f7c528" offset="0" />
991           </dataarea>
992       </part>
993   </software>
994994-->
995995
996996
trunk/hash/adam_flop.xml
r242703r242704
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33<softwarelist name="adam_flop" description="Coleco ADAM diskettes">
44
5   <!--
5   <!--
66   Thanks to SacNews.net for their very comprehensive software database!
7
7   
88   TODO:
9       Add rest of images outside of TOSEC/SacNews databases
10       Proper testing for correct info? (current info is just copy-pasted from filenames)
9      Add rest of images outside of TOSEC/SacNews databases
10      Proper testing for correct info? (current info is just copy-pasted from filenames)
1111   -->
12
12   
1313   <!-- EOS Drivers -->
1414
1515   <software name="homeauto">
r242703r242704
841841         <dataarea name="flop" size="163840">
842842            <rom name="world geography (1985) (a-ware educational software) [a1].dsk" size="163840" crc="c7d26848" sha1="c9581253ac1de95bbb45092bf3aeaa932f4006d7" offset="0" />
843843         </dataarea>
844      </part>
844      </part>   
845845   </software>
846846
847847   <!-- EOS Games -->
848
848   
849849   <software name="2010">
850850      <description>2010 - The Text Adventure Game</description>
851851      <year>1984</year>
r242703r242704
857857         </dataarea>
858858      </part>
859859   </software>
860
860   
861861   <software name="2010a" cloneof="2010">
862862      <description>2010 - The Text Adventure Game (Alt)</description>
863863      <year>1984</year>
r242703r242704
10831083         <dataarea name="flop" size="163840">
10841084            <rom name="adventure pack i (1984) (victory software) [a1].dsk" size="163840" crc="1754bbf4" sha1="a38a4ab0689917e66b3b6dda874f5a4f9ab9415a" offset="0" />
10851085         </dataarea>
1086      </part>
1086      </part>     
10871087   </software>
10881088
10891089   <software name="advpak2v">
r242703r242704
24092409      </part>
24102410   </software>
24112411
2412<!-- From NIAD's blog:
2412<!-- From NIAD's blog:
24132413  Jeopardy for the ADAM Computer is in fact a finshed product which was copyrighted 1984, but for whatever reason (probably
2414  completed just prior to Coleco's announcement in Jan. '85 that they were abandoning the ColecoVision and ADAM), Coleco
2415  decided not to release it commercially. They instead made it available to ADAM Users Groups circa 1985/1986 to share with
2416  the ADAM Community with the requirement that all copyright information would be removed from the program. Because of
2417  this requirement by Coleco, you will see multiple versions of Jeopardy available for download that have been hacked to
2418  change two title screens. This hacking actually eliminated the first title screen and then replaced the copyright information on
2414  completed just prior to Coleco's announcement in Jan. '85 that they were abandoning the ColecoVision and ADAM), Coleco
2415  decided not to release it commercially. They instead made it available to ADAM Users Groups circa 1985/1986 to share with
2416  the ADAM Community with the requirement that all copyright information would be removed from the program. Because of
2417  this requirement by Coleco, you will see multiple versions of Jeopardy available for download that have been hacked to
2418  change two title screens. This hacking actually eliminated the first title screen and then replaced the copyright information on
24192419  the second.
2420  When the original Jeopardy program was copied from data pack (256K max size) to disk (160K max size) a portion of the
2421  program that contained game play data/questions was lost to the ages. This disk version which floated around for a while
2422  would eventually crash due to the missing data, but this was later patched by Walters Software Co.'s Jim Walters to recycle to
2420  When the original Jeopardy program was copied from data pack (256K max size) to disk (160K max size) a portion of the
2421  program that contained game play data/questions was lost to the ages. This disk version which floated around for a while
2422  would eventually crash due to the missing data, but this was later patched by Walters Software Co.'s Jim Walters to recycle to
24232423  the beginning of the questions.
24242424
2425  In 1992, a member of NIAD had the tremendous fortune to come in contact with a former Coleco employee who was looking
2426  to sell off his entire lot of ADAM gear... a number of never before seen hardware and software protos included. In this lot was
2427  [...] a 2-disk version of Jeopardy. I have not tested this 2-disk version thoroughly, but it does seem to work properly and
2428  should be the version that you use as more than likely it is the complete version that would have been released for
2429  commercial sale.
2425  In 1992, a member of NIAD had the tremendous fortune to come in contact with a former Coleco employee who was looking
2426  to sell off his entire lot of ADAM gear... a number of never before seen hardware and software protos included. In this lot was
2427  [...] a 2-disk version of Jeopardy. I have not tested this 2-disk version thoroughly, but it does seem to work properly and
2428  should be the version that you use as more than likely it is the complete version that would have been released for
2429  commercial sale.
24302430 -->
24312431
24322432   <software name="jeopardy">
r242703r242704
31953195         <dataarea name="flop" size="163840">
31963196            <rom name="robothief (1991) (steve pitman software) [a1].dsk" size="163840" crc="8df50a33" sha1="69fde2a68c6c22ae268a209bc9054f6e7206c541" offset="0" />
31973197         </dataarea>
3198      </part>
3198      </part>     
31993199   </software>
32003200
32013201   <software name="rubychal">
r242703r242704
34503450      </part>
34513451   </software>
34523452
3453<!-- From NIAD's blog:
3454  The original prototype/demo/unreleased version as was obtained from Epyx was indeed buggy, but this mainly dealt with the
3455  inability to get it working on a disk, it was originally supplied on data pack, the save feature was a mess and there were a
3456  number of menu (especially at the start of the game) that were messed up. A programmer by the name of Joe Waters spent
3457  considerable time fixing these issues or most of them to get it to the state we now know. He actually lived in Albuquerque and
3458  released software for the ADAM under the Federation Software label and did the Temple hack and some others under the
3453<!-- From NIAD's blog:
3454  The original prototype/demo/unreleased version as was obtained from Epyx was indeed buggy, but this mainly dealt with the
3455  inability to get it working on a disk, it was originally supplied on data pack, the save feature was a mess and there were a
3456  number of menu (especially at the start of the game) that were messed up. A programmer by the name of Joe Waters spent
3457  considerable time fixing these issues or most of them to get it to the state we now know. He actually lived in Albuquerque and
3458  released software for the ADAM under the Federation Software label and did the Temple hack and some others under the
34593459  Falcon Federation Hack Group (or something like that) label.
34603460-->
34613461   <software name="apshai">
r242703r242704
40004000   </software>
40014001
40024002   <!-- EOS Graphics Design -->
4003
4003   
40044004   <software name="adamgfx">
40054005      <description>ADAM Graphics</description>
40064006      <year>199?</year>
r242703r242704
54215421   </software>
54225422
54235423   <!-- EOS Productivity -->
5424
5424   
54255425   <software name="atgradeb">
54265426      <description>A-Tech Gradebook</description>
54275427      <year>198?</year>
r242703r242704
54335433         </dataarea>
54345434      </part>
54355435   </software>
5436
5436   
54375437   <software name="atgradeba" cloneof="atgradeb">
54385438      <description>A-Tech Gradebook (Alt)</description>
54395439      <year>198?</year>
r242703r242704
54675467         <dataarea name="flop" size="163840">
54685468            <rom name="adam agenda - the personal schedule keeper (198x) (jeff harris) [a1].dsk" size="163840" crc="057fd444" sha1="21b76438a43a4e19a1b996789f2073cf25654a19" offset="0" />
54695469         </dataarea>
5470      </part>
5470      </part>   
54715471   </software>
54725472
54735473   <software name="fbanalyz">
r242703r242704
72317231
72327232
72337233   <!-- EOS Programming -->
7234
7234   
72357235   <software name="adambas">
72367236      <description>ADAM Basic (v1.6)</description>
72377237      <year>198?</year>
r242703r242704
78427842         </dataarea>
78437843      </part>
78447844   </software>
7845
7845   
78467846   <software name="smartlog">
78477847      <description>SmartLOGO</description>
78487848      <year>1984</year>
r242703r242704
78547854         </dataarea>
78557855      </part>
78567856   </software>
7857
7857   
78587858   <software name="smartloga" cloneof="smartlog">
78597859      <description>SmartLOGO (Alt)</description>
78607860      <year>1984</year>
r242703r242704
78667866         </dataarea>
78677867      </part>
78687868   </software>
7869
7869   
78707870   <software name="smartlogb" cloneof="smartlog">
78717871      <description>SmartLOGO (Alt 2)</description>
78727872      <year>1984</year>
r242703r242704
80158015         </dataarea>
80168016      </part>
80178017   </software>
8018
8018   
80198019   <software name="anetdata">
80208020      <description>A-Net ADAM BBS - Data Files</description>
80218021      <year>1990</year>
r242703r242704
98169816         <dataarea name="flop" size="163840">
98179817            <rom name="turbodisk v1.0 (1987) (digital express inc.) [a1].dsk" size="163840" crc="bf60a7bb" sha1="ca04851345a882589f1b8d97b11df1643ad4e947" offset="0" />
98189818         </dataarea>
9819      </part>
9819      </part>     
98209820   </software>
98219821
98229822   <software name="turbload">
r242703r242704
99369936         <dataarea name="flop" size="163840">
99379937            <rom name="xrampak i (1987) (digital express inc.) [a1].dsk" size="163840" crc="dc40400b" sha1="aeebdcf76d6fd369fe1720b0a57a48089ac8e050" offset="0" />
99389938         </dataarea>
9939      </part>
9939      </part>     
99409940   </software>
99419941
99429942   <!-- EOS Public Domain - ADAMLand -->
r242703r242704
99669966   </software>
99679967
99689968   <!-- EOS Public Domain - ADAM Users Group -->
9969
9969   
99709970   <software name="augutils">
99719971      <description>A.U.G. - Utilities</description>
99729972      <year>198?</year>
r242703r242704
1232812328   </software>
1232912329
1233012330   <!-- EOS Public Domain - Nibbles & Bits -->
12331
12331   
1233212332   <software name="nbbas01">
1233312333      <description>N&amp;B - Basic Vol. #01</description>
1233412334      <year>198?</year>
r242703r242704
1358213582   </software>
1358313583
1358413584   <!-- EOS Public Domain - Puget Sound ADAM Network -->
13585
13585   
1358613586   <software name="psanutil">
1358713587      <description>P.S.A.N. - Utilities</description>
1358813588      <year>198?</year>
r242703r242704
1380713807   </software>
1380813808
1380913809   <!-- CP/M Drivers -->
13810
13810   
1381113811   <software name="evecpm">
1381213812      <description>EVE CP/M Utilities</description>
1381313813      <year>198?</year>
r242703r242704
1384613846
1384713847   <!-- CP/M Games -->
1384813848
13849<!-- This is a collection of Scott Adams' adventures -->
13849<!-- This is a collection of Scott Adams' adventures -->   
1385013850   <software name="adventur">
1385113851      <description>Adventure (Scott Adams)</description>
1385213852      <year>198?</year>
r242703r242704
1426914269   </software>
1427014270
1427114271   <!-- CP/M Public Domain - Misc -->
14272
14272   
1427314273   <software name="cpmpd01">
1427414274      <description>CP-M 2.2 or T-DOS P.D. Vol. #01</description>
1427514275      <year>198?</year>
r242703r242704
1433114331   </software>
1433214332
1433314333   <!-- CP/M Public Domain - Northern Illiana ADAM User's Group -->
14334
14334   
1433514335   <software name="cndv01">
1433614336      <description>N.I.A.D. - CP/M CNDV #01</description>
1433714337      <year>198?</year>
r242703r242704
1511115111   </software>
1511215112
1511315113   <!-- CP/M PrintMaster Artwork -->
15114
15114   
1511515115   <software name="printm01">
1511615116      <description>PrintMaster Artwork - ADAMGR01</description>
1511715117      <year>198?</year>
r242703r242704
1586915869   </software>
1587015870
1587115871   <!-- CP/M Productivity -->
15872
15872   
1587315873   <software name="abovepls">
1587415874      <description>Above Plus</description>
1587515875      <year>198?</year>
r242703r242704
1604616046   </software>
1604716047
1604816048   <!-- CP/M Programming -->
16049
16049   
1605016050   <software name="dazzstar">
1605116051      <description>DazzleStar Disassembler</description>
1605216052      <year>1986</year>
r242703r242704
1619416194   </software>
1619516195
1619616196   <!-- CP/M Utilities -->
16197
16197   
1619816198   <software name="1kutils">
1619916199      <description>1K Utilities</description>
1620016200      <year>198?</year>
r242703r242704
1625616256   </software>
1625716257
1625816258   <!-- ADAM News Network -->
16259
16259   
1626016260   <software name="ann9103">
1626116261      <description>ANN Disk - 1991-03 - E.O.S. Files</description>
1626216262      <year>1991</year>
trunk/hash/apollo_ctape.xml
r242703r242704
33
44<!-- Domain/OS Known Undumped Versions (from http://www.hpmuseum.net/exhibit.php?swc=24)
55
6         Domain/OS SR10.3 (1990) Product Number 018847 + 018848
7         Domain/OS Quarterly PSK Q3-91 SR10.3 (1991) Product Number 19437 + 19439
6       Domain/OS SR10.3 (1990) Product Number 018847 + 018848
7       Domain/OS Quarterly PSK Q3-91 SR10.3 (1991) Product Number 19437 + 19439
88
99-->
1010
trunk/hash/archimedes.xml
r242703r242704
786786         <dataarea name="flop" size="819200">
787787            <rom name="enigma (1993)(archimedes world)[a].adf" size="819200" crc="9277d658" sha1="2bdd2d1f53ee5f359f12adb8b20e915d12978de0" offset="0" />
788788         </dataarea>
789      </part>
789      </part>     
790790   </software>
791791
792792   <software name="enigmab" cloneof="enigma" supported="no">
r242703r242704
10751075         <dataarea name="flop" size="819200">
10761076            <rom name="mad professor mariarti (1990)(krisalis)[a].adf" size="819200" crc="020e0e93" sha1="e64f832705c6923edcec7e85df4cceafe30b817e" offset="0" />
10771077         </dataarea>
1078      </part>
1078      </part>   
10791079   </software>
10801080
10811081   <software name="mariartib" cloneof="mariarti" supported="no">
r242703r242704
15041504         <dataarea name="flop" size="819200">
15051505            <rom name="super pool (1991)(fourth dimension)[a].adf" size="819200" crc="8fa28978" sha1="10d451076f38ab48e4b9bd754fdcb4c634935c36" offset="0" />
15061506         </dataarea>
1507      </part>
1507      </part>     
15081508   </software>
15091509
15101510   <software name="suprpoolb" cloneof="suprpool" supported="no">
r242703r242704
17691769         </dataarea>
17701770      </part>
17711771   </software>
1772   
17721773
1773
17741774<!-- Other disks to sort (homebrew?!?) -->
17751775
17761776   <software name="3dtanks" supported="no">
r242703r242704
20012001         <dataarea name="flop" size="819200">
20022002            <rom name="hacker, the v3.05 (1993)(doggysoft)[a].adf" size="819200" crc="c6a88514" sha1="b02d6495f6a9a1099cb06cac7d0e0d1756f175a0" offset="0" />
20032003         </dataarea>
2004      </part>
2004      </part>     
20052005   </software>
20062006
20072007   <software name="hackerb" cloneof="hacker" supported="no">
r242703r242704
22132213         <dataarea name="flop" size="820224">
22142214            <rom name="acorn archimedes risc os application suite v1.00 (19xx)(acorn)(disk 2 of 2)[req risc os].adf" size="820224" crc="d5fdf2ca" sha1="bfc96eff8cab5b61f6db82dd135dd95b32f40d4f" offset="0" />
22152215         </dataarea>
2216      </part>
2216      </part>     
22172217   </software>
22182218
22192219   <software name="riscappsa" cloneof="riscapps" supported="no">
trunk/hash/gamate.xml
r242703r242704
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33
4<!--
4<!--
55Undumped carts, based on Wikipedia list
66C1010 - Bump N' Run (Unreleased?)
77C1016 - Volcano Panic
trunk/hash/gba.xml
r242703r242704
2633226332      </part>
2633326333   </software>
2633426334
26335   <software name="overstrm">
26336      <description>Overstorm (Euro, Prototype Demo)</description>
26337      <year>2003</year>
26338      <publisher>Polyzoom</publisher>
26339      <part name="cart" interface="gba_cart">
26340         <dataarea name="rom" size="3470916">
26341            <rom name="overstorm_demo.bin" size="3470916" crc="ee764cf6" sha1="88129a07e9dfb556c38a5c61c6e96fbfb4d23fea" offset="000000" />
26342         </dataarea>
26343      </part>
26344   </software>
26345
2634626335   <software name="ozzydrix">
2634726336      <description>Ozzy &amp; Drix (USA)</description>
2634826337      <year>2003</year>
r242703r242704
2912629115      </part>
2912729116   </software>
2912829117
29129   <software name="revil2d">
29130      <description>Resident Evil 2 (Euro, Prototype Demo)</description>
29131      <year>2000?</year>
29132      <publisher>Raylight Studios</publisher>
29133      <part name="cart" interface="gba_cart">
29134         <dataarea name="rom" size="2908576">
29135            <rom name="re2_tech.bin" size="2908576" crc="26b5cf8b" sha1="a70cf38071f639e783734bc9875ace0ebd2c5180" offset="000000" />
29136         </dataarea>
29137      </part>
29138   </software>
29139
2914029118   <software name="revshinp" cloneof="revshin">
2914129119      <description>The Revenge of Shinobi (Euro, Prototype)</description>
2914229120      <year>2003</year>
trunk/hash/gbcolor.xml
r242703r242704
2409624096
2409724097<!-- Other Asian Pirate dumps to sort -->
2409824098
24099   <software name="digicrs2" cloneof="pokesaph">
24100      <description>Digimon Crystal II (Chi)</description>
24101      <year>200?</year>
24102      <publisher>Sintax</publisher>
24103      <part name="cart" interface="gameboy_cart">
24104         <feature name="slot" value="rom_sintax" />
24105         <!-- cartridge ram -->
24106         <dataarea name="rom"  size="2097152">
24107            <rom name="digimon crystal ii (unlicensed, english) [raw dump].gbc" size="2097152" crc="685e76df" sha1="4e981044ac3a40d7a9cd63b79d5982b4b4e670a5" offset="0" />
24108         </dataarea>
24109         <dataarea name="nvram" size="32768">
24110         </dataarea>
24111      </part>
24112   </software>
24113
24114   <software name="laofuzi">
24115      <description>Lao Fuzi Chuanqi (Chi)</description>
24116      <year>200?</year>
24117      <publisher>Sintax</publisher>
24118      <info name="alt_title" value="老夫子傳奇"/>
24119      <part name="cart" interface="gameboy_cart">
24120         <feature name="slot" value="rom_sintax" />
24121         <!-- cartridge ram -->
24122         <dataarea name="rom"  size="2097152">
24123            <rom name="lao fuzi chuanqi (unlicensed, chinese) [raw dump].gbc" size="2097152" crc="aeca45be" sha1="b7193fcb8b9b8958a2522be0d1a3874cffc1e1db" offset="0" />
24124         </dataarea>
24125         <dataarea name="nvram" size="32768">
24126         </dataarea>
24127      </part>
24128   </software>
24129
24130   <software name="yuenanzx">
24131      <description>Yuenan Zhanyi X - Shenru Dihou (Chi)</description>
24132      <year>200?</year>
24133      <publisher>Sintax</publisher>
24134      <info name="alt_title" value="越南戰役X-深入敵後"/>
24135      <part name="cart" interface="gameboy_cart">
24136         <feature name="slot" value="rom_sintax" />
24137         <!-- cartridge ram -->
24138         <dataarea name="rom"  size="2097152">
24139            <rom name="yuenan zhanyi x - shenru dihou (unlicensed, chinese) [raw dump].gbc" size="2097152" crc="602951a6" sha1="6703e9f68b989c976e93bd2eb63f884ceaff63f1" offset="0" />
24140         </dataarea>
24141         <dataarea name="nvram" size="32768">
24142         </dataarea>
24143      </part>
24144   </software>
24145
24146   <software name="dballadv">
24147      <description>Qi Long Zhu Z 3 ~ Dragon Ball - Advance Adventure (Chi)</description>
24148      <year>200?</year>
24149      <publisher>Sintax</publisher>
24150      <info name="alt_title" value="七龍珠Z3"/>
24151      <part name="cart" interface="gameboy_cart">
24152         <feature name="slot" value="rom_sintax" />
24153         <!-- cartridge ram -->
24154         <dataarea name="rom"  size="2097152">
24155            <rom name="qi long zhu z 3 (dragon ball - advance adventure) (unlicensed, chinese) [raw dump].gbc" size="2097152" crc="ccfdd63a" sha1="4f3b63cd11522b6fb291661f4d918601d95138e0" offset="0" />
24156         </dataarea>
24157         <dataarea name="nvram" size="32768">
24158         </dataarea>
24159      </part>
24160   </software>
24161
2416224099<!-- World WarCraft? -->
2416324100   <software name="moshosj">
2416424101      <description>Mo Shou Shi Ji - Zhan Shen (Chi)</description>
r242703r242704
2465624593      </part>
2465724594   </software>
2465824595
24659   <software name="bwarr5" cloneof="dballadv">
24596   <software name="bwarr5">
2466024597   <!-- 4MB rom with crc 9d332731 is taizou's cracked version running on base MBC5 -->
2466124598      <description>Bynasty Warriors Advance 5 (Chi)</description>
2466224599      <year>200?</year>
trunk/hash/megacdj.xml
r242703r242704
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33<softwarelist name="megacdj" description="Mega CD (Jpn) CD-ROMs">
44
5<!--- Images below are from the REDUMP set (unless otherwise noted) -->
5<!--
66
7-->
8
9
10<!--- Images below are from the REDUMP set (unless otherwise noted) -->
711   <software name="aburner3">
8      <!-- source redump.org
9      <rom name="After Burner III (Japan).cue" size="1410" crc="f16b55f2" />
10      <rom name="After Burner III (Japan) (Track 01).bin" size="7890960" crc="069f1cbb" />
11      <rom name="After Burner III (Japan) (Track 02).bin" size="12460896" crc="0dd28f10" />
12      <rom name="After Burner III (Japan) (Track 03).bin" size="12432672" crc="ad711555" />
13      <rom name="After Burner III (Japan) (Track 04).bin" size="5769456" crc="3f5003b1" />
14      <rom name="After Burner III (Japan) (Track 05).bin" size="14558880" crc="ab5794c3" />
15      <rom name="After Burner III (Japan) (Track 06).bin" size="58371936" crc="86a30f77" />
16      <rom name="After Burner III (Japan) (Track 07).bin" size="57972096" crc="cea674df" />
17      <rom name="After Burner III (Japan) (Track 08).bin" size="60902688" crc="88ee1bfb" />
18      <rom name="After Burner III (Japan) (Track 09).bin" size="52277904" crc="37441bd9" />
19      <rom name="After Burner III (Japan) (Track 10).bin" size="54199488" crc="b522e646" />
20      <rom name="After Burner III (Japan) (Track 11).bin" size="56189280" crc="5e9e6657" />
21      <rom name="After Burner III (Japan) (Track 12).bin" size="59724336" crc="a4b53073" />
22      -->
2312      <description>After Burner III (Jpn)</description>
2413      <year>1992</year>
2514      <publisher>CRI</publisher>
2615      <info name="serial" value="T-68014"/>
27      <info name="disk_ring" value="T-68014P-00039-R2M V, T-68014P-00039-R1M V"/>
2816      <info name="release" value="19921218"/>
2917      <info name="alt_title" value="アフターバーナーⅢ"/>
3018      <part name="cdrom" interface="scd_cdrom">
r242703r242704
3523   </software>
3624
3725   <software name="ax101">
38      <!-- source redump.org
39      <rom name="AX-101 (Japan).cue" size="198" crc="6c514d73" />
40      <rom name="AX-101 (Japan) (Track 1).bin" size="615817104" crc="03cbf674" />
41      <rom name="AX-101 (Japan) (Track 2).bin" size="2352000" crc="3fd8d737" />
42      -->
4326      <description>AX-101 (Jpn)</description>
4427      <year>1994</year>
4528      <publisher>Sega</publisher>
4629      <info name="serial" value="G-6031"/>
47      <info name="disk_ring" value="G-6031P-00174 1"/>
4830      <info name="release" value="19940325"/>
4931      <info name="alt_title" value="AX-101"/>
5032      <part name="cdrom" interface="scd_cdrom">
r242703r242704
5537   </software>
5638
5739   <software name="bariarm">
58      <!-- source redump.org
59      <rom name="Bari-Arm (Japan).cue" size="2091" crc="03cc6d8a" />
60      <rom name="Bari-Arm (Japan) (Track 01).bin" size="16849728" crc="af764474" />
61      <rom name="Bari-Arm (Japan) (Track 02).bin" size="22042944" crc="0b7d7a8e" />
62      <rom name="Bari-Arm (Japan) (Track 03).bin" size="21419664" crc="584abbfe" />
63      <rom name="Bari-Arm (Japan) (Track 04).bin" size="8344896" crc="6c5421fc" />
64      <rom name="Bari-Arm (Japan) (Track 05).bin" size="32937408" crc="47acefb4" />
65      <rom name="Bari-Arm (Japan) (Track 06).bin" size="7909776" crc="53bbe4c6" />
66      <rom name="Bari-Arm (Japan) (Track 07).bin" size="32189472" crc="4af2b56c" />
67      <rom name="Bari-Arm (Japan) (Track 08).bin" size="2224992" crc="7ba7a6cc" />
68      <rom name="Bari-Arm (Japan) (Track 09).bin" size="29976240" crc="527b54fe" />
69      <rom name="Bari-Arm (Japan) (Track 10).bin" size="19453392" crc="f7643dec" />
70      <rom name="Bari-Arm (Japan) (Track 11).bin" size="20855184" crc="bc57a263" />
71      <rom name="Bari-Arm (Japan) (Track 12).bin" size="32516400" crc="61693654" />
72      <rom name="Bari-Arm (Japan) (Track 13).bin" size="5214384" crc="4e4bee6c" />
73      <rom name="Bari-Arm (Japan) (Track 14).bin" size="32238864" crc="64d4f9fa" />
74      <rom name="Bari-Arm (Japan) (Track 15).bin" size="21798336" crc="7aad0b67" />
75      <rom name="Bari-Arm (Japan) (Track 16).bin" size="21024528" crc="13b59cf8" />
76      <rom name="Bari-Arm (Japan) (Track 17).bin" size="22285200" crc="67d02acc" />
77      <rom name="Bari-Arm (Japan) (Track 18).bin" size="11802336" crc="46da7909" />
78      <rom name="Bari-Arm (Japan) (Track 19).bin" size="1505280" crc="f68eb74b" />
79      -->
8040      <description>Bari-Arm (Jpn)</description>
8141      <year>1993</year>
8242      <publisher>Human Entertainment</publisher>
8343      <info name="serial" value="T-43024"/>
84      <info name="disk_ring" value="T-43024P-00077-R2M V"/>
8544      <info name="release" value="19930730"/>
8645      <info name="alt_title" value="バリ・アーム"/>
8746      <part name="cdrom" interface="scd_cdrom">
r242703r242704
9251   </software>
9352
9453   <software name="burai">
95      <!-- source redump.org
96      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan).cue" size="5862" crc="fe440e0c" />
97      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 01).bin" size="72425136" crc="ebe7837f" />
98      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 02).bin" size="6428016" crc="04532d6f" />
99      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 03).bin" size="1552320" crc="6dc059e1" />
100      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 04).bin" size="8436624" crc="cc3cedfa" />
101      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 05).bin" size="3269280" crc="a99db4d7" />
102      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 06).bin" size="4007808" crc="b7c345e2" />
103      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 07).bin" size="4805136" crc="94f047f9" />
104      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 08).bin" size="3683232" crc="8938dad0" />
105      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 09).bin" size="7813344" crc="1728941a" />
106      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 10).bin" size="5360208" crc="959672d2" />
107      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 11).bin" size="5301408" crc="90059de8" />
108      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 12).bin" size="3259872" crc="79b78394" />
109      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 13).bin" size="5292000" crc="99dcd8d5" />
110      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 14).bin" size="9396240" crc="9426dd7c" />
111      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 15).bin" size="7063056" crc="aa45145b" />
112      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 16).bin" size="6771408" crc="d78dff7d" />
113      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 17).bin" size="3744384" crc="e0fbf804" />
114      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 18).bin" size="5461344" crc="32d7bc4c" />
115      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 19).bin" size="1505280" crc="6c902a75" />
116      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 20).bin" size="3523296" crc="90adcd22" />
117      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 21).bin" size="3426864" crc="eec805e8" />
118      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 22).bin" size="1074864" crc="87a72714" />
119      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 23).bin" size="7270032" crc="bde2eb70" />
120      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 24).bin" size="3368064" crc="758f289b" />
121      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 25).bin" size="6190464" crc="61dc9711" />
122      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 26).bin" size="1074864" crc="771ee167" />
123      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 27).bin" size="6907824" crc="99bfb078" />
124      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 28).bin" size="7592256" crc="5f87b79a" />
125      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 29).bin" size="1074864" crc="667c6b88" />
126      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 30).bin" size="1074864" crc="5d963dff" />
127      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 31).bin" size="5835312" crc="95bca9de" />
128      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 32).bin" size="6712608" crc="4f577d35" />
129      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 33).bin" size="6326880" crc="00e4d19d" />
130      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 34).bin" size="4840416" crc="4a2d4262" />
131      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 35).bin" size="4715760" crc="18b39122" />
132      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 36).bin" size="6616176" crc="5f6f23d2" />
133      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 37).bin" size="5630688" crc="a25a727a" />
134      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 38).bin" size="6084624" crc="d5fb55b0" />
135      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 39).bin" size="3241056" crc="71feb9cb" />
136      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 40).bin" size="6230448" crc="8eb12148" />
137      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 41).bin" size="13458144" crc="91e5797a" />
138      <rom name="Burai - Hachigyoku no Yuushi Densetsu (Japan) (Track 42).bin" size="12343296" crc="b4d2794c" />
139      -->
140      <description>Burai - Yatsudama no Yuushi Densetsu (Jpn)</description>
54      <description>Burai - Hachigyoku no Yuushi Densetsu (Jpn)</description>
14155      <year>1992</year>
14256      <publisher>Sega</publisher>
14357      <info name="serial" value="G-6004"/>
144      <info name="disk_ring" value="G-6004P-00012-R2M V"/>
14558      <info name="release" value="19920911"/>
14659      <info name="alt_title" value="ブライ 八玉の勇士伝説"/>
14760      <part name="cdrom" interface="scd_cdrom">
r242703r242704
15164      </part>
15265   </software>
15366
67   <software name="quiztono">
68      <description>Capcom no Quiz - Tonosama no Yabou (Jpn)</description>
69      <year>1992</year>
70      <publisher>SIMS</publisher>
71      <info name="serial" value="T-44024"/>
72      <info name="release" value="19921225"/>
73      <info name="alt_title" value="カプコンのクイズ殿様の野望"/>
74      <part name="cdrom" interface="scd_cdrom">
75         <diskarea name="cdrom">
76            <disk name="capcom no quiz - tonosama no yabou (japan)" sha1="9f09efae7369a1439cd85616c89f5d42a2eb741a"/>
77         </diskarea>
78      </part>
79   </software>
80
15481   <software name="cfstory">
155      <!-- source redump.org
156      <rom name="Cosmic Fantasy Stories (Japan).cue" size="7232" crc="0b68973f" />
157      <rom name="Cosmic Fantasy Stories (Japan) (Track 01).bin" size="54244176" crc="eef94b45" />
158      <rom name="Cosmic Fantasy Stories (Japan) (Track 02).bin" size="1100736" crc="dde11567" />
159      <rom name="Cosmic Fantasy Stories (Japan) (Track 03).bin" size="4094832" crc="66052e23" />
160      <rom name="Cosmic Fantasy Stories (Japan) (Track 04).bin" size="1891008" crc="186e6d2e" />
161      <rom name="Cosmic Fantasy Stories (Japan) (Track 05).bin" size="4892160" crc="d17b6a97" />
162      <rom name="Cosmic Fantasy Stories (Japan) (Track 06).bin" size="9741984" crc="97533ea3" />
163      <rom name="Cosmic Fantasy Stories (Japan) (Track 07).bin" size="2681280" crc="d2bbf8e3" />
164      <rom name="Cosmic Fantasy Stories (Japan) (Track 08).bin" size="3859632" crc="261bf7f5" />
165      <rom name="Cosmic Fantasy Stories (Japan) (Track 09).bin" size="6785520" crc="df97144e" />
166      <rom name="Cosmic Fantasy Stories (Japan) (Track 10).bin" size="1498224" crc="a0a4fd04" />
167      <rom name="Cosmic Fantasy Stories (Japan) (Track 11).bin" size="1446480" crc="6eb706d6" />
168      <rom name="Cosmic Fantasy Stories (Japan) (Track 12).bin" size="3245760" crc="7d5a756b" />
169      <rom name="Cosmic Fantasy Stories (Japan) (Track 13).bin" size="6465648" crc="552b9c49" />
170      <rom name="Cosmic Fantasy Stories (Japan) (Track 14).bin" size="1528800" crc="8d79ddc7" />
171      <rom name="Cosmic Fantasy Stories (Japan) (Track 15).bin" size="2114448" crc="0effecc4" />
172      <rom name="Cosmic Fantasy Stories (Japan) (Track 16).bin" size="12105744" crc="b32a7112" />
173      <rom name="Cosmic Fantasy Stories (Japan) (Track 17).bin" size="4704000" crc="57ec5fb3" />
174      <rom name="Cosmic Fantasy Stories (Japan) (Track 18).bin" size="8328432" crc="f6aeef94" />
175      <rom name="Cosmic Fantasy Stories (Japan) (Track 19).bin" size="10736880" crc="e163de8c" />
176      <rom name="Cosmic Fantasy Stories (Japan) (Track 20).bin" size="3092880" crc="fae694bf" />
177      <rom name="Cosmic Fantasy Stories (Japan) (Track 21).bin" size="5440176" crc="86b22746" />
178      <rom name="Cosmic Fantasy Stories (Japan) (Track 22).bin" size="8730624" crc="131239f4" />
179      <rom name="Cosmic Fantasy Stories (Japan) (Track 23).bin" size="11435424" crc="526d30d8" />
180      <rom name="Cosmic Fantasy Stories (Japan) (Track 24).bin" size="14295456" crc="5a4e517c" />
181      <rom name="Cosmic Fantasy Stories (Japan) (Track 25).bin" size="10106544" crc="8e285b41" />
182      <rom name="Cosmic Fantasy Stories (Japan) (Track 26).bin" size="3958416" crc="635a426f" />
183      <rom name="Cosmic Fantasy Stories (Japan) (Track 27).bin" size="2112096" crc="7052ce91" />
184      <rom name="Cosmic Fantasy Stories (Japan) (Track 28).bin" size="5426064" crc="03959bcf" />
185      <rom name="Cosmic Fantasy Stories (Japan) (Track 29).bin" size="10758048" crc="cab90657" />
186      <rom name="Cosmic Fantasy Stories (Japan) (Track 30).bin" size="7215936" crc="c72a4ecc" />
187      <rom name="Cosmic Fantasy Stories (Japan) (Track 31).bin" size="2610720" crc="71bcfc83" />
188      <rom name="Cosmic Fantasy Stories (Japan) (Track 32).bin" size="24733632" crc="3a0511ab" />
189      <rom name="Cosmic Fantasy Stories (Japan) (Track 33).bin" size="1206576" crc="09d6edf1" />
190      <rom name="Cosmic Fantasy Stories (Japan) (Track 34).bin" size="9906624" crc="64bc0ddd" />
191      <rom name="Cosmic Fantasy Stories (Japan) (Track 35).bin" size="3727920" crc="dd9446d2" />
192      <rom name="Cosmic Fantasy Stories (Japan) (Track 36).bin" size="4537008" crc="9204c4f1" />
193      <rom name="Cosmic Fantasy Stories (Japan) (Track 37).bin" size="12818400" crc="e3436cc6" />
194      <rom name="Cosmic Fantasy Stories (Japan) (Track 38).bin" size="12870144" crc="edbdd0af" />
195      <rom name="Cosmic Fantasy Stories (Japan) (Track 39).bin" size="9368016" crc="339adece" />
196      <rom name="Cosmic Fantasy Stories (Japan) (Track 40).bin" size="10685136" crc="14f140ca" />
197      <rom name="Cosmic Fantasy Stories (Japan) (Track 41).bin" size="28026432" crc="84c1a3bf" />
198      <rom name="Cosmic Fantasy Stories (Japan) (Track 42).bin" size="12006960" crc="552dbbb0" />
199      <rom name="Cosmic Fantasy Stories (Japan) (Track 43).bin" size="13547520" crc="2179cd81" />
200      <rom name="Cosmic Fantasy Stories (Japan) (Track 44).bin" size="7020720" crc="d9f2b379" />
201      <rom name="Cosmic Fantasy Stories (Japan) (Track 45).bin" size="3156384" crc="4047dcf2" />
202      <rom name="Cosmic Fantasy Stories (Japan) (Track 46).bin" size="15398544" crc="15077e50" />
203      <rom name="Cosmic Fantasy Stories (Japan) (Track 47).bin" size="3981936" crc="4619e37c" />
204      <rom name="Cosmic Fantasy Stories (Japan) (Track 48).bin" size="10901520" crc="aba714dc" />
205      <rom name="Cosmic Fantasy Stories (Japan) (Track 49).bin" size="8359008" crc="ac0c9e1d" />
206      <rom name="Cosmic Fantasy Stories (Japan) (Track 50).bin" size="12931296" crc="f12fdc3e" />
207      <rom name="Cosmic Fantasy Stories (Japan) (Track 51).bin" size="7742784" crc="9cbbc6e4" />
208      <rom name="Cosmic Fantasy Stories (Japan) (Track 52).bin" size="13399344" crc="962b2e0b" />
209      <rom name="Cosmic Fantasy Stories (Japan) (Track 53).bin" size="17296608" crc="bc221da8" />
210      <rom name="Cosmic Fantasy Stories (Japan) (Track 54).bin" size="6084624" crc="8e167f04" />
211      <rom name="Cosmic Fantasy Stories (Japan) (Track 55).bin" size="48164256" crc="0dc9f0f2" />
212      <rom name="Cosmic Fantasy Stories (Japan) (Track 56).bin" size="10572240" crc="fa2a56d2" />
213      <rom name="Cosmic Fantasy Stories (Japan) (Track 57).bin" size="9224544" crc="7f4ac50c" />
214      <rom name="Cosmic Fantasy Stories (Japan) (Track 58).bin" size="3130512" crc="f36f7b3c" />
215      -->
21682      <description>Cosmic Fantasy Stories (Jpn)</description>
21783      <year>1992</year>
21884      <publisher>Nihon Telenet</publisher>
21985      <info name="serial" value="T-49014"/>
220      <info name="disk_ring" value="T-49014P-00010-R2K V, T-49014P-00010-R1K V"/>
22186      <info name="release" value="19920327"/>
22287      <info name="alt_title" value="コズミックファンタジー Stories"/>
22388      <part name="cdrom" interface="scd_cdrom">
r242703r242704
22893   </software>
22994
23095   <software name="cyborg9">
231      <!-- source redump.org
232      <rom name="Cyborg 009 (Japan).cue" size="3711" crc="35f389fe" />
233      <rom name="Cyborg 009 (Japan) (Track 01).bin" size="15694896" crc="4fc4da73" />
234      <rom name="Cyborg 009 (Japan) (Track 02).bin" size="16085328" crc="f6269638" />
235      <rom name="Cyborg 009 (Japan) (Track 03).bin" size="20603520" crc="b180bb7e" />
236      <rom name="Cyborg 009 (Japan) (Track 04).bin" size="20932800" crc="95abea56" />
237      <rom name="Cyborg 009 (Japan) (Track 05).bin" size="20603520" crc="b850ef27" />
238      <rom name="Cyborg 009 (Japan) (Track 06).bin" size="20965728" crc="76aaecc7" />
239      <rom name="Cyborg 009 (Japan) (Track 07).bin" size="20276592" crc="bc633e19" />
240      <rom name="Cyborg 009 (Japan) (Track 08).bin" size="17752896" crc="614c3275" />
241      <rom name="Cyborg 009 (Japan) (Track 09).bin" size="16706256" crc="2ef89c68" />
242      <rom name="Cyborg 009 (Japan) (Track 10).bin" size="16769760" crc="0d2b8777" />
243      <rom name="Cyborg 009 (Japan) (Track 11).bin" size="16673328" crc="30ac6f1e" />
244      <rom name="Cyborg 009 (Japan) (Track 12).bin" size="6644400" crc="1e3ccd81" />
245      <rom name="Cyborg 009 (Japan) (Track 13).bin" size="8678880" crc="7b3d2672" />
246      <rom name="Cyborg 009 (Japan) (Track 14).bin" size="15786624" crc="5b403551" />
247      <rom name="Cyborg 009 (Japan) (Track 15).bin" size="16802688" crc="e5af999a" />
248      <rom name="Cyborg 009 (Japan) (Track 16).bin" size="10576944" crc="4ef5284b" />
249      <rom name="Cyborg 009 (Japan) (Track 17).bin" size="13427568" crc="70f49d3c" />
250      <rom name="Cyborg 009 (Japan) (Track 18).bin" size="14707056" crc="b4e28153" />
251      <rom name="Cyborg 009 (Japan) (Track 19).bin" size="19850880" crc="e40b727f" />
252      <rom name="Cyborg 009 (Japan) (Track 20).bin" size="5235552" crc="b07a4c02" />
253      <rom name="Cyborg 009 (Japan) (Track 21).bin" size="6973680" crc="b4a80ea9" />
254      <rom name="Cyborg 009 (Japan) (Track 22).bin" size="7956816" crc="f70a0643" />
255      <rom name="Cyborg 009 (Japan) (Track 23).bin" size="15918336" crc="e91e2a4f" />
256      <rom name="Cyborg 009 (Japan) (Track 24).bin" size="19293456" crc="f54c9f66" />
257      <rom name="Cyborg 009 (Japan) (Track 25).bin" size="10511088" crc="9bff939a" />
258      <rom name="Cyborg 009 (Japan) (Track 26).bin" size="13853280" crc="2d737af4" />
259      <rom name="Cyborg 009 (Japan) (Track 27).bin" size="6874896" crc="9f674703" />
260      <rom name="Cyborg 009 (Japan) (Track 28).bin" size="13559280" crc="b7e4395c" />
261      <rom name="Cyborg 009 (Japan) (Track 29).bin" size="21553728" crc="635dc064" />
262      <rom name="Cyborg 009 (Japan) (Track 30).bin" size="27781824" crc="ff346c88" />
263      <rom name="Cyborg 009 (Japan) (Track 31).bin" size="11724720" crc="c95a44a1" />
264      <rom name="Cyborg 009 (Japan) (Track 32).bin" size="44885568" crc="1cca8c90" />
265      <rom name="Cyborg 009 (Japan) (Track 33).bin" size="1952160" crc="cf515c02" />
266      -->
26796      <description>Cyborg 009 (Jpn)</description>
26897      <year>1993</year>
26998      <publisher>Nihon Telenet</publisher>
27099      <info name="serial" value="T-49054"/>
271      <info name="disk_ring" value="T-49054P-00081-R1M V"/>
272100      <info name="release" value="19930730"/>
273101      <info name="alt_title" value="サイボーグ009"/>
274102      <part name="cdrom" interface="scd_cdrom">
r242703r242704
279107   </software>
280108
281109   <software name="dennin">
282      <!-- source redump.org
283      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan).cue" size="3657" crc="d1585b2f" />
284      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 01).bin" size="15005760" crc="2bba56f5" />
285      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 02).bin" size="1110144" crc="8fa35b51" />
286      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 03).bin" size="54716928" crc="bcbc7d6c" />
287      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 04).bin" size="1933344" crc="d16e4f91" />
288      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 05).bin" size="1481760" crc="5521d114" />
289      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 06).bin" size="38069472" crc="be4b7bdd" />
290      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 07).bin" size="1627584" crc="e19a82ed" />
291      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 08).bin" size="1542912" crc="21de70a1" />
292      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 09).bin" size="29550528" crc="69e163ae" />
293      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 10).bin" size="54978000" crc="473d091b" />
294      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 11).bin" size="2222640" crc="1420d49e" />
295      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 12).bin" size="1909824" crc="2a51ac8c" />
296      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 13).bin" size="2439024" crc="8b5bf582" />
297      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 14).bin" size="54159504" crc="197fbb67" />
298      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 15).bin" size="1462944" crc="71bf5fa8" />
299      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 16).bin" size="59794896" crc="d51df015" />
300      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 17).bin" size="1618176" crc="b6623229" />
301      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 18).bin" size="34891920" crc="0a10469f" />
302      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 19).bin" size="32925648" crc="d94aac05" />
303      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 20).bin" size="32471712" crc="41bfce14" />
304      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 21).bin" size="45736992" crc="67f1dbdf" />
305      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 22).bin" size="17851680" crc="6a6111d0" />
306      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 23).bin" size="8382528" crc="ffdfbb3c" />
307      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 24).bin" size="9791376" crc="94656f55" />
308      <rom name="Dennin Aleste - Nobunaga and His Ninja Force (Japan) (Track 25).bin" size="68835984" crc="ec551c03" />
309      -->
310110      <description>Dennin Aleste - Nobunaga and His Ninja Force (Jpn)</description>
311111      <year>1992</year>
312112      <publisher>Compile</publisher>
313113      <info name="serial" value="T-66014"/>
314      <info name="disk_ring" value="T-66014P-00035-R2M V"/>
315114      <info name="release" value="19921127"/>
316115      <info name="alt_title" value="電忍アレスタ Nobunaga and his Ninja force"/>
317116      <part name="cdrom" interface="scd_cdrom">
r242703r242704
322121   </software>
323122
324123   <software name="detonatr">
325      <!-- source redump.org
326      <rom name="Detonator Orgun (Japan).cue" size="1280" crc="80377bef" />
327      <rom name="Detonator Orgun (Japan) (Track 01).bin" size="48540576" crc="0856b08f" />
328      <rom name="Detonator Orgun (Japan) (Track 02).bin" size="1178352" crc="781663e0" />
329      <rom name="Detonator Orgun (Japan) (Track 03).bin" size="18978288" crc="7f9cec7e" />
330      <rom name="Detonator Orgun (Japan) (Track 04).bin" size="22765008" crc="860fd7fb" />
331      <rom name="Detonator Orgun (Japan) (Track 05).bin" size="19578048" crc="075da4d2" />
332      <rom name="Detonator Orgun (Japan) (Track 06).bin" size="25700304" crc="b655e442" />
333      <rom name="Detonator Orgun (Japan) (Track 07).bin" size="61636512" crc="796c3d6c" />
334      <rom name="Detonator Orgun (Japan) (Track 08).bin" size="7157136" crc="03fb52e5" />
335      <rom name="Detonator Orgun (Japan) (Track 09).bin" size="6620880" crc="16ee85e4" />
336      <rom name="Detonator Orgun (Japan) (Track 10).bin" size="22092336" crc="121d8502" />
337      <rom name="Detonator Orgun (Japan) (Track 11).bin" size="1477056" crc="8773a91f" />
338      -->
339124      <description>Detonator Orgun (Jpn)</description>
340125      <year>1992</year>
341126      <publisher>Hot-B</publisher>
342127      <info name="serial" value="T-28014"/>
343      <info name="disk_ring" value="T28014P-00019-R1M V"/>
344128      <info name="release" value="19920731"/>
345129      <info name="alt_title" value="デトネイター・オーガン"/>
346130      <part name="cdrom" interface="scd_cdrom">
r242703r242704
351135   </software>
352136
353137   <software name="devastat">
354      <!-- source redump.org
355      <rom name="Devastator (Japan).cue" size="1225" crc="40c82789" />
356      <rom name="Devastator (Japan) (Track 01).bin" size="189074928" crc="55438f4a" />
357      <rom name="Devastator (Japan) (Track 02).bin" size="2272032" crc="1932fbab" />
358      <rom name="Devastator (Japan) (Track 03).bin" size="36618288" crc="89425e59" />
359      <rom name="Devastator (Japan) (Track 04).bin" size="43312080" crc="5f60f459" />
360      <rom name="Devastator (Japan) (Track 05).bin" size="19364016" crc="7498c28c" />
361      <rom name="Devastator (Japan) (Track 06).bin" size="31396848" crc="2706130f" />
362      <rom name="Devastator (Japan) (Track 07).bin" size="33156144" crc="8d4f0038" />
363      <rom name="Devastator (Japan) (Track 08).bin" size="25020576" crc="49e8cd5f" />
364      <rom name="Devastator (Japan) (Track 09).bin" size="34033440" crc="33f406cc" />
365      <rom name="Devastator (Japan) (Track 10).bin" size="42049056" crc="b6a26f5b" />
366      <rom name="Devastator (Japan) (Track 11).bin" size="26928048" crc="c405b742" />
367      -->
368138      <description>Devastator (Jpn)</description>
369139      <year>1993</year>
370140      <publisher>Wolf Team</publisher>
371141      <info name="serial" value="T-32074"/>
372      <info name="disk_ring" value="T-32074P-00063-R1M V"/>
373142      <info name="release" value="19930528"/>
374143      <info name="alt_title" value="デバステイター"/>
375144      <part name="cdrom" interface="scd_cdrom">
r242703r242704
380149   </software>
381150
382151   <software name="dlair">
383      <!-- source redump.org
384      <rom name="Dragon's Lair (Japan) (En,Ja,Fr,De,It).cue" size="246" crc="1191378b" />
385      <rom name="Dragon's Lair (Japan) (En,Ja,Fr,De,It) (Track 1).bin" size="607935552" crc="280750dd" />
386      <rom name="Dragon's Lair (Japan) (En,Ja,Fr,De,It) (Track 2).bin" size="1521744" crc="60eade1a" />
387      -->
388152      <description>Dragon's Lair (Jpn)</description>
389153      <year>1994</year>
390154      <publisher>Sega</publisher>
391155      <info name="serial" value="G-6035"/>
392      <info name="disk_ring" value="G-6035P-00191 4"/>
393156      <info name="release" value="19940603"/>
394157      <info name="alt_title" value="ドラゴンズ・レア"/>
395158      <part name="cdrom" interface="scd_cdrom">
r242703r242704
400163   </software>
401164
402165   <software name="dynamicc">
403      <!-- source redump.org
404      <rom name="Dynamic Country Club (Japan).cue" size="1581" crc="82b9b757" />
405      <rom name="Dynamic Country Club (Japan) (Track 01).bin" size="13556928" crc="aecc9427" />
406      <rom name="Dynamic Country Club (Japan) (Track 02).bin" size="29094240" crc="33ee0730" />
407      <rom name="Dynamic Country Club (Japan) (Track 03).bin" size="27845328" crc="cc8c2438" />
408      <rom name="Dynamic Country Club (Japan) (Track 04).bin" size="30401952" crc="37f8204a" />
409      <rom name="Dynamic Country Club (Japan) (Track 05).bin" size="28699104" crc="5174a4ab" />
410      <rom name="Dynamic Country Club (Japan) (Track 06).bin" size="31291008" crc="a13be94d" />
411      <rom name="Dynamic Country Club (Japan) (Track 07).bin" size="28600320" crc="5de70586" />
412      <rom name="Dynamic Country Club (Japan) (Track 08).bin" size="30206736" crc="1d08e78a" />
413      <rom name="Dynamic Country Club (Japan) (Track 09).bin" size="31352160" crc="92ca0d3c" />
414      <rom name="Dynamic Country Club (Japan) (Track 10).bin" size="76277712" crc="82cc28e6" />
415      <rom name="Dynamic Country Club (Japan) (Track 11).bin" size="7890960" crc="08e07cd7" />
416      <rom name="Dynamic Country Club (Japan) (Track 12).bin" size="10315872" crc="22aacaf7" />
417      <rom name="Dynamic Country Club (Japan) (Track 13).bin" size="13425216" crc="3dc87886" />
418      -->
419166      <description>Dynamic Country Club (Jpn)</description>
420167      <year>1993</year>
421168      <publisher>Sega</publisher>
422169      <info name="serial" value="G-6017"/>
423      <info name="disk_ring" value="G-6017P-00076-R1M V"/>
424170      <info name="release" value="19930716"/>
425171      <info name="alt_title" value="ダイナミックカントリークラブ"/>
426172      <part name="cdrom" interface="scd_cdrom">
r242703r242704
431177   </software>
432178
433179   <software name="earnest">
434      <!-- source redump.org
435      <rom name="Earnest Evans (Japan).cue" size="2882" crc="688b4a76" />
436      <rom name="Earnest Evans (Japan) (Track 01).bin" size="5207328" crc="8438f16a" />
437      <rom name="Earnest Evans (Japan) (Track 02).bin" size="1564080" crc="df681534" />
438      <rom name="Earnest Evans (Japan) (Track 03).bin" size="7437024" crc="c5b6c263" />
439      <rom name="Earnest Evans (Japan) (Track 04).bin" size="3699696" crc="de1f51a4" />
440      <rom name="Earnest Evans (Japan) (Track 05).bin" size="9840768" crc="7be35bc1" />
441      <rom name="Earnest Evans (Japan) (Track 06).bin" size="38088288" crc="5d19e3c6" />
442      <rom name="Earnest Evans (Japan) (Track 07).bin" size="39748800" crc="6df6fe9d" />
443      <rom name="Earnest Evans (Japan) (Track 08).bin" size="9360960" crc="670c3600" />
444      <rom name="Earnest Evans (Japan) (Track 09).bin" size="30949968" crc="6cadf4a9" />
445      <rom name="Earnest Evans (Japan) (Track 10).bin" size="8361360" crc="1e1109c5" />
446      <rom name="Earnest Evans (Japan) (Track 11).bin" size="39984000" crc="2ef9a22a" />
447      <rom name="Earnest Evans (Japan) (Track 12).bin" size="40056912" crc="0e4b9019" />
448      <rom name="Earnest Evans (Japan) (Track 13).bin" size="29614032" crc="53b768ad" />
449      <rom name="Earnest Evans (Japan) (Track 14).bin" size="43876560" crc="a3ed08cc" />
450      <rom name="Earnest Evans (Japan) (Track 15).bin" size="6289248" crc="fde2bc4b" />
451      <rom name="Earnest Evans (Japan) (Track 16).bin" size="16840320" crc="5f96fe02" />
452      <rom name="Earnest Evans (Japan) (Track 17).bin" size="7547568" crc="bf4f1772" />
453      <rom name="Earnest Evans (Japan) (Track 18).bin" size="39664128" crc="ea26c739" />
454      <rom name="Earnest Evans (Japan) (Track 19).bin" size="14707056" crc="2a143709" />
455      <rom name="Earnest Evans (Japan) (Track 20).bin" size="4127760" crc="b3892991" />
456      <rom name="Earnest Evans (Japan) (Track 21).bin" size="43345008" crc="8db32e90" />
457      <rom name="Earnest Evans (Japan) (Track 22).bin" size="20798736" crc="c860f137" />
458      <rom name="Earnest Evans (Japan) (Track 23).bin" size="35209440" crc="5ab179a7" />
459      <rom name="Earnest Evans (Japan) (Track 24).bin" size="49601328" crc="bde9a2a9" />
460      <rom name="Earnest Evans (Japan) (Track 25).bin" size="46830672" crc="f3e9740d" />
461      -->
462180      <description>Earnest Evans (Jpn)</description>
463181      <year>1991</year>
464182      <publisher>Wolf Team</publisher>
465183      <info name="serial" value="T-32014"/>
466      <info name="disk_ring" value="T-32014P-00007-R1K V"/>
467184      <info name="release" value="19911220"/>
468185      <info name="alt_title" value="アーネストエバンス"/>
469186      <part name="cdrom" interface="scd_cdrom">
r242703r242704
474191   </software>
475192
476193   <software name="supleag">
477      <!-- source redump.org
478      <rom name="Egawa Suguru no Super League CD (Japan).cue" size="4672" crc="46a0371c" />
479      <rom name="Egawa Suguru no Super League CD (Japan) (Track 01).bin" size="41446944" crc="ef4adeb8" />
480      <rom name="Egawa Suguru no Super League CD (Japan) (Track 02).bin" size="1397088" crc="b4a16139" />
481      <rom name="Egawa Suguru no Super League CD (Japan) (Track 03).bin" size="2540160" crc="b483f342" />
482      <rom name="Egawa Suguru no Super League CD (Japan) (Track 04).bin" size="1820448" crc="a96d8c52" />
483      <rom name="Egawa Suguru no Super League CD (Japan) (Track 05).bin" size="1505280" crc="12be15e0" />
484      <rom name="Egawa Suguru no Super League CD (Japan) (Track 06).bin" size="1406496" crc="2041fb9d" />
485      <rom name="Egawa Suguru no Super League CD (Japan) (Track 07).bin" size="1493520" crc="26800176" />
486      <rom name="Egawa Suguru no Super League CD (Japan) (Track 08).bin" size="1759296" crc="de86c0d2" />
487      <rom name="Egawa Suguru no Super League CD (Japan) (Track 09).bin" size="4725168" crc="8b20aa25" />
488      <rom name="Egawa Suguru no Super League CD (Japan) (Track 10).bin" size="15342096" crc="53746b8f" />
489      <rom name="Egawa Suguru no Super League CD (Japan) (Track 11).bin" size="2267328" crc="3b80f7ac" />
490      <rom name="Egawa Suguru no Super League CD (Japan) (Track 12).bin" size="2483712" crc="b0041e4b" />
491      <rom name="Egawa Suguru no Super League CD (Japan) (Track 13).bin" size="1975680" crc="e7d4c28b" />
492      <rom name="Egawa Suguru no Super League CD (Japan) (Track 14).bin" size="2460192" crc="66ddb94f" />
493      <rom name="Egawa Suguru no Super League CD (Japan) (Track 15).bin" size="2747136" crc="3dc687fe" />
494      <rom name="Egawa Suguru no Super League CD (Japan) (Track 16).bin" size="2286144" crc="96428c1e" />
495      <rom name="Egawa Suguru no Super League CD (Japan) (Track 17).bin" size="2730672" crc="c1eac89e" />
496      <rom name="Egawa Suguru no Super League CD (Japan) (Track 18).bin" size="2319072" crc="25ef555f" />
497      <rom name="Egawa Suguru no Super League CD (Japan) (Track 19).bin" size="2272032" crc="833ba6d9" />
498      <rom name="Egawa Suguru no Super League CD (Japan) (Track 20).bin" size="2549568" crc="4517bf2e" />
499      <rom name="Egawa Suguru no Super League CD (Japan) (Track 21).bin" size="2549568" crc="efb13585" />
500      <rom name="Egawa Suguru no Super League CD (Japan) (Track 22).bin" size="2335536" crc="60b05d7d" />
501      <rom name="Egawa Suguru no Super League CD (Japan) (Track 23).bin" size="2810640" crc="f5e6f8c4" />
502      <rom name="Egawa Suguru no Super League CD (Japan) (Track 24).bin" size="3081120" crc="c5327ee5" />
503      <rom name="Egawa Suguru no Super League CD (Japan) (Track 25).bin" size="3024672" crc="59329de4" />
504      <rom name="Egawa Suguru no Super League CD (Japan) (Track 26).bin" size="2892960" crc="d1a2e22c" />
505      <rom name="Egawa Suguru no Super League CD (Japan) (Track 27).bin" size="3344544" crc="b7e72774" />
506      <rom name="Egawa Suguru no Super League CD (Japan) (Track 28).bin" size="3041136" crc="20534307" />
507      <rom name="Egawa Suguru no Super League CD (Japan) (Track 29).bin" size="2925888" crc="be112161" />
508      <rom name="Egawa Suguru no Super League CD (Japan) (Track 30).bin" size="3238704" crc="f90a491f" />
509      <rom name="Egawa Suguru no Super League CD (Japan) (Track 31).bin" size="3024672" crc="17ce4d8e" />
510      <rom name="Egawa Suguru no Super League CD (Japan) (Track 32).bin" size="3361008" crc="8d79c9dd" />
511      <rom name="Egawa Suguru no Super League CD (Japan) (Track 33).bin" size="3400992" crc="16cdd168" />
512      <rom name="Egawa Suguru no Super League CD (Japan) (Track 34).bin" size="3064656" crc="ff7429af" />
513      <rom name="Egawa Suguru no Super League CD (Japan) (Track 35).bin" size="1815744" crc="2c146ad4" />
514      -->
515194      <description>Egawa Suguru no Super League CD (Jpn)</description>
516195      <year>1993</year>
517196      <publisher>Sega</publisher>
518197      <info name="serial" value="G-6019"/>
519      <info name="disk_ring" value="G-6019P-00083-R1M V"/>
520198      <info name="release" value="19930806"/>
521199      <info name="alt_title" value="江川卓のスーパーリーグCD"/>
522200      <part name="cdrom" interface="scd_cdrom">
r242703r242704
527205   </software>
528206
529207   <software name="f1circus">
530      <!-- source redump.org
531      <rom name="F1 Circus CD (Japan).cue" size="3317" crc="dc3116ca" />
532      <rom name="F1 Circus CD (Japan) (Track 01).bin" size="16995552" crc="4100652e" />
533      <rom name="F1 Circus CD (Japan) (Track 02).bin" size="8892912" crc="3998b296" />
534      <rom name="F1 Circus CD (Japan) (Track 03).bin" size="4668720" crc="5a652ee0" />
535      <rom name="F1 Circus CD (Japan) (Track 04).bin" size="9332736" crc="6e36fc18" />
536      <rom name="F1 Circus CD (Japan) (Track 05).bin" size="19319328" crc="23c8153a" />
537      <rom name="F1 Circus CD (Japan) (Track 06).bin" size="4983888" crc="d494dffe" />
538      <rom name="F1 Circus CD (Japan) (Track 07).bin" size="3953712" crc="17de7797" />
539      <rom name="F1 Circus CD (Japan) (Track 08).bin" size="12056352" crc="518e935d" />
540      <rom name="F1 Circus CD (Japan) (Track 09).bin" size="21821856" crc="ce39f013" />
541      <rom name="F1 Circus CD (Japan) (Track 10).bin" size="32187120" crc="7eeeb8b7" />
542      <rom name="F1 Circus CD (Japan) (Track 11).bin" size="32803344" crc="3144ca3e" />
543      <rom name="F1 Circus CD (Japan) (Track 12).bin" size="36166704" crc="98f869a7" />
544      <rom name="F1 Circus CD (Japan) (Track 13).bin" size="27577200" crc="7dfd8b00" />
545      <rom name="F1 Circus CD (Japan) (Track 14).bin" size="43728384" crc="90a7d886" />
546      <rom name="F1 Circus CD (Japan) (Track 15).bin" size="18801888" crc="d6b8fc84" />
547      <rom name="F1 Circus CD (Japan) (Track 16).bin" size="3085824" crc="17b74707" />
548      <rom name="F1 Circus CD (Japan) (Track 17).bin" size="16830912" crc="0530e5ff" />
549      <rom name="F1 Circus CD (Japan) (Track 18).bin" size="1387680" crc="6be88609" />
550      <rom name="F1 Circus CD (Japan) (Track 19).bin" size="5950560" crc="c75a3386" />
551      <rom name="F1 Circus CD (Japan) (Track 20).bin" size="16174704" crc="649ef4aa" />
552      <rom name="F1 Circus CD (Japan) (Track 21).bin" size="8815296" crc="fda8aebf" />
553      <rom name="F1 Circus CD (Japan) (Track 22).bin" size="14342496" crc="d1a046ca" />
554      <rom name="F1 Circus CD (Japan) (Track 23).bin" size="2561328" crc="21b32bfd" />
555      <rom name="F1 Circus CD (Japan) (Track 24).bin" size="10873296" crc="0f666453" />
556      <rom name="F1 Circus CD (Japan) (Track 25).bin" size="14843472" crc="459a4d4a" />
557      <rom name="F1 Circus CD (Japan) (Track 26).bin" size="19121760" crc="58595cf3" />
558      <rom name="F1 Circus CD (Japan) (Track 27).bin" size="1752240" crc="2af8def7" />
559      <rom name="F1 Circus CD (Japan) (Track 28).bin" size="11012064" crc="f1e3d543" />
560      <rom name="F1 Circus CD (Japan) (Track 29).bin" size="1387680" crc="6be88609" />
561      -->
562208      <description>F1 Circus CD (Jpn)</description>
563209      <year>1994</year>
564210      <publisher>Nichibutsu</publisher>
565211      <info name="serial" value="T-71014"/>
566      <info name="disk_ring" value="T-71014P-00121 1"/>
567212      <info name="release" value="19940318"/>
568213      <info name="alt_title" value="F1サーカスCD"/>
569214      <part name="cdrom" interface="scd_cdrom">
r242703r242704
574219   </software>
575220
576221   <software name="ffightcd">
577      <!-- source redump.org
578      <rom name="Final Fight CD (Japan).cue" size="3375" crc="68256ab8" />
579      <rom name="Final Fight CD (Japan) (Track 01).bin" size="28209888" crc="0539a47e" />
580      <rom name="Final Fight CD (Japan) (Track 02).bin" size="22936704" crc="0a05e927" />
581      <rom name="Final Fight CD (Japan) (Track 03).bin" size="23799888" crc="d7531f85" />
582      <rom name="Final Fight CD (Japan) (Track 04).bin" size="22790880" crc="a68bc30b" />
583      <rom name="Final Fight CD (Japan) (Track 05).bin" size="22501584" crc="e220f412" />
584      <rom name="Final Fight CD (Japan) (Track 06).bin" size="34280400" crc="cf65493f" />
585      <rom name="Final Fight CD (Japan) (Track 07).bin" size="22181712" crc="051d633a" />
586      <rom name="Final Fight CD (Japan) (Track 08).bin" size="20535312" crc="0118969b" />
587      <rom name="Final Fight CD (Japan) (Track 09).bin" size="23437680" crc="fddb4185" />
588      <rom name="Final Fight CD (Japan) (Track 10).bin" size="22962576" crc="c2fab799" />
589      <rom name="Final Fight CD (Japan) (Track 11).bin" size="22852032" crc="9f720e3f" />
590      <rom name="Final Fight CD (Japan) (Track 12).bin" size="30084432" crc="38da1600" />
591      <rom name="Final Fight CD (Japan) (Track 13).bin" size="1361808" crc="6295a806" />
592      <rom name="Final Fight CD (Japan) (Track 14).bin" size="1766352" crc="f5dc03cd" />
593      <rom name="Final Fight CD (Japan) (Track 15).bin" size="2253216" crc="6cf0af23" />
594      <rom name="Final Fight CD (Japan) (Track 16).bin" size="1481760" crc="0741c9ec" />
595      <rom name="Final Fight CD (Japan) (Track 17).bin" size="21285600" crc="bc95b4cd" />
596      <rom name="Final Fight CD (Japan) (Track 18).bin" size="2474304" crc="34e60016" />
597      <rom name="Final Fight CD (Japan) (Track 19).bin" size="1940400" crc="2b3737b4" />
598      <rom name="Final Fight CD (Japan) (Track 20).bin" size="21621936" crc="63b1a5fd" />
599      <rom name="Final Fight CD (Japan) (Track 21).bin" size="2413152" crc="42dde540" />
600      <rom name="Final Fight CD (Japan) (Track 22).bin" size="34228656" crc="315d88df" />
601      <rom name="Final Fight CD (Japan) (Track 23).bin" size="23129568" crc="d2e3ccd4" />
602      <rom name="Final Fight CD (Japan) (Track 24).bin" size="24794784" crc="34c52149" />
603      <rom name="Final Fight CD (Japan) (Track 25).bin" size="3996048" crc="0a7884e2" />
604      <rom name="Final Fight CD (Japan) (Track 26).bin" size="4214784" crc="0526ca2e" />
605      <rom name="Final Fight CD (Japan) (Track 27).bin" size="4188912" crc="9bab4ce0" />
606      <rom name="Final Fight CD (Japan) (Track 28).bin" size="8897616" crc="385633f7" />
607      <rom name="Final Fight CD (Japan) (Track 29).bin" size="7178304" crc="f8cfa374" />
608      -->
609222      <description>Final Fight CD (Jpn)</description>
610223      <year>1993</year>
611224      <publisher>Sega</publisher>
612225      <info name="serial" value="G-6013"/>
613      <info name="disk_ring" value="G-6013P-00059-R1M V"/>
614226      <info name="release" value="19930402"/>
615227      <info name="alt_title" value="ファイナルファイトCD"/>
616228      <part name="cdrom" interface="scd_cdrom">
r242703r242704
621233   </software>
622234
623235   <software name="gambler2">
624      <!-- source redump.org
625      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan).cue" size="8032" crc="4dcef857" />
626      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 01).bin" size="33762960" crc="502bf08e" />
627      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 02).bin" size="1088976" crc="a9e9f99c" />
628      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 03).bin" size="13695696" crc="43418025" />
629      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 04).bin" size="8401344" crc="1dc1f069" />
630      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 05).bin" size="20420064" crc="ed17a707" />
631      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 06).bin" size="6576192" crc="983306ed" />
632      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 07).bin" size="6578544" crc="eb865e95" />
633      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 08).bin" size="6578544" crc="156440e6" />
634      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 09).bin" size="12924240" crc="9864eeb6" />
635      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 10).bin" size="53089344" crc="75fa48f9" />
636      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 11).bin" size="18068064" crc="d96c999f" />
637      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 12).bin" size="6576192" crc="d8f31c88" />
638      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 13).bin" size="6578544" crc="9ba70e3e" />
639      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 14).bin" size="6576192" crc="523b37b8" />
640      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 15).bin" size="12961872" crc="e44032e5" />
641      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 16).bin" size="39461856" crc="0d305f7e" />
642      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 17).bin" size="2533104" crc="d38cceee" />
643      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 18).bin" size="1448832" crc="1a255e22" />
644      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 19).bin" size="21005712" crc="9cd1b834" />
645      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 20).bin" size="17287200" crc="0cf6af5d" />
646      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 21).bin" size="11856432" crc="fcb322d1" />
647      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 22).bin" size="1975680" crc="a7b89b43" />
648      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 23).bin" size="1905120" crc="6392950d" />
649      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 24).bin" size="9772560" crc="6e9d1085" />
650      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 25).bin" size="14396592" crc="e259fb2a" />
651      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 26).bin" size="7432320" crc="5104e38d" />
652      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 27).bin" size="10548720" crc="cc3615af" />
653      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 28).bin" size="9346848" crc="1534e794" />
654      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 29).bin" size="10045392" crc="a79aac7d" />
655      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 30).bin" size="7947408" crc="ef38da5e" />
656      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 31).bin" size="9226896" crc="9df553b0" />
657      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 32).bin" size="3010560" crc="5783f0c5" />
658      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 33).bin" size="8429568" crc="5312176b" />
659      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 34).bin" size="11936400" crc="064f6028" />
660      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 35).bin" size="10379376" crc="98df8675" />
661      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 36).bin" size="6037584" crc="c530d35c" />
662      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 37).bin" size="9179856" crc="079ca02b" />
663      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 38).bin" size="8730624" crc="94abc24b" />
664      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 39).bin" size="11026176" crc="f7ba8d2b" />
665      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 40).bin" size="11821152" crc="5cd7e771" />
666      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 41).bin" size="16527504" crc="10c9524c" />
667      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 42).bin" size="6639696" crc="6a6f20ee" />
668      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 43).bin" size="9772560" crc="e42fdd8d" />
669      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 44).bin" size="9346848" crc="fdb01fcb" />
670      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 45).bin" size="11266080" crc="b9e7d963" />
671      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 46).bin" size="10379376" crc="c0b2ad0f" />
672      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 47).bin" size="6192816" crc="fdf77b7f" />
673      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 48).bin" size="9210432" crc="1166b818" />
674      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 49).bin" size="7225344" crc="3ca798cf" />
675      <rom name="Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) (Track 50).bin" size="10548720" crc="09d601aa" />
676      -->
677236      <description>Gambler Jikochuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Jpn)</description>
678237      <year>1992</year>
679238      <publisher>Game Arts</publisher>
680239      <info name="serial" value="T-45044"/>
681      <info name="disk_ring" value="T-45044P-00037-R2M V"/>
682240      <info name="release" value="19921225"/>
683241      <info name="alt_title" value="ぎゅわんぶらあ自己中心派2 激闘! 東京マージャンランド編"/>
684242      <part name="cdrom" interface="scd_cdrom">
r242703r242704
689247   </software>
690248
691249   <software name="gamenk1">
692      <!-- source redump.org
693      <rom name="Game no Kandume Vol.1 (Japan).cue" size="3826" crc="0bc97ffc" />
694      <rom name="Game no Kandume Vol.1 (Japan) (Track 01).bin" size="11416608" crc="1babe750" />
695      <rom name="Game no Kandume Vol.1 (Japan) (Track 02).bin" size="17461248" crc="fd703147" />
696      <rom name="Game no Kandume Vol.1 (Japan) (Track 03).bin" size="5049744" crc="d6ab82f1" />
697      <rom name="Game no Kandume Vol.1 (Japan) (Track 04).bin" size="9737280" crc="53d8695d" />
698      <rom name="Game no Kandume Vol.1 (Japan) (Track 05).bin" size="2646000" crc="3f98622a" />
699      <rom name="Game no Kandume Vol.1 (Japan) (Track 06).bin" size="10748640" crc="ab65519c" />
700      <rom name="Game no Kandume Vol.1 (Japan) (Track 07).bin" size="6011712" crc="54871f4e" />
701      <rom name="Game no Kandume Vol.1 (Japan) (Track 08).bin" size="5414304" crc="24f4072f" />
702      <rom name="Game no Kandume Vol.1 (Japan) (Track 09).bin" size="10372320" crc="e961c7af" />
703      <rom name="Game no Kandume Vol.1 (Japan) (Track 10).bin" size="1719312" crc="54c4cac3" />
704      <rom name="Game no Kandume Vol.1 (Japan) (Track 11).bin" size="14055552" crc="be1afe61" />
705      <rom name="Game no Kandume Vol.1 (Japan) (Track 12).bin" size="14046144" crc="69261cbf" />
706      <rom name="Game no Kandume Vol.1 (Japan) (Track 13).bin" size="9702000" crc="87b2f3a1" />
707      <rom name="Game no Kandume Vol.1 (Japan) (Track 14).bin" size="18771312" crc="34eaa072" />
708      <rom name="Game no Kandume Vol.1 (Japan) (Track 15).bin" size="1199520" crc="08461b8f" />
709      <rom name="Game no Kandume Vol.1 (Japan) (Track 16).bin" size="17070816" crc="20248aad" />
710      <rom name="Game no Kandume Vol.1 (Japan) (Track 17).bin" size="12637296" crc="a69947db" />
711      <rom name="Game no Kandume Vol.1 (Japan) (Track 18).bin" size="20293056" crc="ea4834df" />
712      <rom name="Game no Kandume Vol.1 (Japan) (Track 19).bin" size="15614928" crc="10815e44" />
713      <rom name="Game no Kandume Vol.1 (Japan) (Track 20).bin" size="11538912" crc="0705a2a6" />
714      <rom name="Game no Kandume Vol.1 (Japan) (Track 21).bin" size="11515392" crc="db8f942b" />
715      <rom name="Game no Kandume Vol.1 (Japan) (Track 22).bin" size="15422064" crc="36c13763" />
716      <rom name="Game no Kandume Vol.1 (Japan) (Track 23).bin" size="12305664" crc="ad8202a2" />
717      <rom name="Game no Kandume Vol.1 (Japan) (Track 24).bin" size="23230704" crc="78b082cd" />
718      <rom name="Game no Kandume Vol.1 (Japan) (Track 25).bin" size="22717968" crc="a47f14dc" />
719      <rom name="Game no Kandume Vol.1 (Japan) (Track 26).bin" size="8678880" crc="3ceecc3b" />
720      <rom name="Game no Kandume Vol.1 (Japan) (Track 27).bin" size="19406352" crc="b3a3c5a7" />
721      <rom name="Game no Kandume Vol.1 (Japan) (Track 28).bin" size="14182560" crc="c221826b" />
722      <rom name="Game no Kandume Vol.1 (Japan) (Track 29).bin" size="18529056" crc="3a080106" />
723      <rom name="Game no Kandume Vol.1 (Japan) (Track 30).bin" size="19121760" crc="aa75b323" />
724      <rom name="Game no Kandume Vol.1 (Japan) (Track 31).bin" size="1300656" crc="0db9cca1" />
725      -->
726250      <description>Game no Kandume Vol.1 (Jpn)</description>
727251      <year>1994</year>
728252      <publisher>Sega</publisher>
729253      <info name="serial" value="G-6032"/>
730      <info name="disk_ring" value="G-6032P-00165 1"/>
731254      <info name="release" value="19940318"/>
732255      <info name="alt_title" value="ゲームのかんづめ VOL.1"/>
733256      <part name="cdrom" interface="scd_cdrom">
r242703r242704
738261   </software>
739262
740263   <software name="gamenk2">
741      <!-- source redump.org
742      <rom name="Game no Kandume Vol.2 (Japan).cue" size="2958" crc="1d3c864c" />
743      <rom name="Game no Kandume Vol.2 (Japan) (Track 01).bin" size="9041088" crc="b02c2f00" />
744      <rom name="Game no Kandume Vol.2 (Japan) (Track 02).bin" size="16654512" crc="a7378315" />
745      <rom name="Game no Kandume Vol.2 (Japan) (Track 03).bin" size="18406752" crc="8f0954b1" />
746      <rom name="Game no Kandume Vol.2 (Japan) (Track 04).bin" size="30270240" crc="df2d177a" />
747      <rom name="Game no Kandume Vol.2 (Japan) (Track 05).bin" size="19886160" crc="0aade09e" />
748      <rom name="Game no Kandume Vol.2 (Japan) (Track 06).bin" size="20194272" crc="28463462" />
749      <rom name="Game no Kandume Vol.2 (Japan) (Track 07).bin" size="10125360" crc="d2d1f6f7" />
750      <rom name="Game no Kandume Vol.2 (Japan) (Track 08).bin" size="26173056" crc="d7b80f82" />
751      <rom name="Game no Kandume Vol.2 (Japan) (Track 09).bin" size="13347600" crc="b8244aa7" />
752      <rom name="Game no Kandume Vol.2 (Japan) (Track 10).bin" size="6700848" crc="a795db12" />
753      <rom name="Game no Kandume Vol.2 (Japan) (Track 11).bin" size="18192720" crc="335d1fef" />
754      <rom name="Game no Kandume Vol.2 (Japan) (Track 12).bin" size="14542416" crc="fd02d21f" />
755      <rom name="Game no Kandume Vol.2 (Japan) (Track 13).bin" size="23153088" crc="2cf836aa" />
756      <rom name="Game no Kandume Vol.2 (Japan) (Track 14).bin" size="21812448" crc="4b503da2" />
757      <rom name="Game no Kandume Vol.2 (Japan) (Track 15).bin" size="19462800" crc="2bd29c90" />
758      <rom name="Game no Kandume Vol.2 (Japan) (Track 16).bin" size="17505936" crc="6d71ae65" />
759      <rom name="Game no Kandume Vol.2 (Japan) (Track 17).bin" size="9443280" crc="f525a5b7" />
760      <rom name="Game no Kandume Vol.2 (Japan) (Track 18).bin" size="21443184" crc="4cc40da6" />
761      <rom name="Game no Kandume Vol.2 (Japan) (Track 19).bin" size="15890112" crc="7d7347ca" />
762      <rom name="Game no Kandume Vol.2 (Japan) (Track 20).bin" size="27379632" crc="3807f0d4" />
763      <rom name="Game no Kandume Vol.2 (Japan) (Track 21).bin" size="10602816" crc="e72fdc5c" />
764      <rom name="Game no Kandume Vol.2 (Japan) (Track 22).bin" size="18529056" crc="3a080106" />
765      <rom name="Game no Kandume Vol.2 (Japan) (Track 23).bin" size="19121760" crc="aa75b323" />
766      <rom name="Game no Kandume Vol.2 (Japan) (Track 24).bin" size="1420608" crc="e76b47df" />
767      -->
768264      <description>Game no Kandume Vol.2 (Jpn)</description>
769265      <year>1994</year>
770266      <publisher>Sega</publisher>
771267      <info name="serial" value="G-6033"/>
772      <info name="disk_ring" value="G-6033P-00166 1"/>
773268      <info name="release" value="19940318"/>
774269      <info name="alt_title" value="ゲームのかんづめ VOL.2"/>
775270      <part name="cdrom" interface="scd_cdrom">
r242703r242704
780275   </software>
781276
782277   <software name="garousp">
783      <!-- source redump.org
784      <rom name="Garou Densetsu Special (Japan).cue" size="4732" crc="a1d75963" />
785      <rom name="Garou Densetsu Special (Japan) (Track 01).bin" size="15826608" crc="9cab4019" />
786      <rom name="Garou Densetsu Special (Japan) (Track 02).bin" size="2904720" crc="ba444a89" />
787      <rom name="Garou Densetsu Special (Japan) (Track 03).bin" size="5880000" crc="da231b92" />
788      <rom name="Garou Densetsu Special (Japan) (Track 04).bin" size="6595008" crc="3a5a72e5" />
789      <rom name="Garou Densetsu Special (Japan) (Track 05).bin" size="4214784" crc="343bbd24" />
790      <rom name="Garou Densetsu Special (Japan) (Track 06).bin" size="7674576" crc="6a50eaf5" />
791      <rom name="Garou Densetsu Special (Japan) (Track 07).bin" size="19935552" crc="5650a847" />
792      <rom name="Garou Densetsu Special (Japan) (Track 08).bin" size="21699552" crc="1ed28e91" />
793      <rom name="Garou Densetsu Special (Japan) (Track 09).bin" size="20728176" crc="de9bb9f3" />
794      <rom name="Garou Densetsu Special (Japan) (Track 10).bin" size="25580352" crc="467b5359" />
795      <rom name="Garou Densetsu Special (Japan) (Track 11).bin" size="18877152" crc="31a8cb58" />
796      <rom name="Garou Densetsu Special (Japan) (Track 12).bin" size="26462352" crc="7ffea567" />
797      <rom name="Garou Densetsu Special (Japan) (Track 13).bin" size="26638752" crc="7e051673" />
798      <rom name="Garou Densetsu Special (Japan) (Track 14).bin" size="31048752" crc="52951e33" />
799      <rom name="Garou Densetsu Special (Japan) (Track 15).bin" size="20198976" crc="a7d6ec50" />
800      <rom name="Garou Densetsu Special (Japan) (Track 16).bin" size="47893776" crc="44feee0c" />
801      <rom name="Garou Densetsu Special (Japan) (Track 17).bin" size="27607776" crc="6e5d1f3a" />
802      <rom name="Garou Densetsu Special (Japan) (Track 18).bin" size="17729376" crc="d447388b" />
803      <rom name="Garou Densetsu Special (Japan) (Track 19).bin" size="23992752" crc="3d8692be" />
804      <rom name="Garou Densetsu Special (Japan) (Track 20).bin" size="29018976" crc="59e93eb5" />
805      <rom name="Garou Densetsu Special (Japan) (Track 21).bin" size="21523152" crc="19a6ba07" />
806      <rom name="Garou Densetsu Special (Japan) (Track 22).bin" size="36869952" crc="b9820fe9" />
807      <rom name="Garou Densetsu Special (Japan) (Track 23).bin" size="3720864" crc="b9e0233b" />
808      <rom name="Garou Densetsu Special (Japan) (Track 24).bin" size="3720864" crc="d182e9ca" />
809      <rom name="Garou Densetsu Special (Japan) (Track 25).bin" size="3720864" crc="13999599" />
810      <rom name="Garou Densetsu Special (Japan) (Track 26).bin" size="3720864" crc="e845c787" />
811      <rom name="Garou Densetsu Special (Japan) (Track 27).bin" size="3720864" crc="44961647" />
812      <rom name="Garou Densetsu Special (Japan) (Track 28).bin" size="3720864" crc="ce9711a8" />
813      <rom name="Garou Densetsu Special (Japan) (Track 29).bin" size="3720864" crc="8b1299a4" />
814      <rom name="Garou Densetsu Special (Japan) (Track 30).bin" size="3720864" crc="d6b970c3" />
815      <rom name="Garou Densetsu Special (Japan) (Track 31).bin" size="3720864" crc="f56b4847" />
816      <rom name="Garou Densetsu Special (Japan) (Track 32).bin" size="3720864" crc="3f0a92f7" />
817      <rom name="Garou Densetsu Special (Japan) (Track 33).bin" size="3720864" crc="9caa1fa6" />
818      <rom name="Garou Densetsu Special (Japan) (Track 34).bin" size="3720864" crc="7808bd0a" />
819      <rom name="Garou Densetsu Special (Japan) (Track 35).bin" size="3720864" crc="ecc5296a" />
820      <rom name="Garou Densetsu Special (Japan) (Track 36).bin" size="3720864" crc="0ad8c54d" />
821      <rom name="Garou Densetsu Special (Japan) (Track 37).bin" size="3720864" crc="455176b0" />
822      <rom name="Garou Densetsu Special (Japan) (Track 38).bin" size="2034480" crc="652d1e74" />
823      -->
824278      <description>Garou Densetsu Special (Jpn)</description>
825279      <year>1995</year>
826280      <publisher>Victor Entertainment</publisher>
827281      <info name="serial" value="T-60214"/>
828      <info name="disk_ring" value="T-60214P-R1C V"/>
829282      <info name="release" value="19950321"/>
830283      <info name="alt_title" value="餓狼伝説スペシャル"/>
831284      <part name="cdrom" interface="scd_cdrom">
r242703r242704
836289   </software>
837290
838291   <software name="heavenly">
839      <!-- source redump.org
840      <rom name="Heavenly Symphony (Japan).cue" size="4422" crc="c406b0cd" />
841      <rom name="Heavenly Symphony (Japan) (Track 01).bin" size="202761216" crc="41aafac7" />
842      <rom name="Heavenly Symphony (Japan) (Track 02).bin" size="16014768" crc="129ed3da" />
843      <rom name="Heavenly Symphony (Japan) (Track 03).bin" size="19707408" crc="fc68a898" />
844      <rom name="Heavenly Symphony (Japan) (Track 04).bin" size="16753296" crc="32337abf" />
845      <rom name="Heavenly Symphony (Japan) (Track 05).bin" size="11661216" crc="f1f8527c" />
846      <rom name="Heavenly Symphony (Japan) (Track 06).bin" size="11228448" crc="56096ca3" />
847      <rom name="Heavenly Symphony (Japan) (Track 07).bin" size="17433024" crc="dcfa821f" />
848      <rom name="Heavenly Symphony (Japan) (Track 08).bin" size="12324480" crc="d395cb4d" />
849      <rom name="Heavenly Symphony (Japan) (Track 09).bin" size="15462048" crc="c2eb664c" />
850      <rom name="Heavenly Symphony (Japan) (Track 10).bin" size="26107200" crc="5686998d" />
851      <rom name="Heavenly Symphony (Japan) (Track 11).bin" size="11529504" crc="7c24ea79" />
852      <rom name="Heavenly Symphony (Japan) (Track 12).bin" size="15377376" crc="3aa5bdc5" />
853      <rom name="Heavenly Symphony (Japan) (Track 13).bin" size="21337344" crc="bdbc2d65" />
854      <rom name="Heavenly Symphony (Japan) (Track 14).bin" size="2996448" crc="70b00db4" />
855      <rom name="Heavenly Symphony (Japan) (Track 15).bin" size="2493120" crc="3f35ceb6" />
856      <rom name="Heavenly Symphony (Japan) (Track 16).bin" size="7168896" crc="7707f5e0" />
857      <rom name="Heavenly Symphony (Japan) (Track 17).bin" size="3706752" crc="8b741032" />
858      <rom name="Heavenly Symphony (Japan) (Track 18).bin" size="2911776" crc="0d2c6519" />
859      <rom name="Heavenly Symphony (Japan) (Track 19).bin" size="1117200" crc="421f466c" />
860      <rom name="Heavenly Symphony (Japan) (Track 20).bin" size="13032432" crc="7fc3c5a7" />
861      <rom name="Heavenly Symphony (Japan) (Track 21).bin" size="10499328" crc="4b6cc7ce" />
862      <rom name="Heavenly Symphony (Japan) (Track 22).bin" size="9885456" crc="dad1304f" />
863      <rom name="Heavenly Symphony (Japan) (Track 23).bin" size="11228448" crc="c73e18cb" />
864      <rom name="Heavenly Symphony (Japan) (Track 24).bin" size="10861536" crc="57a73fc5" />
865      <rom name="Heavenly Symphony (Japan) (Track 25).bin" size="13220592" crc="58acd55f" />
866      <rom name="Heavenly Symphony (Japan) (Track 26).bin" size="11663568" crc="bd80964d" />
867      <rom name="Heavenly Symphony (Japan) (Track 27).bin" size="11440128" crc="ac0f53d6" />
868      <rom name="Heavenly Symphony (Japan) (Track 28).bin" size="11531856" crc="82dc6f50" />
869      <rom name="Heavenly Symphony (Japan) (Track 29).bin" size="11195520" crc="4df9fad1" />
870      <rom name="Heavenly Symphony (Japan) (Track 30).bin" size="11717664" crc="0cd8fd9b" />
871      <rom name="Heavenly Symphony (Japan) (Track 31).bin" size="11865840" crc="18b4441d" />
872      <rom name="Heavenly Symphony (Japan) (Track 32).bin" size="11376624" crc="356a93b0" />
873      <rom name="Heavenly Symphony (Japan) (Track 33).bin" size="12517344" crc="1b43de31" />
874      <rom name="Heavenly Symphony (Japan) (Track 34).bin" size="11983440" crc="7bd0c837" />
875      <rom name="Heavenly Symphony (Japan) (Track 35).bin" size="16186464" crc="950b6a34" />
876      <rom name="Heavenly Symphony (Japan) (Track 36).bin" size="14866992" crc="108f5a17" />
877      <rom name="Heavenly Symphony (Japan) (Track 37).bin" size="43267392" crc="e55cb55b" />
878      -->
879292      <description>Heavenly Symphony (Jpn)</description>
880293      <year>1994</year>
881294      <publisher>Sega</publisher>
882295      <info name="serial" value="G-6034"/>
883      <info name="disk_ring" value="G-6034P-00194-R1M V"/>
884296      <info name="release" value="19940423"/>
885297      <info name="alt_title" value="ヘブンリー シンフォニー フォームラワン ワールド チャンピオンシップ 1993"/>
886298      <part name="cdrom" interface="scd_cdrom">
r242703r242704
891303   </software>
892304
893305   <software name="heavynov">
894      <!-- source redump.org
895      <rom name="Heavy Nova (Japan).cue" size="1790" crc="3c2ab392" />
896      <rom name="Heavy Nova (Japan) (Track 01).bin" size="2791824" crc="a282781b" />
897      <rom name="Heavy Nova (Japan) (Track 02).bin" size="28054656" crc="7f76c7b2" />
898      <rom name="Heavy Nova (Japan) (Track 03).bin" size="54808656" crc="90c5bdc2" />
899      <rom name="Heavy Nova (Japan) (Track 04).bin" size="42025536" crc="54c5edf9" />
900      <rom name="Heavy Nova (Japan) (Track 05).bin" size="35134176" crc="a07e4964" />
901      <rom name="Heavy Nova (Japan) (Track 06).bin" size="21922992" crc="a2bc70d2" />
902      <rom name="Heavy Nova (Japan) (Track 07).bin" size="30768864" crc="8fb9fc65" />
903      <rom name="Heavy Nova (Japan) (Track 08).bin" size="32257680" crc="d324dd2a" />
904      <rom name="Heavy Nova (Japan) (Track 09).bin" size="32678688" crc="ccb8c145" />
905      <rom name="Heavy Nova (Japan) (Track 10).bin" size="32718672" crc="3406056c" />
906      <rom name="Heavy Nova (Japan) (Track 11).bin" size="33040896" crc="5dc9f9af" />
907      <rom name="Heavy Nova (Japan) (Track 12).bin" size="31966032" crc="909a1857" />
908      <rom name="Heavy Nova (Japan) (Track 13).bin" size="32836272" crc="a605fc3f" />
909      <rom name="Heavy Nova (Japan) (Track 14).bin" size="31937808" crc="02b03b88" />
910      <rom name="Heavy Nova (Japan) (Track 15).bin" size="27330240" crc="a1b0d2a5" />
911      <rom name="Heavy Nova (Japan) (Track 16).bin" size="13378176" crc="4b4f84d0" />
912      -->
913306      <description>Heavy Nova (Jpn)</description>
914307      <year>1991</year>
915308      <publisher>Micronet</publisher>
916309      <info name="serial" value="T-22014"/>
917      <info name="disk_ring" value="T-22014P-00004-R1K V"/>
918310      <info name="release" value="19911212"/>
919311      <info name="alt_title" value="ヘビーノバ"/>
920312      <part name="cdrom" interface="scd_cdrom">
r242703r242704
925317   </software>
926318
927319   <software name="heimdall">
928      <!-- source redump.org
929      <rom name="Heimdall (Japan).cue" size="2646" crc="d5465570" />
930      <rom name="Heimdall (Japan) (Track 01).bin" size="25881408" crc="b07c3ddd" />
931      <rom name="Heimdall (Japan) (Track 02).bin" size="15523200" crc="9eef3fc6" />
932      <rom name="Heimdall (Japan) (Track 03).bin" size="31159296" crc="31bbdaf2" />
933      <rom name="Heimdall (Japan) (Track 04).bin" size="43356768" crc="f7117edd" />
934      <rom name="Heimdall (Japan) (Track 05).bin" size="19371072" crc="39069d04" />
935      <rom name="Heimdall (Japan) (Track 06).bin" size="38902080" crc="93263477" />
936      <rom name="Heimdall (Japan) (Track 07).bin" size="21584304" crc="d65b22ae" />
937      <rom name="Heimdall (Japan) (Track 08).bin" size="3368064" crc="4c733968" />
938      <rom name="Heimdall (Japan) (Track 09).bin" size="4111296" crc="d358fa19" />
939      <rom name="Heimdall (Japan) (Track 10).bin" size="3266928" crc="bcc96ffb" />
940      <rom name="Heimdall (Japan) (Track 11).bin" size="4955664" crc="72df33cd" />
941      <rom name="Heimdall (Japan) (Track 12).bin" size="4722816" crc="b8c42479" />
942      <rom name="Heimdall (Japan) (Track 13).bin" size="3996048" crc="6c5efce3" />
943      <rom name="Heimdall (Japan) (Track 14).bin" size="3135216" crc="edbda656" />
944      <rom name="Heimdall (Japan) (Track 15).bin" size="3179904" crc="d70d7f89" />
945      <rom name="Heimdall (Japan) (Track 16).bin" size="3673824" crc="d826ee5a" />
946      <rom name="Heimdall (Japan) (Track 17).bin" size="3558576" crc="cd9517f4" />
947      <rom name="Heimdall (Japan) (Track 18).bin" size="3673824" crc="9c155405" />
948      <rom name="Heimdall (Japan) (Track 19).bin" size="3760848" crc="7d47e79f" />
949      <rom name="Heimdall (Japan) (Track 20).bin" size="3179904" crc="1bde23d9" />
950      <rom name="Heimdall (Japan) (Track 21).bin" size="2481360" crc="1cf1a55b" />
951      <rom name="Heimdall (Japan) (Track 22).bin" size="2189712" crc="f0e19043" />
952      <rom name="Heimdall (Japan) (Track 23).bin" size="2683632" crc="a6a2845f" />
953      <rom name="Heimdall (Japan) (Track 24).bin" size="2681280" crc="8e15cd69" />
954      -->
955320      <description>Heimdall (Jpn)</description>
956321      <year>1994</year>
957322      <publisher>Victor Entertainment</publisher>
958323      <info name="serial" value="T-60154"/>
959      <info name="disk_ring" value="T-60054P-00178-R1M V"/>
960324      <info name="release" value="19940318"/>
961325      <info name="alt_title" value="ハイムドール"/>
962326      <part name="cdrom" interface="scd_cdrom">
r242703r242704
967331   </software>
968332
969333   <software name="jagxj220">
970      <!-- source redump.org
971      <rom name="Jaguar XJ220 (Japan) (En,Ja).cue" size="1581" crc="b84b6a6a" />
972      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 01).bin" size="12042240" crc="3ebc3c2e" />
973      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 02).bin" size="63976752" crc="facc3c84" />
974      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 03).bin" size="27821808" crc="4a4281d8" />
975      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 04).bin" size="32267088" crc="9d5d4679" />
976      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 05).bin" size="21518448" crc="2db6a7a0" />
977      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 06).bin" size="18844224" crc="013c1590" />
978      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 07).bin" size="22993152" crc="fe40dd5c" />
979      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 08).bin" size="27760656" crc="9ff69020" />
980      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 09).bin" size="46642512" crc="8bf11829" />
981      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 10).bin" size="56596176" crc="6f018050" />
982      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 11).bin" size="49751856" crc="fa705a13" />
983      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 12).bin" size="39231360" crc="945df445" />
984      <rom name="Jaguar XJ220 (Japan) (En,Ja) (Track 13).bin" size="61763520" crc="c9bc9069" />
985      -->
986334      <description>Jaguar XJ220 (Jpn)</description>
987335      <year>1993</year>
988336      <publisher>Victor Entertainment</publisher>
989337      <info name="serial" value="T-60094"/>
990      <info name="disk_ring" value="T-60094P-00056-R1M V"/>
991338      <info name="release" value="19930326"/>
992339      <info name="alt_title" value="ジャガーXJ220"/>
993340      <part name="cdrom" interface="scd_cdrom">
r242703r242704
998345   </software>
999346
1000347   <software name="jangouwc">
1001      <!-- source redump.org
1002      <rom name="Jangou World Cup (Japan).cue" size="2005" crc="b53cdd58" />
1003      <rom name="Jangou World Cup (Japan) (Track 01).bin" size="33146736" crc="ee6b68a0" />
1004      <rom name="Jangou World Cup (Japan) (Track 02).bin" size="17364816" crc="74c7ade0" />
1005      <rom name="Jangou World Cup (Japan) (Track 03).bin" size="38589264" crc="f356aee6" />
1006      <rom name="Jangou World Cup (Japan) (Track 04).bin" size="38593968" crc="39ad3f59" />
1007      <rom name="Jangou World Cup (Japan) (Track 05).bin" size="38332896" crc="aa68b1e4" />
1008      <rom name="Jangou World Cup (Japan) (Track 06).bin" size="37808400" crc="c8db163d" />
1009      <rom name="Jangou World Cup (Japan) (Track 07).bin" size="38857392" crc="ce3f3b91" />
1010      <rom name="Jangou World Cup (Japan) (Track 08).bin" size="37512048" crc="b14aa173" />
1011      <rom name="Jangou World Cup (Japan) (Track 09).bin" size="38561040" crc="4e6fab78" />
1012      <rom name="Jangou World Cup (Japan) (Track 10).bin" size="38135328" crc="986bf810" />
1013      <rom name="Jangou World Cup (Japan) (Track 11).bin" size="37610832" crc="18188fcd" />
1014      <rom name="Jangou World Cup (Japan) (Track 12).bin" size="16736832" crc="65a3bd54" />
1015      <rom name="Jangou World Cup (Japan) (Track 13).bin" size="1470000" crc="547a2719" />
1016      <rom name="Jangou World Cup (Japan) (Track 14).bin" size="1237152" crc="5748800e" />
1017      <rom name="Jangou World Cup (Japan) (Track 15).bin" size="14083776" crc="39837e4e" />
1018      <rom name="Jangou World Cup (Japan) (Track 16).bin" size="33810000" crc="8342332e" />
1019      <rom name="Jangou World Cup (Japan) (Track 17).bin" size="26601120" crc="86bbc07d" />
1020      -->
1021348      <description>Jangou World Cup (Jpn)</description>
1022349      <year>1993</year>
1023350      <publisher>Victor Entertainment</publisher>
1024351      <info name="serial" value="T-60124"/>
1025      <info name="disk_ring" value="T-60124P-00119 1"/>
1026352      <info name="release" value="19930827"/>
1027353      <info name="alt_title" value="雀豪ワールドカップ"/>
1028354      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1033359   </software>
1034360
1035361   <software name="kamenrzo">
1036      <!-- source redump.org
1037      <rom name="Kamen Rider ZO (Japan).cue" size="562" crc="664ab999" />
1038      <rom name="Kamen Rider ZO (Japan) (Track 1).bin" size="449996400" crc="a21571de" />
1039      <rom name="Kamen Rider ZO (Japan) (Track 2).bin" size="2907072" crc="a1d33bde" />
1040      <rom name="Kamen Rider ZO (Japan) (Track 3).bin" size="2709504" crc="2ee49aa2" />
1041      <rom name="Kamen Rider ZO (Japan) (Track 4).bin" size="11449536" crc="42c25462" />
1042      <rom name="Kamen Rider ZO (Japan) (Track 5).bin" size="2631888" crc="f11cc7d0" />
1043      -->
1044362      <description>Kamen Rider ZO (Jpn)</description>
1045363      <year>1994</year>
1046364      <publisher>Toei Animation</publisher>
1047365      <info name="serial" value="T-141013"/>
1048      <info name="disk_ring" value="T-141014P-00192-R1M V"/>
1049366      <info name="release" value="19940513"/>
1050367      <info name="alt_title" value="仮面ライダーZO"/>
1051368      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1056373   </software>
1057374
1058375   <software name="keio">
1059      <!-- source redump.org
1060      <rom name="Keiou Yuugekitai (Japan).cue" size="2957" crc="e1a6760b" />
1061      <rom name="Keiou Yuugekitai (Japan) (Track 01).bin" size="77853552" crc="8586c1e7" />
1062      <rom name="Keiou Yuugekitai (Japan) (Track 02).bin" size="1117200" crc="6cdfd209" />
1063      <rom name="Keiou Yuugekitai (Japan) (Track 03).bin" size="40720176" crc="1bcab310" />
1064      <rom name="Keiou Yuugekitai (Japan) (Track 04).bin" size="45922800" crc="ad73e1e6" />
1065      <rom name="Keiou Yuugekitai (Japan) (Track 05).bin" size="49062720" crc="ddb213e4" />
1066      <rom name="Keiou Yuugekitai (Japan) (Track 06).bin" size="41087088" crc="b69a3b55" />
1067      <rom name="Keiou Yuugekitai (Japan) (Track 07).bin" size="44499840" crc="22f09035" />
1068      <rom name="Keiou Yuugekitai (Japan) (Track 08).bin" size="38690400" crc="227cd2c6" />
1069      <rom name="Keiou Yuugekitai (Japan) (Track 09).bin" size="37201584" crc="edd11321" />
1070      <rom name="Keiou Yuugekitai (Japan) (Track 10).bin" size="25944912" crc="da153759" />
1071      <rom name="Keiou Yuugekitai (Japan) (Track 11).bin" size="19977888" crc="e1c594c9" />
1072      <rom name="Keiou Yuugekitai (Japan) (Track 12).bin" size="1756944" crc="0d1c28ad" />
1073      <rom name="Keiou Yuugekitai (Japan) (Track 13).bin" size="6851376" crc="9dbc18b5" />
1074      <rom name="Keiou Yuugekitai (Japan) (Track 14).bin" size="19714464" crc="cc90cc4f" />
1075      <rom name="Keiou Yuugekitai (Japan) (Track 15).bin" size="26808096" crc="0387f9a3" />
1076      <rom name="Keiou Yuugekitai (Japan) (Track 16).bin" size="25305168" crc="6adfebc1" />
1077      <rom name="Keiou Yuugekitai (Japan) (Track 17).bin" size="6794928" crc="3cc05521" />
1078      <rom name="Keiou Yuugekitai (Japan) (Track 18).bin" size="7484064" crc="f755eab1" />
1079      <rom name="Keiou Yuugekitai (Japan) (Track 19).bin" size="7437024" crc="78aed185" />
1080      <rom name="Keiou Yuugekitai (Japan) (Track 20).bin" size="7368816" crc="20cbadfd" />
1081      <rom name="Keiou Yuugekitai (Japan) (Track 21).bin" size="7265328" crc="f7178b92" />
1082      <rom name="Keiou Yuugekitai (Japan) (Track 22).bin" size="7270032" crc="1047ba39" />
1083      <rom name="Keiou Yuugekitai (Japan) (Track 23).bin" size="11924640" crc="83b489ef" />
1084      <rom name="Keiou Yuugekitai (Japan) (Track 24).bin" size="26556432" crc="5f24b29f" />
1085      <rom name="Keiou Yuugekitai (Japan) (Track 25).bin" size="9972480" crc="b8ee9bfd" />
1086      -->
1087376      <description>Keiou Yuugekitai (Jpn)</description>
1088377      <year>1993</year>
1089378      <publisher>Victor Entertainment</publisher>
1090379      <info name="serial" value="T-60114"/>
1091      <info name="disk_ring" value="T-60114-00082-R1M V"/>
1092380      <info name="release" value="19930806"/>
1093381      <info name="alt_title" value="慶応遊撃隊"/>
1094382      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1099387   </software>
1100388
1101389   <software name="lodoss">
1102      <!-- source redump.org
1103      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan).cue" size="1858" crc="98bfd15e" />
1104      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 01).bin" size="190392048" crc="1112c998" />
1105      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 02).bin" size="26215392" crc="f630543f" />
1106      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 03).bin" size="25709712" crc="13a48faf" />
1107      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 04).bin" size="17026128" crc="8e01a7be" />
1108      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 05).bin" size="15443232" crc="fb62b25e" />
1109      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 06).bin" size="23160144" crc="f862bf6f" />
1110      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 07).bin" size="29322384" crc="275f0340" />
1111      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 08).bin" size="14547120" crc="03049eaa" />
1112      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 09).bin" size="15556128" crc="3b20586c" />
1113      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 10).bin" size="15770160" crc="66973d5f" />
1114      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 11).bin" size="26460000" crc="4fc4500d" />
1115      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 12).bin" size="20304816" crc="533d34b0" />
1116      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 13).bin" size="20638800" crc="5e49867e" />
1117      <rom name="Lodoss Tou Senki - Eiyuu Sensou (Japan) (Track 14).bin" size="15553776" crc="edbdbe07" />
1118      -->
1119390      <description>Lodoss Tou Senki - Eiyuu Sensou (Jpn)</description>
1120391      <year>1994</year>
1121392      <publisher>Sega</publisher>
1122393      <info name="serial" value="G-6024"/>
1123      <info name="disk_ring" value="G-6024P-00198-R2M V"/>
1124394      <info name="release" value="19940520"/>
1125395      <info name="alt_title" value="ロードス島戦記 英雄戦争"/>
1126396      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1131401   </software>
1132402
1133403   <software name="lunar2">
1134      <!-- source redump.org
1135      <rom name="Lunar - Eternal Blue (Japan).cue" size="470" crc="cf310d01" />
1136      <rom name="Lunar - Eternal Blue (Japan) (Track 1).bin" size="458849328" crc="c445ce6d" />
1137      <rom name="Lunar - Eternal Blue (Japan) (Track 2).bin" size="50930208" crc="c7e46925" />
1138      <rom name="Lunar - Eternal Blue (Japan) (Track 3).bin" size="11769408" crc="ad7b04a0" />
1139      <rom name="Lunar - Eternal Blue (Japan) (Track 4).bin" size="1608768" crc="cb94bee5" />
1140      -->
1141404      <description>Lunar - Eternal Blue (Jpn, Set 1)</description>
1142405      <year>1994</year>
1143406      <publisher>Game Arts</publisher>
1144407      <info name="serial" value="T-45074"/>
1145      <info name="disk_ring" value="T-45074P-00271-R1M V"/>
1146408      <info name="release" value="19941222"/>
1147409      <info name="alt_title" value="ルナ-エターナルブルー"/>
1148410      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1153415   </software>
1154416
1155417   <software name="lunar">
1156      <!-- source redump.org
1157      <rom name="Lunar - The Silver Star (Japan).cue" size="6534" crc="36b473ba" />
1158      <rom name="Lunar - The Silver Star (Japan) (Track 01).bin" size="32989152" crc="90aa9eef" />
1159      <rom name="Lunar - The Silver Star (Japan) (Track 02).bin" size="2401392" crc="d150053b" />
1160      <rom name="Lunar - The Silver Star (Japan) (Track 03).bin" size="18830112" crc="0fffc0f2" />
1161      <rom name="Lunar - The Silver Star (Japan) (Track 04).bin" size="12698448" crc="a66df0b3" />
1162      <rom name="Lunar - The Silver Star (Japan) (Track 05).bin" size="15005760" crc="0331692d" />
1163      <rom name="Lunar - The Silver Star (Japan) (Track 06).bin" size="15504384" crc="86714260" />
1164      <rom name="Lunar - The Silver Star (Japan) (Track 07).bin" size="13787424" crc="ea67a6ab" />
1165      <rom name="Lunar - The Silver Star (Japan) (Track 08).bin" size="13968528" crc="23289817" />
1166      <rom name="Lunar - The Silver Star (Japan) (Track 09).bin" size="12879552" crc="b86b132e" />
1167      <rom name="Lunar - The Silver Star (Japan) (Track 10).bin" size="13806240" crc="a9a95368" />
1168      <rom name="Lunar - The Silver Star (Japan) (Track 11).bin" size="15694896" crc="15aef7d1" />
1169      <rom name="Lunar - The Silver Star (Japan) (Track 12).bin" size="15553776" crc="2b156026" />
1170      <rom name="Lunar - The Silver Star (Japan) (Track 13).bin" size="15125712" crc="a6381e6f" />
1171      <rom name="Lunar - The Silver Star (Japan) (Track 14).bin" size="11745888" crc="5816aba1" />
1172      <rom name="Lunar - The Silver Star (Japan) (Track 15).bin" size="11705904" crc="b827b19b" />
1173      <rom name="Lunar - The Silver Star (Japan) (Track 16).bin" size="13309968" crc="0aa6895d" />
1174      <rom name="Lunar - The Silver Star (Japan) (Track 17).bin" size="8744736" crc="3c61dedc" />
1175      <rom name="Lunar - The Silver Star (Japan) (Track 18).bin" size="13862688" crc="b424a49c" />
1176      <rom name="Lunar - The Silver Star (Japan) (Track 19).bin" size="7385280" crc="01fb9d92" />
1177      <rom name="Lunar - The Silver Star (Japan) (Track 20).bin" size="7669872" crc="d77ea6ec" />
1178      <rom name="Lunar - The Silver Star (Japan) (Track 21).bin" size="14937552" crc="2d720225" />
1179      <rom name="Lunar - The Silver Star (Japan) (Track 22).bin" size="12199824" crc="5e2d7179" />
1180      <rom name="Lunar - The Silver Star (Japan) (Track 23).bin" size="7646352" crc="04423700" />
1181      <rom name="Lunar - The Silver Star (Japan) (Track 24).bin" size="3438624" crc="70a8150e" />
1182      <rom name="Lunar - The Silver Star (Japan) (Track 25).bin" size="3758496" crc="b16f5fe3" />
1183      <rom name="Lunar - The Silver Star (Japan) (Track 26).bin" size="4116000" crc="df24dca9" />
1184      <rom name="Lunar - The Silver Star (Japan) (Track 27).bin" size="4113648" crc="c1975282" />
1185      <rom name="Lunar - The Silver Star (Japan) (Track 28).bin" size="14989296" crc="65e0f04c" />
1186      <rom name="Lunar - The Silver Star (Japan) (Track 29).bin" size="10181808" crc="5b5d8f5b" />
1187      <rom name="Lunar - The Silver Star (Japan) (Track 30).bin" size="12246864" crc="3c5e0e25" />
1188      <rom name="Lunar - The Silver Star (Japan) (Track 31).bin" size="3640896" crc="45b2bc7c" />
1189      <rom name="Lunar - The Silver Star (Japan) (Track 32).bin" size="4301808" crc="27a21a1e" />
1190      <rom name="Lunar - The Silver Star (Japan) (Track 33).bin" size="4607568" crc="b489fb5c" />
1191      <rom name="Lunar - The Silver Star (Japan) (Track 34).bin" size="3165792" crc="8957de10" />
1192      <rom name="Lunar - The Silver Star (Japan) (Track 35).bin" size="3690288" crc="ad8631e3" />
1193      <rom name="Lunar - The Silver Star (Japan) (Track 36).bin" size="2638944" crc="74536514" />
1194      <rom name="Lunar - The Silver Star (Japan) (Track 37).bin" size="14436576" crc="15380ab6" />
1195      <rom name="Lunar - The Silver Star (Japan) (Track 38).bin" size="11585952" crc="25380270" />
1196      <rom name="Lunar - The Silver Star (Japan) (Track 39).bin" size="3894912" crc="723684b3" />
1197      <rom name="Lunar - The Silver Star (Japan) (Track 40).bin" size="5477808" crc="b0a0acde" />
1198      <rom name="Lunar - The Silver Star (Japan) (Track 41).bin" size="4405296" crc="469bd826" />
1199      <rom name="Lunar - The Silver Star (Japan) (Track 42).bin" size="8551872" crc="88c83dd3" />
1200      <rom name="Lunar - The Silver Star (Japan) (Track 43).bin" size="4351200" crc="c8a07913" />
1201      <rom name="Lunar - The Silver Star (Japan) (Track 44).bin" size="4965072" crc="8fe73000" />
1202      <rom name="Lunar - The Silver Star (Japan) (Track 45).bin" size="4400592" crc="daf1f216" />
1203      <rom name="Lunar - The Silver Star (Japan) (Track 46).bin" size="3250464" crc="2b865cca" />
1204      <rom name="Lunar - The Silver Star (Japan) (Track 47).bin" size="11092032" crc="ed2716b5" />
1205      <rom name="Lunar - The Silver Star (Japan) (Track 48).bin" size="33480720" crc="0fe019bb" />
1206      <rom name="Lunar - The Silver Star (Japan) (Track 49).bin" size="3137568" crc="7dd84be1" />
1207      <rom name="Lunar - The Silver Star (Japan) (Track 50).bin" size="5014464" crc="362b407d" />
1208      <rom name="Lunar - The Silver Star (Japan) (Track 51).bin" size="1611120" crc="5fce5cf1" />
1209      <rom name="Lunar - The Silver Star (Japan) (Track 52).bin" size="15299760" crc="d22641d1" />
1210      -->
1211418      <description>Lunar - The Silver Star (Jpn)</description>
1212419      <year>1992</year>
1213420      <publisher>Game Arts</publisher>
1214421      <info name="serial" value="T-45014"/>
1215      <info name="disk_ring" value="T-45014P-00017-R1M V"/>
1216422      <info name="release" value="19920626"/>
1217423      <info name="alt_title" value="ルナ ザ・シルバースター"/>
1218424      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1223429   </software>
1224430
1225431   <software name="microcos">
1226      <!-- source redump.org
1227      <rom name="Microcosm (Japan).cue" size="981" crc="9d8c52cf" />
1228      <rom name="Microcosm (Japan) (Track 1).bin" size="274203216" crc="440ce76f" />
1229      <rom name="Microcosm (Japan) (Track 2).bin" size="20993952" crc="5a892270" />
1230      <rom name="Microcosm (Japan) (Track 3).bin" size="22755600" crc="d4110a7d" />
1231      <rom name="Microcosm (Japan) (Track 4).bin" size="21873600" crc="2beb48b8" />
1232      <rom name="Microcosm (Japan) (Track 5).bin" size="35985600" crc="708877db" />
1233      <rom name="Microcosm (Japan) (Track 6).bin" size="24519600" crc="aa292aba" />
1234      <rom name="Microcosm (Japan) (Track 7).bin" size="22755600" crc="03a29b6f" />
1235      <rom name="Microcosm (Japan) (Track 8).bin" size="21873600" crc="bba6b7c9" />
1236      <rom name="Microcosm (Japan) (Track 9).bin" size="23988048" crc="9956dc95" />
1237      -->
1238432      <description>Microcosm (Jpn)</description>
1239433      <year>1994</year>
1240434      <publisher>Victor Entertainment</publisher>
1241435      <info name="serial" value="T-60164"/>
1242      <info name="disk_ring" value="T-60164P-00171-R1M V"/>
1243436      <info name="release" value="19940225"/>
1244437      <info name="alt_title" value="マイクロコズム"/>
1245438      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1250443   </software>
1251444
1252445   <software name="nstriker">
1253      <!-- source redump.org
1254      <rom name="Night Striker (Japan, Korea).cue" size="4779" crc="9fef22f7" />
1255      <rom name="Night Striker (Japan, Korea) (Track 01).bin" size="15605520" crc="184fb14e" />
1256      <rom name="Night Striker (Japan, Korea) (Track 02).bin" size="6383328" crc="7d83c902" />
1257      <rom name="Night Striker (Japan, Korea) (Track 03).bin" size="7587552" crc="51d41c2b" />
1258      <rom name="Night Striker (Japan, Korea) (Track 04).bin" size="1987440" crc="00dd3edb" />
1259      <rom name="Night Striker (Japan, Korea) (Track 05).bin" size="3292800" crc="f7b76fee" />
1260      <rom name="Night Striker (Japan, Korea) (Track 06).bin" size="15240960" crc="b301e3ff" />
1261      <rom name="Night Striker (Japan, Korea) (Track 07).bin" size="16174704" crc="b7f631e3" />
1262      <rom name="Night Striker (Japan, Korea) (Track 08).bin" size="19004160" crc="8b972a8f" />
1263      <rom name="Night Striker (Japan, Korea) (Track 09).bin" size="19168800" crc="2d63f9b4" />
1264      <rom name="Night Striker (Japan, Korea) (Track 10).bin" size="12973632" crc="17ce9bf0" />
1265      <rom name="Night Striker (Japan, Korea) (Track 11).bin" size="13157088" crc="1302e856" />
1266      <rom name="Night Striker (Japan, Korea) (Track 12).bin" size="15015168" crc="f855716c" />
1267      <rom name="Night Striker (Japan, Korea) (Track 13).bin" size="15269184" crc="a2d13ff9" />
1268      <rom name="Night Striker (Japan, Korea) (Track 14).bin" size="14857584" crc="e7e72f89" />
1269      <rom name="Night Striker (Japan, Korea) (Track 15).bin" size="14796432" crc="2c4c8ba5" />
1270      <rom name="Night Striker (Japan, Korea) (Track 16).bin" size="19620384" crc="ca0d45f3" />
1271      <rom name="Night Striker (Japan, Korea) (Track 17).bin" size="19547472" crc="2dac4121" />
1272      <rom name="Night Striker (Japan, Korea) (Track 18).bin" size="15793680" crc="00f6da22" />
1273      <rom name="Night Striker (Japan, Korea) (Track 19).bin" size="16355808" crc="6d8c921e" />
1274      <rom name="Night Striker (Japan, Korea) (Track 20).bin" size="15059856" crc="90c30eb0" />
1275      <rom name="Night Striker (Japan, Korea) (Track 21).bin" size="14878752" crc="24bd5409" />
1276      <rom name="Night Striker (Japan, Korea) (Track 22).bin" size="1667568" crc="38f5d20e" />
1277      <rom name="Night Striker (Japan, Korea) (Track 23).bin" size="13340544" crc="1dadb77e" />
1278      <rom name="Night Striker (Japan, Korea) (Track 24).bin" size="16452240" crc="820c93bc" />
1279      <rom name="Night Striker (Japan, Korea) (Track 25).bin" size="10506384" crc="ac5fa021" />
1280      <rom name="Night Striker (Japan, Korea) (Track 26).bin" size="12983040" crc="6451e672" />
1281      <rom name="Night Striker (Japan, Korea) (Track 27).bin" size="12797232" crc="489e6bae" />
1282      <rom name="Night Striker (Japan, Korea) (Track 28).bin" size="15939504" crc="04f5311f" />
1283      <rom name="Night Striker (Japan, Korea) (Track 29).bin" size="12536160" crc="991fd3e4" />
1284      <rom name="Night Striker (Japan, Korea) (Track 30).bin" size="17195472" crc="b3d7a253" />
1285      <rom name="Night Striker (Japan, Korea) (Track 31).bin" size="12503232" crc="ed9148b9" />
1286      <rom name="Night Striker (Japan, Korea) (Track 32).bin" size="15930096" crc="e5bceec5" />
1287      <rom name="Night Striker (Japan, Korea) (Track 33).bin" size="16574544" crc="48593b08" />
1288      <rom name="Night Striker (Japan, Korea) (Track 34).bin" size="18347952" crc="2cc3912d" />
1289      <rom name="Night Striker (Japan, Korea) (Track 35).bin" size="11527152" crc="95f71fe7" />
1290      <rom name="Night Striker (Japan, Korea) (Track 36).bin" size="5461344" crc="6f4c78a4" />
1291      <rom name="Night Striker (Japan, Korea) (Track 37).bin" size="15313872" crc="7f954de6" />
1292      <rom name="Night Striker (Japan, Korea) (Track 38).bin" size="18599616" crc="27ed2641" />
1293      <rom name="Night Striker (Japan, Korea) (Track 39).bin" size="19331088" crc="05bf45d3" />
1294      -->
1295446      <description>Night Striker (Jpn, Kor)</description>
1296447      <year>1993</year>
1297448      <publisher>Taito</publisher>
1298449      <info name="serial" value="T-11014"/>
1299      <info name="disk_ring" value="T-11014P-00062-R1M V"/>
1300450      <info name="release" value="19930528"/>
1301451      <info name="alt_title" value="ナイトストライカー"/>
1302452      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1307457   </software>
1308458
1309459   <software name="ntrap">
1310      <!-- source redump.org
1311      <rom name="Night Trap (Japan) (Disc 1).cue" size="224" crc="f3527896" />
1312      <rom name="Night Trap (Japan) (Disc 1) (Track 1).bin" size="615875904" crc="17744c64" />
1313      <rom name="Night Trap (Japan) (Disc 1) (Track 2).bin" size="2587200" crc="ff1b77f6" />
1314
1315      <rom name="Night Trap (Japan) (Disc 2).cue" size="224" crc="7970405a" />
1316      <rom name="Night Trap (Japan) (Disc 2) (Track 1).bin" size="514587024" crc="36d7aa8c" />
1317      <rom name="Night Trap (Japan) (Disc 2) (Track 2).bin" size="2587200" crc="e575194e" />
1318      -->
1319460      <description>Night Trap (Jpn)</description>
1320461      <year>1993</year>
1321462      <publisher>Sega</publisher>
1322463      <info name="serial" value="G-6025"/>
1323      <info name="disk_ring" value="G-6025P-00148 1 (Disc 1), G-6025P-00149 1 (Disc 2)"/>
1324464      <info name="release" value="19931119"/>
1325465      <info name="alt_title" value="ナイトトラップ"/>
1326466      <part name="cdrom1" interface="scd_cdrom">
r242703r242704
1338478   </software>
1339479
1340480   <software name="nost1907">
1341      <!-- source redump.org
1342      <rom name="Nostalgia 1907 (Japan).cue" size="214" crc="fae49f9e" />
1343      <rom name="Nostalgia 1907 (Japan) (Track 1).bin" size="192649968" crc="b1478a7e" />
1344      <rom name="Nostalgia 1907 (Japan) (Track 2).bin" size="24710112" crc="747ca04b" />
1345      -->
1346481      <description>Nostalgia 1907 (Jpn)</description>
1347482      <year>1991</year>
1348483      <publisher>Takeru</publisher>
1349484      <info name="serial" value="T-77014"/>
1350      <info name="disk_ring" value="T-77014P-00006-R1K V"/>
1351485      <info name="release" value="19911214"/>
1352486      <info name="alt_title" value="ノスタルジア1907"/>
1353487      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1358492   </software>
1359493
1360494   <software name="popmail">
1361      <!-- source redump.org
1362      <rom name="Popful Mail (Japan).cue" size="321" crc="76e15750" />
1363      <rom name="Popful Mail (Japan) (Track 1).bin" size="349281408" crc="da0db5b4" />
1364      <rom name="Popful Mail (Japan) (Track 2).bin" size="25133472" crc="d044aac3" />
1365      <rom name="Popful Mail (Japan) (Track 3).bin" size="42778176" crc="f64659a4" />
1366      -->
1367495      <description>Popful Mail (Jpn)</description>
1368496      <year>1994</year>
1369497      <publisher>Sega</publisher>
1370498      <info name="serial" value="G-6029"/>
1371      <info name="disk_ring" value="G-6029P-00190-R1M V"/>
1372499      <info name="release" value="19940401"/>
1373500      <info name="alt_title" value="ぽっぷるメイル"/>
1374501      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1379506   </software>
1380507
1381508   <software name="ppersia">
1382      <!-- source redump.org
1383      <rom name="Prince of Persia (Japan).cue" size="2957" crc="742ea509" />
1384      <rom name="Prince of Persia (Japan) (Track 01).bin" size="7933296" crc="a7ef5614" />
1385      <rom name="Prince of Persia (Japan) (Track 02).bin" size="33708864" crc="49811689" />
1386      <rom name="Prince of Persia (Japan) (Track 03).bin" size="33765312" crc="4b5b8516" />
1387      <rom name="Prince of Persia (Japan) (Track 04).bin" size="19359312" crc="98ddfbb6" />
1388      <rom name="Prince of Persia (Japan) (Track 05).bin" size="12609072" crc="9be52ed5" />
1389      <rom name="Prince of Persia (Japan) (Track 06).bin" size="1622880" crc="a2030259" />
1390      <rom name="Prince of Persia (Japan) (Track 07).bin" size="1891008" crc="3379ec4c" />
1391      <rom name="Prince of Persia (Japan) (Track 08).bin" size="1505280" crc="fe313f82" />
1392      <rom name="Prince of Persia (Japan) (Track 09).bin" size="2041536" crc="89a40265" />
1393      <rom name="Prince of Persia (Japan) (Track 10).bin" size="1818096" crc="7cb12741" />
1394      <rom name="Prince of Persia (Japan) (Track 11).bin" size="1916880" crc="32038cb2" />
1395      <rom name="Prince of Persia (Japan) (Track 12).bin" size="27095040" crc="9cbe7f41" />
1396      <rom name="Prince of Persia (Japan) (Track 13).bin" size="13267632" crc="f60baa25" />
1397      <rom name="Prince of Persia (Japan) (Track 14).bin" size="24519600" crc="e39236c3" />
1398      <rom name="Prince of Persia (Japan) (Track 15).bin" size="9464448" crc="44d1b48c" />
1399      <rom name="Prince of Persia (Japan) (Track 16).bin" size="21271488" crc="d16b5133" />
1400      <rom name="Prince of Persia (Japan) (Track 17).bin" size="35773920" crc="49a82a06" />
1401      <rom name="Prince of Persia (Japan) (Track 18).bin" size="12512640" crc="9bb4dbb2" />
1402      <rom name="Prince of Persia (Japan) (Track 19).bin" size="27222048" crc="534a134b" />
1403      <rom name="Prince of Persia (Japan) (Track 20).bin" size="49363776" crc="3baf85d1" />
1404      <rom name="Prince of Persia (Japan) (Track 21).bin" size="1982736" crc="90a8b2f0" />
1405      <rom name="Prince of Persia (Japan) (Track 22).bin" size="2053296" crc="313727c9" />
1406      <rom name="Prince of Persia (Japan) (Track 23).bin" size="2062704" crc="aad284e6" />
1407      <rom name="Prince of Persia (Japan) (Track 24).bin" size="1662864" crc="56f7c105" />
1408      <rom name="Prince of Persia (Japan) (Track 25).bin" size="1660512" crc="227e49ca" />
1409      -->
1410509      <description>Prince of Persia (Jpn)</description>
1411510      <year>1992</year>
1412511      <publisher>Victor Entertainment</publisher>
1413512      <info name="serial" value="T-60014"/>
1414      <info name="disk_ring" value="T60014P-00020-R1M V"/>
1415513      <info name="release" value="19920807"/>
1416514      <info name="alt_title" value="プリンス・オブ・ペルシャ"/>
1417515      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1422520   </software>
1423521
1424522   <software name="proyakcd">
1425      <!-- source redump.org
1426      <rom name="Pro Yakyuu Super League CD (Japan).cue" size="2949" crc="b74953c9" />
1427      <rom name="Pro Yakyuu Super League CD (Japan) (Track 01).bin" size="51685200" crc="069a0e83" />
1428      <rom name="Pro Yakyuu Super League CD (Japan) (Track 02).bin" size="11825856" crc="97c32cc2" />
1429      <rom name="Pro Yakyuu Super League CD (Japan) (Track 03).bin" size="22572144" crc="165f0f36" />
1430      <rom name="Pro Yakyuu Super League CD (Japan) (Track 04).bin" size="7549920" crc="b9374cad" />
1431      <rom name="Pro Yakyuu Super League CD (Japan) (Track 05).bin" size="3041136" crc="de817541" />
1432      <rom name="Pro Yakyuu Super League CD (Japan) (Track 06).bin" size="11985792" crc="32007c76" />
1433      <rom name="Pro Yakyuu Super League CD (Japan) (Track 07).bin" size="12084576" crc="c934d7c0" />
1434      <rom name="Pro Yakyuu Super League CD (Japan) (Track 08).bin" size="1117200" crc="cdd208de" />
1435      <rom name="Pro Yakyuu Super League CD (Japan) (Track 09).bin" size="1070160" crc="187056fd" />
1436      <rom name="Pro Yakyuu Super League CD (Japan) (Track 10).bin" size="1154832" crc="56beef71" />
1437      <rom name="Pro Yakyuu Super League CD (Japan) (Track 11).bin" size="1208928" crc="fc8efa38" />
1438      <rom name="Pro Yakyuu Super League CD (Japan) (Track 12).bin" size="1164240" crc="8a1e410c" />
1439      <rom name="Pro Yakyuu Super League CD (Japan) (Track 13).bin" size="1136016" crc="b7485f1c" />
1440      <rom name="Pro Yakyuu Super League CD (Japan) (Track 14).bin" size="1072512" crc="acb83e60" />
1441      <rom name="Pro Yakyuu Super League CD (Japan) (Track 15).bin" size="1272432" crc="d8955637" />
1442      <rom name="Pro Yakyuu Super League CD (Japan) (Track 16).bin" size="1204224" crc="a30d3ff0" />
1443      <rom name="Pro Yakyuu Super League CD (Japan) (Track 17).bin" size="1244208" crc="3593a52d" />
1444      <rom name="Pro Yakyuu Super League CD (Japan) (Track 18).bin" size="1211280" crc="771be76e" />
1445      <rom name="Pro Yakyuu Super League CD (Japan) (Track 19).bin" size="1126608" crc="f53bd813" />
1446      <rom name="Pro Yakyuu Super League CD (Japan) (Track 20).bin" size="1244208" crc="d19d393f" />
1447      <rom name="Pro Yakyuu Super League CD (Japan) (Track 21).bin" size="1215984" crc="7b59a99b" />
1448      <rom name="Pro Yakyuu Super League CD (Japan) (Track 22).bin" size="1079568" crc="9563b01f" />
1449      <rom name="Pro Yakyuu Super League CD (Japan) (Track 23).bin" size="1136016" crc="7024a847" />
1450      -->
1451523      <description>Pro Yakyuu Super League CD (Jpn)</description>
1452524      <year>1992</year>
1453525      <publisher>Sega</publisher>
1454526      <info name="serial" value="G-6010"/>
1455      <info name="disk_ring" value="G-6010P-00029-R1M V"/>
1456527      <info name="release" value="19921030"/>
1457528      <info name="alt_title" value="プロ野球スーパーリーグCD"/>
1458529      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1463534   </software>
1464535
1465536   <software name="quizss">
1466      <!-- source redump.org
1467      <rom name="Quiz Scramble Special (Japan) (Rev B).cue" size="5394" crc="32fb3613" />
1468      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 01).bin" size="28261632" crc="24f14a3d" />
1469      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 02).bin" size="12352704" crc="ec5d2bdd" />
1470      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 03).bin" size="13307616" crc="06ca795f" />
1471      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 04).bin" size="16400496" crc="817f51bb" />
1472      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 05).bin" size="6505632" crc="b15f3c16" />
1473      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 06).bin" size="18987696" crc="a38bb4c2" />
1474      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 07).bin" size="1872192" crc="64f43933" />
1475      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 08).bin" size="1827504" crc="45605c3d" />
1476      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 09).bin" size="1653456" crc="a61bca4f" />
1477      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 10).bin" size="1074864" crc="844cdc67" />
1478      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 11).bin" size="1067808" crc="6574dee2" />
1479      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 12).bin" size="8558928" crc="1575f1cf" />
1480      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 13).bin" size="3097584" crc="47a07687" />
1481      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 14).bin" size="3944304" crc="80dae03d" />
1482      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 15).bin" size="2650704" crc="9997d610" />
1483      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 16).bin" size="3756144" crc="36820469" />
1484      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 17).bin" size="2034480" crc="be75ae0a" />
1485      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 18).bin" size="3203424" crc="c2e90f08" />
1486      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 19).bin" size="3085824" crc="4f399ab9" />
1487      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 20).bin" size="5738880" crc="92ee9a3c" />
1488      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 21).bin" size="4372368" crc="8aea6ad6" />
1489      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 22).bin" size="3156384" crc="f0033ea1" />
1490      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 23).bin" size="4685184" crc="6c906c1e" />
1491      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 24).bin" size="1070160" crc="de0fb321" />
1492      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 25).bin" size="1074864" crc="5640a695" />
1493      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 26).bin" size="1074864" crc="8b6eff3a" />
1494      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 27).bin" size="1486464" crc="c8b53368" />
1495      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 28).bin" size="1248912" crc="403145d9" />
1496      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 29).bin" size="1063104" crc="71651e61" />
1497      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 30).bin" size="1063104" crc="6739a167" />
1498      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 31).bin" size="1065456" crc="d70de543" />
1499      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 32).bin" size="1587600" crc="4c1e6bc4" />
1500      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 33).bin" size="1063104" crc="191ea5c2" />
1501      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 34).bin" size="1077216" crc="429ae1bc" />
1502      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 35).bin" size="1081920" crc="47d3fb26" />
1503      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 36).bin" size="1070160" crc="5607a7dd" />
1504      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 37).bin" size="1237152" crc="a030fff6" />
1505      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 38).bin" size="1326528" crc="e5fbb50d" />
1506      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 39).bin" size="1952160" crc="03a5913e" />
1507      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 40).bin" size="1067808" crc="81bb73c2" />
1508      <rom name="Quiz Scramble Special (Japan) (Rev B) (Track 41).bin" size="1176000" crc="36cf78ed" />
1509      -->
1510537      <description>Quiz Scramble Special (Jpn, Rev. B)</description>
1511538      <year>1992</year>
1512539      <publisher>Sega</publisher>
1513540      <info name="serial" value="G-6003"/>
1514      <info name="disk_ring" value="G-6003P-00014B-R2M V"/>
1515541      <info name="release" value="19920529"/>
1516542      <info name="alt_title" value="クイズスクランブルスペシャル"/>
1517543      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1521547      </part>
1522548   </software>
1523549
1524   <software name="quiztono">
1525      <!-- source redump.org
1526      <rom name="Capcom no Quiz - Tonosama no Yabou (Japan).cue" size="254" crc="dcb26809" />
1527      <rom name="Capcom no Quiz - Tonosama no Yabou (Japan) (Track 1).bin" size="498555792" crc="ac72da73" />
1528      <rom name="Capcom no Quiz - Tonosama no Yabou (Japan) (Track 2).bin" size="2050944" crc="07287a36" />
1529      -->
1530      <description>Quiz Tonosama no Yabou (Jpn)</description>
1531      <year>1992</year>
1532      <publisher>SIMS</publisher>
1533      <info name="serial" value="T-44024"/>
1534      <info name="disk_ring" value="T-44024P-00034-R1M V"/>
1535      <info name="release" value="19921225"/>
1536      <info name="alt_title" value="クイズ殿様の野望"/>
1537      <part name="cdrom" interface="scd_cdrom">
1538         <diskarea name="cdrom">
1539            <disk name="capcom no quiz - tonosama no yabou (japan)" sha1="9f09efae7369a1439cd85616c89f5d42a2eb741a"/>
1540         </diskarea>
1541      </part>
1542   </software>
1543
1544550   <software name="ranma">
1545      <!-- source redump.org
1546      <rom name="Ranma 1-2 - Byakuranaika (Japan).cue" size="3157" crc="3a971b70" />
1547      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 01).bin" size="49519008" crc="a92a2dc5" />
1548      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 02).bin" size="10334688" crc="f8086912" />
1549      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 03).bin" size="14638848" crc="3226211c" />
1550      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 04).bin" size="17308368" crc="80d209f3" />
1551      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 05).bin" size="52771824" crc="238bc537" />
1552      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 06).bin" size="16348752" crc="70c12cc9" />
1553      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 07).bin" size="16339344" crc="ca745251" />
1554      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 08).bin" size="16421664" crc="f1180e24" />
1555      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 09).bin" size="17444784" crc="61283229" />
1556      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 10).bin" size="16546320" crc="e9fb564c" />
1557      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 11).bin" size="17012016" crc="880ae37a" />
1558      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 12).bin" size="16823856" crc="a6548b54" />
1559      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 13).bin" size="16969680" crc="bf2020ea" />
1560      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 14).bin" size="17122560" crc="380830ba" />
1561      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 15).bin" size="16786224" crc="8870b6ae" />
1562      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 16).bin" size="16758000" crc="5a64e72c" />
1563      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 17).bin" size="16099440" crc="5d146f9b" />
1564      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 18).bin" size="17037888" crc="f9c911c3" />
1565      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 19).bin" size="17216640" crc="9abc95fc" />
1566      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 20).bin" size="17141376" crc="1e1682b0" />
1567      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 21).bin" size="18300912" crc="fe1a1eba" />
1568      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 22).bin" size="15657264" crc="5cc7685b" />
1569      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 23).bin" size="16638048" crc="9e499237" />
1570      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 24).bin" size="16226448" crc="effceb82" />
1571      <rom name="Ranma 1-2 - Byakuranaika (Japan) (Track 25).bin" size="18051600" crc="cb75ab7c" />
1572      -->
1573551      <description>Ranma ½ - Byakuranaika (Jpn)</description>
1574552      <year>1993</year>
1575553      <publisher>NCS</publisher>
1576554      <info name="serial" value="T-25014"/>
1577      <info name="disk_ring" value="T-25014P-00060-R3M V, T-25014P-00060-R2M V"/>
1578555      <info name="release" value="19930423"/>
1579556      <info name="alt_title" value="らんま½ 白蘭愛歌"/>
1580557      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1585562   </software>
1586563
1587564   <software name="risedrag">
1588      <!-- source redump.org
1589      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan).cue" size="707" crc="59bdb6fd" />
1590      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan) (Track 1).bin" size="178145184" crc="e9c09483" />
1591      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan) (Track 2).bin" size="15866592" crc="272c6e01" />
1592      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan) (Track 3).bin" size="38391696" crc="4392fcb4" />
1593      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan) (Track 4).bin" size="24124464" crc="0278c2fd" />
1594      <rom name="Rise of the Dragon - A Blade Hunter Mystery (Japan) (Track 5).bin" size="29235360" crc="93ba211d" />
1595      -->
1596565      <description>Rise of the Dragon - A Blade Hunter Mystery (Jpn)</description>
1597566      <year>1992</year>
1598567      <publisher>Sega</publisher>
1599568      <info name="serial" value="G-6002"/>
1600      <info name="disk_ring" value="G-6002P-00023-R1M V"/>
1601569      <info name="release" value="19920925"/>
1602570      <info name="alt_title" value="ライズ オブ ザ ドラゴン −ブレイド・ハンター・ミステリ"/>
1603571      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1608576   </software>
1609577
1610578   <software name="sangoku3">
1611      <!-- source redump.org
1612      <rom name="Sangokushi III (Japan).cue" size="5832" crc="1748f5b9" />
1613      <rom name="Sangokushi III (Japan) (Track 01).bin" size="11160240" crc="5e0d844c" />
1614      <rom name="Sangokushi III (Japan) (Track 02).bin" size="1427664" crc="dc5eda0e" />
1615      <rom name="Sangokushi III (Japan) (Track 03).bin" size="2135616" crc="49dce1a0" />
1616      <rom name="Sangokushi III (Japan) (Track 04).bin" size="1597008" crc="bb41fab3" />
1617      <rom name="Sangokushi III (Japan) (Track 05).bin" size="1413552" crc="cfbd1b68" />
1618      <rom name="Sangokushi III (Japan) (Track 06).bin" size="1425312" crc="f37f728b" />
1619      <rom name="Sangokushi III (Japan) (Track 07).bin" size="1239504" crc="a5523350" />
1620      <rom name="Sangokushi III (Japan) (Track 08).bin" size="1077216" crc="f964204a" />
1621      <rom name="Sangokushi III (Japan) (Track 09).bin" size="1065456" crc="2aca7837" />
1622      <rom name="Sangokushi III (Japan) (Track 10).bin" size="1072512" crc="fe339fde" />
1623      <rom name="Sangokushi III (Japan) (Track 11).bin" size="1063104" crc="781f541b" />
1624      <rom name="Sangokushi III (Japan) (Track 12).bin" size="1060752" crc="e58f8782" />
1625      <rom name="Sangokushi III (Japan) (Track 13).bin" size="1063104" crc="6a73faeb" />
1626      <rom name="Sangokushi III (Japan) (Track 14).bin" size="1063104" crc="9a68c229" />
1627      <rom name="Sangokushi III (Japan) (Track 15).bin" size="1065456" crc="fc4b780d" />
1628      <rom name="Sangokushi III (Japan) (Track 16).bin" size="1060752" crc="159ce9a5" />
1629      <rom name="Sangokushi III (Japan) (Track 17).bin" size="1063104" crc="0cd98855" />
1630      <rom name="Sangokushi III (Japan) (Track 18).bin" size="1065456" crc="c3347b88" />
1631      <rom name="Sangokushi III (Japan) (Track 19).bin" size="1063104" crc="8fe197de" />
1632      <rom name="Sangokushi III (Japan) (Track 20).bin" size="1063104" crc="ff9ecb5e" />
1633      <rom name="Sangokushi III (Japan) (Track 21).bin" size="1067808" crc="931fae3c" />
1634      <rom name="Sangokushi III (Japan) (Track 22).bin" size="1072512" crc="c92f5dbf" />
1635      <rom name="Sangokushi III (Japan) (Track 23).bin" size="1072512" crc="0abcaa50" />
1636      <rom name="Sangokushi III (Japan) (Track 24).bin" size="39941664" crc="e356f07f" />
1637      <rom name="Sangokushi III (Japan) (Track 25).bin" size="17557680" crc="ce6a9643" />
1638      <rom name="Sangokushi III (Japan) (Track 26).bin" size="28786128" crc="cd70217a" />
1639      <rom name="Sangokushi III (Japan) (Track 27).bin" size="3457440" crc="7faa0ed6" />
1640      <rom name="Sangokushi III (Japan) (Track 28).bin" size="27151488" crc="16a95fb4" />
1641      <rom name="Sangokushi III (Japan) (Track 29).bin" size="2909424" crc="7646016f" />
1642      <rom name="Sangokushi III (Japan) (Track 30).bin" size="29334144" crc="d4208b9c" />
1643      <rom name="Sangokushi III (Japan) (Track 31).bin" size="19773264" crc="8a1b380d" />
1644      <rom name="Sangokushi III (Japan) (Track 32).bin" size="25323984" crc="2346cea6" />
1645      <rom name="Sangokushi III (Japan) (Track 33).bin" size="16393440" crc="4bcec6e4" />
1646      <rom name="Sangokushi III (Japan) (Track 34).bin" size="2827104" crc="3ff4238f" />
1647      <rom name="Sangokushi III (Japan) (Track 35).bin" size="25286352" crc="1ce143bf" />
1648      <rom name="Sangokushi III (Japan) (Track 36).bin" size="19975536" crc="e27dd054" />
1649      <rom name="Sangokushi III (Japan) (Track 37).bin" size="35505792" crc="b73e6493" />
1650      <rom name="Sangokushi III (Japan) (Track 38).bin" size="32471712" crc="224e09c0" />
1651      <rom name="Sangokushi III (Japan) (Track 39).bin" size="21920640" crc="71602343" />
1652      <rom name="Sangokushi III (Japan) (Track 40).bin" size="33015024" crc="a6836ff3" />
1653      <rom name="Sangokushi III (Japan) (Track 41).bin" size="22786176" crc="e2bc7b75" />
1654      <rom name="Sangokushi III (Japan) (Track 42).bin" size="45000816" crc="6fd08a14" />
1655      <rom name="Sangokushi III (Japan) (Track 43).bin" size="12921888" crc="f6f80a97" />
1656      <rom name="Sangokushi III (Japan) (Track 44).bin" size="9777264" crc="5f4d79ad" />
1657      <rom name="Sangokushi III (Japan) (Track 45).bin" size="16769760" crc="f04fe3d3" />
1658      <rom name="Sangokushi III (Japan) (Track 46).bin" size="15069264" crc="082badab" />
1659      <rom name="Sangokushi III (Japan) (Track 47).bin" size="15266832" crc="f9df5d23" />
1660      <rom name="Sangokushi III (Japan) (Track 48).bin" size="17329536" crc="1a082a6d" />
1661      <rom name="Sangokushi III (Japan) (Track 49).bin" size="15694896" crc="597a794d" />
1662      <rom name="Sangokushi III (Japan) (Track 50).bin" size="15052800" crc="083cd29b" />
1663      -->
1664579      <description>Sangokushi III (Jpn)</description>
1665580      <year>1993</year>
1666581      <publisher>Koei</publisher>
1667582      <info name="serial" value="T-76014"/>
1668      <info name="disk_ring" value="T-76014P-00057-R1M V"/>
1669583      <info name="release" value="19930423"/>
1670584      <info name="alt_title" value="三國志III"/>
1671585      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1676590   </software>
1677591
1678592   <software name="segaac">
1679      <!-- source redump.org
1680      <rom name="Sega Classic Arcade Collection (Japan).cue" size="1578" crc="1426a3b5" />
1681      <rom name="Sega Classic Arcade Collection (Japan) (Track 01).bin" size="25149936" crc="a65db4ba" />
1682      <rom name="Sega Classic Arcade Collection (Japan) (Track 02).bin" size="16315824" crc="824dfd97" />
1683      <rom name="Sega Classic Arcade Collection (Japan) (Track 03).bin" size="3826704" crc="d5bdeb78" />
1684      <rom name="Sega Classic Arcade Collection (Japan) (Track 04).bin" size="8996400" crc="b90782c5" />
1685      <rom name="Sega Classic Arcade Collection (Japan) (Track 05).bin" size="28929600" crc="a8fe0e58" />
1686      <rom name="Sega Classic Arcade Collection (Japan) (Track 06).bin" size="23912784" crc="b14eed0d" />
1687      <rom name="Sega Classic Arcade Collection (Japan) (Track 07).bin" size="15810144" crc="0baf9d48" />
1688      <rom name="Sega Classic Arcade Collection (Japan) (Track 08).bin" size="21791280" crc="4a23f0c3" />
1689      <rom name="Sega Classic Arcade Collection (Japan) (Track 09).bin" size="25646208" crc="f2758941" />
1690      <rom name="Sega Classic Arcade Collection (Japan) (Track 10).bin" size="23696400" crc="445ff798" />
1691      <rom name="Sega Classic Arcade Collection (Japan) (Track 11).bin" size="3709104" crc="cac806ff" />
1692      <rom name="Sega Classic Arcade Collection (Japan) (Track 12).bin" size="12169248" crc="46fd5492" />
1693      -->
1694      <description>Sega Classic Arcade Collection - Limited Edition (Jpn)</description>
593      <description>Sega Classic Arcade Collection (Jpn)</description>
1695594      <year>1993</year>
1696595      <publisher>Sega</publisher>
1697596      <info name="serial" value="G-6012"/>
1698      <info name="disk_ring" value="G-6012P-00024-2-R2M V, G-6012P-00024-2-R1M V"/>
1699597      <info name="release" value="19930423"/>
1700598      <info name="alt_title" value="セガクラシック"/>
1701599      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1706604   </software>
1707605
1708606   <software name="3x3eyes">
1709      <!-- source redump.org
1710      <rom name="Seima Densetsu 3x3 Eyes (Japan).cue" size="5904" crc="caaaf2ac" />
1711      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 01).bin" size="310675680" crc="4811e91c" />
1712      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 02).bin" size="4388832" crc="ea403473" />
1713      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 03).bin" size="5150880" crc="70b2998a" />
1714      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 04).bin" size="3662064" crc="73059046" />
1715      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 05).bin" size="2060352" crc="6c2f54b5" />
1716      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 06).bin" size="1869840" crc="df71cdfd" />
1717      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 07).bin" size="1354752" crc="82312be8" />
1718      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 08).bin" size="2944704" crc="0bc09042" />
1719      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 09).bin" size="6571488" crc="36719ad2" />
1720      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 10).bin" size="4798080" crc="0340bd39" />
1721      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 11).bin" size="2979984" crc="83cb4639" />
1722      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 12).bin" size="10184160" crc="95b72693" />
1723      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 13).bin" size="2340240" crc="c3ccb4a1" />
1724      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 14).bin" size="7446432" crc="e5256df2" />
1725      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 15).bin" size="8507184" crc="4f716dc0" />
1726      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 16).bin" size="2413152" crc="6f357da5" />
1727      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 17).bin" size="5061504" crc="d78646d0" />
1728      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 18).bin" size="25192272" crc="5902de59" />
1729      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 19).bin" size="2443728" crc="c0353764" />
1730      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 20).bin" size="7453488" crc="b4bd0ef8" />
1731      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 21).bin" size="24616032" crc="7e0d5b82" />
1732      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 22).bin" size="14067312" crc="d0c1900b" />
1733      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 23).bin" size="7415856" crc="8ed1aa3c" />
1734      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 24).bin" size="12651408" crc="877d7dbe" />
1735      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 25).bin" size="14509488" crc="fa5558e5" />
1736      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 26).bin" size="2060352" crc="2d75287b" />
1737      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 27).bin" size="5680080" crc="c0df136a" />
1738      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 28).bin" size="5240256" crc="26e73f83" />
1739      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 29).bin" size="6475056" crc="b272c004" />
1740      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 30).bin" size="2215584" crc="96956bee" />
1741      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 31).bin" size="20636448" crc="5b969d55" />
1742      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 32).bin" size="5390784" crc="a2eb0cda" />
1743      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 33).bin" size="5797680" crc="1dfbb1dc" />
1744      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 34).bin" size="5209680" crc="cc7f5225" />
1745      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 35).bin" size="2177952" crc="c8c724cc" />
1746      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 36).bin" size="12152784" crc="13f54b59" />
1747      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 37).bin" size="4449984" crc="2001f3f5" />
1748      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 38).bin" size="13912080" crc="4ec1b3fc" />
1749      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 39).bin" size="8300208" crc="682a0e9e" />
1750      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 40).bin" size="8062656" crc="fcac245d" />
1751      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 41).bin" size="12721968" crc="e95c0f05" />
1752      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 42).bin" size="1726368" crc="25930c7e" />
1753      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 43).bin" size="2255568" crc="d8abf5d8" />
1754      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 44).bin" size="2170896" crc="3e84fd75" />
1755      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 45).bin" size="1371216" crc="e1697068" />
1756      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 46).bin" size="1495872" crc="cab5acd4" />
1757      <rom name="Seima Densetsu 3x3 Eyes (Japan) (Track 47).bin" size="46023936" crc="b4ad07a8" />
1758      -->
1759607      <description>Seima Densetsu 3x3 Eyes (Jpn)</description>
1760608      <year>1993</year>
1761609      <publisher>Sega</publisher>
1762610      <info name="serial" value="G-6007"/>
1763      <info name="disk_ring" value="G-6007P-00078-R1M V"/>
1764611      <info name="release" value="19930723"/>
1765612      <info name="alt_title" value="聖魔伝説 3×3EYES"/>
1766613      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1771618   </software>
1772619
1773620   <software name="fheyarea">
1774      <!-- source redump.org
1775      <rom name="Seirei Shinseiki - Fhey Area (Japan).cue" size="11117" crc="48ab62ca" />
1776      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 01).bin" size="16285248" crc="da4a8e92" />
1777      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 02).bin" size="1121904" crc="fb93618b" />
1778      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 03).bin" size="1150128" crc="8137c47e" />
1779      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 04).bin" size="1286544" crc="1ebc9d8c" />
1780      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 05).bin" size="1063104" crc="08d255df" />
1781      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 06).bin" size="1063104" crc="06640d84" />
1782      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 07).bin" size="1084272" crc="74838596" />
1783      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 08).bin" size="1143072" crc="9092f2dc" />
1784      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 09).bin" size="1201872" crc="a4d5ecd9" />
1785      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 10).bin" size="1223040" crc="efff3a98" />
1786      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 11).bin" size="1213632" crc="1b903267" />
1787      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 12).bin" size="1260672" crc="e8f493db" />
1788      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 13).bin" size="1074864" crc="1408a74d" />
1789      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 14).bin" size="1063104" crc="bafcff55" />
1790      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 15).bin" size="1164240" crc="44cd861d" />
1791      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 16).bin" size="1063104" crc="5390908d" />
1792      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 17).bin" size="1121904" crc="31d3c2a2" />
1793      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 18).bin" size="1307712" crc="5daa242d" />
1794      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 19).bin" size="1239504" crc="4a6872d8" />
1795      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 20).bin" size="1321824" crc="a358a0b8" />
1796      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 21).bin" size="1246560" crc="2b5bf866" />
1797      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 22).bin" size="1225392" crc="53780215" />
1798      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 23).bin" size="1063104" crc="fff71a66" />
1799      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 24).bin" size="1065456" crc="8b997295" />
1800      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 25).bin" size="1063104" crc="ef59de32" />
1801      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 26).bin" size="1063104" crc="9208ecdb" />
1802      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 27).bin" size="1063104" crc="f9f4f5e2" />
1803      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 28).bin" size="1291248" crc="9f3582b9" />
1804      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 29).bin" size="1063104" crc="2e5571ec" />
1805      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 30).bin" size="1063104" crc="0537b417" />
1806      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 31).bin" size="1063104" crc="3e76bfeb" />
1807      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 32).bin" size="1063104" crc="0e413a8d" />
1808      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 33).bin" size="1063104" crc="5e827ce1" />
1809      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 34).bin" size="1159536" crc="ec5c6180" />
1810      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 35).bin" size="1063104" crc="d4f09e3b" />
1811      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 36).bin" size="1063104" crc="8d4a3e4b" />
1812      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 37).bin" size="1063104" crc="1725e66b" />
1813      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 38).bin" size="1063104" crc="d6f8c628" />
1814      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 39).bin" size="1063104" crc="f2c5abfa" />
1815      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 40).bin" size="1063104" crc="9ee23876" />
1816      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 41).bin" size="1359456" crc="34979146" />
1817      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 42).bin" size="1265376" crc="aba888f7" />
1818      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 43).bin" size="1063104" crc="f6500888" />
1819      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 44).bin" size="1580544" crc="cfcf4b08" />
1820      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 45).bin" size="1063104" crc="422a6829" />
1821      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 46).bin" size="1063104" crc="e7aae3a4" />
1822      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 47).bin" size="1063104" crc="c1f33f6d" />
1823      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 48).bin" size="1063104" crc="0b6f8dad" />
1824      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 49).bin" size="1063104" crc="5ca095cd" />
1825      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 50).bin" size="1063104" crc="a2be051e" />
1826      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 51).bin" size="1907472" crc="b6247cef" />
1827      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 52).bin" size="1898064" crc="7b245349" />
1828      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 53).bin" size="1684032" crc="e9ec7768" />
1829      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 54).bin" size="2601312" crc="cbb3190c" />
1830      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 55).bin" size="2180304" crc="6db49514" />
1831      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 56).bin" size="3208128" crc="f2df1beb" />
1832      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 57).bin" size="2653056" crc="8bdb469c" />
1833      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 58).bin" size="2431968" crc="3ea50b2c" />
1834      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 59).bin" size="4372368" crc="29c83fcf" />
1835      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 60).bin" size="33139680" crc="70abd7d6" />
1836      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 61).bin" size="26424720" crc="84e2bcb9" />
1837      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 62).bin" size="17261328" crc="3bfad8f2" />
1838      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 63).bin" size="43446144" crc="983c1f87" />
1839      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 64).bin" size="21454944" crc="5129ca96" />
1840      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 65).bin" size="29668128" crc="2839c56f" />
1841      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 66).bin" size="25302816" crc="8b8a735e" />
1842      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 67).bin" size="25533312" crc="89181cd1" />
1843      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 68).bin" size="28466256" crc="cb9b980e" />
1844      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 69).bin" size="14620032" crc="ab3dba8b" />
1845      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 70).bin" size="20530608" crc="eb8e35af" />
1846      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 71).bin" size="31989552" crc="03cff43a" />
1847      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 72).bin" size="29611680" crc="12202e49" />
1848      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 73).bin" size="25298112" crc="fb402ac6" />
1849      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 74).bin" size="26695200" crc="514bf5b7" />
1850      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 75).bin" size="1921584" crc="27c64bc4" />
1851      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 76).bin" size="2422560" crc="d153e33a" />
1852      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 77).bin" size="2083872" crc="05b34810" />
1853      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 78).bin" size="1063104" crc="3c24ab75" />
1854      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 79).bin" size="6926640" crc="dd395719" />
1855      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 80).bin" size="1808688" crc="3ec6f4d6" />
1856      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 81).bin" size="2391984" crc="90fd33bc" />
1857      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 82).bin" size="1651104" crc="a49db122" />
1858      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 83).bin" size="19474560" crc="4cfd30a3" />
1859      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 84).bin" size="23284800" crc="e0a79a6f" />
1860      <rom name="Seirei Shinseiki - Fhey Area (Japan) (Track 85).bin" size="51076032" crc="6c6882b3" />
1861      -->
1862621      <description>Seirei Shinseiki - Fhey Area (Jpn)</description>
1863622      <year>1992</year>
1864623      <publisher>Wolf Team</publisher>
1865624      <info name="serial" value="T-32034"/>
1866      <info name="disk_ring" value="T-32034P-00009-R2K V, T-32034P-00009-R1K V"/>
1867625      <info name="release" value="19920218"/>
1868626      <info name="alt_title" value="精霊神世紀フェイエリア"/>
1869627      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1874632   </software>
1875633
1876634   <software name="beast2">
1877      <!-- source redump.org
1878      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan).cue" size="2012" crc="6b67e248" />
1879      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 01).bin" size="29976240" crc="0330e73d" />
1880      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 02).bin" size="230380752" crc="5b36b378" />
1881      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 03).bin" size="26645808" crc="43d6a1b9" />
1882      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 04).bin" size="76033104" crc="085d2972" />
1883      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 05).bin" size="57856848" crc="4ee3e06f" />
1884      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 06).bin" size="28757904" crc="9e3dc01b" />
1885      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 07).bin" size="24519600" crc="847ba532" />
1886      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 08).bin" size="24343200" crc="92099bd4" />
1887      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 09).bin" size="24519600" crc="64c6794d" />
1888      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 10).bin" size="33163200" crc="fc85c16a" />
1889      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 11).bin" size="27875904" crc="00bdf019" />
1890      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 12).bin" size="6705552" crc="057408ee" />
1891      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 13).bin" size="6526800" crc="04008006" />
1892      <rom name="Shadow of the Beast II - Juushin no Jubaku (Japan) (Track 14).bin" size="9523248" crc="6c025c7e" />
1893      -->
1894635      <description>Shadow of the Beast II - Juushin no Jubaku (Jpn)</description>
1895636      <year>1994</year>
1896637      <publisher>Victor Entertainment</publisher>
1897638      <info name="serial" value="T-60034"/>
1898      <info name="disk_ring" value="T-60034P-00233-R2M V"/>
1899639      <info name="release" value="19940729"/>
1900640      <info name="alt_title" value="シャドー・オブ・ザ・ビーストII 獣神の呪縛"/>
1901641      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1906646   </software>
1907647
1908648   <software name="shinmt">
1909      <!-- source redump.org
1910      <rom name="Shin Megami Tensei (Japan).cue" size="3491" crc="8b795266" />
1911      <rom name="Shin Megami Tensei (Japan) (Track 01).bin" size="68633712" crc="4fbbcf95" />
1912      <rom name="Shin Megami Tensei (Japan) (Track 02).bin" size="3499776" crc="d6b82430" />
1913      <rom name="Shin Megami Tensei (Japan) (Track 03).bin" size="15327984" crc="d22eafbf" />
1914      <rom name="Shin Megami Tensei (Japan) (Track 04).bin" size="11397792" crc="ee71fb5b" />
1915      <rom name="Shin Megami Tensei (Japan) (Track 05).bin" size="15918336" crc="089114dc" />
1916      <rom name="Shin Megami Tensei (Japan) (Track 06).bin" size="22341648" crc="2822b6de" />
1917      <rom name="Shin Megami Tensei (Japan) (Track 07).bin" size="14836416" crc="f9854241" />
1918      <rom name="Shin Megami Tensei (Japan) (Track 08).bin" size="17197824" crc="8e91a7f6" />
1919      <rom name="Shin Megami Tensei (Japan) (Track 09).bin" size="22341648" crc="b91a48e2" />
1920      <rom name="Shin Megami Tensei (Japan) (Track 10).bin" size="13034784" crc="194ed649" />
1921      <rom name="Shin Megami Tensei (Japan) (Track 11).bin" size="17066112" crc="c83b6065" />
1922      <rom name="Shin Megami Tensei (Japan) (Track 12).bin" size="15264480" crc="a3acf2ec" />
1923      <rom name="Shin Megami Tensei (Japan) (Track 13).bin" size="19131168" crc="c43b3273" />
1924      <rom name="Shin Megami Tensei (Japan) (Track 14).bin" size="16214688" crc="0f329bfd" />
1925      <rom name="Shin Megami Tensei (Japan) (Track 15).bin" size="18933600" crc="1c6d326c" />
1926      <rom name="Shin Megami Tensei (Japan) (Track 16).bin" size="20309520" crc="9fc88c26" />
1927      <rom name="Shin Megami Tensei (Japan) (Track 17).bin" size="16541616" crc="f7a03dbc" />
1928      <rom name="Shin Megami Tensei (Japan) (Track 18).bin" size="23423568" crc="c0622411" />
1929      <rom name="Shin Megami Tensei (Japan) (Track 19).bin" size="3859632" crc="4ddf05f4" />
1930      <rom name="Shin Megami Tensei (Japan) (Track 20).bin" size="3400992" crc="38174816" />
1931      <rom name="Shin Megami Tensei (Japan) (Track 21).bin" size="4285344" crc="697ed08a" />
1932      <rom name="Shin Megami Tensei (Japan) (Track 22).bin" size="5334336" crc="dd1ccad0" />
1933      <rom name="Shin Megami Tensei (Japan) (Track 23).bin" size="3433920" crc="5d8aca22" />
1934      <rom name="Shin Megami Tensei (Japan) (Track 24).bin" size="3598560" crc="a34d6163" />
1935      <rom name="Shin Megami Tensei (Japan) (Track 25).bin" size="3598560" crc="f8378312" />
1936      <rom name="Shin Megami Tensei (Japan) (Track 26).bin" size="45245424" crc="af81332c" />
1937      <rom name="Shin Megami Tensei (Japan) (Track 27).bin" size="20603520" crc="35ece82f" />
1938      <rom name="Shin Megami Tensei (Japan) (Track 28).bin" size="16901472" crc="5f027327" />
1939      <rom name="Shin Megami Tensei (Japan) (Track 29).bin" size="21358512" crc="c284eb28" />
1940      -->
1941649      <description>Shin Megami Tensei (Jpn)</description>
1942650      <year>1994</year>
1943651      <publisher>SIMS</publisher>
1944652      <info name="serial" value="T-44044"/>
1945      <info name="disk_ring" value="T-44044P-00163 1"/>
1946653      <info name="release" value="19940225"/>
1947654      <info name="alt_title" value="真・女神転生"/>
1948655      <part name="cdrom" interface="scd_cdrom">
r242703r242704
1953660   </software>
1954661
1955662   <software name="shinfrce">
1956      <!-- source redump.org
1957      <rom name="Shining Force CD (Japan).cue" size="4147" crc="51bef593" />
1958      <rom name="Shining Force CD (Japan) (Track 01).bin" size="68664288" crc="4dd14b8b" />
1959      <rom name="Shining Force CD (Japan) (Track 02).bin" size="1768704" crc="75589f1a" />
1960      <rom name="Shining Force CD (Japan) (Track 03).bin" size="3488016" crc="b08408fc" />
1961      <rom name="Shining Force CD (Japan) (Track 04).bin" size="9716112" crc="c326c9db" />
1962      <rom name="Shining Force CD (Japan) (Track 05).bin" size="15756048" crc="c731e3ee" />
1963      <rom name="Shining Force CD (Japan) (Track 06).bin" size="26697552" crc="8fd237d9" />
1964      <rom name="Shining Force CD (Japan) (Track 07).bin" size="16706256" crc="19d49872" />
1965      <rom name="Shining Force CD (Japan) (Track 08).bin" size="10725120" crc="a3bb3eb8" />
1966      <rom name="Shining Force CD (Japan) (Track 09).bin" size="1992144" crc="2b8c3bd9" />
1967      <rom name="Shining Force CD (Japan) (Track 10).bin" size="2105040" crc="c596d167" />
1968      <rom name="Shining Force CD (Japan) (Track 11).bin" size="2229696" crc="a6c89ac1" />
1969      <rom name="Shining Force CD (Japan) (Track 12).bin" size="15344448" crc="2e6eb51a" />
1970      <rom name="Shining Force CD (Japan) (Track 13).bin" size="25789680" crc="51301511" />
1971      <rom name="Shining Force CD (Japan) (Track 14).bin" size="25897872" crc="cb909642" />
1972      <rom name="Shining Force CD (Japan) (Track 15).bin" size="15177456" crc="69c68928" />
1973      <rom name="Shining Force CD (Japan) (Track 16).bin" size="6623232" crc="28eea195" />
1974      <rom name="Shining Force CD (Japan) (Track 17).bin" size="8196720" crc="9950df8f" />
1975      <rom name="Shining Force CD (Japan) (Track 18).bin" size="9391536" crc="4730bab5" />
1976      <rom name="Shining Force CD (Japan) (Track 19).bin" size="5522496" crc="8813d62b" />
1977      <rom name="Shining Force CD (Japan) (Track 20).bin" size="5089728" crc="45935f3b" />
1978      <rom name="Shining Force CD (Japan) (Track 21).bin" size="4906272" crc="5e170e50" />
1979      <rom name="Shining Force CD (Japan) (Track 22).bin" size="20617632" crc="4c13e324" />
1980      <rom name="Shining Force CD (Japan) (Track 23).bin" size="17298960" crc="28e1533b" />
1981      <rom name="Shining Force CD (Japan) (Track 24).bin" size="19302864" crc="90014f0e" />
1982      <rom name="Shining Force CD (Japan) (Track 25).bin" size="16080624" crc="7b2dc1a0" />
1983      <rom name="Shining Force CD (Japan) (Track 26).bin" size="14601216" crc="d0eb2179" />
1984      <rom name="Shining Force CD (Japan) (Track 27).bin" size="16633344" crc="3a786120" />
1985      <rom name="Shining Force CD (Japan) (Track 28).bin" size="11334288" crc="1e68f0ec" />
1986      <rom name="Shining Force CD (Japan) (Track 29).bin" size="9201024" crc="c3bf8bc2" />
1987      <rom name="Shining Force CD (Japan) (Track 30).bin" size="33490128" crc="1750540a" />
1988      <rom name="Shining Force CD (Japan) (Track 31).bin" size="40901280" crc="6115771c" />
1989      <rom name="Shining Force CD (Japan) (Track 32).bin" size="2008608" crc="ef4c2ac4" />
1990      <rom name="Shining Force CD (Japan) (Track 33).bin" size="1952160" crc="fa0f0799" />
1991      <rom name="Shining Force CD (Japan) (Track 34).bin" size="1822800" crc="95b82aea" />
1992      <rom name="Shining Force CD (Japan) (Track 35).bin" size="19312272" crc="62fd60eb" />
1993      -->
1994663      <description>Shining Force CD (Jpn)</description>
1995664      <year>1994</year>
1996665      <publisher>Sega</publisher>
1997666      <info name="serial" value="G-6036"/>
1998      <info name="disk_ring" value="G-6036P-00226-R1M V"/>
1999667      <info name="release" value="19940722"/>
2000668      <info name="alt_title" value="シャイニング・フォースCD"/>
2001669      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2006674   </software>
2007675
2008676   <software name="silpheed">
2009      <!-- source redump.org
2010      <rom name="Silpheed (Japan).cue" size="862" crc="b6759734" />
2011      <rom name="Silpheed (Japan) (Track 1).bin" size="369174624" crc="4d419bdf" />
2012      <rom name="Silpheed (Japan) (Track 2).bin" size="16099440" crc="9d8797f4" />
2013      <rom name="Silpheed (Japan) (Track 3).bin" size="36994608" crc="e731779a" />
2014      <rom name="Silpheed (Japan) (Track 4).bin" size="31095792" crc="7735f3fe" />
2015      <rom name="Silpheed (Japan) (Track 5).bin" size="34252176" crc="dfa7a797" />
2016      <rom name="Silpheed (Japan) (Track 6).bin" size="27551328" crc="50e61295" />
2017      <rom name="Silpheed (Japan) (Track 7).bin" size="12888960" crc="f0eee386" />
2018      <rom name="Silpheed (Japan) (Track 8).bin" size="34835472" crc="43febcf8" />
2019      -->
2020677      <description>Silpheed (Jpn)</description>
2021678      <year>1993</year>
2022679      <publisher>Game Arts</publisher>
2023680      <info name="serial" value="T-45054"/>
2024      <info name="disk_ring" value="T-45054P-00080-R1M V"/>
2025681      <info name="release" value="19930730"/>
2026682      <info name="alt_title" value="シルフィード"/>
2027683      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2032688   </software>
2033689
2034690   <software name="solfeace">
2035      <!-- source redump.org
2036      <rom name="Sol-Feace (Japan).cue" size="2446" crc="e3bf68e3" />
2037      <rom name="Sol-Feace (Japan) (Track 01).bin" size="4097184" crc="03c0bd53" />
2038      <rom name="Sol-Feace (Japan) (Track 02).bin" size="2053296" crc="36364065" />
2039      <rom name="Sol-Feace (Japan) (Track 03).bin" size="2582496" crc="4e470df5" />
2040      <rom name="Sol-Feace (Japan) (Track 04).bin" size="2646000" crc="74417567" />
2041      <rom name="Sol-Feace (Japan) (Track 05).bin" size="22198176" crc="929380c5" />
2042      <rom name="Sol-Feace (Japan) (Track 06).bin" size="23599968" crc="b6d94261" />
2043      <rom name="Sol-Feace (Japan) (Track 07).bin" size="23214240" crc="88960786" />
2044      <rom name="Sol-Feace (Japan) (Track 08).bin" size="27918240" crc="13f3966c" />
2045      <rom name="Sol-Feace (Japan) (Track 09).bin" size="18355008" crc="e8d67865" />
2046      <rom name="Sol-Feace (Japan) (Track 10).bin" size="59119872" crc="c5793b77" />
2047      <rom name="Sol-Feace (Japan) (Track 11).bin" size="23127216" crc="3353021e" />
2048      <rom name="Sol-Feace (Japan) (Track 12).bin" size="40118064" crc="c9a7ca2b" />
2049      <rom name="Sol-Feace (Japan) (Track 13).bin" size="15887760" crc="380f9b88" />
2050      <rom name="Sol-Feace (Japan) (Track 14).bin" size="27675984" crc="a7802d83" />
2051      <rom name="Sol-Feace (Japan) (Track 15).bin" size="25933152" crc="541df37e" />
2052      <rom name="Sol-Feace (Japan) (Track 16).bin" size="83822928" crc="d8ba28ef" />
2053      <rom name="Sol-Feace (Japan) (Track 17).bin" size="19262880" crc="a60f598b" />
2054      <rom name="Sol-Feace (Japan) (Track 18).bin" size="27854736" crc="60ee3eab" />
2055      <rom name="Sol-Feace (Japan) (Track 19).bin" size="35889168" crc="4b696831" />
2056      <rom name="Sol-Feace (Japan) (Track 20).bin" size="41399904" crc="4d05d9a8" />
2057      <rom name="Sol-Feace (Japan) (Track 21).bin" size="16845024" crc="7faff230" />
2058      <rom name="Sol-Feace (Japan) (Track 22).bin" size="20932800" crc="d14346cf" />
2059      -->
2060691      <description>Sol-Feace (Jpn)</description>
2061692      <year>1991</year>
2062693      <publisher>Wolf Team</publisher>
2063694      <info name="serial" value="T-32024"/>
2064      <info name="disk_ring" value="T-32024P-00003-R1K V"/>
2065695      <info name="release" value="19911212"/>
2066696      <info name="alt_title" value="ソル・フィース"/>
2067697      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2072702   </software>
2073703
2074704   <software name="soniccd">
2075      <!-- source redump.org
2076      <rom name="Sonic the Hedgehog CD (Japan).cue" size="4322" crc="6a065b3b" />
2077      <rom name="Sonic the Hedgehog CD (Japan) (Track 01).bin" size="129592848" crc="4c9fb365" />
2078      <rom name="Sonic the Hedgehog CD (Japan) (Track 02).bin" size="1093680" crc="b5575d36" />
2079      <rom name="Sonic the Hedgehog CD (Japan) (Track 03).bin" size="19077072" crc="fc6ec59e" />
2080      <rom name="Sonic the Hedgehog CD (Japan) (Track 04).bin" size="14231952" crc="fb6c1ae5" />
2081      <rom name="Sonic the Hedgehog CD (Japan) (Track 05).bin" size="14827008" crc="1e0d8f87" />
2082      <rom name="Sonic the Hedgehog CD (Japan) (Track 06).bin" size="17567088" crc="acd1383f" />
2083      <rom name="Sonic the Hedgehog CD (Japan) (Track 07).bin" size="13980288" crc="293daff5" />
2084      <rom name="Sonic the Hedgehog CD (Japan) (Track 08).bin" size="14342496" crc="038ddf9e" />
2085      <rom name="Sonic the Hedgehog CD (Japan) (Track 09).bin" size="20278944" crc="e4932318" />
2086      <rom name="Sonic the Hedgehog CD (Japan) (Track 10).bin" size="14041440" crc="a583cc24" />
2087      <rom name="Sonic the Hedgehog CD (Japan) (Track 11).bin" size="13653360" crc="c0b8e3ef" />
2088      <rom name="Sonic the Hedgehog CD (Japan) (Track 12).bin" size="18016320" crc="021318e0" />
2089      <rom name="Sonic the Hedgehog CD (Japan) (Track 13).bin" size="13573392" crc="68d8d7de" />
2090      <rom name="Sonic the Hedgehog CD (Japan) (Track 14).bin" size="11411904" crc="ea181442" />
2091      <rom name="Sonic the Hedgehog CD (Japan) (Track 15).bin" size="16231152" crc="092b16d8" />
2092      <rom name="Sonic the Hedgehog CD (Japan) (Track 16).bin" size="10932096" crc="4bd4f694" />
2093      <rom name="Sonic the Hedgehog CD (Japan) (Track 17).bin" size="14048496" crc="9c978637" />
2094      <rom name="Sonic the Hedgehog CD (Japan) (Track 18).bin" size="20137824" crc="ecf914a0" />
2095      <rom name="Sonic the Hedgehog CD (Japan) (Track 19).bin" size="12881904" crc="96c5de23" />
2096      <rom name="Sonic the Hedgehog CD (Japan) (Track 20).bin" size="11783520" crc="6c51ddc6" />
2097      <rom name="Sonic the Hedgehog CD (Japan) (Track 21).bin" size="14942256" crc="98e7a25e" />
2098      <rom name="Sonic the Hedgehog CD (Japan) (Track 22).bin" size="11607120" crc="874c1767" />
2099      <rom name="Sonic the Hedgehog CD (Japan) (Track 23).bin" size="12816048" crc="9ec4920e" />
2100      <rom name="Sonic the Hedgehog CD (Japan) (Track 24).bin" size="14088480" crc="a55590e6" />
2101      <rom name="Sonic the Hedgehog CD (Japan) (Track 25).bin" size="14660016" crc="a48ca9dd" />
2102      <rom name="Sonic the Hedgehog CD (Japan) (Track 26).bin" size="5294352" crc="dab24994" />
2103      <rom name="Sonic the Hedgehog CD (Japan) (Track 27).bin" size="5296704" crc="b7a17d88" />
2104      <rom name="Sonic the Hedgehog CD (Japan) (Track 28).bin" size="1458240" crc="6b3db1ca" />
2105      <rom name="Sonic the Hedgehog CD (Japan) (Track 29).bin" size="3988992" crc="c69de397" />
2106      <rom name="Sonic the Hedgehog CD (Japan) (Track 30).bin" size="3869040" crc="7142a282" />
2107      <rom name="Sonic the Hedgehog CD (Japan) (Track 31).bin" size="2008608" crc="59e1254d" />
2108      <rom name="Sonic the Hedgehog CD (Japan) (Track 32).bin" size="21513744" crc="bcf8e467" />
2109      <rom name="Sonic the Hedgehog CD (Japan) (Track 33).bin" size="21873600" crc="646b66ee" />
2110      <rom name="Sonic the Hedgehog CD (Japan) (Track 34).bin" size="16214688" crc="ad32fc11" />
2111      <rom name="Sonic the Hedgehog CD (Japan) (Track 35).bin" size="32104800" crc="e63f110d" />
2112      -->
2113705      <description>Sonic The Hedgehog CD (Jpn)</description>
2114706      <year>1993</year>
2115707      <publisher>Sega</publisher>
2116708      <info name="serial" value="G-6021"/>
2117      <info name="disk_ring" value="G-6021P-00128-R1M V"/>
2118709      <info name="release" value="19930923"/>
2119710      <info name="alt_title" value="ソニック・ザ・ヘッジホッグCD"/>
2120711      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2125716   </software>
2126717
2127718   <software name="swra">
2128      <!-- source redump.org
2129      <rom name="Star Wars - Rebel Assault (Japan).cue" size="236" crc="593af0ea" />
2130      <rom name="Star Wars - Rebel Assault (Japan) (Track 1).bin" size="395248896" crc="e49d72d3" />
2131      <rom name="Star Wars - Rebel Assault (Japan) (Track 2).bin" size="57795696" crc="ea28d67f" />
2132      -->
2133719      <description>Star Wars - Rebel Assault (Jpn)</description>
2134720      <year>19??</year>
2135721      <publisher>Victor Entertainment</publisher>
2136722      <info name="serial" value="T-60174"/>
2137      <info name="disk_ring" value="T-60174P-00232-R1M V"/>
2138723      <info name="release" value="19940922"/>
2139724      <info name="alt_title" value="スターウォーズ・レベル・アサルト"/>
2140725      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2145730   </software>
2146731
2147732   <software name="starblad">
2148      <!-- source redump.org
2149      <rom name="Starblade (Japan).cue" size="204" crc="04ca242d" />
2150      <rom name="Starblade (Japan) (Track 1).bin" size="466669728" crc="239f44d6" />
2151      <rom name="Starblade (Japan) (Track 2).bin" size="1528800" crc="9265e140" />
2152      -->
2153733      <description>Starblade (Jpn)</description>
2154734      <year>1994</year>
2155735      <publisher>Namco</publisher>
2156736      <info name="serial" value="T-14014"/>
2157      <info name="disk_ring" value="T-14014P-00246-R1M V"/>
2158737      <info name="release" value="19941028"/>
2159738      <info name="alt_title" value="スターブレード"/>
2160739      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2165744   </software>
2166745
2167746   <software name="switch">
2168      <!-- source redump.org
2169      <rom name="Switch (Japan).cue" size="4996" crc="78993adf" />
2170      <rom name="Switch (Japan) (Track 01).bin" size="253884288" crc="09aceef5" />
2171      <rom name="Switch (Japan) (Track 02).bin" size="16732128" crc="8414ba7d" />
2172      <rom name="Switch (Japan) (Track 03).bin" size="18538464" crc="fbd15b13" />
2173      <rom name="Switch (Japan) (Track 04).bin" size="6037584" crc="88b99ba0" />
2174      <rom name="Switch (Japan) (Track 05).bin" size="6253968" crc="5d3f054c" />
2175      <rom name="Switch (Japan) (Track 06).bin" size="6512688" crc="628245b1" />
2176      <rom name="Switch (Japan) (Track 07).bin" size="5435472" crc="6a6bf581" />
2177      <rom name="Switch (Japan) (Track 08).bin" size="6218688" crc="f1ee3844" />
2178      <rom name="Switch (Japan) (Track 09).bin" size="5999952" crc="63bca993" />
2179      <rom name="Switch (Japan) (Track 10).bin" size="5096784" crc="d0c71776" />
2180      <rom name="Switch (Japan) (Track 11).bin" size="5618928" crc="9060453b" />
2181      <rom name="Switch (Japan) (Track 12).bin" size="4934496" crc="ac2c45c9" />
2182      <rom name="Switch (Japan) (Track 13).bin" size="3304560" crc="d71648d8" />
2183      <rom name="Switch (Japan) (Track 14).bin" size="4776912" crc="3e34f758" />
2184      <rom name="Switch (Japan) (Track 15).bin" size="6197520" crc="61d9b048" />
2185      <rom name="Switch (Japan) (Track 16).bin" size="4447632" crc="49ae4d9a" />
2186      <rom name="Switch (Japan) (Track 17).bin" size="6385680" crc="53a252fb" />
2187      <rom name="Switch (Japan) (Track 18).bin" size="5957616" crc="5fb74365" />
2188      <rom name="Switch (Japan) (Track 19).bin" size="5983488" crc="cb93cfee" />
2189      <rom name="Switch (Japan) (Track 20).bin" size="6719664" crc="a50b9380" />
2190      <rom name="Switch (Japan) (Track 21).bin" size="6867840" crc="290d6ba5" />
2191      <rom name="Switch (Japan) (Track 22).bin" size="6491520" crc="3c1cac6d" />
2192      <rom name="Switch (Japan) (Track 23).bin" size="6571488" crc="1a883e03" />
2193      <rom name="Switch (Japan) (Track 24).bin" size="6630288" crc="5b9e30aa" />
2194      <rom name="Switch (Japan) (Track 25).bin" size="5404896" crc="d0959fad" />
2195      <rom name="Switch (Japan) (Track 26).bin" size="7018368" crc="4f9142fc" />
2196      <rom name="Switch (Japan) (Track 27).bin" size="7077168" crc="38dc6050" />
2197      <rom name="Switch (Japan) (Track 28).bin" size="6352752" crc="615fb73d" />
2198      <rom name="Switch (Japan) (Track 29).bin" size="6719664" crc="669e4e33" />
2199      <rom name="Switch (Japan) (Track 30).bin" size="6411552" crc="9db5af80" />
2200      <rom name="Switch (Japan) (Track 31).bin" size="5835312" crc="2bb48d7f" />
2201      <rom name="Switch (Japan) (Track 32).bin" size="6870192" crc="eb3089d7" />
2202      <rom name="Switch (Japan) (Track 33).bin" size="5999952" crc="6dc969fe" />
2203      <rom name="Switch (Japan) (Track 34).bin" size="5668320" crc="0c2684db" />
2204      <rom name="Switch (Japan) (Track 35).bin" size="6315120" crc="0b59ac0a" />
2205      <rom name="Switch (Japan) (Track 36).bin" size="6705552" crc="0e69ea50" />
2206      <rom name="Switch (Japan) (Track 37).bin" size="5999952" crc="ee7132ff" />
2207      <rom name="Switch (Japan) (Track 38).bin" size="5651856" crc="58fe60fe" />
2208      <rom name="Switch (Japan) (Track 39).bin" size="7415856" crc="8fb77e97" />
2209      <rom name="Switch (Japan) (Track 40).bin" size="6729072" crc="fbf23e6a" />
2210      <rom name="Switch (Japan) (Track 41).bin" size="3184608" crc="9a024d69" />
2211      <rom name="Switch (Japan) (Track 42).bin" size="6275136" crc="00b05629" />
2212      <rom name="Switch (Japan) (Track 43).bin" size="6263376" crc="5da86cb0" />
2213      <rom name="Switch (Japan) (Track 44).bin" size="10903872" crc="6bd2630a" />
2214      <rom name="Switch (Japan) (Track 45).bin" size="34835472" crc="ba6b2357" />
2215      <rom name="Switch (Japan) (Track 46).bin" size="11856432" crc="acc8f0a5" />
2216      -->
2217747      <description>Switch (Jpn)</description>
2218748      <year>1993</year>
2219749      <publisher>Sega</publisher>
2220750      <info name="serial" value="G-6009"/>
2221      <info name="disk_ring" value="G-6009P-00061-R1M V"/>
2222751      <info name="release" value="19930423"/>
2223752      <info name="alt_title" value="スイッチ"/>
2224753      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2229758   </software>
2230759
2231760   <software name="tenbu">
2232      <!-- source redump.org
2233      <rom name="Tenbu Mega CD Special (Japan).cue" size="1089" crc="79c8ab53" />
2234      <rom name="Tenbu Mega CD Special (Japan) (Track 1).bin" size="216478080" crc="c4127fc0" />
2235      <rom name="Tenbu Mega CD Special (Japan) (Track 2).bin" size="43580208" crc="84945981" />
2236      <rom name="Tenbu Mega CD Special (Japan) (Track 3).bin" size="57388800" crc="5502704e" />
2237      <rom name="Tenbu Mega CD Special (Japan) (Track 4).bin" size="41882064" crc="730168c6" />
2238      <rom name="Tenbu Mega CD Special (Japan) (Track 5).bin" size="35009520" crc="6f7ae3c5" />
2239      <rom name="Tenbu Mega CD Special (Japan) (Track 6).bin" size="54799248" crc="11a8aa44" />
2240      <rom name="Tenbu Mega CD Special (Japan) (Track 7).bin" size="4144224" crc="b3ef21c9" />
2241      <rom name="Tenbu Mega CD Special (Japan) (Track 8).bin" size="2940000" crc="e49038b7" />
2242      <rom name="Tenbu Mega CD Special (Japan) (Track 9).bin" size="3231648" crc="bb700374" />
2243      -->
2244761      <description>Tenbu Mega CD Special (Jpn)</description>
2245762      <year>1992</year>
2246763      <publisher>Wolf Team</publisher>
2247764      <info name="serial" value="T-32084"/>
2248      <info name="disk_ring" value="T-32084P-00044-R1M V"/>
2249765      <info name="release" value="19921225"/>
2250766      <info name="alt_title" value="天舞メガCDスペシャル"/>
2251767      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2256772   </software>
2257773
2258774   <software name="tenkafub">
2259      <!-- source redump.org
2260      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan).cue" size="2547" crc="0d10e057" />
2261      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 01).bin" size="120457680" crc="487c1c68" />
2262      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 02).bin" size="1613472" crc="42d8c275" />
2263      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 03).bin" size="32074224" crc="5f64fdf4" />
2264      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 04).bin" size="30700656" crc="57bd6abb" />
2265      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 05).bin" size="39852288" crc="548d844b" />
2266      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 06).bin" size="25401600" crc="53b94b1d" />
2267      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 07).bin" size="26848080" crc="f5422754" />
2268      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 08).bin" size="26365920" crc="28b8c277" />
2269      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 09).bin" size="30500736" crc="1a7ac132" />
2270      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 10).bin" size="19227600" crc="f534ddcc" />
2271      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 11).bin" size="15033984" crc="ab12bc45" />
2272      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 12).bin" size="29616384" crc="eba969a1" />
2273      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 13).bin" size="28654416" crc="19b15fdf" />
2274      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 14).bin" size="23113104" crc="ab39235c" />
2275      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 15).bin" size="28052304" crc="732460be" />
2276      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 16).bin" size="32869200" crc="a2263ee7" />
2277      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 17).bin" size="25883760" crc="2bb8c63a" />
2278      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 18).bin" size="35757456" crc="16d2cedc" />
2279      <rom name="Tenkafubu - Eiyuutachi no Houkou (Japan) (Track 19).bin" size="33828816" crc="5a99929d" />
2280      -->
2281775      <description>Tenkafubu - Eiyuutachi no Houkou (Jpn)</description>
2282776      <year>1991</year>
2283777      <publisher>Game Arts</publisher>
2284778      <info name="serial" value="T-45024"/>
2285      <info name="disk_ring" value="T-45024P-00008-R2K V"/>
2286779      <info name="release" value="19911228"/>
2287780      <info name="alt_title" value="天下布武 英雄たちの咆哮"/>
2288781      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2293786   </software>
2294787
2295788   <software name="tstormfx">
2296      <!-- source redump.org
2297      <rom name="Thunder Storm FX (Japan).cue" size="218" crc="aa9ff0ed" />
2298      <rom name="Thunder Storm FX (Japan) (Track 1).bin" size="259446768" crc="5512fd9c" />
2299      <rom name="Thunder Storm FX (Japan) (Track 2).bin" size="1653456" crc="bf577267" />
2300      -->
2301789      <description>Thunder Storm FX (Jpn)</description>
2302790      <year>1992</year>
2303791      <publisher>Wolf Team</publisher>
2304792      <info name="serial" value="T-32064"/>
2305      <info name="disk_ring" value="T-32064P-00022-R2M V, T-32064P-00022-R1M V"/>
2306793      <info name="release" value="19920828"/>
2307794      <info name="alt_title" value="サンダーストームFX"/>
2308795      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2313800   </software>
2314801
2315802   <software name="thawk">
2316      <!-- source redump.org
2317      <rom name="Thunderhawk (Japan).cue" size="1236" crc="f4ae0600" />
2318      <rom name="Thunderhawk (Japan) (Track 01).bin" size="104504064" crc="590bda55" />
2319      <rom name="Thunderhawk (Japan) (Track 02).bin" size="38704512" crc="6d7bdc00" />
2320      <rom name="Thunderhawk (Japan) (Track 03).bin" size="38532816" crc="8dd0aa1f" />
2321      <rom name="Thunderhawk (Japan) (Track 04).bin" size="15692544" crc="f4c63271" />
2322      <rom name="Thunderhawk (Japan) (Track 05).bin" size="10094784" crc="eb1683d8" />
2323      <rom name="Thunderhawk (Japan) (Track 06).bin" size="20039040" crc="f43cba4f" />
2324      <rom name="Thunderhawk (Japan) (Track 07).bin" size="40656672" crc="e35a0605" />
2325      <rom name="Thunderhawk (Japan) (Track 08).bin" size="40717824" crc="7750a085" />
2326      <rom name="Thunderhawk (Japan) (Track 09).bin" size="25081728" crc="28125505" />
2327      <rom name="Thunderhawk (Japan) (Track 10).bin" size="44243472" crc="a674e49f" />
2328      <rom name="Thunderhawk (Japan) (Track 11).bin" size="52945872" crc="5229bdbf" />
2329      -->
2330803      <description>Thunderhawk (Jpn)</description>
2331804      <year>1993</year>
2332805      <publisher>Victor Entertainment</publisher>
2333806      <info name="serial" value="T-60134"/>
2334      <info name="disk_ring" value="T-60134P-00126 2"/>
2335807      <info name="release" value="19930917"/>
2336808      <info name="alt_title" value="サンダーホーク"/>
2337809      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2342814   </software>
2343815
2344816   <software name="timegal">
2345      <!-- source redump.org
2346      <rom name="Time Gal (Japan).cue" size="202" crc="a50da29e" />
2347      <rom name="Time Gal (Japan) (Track 1).bin" size="304652208" crc="1a756c12" />
2348      <rom name="Time Gal (Japan) (Track 2).bin" size="1651104" crc="fd9c4ef7" />
2349      -->
2350817      <description>Time Gal (Jpn)</description>
2351818      <year>1992</year>
2352819      <publisher>Wolf Team</publisher>
2353820      <info name="serial" value="T-32114"/>
2354      <info name="disk_ring" value="T-32114P-00031-R1M V"/>
2355821      <info name="release" value="19921113"/>
2356822      <info name="alt_title" value="タイムギャル"/>
2357823      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2362828   </software>
2363829
2364830   <software name="uruseiya">
2365      <!-- source redump.org
2366      <rom name="Urusei Yatsura - Dear My Friends (Japan).cue" size="384" crc="6947c2fa" />
2367      <rom name="Urusei Yatsura - Dear My Friends (Japan) (Track 1).bin" size="383653536" crc="187ce23e" />
2368      <rom name="Urusei Yatsura - Dear My Friends (Japan) (Track 2).bin" size="21083328" crc="ef56f804" />
2369      <rom name="Urusei Yatsura - Dear My Friends (Japan) (Track 3).bin" size="39774672" crc="5e2d74bf" />
2370      -->
2371831      <description>Urusei Yatsura - Dear My Friends (Jpn)</description>
2372832      <year>1994</year>
2373833      <publisher>Game Arts</publisher>
2374834      <info name="serial" value="T-45064"/>
2375      <info name="disk_ring" value="T-45064P-00195-R1M V"/>
2376835      <info name="release" value="19940415"/>
2377836      <info name="alt_title" value="うる星やつら ディア マイ フレンズ"/>
2378837      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2383842   </software>
2384843
2385844   <software name="vay">
2386      <!-- source redump.org
2387      <rom name="Vay - Ryuusei no Yoroi (Japan).cue" size="2107" crc="b0351491" />
2388      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 01).bin" size="122294592" crc="e080738e" />
2389      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 02).bin" size="1368864" crc="e0613845" />
2390      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 03).bin" size="21419664" crc="795cb59c" />
2391      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 04).bin" size="21231504" crc="fedaeff7" />
2392      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 05).bin" size="19439280" crc="d13e65c9" />
2393      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 06).bin" size="22146432" crc="f530ac1a" />
2394      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 07).bin" size="20474160" crc="0f22a101" />
2395      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 08).bin" size="16746240" crc="8e131629" />
2396      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 09).bin" size="21937104" crc="4b44eb01" />
2397      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 10).bin" size="7658112" crc="ee1152a5" />
2398      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 11).bin" size="11952864" crc="119444a8" />
2399      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 12).bin" size="10181808" crc="c862c71b" />
2400      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 13).bin" size="16595712" crc="58fbc5a8" />
2401      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 14).bin" size="1164240" crc="12313260" />
2402      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 15).bin" size="32163600" crc="9cf28017" />
2403      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 16).bin" size="19206432" crc="97d73c99" />
2404      <rom name="Vay - Ryuusei no Yoroi (Japan) (Track 17).bin" size="22920240" crc="c5f8063d" />
2405      -->
2406845      <description>Vay - Ryuusei no Yoroi (Jpn)</description>
2407846      <year>1993</year>
2408847      <publisher>SIMS</publisher>
2409848      <info name="serial" value="T-44014"/>
2410      <info name="disk_ring" value="T-44014P-00141 1"/>
2411849      <info name="release" value="19931022"/>
2412850      <info name="alt_title" value="Vay 流星の鎧"/>
2413851      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2418856   </software>
2419857
2420858   <software name="funkband">
2421      <!-- source redump.org
2422      <rom name="Wakusei Woodstock - Funky Horror Band (Japan).cue" size="677" crc="d30c2458" />
2423      <rom name="Wakusei Woodstock - Funky Horror Band (Japan) (Track 1).bin" size="58030896" crc="15c08675" />
2424      <rom name="Wakusei Woodstock - Funky Horror Band (Japan) (Track 2).bin" size="30528960" crc="195f442b" />
2425      <rom name="Wakusei Woodstock - Funky Horror Band (Japan) (Track 3).bin" size="30425472" crc="081d9f6c" />
2426      <rom name="Wakusei Woodstock - Funky Horror Band (Japan) (Track 4).bin" size="33812352" crc="ba656829" />
2427      <rom name="Wakusei Woodstock - Funky Horror Band (Japan) (Track 5).bin" size="49968240" crc="678ce0ca" />
2428      -->
2429859      <description>Wakusei Woodstock - Funky Horror Band (Jpn)</description>
2430860      <year>1991</year>
2431861      <publisher>Sega</publisher>
2432862      <info name="serial" value="G-6001"/>
2433      <info name="disk_ring" value="G-6001P-00001-R1K V"/>
2434863      <info name="release" value="19911220"/>
2435864      <info name="alt_title" value="惑星ウッドストック ファンキーホラーバンド"/>
2436865      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2441870   </software>
2442871
2443872   <software name="wingcomm">
2444      <!-- source redump.org
2445      <rom name="Wing Commander (Japan).cue" size="678" crc="6367c9d3" />
2446      <rom name="Wing Commander (Japan) (Track 1).bin" size="425876640" crc="bd623044" />
2447      <rom name="Wing Commander (Japan) (Track 2).bin" size="20765808" crc="8031b38b" />
2448      <rom name="Wing Commander (Japan) (Track 3).bin" size="7404096" crc="34a864b1" />
2449      <rom name="Wing Commander (Japan) (Track 4).bin" size="5783568" crc="d8efc4cc" />
2450      <rom name="Wing Commander (Japan) (Track 5).bin" size="7286496" crc="6e9f7d90" />
2451      <rom name="Wing Commander (Japan) (Track 6).bin" size="30423120" crc="1890f041" />
2452      -->
2453873      <description>Wing Commander (Jpn)</description>
2454874      <year>1994</year>
2455875      <publisher>Sega</publisher>
2456876      <info name="serial" value="G-6011"/>
2457      <info name="disk_ring" value="G-6011P-00175-R1M V"/>
2458877      <info name="release" value="19940325"/>
2459878      <info name="alt_title" value="ウイングコマンダー"/>
2460879      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2465884   </software>
2466885
2467886   <software name="winpost">
2468      <!-- source redump.org
2469      <rom name="Winning Post (Japan).cue" size="2167" crc="0a09b085" />
2470      <rom name="Winning Post (Japan) (Track 01).bin" size="10252368" crc="db23bafd" />
2471      <rom name="Winning Post (Japan) (Track 02).bin" size="7989744" crc="c41baa20" />
2472      <rom name="Winning Post (Japan) (Track 03).bin" size="6164592" crc="ddb1ba32" />
2473      <rom name="Winning Post (Japan) (Track 04).bin" size="9923088" crc="5c2e2ccf" />
2474      <rom name="Winning Post (Japan) (Track 05).bin" size="8344896" crc="ba591013" />
2475      <rom name="Winning Post (Japan) (Track 06).bin" size="1164240" crc="fd93dabf" />
2476      <rom name="Winning Post (Japan) (Track 07).bin" size="5040336" crc="0e34184a" />
2477      <rom name="Winning Post (Japan) (Track 08).bin" size="4188912" crc="0129ab9e" />
2478      <rom name="Winning Post (Japan) (Track 09).bin" size="3466848" crc="f806a3a3" />
2479      <rom name="Winning Post (Japan) (Track 10).bin" size="3466848" crc="28facd3a" />
2480      <rom name="Winning Post (Japan) (Track 11).bin" size="3172848" crc="efb193c8" />
2481      <rom name="Winning Post (Japan) (Track 12).bin" size="2450784" crc="bbff49f8" />
2482      <rom name="Winning Post (Japan) (Track 13).bin" size="3433920" crc="127b5a17" />
2483      <rom name="Winning Post (Japan) (Track 14).bin" size="7890960" crc="1582d0bb" />
2484      <rom name="Winning Post (Japan) (Track 15).bin" size="8184960" crc="832432ac" />
2485      <rom name="Winning Post (Japan) (Track 16).bin" size="9069312" crc="0862cab2" />
2486      <rom name="Winning Post (Japan) (Track 17).bin" size="7564032" crc="68d265a9" />
2487      <rom name="Winning Post (Japan) (Track 18).bin" size="5433120" crc="11927a0d" />
2488      <rom name="Winning Post (Japan) (Track 19).bin" size="33570096" crc="6bddf7c6" />
2489      -->
2490887      <description>Winning Post (Jpn)</description>
2491888      <year>1993</year>
2492889      <publisher>Koei</publisher>
2493890      <info name="serial" value="T-76044"/>
2494      <info name="disk_ring" value="T-76044P-00123 1"/>
2495891      <info name="release" value="19930917"/>
2496892      <info name="alt_title" value="ウイニングポスト"/>
2497893      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2502898   </software>
2503899
2504900   <software name="wolfchld">
2505      <!-- source redump.org
2506      <rom name="Wolfchild (Japan).cue" size="1214" crc="d3f5888a" />
2507      <rom name="Wolfchild (Japan) (Track 01).bin" size="11343696" crc="e2e83143" />
2508      <rom name="Wolfchild (Japan) (Track 02).bin" size="34477968" crc="b41b20c1" />
2509      <rom name="Wolfchild (Japan) (Track 03).bin" size="53094048" crc="2f1e370f" />
2510      <rom name="Wolfchild (Japan) (Track 04).bin" size="52934112" crc="c48136da" />
2511      <rom name="Wolfchild (Japan) (Track 05).bin" size="52743600" crc="4065e696" />
2512      <rom name="Wolfchild (Japan) (Track 06).bin" size="52880016" crc="0f7e0a4c" />
2513      <rom name="Wolfchild (Japan) (Track 07).bin" size="52847088" crc="7ef3edc1" />
2514      <rom name="Wolfchild (Japan) (Track 08).bin" size="31963680" crc="e7d8254f" />
2515      <rom name="Wolfchild (Japan) (Track 09).bin" size="21045696" crc="f708df83" />
2516      <rom name="Wolfchild (Japan) (Track 10).bin" size="1740480" crc="219b4cb2" />
2517      <rom name="Wolfchild (Japan) (Track 11).bin" size="19961424" crc="bcedc4fc" />
2518      -->
2519901      <description>Wolfchild (Jpn)</description>
2520902      <year>1993</year>
2521903      <publisher>Victor Entertainment</publisher>
2522904      <info name="serial" value="T-60104"/>
2523      <info name="disk_ring" value="T-60104P-00054-R1M V"/>
2524905      <info name="release" value="19930319"/>
2525906      <info name="alt_title" value="ウルフチャイルド"/>
2526907      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2531912   </software>
2532913
2533914   <software name="wonderdg">
2534      <!-- source redump.org
2535      <rom name="Wonder Dog (Japan).cue" size="2355" crc="e62fe1de" />
2536      <rom name="Wonder Dog (Japan) (Track 01).bin" size="32746896" crc="0cbf80c2" />
2537      <rom name="Wonder Dog (Japan) (Track 02).bin" size="42961632" crc="4c909867" />
2538      <rom name="Wonder Dog (Japan) (Track 03).bin" size="37876608" crc="cfbf018e" />
2539      <rom name="Wonder Dog (Japan) (Track 04).bin" size="36162000" crc="a3f5fe41" />
2540      <rom name="Wonder Dog (Japan) (Track 05).bin" size="42886368" crc="bdc4c197" />
2541      <rom name="Wonder Dog (Japan) (Track 06).bin" size="52176768" crc="57f76a38" />
2542      <rom name="Wonder Dog (Japan) (Track 07).bin" size="34073424" crc="f8495832" />
2543      <rom name="Wonder Dog (Japan) (Track 08).bin" size="10823904" crc="0446a053" />
2544      <rom name="Wonder Dog (Japan) (Track 09).bin" size="11632992" crc="26592b7a" />
2545      <rom name="Wonder Dog (Japan) (Track 10).bin" size="21605472" crc="9ce04c27" />
2546      <rom name="Wonder Dog (Japan) (Track 11).bin" size="18578448" crc="76314b07" />
2547      <rom name="Wonder Dog (Japan) (Track 12).bin" size="15560832" crc="dc71494e" />
2548      <rom name="Wonder Dog (Japan) (Track 13).bin" size="17044944" crc="b5d58afd" />
2549      <rom name="Wonder Dog (Japan) (Track 14).bin" size="17823456" crc="1c956fa0" />
2550      <rom name="Wonder Dog (Japan) (Track 15).bin" size="17941056" crc="a8aea35d" />
2551      <rom name="Wonder Dog (Japan) (Track 16).bin" size="14511840" crc="2f894101" />
2552      <rom name="Wonder Dog (Japan) (Track 17).bin" size="44775024" crc="83162f54" />
2553      <rom name="Wonder Dog (Japan) (Track 18).bin" size="14695296" crc="46b4447a" />
2554      <rom name="Wonder Dog (Japan) (Track 19).bin" size="41265840" crc="3936ac75" />
2555      <rom name="Wonder Dog (Japan) (Track 20).bin" size="6115200" crc="4636ac6d" />
2556      <rom name="Wonder Dog (Japan) (Track 21).bin" size="59449152" crc="e813bb63" />
2557      -->
2558915      <description>Wonder Dog (Jpn)</description>
2559916      <year>1992</year>
2560917      <publisher>Victor Entertainment</publisher>
2561918      <info name="serial" value="T-60074"/>
2562      <info name="disk_ring" value="T-60074P-00028-R1M V"/>
2563919      <info name="release" value="19920925"/>
2564920      <info name="alt_title" value="ワンダードッグ"/>
2565921      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2570926   </software>
2571927
2572928   <software name="yumemi">
2573      <!-- source redump.org
2574      <rom name="Yumemi Yakata no Monogatari (Japan).cue" size="240" crc="e9b007a4" />
2575      <rom name="Yumemi Yakata no Monogatari (Japan) (Track 1).bin" size="625389744" crc="e491e189" />
2576      <rom name="Yumemi Yakata no Monogatari (Japan) (Track 2).bin" size="7190064" crc="1d6aa9a6" />
2577      -->
2578929      <description>Yumemi Yakata no Monogatari (Jpn)</description>
2579930      <year>1993</year>
2580931      <publisher>Sega</publisher>
2581932      <info name="serial" value="G-6027"/>
2582      <info name="disk_ring" value="G-6027P-00142-R1M V"/>
2583933      <info name="release" value="19931210"/>
2584934      <info name="alt_title" value="夢見館の物語"/>
2585935      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2590940   </software>
2591941
2592942   <software name="yumimimx">
2593      <!-- source redump.org
2594      <rom name="Yumimi Mix (Japan).cue" size="430" crc="70013638" />
2595      <rom name="Yumimi Mix (Japan) (Track 1).bin" size="197299872" crc="e93a646f" />
2596      <rom name="Yumimi Mix (Japan) (Track 2).bin" size="21676032" crc="c535ba1f" />
2597      <rom name="Yumimi Mix (Japan) (Track 3).bin" size="35872704" crc="43e9be38" />
2598      <rom name="Yumimi Mix (Japan) (Track 4).bin" size="14307216" crc="579798ef" />
2599      -->
2600943      <description>Yumimi Mix (Jpn)</description>
2601944      <year>1993</year>
2602945      <publisher>Game Arts</publisher>
2603946      <info name="serial" value="T-45034"/>
2604      <info name="disk_ring" value="T-45034P-00047-R1M V"/>
2605947      <info name="release" value="19930129"/>
2606948      <info name="alt_title" value="ゆみみみっくす"/>
2607949      <part name="cdrom" interface="scd_cdrom">
r242703r242704
2611953      </part>
2612954   </software>
2613955
2614
2615956   <!-- TOSEC dumps -->
2616957
958
2617959   <software name="arank">
2618      <!-- source toseciso
2619      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)[!].cue" size="8145" crc="bca5564d" />
2620      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 01 of 55)[!].iso" size="137910272" crc="94c11894" />
2621      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 02 of 55)[!].wav" size="1352444" crc="520ad16c" />
2622      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 03 of 55)[!].wav" size="27643100" crc="877ee6b7" />
2623      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 04 of 55)[!].wav" size="16235900" crc="7a6af65b" />
2624      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 05 of 55)[!].wav" size="1420652" crc="8486d807" />
2625      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 06 of 55)[!].wav" size="16835660" crc="f38f4aab" />
2626      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 07 of 55)[!].wav" size="16572236" crc="06db5694" />
2627      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 08 of 55)[!].wav" size="16482860" crc="88624d8e" />
2628      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 09 of 55)[!].wav" size="22395788" crc="77084515" />
2629      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 10 of 55)[!].wav" size="22057100" crc="83e075da" />
2630      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 11 of 55)[!].wav" size="21713708" crc="38779b23" />
2631      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 12 of 55)[!].wav" size="1500620" crc="d7f33f52" />
2632      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 13 of 55)[!].wav" size="5990588" crc="e563aef4" />
2633      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 14 of 55)[!].wav" size="1500620" crc="573bad80" />
2634      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 15 of 55)[!].wav" size="2265020" crc="11c339fc" />
2635      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 16 of 55)[!].wav" size="2086268" crc="1fef9c88" />
2636      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 17 of 55)[!].wav" size="2862428" crc="de3be34b" />
2637      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 18 of 55)[!].wav" size="1446524" crc="f85229a4" />
2638      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 19 of 55)[!].wav" size="1500620" crc="b74c7dae" />
2639      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 20 of 55)[!].wav" size="1519436" crc="0b051b68" />
2640      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 21 of 55)[!].wav" size="3986684" crc="d1645f57" />
2641      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 22 of 55)[!].wav" size="11710652" crc="b84c8db2" />
2642      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 23 of 55)[!].wav" size="1573532" crc="496b4439" />
2643      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 24 of 55)[!].wav" size="1408892" crc="3cc5cde5" />
2644      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 25 of 55)[!].wav" size="1423004" crc="399bcf2a" />
2645      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 26 of 55)[!].wav" size="1408892" crc="f0a7d4a5" />
2646      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 27 of 55)[!].wav" size="1540604" crc="93a4bf51" />
2647      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 28 of 55)[!].wav" size="1780508" crc="b3407bb0" />
2648      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 29 of 55)[!].wav" size="4976876" crc="c66254ad" />
2649      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 30 of 55)[!].wav" size="2025116" crc="7268273b" />
2650      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 31 of 55)[!].wav" size="3318716" crc="bcfb7e9f" />
2651      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 32 of 55)[!].wav" size="4196012" crc="8c1c5578" />
2652      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 33 of 55)[!].wav" size="4224236" crc="7d9f03d5" />
2653      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 34 of 55)[!].wav" size="4386524" crc="99a5792a" />
2654      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 35 of 55)[!].wav" size="4410044" crc="b440494d" />
2655      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 36 of 55)[!].wav" size="3930236" crc="0c89a8a5" />
2656      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 37 of 55)[!].wav" size="1731116" crc="7e9cee69" />
2657      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 38 of 55)[!].wav" size="2608412" crc="87ba6ebb" />
2658      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 39 of 55)[!].wav" size="3245804" crc="316136df" />
2659      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 40 of 55)[!].wav" size="2236796" crc="e99276ad" />
2660      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 41 of 55)[!].wav" size="3243452" crc="f65fbe5f" />
2661      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 42 of 55)[!].wav" size="3116444" crc="b06fdd92" />
2662      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 43 of 55)[!].wav" size="2726012" crc="c201dfcc" />
2663      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 44 of 55)[!].wav" size="3236396" crc="63d90aa0" />
2664      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 45 of 55)[!].wav" size="3647996" crc="9e4c0180" />
2665      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 46 of 55)[!].wav" size="3318716" crc="fe2a574a" />
2666      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 47 of 55)[!].wav" size="2601356" crc="80f2d5e1" />
2667      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 48 of 55)[!].wav" size="2827148" crc="a52abd69" />
2668      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 49 of 55)[!].wav" size="3365756" crc="460a8705" />
2669      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 50 of 55)[!].wav" size="3045884" crc="918bec31" />
2670      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 51 of 55)[!].wav" size="2867132" crc="8d1af82e" />
2671      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 52 of 55)[!].wav" size="2810684" crc="44722af6" />
2672      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 53 of 55)[!].wav" size="23444780" crc="164d590d" />
2673      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 54 of 55)[!].wav" size="27045692" crc="af8a4056" />
2674      <rom name="A-Rank Thunder Tanjouhen (1993)(Riot)(NTSC)(JP)(Track 55 of 55)[!].wav" size="42124364" crc="aef65e71" />
2675      -->
2676960      <description>A-Rank Thunder Tanjouhen (Jpn)</description>
2677961      <year>1993</year>
2678962      <publisher>Nihon Telenet</publisher>
r242703r242704
2687971   </software>
2688972
2689973   <software name="afterarm">
2690      <!-- source toseciso
2691      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)[!].cue" size="6791" crc="be870589" />
2692      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 01 of 39)[!].iso" size="6563840" crc="cb0d3e44" />
2693      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 02 of 39)[!].wav" size="10692236" crc="59e03c16" />
2694      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 03 of 39)[!].wav" size="9746732" crc="297f890a" />
2695      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 04 of 39)[!].wav" size="11644796" crc="b180914a" />
2696      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 05 of 39)[!].wav" size="12926636" crc="beb721f5" />
2697      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 06 of 39)[!].wav" size="14446028" crc="ca2ba889" />
2698      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 07 of 39)[!].wav" size="14384876" crc="5c6425a7" />
2699      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 08 of 39)[!].wav" size="15991292" crc="3fb14ed9" />
2700      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 09 of 39)[!].wav" size="17383676" crc="693c6138" />
2701      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 10 of 39)[!].wav" size="11625980" crc="7fdb1ab3" />
2702      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 11 of 39)[!].wav" size="19222940" crc="df77caaa" />
2703      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 12 of 39)[!].wav" size="13484060" crc="0e64006d" />
2704      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 13 of 39)[!].wav" size="12105788" crc="c69bb636" />
2705      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 14 of 39)[!].wav" size="16226492" crc="a94eda81" />
2706      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 15 of 39)[!].wav" size="19712156" crc="957174b6" />
2707      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 16 of 39)[!].wav" size="18538508" crc="ab7e1a28" />
2708      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 17 of 39)[!].wav" size="17677676" crc="c11eef36" />
2709      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 18 of 39)[!].wav" size="15462092" crc="a741d546" />
2710      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 19 of 39)[!].wav" size="8147372" crc="bba2cd24" />
2711      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 20 of 39)[!].wav" size="15034028" crc="de0c37c6" />
2712      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 21 of 39)[!].wav" size="19874444" crc="7f31d3b1" />
2713      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 22 of 39)[!].wav" size="19754492" crc="d09aa118" />
2714      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 23 of 39)[!].wav" size="24317372" crc="ae19656e" />
2715      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 24 of 39)[!].wav" size="10332380" crc="7f7bbe94" />
2716      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 25 of 39)[!].wav" size="12385676" crc="70b6c8fa" />
2717      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 26 of 39)[!].wav" size="9245756" crc="85343c87" />
2718      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 27 of 39)[!].wav" size="10028972" crc="cebaa049" />
2719      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 28 of 39)[!].wav" size="11917628" crc="f1bc62b3" />
2720      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 29 of 39)[!].wav" size="15302156" crc="48a79e73" />
2721      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 30 of 39)[!].wav" size="20474204" crc="bf329627" />
2722      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 31 of 39)[!].wav" size="13032476" crc="3981e5bd" />
2723      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 32 of 39)[!].wav" size="34781420" crc="68de7c73" />
2724      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 33 of 39)[!].wav" size="11938796" crc="3e72905a" />
2725      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 34 of 39)[!].wav" size="11713004" crc="25e78403" />
2726      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 35 of 39)[!].wav" size="15796076" crc="7b715718" />
2727      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 36 of 39)[!].wav" size="15838412" crc="c9f412e0" />
2728      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 37 of 39)[!].wav" size="12124604" crc="984220be" />
2729      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 38 of 39)[!].wav" size="12752588" crc="3fac2053" />
2730      <rom name="After Armageddon Gaiden - Majuu Toushouden Eclipse (1994)(Sega)(NTSC)(JP)(Track 39 of 39)[!].wav" size="12188108" crc="3ff8b389" />
2731      -->
2732974      <description>After Armageddon Gaiden - Majuu Toushouden Eclipse (Jpn)</description>
2733975      <year>1994</year>
2734976      <publisher>Sega</publisher>
r242703r242704
2742984      </part>
2743985   </software>
2744986
987<!--
988    <software name="aburner3">
989        <description>After Burner III (Jpn)</description>
990        <year>1992</year>
991        <publisher>Sega</publisher>
992        <part name="cdrom" interface="scd_cdrom">
993            <diskarea name="cdrom">
994                <disk name="after burner iii (1992)(sega)(ntsc)(jp)(en)[!]" sha1="d7b43705b4c337dc39362931f9d136eb9a308522"/>
995            </diskarea>
996        </part>
997    </software>
998-->
999
27451000   <software name="aislelrd">
2746      <!-- source toseciso
2747      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)[!].cue" size="2345" crc="0f61b7b9" />
2748      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 01 of 17)[!].iso" size="108869632" crc="6abfddfc" />
2749      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 02 of 17)[!].wav" size="1300700" crc="08e21297" />
2750      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 03 of 17)[!].wav" size="23294252" crc="eed846b1" />
2751      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 04 of 17)[!].wav" size="7872188" crc="b4942a10" />
2752      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 05 of 17)[!].wav" size="24919484" crc="7494665d" />
2753      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 06 of 17)[!].wav" size="4711100" crc="4c0943bd" />
2754      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 07 of 17)[!].wav" size="7517036" crc="3dc28556" />
2755      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 08 of 17)[!].wav" size="4772252" crc="0107a073" />
2756      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 09 of 17)[!].wav" size="8761244" crc="eb9ce073" />
2757      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 10 of 17)[!].wav" size="13260620" crc="b2c56b1b" />
2758      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 11 of 17)[!].wav" size="12649100" crc="da0d41d8" />
2759      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 12 of 17)[!].wav" size="8789468" crc="cd9f0eaf" />
2760      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 13 of 17)[!].wav" size="4257164" crc="eeb67bea" />
2761      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 14 of 17)[!].wav" size="8867084" crc="e657f4cb" />
2762      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 15 of 17)[!].wav" size="12722012" crc="e37f5d29" />
2763      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 16 of 17)[!].wav" size="45640604" crc="1c985344" />
2764      <rom name="Aisle Lord (1992)(Wolf Team)(NTSC)(Jp)(Track 17 of 17)[!].wav" size="3565676" crc="36134764" />
2765      -->
27661001      <description>Aisle Lord (Jpn)</description>
27671002      <year>1992</year>
27681003      <publisher>Wolf Team</publisher>
r242703r242704
27771012   </software>
27781013
27791014   <software name="alshark">
2780      <!-- source toseciso
2781      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)[!].cue" size="5009" crc="2ded8ede" />
2782      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 01 of 36)[!].iso" size="23838720" crc="c31174f8" />
2783      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 02 of 36)[!].wav" size="12157532" crc="043b5b19" />
2784      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 03 of 36)[!].wav" size="18700796" crc="e7cd2442" />
2785      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 04 of 36)[!].wav" size="20111996" crc="b674d1dc" />
2786      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 05 of 36)[!].wav" size="14290796" crc="6b182b3e" />
2787      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 06 of 36)[!].wav" size="11524844" crc="14306a94" />
2788      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 07 of 36)[!].wav" size="15010508" crc="f07ff72e" />
2789      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 08 of 36)[!].wav" size="19603964" crc="77f49b10" />
2790      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 09 of 36)[!].wav" size="21523196" crc="3ce94483" />
2791      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 10 of 36)[!].wav" size="20114348" crc="857baac3" />
2792      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 11 of 36)[!].wav" size="15172796" crc="ef9f1d7a" />
2793      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 12 of 36)[!].wav" size="13937996" crc="f18062fe" />
2794      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 13 of 36)[!].wav" size="14996396" crc="47cbd25c" />
2795      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 14 of 36)[!].wav" size="18171596" crc="e78fdf81" />
2796      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 15 of 36)[!].wav" size="18347996" crc="7831ac83" />
2797      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 16 of 36)[!].wav" size="17642396" crc="2965eea1" />
2798      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 17 of 36)[!].wav" size="35799836" crc="626f9551" />
2799      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 18 of 36)[!].wav" size="33327884" crc="faea78ff" />
2800      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 19 of 36)[!].wav" size="20620028" crc="226e3543" />
2801      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 20 of 36)[!].wav" size="32577596" crc="cd336a92" />
2802      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 21 of 36)[!].wav" size="13408796" crc="fbf0e8b0" />
2803      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 22 of 36)[!].wav" size="18844268" crc="d724f8e1" />
2804      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 23 of 36)[!].wav" size="6251660" crc="1629d445" />
2805      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 24 of 36)[!].wav" size="2022764" crc="691ade9a" />
2806      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 25 of 36)[!].wav" size="6268124" crc="d4922653" />
2807      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 26 of 36)[!].wav" size="44264684" crc="70a2d59d" />
2808      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 27 of 36)[!].wav" size="28899068" crc="77c34d39" />
2809      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 28 of 36)[!].wav" size="8631884" crc="5232737d" />
2810      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 29 of 36)[!].wav" size="5212076" crc="bf31ae7b" />
2811      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 30 of 36)[!].wav" size="3972572" crc="38e520d9" />
2812      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 31 of 36)[!].wav" size="18712556" crc="0bb4f92d" />
2813      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 32 of 36)[!].wav" size="20149628" crc="c253005b" />
2814      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 33 of 36)[!].wav" size="9389228" crc="1f40d0ec" />
2815      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 34 of 36)[!].wav" size="6656204" crc="d31156ff" />
2816      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 35 of 36)[!].wav" size="23153132" crc="88953ed9" />
2817      <rom name="Alshark (1993)(Polydor K.K.)(NTSC)(JP)(Track 36 of 36)[!].wav" size="6199916" crc="b2bb6c5a" />
2818      -->
28191015      <description>Alshark (Jpn)</description>
28201016      <year>1993</year>
28211017      <publisher>Polydor K.K.</publisher>
r242703r242704
28301026   </software>
28311027
28321028   <software name="anettfut">
2833      <!-- source toseciso
2834      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)[!].cue" size="4562" crc="e29146cb" />
2835      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 01 of 31)[!].iso" size="31488000" crc="ed405f82" />
2836      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 02 of 31)[!].wav" size="2109788" crc="a062e6a3" />
2837      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 03 of 31)[!].wav" size="3429260" crc="b31535da" />
2838      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 04 of 31)[!].wav" size="33671276" crc="38d3861a" />
2839      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 05 of 31)[!].wav" size="35588156" crc="881752c8" />
2840      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 06 of 31)[!].wav" size="33443132" crc="84b0b91d" />
2841      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 07 of 31)[!].wav" size="40557932" crc="3cd241e7" />
2842      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 08 of 31)[!].wav" size="38589308" crc="6151ac68" />
2843      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 09 of 31)[!].wav" size="38831564" crc="9ca83770" />
2844      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 10 of 31)[!].wav" size="40819004" crc="bfff5794" />
2845      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 11 of 31)[!].wav" size="39791180" crc="af1f0b20" />
2846      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 12 of 31)[!].wav" size="11183804" crc="890dad36" />
2847      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 13 of 31)[!].wav" size="10099532" crc="755139f8" />
2848      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 14 of 31)[!].wav" size="18971276" crc="9df9c708" />
2849      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 15 of 31)[!].wav" size="5889452" crc="0a9de611" />
2850      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 16 of 31)[!].wav" size="9885500" crc="06cdde0e" />
2851      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 17 of 31)[!].wav" size="4835756" crc="41a682bb" />
2852      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 18 of 31)[!].wav" size="14631836" crc="83591bfc" />
2853      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 19 of 31)[!].wav" size="7865132" crc="3027d451" />
2854      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 20 of 31)[!].wav" size="22153532" crc="5a88360a" />
2855      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 21 of 31)[!].wav" size="14128508" crc="5c8bd300" />
2856      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 22 of 31)[!].wav" size="12646748" crc="54189e3a" />
2857      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 23 of 31)[!].wav" size="13086572" crc="88cd8b70" />
2858      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 24 of 31)[!].wav" size="12889004" crc="1a59a46f" />
2859      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 25 of 31)[!].wav" size="19655708" crc="d7e518c3" />
2860      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 26 of 31)[!].wav" size="6383372" crc="7e611776" />
2861      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 27 of 31)[!].wav" size="12562076" crc="dc83c470" />
2862      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 28 of 31)[!].wav" size="5108588" crc="c1b84af4" />
2863      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 29 of 31)[!].wav" size="16576940" crc="f02267a3" />
2864      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 30 of 31)[!].wav" size="11106188" crc="be77203b" />
2865      <rom name="Anett Futatabi (1993)(Wolf Team)(NTSC)(JP)(en)(Track 31 of 31)[!].wav" size="29851628" crc="20d88302" />
2866      -->
28671029      <description>Anett Futatabi (Jpn)</description>
28681030      <year>1993</year>
28691031      <publisher>Wolf Team</publisher>
r242703r242704
28781040   </software>
28791041
28801042   <software name="genchohi">
2881      <!-- source toseciso
2882      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)[!].cue" size="15215" crc="661532e9" />
2883      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 01 of 90)[!].iso" size="9979904" crc="35729e14" />
2884      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 02 of 90)[!].wav" size="707996" crc="70c1fce2" />
2885      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 03 of 90)[!].wav" size="1131356" crc="af56a087" />
2886      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 04 of 90)[!].wav" size="1253660" crc="63c83748" />
2887      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 05 of 90)[!].wav" size="1060796" crc="f4adc14f" />
2888      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 06 of 90)[!].wav" size="1060796" crc="5c37d95e" />
2889      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 07 of 90)[!].wav" size="1138412" crc="a4a03662" />
2890      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 08 of 90)[!].wav" size="1213676" crc="5b3caa7b" />
2891      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 09 of 90)[!].wav" size="1060796" crc="f5c3c9ae" />
2892      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 10 of 90)[!].wav" size="1060796" crc="26a7373f" />
2893      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 11 of 90)[!].wav" size="1378316" crc="3ebb0f83" />
2894      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 12 of 90)[!].wav" size="1060796" crc="719670d0" />
2895      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 13 of 90)[!].wav" size="1100780" crc="5dc25fd7" />
2896      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 14 of 90)[!].wav" size="1390076" crc="e2dd8b1e" />
2897      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 15 of 90)[!].wav" size="1084316" crc="58b1c5b5" />
2898      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 16 of 90)[!].wav" size="1072556" crc="e365cb05" />
2899      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 17 of 90)[!].wav" size="1154876" crc="f69c9417" />
2900      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 18 of 90)[!].wav" size="1171340" crc="46bae66e" />
2901      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 19 of 90)[!].wav" size="1105484" crc="90b599e5" />
2902      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 20 of 90)[!].wav" size="1180748" crc="e32ec47a" />
2903      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 21 of 90)[!].wav" size="1364204" crc="d3788573" />
2904      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 22 of 90)[!].wav" size="1274828" crc="b69da38e" />
2905      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 23 of 90)[!].wav" size="1295996" crc="2c722244" />
2906      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 24 of 90)[!].wav" size="1086668" crc="696dacee" />
2907      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 25 of 90)[!].wav" size="1267772" crc="06870885" />
2908      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 26 of 90)[!].wav" size="1100780" crc="4b1a14e5" />
2909      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 27 of 90)[!].wav" size="1263068" crc="6b7d2300" />
2910      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 28 of 90)[!].wav" size="1089020" crc="1e566b6b" />
2911      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 29 of 90)[!].wav" size="1103132" crc="8f390277" />
2912      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 30 of 90)[!].wav" size="1161932" crc="a3fa496b" />
2913      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 31 of 90)[!].wav" size="1065500" crc="fec5c2b5" />
2914      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 32 of 90)[!].wav" size="1206620" crc="48fc8f59" />
2915      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 33 of 90)[!].wav" size="1060796" crc="14948052" />
2916      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 34 of 90)[!].wav" size="1063148" crc="3fa20475" />
2917      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 35 of 90)[!].wav" size="1060796" crc="bbcc4ec9" />
2918      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 36 of 90)[!].wav" size="1060796" crc="2ebbfa61" />
2919      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 37 of 90)[!].wav" size="1331276" crc="a7e0fca8" />
2920      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 38 of 90)[!].wav" size="1425356" crc="56a2b589" />
2921      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 39 of 90)[!].wav" size="1060796" crc="a0ee920a" />
2922      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 40 of 90)[!].wav" size="1225436" crc="24d44f0b" />
2923      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 41 of 90)[!].wav" size="1510028" crc="6b610d59" />
2924      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 42 of 90)[!].wav" size="1060796" crc="47c5e3dc" />
2925      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 43 of 90)[!].wav" size="1248956" crc="79b8d588" />
2926      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 44 of 90)[!].wav" size="1453580" crc="fa60e0c5" />
2927      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 45 of 90)[!].wav" size="1213676" crc="5c4ed94a" />
2928      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 46 of 90)[!].wav" size="1373612" crc="98c10401" />
2929      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 47 of 90)[!].wav" size="1121948" crc="e50809a9" />
2930      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 48 of 90)[!].wav" size="1333628" crc="f9640769" />
2931      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 49 of 90)[!].wav" size="1279532" crc="550d5c31" />
2932      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 50 of 90)[!].wav" size="1227788" crc="aa1a9ee2" />
2933      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 51 of 90)[!].wav" size="1232492" crc="dedf4995" />
2934      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 52 of 90)[!].wav" size="1439468" crc="79aaf7d0" />
2935      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 53 of 90)[!].wav" size="1060796" crc="732eb691" />
2936      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 54 of 90)[!].wav" size="1060796" crc="5852b682" />
2937      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 55 of 90)[!].wav" size="1060796" crc="764cf083" />
2938      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 56 of 90)[!].wav" size="1063148" crc="b2d72397" />
2939      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 57 of 90)[!].wav" size="1060796" crc="c79ba68b" />
2940      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 58 of 90)[!].wav" size="1060796" crc="50b9a767" />
2941      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 59 of 90)[!].wav" size="1465340" crc="2f4b90dc" />
2942      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 60 of 90)[!].wav" size="1430060" crc="c375300b" />
2943      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 61 of 90)[!].wav" size="1385372" crc="31c20a5c" />
2944      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 62 of 90)[!].wav" size="1394780" crc="3ee5ff9c" />
2945      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 63 of 90)[!].wav" size="1201916" crc="9898fcf5" />
2946      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 64 of 90)[!].wav" size="1352444" crc="95862223" />
2947      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 65 of 90)[!].wav" size="1493564" crc="f15ee6dc" />
2948      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 66 of 90)[!].wav" size="1314812" crc="2ac5326f" />
2949      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 67 of 90)[!].wav" size="1561772" crc="2e40af40" />
2950      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 68 of 90)[!].wav" size="1105484" crc="5c395966" />
2951      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 69 of 90)[!].wav" size="1227788" crc="9fa634ac" />
2952      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 70 of 90)[!].wav" size="1220732" crc="2d1bd2b5" />
2953      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 71 of 90)[!].wav" size="1208972" crc="5a448f95" />
2954      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 72 of 90)[!].wav" size="1129004" crc="6effbff2" />
2955      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 73 of 90)[!].wav" size="1425356" crc="abc1fab1" />
2956      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 74 of 90)[!].wav" size="1427708" crc="f317ef1b" />
2957      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 75 of 90)[!].wav" size="1535900" crc="d221a6c7" />
2958      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 76 of 90)[!].wav" size="1060796" crc="c8c55ae5" />
2959      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 77 of 90)[!].wav" size="1223084" crc="f54f9459" />
2960      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 78 of 90)[!].wav" size="1089020" crc="5c98ab46" />
2961      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 79 of 90)[!].wav" size="1143116" crc="1aa20513" />
2962      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 80 of 90)[!].wav" size="1244252" crc="7af43c1c" />
2963      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 81 of 90)[!].wav" size="49900076" crc="b1422adf" />
2964      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 82 of 90)[!].wav" size="42653564" crc="a6b51bcc" />
2965      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 83 of 90)[!].wav" size="43166300" crc="defdd428" />
2966      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 84 of 90)[!].wav" size="47962028" crc="844dcd84" />
2967      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 85 of 90)[!].wav" size="37156940" crc="e1e21678" />
2968      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 86 of 90)[!].wav" size="42825260" crc="b20cf903" />
2969      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 87 of 90)[!].wav" size="49359116" crc="0b878389" />
2970      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 88 of 90)[!].wav" size="36552476" crc="a31fd1f2" />
2971      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 89 of 90)[!].wav" size="66197084" crc="3bc1df1d" />
2972      <rom name="Aoki Ookami to Shiroki Mejika - Genchou Hishi (1993)(KOEI)(NTSC)(JP)(Track 90 of 90)[!].wav" size="55761260" crc="9a097866" />
2973      -->
29741043      <description>Aoki Ookami to Shiroki Mejika - Genchou Hishi (Jpn)</description>
29751044      <year>1993</year>
29761045      <publisher>Koei</publisher>
r242703r242704
29851054   </software>
29861055
29871056   <software name="arcus123">
2988      <!-- source toseciso
2989      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)[!].cue" size="3008" crc="fd6bf655" />
2990      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 01 of 21)[!].iso" size="98013184" crc="8e09a7f5" />
2991      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 02 of 21)[!].wav" size="21492620" crc="8a4f48ea" />
2992      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 03 of 21)[!].wav" size="28503932" crc="b6b572f0" />
2993      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 04 of 21)[!].wav" size="21342092" crc="fc8df78d" />
2994      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 05 of 21)[!].wav" size="22767404" crc="6be30d89" />
2995      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 06 of 21)[!].wav" size="22245260" crc="7f598828" />
2996      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 07 of 21)[!].wav" size="26377724" crc="ad404cb9" />
2997      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 08 of 21)[!].wav" size="7636988" crc="d773797b" />
2998      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 09 of 21)[!].wav" size="14518940" crc="ba160fec" />
2999      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 10 of 21)[!].wav" size="8436668" crc="9f042501" />
3000      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 11 of 21)[!].wav" size="14307260" crc="7dc24418" />
3001      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 12 of 21)[!].wav" size="8065052" crc="f5c9905d" />
3002      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 13 of 21)[!].wav" size="14389580" crc="c0180302" />
3003      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 14 of 21)[!].wav" size="12411548" crc="2d335126" />
3004      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 15 of 21)[!].wav" size="15304508" crc="746d17fd" />
3005      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 16 of 21)[!].wav" size="12609116" crc="a0173076" />
3006      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 17 of 21)[!].wav" size="14359004" crc="8e99ac7b" />
3007      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 18 of 21)[!].wav" size="9643244" crc="abfbb034" />
3008      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 19 of 21)[!].wav" size="14907020" crc="64656b24" />
3009      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 20 of 21)[!].wav" size="20697644" crc="05d83490" />
3010      <rom name="Arcus I-II-III (1993)(Wolf Team)(NTSC)(JP)(Track 21 of 21)[!].wav" size="34466252" crc="a3f5623a" />
3011      -->
30121057      <description>Arcus I-II-III (Jpn)</description>
30131058      <year>1993</year>
30141059      <publisher>Wolf Team</publisher>
r242703r242704
30231068   </software>
30241069
30251070   <software name="arslan">
3026      <!-- source toseciso
3027      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)[!].cue" size="9858" crc="ed8657b6" />
3028      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 01 of 59)[!].iso" size="22022144" crc="79ea9df3" />
3029      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 02 of 59)[!].wav" size="18813692" crc="8f79d49c" />
3030      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 03 of 59)[!].wav" size="15186908" crc="17de52c7" />
3031      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 04 of 59)[!].wav" size="12166940" crc="382a7513" />
3032      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 05 of 59)[!].wav" size="12213980" crc="c5e6ebea" />
3033      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 06 of 59)[!].wav" size="9368060" crc="4780fad6" />
3034      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 07 of 59)[!].wav" size="12557372" crc="3e11ef57" />
3035      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 08 of 59)[!].wav" size="7408844" crc="564f2aa2" />
3036      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 09 of 59)[!].wav" size="9814940" crc="88debb93" />
3037      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 10 of 59)[!].wav" size="9116396" crc="3c6671c9" />
3038      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 11 of 59)[!].wav" size="2396732" crc="7195b1df" />
3039      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 12 of 59)[!].wav" size="14231996" crc="35438587" />
3040      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 13 of 59)[!].wav" size="11381372" crc="ca352b31" />
3041      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 14 of 59)[!].wav" size="11849420" crc="4f718e9c" />
3042      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 15 of 59)[!].wav" size="8556620" crc="ff23788a" />
3043      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 16 of 59)[!].wav" size="5023916" crc="4bc95ad8" />
3044      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 17 of 59)[!].wav" size="4598204" crc="b6a6f5e9" />
3045      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 18 of 59)[!].wav" size="12230444" crc="e64cc01d" />
3046      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 19 of 59)[!].wav" size="5574284" crc="61dfbcee" />
3047      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 20 of 59)[!].wav" size="12390380" crc="92f9f2ab" />
3048      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 21 of 59)[!].wav" size="3212876" crc="9ad6e840" />
3049      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 22 of 59)[!].wav" size="7291244" crc="f898c9c4" />
3050      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 23 of 59)[!].wav" size="4419452" crc="48ad7c43" />
3051      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 24 of 59)[!].wav" size="3259916" crc="5a1b4877" />
3052      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 25 of 59)[!].wav" size="1952204" crc="5f3e737f" />
3053      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 26 of 59)[!].wav" size="2432012" crc="60d75d2b" />
3054      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 27 of 59)[!].wav" size="2831852" crc="45a083ba" />
3055      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 28 of 59)[!].wav" size="3963164" crc="664a2c17" />
3056      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 29 of 59)[!].wav" size="3659756" crc="be27a1b7" />
3057      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 30 of 59)[!].wav" size="13392332" crc="c0aacfa3" />
3058      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 31 of 59)[!].wav" size="10468796" crc="a208cfc7" />
3059      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 32 of 59)[!].wav" size="9097580" crc="2addb65c" />
3060      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 33 of 59)[!].wav" size="9765548" crc="148befd5" />
3061      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 34 of 59)[!].wav" size="4353596" crc="ba83182b" />
3062      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 35 of 59)[!].wav" size="5833004" crc="77ac4559" />
3063      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 36 of 59)[!].wav" size="6397484" crc="7e30bb04" />
3064      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 37 of 59)[!].wav" size="4520588" crc="69e280a8" />
3065      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 38 of 59)[!].wav" size="6747932" crc="9d22bac0" />
3066      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 39 of 59)[!].wav" size="3904364" crc="9af80858" />
3067      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 40 of 59)[!].wav" size="2676620" crc="f8f34e75" />
3068      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 41 of 59)[!].wav" size="15377420" crc="55836a21" />
3069      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 42 of 59)[!].wav" size="8121500" crc="c95e7962" />
3070      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 43 of 59)[!].wav" size="6249308" crc="d332fb03" />
3071      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 44 of 59)[!].wav" size="7328876" crc="248c7e12" />
3072      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 45 of 59)[!].wav" size="12301004" crc="c23d4eb7" />
3073      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 46 of 59)[!].wav" size="11252012" crc="831af70f" />
3074      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 47 of 59)[!].wav" size="9469196" crc="3014ed2d" />
3075      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 48 of 59)[!].wav" size="7914524" crc="90d6afaf" />
3076      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 49 of 59)[!].wav" size="8984684" crc="551cbb9d" />
3077      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 50 of 59)[!].wav" size="8897660" crc="9f92d031" />
3078      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 51 of 59)[!].wav" size="2998844" crc="33923509" />
3079      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 52 of 59)[!].wav" size="4010204" crc="6d32c0b6" />
3080      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 53 of 59)[!].wav" size="6886700" crc="0c8af349" />
3081      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 54 of 59)[!].wav" size="1738172" crc="5054e1fb" />
3082      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 55 of 59)[!].wav" size="5642492" crc="df419be1" />
3083      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 56 of 59)[!].wav" size="6842012" crc="33d9214e" />
3084      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 57 of 59)[!].wav" size="2775404" crc="5569a34b" />
3085      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 58 of 59)[!].wav" size="10066604" crc="5ecd20b6" />
3086      <rom name="Arislan Senki - The Heroic Legend of Arslan (1993)(Sega)(NTSC)(JP)(Track 59 of 59)[!].wav" size="2396732" crc="8f3e097d" />
3087      -->
30881071      <description>Arslan Senki - The Heroic Legend of Arslan (Jpn)</description>
30891072      <year>1993</year>
30901073      <publisher>Sega</publisher>
r242703r242704
30981081      </part>
30991082   </software>
31001083
1084<!--
1085    <software name="ax101">
1086        <description>AX-101 (Jpn)</description>
1087        <year>1994</year>
1088        <publisher>Sega</publisher>
1089        <part name="cdrom" interface="scd_cdrom">
1090            <diskarea name="cdrom">
1091                <disk name="ax-101 (1994)(sega)(ntsc)(jp)[!]" sha1="c3abb77d3ff095fba69cdb257e272a75e12f0ab2"/>
1092            </diskarea>
1093        </part>
1094    </software>
1095-->
1096
31011097   <software name="bakuden">
3102      <!-- source toseciso
3103      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)[!].cue" size="5703" crc="ef0ef485" />
3104      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 01 of 37)[!].iso" size="221941760" crc="c7838993" />
3105      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 02 of 37)[!].wav" size="1305404" crc="042a6abf" />
3106      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 03 of 37)[!].wav" size="1771100" crc="426e0f17" />
3107      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 04 of 37)[!].wav" size="1599404" crc="8ef55eca" />
3108      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 05 of 37)[!].wav" size="1761692" crc="9bd13916" />
3109      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 06 of 37)[!].wav" size="1895756" crc="02d6b523" />
3110      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 07 of 37)[!].wav" size="1827548" crc="59517979" />
3111      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 08 of 37)[!].wav" size="1571180" crc="5a509467" />
3112      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 09 of 37)[!].wav" size="1759340" crc="db2cc8e2" />
3113      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 10 of 37)[!].wav" size="1613516" crc="1a132f1f" />
3114      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 11 of 37)[!].wav" size="1655852" crc="7aaa032e" />
3115      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 12 of 37)[!].wav" size="1674668" crc="e0359f09" />
3116      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 13 of 37)[!].wav" size="1660556" crc="08c7d98d" />
3117      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 14 of 37)[!].wav" size="1589996" crc="2b1de6ff" />
3118      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 15 of 37)[!].wav" size="1662908" crc="c3c934e5" />
3119      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 16 of 37)[!].wav" size="1707596" crc="7e037782" />
3120      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 17 of 37)[!].wav" size="1653500" crc="d98fd529" />
3121      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 18 of 37)[!].wav" size="1773452" crc="60707b6d" />
3122      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 19 of 37)[!].wav" size="1923980" crc="be2272bb" />
3123      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 20 of 37)[!].wav" size="1627628" crc="ca11aa26" />
3124      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 21 of 37)[!].wav" size="1571180" crc="57a20dbb" />
3125      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 22 of 37)[!].wav" size="1740524" crc="c3c635e4" />
3126      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 23 of 37)[!].wav" size="1933388" crc="f5a6e2cb" />
3127      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 24 of 37)[!].wav" size="1789916" crc="288308c6" />
3128      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 25 of 37)[!].wav" size="1759340" crc="e46f072f" />
3129      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 26 of 37)[!].wav" size="1747580" crc="58eb57e5" />
3130      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 27 of 37)[!].wav" size="2100380" crc="966b15dc" />
3131      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 28 of 37)[!].wav" size="9866684" crc="434804e5" />
3132      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 29 of 37)[!].wav" size="14707100" crc="2b47a277" />
3133      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 30 of 37)[!].wav" size="17628284" crc="21a061b2" />
3134      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 31 of 37)[!].wav" size="14758844" crc="9f4eb640" />
3135      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 32 of 37)[!].wav" size="13895660" crc="9cbd0f71" />
3136      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 33 of 37)[!].wav" size="65599676" crc="771806c5" />
3137      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 34 of 37)[!].wav" size="4299500" crc="51eb7785" />
3138      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 35 of 37)[!].wav" size="4689932" crc="28411a7c" />
3139      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 36 of 37)[!].wav" size="10685180" crc="8a30a53f" />
3140      <rom name="Baku-den - The Unbalanced Zone (1994)(Sony)(NTSC)(JP)(Track 37 of 37)[!].wav" size="2780108" crc="bc78ce37" />
3141      -->
31421098      <description>Baku-den - The Unbalanced Zone (Jpn)</description>
31431099      <year>1994</year>
31441100      <publisher>Sony Music Entertainment</publisher>
r242703r242704
31521108      </part>
31531109   </software>
31541110
1111<!--
1112    <software name="bariarm">
1113        <description>Bari-Arm (Jpn)</description>
1114        <year>1993</year>
1115        <publisher>Human Entertainment</publisher>
1116        <part name="cdrom" interface="scd_cdrom">
1117            <diskarea name="cdrom">
1118                <disk name="bari-arm (1993)(human)(ntsc)(jp)(en)[!]" sha1="c87cd03e8e85f9d11d8fc45912cadc10783d9315"/>
1119            </diskarea>
1120        </part>
1121    </software>
1122-->
1123
31551124   <software name="batlfant">
3156      <!-- source toseciso
3157      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)[!].cue" size="6372" crc="a323dd1c" />
3158      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 01 of 45)[!].iso" size="18720768" crc="0e09dfdc" />
3159      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 02 of 45)[!].wav" size="32779868" crc="1b1650df" />
3160      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 03 of 45)[!].wav" size="18950108" crc="e1b3c9ed" />
3161      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 04 of 45)[!].wav" size="21861884" crc="01a57e96" />
3162      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 05 of 45)[!].wav" size="21165692" crc="36e89f60" />
3163      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 06 of 45)[!].wav" size="12197516" crc="8434df82" />
3164      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 07 of 45)[!].wav" size="12435068" crc="f11f3f90" />
3165      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 08 of 45)[!].wav" size="11350796" crc="4cff6475" />
3166      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 09 of 45)[!].wav" size="13759244" crc="6e4af8a9" />
3167      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 10 of 45)[!].wav" size="12350396" crc="4913f368" />
3168      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 11 of 45)[!].wav" size="20323676" crc="f08e34a3" />
3169      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 12 of 45)[!].wav" size="12465644" crc="20b7918a" />
3170      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 13 of 45)[!].wav" size="16868588" crc="badc5d40" />
3171      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 14 of 45)[!].wav" size="21880700" crc="12d4d58f" />
3172      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 15 of 45)[!].wav" size="16675724" crc="18f9a68f" />
3173      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 16 of 45)[!].wav" size="12870188" crc="e23947cc" />
3174      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 17 of 45)[!].wav" size="13542860" crc="4f899090" />
3175      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 18 of 45)[!].wav" size="16581644" crc="2eaacc61" />
3176      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 19 of 45)[!].wav" size="18338588" crc="34293b3e" />
3177      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 20 of 45)[!].wav" size="15170444" crc="1a90c1bf" />
3178      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 21 of 45)[!].wav" size="16934444" crc="b614e992" />
3179      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 22 of 45)[!].wav" size="18343292" crc="38fa5950" />
3180      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 23 of 45)[!].wav" size="18340940" crc="599d6872" />
3181      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 24 of 45)[!].wav" size="28010012" crc="c04a5dc1" />
3182      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 25 of 45)[!].wav" size="12947804" crc="f2611ff7" />
3183      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 26 of 45)[!].wav" size="9076412" crc="c9f05983" />
3184      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 27 of 45)[!].wav" size="5527244" crc="1c37a7d2" />
3185      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 28 of 45)[!].wav" size="8954108" crc="8ab97f72" />
3186      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 29 of 45)[!].wav" size="10090124" crc="9dd01fb1" />
3187      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 30 of 45)[!].wav" size="8354348" crc="2a72228f" />
3188      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 31 of 45)[!].wav" size="11134412" crc="8ee70c7c" />
3189      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 32 of 45)[!].wav" size="12684380" crc="8ca0a46d" />
3190      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 33 of 45)[!].wav" size="9233996" crc="ded5fffc" />
3191      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 34 of 45)[!].wav" size="4459436" crc="83687b58" />
3192      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 35 of 45)[!].wav" size="7549964" crc="f81ddbe3" />
3193      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 36 of 45)[!].wav" size="7789868" crc="4e4b4272" />
3194      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 37 of 45)[!].wav" size="4083116" crc="6beaeb40" />
3195      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 38 of 45)[!].wav" size="3829100" crc="09a1ea36" />
3196      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 39 of 45)[!].wav" size="7401788" crc="1c1348b8" />
3197      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 40 of 45)[!].wav" size="11012108" crc="a549e88f" />
3198      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 41 of 45)[!].wav" size="8954108" crc="f10567b0" />
3199      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 42 of 45)[!].wav" size="4499420" crc="989183c5" />
3200      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 43 of 45)[!].wav" size="3532748" crc="a1ed7104" />
3201      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 44 of 45)[!].wav" size="4595852" crc="223a7eed" />
3202      <rom name="Battle Fantasy (1994)(Micronet)(NTSC)(JP)(Track 45 of 45)[!].wav" size="6954908" crc="95a4fc3e" />
3203      -->
32041125      <description>Battle Fantasy (Jpn)</description>
32051126      <year>1994</year>
32061127      <publisher>Micronet</publisher>
r242703r242704
32151136   </software>
32161137
32171138   <software name="btlcorps">
3218      <!-- source toseciso
3219      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)[!].cue" size="8505" crc="0b97a0e4" />
3220      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 01 of 50)[!].iso" size="78995456" crc="b39c40a4" />
3221      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 02 of 50)[!].wav" size="1361852" crc="5f764240" />
3222      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 03 of 50)[!].wav" size="67770572" crc="d345a3c1" />
3223      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 04 of 50)[!].wav" size="52849484" crc="9d1a566b" />
3224      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 05 of 50)[!].wav" size="58155596" crc="388dbca3" />
3225      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 06 of 50)[!].wav" size="55862396" crc="5179137a" />
3226      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 07 of 50)[!].wav" size="69647468" crc="b8f6876a" />
3227      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 08 of 50)[!].wav" size="44394044" crc="233e4c3d" />
3228      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 09 of 50)[!].wav" size="5562524" crc="64e8c165" />
3229      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 10 of 50)[!].wav" size="4313612" crc="3e48fc4d" />
3230      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 11 of 50)[!].wav" size="5301452" crc="5c3d9547" />
3231      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 12 of 50)[!].wav" size="5411996" crc="abe4a60a" />
3232      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 13 of 50)[!].wav" size="5362604" crc="4f228aa6" />
3233      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 14 of 50)[!].wav" size="4854572" crc="199e939f" />
3234      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 15 of 50)[!].wav" size="5289692" crc="4924b75b" />
3235      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 16 of 50)[!].wav" size="6089372" crc="fee64860" />
3236      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 17 of 50)[!].wav" size="4179548" crc="81f0fbe7" />
3237      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 18 of 50)[!].wav" size="4243052" crc="ea24b144" />
3238      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 19 of 50)[!].wav" size="3673868" crc="efdabe19" />
3239      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 20 of 50)[!].wav" size="5146220" crc="0d266573" />
3240      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 21 of 50)[!].wav" size="3723260" crc="b2741f63" />
3241      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 22 of 50)[!].wav" size="4551164" crc="65bf6e84" />
3242      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 23 of 50)[!].wav" size="3793820" crc="c8ec78f7" />
3243      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 24 of 50)[!].wav" size="4388876" crc="6950707e" />
3244      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 25 of 50)[!].wav" size="4205420" crc="407324a2" />
3245      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 26 of 50)[!].wav" size="4330076" crc="c4635387" />
3246      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 27 of 50)[!].wav" size="4106636" crc="1aacf9f9" />
3247      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 28 of 50)[!].wav" size="3909068" crc="7007a566" />
3248      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 29 of 50)[!].wav" size="5284988" crc="f6777596" />
3249      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 30 of 50)[!].wav" size="3170540" crc="62eb4d1b" />
3250      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 31 of 50)[!].wav" size="4026668" crc="d3984a59" />
3251      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 32 of 50)[!].wav" size="3139964" crc="37a5f9ec" />
3252      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 33 of 50)[!].wav" size="3852620" crc="1f1c4fe7" />
3253      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 34 of 50)[!].wav" size="3224636" crc="c70b1a86" />
3254      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 35 of 50)[!].wav" size="4652300" crc="71ca169d" />
3255      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 36 of 50)[!].wav" size="4007852" crc="7b41a3ff" />
3256      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 37 of 50)[!].wav" size="4431212" crc="d027c129" />
3257      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 38 of 50)[!].wav" size="3817340" crc="8e6603d6" />
3258      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 39 of 50)[!].wav" size="3798524" crc="dd54acd6" />
3259      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 40 of 50)[!].wav" size="3775004" crc="e39e6047" />
3260      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 41 of 50)[!].wav" size="4261868" crc="96c533a2" />
3261      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 42 of 50)[!].wav" size="3775004" crc="1ff1bec9" />
3262      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 43 of 50)[!].wav" size="3448076" crc="ffe57a3b" />
3263      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 44 of 50)[!].wav" size="3332828" crc="7bc3133f" />
3264      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 45 of 50)[!].wav" size="2718956" crc="90753daa" />
3265      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 46 of 50)[!].wav" size="3967868" crc="94f72192" />
3266      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 47 of 50)[!].wav" size="3365756" crc="4df649a7" />
3267      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 48 of 50)[!].wav" size="2420252" crc="5dfdd7a8" />
3268      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 49 of 50)[!].wav" size="2269724" crc="dddff7ce" />
3269      <rom name="Battlecorps - 3D Mechanical Battle Simulator (1994)(Victor)(NTSC)(JP)(Track 50 of 50)[!].wav" size="2577836" crc="7e1015ba" />
3270      -->
32711139      <description>Battlecorps - 3D Mechanical Battle Simulator (Jpn)</description>
32721140      <year>1994</year>
32731141      <publisher>Victor Entertainment</publisher>
r242703r242704
32821150   </software>
32831151
32841152   <software name="blckhole">
3285      <!-- source toseciso
3286      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)[!].cue" size="3363" crc="8739246c" />
3287      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 01 of 23)[!].iso" size="12238848" crc="ae2463cc" />
3288      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 02 of 23)[!].wav" size="14737676" crc="2dc5d88e" />
3289      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 03 of 23)[!].wav" size="30820652" crc="475aa1eb" />
3290      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 04 of 23)[!].wav" size="16268828" crc="de8324e3" />
3291      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 05 of 23)[!].wav" size="17522444" crc="70fea127" />
3292      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 06 of 23)[!].wav" size="20819948" crc="2d5a4574" />
3293      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 07 of 23)[!].wav" size="29901020" crc="cef3d776" />
3294      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 08 of 23)[!].wav" size="20958716" crc="d298e832" />
3295      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 09 of 23)[!].wav" size="23536508" crc="5f35f568" />
3296      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 10 of 23)[!].wav" size="26081372" crc="c9d1873a" />
3297      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 11 of 23)[!].wav" size="18926588" crc="87b2a798" />
3298      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 12 of 23)[!].wav" size="13596956" crc="c4c0e65d" />
3299      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 13 of 23)[!].wav" size="15817244" crc="df2810f6" />
3300      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 14 of 23)[!].wav" size="23750540" crc="c1fa3c35" />
3301      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 15 of 23)[!].wav" size="10997996" crc="d9e98724" />
3302      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 16 of 23)[!].wav" size="48190172" crc="106aa8d4" />
3303      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 17 of 23)[!].wav" size="5981180" crc="1902b782" />
3304      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 18 of 23)[!].wav" size="19121804" crc="2fc0da66" />
3305      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 19 of 23)[!].wav" size="42867596" crc="eaaf4ff4" />
3306      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 20 of 23)[!].wav" size="34746140" crc="fa6c01de" />
3307      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 21 of 23)[!].wav" size="21584348" crc="528444bf" />
3308      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 22 of 23)[!].wav" size="35270636" crc="5f096446" />
3309      <rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 23 of 23)[!].wav" size="33944108" crc="2cf923dd" />
3310      -->
33111153      <description>Black Hole Assault (Jpn)</description>
33121154      <year>1992</year>
33131155      <publisher>Micronet</publisher>
r242703r242704
33211163      </part>
33221164   </software>
33231165
1166<!--
1167    <software name="burai">
1168        <description>Burai - Hachigyoku no Yuushi Densetsu (Jpn)</description>
1169        <year>1992</year>
1170        <publisher>Sega</publisher>
1171        <part name="cdrom" interface="scd_cdrom">
1172            <diskarea name="cdrom">
1173                <disk name="burai - hachigyoku no yuushi densetsu (1992)(sega)(ntsc)(jp)[!]" sha1="5861ee548c48c798d037dbe16e5a6e6d75813abb"/>
1174            </diskarea>
1175        </part>
1176    </software>
1177-->
1178
1179<!--
1180    <software name="quiztono">
1181        <description>Capcom no Quiz - Tono-sama no Yabou (Jpn)</description>
1182        <year>1992</year>
1183        <publisher>SIMS</publisher>
1184        <part name="cdrom" interface="scd_cdrom">
1185            <diskarea name="cdrom">
1186                <disk name="capcom no quiz - tono-sama no yabou (1992)(sims)(ntsc)(jp)[!]" sha1="96b58dc32142938623129f0c651491738ce45fc1"/>
1187            </diskarea>
1188        </part>
1189    </software>
1190-->
1191
33241192   <software name="ctsuba">
3325      <!-- source toseciso
3326      <rom name="Captain Tsubasa (1994)(Tecmo)(NTSC)(JP)[!].cue" size="419" crc="ebd3f49a" />
3327      <rom name="Captain Tsubasa (1994)(Tecmo)(NTSC)(JP)(Track 1 of 3)[!].iso" size="151955456" crc="28305efd" />
3328      <rom name="Captain Tsubasa (1994)(Tecmo)(NTSC)(JP)(Track 2 of 3)[!].wav" size="17943452" crc="9c1e5da1" />
3329      <rom name="Captain Tsubasa (1994)(Tecmo)(NTSC)(JP)(Track 3 of 3)[!].wav" size="24726620" crc="8e904660" />
3330      -->
33311193      <description>Captain Tsubasa (Jpn)</description>
33321194      <year>1994</year>
33331195      <publisher>Tecmo</publisher>
r242703r242704
33411203      </part>
33421204   </software>
33431205
1206<!--
1207    <software name="cfstory">
1208        <description>Cosmic Fantasy Stories (Jpn)</description>
1209        <year>1992</year>
1210        <publisher>Nihon Telenet</publisher>
1211        <part name="cdrom" interface="scd_cdrom">
1212            <diskarea name="cdrom">
1213                <disk name="cosmic fantasy stories (1992)(riot)(ntsc)(jp)[!]" sha1="aaff08feeab0a70ab7cbe775a03101587b5dd1b7"/>
1214            </diskarea>
1215        </part>
1216    </software>
1217-->
1218
1219<!--
1220    <software name="cyb009">
1221        <description>Cyborg 009 (Jpn)</description>
1222        <year>1993</year>
1223        <publisher>Nihon Telenet</publisher>
1224        <part name="cdrom" interface="scd_cdrom">
1225            <diskarea name="cdrom">
1226                <disk name="cyborg 009 (1993)(riot)(ntsc)(jp)[!]" sha1="c23be6afea4ae9883de6e2c39c6a904aeeb4458b"/>
1227            </diskarea>
1228        </part>
1229    </software>
1230-->
1231
33441232   <software name="daihoush">
3345      <!-- source toseciso
3346      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)[!].cue" size="827" crc="a4140523" />
3347      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 1 of 6)[!].iso" size="336377856" crc="76de0bb7" />
3348      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 2 of 6)[!].wav" size="20231948" crc="79e10684" />
3349      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 3 of 6)[!].wav" size="4548812" crc="371dafce" />
3350      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 4 of 6)[!].wav" size="3187004" crc="d5d65cf4" />
3351      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 5 of 6)[!].wav" size="26507084" crc="87aba968" />
3352      <rom name="Daihoushinden (1995)(Victor)(NTSC)(JP)(Track 6 of 6)[!].wav" size="1237196" crc="3644f956" />
3353      -->
33541233      <description>Daihoushinden (Jpn)</description>
33551234      <year>1995</year>
33561235      <publisher>Victor Entertainment</publisher>
r242703r242704
33651244   </software>
33661245
33671246   <software name="darkwiz">
3368      <!-- source toseciso
3369      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)[!].cue" size="2009" crc="f04f9d8d" />
3370      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 01 of 12)[!].iso" size="360058880" crc="29a2ec0c" />
3371      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 02 of 12)[!].wav" size="15092828" crc="a1310c38" />
3372      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 03 of 12)[!].wav" size="12371564" crc="e8fce984" />
3373      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 04 of 12)[!].wav" size="14664764" crc="78a5e16d" />
3374      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 05 of 12)[!].wav" size="17701196" crc="c15ad36c" />
3375      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 06 of 12)[!].wav" size="18202172" crc="005967ec" />
3376      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 07 of 12)[!].wav" size="9812588" crc="5da4ed9a" />
3377      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 08 of 12)[!].wav" size="11574236" crc="36383e5f" />
3378      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 09 of 12)[!].wav" size="13505228" crc="9d403cf2" />
3379      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 10 of 12)[!].wav" size="13608716" crc="403603f0" />
3380      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 11 of 12)[!].wav" size="16972076" crc="5883fffb" />
3381      <rom name="Dark Wizard - Yomigaeri Shiyami no Madoushi (1993)(Sega)(NTSC)(JP)(Track 12 of 12)[!].wav" size="46593164" crc="b505c38c" />
3382      -->
33831247      <description>Dark Wizard - Yomigaeri Shiyami no Madoushi (Jpn)</description>
33841248      <year>1993</year>
33851249      <publisher>Sega</publisher>
r242703r242704
33941258   </software>
33951259
33961260   <software name="deathbrn">
3397      <!-- source toseciso
3398      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)[!].cue" size="2539" crc="bfe0cdad" />
3399      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 01 of 14)[!].iso" size="33028096" crc="0c5673d5" />
3400      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 02 of 14)[!].wav" size="39523052" crc="756bf4de" />
3401      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 03 of 14)[!].wav" size="19521644" crc="2f98f5bd" />
3402      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 04 of 14)[!].wav" size="7606412" crc="50f8e956" />
3403      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 05 of 14)[!].wav" size="12999548" crc="4284e70d" />
3404      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 06 of 14)[!].wav" size="11115596" crc="903512c5" />
3405      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 07 of 14)[!].wav" size="2864780" crc="f3f6e3d5" />
3406      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 08 of 14)[!].wav" size="12348044" crc="bed5a299" />
3407      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 09 of 14)[!].wav" size="27546668" crc="38033cf7" />
3408      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 10 of 14)[!].wav" size="10459388" crc="7f8cb09c" />
3409      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 11 of 14)[!].wav" size="1495916" crc="4efd0078" />
3410      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 12 of 14)[!].wav" size="1441820" crc="3c7edd95" />
3411      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 13 of 14)[!].wav" size="1512380" crc="96431d34" />
3412      <rom name="Death Bringer - Himerata Monshou - The Knight of Darkness (1992)(Riot)(NTSC)(JP)(Track 14 of 14)[!].wav" size="1361852" crc="71311dac" />
3413      -->
34141261      <description>Death Bringer - Himerata Monshou - The Knight of Darkness (Jpn)</description>
34151262      <year>1992</year>
34161263      <publisher>Nihon Telenet</publisher>
r242703r242704
34241271      </part>
34251272   </software>
34261273
3427   <software name="illcity">
3428      <!-- source toseciso
3429      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)[!][T-51014P-00066-R2M].cue" size="1785" crc="e3face0f" />
3430      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 01 of 10)[!][T-51014P-00066-R2M].iso" size="16060416" crc="f7d742d0" />
3431      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 02 of 10)[!][T-51014P-00066-R2M].wav" size="29498828" crc="9bd1a4d1" />
3432      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 03 of 10)[!][T-51014P-00066-R2M].wav" size="27532556" crc="ab515c95" />
3433      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 04 of 10)[!][T-51014P-00066-R2M].wav" size="23496524" crc="acf7305f" />
3434      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 05 of 10)[!][T-51014P-00066-R2M].wav" size="38822156" crc="2390e5b8" />
3435      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 06 of 10)[!][T-51014P-00066-R2M].wav" size="39755900" crc="825da231" />
3436      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 07 of 10)[!][T-51014P-00066-R2M].wav" size="43062812" crc="a4c2925b" />
3437      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 08 of 10)[!][T-51014P-00066-R2M].wav" size="43316828" crc="b6c66034" />
3438      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 09 of 10)[!][T-51014P-00066-R2M].wav" size="45022028" crc="6a0765aa" />
3439      <rom name="Denei Toshi - Illusion City (1993)(Micro Cabin)(NTSC)(JP)(Track 10 of 10)[!][T-51014P-00066-R2M].wav" size="56146988" crc="02d23f50" />
3440      -->
3441      <description>Illusion City - Genei Toshi (Jpn)</description>
1274   <software name="deneitos">
1275      <!-- Diskring: T-51014P-00066-R2M -->
1276      <description>Denei Toshi - Illusion City (Jpn)</description>
34421277      <year>1993</year>
34431278      <publisher>Micro Cabin</publisher>
34441279      <info name="serial" value="T-51014"/>
3445      <info name="disk_ring" value="T-51014P-00066-R2M"/>
34461280      <info name="release" value="19930528"/>
34471281      <info name="alt_title" value="幻影都市 -ILLUSION CITY-"/>
34481282      <part name="cdrom" interface="scd_cdrom">
r242703r242704
34521286      </part>
34531287   </software>
34541288
1289<!--
1290    <software name="dennin">
1291        <description>Dennin-Aleste - Nobunaga and his Ninja Force (Jpn)</description>
1292        <year>1992</year>
1293        <publisher>Compile</publisher>
1294        <part name="cdrom" interface="scd_cdrom">
1295            <diskarea name="cdrom">
1296                <disk name="dennin-aleste - nobunaga and his ninja force (1992)(compile)(ntsc)(jp)[!]" sha1="526f4b25f304b7b1b3d0de034a4b4b6fb74aefe5"/>
1297            </diskarea>
1298        </part>
1299    </software>
1300-->
1301
1302<!--
1303    <software name="detonat">
1304        <description>Detonator Orgun (Jpn)</description>
1305        <year>1992</year>
1306        <publisher>Hot-B</publisher>
1307        <part name="cdrom" interface="scd_cdrom">
1308            <diskarea name="cdrom">
1309                <disk name="detonator orgun (1992)(hot-b)(ntsc)(jp)[!]" sha1="a859acb522e0972182a09165ef63fe31efe306a2"/>
1310            </diskarea>
1311        </part>
1312    </software>
1313-->
1314
1315<!--
1316    <software name="devastat">
1317        <description>Devastator (Jpn)</description>
1318        <year>1993</year>
1319        <publisher>Wolf Team</publisher>
1320        <part name="cdrom" interface="scd_cdrom">
1321            <diskarea name="cdrom">
1322                <disk name="devastator (1993)(wolf team)(ntsc)(jp)[!]" sha1="d56ceea7790114e15644e2a892162b5bba338ac0"/>
1323            </diskarea>
1324        </part>
1325    </software>
1326-->
1327
34551328   <software name="dblswtch">
3456      <!-- source toseciso
3457      <rom name="Double Switch (1995)(Sega)(NTSC)(JP)[!].cue" size="275" crc="19630e5f" />
3458      <rom name="Double Switch (1995)(Sega)(NTSC)(JP)(Track 1 of 2)[!].iso" size="550866944" crc="165736de" />
3459      <rom name="Double Switch (1995)(Sega)(NTSC)(JP)(Track 2 of 2)[!].wav" size="1528844" crc="409d75fa" />
3460      -->
34611329      <description>Double Switch (Jpn)</description>
34621330      <year>1995</year>
34631331      <publisher>Sega</publisher>
r242703r242704
34711339      </part>
34721340   </software>
34731341
1342<!--
1343    <software name="dlair">
1344        <description>Dragon's Lair (Jpn)</description>
1345        <year>1993</year>
1346        <publisher>Sega</publisher>
1347        <part name="cdrom" interface="scd_cdrom">
1348            <diskarea name="cdrom">
1349                <disk name="dragon's lair (1993)(sega)(ntsc)(jp)(m5)[!]" sha1="b0f5182af9d538226e8949bd2657e91dfce3f660"/>
1350            </diskarea>
1351        </part>
1352    </software>
1353-->
1354
34741355   <software name="dngmstr2">
3475      <!-- source toseciso
3476      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)[!].cue" size="1111" crc="09079f1b" />
3477      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 1 of 7)[!].iso" size="11874304" crc="dff4905d" />
3478      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 2 of 7)[!].wav" size="32236556" crc="54c5d52d" />
3479      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 3 of 7)[!].wav" size="43373276" crc="b379aaa9" />
3480      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 4 of 7)[!].wav" size="16172396" crc="79c832df" />
3481      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 5 of 7)[!].wav" size="21283292" crc="6f86bb53" />
3482      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 6 of 7)[!].wav" size="51689948" crc="a9380c6b" />
3483      <rom name="Dungeon Master II - Skullkeep v1.0 (1994)(Victor)(NTSC)(JP)(Track 7 of 7)[!].wav" size="2940044" crc="aeadf2f5" />
3484      -->
34851356      <description>Dungeon Master II - Skullkeep (Jpn, v1.0)</description>
34861357      <year>1994</year>
34871358      <publisher>Victor Entertainment</publisher>
r242703r242704
34951366      </part>
34961367   </software>
34971368
1369<!--
1370    <software name="dynamicc">
1371        <description>Dynamic Country Club - 3D Golf Simulation (Jpn)</description>
1372        <year>1993</year>
1373        <publisher>Sega</publisher>
1374        <part name="cdrom" interface="scd_cdrom">
1375            <diskarea name="cdrom">
1376                <disk name="dynamic country club - 3d golf simulation (1993)(sega)(ntsc)(jp)[!]" sha1="883a0bbc0f29b302d43d124e2ebff4c518c14e3f"/>
1377            </diskarea>
1378        </part>
1379    </software>
1380-->
1381
1382<!--
1383    <software name="earnest">
1384        <description>Earnest Evans (Jpn)</description>
1385        <year>1991</year>
1386        <publisher>Wolf Team</publisher>
1387        <part name="cdrom" interface="scd_cdrom">
1388            <diskarea name="cdrom">
1389                <disk name="earnest evans (1991)(wolf team)(ntsc)(jp)(en)[!]" sha1="058449e89ee928f912014e6db6156370f6665526"/>
1390            </diskarea>
1391        </part>
1392    </software>
1393-->
1394
34981395   <!-- these are standalone discs, even if they were part of a single package -->
34991396   <software name="ecco">
3500      <!-- source toseciso
3501      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)[!][Ecco the Dolphin].cue" size="2789" crc="bcb8fae9" />
3502      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 01 of 16)[!][Ecco the Dolphin].iso" size="51910656" crc="b83895f7" />
3503      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 02 of 16)[!][Ecco the Dolphin].wav" size="48423020" crc="53c68ad2" />
3504      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 03 of 16)[!][Ecco the Dolphin].wav" size="43323884" crc="ca2ef58b" />
3505      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 04 of 16)[!][Ecco the Dolphin].wav" size="37653212" crc="32683fa6" />
3506      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 05 of 16)[!][Ecco the Dolphin].wav" size="65731388" crc="bfbabc75" />
3507      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 06 of 16)[!][Ecco the Dolphin].wav" size="57631100" crc="f7f0b595" />
3508      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 07 of 16)[!][Ecco the Dolphin].wav" size="59905484" crc="e1ed3600" />
3509      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 08 of 16)[!][Ecco the Dolphin].wav" size="37333340" crc="a1223006" />
3510      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 09 of 16)[!][Ecco the Dolphin].wav" size="10816892" crc="d530716a" />
3511      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 10 of 16)[!][Ecco the Dolphin].wav" size="20737628" crc="451ea626" />
3512      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 11 of 16)[!][Ecco the Dolphin].wav" size="36477212" crc="34b7e382" />
3513      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 12 of 16)[!][Ecco the Dolphin].wav" size="10812188" crc="61c7ec3f" />
3514      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 13 of 16)[!][Ecco the Dolphin].wav" size="37547372" crc="65122733" />
3515      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 14 of 16)[!][Ecco the Dolphin].wav" size="37476812" crc="a0d05736" />
3516      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 15 of 16)[!][Ecco the Dolphin].wav" size="59016428" crc="91778a50" />
3517      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 16 of 16)[!][Ecco the Dolphin].wav" size="40350956" crc="4c9dcf9a" />
3518      -->
35191397      <description>Ecco the Dolphin CD (Jpn, Disc 1 - Ecco the Dolphin)</description>
35201398      <year>1995</year>
35211399      <publisher>Sega</publisher>
r242703r242704
35301408   </software>
35311409
35321410   <software name="ecco2">
3533      <!-- source toseciso
3534      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)[!][Ecco the Dolphin II].cue" size="3014" crc="6e907051" />
3535      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 01 of 17)[!][Ecco the Dolphin II].iso" size="131043328" crc="c34475f0" />
3536      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 02 of 17)[!][Ecco the Dolphin II].wav" size="50005916" crc="4a8c1687" />
3537      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 03 of 17)[!][Ecco the Dolphin II].wav" size="48622940" crc="bc438d4e" />
3538      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 04 of 17)[!][Ecco the Dolphin II].wav" size="40393292" crc="7acfc255" />
3539      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 05 of 17)[!][Ecco the Dolphin II].wav" size="39744140" crc="f823c375" />
3540      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 06 of 17)[!][Ecco the Dolphin II].wav" size="37415660" crc="cb2a3d5b" />
3541      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 07 of 17)[!][Ecco the Dolphin II].wav" size="37248668" crc="23e12f0b" />
3542      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 08 of 17)[!][Ecco the Dolphin II].wav" size="35755148" crc="0a8a88af" />
3543      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 09 of 17)[!][Ecco the Dolphin II].wav" size="34986044" crc="7b778aad" />
3544      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 10 of 17)[!][Ecco the Dolphin II].wav" size="30253820" crc="2969b127" />
3545      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 11 of 17)[!][Ecco the Dolphin II].wav" size="29595260" crc="32101179" />
3546      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 12 of 17)[!][Ecco the Dolphin II].wav" size="28913180" crc="f5e5a1b4" />
3547      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 13 of 17)[!][Ecco the Dolphin II].wav" size="23910476" crc="6816f61f" />
3548      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 14 of 17)[!][Ecco the Dolphin II].wav" size="15596156" crc="7907bc58" />
3549      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 15 of 17)[!][Ecco the Dolphin II].wav" size="4438268" crc="2ec7620f" />
3550      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 16 of 17)[!][Ecco the Dolphin II].wav" size="49128620" crc="1b3d0b81" />
3551      <rom name="Ecco the Dolphin CD (1995)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 17 of 17)[!][Ecco the Dolphin II].wav" size="10816892" crc="3e9c92a6" />
3552      -->
35531411      <description>Ecco the Dolphin CD (Jpn, Disc 2 - Ecco the Dolphin II)</description>
35541412      <year>1995</year>
35551413      <publisher>Sega</publisher>
r242703r242704
35631421      </part>
35641422   </software>
35651423
1424<!--
1425    <software name="supleges">
1426        <description>Egawa Sugoru no Super League CD (Jpn)</description>
1427        <year>1993</year>
1428        <publisher>Sega</publisher>
1429        <part name="cdrom" interface="scd_cdrom">
1430            <diskarea name="cdrom">
1431                <disk name="egawa sugoru no super league cd (1993)(sega)(ntsc)(jp)[!]" sha1="1147ed564df0ec4a8ffb5ac70afc0c88b0cfa232"/>
1432            </diskarea>
1433        </part>
1434    </software>
1435-->
1436
35661437   <software name="eyebehol">
3567      <!-- source toseciso
3568      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)[!].cue" size="8405" crc="72d263ee" />
3569      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 01 of 56)[!].iso" size="23156736" crc="02ae16e8" />
3570      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 02 of 56)[!].wav" size="52143884" crc="36938728" />
3571      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 03 of 56)[!].wav" size="32638748" crc="b43c0f80" />
3572      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 04 of 56)[!].wav" size="27132716" crc="eabd6cd0" />
3573      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 05 of 56)[!].wav" size="30437276" crc="2084c504" />
3574      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 06 of 56)[!].wav" size="33203228" crc="2c87caec" />
3575      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 07 of 56)[!].wav" size="35298860" crc="c0091445" />
3576      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 08 of 56)[!].wav" size="29508236" crc="599b16cd" />
3577      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 09 of 56)[!].wav" size="22249964" crc="eeab3ed7" />
3578      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 10 of 56)[!].wav" size="30839468" crc="cbeccef6" />
3579      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 11 of 56)[!].wav" size="10000748" crc="dc8d43e6" />
3580      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 12 of 56)[!].wav" size="20744684" crc="13731c88" />
3581      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 13 of 56)[!].wav" size="1542956" crc="35aa710d" />
3582      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 14 of 56)[!].wav" size="5567228" crc="7475b9b4" />
3583      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 15 of 56)[!].wav" size="3779708" crc="8e9e963b" />
3584      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 16 of 56)[!].wav" size="1759340" crc="49ebb859" />
3585      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 17 of 56)[!].wav" size="3469244" crc="52e3b97d" />
3586      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 18 of 56)[!].wav" size="24500828" crc="8ccf4eaa" />
3587      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 19 of 56)[!].wav" size="1756988" crc="5484a1f5" />
3588      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 20 of 56)[!].wav" size="11825900" crc="5fa8cb54" />
3589      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 21 of 56)[!].wav" size="2048636" crc="0023a007" />
3590      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 22 of 56)[!].wav" size="1733468" crc="807f912b" />
3591      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 23 of 56)[!].wav" size="4638188" crc="92eddf05" />
3592      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 24 of 56)[!].wav" size="1907516" crc="b99ba664" />
3593      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 25 of 56)[!].wav" size="1430060" crc="a7dca13b" />
3594      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 26 of 56)[!].wav" size="2410844" crc="2bed95fd" />
3595      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 27 of 56)[!].wav" size="8817692" crc="4ae3d5e8" />
3596      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 28 of 56)[!].wav" size="25606268" crc="8b0dd2d3" />
3597      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 29 of 56)[!].wav" size="1401836" crc="e0051d02" />
3598      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 30 of 56)[!].wav" size="1404188" crc="b471ebf6" />
3599      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 31 of 56)[!].wav" size="2227388" crc="a787dffc" />
3600      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 32 of 56)[!].wav" size="1383020" crc="7457d37a" />
3601      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 33 of 56)[!].wav" size="2702492" crc="8a00517b" />
3602      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 34 of 56)[!].wav" size="10974476" crc="ceca1109" />
3603      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 35 of 56)[!].wav" size="1665260" crc="b117cb14" />
3604      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 36 of 56)[!].wav" size="4254812" crc="7413ca91" />
3605      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 37 of 56)[!].wav" size="1618220" crc="2fa5bfd3" />
3606      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 38 of 56)[!].wav" size="3419852" crc="578a520b" />
3607      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 39 of 56)[!].wav" size="2754236" crc="a98b006b" />
3608      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 40 of 56)[!].wav" size="6293996" crc="e320c5ac" />
3609      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 41 of 56)[!].wav" size="1681724" crc="d240a740" />
3610      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 42 of 56)[!].wav" size="4014908" crc="176294a1" />
3611      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 43 of 56)[!].wav" size="1411244" crc="395efa74" />
3612      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 44 of 56)[!].wav" size="4901612" crc="7241e425" />
3613      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 45 of 56)[!].wav" size="6070556" crc="ae02fbf0" />
3614      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 46 of 56)[!].wav" size="3803228" crc="0994dc5b" />
3615      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 47 of 56)[!].wav" size="5553116" crc="1d2ec2d7" />
3616      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 48 of 56)[!].wav" size="4179548" crc="bcfa7b59" />
3617      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 49 of 56)[!].wav" size="2013356" crc="264a9fa4" />
3618      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 50 of 56)[!].wav" size="5433164" crc="1dc4882e" />
3619      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 51 of 56)[!].wav" size="5393180" crc="78d313e5" />
3620      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 52 of 56)[!].wav" size="2493164" crc="1e8c91b1" />
3621      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 53 of 56)[!].wav" size="5176796" crc="fb9e5f74" />
3622      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 54 of 56)[!].wav" size="1582940" crc="0dfdafb2" />
3623      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 55 of 56)[!].wav" size="3069404" crc="b20c4c43" />
3624      <rom name="Eye of the Beholder (1994)(Pony Canyon)(NTSC)(JP)(Track 56 of 56)[!].wav" size="3979628" crc="3193d019" />
3625      -->
36261438      <description>Eye of the Beholder (Jpn)</description>
36271439      <year>1994</year>
36281440      <publisher>Pony Canyon</publisher>
r242703r242704
36361448      </part>
36371449   </software>
36381450
1451<!--
1452    <software name="f1circus">
1453        <description>F1 Circus CD (Jpn)</description>
1454        <year>1994</year>
1455        <publisher>Nichibutsu</publisher>
1456        <part name="cdrom" interface="scd_cdrom">
1457            <diskarea name="cdrom">
1458                <disk name="f1 circus cd (1994)(nichibutsu)(ntsc)(jp)[!]" sha1="90acc540aec5ce3ada70c497df4080a7e6a54979"/>
1459            </diskarea>
1460        </part>
1461    </software>
1462-->
1463
36391464   <software name="fahrenhe">
3640      <!-- source toseciso
3641      <rom name="Fahrenheit (1995)(Sega)(NTSC)(JP)[!].cue" size="269" crc="d69de602" />
3642      <rom name="Fahrenheit (1995)(Sega)(NTSC)(JP)(Track 1 of 2)[!].iso" size="516972544" crc="3e54d0fa" />
3643      <rom name="Fahrenheit (1995)(Sega)(NTSC)(JP)(Track 2 of 2)[!].wav" size="1874588" crc="ad809074" />
3644      -->
36451465      <description>Fahrenheit (Jpn)</description>
36461466      <year>1995</year>
36471467      <publisher>Sega</publisher>
r242703r242704
36551475      </part>
36561476   </software>
36571477
1478<!-- Ringcode: G-6013P-00059-R1M -->
1479<!--
1480    <software name="ffightcd">
1481        <description>Final Fight CD (Jpn)</description>
1482        <year>1993</year>
1483        <publisher>Sega</publisher>
1484        <part name="cdrom" interface="scd_cdrom">
1485            <diskarea name="cdrom">
1486                <disk name="final fight cd (1993)(sega)(ntsc)(jp)(en)[!][g-6013p-00059-r1m]" sha1="841a17ed8123097811ebc88629dbe9b21dc673d7"/>
1487            </diskarea>
1488        </part>
1489    </software>
1490-->
1491
1492<!--
1493    <software name="gamjik2">
1494        <description>Gambler Jiko Chuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Jpn)</description>
1495        <year>1992</year>
1496        <publisher>Game Arts</publisher>
1497        <part name="cdrom" interface="scd_cdrom">
1498            <diskarea name="cdrom">
1499                <disk name="gambler jiko chuushinha 2 - gekitou! tokyo mahjongland hen (1992)(game arts)(ntsc)(jp)[!]" sha1="ea06aad113bfe71bd84a7dcca83f9a80254ed8e0"/>
1500            </diskarea>
1501        </part>
1502    </software>
1503-->
1504
1505
1506<!--
1507    <software name="gameno1">
1508        <description>Game no Kanzume - Sega Games Can Vol.1 (Jpn)</description>
1509        <year>1994</year>
1510        <publisher>Sega</publisher>
1511        <part name="cdrom" interface="scd_cdrom">
1512            <diskarea name="cdrom">
1513                <disk name="game no kanzume - sega games can vol.1 (1994)(sega)(ntsc)(jp)[!][compilation]" sha1="36c8b8ce1e24a2c2949121bb112c7d5f89fe24d8"/>
1514            </diskarea>
1515        </part>
1516    </software>
1517-->
1518
1519<!--
1520    <software name="gameno2">
1521        <description>Game no Kanzume - Sega Games Can Vol.2 (Jpn)</description>
1522        <year>1994</year>
1523        <publisher>Sega</publisher>
1524        <part name="cdrom" interface="scd_cdrom">
1525            <diskarea name="cdrom">
1526                <disk name="game no kanzume - sega games can vol.2 (1994)(sega)(ntsc)(jp)[!][compilation]" sha1="992b3373fb17bf2052a2f9a94011a55b3af26880"/>
1527            </diskarea>
1528        </part>
1529    </software>
1530-->
1531
1532<!--
1533    <software name="garoudsp">
1534        <description>Garou Densetsu Special (Jpn)</description>
1535        <year>1995</year>
1536        <publisher>Victor Entertainment</publisher>
1537        <part name="cdrom" interface="scd_cdrom">
1538            <diskarea name="cdrom">
1539                <disk name="garou densetsu special (1995)(victor)(ntsc)(jp)(en)[!]" sha1="c6ed65f8d83b90215da08d657b88a32d304285ac"/>
1540            </diskarea>
1541        </part>
1542    </software>
1543-->
1544
1545<!--
1546    <software name="heavenly">
1547        <description>Heavenly Symphony - Formula One World Championship 1993 (Jpn)</description>
1548        <year>1994</year>
1549        <publisher>Sega</publisher>
1550        <part name="cdrom" interface="scd_cdrom">
1551            <diskarea name="cdrom">
1552                <disk name="heavenly symphony - formula one world championship 1993 (1994)(sega)(ntsc)(jp)[!]" sha1="44f1e992169ff3ab12a2b5a08a0dd9c61b14cc8f"/>
1553            </diskarea>
1554        </part>
1555    </software>
1556-->
1557
1558<!--
1559    <software name="hvynova">
1560        <description>Heavy Nova (Jpn)</description>
1561        <year>1991</year>
1562        <publisher>Micronet</publisher>
1563        <part name="cdrom" interface="scd_cdrom">
1564            <diskarea name="cdrom">
1565                <disk name="heavy nova (1991)(micronet)(ntsc)(jp)(en-ja)[!]" sha1="64193e38f454f4d408f0fe02ff682afee333be30"/>
1566            </diskarea>
1567        </part>
1568    </software>
1569-->
1570
1571<!--
1572    <software name="heimdall">
1573        <description>Heimdall (Jpn)</description>
1574        <year>1994</year>
1575        <publisher>Victor Entertainment</publisher>
1576        <part name="cdrom" interface="scd_cdrom">
1577            <diskarea name="cdrom">
1578                <disk name="heimdall (1994)(victor)(ntsc)(jp)[!]" sha1="98b5689f7d22e519258658f98b6359cbe3a8c430"/>
1579            </diskarea>
1580        </part>
1581    </software>
1582-->
1583
36581584   <software name="3rdww">
3659      <!-- source toseciso
3660      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)[!].cue" size="6813" crc="635412ab" />
3661      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 01 of 46)[!].iso" size="153169920" crc="b9a4c33e" />
3662      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 02 of 46)[!].wav" size="11546012" crc="be43e05e" />
3663      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 03 of 46)[!].wav" size="13935644" crc="7f01af5c" />
3664      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 04 of 46)[!].wav" size="18938348" crc="a31ab8fe" />
3665      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 05 of 46)[!].wav" size="15121052" crc="3d89bfb3" />
3666      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 06 of 46)[!].wav" size="14989340" crc="08aa5edf" />
3667      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 07 of 46)[!].wav" size="15055196" crc="e4217670" />
3668      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 08 of 46)[!].wav" size="11291996" crc="ac8df6ca" />
3669      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 09 of 46)[!].wav" size="18387980" crc="c92331b9" />
3670      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 10 of 46)[!].wav" size="15017564" crc="2993ffe0" />
3671      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 11 of 46)[!].wav" size="21219788" crc="bfd0d885" />
3672      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 12 of 46)[!].wav" size="21636092" crc="ec0955fb" />
3673      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 13 of 46)[!].wav" size="21963020" crc="24d79e74" />
3674      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 14 of 46)[!].wav" size="9685580" crc="a6bbc2d9" />
3675      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 15 of 46)[!].wav" size="16386428" crc="1017c501" />
3676      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 16 of 46)[!].wav" size="10125404" crc="07b52dcf" />
3677      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 17 of 46)[!].wav" size="11002700" crc="82118f02" />
3678      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 18 of 46)[!].wav" size="1326572" crc="3875aed6" />
3679      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 19 of 46)[!].wav" size="1378316" crc="343471e9" />
3680      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 20 of 46)[!].wav" size="1265420" crc="9a3702f3" />
3681      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 21 of 46)[!].wav" size="1319516" crc="168d0335" />
3682      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 22 of 46)[!].wav" size="1187804" crc="5ab6ab61" />
3683      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 23 of 46)[!].wav" size="1291292" crc="863a996e" />
3684      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 24 of 46)[!].wav" size="1441820" crc="a0ee5fc5" />
3685      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 25 of 46)[!].wav" size="1559420" crc="fdab65a3" />
3686      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 26 of 46)[!].wav" size="1277180" crc="acc9cbc2" />
3687      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 27 of 46)[!].wav" size="1256012" crc="798cd3e2" />
3688      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 28 of 46)[!].wav" size="1230140" crc="051dd6ab" />
3689      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 29 of 46)[!].wav" size="1208972" crc="4520ac08" />
3690      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 30 of 46)[!].wav" size="1274828" crc="8039d145" />
3691      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 31 of 46)[!].wav" size="1265420" crc="84c9d202" />
3692      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 32 of 46)[!].wav" size="1277180" crc="96b395ca" />
3693      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 33 of 46)[!].wav" size="1270124" crc="6146eb2d" />
3694      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 34 of 46)[!].wav" size="1303052" crc="50db3854" />
3695      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 35 of 46)[!].wav" size="1295996" crc="4d4be352" />
3696      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 36 of 46)[!].wav" size="1298348" crc="dc7387a9" />
3697      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 37 of 46)[!].wav" size="1284236" crc="e228e169" />
3698      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 38 of 46)[!].wav" size="1286588" crc="31ba13f2" />
3699      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 39 of 46)[!].wav" size="1183100" crc="9cb93b87" />
3700      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 40 of 46)[!].wav" size="1305404" crc="b1185905" />
3701      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 41 of 46)[!].wav" size="1281884" crc="06c700be" />
3702      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 42 of 46)[!].wav" size="1314812" crc="a86b6949" />
3703      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 43 of 46)[!].wav" size="1295996" crc="d824903e" />
3704      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 44 of 46)[!].wav" size="1305404" crc="44385d9a" />
3705      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 45 of 46)[!].wav" size="1844012" crc="919a20c3" />
3706      <rom name="Third World War, The (1993)(Micronet)(NTSC)(Jp)(Track 46 of 46)[!].wav" size="1726412" crc="ccc08967" />
3707      -->
37081585      <description>The IIIrd World War (Jpn)</description>
37091586      <year>1993</year>
37101587      <publisher>Micronet</publisher>
r242703r242704
37191596   </software>
37201597
37211598   <software name="ishiihis">
3722      <!-- source toseciso
3723      <rom name="Ishii Hisaichi no Daisekai (1994)(Sega)(NTSC)(JP)[!].cue" size="301" crc="58302545" />
3724      <rom name="Ishii Hisaichi no Daisekai (1994)(Sega)(NTSC)(JP)(Track 1 of 2)[!].iso" size="7733248" crc="e1f8624a" />
3725      <rom name="Ishii Hisaichi no Daisekai (1994)(Sega)(NTSC)(JP)(Track 2 of 2)[!].wav" size="769148" crc="bd7489e2" />
3726      -->
37271599      <description>Ishii Hisaichi no Daisekai (Jpn)</description>
37281600      <year>1994</year>
37291601      <publisher>Sega</publisher>
r242703r242704
37371609      </part>
37381610   </software>
37391611
1612<!--
1613    <software name="xj220">
1614        <description>Jaguar XJ220 (Jpn)</description>
1615        <year>1993</year>
1616        <publisher>Victor Entertainment</publisher>
1617        <part name="cdrom" interface="scd_cdrom">
1618            <diskarea name="cdrom">
1619                <disk name="jaguar xj220 (1993)(victor)(ntsc)(jp)(en-ja)[!]" sha1="af4c7b196a5530e867befa7f5b1e5fe6aa0abf2d"/>
1620            </diskarea>
1621        </part>
1622    </software>
1623-->
1624
1625<!--
1626    <software name="jangwc">
1627        <description>Jangou World Cup (Jpn)</description>
1628        <year>1993</year>
1629        <publisher>Victor Entertainment</publisher>
1630        <part name="cdrom" interface="scd_cdrom">
1631            <diskarea name="cdrom">
1632                <disk name="jangou world cup (1993)(victor)(ntsc)(jp)[!]" sha1="7b91a3d44698f129bfef7af748dae06302bce927"/>
1633            </diskarea>
1634        </part>
1635    </software>
1636-->
1637
37401638   <software name="jpark">
3741      <!-- source toseciso
3742      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)[!].cue" size="4389" crc="5a0b550d" />
3743      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 01 of 32)[!].iso" size="165844992" crc="a575aebf" />
3744      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 02 of 32)[!].wav" size="11026220" crc="44cc8f41" />
3745      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 03 of 32)[!].wav" size="11291996" crc="539b92ce" />
3746      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 04 of 32)[!].wav" size="10412348" crc="c0a75cb6" />
3747      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 05 of 32)[!].wav" size="1481804" crc="db9ea970" />
3748      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 06 of 32)[!].wav" size="11614220" crc="0dcefc29" />
3749      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 07 of 32)[!].wav" size="10976828" crc="9352ae43" />
3750      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 08 of 32)[!].wav" size="16583996" crc="3cb2e113" />
3751      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 09 of 32)[!].wav" size="14653004" crc="80d25216" />
3752      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 10 of 32)[!].wav" size="12007004" crc="49c60a6b" />
3753      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 11 of 32)[!].wav" size="19768604" crc="49e1dd9f" />
3754      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 12 of 32)[!].wav" size="2570780" crc="cbea0bc3" />
3755      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 13 of 32)[!].wav" size="13194764" crc="5fef640d" />
3756      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 14 of 32)[!].wav" size="13103036" crc="ec7dee28" />
3757      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 15 of 32)[!].wav" size="1973372" crc="ecde793b" />
3758      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 16 of 32)[!].wav" size="11374316" crc="4c7bad5d" />
3759      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 17 of 32)[!].wav" size="2502572" crc="ec793028" />
3760      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 18 of 32)[!].wav" size="11291996" crc="c4a0fb8e" />
3761      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 19 of 32)[!].wav" size="15812540" crc="8b1020a2" />
3762      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 20 of 32)[!].wav" size="1959260" crc="dd78047b" />
3763      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 21 of 32)[!].wav" size="11291996" crc="dcc40ef4" />
3764      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 22 of 32)[!].wav" size="2243852" crc="61c8cf77" />
3765      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 23 of 32)[!].wav" size="11291996" crc="fc24aa9a" />
3766      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 24 of 32)[!].wav" size="1653500" crc="1ae48db0" />
3767      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 25 of 32)[!].wav" size="15450332" crc="734b5a17" />
3768      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 26 of 32)[!].wav" size="22275836" crc="f97f493d" />
3769      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 27 of 32)[!].wav" size="1785212" crc="556877b7" />
3770      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 28 of 32)[!].wav" size="10513484" crc="c379ce84" />
3771      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 29 of 32)[!].wav" size="34005260" crc="6aa86ab2" />
3772      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 30 of 32)[!].wav" size="13794524" crc="eef4ac5d" />
3773      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 31 of 32)[!].wav" size="17444828" crc="380f8cca" />
3774      <rom name="Jurassic Park (1992)(Sega)(NTSC)(JP)(Track 32 of 32)[!].wav" size="2394380" crc="960c51ad" />
3775      -->
37761639      <description>Jurassic Park (Jpn)</description>
37771640      <year>1994</year>
37781641      <publisher>Sega</publisher>
r242703r242704
37861649      </part>
37871650   </software>
37881651
1652<!--
1653    <software name="kamenrid">
1654        <description>Kamen Rider ZO (Jpn)</description>
1655        <year>1994</year>
1656        <publisher>Wolf Team</publisher>
1657        <part name="cdrom" interface="scd_cdrom">
1658            <diskarea name="cdrom">
1659                <disk name="kamen rider zo (1994)(wolf team)(ntsc)(jp)[!]" sha1="d8ce936b45a766199d7d4dc128558a80b83a06c4"/>
1660            </diskarea>
1661        </part>
1662    </software>
1663-->
1664
1665<!--
1666    <software name="keiou">
1667        <description>Keiou Yuugekitai (Jpn)</description>
1668        <year>1993</year>
1669        <publisher>Victor Entertainment</publisher>
1670        <part name="cdrom" interface="scd_cdrom">
1671            <diskarea name="cdrom">
1672                <disk name="keiou yuugekitai (1993)(victor)(ntsc)(jp)[!]" sha1="60db81983905822ccead05080dbedcdeedfe0be4"/>
1673            </diskarea>
1674        </part>
1675    </software>
1676-->
1677
37891678   <software name="lethalen">
3790      <!-- source toseciso
3791      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)[!].cue" size="3363" crc="f53989d5" />
3792      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 01 of 23)[!].iso" size="8792064" crc="0e04969a" />
3793      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 02 of 23)[!].wav" size="1764044" crc="ab0e440c" />
3794      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 03 of 23)[!].wav" size="52520204" crc="81e5ce5f" />
3795      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 04 of 23)[!].wav" size="38222396" crc="e3bc17cb" />
3796      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 05 of 23)[!].wav" size="62506796" crc="d916ce75" />
3797      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 06 of 23)[!].wav" size="31232252" crc="d3839087" />
3798      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 07 of 23)[!].wav" size="57875708" crc="6b424001" />
3799      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 08 of 23)[!].wav" size="60354716" crc="64fa4d94" />
3800      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 09 of 23)[!].wav" size="6348092" crc="836dd39f" />
3801      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 10 of 23)[!].wav" size="1444172" crc="e293e0ae" />
3802      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 11 of 23)[!].wav" size="58484876" crc="e65ca5af" />
3803      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 12 of 23)[!].wav" size="25253468" crc="8b12318f" />
3804      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 13 of 23)[!].wav" size="93045164" crc="95529378" />
3805      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 14 of 23)[!].wav" size="1721708" crc="2f7ee757" />
3806      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 15 of 23)[!].wav" size="32532908" crc="205806ed" />
3807      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 16 of 23)[!].wav" size="1832252" crc="86e49e32" />
3808      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 17 of 23)[!].wav" size="1808732" crc="1681547b" />
3809      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 18 of 23)[!].wav" size="1808732" crc="0ba45dd9" />
3810      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 19 of 23)[!].wav" size="1808732" crc="65db565d" />
3811      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 20 of 23)[!].wav" size="1808732" crc="1b3e48b4" />
3812      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 21 of 23)[!].wav" size="1279532" crc="8aa4129e" />
3813      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 22 of 23)[!].wav" size="22666268" crc="935af7a1" />
3814      <rom name="Lethal Enforcers (1993)(Konami)(NTSC)(JP)(en)(Track 23 of 23)[!].wav" size="37516796" crc="b15e6cdd" />
3815      -->
38161679      <description>Lethal Enforcers (Jpn)</description>
38171680      <year>1993</year>
38181681      <publisher>Konami</publisher>
r242703r242704
38271690   </software>
38281691
38291692   <software name="le2">
3830      <!-- source toseciso
3831      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)[!].cue" size="3754" crc="1ddd64c8" />
3832      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 01 of 23)[!].iso" size="12926976" crc="b9cd527b" />
3833      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 02 of 23)[!].wav" size="43345052" crc="fc6645c6" />
3834      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 03 of 23)[!].wav" size="36042092" crc="6ea84fd8" />
3835      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 04 of 23)[!].wav" size="24474956" crc="dd0624a1" />
3836      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 05 of 23)[!].wav" size="37991900" crc="1ac74ebc" />
3837      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 06 of 23)[!].wav" size="28837916" crc="e5115d52" />
3838      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 07 of 23)[!].wav" size="27017468" crc="8bb66852" />
3839      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 08 of 23)[!].wav" size="51675836" crc="af7c7369" />
3840      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 09 of 23)[!].wav" size="25606268" crc="fd9c5775" />
3841      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 10 of 23)[!].wav" size="27885356" crc="4a935715" />
3842      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 11 of 23)[!].wav" size="62257484" crc="e92e3673" />
3843      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 12 of 23)[!].wav" size="28922588" crc="57ac4fd3" />
3844      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 13 of 23)[!].wav" size="55655420" crc="2c4f7ab2" />
3845      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 14 of 23)[!].wav" size="1331276" crc="9ed88329" />
3846      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 15 of 23)[!].wav" size="1166636" crc="70d5c296" />
3847      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 16 of 23)[!].wav" size="1164284" crc="6ab0c7fa" />
3848      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 17 of 23)[!].wav" size="32335340" crc="694a9b85" />
3849      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 18 of 23)[!].wav" size="44612780" crc="0ea4010a" />
3850      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 19 of 23)[!].wav" size="1437116" crc="31e67094" />
3851      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 20 of 23)[!].wav" size="18552620" crc="dd9389db" />
3852      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 21 of 23)[!].wav" size="5957660" crc="e6371eaf" />
3853      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 22 of 23)[!].wav" size="5569580" crc="69ae91a0" />
3854      <rom name="Lethal Enforcers II - The Western (1994)(Konami)(NTSC)(JP)(en)(Track 23 of 23)[!].wav" size="6508028" crc="f6cd9ab2" />
3855      -->
38561693      <description>Lethal Enforcers II - The Western (Jpn)</description>
38571694      <year>1994</year>
38581695      <publisher>Konami</publisher>
r242703r242704
38661703      </part>
38671704   </software>
38681705
1706<!--
1707    <software name="lodoss">
1708        <description>Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (Jpn)</description>
1709        <year>1994</year>
1710        <publisher>Sega</publisher>
1711        <part name="cdrom" interface="scd_cdrom">
1712            <diskarea name="cdrom">
1713                <disk name="lodoss tou senki - eiyuu sensou - record of lodoss war (1994)(sega)(ntsc)(jp)[!]" sha1="995a2e9cae40cc3279c0c8d676a4ef1f985c9986"/>
1714            </diskarea>
1715        </part>
1716    </software>
1717-->
1718
38691719   <!-- one of these probably matches the REDUMP set -->
38701720   <software name="lunar2b" cloneof="lunar2">
3871      <!-- source toseciso
3872      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)[!][T-45074P-00271-R1M].cue" size="673" crc="aec2baa0" />
3873      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 1 of 4)[!][T-45074P-00271-R1M].iso" size="399542272" crc="5ba349c0" />
3874      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 2 of 4)[!][T-45074P-00271-R1M].wav" size="50577452" crc="09169604" />
3875      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 3 of 4)[!][T-45074P-00271-R1M].wav" size="11769452" crc="022a2281" />
3876      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 4 of 4)[!][T-45074P-00271-R1M].wav" size="1608812" crc="794d7aa9" />
3877      -->
1721      <!-- Diskring: T-45074P-00271-R1M -->
38781722      <description>Lunar - Eternal Blue (Jpn, Set 2)</description>
38791723      <year>1994</year>
38801724      <publisher>Game Arts</publisher>
38811725      <info name="serial" value="T-45074"/>
3882      <info name="disk_ring" value="T-45074P-00271-R1M"/>
38831726      <info name="release" value="19941222"/>
38841727      <info name="alt_title" value="ルナ-エターナルブルー"/>
38851728      <part name="cdrom" interface="scd_cdrom">
r242703r242704
38901733   </software>
38911734
38921735   <software name="lunar2a" cloneof="lunar2">
3893      <!-- source toseciso
3894      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)[!][T-45074P-00271A-R1M].cue" size="677" crc="61426198" />
3895      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 1 of 4)[!][T-45074P-00271A-R1M].iso" size="399542272" crc="26326647" />
3896      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 2 of 4)[!][T-45074P-00271A-R1M].wav" size="50577452" crc="1b19750a" />
3897      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 3 of 4)[!][T-45074P-00271A-R1M].wav" size="11769452" crc="da19c77a" />
3898      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(JP)(Track 4 of 4)[!][T-45074P-00271A-R1M].wav" size="1608812" crc="c980f230" />
3899      -->
1736      <!-- Diskring: T-45074P-00271A-R1M -->
39001737      <description>Lunar - Eternal Blue (Jpn, Set 3)</description>
39011738      <year>1994</year>
39021739      <publisher>Game Arts</publisher>
39031740      <info name="serial" value="T-45074"/>
3904      <info name="disk_ring" value="T-45074P-00271A-R1M"/>
39051741      <info name="release" value="19941222"/>
39061742      <info name="alt_title" value="ルナ-エターナルブルー"/>
39071743      <part name="cdrom" interface="scd_cdrom">
r242703r242704
39131749
39141750   <!-- one of these probably matches the REDUMP set -->
39151751   <software name="lunarb" cloneof="lunar">
3916      <!-- source toseciso
3917      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)[!][T-45014P-00017-R1M].cue" size="8949" crc="6a20fea1" />
3918      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 01 of 52)[!][T-45014P-00017-R1M].iso" size="28725248" crc="a89042ce" />
3919      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 02 of 52)[!][T-45014P-00017-R1M].wav" size="2048636" crc="b7bab421" />
3920      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 03 of 52)[!][T-45014P-00017-R1M].wav" size="18830156" crc="02e84421" />
3921      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 04 of 52)[!][T-45014P-00017-R1M].wav" size="12698492" crc="1e821efd" />
3922      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 05 of 52)[!][T-45014P-00017-R1M].wav" size="15005804" crc="ad64d8c7" />
3923      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 06 of 52)[!][T-45014P-00017-R1M].wav" size="15504428" crc="129d828e" />
3924      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 07 of 52)[!][T-45014P-00017-R1M].wav" size="13787468" crc="f2e9bebe" />
3925      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 08 of 52)[!][T-45014P-00017-R1M].wav" size="13968572" crc="41e1aee8" />
3926      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 09 of 52)[!][T-45014P-00017-R1M].wav" size="12879596" crc="fcb9fc31" />
3927      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 10 of 52)[!][T-45014P-00017-R1M].wav" size="13806284" crc="584339c8" />
3928      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 11 of 52)[!][T-45014P-00017-R1M].wav" size="15694940" crc="b0d99e00" />
3929      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 12 of 52)[!][T-45014P-00017-R1M].wav" size="15553820" crc="bcabb522" />
3930      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 13 of 52)[!][T-45014P-00017-R1M].wav" size="15125756" crc="ca7e68b2" />
3931      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 14 of 52)[!][T-45014P-00017-R1M].wav" size="11745932" crc="e2637014" />
3932      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 15 of 52)[!][T-45014P-00017-R1M].wav" size="11705948" crc="e4c2e093" />
3933      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 16 of 52)[!][T-45014P-00017-R1M].wav" size="13310012" crc="0d586501" />
3934      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 17 of 52)[!][T-45014P-00017-R1M].wav" size="8744780" crc="e25b4c4e" />
3935      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 18 of 52)[!][T-45014P-00017-R1M].wav" size="13862732" crc="06ef1abf" />
3936      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 19 of 52)[!][T-45014P-00017-R1M].wav" size="7385324" crc="da0eee49" />
3937      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 20 of 52)[!][T-45014P-00017-R1M].wav" size="7669916" crc="4c703a90" />
3938      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 21 of 52)[!][T-45014P-00017-R1M].wav" size="14937596" crc="91c285b4" />
3939      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 22 of 52)[!][T-45014P-00017-R1M].wav" size="12199868" crc="ac0631c8" />
3940      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 23 of 52)[!][T-45014P-00017-R1M].wav" size="7646396" crc="d76d8198" />
3941      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 24 of 52)[!][T-45014P-00017-R1M].wav" size="3438668" crc="087c87fa" />
3942      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 25 of 52)[!][T-45014P-00017-R1M].wav" size="3758540" crc="30be1321" />
3943      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 26 of 52)[!][T-45014P-00017-R1M].wav" size="4116044" crc="661956e9" />
3944      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 27 of 52)[!][T-45014P-00017-R1M].wav" size="4113692" crc="14422e04" />
3945      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 28 of 52)[!][T-45014P-00017-R1M].wav" size="14989340" crc="ec9deba6" />
3946      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 29 of 52)[!][T-45014P-00017-R1M].wav" size="10181852" crc="b86797b1" />
3947      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 30 of 52)[!][T-45014P-00017-R1M].wav" size="12246908" crc="640f7c4e" />
3948      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 31 of 52)[!][T-45014P-00017-R1M].wav" size="3640940" crc="72c90fa0" />
3949      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 32 of 52)[!][T-45014P-00017-R1M].wav" size="4301852" crc="e201888f" />
3950      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 33 of 52)[!][T-45014P-00017-R1M].wav" size="4607612" crc="02abf4bd" />
3951      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 34 of 52)[!][T-45014P-00017-R1M].wav" size="3165836" crc="fd2e46a6" />
3952      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 35 of 52)[!][T-45014P-00017-R1M].wav" size="3690332" crc="069c40aa" />
3953      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 36 of 52)[!][T-45014P-00017-R1M].wav" size="2638988" crc="fa78354a" />
3954      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 37 of 52)[!][T-45014P-00017-R1M].wav" size="14436620" crc="39a317dd" />
3955      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 38 of 52)[!][T-45014P-00017-R1M].wav" size="11585996" crc="3fa37309" />
3956      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 39 of 52)[!][T-45014P-00017-R1M].wav" size="3894956" crc="fd6a1502" />
3957      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 40 of 52)[!][T-45014P-00017-R1M].wav" size="5477852" crc="09ff8e49" />
3958      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 41 of 52)[!][T-45014P-00017-R1M].wav" size="4405340" crc="ac547e2f" />
3959      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 42 of 52)[!][T-45014P-00017-R1M].wav" size="8551916" crc="bd5526ef" />
3960      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 43 of 52)[!][T-45014P-00017-R1M].wav" size="4351244" crc="991fb26c" />
3961      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 44 of 52)[!][T-45014P-00017-R1M].wav" size="4965116" crc="bf8adf07" />
3962      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 45 of 52)[!][T-45014P-00017-R1M].wav" size="4400636" crc="2676b24b" />
3963      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 46 of 52)[!][T-45014P-00017-R1M].wav" size="3250508" crc="475d0552" />
3964      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 47 of 52)[!][T-45014P-00017-R1M].wav" size="11092076" crc="dccfc766" />
3965      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 48 of 52)[!][T-45014P-00017-R1M].wav" size="33480764" crc="9346a592" />
3966      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 49 of 52)[!][T-45014P-00017-R1M].wav" size="3137612" crc="0f142aeb" />
3967      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 50 of 52)[!][T-45014P-00017-R1M].wav" size="5014508" crc="0750fc47" />
3968      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 51 of 52)[!][T-45014P-00017-R1M].wav" size="1611164" crc="d41a33c1" />
3969      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 52 of 52)[!][T-45014P-00017-R1M].wav" size="15299804" crc="43115dd3" />
3970      -->
1752      <!-- Diskring: T-45014P-00017-R1M -->
39711753      <description>Lunar - The Silver Star (Jpn, R1M)</description>
39721754      <year>1992</year>
39731755      <publisher>Game Arts</publisher>
39741756      <info name="serial" value="T-45014"/>
3975      <info name="disk_ring" value="T-45014P-00017-R1M"/>
39761757      <info name="release" value="19920626"/>
39771758      <info name="alt_title" value="ルナ ザ・シルバースター"/>
39781759      <part name="cdrom" interface="scd_cdrom">
r242703r242704
39831764   </software>
39841765
39851766   <software name="lunara" cloneof="lunar">
3986      <!-- source toseciso
3987      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)[!][T-45014P-00017-R2M].cue" size="8949" crc="833ce071" />
3988      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 01 of 52)[!][T-45014P-00017-R2M].iso" size="28725248" crc="a89042ce" />
3989      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 02 of 52)[!][T-45014P-00017-R2M].wav" size="2048636" crc="4fb82061" />
3990      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 03 of 52)[!][T-45014P-00017-R2M].wav" size="18830156" crc="3cb51c93" />
3991      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 04 of 52)[!][T-45014P-00017-R2M].wav" size="12698492" crc="3469aa9f" />
3992      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 05 of 52)[!][T-45014P-00017-R2M].wav" size="15005804" crc="1ba45bf1" />
3993      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 06 of 52)[!][T-45014P-00017-R2M].wav" size="15504428" crc="acdb8913" />
3994      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 07 of 52)[!][T-45014P-00017-R2M].wav" size="13787468" crc="6da66f68" />
3995      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 08 of 52)[!][T-45014P-00017-R2M].wav" size="13968572" crc="200f8029" />
3996      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 09 of 52)[!][T-45014P-00017-R2M].wav" size="12879596" crc="3c34cb04" />
3997      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 10 of 52)[!][T-45014P-00017-R2M].wav" size="13806284" crc="1833beac" />
3998      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 11 of 52)[!][T-45014P-00017-R2M].wav" size="15694940" crc="21c47aae" />
3999      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 12 of 52)[!][T-45014P-00017-R2M].wav" size="15553820" crc="1407fc02" />
4000      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 13 of 52)[!][T-45014P-00017-R2M].wav" size="15125756" crc="9ecb9d95" />
4001      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 14 of 52)[!][T-45014P-00017-R2M].wav" size="11745932" crc="e7dd7b14" />
4002      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 15 of 52)[!][T-45014P-00017-R2M].wav" size="11705948" crc="ebbb38e6" />
4003      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 16 of 52)[!][T-45014P-00017-R2M].wav" size="13310012" crc="2844d63c" />
4004      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 17 of 52)[!][T-45014P-00017-R2M].wav" size="8744780" crc="549bcd34" />
4005      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 18 of 52)[!][T-45014P-00017-R2M].wav" size="13862732" crc="d0313af2" />
4006      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 19 of 52)[!][T-45014P-00017-R2M].wav" size="7385324" crc="d0651994" />
4007      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 20 of 52)[!][T-45014P-00017-R2M].wav" size="7669916" crc="fc3493cc" />
4008      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 21 of 52)[!][T-45014P-00017-R2M].wav" size="14937596" crc="fa5fadee" />
4009      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 22 of 52)[!][T-45014P-00017-R2M].wav" size="12199868" crc="25467f9c" />
4010      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 23 of 52)[!][T-45014P-00017-R2M].wav" size="7646396" crc="91d98fe7" />
4011      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 24 of 52)[!][T-45014P-00017-R2M].wav" size="3438668" crc="ef521f94" />
4012      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 25 of 52)[!][T-45014P-00017-R2M].wav" size="3756188" crc="37122728" />
4013      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 26 of 52)[!][T-45014P-00017-R2M].wav" size="4118396" crc="205b17a1" />
4014      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 27 of 52)[!][T-45014P-00017-R2M].wav" size="4113692" crc="bda5cf0c" />
4015      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 28 of 52)[!][T-45014P-00017-R2M].wav" size="14989340" crc="4800e665" />
4016      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 29 of 52)[!][T-45014P-00017-R2M].wav" size="10181852" crc="20fb2d3e" />
4017      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 30 of 52)[!][T-45014P-00017-R2M].wav" size="12246908" crc="7ee185b8" />
4018      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 31 of 52)[!][T-45014P-00017-R2M].wav" size="3640940" crc="6ba30678" />
4019      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 32 of 52)[!][T-45014P-00017-R2M].wav" size="4301852" crc="5ab8f2c5" />
4020      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 33 of 52)[!][T-45014P-00017-R2M].wav" size="4607612" crc="438c0fef" />
4021      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 34 of 52)[!][T-45014P-00017-R2M].wav" size="3165836" crc="89e45655" />
4022      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 35 of 52)[!][T-45014P-00017-R2M].wav" size="3690332" crc="982f3924" />
4023      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 36 of 52)[!][T-45014P-00017-R2M].wav" size="2638988" crc="a6c99c7f" />
4024      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 37 of 52)[!][T-45014P-00017-R2M].wav" size="14436620" crc="adf3ab5c" />
4025      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 38 of 52)[!][T-45014P-00017-R2M].wav" size="11585996" crc="cd783a31" />
4026      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 39 of 52)[!][T-45014P-00017-R2M].wav" size="3894956" crc="d61450b9" />
4027      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 40 of 52)[!][T-45014P-00017-R2M].wav" size="5477852" crc="369e55a5" />
4028      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 41 of 52)[!][T-45014P-00017-R2M].wav" size="4405340" crc="105bc644" />
4029      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 42 of 52)[!][T-45014P-00017-R2M].wav" size="8551916" crc="004c1ef7" />
4030      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 43 of 52)[!][T-45014P-00017-R2M].wav" size="4351244" crc="a6597120" />
4031      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 44 of 52)[!][T-45014P-00017-R2M].wav" size="4965116" crc="7388ae29" />
4032      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 45 of 52)[!][T-45014P-00017-R2M].wav" size="4400636" crc="67282d80" />
4033      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 46 of 52)[!][T-45014P-00017-R2M].wav" size="3250508" crc="b1a08263" />
4034      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 47 of 52)[!][T-45014P-00017-R2M].wav" size="11092076" crc="b93f366e" />
4035      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 48 of 52)[!][T-45014P-00017-R2M].wav" size="33480764" crc="1894b506" />
4036      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 49 of 52)[!][T-45014P-00017-R2M].wav" size="3137612" crc="eb61683f" />
4037      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 50 of 52)[!][T-45014P-00017-R2M].wav" size="5014508" crc="9c28102b" />
4038      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 51 of 52)[!][T-45014P-00017-R2M].wav" size="1611164" crc="03534eda" />
4039      <rom name="Lunar - The Silver Star (1992)(Game Arts)(NTSC)(JP)(Track 52 of 52)[!][T-45014P-00017-R2M].wav" size="15299804" crc="23d1fa5b" />
4040      -->
4041      <description>Lunar - The Silver Star (Jpn, R2)</description>
1767      <!-- Diskring: T-45014P-00017-R2 -->
1768      <description>Lunar - The Silver Star (Jpn, R2M)</description>
40421769      <year>1992</year>
40431770      <publisher>Game Arts</publisher>
40441771      <info name="serial" value="T-45014"/>
4045      <info name="disk_ring" value="T-45014P-00017-R2"/>
40461772      <info name="release" value="19920626"/>
40471773      <info name="alt_title" value="ルナ ザ・シルバースター"/>
40481774      <part name="cdrom" interface="scd_cdrom">
r242703r242704
40531779   </software>
40541780
40551781   <software name="silkylip">
4056      <!-- source toseciso
4057      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)[!][T-49024P-00016-R2M].cue" size="5990" crc="fdca1e36" />
4058      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 01 of 35)[!][T-49024P-00016-R2M].iso" size="86499328" crc="11ffbe37" />
4059      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 02 of 35)[!][T-49024P-00016-R2M].wav" size="11955260" crc="f33f94ec" />
4060      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 03 of 35)[!][T-49024P-00016-R2M].wav" size="24519644" crc="c45534fe" />
4061      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 04 of 35)[!][T-49024P-00016-R2M].wav" size="23548268" crc="c4de5f5a" />
4062      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 05 of 35)[!][T-49024P-00016-R2M].wav" size="23999852" crc="e1dfbbda" />
4063      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 06 of 35)[!][T-49024P-00016-R2M].wav" size="12467996" crc="3ffe4110" />
4064      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 07 of 35)[!][T-49024P-00016-R2M].wav" size="25241708" crc="90393820" />
4065      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 08 of 35)[!][T-49024P-00016-R2M].wav" size="22687436" crc="40c99075" />
4066      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 09 of 35)[!][T-49024P-00016-R2M].wav" size="16903868" crc="59eee403" />
4067      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 10 of 35)[!][T-49024P-00016-R2M].wav" size="1547660" crc="c249d56d" />
4068      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 11 of 35)[!][T-49024P-00016-R2M].wav" size="1726412" crc="3324997d" />
4069      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 12 of 35)[!][T-49024P-00016-R2M].wav" size="1561772" crc="59c1e94f" />
4070      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 13 of 35)[!][T-49024P-00016-R2M].wav" size="1651148" crc="86f297ef" />
4071      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 14 of 35)[!][T-49024P-00016-R2M].wav" size="7973324" crc="a004aa96" />
4072      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 15 of 35)[!][T-49024P-00016-R2M].wav" size="6399836" crc="67da4a10" />
4073      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 16 of 35)[!][T-49024P-00016-R2M].wav" size="23026124" crc="1bd5782c" />
4074      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 17 of 35)[!][T-49024P-00016-R2M].wav" size="3993740" crc="df7dd58b" />
4075      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 18 of 35)[!][T-49024P-00016-R2M].wav" size="6825548" crc="68342133" />
4076      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 19 of 35)[!][T-49024P-00016-R2M].wav" size="5390828" crc="02338ef1" />
4077      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 20 of 35)[!][T-49024P-00016-R2M].wav" size="12166940" crc="9c20cc57" />
4078      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 21 of 35)[!][T-49024P-00016-R2M].wav" size="5049788" crc="503647e2" />
4079      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 22 of 35)[!][T-49024P-00016-R2M].wav" size="39534812" crc="7793a48d" />
4080      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 23 of 35)[!][T-49024P-00016-R2M].wav" size="21208028" crc="a5d95e2c" />
4081      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 24 of 35)[!][T-49024P-00016-R2M].wav" size="1578236" crc="2f50c6c9" />
4082      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 25 of 35)[!][T-49024P-00016-R2M].wav" size="1552364" crc="cfed4675" />
4083      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 26 of 35)[!][T-49024P-00016-R2M].wav" size="1512380" crc="eeb53f67" />
4084      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 27 of 35)[!][T-49024P-00016-R2M].wav" size="1613516" crc="95b1970f" />
4085      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 28 of 35)[!][T-49024P-00016-R2M].wav" size="1655852" crc="f333023b" />
4086      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 29 of 35)[!][T-49024P-00016-R2M].wav" size="1691132" crc="be760425" />
4087      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 30 of 35)[!][T-49024P-00016-R2M].wav" size="1592348" crc="a336e8ff" />
4088      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 31 of 35)[!][T-49024P-00016-R2M].wav" size="1801676" crc="c59c0675" />
4089      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 32 of 35)[!][T-49024P-00016-R2M].wav" size="1622924" crc="0de636a9" />
4090      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 33 of 35)[!][T-49024P-00016-R2M].wav" size="1721708" crc="8b533344" />
4091      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 34 of 35)[!][T-49024P-00016-R2M].wav" size="1547660" crc="2e120947" />
4092      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 35 of 35)[!][T-49024P-00016-R2M].wav" size="1573532" crc="a86f99bf" />
4093      -->
1782      <!-- Diskring: T-49024P-00016-R2M -->
40941783      <description>Mahou no Shoujo - Silky Lip (Jpn, R2M)</description>
40951784      <year>1992</year>
40961785      <publisher>Nihon Telenet</publisher>
40971786      <info name="serial" value="T-49024"/>
4098      <info name="disk_ring" value="T-49024P-00016-R2M"/>
40991787      <info name="release" value="19920619"/>
41001788      <info name="alt_title" value="魔法の少女シルキーリップ"/>
41011789      <part name="cdrom" interface="scd_cdrom">
r242703r242704
41061794   </software>
41071795
41081796   <software name="silkylipa" cloneof="silkylip">
4109      <!-- source toseciso
4110      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)[!][T-49024P-00016-R1M].cue" size="5990" crc="b0840f4e" />
4111      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 01 of 35)[!][T-49024P-00016-R1M].iso" size="86499328" crc="11ffbe37" />
4112      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 02 of 35)[!][T-49024P-00016-R1M].wav" size="11955260" crc="f33f94ec" />
4113      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 03 of 35)[!][T-49024P-00016-R1M].wav" size="24519644" crc="c45534fe" />
4114      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 04 of 35)[!][T-49024P-00016-R1M].wav" size="23548268" crc="c4de5f5a" />
4115      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 05 of 35)[!][T-49024P-00016-R1M].wav" size="23999852" crc="e1dfbbda" />
4116      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 06 of 35)[!][T-49024P-00016-R1M].wav" size="12467996" crc="3ffe4110" />
4117      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 07 of 35)[!][T-49024P-00016-R1M].wav" size="25241708" crc="90393820" />
4118      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 08 of 35)[!][T-49024P-00016-R1M].wav" size="22687436" crc="40c99075" />
4119      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 09 of 35)[!][T-49024P-00016-R1M].wav" size="16903868" crc="59eee403" />
4120      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 10 of 35)[!][T-49024P-00016-R1M].wav" size="1547660" crc="c249d56d" />
4121      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 11 of 35)[!][T-49024P-00016-R1M].wav" size="1726412" crc="3324997d" />
4122      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 12 of 35)[!][T-49024P-00016-R1M].wav" size="1561772" crc="59c1e94f" />
4123      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 13 of 35)[!][T-49024P-00016-R1M].wav" size="1651148" crc="86f297ef" />
4124      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 14 of 35)[!][T-49024P-00016-R1M].wav" size="7973324" crc="a004aa96" />
4125      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 15 of 35)[!][T-49024P-00016-R1M].wav" size="6399836" crc="67da4a10" />
4126      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 16 of 35)[!][T-49024P-00016-R1M].wav" size="23026124" crc="1bd5782c" />
4127      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 17 of 35)[!][T-49024P-00016-R1M].wav" size="3993740" crc="df7dd58b" />
4128      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 18 of 35)[!][T-49024P-00016-R1M].wav" size="6825548" crc="68342133" />
4129      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 19 of 35)[!][T-49024P-00016-R1M].wav" size="5390828" crc="02338ef1" />
4130      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 20 of 35)[!][T-49024P-00016-R1M].wav" size="12166940" crc="9c20cc57" />
4131      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 21 of 35)[!][T-49024P-00016-R1M].wav" size="5049788" crc="503647e2" />
4132      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 22 of 35)[!][T-49024P-00016-R1M].wav" size="39534812" crc="7793a48d" />
4133      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 23 of 35)[!][T-49024P-00016-R1M].wav" size="21208028" crc="a5d95e2c" />
4134      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 24 of 35)[!][T-49024P-00016-R1M].wav" size="1578236" crc="2f50c6c9" />
4135      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 25 of 35)[!][T-49024P-00016-R1M].wav" size="1552364" crc="cfed4675" />
4136      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 26 of 35)[!][T-49024P-00016-R1M].wav" size="1512380" crc="eeb53f67" />
4137      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 27 of 35)[!][T-49024P-00016-R1M].wav" size="1613516" crc="95b1970f" />
4138      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 28 of 35)[!][T-49024P-00016-R1M].wav" size="1658204" crc="b6c3a9b2" />
4139      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 29 of 35)[!][T-49024P-00016-R1M].wav" size="1688780" crc="705e8290" />
4140      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 30 of 35)[!][T-49024P-00016-R1M].wav" size="1592348" crc="a336e8ff" />
4141      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 31 of 35)[!][T-49024P-00016-R1M].wav" size="1801676" crc="c59c0675" />
4142      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 32 of 35)[!][T-49024P-00016-R1M].wav" size="1622924" crc="0de636a9" />
4143      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 33 of 35)[!][T-49024P-00016-R1M].wav" size="1721708" crc="8b533344" />
4144      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 34 of 35)[!][T-49024P-00016-R1M].wav" size="1547660" crc="2e120947" />
4145      <rom name="Mahou no Shoujo - Silky Lip (1992)(Riot)(NTSC)(JP)(Track 35 of 35)[!][T-49024P-00016-R1M].wav" size="1573532" crc="a86f99bf" />
4146      -->
1797      <!-- Diskring: T-49024P-00016-R1M -->
41471798      <description>Mahou no Shoujo - Silky Lip (Jpn, R1M)</description>
41481799      <year>1992</year>
41491800      <publisher>Nihon Telenet</publisher>
41501801      <info name="serial" value="T-49024"/>
4151      <info name="disk_ring" value="T-49024P-00016-R1M"/>
41521802      <info name="release" value="19920619"/>
41531803      <info name="alt_title" value="魔法の少女シルキーリップ"/>
41541804      <part name="cdrom" interface="scd_cdrom">
r242703r242704
41591809   </software>
41601810
41611811   <software name="megaschw">
4162      <!-- source toseciso
4163      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)[!].cue" size="2419" crc="640859a5" />
4164      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 01 of 17)[!].iso" size="10870784" crc="f3c9fdca" />
4165      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 02 of 17)[!].wav" size="1295996" crc="85f715b6" />
4166      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 03 of 17)[!].wav" size="44290556" crc="b0a1c985" />
4167      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 04 of 17)[!].wav" size="50951420" crc="06a79c97" />
4168      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 05 of 17)[!].wav" size="31862588" crc="e1e8b9cf" />
4169      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 06 of 17)[!].wav" size="31227548" crc="c9487fd1" />
4170      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 07 of 17)[!].wav" size="28179356" crc="7d1e4e5e" />
4171      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 08 of 17)[!].wav" size="42013820" crc="d013392e" />
4172      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 09 of 17)[!].wav" size="48070220" crc="d54691c8" />
4173      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 10 of 17)[!].wav" size="29828108" crc="8a385d19" />
4174      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 11 of 17)[!].wav" size="28713260" crc="62423729" />
4175      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 12 of 17)[!].wav" size="49102748" crc="b0ec68fb" />
4176      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 13 of 17)[!].wav" size="45812300" crc="72276ea5" />
4177      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 14 of 17)[!].wav" size="40687292" crc="812928d2" />
4178      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 15 of 17)[!].wav" size="30383180" crc="d07a53d3" />
4179      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 16 of 17)[!].wav" size="40115756" crc="aba41d28" />
4180      <rom name="Mega Schwarzschild (1993)(Sega)(NTSC)(JP)(Track 17 of 17)[!].wav" size="35395292" crc="82a9c0a0" />
4181      -->
41821812      <description>Mega Schwarzschild (Jpn)</description>
41831813      <year>1993</year>
41841814      <publisher>Sega</publisher>
r242703r242704
41921822      </part>
41931823   </software>
41941824
1825<!--
1826    <software name="microcos">
1827        <description>Microcosm (Jpn)</description>
1828        <year>1994</year>
1829        <publisher>Psygnosis</publisher>
1830        <part name="cdrom" interface="scd_cdrom">
1831            <diskarea name="cdrom">
1832                <disk name="microcosm (1994)(psygnosis)(ntsc)(jp)(en)[!]" sha1="4ed9b1ab36bc04102baf9341a9e311676a06529e"/>
1833            </diskarea>
1834        </part>
1835    </software>
1836-->
1837
41951838   <software name="mightmg3">
4196      <!-- source toseciso
4197      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)[!].cue" size="7319" crc="fefc00b2" />
4198      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 01 of 46)[!].iso" size="22312960" crc="6c82daa3" />
4199      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 02 of 46)[!].wav" size="2721308" crc="5a44ac4c" />
4200      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 03 of 46)[!].wav" size="3187004" crc="1373bed8" />
4201      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 04 of 46)[!].wav" size="3114092" crc="677abfdc" />
4202      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 05 of 46)[!].wav" size="3001196" crc="28272a91" />
4203      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 06 of 46)[!].wav" size="3189356" crc="f37d3be3" />
4204      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 07 of 46)[!].wav" size="3436316" crc="c50dd4db" />
4205      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 08 of 46)[!].wav" size="3109388" crc="1f1aa8e5" />
4206      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 09 of 46)[!].wav" size="3662108" crc="9eb1fe30" />
4207      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 10 of 46)[!].wav" size="2700140" crc="e3a7844f" />
4208      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 11 of 46)[!].wav" size="3161132" crc="e049bb48" />
4209      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 12 of 46)[!].wav" size="3088220" crc="a7e38c5e" />
4210      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 13 of 46)[!].wav" size="2904764" crc="6e255fa3" />
4211      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 14 of 46)[!].wav" size="2822444" crc="1db41283" />
4212      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 15 of 46)[!].wav" size="2669564" crc="b01e3ac7" />
4213      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 16 of 46)[!].wav" size="16026572" crc="1bfb18ab" />
4214      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 17 of 46)[!].wav" size="9958412" crc="d6320855" />
4215      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 18 of 46)[!].wav" size="13441724" crc="221099e9" />
4216      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 19 of 46)[!].wav" size="11729468" crc="2a0a2de9" />
4217      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 20 of 46)[!].wav" size="15690236" crc="60c0d13b" />
4218      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 21 of 46)[!].wav" size="25133516" crc="326d4069" />
4219      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 22 of 46)[!].wav" size="31646204" crc="9ad39b54" />
4220      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 23 of 46)[!].wav" size="33419612" crc="948e7a2f" />
4221      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 24 of 46)[!].wav" size="31697948" crc="7bb14ee1" />
4222      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 25 of 46)[!].wav" size="31914332" crc="04730d93" />
4223      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 26 of 46)[!].wav" size="9532700" crc="cca0291f" />
4224      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 27 of 46)[!].wav" size="11423708" crc="d6de0246" />
4225      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 28 of 46)[!].wav" size="7846316" crc="f8773c9d" />
4226      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 29 of 46)[!].wav" size="1905164" crc="400f62e2" />
4227      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 30 of 46)[!].wav" size="9445676" crc="61d663ae" />
4228      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 31 of 46)[!].wav" size="15384476" crc="d0dde117" />
4229      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 32 of 46)[!].wav" size="8114444" crc="45206910" />
4230      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 33 of 46)[!].wav" size="19855628" crc="8f961eec" />
4231      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 34 of 46)[!].wav" size="11061500" crc="ebb87ffd" />
4232      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 35 of 46)[!].wav" size="11085020" crc="74f8ecd6" />
4233      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 36 of 46)[!].wav" size="11435468" crc="bfc71f1c" />
4234      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 37 of 46)[!].wav" size="11390780" crc="505580e1" />
4235      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 38 of 46)[!].wav" size="11536604" crc="99a455df" />
4236      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 39 of 46)[!].wav" size="7843964" crc="13a2f756" />
4237      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 40 of 46)[!].wav" size="12651452" crc="45b22955" />
4238      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 41 of 46)[!].wav" size="16026572" crc="b6357c18" />
4239      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 42 of 46)[!].wav" size="8996444" crc="2adb1da6" />
4240      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 43 of 46)[!].wav" size="5310860" crc="e965b0cd" />
4241      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 44 of 46)[!].wav" size="37759052" crc="336e565c" />
4242      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 45 of 46)[!].wav" size="11978780" crc="265ffd1b" />
4243      <rom name="Might and Magic III - Isles of Terra (1993)(CRI)(NTSC)(JP)(Track 46 of 46)[!].wav" size="37799036" crc="0b0dd512" />
4244      -->
42451839      <description>Might and Magic III - Isles of Terra (Jpn)</description>
42461840      <year>1993</year>
42471841      <publisher>CRI</publisher>
r242703r242704
42561850   </software>
42571851
42581852   <software name="mk">
4259      <!-- source toseciso
4260      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)[!].cue" size="3029" crc="59185e4e" />
4261      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 01 of 21)[!].iso" size="32667648" crc="e2220577" />
4262      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 02 of 21)[!].wav" size="6856124" crc="a6e744ee" />
4263      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 03 of 21)[!].wav" size="13688684" crc="ab964fb8" />
4264      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 04 of 21)[!].wav" size="11762396" crc="78731068" />
4265      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 05 of 21)[!].wav" size="7328876" crc="7ba0a0c6" />
4266      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 06 of 21)[!].wav" size="22329932" crc="60891f70" />
4267      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 07 of 21)[!].wav" size="18870140" crc="f5cbb660" />
4268      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 08 of 21)[!].wav" size="10816892" crc="c740e61d" />
4269      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 09 of 21)[!].wav" size="1479452" crc="6e39088d" />
4270      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 10 of 21)[!].wav" size="1978076" crc="0aa6f084" />
4271      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 11 of 21)[!].wav" size="2883596" crc="62750c32" />
4272      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 12 of 21)[!].wav" size="1561772" crc="4ff18f2e" />
4273      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 13 of 21)[!].wav" size="2434364" crc="7c0af08c" />
4274      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 14 of 21)[!].wav" size="2671916" crc="7d60f2ef" />
4275      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 15 of 21)[!].wav" size="3854972" crc="c820d04f" />
4276      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 16 of 21)[!].wav" size="14798828" crc="2f09be74" />
4277      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 17 of 21)[!].wav" size="36778268" crc="7efb1aa4" />
4278      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 18 of 21)[!].wav" size="42747644" crc="101fa8c9" />
4279      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 19 of 21)[!].wav" size="52637804" crc="2356f98c" />
4280      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 20 of 21)[!].wav" size="40273340" crc="8ba853c2" />
4281      <rom name="Mortal Kombat (1994)(Acclaim)(NTSC)(JP)(en)(Track 21 of 21)[!].wav" size="51974540" crc="de937768" />
4282      -->
42831853      <description>Mortal Kombat (Jpn)</description>
42841854      <year>1994</year>
42851855      <publisher>Acclaim Japan</publisher>
r242703r242704
42941864   </software>
42951865
42961866   <software name="nbajam">
4297      <!-- source toseciso
4298      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)[!].cue" size="1193" crc="d9c8c8f1" />
4299      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 1 of 9)[!].iso" size="44662784" crc="2ea4833c" />
4300      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 2 of 9)[!].wav" size="51998060" crc="91c912a1" />
4301      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 3 of 9)[!].wav" size="47197628" crc="7f4407a5" />
4302      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 4 of 9)[!].wav" size="45998108" crc="c5da40a0" />
4303      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 5 of 9)[!].wav" size="56036444" crc="69b3762f" />
4304      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 6 of 9)[!].wav" size="54811052" crc="b1ad5308" />
4305      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 7 of 9)[!].wav" size="60679292" crc="bd899bae" />
4306      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 8 of 9)[!].wav" size="59430380" crc="8c2ae27d" />
4307      <rom name="NBA Jam (1993)(Acclaim)(NTSC)(Jp)(Track 9 of 9)[!].wav" size="1905164" crc="34a6ed57" />
4308      -->
43091867      <description>NBA Jam (Jpn)</description>
43101868      <year>1993</year>
43111869      <publisher>Acclaim Japan</publisher>
r242703r242704
43191877      </part>
43201878   </software>
43211879
1880<!--
1881    <software name="nstriker">
1882        <description>Night Striker (Jpn)</description>
1883        <year>1993</year>
1884        <publisher>Taito</publisher>
1885        <part name="cdrom" interface="scd_cdrom">
1886            <diskarea name="cdrom">
1887                <disk name="night striker (1993)(taito)(ntsc)(jp)(en)[!]" sha1="e36f6eddda24f1001e35dae80c571e7025c1139e"/>
1888            </diskarea>
1889        </part>
1890    </software>
1891-->
1892
1893<!--
1894    <software name="ntrap">
1895        <description>Night Trap (Jpn)</description>
1896        <year>1993</year>
1897        <publisher>Sega</publisher>
1898        <part name="cdrom1" interface="scd_cdrom">
1899            <diskarea name="cdrom">
1900                <disk name="night trap (1993)(sega)(ntsc)(jp)(disc 1 of 2)[!]" sha1="f842a6a258803ade3a60d93b5686bbb5f55c88b9"/>
1901            </diskarea>
1902        </part>
1903
1904        <part name="cdrom2" interface="scd_cdrom">
1905            <diskarea name="cdrom">
1906                <disk name="night trap (1993)(sega)(ntsc)(jp)(disc 2 of 2)[!]" sha1="ce70f24bff87ec8dc6e314125cd7264ea5897437"/>
1907            </diskarea>
1908        </part>
1909    </software>
1910-->
1911
43221912   <software name="ninjawar">
4323      <!-- source toseciso
4324      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)[!].cue" size="2945" crc="51c1f55e" />
4325      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 01 of 20)[!].iso" size="12410880" crc="da5f9be0" />
4326      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 02 of 20)[!].wav" size="12573836" crc="2f80b95b" />
4327      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 03 of 20)[!].wav" size="53016476" crc="a93130ac" />
4328      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 04 of 20)[!].wav" size="34823756" crc="9eea2746" />
4329      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 05 of 20)[!].wav" size="23468300" crc="a7ebdf56" />
4330      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 06 of 20)[!].wav" size="23738780" crc="855b08d1" />
4331      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 07 of 20)[!].wav" size="35197724" crc="bf2a1f8c" />
4332      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 08 of 20)[!].wav" size="25582748" crc="fe77b8b7" />
4333      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 09 of 20)[!].wav" size="7260668" crc="9ab8ac98" />
4334      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 10 of 20)[!].wav" size="47127068" crc="9fb5248e" />
4335      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 11 of 20)[!].wav" size="33579548" crc="4f2be1f9" />
4336      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 12 of 20)[!].wav" size="42331340" crc="f542b9be" />
4337      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 13 of 20)[!].wav" size="39791180" crc="46eeeac7" />
4338      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 14 of 20)[!].wav" size="30775964" crc="29acd9a0" />
4339      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 15 of 20)[!].wav" size="27948860" crc="11cf07b3" />
4340      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 16 of 20)[!].wav" size="11604812" crc="10d373d2" />
4341      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 17 of 20)[!].wav" size="31763804" crc="a5bcface" />
4342      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 18 of 20)[!].wav" size="37813148" crc="4c683610" />
4343      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 19 of 20)[!].wav" size="1775804" crc="9bab569b" />
4344      <rom name="Ninjawarriors, The (1993)(Taito)(NTSC)(JP)(en)(Track 20 of 20)[!].wav" size="1298348" crc="5981f196" />
4345      -->
43461913      <description>The Ninjawarriors (Jpn)</description>
43471914      <year>1993</year>
43481915      <publisher>Taito</publisher>
r242703r242704
43571924   </software>
43581925
43591926   <software name="nobuhao">
4360      <!-- source toseciso
4361      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)[!].cue" size="1968" crc="5c643cef" />
4362      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 01 of 13)[!].iso" size="8796160" crc="93bb153f" />
4363      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 02 of 13)[!].wav" size="35103644" crc="3a4d4bee" />
4364      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 03 of 13)[!].wav" size="52755404" crc="5f9d4b4e" />
4365      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 04 of 13)[!].wav" size="44020076" crc="451c4cc0" />
4366      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 05 of 13)[!].wav" size="42724124" crc="7ae75a91" />
4367      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 06 of 13)[!].wav" size="45979292" crc="931a0809" />
4368      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 07 of 13)[!].wav" size="17557724" crc="c46e40cc" />
4369      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 08 of 13)[!].wav" size="27831260" crc="b56af64d" />
4370      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 09 of 13)[!].wav" size="30096236" crc="7aa2e3f9" />
4371      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 10 of 13)[!].wav" size="39944060" crc="f1c2f588" />
4372      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 11 of 13)[!].wav" size="60723980" crc="543cbbe1" />
4373      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 12 of 13)[!].wav" size="38147132" crc="4a99b106" />
4374      <rom name="Nobunaga no Yabou - Haouden (1994)(KOEI)(NTSC)(JP)(Track 13 of 13)[!].wav" size="20309564" crc="f05b24f0" />
4375      -->
43761927      <description>Nobunaga no Yabou - Haouden (Jpn)</description>
43771928      <year>1994</year>
43781929      <publisher>Koei</publisher>
r242703r242704
43861937      </part>
43871938   </software>
43881939
4389   <software name="prizefig">
4390      <!-- source toseciso
4391      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 1 of 2)[!].cue" size="301" crc="6caf1452" />
4392      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="346562560" crc="3c4783bc" />
4393      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="1528844" crc="409d75fa" />
1940<!--
1941    <software name="nos1907">
1942        <description>Nostalgia 1907 in North Atlantic Sea (Jpn)</description>
1943        <year>1991</year>
1944        <publisher>Takeru</publisher>
1945        <part name="cdrom" interface="scd_cdrom">
1946            <diskarea name="cdrom">
1947                <disk name="nostalgia 1907 in north atlantic sea (1991)(takeru)(ntsc)(jp)[!]" sha1="fafc810783ff5620de01c4f405871e184b2938ea"/>
1948            </diskarea>
1949        </part>
1950    </software>
1951-->
43941952
4395      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 2 of 2)[!].cue" size="301" crc="58d1e74b" />
4396      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 1 of 2)[!].iso" size="408199168" crc="3ecc7df9" />
4397      <rom name="Prize Fighter (1993)(Sega)(NTSC)(JP)(Disc 2 of 2)(Track 2 of 2)[!].wav" size="1528844" crc="409d75fa" />
4398      -->
1953<!--
1954    <software name="popmail">
1955        <description>Popful Mail (Jpn)</description>
1956        <year>1994</year>
1957        <publisher>Sega</publisher>
1958        <part name="cdrom" interface="scd_cdrom">
1959            <diskarea name="cdrom">
1960                <disk name="popful mail (1994)(sega)(ntsc)(jp)[!]" sha1="0980ea9d02b51096306feede7f7fbb8ad2afde1b"/>
1961            </diskarea>
1962        </part>
1963    </software>
1964-->
1965
1966<!--
1967    <software name="princep">
1968        <description>Prince of Persia (Jpn)</description>
1969        <year>1992</year>
1970        <publisher>Victor Entertainment</publisher>
1971        <part name="cdrom" interface="scd_cdrom">
1972            <diskarea name="cdrom">
1973                <disk name="prince of persia (1992)(victor)(ntsc)(jp)(en)[!]" sha1="a1dcc27e406477753f4e3c4058951d4be1174c43"/>
1974            </diskarea>
1975        </part>
1976    </software>
1977-->
1978
1979   <software name="prizefig">
43991980      <description>Prize Fighter (Jpn)</description>
44001981      <year>1995</year>
44011982      <publisher>Sega</publisher>
r242703r242704
44151996      </part>
44161997   </software>
44171998
1999
2000<!--
2001    <software name="suplegpy">
2002        <description>Pro Yakyuu Super League CD (Jpn)</description>
2003        <year>1992</year>
2004        <publisher>Sega</publisher>
2005        <part name="cdrom" interface="scd_cdrom">
2006            <diskarea name="cdrom">
2007                <disk name="pro yakyuu super league cd (1992)(sega)(ntsc)(jp)[!]" sha1="c73797ec412342c5fe9dcfe3f2811ccc36990af9"/>
2008            </diskarea>
2009        </part>
2010    </software>
2011-->
2012
44182013   <software name="psychic3">
4419      <!-- source toseciso
4420      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)[!].cue" size="1146" crc="a10fe2a2" />
4421      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 1 of 7)[!].iso" size="32634880" crc="4602b34e" />
4422      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 2 of 7)[!].wav" size="5689532" crc="a723721c" />
4423      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 3 of 7)[!].wav" size="17863484" crc="ecbae13f" />
4424      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 4 of 7)[!].wav" size="37093436" crc="71480b86" />
4425      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 5 of 7)[!].wav" size="51955724" crc="7e8eba08" />
4426      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 6 of 7)[!].wav" size="34983692" crc="7a211cdc" />
4427      <rom name="Psychic Detective Series vol.3 - AYA (1993)(Data West)(NTSC)(JP)(Track 7 of 7)[!].wav" size="58724780" crc="fff3e6a0" />
4428      -->
44292014      <description>Psychic Detective Series vol.3 - AYA (Jpn)</description>
44302015      <year>1993</year>
44312016      <publisher>Data West</publisher>
r242703r242704
44402025   </software>
44412026
44422027   <software name="psychic4">
4443      <!-- source toseciso
4444      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)[!].cue" size="1160" crc="c79a1ec1" />
4445      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 1 of 7)[!].iso" size="140118016" crc="ca1c5712" />
4446      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 2 of 7)[!].wav" size="6249308" crc="bcdf4a99" />
4447      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 3 of 7)[!].wav" size="51791084" crc="9d6ae9b8" />
4448      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 4 of 7)[!].wav" size="31634444" crc="eaf65896" />
4449      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 5 of 7)[!].wav" size="22384028" crc="2cccf2ec" />
4450      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 6 of 7)[!].wav" size="26570588" crc="31f96ca5" />
4451      <rom name="Psychic Detective Series vol.4 - Orgel (1993)(Data West)(NTSC)(JP)(Track 7 of 7)[!].wav" size="28565084" crc="3d533b3d" />
4452      -->
44532028      <description>Psychic Detective Series vol.4 - Orgel (Jpn)</description>
44542029      <year>1993</year>
44552030      <publisher>Data West</publisher>
r242703r242704
44652040
44662041   <!-- one of these probably matches the REDUMP image-->
44672042   <software name="quizssa" cloneof="quizss">
4468      <!-- source toseciso
4469      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)[!][G-6003P-00014B-R1M].cue" size="6770" crc="77c402ec" />
4470      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 01 of 41)[!][G-6003P-00014B-R1M].iso" size="24608768" crc="bf09f1f2" />
4471      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 02 of 41)[!][G-6003P-00014B-R1M].wav" size="11999948" crc="0c9b451d" />
4472      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 03 of 41)[!][G-6003P-00014B-R1M].wav" size="13307660" crc="1ebc5776" />
4473      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 04 of 41)[!][G-6003P-00014B-R1M].wav" size="16400540" crc="e113ec68" />
4474      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 05 of 41)[!][G-6003P-00014B-R1M].wav" size="6505676" crc="55167f94" />
4475      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 06 of 41)[!][G-6003P-00014B-R1M].wav" size="18987740" crc="ed535450" />
4476      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 07 of 41)[!][G-6003P-00014B-R1M].wav" size="1872236" crc="ba3dcb65" />
4477      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 08 of 41)[!][G-6003P-00014B-R1M].wav" size="1827548" crc="f211bf9b" />
4478      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 09 of 41)[!][G-6003P-00014B-R1M].wav" size="1653500" crc="fee49efd" />
4479      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 10 of 41)[!][G-6003P-00014B-R1M].wav" size="1074908" crc="4e13addb" />
4480      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 11 of 41)[!][G-6003P-00014B-R1M].wav" size="1067852" crc="05338bd4" />
4481      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 12 of 41)[!][G-6003P-00014B-R1M].wav" size="8558972" crc="bd65c51e" />
4482      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 13 of 41)[!][G-6003P-00014B-R1M].wav" size="3097628" crc="6067d929" />
4483      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 14 of 41)[!][G-6003P-00014B-R1M].wav" size="3944348" crc="457b1a29" />
4484      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 15 of 41)[!][G-6003P-00014B-R1M].wav" size="2650748" crc="c7e8f277" />
4485      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 16 of 41)[!][G-6003P-00014B-R1M].wav" size="3756188" crc="4f327274" />
4486      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 17 of 41)[!][G-6003P-00014B-R1M].wav" size="2034524" crc="524346c1" />
4487      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 18 of 41)[!][G-6003P-00014B-R1M].wav" size="3203468" crc="e49a6720" />
4488      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 19 of 41)[!][G-6003P-00014B-R1M].wav" size="3085868" crc="3140abf3" />
4489      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 20 of 41)[!][G-6003P-00014B-R1M].wav" size="5738924" crc="8acc87fc" />
4490      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 21 of 41)[!][G-6003P-00014B-R1M].wav" size="4372412" crc="5b96bcd3" />
4491      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 22 of 41)[!][G-6003P-00014B-R1M].wav" size="3156428" crc="8873e76f" />
4492      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 23 of 41)[!][G-6003P-00014B-R1M].wav" size="4685228" crc="05b542c0" />
4493      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 24 of 41)[!][G-6003P-00014B-R1M].wav" size="1070204" crc="4cd3e49d" />
4494      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 25 of 41)[!][G-6003P-00014B-R1M].wav" size="1074908" crc="cde0481f" />
4495      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 26 of 41)[!][G-6003P-00014B-R1M].wav" size="1074908" crc="1e7fc9aa" />
4496      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 27 of 41)[!][G-6003P-00014B-R1M].wav" size="1486508" crc="b21f4375" />
4497      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 28 of 41)[!][G-6003P-00014B-R1M].wav" size="1248956" crc="77b0d9d6" />
4498      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 29 of 41)[!][G-6003P-00014B-R1M].wav" size="1063148" crc="c657a70b" />
4499      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 30 of 41)[!][G-6003P-00014B-R1M].wav" size="1063148" crc="a4cafe92" />
4500      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 31 of 41)[!][G-6003P-00014B-R1M].wav" size="1065500" crc="f7d3a55a" />
4501      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 32 of 41)[!][G-6003P-00014B-R1M].wav" size="1587644" crc="bca54f46" />
4502      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 33 of 41)[!][G-6003P-00014B-R1M].wav" size="1063148" crc="94e7c60c" />
4503      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 34 of 41)[!][G-6003P-00014B-R1M].wav" size="1077260" crc="7e46ef9d" />
4504      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 35 of 41)[!][G-6003P-00014B-R1M].wav" size="1081964" crc="65886d5c" />
4505      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 36 of 41)[!][G-6003P-00014B-R1M].wav" size="1070204" crc="0388661a" />
4506      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 37 of 41)[!][G-6003P-00014B-R1M].wav" size="1237196" crc="29693798" />
4507      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 38 of 41)[!][G-6003P-00014B-R1M].wav" size="1326572" crc="cbfec63e" />
4508      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 39 of 41)[!][G-6003P-00014B-R1M].wav" size="1952204" crc="9dfa3d69" />
4509      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 40 of 41)[!][G-6003P-00014B-R1M].wav" size="1067852" crc="92e6a974" />
4510      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 41 of 41)[!][G-6003P-00014B-R1M].wav" size="1176044" crc="5cf02565" />
4511      -->
2043      <!-- Diskring: G-6003P-00014B-R1M -->
45122044      <description>Quiz Scramble Special (Jpn, R1M)</description>
45132045      <year>1992</year>
45142046      <publisher>Sega</publisher>
45152047      <info name="serial" value="G-6003"/>
4516      <info name="disk_ring" value="G-6003P-00014B-R1M"/>
45172048      <info name="release" value="19920529"/>
45182049      <info name="alt_title" value="クイズスクランブルスペシャル"/>
45192050      <part name="cdrom" interface="scd_cdrom">
r242703r242704
45242055   </software>
45252056
45262057   <software name="quizssb" cloneof="quizss">
4527      <!-- source toseciso
4528      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)[!][G-6003P-00014B-R2M].cue" size="6770" crc="0cfc674d" />
4529      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 01 of 41)[!][G-6003P-00014B-R2M].iso" size="24608768" crc="bf09f1f2" />
4530      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 02 of 41)[!][G-6003P-00014B-R2M].wav" size="11999948" crc="2c6ebe67" />
4531      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 03 of 41)[!][G-6003P-00014B-R2M].wav" size="13307660" crc="4920faca" />
4532      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 04 of 41)[!][G-6003P-00014B-R2M].wav" size="16400540" crc="d17f090c" />
4533      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 05 of 41)[!][G-6003P-00014B-R2M].wav" size="6505676" crc="18438cbd" />
4534      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 06 of 41)[!][G-6003P-00014B-R2M].wav" size="18987740" crc="2fd9c8bb" />
4535      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 07 of 41)[!][G-6003P-00014B-R2M].wav" size="1872236" crc="1750df67" />
4536      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 08 of 41)[!][G-6003P-00014B-R2M].wav" size="1827548" crc="b2d6ffc3" />
4537      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 09 of 41)[!][G-6003P-00014B-R2M].wav" size="1653500" crc="c7ec0188" />
4538      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 10 of 41)[!][G-6003P-00014B-R2M].wav" size="1074908" crc="998cd623" />
4539      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 11 of 41)[!][G-6003P-00014B-R2M].wav" size="1067852" crc="d613d12e" />
4540      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 12 of 41)[!][G-6003P-00014B-R2M].wav" size="8558972" crc="3e88a848" />
4541      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 13 of 41)[!][G-6003P-00014B-R2M].wav" size="3097628" crc="85a746d8" />
4542      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 14 of 41)[!][G-6003P-00014B-R2M].wav" size="3944348" crc="516afc1f" />
4543      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 15 of 41)[!][G-6003P-00014B-R2M].wav" size="2650748" crc="6db3ea40" />
4544      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 16 of 41)[!][G-6003P-00014B-R2M].wav" size="3756188" crc="948d55b2" />
4545      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 17 of 41)[!][G-6003P-00014B-R2M].wav" size="2034524" crc="7586ca9c" />
4546      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 18 of 41)[!][G-6003P-00014B-R2M].wav" size="3201116" crc="deaf4b2d" />
4547      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 19 of 41)[!][G-6003P-00014B-R2M].wav" size="3088220" crc="3a80f79b" />
4548      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 20 of 41)[!][G-6003P-00014B-R2M].wav" size="5738924" crc="14402ecc" />
4549      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 21 of 41)[!][G-6003P-00014B-R2M].wav" size="4372412" crc="e7f221a4" />
4550      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 22 of 41)[!][G-6003P-00014B-R2M].wav" size="3156428" crc="1a899a45" />
4551      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 23 of 41)[!][G-6003P-00014B-R2M].wav" size="4685228" crc="6bb375d8" />
4552      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 24 of 41)[!][G-6003P-00014B-R2M].wav" size="1070204" crc="0cb7bc39" />
4553      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 25 of 41)[!][G-6003P-00014B-R2M].wav" size="1074908" crc="bd0359c8" />
4554      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 26 of 41)[!][G-6003P-00014B-R2M].wav" size="1074908" crc="1aa5e0cc" />
4555      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 27 of 41)[!][G-6003P-00014B-R2M].wav" size="1486508" crc="abf9e4ba" />
4556      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 28 of 41)[!][G-6003P-00014B-R2M].wav" size="1248956" crc="11270f36" />
4557      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 29 of 41)[!][G-6003P-00014B-R2M].wav" size="1063148" crc="3e258a96" />
4558      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 30 of 41)[!][G-6003P-00014B-R2M].wav" size="1063148" crc="ee1659e9" />
4559      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 31 of 41)[!][G-6003P-00014B-R2M].wav" size="1065500" crc="bf111083" />
4560      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 32 of 41)[!][G-6003P-00014B-R2M].wav" size="1587644" crc="ff7e3e28" />
4561      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 33 of 41)[!][G-6003P-00014B-R2M].wav" size="1063148" crc="c6689798" />
4562      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 34 of 41)[!][G-6003P-00014B-R2M].wav" size="1077260" crc="02a743c9" />
4563      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 35 of 41)[!][G-6003P-00014B-R2M].wav" size="1081964" crc="a87cc285" />
4564      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 36 of 41)[!][G-6003P-00014B-R2M].wav" size="1070204" crc="b94d7d7e" />
4565      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 37 of 41)[!][G-6003P-00014B-R2M].wav" size="1237196" crc="e115c008" />
4566      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 38 of 41)[!][G-6003P-00014B-R2M].wav" size="1326572" crc="fefa88d9" />
4567      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 39 of 41)[!][G-6003P-00014B-R2M].wav" size="1952204" crc="404c7107" />
4568      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 40 of 41)[!][G-6003P-00014B-R2M].wav" size="1067852" crc="d8ed2233" />
4569      <rom name="Quiz Scramble Special (1992)(Sega)(NTSC)(JP)(Track 41 of 41)[!][G-6003P-00014B-R2M].wav" size="1176044" crc="d95aae43" />
4570      -->
2058      <!-- Diskring: G-6003P-00014B-R2M -->
45712059      <description>Quiz Scramble Special (Jpn, R2M)</description>
45722060      <year>1992</year>
45732061      <publisher>Sega</publisher>
45742062      <info name="serial" value="G-6003"/>
4575      <info name="disk_ring" value="G-6003P-00014B-R2M"/>
45762063      <info name="release" value="19920529"/>
45772064      <info name="alt_title" value="クイズスクランブルスペシャル"/>
45782065      <part name="cdrom" interface="scd_cdrom">
r242703r242704
45822069      </part>
45832070   </software>
45842071
2072<!--
2073    <software name="ranma">
2074        <description>Ranma Nibun no Ichi 1/2 - Byakuran Aika (Jpn)</description>
2075        <year>1993</year>
2076        <publisher>Masaya</publisher>
2077        <part name="cdrom" interface="scd_cdrom">
2078            <diskarea name="cdrom">
2079                <disk name="ranma nibun no ichi 1-2 - byakuran aika (1993)(masaya)(ntsc)(jp)[!]" sha1="d222a6d3c8fd237671f853a4c105c59687cf642b"/>
2080            </diskarea>
2081        </part>
2082    </software>
2083-->
2084
2085<!--
2086    <software name="risedrag">
2087        <description>Rise of the Dragon - A Blade Hunter Mystery (Jpn)</description>
2088        <year>1992</year>
2089        <publisher>Sega</publisher>
2090        <part name="cdrom" interface="scd_cdrom">
2091            <diskarea name="cdrom">
2092                <disk name="rise of the dragon - a blade hunter mystery (1992)(sega)(ntsc)(jp)[!]" sha1="20715a2384f9e008e22568d1699ed377c8636927"/>
2093            </diskarea>
2094        </part>
2095    </software>
2096-->
2097
45852098   <software name="rbfx">
4586      <!-- source toseciso
4587      <rom name="Road Blaster FX (1992)(Wolf Team)(NTSC)(JP)(en)[!].cue" size="589" crc="78b59c82" />
4588      <rom name="Road Blaster FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 1 of 4)[!].iso" size="276729856" crc="0cd3a154" />
4589      <rom name="Road Blaster FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 2 of 4)[!].wav" size="2314412" crc="99efe690" />
4590      <rom name="Road Blaster FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 3 of 4)[!].wav" size="2065100" crc="8ea2a9f5" />
4591      <rom name="Road Blaster FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 4 of 4)[!].wav" size="13702796" crc="f104ca19" />
4592      -->
45932099      <description>Road Blaster FX (Jpn)</description>
45942100      <year>1992</year>
45952101      <publisher>Wolf Team</publisher>
r242703r242704
46032109      </part>
46042110   </software>
46052111
2112<!--
2113    <software name="sangok3">
2114        <description>Sangokushi III (Jpn)</description>
2115        <year>1993</year>
2116        <publisher>Koei</publisher>
2117        <part name="cdrom" interface="scd_cdrom">
2118            <diskarea name="cdrom">
2119                <disk name="sangokushi iii (1993)(koei)(ntsc)(jp)[!]" sha1="65012dc2e23400e9a6cf812448f019edae00ccc0"/>
2120            </diskarea>
2121        </part>
2122    </software>
2123-->
2124
46062125   <software name="monkey">
4607      <!-- source toseciso
4608      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)[!].cue" size="5297" crc="711581d8" />
4609      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 01 of 27)[!].iso" size="15982592" crc="cd805587" />
4610      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 02 of 27)[!].wav" size="21179804" crc="c87418bc" />
4611      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 03 of 27)[!].wav" size="22186460" crc="1b4e5efe" />
4612      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 04 of 27)[!].wav" size="22028876" crc="bd22ffcd" />
4613      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 05 of 27)[!].wav" size="20669420" crc="d8b69d24" />
4614      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 06 of 27)[!].wav" size="22635692" crc="1e664725" />
4615      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 07 of 27)[!].wav" size="2236796" crc="fd646c98" />
4616      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 08 of 27)[!].wav" size="12820796" crc="5811cdd2" />
4617      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 09 of 27)[!].wav" size="24660764" crc="e77a05cb" />
4618      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 10 of 27)[!].wav" size="22113548" crc="f12fd950" />
4619      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 11 of 27)[!].wav" size="16685132" crc="263d7e97" />
4620      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 12 of 27)[!].wav" size="24686636" crc="7af62329" />
4621      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 13 of 27)[!].wav" size="21859532" crc="13e76fc8" />
4622      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 14 of 27)[!].wav" size="3473948" crc="2b54bd4b" />
4623      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 15 of 27)[!].wav" size="27906524" crc="5e859e03" />
4624      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 16 of 27)[!].wav" size="26575292" crc="f8c548b6" />
4625      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 17 of 27)[!].wav" size="39290204" crc="d7413046" />
4626      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 18 of 27)[!].wav" size="28252268" crc="78a54e52" />
4627      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 19 of 27)[!].wav" size="28129964" crc="348174c7" />
4628      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 20 of 27)[!].wav" size="3255212" crc="4c4b011b" />
4629      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 21 of 27)[!].wav" size="3582140" crc="b4651379" />
4630      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 22 of 27)[!].wav" size="23849324" crc="e1e34786" />
4631      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 23 of 27)[!].wav" size="18028124" crc="172ad9ab" />
4632      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 24 of 27)[!].wav" size="1773452" crc="24c048bf" />
4633      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 25 of 27)[!].wav" size="2227388" crc="b518967a" />
4634      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 26 of 27)[!].wav" size="11176748" crc="c68d39eb" />
4635      <rom name="Secret of Monkey Island, The - Monkey Island Yurei - Kaizoku Oosoudou! (1993)(Victor)(NTSC)(JP)(Track 27 of 27)[!].wav" size="10243004" crc="4f67b8c1" />
4636      -->
46372126      <description>The Secret of Monkey Island - Monkey Island Yurei - Kaizoku Oosoudou! (Jpn)</description>
46382127      <year>1993</year>
46392128      <publisher>Victor Entertainment</publisher>
r242703r242704
46492138
46502139   <!-- one of these probably matches the REDUMP image -->
46512140   <software name="segaaca" cloneof="segaac">
4652      <!-- source toseciso
4653      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)[!][compilation][G-6012P-00024-2-R1M].cue" size="2477" crc="25ddd4e0" />
4654      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 01 of 12)[!][compilation][G-6012P-00024-2-R1M].iso" size="21899264" crc="99bcfc48" />
4655      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 02 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="15963068" crc="f942c9a6" />
4656      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 03 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="3826748" crc="cfe8296e" />
4657      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 04 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="8996444" crc="e859876b" />
4658      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 05 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="28929644" crc="7be45951" />
4659      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 06 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="23912828" crc="fb3086b0" />
4660      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 07 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="15810188" crc="54cb4580" />
4661      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 08 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="21791324" crc="6dc730e3" />
4662      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 09 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="25646252" crc="9682c695" />
4663      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 10 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="23696444" crc="10e23f13" />
4664      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 11 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="3709148" crc="99a3f4e7" />
4665      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 12 of 12)[!][compilation][G-6012P-00024-2-R1M].wav" size="12169292" crc="4df03bd7" />
4666      -->
46672141      <description>Sega Classic Arcade Collection - Limited Edition (Jpn, R1M)</description>
46682142      <year>1993</year>
46692143      <publisher>Sega</publisher>
46702144      <info name="serial" value="G-6012"/>
4671      <info name="disk_ring" value="G-6012P-00024-2-R1M"/>
46722145      <info name="release" value="19930423"/>
46732146      <info name="alt_title" value="セガクラシック"/>
46742147      <part name="cdrom" interface="scd_cdrom">
r242703r242704
46792152   </software>
46802153
46812154   <software name="segaacb" cloneof="segaac">
4682      <!-- source toseciso
4683      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)[!][compilation][G-6012P-00024-2-R2M].cue" size="2477" crc="4a60909c" />
4684      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 01 of 12)[!][compilation][G-6012P-00024-2-R2M].iso" size="21899264" crc="99bcfc48" />
4685      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 02 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="15963068" crc="727c66a9" />
4686      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 03 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="3826748" crc="c25a25c2" />
4687      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 04 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="8996444" crc="b1dc92a9" />
4688      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 05 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="28929644" crc="19bcc621" />
4689      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 06 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="23912828" crc="b1472348" />
4690      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 07 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="15810188" crc="1624cc5f" />
4691      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 08 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="21791324" crc="63e8c52a" />
4692      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 09 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="25646252" crc="d903ac87" />
4693      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 10 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="23694092" crc="182fb729" />
4694      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 11 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="3711500" crc="684b3091" />
4695      <rom name="Sega Classic Arcade Collection - Limited Edition (1992)(Sega)(NTSC)(JP)(Track 12 of 12)[!][compilation][G-6012P-00024-2-R2M].wav" size="12169292" crc="9406c05f" />
4696      -->
46972155      <description>Sega Classic Arcade Collection - Limited Edition (Jpn, R2M)</description>
46982156      <year>1993</year>
46992157      <publisher>Sega</publisher>
47002158      <info name="serial" value="G-6012"/>
4701      <info name="disk_ring" value="G-6012P-00024-2-R2M"/>
47022159      <info name="release" value="19930423"/>
47032160      <info name="alt_title" value="セガクラシック"/>
47042161      <part name="cdrom" interface="scd_cdrom">
r242703r242704
47082165      </part>
47092166   </software>
47102167
2168<!--
2169    <software name="3x3eyes">
2170        <description>Seima Densetsu 3x3 Eyes (Jpn)</description>
2171        <year>1993</year>
2172        <publisher>Sega</publisher>
2173        <part name="cdrom" interface="scd_cdrom">
2174            <diskarea name="cdrom">
2175                <disk name="seima densetsu 3x3 eyes (1993)(sega)(ntsc)(jp)[!]" sha1="aec46e2945a47cceeb78c9b2707bb977086da3a2"/>
2176            </diskarea>
2177        </part>
2178    </software>
2179-->
2180
47112181   <!-- one of these probably matches the REDUMP dump -->
47122182   <software name="fheyareaa" cloneof="fheyarea">
4713      <!-- source toseciso
4714      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)[!][T-32034P-00009-R1K].cue" size="15050" crc="6c9fa1d1" />
4715      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 01 of 85)[!][T-32034P-00009-R1K].iso" size="14180352" crc="0452b881" />
4716      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 02 of 85)[!][T-32034P-00009-R1K].wav" size="769148" crc="8cbc0a19" />
4717      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 03 of 85)[!][T-32034P-00009-R1K].wav" size="1150172" crc="8514fbad" />
4718      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 04 of 85)[!][T-32034P-00009-R1K].wav" size="1286588" crc="9f92503e" />
4719      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 05 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="7b812397" />
4720      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 06 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="3dfdcb17" />
4721      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 07 of 85)[!][T-32034P-00009-R1K].wav" size="1084316" crc="3c716048" />
4722      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 08 of 85)[!][T-32034P-00009-R1K].wav" size="1143116" crc="cb460f59" />
4723      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 09 of 85)[!][T-32034P-00009-R1K].wav" size="1201916" crc="9973c07a" />
4724      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 10 of 85)[!][T-32034P-00009-R1K].wav" size="1223084" crc="25890d03" />
4725      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 11 of 85)[!][T-32034P-00009-R1K].wav" size="1213676" crc="f78371fa" />
4726      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 12 of 85)[!][T-32034P-00009-R1K].wav" size="1260716" crc="2be4e14a" />
4727      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 13 of 85)[!][T-32034P-00009-R1K].wav" size="1074908" crc="a102aaa9" />
4728      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 14 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="ba05bb88" />
4729      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 15 of 85)[!][T-32034P-00009-R1K].wav" size="1164284" crc="5b27f6c1" />
4730      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 16 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="6733991e" />
4731      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 17 of 85)[!][T-32034P-00009-R1K].wav" size="1121948" crc="f0e3f1fa" />
4732      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 18 of 85)[!][T-32034P-00009-R1K].wav" size="1307756" crc="128a6823" />
4733      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 19 of 85)[!][T-32034P-00009-R1K].wav" size="1239548" crc="428d2a0e" />
4734      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 20 of 85)[!][T-32034P-00009-R1K].wav" size="1321868" crc="cbdfb837" />
4735      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 21 of 85)[!][T-32034P-00009-R1K].wav" size="1246604" crc="0dd4f844" />
4736      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 22 of 85)[!][T-32034P-00009-R1K].wav" size="1225436" crc="9f953d7f" />
4737      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 23 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="a8180aca" />
4738      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 24 of 85)[!][T-32034P-00009-R1K].wav" size="1065500" crc="fceaac82" />
4739      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 25 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="12c28015" />
4740      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 26 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="7834d9ea" />
4741      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 27 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="5f75443b" />
4742      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 28 of 85)[!][T-32034P-00009-R1K].wav" size="1291292" crc="0a1722f7" />
4743      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 29 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="fbe0ebfe" />
4744      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 30 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="2d2a7e34" />
4745      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 31 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="aaf623cd" />
4746      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 32 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="2843dd77" />
4747      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 33 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="d3b7b9d9" />
4748      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 34 of 85)[!][T-32034P-00009-R1K].wav" size="1159580" crc="31fdf098" />
4749      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 35 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="039bac1e" />
4750      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 36 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="9724cfc3" />
4751      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 37 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="d5d55577" />
4752      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 38 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="89e384e8" />
4753      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 39 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="db4e1a2d" />
4754      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 40 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="32874af9" />
4755      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 41 of 85)[!][T-32034P-00009-R1K].wav" size="1359500" crc="65879bad" />
4756      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 42 of 85)[!][T-32034P-00009-R1K].wav" size="1265420" crc="09e4ace9" />
4757      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 43 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="0e660629" />
4758      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 44 of 85)[!][T-32034P-00009-R1K].wav" size="1580588" crc="e6d06442" />
4759      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 45 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="ea3916c4" />
4760      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 46 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="e32aa65b" />
4761      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 47 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="fb19c6e9" />
4762      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 48 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="c4958b8b" />
4763      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 49 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="b940d6c2" />
4764      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 50 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="5ed6c718" />
4765      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 51 of 85)[!][T-32034P-00009-R1K].wav" size="1907516" crc="b16ff5cf" />
4766      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 52 of 85)[!][T-32034P-00009-R1K].wav" size="1898108" crc="89b2eac6" />
4767      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 53 of 85)[!][T-32034P-00009-R1K].wav" size="1684076" crc="78557679" />
4768      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 54 of 85)[!][T-32034P-00009-R1K].wav" size="2601356" crc="c1a89a24" />
4769      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 55 of 85)[!][T-32034P-00009-R1K].wav" size="2180348" crc="9d2bcfc3" />
4770      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 56 of 85)[!][T-32034P-00009-R1K].wav" size="3208172" crc="66ad1ea1" />
4771      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 57 of 85)[!][T-32034P-00009-R1K].wav" size="2653100" crc="b8bfd3ac" />
4772      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 58 of 85)[!][T-32034P-00009-R1K].wav" size="2432012" crc="db0917c4" />
4773      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 59 of 85)[!][T-32034P-00009-R1K].wav" size="4372412" crc="c6ea6d5d" />
4774      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 60 of 85)[!][T-32034P-00009-R1K].wav" size="33139724" crc="abc2dcdd" />
4775      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 61 of 85)[!][T-32034P-00009-R1K].wav" size="26424764" crc="cc1cb2f1" />
4776      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 62 of 85)[!][T-32034P-00009-R1K].wav" size="17261372" crc="856c01f1" />
4777      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 63 of 85)[!][T-32034P-00009-R1K].wav" size="43446188" crc="5e61fdab" />
4778      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 64 of 85)[!][T-32034P-00009-R1K].wav" size="21454988" crc="d0e17094" />
4779      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 65 of 85)[!][T-32034P-00009-R1K].wav" size="29668172" crc="d609c1c5" />
4780      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 66 of 85)[!][T-32034P-00009-R1K].wav" size="25302860" crc="1bd454ca" />
4781      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 67 of 85)[!][T-32034P-00009-R1K].wav" size="25533356" crc="cf025560" />
4782      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 68 of 85)[!][T-32034P-00009-R1K].wav" size="28466300" crc="f34d1c72" />
4783      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 69 of 85)[!][T-32034P-00009-R1K].wav" size="14620076" crc="2e827a0a" />
4784      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 70 of 85)[!][T-32034P-00009-R1K].wav" size="20530652" crc="d8c5071e" />
4785      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 71 of 85)[!][T-32034P-00009-R1K].wav" size="31989596" crc="0ac04283" />
4786      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 72 of 85)[!][T-32034P-00009-R1K].wav" size="29611724" crc="b970ceb7" />
4787      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 73 of 85)[!][T-32034P-00009-R1K].wav" size="25298156" crc="5d6a2d8a" />
4788      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 74 of 85)[!][T-32034P-00009-R1K].wav" size="26695244" crc="54e02df4" />
4789      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 75 of 85)[!][T-32034P-00009-R1K].wav" size="1921628" crc="2f28fa14" />
4790      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 76 of 85)[!][T-32034P-00009-R1K].wav" size="2422604" crc="cde1fe1d" />
4791      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 77 of 85)[!][T-32034P-00009-R1K].wav" size="2083916" crc="c01189c4" />
4792      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 78 of 85)[!][T-32034P-00009-R1K].wav" size="1063148" crc="66b646be" />
4793      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 79 of 85)[!][T-32034P-00009-R1K].wav" size="6926684" crc="31014cfd" />
4794      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 80 of 85)[!][T-32034P-00009-R1K].wav" size="1808732" crc="b170e7c7" />
4795      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 81 of 85)[!][T-32034P-00009-R1K].wav" size="2392028" crc="35246ac9" />
4796      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 82 of 85)[!][T-32034P-00009-R1K].wav" size="1651148" crc="723fcf2b" />
4797      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 83 of 85)[!][T-32034P-00009-R1K].wav" size="19474604" crc="972a825d" />
4798      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 84 of 85)[!][T-32034P-00009-R1K].wav" size="23284844" crc="299f46b1" />
4799      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 85 of 85)[!][T-32034P-00009-R1K].wav" size="51076076" crc="967acd0b" />
4800      -->
2183      <!-- Diskring: T-32034P-00009-R1K -->
48012184      <description>Seirei Shinseiki - Fhey Area (Jpn, R1K)</description>
48022185      <year>1992</year>
48032186      <publisher>Wolf Team</publisher>
48042187      <info name="serial" value="T-32034"/>
4805      <info name="disk_ring" value="T-32034P-00009-R1K"/>
48062188      <info name="release" value="19920218"/>
48072189      <info name="alt_title" value="精霊神世紀フェイエリア"/>
48082190      <part name="cdrom" interface="scd_cdrom">
r242703r242704
48132195   </software>
48142196
48152197   <software name="fheyareab" cloneof="fheyarea">
4816      <!-- source toseciso
4817      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)[!][T-32034P-00009-R2K].cue" size="15050" crc="6c61ba62" />
4818      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 01 of 85)[!][T-32034P-00009-R2K].iso" size="14180352" crc="0452b881" />
4819      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 02 of 85)[!][T-32034P-00009-R2K].wav" size="769148" crc="a9d3686f" />
4820      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 03 of 85)[!][T-32034P-00009-R2K].wav" size="1150172" crc="8c10a0f2" />
4821      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 04 of 85)[!][T-32034P-00009-R2K].wav" size="1286588" crc="a134ad07" />
4822      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 05 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="831e25af" />
4823      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 06 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="27ede339" />
4824      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 07 of 85)[!][T-32034P-00009-R2K].wav" size="1084316" crc="dd434b53" />
4825      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 08 of 85)[!][T-32034P-00009-R2K].wav" size="1143116" crc="1793df49" />
4826      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 09 of 85)[!][T-32034P-00009-R2K].wav" size="1201916" crc="19951152" />
4827      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 10 of 85)[!][T-32034P-00009-R2K].wav" size="1223084" crc="cb9b0a01" />
4828      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 11 of 85)[!][T-32034P-00009-R2K].wav" size="1213676" crc="064e7cd7" />
4829      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 12 of 85)[!][T-32034P-00009-R2K].wav" size="1260716" crc="ba3a901d" />
4830      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 13 of 85)[!][T-32034P-00009-R2K].wav" size="1074908" crc="86799086" />
4831      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 14 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="22203034" />
4832      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 15 of 85)[!][T-32034P-00009-R2K].wav" size="1164284" crc="f7572b33" />
4833      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 16 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="11fdacd8" />
4834      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 17 of 85)[!][T-32034P-00009-R2K].wav" size="1121948" crc="f01eedeb" />
4835      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 18 of 85)[!][T-32034P-00009-R2K].wav" size="1307756" crc="f3453e36" />
4836      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 19 of 85)[!][T-32034P-00009-R2K].wav" size="1239548" crc="b2fdd8a2" />
4837      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 20 of 85)[!][T-32034P-00009-R2K].wav" size="1321868" crc="47f76985" />
4838      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 21 of 85)[!][T-32034P-00009-R2K].wav" size="1246604" crc="b18f2283" />
4839      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 22 of 85)[!][T-32034P-00009-R2K].wav" size="1225436" crc="bbc83e70" />
4840      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 23 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="b6111157" />
4841      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 24 of 85)[!][T-32034P-00009-R2K].wav" size="1065500" crc="f7d19080" />
4842      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 25 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="0115f590" />
4843      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 26 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="cb49d54e" />
4844      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 27 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="072d68bd" />
4845      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 28 of 85)[!][T-32034P-00009-R2K].wav" size="1291292" crc="332df826" />
4846      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 29 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="db66d3a1" />
4847      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 30 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="56b2268c" />
4848      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 31 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="bcb990bb" />
4849      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 32 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="50ba0d1d" />
4850      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 33 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="89c52a91" />
4851      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 34 of 85)[!][T-32034P-00009-R2K].wav" size="1159580" crc="bf21f448" />
4852      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 35 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="b5a5201e" />
4853      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 36 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="f888a97f" />
4854      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 37 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="d515060d" />
4855      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 38 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="cd28a931" />
4856      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 39 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="b4586858" />
4857      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 40 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="3943b81d" />
4858      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 41 of 85)[!][T-32034P-00009-R2K].wav" size="1359500" crc="57762d9c" />
4859      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 42 of 85)[!][T-32034P-00009-R2K].wav" size="1265420" crc="34435902" />
4860      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 43 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="89c9a81b" />
4861      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 44 of 85)[!][T-32034P-00009-R2K].wav" size="1580588" crc="8550d325" />
4862      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 45 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="e47b0ab3" />
4863      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 46 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="040db8d1" />
4864      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 47 of 85)[!][T-32034P-00009-R2K].wav" size="1060796" crc="e08820e9" />
4865      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 48 of 85)[!][T-32034P-00009-R2K].wav" size="1065500" crc="54cafdeb" />
4866      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 49 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="968f51af" />
4867      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 50 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="dc9da9c3" />
4868      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 51 of 85)[!][T-32034P-00009-R2K].wav" size="1907516" crc="3da8fe0b" />
4869      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 52 of 85)[!][T-32034P-00009-R2K].wav" size="1898108" crc="ff275972" />
4870      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 53 of 85)[!][T-32034P-00009-R2K].wav" size="1684076" crc="7ee03d30" />
4871      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 54 of 85)[!][T-32034P-00009-R2K].wav" size="2601356" crc="bce55fe3" />
4872      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 55 of 85)[!][T-32034P-00009-R2K].wav" size="2180348" crc="1b2b7741" />
4873      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 56 of 85)[!][T-32034P-00009-R2K].wav" size="3208172" crc="56868dd4" />
4874      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 57 of 85)[!][T-32034P-00009-R2K].wav" size="2653100" crc="f3b6e2ad" />
4875      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 58 of 85)[!][T-32034P-00009-R2K].wav" size="2432012" crc="f8ee3038" />
4876      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 59 of 85)[!][T-32034P-00009-R2K].wav" size="4372412" crc="03245469" />
4877      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 60 of 85)[!][T-32034P-00009-R2K].wav" size="33139724" crc="72bb1f3e" />
4878      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 61 of 85)[!][T-32034P-00009-R2K].wav" size="26424764" crc="7855a2a1" />
4879      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 62 of 85)[!][T-32034P-00009-R2K].wav" size="17261372" crc="546d0c2b" />
4880      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 63 of 85)[!][T-32034P-00009-R2K].wav" size="43446188" crc="70e4a72f" />
4881      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 64 of 85)[!][T-32034P-00009-R2K].wav" size="21454988" crc="3b52ab12" />
4882      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 65 of 85)[!][T-32034P-00009-R2K].wav" size="29668172" crc="d1c4268c" />
4883      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 66 of 85)[!][T-32034P-00009-R2K].wav" size="25302860" crc="f7382337" />
4884      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 67 of 85)[!][T-32034P-00009-R2K].wav" size="25533356" crc="f8381018" />
4885      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 68 of 85)[!][T-32034P-00009-R2K].wav" size="28466300" crc="ba4fea52" />
4886      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 69 of 85)[!][T-32034P-00009-R2K].wav" size="14620076" crc="da659a00" />
4887      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 70 of 85)[!][T-32034P-00009-R2K].wav" size="20530652" crc="ad5a209f" />
4888      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 71 of 85)[!][T-32034P-00009-R2K].wav" size="31989596" crc="7f3c462f" />
4889      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 72 of 85)[!][T-32034P-00009-R2K].wav" size="29611724" crc="0e4063a7" />
4890      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 73 of 85)[!][T-32034P-00009-R2K].wav" size="25298156" crc="0ea3a15d" />
4891      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 74 of 85)[!][T-32034P-00009-R2K].wav" size="26695244" crc="2faa90cd" />
4892      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 75 of 85)[!][T-32034P-00009-R2K].wav" size="1921628" crc="c90d6563" />
4893      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 76 of 85)[!][T-32034P-00009-R2K].wav" size="2422604" crc="de38ce16" />
4894      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 77 of 85)[!][T-32034P-00009-R2K].wav" size="2083916" crc="6f046735" />
4895      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 78 of 85)[!][T-32034P-00009-R2K].wav" size="1063148" crc="e4ec5c01" />
4896      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 79 of 85)[!][T-32034P-00009-R2K].wav" size="6926684" crc="eccf786f" />
4897      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 80 of 85)[!][T-32034P-00009-R2K].wav" size="1808732" crc="ca3bb45a" />
4898      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 81 of 85)[!][T-32034P-00009-R2K].wav" size="2392028" crc="6d884314" />
4899      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 82 of 85)[!][T-32034P-00009-R2K].wav" size="1651148" crc="b9bc7641" />
4900      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 83 of 85)[!][T-32034P-00009-R2K].wav" size="19474604" crc="a6db8254" />
4901      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 84 of 85)[!][T-32034P-00009-R2K].wav" size="23284844" crc="507327a8" />
4902      <rom name="Seirei Shinseiki - Fhey Area (1992)(Wolf Team)(NTSC)(JP)(Track 85 of 85)[!][T-32034P-00009-R2K].wav" size="51076076" crc="b7b3c759" />
4903      -->
2198      <!-- Diskring: T-32034P-00009-R2K -->
49042199      <description>Seirei Shinseiki - Fhey Area (Jpn, R2K)</description>
49052200      <year>1992</year>
49062201      <publisher>Wolf Team</publisher>
49072202      <info name="serial" value="T-32034"/>
4908      <info name="disk_ring" value="T-32034P-00009-R2K"/>
49092203      <info name="release" value="19920218"/>
49102204      <info name="alt_title" value="精霊神世紀フェイエリア"/>
49112205      <part name="cdrom" interface="scd_cdrom">
r242703r242704
49162210   </software>
49172211
49182212   <software name="sengoku">
4919      <!-- source toseciso
4920      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)[!].cue" size="4345" crc="8e00a86b" />
4921      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 01 of 31)[!].iso" size="13056000" crc="14f4cea0" />
4922      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 02 of 31)[!].wav" size="7077212" crc="352eb41b" />
4923      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 03 of 31)[!].wav" size="3946700" crc="a642813b" />
4924      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 04 of 31)[!].wav" size="17687084" crc="58ef5a69" />
4925      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 05 of 31)[!].wav" size="2053340" crc="1d3617a1" />
4926      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 06 of 31)[!].wav" size="15318620" crc="d8ce1ccd" />
4927      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 07 of 31)[!].wav" size="17560076" crc="f8d66ecd" />
4928      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 08 of 31)[!].wav" size="11858828" crc="cf1cb5ac" />
4929      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 09 of 31)[!].wav" size="17487164" crc="a7085923" />
4930      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 10 of 31)[!].wav" size="2930636" crc="2efce5e6" />
4931      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 11 of 31)[!].wav" size="12917228" crc="3f66960a" />
4932      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 12 of 31)[!].wav" size="18021068" crc="85569c44" />
4933      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 13 of 31)[!].wav" size="9937244" crc="7c71069f" />
4934      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 14 of 31)[!].wav" size="7479404" crc="d4602090" />
4935      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 15 of 31)[!].wav" size="10203020" crc="583d68d9" />
4936      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 16 of 31)[!].wav" size="14521292" crc="ed1ed898" />
4937      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 17 of 31)[!].wav" size="9629132" crc="dde0c0f3" />
4938      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 18 of 31)[!].wav" size="11825900" crc="fb6a5847" />
4939      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 19 of 31)[!].wav" size="8314364" crc="987f1dc2" />
4940      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 20 of 31)[!].wav" size="10548764" crc="dc1ff8c9" />
4941      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 21 of 31)[!].wav" size="10250060" crc="182f56f6" />
4942      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 22 of 31)[!].wav" size="9864332" crc="eda5960c" />
4943      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 23 of 31)[!].wav" size="8495468" crc="56f6111c" />
4944      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 24 of 31)[!].wav" size="8537804" crc="e67c570b" />
4945      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 25 of 31)[!].wav" size="9923132" crc="14694cf6" />
4946      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 26 of 31)[!].wav" size="11863532" crc="a65402e7" />
4947      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 27 of 31)[!].wav" size="2018060" crc="1f5c53d7" />
4948      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 28 of 31)[!].wav" size="10828652" crc="9edd7ab8" />
4949      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 29 of 31)[!].wav" size="14533052" crc="8d333360" />
4950      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 30 of 31)[!].wav" size="2093324" crc="01968d7e" />
4951      <rom name="Sengoku Denshou (1993)(Sammy)(NTSC)(JP)(Track 31 of 31)[!].wav" size="1620572" crc="dec5de32" />
4952      -->
49532213      <description>Sengoku Denshou (Jpn)</description>
49542214      <year>1993</year>
49552215      <publisher>Sammy</publisher>
r242703r242704
49632223      </part>
49642224   </software>
49652225
2226<!--
2227    <software name="beast2">
2228        <description>Shadow of the Beast II - Juushin no Jubaku (Jpn)</description>
2229        <year>1994</year>
2230        <publisher>Psygnosis</publisher>
2231        <part name="cdrom" interface="scd_cdrom">
2232            <diskarea name="cdrom">
2233                <disk name="shadow of the beast ii - juushin no jubaku (1994)(psygnosis)(ntsc)(jp)(en)[!]" sha1="7eef71563194e44b9fc1306d392c306332b13862"/>
2234            </diskarea>
2235        </part>
2236    </software>
2237-->
2238
49662239   <software name="shadowrn">
4967      <!-- source toseciso
4968      <rom name="Shadowrun (1996)(Compile)(NTSC)(JP)[!].cue" size="407" crc="233c28bf" />
4969      <rom name="Shadowrun (1996)(Compile)(NTSC)(JP)(Track 1 of 3)[!].iso" size="190429184" crc="fa993626" />
4970      <rom name="Shadowrun (1996)(Compile)(NTSC)(JP)(Track 2 of 3)[!].wav" size="15337436" crc="bb86bcc4" />
4971      <rom name="Shadowrun (1996)(Compile)(NTSC)(JP)(Track 3 of 3)[!].wav" size="15690236" crc="27fa7931" />
4972      -->
49732240      <description>Shadowrun (Jpn)</description>
49742241      <year>1996</year>
49752242      <publisher>Compile</publisher>
r242703r242704
49832250      </part>
49842251   </software>
49852252
2253<!--
2254    <software name="shinmega">
2255        <description>Shin Megami Tensei (Jpn)</description>
2256        <year>1994</year>
2257        <publisher>SIMS</publisher>
2258        <part name="cdrom" interface="scd_cdrom">
2259            <diskarea name="cdrom">
2260                <disk name="shin megami tensei (1994)(sims)(ntsc)(jp)[!]" sha1="30b2146889a12e9ea104773ee4a5885d3aa35b12"/>
2261            </diskarea>
2262        </part>
2263    </software>
2264-->
2265
2266<!--
2267    <software name="sforce">
2268        <description>Shining Force CD (Jpn)</description>
2269        <year>1994</year>
2270        <publisher>Sega</publisher>
2271        <part name="cdrom" interface="scd_cdrom">
2272            <diskarea name="cdrom">
2273                <disk name="shining force cd (1994)(sega)(ntsc)(jp)[!]" sha1="2a4a93187e226ddabbc3d450aebbd74b8d2786bd"/>
2274            </diskarea>
2275        </part>
2276    </software>
2277-->
2278
2279<!--
2280    <software name="silpheed">
2281        <description>Silpheed (Jpn)</description>
2282        <year>1993</year>
2283        <publisher>Game Arts</publisher>
2284        <part name="cdrom" interface="scd_cdrom">
2285            <diskarea name="cdrom">
2286                <disk name="silpheed (1993)(game arts)(ntsc)(jp)(en)[!]" sha1="a15d226758a4fb0466e18870930915d3171f4c38"/>
2287            </diskarea>
2288        </part>
2289    </software>
2290-->
2291
49862292   <software name="simearth">
4987      <!-- source toseciso
4988      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)[!].cue" size="2909" crc="42fbdea2" />
4989      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 01 of 22)[!].iso" size="7634944" crc="bf542c7d" />
4990      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 02 of 22)[!].wav" size="9692636" crc="0d0f9a33" />
4991      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 03 of 22)[!].wav" size="6082316" crc="26ecbf05" />
4992      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 04 of 22)[!].wav" size="6802028" crc="42132fc5" />
4993      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 05 of 22)[!].wav" size="6722060" crc="1c8589f8" />
4994      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 06 of 22)[!].wav" size="7107788" crc="cd061353" />
4995      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 07 of 22)[!].wav" size="11934092" crc="fb85e771" />
4996      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 08 of 22)[!].wav" size="7721660" crc="548b0409" />
4997      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 09 of 22)[!].wav" size="7397084" crc="2a5b8c64" />
4998      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 10 of 22)[!].wav" size="7655804" crc="54ea26de" />
4999      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 11 of 22)[!].wav" size="6195212" crc="fc08a529" />
5000      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 12 of 22)[!].wav" size="6112892" crc="c673be91" />
5001      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 13 of 22)[!].wav" size="6087020" crc="00b05710" />
5002      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 14 of 22)[!].wav" size="6143468" crc="abde1752" />
5003      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 15 of 22)[!].wav" size="14925836" crc="badbc85f" />
5004      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 16 of 22)[!].wav" size="19945004" crc="e387ac6c" />
5005      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 17 of 22)[!].wav" size="18458540" crc="6f0f4340" />
5006      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 18 of 22)[!].wav" size="15116348" crc="13a28f07" />
5007      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 19 of 22)[!].wav" size="23698796" crc="5a125499" />
5008      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 20 of 22)[!].wav" size="23418908" crc="a62c9683" />
5009      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 21 of 22)[!].wav" size="36357260" crc="fcdb7789" />
5010      <rom name="SimEarth (1993)(Sega)(NTSC)(JP)(Track 22 of 22)[!].wav" size="34967228" crc="712bd72b" />
5011      -->
50122293      <description>SimEarth (Jpn)</description>
50132294      <year>1993</year>
50142295      <publisher>Sega</publisher>
r242703r242704
50222303      </part>
50232304   </software>
50242305
2306<!--
2307    <software name="solfeace">
2308        <description>Sol-Feace (Jpn)</description>
2309        <year>1991</year>
2310        <publisher>Wolf Team</publisher>
2311        <part name="cdrom" interface="scd_cdrom">
2312            <diskarea name="cdrom">
2313                <disk name="sol-feace (1991)(wolf team)(ntsc)(jp)[!]" sha1="8577fcfb09d10b4db296c14da9ee2abdcf55f23b"/>
2314            </diskarea>
2315        </part>
2316    </software>
2317 -->
2318
2319<!--
2320    <software name="soniccd">
2321        <description>Sonic The Hedgehog CD (Jpn)</description>
2322        <year>1993</year>
2323        <publisher>Sega</publisher>
2324        <part name="cdrom" interface="scd_cdrom">
2325            <diskarea name="cdrom">
2326                <disk name="sonic the hedgehog cd (1993)(sega)(ntsc)(jp)(en)[!]" sha1="d75d5e737dbad9563521f613457699826994eb75"/>
2327            </diskarea>
2328        </part>
2329    </software>
2330-->
2331
50252332   <software name="soulstar">
5026      <!-- source toseciso
5027      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)[!].cue" size="2351" crc="8d85b3b0" />
5028      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 01 of 17)[!].iso" size="92135424" crc="6e37bafd" />
5029      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 02 of 17)[!].wav" size="16522844" crc="67040ce2" />
5030      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 03 of 17)[!].wav" size="43173356" crc="c8c7bbbb" />
5031      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 04 of 17)[!].wav" size="55302620" crc="3bae705e" />
5032      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 05 of 17)[!].wav" size="19404044" crc="af71eed4" />
5033      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 06 of 17)[!].wav" size="37975436" crc="28059d58" />
5034      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 07 of 17)[!].wav" size="39179660" crc="7b4733e4" />
5035      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 08 of 17)[!].wav" size="41247068" crc="226f22df" />
5036      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 09 of 17)[!].wav" size="43900124" crc="b9d822cb" />
5037      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 10 of 17)[!].wav" size="41602220" crc="4651904a" />
5038      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 11 of 17)[!].wav" size="21963020" crc="93ac12d7" />
5039      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 12 of 17)[!].wav" size="30625436" crc="9a1599b5" />
5040      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 13 of 17)[!].wav" size="36035036" crc="d41afbfa" />
5041      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 14 of 17)[!].wav" size="7265372" crc="00ea1ee7" />
5042      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 15 of 17)[!].wav" size="20177852" crc="21c769ff" />
5043      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 16 of 17)[!].wav" size="39080876" crc="70e33a16" />
5044      <rom name="SoulStar (1994)(Victor)(NTSC)(JP)(en)(Track 17 of 17)[!].wav" size="2114492" crc="eb13e846" />
5045      -->
50462333      <description>SoulStar (Jpn)</description>
50472334      <year>1994</year>
50482335      <publisher>Victor Entertainment</publisher>
r242703r242704
50562343      </part>
50572344   </software>
50582345
2346<!--
2347    <software name="swra">
2348        <description>Star Wars - Rebel Assault (Jpn)</description>
2349        <year>1993</year>
2350        <publisher>LucasArts</publisher>
2351        <part name="cdrom" interface="scd_cdrom">
2352            <diskarea name="cdrom">
2353                <disk name="star wars - rebel assault (1993)(lucasarts)(ntsc)(jp)[!]" sha1="0d4261613520c4f3b5155bead08974dee6060f06"/>
2354            </diskarea>
2355        </part>
2356    </software>
2357 -->
2358
2359<!--
2360    <software name="starblad">
2361        <description>StarBlade (Jpn)</description>
2362        <year>1994</year>
2363        <publisher>Namcot</publisher>
2364        <part name="cdrom" interface="scd_cdrom">
2365            <diskarea name="cdrom">
2366                <disk name="starblade (1994)(namcot)(ntsc)(jp)(en)[!]" sha1="cadd7155884e660565abfb6734cd839dc37ff298"/>
2367            </diskarea>
2368        </part>
2369    </software>
2370-->
2371
2372<!--
2373    <software name="switch">
2374        <description>Switch (Jpn)</description>
2375        <year>1993</year>
2376        <publisher>Sega</publisher>
2377        <part name="cdrom" interface="scd_cdrom">
2378            <diskarea name="cdrom">
2379                <disk name="switch (1993)(sega)(ntsc)(jp)[!]" sha1="bc3a574133629eec51a5abd6ca124ee50d047ad5"/>
2380            </diskarea>
2381        </part>
2382    </software>
2383-->
2384
2385<!--
2386    <software name="tenbu">
2387        <description>Tenbu Mega CD Special (Jpn)</description>
2388        <year>1992</year>
2389        <publisher>Wolf Team</publisher>
2390        <part name="cdrom" interface="scd_cdrom">
2391            <diskarea name="cdrom">
2392                <disk name="tenbu mega cd special (1992)(wolf team)(ntsc)(jp)[!]" sha1="8e9e7a524f68333e3c90ad2f61a780181e1673be"/>
2393            </diskarea>
2394        </part>
2395    </software>
2396-->
2397
2398<!--
2399    <software name="tenkafub">
2400        <description>Tenkafubu - Eiyuutachi no Houkou (Jpn)</description>
2401        <year>1991</year>
2402        <publisher>Game Arts</publisher>
2403        <part name="cdrom" interface="scd_cdrom">
2404            <diskarea name="cdrom">
2405                <disk name="tenkafubu - eiyuutachi no houkou (1991)(game arts)(ntsc)(jp)[!]" sha1="6f8e0895512d875c2a8d42fcc698782a0e4bc790"/>
2406            </diskarea>
2407        </part>
2408    </software>
2409-->
2410
50592411   <!-- one of these probably matches the redmup dump -->
50602412   <software name="tstormfxa" cloneof="tstormfx">
5061      <!-- source toseciso
5062      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)[!][T32064P-00022-R1M].cue" size="337" crc="f1ebb25c" />
5063      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 1 of 2)[!][T32064P-00022-R1M].iso" size="225912832" crc="70370315" />
5064      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 2 of 2)[!][T32064P-00022-R1M].wav" size="1300700" crc="39b15913" />
5065      -->
2413      <!-- Diskring: T32064P-00022-R1M -->
50662414      <description>Thunder Storm FX (Jpn, R1)</description>
50672415      <year>19??</year>
50682416      <publisher>Sega</publisher>
50692417      <info name="serial" value="T-32064"/>
5070      <info name="disk_ring" value="T32064P-00022-R1M"/>
50712418      <info name="release" value="19920828"/>
50722419      <info name="alt_title" value="サンダーストームFX"/>
50732420      <part name="cdrom" interface="scd_cdrom">
r242703r242704
50782425   </software>
50792426
50802427   <software name="tstormfxb" cloneof="tstormfx">
5081      <!-- source toseciso
5082      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)[!][T32064P-00022-R2M].cue" size="337" crc="94a23b1f" />
5083      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 1 of 2)[!][T32064P-00022-R2M].iso" size="225912832" crc="70370315" />
5084      <rom name="Thunder Storm FX (1992)(Wolf Team)(NTSC)(JP)(en)(Track 2 of 2)[!][T32064P-00022-R2M].wav" size="1300700" crc="e511f436" />
5085      -->
2428      <!-- Diskring: T32064P-00022-R2M -->
50862429      <description>Thunder Storm FX (Jpn, R2)</description>
50872430      <year>1992</year>
50882431      <publisher>Wolf Team</publisher>
50892432      <info name="serial" value="T-32064"/>
5090      <info name="disk_ring" value="T32064P-00022-R2M"/>
50912433      <info name="release" value="19920828"/>
50922434      <info name="alt_title" value="サンダーストームFX"/>
50932435      <part name="cdrom" interface="scd_cdrom">
r242703r242704
50972439      </part>
50982440   </software>
50992441
2442<!--
2443    <software name="thawk">
2444        <description>Thunderhawk (Jpn)</description>
2445        <year>1993</year>
2446        <publisher>Victor Entertainment</publisher>
2447        <part name="cdrom" interface="scd_cdrom">
2448            <diskarea name="cdrom">
2449                <disk name="thunderhawk (1993)(victor)(ntsc)(jp)(en)[!]" sha1="670d361364c93c91c4bffd41b1c8e5b178fd7117"/>
2450            </diskarea>
2451        </part>
2452    </software>
2453-->
2454
2455<!--
2456    <software name="timegal">
2457        <description>Time Gal (Jpn)</description>
2458        <year>1992</year>
2459        <publisher>Wolf Team</publisher>
2460        <part name="cdrom" interface="scd_cdrom">
2461            <diskarea name="cdrom">
2462                <disk name="time gal (1992)(wolf team)(ntsc)(jp)(en)[!]" sha1="e494cddd20913e3c1cc3db222028d1533237213d"/>
2463            </diskarea>
2464        </part>
2465    </software>
2466-->
2467
51002468   <software name="tcataly">
5101      <!-- source toseciso
5102      <rom name="Tomcat Alley (1994)(Sega)(NTSC)(JP)[!].cue" size="273" crc="909b2ba3" />
5103      <rom name="Tomcat Alley (1994)(Sega)(NTSC)(JP)(Track 1 of 2)[!].iso" size="463513600" crc="18499535" />
5104      <rom name="Tomcat Alley (1994)(Sega)(NTSC)(JP)(Track 2 of 2)[!].wav" size="1985132" crc="f5956250" />
5105      -->
51062469      <description>Tomcat Alley (Jpn)</description>
51072470      <year>1994</year>
51082471      <publisher>Sega</publisher>
r242703r242704
51162479      </part>
51172480   </software>
51182481
2482<!--
2483    <software name="dearfrnd">
2484        <description>Uresei Yatsura - Dear My Friends (Jpn)</description>
2485        <year>1994</year>
2486        <publisher>Game Arts</publisher>
2487        <part name="cdrom" interface="scd_cdrom">
2488            <diskarea name="cdrom">
2489                <disk name="uresei yatsura - dear my friends (1994)(game arts)(ntsc)(jp)[!]" sha1="76738aa0f01492d6fa1800992651f2af2982eb1e"/>
2490            </diskarea>
2491        </part>
2492    </software>
2493-->
2494
2495<!--
2496    <software name="vay">
2497        <description>Vay - Ryuusei no Yoroi (Jpn)</description>
2498        <year>1993</year>
2499        <publisher>SIMS</publisher>
2500        <part name="cdrom" interface="scd_cdrom">
2501            <diskarea name="cdrom">
2502                <disk name="vay - ryuusei no yoroi (1993)(sims)(ntsc)(jp)[!]" sha1="301866d0c88517be656838675a1488edba6990d4"/>
2503            </diskarea>
2504        </part>
2505    </software>
2506-->
2507
2508<!--
2509    <software name="funkband">
2510        <description>Wakusei Woodstock - F.H.B - Funky Horror Band (Jpn)</description>
2511        <year>1991</year>
2512        <publisher>Sega</publisher>
2513        <part name="cdrom" interface="scd_cdrom">
2514            <diskarea name="cdrom">
2515                <disk name="wakusei woodstock - f.h.b - funky horror band (1991)(sega)(ntsc)(jp)[!]" sha1="a6b0239325dba9a4633ed77140d755c5c12a40b9"/>
2516            </diskarea>
2517        </part>
2518    </software>
2519-->
2520
51192521   <software name="salesman">
5120      <!-- source toseciso
5121      <rom name="Warau Salesman (1993)(Sega)(NTSC)(JP)[!].cue" size="413" crc="a41d3029" />
5122      <rom name="Warau Salesman (1993)(Sega)(NTSC)(JP)(Track 1 of 3)[!].iso" size="307593216" crc="24f74d74" />
5123      <rom name="Warau Salesman (1993)(Sega)(NTSC)(JP)(Track 2 of 3)[!].wav" size="1178396" crc="90aba61c" />
5124      <rom name="Warau Salesman (1993)(Sega)(NTSC)(JP)(Track 3 of 3)[!].wav" size="1526492" crc="2bee0332" />
5125      -->
51262522      <description>Warau Salesman (Jpn)</description>
51272523      <year>1993</year>
51282524      <publisher>Sega</publisher>
r242703r242704
51362532      </part>
51372533   </software>
51382534
2535<!--
2536    <software name="wingcomm">
2537        <description>Wing Commander (Jpn)</description>
2538        <year>1994</year>
2539        <publisher>Sega</publisher>
2540        <part name="cdrom" interface="scd_cdrom">
2541            <diskarea name="cdrom">
2542                <disk name="wing commander (1994)(sega)(ntsc)(jp)[!]" sha1="77ad90429d49ba8037da6d96c61ef2f686446767"/>
2543            </diskarea>
2544        </part>
2545    </software>
2546-->
51392547
5140   <!-- Tosec Demos, Bonus Discs etc. -->
2548<!--
2549    <software name="winningp">
2550        <description>Winning Post (Jpn)</description>
2551        <year>1993</year>
2552        <publisher>Koei</publisher>
2553        <part name="cdrom" interface="scd_cdrom">
2554            <diskarea name="cdrom">
2555                <disk name="winning post (1993)(koei)(ntsc)(jp)[!]" sha1="cce39ec9c81539573b466c78577eec6b83194ff1"/>
2556            </diskarea>
2557        </part>
2558    </software>
2559-->
51412560
2561<!--
2562    <software name="wolfchld">
2563        <description>Wolfchild (Jpn)</description>
2564        <year>1993</year>
2565        <publisher>Victor Entertainment</publisher>
2566        <part name="cdrom" interface="scd_cdrom">
2567            <diskarea name="cdrom">
2568                <disk name="wolfchild (1993)(victor)(ntsc)(jp)(en)[!]" sha1="f63907400a74e8cc1520e9de10f70c1f8f4518e9"/>
2569            </diskarea>
2570        </part>
2571    </software>
2572-->
2573
2574<!--
2575    <software name="wonderdo">
2576        <description>Wonder Dog (Jpn)</description>
2577        <year>1991</year>
2578        <publisher>Victor Entertainment</publisher>
2579        <part name="cdrom" interface="scd_cdrom">
2580            <diskarea name="cdrom">
2581                <disk name="wonder dog (1991)(victor)(ntsc)(jp)(en)[!]" sha1="5640c649cba1cefb1dbbdd213be304f60df8e8fe"/>
2582            </diskarea>
2583        </part>
2584    </software>
2585-->
2586
2587<!--
2588    <software name="yumemi">
2589        <description>Yumemi Yakata no Monogatari (Jpn)</description>
2590        <year>1993</year>
2591        <publisher>Sega</publisher>
2592        <part name="cdrom" interface="scd_cdrom">
2593            <diskarea name="cdrom">
2594                <disk name="yumemi yakata no monogatari (1993)(sega)(ntsc)(jp)[!]" sha1="af5506e29f8b4d451e85201194c56a0fb324345c"/>
2595            </diskarea>
2596        </part>
2597    </software>
2598-->
2599
2600<!--
2601    <software name="yumimimx">
2602        <description>Yumimi Mix (Jpn)</description>
2603        <year>1993</year>
2604        <publisher>Game Arts</publisher>
2605        <part name="cdrom" interface="scd_cdrom">
2606            <diskarea name="cdrom">
2607                <disk name="yumimi mix (1993)(game arts)(ntsc)(jp)[!]" sha1="564e6d5aa8889c69e94a436232d7bc26bce46ec1"/>
2608            </diskarea>
2609        </part>
2610    </software>
2611-->
2612
2613
2614   <!-- Tosec Demos, Bonus Discs etc. -->
51422615   <software name="lodossdemo" cloneof="lodoss">
5143      <!-- source toseciso
5144      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)[!].cue" size="2595" crc="accdf24a" />
5145      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 01 of 14)[!].iso" size="48562176" crc="9efa4d31" />
5146      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 02 of 14)[!].wav" size="25862636" crc="09bb43e8" />
5147      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 03 of 14)[!].wav" size="25709756" crc="4ac1c4a5" />
5148      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 04 of 14)[!].wav" size="1465340" crc="71867226" />
5149      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 05 of 14)[!].wav" size="1474748" crc="d80d8fd8" />
5150      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 06 of 14)[!].wav" size="23157836" crc="733834cc" />
5151      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 07 of 14)[!].wav" size="1467692" crc="1fea8e7f" />
5152      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 08 of 14)[!].wav" size="1472396" crc="df15d4de" />
5153      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 09 of 14)[!].wav" size="1462988" crc="2ded24fa" />
5154      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 10 of 14)[!].wav" size="1477100" crc="cf1c4f4b" />
5155      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 11 of 14)[!].wav" size="1467692" crc="380c9a33" />
5156      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 12 of 14)[!].wav" size="20304860" crc="f04d931e" />
5157      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 13 of 14)[!].wav" size="1472396" crc="993eaa8f" />
5158      <rom name="Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (demo) (1994)(Sega)(NTSC)(JP)(Track 14 of 14)[!].wav" size="20638844" crc="8a53ec78" />
5159      -->
51602616      <description>Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (Jpn, Demo)</description>
51612617      <year>1994</year>
51622618      <publisher>Sega</publisher>
r242703r242704
51682624   </software>
51692625
51702626   <software name="lunar2bonus" cloneof="lunar2">
5171      <!-- source toseciso
5172      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)[!][Premium CD][audio cd].cue" size="753" crc="7c1d7a67" />
5173      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)(Track 1 of 5)[!][Premium CD][audio cd].wav" size="37526204" crc="50cfddcd" />
5174      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)(Track 2 of 5)[!][Premium CD][audio cd].wav" size="38008364" crc="d7e9806a" />
5175      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)(Track 3 of 5)[!][Premium CD][audio cd].wav" size="17658860" crc="90959652" />
5176      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)(Track 4 of 5)[!][Premium CD][audio cd].wav" size="64308428" crc="955cbf79" />
5177      <rom name="Lunar - Eternal Blue (1994)(Game Arts)(NTSC)(Jp)(Track 5 of 5)[!][Premium CD][audio cd].wav" size="12642044" crc="59c495bf" />
5178      -->
51792627      <description>Lunar - Eternal Blue - Premium CD (Jpn) [CD-Audio]</description>
51802628      <year>1994</year>
51812629      <publisher>Game Arts</publisher>
r242703r242704
51882636   </software>
51892637
51902638   <software name="nost1907bonus" cloneof="nost1907">
5191      <!-- source toseciso
5192      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)[!][Original Sound Track Ver. 2][audio cd].cue" size="2969" crc="3fc1b976" />
5193      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 01 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="29769308" crc="fd99238a" />
5194      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 02 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="33781820" crc="a3137716" />
5195      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 03 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="70160204" crc="86b5a51e" />
5196      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 04 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="71329148" crc="ae84c8ad" />
5197      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 05 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="29964524" crc="73457464" />
5198      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 06 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="41265884" crc="7c233005" />
5199      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 07 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="22144124" crc="c540a60a" />
5200      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 08 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="37568540" crc="c5c047d4" />
5201      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 09 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="71611388" crc="d610033e" />
5202      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 10 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="32316524" crc="ff57b339" />
5203      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 11 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="21520844" crc="66d93969" />
5204      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 12 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="12119900" crc="db6a8fc7" />
5205      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 13 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="22155884" crc="c182fb37" />
5206      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 14 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="20655308" crc="ee061041" />
5207      <rom name="Nostalgia 1907 in North Atlantic Sea (1991)(Takeru)(NTSC)(Jp)(Track 15 of 15)[!][Original Sound Track Ver. 2][audio cd].wav" size="24021020" crc="b25d006c" />
5208      -->
52092639      <description>Nostalgia 1907 in North Atlantic Sea - Original Sound Track Ver. 2 (Jpn) [CD-Audio]</description>
52102640      <year>1992</year>
52112641      <publisher>Takeru</publisher>
r242703r242704
52172647   </software>
52182648
52192649   <software name="tenbubonus" cloneof="tenbu">
5220      <!-- source toseciso
5221      <rom name="Tenbu Mega CD Special (1992)(Wolf Team)(NTSC)(Jp)[!][audio cd].cue" size="316" crc="6d4e8500" />
5222      <rom name="Tenbu Mega CD Special (1992)(Wolf Team)(NTSC)(Jp)(Track 1 of 2)[!][audio cd].wav" size="39765308" crc="0a7b2e1e" />
5223      <rom name="Tenbu Mega CD Special (1992)(Wolf Team)(NTSC)(Jp)(Track 2 of 2)[!][audio cd].wav" size="47239964" crc="d41f2e03" />
5224      -->
52252650      <description>Tenbu Mega CD Special (Jpn) [CD-Audio]</description>
52262651      <year>1992</year>
52272652      <publisher>Wolf Team</publisher>
r242703r242704
52332658      </part>
52342659   </software>
52352660
5236
52372661   <!-- Misc sourced dumps -->
52382662
52392663   <software name="sing">
trunk/hash/megadriv.xml
r242703r242704
119119         <feature name="u2" value="FANTASTIC DIZZY MD MDFD BB07"/>    <!-- location not really marked on PCB, using u2 for consistency -->
120120         <feature name="left" value="GD74HC00"/>
121121         <feature name="right" value="GD74HC74"/>
122         <dataarea name="rom" width="16" endianness="big" size="4194304">
123            <rom name="fantastic dizzy md mdfd bb07.u2" size="524288" crc="46447e7a" sha1="b320174d3b43f30b477818a27b4da30462a52003" offset="0x000000"/>
124            <rom name="cosmic spacehead md mdcs e4f7.u1" size="1048576" crc="cb89e605" sha1="b5bc4a786639d1b8ae6de76f40dbe907b3f0b642" offset="0x200000"/>
122         <dataarea name="rom" width="16" endianness="big" size="2621440">
123            <rom name="cosmic spacehead md mdcs e4f7.u1" size="1048576" crc="cb89e605" sha1="b5bc4a786639d1b8ae6de76f40dbe907b3f0b642" offset="0x000000"/>
124            <rom name="fantastic dizzy md mdfd bb07.u2" size="524288" crc="46447e7a" sha1="b320174d3b43f30b477818a27b4da30462a52003" offset="0x200000"/>
125125         </dataarea>
126126      </part>
127127   </software>
r242703r242704
96029602      <publisher>Codemasters</publisher>
96039603      <part name="cart" interface="megadriv_cart">
96049604         <feature name="slot" value="rom_cm2in1"/>
9605         <dataarea name="rom" width="16" endianness="big" size="4194304">
9605         <dataarea name="rom" width="16" endianness="big" size="2621440">
96069606            <rom name="mdppf821.bin" size="2097152" crc="32dd8351" sha1="928f46ca87886c6e72d10f7c9db29b09e483bc49" offset="0x000000"/>
96079607            <rom name="mdmm acd3.bin" size="524288" crc="50081a0b" sha1="56a8844c376f2e79e92cf128681fa3fef81c36d6" offset="0x200000"/>
96089608         </dataarea>
r242703r242704
1750817508      </part>
1750917509   </software>
1751017510
17511   <software name="linkdrgn">
17512      <description>Link Dragon</description>
17513      <year>1993</year>
17514      <publisher>Songtly</publisher>
17515      <info name="alt_title" value="Long (Box?)"/>
17511   <software name="long">
17512      <description>Long (Chi)</description>
17513      <year>199?</year>
17514      <publisher>&lt;unlicensed&gt;</publisher>
1751617515      <part name="cart" interface="megadriv_cart">
1751717516         <dataarea name="rom" width="16" endianness="big" size="262144">
17518            <rom name="link dragon (unl).bin" size="262144" crc="1b86e623" sha1="09e4b59da3344f16ce6173c432c88ee9a12a3561" offset="0x000000"/>
17517            <rom name="long (chi) (unl).bin" size="262144" crc="1b86e623" sha1="09e4b59da3344f16ce6173c432c88ee9a12a3561" offset="0x000000"/>
1751917518         </dataarea>
1752017519      </part>
1752117520   </software>
r242703r242704
3017430173      </part>
3017530174   </software>
3017630175
30177   <software name="tankwar">
30178      <description>Super Tank War</description>
30179      <year>199?</year>
30180      <publisher>Gamtec</publisher>
30181      <part name="cart" interface="megadriv_cart">
30182         <dataarea name="rom" width="16" endianness="big" size="262144">
30183            <rom name="super tank war (unlicensed) [raw dump].bin" size="262144" crc="5e519ea1" sha1="7e00475f99035fb20f624a7fe0d6bb77c7e834b1" offset="0x000000"/>
30184         </dataarea>
30185      </part>
30186   </software>
3018730176
30188
3018930177<!-- Other Dumps to be sorted -->
3019030178
3019130179   <software name="dynoblaz">
trunk/hash/mtx_cass.xml
r242703r242704
33
44<softwarelist name="mtx_cass" description="Memotech MTX cassettes">
55
6<!--
6<!--
77TODO: find out why the driver does not recognize the program on the tapes...
88-->
99
trunk/hash/n64.xml
r242703r242704
30843084      </part>
30853085   </software>
30863086
3087   <software name="conkerp" cloneof="conker" supported="no">
3088      <description>Conker's Bad Fur Day (Prototype Debug)</description>
3089      <year>2001?</year>
3090      <publisher>Rare</publisher>
3091      <part name="cart" interface="n64_cart">
3092         <dataarea name="rom" size="67108864">
3093            <rom name="conkers bfd debug_ec.bin" size="67108864" crc="8443ff39" sha1="8b0952b9d13d2f082badfb587a97f2762600cd14" offset="0" />
3094         </dataarea>
3095      </part>
3096   </software>
3097
3098   <software name="conkerd" cloneof="conker" supported="no">
3099      <description>Conker's Bad Fur Day (ECTS Demo)</description>
3100      <year>2001?</year>
3101      <publisher>Rare</publisher>
3102      <part name="cart" interface="n64_cart">
3103         <dataarea name="rom" size="67108864">
3104            <rom name="conkers bfd ects demo_ec.bin" size="67108864" crc="99b3c27a" sha1="3bf1f052ce728ad77971efd4882ec8e18b7bf9a3" offset="0" />
3105         </dataarea>
3106      </part>
3107   </software>
3108
3109<!--
3110Note from marshallh about the dongle present in the Rare proto/demo above
3111"The dongle is a pass-through, except that there is an Altera
3112MAX7000 series CPLD intercepting the AD16 bus. This lets
3113all normal bus transactions through, but in the special case
3114mentioned below, takes control of the bus and gives its own data."
3115
3116We currently don't emulate this, and thus we include also versions where the dongle checks have been
3117patched out (+ a fix for internal checksum)
3118-->
3119
3120   <software name="conkerph" cloneof="conker" supported="no">
3121      <description>Conker's Bad Fur Day (Prototype Debug, Decrypted)</description>
3122      <year>2001?</year>
3123      <publisher>Rare</publisher>
3124      <part name="cart" interface="n64_cart">
3125         <dataarea name="rom" size="67108864">
3126            <rom name="bfd_ntsc_debug_dc.bin" size="67108864" crc="c9822f5c" sha1="6956bd77351a91cdd22af454a8d410a3b9c829f0" offset="0" />
3127         </dataarea>
3128      </part>
3129   </software>
3130
3131   <software name="conkerdh" cloneof="conker" supported="no">
3132      <description>Conker's Bad Fur Day (ECTS Demo, Decrypted)</description>
3133      <year>2001?</year>
3134      <publisher>Rare</publisher>
3135      <part name="cart" interface="n64_cart">
3136         <dataarea name="rom" size="67108864">
3137            <rom name="conker_bfd_ects_dc.bin" size="67108864" crc="af9c5972" sha1="92575eed941324b9cd7d29df61e720b04d8b26cb" offset="0" />
3138         </dataarea>
3139      </part>
3140   </software>
3141
31423087   <software name="crusnexo">
31433088      <description>Cruis'n Exotica (USA)</description>
31443089      <year>2000</year>
r242703r242704
78337778      </part>
78347779   </software>
78357780
7836   <software name="pdarkp" cloneof="pdark">
7837      <description>Perfect Dark (Euro, Prototype Debug)</description>
7838      <year>2000</year>
7839      <publisher>Nintendo</publisher>
7840      <part name="cart" interface="n64_cart">
7841         <dataarea name="rom" size="33554432">
7842            <rom name="perfect dark eur debug.bin" size="33554432" crc="5c6ac287" sha1="278cec1806eb39690cd2a3ae4838cfa8b8e630d2" offset="0" />
7843         </dataarea>
7844      </part>
7845   </software>
7846
7847   <software name="pdarkup" cloneof="pdark" supported="no">
7848      <description>Perfect Dark (USA, Prototype Debug)</description>
7849      <year>2000</year>
7850      <publisher>Nintendo</publisher>
7851      <part name="cart" interface="n64_cart">
7852         <dataarea name="rom" size="67108864">
7853            <rom name="perfect dark ntsc debug_ec.bin" size="67108864" crc="571ca36e" sha1="578eef928e7f93310288ea1e319dc1d00dee51fa" offset="0" />
7854         </dataarea>
7855      </part>
7856   </software>
7857
7858<!--
7859The original cart contained an Altera MAX7000 series CPLD intercepting the AD16 bus, acting as a dongle
7860(see notes about Conker above).
7861We currently don't emulate this, and thus we include also this version where the dongle checks have been
7862patched out (+ a fix for internal checksum)
7863-->
7864   <software name="pdarkuph" cloneof="pdark">
7865      <description>Perfect Dark (USA, Prototype Debug, Decrypted)</description>
7866      <year>2000</year>
7867      <publisher>Nintendo</publisher>
7868      <part name="cart" interface="n64_cart">
7869         <dataarea name="rom" size="33554432">
7870            <rom name="pd_ntsc_debug_dc.bin" size="33554432" crc="0ea2645f" sha1="40c60733840ee68ac60f0c951055c942a2573bfc" offset="0" />
7871         </dataarea>
7872      </part>
7873   </software>
7874
78757781   <software name="pgaeurou" cloneof="pgaeuro">
78767782      <description>PGA European Tour (USA)</description>
78777783      <year>2000</year>
trunk/hash/neogeo.xml
r242703r242704
438438         <dataarea name="mcu" size="0x2000">
439439            <!-- Hitachi HD6301V1 MCU -->
440440            <rom offset="0x000000" size="0x02000" name="rhcom.bin" crc="e5cd6306" sha1="f6bbb8ae562804d67e137290c765c3589fa334c0" />
441      <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
441        <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
442442         </dataarea>
443443         <dataarea name="fixed" size="0x040000">
444444            <rom offset="0x000000" size="0x020000" name="006-s1.s1" crc="eb5189f0" sha1="0239c342ea62e73140a2306052f226226461a478" />
r242703r242704
491491         <dataarea name="mcu" size="0x2000">
492492            <!-- Hitachi HD6301V1 MCU -->
493493            <rom offset="0x000000" size="0x02000" name="rhcom.bin" crc="e5cd6306" sha1="f6bbb8ae562804d67e137290c765c3589fa334c0" />
494      <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
494        <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
495495         </dataarea>
496496         <dataarea name="fixed" size="0x040000">
497497            <rom offset="0x000000" size="0x020000" name="006-s1.s1" crc="eb5189f0" sha1="0239c342ea62e73140a2306052f226226461a478" />
trunk/hash/nes.xml
r242703r242704
7663276632      <year>19??</year>
7663376633      <publisher>&lt;pirate&gt;</publisher>
7663476634      <part name="cart" interface="nes_cart">
76635         <feature name="slot" value="bmc_hik300" />  <!-- mapper says 217 but it's not gc6in1 either! -->
76635         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
7663676636         <dataarea name="chr" size="65536">
7663776637            <rom name="500-in-1 (anim splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="25bdd64a" sha1="1f95eaf20fec9058b6917aa47dbdcec4b7a5b87d" offset="00000" status="baddump" />
7663876638         </dataarea>
r242703r242704
7664776647      <year>19??</year>
7664876648      <publisher>&lt;pirate&gt;</publisher>
7664976649      <part name="cart" interface="nes_cart">
76650         <feature name="slot" value="bmc_hik300" />  <!-- mapper says 217 but it's not gc6in1 either! -->
76650         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
7665176651         <dataarea name="chr" size="65536">
7665276652            <rom name="500-in-1 (static splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="e7dacb8a" sha1="ece1b9c7fd8be955a1df6c8505533b4fac194eeb" offset="00000" status="baddump" />
7665376653         </dataarea>
r242703r242704
7757677576      <year>19??</year>
7757777577      <publisher>&lt;pirate&gt;</publisher>
7757877578      <part name="cart" interface="nes_cart">
77579         <feature name="slot" value="bmc_hik300" />  <!-- mapper says 217 but it's not gc6in1 either! -->
77579         <feature name="slot" value="bmc_hik300" />   <!-- mapper says 217 but it's not gc6in1 either! -->
7758077580         <dataarea name="chr" size="65536">
7758177581            <rom name="9999999-in-1 (static splash, no rev, alt mapper)[p1][!].chr" size="65536" crc="25bdd64a" sha1="1f95eaf20fec9058b6917aa47dbdcec4b7a5b87d" offset="00000" status="baddump" />
7758277582         </dataarea>
trunk/hash/pc98.xml
r242703r242704
4680546805      </part>
4680646806   </software>
4680746807
46808   <software name="loopyq">
46809      <description>LoopyQ</description>
46810      <year>1992</year>
46811      <publisher>日本ソフテック (Nihon Softec)</publisher>
46812      <info name="alt_title" value="ルービーQ" />
46813      <info name="release" value="19921119" />
46814      <part name="flop1" interface="floppy_5_25">
46815         <dataarea name="flop" size="1261568">
46816            <rom name="loopyq.hdm" size="1261568" crc="5aaf0dc8" sha1="d9720bc05f91354187ff362ceefe43d81234f84d" offset="0" />
46817         </dataarea>
46818      </part>
46819   </software>
46820
4682146808   <software name="lotus123" supported="no">
4682246809      <description>Lotus 1-2-3 (Demo)</description>
4682346810      <year>19??</year>
r242703r242704
4927649263      </part>
4927749264   </software>
4927849265
49279   <software name="ultrasak">
49280      <description>Ultra Sakusen - Kagaku Tokusoutai Shutsugeki Seyo!</description>
49281      <year>1992</year>
49282      <publisher>バンプレスト (Banpresto)</publisher>
49283      <info name="alt_title" value="ウルトラ作戦 科学特捜隊出撃せよ!" />
49284      <info name="release" value="19921208" />
49285      <part name="flop1" interface="floppy_5_25">
49286         <feature name="part_id" value="System Disk"/>
49287         <dataarea name="flop" size="1261568">
49288            <rom name="system.hdm" size="1261568" crc="ad35a329" sha1="db8f34d1b126dad253e44035cf295248dd8c1d1c" offset="0" />
49289         </dataarea>
49290      </part>
49291      <part name="flop2" interface="floppy_5_25">
49292         <feature name="part_id" value="Disk A"/>
49293         <dataarea name="flop" size="1261568">
49294            <rom name="a.hdm" size="1261568" crc="8daf39f0" sha1="53a1f3290b2cd07b72fb42eb970b0120106b76fd" offset="0" />
49295         </dataarea>
49296      </part>
49297      <part name="flop3" interface="floppy_5_25">
49298         <feature name="part_id" value="Disk B"/>
49299         <dataarea name="flop" size="1261568">
49300            <rom name="b.hdm" size="1261568" crc="bc7ebede" sha1="b6cc7d3d18198deb918556eaefb422c3f9311148" offset="0" />
49301         </dataarea>
49302      </part>
49303      <part name="flop4" interface="floppy_5_25">
49304         <feature name="part_id" value="Disk C"/>
49305         <dataarea name="flop" size="1261568">
49306            <rom name="c.hdm" size="1261568" crc="1513def4" sha1="fabc4016c6f38e98a36a6a8b04e9e8b6a21a9599" offset="0" />
49307         </dataarea>
49308      </part>
49309      <part name="flop5" interface="floppy_5_25">
49310         <feature name="part_id" value="Disk D"/>
49311         <dataarea name="flop" size="1261568">
49312            <rom name="d.hdm" size="1261568" crc="dfa1fbd2" sha1="22bbc1bfcbef5807241a3958a3773c959948b209" offset="0" />
49313         </dataarea>
49314      </part>
49315      <part name="flop6" interface="floppy_5_25">
49316         <feature name="part_id" value="Disk E"/>
49317         <dataarea name="flop" size="1261568">
49318            <rom name="e.hdm" size="1261568" crc="553015ef" sha1="085e87a73ccc767ff157e0ef8342fc2dd3a69217" offset="0" />
49319         </dataarea>
49320      </part>
49321      <part name="flop7" interface="floppy_5_25">
49322         <feature name="part_id" value="Disk F"/>
49323         <dataarea name="flop" size="1261568">
49324            <rom name="f.hdm" size="1261568" crc="1e0680ce" sha1="52fb9ecd5edab9c8f653330699849ad075344cbb" offset="0" />
49325         </dataarea>
49326      </part>
49327   </software>
49328
4932949266   <software name="vermiln" supported="no">
4933049267      <description>Vermilion</description>
4933149268      <year>1990</year>
trunk/hash/pico.xml
r242703r242704
736736      <publisher>Samsung</publisher>
737737      <info name="serial" value="T-102021-08 ~ PICO-9507S"/>
738738      <part name="cart" interface="pico_cart">
739         <feature name="pcb" value="??" />   <!-- non-Sega PCB, probably by Samsung -->
739         <feature name="pcb" value="??" />   <!-- non-Sega PCB, probably by Samsung -->
740740         <feature name="ic1" value="PICO-9507S" />
741741         <dataarea name="rom" size="524288">
742742            <rom name="pico-9507s.ic1" size="524288" crc="042520ce" sha1="5dd748a1bdfc661d0b96f6a1d26babc6a0ae7f2d" offset="000000" loadflag="load16_word_swap" />
trunk/hash/sms.xml
r242703r242704
868868   </software>
869869
870870<!--
871    The labelling of Hi-Com multigame carts is arbitrary. The boxes appears to what was intended as unique product number
872    but boxes are typically mixed up and patched with stickers added to change game titles (on both boxes and cartridges)
873    making the product number rather unreliable AND realistically we may never find out the correct numbers.
871    The labelling of Hi-Com multigame carts is arbitrary. The boxes appears to what was intended as unique product number
872    but boxes are typically mixed up and patched with stickers added to change game titles (on both boxes and cartridges)
873    making the product number rather unreliable AND realistically we may never find out the correct numbers.
874874-->
875875   <software name="hicom3a">
876876      <description>The Best Game Collection - Hang On + Pit Pot + Spy vs Spy (Kor)</description>
trunk/hash/sol20_cass.xml
r242703r242704
6767   <software name="solprint" supported="no">
6868      <description>Sol Printer I/O Software P/N 727056, Rev. A</description>
6969      <year>19??</year>
70      <publisher>Processor Technology Corporation</publisher>
70      <publisher>Processor Technology Corp.</publisher>
7171
7272      <part name="cass1" interface="sol20_cass">
7373         <dataarea name="cass" size="56307">
r242703r242704
145145   <software name="als8">
146146      <description>ALS-8 program development system</description>
147147      <year>1977</year>
148      <publisher>Processor Technology Corporation</publisher>
148      <publisher>Processor Technolgy Corp.</publisher>
149149
150150      <part name="cass1" interface="sol20_cass">
151151         <dataarea name="cass" size="7142712">
r242703r242704
166166   <software name="atc">
167167      <description>Air Traffic Control</description>
168168      <year>1978</year>
169      <publisher>Creative Computing Software</publisher>
169      <publisher>Processor Technolgy</publisher>
170170
171171      <part name="cass1" interface="sol20_cass">
172172         <dataarea name="cass" size="2457454">
r242703r242704
182182    MTCHS B 1AD9 034D       ;21 matches; you play against the computer; last one to pick up a match loses
183183    LUNAR B 1AD9 0953       ;Traditional text lunar lander
184184
185In SOLOS monitor "XEQ BASIC" to load/autorun or "GET BASIC" and then "EXEC 0".
185In SOLOS moniotr "XEQ BASIC" to load/autorun or "GET BASIC" and then "EXEC 0".
186186In BASIC program "XEQ MTCHS" to load/autorun or "GET MTCHS" and then "RUN".
187187In BASIC program "XEQ LUNAR" to load/autorun or "GET LUNAR" and then "RUN". (see note below)
188188
r242703r242704
196196   <software name="basic5">
197197      <description>Sol BASIC/5</description>
198198      <year>1977</year>
199      <publisher>Processor Technology Corporation</publisher>
199      <publisher>Processor Technolgy Corp.</publisher>
200200
201201      <part name="cass1" interface="sol20_cass">
202202         <dataarea name="cass" size="9203116">
r242703r242704
223223   <software name="chess">
224224      <description>8080 Chess Cassette; P/N 727152</description>
225225      <year>19??</year>
226      <publisher>Processor Technology Corporation</publisher>
226      <publisher>Processor Technolgy Corp.</publisher>
227227
228228      <part name="cass1" interface="sol20_cass">
229229         <dataarea name="cass" size="5558420">
r242703r242704
251251   <software name="debug">
252252      <description>DEBUG, Advanced 8080 Debugger; P/N 727132</description>
253253      <year>1978</year>
254      <publisher>Processor Technology Corporation</publisher>
254      <publisher>Processor Technolgy Corp.</publisher>
255255
256256      <part name="cass1" interface="sol20_cass">
257257         <dataarea name="cass" size="20877642">
r242703r242704
275275   <software name="edit">
276276      <description>EDIT, Advanced 8080 Editor; P/N 727142</description>
277277      <year>1978</year>
278      <publisher>Processor Technology Corporation</publisher>
278      <publisher>Processor Technolgy Corp.</publisher>
279279
280280      <part name="cass1" interface="sol20_cass">
281281         <dataarea name="cass" size="8538414">
r242703r242704
307307   <software name="extbasic">
308308      <description>Extended Cassette BASIC; P/N 727019</description>
309309      <year>1977</year>
310      <publisher>Processor Technology Corporation</publisher>
310      <publisher>Processor Technolgy Corp.</publisher>
311311
312312      <part name="cass1" interface="sol20_cass">
313313         <dataarea name="cass" size="13985418">
r242703r242704
346346   <software name="focal">
347347      <description>8080 Cassette Focal(tm); P/N 727027</description>
348348      <year>1978</year>
349      <publisher>Processor Technology Corporation</publisher>
349      <publisher>Processor Technolgy Corp.</publisher>
350350
351351      <part name="cass1" interface="sol20_cass">
352352         <dataarea name="cass" size="6722676">
r242703r242704
370370   <software name="gamepac1">
371371      <description>GAMEPAC 1</description>
372372      <year>1977</year>
373      <publisher>Processor Technology Corporation</publisher>
373      <publisher>Processor Technolgy Corp.</publisher>
374374
375375      <part name="cass1" interface="sol20_cass">
376376         <dataarea name="cass" size="4619686">
r242703r242704
392392   <software name="gamepac2">
393393      <description>GAMEPAC 2</description>
394394      <year>1978</year>
395      <publisher>Processor Technology Corporation</publisher>
395      <publisher>Processor Technolgy Corp.</publisher>
396396
397397      <part name="cass1" interface="sol20_cass">
398398         <dataarea name="cass" size="5118738">
r242703r242704
442442   <software name="music">
443443      <description>Music System</description>
444444      <year>1977</year>
445      <publisher>Software Technology</publisher>
445      <publisher>Software Technology Corp.</publisher>
446446
447447      <part name="cass1" interface="sol20_cass">
448448         <dataarea name="cass" size="13654040">
r242703r242704
488488   <software name="pilot">
489489      <description>Cassette PILOT P/N 727112 Rev. A</description>
490490      <year>1978</year>
491      <publisher>Processor Technology Corporation</publisher>
491      <publisher>Processor Technology Corp.</publisher>
492492
493493      <part name="cass1" interface="sol20_cass">
494494         <dataarea name="cass" size="19764422">
r242703r242704
572572   <software name="trek80">
573573      <description>TREK-80</description>
574574      <year>19??</year>
575      <publisher>Processor Technology Corporation</publisher>
575      <publisher>Processor Technolgy Corp.</publisher>
576576
577577      <part name="cass1" interface="sol20_cass">
578578         <dataarea name="cass" size="6757058">
r242703r242704
778778   <software name="acs_v1n4">
779779      <description>Access newsletter, Volume 1, issue #4</description>
780780      <year>1977</year>
781      <publisher>Processor Technology Corporation</publisher>
781      <publisher>Processor Technolgy Corp.</publisher>
782782
783783      <part name="cass1" interface="sol20_cass">
784784         <dataarea name="cass" size="2151032">
trunk/hash/timex_dock.xml
r242703r242704
44<softwarelist name="timex_dock" description="Timex Sinclair TS-2068 DOCK cartridges">
55
66
7<!--
8Timex Technical Docs... http://timex.comboios.info/home.html
9
10Timex Command Cartridges... http://timex.comboios.info/tscart.html
11
12NOTE: Below apply to BIN files only! (BIN file = DCK file minus the first 9 bytes of DCK header)
13
14
15Types of TS2068 Cartridges:
16
17Actually exists 3 types of cartridges:
18
19LROS (Language ROM Oriented Software) takes control of the computer, the internal ROMs are not used;
20AROS (Application ROM Oriented Software) uses BASIC interpreter;
21ROM is simply a ROM chip. In TS2068 to a ROM work, you must type OUT 244,3 to "page" the DOCK port.
22
23An LROS is identified by the following overhead bytes:
24
25Location    Description
26
270000        Not Used
280001        Cartridge Type
29            O1=LROS
300002/0003   Starting Address (LSB/MSB)
31            Address to be jumped to after Operating System initialization is complete.
32            Order of bytes is as for a JP instruction.
330004        Memory Chunk Specification
34            Bits 0-7 represent Chunks 0-7 respectively in the Dock Bank in low active format:
35            0 if in use
36            1 if not in use
37            NOTE: When writing to the Horizontal Select Register (Port F4H), the Chunk Specification is High Active
38
39
40An AROS is identified by the following overhead bytes:
41
42Location    Description
43
448000H       Language Type
45            1 = BASIC [and machine code]
46            2 = Machine code only
47            (Any other value will result in Error S, Missing LROS)
488001H       Cartridge Type
49            02=AROS
508002/8003H  Starting Address(LSB/MSB)
51            (BASIC AROS= Addrs. of First Program Line)
52            (Machine Code AROS = Addrs. of First Z80 Instruction)
538004H       Memory Chunk Specification
54            Bits 0-7 represent Chunks 0-7 respectively in the Dock Bank in low active format as follows:
55            0 if in use
56            1 if not in use
57            NOTE: Bits 0-3 must he set to 1 for proper execution.
588005H       Autostart Specification:
59            0 = No Autostart
60            1 = Autostart
618006/8007H  Number of bytes of RAM to be Reserved for Machine Code Variables
62            (LSB/MSB - 0100H=1 byte Reserved; 0002H=512 bytes Reserved)
63
64NOTE: info about release and publisher are taken from http://www.worldofspectrum.org/tmx/
65
66-->
67
68<!-- Cartridge Type: AROS (overhead bytes: 02 02 0C80 EF 01 0000) -->
697   <software name="android" supported="no">
708      <description>Androids</description>
71      <year>1983</year>
72      <publisher>Timex Computer</publisher>
9      <year>19??</year>
10      <publisher>&lt;unknown&gt;</publisher>
7311      <part name="cart" interface="timex_cart">
7412         <dataarea name="rom" size="65536">
7513            <rom name="androids.bin" size="8192" crc="fec4c2b4" sha1="52b1d4c8316adf74aeb685f54c789a90015215d6" offset="0x8000" />
r242703r242704
7715      </part>
7816   </software>
7917
80<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
8118   <software name="backgamm" supported="no">
8219      <description>Backgammon</description>
83      <year>1983</year>
84      <publisher>Sinclair Research</publisher>
20      <year>19??</year>
21      <publisher>&lt;unknown&gt;</publisher>
8522      <part name="cart" interface="timex_cart">
8623         <dataarea name="rom" size="65536">
8724            <rom name="backgammon.bin" size="16384" crc="2c125684" sha1="20d8be438259958a1f0eb0a3852b39fbd4c02c8c" offset="0x0000" />
r242703r242704
8926      </part>
9027   </software>
9128
92<!-- Cartridge Type: AROS (overhead bytes: 01 02 0880 CF 01 0000) -->
9329   <software name="budgeter" supported="no">
9430      <description>Budgeter</description>
95      <year>1983</year>
96      <publisher>Timex Computer</publisher>
31      <year>19??</year>
32      <publisher>&lt;unknown&gt;</publisher>
9733      <part name="cart" interface="timex_cart">
9834         <dataarea name="rom" size="65536">
9935            <rom name="budgeter.bin" size="16384" crc="9b5e4565" sha1="bead4247e05f22a26cdc6a835a62b1277685b709" offset="0x8000" />
r242703r242704
10137      </part>
10238   </software>
10339
104<!-- Cartridge Type: AROS (overhead bytes: 02 02 00C0 8F 01 1500) -->
10540   <software name="casino1" supported="no">
10641      <description>Casino1</description>
107      <year>1983</year>
108      <publisher>Timex Computer</publisher>
42      <year>19??</year>
43      <publisher>&lt;unknown&gt;</publisher>
10944      <part name="cart" interface="timex_cart">
11045         <dataarea name="rom" size="65536">
11146            <rom name="casino1.bin" size="24576" crc="3da6d3c9" sha1="f84ba979b94baf092bae70cfa1ec8f276b48885f" offset="0x8000" />
r242703r242704
11348      </part>
11449   </software>
11550
116<!-- Cartridge Type: LROS (overhead bytes: 00 01 F529 FC) -->
11751   <software name="chess" supported="no">
11852      <description>Chess</description>
119      <year>1983</year>
120      <publisher>Timex Computer</publisher>
53      <year>19??</year>
54      <publisher>&lt;unknown&gt;</publisher>
12155      <part name="cart" interface="timex_cart">
12256         <dataarea name="rom" size="65536">
12357            <rom name="chess.bin" size="16384" crc="e64367ef" sha1="cf7e02a6c20ee0d027f4676e2a1e7aed5d6ced95" offset="0x0000" />
r242703r242704
12559      </part>
12660   </software>
12761
128<!-- Cartridge Type: AROS (overhead bytes: 02 02 2892 EF 01 C017) -->
12962   <software name="crazybug" supported="no">
13063      <description>Crazy Bugs</description>
131      <year>1983</year>
132      <publisher>Timex Computer</publisher>
64      <year>19??</year>
65      <publisher>&lt;unknown&gt;</publisher>
13366      <part name="cart" interface="timex_cart">
13467         <dataarea name="rom" size="65536">
13568            <rom name="crazy bugs.bin" size="8192" crc="a440e8f2" sha1="c0f63b7492e542a3bb955a787e7394dc5a3e6fde" offset="0x8000" />
r242703r242704
13770      </part>
13871   </software>
13972
140<!-- Cartridge Type: AROS (overhead bytes: 01 02 0A80 8F 01 0000) -->
14173   <software name="etoolkit" supported="no">
142      <description>eToolkit (Toolkit EPROM)</description>
74      <description>eToolkit</description>
14375      <year>19??</year>
14476      <publisher>&lt;unknown&gt;</publisher>
14577      <part name="cart" interface="timex_cart">
r242703r242704
14981      </part>
15082   </software>
15183
152<!-- Cartridge Type: AROS (overhead bytes: 02 02 73EC 0F 01 BF17) -->
15384   <software name="fsim" supported="no">
15485      <description>Flight Simulator</description>
155      <year>1983</year>
156      <publisher>Timex Computer</publisher>
86      <year>19??</year>
87      <publisher>&lt;unknown&gt;</publisher>
15788      <part name="cart" interface="timex_cart">
15889         <dataarea name="rom" size="65536">
15990            <rom name="flight simulator.bin" size="32768" crc="e1f2e4cc" sha1="30a78405f88041d36f43e2526fb01539bb469458" offset="0x8000" />
r242703r242704
16192      </part>
16293   </software>
16394
164<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
16595   <software name="gyruss" supported="no">
16696      <description>Gyruss</description>
167      <year>1984</year>
168      <publisher>Parker Software</publisher>
97      <year>19??</year>
98      <publisher>&lt;unknown&gt;</publisher>
16999      <part name="cart" interface="timex_cart">
170100         <dataarea name="rom" size="65536">
171101            <rom name="gyruss.bin" size="16384" crc="b2719977" sha1="d950810bf6b729edbc8a92e1e6bdc609cb4d5895" offset="0x0000" />
r242703r242704
173103      </part>
174104   </software>
175105
176<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
177106   <software name="horacesp" supported="no">
178107      <description>Horace &amp; the Spiders</description>
179      <year>1983</year>
180      <publisher>Timex Computer</publisher>
108      <year>19??</year>
109      <publisher>&lt;unknown&gt;</publisher>
181110      <part name="cart" interface="timex_cart">
182111         <dataarea name="rom" size="65536">
183112            <rom name="horace and the spiders.bin" size="16384" crc="86e3366d" sha1="904f4e566911b242f967f7d13a16fd81ff1255cd" offset="0x0000" />
r242703r242704
185114      </part>
186115   </software>
187116
188<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
189117   <software name="horace" supported="no">
190118      <description>Hungry Horace</description>
191      <year>1983</year>
192      <publisher>Timex Computer</publisher>
119      <year>19??</year>
120      <publisher>&lt;unknown&gt;</publisher>
193121      <part name="cart" interface="timex_cart">
194122         <dataarea name="rom" size="65536">
195123            <rom name="hungry horace.bin" size="16384" crc="1b31125f" sha1="429270c85b5692d9cdb173a7ce6f297b8f35c4c3" offset="0x0000" />
r242703r242704
197125      </part>
198126   </software>
199127
200<!-- Cartridge Type: LROS (overhead bytes: 00 01 F73F FC) -->
201128   <software name="jupitace" supported="no">
202129      <description>Jupiter ACE Emulator</description>
203      <year>1985</year>
204      <publisher>Paul Farrow</publisher>
130      <year>19??</year>
131      <publisher>&lt;unknown&gt;</publisher>
205132      <part name="cart" interface="timex_cart">
206133         <dataarea name="rom" size="65536">
207134            <rom name="jupiter ace emulator.bin" size="16384" crc="905c71fc" sha1="88544ccbc8acdf23adbfb0a37f34283702b09348" offset="0x0000" />
r242703r242704
209136      </part>
210137   </software>
211138
212<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
213139   <software name="locomotn" supported="no">
214140      <description>Loco Motion</description>
215      <year>1984</year>
216      <publisher>Parker Software</publisher>
141      <year>19??</year>
142      <publisher>&lt;unknown&gt;</publisher>
217143      <part name="cart" interface="timex_cart">
218144         <dataarea name="rom" size="65536">
219145            <rom name="loco motion.bin" size="16384" crc="0e0302ca" sha1="0974f75f99d2acb2f3e767c26a2efbef5eb93235" offset="0x0000" />
r242703r242704
221147      </part>
222148   </software>
223149
224<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FE) -->
225150   <software name="montezum" supported="no">
226151      <description>Montezuma's Revenge</description>
227      <year>1984</year>
228      <publisher>Parker Software</publisher>
152      <year>19??</year>
153      <publisher>&lt;unknown&gt;</publisher>
229154      <part name="cart" interface="timex_cart">
230155         <dataarea name="rom" size="65536">
231156            <rom name="montezuma's revenge.bin" size="8192" crc="683f9f93" sha1="406e1ba6eeb94142696d22293782bfd067b2233c" offset="0x0000" />
r242703r242704
233158      </part>
234159   </software>
235160
236<!-- Cartridge Type: AROS (overhead bytes: 01 02 0880 EF 01 0000) -->
237161   <software name="mterm" supported="no">
238      <description>MTERM - Smart Terminal Program</description>
239      <year>1983</year>
240      <publisher>Westridge Communications</publisher>
162      <description>MTERM</description>
163      <year>19??</year>
164      <publisher>&lt;unknown&gt;</publisher>
241165      <part name="cart" interface="timex_cart">
242166         <dataarea name="rom" size="65536">
243167            <rom name="mterm.bin" size="8192" crc="8e0be19f" sha1="8b18268601c895dc90e79ec9605ed40925832979" offset="0x8000" />
r242703r242704
245169      </part>
246170   </software>
247171
248<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 F0) -->
249172   <software name="penetrat" supported="no">
250173      <description>Penetrator</description>
251      <year>1983</year>
252      <publisher>Timex Computer</publisher>
174      <year>19??</year>
175      <publisher>&lt;unknown&gt;</publisher>
253176      <part name="cart" interface="timex_cart">
254177         <dataarea name="rom" size="65536">
255178            <rom name="penetrator.bin" size="32768" crc="19cb2f78" sha1="826d03e2cfc176047a2e913315115d5f71c9ae2a" offset="0x0000" />
r242703r242704
257180      </part>
258181   </software>
259182
260<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 F8) -->
261183   <software name="pinball" supported="no">
262      <description>Pro Pinball</description>
263      <year>1983</year>
264      <publisher>Timex Computer</publisher>
184      <description>Pinball</description>
185      <year>19??</year>
186      <publisher>&lt;unknown&gt;</publisher>
265187      <part name="cart" interface="timex_cart">
266188         <dataarea name="rom" size="65536">
267189            <rom name="pinball.bin" size="24576" crc="2fb6a452" sha1="ab74fbe21df513e52aef960be018369ebfb3c33f" offset="0x0000" />
r242703r242704
269191      </part>
270192   </software>
271193
272<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
273194   <software name="planet" supported="no">
274195      <description>Planetoids</description>
275      <year>1983</year>
276      <publisher>Sinclair Research</publisher>
196      <year>19??</year>
197      <publisher>&lt;unknown&gt;</publisher>
277198      <part name="cart" interface="timex_cart">
278199         <dataarea name="rom" size="65536">
279200            <rom name="planetoids.bin" size="16384" crc="a6c9cc94" sha1="70e05f2d1aaad79cfa2d90111ba0a58cca4cacd9" offset="0x0000" />
r242703r242704
281202      </part>
282203   </software>
283204
284<!-- Cartridge Type: LROS (overhead bytes: 00 01 4302 FE) -->
285205   <software name="popeye" supported="no">
286206      <description>Popeye</description>
287      <year>1984</year>
288      <publisher>Parker Software</publisher>
207      <year>19??</year>
208      <publisher>&lt;unknown&gt;</publisher>
289209      <part name="cart" interface="timex_cart">
290210         <dataarea name="rom" size="65536">
291211            <rom name="popeye.bin" size="8192" crc="dae064c0" sha1="dc0ab2c30a86647529d92a737d24f51f4de7ae19" offset="0x0000" />
r242703r242704
293213      </part>
294214   </software>
295215
296<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FE) -->
297216   <software name="qbert" supported="no">
298217      <description>Q*Bert</description>
299      <year>1984</year>
300      <publisher>Parker Software</publisher>
218      <year>19??</year>
219      <publisher>&lt;unknown&gt;</publisher>
301220      <part name="cart" interface="timex_cart">
302221         <dataarea name="rom" size="65536">
303222            <rom name="qbert.bin" size="8192" crc="58b45e9d" sha1="d748e5b504f3ea4e0cf472dca1746c2654361863" offset="0x0000" />
r242703r242704
305224      </part>
306225   </software>
307226
308<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FE) -->
309227   <software name="jedi" supported="no">
310228      <description>Return Of The Jedi - Death Star Battle</description>
311      <year>1984</year>
312      <publisher>Parker Software</publisher>
229      <year>19??</year>
230      <publisher>&lt;unknown&gt;</publisher>
313231      <part name="cart" interface="timex_cart">
314232         <dataarea name="rom" size="65536">
315233            <rom name="return of the jedi - death star battle.bin" size="8192" crc="0fafa2b8" sha1="27a50cf2a3272092f3bd350cb0d53619940f4453" offset="0x0000" />
r242703r242704
317235      </part>
318236   </software>
319237
320<!-- Cartridge Type: AROS (overhead bytes: 01 02 0880 EF 01 1500) -->
321238   <!-- TODO: add support for RAM in this cart (0xa000-0xffff) -->
322239   <software name="rwp32" supported="no">
323240      <description>rWP32</description>
r242703r242704
330247      </part>
331248   </software>
332249
333<!-- Cartridge Type: LROS (overhead bytes: 00 01 0080 CC) -->
334250   <software name="unicorn" supported="no">
335251      <description>Shadow of the Unicorn</description>
336      <year>1985</year>
337      <publisher>Mikro-Gen</publisher>
252      <year>19??</year>
253      <publisher>&lt;unknown&gt;</publisher>
338254      <part name="cart" interface="timex_cart">
339255         <dataarea name="rom" size="65536">
340256            <rom name="shadow of the unicorn.bin" size="65536" crc="9f7af8ef" sha1="676c9142e11b3b706f64b7606aa084f1bb217d67" offset="0x0000" />
r242703r242704
342258      </part>
343259   </software>
344260
345<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
346261   <software name="spacerai" supported="no">
347262      <description>Space Raiders</description>
348      <year>1983</year>
349      <publisher>Timex Computer</publisher>
263      <year>19??</year>
264      <publisher>&lt;unknown&gt;</publisher>
350265      <part name="cart" interface="timex_cart">
351266         <dataarea name="rom" size="65536">
352267            <rom name="space raiders.bin" size="16384" crc="86d7a08b" sha1="8e1da4c183e9af2ba11b0745820fff4017cbad19" offset="0x0000" />
r242703r242704
354269      </part>
355270   </software>
356271
357<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
358272   <software name="starwars" supported="no">
359273      <description>Star Wars - The Arcade Game</description>
360      <year>1984</year>
361      <publisher>Parker Software</publisher>
274      <year>19??</year>
275      <publisher>&lt;unknown&gt;</publisher>
362276      <part name="cart" interface="timex_cart">
363277         <dataarea name="rom" size="65536">
364278            <rom name="star wars - the arcade game.bin" size="16384" crc="22cd482b" sha1="c12f38c382fa2a07430fe6daaa3acd96820aa76d" offset="0x0000" />
r242703r242704
366280      </part>
367281   </software>
368282
369<!-- Cartridge Type: AROS (overhead bytes: 01 02 0880 0F 01 0000) -->
370283   <software name="statecap" supported="no">
371284      <description>States and Capitals</description>
372      <year>1983</year>
373      <publisher>Timex Computer</publisher>
285      <year>19??</year>
286      <publisher>&lt;unknown&gt;</publisher>
374287      <part name="cart" interface="timex_cart">
375288         <dataarea name="rom" size="65536">
376289            <rom name="states and capitals.bin" size="32768" crc="04bf4a3b" sha1="0ea77fb538bce31cd90f8f926deda7b90d99cf99" offset="0x8000" />
r242703r242704
378291      </part>
379292   </software>
380293
381<!-- Cartridge Type: AROS (overhead bytes: 02 02 0880 0F 01 1500) -->
382294   <software name="superhzd" supported="no">
383295      <description>Super Hot-Z Disassembler v2.51 (AROS)</description>
384296      <year>19??</year>
385      <publisher>Ray Kingsley</publisher>
297      <publisher>&lt;unknown&gt;</publisher>
386298      <part name="cart" interface="timex_cart">
387299         <dataarea name="rom" size="65536">
388300            <rom name="superhotzdisassemblerv2.51-aros.bin" size="24576" crc="7bf239be" sha1="7c04c6e861b4b82ee3fd5bf21b17d6dd7d893386" offset="0x8000" />
r242703r242704
390302      </part>
391303   </software>
392304
393<!-- Cartridge Type: LROS (overhead bytes: 00 01 F45E F8) -->
394305   <software name="swordfgt" supported="no">
395306      <description>Swordfight</description>
396      <year>1983</year>
397      <publisher>Timex Computer</publisher>
307      <year>19??</year>
308      <publisher>&lt;unknown&gt;</publisher>
398309      <part name="cart" interface="timex_cart">
399310         <dataarea name="rom" size="65536">
400311            <rom name="swordfight.bin" size="24576" crc="95155511" sha1="69e7e0111ed8d8925314deb661990bf8c9eb5cc4" offset="0x0000" />
r242703r242704
402313      </part>
403314   </software>
404315
405<!-- Cartridge Type: AROS (overhead bytes: 01 02 0880 CF 01 0000) -->
406316   <software name="tasword2" supported="no">
407317      <description>Tasword II</description>
408      <year>1983</year>
409      <publisher>Tasman Software</publisher>
318      <year>19??</year>
319      <publisher>&lt;unknown&gt;</publisher>
410320      <part name="cart" interface="timex_cart">
411321         <dataarea name="rom" size="65536">
412322            <rom name="tasword ii.bin" size="16384" crc="7b2a0e31" sha1="2bdf3c10a70e4a02410d4f20cbc1c0aaa444d1e2" offset="0x8000" />
r242703r242704
414324      </part>
415325   </software>
416326
417<!-- Cartridge Type: ROM (you must type OUT 244,3 to activate) -->
327<!-- This must map on the HOME memory?!? How does this actually work? -->
418328   <software name="timeword" supported="no">
419329      <description>TimeWord</description>
420      <year>1986</year>
421      <publisher>TMX Portugal</publisher>
330      <year>19??</year>
331      <publisher>&lt;unknown&gt;</publisher>
422332      <part name="cart" interface="timex_cart">
423333         <dataarea name="rom" size="65536">
424334            <rom name="timeword.bin" size="16384" crc="a767d39e" sha1="5c606380234f867aafd3d215982eabf374553118" offset="0x0000" />
r242703r242704
426336      </part>
427337   </software>
428338
429<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FE) -->
430339   <software name="vucalc" supported="no">
431      <description>VU-Calc</description>
432      <year>1983</year>
433      <publisher>Timex Computer</publisher>
340      <description>vu-calc</description>
341      <year>19??</year>
342      <publisher>&lt;unknown&gt;</publisher>
434343      <part name="cart" interface="timex_cart">
435344         <dataarea name="rom" size="65536">
436345            <rom name="vu-calc.bin" size="8192" crc="7bbcc167" sha1="efc626c55125b8a8da527bd986ed9d4065973e8c" offset="0x0000" />
r242703r242704
438347      </part>
439348   </software>
440349
441<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
442350   <software name="vufile" supported="no">
443      <description>VU-File</description>
444      <year>1983</year>
445      <publisher>Timex Computer</publisher>
351      <description>vu-file</description>
352      <year>19??</year>
353      <publisher>&lt;unknown&gt;</publisher>
446354      <part name="cart" interface="timex_cart">
447355         <dataarea name="rom" size="65536">
448356            <rom name="vu-file.bin" size="16384" crc="94dafab6" sha1="1007aba595085bc46c406f933484a4dbbd0154bb" offset="0x0000" />
r242703r242704
450358      </part>
451359   </software>
452360
453<!-- Cartridge Type: LROS (overhead bytes: 00 01 0500 FC) -->
454361   <software name="zebraos" supported="no">
455362      <description>Zebra OS 64</description>
456      <year>1985</year>
457      <publisher>Zebra Systems</publisher>
363      <year>19??</year>
364      <publisher>&lt;unknown&gt;</publisher>
458365      <part name="cart" interface="timex_cart">
459366         <dataarea name="rom" size="65536">
460367            <rom name="zebra os 64.bin" size="16384" crc="928a8207" sha1="335d2f858d5bbe63989a2df1620ab5838337cfbd" offset="0x0000" />
trunk/hash/vz_cass.xml
r242703r242704
55
66List of known tape releases by Dick Smith in Australia:
77
8X-7274  Attack of the Killer Tomatoes
9X-7231  Match Box
10X-7232  Poker
11X-7233  Hangman
12X-7234  Slot Machine/Knock Off/Russian Roulette
13X-7235  Blackjack
14X-7236  Circus (*)
15X-7237  Biorhythm/Pair Matching/Calendar
16X-7238  Horse Race
17X-7239  Invaders (*)
18X-7240  Dynasty Derby
19X-7241  Learjet
20X-7242  Ghost Hunter (*)
21X-7243  Hoppy (*)
22X-7244  Super Snake
23X-7245  Knights and Dragons
24X-7247  Star Blaster (*)
25X-7248  VZ-Asteroids
26X-7249  Air Traffic Controller
27X-7250  Lunar Lander
28X-7251  Statistics 1
29X-7252  Statistics 2
30X-7253  Matrix
31X-7254  Tennis Lesson/Golf Lesson
32X-7255  Introduction to BASIC
33X-7256  Elementary Geometry
34X-7257  Speed Reading
35X-7258  Typing Teacher
36X-7259  Mailing List
37X-7261  Portfolio Management
38X-7262  Discounted Cash Flow Analysis
39X-7263  Financial Ratio Analysis
40X-7264  Tennis (*)
41X-7265  Checkers
42X-7266  Planet Patrol (*)
43X-7268  Ladder Challenge (*)
44X-7270  Panik (*)
45X-7271  Othello
46X-7272  Dracula's Castle
47X-7273  Backgammon
48X-7275  VZ Chess (*)
49X-7276  Music Writer
50X-7278  Disassembler
51X-7279  Duel
52X-7280  Hex Utilities
53X-7281  Word Processor
54X-7282  Editor Assembler
55X-7285  Spell'O'Matic 1 & 2
56X-7286  Spell'O'Matic 3 & 4
57X-7287  Flashword 1 & 2
58X-7288  Flashword 3 & 4
59X-7289  Metric Spycatcher
60X-7290  Whizkid Spycatcher
61X-7330  Sprite Generator
62X-7331  Formula One
63X-7332  Galaxon (*)
64X-7333  Dawn Patrol (*)
65X-7339  Space RAM
66X-7342  Crash
67X-7344  Maze of Argon
68X-7345  Word Matching
8X-7274   Attack of the Killer Tomatoes
9X-7231   Match Box
10X-7232   Poker
11X-7233   Hangman
12X-7234   Slot Machine/Knock Off/Russian Roulette
13X-7235   Blackjack
14X-7236   Circus (*)
15X-7237   Biorhythm/Pair Matching/Calendar
16X-7238   Horse Race
17X-7239   Invaders (*)
18X-7240   Dynasty Derby
19X-7241   Learjet
20X-7242   Ghost Hunter (*)
21X-7243   Hoppy (*)
22X-7244   Super Snake
23X-7245   Knights and Dragons
24X-7247   Star Blaster (*)
25X-7248   VZ-Asteroids
26X-7249   Air Traffic Controller
27X-7250   Lunar Lander
28X-7251   Statistics 1
29X-7252   Statistics 2
30X-7253   Matrix
31X-7254   Tennis Lesson/Golf Lesson
32X-7255   Introduction to BASIC
33X-7256   Elementary Geometry
34X-7257   Speed Reading
35X-7258   Typing Teacher
36X-7259   Mailing List
37X-7261   Portfolio Management
38X-7262   Discounted Cash Flow Analysis
39X-7263   Financial Ratio Analysis
40X-7264   Tennis (*)
41X-7265   Checkers
42X-7266   Planet Patrol (*)
43X-7268   Ladder Challenge (*)
44X-7270   Panik (*)
45X-7271   Othello
46X-7272   Dracula's Castle
47X-7273   Backgammon
48X-7275   VZ Chess (*)
49X-7276   Music Writer
50X-7278   Disassembler
51X-7279   Duel
52X-7280   Hex Utilities
53X-7281   Word Processor
54X-7282   Editor Assembler
55X-7285   Spell'O'Matic 1 & 2
56X-7286   Spell'O'Matic 3 & 4
57X-7287   Flashword 1 & 2
58X-7288   Flashword 3 & 4
59X-7289   Metric Spycatcher
60X-7290   Whizkid Spycatcher
61X-7330   Sprite Generator
62X-7331   Formula One
63X-7332   Galaxon (*)
64X-7333   Dawn Patrol (*)
65X-7339   Space RAM
66X-7342   Crash
67X-7344   Maze of Argon
68X-7345   Word Matching
6969
7070* = dumped
7171
trunk/makefile
r242703r242704
340340EXE = .exe
341341endif
342342
343# extension for build tools
344BUILD_EXE =
345
346ifeq ($(OS),Windows_NT)
347BUILD_EXE = .exe
343ifndef BUILD_EXE
344BUILD_EXE = $(EXE)
348345endif
349ifneq ($(OS2_SHELL),)
350BUILD_EXE = .exe
351endif
352346
353347# compiler, linker and utilities
354348ifneq ($(TARGETOS),emscripten)
r242703r242704
356350CC = @gcc
357351LD = @g++
358352endif
359MD = -mkdir$(BUILD_EXE)
353MD = -mkdir$(EXE)
360354RM = @rm -f
361355OBJDUMP = @objdump
362356PYTHON = @python
r242703r242704
605599ifneq (,$(findstring undefined,$(SANITIZE)))
606600ifneq (,$(findstring clang,$(CC)))
607601# TODO: check if linker is clang++
608# produces a lot of messages - disable it for now
609CCOMFLAGS += -fno-sanitize=alignment
610# these are false positives because of the way our delegates work
611CCOMFLAGS += -fno-sanitize=function
602CCOMFLAGS += -fno-sanitize=alignment -fno-sanitize=function -fno-sanitize=shift -fno-sanitize=null  -fno-sanitize=vptr -fno-sanitize=object-size
612603# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
613CCOMFLAGS += -fno-sanitize=shift
614# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/hd6309.c when this isn't disabled
615CCOMFLAGS += -fno-sanitize=object-size
616# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/konami.c, src/emu/cpu/m6809/hd6309.c, src/emu/video/psx.c when this isn't disabled
617CCOMFLAGS += -fno-sanitize=vptr
618# clang takes forever to compile src/emu/video/psx.c when this isn't disabled
619CCOMFLAGS += -fno-sanitize=null
620# clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled
621604CCOMFLAGS += -fno-sanitize=signed-integer-overflow
622605endif
623606endif
r242703r242704
928911   $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
929912   @echo Linking $@...
930913ifeq ($(TARGETOS),emscripten)
931   # Emscripten's linker seems to be stricter about the ordering of .a files
914# Emscripten's linker seems to be stricter about the ordering of .a files
932915   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@
933916else
934917   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@
trunk/src/build/build.mak
r242703r242704
3131VERINFO = $(VERINFO_TARGET)
3232
3333ifneq ($(TERM),cygwin)
34ifeq ($(OS),Windows_NT)
34ifeq ($(TARGETOS),win32)
3535MAKEDEP = $(subst /,\,$(MAKEDEP_TARGET))
3636MAKEMAK = $(subst /,\,$(MAKEMAK_TARGET))
3737MAKELIST = $(subst /,\,$(MAKELIST_TARGET))
r242703r242704
6464
6565$(MAKEDEP_TARGET): $(MAKEDEPOBJS) $(LIBOCORE) $(ZLIB)
6666   @echo Linking $@...
67   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
67   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
6868
6969
7070
r242703r242704
8383
8484$(MAKEMAK_TARGET): $(MAKEMAKOBJS) $(LIBOCORE) $(ZLIB)
8585   @echo Linking $@...
86   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
86   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
8787
8888
8989
r242703r242704
102102
103103$(MAKELIST_TARGET): $(MAKELISTOBJS) $(LIBOCORE) $(ZLIB)
104104   @echo Linking $@...
105   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
105   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
106106
107107
108108
r242703r242704
122122
123123$(PNG2BDC_TARGET): $(PNG2BDCOBJS) $(LIBOCORE) $(ZLIB)
124124   @echo Linking $@...
125   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
125   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
126126
127127
128128
r242703r242704
135135
136136$(VERINFO_TARGET): $(VERINFOOBJS) $(LIBOCORE)
137137   @echo Linking $@...
138   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
138   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
139139
140140else
141141#-------------------------------------------------
trunk/src/emu/bus/abckb/abc99.c
r242703r242704
8080//-------------------------------------------------
8181
8282ROM_START( abc99 )
83   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8483   ROM_DEFAULT_BIOS("107268")
8584   ROM_SYSTEM_BIOS( 0, "107268", "107268-17" )
85   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
86
87   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8688   ROMX_LOAD( "107268-17.z3", 0x0000, 0x0800, CRC(2f60cc35) SHA1(ebc6af9cd0a49a0d01698589370e628eebb6221c), ROM_BIOS(1) )
87   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
8889   ROMX_LOAD( "106819-09.z3", 0x0000, 0x1000, CRC(ffe32a71) SHA1(fa2ce8e0216a433f9bbad0bdd6e3dc0b540f03b7), ROM_BIOS(2) ) // ABC 99 6490423-01
8990
9091   ROM_REGION( 0x800, I8035_Z5_TAG, 0 )
trunk/src/emu/bus/bus.mak
r242703r242704
4545
4646#-------------------------------------------------
4747#
48#@src/emu/bus/a8sio/a8sio.h,BUSES += A8SIO
49#-------------------------------------------------
50
51ifneq ($(filter A8SIO,$(BUSES)),)
52OBJDIRS += $(BUSOBJ)/a8sio
53BUSOBJS += $(BUSOBJ)/a8sio/a8sio.o
54BUSOBJS += $(BUSOBJ)/a8sio/cassette.o
55endif
56
57
58#-------------------------------------------------
59#
6048#@src/emu/bus/abcbus/abcbus.h,BUSES += ABCBUS
6149#-------------------------------------------------
6250
r242703r242704
12661254
12671255#-------------------------------------------------
12681256#
1269#@src/emu/bus/gamegear/gear2gear.h,BUSES += GAMEGEAR
1270#-------------------------------------------------
1271
1272ifneq ($(filter GAMEGEAR,$(BUSES)),)
1273OBJDIRS += $(BUSOBJ)/gamegear
1274BUSOBJS += $(BUSOBJ)/gamegear/gear2gear.o
1275BUSOBJS += $(BUSOBJ)/gamegear/smsctrladp.o
1276endif
1277
1278#-------------------------------------------------
1279#
12801257#@src/emu/bus/gba/gba_slot.h,BUSES += GBA
12811258#-------------------------------------------------
12821259
trunk/src/emu/bus/centronics/epson_lx810l.c
r242703r242704
176176   MCFG_STEPPER_END_INDEX(24)
177177   MCFG_STEPPER_INDEX_PATTERN(0x00)
178178   MCFG_STEPPER_INIT_PHASE(2)
179
179   
180180MACHINE_CONFIG_END
181181
182182//-------------------------------------------------
r242703r242704
345345
346346void epson_lx810l_t::device_start()
347347{
348
348349}
349350
350351
trunk/src/emu/bus/dmv/k220.c
r242703r242704
105105   PORT_DIPNAME( 0x20, 0x20, "Detail Message" )
106106   PORT_DIPSETTING( 0x00, DEF_STR(Off) )
107107   PORT_DIPSETTING( 0x20, DEF_STR(On) )
108   PORT_DIPNAME( 0x40, 0x40, "Continuous Run" )
108   PORT_DIPNAME( 0x40, 0x40, "Continous Run" )
109109   PORT_DIPSETTING( 0x00, DEF_STR(Off) )
110110   PORT_DIPSETTING( 0x40, DEF_STR(On) )
111111   PORT_DIPNAME( 0x80, 0x80, "Diagnostic module" )
trunk/src/emu/bus/ieee488/c8050fdc.c
r242703r242704
2020#define LOG 1
2121
2222#define GCR_DECODE(_e, _i) \
23   ((BIT(_e, 6) << 7) | (BIT(_i, 7) << 6) | (_e & 0x33) | (BIT(_e, 2) << 3) | (_i & 0x04))
23    ((BIT(_e, 6) << 7) | (BIT(_i, 7) << 6) | (_e & 0x33) | (BIT(_e, 2) << 3) | (_i & 0x04))
2424
2525#define GCR_ENCODE(_e, _i) \
26   ((_e & 0xc0) << 2 | (_i & 0x80) | (_e & 0x3c) << 1 | (_i & 0x04) | (_e & 0x03))
26    ((_e & 0xc0) << 2 | (_i & 0x80) | (_e & 0x3c) << 1 | (_i & 0x04) | (_e & 0x03))
2727
2828
2929
trunk/src/emu/bus/isa/cga.c
r242703r242704
365365   astring tempstring;
366366   m_chr_gen_base = memregion(subtag(tempstring, "gfx1"))->base();
367367   m_chr_gen = m_chr_gen_base + m_chr_gen_offset[1];
368
368   
369369   save_item(NAME(m_framecnt));
370370   save_item(NAME(m_mode_control));
371371   save_item(NAME(m_color_select));
r242703r242704
374374   save_item(NAME(m_vsync));
375375   save_item(NAME(m_hsync));
376376   save_item(NAME(m_vram));
377   save_item(NAME(m_plantronics));
377   save_item(NAME(m_plantronics));
378378}
379379
380380
trunk/src/emu/bus/isa/sc499.h
r242703r242704
2828public:
2929   // construction/destruction
3030   sc499_ctape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
31
31   
3232   // image-level overrides
3333   virtual bool call_load();
3434   virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
3535   virtual void call_unload();
3636   virtual iodevice_t image_type() const { return IO_MAGTAPE; }
37
37   
3838   virtual bool is_readable()  const { return 1; }
3939   virtual bool is_writeable() const { return 1; }
4040   virtual bool is_creatable() const { return 1; }
trunk/src/emu/bus/megadrive/md_slot.c
r242703r242704
384384      m_type = md_get_pcb_id(slot_name);
385385
386386   // handle mirroring of ROM, unless it's SSF2 or Pier Solar
387   if (m_type != SSF2 && m_type != PSOLAR && m_type != CM_2IN1)
387   if (m_type != SSF2 && m_type != PSOLAR)
388388      m_cart->rom_map_setup(length);
389389
390390   return IMAGE_INIT_PASS;
trunk/src/emu/bus/megadrive/rom.c
r242703r242704
531531 CODEMASTERS 2 IN 1 (RESET BASED)
532532 -------------------------------------------------*/
533533
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x1fffff) + 0x200000)/2)
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x7ffff) + 0x200000)/2)
535535
536536READ16_MEMBER(md_rom_cm2in1_device::read)
537537{
trunk/src/emu/bus/sega8/rom.c
r242703r242704
899899
900900
901901/*-------------------------------------------------
902
902
903903 Hi-Com X-in-1 cart, uses writes to 0xffff to
904904 change program bank in 0x0000-0x7fff
905
905
906906 -------------------------------------------------*/
907907
908908READ8_MEMBER(sega8_hicom_device::read_cart)
909909{
910910   if (offset >= 0x8000)
911911      return m_rom[offset & 0x3fff];
912
912   
913913   return m_rom[(m_rom_bank_base * 0x8000) + offset];
914914}
915915
trunk/src/emu/bus/sega8/rom.h
r242703r242704
318318public:
319319   // construction/destruction
320320   sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
321
321   
322322   // device-level overrides
323323   virtual void device_start() { save_item(NAME(m_rom_bank_base)); }
324
324   
325325   virtual void late_bank_setup();
326
326   
327327   // reading and writing
328328   virtual DECLARE_READ8_MEMBER(read_cart);
329329   virtual DECLARE_WRITE8_MEMBER(write_cart) {}
330330   virtual DECLARE_WRITE8_MEMBER(write_mapper);
331
331   
332332protected:
333333   UINT8 m_rom_bank_base;
334334};
trunk/src/emu/bus/sms_ctrl/multitap.c
r242703r242704
2929//-------------------------------------------------
3030
3131sms_multitap_device::sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
32   device_t(mconfig, SMS_MULTITAP, "Multitap", tag, owner, clock, "sms_multitap", __FILE__),
32   device_t(mconfig, SMS_MULTITAP, "Furrtek's Multitap", tag, owner, clock, "sms_multitap", __FILE__),
3333   device_sms_control_port_interface(mconfig, *this),
3434   m_subctrl1_port(*this, "ctrl1"),
3535   m_subctrl2_port(*this, "ctrl2"),
trunk/src/emu/bus/sms_ctrl/sportsjp.c
r242703r242704
11/**********************************************************************
22
3    Sega Master System "Sports Pad" (Japanese model) emulation
3    Sega Master System "Sports Pad" (japanese model) emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
77
88**********************************************************************/
99
10// The Japanese Sports Pad controller is only required to play the cartridge
10// The japanese Sports Pad controller is only required to play the cartridge
1111// Sports Pad Soccer, released in Japan. It uses a different mode than the
1212// used by the US model, due to missing output lines on Sega Mark III
1313// controller ports.
trunk/src/emu/bus/sms_ctrl/sportsjp.h
r242703r242704
11/**********************************************************************
22
3    Sega Master System "Sports Pad" (Japanese model) emulation
3    Sega Master System "Sports Pad" (japanese model) emulation
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
77
88**********************************************************************/
99
10// The Japanese Sports Pad controller is only required to play the cartridge
10// The japanese Sports Pad controller is only required to play the cartridge
1111// Sports Pad Soccer, released in Japan. It uses a different mode than the
1212// used by the US model, due to missing output lines on Sega Mark III
1313// controller ports.
trunk/src/emu/cpu/arc/arc.c
r242703r242704
9999
100100void arc_device::execute_set_input(int irqline, int state)
101101{
102
102103}
103104
104105
trunk/src/emu/cpu/arc/arcdasm.c
r242703r242704
6868   /* 03 */ "PL", // (aka P          - Positive)
6969   /* 04 */ "MI", // (aka N          - Negative)
7070   /* 05 */ "CS", // (aka C,  LO     - Carry set / Lower than) (unsigned)
71   /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned)
71   /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned)
7272   /* 07 */ "VS", // (aka V          - Overflow set)
7373   /* 08 */ "VC", // (aka NV         - Overflow clear)
7474   /* 09 */ "GT", // (               - Greater than) (signed)
r242703r242704
204204      case 0x05: // BL
205205      print("%s(%s)(%s) %08x", basic[opcode], conditions[ARC_CONDITION], delaytype[ARC_BRANCH_DELAY], (ARC_BRANCH_ADDR<<2)+pc+4);
206206      break;
207
207   
208208      case 0x08: // ADD
209209      // todo, short / long immediate formats
210210      print("%s %s , %s , %s (%08x)", basic[opcode], regnames[ARC_REGOP_DEST], regnames[ARC_REGOP_OP1], regnames[ARC_REGOP_OP2], op &~ 0xfffffe00);
trunk/src/emu/cpu/arcompact/arcompact.c
r242703r242704
2424
2525const device_type ARCA5 = &device_creator<arcompact_device>;
2626
27
28READ32_MEMBER( arcompact_device::arcompact_auxreg002_LPSTART_r) { return m_LP_START&0xfffffffe; }
29WRITE32_MEMBER(arcompact_device::arcompact_auxreg002_LPSTART_w) { m_LP_START = data&0xfffffffe; }
30READ32_MEMBER( arcompact_device::arcompact_auxreg003_LPEND_r) { return m_LP_END&0xfffffffe; }
31WRITE32_MEMBER(arcompact_device::arcompact_auxreg003_LPEND_w) { m_LP_END = data&0xfffffffe; }
32
33READ32_MEMBER( arcompact_device::arcompact_auxreg00a_STATUS32_r) { return 0xffffdead; /*m_status32;*/ }
34
35READ32_MEMBER( arcompact_device::arcompact_auxreg025_INTVECTORBASE_r) { return m_INTVECTORBASE&0xfffffc00; }
36WRITE32_MEMBER(arcompact_device::arcompact_auxreg025_INTVECTORBASE_w) { m_INTVECTORBASE = data&0xfffffc00; }
37
38
39
40
41static ADDRESS_MAP_START( arcompact_auxreg_map, AS_IO, 32, arcompact_device )
42   AM_RANGE(0x000000008, 0x00000000b) AM_READWRITE(arcompact_auxreg002_LPSTART_r, arcompact_auxreg002_LPSTART_w)
43   AM_RANGE(0x00000000c, 0x00000000f) AM_READWRITE(arcompact_auxreg003_LPEND_r, arcompact_auxreg003_LPEND_w)
44   AM_RANGE(0x000000028, 0x00000002b) AM_READ(arcompact_auxreg00a_STATUS32_r) // r/o
45   AM_RANGE(0x000000094, 0x000000097) AM_READWRITE(arcompact_auxreg025_INTVECTORBASE_r, arcompact_auxreg025_INTVECTORBASE_w)
46ADDRESS_MAP_END
47
48//#define AUX_SPACE_ADDRESS_WIDTH 34  // IO space is 32 bits of dwords, so 34-bits
49#define AUX_SPACE_ADDRESS_WIDTH 64 // but the MAME core requires us to use power of 2 values for >32
50
5127arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5228   : cpu_device(mconfig, ARCA5, "ARCtangent-A5", tag, owner, clock, "arca5", __FILE__)
5329   , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) // some docs describe these as 'middle endian'?!
54   , m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) )
5530{
5631}
5732
r242703r242704
8459   m_debugger_temp = 0;
8560
8661   m_program = &space(AS_PROGRAM);
87   m_io = &space(AS_IO);
8862
8963   state_add( 0,  "PC", m_debugger_temp).callimport().callexport().formatstr("%08X");
9064
9165   state_add( 0x10,  "STATUS32", m_debugger_temp).callimport().callexport().formatstr("%08X");
92   state_add( 0x11,  "LP_START", m_debugger_temp).callimport().callexport().formatstr("%08X");
93   state_add( 0x12,  "LP_END", m_debugger_temp).callimport().callexport().formatstr("%08X");
9466
9567   state_add(STATE_GENPC, "GENPC", m_debugger_temp).callexport().noshow();
9668
r242703r242704
11688      case 0x10:
11789         m_debugger_temp = m_status32;
11890         break;
119      case 0x11:
120         m_debugger_temp = m_LP_START;
121         break;
122      case 0x12:
123         m_debugger_temp = m_LP_END;
124         break;
12591
12692      case STATE_GENPC:
12793         m_debugger_temp = m_pc;
r242703r242704
150116      case 0x10:
151117         m_status32 = m_debugger_temp;
152118         break;
153      case 0x11:
154         m_LP_START = m_debugger_temp;
155         break;
156      case 0x12:
157         m_LP_END = m_debugger_temp;
158         break;
159119
160120      default:
161121         if ((index >= 0x100) && (index < 0x140))
r242703r242704
177137      m_regs[i] = 0;
178138
179139   m_status32 = 0;
180   m_LP_START = 0;
181   m_LP_END = 0;
182   m_INTVECTORBASE = 0;
183
184140}
185141
186
187142/*****************************************************************************/
188143
189
190144void arcompact_device::execute_set_input(int irqline, int state)
191145{
146
192147}
trunk/src/emu/cpu/arcompact/arcompact.h
r242703r242704
2121ARCOMPACT_RETTYPE arcompact_handle##name##_p11(OPS_32) \
2222{ \
2323   int M = (op & 0x00000020) >> 5; \
24      \
24    \
2525   switch (M) \
2626   { \
2727      case 0x00: return arcompact_handle##name##_p11_m0(PARAMS); \
2828      case 0x01: return arcompact_handle##name##_p11_m1(PARAMS); \
2929   } \
30      \
30    \
3131   return 0; \
32};
32}; \
33
3334#define ARCOMPACT_HANDLER04_TYPE(name) \
3435ARCOMPACT_RETTYPE arcompact_handle##name(OPS_32) \
3536{ \
r242703r242704
4445   } \
4546   \
4647   return 0; \
47};
48}; \
4849
50
4951#define ARCOMPACT_HANDLER04_TYPE_PM(name) \
5052   ARCOMPACT_RETTYPE arcompact_handle##name##_p00(OPS_32); \
5153   ARCOMPACT_RETTYPE arcompact_handle##name##_p01(OPS_32); \
r242703r242704
5355   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m0(OPS_32); \
5456   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m1(OPS_32); \
5557   ARCOMPACT_HANDLER04_P11_TYPE(name); \
56   ARCOMPACT_HANDLER04_TYPE(name);
58   ARCOMPACT_HANDLER04_TYPE(name); \
5759
60
5861class arcompact_device : public cpu_device
5962{
6063public:
6164   // construction/destruction
6265   arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
63   
64   DECLARE_READ32_MEMBER( arcompact_auxreg002_LPSTART_r);
65   DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w);
66   DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r);
67   DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w);
68   
69   DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r);
70   DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r);
71   DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w);
7266
73   
7467protected:
7568   // device-level overrides
7669   virtual void device_start();
r242703r242704
8477   virtual void execute_set_input(int inputnum, int state);
8578
8679   // device_memory_interface overrides
87   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
80   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
8881
8982   // device_state_interface overrides
9083   virtual void state_import(const device_state_entry &entry);
r242703r242704
153146   ARCOMPACT_RETTYPE arcompact_handle01_01_01_0f(OPS_32);
154147   ARCOMPACT_RETTYPE arcompact_handle02(OPS_32);
155148   ARCOMPACT_RETTYPE arcompact_handle03(OPS_32);
156//  ARCOMPACT_RETTYPE arcompact_handle04_00(OPS_32);
149//   ARCOMPACT_RETTYPE arcompact_handle04_00(OPS_32);
157150   ARCOMPACT_RETTYPE arcompact_handle04_01(OPS_32);
158//  ARCOMPACT_RETTYPE arcompact_handle04_02(OPS_32);
151   ARCOMPACT_RETTYPE arcompact_handle04_02(OPS_32);
159152   ARCOMPACT_RETTYPE arcompact_handle04_03(OPS_32);
160//  ARCOMPACT_RETTYPE arcompact_handle04_04(OPS_32);
161//  ARCOMPACT_RETTYPE arcompact_handle04_05(OPS_32);
162//  ARCOMPACT_RETTYPE arcompact_handle04_06(OPS_32);
163//  ARCOMPACT_RETTYPE arcompact_handle04_07(OPS_32);
153//   ARCOMPACT_RETTYPE arcompact_handle04_04(OPS_32);
154//   ARCOMPACT_RETTYPE arcompact_handle04_05(OPS_32);
155//   ARCOMPACT_RETTYPE arcompact_handle04_06(OPS_32);
156//   ARCOMPACT_RETTYPE arcompact_handle04_07(OPS_32);
164157   ARCOMPACT_RETTYPE arcompact_handle04_08(OPS_32);
165158   ARCOMPACT_RETTYPE arcompact_handle04_09(OPS_32);
166//  ARCOMPACT_RETTYPE arcompact_handle04_0a(OPS_32);
159//   ARCOMPACT_RETTYPE arcompact_handle04_0a(OPS_32);
167160   ARCOMPACT_RETTYPE arcompact_handle04_0b(OPS_32);
168161   ARCOMPACT_RETTYPE arcompact_handle04_0c(OPS_32);
169162   ARCOMPACT_RETTYPE arcompact_handle04_0d(OPS_32);
170//  ARCOMPACT_RETTYPE arcompact_handle04_0e(OPS_32);
171//  ARCOMPACT_RETTYPE arcompact_handle04_0f(OPS_32);
163   ARCOMPACT_RETTYPE arcompact_handle04_0e(OPS_32);
164//   ARCOMPACT_RETTYPE arcompact_handle04_0f(OPS_32);
172165   ARCOMPACT_RETTYPE arcompact_handle04_10(OPS_32);
173166   ARCOMPACT_RETTYPE arcompact_handle04_11(OPS_32);
174167   ARCOMPACT_RETTYPE arcompact_handle04_12(OPS_32);
175//  ARCOMPACT_RETTYPE arcompact_handle04_13(OPS_32);
176//  ARCOMPACT_RETTYPE arcompact_handle04_14(OPS_32);
177//  ARCOMPACT_RETTYPE arcompact_handle04_15(OPS_32);
178//  ARCOMPACT_RETTYPE arcompact_handle04_16(OPS_32);
179//  ARCOMPACT_RETTYPE arcompact_handle04_17(OPS_32);
180//  ARCOMPACT_RETTYPE arcompact_handle04_18(OPS_32);
181//  ARCOMPACT_RETTYPE arcompact_handle04_19(OPS_32);
168   ARCOMPACT_RETTYPE arcompact_handle04_13(OPS_32);
169   ARCOMPACT_RETTYPE arcompact_handle04_14(OPS_32);
170   ARCOMPACT_RETTYPE arcompact_handle04_15(OPS_32);
171//   ARCOMPACT_RETTYPE arcompact_handle04_16(OPS_32);
172   ARCOMPACT_RETTYPE arcompact_handle04_17(OPS_32);
173   ARCOMPACT_RETTYPE arcompact_handle04_18(OPS_32);
174   ARCOMPACT_RETTYPE arcompact_handle04_19(OPS_32);
182175   ARCOMPACT_RETTYPE arcompact_handle04_1a(OPS_32);
183176   ARCOMPACT_RETTYPE arcompact_handle04_1b(OPS_32);
184177   ARCOMPACT_RETTYPE arcompact_handle04_1c(OPS_32);
185178   ARCOMPACT_RETTYPE arcompact_handle04_1d(OPS_32);
186//  ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
187//   ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
179//   ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
180   ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
188181   ARCOMPACT_RETTYPE arcompact_handle04_22(OPS_32);
189182   ARCOMPACT_RETTYPE arcompact_handle04_23(OPS_32);
190183   ARCOMPACT_RETTYPE arcompact_handle04_28(OPS_32);
191184   ARCOMPACT_RETTYPE arcompact_handle04_29(OPS_32);
192//   ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
193//  ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
185   ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
186   ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
194187   ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
195188   ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
196//  ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
197//   ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
189   ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
190   ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
198191   ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
199192   ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
200193   ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32);
201//  ARCOMPACT_RETTYPE arcompact_handle04_2f_07(OPS_32);
202//  ARCOMPACT_RETTYPE arcompact_handle04_2f_08(OPS_32);
194//   ARCOMPACT_RETTYPE arcompact_handle04_2f_07(OPS_32);
195//   ARCOMPACT_RETTYPE arcompact_handle04_2f_08(OPS_32);
203196   ARCOMPACT_RETTYPE arcompact_handle04_2f_09(OPS_32);
204197   ARCOMPACT_RETTYPE arcompact_handle04_2f_0a(OPS_32);
205198   ARCOMPACT_RETTYPE arcompact_handle04_2f_0b(OPS_32);
r242703r242704
770763   ARCOMPACT_RETTYPE arcompact_handle19_0x_helper(OPS_16, const char* optext, int shift, int format);
771764   ARCOMPACT_RETTYPE arcompact_handle1e_0x_helper(OPS_16, const char* optext);
772765   ARCOMPACT_RETTYPE arcompact_handle1e_03_0x_helper(OPS_16, const char* optext);
773   
774766
775   UINT32 handle_jump_to_addr(int delay, int link, UINT32 address, UINT32 next_addr);
776   UINT32 handle_jump_to_register(int delay, int link, UINT32 reg, UINT32 next_addr, int flag);
777
778767   ARCOMPACT_RETTYPE get_insruction(OPS_32);
779768
780769   ARCOMPACT_HANDLER04_TYPE_PM(04_00);
781   ARCOMPACT_HANDLER04_TYPE_PM(04_02);
782770   ARCOMPACT_HANDLER04_TYPE_PM(04_04);
783771   ARCOMPACT_HANDLER04_TYPE_PM(04_05);
784772   ARCOMPACT_HANDLER04_TYPE_PM(04_06);
785773   ARCOMPACT_HANDLER04_TYPE_PM(04_07);
786774   ARCOMPACT_HANDLER04_TYPE_PM(04_0a);
787   ARCOMPACT_HANDLER04_TYPE_PM(04_0e);
788775   ARCOMPACT_HANDLER04_TYPE_PM(04_0f);
789   ARCOMPACT_HANDLER04_TYPE_PM(04_13);
790   ARCOMPACT_HANDLER04_TYPE_PM(04_14);
791   ARCOMPACT_HANDLER04_TYPE_PM(04_15);
792776   ARCOMPACT_HANDLER04_TYPE_PM(04_16);
793   ARCOMPACT_HANDLER04_TYPE_PM(04_17);
794   ARCOMPACT_HANDLER04_TYPE_PM(04_18);
795   ARCOMPACT_HANDLER04_TYPE_PM(04_19);
796777   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
797   ARCOMPACT_HANDLER04_TYPE_PM(04_21);
798   ARCOMPACT_HANDLER04_TYPE_PM(04_2a);
799   ARCOMPACT_HANDLER04_TYPE_PM(04_2b);
800778
801   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02);
802   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_03);
803779   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07);
804780   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08);
805781
r242703r242704
808784
809785
810786private:
811   const address_space_config m_program_config;
812   const address_space_config m_io_config;
787   address_space_config m_program_config;
813788
814789   UINT32 m_pc;
815790
816791   address_space *m_program;
817   address_space  *m_io;
818
819792   int m_icount;
820793
821794   UINT32 m_debugger_temp;
r242703r242704
825798   inline  UINT32 READ32(UINT32 address) { return m_program->read_dword(address << 2); }
826799   inline void WRITE32(UINT32 address, UINT32 data) { m_program->write_dword(address << 2, data); }
827800   inline UINT16 READ16(UINT32 address) { return m_program->read_word(address << 1); }
828   inline void WRITE16(UINT32 address, UINT16 data){   m_program->write_word(address << 1, data); }
801   inline void WRITE16(UINT32 address, UINT16 data){    m_program->write_word(address << 1, data); }
829802   inline UINT8 READ8(UINT32 address) { return m_program->read_byte(address << 0); }
830   inline void WRITE8(UINT32 address, UINT8 data){     m_program->write_byte(address << 0, data); }
803   inline void WRITE8(UINT32 address, UINT8 data){    m_program->write_byte(address << 0, data); }
831804
832   inline  UINT64 READAUX(UINT64 address) { return m_io->read_dword(address *4); }
833   inline void WRITEAUX(UINT64 address, UINT32 data) { m_io->write_dword(address *4, data); }
834
835
836   int check_condition(UINT8 condition);
837
838805   UINT32 m_regs[0x40];
839806
840807   int m_delayactive;
841808   int m_delaylinks;
842809   UINT32 m_delayjump;
843810
844//  f  e  d  c| b  a  9  8| 7  6  5  4| 3  2  1  0
811//   f  e  d  c| b  a  9  8| 7  6  5  4| 3  2  1  0
845812//  -  -  -  L| Z  N  C  V| U DE AE A2|A1 E2 E1  H
846813   UINT32 m_status32;
847
848   UINT32 m_LP_START;
849   UINT32 m_LP_END;
850   UINT32 m_INTVECTORBASE;
851
852814};
853815
854816#define V_OVERFLOW_FLAG (0x00000100)
r242703r242704
876838#define STATUS32_CLEAR_Z (m_status32 &= ~Z_ZERO_FLAG)
877839#define STATUS32_CHECK_Z (m_status32 &   Z_ZERO_FLAG)
878840
879// Condition 0x0c (LE)
880#define CONDITION_LE ((STATUS32_CHECK_Z) || (STATUS32_CHECK_N && !STATUS32_CHECK_V) ||  (!STATUS32_CHECK_N && STATUS32_CHECK_V)) // Z or (N and /V) or (/N and V)
881#define CONDITION_EQ (STATUS32_CHECK_Z)
882#define CONDITION_CS (STATUS32_CHECK_C)
883#define CONDITION_LT ((STATUS32_CHECK_N && !STATUS32_CHECK_V) || (!STATUS32_CHECK_N && STATUS32_CHECK_V))
884#define CONDITION_MI (STATUS32_CHECK_N)
885841
886842extern const device_type ARCA5;
887843
trunk/src/emu/cpu/arcompact/arcompact_common.c
r242703r242704
44
55\*********************************/
66
7// condition codes (basic ones are the same as arc
7// condition codes (basic ones are the same as arc
88const char *conditions[0x20] =
99{
1010   /* 00 */ "AL", // (aka RA         - Always)
r242703r242704
1313   /* 03 */ "PL", // (aka P          - Positive)
1414   /* 04 */ "MI", // (aka N          - Negative)
1515   /* 05 */ "CS", // (aka C,  LO     - Carry set / Lower than) (unsigned)
16   /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned)
16   /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned)
1717   /* 07 */ "VS", // (aka V          - Overflow set)
1818   /* 08 */ "VC", // (aka NV         - Overflow clear)
1919   /* 09 */ "GT", // (               - Greater than) (signed)
r242703r242704
4444#define UNUSED_REG "unusedreg"
4545
4646#define AUX_UNUSED_16 \
47   /* 0xxx0 */ UNUSED_REG, /* 0xxx1 */ UNUSED_REG, /* 0xxx2 */ UNUSED_REG, /* 0xxx3 */ UNUSED_REG, /* 0xxx4 */ UNUSED_REG, /* 0xxx5 */ UNUSED_REG, /* 0xxx6 */ UNUSED_REG, /* 0xxx7 */ UNUSED_REG, /* 0xxx8 */ UNUSED_REG, /* 0xxx9 */ UNUSED_REG, /* 0xxxa */ UNUSED_REG, /* 0xxxb */ UNUSED_REG, /* 0xxxc */ UNUSED_REG, /* 0xxxd */ UNUSED_REG, /* 0xxxe */ UNUSED_REG, /* 0xxxf */ UNUSED_REG,
47   /* 0xxx0 */ UNUSED_REG,   /* 0xxx1 */ UNUSED_REG,   /* 0xxx2 */ UNUSED_REG,   /* 0xxx3 */ UNUSED_REG,   /* 0xxx4 */ UNUSED_REG,   /* 0xxx5 */ UNUSED_REG,   /* 0xxx6 */ UNUSED_REG,   /* 0xxx7 */ UNUSED_REG,   /* 0xxx8 */ UNUSED_REG,   /* 0xxx9 */ UNUSED_REG,   /* 0xxxa */ UNUSED_REG,   /* 0xxxb */ UNUSED_REG,   /* 0xxxc */ UNUSED_REG,   /* 0xxxd */ UNUSED_REG,   /* 0xxxe */ UNUSED_REG,   /* 0xxxf */ UNUSED_REG,
4848
4949// the Auxiliary Register set is actually a 2^32 dword address space (so 16 GB / 34-bit)
5050// this table just allows us to improve the debugger display for some of the common core / internal ones
r242703r242704
125125   AUX_UNUSED_16 /* 0x090 - 0x09f */
126126   AUX_UNUSED_16 /* 0x0a0 - 0x0af */
127127   AUX_UNUSED_16 /* 0x0b0 - 0x0bf */
128      // build configuration registers 0x0c0 - 0x0ff
128    // build configuration registers 0x0c0 - 0x0ff
129129   /* 0x0c0 */ "RESERVED AUX 0xc0",/* 0x0c1 */ "RESERVED AUX 0xc1",/* 0x0c2 */ "RESERVED AUX 0xc2",/* 0x0c3 */ "RESERVED AUX 0xc3",/* 0x0c4 */ "RESERVED AUX 0xc4",/* 0x0c5 */ "RESERVED AUX 0xc5",/* 0x0c6 */ "RESERVED AUX 0xc6",/* 0x0c7 */ "RESERVED AUX 0xc7",/* 0x0c8 */ "RESERVED AUX 0xc8",/* 0x0c9 */ "RESERVED AUX 0xc9",/* 0x0ca */ "RESERVED AUX 0xca",/* 0x0cb */ "RESERVED AUX 0xcb",/* 0x0cc */ "RESERVED AUX 0xcc",/* 0x0cd */ "RESERVED AUX 0xcd",/* 0x0ce */ "RESERVED AUX 0xce",/* 0x0cf */ "RESERVED AUX 0xcf",
130130   /* 0x0d0 */ "RESERVED AUX 0xd0",/* 0x0d1 */ "RESERVED AUX 0xd1",/* 0x0d2 */ "RESERVED AUX 0xd2",/* 0x0d3 */ "RESERVED AUX 0xd3",/* 0x0d4 */ "RESERVED AUX 0xd4",/* 0x0d5 */ "RESERVED AUX 0xd5",/* 0x0d6 */ "RESERVED AUX 0xd6",/* 0x0d7 */ "RESERVED AUX 0xd7",/* 0x0d8 */ "RESERVED AUX 0xd8",/* 0x0d9 */ "RESERVED AUX 0xd9",/* 0x0da */ "RESERVED AUX 0xda",/* 0x0db */ "RESERVED AUX 0xdb",/* 0x0dc */ "RESERVED AUX 0xdc",/* 0x0dd */ "RESERVED AUX 0xdd",/* 0x0de */ "RESERVED AUX 0xde",/* 0x0df */ "RESERVED AUX 0xdf",
131131   /* 0x0e0 */ "RESERVED AUX 0xe0",/* 0x0e1 */ "RESERVED AUX 0xe1",/* 0x0e2 */ "RESERVED AUX 0xe2",/* 0x0e3 */ "RESERVED AUX 0xe3",/* 0x0e4 */ "RESERVED AUX 0xe4",/* 0x0e5 */ "RESERVED AUX 0xe5",/* 0x0e6 */ "RESERVED AUX 0xe6",/* 0x0e7 */ "RESERVED AUX 0xe7",/* 0x0e8 */ "RESERVED AUX 0xe8",/* 0x0e9 */ "RESERVED AUX 0xe9",/* 0x0ea */ "RESERVED AUX 0xea",/* 0x0eb */ "RESERVED AUX 0xeb",/* 0x0ec */ "RESERVED AUX 0xec",/* 0x0ed */ "RESERVED AUX 0xed",/* 0x0ee */ "RESERVED AUX 0xee",/* 0x0ef */ "RESERVED AUX 0xef",
r242703r242704
371371   /* 37 */ "r55(ext)",
372372   /* 38 */ "r56(ext)",
373373   /* 39 */ "r57(M-LO)",  // MLO  (result registers for optional multply functions)
374   /* 3a */ "r58(M-MID)", // MMID
375   /* 3b */ "r59(M-HI)",  // MHI
374   /* 3a */ "r58(M-MID)", // MMID
375   /* 3b */ "r59(M-HI)",  // MHI
376376   /* 3c */ "r60(LP_COUNT)",
377377   /* 3d */ "r61(reserved)",
378378   /* 3e */ "r62(LIMM)", // use Long Immediate Data instead of register
r242703r242704
523523   /* 3e */ "0x3e",
524524   /* 3f */ "0x3f",
525525};
526
trunk/src/emu/cpu/arcompact/arcompact_common.h
r242703r242704
1717
1818#define REG_BLINK (0x1f) // r31
1919#define REG_SP (0x1c) // r28
20#define REG_ILINK1 (0x1d) // r29
21#define REG_ILINK2 (0x1e) // r30
22#define REG_LP_COUNT (0x3c) // r60
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242703r242704
1919   {
2020      debugger_instruction_hook(this, m_pc);
2121
22//      printf("new pc %04x\n", m_pc);
22//      printf("new pc %04x\n", m_pc);
2323
2424      if (m_delayactive)
2525      {
r242703r242704
3636         m_pc = get_insruction(op);
3737      }
3838
39      // hardware loops
40      if (m_pc == m_LP_END)
41      {
42         if (m_regs[REG_LP_COUNT] != 1)
43         {
44            m_pc = m_LP_START;
45         }
46         m_regs[REG_LP_COUNT]--;
47
48      }
49
5039      m_icount--;
5140   }
5241
r242703r242704
5645#define GET_01_01_01_BRANCH_ADDR \
5746   INT32 address = (op & 0x00fe0000) >> 17; \
5847   address |= ((op & 0x00008000) >> 15) << 7; \
59   if (address & 0x80) address = -0x80 + (address & 0x7f);
48   if (address & 0x80) address = -0x80 + (address & 0x7f); \
6049
50
6151#define GROUP_0e_GET_h \
6252   h =  ((op & 0x0007) << 3); \
63   h |= ((op & 0x00e0) >> 5);
53    h |= ((op & 0x00e0) >> 5); \
54
6455#define COMMON32_GET_breg \
6556   int b_temp = (op & 0x07000000) >> 24; \
6657   int B_temp = (op & 0x00007000) >> 12; \
67   int breg = b_temp | (B_temp << 3);
58   int breg = b_temp | (B_temp << 3); \
59
6860#define COMMON32_GET_creg \
69   int creg = (op & 0x00000fc0) >> 6;
61   int creg = (op & 0x00000fc0) >> 6; \
62
7063#define COMMON32_GET_u6 \
71   int u = (op & 0x00000fc0) >> 6;
64   int u = (op & 0x00000fc0) >> 6; \
65
7266#define COMMON32_GET_areg \
73   int areg = (op & 0x0000003f) >> 0;
67   int areg = (op & 0x0000003f) >> 0; \
68
7469#define COMMON32_GET_areg_reserved \
75   int ares = (op & 0x0000003f) >> 0;
70   int ares = (op & 0x0000003f) >> 0; \
71
7672#define COMMON32_GET_F \
77   int F = (op & 0x00008000) >> 15;
73   int F = (op & 0x00008000) >> 15; \
74
7875#define COMMON32_GET_p \
79   int p = (op & 0x00c00000) >> 22;
76   int p = (op & 0x00c00000) >> 22; \
8077
78
8179#define COMMON32_GET_s12 \
8280      int S_temp = (op & 0x0000003f) >> 0; \
8381      int s_temp = (op & 0x00000fc0) >> 6; \
8482      INT32 S = s_temp | (S_temp<<6); \
85      if (S & 0x800) S = -0x800 + (S&0x7ff); /* sign extend */
83      if (S & 0x800) S = -0x800 + (S&0x7ff); /* sign extend */ \
84
8685#define COMMON32_GET_CONDITION \
8786      UINT8 condition = op & 0x0000001f;
8887
8988
9089#define COMMON16_GET_breg \
91   breg =  ((op & 0x0700) >>8);
90   breg =  ((op & 0x0700) >>8); \
91
9292#define COMMON16_GET_creg \
93   creg =  ((op & 0x00e0) >>5);
93   creg =  ((op & 0x00e0) >>5); \
94
9495#define COMMON16_GET_areg \
95   areg =  ((op & 0x0007) >>0);
96   areg =  ((op & 0x0007) >>0); \
97
9698#define COMMON16_GET_u3 \
97   u =  ((op & 0x0007) >>0);
99   u =  ((op & 0x0007) >>0); \
100
98101#define COMMON16_GET_u5 \
99   u =  ((op & 0x001f) >>0);
102   u =  ((op & 0x001f) >>0); \
103
100104#define COMMON16_GET_u8 \
101   u =  ((op & 0x00ff) >>0);
105   u =  ((op & 0x00ff) >>0); \
106
102107#define COMMON16_GET_u7 \
103   u =  ((op & 0x007f) >>0);
108   u =  ((op & 0x007f) >>0); \
109
104110#define COMMON16_GET_s9 \
105   s =  ((op & 0x01ff) >>0);
111   s =  ((op & 0x01ff) >>0); \
112
106113// registers used in 16-bit opcodes hae a limited range
107114// and can only address registers r0-r3 and r12-r15
108115
109116#define REG_16BIT_RANGE(_reg_) \
110   if (_reg_>3) _reg_+= 8;
117   if (_reg_>3) _reg_+= 8; \
111118
119
112120#define GET_LIMM_32 \
113121   limm = (READ16((m_pc + 4) >> 1) << 16); \
114   limm |= READ16((m_pc + 6) >> 1);
122   limm |= READ16((m_pc + 6) >> 1); \
123
115124#define GET_LIMM_16 \
116125   limm = (READ16((m_pc + 2) >> 1) << 16); \
117   limm |= READ16((m_pc + 4) >> 1);
126   limm |= READ16((m_pc + 4) >> 1); \
118127
128
119129#define PC_ALIGNED32 \
120130   (m_pc&0xfffffffc)
121131
122int arcompact_device::check_condition(UINT8 condition)
123{
124   switch (condition & 0x1f)
125   {
126      case 0x00: return 1; // AL
127      case 0x01: return CONDITION_EQ;
128      case 0x02: return !CONDITION_EQ; // NE
129      case 0x03: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
130      case 0x04: return CONDITION_MI; // MI (N)
131      case 0x05: return CONDITION_CS; // CS (Carry Set / Lower than)
132      case 0x06: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
133      case 0x07: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
134      case 0x08: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
135      case 0x09: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
136      case 0x0a: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
137      case 0x0b: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
138      case 0x0c: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
139      case 0x0d: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
140      case 0x0e: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
141      case 0x0f: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
142      case 0x10: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
143      case 0x11: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
144      case 0x12: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
145      case 0x13: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
146      case 0x14: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
147      case 0x15: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
148      case 0x16: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
149      case 0x17: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
150      case 0x18: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
151      case 0x19: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
152      case 0x1a: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
153      case 0x1b: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
154      case 0x1c: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
155      case 0x1d: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
156      case 0x1e: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
157      case 0x1f: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
158   }
159132
160      return -1;
161
162}
163
164
165133ARCOMPACT_RETTYPE arcompact_device::get_insruction(OPS_32)
166134{
167135   UINT8 instruction = ARCOMPACT_OPERATION;
r242703r242704
173141
174142      switch (instruction) // 32-bit instructions (with optional extra dword for immediate data)
175143      {
176         case 0x00: return arcompact_handle00(PARAMS);    // Bcc
177         case 0x01: return arcompact_handle01(PARAMS);    // BLcc/BRcc
178         case 0x02: return arcompact_handle02(PARAMS);    // LD r+o
179         case 0x03: return arcompact_handle03(PARAMS);    // ST r+o
180         case 0x04: return arcompact_handle04(PARAMS);    // op a,b,c (basecase)
181         case 0x05: return arcompact_handle05(PARAMS);    // op a,b,c (05 ARC ext)
182         case 0x06: return arcompact_handle06(PARAMS);    // op a,b,c (06 ARC ext)
183         case 0x07: return arcompact_handle07(PARAMS);    // op a,b,c (07 User ext)
184         case 0x08: return arcompact_handle08(PARAMS);    // op a,b,c (08 User ext)
185         case 0x09: return arcompact_handle09(PARAMS);    // op a,b,c (09 Market ext)
186         case 0x0a: return arcompact_handle0a(PARAMS);    // op a,b,c (0a Market ext)
187         case 0x0b: return arcompact_handle0b(PARAMS);    // op a,b,c (0b Market ext)
144         case 0x00: return arcompact_handle00(PARAMS);    // Bcc
145         case 0x01: return arcompact_handle01(PARAMS);    // BLcc/BRcc
146         case 0x02: return arcompact_handle02(PARAMS);    // LD r+o
147         case 0x03: return arcompact_handle03(PARAMS);    // ST r+o
148         case 0x04: return arcompact_handle04(PARAMS);    // op a,b,c (basecase)
149         case 0x05: return arcompact_handle05(PARAMS);    // op a,b,c (05 ARC ext)
150         case 0x06: return arcompact_handle06(PARAMS);    // op a,b,c (06 ARC ext)
151         case 0x07: return arcompact_handle07(PARAMS);    // op a,b,c (07 User ext)
152         case 0x08: return arcompact_handle08(PARAMS);    // op a,b,c (08 User ext)
153         case 0x09: return arcompact_handle09(PARAMS);    // op a,b,c (09 Market ext)
154         case 0x0a: return arcompact_handle0a(PARAMS);    // op a,b,c (0a Market ext)
155         case 0x0b: return arcompact_handle0b(PARAMS);    // op a,b,c (0b Market ext)
188156      }
189157   }
190158   else
191159   {
192160      switch (instruction) // 16-bit instructions
193161      {
194         case 0x0c: return arcompact_handle0c(PARAMS);    // Load/Add reg-reg
195         case 0x0d: return arcompact_handle0d(PARAMS);    // Add/Sub/Shft imm
196         case 0x0e: return arcompact_handle0e(PARAMS);    // Mov/Cmp/Add
197         case 0x0f: return arcompact_handle0f(PARAMS);    // op_S b,b,c (single 16-bit ops)
198         case 0x10: return arcompact_handle10(PARAMS);    // LD_S
199         case 0x11: return arcompact_handle11(PARAMS);    // LDB_S
200         case 0x12: return arcompact_handle12(PARAMS);    // LDW_S
201         case 0x13: return arcompact_handle13(PARAMS);    // LSW_S.X
202         case 0x14: return arcompact_handle14(PARAMS);    // ST_S
203         case 0x15: return arcompact_handle15(PARAMS);    // STB_S
204         case 0x16: return arcompact_handle16(PARAMS);    // STW_S
205         case 0x17: return arcompact_handle17(PARAMS);    // Shift/Sub/Bit
206         case 0x18: return arcompact_handle18(PARAMS);    // Stack Instr
207         case 0x19: return arcompact_handle19(PARAMS);    // GP Instr
208         case 0x1a: return arcompact_handle1a(PARAMS);    // PCL Instr
209         case 0x1b: return arcompact_handle1b(PARAMS);    // MOV_S
210         case 0x1c: return arcompact_handle1c(PARAMS);    // ADD_S/CMP_S
211         case 0x1d: return arcompact_handle1d(PARAMS);    // BRcc_S
212         case 0x1e: return arcompact_handle1e(PARAMS);    // Bcc_S
213         case 0x1f: return arcompact_handle1f(PARAMS);    // BL_S
162         case 0x0c: return arcompact_handle0c(PARAMS);    // Load/Add reg-reg
163         case 0x0d: return arcompact_handle0d(PARAMS);    // Add/Sub/Shft imm
164         case 0x0e: return arcompact_handle0e(PARAMS);    // Mov/Cmp/Add
165         case 0x0f: return arcompact_handle0f(PARAMS);    // op_S b,b,c (single 16-bit ops)
166         case 0x10: return arcompact_handle10(PARAMS);    // LD_S
167         case 0x11: return arcompact_handle11(PARAMS);    // LDB_S
168         case 0x12: return arcompact_handle12(PARAMS);    // LDW_S
169         case 0x13: return arcompact_handle13(PARAMS);    // LSW_S.X
170         case 0x14: return arcompact_handle14(PARAMS);    // ST_S
171         case 0x15: return arcompact_handle15(PARAMS);    // STB_S
172         case 0x16: return arcompact_handle16(PARAMS);    // STW_S
173         case 0x17: return arcompact_handle17(PARAMS);    // Shift/Sub/Bit
174         case 0x18: return arcompact_handle18(PARAMS);    // Stack Instr
175         case 0x19: return arcompact_handle19(PARAMS);    // GP Instr
176         case 0x1a: return arcompact_handle1a(PARAMS);    // PCL Instr
177         case 0x1b: return arcompact_handle1b(PARAMS);    // MOV_S
178         case 0x1c: return arcompact_handle1c(PARAMS);    // ADD_S/CMP_S
179         case 0x1d: return arcompact_handle1d(PARAMS);    // BRcc_S
180         case 0x1e: return arcompact_handle1e(PARAMS);    // Bcc_S
181         case 0x1f: return arcompact_handle1f(PARAMS);    // BL_S
214182      }
215183   }
216184
r242703r242704
480448
481449   switch (subinstr2)
482450   {
483      case 0x00: return arcompact_handle05_2f_00(PARAMS);  // SWAP
484      case 0x01: return arcompact_handle05_2f_01(PARAMS);  // NORM
451      case 0x00: return arcompact_handle05_2f_00(PARAMS);  // SWAP
452      case 0x01: return arcompact_handle05_2f_01(PARAMS);  // NORM
485453      case 0x02: return arcompact_handle05_2f_02(PARAMS);  // SAT16
486      case 0x03: return arcompact_handle05_2f_03(PARAMS);  // RND16
487      case 0x04: return arcompact_handle05_2f_04(PARAMS);  // ABSSW
488      case 0x05: return arcompact_handle05_2f_05(PARAMS);  // ABSS
489      case 0x06: return arcompact_handle05_2f_06(PARAMS);  // NEGSW
490      case 0x07: return arcompact_handle05_2f_07(PARAMS);  // NEGS
491      case 0x08: return arcompact_handle05_2f_08(PARAMS);  // NORMW
454      case 0x03: return arcompact_handle05_2f_03(PARAMS);  // RND16
455      case 0x04: return arcompact_handle05_2f_04(PARAMS);  // ABSSW
456      case 0x05: return arcompact_handle05_2f_05(PARAMS);  // ABSS
457      case 0x06: return arcompact_handle05_2f_06(PARAMS);  // NEGSW
458      case 0x07: return arcompact_handle05_2f_07(PARAMS);  // NEGS
459      case 0x08: return arcompact_handle05_2f_08(PARAMS);  // NORMW
492460      case 0x09: return arcompact_handle05_2f_09(PARAMS);  // illegal
493461      case 0x0a: return arcompact_handle05_2f_0a(PARAMS);  // illegal
494462      case 0x0b: return arcompact_handle05_2f_0b(PARAMS);  // illegal
r242703r242704
914882
915883   switch (subinstr)
916884   {
917      case 0x00: return arcompact_handle17_00(PARAMS);  // ASL_S
918      case 0x01: return arcompact_handle17_01(PARAMS);  // LSR_S
885      case 0x00: return arcompact_handle17_00(PARAMS);  // ASL_S
886      case 0x01: return arcompact_handle17_01(PARAMS);  // LSR_S
919887      case 0x02: return arcompact_handle17_02(PARAMS);  // ASR_S
920      case 0x03: return arcompact_handle17_03(PARAMS);  // SUB_S
921      case 0x04: return arcompact_handle17_04(PARAMS);  // BSET_S
922      case 0x05: return arcompact_handle17_05(PARAMS);  // BCLR_S
923      case 0x06: return arcompact_handle17_06(PARAMS);  // BMSK_S
888      case 0x03: return arcompact_handle17_03(PARAMS);  // SUB_S
889      case 0x04: return arcompact_handle17_04(PARAMS);  // BSET_S
890      case 0x05: return arcompact_handle17_05(PARAMS);  // BCLR_S
891      case 0x06: return arcompact_handle17_06(PARAMS);  // BMSK_S
924892      case 0x07: return arcompact_handle17_07(PARAMS);  // BTST_S
925893   }
926894
r242703r242704
946914   return 0;
947915}
948916
949ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05(OPS_16)
917ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_05(OPS_16)
950918{
951919   UINT8 subinstr2 = (op & 0x0700) >> 8;
952920
r242703r242704
954922   {
955923      case 0x00: return arcompact_handle18_05_00(PARAMS);  // ADD_S (SP)
956924      case 0x01: return arcompact_handle18_05_01(PARAMS);  // SUB_S (SP)
957      case 0x02: return arcompact_handle18_05_02(PARAMS);  // <illegal 0x18_05_02>
925      case 0x02: return arcompact_handle18_05_02(PARAMS);  // <illegal 0x18_05_02>
958926      case 0x03: return arcompact_handle18_05_03(PARAMS);  // <illegal 0x18_05_03>
959927      case 0x04: return arcompact_handle18_05_04(PARAMS);  // <illegal 0x18_05_04>
960928      case 0x05: return arcompact_handle18_05_05(PARAMS);  // <illegal 0x18_05_05>
r242703r242704
965933   return 0;
966934}
967935
968ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06(OPS_16)
936ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06(OPS_16)
969937{
970938   UINT8 subinstr2 = (op & 0x001f) >> 0;
971939
r242703r242704
1008976   return 0;
1009977}
1010978
1011ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07(OPS_16)
979ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07(OPS_16)
1012980{
1013981   UINT8 subinstr2 = (op & 0x001f) >> 0;
1014982
r242703r242704
11141082   switch (subinstr2)
11151083   {
11161084      case 0x00: return arcompact_handle1e_03_00(PARAMS);  // BGT_S
1117      case 0x01: return arcompact_handle1e_03_01(PARAMS);  // BGE_S
1085      case 0x01: return arcompact_handle1e_03_01(PARAMS);  // BGE_S
11181086      case 0x02: return arcompact_handle1e_03_02(PARAMS);  // BLT_S
11191087      case 0x03: return arcompact_handle1e_03_03(PARAMS);  // BLE_S
11201088      case 0x04: return arcompact_handle1e_03_04(PARAMS);  // BHI_S
11211089      case 0x05: return arcompact_handle1e_03_05(PARAMS);  // BHS_S
11221090      case 0x06: return arcompact_handle1e_03_06(PARAMS);  // BLO_S
1123      case 0x07: return arcompact_handle1e_03_07(PARAMS);  // BLS_S
1091      case 0x07: return arcompact_handle1e_03_07(PARAMS);  // BLS_S
11241092   }
11251093
11261094   return 0;
r242703r242704
11281096
11291097// handlers
11301098
1131UINT32 arcompact_device::handle_jump_to_addr(int delay, int link, UINT32 address, UINT32 next_addr)
1132{
1133   if (delay)
1134   {
1135      m_delayactive = 1;
1136      m_delayjump = address;
1137      if (link) m_delaylinks = 1;
1138      else m_delaylinks = 0;
1139      return next_addr;
1140   }
1141   else
1142   {
1143      if (link) m_regs[REG_BLINK] = next_addr;
1144      return address;
1145   }
11461099
1147}
11481100
1149UINT32 arcompact_device::handle_jump_to_register(int delay, int link, UINT32 reg, UINT32 next_addr, int flag)
1150{
1151   if (reg == LIMM_REG)
1152      arcompact_fatal("handle_jump_to_register called with LIMM register, call handle_jump_to_addr instead");
1153
1154   if ((reg == REG_ILINK1) || (reg == REG_ILINK2))
1155   {
1156      if (flag)
1157      {
1158         arcompact_fatal("jump to ILINK1/ILINK2 not supported");
1159         return next_addr;
1160      }
1161      else
1162      {
1163         arcompact_fatal("illegal jump to ILINK1/ILINK2 not supported"); // FLAG bit must be set
1164         return next_addr;
1165      }
1166   }
1167   else
1168   {
1169      if (flag)
1170      {
1171         arcompact_fatal("illegal jump (flag bit set)"); // FLAG bit must NOT be set
1172         return next_addr;
1173      }
1174      else
1175      {
1176         //arcompact_fatal("jump not supported");
1177         UINT32 target = m_regs[reg];
1178         return handle_jump_to_addr(delay, link, target, next_addr);
1179      }
1180   }
1181
1182   return 0;
1183}
1184
11851101ARCOMPACT_RETTYPE arcompact_device::arcompact_handle00_00(OPS_32)
11861102{
11871103   int size = 4;
1188
1189   COMMON32_GET_CONDITION
1190
1191   if (!check_condition(condition))
1192      return m_pc + (size>>0);
1193
11941104   // Branch Conditionally
1195   // 0000 0sss ssss sss0 SSSS SSSS SSNQ QQQQ
1196   INT32 address = (op & 0x07fe0000) >> 17;
1197   address |= ((op & 0x0000ffc0) >> 6) << 10;
1198   if (address & 0x80000) address = -0x80000 + (address & 0x7ffff);
1199   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
1200
1201   UINT32 realaddress = PC_ALIGNED32 + (address * 2);
1202
1203   if (n)
1204   {
1205      m_delayactive = 1;
1206      m_delayjump = realaddress;
1207      m_delaylinks = 0; // don't link
1208   }
1209   else
1210   {
1211   //  m_regs[REG_BLINK] = m_pc + (size >> 0);  // don't link
1212      return realaddress;
1213   }
1214
1215
1105   arcompact_log("unimplemented Bcc %08x", op);
12161106   return m_pc + (size>>0);
12171107}
12181108
r242703r242704
12251115   address |= ((op & 0x0000000f) >> 0) << 20;
12261116   if (address & 0x800000) address = -0x800000 + (address & 0x7fffff);
12271117   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
1228//  int res =  (op & 0x00000010) >> 4; op &= ~0x00000010; // should be set to 0
1118//   int res =  (op & 0x00000010) >> 4; op &= ~0x00000010; // should be set to 0
12291119
12301120   UINT32 realaddress = PC_ALIGNED32 + (address * 2);
12311121
r242703r242704
12371127   }
12381128   else
12391129   {
1240   //  m_regs[REG_BLINK] = m_pc + (size >> 0);  // don't link
1130   //   m_regs[REG_BLINK] = m_pc + (size >> 0);  // don't link
12411131      return realaddress;
12421132   }
12431133
r242703r242704
12651155   INT32 address =   (op & 0x07fc0000) >> 17;
12661156   address |=        ((op & 0x0000ffc0) >> 6) << 10;
12671157   address |=        ((op & 0x0000000f) >> 0) << 20;
1268   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);
1158   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);   
12691159   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
1270//  int res =  (op & 0x00000010) >> 4; op &= ~0x00000010;
1160//   int res =  (op & 0x00000010) >> 4; op &= ~0x00000010;
12711161
12721162   UINT32 realaddress = PC_ALIGNED32 + (address * 2);
12731163
r242703r242704
13021192
13031193   if ((breg != LIMM_REG) && (creg != LIMM_REG))
13041194   {
1195
13051196   }
13061197   else
13071198   {
r242703r242704
13351226      UINT32 limm; \
13361227      GET_LIMM_32; \
13371228      size = 8; \
1338      \
1229         \
13391230      if (breg == LIMM_REG) \
13401231         b = limm; \
13411232      else \
13421233         b = m_regs[breg]; \
1343      \
1234        \
13441235      if (creg == LIMM_REG) \
13451236         c = limm; \
13461237      else \
13471238         c = m_regs[creg]; \
1348   }
1239   } \
1240
13491241#define BR_TAKEJUMP \
13501242   /* take jump */ \
13511243   UINT32 realaddress = PC_ALIGNED32 + (address * 2); \
1352      \
1244    \
13531245   if (n) \
13541246   { \
13551247      m_delayactive = 1; \
r242703r242704
13591251   else \
13601252   { \
13611253      return realaddress; \
1362   }
1254   } \
13631255
13641256
1257
13651258ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_00(OPS_32)  // register - register BREQ
13661259{
13671260   BR_REGREG_SETUP
r242703r242704
13711264   {
13721265      BR_TAKEJUMP
13731266   }
1374
1267   
13751268   return m_pc + (size>>0);
13761269}
13771270
r242703r242704
13841277   {
13851278      BR_TAKEJUMP
13861279   }
1387
1280   
13881281   return m_pc + (size>>0);
13891282}
13901283
r242703r242704
13971290   {
13981291      BR_TAKEJUMP
13991292   }
1400
1293   
14011294   return m_pc + (size>>0);
14021295
14031296}
1404ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_03(OPS_32) // register - register BRGE
1297ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_00_03(OPS_32) // register - register BRGE
14051298{
14061299   BR_REGREG_SETUP
1407
1300   
14081301   // BRGE  (signed operation)
14091302   if ((INT32)b >= (INT32)c)
14101303   {
14111304      BR_TAKEJUMP
14121305   }
1413
1306   
14141307   return m_pc + (size>>0);
14151308}
14161309
r242703r242704
14231316   {
14241317      BR_TAKEJUMP
14251318   }
1426
1319   
14271320   return m_pc + (size>>0);
14281321}
14291322
r242703r242704
14371330   {
14381331      BR_TAKEJUMP
14391332   }
1440
1333   
14411334   return m_pc + (size>>0);
14421335}
14431336
r242703r242704
14711364      GET_LIMM_32; \
14721365      size = 8; \
14731366      b = limm; \
1474   }
1367   } \
14751368
1369
14761370// register -immediate cases
14771371ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_00(OPS_32) // BREQ reg-imm
14781372{
14791373   BR_REGIMM_SETUP
1480
1374   
14811375   // BREQ
14821376   if (b == c)
14831377   {
14841378      BR_TAKEJUMP
14851379   }
1486
1380   
14871381   return m_pc + (size>>0);
14881382}
14891383
14901384ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_01(OPS_32) // BRNE reg-imm
14911385{
14921386   BR_REGIMM_SETUP
1493
1387   
14941388   // BRNE
14951389   if (b != c)
14961390   {
14971391      BR_TAKEJUMP
14981392   }
1499
1393   
15001394   return m_pc + (size>>0);
15011395}
15021396
r242703r242704
15051399ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_02(OPS_32) // BRLT reg-imm
15061400{
15071401   BR_REGIMM_SETUP
1508
1402   
15091403   // BRLT  (signed operation)
15101404   if ((INT32)b < (INT32)c)
15111405   {
15121406      BR_TAKEJUMP
15131407   }
1514
1408   
15151409   return m_pc + (size>>0);
15161410
15171411}
15181412ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_03(OPS_32)
15191413{
15201414   BR_REGIMM_SETUP
1521
1415   
15221416   // BRGE  (signed operation)
15231417   if ((INT32)b >= (INT32)c)
15241418   {
15251419      BR_TAKEJUMP
15261420   }
1527
1421   
15281422   return m_pc + (size>>0);
15291423}
15301424
1531ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32) //  register - immediate BRLO
1532{
1533   BR_REGIMM_SETUP
1425ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRLO"); }
15341426
1535   // BRLO (unsigned operation)
1536   if (b < c)
1537   {
1538      BR_TAKEJUMP
1539   }
1540
1541   return m_pc + (size>>0);
1542
1543}
1544
15451427ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) // register - immediate BRHS
15461428{
15471429   BR_REGIMM_SETUP
r242703r242704
15511433   {
15521434      BR_TAKEJUMP
15531435   }
1554
1436   
15551437   return m_pc + (size>>0);
15561438}
15571439
r242703r242704
15741456   int X = (op & 0x00000040) >> 6;  //op &= ~0x00000040;
15751457   int Z = (op & 0x00000180) >> 7;  //op &= ~0x00000180;
15761458   int a = (op & 0x00000600) >> 9;  //op &= ~0x00000600;
1577//  int D = (op & 0x00000800) >> 11;// op &= ~0x00000800; // we don't use the data cache currently
1459//   int D = (op & 0x00000800) >> 11;// op &= ~0x00000800; // we don't use the data cache currently
15781460
15791461   UINT32 address = m_regs[breg];
15801462
r242703r242704
16621544{
16631545   int size = 4;
16641546   UINT32 limm = 0;
1665   int got_limm = 0;
1547   int got_limm = 0;
16661548   int S = (op & 0x00008000) >> 15;
16671549   int s = (op & 0x00ff0000) >> 16;
16681550   if (S) s = -0x100 + s;
16691551
16701552   COMMON32_GET_breg;
16711553   COMMON32_GET_creg;
1554   
1555//   int R = (op & 0x00000001) >> 0; // bit 0 is reserved
1556   int Z = (op & 0x00000006) >> 1;
1557   int a = (op & 0x00000018) >> 3;
1558//   int D = (op & 0x00000020) >> 5; // we don't use the data cache currently
16721559
1673//  int R = (op & 0x00000001) >> 0; // bit 0 is reserved
1674   int Z = (op & 0x00000006) >> 1;
1675   int a = (op & 0x00000018) >> 3;
1676//  int D = (op & 0x00000020) >> 5; // we don't use the data cache currently
16771560
1678
16791561   UINT32 address = m_regs[breg];
16801562
16811563   if (breg == LIMM_REG)
r242703r242704
17651647
17661648   COMMON32_GET_p;
17671649   COMMON32_GET_breg;
1768
1650   
17691651   if (!b_reserved)
17701652   {
17711653      if (breg == LIMM_REG)
r242703r242704
18381720}
18391721
18401722
1841#include "cpu/arcompact/arcompact.inc"
1723#define SETUP_HANDLE04_0x_P00 \
1724   int size = 4; \
1725   UINT32 limm = 0; \
1726   int got_limm = 0; \
1727   \
1728   COMMON32_GET_breg; \
1729   COMMON32_GET_F; \
1730   COMMON32_GET_creg; \
1731   COMMON32_GET_areg; \
1732   \
1733   UINT32 b, c; \
1734   \
1735   if (breg == LIMM_REG) \
1736   { \
1737      GET_LIMM_32; \
1738      size = 8; \
1739      got_limm = 1; \
1740      b = limm; \
1741   } \
1742   else \
1743   { \
1744      b = m_regs[breg]; \
1745   } \
1746    \
1747   if (creg == LIMM_REG) \
1748   { \
1749      if (!got_limm) \
1750      { \
1751         GET_LIMM_32; \
1752         size = 8; \
1753      } \
1754      c = limm; \
1755   } \
1756   else \
1757   { \
1758      c = m_regs[creg]; \
1759   } \
1760   /* todo: is the limm, limm syntax valid? (it's pointless.) */ \
1761   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ \
18421762
1843ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_01(OPS_32)
1763#define SETUP_HANDLE04_0x_P01 \
1764   int size = 4; \
1765   UINT32 limm = 0; \
1766/*   int got_limm = 0; */ \
1767    \
1768   COMMON32_GET_breg; \
1769   COMMON32_GET_F; \
1770   COMMON32_GET_u6; \
1771   COMMON32_GET_areg; \
1772   \
1773   UINT32 b, c; \
1774   \
1775   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ \
1776   if (breg == LIMM_REG) \
1777   { \
1778      GET_LIMM_32; \
1779      size = 8; \
1780/*      got_limm = 1; */ \
1781      b = limm; \
1782   } \
1783   else \
1784   { \
1785      b = m_regs[breg]; \
1786   } \
1787    \
1788    c = u; \
1789   \
1790   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ \
1791
1792
1793#define SETUP_HANDLE04_0x_P10 \
1794   int size = 4; \
1795   UINT32 limm = 0; \
1796/*   int got_limm = 0; */ \
1797    \
1798   COMMON32_GET_breg; \
1799   COMMON32_GET_F; \
1800   COMMON32_GET_s12; \
1801   COMMON32_GET_areg; \
1802   \
1803   UINT32 b, c; \
1804   \
1805   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */ \
1806   if (breg == LIMM_REG) \
1807   { \
1808      GET_LIMM_32; \
1809      size = 8; \
1810/*      got_limm = 1; */ \
1811      b = limm; \
1812   } \
1813   else \
1814   { \
1815      b = m_regs[breg]; \
1816   } \
1817    \
1818    c = (UINT32)S; \
1819   \
1820   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ \
1821
1822
1823ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p00(OPS_32)
18441824{
1845   return arcompact_handle04_helper(PARAMS, opcodes_04[0x01], /*"ADC"*/ 0,0);
1825   SETUP_HANDLE04_0x_P00
1826
1827   m_regs[areg] = b + c;
1828
1829   if (F)
1830   {
1831      arcompact_fatal("arcompact_handle04_00_p00 (ADD) (F set)\n"); // not yet supported
1832   }
1833
1834   return m_pc + (size >> 0);
18461835}
18471836
1837ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p01(OPS_32)
1838{
1839   SETUP_HANDLE04_0x_P01
18481840
1841   m_regs[areg] = b + c;
18491842
1850ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_03(OPS_32)
1843   if (F)
1844   {
1845      arcompact_fatal("arcompact_handle04_00_p01 (ADD) (F set)\n"); // not yet supported
1846   }
1847
1848   return m_pc + (size >> 0);
1849}
1850
1851ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p10(OPS_32)
18511852{
1853   int size = 4;
1854   arcompact_fatal("arcompact_handle04_00_p10 (ADD)\n");
1855   return m_pc + (size >> 0);
1856}
1857
1858ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m0(OPS_32)
1859{
1860   int size = 4;
1861   arcompact_fatal("arcompact_handle04_00_p11_m0 (ADD)\n");
1862   return m_pc + (size >> 0);
1863}
1864
1865ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_00_p11_m1(OPS_32)
1866{
1867   int size = 4;
1868   arcompact_fatal("arcompact_handle04_00_p11_m1 (ADD)\n");
1869   return m_pc + (size >> 0);
1870}
1871
1872
1873ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_01(OPS_32) 
1874{
1875   return arcompact_handle04_helper(PARAMS, opcodes_04[0x01], /*"ADC"*/ 0,0);
1876}
1877
1878ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_02(OPS_32) 
1879{
1880   return arcompact_handle04_helper(PARAMS, opcodes_04[0x02], /*"SUB"*/ 0,0);
1881}
1882
1883ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_03(OPS_32) 
1884{
18521885   return arcompact_handle04_helper(PARAMS, opcodes_04[0x03], /*"SBC"*/ 0,0);
18531886}
18541887
1855ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_08(OPS_32)
1888
1889ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p00(OPS_32)
18561890{
1857   return arcompact_handle04_helper(PARAMS, opcodes_04[0x08], /*"MAX"*/ 0,0);
1891   SETUP_HANDLE04_0x_P00
1892
1893   m_regs[areg] = b & c;
1894
1895   if (F)
1896   {
1897      arcompact_fatal("arcompact_handle04_04_p00 (AND) (F set)\n"); // not yet supported
1898   }
1899
1900   return m_pc + (size >> 0);
18581901}
18591902
1860ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_09(OPS_32)
1903ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p01(OPS_32)
18611904{
1862   return arcompact_handle04_helper(PARAMS, opcodes_04[0x09], /*"MIN"*/ 0,0);
1905   SETUP_HANDLE04_0x_P01
1906   m_regs[areg] = b & c;
1907
1908   if (F)
1909   {
1910      arcompact_fatal("arcompact_handle04_04_p01 (AND) (F set)\n"); // not yet supported
1911   }
1912
1913   return m_pc + (size >> 0);
18631914}
18641915
1916ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p10(OPS_32)
1917{
1918   SETUP_HANDLE04_0x_P10
1919   m_regs[areg] = b & c;
18651920
1921   if (F)
1922   {
1923      arcompact_fatal("arcompact_handle04_04_p10 (AND) (F set)\n"); // not yet supported
1924   }
18661925
1867ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0b(OPS_32)
1926   return m_pc + (size >> 0);
1927}
1928
1929ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m0(OPS_32)
18681930{
1869   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0b], /*"TST"*/ 1,0);
1931   int size = 4;
1932   arcompact_fatal("arcompact_handle04_04_p11_m0 (AND)\n");
1933   return m_pc + (size >> 0);
18701934}
18711935
1872ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0c(OPS_32)
1936ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_04_p11_m1(OPS_32)
18731937{
1874   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0c], /*"CMP"*/ 1,0);
1938   int size = 4;
1939   arcompact_fatal("arcompact_handle04_04_p11_m1 (AND)\n");
1940   return m_pc + (size >> 0);
18751941}
18761942
1877ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0d(OPS_32)
1943
1944// OR
1945ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p00(OPS_32)
18781946{
1879   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0d], /*"RCMP"*/ 1,0);
1947   SETUP_HANDLE04_0x_P00
1948
1949   m_regs[areg] = b | c;
1950
1951   if (F)
1952   {
1953      arcompact_fatal("arcompact_handle04_05_p00 (OR) (F set)\n"); // not yet supported
1954   }
1955
1956   return m_pc + (size >> 0);
18801957}
18811958
1959ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p01(OPS_32)
1960{
1961   SETUP_HANDLE04_0x_P01
18821962
1963   m_regs[areg] = b | c;
18831964
1884ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_10(OPS_32)
1965   if (F)
1966   {
1967      arcompact_fatal("arcompact_handle04_05_p01 (OR) (F set)\n"); // not yet supported
1968   }
1969
1970   return m_pc + (size >> 0);}
1971
1972ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p10(OPS_32)
18851973{
1886   return arcompact_handle04_helper(PARAMS, opcodes_04[0x10], /*"BCLR"*/ 0,0);
1974   int size = 4;
1975   arcompact_fatal("arcompact_handle04_05_p10 (OR)\n");
1976   return m_pc + (size >> 0);
18871977}
18881978
1889ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_11(OPS_32)
1979ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p11_m0(OPS_32)
18901980{
1891   return arcompact_handle04_helper(PARAMS, opcodes_04[0x11], /*"BTST"*/ 0,0);
1981   int size = 4;
1982   arcompact_fatal("arcompact_handle04_05_p11_m0 (OR)\n");
1983   return m_pc + (size >> 0);
18921984}
18931985
1894ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_12(OPS_32)
1986ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_05_p11_m1(OPS_32)
18951987{
1896   return arcompact_handle04_helper(PARAMS, opcodes_04[0x12], /*"BXOR"*/ 0,0);
1988   int size = 4;
1989   arcompact_fatal("arcompact_handle04_05_p11_m1 (OR)\n");
1990   return m_pc + (size >> 0);
18971991}
18981992
1993// Bitwise AND Operation with Inverted Source
1994ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p00(OPS_32) // BIC
1995{
1996   SETUP_HANDLE04_0x_P00
18991997
1998   m_regs[areg] = b & (~c);
19001999
2000   if (F)
2001   {
2002      arcompact_fatal("arcompact_handle04_06_p00 (BIC) (F set)\n"); // not yet supported
2003   }
19012004
2005   return m_pc + (size >> 0);
2006}
19022007
2008ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p01(OPS_32)
2009{
2010   int size = 4;
2011   arcompact_fatal("arcompact_handle04_06_p01 (BIC)\n");
2012   return m_pc + (size >> 0);
2013}
19032014
1904ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1a(OPS_32)
2015ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p10(OPS_32)
19052016{
1906   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1a], /*"MPY"*/ 0,0);
1907} // *
2017   int size = 4;
2018   arcompact_fatal("arcompact_handle04_06_p10 (BIC)\n");
2019   return m_pc + (size >> 0);
2020}
19082021
1909ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1b(OPS_32)
2022ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m0(OPS_32)
19102023{
1911   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1b], /*"MPYH"*/ 0,0);
1912} // *
2024   int size = 4;
2025   arcompact_fatal("arcompact_handle04_06_p11_m0 (BIC)\n");
2026   return m_pc + (size >> 0);
2027}
19132028
1914ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1c(OPS_32)
2029ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_06_p11_m1(OPS_32)
19152030{
1916   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1c], /*"MPYHU"*/ 0,0);
1917} // *
2031   int size = 4;
2032   arcompact_fatal("arcompact_handle04_06_p11_m1 (BIC)\n");
2033   return m_pc + (size >> 0);
2034}
19182035
1919ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1d(OPS_32)
2036
2037
2038
2039// XOR
2040ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p00(OPS_32) // XOR
19202041{
1921   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1d], /*"MPYU"*/ 0,0);
1922} // *
2042   SETUP_HANDLE04_0x_P00
2043   m_regs[areg] = b ^ c;
19232044
1924ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p00(OPS_32)
2045   if (F)
2046   {
2047      arcompact_fatal("arcompact_handle04_07_p00 (XOR) (F set)\n"); // not yet supported
2048   }
2049
2050   return m_pc + (size >> 0);
2051}
2052
2053ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p01(OPS_32)
19252054{
2055   SETUP_HANDLE04_0x_P01
2056   m_regs[areg] = b ^ c;
2057
2058   if (F)
2059   {
2060      arcompact_fatal("arcompact_handle04_07_p01 (XOR) (F set)\n"); // not yet supported
2061   }
2062
2063   return m_pc + (size >> 0);
2064}
2065
2066ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p10(OPS_32)
2067{
19262068   int size = 4;
2069   arcompact_fatal("arcompact_handle04_07_p10 (XOR)\n");
2070   return m_pc + (size >> 0);
2071}
2072
2073ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p11_m0(OPS_32)
2074{
2075   int size = 4;
2076   arcompact_fatal("arcompact_handle04_07_p11_m0 (XOR)\n");
2077   return m_pc + (size >> 0);
2078}
2079
2080ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_07_p11_m1(OPS_32)
2081{
2082   int size = 4;
2083   arcompact_fatal("arcompact_handle04_07_p11_m1 (XOR)\n");
2084   return m_pc + (size >> 0);
2085}
2086
2087ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_08(OPS_32) 
2088{
2089   return arcompact_handle04_helper(PARAMS, opcodes_04[0x08], /*"MAX"*/ 0,0);
2090}
2091
2092ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_09(OPS_32)
2093{
2094   return arcompact_handle04_helper(PARAMS, opcodes_04[0x09], /*"MIN"*/ 0,0);
2095}
2096
2097
2098ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p00(OPS_32) // MOV<f> b, c
2099{
2100   int size = 4;
19272101   UINT32 limm = 0;
19282102   int got_limm = 0;
19292103
2104   COMMON32_GET_breg
19302105   COMMON32_GET_creg
19312106   COMMON32_GET_F
19322107
1933   if (creg == LIMM_REG)
2108   if (creg == LIMM_REG)
19342109   {
1935      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
1936      // J limm          0010 0RRR 0010 0000 0RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
2110      // opcode          iiii iBBB ppII IIII FBBB CCCC CC-- ----
2111      // MOV b   <- limm 0010 0RRR 0000 1010 0RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
2112      // MOV.F b <- limm 0010 0RRR 0000 1010 1RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
19372113
19382114      if (!got_limm)
19392115      {
r242703r242704
19412117         size = 8;
19422118      }
19432119
1944      return limm;
2120      m_regs[breg] = limm;
2121
2122      if (F)
2123      { // currently not supported
2124         arcompact_fatal("unimplemented MOV.F %08x", op);
2125      }
2126
2127      return m_pc + (size>>0);
2128
19452129   }
19462130   else
19472131   {
1948      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
1949      // J [c]           0010 0RRR 0010 0000 0RRR CCCC CCRR RRRR
1950      // J.F [ilink1]    0010 0RRR 0010 0000 1RRR 0111 01RR RRRR  (creg = ILINK1, FLAG must be set)
1951      // J.F [ilink2]    0010 0RRR 0010 0000 1RRR 0111 10RR RRRR  (creg = ILINE2, FLAG must be set)
2132      // opcode          iiii iBBB ppII IIII FBBB CCCC CC-- ----
2133      // MOV   b <- c    0010 0RRR 0000 1010 0RRR cccc ccRR RRRR
2134      // MOV.F b <- c    0010 0RRR 0000 1010 1RRR cccc ccRR RRRR
19522135
2136      m_regs[breg] = m_regs[creg];
2137
19532138      if (F)
1954      {
1955         if ((creg == REG_ILINK1) || (creg == REG_ILINK2))
1956         {
1957            arcompact_log("1 unimplemented J.F %08x", op);
1958         }
1959         else
1960         {
1961            // should not use .F unless jumping to ILINK1/2
1962            arcompact_fatal ("illegal 1 unimplemented J.F (F should not be set) %08x", op);
1963         }
2139      { // currently not supported
2140         arcompact_fatal("unimplemented MOV.F %08x", op);
2141      }
19642142
1965      }
1966      else
1967      {
1968         if ((creg == REG_ILINK1) || (creg == REG_ILINK2))
1969         {
1970            // should only jumping to ILINK1/2 if .F is set
1971            arcompact_fatal("illegal 1 unimplemented J (F not set) %08x", op);
1972         }
1973         else
1974         {
1975            return m_regs[creg];
1976         }
1977      }
2143      return m_pc + (size>>0);
19782144   }
19792145
19802146   return m_pc + (size>>0);
2147
19812148}
19822149
1983ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p01(OPS_32)
2150ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p01(OPS_32)
19842151{
19852152   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
1986   // J u6            0010 0RRR 0110 0000 0RRR uuuu uuRR RRRR
2153   // MOV   b <- u6   0010 0RRR 0100 1010 0RRR uuuu uuRR RRRR
2154   // MOV.F b <- u6   0010 0RRR 0100 1010 1RRR uuuu uuRR RRRR
2155
19872156   int size = 4;
1988   arcompact_log("2 unimplemented J %08x", op);
2157
2158   COMMON32_GET_breg
2159   COMMON32_GET_u6
2160   COMMON32_GET_F
2161
2162   m_regs[breg] = u;
2163
2164   if (F)
2165   { // currently not supported
2166      arcompact_fatal("unimplemented MOV.F b <- u6 %08x", op);
2167   }
2168
19892169   return m_pc + (size>>0);
19902170}
19912171
1992ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p10(OPS_32)
2172ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p10(OPS_32)
19932173{
1994   // opcode          iiii i--- ppII IIII F--- ssss ssSS SSSS
1995   // J s12           0010 0RRR 1010 0000 0RRR ssss ssSS SSSS
19962174   int size = 4;
1997   arcompact_log("3 unimplemented J %08x", op);
1998   return m_pc + (size>>0);
1999}
20002175
2176   COMMON32_GET_breg;
2177   COMMON32_GET_s12;
2178   COMMON32_GET_F;
20012179
2002ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32) // Jcc   (no link, no delay)
2180   m_regs[breg] = S;
2181
2182   if (F)
2183   { // currently not supported
2184      arcompact_fatal("unimplemented MOV.F b <- s12 %08x", op);
2185   }
2186
2187   return m_pc + (size>>0);}
2188
2189ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m0(OPS_32)
20032190{
20042191   int size = 4;
2005   UINT32 limm = 0;
2006   int got_limm = 0;
2192   arcompact_fatal("arcompact_handle04_0a_p11_m0\n");
2193   return m_pc + (size >> 0);
2194}
20072195
2008   COMMON32_GET_creg
2009   COMMON32_GET_CONDITION;
2010   COMMON32_GET_F
2196ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0a_p11_m1(OPS_32)
2197{
2198   int size = 4;
2199   arcompact_fatal("arcompact_handle04_0a_p11_m1\n");
2200   return m_pc + (size >> 0);
2201}
20112202
2012   UINT32 c = 0;
20132203
2014   if (creg == LIMM_REG)
2015   {
2016      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
2017      // Jcc limm        0010 0RRR 1110 0000 0RRR 1111 100Q QQQQ  [LIUMM]
2018      if (!got_limm)
2019      {
2020         GET_LIMM_32;
2021         size = 8;
2022      }
2204ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0b(OPS_32)
2205{
2206   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0b], /*"TST"*/ 1,0);
2207}
20232208
2024      c = limm;
2209ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0c(OPS_32)
2210{
2211   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0c], /*"CMP"*/ 1,0);
2212}
20252213
2026   }
2027   else
2028   {
2029      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
2030      // Jcc [c]         0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
2031      // no conditional links to ILINK1, ILINK2?
2214ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0d(OPS_32)
2215{
2216   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0d], /*"RCMP"*/ 1,0);
2217}
20322218
2033      c = m_regs[creg];
2034   }
2219ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e(OPS_32)
2220{
2221   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0e], /*"RSUB"*/ 0,0);
2222}
20352223
2036   if (!check_condition(condition))
2037      return m_pc + (size>>0);
20382224
2039   if (!F)
2040   {
2041      // if F isn't set then the destination can't be ILINK1 or ILINK2
2225ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p00(OPS_32)
2226{
2227   SETUP_HANDLE04_0x_P00
20422228
2043      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2044      {
2045         arcompact_fatal ("fatal arcompact_handle04_20_p11_m0 J %08x (F not set but ILINK1 or ILINK2 used as dst)", op);
2046      }
2047      else
2048      {
2049         UINT32 realaddress = c;
2050         return realaddress;
2051      }
2052   }
2229   m_regs[areg] = b | (1 << (c & 0x1f));
20532230
20542231   if (F)
20552232   {
2056      // if F is set then the destination MUST be ILINK1 or ILINK2
2233      arcompact_fatal("arcompact_handle04_06_p00 (BSET) (F set)\n"); // not yet supported
2234   }
20572235
2058      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2059      {
2060         arcompact_log("unimplemented arcompact_handle04_20_p11_m0 J %08x (F set)", op);
2061      }
2062      else
2063      {
2064         arcompact_fatal ("fatal arcompact_handle04_20_p11_m0 J %08x (F set but not ILINK1 or ILINK2 used as dst)", op);
2236   return m_pc + (size >> 0);
2237}
20652238
2066      }
2239ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p01(OPS_32)
2240{
2241   int size = 4;
2242   arcompact_fatal("arcompact_handle04_0f_p01 (BSET)\n");
2243   return m_pc + (size >> 0);
2244}
2245
2246ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p10(OPS_32)
2247{
2248   int size = 4;
2249   arcompact_fatal("arcompact_handle04_0f_p10 (BSET)\n");
2250   return m_pc + (size >> 0);
2251}
2252
2253ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p11_m0(OPS_32)
2254{
2255   int size = 4;
2256   arcompact_fatal("arcompact_handle04_0f_p11_m0 (BSET)\n");
2257   return m_pc + (size >> 0);
2258}
2259
2260ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0f_p11_m1(OPS_32)
2261{
2262   int size = 4;
2263   arcompact_fatal("arcompact_handle04_0f_p11_m1 (BSET)\n");
2264   return m_pc + (size >> 0);
2265}
2266
2267ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_10(OPS_32) 
2268{
2269   return arcompact_handle04_helper(PARAMS, opcodes_04[0x10], /*"BCLR"*/ 0,0);
2270}
2271
2272ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_11(OPS_32) 
2273{
2274   return arcompact_handle04_helper(PARAMS, opcodes_04[0x11], /*"BTST"*/ 0,0);
2275}
2276
2277ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_12(OPS_32) 
2278{
2279   return arcompact_handle04_helper(PARAMS, opcodes_04[0x12], /*"BXOR"*/ 0,0);
2280}
2281
2282ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13(OPS_32) 
2283{
2284   return arcompact_handle04_helper(PARAMS, opcodes_04[0x13], /*"BMSK"*/ 0,0);
2285}
2286
2287ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14(OPS_32) 
2288{
2289   return arcompact_handle04_helper(PARAMS, opcodes_04[0x14], /*"ADD1"*/ 0,0);
2290}
2291
2292ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_15(OPS_32) 
2293{
2294   return arcompact_handle04_helper(PARAMS, opcodes_04[0x15], /*"ADD2"*/ 0,0);
2295}
2296
2297
2298ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p00(OPS_32) // ADD3
2299{
2300   int size = 4;
2301   arcompact_fatal("arcompact_handle04_16_p00 (ADD3)\n");
2302
2303   return m_pc + (size >> 0);
2304}
2305
2306ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p01(OPS_32)
2307{
2308   SETUP_HANDLE04_0x_P01
2309
2310   m_regs[areg] = b + (c << 3); // c = u
2311
2312   if (F)
2313   {
2314      arcompact_fatal("arcompact_handle04_16_p01 (ADD3) (F set)\n"); // not yet supported
20672315   }
20682316
2317   return m_pc + (size >> 0);
2318}
20692319
2070   return m_pc + (size>>0);
2320ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p10(OPS_32)
2321{
2322   int size = 4;
2323   arcompact_fatal("arcompact_handle04_16_p10 (ADD3)\n");
2324   return m_pc + (size >> 0);
20712325}
20722326
2073ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m1(OPS_32)
2327ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p11_m0(OPS_32)
20742328{
2075   // opcode          iiii i--- ppII IIII F--- uuuu uumq qqqq
2076   // Jcc u6          0010 0RRR 1110 0000 0RRR uuuu uu1Q QQQQ
20772329   int size = 4;
2078   arcompact_log("unimplemented arcompact_handle04_20_p11_m1 J %08x (u6)", op);
2079   return m_pc + (size>>0);
2330   arcompact_fatal("arcompact_handle04_16_p11_m0 (ADD3)\n");
2331   return m_pc + (size >> 0);
20802332}
20812333
2334ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_16_p11_m1(OPS_32)
2335{
2336   int size = 4;
2337   arcompact_fatal("arcompact_handle04_16_p11_m1 (ADD3)\n");
2338   return m_pc + (size >> 0);
2339}
20822340
2083ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p00(OPS_32)
2341ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17(OPS_32) 
2342{
2343   return arcompact_handle04_helper(PARAMS, opcodes_04[0x17], /*"SUB1"*/ 0,0);
2344}
2345
2346ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18(OPS_32) 
2347{
2348   return arcompact_handle04_helper(PARAMS, opcodes_04[0x18], /*"SUB2"*/ 0,0);
2349}
2350
2351ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19(OPS_32) 
2352{
2353   return arcompact_handle04_helper(PARAMS, opcodes_04[0x19], /*"SUB3"*/ 0,0);
2354}
2355
2356ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1a(OPS_32) 
2357{
2358   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1a], /*"MPY"*/ 0,0);
2359} // *
2360
2361ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1b(OPS_32) 
2362{
2363   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1b], /*"MPYH"*/ 0,0);
2364} // *
2365
2366ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1c(OPS_32) 
2367{
2368   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1c], /*"MPYHU"*/ 0,0);
2369} // *
2370
2371ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1d(OPS_32) 
2372{
2373   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1d], /*"MPYU"*/ 0,0);
2374} // *
2375
2376/* handler template for c+p
2377ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p00(OPS_32)
20842378{
20852379   int size = 4;
2380   arcompact_fatal("arcompact_handleXX_xx_p00\n");
2381   return m_pc + (size >> 0);
2382}
2383
2384ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p01(OPS_32)
2385{
2386   int size = 4;
2387   arcompact_fatal("arcompact_handleXX_xx_p01\n");
2388   return m_pc + (size >> 0);
2389}
2390
2391ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p10(OPS_32)
2392{
2393   int size = 4;
2394   arcompact_fatal("arcompact_handleXX_xx_p10\n");
2395   return m_pc + (size >> 0);
2396}
2397
2398ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p11_m0(OPS_32)
2399{
2400   int size = 4;
2401   arcompact_fatal("arcompact_handleXX_xx_p11_m0\n");
2402   return m_pc + (size >> 0);
2403}
2404
2405ARCOMPACT_RETTYPE arcompact_device::arcompact_handleXX_xx_p11_m1(OPS_32)
2406{
2407   int size = 4;
2408   arcompact_fatal("arcompact_handleXX_xx_p11_m1\n");
2409   return m_pc + (size >> 0);
2410}
2411*/
2412
2413ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p00(OPS_32)
2414{
2415   int size = 4;
20862416   UINT32 limm = 0;
20872417   int got_limm = 0;
20882418
20892419   COMMON32_GET_creg
2090   COMMON32_GET_F
20912420
2092   if (creg == LIMM_REG)
2421   if (creg == LIMM_REG)
20932422   {
2423      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
2424      // J limm          0010 0RRR 0010 0000 0RRR 1111 10RR RRRR  [LIMM]  (creg = LIMM)
2425
20942426      if (!got_limm)
20952427      {
20962428         GET_LIMM_32;
20972429         size = 8;
20982430      }
20992431
2100      handle_jump_to_addr(1,0,limm, m_pc + (size>>0));
2432      return limm;
21012433   }
21022434   else
21032435   {
2104      return handle_jump_to_register(1,0,creg, m_pc + (size>>0), F); // delay, no link
2436      // opcode          iiii i--- ppII IIII F--- CCCC CC-- ----
2437      // J [c]           0010 0RRR 0010 0000 0RRR CCCC CCRR RRRR
2438      // J.F [ilink1]    0010 0RRR 0010 0000 1RRR 0111 01RR RRRR  (creg = ILINK1, FLAG must be set)
2439      // J.F [ilink2]    0010 0RRR 0010 0000 1RRR 0111 10RR RRRR  (creg = ILINE2, FLAG must be set)
2440
2441      arcompact_log("unimplemented J %08x", op);
21052442   }
21062443
21072444   return m_pc + (size>>0);
21082445}
21092446
2110ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p01(OPS_32)
2447ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p01(OPS_32)
21112448{
2449   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
2450   // J u6            0010 0RRR 0110 0000 0RRR uuuu uuRR RRRR
21122451   int size = 4;
2113   arcompact_log("unimplemented J.D (u6 type) %08x", op);
2452   arcompact_log("unimplemented J %08x", op);
21142453   return m_pc + (size>>0);
21152454}
21162455
2117ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p10(OPS_32)
2456ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p10(OPS_32)
21182457{
2458   // opcode          iiii i--- ppII IIII F--- ssss ssSS SSSS
2459   // J s12           0010 0RRR 1010 0000 0RRR ssss ssSS SSSS
21192460   int size = 4;
2120   arcompact_log("unimplemented J.D (s12 type) %08x", op);
2461   arcompact_log("unimplemented J %08x", op);
21212462   return m_pc + (size>>0);
21222463}
21232464
21242465
2125ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.D   (no link, delay)
2466ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32)
21262467{
21272468   int size = 4;
2128   UINT32 limm = 0;
2469//   UINT32 limm = 0;
21292470   int got_limm = 0;
21302471
21312472   COMMON32_GET_creg
2132   COMMON32_GET_CONDITION;
2133   COMMON32_GET_F
21342473
2135   //UINT32 c = 0;
2136
21372474   if (creg == LIMM_REG)
21382475   {
2476      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
2477      // Jcc limm        0010 0RRR 1110 0000 0RRR 1111 100Q QQQQ  [LIUMM]
21392478      if (!got_limm)
21402479      {
2141         GET_LIMM_32;
2480         //GET_LIMM_32;
21422481         size = 8;
21432482      }
21442483
2145   //   c = limm;
2146
2484      arcompact_log("unimplemented J %08x", op);
21472485   }
21482486   else
21492487   {
21502488      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
21512489      // Jcc [c]         0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
21522490      // no conditional links to ILINK1, ILINK2?
2153
2154   //   c = m_regs[creg];
2491      arcompact_log("unimplemented J %08x", op);
21552492   }
2156
2157   if (!check_condition(condition))
2158      return m_pc + (size>>0);
2159
2160   if (!F)
2161   {
2162      // if F isn't set then the destination can't be ILINK1 or ILINK2
2163
2164      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2165      {
2166         arcompact_log("unimplemented Jcc.D (p11_m0 type, illegal) %08x", op);
2167      }
2168      else
2169      {
2170         arcompact_log("unimplemented Jcc.D (p11_m0 type, unimplemented) %08x", op);
2171      }
2172   }
2173
2174   if (F)
2175   {
2176      // if F is set then the destination MUST be ILINK1 or ILINK2
2177
2178      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2179      {
2180         arcompact_log("unimplemented Jcc.D.F (p11_m0 type, unimplemented) %08x", op);
2181      }
2182      else
2183      {
2184         arcompact_log("unimplemented Jcc.D.F (p11_m0 type, illegal) %08x", op);
2185      }
2186   }
2187
2188
21892493   return m_pc + (size>>0);
21902494}
21912495
2192ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m1(OPS_32)
2496ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m1(OPS_32)
21932497{
2498   // opcode          iiii i--- ppII IIII F--- uuuu uumq qqqq
2499   // Jcc u6          0010 0RRR 1110 0000 0RRR uuuu uu1Q QQQQ
21942500   int size = 4;
2195   arcompact_log("unimplemented arcompact_handle04_21_p11_m1 J.D %08x (u6)", op);
2501   arcompact_log("unimplemented J %08x", op);
21962502   return m_pc + (size>>0);
21972503}
21982504
21992505
22002506
2507ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21(OPS_32)
2508{
2509   return arcompact_handle04_helper(PARAMS, opcodes_04[0x21], /*"J.D"*/ 1,1);
2510}
2511
22012512ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_22(OPS_32)
22022513{
22032514   return arcompact_handle04_helper(PARAMS, opcodes_04[0x22], /*"JL"*/ 1,1);
r242703r242704
22142525ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_28(OPS_32) // LPcc (loop setup)
22152526{
22162527   int size = 4;
2217//  COMMON32_GET_breg; // breg is reserved
2528
22182529   COMMON32_GET_p;
2219
2530     
22202531   if (p == 0x00)
22212532   {
2222      arcompact_fatal("<illegal LPcc, p = 0x00)");
22232533   }
22242534   else if (p == 0x01)
22252535   {
2226      arcompact_fatal("<illegal LPcc, p = 0x01)");
22272536   }
22282537   else if (p == 0x02) // Loop unconditional
2229   { // 0010 0RRR 1010 1000 0RRR ssss ssSS SSSS
2230      COMMON32_GET_s12
2231      if (S & 0x800) S = -0x800 + (S&0x7ff);
2232
2233      arcompact_fatal("Lp unconditional not supported %d", S);
2538   {
22342539   }
22352540   else if (p == 0x03) // Loop conditional
2236   { // 0010 0RRR 1110 1000 0RRR uuuu uu1Q QQQQ
2237      COMMON32_GET_u6
2238      COMMON32_GET_CONDITION
2239      //arcompact_fatal("Lp conditional %s not supported %d", conditions[condition], u);
2541   {
2542   }
22402543
2241      // if the loop condition fails then just jump to after the end of the loop, don't set any registers
2242      if (!check_condition(condition))
2544   arcompact_log("unimplemented LPcc %08x", op);
2545   return m_pc + (size>>0);
2546
2547}
2548
2549
2550ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2a(OPS_32)  // Load FROM Auxiliary register TO register
2551{
2552   int size = 4;
2553//   UINT32 limm = 0;
2554   int got_limm = 0;
2555
2556   COMMON32_GET_p;
2557   //COMMON32_GET_breg;
2558
2559   if (p == 0)
2560   {
2561
2562      COMMON32_GET_creg
2563
2564      if (creg == LIMM_REG)
22432565      {
2244         UINT32 realoffset = PC_ALIGNED32 + (u * 2);
2245         return realoffset;
2566         if (!got_limm)
2567         {
2568            //GET_LIMM_32;
2569            size = 8;
2570         }
2571   
22462572      }
22472573      else
22482574      {
2249         // otherwise set up the loop positions
2250         m_LP_START = m_pc + (size >> 0);
2251         m_LP_END = PC_ALIGNED32 + (u * 2);
2252         return m_pc + (size>>0);
22532575      }
2576   }
2577   else if (p == 1)
2578   {
2579   }
2580   else if (p == 2)
2581   {
2582   }
2583   else if (p == 3)
2584   {
2585   }
22542586
2587   arcompact_log("unimplemented LR %08x", op);
2588   return m_pc + (size>>0);
2589}
2590
2591ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b(OPS_32)  // Store TO Auxiliary register FROM register
2592{   
2593   int size = 4;
2594//   UINT32 limm = 0;
2595   int got_limm = 0;
2596
2597   COMMON32_GET_p;
2598   COMMON32_GET_breg;
2599
2600   if (breg == LIMM_REG)
2601   {
2602      //GET_LIMM_32;
2603      size = 8;
2604      got_limm = 1;
2605
22552606   }
2607   else
2608   {
2609   }
22562610
2611   if (p == 0)
2612   {
2613
2614      COMMON32_GET_creg
2615
2616      if (creg == LIMM_REG)
2617      {
2618         if (!got_limm)
2619         {
2620            //GET_LIMM_32;
2621            size = 8;
2622         }
2623      }
2624      else
2625      {
2626      }
2627   }
2628   else if (p == 1)
2629   {
2630   }
2631   else if (p == 2)
2632   {
2633   }
2634   else if (p == 3)
2635   {
2636   }
2637
2638   arcompact_log("unimplemented SR %08x", op);
22572639   return m_pc + (size>>0);
2258
22592640}
22602641
2261
22622642ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_29(OPS_32)
22632643{
22642644   // leapster bios uses formats for FLAG that are not defined, bug I guess work anyway (P modes 0 / 1)
r242703r242704
22722652
22732653   COMMON32_GET_p;
22742654   //COMMON32_GET_breg;
2275
2655   
22762656   if (p == 0)
22772657   {
22782658      COMMON32_GET_creg
r242703r242704
22812661      {
22822662         //UINT32 limm;
22832663         //GET_LIMM_32;
2284         size = 8;
2664         size = 8;   
22852665      }
22862666      else
22872667      {
r242703r242704
23022682}
23032683
23042684
2685#define SETUP_HANDLE04_2f_0x_P00 \
2686   int size = 4; \
2687   UINT32 limm = 0; \
2688   \
2689   COMMON32_GET_breg; \
2690   COMMON32_GET_F; \
2691   COMMON32_GET_creg; \
2692   \
2693   UINT32 c; \
2694   \
2695   if (creg == LIMM_REG) \
2696   { \
2697      GET_LIMM_32; \
2698      size = 8; \
2699      c = limm; \
2700   } \
2701   else \
2702   { \
2703      c = m_regs[creg]; \
2704   } \
2705   /* todo: is the limm, limm syntax valid? (it's pointless.) */ \
2706   /* todo: if breg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ \
23052707
2708
2709
23062710ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL
23072711ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR
2308
2712ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "LSR"); } // LSR
2713ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR
23092714ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC
23102715ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB
23112716ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_06(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXW"); } // SEXW
23122717
2718// EXTB
2719ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p00(OPS_32) // note 'b' destination for 04_2f_07_xx group
2720{
2721   SETUP_HANDLE04_2f_0x_P00;
2722   
2723   m_regs[breg] = c & 0x000000ff;
2724   if (F)
2725   {
2726      arcompact_fatal("arcompact_handle04_2f_08_p00 (EXTW) (F set)\n"); // not yet supported
2727   }
23132728
2729   return m_pc + (size >> 0);
2730}
2731
2732ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p01(OPS_32)
2733{
2734   int size = 4;
2735   arcompact_fatal("arcompact_handle04_2f_07_p01 (EXTB)\n");
2736   return m_pc + (size >> 0);
2737}
2738
2739ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p10(OPS_32)
2740{
2741   int size = 4;
2742   arcompact_fatal("illegal 04_2f_07_p10 (EXTB)\n"); // illegal mode because 'S' bits have already been used for opcode select
2743   return m_pc + (size >> 0);
2744}
2745
2746ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p11_m0(OPS_32)
2747{
2748   int size = 4;
2749   arcompact_fatal("arcompact_handle04_2f_07_p11_m0 (EXTB)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2750   return m_pc + (size >> 0);
2751}
2752
2753ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p11_m1(OPS_32)
2754{
2755   int size = 4;
2756   arcompact_fatal("arcompact_handle04_2f_07_p11_m1 (EXTB)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2757   return m_pc + (size >> 0);
2758}
2759
2760// EXTW b <- c  or  EXTW  b <- limm   or EXTW  limm <- c (no result)  or EXTW  limm, limm (invalid?)
2761ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p00(OPS_32) // note 'b' destination for 04_2f_08_xx group
2762{
2763   SETUP_HANDLE04_2f_0x_P00;
2764   
2765   m_regs[breg] = c & 0x0000ffff;
2766   if (F)
2767   {
2768      arcompact_fatal("arcompact_handle04_2f_08_p00 (EXTW) (F set)\n"); // not yet supported
2769   }
2770
2771   return m_pc + (size >> 0);
2772}
2773
2774ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p01(OPS_32)
2775{
2776   int size = 4;
2777   arcompact_fatal("arcompact_handle04_2f_08_p01 (EXTW)\n");
2778   return m_pc + (size >> 0);
2779}
2780
2781ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p10(OPS_32)
2782{
2783   int size = 4;
2784   arcompact_fatal("illegal 04_2f_08_p10 (EXTW)\n"); // illegal mode because 'S' bits have already been used for opcode select
2785   return m_pc + (size >> 0);
2786}
2787
2788ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p11_m0(OPS_32)
2789{
2790   int size = 4;
2791   arcompact_fatal("arcompact_handle04_2f_08_p11_m0 (EXTW)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2792   return m_pc + (size >> 0);
2793}
2794
2795ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p11_m1(OPS_32)
2796{
2797   int size = 4;
2798   arcompact_fatal("arcompact_handle04_2f_08_p11_m1 (EXTW)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2799   return m_pc + (size >> 0);
2800}
2801
2802
23142803ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_09(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ABS"); } // ABS
23152804ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0a(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "NOT"); } // NOT
23162805ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0b(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCL"); } // RLC
r242703r242704
23602849   }
23612850   else
23622851   {
2363   }
2852   }   
23642853
23652854   arcompact_log("unimplemented LD %08x (type 04_3x)", op);
23662855   return m_pc + (size>>0);
r242703r242704
23832872
23842873
23852874
2875ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p00(OPS_32) // ASL
2876{
2877   SETUP_HANDLE04_0x_P00
23862878
2879   m_regs[areg] = b << (c&0x1f); // c = c
2880
2881   if (F)
2882   {
2883      arcompact_fatal("arcompact_handle05_00_p00 (ASL) (F set)\n"); // not yet supported
2884   }
2885
2886   return m_pc + (size >> 0);
2887}
2888
2889ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p01(OPS_32)
2890{
2891   SETUP_HANDLE04_0x_P01
2892
2893   m_regs[areg] = b << (c&0x1f); // c = u
2894
2895   if (F)
2896   {
2897      arcompact_fatal("arcompact_handle05_00_p01 (ASL) (F set)\n"); // not yet supported
2898   }
2899
2900   return m_pc + (size >> 0);}
2901
2902ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p10(OPS_32)
2903{
2904   int size = 4;
2905   arcompact_fatal("arcompact_handle05_00_p10 (ASL)\n");
2906   return m_pc + (size >> 0);
2907}
2908
2909ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p11_m0(OPS_32)
2910{
2911   int size = 4;
2912   arcompact_fatal("arcompact_handle05_00_p11_m0 (ASL)\n");
2913   return m_pc + (size >> 0);
2914}
2915
2916ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_00_p11_m1(OPS_32)
2917{
2918   int size = 4;
2919   arcompact_fatal("arcompact_handle05_00_p11_m1 (ASL)\n");
2920   return m_pc + (size >> 0);
2921}
2922
2923
2924
2925
2926ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p00(OPS_32)
2927{
2928   int size = 4;
2929   arcompact_fatal("arcompact_handle05_01_p00 (LSR)\n");
2930   return m_pc + (size >> 0);
2931}
2932
2933ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p01(OPS_32)
2934{
2935   SETUP_HANDLE04_0x_P01
2936
2937   m_regs[areg] = b >> (c&0x1f); // c = u
2938
2939   if (F)
2940   {
2941      arcompact_fatal("arcompact_handle05_01_p01 (LSR) (F set)\n"); // not yet supported
2942   }
2943
2944   return m_pc + (size >> 0);
2945}
2946
2947ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p10(OPS_32)
2948{
2949   int size = 4;
2950   arcompact_fatal("arcompact_handle05_01_p10 (LSR)\n");
2951   return m_pc + (size >> 0);
2952}
2953
2954ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p11_m0(OPS_32)
2955{
2956   int size = 4;
2957   arcompact_fatal("arcompact_handle05_01_p11_m0 (LSR)\n");
2958   return m_pc + (size >> 0);
2959}
2960
2961ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_01_p11_m1(OPS_32)
2962{
2963   int size = 4;
2964   arcompact_fatal("arcompact_handle05_01_p11_m1 (LSR)\n");
2965   return m_pc + (size >> 0);
2966}
2967
2968
23872969ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_02(OPS_32)  { return arcompact_handle04_helper(PARAMS, "ASR", 0,0); }
23882970ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_03(OPS_32)  { return arcompact_handle04_helper(PARAMS, "ROR", 0,0); }
23892971ARCOMPACT_RETTYPE arcompact_device::arcompact_handle05_04(OPS_32)  { return arcompact_handle04_helper(PARAMS, "MUL64", 2,0); } // special
r242703r242704
24082990
24092991   COMMON32_GET_p;
24102992   //COMMON32_GET_breg;
2411
2993   
24122994   if (p == 0)
24132995   {
24142996      COMMON32_GET_creg
r242703r242704
24172999      {
24183000         //UINT32 limm;
24193001         //GET_LIMM_32;
2420         size = 8;
3002         size = 8;   
24213003
24223004      }
24233005      else
r242703r242704
25353117}
25363118
25373119
3120ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_00(OPS_16) // ADD_S c, b,  u3   (note, c destination)
3121{
3122   int u, breg, creg;
25383123
3124   COMMON16_GET_u3;
3125   COMMON16_GET_breg;
3126   COMMON16_GET_creg;
3127
3128   REG_16BIT_RANGE(breg);
3129   REG_16BIT_RANGE(creg);
3130
3131   m_regs[creg] = m_regs[breg] + u;
3132
3133   return m_pc + (2 >> 0);
3134}
3135
3136ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_01(OPS_16)
3137{
3138   return arcompact_handle0d_helper(PARAMS, "SUB_S");
3139}
3140
3141ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_02(OPS_16) // ASL_S c, b asl u3   (note, c destination)
3142{
3143   int u, breg, creg;
3144
3145   COMMON16_GET_u3;
3146   COMMON16_GET_breg;
3147   COMMON16_GET_creg;
3148
3149   REG_16BIT_RANGE(breg);
3150   REG_16BIT_RANGE(creg);
3151
3152   m_regs[creg] = m_regs[breg] << u;
3153
3154   return m_pc + (2 >> 0);
3155}
3156
25393157ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_03(OPS_16)
25403158{
25413159   return arcompact_handle0d_helper(PARAMS, "ASR_S");
r242703r242704
25493167   int size = 2;
25503168
25513169   GROUP_0e_GET_h;
2552
3170   
25533171   if (h == LIMM_REG)
25543172   {
25553173      //UINT32 limm;
r242703r242704
25583176   }
25593177   else
25603178   {
3179
25613180   }
25623181
25633182   arcompact_log("unimplemented %s %04x (0x0e_0x group)", optext, op);
r242703r242704
25743193   GROUP_0e_GET_h;
25753194   COMMON16_GET_breg;
25763195   REG_16BIT_RANGE(breg);
2577
3196   
25783197   if (h == LIMM_REG)
25793198   {
25803199      UINT32 limm;
r242703r242704
25933212}
25943213
25953214// 16-bit MOV with extended register range
2596ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_01(OPS_16) // MOV_S b <- h
3215ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0e_01(OPS_16) // MOV_S b <- h
25973216{
25983217   int h,breg;
25993218   int size = 2;
r242703r242704
26013220   GROUP_0e_GET_h;
26023221   COMMON16_GET_breg;
26033222   REG_16BIT_RANGE(breg);
2604
3223   
26053224   if (h == LIMM_REG)
26063225   {
26073226      // opcode        iiii ibbb hhhI Ihhh
r242703r242704
26373256   GROUP_0e_GET_h;
26383257   COMMON16_GET_breg;
26393258   REG_16BIT_RANGE(breg);
2640
3259   
26413260   if (h == LIMM_REG) // no result..
26423261   {
3262
26433263   }
26443264
26453265   m_regs[h] = m_regs[breg];
r242703r242704
26663286
26673287   COMMON16_GET_breg;
26683288   REG_16BIT_RANGE(breg);
2669
3289   
26703290   m_regs[REG_BLINK] = m_pc + (2 >> 0);
2671
3291   
26723292   return m_regs[breg];
26733293}
26743294
r242703r242704
26793299
26803300   COMMON16_GET_breg;
26813301   REG_16BIT_RANGE(breg);
2682
3302   
26833303   m_delayactive = 1;
26843304   m_delayjump = m_regs[breg];
26853305   m_delaylinks = 1;
2686
3306   
26873307   return m_pc + (2 >> 0);
26883308}
26893309
r242703r242704
26933313
26943314
26953315// Zero parameters (ZOP)
2696ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { /*arcompact_log("NOP_S");*/ return m_pc + (2 >> 0);}
3316ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { arcompact_log("NOP_S"); return m_pc + (2 >> 0);}
26973317ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16)  { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);} // Unimplemented Instruction, same as illegal, but recommended to fill blank space
26983318ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16)  { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);}
26993319ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16)  { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);}
r242703r242704
27093329   m_delayactive = 1;
27103330   m_delayjump = m_regs[REG_BLINK];
27113331   m_delaylinks = 0;
2712
3332   
27133333   return m_pc + (2 >> 0);
27143334}
27153335
r242703r242704
27233343   return m_pc + (2 >> 0);
27243344}
27253345
3346ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_02(OPS_16) // SUB_S b <- b,c
3347{
3348   int breg, creg;
27263349
3350   COMMON16_GET_breg;
3351   COMMON16_GET_creg;
27273352
3353   REG_16BIT_RANGE(breg);
3354   REG_16BIT_RANGE(creg);
27283355
3356   m_regs[breg] = m_regs[breg] - m_regs[creg];
27293357
3358   return m_pc + (2 >> 0);
3359}
27303360
3361
3362ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_04(OPS_16) // AND_S b <- b, c
3363{
3364   int breg, creg;
3365
3366   COMMON16_GET_breg;
3367   COMMON16_GET_creg;
3368
3369   REG_16BIT_RANGE(breg);
3370   REG_16BIT_RANGE(creg);
3371
3372   m_regs[breg] = m_regs[breg] & m_regs[creg];
3373
3374   return m_pc + (2 >> 0);
3375}
3376
3377ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_05(OPS_16) // OR_S b <- b,c
3378{
3379   int breg, creg;
3380
3381   COMMON16_GET_breg;
3382   COMMON16_GET_creg;
3383
3384   REG_16BIT_RANGE(breg);
3385   REG_16BIT_RANGE(creg);
3386
3387   m_regs[breg] = m_regs[breg] | m_regs[creg];
3388
3389   return m_pc + (2 >> 0);
3390}
3391
3392
27313393ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_06(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "BIC_S",0);  }
2732
3394ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_07(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "XOR_S",0);  }
27333395ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0b(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "TST_S",1);  }
27343396ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "MUL64_S",2);  } // actual destination is special multiply registers
27353397ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXB_S",0); }
27363398ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0e(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXW_S",0); }
27373399
3400ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) // EXTB_S
3401{
3402   int breg, creg;
27383403
3404   COMMON16_GET_breg;
3405   COMMON16_GET_creg;
27393406
3407   REG_16BIT_RANGE(breg);
3408   REG_16BIT_RANGE(creg);
27403409
3410   m_regs[breg] = m_regs[creg] & 0x000000ff;
3411
3412   return m_pc + (2 >> 0);
3413
3414}
3415
3416ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_10(OPS_16) // EXTW_S
3417{
3418   int breg, creg;
3419
3420   COMMON16_GET_breg;
3421   COMMON16_GET_creg;
3422
3423   REG_16BIT_RANGE(breg);
3424   REG_16BIT_RANGE(creg);
3425
3426   m_regs[breg] = m_regs[creg] & 0x0000ffff;
3427
3428   return m_pc + (2 >> 0);
3429}
3430
27413431ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_11(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ABS_S",0);  }
27423432ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_12(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "NOT_S",0);  }
3433ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_13(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "NEG_S",0);  }
3434ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_14(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD1_S",0); }
3435ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_15(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD2_S",0); }
3436ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_16(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD3_S",0); }
3437ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_18(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASL_S",0);  }
3438ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_19(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "LSR_S",0);  }
3439ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1a(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR_S",0);  }
27433440
3441ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1b(OPS_16) //  ASL b, c asl 1   (can also be impleneted as b = c + c)
3442{
3443   int breg, creg;
27443444
2745ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_18(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASL_S",0);  }
3445   COMMON16_GET_breg;
3446   COMMON16_GET_creg;
27463447
2747ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1a(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR_S",0);  }
3448   REG_16BIT_RANGE(breg);
3449   REG_16BIT_RANGE(creg);
27483450
3451   m_regs[breg] = m_regs[creg] << 1;
27493452
3453   return m_pc + (2 >> 0);
3454}
3455
27503456ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR1_S",0); }
27513457ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "LSR1_S",0); }
27523458
r242703r242704
27723478
27733479
27743480ARCOMPACT_RETTYPE arcompact_device::arcompact_handle10(OPS_16)
2775{ // LD_S c, [b, u7]
3481{ // LD_S c, [b, u7]
27763482   int breg, creg, u;
27773483
27783484   COMMON16_GET_breg;
r242703r242704
27903496
27913497ARCOMPACT_RETTYPE arcompact_device::arcompact_handle11(OPS_16)
27923498{
2793   // LDB_S c, [b, u5]
3499 // LDB_S c, [b, u5]
27943500   int breg, creg, u;
27953501
27963502   COMMON16_GET_breg;
r242703r242704
28003506   REG_16BIT_RANGE(breg);
28013507   REG_16BIT_RANGE(creg);
28023508
2803//  u <<= 0; // check
3509//   u <<= 0; // check
28043510   m_regs[creg] = READ8((m_regs[breg] + u) >> 0);
28053511
28063512   return m_pc + (2 >> 0);
r242703r242704
28083514
28093515ARCOMPACT_RETTYPE arcompact_device::arcompact_handle12(OPS_16)
28103516{
2811   // LDB_W c, [b, u6]
3517 // LDB_W c, [b, u6]
28123518   int breg, creg, u;
28133519
28143520   COMMON16_GET_breg;
r242703r242704
28583564   REG_16BIT_RANGE(breg);
28593565   REG_16BIT_RANGE(creg);
28603566
2861//  u <<= 0;
3567//   u <<= 0;
28623568
28633569   WRITE8((m_regs[breg] + u) >> 0, m_regs[creg]);
28643570
r242703r242704
28913597   return m_pc + (2 >> 0);
28923598}
28933599
3600ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_00(OPS_16) // ASL_S b, b, u5
3601{
3602   int breg, u;
3603
3604   COMMON16_GET_breg;
3605   COMMON16_GET_u5;
3606
3607   REG_16BIT_RANGE(breg);
3608
3609   // only bottom 5 bits are used if ASL operations, we only have 5 bits anyway here
3610   m_regs[breg] = m_regs[breg] << (u&0x1f);
3611
3612   return m_pc + (2 >> 0);
3613
3614}
3615
3616ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_01(OPS_16)
3617{
3618   return arcompact_handle_l7_0x_helper(PARAMS, "LSR_S");
3619}
3620
3621ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_02(OPS_16) // ASR_S b,b,u5
3622{
3623   int breg, u;
3624
3625   COMMON16_GET_breg;
3626   COMMON16_GET_u5;
3627
3628   REG_16BIT_RANGE(breg);
3629
3630   // only bottom 5 bits are used if ASR operations, we only have 5 bits anyway here
3631   INT32 temp = (INT32)m_regs[breg]; // treat it as a signed value, so sign extension occurs during shift
3632   
3633   m_regs[breg] = temp >> (u&0x1f);
3634
3635   return m_pc + (2 >> 0);
3636}
3637
3638ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_03(OPS_16) // SUB_S b,b,u5
3639{
3640   int breg, u;
3641
3642   COMMON16_GET_breg;
3643   COMMON16_GET_u5;
3644
3645   REG_16BIT_RANGE(breg);
3646
3647   m_regs[breg] = m_regs[breg] - u;
3648
3649   return m_pc + (2 >> 0);
3650}
3651
3652ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_04(OPS_16) // BSET_S b,b,u5
3653{
3654   int breg, u;
3655
3656   COMMON16_GET_breg;
3657   COMMON16_GET_u5;
3658
3659   REG_16BIT_RANGE(breg);
3660
3661   m_regs[breg] = m_regs[breg] | (1 << (u & 0x1f));
3662
3663   return m_pc + (2 >> 0);
3664}
3665
28943666ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_05(OPS_16)
28953667{
28963668   return arcompact_handle_l7_0x_helper(PARAMS, "BCLR_S");
28973669}
28983670
3671ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_06(OPS_16) // BMSK b,b,u5
3672{
3673   int breg, u;
3674
3675   COMMON16_GET_breg;
3676   COMMON16_GET_u5;
3677
3678   REG_16BIT_RANGE(breg);
3679
3680   u &= 0x1f;
3681
3682   m_regs[breg] = m_regs[breg] | ((1 << (u + 1)) - 1);
3683
3684   return m_pc + (2 >> 0);
3685}
3686
28993687ARCOMPACT_RETTYPE arcompact_device::arcompact_handle17_07(OPS_16)
29003688{
29013689   return arcompact_handle_l7_0x_helper(PARAMS, "BTST_S");
29023690}
29033691
2904
2905
29063692ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_0x_helper(OPS_16, const char* optext, int st)
29073693{
29083694   arcompact_log("unimplemented %s %04x (0x18_0x group)", optext, op);
r242703r242704
29263712   return m_pc + (2 >> 0);
29273713}
29283714
2929ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_01(OPS_16)
3715ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_01(OPS_16)
29303716{
29313717   return arcompact_handle18_0x_helper(PARAMS, "LDB_S (SP)", 0);
29323718}
r242703r242704
29483734   return m_pc + (2 >> 0);
29493735}
29503736
2951ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_03(OPS_16)
3737ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_03(OPS_16)
29523738{
29533739   return arcompact_handle18_0x_helper(PARAMS, "STB_S (SP)", 1);
29543740}
r242703r242704
29893775   return m_pc + (2 >> 0);
29903776}
29913777
2992// op bits remaining for 0x18_06_xx subgroups 0x0700
3778// op bits remaining for 0x18_06_xx subgroups 0x0700
29933779ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_06_01(OPS_16) // POP_S b
29943780{
29953781   int breg;
29963782   COMMON16_GET_breg;
29973783   REG_16BIT_RANGE(breg);
2998
3784   
29993785   m_regs[breg] = READ32(m_regs[REG_SP] >> 2);
30003786   m_regs[REG_SP] += 4;
30013787
r242703r242704
30113797   return m_pc + (2 >> 0);
30123798}
30133799
3014// op bits remaining for 0x18_07_xx subgroups 0x0700
3800// op bits remaining for 0x18_07_xx subgroups 0x0700
30153801ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_01(OPS_16) // PUSH_S b
30163802{
30173803   int breg;
30183804   COMMON16_GET_breg;
30193805   REG_16BIT_RANGE(breg);
3020
3806   
30213807   m_regs[REG_SP] -= 4;
3022
3808   
30233809   WRITE32(m_regs[REG_SP] >> 2, m_regs[breg]);
30243810
30253811   return m_pc + (2 >> 0);
r242703r242704
30313817   // breg bits are reserved
30323818
30333819   m_regs[REG_SP] -= 4;
3034
3820   
30353821   WRITE32(m_regs[REG_SP] >> 2, m_regs[REG_BLINK]);
30363822
30373823   return m_pc + (2 >> 0);
r242703r242704
31513937
31523938   if (!m_regs[breg])
31533939   {
3154      int s = (op & 0x007f) >> 0; op &= ~0x007f;
3940      int s = (op & 0x007f) >> 0;   op &= ~0x007f;
31553941      if (s & 0x40) s = -0x40 + (s & 0x3f);
31563942      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
31573943      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
r242703r242704
31703956
31713957   if (m_regs[breg])
31723958   {
3173      int s = (op & 0x007f) >> 0; op &= ~0x007f;
3959      int s = (op & 0x007f) >> 0;   op &= ~0x007f;
31743960      if (s & 0x40) s = -0x40 + (s & 0x3f);
31753961      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
31763962      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
r242703r242704
31913977
31923978ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_00(OPS_16) // B_S s10  (branch always)
31933979{
3194   int s = (op & 0x01ff) >> 0; op &= ~0x01ff;
3980   int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
31953981   if (s & 0x100) s = -0x100 + (s & 0xff);
31963982   UINT32 realaddress = PC_ALIGNED32 + (s * 2);
31973983   //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
r242703r242704
32023988{
32033989   if (STATUS32_CHECK_Z)
32043990   {
3205      int s = (op & 0x01ff) >> 0; op &= ~0x01ff;
3991      int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
32063992      if (s & 0x100) s = -0x100 + (s & 0xff);
32073993      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
32083994      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
r242703r242704
32164002{
32174003   if (!STATUS32_CHECK_Z)
32184004   {
3219      int s = (op & 0x01ff) >> 0; op &= ~0x01ff;
4005      int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
32204006      if (s & 0x100) s = -0x100 + (s & 0xff);
32214007      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
32224008      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
r242703r242704
32344020
32354021ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_00(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGT_S"); }
32364022ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_01(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGE_S"); }
3237
3238ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_02(OPS_16) // BLT_S
3239{
3240   if (CONDITION_LT)
3241   {
3242      int s = (op & 0x003f) >> 0; op &= ~0x003f;
3243      if (s & 0x020) s = -0x20 + (s & 0x1f);
3244      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3245      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3246      return realaddress;
3247   }
3248
3249   return m_pc + (2 >> 0);
3250}
3251
3252ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_03(OPS_16) // BLE_S
3253{
3254   if (CONDITION_LE)
3255   {
3256      int s = (op & 0x003f) >> 0; op &= ~0x003f;
3257      if (s & 0x020) s = -0x20 + (s & 0x1f);
3258      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3259      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3260      return realaddress;
3261   }
3262
3263   return m_pc + (2 >> 0);
3264}
3265
4023ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_02(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLT_S"); }
4024ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_03(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLE_S"); }
32664025ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_04(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BHI_S"); }
32674026ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_05(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BHS_S"); }
32684027ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_06(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLO_S"); }
r242703r242704
32704029
32714030ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1f(OPS_16) // BL_S s13
32724031{
3273   int s = (op & 0x07ff) >> 0; op &= ~0x07ff;
4032   int s = (op & 0x07ff) >> 0;   op &= ~0x07ff;
32744033   if (s & 0x400) s = -0x400 + (s & 0x3ff);
32754034
32764035   UINT32 realaddress = PC_ALIGNED32 + (s * 4);
r242703r242704
36934452ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1d(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1d> (%04x)",  op); return m_pc + (2 >> 0);}
36944453ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1e(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1e> (%04x)",  op); return m_pc + (2 >> 0);}
36954454ARCOMPACT_RETTYPE arcompact_device::arcompact_handle18_07_1f(OPS_16)  { arcompact_fatal("<illegal 0x18_07_1f> (%04x)",  op); return m_pc + (2 >> 0);}
4455
4456
4457
trunk/src/emu/cpu/arcompact/arcompact_make.py
r242703r242704
1#!/usr/bin/python
2
3import sys
4import re
5
6def EmitGroup04_Handle_NZ_Flags(f, funcname, opname):
7        print >>f, "      if (result & 0x80000000) { STATUS32_SET_N; }"
8        print >>f, "      else { STATUS32_CLEAR_N; }"
9        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
10        print >>f, "      else { STATUS32_CLEAR_Z; }"
11
12def EmitGroup04_Handle_NZC_LSR1_Flags(f, funcname, opname):
13        print >>f, "      if (result & 0x80000000) { STATUS32_SET_N; }"
14        print >>f, "      else { STATUS32_CLEAR_N; }"
15        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
16        print >>f, "      else { STATUS32_CLEAR_Z; }"
17        print >>f, "      if (c == 0x00000001) { STATUS32_SET_C; }"
18        print >>f, "      else { STATUS32_CLEAR_C; }"
19
20def EmitGroup04_Handle_NZCV_ADD_Flags(f, funcname, opname):
21        print >>f, "      if (result & 0x80000000) { STATUS32_SET_N; }"
22        print >>f, "      else { STATUS32_CLEAR_N; }"
23        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
24        print >>f, "      else { STATUS32_CLEAR_Z; }"
25        print >>f, "      if ((b & 0x80000000) == (c & 0x80000000))"
26        print >>f, "      {"
27        print >>f, "         if ((result & 0x80000000) != (b & 0x80000000))"
28        print >>f, "         {"
29        print >>f, "            STATUS32_SET_V;"
30        print >>f, "         }"
31        print >>f, "         else"
32        print >>f, "         {"
33        print >>f, "            STATUS32_CLEAR_V;"
34        print >>f, "         }"
35        print >>f, "      }"
36        print >>f, "      if (b < c)"
37        print >>f, "      {"
38        print >>f, "         STATUS32_SET_C;"
39        print >>f, "      }"
40        print >>f, "      else"
41        print >>f, "      {"
42        print >>f, "         STATUS32_CLEAR_C;"
43        print >>f, "      }"
44
45
46def EmitGroup04_no_Flags(f, funcname, opname):
47       print >>f, "      // no flag changes"
48
49def EmitGroup04_unsupported_Flags(f, funcname, opname):
50        print >>f, "      arcompact_fatal(\"arcompact_handle%s (%s) (F set)\\n\"); // not yet supported" % (funcname, opname)
51
52def EmitGroup04_Flaghandler(f,funcname, opname, flagcondition, flaghandler):
53    if flagcondition == -1:
54        print >>f, "   if (F)"
55        print >>f, "   {"
56        flaghandler(f, funcname, opname)
57        print >>f, "   }"
58    elif flagcondition == 0:
59        print >>f, "   if (0)"
60        print >>f, "   {"
61        flaghandler(f, funcname, opname)
62        print >>f, "   }"
63    elif flagcondition == 1:
64        print >>f, "   if (1)"
65        print >>f, "   {"
66        flaghandler(f, funcname, opname)
67        print >>f, "   }"
68
69def EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
70    print >>f, "   int size = 4;"
71   
72    if breg_is_dst_only == 0:   
73        print >>f, "   UINT32 limm = 0;"
74   
75    print >>f, "/*   int got_limm = 0; */"
76    print >>f, "   "
77    print >>f, "   COMMON32_GET_breg;"
78   
79    if flagcondition == -1:
80        print >>f, "   COMMON32_GET_F;"
81   
82    print >>f, "   COMMON32_GET_u6;"
83   
84    if ignore_a == 0:
85        print >>f, "   COMMON32_GET_areg;"
86    elif ignore_a == 1:
87        print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
88    elif ignore_a == 2:
89        print >>f, "     //COMMON32_GET_areg; // areg bits already used as opcode select"
90    elif ignore_a == 3:
91        print >>f, "     //COMMON32_GET_areg; // areg bits already used as condition code select"
92    print >>f, "   "
93   
94    print >>f, "   UINT32 c;"
95    if breg_is_dst_only == 0:
96        print >>f, "   UINT32 b;"
97        print >>f, "   "
98        print >>f, "   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */"
99        print >>f, "   if (breg == LIMM_REG)"
100        print >>f, "   {"
101        print >>f, "      GET_LIMM_32;"
102        print >>f, "      size = 8;"
103        print >>f, "/*      got_limm = 1; */"
104        print >>f, "      b = limm;"
105        print >>f, "   }"
106        print >>f, "   else"
107        print >>f, "   {"
108        print >>f, "      b = m_regs[breg];"
109        print >>f, "   }"
110   
111    print >>f, "    "
112    print >>f, "    c = u;"
113    print >>f, "   "
114    print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
115
116def EmitGroup04(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
117    # the mode 0x00 handler 
118    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p00(OPS_32)" % (funcname)
119    print >>f, "{"
120    print >>f, "   int size = 4;"
121   
122    print >>f, "   UINT32 limm = 0;"
123   
124    print >>f, "   int got_limm = 0;"
125    print >>f, "   "
126    print >>f, "   COMMON32_GET_breg;"
127
128    if flagcondition == -1:
129        print >>f, "   COMMON32_GET_F;"
130       
131    print >>f, "   COMMON32_GET_creg;"
132
133    if ignore_a == 0:
134        print >>f, "   COMMON32_GET_areg;"
135    elif ignore_a == 1:
136        print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
137    elif ignore_a == 2:
138        print >>f, "     //COMMON32_GET_areg; // areg bits already used as opcode select"
139 
140    print >>f, "   "
141   
142    print >>f, "   UINT32 c;"
143    if breg_is_dst_only == 0:
144        print >>f, "   UINT32 b;"
145        print >>f, "   "
146        print >>f, "   if (breg == LIMM_REG)"
147        print >>f, "   {"
148        print >>f, "      GET_LIMM_32;"
149        print >>f, "      size = 8;"
150        print >>f, "      got_limm = 1;"
151        print >>f, "      b = limm;"
152        print >>f, "   }"
153        print >>f, "   else"
154        print >>f, "   {"
155        print >>f, "      b = m_regs[breg];"
156        print >>f, "   }"
157   
158    print >>f, "   "
159    print >>f, "   if (creg == LIMM_REG)"
160    print >>f, "   {"
161    print >>f, "      if (!got_limm)"
162    print >>f, "      {"
163    print >>f, "         GET_LIMM_32;"
164    print >>f, "         size = 8;"
165    print >>f, "      }"
166    print >>f, "      c = limm;"
167    print >>f, "   }"
168    print >>f, "   else"
169    print >>f, "   {"
170    print >>f, "      c = m_regs[creg];"
171    print >>f, "   }"
172    print >>f, "   /* todo: is the limm, limm syntax valid? (it's pointless.) */"
173    print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
174    print >>f, "   %s" % (opexecute)
175    print >>f, "   %s" % (opwrite)   
176    print >>f, "   "
177    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
178    print >>f, "   return m_pc + (size >> 0);"
179    print >>f, "}"
180    print >>f, ""
181    print >>f, ""
182    # the mode 0x01 handler   
183    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p01(OPS_32)" % (funcname)
184    print >>f, "{"
185    EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler)
186    print >>f, "   %s" % (opexecute)
187    print >>f, "   %s" % (opwrite)   
188    print >>f, "   "
189    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
190    print >>f, "   return m_pc + (size >> 0);"
191    print >>f, "}"
192    print >>f, ""
193    print >>f, ""
194    # the mode 0x10 handler
195    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p10(OPS_32)" % (funcname)
196    if ignore_a == 2:
197        print >>f, "{"
198        print >>f, "   int size = 4;"
199        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p10 (ares bits already used as opcode select, can't be used as s12) (%s)\\n\");"  % (funcname, opname)
200        print >>f, "   return m_pc + (size >> 0);"
201        print >>f, "}"
202    else:
203        print >>f, "{"
204        print >>f, "   int size = 4;"
205        if breg_is_dst_only == 0:
206            print >>f, "   UINT32 limm = 0;"
207       
208        print >>f, "/*   int got_limm = 0; */"
209        print >>f, "   "
210        print >>f, "   COMMON32_GET_breg;"
211   
212        if flagcondition == -1:   
213            print >>f, "   COMMON32_GET_F;"
214       
215        print >>f, "   COMMON32_GET_s12;"
216       
217        # areg can't be used here, it's used for s12 bits
218       
219        print >>f, "   "
220        print >>f, "   UINT32 c;"
221        if breg_is_dst_only == 0:
222            print >>f, "   UINT32 b;"
223            print >>f, "   "
224            print >>f, "   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */"
225            print >>f, "   if (breg == LIMM_REG)"
226            print >>f, "   {"
227            print >>f, "      GET_LIMM_32;"
228            print >>f, "      size = 8;"
229            print >>f, "/*      got_limm = 1; */"
230            print >>f, "      b = limm;"
231            print >>f, "   }"
232            print >>f, "   else"
233            print >>f, "   {"
234            print >>f, "      b = m_regs[breg];"
235            print >>f, "   }"
236       
237        print >>f, "    "
238        print >>f, "    c = (UINT32)S;"
239        print >>f, "   "
240        print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
241        print >>f, "   %s" % (opexecute)
242        print >>f, "   %s" % (opwrite_alt)   
243        print >>f, "   "
244        EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
245        print >>f, "   return m_pc + (size >> 0);"
246        print >>f, "}"
247    print >>f, ""
248    print >>f, ""
249    # the mode 0x11 m0 handler   
250    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m0(OPS_32)" % (funcname)
251    if ignore_a == 2:
252        print >>f, "{"
253        print >>f, "   int size = 4;"
254        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p11_m0 (ares bits already used as opcode select, can't be used as Q condition) (%s)\\n\");"  % (funcname, opname)
255        print >>f, "   return m_pc + (size >> 0);"
256        print >>f, "}"
257    else:
258        print >>f, "{"
259        print >>f, "   int size = 4;"
260        print >>f, "   arcompact_fatal(\"arcompact_handle%s_p11_m0 (%s)\\n\");"  % (funcname, opname)
261        print >>f, "   return m_pc + (size >> 0);"
262        print >>f, "}"
263        print >>f, ""
264        print >>f, ""   
265    # the mode 0x11 m1 handler   
266    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m1(OPS_32)" % (funcname)
267    if ignore_a == 2:
268        print >>f, "{"
269        print >>f, "   int size = 4;"
270        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p11_m1 (ares bits already used as opcode select, can't be used as Q condition) (%s)\\n\");"  % (funcname, opname)
271        print >>f, "   return m_pc + (size >> 0);"
272        print >>f, "}"
273    else:
274        print >>f, "{"
275        EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, 3, breg_is_dst_only, flagcondition, flaghandler)
276        print >>f, "   COMMON32_GET_CONDITION;"
277        print >>f, "   if (!check_condition(condition))"
278        print >>f, "      return m_pc + (size>>0);"
279        print >>f, ""     
280        print >>f, "   %s" % (opexecute)
281        print >>f, "   %s" % (opwrite_alt)   
282        print >>f, "   "
283        EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
284        print >>f, "   return m_pc + (size >> 0);"
285        print >>f, "}"
286    print >>f, ""
287    print >>f, ""
288
289
290# xxx_S  c, b, u3  format opcodes (note c is destination)
291def EmitGroup0d(f,funcname, opname, opexecute, opwrite):
292    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)"  % (funcname)
293    print >>f, "{"
294    print >>f, "   int u, breg, creg;"
295    print >>f, ""
296    print >>f, "   COMMON16_GET_u3;"
297    print >>f, "   COMMON16_GET_breg;"
298    print >>f, "   COMMON16_GET_creg;"
299    print >>f, ""
300    print >>f, "   REG_16BIT_RANGE(breg);"
301    print >>f, "   REG_16BIT_RANGE(creg);"
302    print >>f, ""
303    print >>f, "   %s" % (opexecute)
304    print >>f, "   %s" % (opwrite)
305    print >>f, ""
306    print >>f, "   return m_pc + (2 >> 0);"
307    print >>f, "}"
308    print >>f, ""
309    print >>f, ""
310
311
312# xxx_S b <- b,c format opcodes
313def EmitGroup0f(f,funcname, opname, opexecute, opwrite):
314    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)"% (funcname)
315    print >>f, "{"
316    print >>f, "   int breg, creg;"
317    print >>f, ""
318    print >>f, "   COMMON16_GET_breg;"
319    print >>f, "   COMMON16_GET_creg;"
320    print >>f, ""
321    print >>f, "   REG_16BIT_RANGE(breg);"
322    print >>f, "   REG_16BIT_RANGE(creg);"
323    print >>f, ""
324    print >>f, "   %s" % (opexecute)
325    print >>f, "   %s" % (opwrite)   
326    print >>f, ""
327    print >>f, "   return m_pc + (2 >> 0);"
328    print >>f, "}"
329    print >>f, ""
330    print >>f, ""
331
332
333#  xxx_S b, b, u5 format opcodes
334def EmitGroup17(f,funcname, opname, opexecute):
335    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)" % (funcname)
336    print >>f, "{"
337    print >>f, "   int breg, u;"
338    print >>f, "   "
339    print >>f, "   COMMON16_GET_breg;"
340    print >>f, "   COMMON16_GET_u5;"
341    print >>f, "   "
342    print >>f, "   REG_16BIT_RANGE(breg);"
343    print >>f, "   "
344    print >>f, "   %s" % (opexecute)
345    print >>f, "   "
346    print >>f, "   return m_pc + (2 >> 0);"
347    print >>f, "}"
348    print >>f, ""
349    print >>f, ""
350
351
352
353try:
354    f = open(sys.argv[1], "w")
355except Exception, err:
356    logging.error("cannot write file %s [%s]", fname, err)
357    sys.exit(1)
358
359
360EmitGroup04(f, "04_00", "ADD",  "UINT32 result = b + c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_Handle_NZCV_ADD_Flags )
361
362EmitGroup04(f, "04_02", "SUB",  "UINT32 result = b - c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
363
364EmitGroup04(f, "04_04", "AND",  "UINT32 result = b & c;",                 "if (areg != LIMM_REG) { m_regs[areg] = result; }", "if (breg != LIMM_REG) { m_regs[breg] = result; }", 0,0, -1, EmitGroup04_Handle_NZ_Flags  )
365EmitGroup04(f, "04_05", "OR",   "UINT32 result = b | c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
366EmitGroup04(f, "04_06", "BIC",  "UINT32 result = b & (~c);",              "m_regs[areg] = result;", "m_regs[breg] = result;",  0,0, -1, EmitGroup04_unsupported_Flags  )
367EmitGroup04(f, "04_07", "XOR",  "UINT32 result = b ^ c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
368
369EmitGroup04(f, "04_0a", "MOV",  "UINT32 result = c;",                     "m_regs[breg] = result;", "m_regs[breg] = result;", 1,1, -1, EmitGroup04_Handle_NZ_Flags  ) # special case, result always goes to breg
370
371EmitGroup04(f, "04_0e", "RSUB", "UINT32 result = c - b;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
372EmitGroup04(f, "04_0f", "BSET", "UINT32 result = b | (1 << (c & 0x1f));", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
373
374EmitGroup04(f, "04_13", "BMSK", "UINT32 result = b & ((1<<(c+1))-1);",    "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
375
376
377EmitGroup04(f, "04_14", "ADD1", "UINT32 result = b + (c << 1);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
378EmitGroup04(f, "04_15", "ADD2", "UINT32 result = b + (c << 2);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
379EmitGroup04(f, "04_16", "ADD3", "UINT32 result = b + (c << 3);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
380EmitGroup04(f, "04_17", "SUB1", "UINT32 result = b - (c << 1);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
381EmitGroup04(f, "04_18", "SUB2", "UINT32 result = b - (c << 2);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
382EmitGroup04(f, "04_19", "SUB3", "UINT32 result = b - (c << 3);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
383
384EmitGroup04(f, "04_2a", "LR", "m_regs[breg] = READAUX(c);", "", "", 1,1, -1, EmitGroup04_no_Flags  ) # this can't be conditional (todo)
385EmitGroup04(f, "04_2b", "SR", "WRITEAUX(c,b);", "", "", 1,0, -1, EmitGroup04_no_Flags  ) # this can't be conditional (todo)
386
387
388
389EmitGroup04(f, "05_00", "ASL", "UINT32 result = b << (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
390EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
391
392# the 04_2f subgroup uses the same encoding, but the areg is already used as sub-opcode select, so any modes relying on areg bits for other reasons (sign, condition) (modes 10, 11m0, 11m1) are illegal.  the destination is also breg not areg
393EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;",                                                                                                                             "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags  ) # no alt handler (invalid path)
394EmitGroup04(f, "04_2f_03", "ROR", "int shift = 1; UINT32 mask = (1 << (shift)) - 1; mask <<= (32-shift); UINT32 result = ((c >> shift) & ~mask) | ((c << (32-shift)) & mask);",          "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags  )
395
396
397EmitGroup04(f, "04_2f_07", "EXTB", "UINT32 result = c & 0x000000ff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
398EmitGroup04(f, "04_2f_08", "EXTW", "UINT32 result = c & 0x0000ffff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
399
400# xxx_S  c, b, u3  format opcodes (note c is destination)
401EmitGroup0d(f, "0d_00", "ADD_S", "UINT32 result = m_regs[breg] + u;",         "m_regs[creg] = result;" )
402EmitGroup0d(f, "0d_01", "SUB_S", "UINT32 result = m_regs[breg] - u;",         "m_regs[creg] = result;" )
403EmitGroup0d(f, "0d_02", "ASL_S", "UINT32 result = m_regs[breg] << u;",        "m_regs[creg] = result;" )
404
405# xxx_S b <- b,c format opcodes  (or in some cases xxx_S b,c)
406EmitGroup0f(f, "0f_02", "SUB_S", "UINT32 result = m_regs[breg] - m_regs[creg];",        "m_regs[breg] = result;" )
407EmitGroup0f(f, "0f_04", "AND_S", "UINT32 result = m_regs[breg] & m_regs[creg];",        "m_regs[breg] = result;" )
408EmitGroup0f(f, "0f_05", "OR_S",  "UINT32 result = m_regs[breg] | m_regs[creg];",        "m_regs[breg] = result;" )
409EmitGroup0f(f, "0f_07", "XOR_S", "UINT32 result = m_regs[breg] ^ m_regs[creg];",        "m_regs[breg] = result;" )
410EmitGroup0f(f, "0f_0f", "EXTB_S","UINT32 result = m_regs[creg] & 0x000000ff;",          "m_regs[breg] = result;" )
411EmitGroup0f(f, "0f_10", "EXTW_S","UINT32 result = m_regs[creg] & 0x0000ffff;",          "m_regs[breg] = result;" )
412EmitGroup0f(f, "0f_13", "NEG_S"," UINT32 result = 0 - m_regs[creg];",                   "m_regs[breg] = result;" )
413
414EmitGroup0f(f, "0f_14", "ADD1_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<1);", "m_regs[breg] = result;" )
415EmitGroup0f(f, "0f_15", "ADD2_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<2);", "m_regs[breg] = result;" )
416EmitGroup0f(f, "0f_16", "ADD3_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<3);", "m_regs[breg] = result;" )
417
418EmitGroup0f(f, "0f_19", "LSR_S", "UINT32 result = m_regs[breg] >> (m_regs[creg]&0x1f);","m_regs[breg] = result;" )
419EmitGroup0f(f, "0f_1b", "ASL1_S","UINT32 result = m_regs[creg] << 1;",                  "m_regs[breg] = result;" )
420
421
422#  xxx_S b, b, u5 format opcodes
423EmitGroup17(f, "17_00", "ASL_S",  "m_regs[breg] = m_regs[breg] << (u&0x1f);" )
424EmitGroup17(f, "17_01", "LSR_S",  "m_regs[breg] = m_regs[breg] >> (u&0x1f);" )
425EmitGroup17(f, "17_02", "ASR_S",  "INT32 temp = (INT32)m_regs[breg]; m_regs[breg] = temp >> (u&0x1f); // treat it as a signed value, so sign extension occurs during shift" )
426EmitGroup17(f, "17_03", "SUB_S",  "m_regs[breg] = m_regs[breg] - u;" )
427EmitGroup17(f, "17_04", "BSET_S", "m_regs[breg] = m_regs[breg] | (1 << (u & 0x1f));" )
428
429EmitGroup17(f, "17_06", "BMSK_S", "m_regs[breg] = m_regs[breg] | ((1 << (u + 1)) - 1);" )
430
431
432
433
trunk/src/emu/cpu/arcompact/arcompactdasm.c
r242703r242704
4141
4242      switch (instruction) // 32-bit instructions (with optional extra dword for immediate data)
4343      {
44         case 0x00: size = arcompact_handle00_dasm(DASM_PARAMS); break; // Bcc
45         case 0x01: size = arcompact_handle01_dasm(DASM_PARAMS); break; // BLcc/BRcc
46         case 0x02: size = arcompact_handle02_dasm(DASM_PARAMS); break; // LD r+o
47         case 0x03: size = arcompact_handle03_dasm(DASM_PARAMS); break; // ST r+o
48         case 0x04: size = arcompact_handle04_dasm(DASM_PARAMS); break; // op a,b,c (basecase)
49         case 0x05: size = arcompact_handle05_dasm(DASM_PARAMS); break; // op a,b,c (05 ARC ext)
50         case 0x06: size = arcompact_handle06_dasm(DASM_PARAMS); break; // op a,b,c (06 ARC ext)
51         case 0x07: size = arcompact_handle07_dasm(DASM_PARAMS); break; // op a,b,c (07 User ext)
52         case 0x08: size = arcompact_handle08_dasm(DASM_PARAMS); break; // op a,b,c (08 User ext)
53         case 0x09: size = arcompact_handle09_dasm(DASM_PARAMS); break; // op a,b,c (09 Market ext)
54         case 0x0a: size = arcompact_handle0a_dasm(DASM_PARAMS); break; // op a,b,c (0a Market ext)
55         case 0x0b: size = arcompact_handle0b_dasm(DASM_PARAMS); break; // op a,b,c (0b Market ext)
44         case 0x00: size = arcompact_handle00_dasm(DASM_PARAMS);   break; // Bcc
45         case 0x01: size = arcompact_handle01_dasm(DASM_PARAMS);   break; // BLcc/BRcc
46         case 0x02: size = arcompact_handle02_dasm(DASM_PARAMS);   break; // LD r+o
47         case 0x03: size = arcompact_handle03_dasm(DASM_PARAMS);   break; // ST r+o
48         case 0x04: size = arcompact_handle04_dasm(DASM_PARAMS);   break; // op a,b,c (basecase)
49         case 0x05: size = arcompact_handle05_dasm(DASM_PARAMS);   break; // op a,b,c (05 ARC ext)
50         case 0x06: size = arcompact_handle06_dasm(DASM_PARAMS);   break; // op a,b,c (06 ARC ext)
51         case 0x07: size = arcompact_handle07_dasm(DASM_PARAMS);   break; // op a,b,c (07 User ext)
52         case 0x08: size = arcompact_handle08_dasm(DASM_PARAMS);   break; // op a,b,c (08 User ext)
53         case 0x09: size = arcompact_handle09_dasm(DASM_PARAMS);   break; // op a,b,c (09 Market ext)
54         case 0x0a: size = arcompact_handle0a_dasm(DASM_PARAMS);   break; // op a,b,c (0a Market ext)
55         case 0x0b: size = arcompact_handle0b_dasm(DASM_PARAMS);   break; // op a,b,c (0b Market ext)
5656      }
5757   }
5858   else
59   {
59   {   
6060      size = 2;
6161      op &= ~0xf800;
6262
6363
6464      switch (instruction) // 16-bit instructions
6565      {
66         case 0x0c: size = arcompact_handle0c_dasm(DASM_PARAMS); break; // Load/Add reg-reg
67         case 0x0d: size = arcompact_handle0d_dasm(DASM_PARAMS); break; // Add/Sub/Shft imm
68         case 0x0e: size = arcompact_handle0e_dasm(DASM_PARAMS); break; // Mov/Cmp/Add
69         case 0x0f: size = arcompact_handle0f_dasm(DASM_PARAMS); break; // op_S b,b,c (single 16-bit ops)
70         case 0x10: size = arcompact_handle10_dasm(DASM_PARAMS); break; // LD_S
71         case 0x11: size = arcompact_handle11_dasm(DASM_PARAMS); break; // LDB_S
72         case 0x12: size = arcompact_handle12_dasm(DASM_PARAMS); break; // LDW_S
73         case 0x13: size = arcompact_handle13_dasm(DASM_PARAMS); break; // LSW_S.X
74         case 0x14: size = arcompact_handle14_dasm(DASM_PARAMS); break; // ST_S
75         case 0x15: size = arcompact_handle15_dasm(DASM_PARAMS); break; // STB_S
76         case 0x16: size = arcompact_handle16_dasm(DASM_PARAMS); break; // STW_S
77         case 0x17: size = arcompact_handle17_dasm(DASM_PARAMS); break; // Shift/Sub/Bit
78         case 0x18: size = arcompact_handle18_dasm(DASM_PARAMS); break; // Stack Instr
79         case 0x19: size = arcompact_handle19_dasm(DASM_PARAMS); break; // GP Instr
80         case 0x1a: size = arcompact_handle1a_dasm(DASM_PARAMS); break; // PCL Instr
81         case 0x1b: size = arcompact_handle1b_dasm(DASM_PARAMS); break; // MOV_S
82         case 0x1c: size = arcompact_handle1c_dasm(DASM_PARAMS); break; // ADD_S/CMP_S
83         case 0x1d: size = arcompact_handle1d_dasm(DASM_PARAMS); break; // BRcc_S
84         case 0x1e: size = arcompact_handle1e_dasm(DASM_PARAMS); break; // Bcc_S
85         case 0x1f: size = arcompact_handle1f_dasm(DASM_PARAMS); break; // BL_S
66         case 0x0c: size = arcompact_handle0c_dasm(DASM_PARAMS);   break; // Load/Add reg-reg
67         case 0x0d: size = arcompact_handle0d_dasm(DASM_PARAMS);   break; // Add/Sub/Shft imm
68         case 0x0e: size = arcompact_handle0e_dasm(DASM_PARAMS);   break; // Mov/Cmp/Add
69         case 0x0f: size = arcompact_handle0f_dasm(DASM_PARAMS);   break; // op_S b,b,c (single 16-bit ops)
70         case 0x10: size = arcompact_handle10_dasm(DASM_PARAMS);   break; // LD_S
71         case 0x11: size = arcompact_handle11_dasm(DASM_PARAMS);   break; // LDB_S
72         case 0x12: size = arcompact_handle12_dasm(DASM_PARAMS);   break; // LDW_S
73         case 0x13: size = arcompact_handle13_dasm(DASM_PARAMS);   break; // LSW_S.X
74         case 0x14: size = arcompact_handle14_dasm(DASM_PARAMS);   break; // ST_S
75         case 0x15: size = arcompact_handle15_dasm(DASM_PARAMS);   break; // STB_S
76         case 0x16: size = arcompact_handle16_dasm(DASM_PARAMS);   break; // STW_S
77         case 0x17: size = arcompact_handle17_dasm(DASM_PARAMS);   break; // Shift/Sub/Bit
78         case 0x18: size = arcompact_handle18_dasm(DASM_PARAMS);   break; // Stack Instr
79         case 0x19: size = arcompact_handle19_dasm(DASM_PARAMS);   break; // GP Instr
80         case 0x1a: size = arcompact_handle1a_dasm(DASM_PARAMS);   break; // PCL Instr
81         case 0x1b: size = arcompact_handle1b_dasm(DASM_PARAMS);   break; // MOV_S
82         case 0x1c: size = arcompact_handle1c_dasm(DASM_PARAMS);   break; // ADD_S/CMP_S
83         case 0x1d: size = arcompact_handle1d_dasm(DASM_PARAMS);   break; // BRcc_S
84         case 0x1e: size = arcompact_handle1e_dasm(DASM_PARAMS);   break; // Bcc_S
85         case 0x1f: size = arcompact_handle1f_dasm(DASM_PARAMS);   break; // BL_S
8686      }
8787   }
8888
trunk/src/emu/cpu/arcompact/arcompactdasm_dispatch.c
r242703r242704
141141   // 00100 bbb 00 iiiiii F BBB CCCCCC A AAAAA   General Operations *UN*Conditional Register to Register
142142   // 00100 bbb 01 iiiiii F BBB UUUUUU A AAAAA   General Operations *UN*Conditional Register (Unsigned 6-bit IMM)
143143   // 00100 bbb 10 iiiiii F BBB ssssss S SSSSS   General Operations *UN*Conditional Register (Signed 12-bit IMM)
144
145   // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ   General Operations Conditional Register
146   // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ   General Operations Conditional Register (Unsigned 6-bit IMM)
144   
145   // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ   General Operations Conditional Register
146   // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ   General Operations Conditional Register (Unsigned 6-bit IMM)
147147   UINT8 subinstr = (op & 0x003f0000) >> 16;
148148   op &= ~0x003f0000;
149149
r242703r242704
304304
305305   switch (subinstr2)
306306   {
307      case 0x00: size = arcompact_handle05_2f_00_dasm(DASM_PARAMS); break; // SWAP
308      case 0x01: size = arcompact_handle05_2f_01_dasm(DASM_PARAMS); break; // NORM
307      case 0x00: size = arcompact_handle05_2f_00_dasm(DASM_PARAMS); break; // SWAP
308      case 0x01: size = arcompact_handle05_2f_01_dasm(DASM_PARAMS); break; // NORM
309309      case 0x02: size = arcompact_handle05_2f_02_dasm(DASM_PARAMS); break; // SAT16
310      case 0x03: size = arcompact_handle05_2f_03_dasm(DASM_PARAMS); break; // RND16
311      case 0x04: size = arcompact_handle05_2f_04_dasm(DASM_PARAMS); break; // ABSSW
312      case 0x05: size = arcompact_handle05_2f_05_dasm(DASM_PARAMS); break; // ABSS
313      case 0x06: size = arcompact_handle05_2f_06_dasm(DASM_PARAMS); break; // NEGSW
314      case 0x07: size = arcompact_handle05_2f_07_dasm(DASM_PARAMS); break; // NEGS
315      case 0x08: size = arcompact_handle05_2f_08_dasm(DASM_PARAMS); break; // NORMW
310      case 0x03: size = arcompact_handle05_2f_03_dasm(DASM_PARAMS); break; // RND16
311      case 0x04: size = arcompact_handle05_2f_04_dasm(DASM_PARAMS); break; // ABSSW
312      case 0x05: size = arcompact_handle05_2f_05_dasm(DASM_PARAMS); break; // ABSS
313      case 0x06: size = arcompact_handle05_2f_06_dasm(DASM_PARAMS); break; // NEGSW
314      case 0x07: size = arcompact_handle05_2f_07_dasm(DASM_PARAMS); break; // NEGS
315      case 0x08: size = arcompact_handle05_2f_08_dasm(DASM_PARAMS); break; // NORMW
316316      case 0x09: size = arcompact_handle05_2f_09_dasm(DASM_PARAMS); break; // illegal
317317      case 0x0a: size = arcompact_handle05_2f_0a_dasm(DASM_PARAMS); break; // illegal
318318      case 0x0b: size = arcompact_handle05_2f_0b_dasm(DASM_PARAMS); break; // illegal
r242703r242704
759759
760760   switch (subinstr)
761761   {
762      case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S
763      case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S
762      case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S
763      case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S
764764      case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S
765      case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S
766      case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S
767      case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S
768      case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S
765      case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S
766      case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S
767      case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S
768      case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S
769769      case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S
770770   }
771771
r242703r242704
795795   return size;
796796}
797797
798int arcompact_handle18_05_dasm(DASM_OPS_16)
798int arcompact_handle18_05_dasm(DASM_OPS_16)
799799{
800800   int size = 2;
801801   UINT8 subinstr2 = (op & 0x0700) >> 8;
r242703r242704
805805   {
806806      case 0x00: size = arcompact_handle18_05_00_dasm(DASM_PARAMS); break; // ADD_S (SP)
807807      case 0x01: size = arcompact_handle18_05_01_dasm(DASM_PARAMS); break; // SUB_S (SP)
808      case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02>
808      case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02>
809809      case 0x03: size = arcompact_handle18_05_03_dasm(DASM_PARAMS); break; // <illegal 0x18_05_03>
810810      case 0x04: size = arcompact_handle18_05_04_dasm(DASM_PARAMS); break; // <illegal 0x18_05_04>
811811      case 0x05: size = arcompact_handle18_05_05_dasm(DASM_PARAMS); break; // <illegal 0x18_05_05>
r242703r242704
816816   return size;
817817}
818818
819int arcompact_handle18_06_dasm(DASM_OPS_16)
819int arcompact_handle18_06_dasm(DASM_OPS_16)
820820{
821821   int size = 2;
822822   UINT8 subinstr2 = (op & 0x001f) >> 0;
r242703r242704
861861   return size;
862862}
863863
864int arcompact_handle18_07_dasm(DASM_OPS_16)
864int arcompact_handle18_07_dasm(DASM_OPS_16)
865865{
866866   int size = 2;
867867   UINT8 subinstr2 = (op & 0x001f) >> 0;
r242703r242704
968968
969969int arcompact_handle1e_03_dasm(DASM_OPS_16)
970970{
971   
971972   int size = 2;
972973   UINT8 subinstr2 = (op & 0x01c0) >> 6;
973974   op &= ~0x01c0;
r242703r242704
975976   switch (subinstr2)
976977   {
977978      case 0x00: size = arcompact_handle1e_03_00_dasm(DASM_PARAMS); break; // BGT_S
978      case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S
979      case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S
979980      case 0x02: size = arcompact_handle1e_03_02_dasm(DASM_PARAMS); break; // BLT_S
980981      case 0x03: size = arcompact_handle1e_03_03_dasm(DASM_PARAMS); break; // BLE_S
981982      case 0x04: size = arcompact_handle1e_03_04_dasm(DASM_PARAMS); break; // BHI_S
982983      case 0x05: size = arcompact_handle1e_03_05_dasm(DASM_PARAMS); break; // BHS_S
983984      case 0x06: size = arcompact_handle1e_03_06_dasm(DASM_PARAMS); break; // BLO_S
984      case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S
985      case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S
985986   }
986987   return size;
987988
trunk/src/emu/cpu/arcompact/arcompactdasm_dispatch.h
r242703r242704
1212
1313#define GET_LIMM_32 \
1414   limm = oprom[6] | (oprom[7] << 8); \
15   limm |= (oprom[4] << 16) | (oprom[5] << 24);
15   limm |= (oprom[4] << 16) | (oprom[5] << 24); \
1616
1717
18
1819int arcompact_handle00_dasm(DASM_OPS_32);
1920int arcompact_handle01_dasm(DASM_OPS_32);
2021int arcompact_handle01_00_dasm(DASM_OPS_32);
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242703r242704
3131
3232#define GROUP_0e_GET_h \
3333   h =  ((op & 0x0007) << 3); \
34   h |= ((op & 0x00e0) >> 5); \
35   op &= ~0x00e7;
34    h |= ((op & 0x00e0) >> 5); \
35   op &= ~0x00e7; \
36
3637#define COMMON32_GET_breg \
3738   int b_temp = (op & 0x07000000) >> 24; op &= ~0x07000000; \
3839   int B_temp = (op & 0x00007000) >> 12; op &= ~0x00007000; \
39   int breg = b_temp | (B_temp << 3);
40   int breg = b_temp | (B_temp << 3); \
41
4042#define COMMON32_GET_creg \
41   int creg = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
43   int creg = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
44
4245#define COMMON32_GET_u6 \
43   int u = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
46   int u = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
47
4448#define COMMON32_GET_areg \
45   int areg = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
49   int areg = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
50
4651#define COMMON32_GET_areg_reserved \
47   int ares = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
52   int ares = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
53
4854#define COMMON32_GET_F \
49   int F = (op & 0x00008000) >> 15; op &= ~0x00008000;
55   int F = (op & 0x00008000) >> 15; op &= ~0x00008000; \
56
5057#define COMMON32_GET_p \
51   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
58   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000; \
5259
60
5361#define COMMON32_GET_s12 \
5462      int S_temp = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
5563      int s_temp = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
56      int S = s_temp | (S_temp<<6);
64      int S = s_temp | (S_temp<<6); \
65
5766#define COMMON32_GET_CONDITION \
5867      UINT8 condition = op & 0x0000001f;  op &= ~0x0000001f;
5968
6069
6170#define COMMON16_GET_breg \
6271   breg =  ((op & 0x0700) >>8); \
63   op &= ~0x0700;
72   op &= ~0x0700; \
73
6474#define COMMON16_GET_creg \
6575   creg =  ((op & 0x00e0) >>5); \
66   op &= ~0x00e0;
76   op &= ~0x00e0; \
77
6778#define COMMON16_GET_areg \
6879   areg =  ((op & 0x0007) >>0); \
69   op &= ~0x0007;
80   op &= ~0x0007; \
81
7082#define COMMON16_GET_u3 \
7183   u =  ((op & 0x0007) >>0); \
72   op &= ~0x0007;
84   op &= ~0x0007; \
85
7386#define COMMON16_GET_u5 \
7487   u =  ((op & 0x001f) >>0); \
75   op &= ~0x001f;
88   op &= ~0x001f; \
89
7690#define COMMON16_GET_u8 \
7791   u =  ((op & 0x00ff) >>0); \
78   op &= ~0x00ff;
92   op &= ~0x00ff; \
93
7994#define COMMON16_GET_u7 \
8095   u =  ((op & 0x007f) >>0); \
81   op &= ~0x007f;
96   op &= ~0x007f; \
97
8298#define COMMON16_GET_s9 \
8399   s =  ((op & 0x01ff) >>0); \
84   op &= ~0x01ff;
100   op &= ~0x01ff; \
101
85102// registers used in 16-bit opcodes hae a limited range
86103// and can only address registers r0-r3 and r12-r15
87104
88105#define REG_16BIT_RANGE(_reg_) \
89   if (_reg_>3) _reg_+= 8;
106   if (_reg_>3) _reg_+= 8; \
90107
108
91109// this is as messed up as the rest of the 16-bit alignment in LE mode...
92110
93111#define GET_LIMM \
94112   limm = oprom[4] | (oprom[5] << 8); \
95   limm |= (oprom[2] << 16) | (oprom[3] << 24);
113   limm |= (oprom[2] << 16) | (oprom[3] << 24); \
114
96115#define PC_ALIGNED32 \
97116   (pc&0xfffffffc)
98117
r242703r242704
110129   // 0000 0sss ssss sss0 SSSS SSSS SSNQ QQQQ
111130   INT32 address = (op & 0x07fe0000) >> 17;
112131   address |= ((op & 0x0000ffc0) >> 6) << 10;
113   if (address & 0x80000) address = -0x80000 + (address & 0x7ffff);
132   if (address & 0x800000) address = -0x800000 + (address & 0x7fffff);
114133   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
115134   COMMON32_GET_CONDITION
116135
r242703r242704
144163   // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ
145164   INT32 address =   (op & 0x07fc0000) >> 17;
146165   address |=        ((op & 0x0000ffc0) >> 6) << 10;
147   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);
166   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);   
148167   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
149168
150169   COMMON32_GET_CONDITION
r242703r242704
161180   INT32 address =   (op & 0x07fc0000) >> 17;
162181   address |=        ((op & 0x0000ffc0) >> 6) << 10;
163182   address |=        ((op & 0x0000000f) >> 0) << 20;
164   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);
183   if (address & 0x800000) address = -0x800000 + (address&0x7fffff);   
165184   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
166185   int res =  (op & 0x00000010) >> 4; op &= ~0x00000010;
167186
r242703r242704
246265   op &= ~0x07007fe0;
247266
248267   print("%s%s %s, 0x%02x %08x (%08x)", optext, delaybit[n], regnames[breg], u, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
249
268   
250269   return size;
251270}
252271
r242703r242704
308327{
309328   int size = 4;
310329   UINT32 limm = 0;
311   int got_limm = 0;
330   int got_limm = 0;
312331   // bitpos
313332   // 1111 1111 1111 1111 0000 0000 0000 0000
314333   // fedc ba98 7654 3210 fedc ba98 7654 3210
r242703r242704
382401
383402   output += sprintf(output, "%s", optext);
384403   output += sprintf(output, "%s", flagbit[F]);
385   //  output  += sprintf( output, " p(%d)", p);
404   //   output  += sprintf( output, " p(%d)", p);
386405
387406
388407   if ((!b_reserved) && (breg == LIMM_REG))
r242703r242704
410429   }
411430   else if (ignore_dst == 1) // certain opcode types ignore the 'a' field entirely, it should be set to 0.
412431   {
413         if (areg) output += sprintf(output, " <reserved %d> <-", areg);
432      if (areg) output += sprintf(output, " <reserved %d> <-", areg);
414433   }
415434   else if (ignore_dst == 2) // for multiply operations areg should always be set to LIMM
416435   {
r242703r242704
445464   // 0010 0bbb 01ii iiii FBBB uuuu uuAA AAAA
446465   int size = 4;
447466   UINT32 limm = 0;
448//  int got_limm = 0;
467//   int got_limm = 0;
449468
450469   COMMON32_GET_breg;
451470   COMMON32_GET_F;
r242703r242704
454473
455474   output += sprintf(output, "%s", optext);
456475   output += sprintf(output, "%s", flagbit[F]);
457   //  output  += sprintf( output, " p(%d)", p);
476   //   output  += sprintf( output, " p(%d)", p);
458477
459478
460479   if ((!b_reserved) && (breg == LIMM_REG))
461480   {
462481      GET_LIMM_32;
463482      size = 8;
464//      got_limm = 1;
483//      got_limm = 1;
465484   }
466485
467486   // areg can be LIMM too, but in that case LIMM indicates 'no destination' rather than an actual LIMM value following
r242703r242704
473492   }
474493   else if (ignore_dst == 1) // certain opcode types ignore the 'a' field entirely, it should be set to 0.
475494   {
476         if (areg) output += sprintf(output, " <reserved %d> <-", areg);
495      if (areg) output += sprintf(output, " <reserved %d> <-", areg);
477496   }
478497   else if (ignore_dst == 2) // for multiply operations areg should always be set to LIMM
479498   {
r242703r242704
511530
512531   output += sprintf(output, "%s", optext);
513532   output += sprintf(output, "%s", flagbit[F]);
514   //  output  += sprintf( output, " p(%d)", p);
533   //   output  += sprintf( output, " p(%d)", p);
515534
516535
517536   if (!b_reserved)
r242703r242704
551570
552571   output += sprintf(output, "%s", optext);
553572   output += sprintf(output, "%s", flagbit[F]);
554   //  output  += sprintf( output, " p(%d)", p);
573   //   output  += sprintf( output, " p(%d)", p);
555574
556575   if (!b_reserved)
557576   {
r242703r242704
575594
576595
577596   output += sprintf(output, " Cond<%s> ", conditions[condition]);
597   
578598
579
580599   if (creg == LIMM_REG)
581600   {
582601      if (!got_limm)
r242703r242704
607626
608627   output += sprintf(output, "%s", optext);
609628   output += sprintf(output, "%s", flagbit[F]);
610   //  output  += sprintf( output, " p(%d)", p);
629   //   output  += sprintf( output, " p(%d)", p);
611630
612631   if (!b_reserved)
613632   {
r242703r242704
666685   return 0;
667686}
668687
669int arcompact_handle04_00_dasm(DASM_OPS_32)
688int arcompact_handle04_00_dasm(DASM_OPS_32) 
670689{
671690   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADD", 0,0);
672691}
673692
674int arcompact_handle04_01_dasm(DASM_OPS_32)
675{
693int arcompact_handle04_01_dasm(DASM_OPS_32) 
694{
676695   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADC", 0,0);
677696}
678697
679int arcompact_handle04_02_dasm(DASM_OPS_32)
680{
698int arcompact_handle04_02_dasm(DASM_OPS_32) 
699{
681700   return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUB", 0,0);
682701}
683702
684int arcompact_handle04_03_dasm(DASM_OPS_32)
703int arcompact_handle04_03_dasm(DASM_OPS_32) 
685704{
686705   return arcompact_handle04_helper_dasm(DASM_PARAMS, "SBC", 0,0);
687706}
688707
689int arcompact_handle04_04_dasm(DASM_OPS_32)
708int arcompact_handle04_04_dasm(DASM_OPS_32) 
690709{
691710   return arcompact_handle04_helper_dasm(DASM_PARAMS, "AND", 0,0);
692711}
693712
694int arcompact_handle04_05_dasm(DASM_OPS_32)
713int arcompact_handle04_05_dasm(DASM_OPS_32) 
695714{
696715   return arcompact_handle04_helper_dasm(DASM_PARAMS, "OR", 0,0);
697716}
698717
699int arcompact_handle04_06_dasm(DASM_OPS_32)
718int arcompact_handle04_06_dasm(DASM_OPS_32) 
700719{
701720   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BIC", 0,0);
702721}
703722
704int arcompact_handle04_07_dasm(DASM_OPS_32)
723int arcompact_handle04_07_dasm(DASM_OPS_32) 
705724{
706725   return arcompact_handle04_helper_dasm(DASM_PARAMS, "XOR", 0,0);
707726}
708727
709int arcompact_handle04_08_dasm(DASM_OPS_32)
728int arcompact_handle04_08_dasm(DASM_OPS_32) 
710729{
711730   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MAX", 0,0);
712731}
713732
714int arcompact_handle04_09_dasm(DASM_OPS_32)
733int arcompact_handle04_09_dasm(DASM_OPS_32)
715734{
716735   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MIN", 0,0);
717736}
r242703r242704
733752}
734753
735754int arcompact_handle04_0d_dasm(DASM_OPS_32)
736{
755{
737756   return arcompact_handle04_helper_dasm(DASM_PARAMS, "RCMP", 1,0);
738757}
739758
740759int arcompact_handle04_0e_dasm(DASM_OPS_32)
741{
760{
742761   return arcompact_handle04_helper_dasm(DASM_PARAMS, "RSUB", 0,0);
743762}
744763
745int arcompact_handle04_0f_dasm(DASM_OPS_32)
746{
764int arcompact_handle04_0f_dasm(DASM_OPS_32) 
765{
747766   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BSET", 0,0);
748767}
749768
750int arcompact_handle04_10_dasm(DASM_OPS_32)
751{
769int arcompact_handle04_10_dasm(DASM_OPS_32) 
770{
752771   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BCLR", 0,0);
753772}
754773
755int arcompact_handle04_11_dasm(DASM_OPS_32)
756{
774int arcompact_handle04_11_dasm(DASM_OPS_32) 
775{
757776   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BTST", 0,0);
758777}
759778
760int arcompact_handle04_12_dasm(DASM_OPS_32)
761{
779int arcompact_handle04_12_dasm(DASM_OPS_32) 
780{
762781   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BXOR", 0,0);
763782}
764783
765int arcompact_handle04_13_dasm(DASM_OPS_32)
766{
784int arcompact_handle04_13_dasm(DASM_OPS_32) 
785{
767786   return arcompact_handle04_helper_dasm(DASM_PARAMS, "BMSK", 0,0);
768787}
769788
770int arcompact_handle04_14_dasm(DASM_OPS_32)
771{
789int arcompact_handle04_14_dasm(DASM_OPS_32) 
790{
772791   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADD1", 0,0);
773792}
774793
775int arcompact_handle04_15_dasm(DASM_OPS_32)
776{
794int arcompact_handle04_15_dasm(DASM_OPS_32) 
795{
777796   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADD2", 0,0);
778797}
779798
780int arcompact_handle04_16_dasm(DASM_OPS_32)
781{
799int arcompact_handle04_16_dasm(DASM_OPS_32) 
800{
782801   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADD3", 0,0);
783802}
784803
785int arcompact_handle04_17_dasm(DASM_OPS_32)
786{
804int arcompact_handle04_17_dasm(DASM_OPS_32) 
805{
787806   return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUB1", 0,0);
788807}
789808
790int arcompact_handle04_18_dasm(DASM_OPS_32)
791{
809int arcompact_handle04_18_dasm(DASM_OPS_32) 
810{
792811   return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUB2", 0,0);
793812}
794813
795int arcompact_handle04_19_dasm(DASM_OPS_32)
796{
814int arcompact_handle04_19_dasm(DASM_OPS_32) 
815{
797816   return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUB3", 0,0);
798817}
799818
800int arcompact_handle04_1a_dasm(DASM_OPS_32)
801{
819int arcompact_handle04_1a_dasm(DASM_OPS_32) 
820{
802821   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MPY", 0,0);
803822} // *
804823
805int arcompact_handle04_1b_dasm(DASM_OPS_32)
806{
824int arcompact_handle04_1b_dasm(DASM_OPS_32) 
825{
807826   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MPYH", 0,0);
808827} // *
809828
810int arcompact_handle04_1c_dasm(DASM_OPS_32)
811{
829int arcompact_handle04_1c_dasm(DASM_OPS_32) 
830{
812831   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MPYHU", 0,0);
813832} // *
814833
815int arcompact_handle04_1d_dasm(DASM_OPS_32)
816{
834int arcompact_handle04_1d_dasm(DASM_OPS_32) 
835{
817836   return arcompact_handle04_helper_dasm(DASM_PARAMS, "MPYU", 0,0);
818837} // *
819838
r242703r242704
868887   { // 0010 0RRR 1110 1000 0RRR uuuu uu1Q QQQQ
869888      COMMON32_GET_u6
870889      COMMON32_GET_CONDITION
871      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, PC_ALIGNED32 + u*2);
890      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, pc + u*2);
872891
873892      int unused = (op & 0x00000020)>>5;
874      if (unused==0) output += sprintf(output, "(unused bit not set)");
893      if (unused==0)    output += sprintf(output, "(unused bit not set)");
875894
876895   }
877896
r242703r242704
889908            output  += sprintf( output, "[%03x]", auxreg); \
890909      } \
891910      else \
892         output  += sprintf( output, "[%03x]", auxreg);
911         output  += sprintf( output, "[%03x]", auxreg); \
912
893913int arcompact_handle04_2a_dasm(DASM_OPS_32)  // Load FROM Auxiliary register TO register
894914{
915
895916   //           pp        F
896917   // 0010 0bbb 0010 1010 0BBB CCCC CCRR RRRR
897918   // 0010 0bbb 0010 1010 0BBB 1111 10RR RRRR
r242703r242704
909930
910931   output  += sprintf( output, "LR");
911932   if (F) output  += sprintf( output, ".<F set, illegal>");
912//  output  += sprintf( output, " p(%d)", p);
933//   output  += sprintf( output, " p(%d)", p);
934   
935   
913936
914
915
916937   if (breg == LIMM_REG)
917938   {
918939      output  += sprintf( output, "<no dest>" ); // illegal encoding?
r242703r242704
926947
927948   if (p == 0)
928949   {
950
929951      COMMON32_GET_creg
930952      COMMON32_GET_areg_reserved
931953
r242703r242704
938960         }
939961
940962         output  += sprintf( output, "(%08x) ", limm );
941
963   
942964      }
943965      else
944966      {
r242703r242704
954976
955977      int auxreg = u;
956978      PRINT_AUX_REGNAME
957
979     
958980      if (ares) output  += sprintf( output, "reserved(%02x) ", ares );
959981   }
960982   else if (p == 2)
r242703r242704
974996}
975997
976998int arcompact_handle04_2b_dasm(DASM_OPS_32)  // Store TO Auxiliary register FROM register
977{
999{   
9781000   // code at ~ 40073DFE in leapster bios is manually setting up a loop this way
9791001   // rather than using the lPcc opcode
9801002
r242703r242704
9881010
9891011   output  += sprintf( output, "SR");
9901012   if (F) output  += sprintf( output, ".<F set, illegal>");
991//  output  += sprintf( output, " p(%d)", p);
1013//   output  += sprintf( output, " p(%d)", p);
1014   
1015   
9921016
993
994
9951017   if (breg == LIMM_REG)
9961018   {
9971019      GET_LIMM_32;
r242703r242704
10091031
10101032   if (p == 0)
10111033   {
1034
10121035      COMMON32_GET_creg
10131036      COMMON32_GET_areg_reserved
10141037
r242703r242704
10721095
10731096int arcompact_handle04_2f_helper_dasm(DASM_OPS_32, const char* optext)
10741097{
1075   //
1098   //           
10761099   // 0010 0bbb pp10 1111 FBBB CCCC CCII IIII
10771100   int size = 4;
10781101
r242703r242704
10821105
10831106   output  += sprintf( output, "%s", optext);
10841107   output  += sprintf( output, "%s", flagbit[F]);
1085//  output  += sprintf( output, " p(%d)", p);
1086
1108//   output  += sprintf( output, " p(%d)", p);
1109   
10871110   if (breg == LIMM_REG)
10881111   {
10891112      output += sprintf(output, " <no dst>, ");
r242703r242704
11021125      {
11031126         UINT32 limm;
11041127         GET_LIMM_32;
1105         size = 8;
1128         size = 8;   
11061129         output  += sprintf( output, "(%08x) ", limm );
11071130
11081131      }
r242703r242704
12091232   else
12101233   {
12111234      output  += sprintf( output, "%s]", regnames[creg]);
1212   }
1235   }   
12131236
12141237
12151238   return size;
1239   
12161240
12171241
1218
12191242}
12201243
12211244int arcompact_handle04_30_dasm(DASM_OPS_32)  { return arcompact_handle04_3x_helper_dasm(DASM_PARAMS,0,0); }
r242703r242704
12561279
12571280int arcompact_handle05_2f_0x_helper_dasm(DASM_OPS_32, const char* optext)
12581281{
1259   //
1282   //           
12601283   // 0010 1bbb pp10 1111 FBBB CCCC CCII IIII when pp == 0x00
12611284   // or
12621285   // 0010 1bbb pp10 1111 FBBB UUUU UUII IIII when pp == 0x01
r242703r242704
12701293
12711294   output  += sprintf( output, "%s", optext);
12721295   output  += sprintf( output, "%s", flagbit[F]);
1273//  output  += sprintf( output, " p(%d)", p);
1274
1275
1296//   output  += sprintf( output, " p(%d)", p);
1297   
1298   
12761299   output += sprintf(output, " %s, ", regnames[breg]);
12771300
12781301   if (p == 0)
r242703r242704
12831306      {
12841307         UINT32 limm;
12851308         GET_LIMM_32;
1286         size = 8;
1309         size = 8;   
12871310         output  += sprintf( output, "(%08x) ", limm );
12881311
12891312      }
r242703r242704
14461469   GROUP_0e_GET_h;
14471470   COMMON16_GET_breg;
14481471   REG_16BIT_RANGE(breg);
1449
1472   
14501473   if (h == LIMM_REG)
14511474   {
14521475      UINT32 limm;
r242703r242704
14941517
14951518   COMMON16_GET_breg;
14961519   REG_16BIT_RANGE(breg);
1497
1520   
14981521   print("%s %s", optext, regnames[breg]);
14991522
15001523   return 2;
r242703r242704
17011724}
17021725
17031726
1704// op bits remaining for 0x18_xx subgroups 0x071f
1727// op bits remaining for 0x18_xx subgroups 0x071f
17051728
17061729int arcompact_handle18_0x_helper_dasm(DASM_OPS_16, const char* optext, int st, int format)
17071730{
r242703r242704
17231746   return 2;
17241747}
17251748
1726int arcompact_handle18_00_dasm(DASM_OPS_16)
1749int arcompact_handle18_00_dasm(DASM_OPS_16)
17271750{
17281751   return arcompact_handle18_0x_helper_dasm(DASM_PARAMS, "LD_S", 0,0);
17291752}
17301753
1731int arcompact_handle18_01_dasm(DASM_OPS_16)
1754int arcompact_handle18_01_dasm(DASM_OPS_16)
17321755{
17331756   return arcompact_handle18_0x_helper_dasm(DASM_PARAMS, "LDB_S", 0,0);
17341757}
17351758
1736int arcompact_handle18_02_dasm(DASM_OPS_16)
1759int arcompact_handle18_02_dasm(DASM_OPS_16)
17371760{
17381761   return arcompact_handle18_0x_helper_dasm(DASM_PARAMS, "ST_S", 1,0);
17391762}
17401763
1741int arcompact_handle18_03_dasm(DASM_OPS_16)
1764int arcompact_handle18_03_dasm(DASM_OPS_16)
17421765{
17431766   return arcompact_handle18_0x_helper_dasm(DASM_PARAMS, "STB_S", 1,0);
17441767}
17451768
1746int arcompact_handle18_04_dasm(DASM_OPS_16)
1769int arcompact_handle18_04_dasm(DASM_OPS_16)
17471770{
17481771   return arcompact_handle18_0x_helper_dasm(DASM_PARAMS, "ADD_S", 1,1); // check format
17491772}
r242703r242704
17681791   return 2;
17691792}
17701793
1771// op bits remaining for 0x18_06_xx subgroups 0x0700
1772int arcompact_handle18_06_01_dasm(DASM_OPS_16)
1794// op bits remaining for 0x18_06_xx subgroups 0x0700
1795int arcompact_handle18_06_01_dasm(DASM_OPS_16)
17731796{
17741797   int breg;
17751798   COMMON16_GET_breg
r242703r242704
17801803   return 2;
17811804}
17821805
1783int arcompact_handle18_06_11_dasm(DASM_OPS_16)
1806int arcompact_handle18_06_11_dasm(DASM_OPS_16)
17841807{
17851808   int res = (op & 0x0700) >> 8;
17861809   op &= ~0x0700; // all bits now used
r242703r242704
17931816   return 2;
17941817}
17951818
1796// op bits remaining for 0x18_07_xx subgroups 0x0700
1797int arcompact_handle18_07_01_dasm(DASM_OPS_16)
1819// op bits remaining for 0x18_07_xx subgroups 0x0700
1820int arcompact_handle18_07_01_dasm(DASM_OPS_16)
17981821{
17991822   int breg;
18001823   COMMON16_GET_breg
r242703r242704
18061829}
18071830
18081831
1809int arcompact_handle18_07_11_dasm(DASM_OPS_16)
1832int arcompact_handle18_07_11_dasm(DASM_OPS_16)
18101833{
18111834   int res = (op & 0x0700) >> 8;
18121835   op &= ~0x0700; // all bits now used
r242703r242704
18981921   COMMON16_GET_breg;
18991922   REG_16BIT_RANGE(breg);
19001923
1901   int s = (op & 0x007f) >> 0; op &= ~0x007f;
1924   int s = (op & 0x007f) >> 0;   op &= ~0x007f;
19021925   if (s & 0x40) s = -0x40 + (s & 0x3f);
19031926
19041927   print("%s %s, 0 to 0x%08x", optext, regnames[breg], PC_ALIGNED32 + s*2);
r242703r242704
19121935
19131936int arcompact_handle1e_0x_helper_dasm(DASM_OPS_16, const char* optext)
19141937{
1915   int s = (op & 0x01ff) >> 0; op &= ~0x01ff;
1938   int s = (op & 0x01ff) >> 0;   op &= ~0x01ff;
19161939   if (s & 0x100) s = -0x100 + (s & 0xff);
19171940
19181941   print("%s %08x", optext, PC_ALIGNED32 + s*2);
r242703r242704
19271950
19281951int arcompact_handle1e_03_0x_helper_dasm(DASM_OPS_16, const char* optext)
19291952{
1930   int s = (op & 0x003f) >> 0; op &= ~0x003f;
1953   int s = (op & 0x003f) >> 0;   op &= ~0x003f;
19311954   if (s & 0x020) s = -0x20 + (s & 0x1f);
19321955
19331956   print("%s %08x", optext, PC_ALIGNED32 + s*2);
r242703r242704
19451968
19461969int arcompact_handle1f_dasm(DASM_OPS_16)
19471970{
1948   int s = (op & 0x07ff) >> 0; op &= ~0x07ff;
1971   int s = (op & 0x07ff) >> 0;   op &= ~0x07ff;
19491972   if (s & 0x400) s = -0x400 + (s & 0x3ff);
19501973
19511974   print("BL_S %08x", PC_ALIGNED32 + (s*4));
r242703r242704
23662389int arcompact_handle18_07_1d_dasm(DASM_OPS_16)  { print("<illegal 0x18_07_1d> (%04x)",  op); return 2;}
23672390int arcompact_handle18_07_1e_dasm(DASM_OPS_16)  { print("<illegal 0x18_07_1e> (%04x)",  op); return 2;}
23682391int arcompact_handle18_07_1f_dasm(DASM_OPS_16)  { print("<illegal 0x18_07_1f> (%04x)",  op); return 2;}
2392
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.h
r242703r242704
1515
1616#define GET_LIMM_32 \
1717   limm = oprom[6] | (oprom[7] << 8); \
18   limm |= (oprom[4] << 16) | (oprom[5] << 24);
18   limm |= (oprom[4] << 16) | (oprom[5] << 24); \
1919
20
2021int arcompact_handle00_00_dasm(DASM_OPS_32);
2122int arcompact_handle00_01_dasm(DASM_OPS_32);
2223int arcompact_handle01_00_00dasm(DASM_OPS_32);
r242703r242704
366367int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32);
367368int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32);
368369int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32);
369int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32);
370int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32);
370371int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32);
371372
372373int arcompact_handle05_2f_00_dasm(DASM_OPS_32);
r242703r242704
631632int arcompact_handle18_07_16_dasm(DASM_OPS_16);
632633int arcompact_handle18_07_17_dasm(DASM_OPS_16);
633634int arcompact_handle18_07_18_dasm(DASM_OPS_16);
634int arcompact_handle18_07_19_dasm(DASM_OPS_16);
635int arcompact_handle18_07_19_dasm(DASM_OPS_16);
635636int arcompact_handle18_07_1a_dasm(DASM_OPS_16);
636637int arcompact_handle18_07_1b_dasm(DASM_OPS_16);
637638int arcompact_handle18_07_1c_dasm(DASM_OPS_16);
trunk/src/emu/cpu/cpu.mak
r242703r242704
106106
107107$(CPUOBJ)/arcompact/arcompact.o:  $(CPUSRC)/arcompact/arcompact.c \
108108         $(CPUSRC)/arcompact/arcompact.h \
109         $(CPUSRC)/arcompact/arcompact_common.h \
110         $(CPUOBJ)/arcompact/arcompact.inc
109         $(CPUSRC)/arcompact/arcompact_common.h
111110
112111$(CPUOBJ)/arcompact/arcompact_execute.o:  $(CPUSRC)/arcompact/arcompact_execute.c \
113112         $(CPUSRC)/arcompact/arcompact.h \
114         $(CPUSRC)/arcompact/arcompact_common.h \
115         $(CPUOBJ)/arcompact/arcompact.inc
113         $(CPUSRC)/arcompact/arcompact_common.h
116114
117115$(CPUOBJ)/arcompact/arcompactdasm_dispatch.o:  $(CPUSRC)/arcompact/arcompactdasm_dispatch.c \
118116         $(CPUSRC)/arcompact/arcompactdasm_dispatch.h \
r242703r242704
125123$(CPUOBJ)/arcompact/arcompact_common.o:  $(CPUSRC)/arcompact/arcompact_common.c \
126124         $(CPUSRC)/arcompact/arcompact_common.h
127125
128# rule to generate the C files
129$(CPUOBJ)/arcompact/arcompact.inc: $(CPUSRC)/arcompact/arcompact_make.py
130   @echo Generating arcompact source .inc files...
131   $(PYTHON) $(CPUSRC)/arcompact/arcompact_make.py $@
132126
133127#-------------------------------------------------
134128# Acorn ARM series
r242703r242704
15971591
15981592$(M68KMAKE): $(CPUOBJ)/m68000/m68kmake.o $(LIBOCORE)
15991593   @echo Linking $@...
1600   $(LD) $(LDFLAGS) $(OSDBGLDFLAGS) $^ $(BASELIBS) -o $@
1594   $(LD) $(LDFLAGS) $(OSDBGLDFLAGS) $^ $(LIBS) -o $@
16011595endif
16021596
16031597# rule to ensure we build the header before building the core CPU file
trunk/src/emu/cpu/h8/h8_sci.c
r242703r242704
591591   ssr |= SSR_TDRE;
592592   rx_parity = smr & SMR_OE ? 0 : 1;
593593   rsr = 0x00;
594   logerror("%s: start receive\n", tag());
594   logerror("%s: start recieve\n", tag());
595595   if(smr & SMR_CA) {
596596      rx_state = ST_BIT;
597597      rx_bit = 8;
r242703r242704
609609   if(!(ssr & SSR_FER)) {
610610      if((smr & SMR_PE) && rx_parity) {
611611         ssr |= SSR_PER;
612         logerror("%s: Receive parity error\n", tag());
612         logerror("%s: Recieve parity error\n", tag());
613613      } else if(ssr & SSR_RDRF) {
614614         ssr |= SSR_ORER;
615         logerror("%s: Receive overrun\n", tag());
615         logerror("%s: Recieve overrun\n", tag());
616616      } else {
617617         ssr |= SSR_RDRF;
618         logerror("%s: Received %02x\n", tag(), rsr);
618         logerror("%s: Recieved %02x\n", tag(), rsr);
619619         rdr = rsr;
620620      }
621621   }
trunk/src/emu/cpu/h8/h8_timer16.c
r242703r242704
347347      sprintf(tm, "%d", i);
348348      timer_channel[i] = subdevice<h8_timer16_channel_device>(tm);
349349   }
350
350   
351351   save_item(NAME(tstr));
352352}
353353
trunk/src/emu/cpu/m68000/m68000.h
r242703r242704
376376   void init_cpu_m68008(void);
377377   void init_cpu_m68010(void);
378378   void init_cpu_m68020(void);
379   void init_cpu_m68020fpu(void);
380379   void init_cpu_m68020pmmu(void);
381380   void init_cpu_m68020hmmu(void);
382381   void init_cpu_m68ec020(void);
r242703r242704
555554protected:
556555};
557556
558class m68020fpu_device : public m68000_base_device
559{
560public:
561   // construction/destruction
562   m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
563
564   virtual UINT32 disasm_min_opcode_bytes() const { return 2; };
565   virtual UINT32 disasm_max_opcode_bytes() const { return 20; };
566   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
567
568   virtual UINT32 execute_min_cycles() const { return 2; };
569   virtual UINT32 execute_max_cycles() const { return 158; };
570
571   virtual UINT32 execute_default_irq_vector() const { return -1; };
572
573   // device-level overrides
574   virtual void device_start();
575protected:
576};
577
578557class m68020pmmu_device : public m68000_base_device
579558{
580559public:
r242703r242704
794773extern const device_type M68010;
795774extern const device_type M68EC020;
796775extern const device_type M68020;
797extern const device_type M68020FPU;
798776extern const device_type M68020PMMU;
799777extern const device_type M68020HMMU;
800778extern const device_type M68EC030;
trunk/src/emu/cpu/m68000/m68k_in.c
r242703r242704
272272extern void m68040_fpu_op0(m68000_base_device *m68k);
273273extern void m68040_fpu_op1(m68000_base_device *m68k);
274274extern void m68881_mmu_ops(m68000_base_device *m68k);
275extern void m68881_ftrap(m68000_base_device *m68k);
276275
277276/* ======================================================================== */
278277/* ========================= INSTRUCTION HANDLERS ========================= */
r242703r242704
552551cpgen     32  .     .     1111...000......  ..........  . . U U . . U   .   .   4   4   .   .   .
553552cpscc     32  .     .     1111...001......  ..........  . . U U . . U   .   .   4   4   .   .   .
554553cptrapcc  32  .     .     1111...001111...  ..........  . . U U . . U   .   .   4   4   .   .   .
555ftrapcc   32  .     .     1111001001111...  ..........  . . U U . . U   .   .   4   4   .   .   .
556554dbt       16  .     .     0101000011001...  ..........  U U U U U U U  12  12   6   6   6   6   6
557555dbf       16  .     .     0101000111001...  ..........  U U U U U U U  12  12   6   4   4   4   4
558556dbcc      16  .     .     0101....11001...  ..........  U U U U U U U  12  12   6   6   6   6   6
r242703r242704
44794477   m68ki_exception_1111(mc68kcpu);
44804478}
44814479
4482M68KMAKE_OP(ftrapcc, 32, ., .)
4483{
4484   if((mc68kcpu)->has_fpu)
4485   {
4486      m68881_ftrap(mc68kcpu);
4487      return;
4488   }
4489   m68ki_exception_1111(mc68kcpu);
4490}
4491
44924480M68KMAKE_OP(dbt, 16, ., .)
44934481{
44944482   REG_PC(mc68kcpu) += 2;
trunk/src/emu/cpu/m68000/m68kcpu.c
r242703r242704
690690
691691   m68k->run_mode = RUN_MODE_BERR_AERR_RESET;
692692
693   if (!CPU_TYPE_IS_010_PLUS(m68k->cpu_type))
693   if (!CPU_TYPE_IS_020_PLUS(m68k->cpu_type))
694694   {
695695      /* Note: This is implemented for 68000 only! */
696696      m68ki_stack_frame_buserr(m68k, sr);
697697   }
698   else if (CPU_TYPE_IS_010(m68k->cpu_type))
699   {
700      /* only the 68010 throws this unique type-1000 frame */
701      m68ki_stack_frame_1000(m68k, REG_PPC(m68k), sr, EXCEPTION_BUS_ERROR);
702   }
703698   else if (m68k->mmu_tmp_buserror_address == REG_PPC(m68k))
704699   {
705700      m68ki_stack_frame_1010(m68k, sr, EXCEPTION_BUS_ERROR, REG_PPC(m68k), m68k->mmu_tmp_buserror_address);
r242703r242704
18851880   define_state();
18861881}
18871882
1888void m68000_base_device::init_cpu_m68020fpu(void)
1889{
1890   init_cpu_m68020();
18911883
1892   has_fpu          = 1;
1893}
1894
18951884void m68000_base_device::init_cpu_m68020pmmu(void)
18961885{
18971886   init_cpu_m68020();
r242703r242704
22492238offs_t m68010_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68010)(this, buffer, pc, oprom, opram, options); };
22502239offs_t m68ec020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); };
22512240offs_t m68020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); };
2252offs_t m68020fpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); };
22532241offs_t m68020pmmu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); };
22542242offs_t m68020hmmu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68020)(this, buffer, pc, oprom, opram, options); };
22552243offs_t m68ec030_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { return CPU_DISASSEMBLE_NAME(dasm_m68ec030)(this, buffer, pc, oprom, opram, options); };
r242703r242704
25542542const device_type M68010 = &device_creator<m68010_device>;
25552543const device_type M68EC020 = &device_creator<m68ec020_device>;
25562544const device_type M68020 = &device_creator<m68020_device>;
2557const device_type M68020FPU = &device_creator<m68020fpu_device>;
25582545const device_type M68020PMMU = &device_creator<m68020pmmu_device>;
25592546const device_type M68020HMMU = &device_creator<m68020hmmu_device>;
25602547const device_type M68EC030 = &device_creator<m68ec030_device>;
r242703r242704
26542641   init_cpu_m68020();
26552642}
26562643
2657
2658m68020fpu_device::m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2659   : m68000_base_device(mconfig, "M68020FPU", tag, owner, clock, M68020, 32,32, "m68020fpu", __FILE__)
2660{
2661}
2662
2663void m68020fpu_device::device_start()
2664{
2665   init_cpu_m68020fpu();
2666}
2667
26682644// 68020 with 68851 PMMU
26692645m68020pmmu_device::m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
26702646   : m68000_base_device(mconfig, "M68020PMMU", tag, owner, clock, M68020PMMU, 32,32, "m68020pmmu", __FILE__)
trunk/src/emu/cpu/m68000/m68kdasm.c
r242703r242704
17281728
17291729   switch (g_cpu_ir & 0x7)
17301730   {
1731      case 2: // word operand
1731      case 2:   // word operand
17321732         w3 = read_imm_16();
17331733         sprintf(g_dasm_str, "ftrap%s.w   $%04x", g_cpcc[w2 & 0x3f], w3);
17341734         break;
17351735
1736      case 3: // long word operand
1736      case 3:   // long word operand
17371737         l2 = read_imm_32();
17381738         sprintf(g_dasm_str, "ftrap%s.l   $%08x", g_cpcc[w2 & 0x3f], l2);
17391739         break;
trunk/src/emu/cpu/m68000/m68kfpu.inc
r242703r242704
21662166      default:    fatalerror("m68040_fpu_op1: unimplemented op %d at %08X\n", (m68k->ir >> 6) & 0x3, REG_PC(m68k)-2);
21672167   }
21682168}
2169
2170void m68881_ftrap(m68000_base_device *m68k)
2171{
2172   UINT16 w2  = OPER_I_16(m68k);
2173
2174   // now check the condition
2175   if (TEST_CONDITION(m68k, w2 & 0x3f))
2176   {
2177      // trap here
2178      m68ki_exception_trap(m68k, EXCEPTION_TRAPV);
2179   }
2180   else   // fall through, requires eating the operand
2181   {
2182      switch (m68k->ir & 0x7)
2183      {
2184         case 2:   // word operand
2185            OPER_I_16(m68k);
2186            break;
2187
2188         case 3: // long word operand
2189            OPER_I_32(m68k);
2190            break;
2191
2192         case 4:   // no operand
2193            break;
2194      }
2195   }
2196}
2197
trunk/src/emu/cpu/pps4/pps4.c
r242703r242704
7171const device_type PPS4 = &device_creator<pps4_device>;
7272
7373pps4_device::pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
74   : cpu_device(mconfig, PPS4, "PPS4", tag, owner, clock, "pps4", __FILE__ )
75   , m_program_config("program", ENDIANNESS_LITTLE, 8, 12)
76   , m_data_config("data", ENDIANNESS_LITTLE, 8, 12)  // 4bit RAM
77   , m_io_config("io", ENDIANNESS_LITTLE, 8, 8)  // 4bit IO
74    : cpu_device(mconfig, PPS4, "PPS4", tag, owner, clock, "pps4", __FILE__ )
75    , m_program_config("program", ENDIANNESS_LITTLE, 8, 12)
76    , m_data_config("data", ENDIANNESS_LITTLE, 8, 12)  // 4bit RAM
77    , m_io_config("io", ENDIANNESS_LITTLE, 8, 8)  // 4bit IO
7878{
7979}
8080
r242703r242704
8484 */
8585UINT8 pps4_device::M()
8686{
87   UINT8 ret = m_data->read_byte(m_B & ~m_SAG);
88   m_SAG = 0;
89   return ret;
87    UINT8 ret = m_data->read_byte(m_B & ~m_SAG);
88    m_SAG = 0;
89    return ret;
9090}
9191
9292
r242703r242704
9696 */
9797void pps4_device::W(UINT8 data)
9898{
99   m_data->write_byte(m_B & ~m_SAG, data);
100   m_SAG = 0;
99    m_data->write_byte(m_B & ~m_SAG, data);
100    m_SAG = 0;
101101}
102102
103103offs_t pps4_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
104104{
105   extern CPU_DISASSEMBLE( pps4 );
106   return CPU_DISASSEMBLE_NAME(pps4)(this, buffer, pc, oprom, opram, options);
105    extern CPU_DISASSEMBLE( pps4 );
106    return CPU_DISASSEMBLE_NAME(pps4)(this, buffer, pc, oprom, opram, options);
107107}
108108
109109/**
r242703r242704
115115 */
116116inline UINT8 pps4_device::ROP()
117117{
118   const UINT8 op = m_direct->read_decrypted_byte(m_P & 0xFFF);
119   m_Ip = m_I1;         // save previous opcode
120   m_P = (m_P + 1) & 0xFFF;
121   m_icount -= 1;
122   return op;
118    const UINT8 op = m_direct->read_decrypted_byte(m_P & 0xFFF);
119    m_Ip = m_I1;         // save previous opcode
120    m_P = (m_P + 1) & 0xFFF;
121    m_icount -= 1;
122    return op;
123123}
124124
125125/**
r242703r242704
131131 */
132132inline UINT8 pps4_device::ARG()
133133{
134   const UINT8 arg = m_direct->read_raw_byte(m_P & 0xFFF);
135   m_P = (m_P + 1) & 0xFFF;
136   m_icount -= 1;
137   return arg;
134    const UINT8 arg = m_direct->read_raw_byte(m_P & 0xFFF);
135    m_P = (m_P + 1) & 0xFFF;
136    m_icount -= 1;
137    return arg;
138138}
139139
140140/**
r242703r242704
173173 */
174174void pps4_device::iAD()
175175{
176   m_A = m_A + M();
177   m_C = (m_A >> 4) & 1;
178   m_A = m_A & 15;
176    m_A = m_A + M();
177    m_C = (m_A >> 4) & 1;
178    m_A = m_A & 15;
179179}
180180
181181/**
r242703r242704
193193 */
194194void pps4_device::iADC()
195195{
196   m_A = m_A + M() + m_C;
197   m_C = m_A >> 4;
198   m_A = m_A & 15;
196    m_A = m_A + M() + m_C;
197    m_C = m_A >> 4;
198    m_A = m_A & 15;
199199}
200200
201201/**
r242703r242704
214214 */
215215void pps4_device::iADSK()
216216{
217   m_A = m_A + M();
218   m_C = m_A >> 4;
219   m_Skip = m_C;
220   m_A = m_A & 15;
217    m_A = m_A + M();
218    m_C = m_A >> 4;
219    m_Skip = m_C;
220    m_A = m_A & 15;
221221}
222222
223223/**
r242703r242704
236236 */
237237void pps4_device::iADCSK()
238238{
239   m_A = m_A + M() + m_C;
240   m_C = m_A >> 4;
241   m_Skip = m_C;
242   m_A = m_A & 15;
239    m_A = m_A + M() + m_C;
240    m_C = m_A >> 4;
241    m_Skip = m_C;
242    m_A = m_A & 15;
243243}
244244
245245/**
r242703r242704
265265 */
266266void pps4_device::iADI()
267267{
268   const UINT8 imm = ~m_I1 & 15;
269   m_A = m_A + imm;
270   m_Skip = (m_A >> 4) & 1;
271   m_A = m_A & 15;
268    const UINT8 imm = ~m_I1 & 15;
269    m_A = m_A + imm;
270    m_Skip = (m_A >> 4) & 1;
271    m_A = m_A & 15;
272272}
273273
274274/**
r242703r242704
288288 */
289289void pps4_device::iDC()
290290{
291   m_A = m_A + 10;
291    m_A = m_A + 10;
292292}
293293
294294/**
r242703r242704
307307 */
308308void pps4_device::iAND()
309309{
310   m_A = m_A & M();
310    m_A = m_A & M();
311311}
312312
313313/**
r242703r242704
326326 */
327327void pps4_device::iOR()
328328{
329   m_A = m_A | M();
329    m_A = m_A | M();
330330}
331331
332332/**
r242703r242704
346346 */
347347void pps4_device::iEOR()
348348{
349   m_A = m_A ^ M();
349    m_A = m_A ^ M();
350350}
351351
352352/**
r242703r242704
364364 */
365365void pps4_device::iCOMP()
366366{
367   m_A = m_A ^ 15;
367    m_A = m_A ^ 15;
368368}
369369
370370/**
r242703r242704
381381 */
382382void pps4_device::iSC()
383383{
384   m_C = 1;
384    m_C = 1;
385385}
386386
387387/**
r242703r242704
398398 */
399399void pps4_device::iRC()
400400{
401   m_C = 0;
401    m_C = 0;
402402}
403403
404404/**
r242703r242704
415415 */
416416void pps4_device::iSF1()
417417{
418   m_FF1 = 1;
418    m_FF1 = 1;
419419}
420420
421421/**
r242703r242704
432432 */
433433void pps4_device::iRF1()
434434{
435   m_FF1 = 0;
435    m_FF1 = 0;
436436}
437437
438438/**
r242703r242704
449449 */
450450void pps4_device::iSF2()
451451{
452   m_FF2 = 1;
452    m_FF2 = 1;
453453}
454454
455455/**
r242703r242704
466466 */
467467void pps4_device::iRF2()
468468{
469   m_FF2 = 0;
469    m_FF2 = 0;
470470}
471471
472472/**
r242703r242704
490490 */
491491void pps4_device::iLD()
492492{
493   const UINT16 i3c = ~m_I1 & 7;
494   m_A = M();
495   m_B = m_B ^ (i3c << 4);
493    const UINT16 i3c = ~m_I1 & 7;
494    m_A = M();
495    m_B = m_B ^ (i3c << 4);
496496}
497497
498498/**
r242703r242704
513513 */
514514void pps4_device::iEX()
515515{
516   const UINT16 i3c = ~m_I1 & 7;
517   const UINT8 mem = M();
518   W(m_A);
519   m_A = mem;
520   m_B = m_B ^ (i3c << 4);
516    const UINT16 i3c = ~m_I1 & 7;
517    const UINT8 mem = M();
518    W(m_A);
519    m_A = mem;
520    m_B = m_B ^ (i3c << 4);
521521}
522522
523523/**
r242703r242704
542542 */
543543void pps4_device::iEXD()
544544{
545   const UINT8 i3c = ~m_I1 & 7;
546   const UINT8 mem = M();
547   UINT8 bl = m_B & 15;
548   W(m_A);
549   m_A = mem;
550   m_B = m_B ^ (i3c << 4);
551   // if decrement BL wraps to 1111b
552   if (0 == bl) {
553      bl = 15;
554      m_Skip = 1;
555   } else {
556      bl = bl - 1;
557   }
558   m_B = (m_B & ~15) | bl;
545    const UINT8 i3c = ~m_I1 & 7;
546    const UINT8 mem = M();
547    UINT8 bl = m_B & 15;
548    W(m_A);
549    m_A = mem;
550    m_B = m_B ^ (i3c << 4);
551    // if decrement BL wraps to 1111b
552    if (0 == bl) {
553        bl = 15;
554        m_Skip = 1;
555    } else {
556        bl = bl - 1;
557    }
558    m_B = (m_B & ~15) | bl;
559559}
560560
561561/**
r242703r242704
579579 */
580580void pps4_device::iLDI()
581581{
582   // previous LDI instruction?
583   if (0x70 == (m_Ip & 0xf0)) {
584      LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
585      return;
586   }
587   m_A = ~m_I1 & 15;
582    // previous LDI instruction?
583    if (0x70 == (m_Ip & 0xf0)) {
584        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
585        return;
586    }
587    m_A = ~m_I1 & 15;
588588}
589589
590590/**
r242703r242704
602602 */
603603void pps4_device::iLAX()
604604{
605   m_A = m_X;
605    m_A = m_X;
606606}
607607
608608/**
r242703r242704
620620 */
621621void pps4_device::iLXA()
622622{
623   m_X = m_A;
623    m_X = m_A;
624624}
625625
626626/**
r242703r242704
638638 */
639639void pps4_device::iLABL()
640640{
641   m_A = m_B & 15;
641    m_A = m_B & 15;
642642}
643643
644644/**
r242703r242704
656656 */
657657void pps4_device::iLBMX()
658658{
659   m_B = (m_B & ~(15 << 4)) | (m_X << 4);
659    m_B = (m_B & ~(15 << 4)) | (m_X << 4);
660660}
661661
662662/**
r242703r242704
676676 */
677677void pps4_device::iLBUA()
678678{
679   m_B = (m_B & ~(15 << 8)) | (m_A << 8);
680   m_A = M();
679    m_B = (m_B & ~(15 << 8)) | (m_A << 8);
680    m_A = M();
681681}
682682
683683/**
r242703r242704
695695 */
696696void pps4_device::iXABL()
697697{
698   // swap A and BL
699   UINT8 bl = m_B & 15;
700   m_B = (m_B & ~15) | m_A;
701   m_A = bl;
698    // swap A and BL
699    UINT8 bl = m_B & 15;
700    m_B = (m_B & ~15) | m_A;
701    m_A = bl;
702702}
703703
704704/**
r242703r242704
716716 */
717717void pps4_device::iXBMX()
718718{
719   // swap X and BM
720   const UINT8 bm = (m_B >> 4) & 15;
721   m_B = (m_B & ~(15 << 4)) | (m_X << 4);
722   m_X = bm;
719    // swap X and BM
720    const UINT8 bm = (m_B >> 4) & 15;
721    m_B = (m_B & ~(15 << 4)) | (m_X << 4);
722    m_X = bm;
723723}
724724
725725/**
r242703r242704
737737 */
738738void pps4_device::iXAX()
739739{
740   // swap A and X
741   m_A ^= m_X;
742   m_X ^= m_A;
743   m_A ^= m_X;
740    // swap A and X
741    m_A ^= m_X;
742    m_X ^= m_A;
743    m_A ^= m_X;
744744}
745745
746746/**
r242703r242704
758758 */
759759void pps4_device::iXS()
760760{
761   // swap SA and SB
762   m_SA ^= m_SB;
763   m_SB ^= m_SA;
764   m_SA ^= m_SB;
761    // swap SA and SB
762    m_SA ^= m_SB;
763    m_SB ^= m_SA;
764    m_SA ^= m_SB;
765765}
766766
767767/**
r242703r242704
786786 */
787787void pps4_device::iCYS()
788788{
789   const UINT16 sa = (m_SA >> 4) | (m_A << 8);
790   m_A = m_SA & 15;
791   m_SA = sa;
789    const UINT16 sa = (m_SA >> 4) | (m_A << 8);
790    m_A = m_SA & 15;
791    m_SA = sa;
792792}
793793
794794/**
r242703r242704
826826 */
827827void pps4_device::iLB()
828828{
829   // previous LB or LBL instruction?
830   if (0xc0 == (m_Ip & 0xf0) || 0x00 == m_Ip) {
831      LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
832      return;
833   }
834   m_SB = m_SA;
835   m_SA = (m_P + 1) & 0xFFF;
836   m_P = (3 << 6) | (m_I1 & 15);
837   m_B = ~ARG() & 255;
838   m_P = m_SA;
839   // swap SA and SB
840   m_SA ^= m_SB;
841   m_SB ^= m_SA;
842   m_SA ^= m_SB;
829    // previous LB or LBL instruction?
830    if (0xc0 == (m_Ip & 0xf0) || 0x00 == m_Ip) {
831        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
832        return;
833    }
834    m_SB = m_SA;
835    m_SA = (m_P + 1) & 0xFFF;
836    m_P = (3 << 6) | (m_I1 & 15);
837    m_B = ~ARG() & 255;
838    m_P = m_SA;
839    // swap SA and SB
840    m_SA ^= m_SB;
841    m_SB ^= m_SA;
842    m_SA ^= m_SB;
843843}
844844
845845/**
r242703r242704
867867 */
868868void pps4_device::iLBL()
869869{
870   m_I2 = ARG();
871   // previous LB or LBL instruction?
872   if (0xc0 == (m_Ip & 0xf0) || 0x00 == m_Ip) {
873      LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
874      return;
875   }
876   m_B = ~m_I2 & 255;  // Note: immediate is 1's complement
870    m_I2 = ARG();
871    // previous LB or LBL instruction?
872    if (0xc0 == (m_Ip & 0xf0) || 0x00 == m_Ip) {
873        LOG(("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1));
874        return;
875    }
876    m_B = ~m_I2 & 255;  // Note: immediate is 1's complement
877877}
878878
879879/**
r242703r242704
893893 */
894894void pps4_device::iINCB()
895895{
896   UINT8 bl = m_B & 15;
897   bl = (bl + 1) & 15;
898   if (0 == bl) {
899      LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
900      m_Skip = 1;
901   }
902   m_B = (m_B & ~15) | bl;
896    UINT8 bl = m_B & 15;
897    bl = (bl + 1) & 15;
898    if (0 == bl) {
899        LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
900        m_Skip = 1;
901    }
902    m_B = (m_B & ~15) | bl;
903903}
904904
905905/**
r242703r242704
919919 */
920920void pps4_device::iDECB()
921921{
922   UINT8 bl = m_B & 15;
923   bl = (bl - 1) & 15;
924   if (15 == bl) {
925      LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
926      m_Skip = 1;
927   }
928   m_B = (m_B & ~15) | bl;
922    UINT8 bl = m_B & 15;
923    bl = (bl - 1) & 15;
924    if (15 == bl) {
925        LOG(("%s: skip BL=%x\n", __FUNCTION__, bl));
926        m_Skip = 1;
927    }
928    m_B = (m_B & ~15) | bl;
929929}
930930
931931/**
r242703r242704
945945 */
946946void pps4_device::iT()
947947{
948   const UINT16 p = (m_P & ~63) | (m_I1 & 63);
949   LOG(("%s: P=%03x I=%02x -> P=%03x\n", __FUNCTION__, m_P, m_I1, p));
950   m_P = p;
948    const UINT16 p = (m_P & ~63) | (m_I1 & 63);
949    LOG(("%s: P=%03x I=%02x -> P=%03x\n", __FUNCTION__, m_P, m_I1, p));
950    m_P = p;
951951}
952952
953953/**
r242703r242704
977977 */
978978void pps4_device::iTM()
979979{
980   m_SB = m_SA;
981   m_SA = m_P;
982   m_P = (3 << 6) | (m_I1 & 63);
983   m_I2 = ARG();
984   m_P = (1 << 8) | m_I2;
980    m_SB = m_SA;
981    m_SA = m_P;
982    m_P = (3 << 6) | (m_I1 & 63);
983    m_I2 = ARG();
984    m_P = (1 << 8) | m_I2;
985985}
986986
987987/**
r242703r242704
10031003 */
10041004void pps4_device::iTL()
10051005{
1006   m_I2 = ARG();
1007   m_P = ((m_I1 & 15) << 8) | m_I2;
1006    m_I2 = ARG();
1007    m_P = ((m_I1 & 15) << 8) | m_I2;
10081008}
10091009
10101010/**
r242703r242704
10281028 */
10291029void pps4_device::iTML()
10301030{
1031   m_I2 = ARG();
1032   m_SB = m_SA;
1033   m_SA = m_P;
1034   m_P = ((m_I1 & 15) << 8) | m_I2;
1031    m_I2 = ARG();
1032    m_SB = m_SA;
1033    m_SA = m_P;
1034    m_P = ((m_I1 & 15) << 8) | m_I2;
10351035}
10361036
10371037/**
r242703r242704
10481048 */
10491049void pps4_device::iSKC()
10501050{
1051   m_Skip = m_C;
1051    m_Skip = m_C;
10521052}
10531053
10541054/**
r242703r242704
10651065 */
10661066void pps4_device::iSKZ()
10671067{
1068   m_Skip = (0 == m_A) ? 1 : 0;
1068    m_Skip = (0 == m_A) ? 1 : 0;
10691069}
10701070
10711071/**
r242703r242704
10841084 */
10851085void pps4_device::iSKBI()
10861086{
1087   const UINT8 i4 = m_I1 & 15;
1088   const UINT8 bl = m_B & 15;
1089   m_Skip = bl == i4 ? 1 : 0;
1087    const UINT8 i4 = m_I1 & 15;
1088    const UINT8 bl = m_B & 15;
1089    m_Skip = bl == i4 ? 1 : 0;
10901090}
10911091
10921092/**
r242703r242704
11011101 */
11021102void pps4_device::iSKF1()
11031103{
1104   m_Skip = m_FF1;
1104    m_Skip = m_FF1;
11051105}
11061106
11071107/**
r242703r242704
11161116 */
11171117void pps4_device::iSKF2()
11181118{
1119   m_Skip = m_FF2;
1119    m_Skip = m_FF2;
11201120}
11211121
11221122/**
r242703r242704
11351135 */
11361136void pps4_device::iRTN()
11371137{
1138   m_P = m_SA & 0xFFF;
1139   // swap SA and SB
1140   m_SA ^= m_SB;
1141   m_SB ^= m_SA;
1142   m_SA ^= m_SB;
1138    m_P = m_SA & 0xFFF;
1139    // swap SA and SB
1140    m_SA ^= m_SB;
1141    m_SB ^= m_SA;
1142    m_SA ^= m_SB;
11431143}
11441144
11451145/**
r242703r242704
11581158 */
11591159void pps4_device::iRTNSK()
11601160{
1161   m_P = m_SA & 0xFFF;
1162   // swap SA and SB
1163   m_SA ^= m_SB;
1164   m_SB ^= m_SA;
1165   m_SA ^= m_SB;
1166   m_Skip = 1; // next opcode is ignored
1161    m_P = m_SA & 0xFFF;
1162    // swap SA and SB
1163    m_SA ^= m_SB;
1164    m_SB ^= m_SA;
1165    m_SA ^= m_SB;
1166    m_Skip = 1; // next opcode is ignored
11671167}
11681168
11691169/**
r242703r242704
11951195 */
11961196void pps4_device::iIOL()
11971197{
1198   UINT8 ac = ((m_B & 15) << 4) | (~m_A & 15);
1199   m_I2 = ARG();
1200   m_io->write_byte(m_I2, ac);
1201   LOG(("%s: port:%02x <- %x\n", __FUNCTION__, m_I2, ac));
1202   ac = m_io->read_byte(m_I2) & 15;
1203   LOG(("%s: port:%02x -> %x\n", __FUNCTION__, m_I2, ac));
1204   m_A = ~ac & 15;
1198    UINT8 ac = ((m_B & 15) << 4) | (~m_A & 15);
1199    m_I2 = ARG();
1200    m_io->write_byte(m_I2, ac);
1201    LOG(("%s: port:%02x <- %x\n", __FUNCTION__, m_I2, ac));
1202    ac = m_io->read_byte(m_I2) & 15;
1203    LOG(("%s: port:%02x -> %x\n", __FUNCTION__, m_I2, ac));
1204    m_A = ~ac & 15;
12051205}
12061206
12071207/**
r242703r242704
12191219 */
12201220void pps4_device::iDIA()
12211221{
1222   m_A = m_io->read_byte(PPS4_PORT_A) & 15;
1222    m_A = m_io->read_byte(PPS4_PORT_A) & 15;
12231223}
12241224
12251225/**
r242703r242704
12371237 */
12381238void pps4_device::iDIB()
12391239{
1240   m_A = m_io->read_byte(PPS4_PORT_B) & 15;
1240    m_A = m_io->read_byte(PPS4_PORT_B) & 15;
12411241}
12421242
12431243/**
r242703r242704
12551255 */
12561256void pps4_device::iDOA()
12571257{
1258   m_io->write_byte(PPS4_PORT_A, m_A);
1258    m_io->write_byte(PPS4_PORT_A, m_A);
12591259}
12601260
12611261/**
r242703r242704
12771277 */
12781278void pps4_device::iSAG()
12791279{
1280   // mask bits 12:5 on next memory access
1281   m_SAG = 0xff0;
1280    // mask bits 12:5 on next memory access
1281    m_SAG = 0xff0;
12821282}
12831283
12841284/***************************************************************************
r242703r242704
12861286***************************************************************************/
12871287void pps4_device::execute_one()
12881288{
1289   m_I1 = ROP();
1290   if (m_Skip) {
1291      m_Skip = 0;
1292      LOG(("%s: skip op:%02x\n", __FUNCTION__, m_I1));
1293      return;
1294   }
1295   switch (m_I1) {
1296   case 0x00:
1297      iLBL();
1298      break;
1299   case 0x01:
1300      iTML();
1301      break;
1302   case 0x02:
1303      iTML();
1304      break;
1305   case 0x03:
1306      iTML();
1307      break;
1308   case 0x04:
1309      iLBUA();
1310      break;
1311   case 0x05:
1312      iRTN();
1313      break;
1314   case 0x06:
1315      iXS();
1316      break;
1317   case 0x07:
1318      iRTNSK();
1319      break;
1320   case 0x08:
1321      iADCSK();
1322      break;
1323   case 0x09:
1324      iADSK();
1325      break;
1326   case 0x0a:
1327      iADC();
1328      break;
1329   case 0x0b:
1330      iAD();
1331      break;
1332   case 0x0c:
1333      iEOR();
1334      break;
1335   case 0x0d:
1336      iAND();
1337      break;
1338   case 0x0e:
1339      iCOMP();
1340      break;
1341   case 0x0f:
1342      iOR();
1343      break;
1289    m_I1 = ROP();
1290    if (m_Skip) {
1291        m_Skip = 0;
1292        LOG(("%s: skip op:%02x\n", __FUNCTION__, m_I1));
1293        return;
1294    }
1295    switch (m_I1) {
1296    case 0x00:
1297        iLBL();
1298        break;
1299    case 0x01:
1300        iTML();
1301        break;
1302    case 0x02:
1303        iTML();
1304        break;
1305    case 0x03:
1306        iTML();
1307        break;
1308    case 0x04:
1309        iLBUA();
1310        break;
1311    case 0x05:
1312        iRTN();
1313        break;
1314    case 0x06:
1315        iXS();
1316        break;
1317    case 0x07:
1318        iRTNSK();
1319        break;
1320    case 0x08:
1321        iADCSK();
1322        break;
1323    case 0x09:
1324        iADSK();
1325        break;
1326    case 0x0a:
1327        iADC();
1328        break;
1329    case 0x0b:
1330        iAD();
1331        break;
1332    case 0x0c:
1333        iEOR();
1334        break;
1335    case 0x0d:
1336        iAND();
1337        break;
1338    case 0x0e:
1339        iCOMP();
1340        break;
1341    case 0x0f:
1342        iOR();
1343        break;
13441344
1345   case 0x10:
1346      iLBMX();
1347      break;
1348   case 0x11:
1349      iLABL();
1350      break;
1351   case 0x12:
1352      iLAX();
1353      break;
1354   case 0x13:
1355      iSAG();
1356      break;
1357   case 0x14:
1358      iSKF2();
1359      break;
1360   case 0x15:
1361      iSKC();
1362      break;
1363   case 0x16:
1364      iSKF1();
1365      break;
1366   case 0x17:
1367      iINCB();
1368      break;
1369   case 0x18:
1370      iXBMX();
1371      break;
1372   case 0x19:
1373      iXABL();
1374      break;
1375   case 0x1a:
1376      iXAX();
1377      break;
1378   case 0x1b:
1379      iLXA();
1380      break;
1381   case 0x1c:
1382      iIOL();
1383      break;
1384   case 0x1d:
1385      iDOA();
1386      break;
1387   case 0x1e:
1388      iSKZ();
1389      break;
1390   case 0x1f:
1391      iDECB();
1392      break;
1345    case 0x10:
1346        iLBMX();
1347        break;
1348    case 0x11:
1349        iLABL();
1350        break;
1351    case 0x12:
1352        iLAX();
1353        break;
1354    case 0x13:
1355        iSAG();
1356        break;
1357    case 0x14:
1358        iSKF2();
1359        break;
1360    case 0x15:
1361        iSKC();
1362        break;
1363    case 0x16:
1364        iSKF1();
1365        break;
1366    case 0x17:
1367        iINCB();
1368        break;
1369    case 0x18:
1370        iXBMX();
1371        break;
1372    case 0x19:
1373        iXABL();
1374        break;
1375    case 0x1a:
1376        iXAX();
1377        break;
1378    case 0x1b:
1379        iLXA();
1380        break;
1381    case 0x1c:
1382        iIOL();
1383        break;
1384    case 0x1d:
1385        iDOA();
1386        break;
1387    case 0x1e:
1388        iSKZ();
1389        break;
1390    case 0x1f:
1391        iDECB();
1392        break;
13931393
1394   case 0x20:
1395      iSC();
1396      break;
1397   case 0x21:
1398      iSF2();
1399      break;
1400   case 0x22:
1401      iSF1();
1402      break;
1403   case 0x23:
1404      iDIB();
1405      break;
1406   case 0x24:
1407      iRC();
1408      break;
1409   case 0x25:
1410      iRF2();
1411      break;
1412   case 0x26:
1413      iRF1();
1414      break;
1415   case 0x27:
1416      iDIA();
1417      break;
1394    case 0x20:
1395        iSC();
1396        break;
1397    case 0x21:
1398        iSF2();
1399        break;
1400    case 0x22:
1401        iSF1();
1402        break;
1403    case 0x23:
1404        iDIB();
1405        break;
1406    case 0x24:
1407        iRC();
1408        break;
1409    case 0x25:
1410        iRF2();
1411        break;
1412    case 0x26:
1413        iRF1();
1414        break;
1415    case 0x27:
1416        iDIA();
1417        break;
14181418
1419   case 0x28: case 0x29: case 0x2a: case 0x2b:
1420   case 0x2c: case 0x2d: case 0x2e: case 0x2f:
1421      iEXD();
1422      break;
1419    case 0x28: case 0x29: case 0x2a: case 0x2b:
1420    case 0x2c: case 0x2d: case 0x2e: case 0x2f:
1421        iEXD();
1422        break;
14231423
1424   case 0x30: case 0x31: case 0x32: case 0x33:
1425   case 0x34: case 0x35: case 0x36: case 0x37:
1426      iLD();
1427      break;
1424    case 0x30: case 0x31: case 0x32: case 0x33:
1425    case 0x34: case 0x35: case 0x36: case 0x37:
1426        iLD();
1427        break;
14281428
1429   case 0x38: case 0x39: case 0x3a: case 0x3b:
1430   case 0x3c: case 0x3d: case 0x3e: case 0x3f:
1431      iEX();
1432      break;
1429    case 0x38: case 0x39: case 0x3a: case 0x3b:
1430    case 0x3c: case 0x3d: case 0x3e: case 0x3f:
1431        iEX();
1432        break;
14331433
1434   case 0x40: case 0x41: case 0x42: case 0x43:
1435   case 0x44: case 0x45: case 0x46: case 0x47:
1436   case 0x48: case 0x49: case 0x4a: case 0x4b:
1437   case 0x4c: case 0x4d: case 0x4e: case 0x4f:
1438      iSKBI();
1439      break;
1434    case 0x40: case 0x41: case 0x42: case 0x43:
1435    case 0x44: case 0x45: case 0x46: case 0x47:
1436    case 0x48: case 0x49: case 0x4a: case 0x4b:
1437    case 0x4c: case 0x4d: case 0x4e: case 0x4f:
1438        iSKBI();
1439        break;
14401440
1441   case 0x50: case 0x51: case 0x52: case 0x53:
1442   case 0x54: case 0x55: case 0x56: case 0x57:
1443   case 0x58: case 0x59: case 0x5a: case 0x5b:
1444   case 0x5c: case 0x5d: case 0x5e: case 0x5f:
1445      iTL();
1446      break;
1441    case 0x50: case 0x51: case 0x52: case 0x53:
1442    case 0x54: case 0x55: case 0x56: case 0x57:
1443    case 0x58: case 0x59: case 0x5a: case 0x5b:
1444    case 0x5c: case 0x5d: case 0x5e: case 0x5f:
1445        iTL();
1446        break;
14471447
1448   case 0x65:
1449      iDC();
1450      break;
1448    case 0x65:
1449        iDC();
1450        break;
14511451
1452   case 0x60: case 0x61: case 0x62: case 0x63:
1453   case 0x64:            case 0x66: case 0x67:
1454   case 0x68: case 0x69: case 0x6a: case 0x6b:
1455   case 0x6c: case 0x6d: case 0x6e:
1456      iADI();
1457      break;
1452    case 0x60: case 0x61: case 0x62: case 0x63:
1453    case 0x64:            case 0x66: case 0x67:
1454    case 0x68: case 0x69: case 0x6a: case 0x6b:
1455    case 0x6c: case 0x6d: case 0x6e:
1456        iADI();
1457        break;
14581458
1459   case 0x6f:
1460      iCYS();
1461      break;
1459    case 0x6f:
1460        iCYS();
1461        break;
14621462
1463   case 0x70: case 0x71: case 0x72: case 0x73:
1464   case 0x74: case 0x75: case 0x76: case 0x77:
1465   case 0x78: case 0x79: case 0x7a: case 0x7b:
1466   case 0x7c: case 0x7d: case 0x7e: case 0x7f:
1467      iLDI();
1468      break;
1463    case 0x70: case 0x71: case 0x72: case 0x73:
1464    case 0x74: case 0x75: case 0x76: case 0x77:
1465    case 0x78: case 0x79: case 0x7a: case 0x7b:
1466    case 0x7c: case 0x7d: case 0x7e: case 0x7f:
1467        iLDI();
1468        break;
14691469
1470   case 0x80: case 0x81: case 0x82: case 0x83:
1471   case 0x84: case 0x85: case 0x86: case 0x87:
1472   case 0x88: case 0x89: case 0x8a: case 0x8b:
1473   case 0x8c: case 0x8d: case 0x8e: case 0x8f:
1474   case 0x90: case 0x91: case 0x92: case 0x93:
1475   case 0x94: case 0x95: case 0x96: case 0x97:
1476   case 0x98: case 0x99: case 0x9a: case 0x9b:
1477   case 0x9c: case 0x9d: case 0x9e: case 0x9f:
1478   case 0xa0: case 0xa1: case 0xa2: case 0xa3:
1479   case 0xa4: case 0xa5: case 0xa6: case 0xa7:
1480   case 0xa8: case 0xa9: case 0xaa: case 0xab:
1481   case 0xac: case 0xad: case 0xae: case 0xaf:
1482   case 0xb0: case 0xb1: case 0xb2: case 0xb3:
1483   case 0xb4: case 0xb5: case 0xb6: case 0xb7:
1484   case 0xb8: case 0xb9: case 0xba: case 0xbb:
1485   case 0xbc: case 0xbd: case 0xbe: case 0xbf:
1486      iT();
1487      break;
1470    case 0x80: case 0x81: case 0x82: case 0x83:
1471    case 0x84: case 0x85: case 0x86: case 0x87:
1472    case 0x88: case 0x89: case 0x8a: case 0x8b:
1473    case 0x8c: case 0x8d: case 0x8e: case 0x8f:
1474    case 0x90: case 0x91: case 0x92: case 0x93:
1475    case 0x94: case 0x95: case 0x96: case 0x97:
1476    case 0x98: case 0x99: case 0x9a: case 0x9b:
1477    case 0x9c: case 0x9d: case 0x9e: case 0x9f:
1478    case 0xa0: case 0xa1: case 0xa2: case 0xa3:
1479    case 0xa4: case 0xa5: case 0xa6: case 0xa7:
1480    case 0xa8: case 0xa9: case 0xaa: case 0xab:
1481    case 0xac: case 0xad: case 0xae: case 0xaf:
1482    case 0xb0: case 0xb1: case 0xb2: case 0xb3:
1483    case 0xb4: case 0xb5: case 0xb6: case 0xb7:
1484    case 0xb8: case 0xb9: case 0xba: case 0xbb:
1485    case 0xbc: case 0xbd: case 0xbe: case 0xbf:
1486        iT();
1487        break;
14881488
14891489
1490   case 0xc0: case 0xc1: case 0xc2: case 0xc3:
1491   case 0xc4: case 0xc5: case 0xc6: case 0xc7:
1492   case 0xc8: case 0xc9: case 0xca: case 0xcb:
1493   case 0xcc: case 0xcd: case 0xce: case 0xcf:
1494      iLB();
1495      break;
1490    case 0xc0: case 0xc1: case 0xc2: case 0xc3:
1491    case 0xc4: case 0xc5: case 0xc6: case 0xc7:
1492    case 0xc8: case 0xc9: case 0xca: case 0xcb:
1493    case 0xcc: case 0xcd: case 0xce: case 0xcf:
1494        iLB();
1495        break;
14961496
1497   default:
1498      iTM();
1499   }
1497    default:
1498        iTM();
1499    }
15001500}
15011501
15021502void pps4_device::execute_run()
15031503{
1504   do
1505   {
1506      debugger_instruction_hook(this, m_P);
1507      execute_one();
1504    do
1505    {
1506        debugger_instruction_hook(this, m_P);
1507        execute_one();
15081508
1509   } while (m_icount > 0);
1509    } while (m_icount > 0);
15101510}
15111511
15121512/***************************************************************************
r242703r242704
15151515
15161516void pps4_device::device_start()
15171517{
1518   m_program = &space(AS_PROGRAM);
1519   m_direct = &m_program->direct();
1520   m_data = &space(AS_DATA);
1521   m_io = &space(AS_IO);
1518    m_program = &space(AS_PROGRAM);
1519    m_direct = &m_program->direct();
1520    m_data = &space(AS_DATA);
1521    m_io = &space(AS_IO);
15221522
1523   save_item(NAME(m_A));
1524   save_item(NAME(m_X));
1525   save_item(NAME(m_P));
1526   save_item(NAME(m_SA));
1527   save_item(NAME(m_SB));
1528   save_item(NAME(m_Skip));
1529   save_item(NAME(m_SAG));
1530   save_item(NAME(m_B));
1531   save_item(NAME(m_C));
1532   save_item(NAME(m_FF1));
1533   save_item(NAME(m_FF2));
1534   save_item(NAME(m_I1));
1535   save_item(NAME(m_I2));
1536   save_item(NAME(m_Ip));
1523    save_item(NAME(m_A));
1524    save_item(NAME(m_X));
1525    save_item(NAME(m_P));
1526    save_item(NAME(m_SA));
1527    save_item(NAME(m_SB));
1528    save_item(NAME(m_Skip));
1529    save_item(NAME(m_SAG));
1530    save_item(NAME(m_B));
1531    save_item(NAME(m_C));
1532    save_item(NAME(m_FF1));
1533    save_item(NAME(m_FF2));
1534    save_item(NAME(m_I1));
1535    save_item(NAME(m_I2));
1536    save_item(NAME(m_Ip));
15371537
1538   state_add( PPS4_PC, "PC", m_P ).mask(0xFFF).formatstr("%03X");
1539   state_add( PPS4_A, "A",  m_A ).formatstr("%01X");
1540   state_add( PPS4_X, "X",  m_X ).formatstr("%01X");
1541   state_add( PPS4_SA, "SA", m_SA ).formatstr("%03X");
1542   state_add( PPS4_SB, "SB", m_SB ).formatstr("%03X");
1543   state_add( PPS4_Skip, "Skip",  m_Skip ).formatstr("%01X");
1544   state_add( PPS4_SAG, "SAG",  m_SAG ).formatstr("%03X");
1545   state_add( PPS4_B, "B",  m_B ).formatstr("%03X");
1546   state_add( PPS4_I1, "I1",  m_I1 ).formatstr("%02X").noshow();
1547   state_add( PPS4_I2, "I2",  m_I2 ).formatstr("%02X").noshow();
1548   state_add( PPS4_Ip, "Ip",  m_Ip ).formatstr("%02X").noshow();
1549   state_add( STATE_GENPC,    "GENPC", m_P ).noshow();
1550   state_add( STATE_GENFLAGS, "GENFLAGS", m_C).formatstr("%3s").noshow();
1538    state_add( PPS4_PC, "PC", m_P ).mask(0xFFF).formatstr("%03X");
1539    state_add( PPS4_A, "A",  m_A ).formatstr("%01X");
1540    state_add( PPS4_X, "X",  m_X ).formatstr("%01X");
1541    state_add( PPS4_SA, "SA", m_SA ).formatstr("%03X");
1542    state_add( PPS4_SB, "SB", m_SB ).formatstr("%03X");
1543    state_add( PPS4_Skip, "Skip",  m_Skip ).formatstr("%01X");
1544    state_add( PPS4_SAG, "SAG",  m_SAG ).formatstr("%03X");
1545    state_add( PPS4_B, "B",  m_B ).formatstr("%03X");
1546    state_add( PPS4_I1, "I1",  m_I1 ).formatstr("%02X").noshow();
1547    state_add( PPS4_I2, "I2",  m_I2 ).formatstr("%02X").noshow();
1548    state_add( PPS4_Ip, "Ip",  m_Ip ).formatstr("%02X").noshow();
1549    state_add( STATE_GENPC,    "GENPC", m_P ).noshow();
1550    state_add( STATE_GENFLAGS, "GENFLAGS", m_C).formatstr("%3s").noshow();
15511551
1552   m_icountptr = &m_icount;
1552    m_icountptr = &m_icount;
15531553}
15541554
15551555void pps4_device::state_string_export(const device_state_entry &entry, astring &string)
15561556{
1557   switch (entry.index())
1558   {
1559      case STATE_GENFLAGS:
1560         string.printf("%c%c%c",
1561            m_C ? 'C':'.',
1562            m_FF1 ? '1':'.',
1563            m_FF2 ? '2':'.');
1564         break;
1565   }
1557    switch (entry.index())
1558    {
1559        case STATE_GENFLAGS:
1560            string.printf("%c%c%c",
1561                m_C ? 'C':'.',
1562                m_FF1 ? '1':'.',
1563                m_FF2 ? '2':'.');
1564            break;
1565    }
15661566}
15671567
15681568/***************************************************************************
r242703r242704
15711571
15721572void pps4_device::device_reset()
15731573{
1574   m_A = 0;        // Accumulator A(4:1)
1575   m_X = 0;        // X register X(4:1)
1576   m_P = 0;        // program counter P(12:1)
1577   m_SA = 0;       // Shift register SA(12:1)
1578   m_SB = 0;       // Shift register SB(12:1)
1579   m_SAG = 0;      // Special address generation mask
1580   m_B = 0;        // B address register B(12:1) (BL, BM and BU)
1581   m_C = 0;        // Carry flip-flop
1582   m_FF1 = 0;      // Flip-flop 1
1583   m_FF2 = 0;      // Flip-flop 2
1584   m_I1 = 0;        // Most recent instruction I(8:1)
1585   m_I2 = 0;       // Most recent parameter I2(8:1)
1586   m_Ip = 0;       // Previous instruction I(8:1)
1574    m_A = 0;        // Accumulator A(4:1)
1575    m_X = 0;        // X register X(4:1)
1576    m_P = 0;        // program counter P(12:1)
1577    m_SA = 0;       // Shift register SA(12:1)
1578    m_SB = 0;       // Shift register SB(12:1)
1579    m_SAG = 0;      // Special address generation mask
1580    m_B = 0;        // B address register B(12:1) (BL, BM and BU)
1581    m_C = 0;        // Carry flip-flop
1582    m_FF1 = 0;      // Flip-flop 1
1583    m_FF2 = 0;      // Flip-flop 2
1584    m_I1 = 0;        // Most recent instruction I(8:1)
1585    m_I2 = 0;       // Most recent parameter I2(8:1)
1586    m_Ip = 0;       // Previous instruction I(8:1)
15871587}
trunk/src/emu/cpu/pps4/pps4.h
r242703r242704
99***************************************************************************/
1010enum
1111{
12   PPS4_PC,
13   PPS4_A,
14   PPS4_X,
15   PPS4_SA,
16   PPS4_SB,
17   PPS4_B,
18   PPS4_Skip,
19   PPS4_SAG,
20   PPS4_I1,
21   PPS4_I2,
22   PPS4_Ip,
23   PPS4_GENPC = STATE_GENPC,
24   PPS4_GENSP = STATE_GENSP,
25   PPS4_GENPCBASE = STATE_GENPCBASE,
26   PPS4_PORT_A = 256,
27   PPS4_PORT_B = 257
12    PPS4_PC,
13    PPS4_A,
14    PPS4_X,
15    PPS4_SA,
16    PPS4_SB,
17    PPS4_B,
18    PPS4_Skip,
19    PPS4_SAG,
20    PPS4_I1,
21    PPS4_I2,
22    PPS4_Ip,
23    PPS4_GENPC = STATE_GENPC,
24    PPS4_GENSP = STATE_GENSP,
25    PPS4_GENPCBASE = STATE_GENPCBASE,
26    PPS4_PORT_A = 256,
27    PPS4_PORT_B = 257
2828};
2929
3030/***************************************************************************
r242703r242704
4040class pps4_device : public cpu_device
4141{
4242public:
43   // construction/destruction
44   pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
43    // construction/destruction
44    pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4545
4646protected:
47   // device-level overrides
48   virtual void device_start();
49   virtual void device_reset();
47    // device-level overrides
48    virtual void device_start();
49    virtual void device_reset();
5050
51   // device_execute_interface overrides
52   virtual UINT32 execute_min_cycles() const { return 1; }
53   virtual UINT32 execute_max_cycles() const { return 3; }
54   virtual UINT32 execute_input_lines() const { return 0; }
55   virtual UINT32 execute_default_irq_vector() const { return 0; }
56   virtual void execute_run();
51    // device_execute_interface overrides
52    virtual UINT32 execute_min_cycles() const { return 1; }
53    virtual UINT32 execute_max_cycles() const { return 3; }
54    virtual UINT32 execute_input_lines() const { return 0; }
55    virtual UINT32 execute_default_irq_vector() const { return 0; }
56    virtual void execute_run();
5757
58   // device_memory_interface overrides
59   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
60   {
61      return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
62   }
58    // device_memory_interface overrides
59    virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
60    {
61        return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
62    }
6363
64   // device_state_interface overrides
65   void state_string_export(const device_state_entry &entry, astring &string);
64    // device_state_interface overrides
65    void state_string_export(const device_state_entry &entry, astring &string);
6666
67   // device_disasm_interface overrides
68   virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
69   virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
70   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
67    // device_disasm_interface overrides
68    virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
69    virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
70    virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
7171
7272private:
73   address_space_config m_program_config;
74   address_space_config m_data_config;
75   address_space_config m_io_config;
73    address_space_config m_program_config;
74    address_space_config m_data_config;
75    address_space_config m_io_config;
7676
77   address_space *m_program;
78   direct_read_data *m_direct;
79   address_space *m_data;
80   address_space *m_io;
81   int     m_icount;
77    address_space *m_program;
78    direct_read_data *m_direct;
79    address_space *m_data;
80    address_space *m_io;
81    int     m_icount;
8282
83   UINT8   m_A;        //!< Accumulator A(4:1)
84   UINT8   m_X;        //!< X register X(4:1)
85   UINT16  m_P;        //!< program counter P(12:1)
86   UINT16  m_SA;       //!< Shift register SA(12:1)
87   UINT16  m_SB;       //!< Shift register SB(12:1)
88   UINT8   m_Skip;     //!< Skip next instruction
89   UINT16  m_SAG;      //!< Special address generation mask
90   UINT16  m_B;        //!< B register B(12:1) (BL, BM and BH)
91   UINT8   m_C;        //!< Carry flip-flop
92   UINT8   m_FF1;      //!< Flip-flop 1
93   UINT8   m_FF2;      //!< Flip-flop 2
94   UINT8   m_I1;        //!< Most recent instruction I(8:1)
95   UINT8   m_I2;       //!< Most recent parameter I2(8:1)
96   UINT8   m_Ip;       //!< Previous instruction I(8:1)
83    UINT8   m_A;        //!< Accumulator A(4:1)
84    UINT8   m_X;        //!< X register X(4:1)
85    UINT16  m_P;        //!< program counter P(12:1)
86    UINT16  m_SA;       //!< Shift register SA(12:1)
87    UINT16  m_SB;       //!< Shift register SB(12:1)
88    UINT8   m_Skip;     //!< Skip next instruction
89    UINT16  m_SAG;      //!< Special address generation mask
90    UINT16  m_B;        //!< B register B(12:1) (BL, BM and BH)
91    UINT8   m_C;        //!< Carry flip-flop
92    UINT8   m_FF1;      //!< Flip-flop 1
93    UINT8   m_FF2;      //!< Flip-flop 2
94    UINT8   m_I1;        //!< Most recent instruction I(8:1)
95    UINT8   m_I2;       //!< Most recent parameter I2(8:1)
96    UINT8   m_Ip;       //!< Previous instruction I(8:1)
9797
98   //! return the contents of B register (made of BU, BM and BL)
99   inline UINT16 B() const;
98    //! return the contents of B register (made of BU, BM and BL)
99    inline UINT16 B() const;
100100
101   //! return memory at address B(12:1)
102   inline UINT8 M();
101    //! return memory at address B(12:1)
102    inline UINT8 M();
103103
104   //! write to memory at address B(12:1)
105   inline void W(UINT8 data);
104    //! write to memory at address B(12:1)
105    inline void W(UINT8 data);
106106
107   //! return the next opcode (also in m_I)
108   inline UINT8 ROP();
107    //! return the next opcode (also in m_I)
108    inline UINT8 ROP();
109109
110   //! return the next argument (also in m_I2)
111   inline UINT8 ARG();
110    //! return the next argument (also in m_I2)
111    inline UINT8 ARG();
112112
113   void iAD();          //!< Add
114   void iADC();         //!< Add with carry-in
115   void iADSK();        //!< Add and skip on carry-out
116   void iADCSK();       //!< Add with carry-in and skip on carry-out
117   void iADI();         //!< Add immediate
118   void iDC();          //!< Decimal correction
119   void iAND();         //!< Logical AND
120   void iOR();          //!< Logical OR
121   void iEOR();         //!< Logical Exclusive-OR
122   void iCOMP();        //!< Complement
123   void iSC();          //!< Set Carry flip-flop
124   void iRC();          //!< Reset Carry flip-flop
125   void iSF1();         //!< Set FF1
126   void iRF1();         //!< Reset FF1
127   void iSF2();         //!< Set FF2
128   void iRF2();         //!< Reset FF2
129   void iLD();          //!< Load accumulator from memory
130   void iEX();          //!< Exchange accumulator and memory
131   void iEXD();         //!< Exchange accumulator and memory and decrement BL
132   void iLDI();         //!< Load accumulator immediate
133   void iLAX();         //!< Load accumulator from X register
134   void iLXA();         //!< Load X register from accumulator
135   void iLABL();        //!< Load accumulator with BL
136   void iLBMX();        //!< Load BM with X
137   void iLBUA();        //!< Load BU with A
138   void iXABL();        //!< Exchange accumulator and BL
139   void iXBMX();        //!< Exchange BM and X registers
140   void iXAX();         //!< Exchange accumulator and X
141   void iXS();          //!< Eychange SA and SB registers
142   void iCYS();         //!< Cycle SA register and accumulaor
143   void iLB();          //!< Load B indirect
144   void iLBL();         //!< Load B long
145   void iINCB();        //!< Increment BL
146   void iDECB();        //!< Decrement BL
147   void iT();           //!< Transfer
148   void iTM();          //!< Transfer and mark indirect
149   void iTL();          //!< Transfer long
150   void iTML();         //!< Transfer and mark long
151   void iSKC();         //!< Skip on carry flip-flop
152   void iSKZ();         //!< Skip on accumulator zero
153   void iSKBI();        //!< Skip if BL equal to immediate
154   void iSKF1();        //!< Skip if FF1 equals 1
155   void iSKF2();        //!< Skip if FF2 equals 1
156   void iRTN();         //!< Return
157   void iRTNSK();       //!< Return and skip
158   void iIOL();         //!< Input/Output long
159   void iDIA();         //!< Discrete input group A
160   void iDIB();         //!< Discrete input group B
161   void iDOA();         //!< Discrete output group A
162   void iSAG();         //!< Special address generation
113    void iAD();          //!< Add
114    void iADC();         //!< Add with carry-in
115    void iADSK();        //!< Add and skip on carry-out
116    void iADCSK();       //!< Add with carry-in and skip on carry-out
117    void iADI();         //!< Add immediate
118    void iDC();          //!< Decimal correction
119    void iAND();         //!< Logical AND
120    void iOR();          //!< Logical OR
121    void iEOR();         //!< Logical Exclusive-OR
122    void iCOMP();        //!< Complement
123    void iSC();          //!< Set Carry flip-flop
124    void iRC();          //!< Reset Carry flip-flop
125    void iSF1();         //!< Set FF1
126    void iRF1();         //!< Reset FF1
127    void iSF2();         //!< Set FF2
128    void iRF2();         //!< Reset FF2
129    void iLD();          //!< Load accumulator from memory
130    void iEX();          //!< Exchange accumulator and memory
131    void iEXD();         //!< Exchange accumulator and memory and decrement BL
132    void iLDI();         //!< Load accumulator immediate
133    void iLAX();         //!< Load accumulator from X register
134    void iLXA();         //!< Load X register from accumulator
135    void iLABL();        //!< Load accumulator with BL
136    void iLBMX();        //!< Load BM with X
137    void iLBUA();        //!< Load BU with A
138    void iXABL();        //!< Exchange accumulator and BL
139    void iXBMX();        //!< Exchange BM and X registers
140    void iXAX();         //!< Exchange accumulator and X
141    void iXS();          //!< Eychange SA and SB registers
142    void iCYS();         //!< Cycle SA register and accumulaor
143    void iLB();          //!< Load B indirect
144    void iLBL();         //!< Load B long
145    void iINCB();        //!< Increment BL
146    void iDECB();        //!< Decrement BL
147    void iT();           //!< Transfer
148    void iTM();          //!< Transfer and mark indirect
149    void iTL();          //!< Transfer long
150    void iTML();         //!< Transfer and mark long
151    void iSKC();         //!< Skip on carry flip-flop
152    void iSKZ();         //!< Skip on accumulator zero
153    void iSKBI();        //!< Skip if BL equal to immediate
154    void iSKF1();        //!< Skip if FF1 equals 1
155    void iSKF2();        //!< Skip if FF2 equals 1
156    void iRTN();         //!< Return
157    void iRTNSK();       //!< Return and skip
158    void iIOL();         //!< Input/Output long
159    void iDIA();         //!< Discrete input group A
160    void iDIB();         //!< Discrete input group B
161    void iDOA();         //!< Discrete output group A
162    void iSAG();         //!< Special address generation
163163
164   void execute_one(); //!< execute one instruction
164    void execute_one(); //!< execute one instruction
165165};
166166
167167#endif  // __PPS4_H__
trunk/src/emu/cpu/pps4/pps4dasm.c
r242703r242704
1616#define ARG(A)  opram[(A) - PC]
1717
1818typedef enum pps4_token_e {
19   t_AD,       t_ADC,      t_ADSK,     t_ADCSK,    t_ADI,
20   t_DC,       t_AND,      t_OR,       t_EOR,      t_COMP,
21   t_SC,       t_RC,       t_SF1,      t_RF1,      t_SF2,
22   t_RF2,      t_LD,       t_EX,       t_EXD,      t_LDI,
23   t_LAX,      t_LXA,      t_LABL,     t_LBMX,     t_LBUA,
24   t_XABL,     t_XBMX,     t_XAX,      t_XS,       t_CYS,
25   t_LB,       t_LBL,      t_INCB,     t_DECB,     t_T,
26   t_TM,       t_TL,       t_TML,      t_SKC,      t_SKZ,
27   t_SKBI,     t_SKF1,     t_SKF2,     t_RTN,      t_RTNSK,
28   t_IOL,      t_DIA,      t_DIB,      t_DOA,      t_SAG,
29   t_COUNT,
30   t_MASK = (1 << 6) - 1,
31   t_I3c  = 1 <<  6,   /* immediate 3 bit constant, complemented */
32   t_I4   = 1 <<  7,   /* immediate 4 bit constant */
33   t_I4c  = 1 <<  8,   /* immediate 4 bit constant, complemented */
34   t_I4p  = 1 <<  9,   /* immediate 4 bit offset into page 3 */
35   t_I6p  = 1 << 10,   /* immediate 6 bit constant; address in current page */
36   t_I6i  = 1 << 11,   /* immediate 6 bit indirect page 3 offset (16 ... 63) + followed by page 1 address */
37   t_I8   = 1 << 12,   /* immediate 8 bit constant (I/O port number) */
38   t_I8c  = 1 << 13,   /* immediate 8 bit constant inverted */
39   t_OVER = 1 << 14,   /* Debugger step over (CALL) */
40   t_OUT  = 1 << 15    /* Debugger step out (RETURN) */
19    t_AD,       t_ADC,      t_ADSK,     t_ADCSK,    t_ADI,
20    t_DC,       t_AND,      t_OR,       t_EOR,      t_COMP,
21    t_SC,       t_RC,       t_SF1,      t_RF1,      t_SF2,
22    t_RF2,      t_LD,       t_EX,       t_EXD,      t_LDI,
23    t_LAX,      t_LXA,      t_LABL,     t_LBMX,     t_LBUA,
24    t_XABL,     t_XBMX,     t_XAX,      t_XS,       t_CYS,
25    t_LB,       t_LBL,      t_INCB,     t_DECB,     t_T,
26    t_TM,       t_TL,       t_TML,      t_SKC,      t_SKZ,
27    t_SKBI,     t_SKF1,     t_SKF2,     t_RTN,      t_RTNSK,
28    t_IOL,      t_DIA,      t_DIB,      t_DOA,      t_SAG,
29    t_COUNT,
30    t_MASK = (1 << 6) - 1,
31    t_I3c  = 1 <<  6,   /* immediate 3 bit constant, complemented */
32    t_I4   = 1 <<  7,   /* immediate 4 bit constant */
33    t_I4c  = 1 <<  8,   /* immediate 4 bit constant, complemented */
34    t_I4p  = 1 <<  9,   /* immediate 4 bit offset into page 3 */
35    t_I6p  = 1 << 10,   /* immediate 6 bit constant; address in current page */
36    t_I6i  = 1 << 11,   /* immediate 6 bit indirect page 3 offset (16 ... 63) + followed by page 1 address */
37    t_I8   = 1 << 12,   /* immediate 8 bit constant (I/O port number) */
38    t_I8c  = 1 << 13,   /* immediate 8 bit constant inverted */
39    t_OVER = 1 << 14,   /* Debugger step over (CALL) */
40    t_OUT  = 1 << 15    /* Debugger step out (RETURN) */
4141}   pps4_token_e;
4242
4343static const char *token_str[t_COUNT] = {
44   "ad",           /* add */
45   "adc",          /* add with carry-in */
46   "adsk",         /* add and skip on carry-out */
47   "adcsk",        /* add with carry-in and skip on carry-out */
48   "adi",          /* add immediate */
49   "dc",           /* decimal correction */
50   "and",          /* logical and */
51   "or",           /* logical or */
52   "eor",          /* logical exclusive-orf */
53   "comp",         /* complement */
54   "sc",           /* set C flip-flop */
55   "rc",           /* reset C flip-flop */
56   "sf1",          /* set FF1 flip-flop */
57   "rf1",          /* reset FF1 flip-flop */
58   "sf2",          /* set FF2 flip-flop */
59   "rf2",          /* reset FF2 flip-flop */
60   "ld",           /* load accumulator from memory */
61   "ex",           /* exchange accumulator and memory */
62   "exd",          /* exchange accumulator and memory and decrement BL */
63   "ldi",          /* load accumulator immediate */
64   "lax",          /* load accumulator from X register */
65   "lxa",          /* load X register from accumulator */
66   "labl",         /* load accumulator with BL */
67   "lbmx",         /* load BM with X */
68   "lbua",         /* load BU with A */
69   "xabl",         /* exchange accumulator and BL */
70   "xbmx",         /* exchange BM and X */
71   "xax",          /* exchange accumulator and X */
72   "xs",           /* exchange SA and SB */
73   "cys",          /* cycle SA register and accumulator */
74   "lb",           /* load B indirect */
75   "lbl",          /* load B long */
76   "incb",         /* increment BL */
77   "decb",         /* decrement BL */
78   "t",            /* transfer */
79   "tm",           /* transfer and mark indirect */
80   "tl",           /* transfer long */
81   "tml",          /* transfer and mark long */
82   "skc",          /* skip on C flip-flop equals 1 */
83   "skz",          /* skip on accumulator zero */
84   "skbi",         /* skip on BL equal to immediate */
85   "skf1",         /* skip on FF1 flip-flop equals 1 */
86   "skf2",         /* skip on FF2 flip-flop equals 1 */
87   "rtn",          /* return */
88   "rtnsk",        /* return and skip */
89   "iol",          /* input/output long */
90   "dia",          /* discrete input group A */
91   "dib",          /* discrete input group B */
92   "doa",          /* discrete output */
93   "sag"           /* special address generation */
44    "ad",           /* add */
45    "adc",          /* add with carry-in */
46    "adsk",         /* add and skip on carry-out */
47    "adcsk",        /* add with carry-in and skip on carry-out */
48    "adi",          /* add immediate */
49    "dc",           /* decimal correction */
50    "and",          /* logical and */
51    "or",           /* logical or */
52    "eor",          /* logical exclusive-orf */
53    "comp",         /* complement */
54    "sc",           /* set C flip-flop */
55    "rc",           /* reset C flip-flop */
56    "sf1",          /* set FF1 flip-flop */
57    "rf1",          /* reset FF1 flip-flop */
58    "sf2",          /* set FF2 flip-flop */
59    "rf2",          /* reset FF2 flip-flop */
60    "ld",           /* load accumulator from memory */
61    "ex",           /* exchange accumulator and memory */
62    "exd",          /* exchange accumulator and memory and decrement BL */
63    "ldi",          /* load accumulator immediate */
64    "lax",          /* load accumulator from X register */
65    "lxa",          /* load X register from accumulator */
66    "labl",         /* load accumulator with BL */
67    "lbmx",         /* load BM with X */
68    "lbua",         /* load BU with A */
69    "xabl",         /* exchange accumulator and BL */
70    "xbmx",         /* exchange BM and X */
71    "xax",          /* exchange accumulator and X */
72    "xs",           /* exchange SA and SB */
73    "cys",          /* cycle SA register and accumulator */
74    "lb",           /* load B indirect */
75    "lbl",          /* load B long */
76    "incb",         /* increment BL */
77    "decb",         /* decrement BL */
78    "t",            /* transfer */
79    "tm",           /* transfer and mark indirect */
80    "tl",           /* transfer long */
81    "tml",          /* transfer and mark long */
82    "skc",          /* skip on C flip-flop equals 1 */
83    "skz",          /* skip on accumulator zero */
84    "skbi",         /* skip on BL equal to immediate */
85    "skf1",         /* skip on FF1 flip-flop equals 1 */
86    "skf2",         /* skip on FF2 flip-flop equals 1 */
87    "rtn",          /* return */
88    "rtnsk",        /* return and skip */
89    "iol",          /* input/output long */
90    "dia",          /* discrete input group A */
91    "dib",          /* discrete input group B */
92    "doa",          /* discrete output */
93    "sag"           /* special address generation */
9494};
9595
9696static const UINT16 table[] = {
r242703r242704
369369
370370CPU_DISASSEMBLE( pps4 )
371371{
372   UINT32 flags = 0;
373   unsigned PC = pc;
374   UINT8 op = OP(pc++);
375   UINT32 tok = table[op];
376   char *dst = 0;
372    UINT32 flags = 0;
373    unsigned PC = pc;
374    UINT8 op = OP(pc++);
375    UINT32 tok = table[op];
376    char *dst = 0;
377377
378   if (0 == (tok & t_MASK)) {
379      sprintf(buffer, "%s", token_str[tok & t_MASK]);
380   } else {
381      dst = buffer + sprintf(buffer, "%-7s", token_str[tok & t_MASK]);
382   }
378    if (0 == (tok & t_MASK)) {
379        sprintf(buffer, "%s", token_str[tok & t_MASK]);
380    } else {
381        dst = buffer + sprintf(buffer, "%-7s", token_str[tok & t_MASK]);
382    }
383383
384   if (tok & t_I3c) {
385      // 3 bit immediate, complemented
386      UINT8 i = ~op & 7;
387      if (0 != i)  // only print if non-zero
388         dst += sprintf(dst, "%x", i);
389   }
384    if (tok & t_I3c) {
385        // 3 bit immediate, complemented
386        UINT8 i = ~op & 7;
387        if (0 != i)  // only print if non-zero
388            dst += sprintf(dst, "%x", i);
389    }
390390
391   if (tok & t_I4) {
392      // 4 bit immediate
393      UINT8 i = op & 15;
394      dst += sprintf(dst, "%x", i);
395   }
391    if (tok & t_I4) {
392        // 4 bit immediate
393        UINT8 i = op & 15;
394        dst += sprintf(dst, "%x", i);
395    }
396396
397   if (tok & t_I4c) {
398      // 4 bit immediate, complemented
399      UINT8 i = ~op & 15;
400      dst += sprintf(dst, "%x", i);
401   }
397    if (tok & t_I4c) {
398        // 4 bit immediate, complemented
399        UINT8 i = ~op & 15;
400        dst += sprintf(dst, "%x", i);
401    }
402402
403   if (tok & t_I4p) {
404      // 4 bit immediate offset into page 3
405      UINT8 i = op & 15;
406      dst += sprintf(dst, "[%x]", 0x0c0 | i);
407   }
403    if (tok & t_I4p) {
404        // 4 bit immediate offset into page 3
405        UINT8 i = op & 15;
406        dst += sprintf(dst, "[%x]", 0x0c0 | i);
407    }
408408
409   if (tok & t_I6p) {
410      // 6 bit immediate offset into current page
411      UINT8 i = op & 63;
412      dst += sprintf(dst, "%x", (PC & ~63) | i);
413   }
409    if (tok & t_I6p) {
410        // 6 bit immediate offset into current page
411        UINT8 i = op & 63;
412        dst += sprintf(dst, "%x", (PC & ~63) | i);
413    }
414414
415   if (tok & t_I6i) {
416      // 6 bit immediate offset into page 3
417      UINT16 i6p3 = (3 << 6) | (op & 63);
418      // 8 bit absolute offset at 0x0100
419      UINT16 addr = (1 << 8) | 0;     // ROM[ip3] can't be reached!?
420      (void)addr; // avoid unused variable warning
421      dst += sprintf(dst, "[%x]", i6p3);
422   }
415    if (tok & t_I6i) {
416        // 6 bit immediate offset into page 3
417        UINT16 i6p3 = (3 << 6) | (op & 63);
418        // 8 bit absolute offset at 0x0100
419        UINT16 addr = (1 << 8) | 0;     // ROM[ip3] can't be reached!?
420        (void)addr; // avoid unused variable warning
421        dst += sprintf(dst, "[%x]", i6p3);
422    }
423423
424   if (tok & t_I8) {
425      // 8 bit immediate I/O port address
426      UINT8 arg = ARG(pc++);
427      dst += sprintf(dst, "%02x", arg);
428   }
424    if (tok & t_I8) {
425        // 8 bit immediate I/O port address
426        UINT8 arg = ARG(pc++);
427        dst += sprintf(dst, "%02x", arg);
428    }
429429
430   if (tok & t_I8c) {
431      // 8 bit immediate offset into page
432      UINT16 arg = ~ARG(pc++) & 255;
433      dst += sprintf(dst, "%02x", arg);
434   }
430    if (tok & t_I8c) {
431        // 8 bit immediate offset into page
432        UINT16 arg = ~ARG(pc++) & 255;
433        dst += sprintf(dst, "%02x", arg);
434    }
435435
436   if (tok & t_OVER)  // TL or TML
437         flags |= DASMFLAG_STEP_OVER;
436    if (tok & t_OVER)  // TL or TML
437            flags |= DASMFLAG_STEP_OVER;
438438
439   if (tok & t_OUT)   // RTN or RTNSK
440         flags |= DASMFLAG_STEP_OUT;
439    if (tok & t_OUT)   // RTN or RTNSK
440            flags |= DASMFLAG_STEP_OUT;
441441
442   return (pc - PC) | flags | DASMFLAG_SUPPORTED;
442    return (pc - PC) | flags | DASMFLAG_SUPPORTED;
443443}
trunk/src/emu/cpu/sh2/sh2comn.c
r242703r242704
699699   case 0x00:
700700      break;
701701   case 0x01:
702//      return m_m[1] | 0; // bit31 is TDRE: Trasmit Data Register Empty. Forcing it to be '1' breaks Saturn ...
702//      return m_m[1] | 0; // bit31 is TDRE: Trasmit Data Register Empty. Forcing it to be '1' breaks Saturn ...
703703      return m_m[1] | (0x84 << 24); // ... but this is actually needed to make EGWord on SS to boot?
704704
705705   case 0x04: // TIER, FTCSR, FRC
trunk/src/emu/cpu/tms0980/tms0980.c
r242703r242704
250250
251251
252252static MACHINE_CONFIG_FRAGMENT(tms1000)
253
253   
254254   // microinstructions PLA, output PLA
255255   MCFG_PLA_ADD("mpla", 8, 16, 30)
256256   MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
r242703r242704
374374   m_r_mask = (1 << m_r_pins) - 1;
375375   m_pc_mask = (1 << m_pc_bits) - 1;
376376   m_x_mask = (1 << m_x_bits) - 1;
377
377   
378378   // zerofill
379379   m_pc = 0;
380380   m_sr = 0;
r242703r242704
401401   m_clatch = 0;
402402   m_add = 0;
403403   m_bl = 0;
404
404   
405405   m_ram_in = 0;
406406   m_dam_in = 0;
407407   m_ram_out = 0;
r242703r242704
484484   m_o_latch_low = 0;
485485   m_o_latch = 0;
486486   m_o_latch_prev = 0;
487
487   
488488   // register for savestates
489489   save_item(NAME(m_r_prev));
490490   save_item(NAME(m_chipsel));
r242703r242704
535535{
536536   // common reset
537537   tms1xxx_cpu_device::device_reset();
538
538   
539539   // pre-decode instructionset
540540   m_fixed_decode.resize_and_clear(0x100);
541541   m_micro_decode.resize_and_clear(0x100);
542
542   
543543   for (int op = 0; op < 0x100; op++)
544544   {
545545      //                                              _____              _____  ______  _____  ______  _____  _____  _____  _____
546546      const UINT32 md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
547547      UINT16 mask = m_mpla->read(op);
548548      mask ^= 0x3fc8; // invert active-negative
549
549     
550550      for (int bit = 0; bit < 16; bit++)
551551         if (mask & (1 << bit))
552552            m_micro_decode[op] |= md[bit];
r242703r242704
559559   m_fixed_decode[0x0c] = F_RSTR;
560560   m_fixed_decode[0x0d] = F_SETR;
561561   m_fixed_decode[0x0f] = F_RETN;
562
562   
563563   for (int i = 0x10; i < 0x20; i++) m_fixed_decode[i] = F_LDP;
564564   for (int i = 0x30; i < 0x34; i++) m_fixed_decode[i] = F_SBIT;
565565   for (int i = 0x34; i < 0x38; i++) m_fixed_decode[i] = F_RBIT;
r242703r242704
572572void tms1100_cpu_device::device_reset()
573573{
574574   tms1000_cpu_device::device_reset();
575
575   
576576   // small differences in 00-3f area
577577   m_fixed_decode[0x00] = 0;
578578   m_fixed_decode[0x09] = F_COMX8; // !
r242703r242704
597597      // upper half of the opcodes is always branch/call
598598      if (op & 0x80)
599599         m_fixed_decode[op] = (op & 0x40) ? F_CALL: F_BR;
600
600     
601601      // 5 output bits select a microinstruction index
602602      UINT32 imask = m_ipla->read(op);
603603      UINT8 msel = imask & 0x1f;
604
604     
605605      // but if (from bottom to top) term 1 is active and output bit 5 is 0, R2,R4-R7 directly select a microinstruction index
606606      if (imask & 0x40 && (imask & 0x20) == 0)
607607         msel = (op & 0xf) | (op >> 1 & 0x10);
608
608     
609609      msel = BITSWAP8(msel,7,6,5,0,1,2,3,4); // lines are reversed
610610      UINT32 mmask = m_mpla->read(msel);
611611      mmask ^= 0x09fe; // invert active-negative
612
612     
613613      //                             _____  _____  _____  _____  ______  _____  ______  _____              _____
614614      const UINT32 md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
615615
616616      for (int bit = 0; bit < 15; bit++)
617617         if (mmask & (1 << bit))
618618            m_micro_decode[op] |= md[bit];
619
619     
620620      // the other ipla terms each select a fixed instruction
621621      const UINT32 id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
622
622     
623623      for (int bit = 0; bit < 8; bit++)
624624         if (imask & (0x80 << bit))
625625            m_fixed_decode[op] |= id[bit];
r242703r242704
630630UINT32 tms0980_cpu_device::decode_micro(UINT8 sel)
631631{
632632   UINT32 decode = 0;
633
633   
634634   sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
635635   UINT32 mask = m_mpla->read(sel);
636636   mask ^= 0x43fc3; // invert active-negative
637
637   
638638   // M_RSTR is specific to TMS02x0, it redirects to F_RSTR
639639   // M_UNK1 is specific to TMS0270, unknown yet
640640   //                      _______  ______                                _____  _____  _____  _____  ______  _____  ______  _____                            _____
641641   const UINT32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
642
642   
643643   for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
644644      if (mask & (1 << bit))
645645         decode |= md[bit];
646
646   
647647   return decode;
648648}
649649
r242703r242704
651651{
652652   // common reset
653653   tms1xxx_cpu_device::device_reset();
654
654   
655655   // pre-decode instructionset
656656   m_fixed_decode.resize_and_clear(0x200);
657657   m_micro_decode.resize_and_clear(0x200);
r242703r242704
661661      // upper half of the opcodes is always branch/call
662662      if (op & 0x100)
663663         m_fixed_decode[op] = (op & 0x80) ? F_CALL: F_BR;
664
664     
665665      UINT32 imask = m_ipla->read(op);
666666
667667      // 6 output bits select a microinstruction index
668668      m_micro_decode[op] = decode_micro(imask & 0x3f);
669
669     
670670      // the other ipla terms each select a fixed instruction
671671      const UINT32 id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
672
672     
673673      for (int bit = 0; bit < 15; bit++)
674674         if (imask & (0x80 << bit))
675675            m_fixed_decode[op] |= id[bit];
676676   }
677
677   
678678   // like on TMS0970, one of the terms directly select a microinstruction index (via R4-R8),
679679   // but it can't be pre-determined when it's active
680680   m_micro_direct.resize_and_clear(0x40);
r242703r242704
710710      fb = 1;
711711   else if (m_pc == m_pc_mask)
712712      fb = 0;
713
713   
714714   m_pc = (m_pc << 1 | fb) & m_pc_mask;
715715}
716716
r242703r242704
731731   debugger_instruction_hook(this, m_rom_address << 1);
732732   m_opcode = m_program->read_word(m_rom_address << 1) & 0x1ff;
733733   m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
734
734   
735735   m_fixed = m_fixed_decode[m_opcode];
736
736   
737737   // if ipla term 0 is active, R4-R8 directly select a microinstruction index when R0 or R0^BL is 0
738738   int r0 = m_opcode >> 8 & 1;
739739   if (m_ipla->read(m_opcode) & 0x40 && !((r0 & m_bl) ^ r0))
r242703r242704
747747void tms0270_cpu_device::read_opcode()
748748{
749749   tms0980_cpu_device::read_opcode();
750
750   
751751   // RSTR is on the mpla
752752   if (m_micro & M_RSTR)
753753      m_fixed |= F_RSTR;
r242703r242704
780780   // R13: power off, trigger on falling edge
781781   if ((m_r_prev >> 13 & 1) && !(m_r >> 13 & 1))
782782      m_power_off(1);
783
783   
784784   // R11: TMS5100 CTL port direction (0=read from TMS5100, 1=write to TMS5100)
785785   m_ctl_dir = m_r >> 11 & 1;
786786
787787   // R12: chip select (off=display via OPLA, on=TMS5100 via ACC/CKB)
788788   m_chipsel = m_r >> 12 & 1;
789
789   
790790   if (m_chipsel)
791791   {
792792      // ACC via SEG B,C,D,G: TMS5100 CTL pins
r242703r242704
812812         m_o_latch_prev = m_o_latch;
813813      }
814814   }
815
815   
816816   // standard R-output
817817   if (m_r != m_r_prev)
818818   {
r242703r242704
860860      case 0x30: case 0x38:
861861         m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
862862         break;
863
863     
864864      // 01XXXXXX: constant
865865      case 0x00: // R2,3,4 are NANDed with eachother, and then ORed with R1, making 00000XXX valid too
866866      case 0x40: case 0x48: case 0x50: case 0x58: case 0x60: case 0x68: case 0x70: case 0x78:
r242703r242704
886886      case 0x020: case 0x0a0:
887887         m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
888888         break;
889
889     
890890      // 0X1XXXXXX: constant
891891      case 0x040: case 0x048: case 0x050: case 0x058: case 0x060: case 0x068: case 0x070: case 0x078:
892892      case 0x0c0: case 0x0c8: case 0x0d0: case 0x0d8: case 0x0e0: case 0x0e8: case 0x0f0: case 0x0f8:
r242703r242704
10801080      m_o_latch_low = m_a;
10811081   else
10821082      m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
1083
1083   
10841084   // write to output is done in dynamic_output
10851085}
10861086
r242703r242704
11111111         if (m_status)
11121112         {
11131113            UINT8 new_pc = m_opcode & m_pc_mask;
1114
1114           
11151115            // BR: conditional branch
11161116            if (m_fixed & F_BR)
11171117            {
r242703r242704
11201120               m_ca = m_cb;
11211121               m_pc = new_pc;
11221122            }
1123
1123           
11241124            // CALL: conditional call
11251125            if (m_fixed & F_CALL)
11261126            {
r242703r242704
11661166      case 1:
11671167         // fetch: rom address 2/2
11681168         m_rom_address = (m_ca << (m_pc_bits+4)) | (m_pa << m_pc_bits) | m_pc;
1169
1169         
11701170         // execute: update alu inputs
11711171         // N inputs
11721172         if (m_micro & M_15TN)  m_n |= 0xf;
r242703r242704
12331233         if (m_fixed & F_SAL)   op_sal();
12341234         if (m_fixed & F_SBL)   op_sbl();
12351235         if (m_fixed & F_XDA)   op_xda();
1236
1236         
12371237         // after fixed opcode handling: store status, write ram
12381238         m_status = status;
12391239         if (m_ram_out != -1)
trunk/src/emu/cpu/tms0980/tms0980.h
r242703r242704
7777   template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_r.set_callback(object); }
7878   template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); }
7979   static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; }
80
80   
8181protected:
8282   // device-level overrides
8383   virtual void device_start();
r242703r242704
184184   devcb_write16 m_write_o;
185185   devcb_write16 m_write_r;
186186   devcb_write_line m_power_off;
187
187   
188188   UINT32 m_o_mask;
189189   UINT32 m_r_mask;
190190   UINT32 m_k_mask;
r242703r242704
239239   virtual void device_reset();
240240
241241   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
242
242   
243243   virtual void op_setr();
244244   virtual void op_rstr();
245245};
r242703r242704
263263   virtual machine_config_constructor device_mconfig_additions() const;
264264
265265   virtual void write_o_output(UINT8 index);
266
266   
267267   virtual void op_setr();
268268   virtual void op_tdo();
269269};
r242703r242704
284284   virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
285285   virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
286286   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
287
287   
288288   virtual UINT8 read_k_input();
289289   virtual void set_cki_bus();
290290   virtual void read_opcode();
291
291   
292292   virtual void op_comx();
293293
294294   UINT32 decode_micro(UINT8 sel);
r242703r242704
299299{
300300public:
301301   tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
302
302   
303303   // static configuration helpers
304304   template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
305305   template<class _Object> static devcb_base &set_write_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_ctl.set_callback(object); }
r242703r242704
316316   virtual UINT8 read_k_input();
317317   virtual void dynamic_output();
318318   virtual void read_opcode();
319
319   
320320   virtual void op_setr();
321321   virtual void op_rstr();
322322   virtual void op_tdo();
trunk/src/emu/emucore.h
r242703r242704
2121#include <stdlib.h>
2222#include <stdarg.h>
2323
24#include <sstream>
25
2624// some cleanups for Solaris for things defined in stdlib.h
2725#ifdef SDLMAME_SOLARIS
2826#undef si_status
trunk/src/emu/luaengine.c
r242703r242704
1717#include "emuopts.h"
1818#include "osdepend.h"
1919#include "drivenum.h"
20#include "ui/ui.h"
2021#include "web/mongoose.h"
2122
2223//**************************************************************************
r242703r242704
337338}
338339
339340//-------------------------------------------------
341//  machine_get_screens - return table of available screens userdata
342//  -> manager:machine().screens[":screen"]
343//-------------------------------------------------
344
345luabridge::LuaRef lua_engine::l_machine_get_screens(const running_machine *r)
346{
347   lua_State *L = luaThis->m_lua_state;
348   luabridge::LuaRef screens_table = luabridge::LuaRef::newTable(L);
349
350   for (device_t *dev = r->first_screen(); dev != NULL; dev = dev->next()) {
351      screen_device *sc = dynamic_cast<screen_device *>(dev);
352      if (sc && sc->configured() && sc->started() && sc->type()) {
353         screens_table[sc->tag()] = sc;
354      }
355   }
356
357   return screens_table;
358}
359
360//-------------------------------------------------
340361//  machine_get_devices - return table of available devices userdata
341362//  -> manager:machine().devices[":maincpu"]
342363//-------------------------------------------------
r242703r242704
348369   luabridge::LuaRef devs_table = luabridge::LuaRef::newTable(L);
349370
350371   device_t *root = &(m->root_device());
351   devs_table = devtree_dfs(root, devs_table);
372    devs_table = devtree_dfs(root, devs_table);
352373
353374   return devs_table;
354375}
r242703r242704
438459
439460}
440461
462//-------------------------------------------------
463//  draw_box - draw a box on a screen container
464//  -> manager:machine().screens[":screen"]:draw_box(x1, y1, x2, y2, bgcolor, linecolor)
465//-------------------------------------------------
466
467int lua_engine::lua_screen::l_draw_box(lua_State *L)
468{
469   screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
470   if(!sc) {
471      return 0;
472   }
473
474   // ensure that we got 6 numerical parameters
475   luaL_argcheck(L, lua_isnumber(L, 2), 2, "x1 (integer) expected");
476   luaL_argcheck(L, lua_isnumber(L, 3), 3, "y1 (integer) expected");
477   luaL_argcheck(L, lua_isnumber(L, 4), 4, "x2 (integer) expected");
478   luaL_argcheck(L, lua_isnumber(L, 5), 5, "y2 (integer) expected");
479   luaL_argcheck(L, lua_isnumber(L, 6), 6, "background color (integer) expected");
480   luaL_argcheck(L, lua_isnumber(L, 7), 7, "outline color (integer) expected");
481
482   // retrieve all parameters
483   float x1, y1, x2, y2;
484   x1 = MIN(lua_tounsigned(L, 2) / static_cast<float>(sc->width()) , 1.0f);
485   y1 = MIN(lua_tounsigned(L, 3) / static_cast<float>(sc->height()), 1.0f);
486   x2 = MIN(lua_tounsigned(L, 4) / static_cast<float>(sc->width()) , 1.0f);
487   y2 = MIN(lua_tounsigned(L, 5) / static_cast<float>(sc->height()), 1.0f);
488   UINT32 bgcolor = lua_tounsigned(L, 6);
489   UINT32 fgcolor = lua_tounsigned(L, 7);
490
491   // draw the box
492   render_container &rc = sc->container();
493   ui_manager &ui = sc->machine().ui();
494   ui.draw_outlined_box(&rc, x1, y1, x2, y2, fgcolor, bgcolor);
495
496   return 0;
497}
498
499//-------------------------------------------------
500//  draw_line - draw a line on a screen container
501//  -> manager:machine().screens[":screen"]:draw_line(x1, y1, x2, y2, linecolor)
502//-------------------------------------------------
503
504int lua_engine::lua_screen::l_draw_line(lua_State *L)
505{
506   screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
507   if(!sc) {
508      return 0;
509   }
510
511   // ensure that we got 5 numerical parameters
512   luaL_argcheck(L, lua_isnumber(L, 2), 2, "x1 (integer) expected");
513   luaL_argcheck(L, lua_isnumber(L, 3), 3, "y1 (integer) expected");
514   luaL_argcheck(L, lua_isnumber(L, 4), 4, "x2 (integer) expected");
515   luaL_argcheck(L, lua_isnumber(L, 5), 5, "y2 (integer) expected");
516   luaL_argcheck(L, lua_isnumber(L, 6), 6, "color (integer) expected");
517
518   // retrieve all parameters
519   float x1, y1, x2, y2;
520   x1 = MIN(lua_tounsigned(L, 2) / static_cast<float>(sc->width()) , 1.0f);
521   y1 = MIN(lua_tounsigned(L, 3) / static_cast<float>(sc->height()), 1.0f);
522   x2 = MIN(lua_tounsigned(L, 4) / static_cast<float>(sc->width()) , 1.0f);
523   y2 = MIN(lua_tounsigned(L, 5) / static_cast<float>(sc->height()), 1.0f);
524   UINT32 color = lua_tounsigned(L, 6);
525
526   // draw the line
527   sc->container().add_line(x1, y1, x2, y2, UI_LINE_WIDTH, rgb_t(color), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
528   return 0;
529}
530
531//-------------------------------------------------
532//  draw_text - draw text on a screen container
533//  -> manager:machine().screens[":screen"]:draw_text(x, y, message)
534//-------------------------------------------------
535
536int lua_engine::lua_screen::l_draw_text(lua_State *L)
537{
538   screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
539   if(!sc) {
540      return 0;
541   }
542
543   // ensure that we got proper parameters
544   luaL_argcheck(L, lua_isnumber(L, 2), 2, "x (integer) expected");
545   luaL_argcheck(L, lua_isnumber(L, 3), 3, "y (integer) expected");
546   luaL_argcheck(L, lua_isstring(L, 4), 4, "message (string) expected");
547
548   // retrieve all parameters
549   float x = MIN(lua_tounsigned(L, 2) / static_cast<float>(sc->width()) , 1.0f);
550   float y = MIN(lua_tounsigned(L, 3) / static_cast<float>(sc->height()), 1.0f);
551   const char *msg = luaL_checkstring(L,4);
552   // TODO: add optional parameters (colors, etc.)
553
554   // draw the text
555   render_container &rc = sc->container();
556   ui_manager &ui = sc->machine().ui();
557   ui.draw_text_full(&rc, msg, x, y , (1.0f - x),
558                  JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR,
559                  UI_TEXT_BG_COLOR, NULL, NULL);
560
561   return 0;
562}
563
441564void *lua_engine::checkparam(lua_State *L, int idx, const char *tname)
442565{
443566   const char *name;
r242703r242704
667790            .addFunction ("soft_reset", &running_machine::schedule_soft_reset)
668791            .addFunction ("system", &running_machine::system)
669792            .addProperty <luabridge::LuaRef, void> ("devices", &lua_engine::l_machine_get_devices)
793            .addProperty <luabridge::LuaRef, void> ("screens", &lua_engine::l_machine_get_screens)
670794         .endClass ()
671795         .beginClass <game_driver> ("game_driver")
672796            .addData ("name", &game_driver::name)
r242703r242704
691815         .deriveClass <address_space, lua_addr_space> ("addr_space")
692816            .addFunction("name", &address_space::name)
693817         .endClass()
694      .endNamespace ();
818         .beginClass <lua_screen> ("lua_screen_dev")
819            .addCFunction ("draw_box",  &lua_screen::l_draw_box)
820            .addCFunction ("draw_line", &lua_screen::l_draw_line)
821            .addCFunction ("draw_text", &lua_screen::l_draw_text)
822         .endClass()
823         .deriveClass <screen_device, lua_screen> ("screen_dev")
824            .addFunction ("name", &screen_device::name)
825            .addFunction ("height", &screen_device::height)
826            .addFunction ("width", &screen_device::width)
827         .endClass()
828      .endNamespace();
695829
696830   luabridge::push (m_lua_state, machine_manager::instance());
697831   lua_setglobal(m_lua_state, "manager");
trunk/src/emu/luaengine.h
r242703r242704
105105   struct lua_addr_space {
106106      template<typename T> int l_mem_read(lua_State *L);
107107   };
108   static luabridge::LuaRef l_machine_get_screens(const running_machine *r);
109   struct lua_screen {
110      int l_draw_box(lua_State *L);
111      int l_draw_line(lua_State *L);
112      int l_draw_text(lua_State *L);
113   };
108114
109115   void resume(void *L, INT32 param);
110116   void report_errors(int status);
trunk/src/emu/machine.c
r242703r242704
255255      primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this));
256256   save().save_item(NAME(m_watchdog_enabled));
257257   save().save_item(NAME(m_watchdog_counter));
258
258   
259259   // save the random seed or save states might be broken in drivers that use the rand() method
260260   save().save_item(NAME(m_rand_seed));
261
261   
262262   // initialize image devices
263263   image_init(*this);
264264   m_tilemap.reset(global_alloc(tilemap_manager(*this)));
trunk/src/emu/machine/8530scc.c
r242703r242704
227227
228228      rv |= (ourCh->txUnderrun) ? 0x40 : 0;
229229      rv |= (ourCh->syncHunt) ? 0x10 : 0;
230      rv |= channel[0].reg_val[0] & 0x0D; // pick up TXBE, RXBF, DCD bits
230      rv |= channel[0].reg_val[0] & 0x05; // pick up TXBE and RXBF bits
231231
232232      return rv;
233233   }
r242703r242704
258258
259259      rv |= (ourCh->txUnderrun) ? 0x40 : 0;
260260      rv |= (ourCh->syncHunt) ? 0x10 : 0;
261      rv |= channel[1].reg_val[0] & 0x0D; // pick up TXBE, RXBF, DCD bits
261      rv |= channel[1].reg_val[0] & 0x05; // pick up TXBE and RXBF bits
262262
263263      return rv;
264264   }
trunk/src/emu/machine/am9517a.c
r242703r242704
523523   save_item(NAME(m_status));
524524   save_item(NAME(m_temp));
525525   save_item(NAME(m_request));
526
526   
527527   for (int i = 0; i < 4; i++)
528528   {
529529      save_item(NAME(m_channel[i].m_address), i);
trunk/src/emu/machine/e05a30.c
r242703r242704
151151WRITE_LINE_MEMBER( e05a30_device::centronics_input_strobe )
152152{
153153   if (m_centronics_strobe == TRUE && state == FALSE && !m_centronics_busy) {
154
154155      m_centronics_data_latch   = m_centronics_data;
155156
156157      m_centronics_data_latched = TRUE;
trunk/src/emu/machine/i6300esb.c
r242703r242704
8383   AM_RANGE(0x00ec, 0x00ef) AM_WRITE8(                           nop_w,             0x0000ff00) // Non-existing, used for delays by the bios/os
8484ADDRESS_MAP_END
8585
86
86   
8787i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
8888   : pci_device(mconfig, I6300ESB_LPC, "i6300ESB southbridge ISA/LPC bridge", tag, owner, clock, "i6300esb_lpc", __FILE__),
89      acpi(*this, "acpi"),
90      rtc (*this, "rtc"),
91      pit (*this, "pit")
89     acpi(*this, "acpi"),
90     rtc (*this, "rtc"),
91     pit (*this, "pit")
9292{
9393}
9494
trunk/src/emu/machine/i82875p.h
r242703r242704
107107public:
108108   i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
109109
110
110   
111111   DECLARE_READ8_MEMBER  (dram_row_boundary_r);
112112   DECLARE_WRITE8_MEMBER (dram_row_boundary_w);
113113   DECLARE_READ8_MEMBER  (dram_row_attribute_r);
trunk/src/emu/machine/r10696.c
r242703r242704
3434#include "emu.h"
3535#include "machine/r10696.h"
3636
37#define VERBOSE 1
37#define   VERBOSE   1
3838#if VERBOSE
3939#define LOG(x) logerror x
4040#else
r242703r242704
5050const device_type R10696 = &device_creator<r10696_device>;
5151
5252r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53   : device_t(mconfig, R10696, "Rockwell 10696", tag, owner, clock, "r10696", __FILE__),
54      m_io_a(0), m_io_b(0), m_io_c(0),
55      m_iord(*this), m_iowr(*this)
53    : device_t(mconfig, R10696, "Rockwell 10696", tag, owner, clock, "r10696", __FILE__),
54        m_io_a(0), m_io_b(0), m_io_c(0),
55        m_iord(*this), m_iowr(*this)
5656{
5757}
5858
r242703r242704
6161 */
6262void r10696_device::device_start()
6363{
64   m_iord.resolve();
65   m_iowr.resolve();
64    m_iord.resolve();
65    m_iowr.resolve();
6666
67   save_item(NAME(m_io_a));
68   save_item(NAME(m_io_b));
69   save_item(NAME(m_io_c));
67    save_item(NAME(m_io_a));
68    save_item(NAME(m_io_b));
69    save_item(NAME(m_io_c));
7070}
7171
7272/**
r242703r242704
8787
8888WRITE8_MEMBER( r10696_device::io_w )
8989{
90   assert(offset < 16);
91   const UINT8 io_a = m_io_a;
92   const UINT8 io_b = m_io_b;
93   const UINT8 io_c = m_io_c;
94   switch (offset)
95   {
96   case 0x0A: // Read Group A
97   case 0x09: // Read Group B
98   case 0x03: // Read Group C
99   case 0x00: // Read Groups A | B | C
100   case 0x01: // Read Groups B | C
101   case 0x02: // Read Groups A | C
102   case 0x08: // Read Groups A | B
103      break;
90    assert(offset < 16);
91    const UINT8 io_a = m_io_a;
92    const UINT8 io_b = m_io_b;
93    const UINT8 io_c = m_io_c;
94    switch (offset)
95    {
96    case 0x0A: // Read Group A
97    case 0x09: // Read Group B
98    case 0x03: // Read Group C
99    case 0x00: // Read Groups A | B | C
100    case 0x01: // Read Groups B | C
101    case 0x02: // Read Groups A | C
102    case 0x08: // Read Groups A | B
103        break;
104104
105   case 0x0E: // Set Group A
106      m_io_a = data & 0x0f;
107      break;
108   case 0x0D: // Set Group B
109      m_io_b = data & 0x0f;
110      break;
111   case 0x07: // Set Group C
112      m_io_c = data & 0x0f;
113      break;
114   case 0x04: // Set Groups A, B and C
115      m_io_a = m_io_b = m_io_c = data & 0x0f;
116      break;
117   case 0x05: // Set Groups B and C
118      m_io_b = m_io_c = data & 0x0f;
119      break;
120   case 0x06: // Set Groups A and C
121      m_io_a = m_io_c = data & 0x0f;
122      break;
123   case 0x0C: // Set Groups A and B
124      m_io_a = m_io_b = data & 0x0f;
125      break;
126   }
127   if (io_a != m_io_a)
128      m_iowr(0, m_io_a, 0x0f);
129   if (io_b != m_io_b)
130      m_iowr(1, m_io_b, 0x0f);
131   if (io_c != m_io_c)
132      m_iowr(2, m_io_c, 0x0f);
105    case 0x0E: // Set Group A
106        m_io_a = data & 0x0f;
107        break;
108    case 0x0D: // Set Group B
109        m_io_b = data & 0x0f;
110        break;
111    case 0x07: // Set Group C
112        m_io_c = data & 0x0f;
113        break;
114    case 0x04: // Set Groups A, B and C
115        m_io_a = m_io_b = m_io_c = data & 0x0f;
116        break;
117    case 0x05: // Set Groups B and C
118        m_io_b = m_io_c = data & 0x0f;
119        break;
120    case 0x06: // Set Groups A and C
121        m_io_a = m_io_c = data & 0x0f;
122        break;
123    case 0x0C: // Set Groups A and B
124        m_io_a = m_io_b = data & 0x0f;
125        break;
126    }
127    if (io_a != m_io_a)
128        m_iowr(0, m_io_a, 0x0f);
129    if (io_b != m_io_b)
130        m_iowr(1, m_io_b, 0x0f);
131    if (io_c != m_io_c)
132        m_iowr(2, m_io_c, 0x0f);
133133}
134134
135135
136136READ8_MEMBER( r10696_device::io_r )
137137{
138   assert(offset < 16);
139   UINT8 io_a, io_b, io_c;
140   UINT8 data = 0xf;
141   switch (offset)
142   {
143   case 0x0A: // Read Group A
144      io_a = m_iord(0);
145      data = io_a & 0x0f;
146      break;
147   case 0x09: // Read Group B
148      io_b = m_iord(1);
149      data = io_b & 0x0f;
150      break;
151   case 0x03: // Read Group C
152      io_c = m_iord(2);
153      data = io_c & 0x0f;
154      break;
155   case 0x00: // Read Groups A | B | C
156      io_a = m_iord(0);
157      io_b = m_iord(1);
158      io_c = m_iord(2);
159      data = (io_a | io_b | io_a) & 0x0f;
160      break;
161   case 0x01: // Read Groups B | C
162      io_b = m_iord(1);
163      io_c = m_iord(2);
164      data = (io_b | io_c) & 0x0f;
165      break;
166   case 0x02: // Read Groups A | C
167      io_a = m_iord(0);
168      io_c = m_iord(2);
169      data = (io_a | io_c) & 0x0f;
170      break;
171   case 0x08: // Read Groups A | B
172      io_a = m_iord(0);
173      io_b = m_iord(1);
174      data = (io_a | io_b) & 0x0f;
175      break;
138    assert(offset < 16);
139    UINT8 io_a, io_b, io_c;
140    UINT8 data = 0xf;
141    switch (offset)
142    {
143    case 0x0A: // Read Group A
144        io_a = m_iord(0);
145        data = io_a & 0x0f;
146        break;
147    case 0x09: // Read Group B
148        io_b = m_iord(1);
149        data = io_b & 0x0f;
150        break;
151    case 0x03: // Read Group C
152        io_c = m_iord(2);
153        data = io_c & 0x0f;
154        break;
155    case 0x00: // Read Groups A | B | C
156        io_a = m_iord(0);
157        io_b = m_iord(1);
158        io_c = m_iord(2);
159        data = (io_a | io_b | io_a) & 0x0f;
160        break;
161    case 0x01: // Read Groups B | C
162        io_b = m_iord(1);
163        io_c = m_iord(2);
164        data = (io_b | io_c) & 0x0f;
165        break;
166    case 0x02: // Read Groups A | C
167        io_a = m_iord(0);
168        io_c = m_iord(2);
169        data = (io_a | io_c) & 0x0f;
170        break;
171    case 0x08: // Read Groups A | B
172        io_a = m_iord(0);
173        io_b = m_iord(1);
174        data = (io_a | io_b) & 0x0f;
175        break;
176176
177   case 0x0E: // Set Group A
178   case 0x0D: // Set Group B
179   case 0x07: // Set Group C
180   case 0x04: // Set Groups A, B and C
181   case 0x05: // Set Groups B and C
182   case 0x06: // Set Groups A and C
183   case 0x0C: // Set Groups A and B
184      break;
185   }
186   return data;
177    case 0x0E: // Set Group A
178    case 0x0D: // Set Group B
179    case 0x07: // Set Group C
180    case 0x04: // Set Groups A, B and C
181    case 0x05: // Set Groups B and C
182    case 0x06: // Set Groups A and C
183    case 0x0C: // Set Groups A and B
184        break;
185    }
186    return data;
187187}
trunk/src/emu/machine/r10696.h
r242703r242704
2424
2525/* Set the read and write group (4-bit; nibble) delegates */
2626#define MCFG_R10696_IO(_devcb_rd,_devcb_wr) \
27   r10696_device::set_iord(*device, DEVCB_##_devcb_rd); \
28   r10696_device::set_iowr(*device, DEVCB_##_devcb_wr);
27    r10696_device::set_iord(*device, DEVCB_##_devcb_rd); \
28    r10696_device::set_iowr(*device, DEVCB_##_devcb_wr);
2929
3030class r10696_device : public device_t
3131{
3232public:
33   r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34   ~r10696_device() {}
33    r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34    ~r10696_device() {}
3535
36   DECLARE_READ8_MEMBER ( io_r );
37   DECLARE_WRITE8_MEMBER( io_w );
36    DECLARE_READ8_MEMBER ( io_r );
37    DECLARE_WRITE8_MEMBER( io_w );
3838
39   template<class _Object> static devcb_base &set_iord(device_t &device, _Object object) { return downcast<r10696_device &>(device).m_iord.set_callback(object); }
40   template<class _Object> static devcb_base &set_iowr(device_t &device, _Object object) { return downcast<r10696_device &>(device).m_iowr.set_callback(object); }
39    template<class _Object> static devcb_base &set_iord(device_t &device, _Object object) { return downcast<r10696_device &>(device).m_iord.set_callback(object); }
40    template<class _Object> static devcb_base &set_iowr(device_t &device, _Object object) { return downcast<r10696_device &>(device).m_iowr.set_callback(object); }
4141protected:
42   // device-level overrides
43   virtual void device_start();
44   virtual void device_reset();
42    // device-level overrides
43    virtual void device_start();
44    virtual void device_reset();
4545
4646private:
47   UINT8         m_io_a;   //!< input/output flip-flops group A
48   UINT8         m_io_b;   //!< input/output flip-flops group B
49   UINT8         m_io_c;   //!< input/output flip-flops group C
50   devcb_read8   m_iord;   //!< input line (read, offset = group, data = 4 bits)
51   devcb_write8  m_iowr;   //!< output line (write, offset = group, data = 4 bits)
47    UINT8         m_io_a;   //!< input/output flip-flops group A
48    UINT8         m_io_b;   //!< input/output flip-flops group B
49    UINT8         m_io_c;   //!< input/output flip-flops group C
50    devcb_read8   m_iord;   //!< input line (read, offset = group, data = 4 bits)
51    devcb_write8  m_iowr;   //!< output line (write, offset = group, data = 4 bits)
5252};
5353
5454extern const device_type R10696;
trunk/src/emu/machine/r10788.c
r242703r242704
4141#include "emu.h"
4242#include "machine/r10788.h"
4343
44#define VERBOSE 0
44#define   VERBOSE   0
4545#if VERBOSE
4646#define LOG(x) logerror x
4747#else
r242703r242704
5757const device_type R10788 = &device_creator<r10788_device>;
5858
5959r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
60   : device_t(mconfig, R10788, "Rockwell 10788", tag, owner, clock, "r10788", __FILE__),
61      m_ktr(0), m_kts(0), m_kla(0), m_klb(0), m_mask_a(15), m_mask_b(15), m_ker(0),
62      m_io_counter(0), m_scan_counter(0),
63      m_display(*this)
60    : device_t(mconfig, R10788, "Rockwell 10788", tag, owner, clock, "r10788", __FILE__),
61        m_ktr(0), m_kts(0), m_kla(0), m_klb(0), m_mask_a(15), m_mask_b(15), m_ker(0),
62        m_io_counter(0), m_scan_counter(0),
63        m_display(*this)
6464{
6565}
6666
r242703r242704
6969 */
7070void r10788_device::device_start()
7171{
72   m_display.resolve();
72    m_display.resolve();
7373
74   save_item(NAME(m_reg));
75   save_item(NAME(m_ktr));
76   save_item(NAME(m_kts));
77   save_item(NAME(m_kla));
78   save_item(NAME(m_klb));
79   save_item(NAME(m_mask_a));
80   save_item(NAME(m_mask_b));
81   save_item(NAME(m_ker));
82   save_item(NAME(m_io_counter));
83   save_item(NAME(m_scan_counter));
74    save_item(NAME(m_reg));
75    save_item(NAME(m_ktr));
76    save_item(NAME(m_kts));
77    save_item(NAME(m_kla));
78    save_item(NAME(m_klb));
79    save_item(NAME(m_mask_a));
80    save_item(NAME(m_mask_b));
81    save_item(NAME(m_ker));
82    save_item(NAME(m_io_counter));
83    save_item(NAME(m_scan_counter));
8484
85   m_timer = timer_alloc(TIMER_DISPLAY);
86   // recurring timer every 36 cycles
87   m_timer->adjust(clocks_to_attotime(36), 0, clocks_to_attotime(36));
85    m_timer = timer_alloc(TIMER_DISPLAY);
86    // recurring timer every 36 cycles
87    m_timer->adjust(clocks_to_attotime(36), 0, clocks_to_attotime(36));
8888}
8989
9090/**
r242703r242704
9393void r10788_device::device_reset()
9494{
9595   memset(m_reg, 0x00, sizeof(m_reg));
96   m_ktr = 0;
97   m_kts = 0;
98   m_kla = 0;
99   m_klb = 0;
100   m_mask_a = 15;
101   m_mask_b = 15;
102   m_ker = 0;
103   m_scan_counter = 0;
96    m_ktr = 0;
97    m_kts = 0;
98    m_kla = 0;
99    m_klb = 0;
100    m_mask_a = 15;
101    m_mask_b = 15;
102    m_ker = 0;
103    m_scan_counter = 0;
104104}
105105
106106
r242703r242704
113113 */
114114void r10788_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
115115{
116   UINT8 data;
117   switch (id)
118   {
119      case TIMER_DISPLAY:
120         data = (m_reg[0][m_scan_counter] & m_mask_a) +
121               16 * (m_reg[1][m_scan_counter] & m_mask_b);
122         LOG(("%s: scan counter:%2d data:%02x\n", __FUNCTION__, m_scan_counter, data));
123         m_display(m_scan_counter, data, 0xff);
124         break;
125      default:
126         LOG(("%s: invalid timer id:%d\n", __FUNCTION__, id));
127   }
128   m_scan_counter = (m_scan_counter + 1) % 16;
116    UINT8 data;
117    switch (id)
118    {
119        case TIMER_DISPLAY:
120            data = (m_reg[0][m_scan_counter] & m_mask_a) +
121                   16 * (m_reg[1][m_scan_counter] & m_mask_b);
122            LOG(("%s: scan counter:%2d data:%02x\n", __FUNCTION__, m_scan_counter, data));
123            m_display(m_scan_counter, data, 0xff);
124            break;
125        default:
126            LOG(("%s: invalid timer id:%d\n", __FUNCTION__, id));
127    }
128    m_scan_counter = (m_scan_counter + 1) % 16;
129129}
130130
131131/*************************************
r242703r242704
142142
143143WRITE8_MEMBER( r10788_device::io_w )
144144{
145   assert(offset < 16);
146   switch (offset)
147   {
148      case KTR:  // Transfer Keyboard Return
149         LOG(("%s: KTR data:%02x\n", __FUNCTION__, data));
150         m_ktr = data;
151         break;
152      case KTS:  // Transfer Keyboard Strobe
153         LOG(("%s: KTS data:%02x\n", __FUNCTION__, data));
154         m_kts = data;
155         break;
156      case KLA:  // Load Display Register A
157         LOG(("%s: KLA [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
158         m_kla = data;
159         m_reg[0][m_io_counter] = m_kla;
160         break;
161      case KLB:  // Load Display Register B
162         LOG(("%s: KLB [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
163         m_klb = data;
164         m_reg[1][m_io_counter] = m_kla;
165         break;
166      case KDN:  // Turn On Display
167         LOG(("%s: KDN data:%02x\n", __FUNCTION__, data));
168         m_mask_a = 15;
169         m_mask_b = 15;
170         break;
171      case KAF:  // Turn Off A
172         LOG(("%s: KAF data:%02x\n", __FUNCTION__, data));
173         m_mask_a = 0;
174         m_mask_b &= ~3;
175         break;
176      case KBF:  // Turn Off B
177         LOG(("%s: KBF data:%02x\n", __FUNCTION__, data));
178         m_mask_b &= ~12;
179         break;
180      case KER:  // Reset Keyboard Error
181         LOG(("%s: KER data:%02x\n", __FUNCTION__, data));
182         m_ker = 10;
183         break;
184   }
145    assert(offset < 16);
146    switch (offset)
147    {
148        case KTR:  // Transfer Keyboard Return
149            LOG(("%s: KTR data:%02x\n", __FUNCTION__, data));
150            m_ktr = data;
151            break;
152        case KTS:  // Transfer Keyboard Strobe
153            LOG(("%s: KTS data:%02x\n", __FUNCTION__, data));
154            m_kts = data;
155            break;
156        case KLA:  // Load Display Register A
157            LOG(("%s: KLA [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
158            m_kla = data;
159            m_reg[0][m_io_counter] = m_kla;
160            break;
161        case KLB:  // Load Display Register B
162            LOG(("%s: KLB [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
163            m_klb = data;
164            m_reg[1][m_io_counter] = m_kla;
165            break;
166        case KDN:  // Turn On Display
167            LOG(("%s: KDN data:%02x\n", __FUNCTION__, data));
168            m_mask_a = 15;
169            m_mask_b = 15;
170            break;
171        case KAF:  // Turn Off A
172            LOG(("%s: KAF data:%02x\n", __FUNCTION__, data));
173            m_mask_a = 0;
174            m_mask_b &= ~3;
175            break;
176        case KBF:  // Turn Off B
177            LOG(("%s: KBF data:%02x\n", __FUNCTION__, data));
178            m_mask_b &= ~12;
179            break;
180        case KER:  // Reset Keyboard Error
181            LOG(("%s: KER data:%02x\n", __FUNCTION__, data));
182            m_ker = 10;
183            break;
184    }
185185}
186186
187187
188188READ8_MEMBER( r10788_device::io_r )
189189{
190   assert(offset < 16);
191   UINT8 data = 0xf;
192   switch (offset)
193   {
194      case KTR:  // Transfer Keyboard Return
195         data = m_ktr;
196         LOG(("%s: KTR data:%02x\n", __FUNCTION__, data));
197         break;
198      case KTS:  // Transfer Keyboard Strobe
199         data = m_kts;
200         LOG(("%s: KTS data:%02x\n", __FUNCTION__, data));
201         break;
202      case KLA:  // Load Display Register A
203         m_kla = m_reg[0][m_io_counter];
204         data = m_kla;
205         LOG(("%s: KLA [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
206         break;
207      case KLB:  // Load Display Register B
208         m_klb = m_reg[1][m_io_counter];
209         data = m_klb;
210         LOG(("%s: KLB [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
211         // FIXME: does it automagically increment at KLB write?
212         m_io_counter = (m_io_counter + 1) % 16;
213         break;
214      case KDN:  // Turn On Display
215         LOG(("%s: KDN data:%02x\n", __FUNCTION__, data));
216         break;
217      case KAF:  // Turn Off A
218         LOG(("%s: KAF data:%02x\n", __FUNCTION__, data));
219         break;
220      case KBF:  // Turn Off B
221         LOG(("%s: KBF data:%02x\n", __FUNCTION__, data));
222         break;
223      case KER:  // Reset Keyboard Error
224         LOG(("%s: KER data:%02x\n", __FUNCTION__, data));
225         break;
226   }
227   return data;
190    assert(offset < 16);
191    UINT8 data = 0xf;
192    switch (offset)
193    {
194        case KTR:  // Transfer Keyboard Return
195            data = m_ktr;
196            LOG(("%s: KTR data:%02x\n", __FUNCTION__, data));
197            break;
198        case KTS:  // Transfer Keyboard Strobe
199            data = m_kts;
200            LOG(("%s: KTS data:%02x\n", __FUNCTION__, data));
201            break;
202        case KLA:  // Load Display Register A
203            m_kla = m_reg[0][m_io_counter];
204            data = m_kla;
205            LOG(("%s: KLA [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
206            break;
207        case KLB:  // Load Display Register B
208            m_klb = m_reg[1][m_io_counter];
209            data = m_klb;
210            LOG(("%s: KLB [%2d] data:%02x\n", __FUNCTION__, m_io_counter, data));
211            // FIXME: does it automagically increment at KLB write?
212            m_io_counter = (m_io_counter + 1) % 16;
213            break;
214        case KDN:  // Turn On Display
215            LOG(("%s: KDN data:%02x\n", __FUNCTION__, data));
216            break;
217        case KAF:  // Turn Off A
218            LOG(("%s: KAF data:%02x\n", __FUNCTION__, data));
219            break;
220        case KBF:  // Turn Off B
221            LOG(("%s: KBF data:%02x\n", __FUNCTION__, data));
222            break;
223        case KER:  // Reset Keyboard Error
224            LOG(("%s: KER data:%02x\n", __FUNCTION__, data));
225            break;
226    }
227    return data;
228228}
trunk/src/emu/machine/r10788.h
r242703r242704
2323
2424/* Set the writer used to update a display digit */
2525#define MCFG_R10788_UPDATE(_devcb) \
26   r10788_device::set_update(*device, DEVCB_##_devcb);
26    r10788_device::set_update(*device, DEVCB_##_devcb);
2727
2828class r10788_device : public device_t
2929{
3030public:
31   r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
32   ~r10788_device() {}
31    r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
32    ~r10788_device() {}
3333
34   enum {
35      KTR = 0xc,  //!< Transfer Keyboard Return
36      KTS = 0xa,  //!< Transfer Keyboard Strobe
37      KLA = 0xe,  //!< Load Display Register A
38      KLB = 0xd,  //!< Load Display Register B
39      KDN = 0x3,  //!< Turn On Display
40      KAF = 0xb,  //!< Turn Off A
41      KBF = 0x7,  //!< Turn Off B
42      KER = 0x6   //!< Reset Keyboard Error
43   };
34    enum {
35        KTR = 0xc,  //!< Transfer Keyboard Return
36        KTS = 0xa,  //!< Transfer Keyboard Strobe
37        KLA = 0xe,  //!< Load Display Register A
38        KLB = 0xd,  //!< Load Display Register B
39        KDN = 0x3,  //!< Turn On Display
40        KAF = 0xb,  //!< Turn Off A
41        KBF = 0x7,  //!< Turn Off B
42        KER = 0x6   //!< Reset Keyboard Error
43    };
4444
45   DECLARE_READ8_MEMBER ( io_r );
46   DECLARE_WRITE8_MEMBER( io_w );
45    DECLARE_READ8_MEMBER ( io_r );
46    DECLARE_WRITE8_MEMBER( io_w );
4747
48   template<class _Object> static devcb_base &set_update(device_t &device, _Object object) { return downcast<r10788_device &>(device).m_display.set_callback(object); }
48    template<class _Object> static devcb_base &set_update(device_t &device, _Object object) { return downcast<r10788_device &>(device).m_display.set_callback(object); }
4949protected:
50   // device-level overrides
51   virtual void device_start();
52   virtual void device_reset();
53   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
50    // device-level overrides
51    virtual void device_start();
52    virtual void device_reset();
53    virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5454
5555private:
56   static const device_timer_id TIMER_DISPLAY = 0;
56    static const device_timer_id TIMER_DISPLAY = 0;
5757
58   UINT8        m_reg[2][16];          //!< display registers
59   UINT8        m_ktr;                 //!< transfer keyboard return value
60   UINT8        m_kts;                 //!< transfer keyboard strobe value
61   UINT8        m_kla;                 //!< display register A value
62   UINT8        m_klb;                 //!< display register B value
63   UINT8        m_mask_a;              //!< display enable bits for A
64   UINT8        m_mask_b;              //!< display enable bits for B
65   UINT8        m_ker;                 //!< keyboard error value
66   int          m_io_counter;          //!< current I/O register index
67   int          m_scan_counter;        //!< current display scan
68   devcb_write8 m_display;             //!< display updater
69   emu_timer*   m_timer;               //!< timer running at clock / 18 / 36
58    UINT8        m_reg[2][16];          //!< display registers
59    UINT8        m_ktr;                 //!< transfer keyboard return value
60    UINT8        m_kts;                 //!< transfer keyboard strobe value
61    UINT8        m_kla;                 //!< display register A value
62    UINT8        m_klb;                 //!< display register B value
63    UINT8        m_mask_a;              //!< display enable bits for A
64    UINT8        m_mask_b;              //!< display enable bits for B
65    UINT8        m_ker;                 //!< keyboard error value
66    int          m_io_counter;          //!< current I/O register index
67    int          m_scan_counter;        //!< current display scan
68    devcb_write8 m_display;             //!< display updater
69    emu_timer*   m_timer;               //!< timer running at clock / 18 / 36
7070};
7171
7272extern const device_type R10788;
trunk/src/emu/machine/ra17xx.c
r242703r242704
4040#include "emu.h"
4141#include "machine/ra17xx.h"
4242
43#define VERBOSE 1
43#define   VERBOSE   1
4444#if VERBOSE
4545#define LOG(x) logerror x
4646#else
r242703r242704
5656const device_type RA17XX = &device_creator<ra17xx_device>;
5757
5858ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
59   : device_t(mconfig, RA17XX, "Rockwell A17XX", tag, owner, clock, "ra17xx", __FILE__),
60      m_enable(false),
61      m_iord(*this),
62      m_iowr(*this)
59    : device_t(mconfig, RA17XX, "Rockwell A17XX", tag, owner, clock, "ra17xx", __FILE__),
60        m_enable(false),
61        m_iord(*this),
62        m_iowr(*this)
6363{
6464}
6565
r242703r242704
6868 */
6969void ra17xx_device::device_start()
7070{
71   m_iord.resolve();
72   m_iowr.resolve();
71    m_iord.resolve();
72    m_iowr.resolve();
7373
74   save_item(NAME(m_line));
74    save_item(NAME(m_line));
7575}
7676
7777/**
r242703r242704
7979 */
8080void ra17xx_device::device_reset()
8181{
82   memset(m_line, 0, sizeof(m_line));
82    memset(m_line, 0, sizeof(m_line));
8383}
8484
8585
r242703r242704
9797
9898WRITE8_MEMBER( ra17xx_device::io_w )
9999{
100   assert(offset < 16);
101   m_bl = (data >> 4) & 15;    // BL on the data bus most significant bits
102   if (offset & 1) {
103      // SOS command
104      if (data & (1 << 3)) {
105         m_line[m_bl] = 1;   // enable output
100    assert(offset < 16);
101    m_bl = (data >> 4) & 15;    // BL on the data bus most significant bits
102    if (offset & 1) {
103        // SOS command
104        if (data & (1 << 3)) {
105            m_line[m_bl] = 1;   // enable output
106106//          if (m_enable)
107            m_iowr(m_bl, 1, 1);
108      } else {
109         m_line[m_bl] = 0;   // disable output
107                m_iowr(m_bl, 1, 1);
108        } else {
109            m_line[m_bl] = 0;   // disable output
110110//          if (m_enable)
111            m_iowr(m_bl, 0, 1);
112      }
113   } else {
114      // SES command
115      if (data & (1 << 3)) {
116         // enable all outputs
117         m_enable = true;
118         for (int i = 0; i < 16; i++)
119            m_iowr(i, m_line[i], 1);
120      } else {
121         // disable all outputs
122         m_enable = false;
123      }
124   }
111                m_iowr(m_bl, 0, 1);
112        }
113    } else {
114        // SES command
115        if (data & (1 << 3)) {
116            // enable all outputs
117            m_enable = true;
118            for (int i = 0; i < 16; i++)
119                m_iowr(i, m_line[i], 1);
120        } else {
121            // disable all outputs
122            m_enable = false;
123        }
124    }
125125}
126126
127127
128128READ8_MEMBER( ra17xx_device::io_r )
129129{
130   assert(offset < 16);
131   return (m_iord(m_bl) & 1) ? 0x0f : 0x07;
130    assert(offset < 16);
131    return (m_iord(m_bl) & 1) ? 0x0f : 0x07;
132132}
trunk/src/emu/machine/ra17xx.h
r242703r242704
2323
2424/* Set the read line handler */
2525#define MCFG_RA17XX_READ(_devcb) \
26   ra17xx_device::set_iord(*device, DEVCB_##_devcb);
26    ra17xx_device::set_iord(*device, DEVCB_##_devcb); \
27
2728/* Set the write line handler */
2829#define MCFG_RA17XX_WRITE(_devcb) \
29   ra17xx_device::set_iowr(*device, DEVCB_##_devcb);
30    ra17xx_device::set_iowr(*device, DEVCB_##_devcb); \
31
3032class ra17xx_device : public device_t
3133{
3234public:
33   ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34   ~ra17xx_device() {}
35    ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
36    ~ra17xx_device() {}
3537
36   DECLARE_READ8_MEMBER ( io_r );
37   DECLARE_WRITE8_MEMBER( io_w );
38    DECLARE_READ8_MEMBER ( io_r );
39    DECLARE_WRITE8_MEMBER( io_w );
3840
39   template<class _Object> static devcb_base &set_iord(device_t &device, _Object object) { return downcast<ra17xx_device &>(device).m_iord.set_callback(object); }
40   template<class _Object> static devcb_base &set_iowr(device_t &device, _Object object) { return downcast<ra17xx_device &>(device).m_iowr.set_callback(object); }
41    template<class _Object> static devcb_base &set_iord(device_t &device, _Object object) { return downcast<ra17xx_device &>(device).m_iord.set_callback(object); }
42    template<class _Object> static devcb_base &set_iowr(device_t &device, _Object object) { return downcast<ra17xx_device &>(device).m_iowr.set_callback(object); }
4143protected:
42   // device-level overrides
43   virtual void device_start();
44   virtual void device_reset();
44    // device-level overrides
45    virtual void device_start();
46    virtual void device_reset();
4547
4648private:
47   UINT8           m_line[16];   //!< input/output flip-flops for 16 I/O lines
48   UINT8           m_bl;         //!< value of BL during the most recent output
49   bool            m_enable;     //!< true if outputs are enabled
50   devcb_read8     m_iord;       //!< input line (read, offset = line, data = 0/1)
51   devcb_write8    m_iowr;       //!< output line (write, offset = line, data = 0/1)
49    UINT8           m_line[16];   //!< input/output flip-flops for 16 I/O lines
50    UINT8           m_bl;         //!< value of BL during the most recent output
51    bool            m_enable;     //!< true if outputs are enabled
52    devcb_read8     m_iord;       //!< input line (read, offset = line, data = 0/1)
53    devcb_write8    m_iowr;       //!< output line (write, offset = line, data = 0/1)
5254};
5355
5456extern const device_type RA17XX;
trunk/src/emu/machine/smpc.c
r242703r242704
393393void saturn_state::smpc_keyboard(UINT8 pad_num, UINT8 offset)
394394{
395395   UINT16 game_key;
396
396   
397397   game_key = 0xffff;
398398
399399   game_key ^= ((ioport("KEYS_1")->read() & 0x80) << 8); // right
r242703r242704
415415   m_smpc.OREG[2+pad_num*offset] = game_key>>8; // game buttons, TODO
416416   m_smpc.OREG[3+pad_num*offset] = game_key & 0xff;
417417   /*
418       Keyboard Status hook-up
419       TODO: how shift key actually works? EGWord uses it in order to switch between hiragana and katakana modes.
418      Keyboard Status hook-up
419      TODO: how shift key actually works? EGWord uses it in order to switch between hiragana and katakana modes.
420420       x--- ---- 0
421421       -x-- ---- caps lock
422422       --x- ---- num lock
trunk/src/emu/machine/steppers.c
r242703r242704
4646      m_optic_cb(*this)
4747   {
4848      m_max_steps=(48*2);
49   }
49   }   
5050///////////////////////////////////////////////////////////////////////////
5151
5252void stepper_device::update_optic()
trunk/src/emu/machine/steppers.h
r242703r242704
3131
3232#define MCFG_STEPPER_ADD(_tag)\
3333   MCFG_DEVICE_ADD(_tag, STEPPER, 0)
34
34   
3535#define MCFG_STEPPER_REEL_TYPE(_data) \
3636   stepper_device::set_reel_type(*device, _data);
3737
3838/* total size of reel (in half steps) */
3939#define MCFG_STEPPER_MAX_STEPS(_write) \
40   stepper_device::set_max_steps(*device, _write);
41
40   stepper_device::set_max_steps(*device, _write);   
41   
4242/* start position of index (in half steps) */
4343#define MCFG_STEPPER_START_INDEX(_write) \
44   stepper_device::set_start_index(*device, _write);
44   stepper_device::set_start_index(*device, _write);   
4545
46/* end position of index (in half steps) */
46/* end position of index (in half steps) */   
4747#define MCFG_STEPPER_END_INDEX(_write) \
48   stepper_device::set_end_index(*device, _write);
48   stepper_device::set_end_index(*device, _write);   
4949
50/* end position of index (in half steps) */
50/* end position of index (in half steps) */   
5151#define MCFG_STEPPER_INDEX_PATTERN(_write) \
52   stepper_device::set_index_pattern(*device, _write);
53
52   stepper_device::set_index_pattern(*device, _write);   
53   
5454/* Phase at 0, for opto linkage */
5555#define MCFG_STEPPER_INIT_PHASE(_write) \
56   stepper_device::set_init_phase(*device, _write);
56   stepper_device::set_init_phase(*device, _write);   
5757
5858#define MCFG_STARPOINT_48STEP_ADD(_tag)\
5959   MCFG_STEPPER_ADD(_tag)\
r242703r242704
103103
104104   template<class _Object> static devcb_base &set_optic_handler(device_t &device, _Object object) { return downcast<stepper_device &>(device).m_optic_cb.set_callback(object); }
105105
106   static void set_reel_type(device_t &device, UINT8 type)
107   {
108      downcast<stepper_device &>(device).m_type = type;
106   static void set_reel_type(device_t &device, UINT8 type)
107   {
108      downcast<stepper_device &>(device).m_type = type;
109109      switch ( type )
110110      {   default:
111111         case STARPOINT_48STEP_REEL:  /* STARPOINT RMxxx */
r242703r242704
127127         case ECOIN_200STEP_REEL :
128128         downcast<stepper_device &>(device).m_max_steps = (200*2);
129129         break;
130      }
130      }   
131131   }
132132   static void set_max_steps(device_t &device, INT16 steps) { downcast<stepper_device &>(device).m_max_steps = steps; }
133133   static void set_start_index(device_t &device, INT16 index) { downcast<stepper_device &>(device).m_index_start = index; }
134   static void set_end_index(device_t &device, INT16 index) { downcast<stepper_device &>(device).m_index_end = index; }
135   static void set_index_pattern(device_t &device, INT16 index) { downcast<stepper_device &>(device).m_index_patt = index; }
136   static void set_init_phase(device_t &device, UINT8 phase)
134   static void set_end_index(device_t &device, INT16 index) { downcast<stepper_device &>(device).m_index_end = index; }   
135   static void set_index_pattern(device_t &device, INT16 index) { downcast<stepper_device &>(device).m_index_patt = index; }   
136   static void set_init_phase(device_t &device, UINT8 phase)
137137   {
138      downcast<stepper_device &>(device).m_initphase = phase;
139      downcast<stepper_device &>(device).m_phase = phase;
140      downcast<stepper_device &>(device).m_old_phase = phase;
138      downcast<stepper_device &>(device).m_initphase = phase;
139      downcast<stepper_device &>(device).m_phase = phase;
140      downcast<stepper_device &>(device).m_old_phase = phase;
141141   }
142142
143143   /* update a motor */
trunk/src/emu/machine/z80dart.c
r242703r242704
563563   save_item(NAME(m_dtr));
564564   save_item(NAME(m_rts));
565565   save_item(NAME(m_sync));
566   device_serial_interface::register_save_state(machine().save(), name(), tag());
567566}
568567
569568
trunk/src/emu/machine/z80dma.c
r242703r242704
596596   if(m_read_num_follow == 0) // special case: Legend of Kage on X1 Turbo
597597      res = m_status;
598598   else {
599      assert(m_read_cur_follow < ARRAY_LENGTH(m_read_regs_follow));
599600      res = m_read_regs_follow[m_read_cur_follow];
600601   }
601602
r242703r242704
686687            case COMMAND_READ_STATUS_BYTE:
687688               if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
688689               READ_MASK = 1;
689               m_read_regs_follow[0] = m_status;
690               assert(m_read_num_follow < ARRAY_LENGTH(m_read_regs_follow));
691               m_read_regs_follow[m_read_num_follow++] = m_status;
690692               break;
691693            case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
692694               WR3 &= ~0x20;
trunk/src/emu/netlist/analog/nld_ms_direct.h
r242703r242704
1414public:
1515
1616   netlist_matrix_solver_direct_t(const netlist_solver_parameters_t &params, int size);
17    netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t &params, int size);
1817
1918   virtual ~netlist_matrix_solver_direct_t();
2019
r242703r242704
187186    * Sorting as a general matrix pre-conditioning is mentioned in
188187    * literature but I have found no articles about Gauss Seidel.
189188    *
190     * For Gaussian Elimination however increasing order is better suited.
191     * FIXME: Even better would be to sort on elements right of the matrix diagonal.
192     *
193189    */
194190
195    int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1);
196191
197192   for (int k = 0; k < N() / 2; k++)
198193      for (int i = 0; i < N() - 1; i++)
199194      {
200            if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0)
195         if (m_terms[i]->m_railstart < m_terms[i+1]->m_railstart)
201196         {
202197            std::swap(m_terms[i],m_terms[i+1]);
203198            m_nets.swap(i, i+1);
r242703r242704
448443
449444template <int m_N, int _storage_N>
450445netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(const netlist_solver_parameters_t &params, int size)
451: netlist_matrix_solver_t(GAUSSIAN_ELIMINATION, params)
446: netlist_matrix_solver_t(params)
452447, m_dim(size)
453448, m_lp_fact(0)
454449{
r242703r242704
463458   m_row_ops[N()] = vector_ops_t::create_ops(N());
464459}
465460
466template <int m_N, int _storage_N>
467netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t &params, int size)
468: netlist_matrix_solver_t(type, params)
469, m_dim(size)
470, m_lp_fact(0)
471{
472    m_terms = new terms_t *[N()];
473    m_rails_temp = new terms_t[N()];
474461
475    for (int k = 0; k < N(); k++)
476    {
477        m_terms[k] = new terms_t;
478        m_row_ops[k] = vector_ops_t::create_ops(k);
479    }
480    m_row_ops[N()] = vector_ops_t::create_ops(N());
481}
482462
483
484463#endif /* NLD_MS_DIRECT_H_ */
trunk/src/emu/netlist/analog/nld_ms_gauss_seidel.h
r242703r242704
1717public:
1818
1919   netlist_matrix_solver_gauss_seidel_t(const netlist_solver_parameters_t &params, int size)
20      : netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size)
20      : netlist_matrix_solver_direct_t<m_N, _storage_N>(params, size)
2121      , m_lp_fact(0)
2222      , m_gs_fail(0)
2323      , m_gs_total(0)
r242703r242704
4545template <int m_N, int _storage_N>
4646void netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::log_stats()
4747{
48#if 1
49    if (this->m_stat_calculations == 0)
48#if 0
49   if (this->m_calculations == 0)
5050      return;
5151   printf("==============================================\n");
5252   printf("Solver %s\n", this->name().cstr());
5353   printf("       ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr());
5454   printf("       has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic");
5555   printf("       has %s elements\n", this->is_timestep() ? "timestep" : "no timestep");
56    printf("       %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls);
5756   printf("       %10d invocations (%6d Hz)  %10d gs fails (%6.2f%%) %6.3f average\n",
58            this->m_stat_calculations,
59            this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
57         this->m_calculations,
58         this->m_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
6059         this->m_gs_fail,
61            100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations,
62            (double) this->m_gs_total / (double) this->m_stat_calculations);
60         100.0 * (double) this->m_gs_fail / (double) this->m_calculations,
61         (double) this->m_gs_total / (double) this->m_calculations);
6362#endif
6463}
6564
r242703r242704
293292      //if (fabs(gabs_t - fabs(gtot_t)) > 1e-20)
294293      //    printf("%d %e abs: %f tot: %f\n",k, gabs_t / gtot_t -1.0, gabs_t, gtot_t);
295294
296        gabs_t *= 0.95; // avoid rounding issues
295      gabs_t *= 0.5; // avoid rounding issues
297296      if (!USE_GABS || gabs_t <= gtot_t)
298297      {
299298         w[k] = ws / gtot_t;
r242703r242704
337336      this->m_nets[k]->m_cur_Analog = new_V[k];
338337
339338   this->m_gs_total += resched_cnt;
340    this->m_stat_calculations++;
339   this->m_calculations++;
341340
342341   if (resched)
343342   {
trunk/src/emu/netlist/analog/nld_opamps.c
r242703r242704
3131   NET_C(R1.2, R2.2, G1.ON)
3232   VCVS(G1)
3333   PARAM(G1.G, 10000000)
34    //PARAM(G1.RI, 1)
34   //PARAM(G1.RI, 100)
3535   PARAM(G1.RO, RES_K(8))
3636
3737NETLIST_END()
trunk/src/emu/netlist/analog/nld_solver.c
r242703r242704
3636#include "../nl_lists.h"
3737
3838#if HAS_OPENMP
39#include "omp.h"
39#include <omp.h>
4040#endif
4141
4242vector_ops_t *vector_ops_t::create_ops(const int size)
r242703r242704
9999// netlist_matrix_solver
100100// ----------------------------------------------------------------------------------------
101101
102ATTR_COLD netlist_matrix_solver_t::netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t &params)
103: m_stat_calculations(0),
104  m_stat_newton_raphson(0),
105  m_stat_vsolver_calls(0),
106 m_params(params),
107 m_cur_ts(0),
108 m_type(type)
102ATTR_COLD netlist_matrix_solver_t::netlist_matrix_solver_t(const netlist_solver_parameters_t &params)
103: m_calculations(0), m_params(params), m_cur_ts(0)
109104{
110105}
111106
r242703r242704
259254template<class C >
260255void netlist_matrix_solver_t::solve_base(C *p)
261256{
262    m_stat_vsolver_calls++;
263257   if (is_dynamic())
264258   {
265259      int this_resched;
r242703r242704
272266         newton_loops++;
273267      } while (this_resched > 1 && newton_loops < m_params.m_nr_loops);
274268
275        m_stat_newton_raphson += newton_loops;
276269      // reschedule ....
277270      if (this_resched > 1 && !m_Q_sync.net().is_queued())
278271      {
r242703r242704
292285   netlist_time delta = now - m_last_step;
293286
294287   // We are already up to date. Avoid oscillations.
295   // FIXME: Make this a parameter!
296288   if (delta < netlist_time::from_nsec(1))
297289      return -1.0;
298290
trunk/src/emu/netlist/analog/nld_solver.h
r242703r242704
1414
1515#define USE_PIVOT_SEARCH (0)
1616#define VECTALT 1
17#define USE_GABS 1
17#define USE_GABS 0
1818#define USE_MATRIX_GS 0
1919// savings are eaten up by effort
2020#define USE_LINEAR_PREDICTION (0)
r242703r242704
197197   typedef plinearlist_t<netlist_matrix_solver_t *> list_t;
198198   typedef netlist_core_device_t::list_t dev_list_t;
199199
200   enum eSolverType
201   {
202       GAUSSIAN_ELIMINATION,
203       GAUSS_SEIDEL
204   };
205
206   ATTR_COLD netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t &params);
200   ATTR_COLD netlist_matrix_solver_t(const netlist_solver_parameters_t &params);
207201   ATTR_COLD virtual ~netlist_matrix_solver_t();
208202
209203   ATTR_COLD virtual void vsetup(netlist_analog_net_t::list_t &nets) = 0;
r242703r242704
230224   ATTR_COLD int get_net_idx(netlist_net_t *net);
231225   ATTR_COLD virtual void log_stats() {};
232226
233   inline const eSolverType type() const { return m_type; }
234
235227protected:
236228
237229   ATTR_COLD void setup(netlist_analog_net_t::list_t &nets);
r242703r242704
245237   plinearlist_t<netlist_analog_net_t *> m_nets;
246238   plinearlist_t<netlist_analog_output_t *> m_inps;
247239
248    int m_stat_calculations;
249    int m_stat_newton_raphson;
250    int m_stat_vsolver_calls;
251
240   int m_calculations;
252241   const netlist_solver_parameters_t &m_params;
253242
254243   ATTR_HOT inline const double current_timestep() { return m_cur_ts; }
r242703r242704
266255
267256   ATTR_HOT void update_inputs();
268257
269    const eSolverType m_type;
270258};
271259
272260
trunk/src/emu/netlist/devices/net_lib.c
r242703r242704
9191   ENTRY(VCCS,                 VCCS,                   "-")
9292   ENTRY(CCCS,                 CCCS,                   "-")
9393   ENTRY(dummy_input,          DUMMY_INPUT,            "-")
94    ENTRY(frontier,             FRONTIER,               "+I,Q")
9594   ENTRY(QBJT_EB,              QBJT_EB,                "model")
9695   ENTRY(QBJT_switch,          QBJT_SW,                "model")
9796   ENTRY(ttl_input,            TTL_INPUT,              "IN")
trunk/src/emu/netlist/devices/nld_4020.c
r242703r242704
88NETLIB_START(4020)
99{
1010   register_sub(sub, "sub");
11   register_sub(m_supply, "supply");
1211
1312   register_input("RESET", m_RESET);
1413   register_subalias("IP", sub.m_IP);
r242703r242704
4342   register_output("Q5", m_Q[4]);
4443   register_output("Q6", m_Q[5]);
4544   register_output("Q7", m_Q[6]);
46    register_output("Q8", m_Q[7]);
45   register_output("Q8", m_Q[8]);
4746   register_output("Q9", m_Q[8]);
4847   register_output("Q10", m_Q[9]);
4948   register_output("Q11", m_Q[10]);
trunk/src/emu/netlist/devices/nld_cmos.h
r242703r242704
2121
2222   protected:
2323      ATTR_HOT void update() {};
24        ATTR_HOT void start()
25        {
26            register_input("VDD,", m_vdd);
27            register_input("VSS,", m_vss);
28        };
24      ATTR_HOT void start()  {};
2925      ATTR_HOT void reset()  {};
3026
3127public:
trunk/src/emu/netlist/devices/nld_system.h
r242703r242704
3939#define DUMMY_INPUT(_name)                                                     \
4040      NET_REGISTER_DEV(dummy_input, _name)
4141
42#define FRONTIER(_name, _IN, _OUT)                                             \
43        NET_REGISTER_DEV(frontier, _name)                                      \
44        NET_C(_IN, _name.I)                                                    \
45        NET_C(_OUT, _name.Q)                                                   \
46
4742// -----------------------------------------------------------------------------
4843// mainclock
4944// -----------------------------------------------------------------------------
r242703r242704
152147
153148};
154149
155// -----------------------------------------------------------------------------
156// nld_frontier
157// -----------------------------------------------------------------------------
158150
159class NETLIB_NAME(frontier) : public netlist_device_t
160{
161public:
162    ATTR_COLD NETLIB_NAME(frontier)()
163            : netlist_device_t(DUMMY) { }
164
165    ATTR_COLD virtual ~NETLIB_NAME(frontier)() {}
166
167protected:
168
169    ATTR_COLD void start()
170    {
171        register_input("I", m_I);
172        register_output("Q", m_Q);
173    }
174
175    ATTR_COLD void reset()
176    {
177    }
178
179    ATTR_HOT ATTR_ALIGN void update()
180    {
181        OUTANALOG(m_Q, INPANALOG(m_I));
182    }
183
184private:
185    netlist_analog_input_t m_I;
186    netlist_analog_output_t m_Q;
187
188};
189
190
191151// -----------------------------------------------------------------------------
192152// netdev_a_to_d
193153// -----------------------------------------------------------------------------
trunk/src/emu/netlist/nl_base.h
r242703r242704
337337      CAPACITOR,  // Capacitor
338338      DIODE,      // Diode
339339      DUMMY,      // DUMMY device without function
340        FRONTIER,   // Net frontier
341340      BJT_EB,     // BJT(Ebers-Moll)
342341      BJT_SWITCH, // BJT(Switch)
343342      VCVS,       // Voltage controlled voltage source
trunk/src/emu/render.c
r242703r242704
201201   return item_layer(layer);
202202}
203203
204//**************************************************************************
205//  render_texinfo
206//**************************************************************************
207204
208render_texinfo &render_texinfo::operator=(const render_texinfo &src)
209{
210    free_palette();
211    base = src.base;
212    rowpixels = src.rowpixels;
213    width = src.width;
214    height = src.height;
215    seqid = src.seqid;
216    osddata = src.osddata;
217    m_palette = src.m_palette;
218    if (m_palette != NULL)
219    {
220        m_palette->ref_count++;
221    }
222    return *this;
223}
224205
225render_texinfo::render_texinfo(const render_texinfo &src)
226{
227    base = src.base;
228    rowpixels = src.rowpixels;
229    width = src.width;
230    height = src.height;
231    seqid = src.seqid;
232    osddata = src.osddata;
233    m_palette = src.m_palette;
234    if (m_palette != NULL)
235    {
236        m_palette->ref_count++;
237    }
238}
239
240void render_texinfo::set_palette(const dynamic_array<rgb_t> *source)
241{
242    free_palette();
243    if (source != NULL)
244    {
245        m_palette = global_alloc(render_palette_copy);
246        m_palette->palette.copyfrom(*source);
247        m_palette->ref_count = 1;
248    }
249    else
250    {
251        m_palette = NULL;
252    }
253}
254
255void render_texinfo::free_palette()
256{
257    if (m_palette != NULL)
258    {
259        m_palette->ref_count--;
260        if (m_palette->ref_count == 0)
261        {
262            global_free(m_palette);
263        }
264    }
265    m_palette = NULL;
266}
267
268
269206//**************************************************************************
270207//  RENDER PRIMITIVE
271208//**************************************************************************
r242703r242704
277214
278215void render_primitive::reset()
279216{
280    // public state
281    type = INVALID;
282    bounds.x0 = 0;
283    bounds.y0 = 0;
284    bounds.x1 = 0;
285    bounds.y1 = 0;
286    color.a = 0;
287    color.r = 0;
288    color.g = 0;
289    color.b = 0;
290    flags = 0;
291    width = 0.0f;
292    texture.set_palette(NULL);
293    texture = render_texinfo();
294    texcoords.bl.u = 0.0f;
295    texcoords.bl.v = 0.0f;
296    texcoords.br.u = 0.0f;
297    texcoords.br.v = 0.0f;
298    texcoords.tl.u = 0.0f;
299    texcoords.tl.v = 0.0f;
300    texcoords.tr.u = 0.0f;
301    texcoords.tr.v = 0.0f;
302
303    // do not clear m_next!
304    // memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
217   memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
305218}
306219
307220
r242703r242704
534447//  get_scaled - get a scaled bitmap (if we can)
535448//-------------------------------------------------
536449
537void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist)
450bool render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist)
538451{
539452   // source width/height come from the source bounds
540453   int swidth = m_sbounds.width();
r242703r242704
547460   texinfo.osddata = m_osddata;
548461
549462   // are we scaler-free? if so, just return the source bitmap
463   const rgb_t *palbase = (m_format == TEXFORMAT_PALETTE16 || m_format == TEXFORMAT_PALETTEA16) ? m_bitmap->palette()->entry_list_adjusted() : NULL;
550464   if (m_scaler == NULL || (m_bitmap != NULL && swidth == dwidth && sheight == dheight))
551465   {
552466      // add a reference and set up the source bitmap
r242703r242704
555469      texinfo.rowpixels = m_bitmap->rowpixels();
556470      texinfo.width = swidth;
557471      texinfo.height = sheight;
558      // will be set later
559        texinfo.set_palette(NULL);
472      texinfo.palette = palbase;
560473      texinfo.seqid = ++m_curseq;
474      return true;
561475   }
562   else
563   {
564        // make sure we can recover the original argb32 bitmap
565        bitmap_argb32 dummy;
566        bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
567476
568        // is it a size we already have?
569        scaled_texture *scaled = NULL;
570        int scalenum;
571        for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
572        {
573            scaled = &m_scaled[scalenum];
477   // make sure we can recover the original argb32 bitmap
478   bitmap_argb32 dummy;
479   bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
574480
575            // we need a non-NULL bitmap with matching dest size
576            if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
577                break;
578        }
481   // is it a size we already have?
482   scaled_texture *scaled = NULL;
483   int scalenum;
484   for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
485   {
486      scaled = &m_scaled[scalenum];
579487
580        // did we get one?
581        if (scalenum == ARRAY_LENGTH(m_scaled))
582        {
583            int lowest = -1;
488      // we need a non-NULL bitmap with matching dest size
489      if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
490         break;
491   }
584492
585            // didn't find one -- take the entry with the lowest seqnum
586            for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
587                if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
588                    lowest = scalenum;
589            assert_always(lowest != -1, "Too many live texture instances!");
493   // did we get one?
494   if (scalenum == ARRAY_LENGTH(m_scaled))
495   {
496      int lowest = -1;
590497
591            // throw out any existing entries
592            scaled = &m_scaled[lowest];
593            if (scaled->bitmap != NULL)
594            {
595                m_manager->invalidate_all(scaled->bitmap);
596                global_free(scaled->bitmap);
597            }
498      // didn't find one -- take the entry with the lowest seqnum
499      for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
500         if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
501            lowest = scalenum;
502      assert_always(lowest != -1, "Too many live texture instances!");
598503
599            // allocate a new bitmap
600            scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
601            scaled->seqid = ++m_curseq;
504      // throw out any existing entries
505      scaled = &m_scaled[lowest];
506      if (scaled->bitmap != NULL)
507      {
508         m_manager->invalidate_all(scaled->bitmap);
509         global_free(scaled->bitmap);
510      }
602511
603            // let the scaler do the work
604            (*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
605        }
512      // allocate a new bitmap
513      scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
514      scaled->seqid = ++m_curseq;
606515
607        // finally fill out the new info
608        primlist.add_reference(scaled->bitmap);
609        texinfo.base = &scaled->bitmap->pix32(0);
610        texinfo.rowpixels = scaled->bitmap->rowpixels();
611        texinfo.width = dwidth;
612        texinfo.height = dheight;
613        // will be set later
614        texinfo.set_palette(NULL);
615        texinfo.seqid = scaled->seqid;
516      // let the scaler do the work
517      (*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
616518   }
519
520   // finally fill out the new info
521   primlist.add_reference(scaled->bitmap);
522   texinfo.base = &scaled->bitmap->pix32(0);
523   texinfo.rowpixels = scaled->bitmap->rowpixels();
524   texinfo.width = dwidth;
525   texinfo.height = dheight;
526   texinfo.palette = palbase;
527   texinfo.seqid = scaled->seqid;
528   return true;
617529}
618530
619531
r242703r242704
622534//  palette for a texture
623535//-------------------------------------------------
624536
625const dynamic_array<rgb_t> *render_texture::get_adjusted_palette(render_container &container)
537const rgb_t *render_texture::get_adjusted_palette(render_container &container)
626538{
627539   // override the palette with our adjusted palette
628540   switch (m_format)
r242703r242704
634546
635547         // if no adjustment necessary, return the raw palette
636548         if (!container.has_brightness_contrast_gamma_changes())
637            return m_bitmap->palette()->entry_list_adjusted_darray();
549            return m_bitmap->palette()->entry_list_adjusted();
638550
639551         // otherwise, return our adjusted palette
640552         return container.bcg_lookup_table(m_format, m_bitmap->palette());
r242703r242704
670582      m_manager(manager),
671583      m_screen(screen),
672584      m_overlaybitmap(NULL),
673      m_overlaytexture(NULL),
674      m_bcglookup256(0x400)
585      m_overlaytexture(NULL)
675586{
676587   // make sure it is empty
677588   empty();
r242703r242704
811722//  given texture mode
812723//-------------------------------------------------
813724
814const dynamic_array<rgb_t> *render_container::bcg_lookup_table(int texformat, palette_t *palette)
725const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palette)
815726{
816727   switch (texformat)
817728   {
r242703r242704
825736            recompute_lookups();
826737         }
827738         assert (palette == &m_palclient->palette());
828         return &m_bcglookup;
739         return m_bcglookup;
829740
830741      case TEXFORMAT_RGB32:
831742      case TEXFORMAT_ARGB32:
832743      case TEXFORMAT_YUY16:
833         return &m_bcglookup256;
744         return m_bcglookup256;
834745
835746      default:
836747         return NULL;
r242703r242704
18151726               int height = (finalorient & ORIENTATION_SWAP_XY) ? (prim->bounds.x1 - prim->bounds.x0) : (prim->bounds.y1 - prim->bounds.y0);
18161727               width = MIN(width, m_maxtexwidth);
18171728               height = MIN(height, m_maxtexheight);
1729               if (curitem->texture()->get_scaled(width, height, prim->texture, list))
1730               {
1731                  // set the palette
1732                  prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
18181733
1819               curitem->texture()->get_scaled(width, height, prim->texture, list);
1820                    // set the palette
1821#if 1
1822               const dynamic_array<rgb_t> *adjusted_pal = curitem->texture()->get_adjusted_palette(container);
1823                    prim->texture.set_palette(adjusted_pal);
1824#else
1825                    prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
1826#endif
1734                  // determine UV coordinates and apply clipping
1735                  prim->texcoords = oriented_texcoords[finalorient];
1736                  clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
18271737
1828                    // determine UV coordinates and apply clipping
1829                    prim->texcoords = oriented_texcoords[finalorient];
1830                    clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
1831
1832                    // apply the final orientation from the quad flags and then build up the final flags
1833                    prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
1834                                    PRIMFLAG_TEXORIENT(finalorient) |
1835                                    PRIMFLAG_TEXFORMAT(curitem->texture()->format());
1836                    if (blendmode != -1)
1837                        prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
1838                    else
1839                        prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
1738                  // apply the final orientation from the quad flags and then build up the final flags
1739                  prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
1740                              PRIMFLAG_TEXORIENT(finalorient) |
1741                              PRIMFLAG_TEXFORMAT(curitem->texture()->format());
1742                  if (blendmode != -1)
1743                     prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
1744                  else
1745                     prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
1746               }
18401747            }
18411748            else
18421749            {
r242703r242704
18711778      width = render_round_nearest(prim->bounds.x1) - render_round_nearest(prim->bounds.x0);
18721779      height = render_round_nearest(prim->bounds.y1) - render_round_nearest(prim->bounds.y0);
18731780
1874      container.overlay()->get_scaled(
1781      bool got_scaled = container.overlay()->get_scaled(
18751782            (container_xform.orientation & ORIENTATION_SWAP_XY) ? height : width,
18761783            (container_xform.orientation & ORIENTATION_SWAP_XY) ? width : height, prim->texture, list);
1784      if (got_scaled)
1785      {
1786         // determine UV coordinates
1787         prim->texcoords = oriented_texcoords[container_xform.orientation];
18771788
1878      // determine UV coordinates
1879        prim->texcoords = oriented_texcoords[container_xform.orientation];
1880
1881        // set the flags and add it to the list
1882        prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
1883                        PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
1884                        PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
1885                        PRIMFLAG_TEXSHADE(1);
1886
1887        list.append_or_return(*prim, false);
1789         // set the flags and add it to the list
1790         prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
1791                     PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
1792                     PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
1793                     PRIMFLAG_TEXSHADE(1);
1794      }
1795      list.append_or_return(*prim, !got_scaled);
18881796   }
18891797}
18901798
r242703r242704
19221830      height = MIN(height, m_maxtexheight);
19231831
19241832      // get the scaled texture and append it
1833      bool clipped = true;
1834      if (texture->get_scaled(width, height, prim->texture, list))
1835      {
1836         // compute the clip rect
1837         render_bounds cliprect;
1838         cliprect.x0 = render_round_nearest(xform.xoffs);
1839         cliprect.y0 = render_round_nearest(xform.yoffs);
1840         cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
1841         cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
1842         sect_render_bounds(&cliprect, &m_bounds);
19251843
1926      texture->get_scaled(width, height, prim->texture, list);
1844         // determine UV coordinates and apply clipping
1845         prim->texcoords = oriented_texcoords[xform.orientation];
1846         clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
1847      }
19271848
1928        // compute the clip rect
1929        render_bounds cliprect;
1930        cliprect.x0 = render_round_nearest(xform.xoffs);
1931        cliprect.y0 = render_round_nearest(xform.yoffs);
1932        cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
1933        cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
1934        sect_render_bounds(&cliprect, &m_bounds);
1935
1936        // determine UV coordinates and apply clipping
1937        prim->texcoords = oriented_texcoords[xform.orientation];
1938        bool clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
1939
19401849      // add to the list or free if we're clipped out
19411850      list.append_or_return(*prim, clipped);
19421851   }
trunk/src/emu/render.h
r242703r242704
167167// texture scaling callback
168168typedef void (*texture_scaler_func)(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
169169
170
170171// render_bounds - floating point bounding rectangle
171172struct render_bounds
172173{
r242703r242704
209210
210211
211212// render_texinfo - texture information
212
213
214struct render_palette_copy
213struct render_texinfo
215214{
216    int ref_count;
217    dynamic_array<rgb_t> palette;
218};
219
220class render_texinfo
221{
222public:
223    render_texinfo()
224    : base(NULL), rowpixels(0), width(0), height(0),
225      seqid(0), osddata(0), m_palette(NULL)
226    {}
227
228    render_texinfo(const render_texinfo &src);
229
230    ~render_texinfo()
231    {
232        free_palette();
233    }
234
235    render_texinfo &operator=(const render_texinfo &src);
236
237215   void *              base;               // base of the data
238216   UINT32              rowpixels;          // pixels per row
239217   UINT32              width;              // width of the image
240218   UINT32              height;             // height of the image
219   const rgb_t *       palette;            // palette for PALETTE16 textures, LUTs for RGB15/RGB32
241220   UINT32              seqid;              // sequence ID
242221   UINT64              osddata;            // aux data to pass to osd
243
244    const rgb_t *       palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
245
246    void set_palette(const dynamic_array<rgb_t> *source);
247
248private:
249    void free_palette();
250
251    render_palette_copy *m_palette;     // palette for PALETTE16 textures, LUTs for RGB15/RGB32
252222};
253223
254224
r242703r242704
463433
464434private:
465435   // internal helpers
466   void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist);
467   const dynamic_array<rgb_t> *get_adjusted_palette(render_container &container);
436   bool get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist);
437   const rgb_t *get_adjusted_palette(render_container &container);
468438
469439   static const int MAX_TEXTURE_SCALES = 8;
470440
r242703r242704
554524   bool has_brightness_contrast_gamma_changes() const { return (m_user.m_brightness != 1.0f || m_user.m_contrast != 1.0f || m_user.m_gamma != 1.0f); }
555525   UINT8 apply_brightness_contrast_gamma(UINT8 value);
556526   float apply_brightness_contrast_gamma_fp(float value);
557   const dynamic_array<rgb_t> *bcg_lookup_table(int texformat, palette_t *palette = NULL);
527   const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = NULL);
558528
559529private:
560530   // an item describes a high level primitive that is added to a container
r242703r242704
606576   render_texture *        m_overlaytexture;       // overlay texture
607577   auto_pointer<palette_client> m_palclient;       // client to the screen palette
608578   dynamic_array<rgb_t>    m_bcglookup;            // full palette lookup with bcg adjustments
609   dynamic_array<rgb_t>    m_bcglookup256;         // lookup table for brightness/contrast/gamma
579   rgb_t                   m_bcglookup256[0x400];  // lookup table for brightness/contrast/gamma
610580};
611581
612582
trunk/src/emu/rendersw.inc
r242703r242704
130130
131131   static inline UINT32 get_texel_palette16(const render_texinfo &texture, INT32 curu, INT32 curv)
132132   {
133      const rgb_t *palbase = texture.palette();
134133      if (_BilinearFilter)
135134      {
136135         INT32 u0 = curu >> 16;
r242703r242704
145144         const UINT16 *texbase = reinterpret_cast<const UINT16 *>(texture.base);
146145         texbase += v0 * texture.rowpixels + u0;
147146
148         UINT32 pix00 = palbase[texbase[0]];
149         UINT32 pix01 = palbase[texbase[u1]];
150         UINT32 pix10 = palbase[texbase[v1]];
151         UINT32 pix11 = palbase[texbase[u1 + v1]];
147         UINT32 pix00 = texture.palette[texbase[0]];
148         UINT32 pix01 = texture.palette[texbase[u1]];
149         UINT32 pix10 = texture.palette[texbase[v1]];
150         UINT32 pix11 = texture.palette[texbase[u1 + v1]];
152151         return rgb_bilinear_filter(pix00, pix01, pix10, pix11, curu >> 8, curv >> 8);
153152      }
154153      else
155154      {
156155         const UINT16 *texbase = reinterpret_cast<const UINT16 *>(texture.base) + (curv >> 16) * texture.rowpixels + (curu >> 16);
157         return palbase[texbase[0]];
156         return texture.palette[texbase[0]];
158157      }
159158   }
160159
r242703r242704
166165
167166   static inline UINT32 get_texel_palette16a(const render_texinfo &texture, INT32 curu, INT32 curv)
168167   {
169      const rgb_t *palbase = texture.palette();
170168      if (_BilinearFilter)
171169      {
172170         INT32 u0 = curu >> 16;
r242703r242704
181179         const UINT16 *texbase = reinterpret_cast<const UINT16 *>(texture.base);
182180         texbase += v0 * texture.rowpixels + u0;
183181
184         UINT32 pix00 = palbase[texbase[0]];
185         UINT32 pix01 = palbase[texbase[u1]];
186         UINT32 pix10 = palbase[texbase[v1]];
187         UINT32 pix11 = palbase[texbase[u1 + v1]];
182         UINT32 pix00 = texture.palette[texbase[0]];
183         UINT32 pix01 = texture.palette[texbase[u1]];
184         UINT32 pix10 = texture.palette[texbase[v1]];
185         UINT32 pix11 = texture.palette[texbase[u1 + v1]];
188186         return rgba_bilinear_filter(pix00, pix01, pix10, pix11, curu >> 8, curv >> 8);
189187      }
190188      else
191189      {
192190         const UINT16 *texbase = reinterpret_cast<const UINT16 *>(texture.base) + (curv >> 16) * texture.rowpixels + (curu >> 16);
193         return palbase[texbase[0]];
191         return texture.palette[texbase[0]];
194192      }
195193   }
196194
r242703r242704
622620      INT32 endx = setup.endx;
623621
624622      // ensure all parameters are valid
625      assert(prim.texture.palette() != NULL);
623      assert(prim.texture.palette != NULL);
626624
627625      // fast case: no coloring, no alpha
628626      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r242703r242704
730728      INT32 endx = setup.endx;
731729
732730      // ensure all parameters are valid
733      assert(prim.texture.palette() != NULL);
731      assert(prim.texture.palette != NULL);
734732
735733      // fast case: no coloring, no alpha
736734      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r242703r242704
823821      INT32 endx = setup.endx;
824822
825823      // ensure all parameters are valid
826      assert(prim.texture.palette() != NULL);
824      assert(prim.texture.palette != NULL);
827825
828826      // fast case: no coloring, no alpha
829827      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r242703r242704
914912
915913   static void draw_quad_yuy16_none(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
916914   {
917      const rgb_t *palbase = prim.texture.palette();
915      const rgb_t *palbase = prim.texture.palette;
918916      INT32 dudx = setup.dudx;
919917      INT32 dvdx = setup.dvdx;
920918      INT32 endx = setup.endx;
r242703r242704
10841082
10851083   static void draw_quad_rgb32(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
10861084   {
1087      const rgb_t *palbase = prim.texture.palette();
1085      const rgb_t *palbase = prim.texture.palette;
10881086      INT32 dudx = setup.dudx;
10891087      INT32 dvdx = setup.dvdx;
10901088      INT32 endx = setup.endx;
r242703r242704
12541252
12551253   static void draw_quad_rgb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
12561254   {
1257      const rgb_t *palbase = prim.texture.palette();
1255      const rgb_t *palbase = prim.texture.palette;
12581256      INT32 dudx = setup.dudx;
12591257      INT32 dvdx = setup.dvdx;
12601258      INT32 endx = setup.endx;
r242703r242704
13921390
13931391   static void draw_quad_argb32_alpha(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
13941392   {
1395      const rgb_t *palbase = prim.texture.palette();
1393      const rgb_t *palbase = prim.texture.palette;
13961394      INT32 dudx = setup.dudx;
13971395      INT32 dvdx = setup.dvdx;
13981396      INT32 endx = setup.endx;
r242703r242704
15381536
15391537   static void draw_quad_argb32_multiply(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
15401538   {
1541      const rgb_t *palbase = prim.texture.palette();
1539      const rgb_t *palbase = prim.texture.palette;
15421540      INT32 dudx = setup.dudx;
15431541      INT32 dvdx = setup.dvdx;
15441542      INT32 endx = setup.endx;
r242703r242704
16571655
16581656   static void draw_quad_argb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
16591657   {
1660      const rgb_t *palbase = prim.texture.palette();
1658      const rgb_t *palbase = prim.texture.palette;
16611659      INT32 dudx = setup.dudx;
16621660      INT32 dvdx = setup.dvdx;
16631661      INT32 endx = setup.endx;
trunk/src/emu/rendlay.c
r242703r242704
9494
9595enum
9696{
97   LINE_CAP_NONE = 0,
98   LINE_CAP_START = 1,
99   LINE_CAP_END = 2
97    LINE_CAP_NONE = 0,
98    LINE_CAP_START = 1,
99    LINE_CAP_END = 2
100100};
101101
102102
r242703r242704
120120
121121inline int gcd(int a, int b)
122122{
123   while (b != 0)
124   {
125      int t = b;
126      b = a % b;
127      a = t;
128   }
129   return a;
123    while (b != 0)
124    {
125        int t = b;
126        b = a % b;
127        a = t;
128    }
129    return a;
130130}
131131
132132
r242703r242704
137137
138138inline void reduce_fraction(int &num, int &den)
139139{
140   // search the greatest common divisor
141   int div = gcd(num, den);
140    // search the greatest common divisor
141    int div = gcd(num, den);
142142
143   // reduce the fraction if a common divisor has been found
144   if (div > 1)
145   {
146      num /= div;
147      den /= div;
148   }
143    // reduce the fraction if a common divisor has been found
144    if (div > 1)
145    {
146        num /= div;
147        den /= div;
148    }
149149}
150150
151151
r242703r242704
161161
162162static int get_variable_value(running_machine &machine, const char *string, char **outputptr)
163163{
164   char temp[100];
164    char temp[100];
165165
166   // screen 0 parameters
167   screen_device_iterator iter(machine.root_device());
168   int scrnum = 0;
169   for (const screen_device *device = iter.first(); device != NULL; device = iter.next(), scrnum++)
170   {
171      // native X aspect factor
172      sprintf(temp, "~scr%dnativexaspect~", scrnum);
173      if (!strncmp(string, temp, strlen(temp)))
174      {
175         int num = device->visible_area().width();
176         int den = device->visible_area().height();
177         reduce_fraction(num, den);
178         *outputptr += sprintf(*outputptr, "%d", num);
179         return strlen(temp);
180      }
166    // screen 0 parameters
167    screen_device_iterator iter(machine.root_device());
168    int scrnum = 0;
169    for (const screen_device *device = iter.first(); device != NULL; device = iter.next(), scrnum++)
170    {
171        // native X aspect factor
172        sprintf(temp, "~scr%dnativexaspect~", scrnum);
173        if (!strncmp(string, temp, strlen(temp)))
174        {
175            int num = device->visible_area().width();
176            int den = device->visible_area().height();
177            reduce_fraction(num, den);
178            *outputptr += sprintf(*outputptr, "%d", num);
179            return strlen(temp);
180        }
181181
182      // native Y aspect factor
183      sprintf(temp, "~scr%dnativeyaspect~", scrnum);
184      if (!strncmp(string, temp, strlen(temp)))
185      {
186         int num = device->visible_area().width();
187         int den = device->visible_area().height();
188         reduce_fraction(num, den);
189         *outputptr += sprintf(*outputptr, "%d", den);
190         return strlen(temp);
191      }
182        // native Y aspect factor
183        sprintf(temp, "~scr%dnativeyaspect~", scrnum);
184        if (!strncmp(string, temp, strlen(temp)))
185        {
186            int num = device->visible_area().width();
187            int den = device->visible_area().height();
188            reduce_fraction(num, den);
189            *outputptr += sprintf(*outputptr, "%d", den);
190            return strlen(temp);
191        }
192192
193      // native width
194      sprintf(temp, "~scr%dwidth~", scrnum);
195      if (!strncmp(string, temp, strlen(temp)))
196      {
197         *outputptr += sprintf(*outputptr, "%d", device->visible_area().width());
198         return strlen(temp);
199      }
193        // native width
194        sprintf(temp, "~scr%dwidth~", scrnum);
195        if (!strncmp(string, temp, strlen(temp)))
196        {
197            *outputptr += sprintf(*outputptr, "%d", device->visible_area().width());
198            return strlen(temp);
199        }
200200
201      // native height
202      sprintf(temp, "~scr%dheight~", scrnum);
203      if (!strncmp(string, temp, strlen(temp)))
204      {
205         *outputptr += sprintf(*outputptr, "%d", device->visible_area().height());
206         return strlen(temp);
207      }
208   }
201        // native height
202        sprintf(temp, "~scr%dheight~", scrnum);
203        if (!strncmp(string, temp, strlen(temp)))
204        {
205            *outputptr += sprintf(*outputptr, "%d", device->visible_area().height());
206            return strlen(temp);
207        }
208    }
209209
210   // default: copy the first character and continue
211   **outputptr = *string;
212   *outputptr += 1;
213   return 1;
210    // default: copy the first character and continue
211    **outputptr = *string;
212    *outputptr += 1;
213    return 1;
214214}
215215
216216
r242703r242704
222222
223223static const char *xml_get_attribute_string_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, const char *defvalue)
224224{
225   const char *str = xml_get_attribute_string(&node, attribute, NULL);
226   static char buffer[1000];
225    const char *str = xml_get_attribute_string(&node, attribute, NULL);
226    static char buffer[1000];
227227
228   // if nothing, just return the default
229   if (str == NULL)
230      return defvalue;
228    // if nothing, just return the default
229    if (str == NULL)
230        return defvalue;
231231
232   // if no tildes, don't worry
233   if (strchr(str, '~') == NULL)
234      return str;
232    // if no tildes, don't worry
233    if (strchr(str, '~') == NULL)
234        return str;
235235
236   // make a copy of the string, doing substitutions along the way
237   const char *s;
238   char *d;
239   for (s = str, d = buffer; *s != 0; )
240   {
241      // if not a variable, just copy
242      if (*s != '~')
243         *d++ = *s++;
236    // make a copy of the string, doing substitutions along the way
237    const char *s;
238    char *d;
239    for (s = str, d = buffer; *s != 0; )
240    {
241        // if not a variable, just copy
242        if (*s != '~')
243            *d++ = *s++;
244244
245      // extract the variable
246      else
247         s += get_variable_value(machine, s, &d);
248   }
249   *d = 0;
250   return buffer;
245        // extract the variable
246        else
247            s += get_variable_value(machine, s, &d);
248    }
249    *d = 0;
250    return buffer;
251251}
252252
253253
r242703r242704
259259
260260static int xml_get_attribute_int_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, int defvalue)
261261{
262   const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
263   int value;
262    const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
263    int value;
264264
265   if (string == NULL)
266      return defvalue;
267   if (string[0] == '$')
268      return (sscanf(&string[1], "%X", &value) == 1) ? value : defvalue;
269   if (string[0] == '0' && string[1] == 'x')
270      return (sscanf(&string[2], "%X", &value) == 1) ? value : defvalue;
271   if (string[0] == '#')
272      return (sscanf(&string[1], "%d", &value) == 1) ? value : defvalue;
273   return (sscanf(&string[0], "%d", &value) == 1) ? value : defvalue;
265    if (string == NULL)
266        return defvalue;
267    if (string[0] == '$')
268        return (sscanf(&string[1], "%X", &value) == 1) ? value : defvalue;
269    if (string[0] == '0' && string[1] == 'x')
270        return (sscanf(&string[2], "%X", &value) == 1) ? value : defvalue;
271    if (string[0] == '#')
272        return (sscanf(&string[1], "%d", &value) == 1) ? value : defvalue;
273    return (sscanf(&string[0], "%d", &value) == 1) ? value : defvalue;
274274}
275275
276276
r242703r242704
282282
283283static float xml_get_attribute_float_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, float defvalue)
284284{
285   const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
286   float value;
285    const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
286    float value;
287287
288   if (string == NULL || sscanf(string, "%f", &value) != 1)
289      return defvalue;
290   return value;
288    if (string == NULL || sscanf(string, "%f", &value) != 1)
289        return defvalue;
290    return value;
291291}
292292
293293
r242703r242704
297297
298298void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bounds &bounds)
299299{
300   // skip if nothing
301   if (boundsnode == NULL)
302   {
303      bounds.x0 = bounds.y0 = 0.0f;
304      bounds.x1 = bounds.y1 = 1.0f;
305      return;
306   }
300    // skip if nothing
301    if (boundsnode == NULL)
302    {
303        bounds.x0 = bounds.y0 = 0.0f;
304        bounds.x1 = bounds.y1 = 1.0f;
305        return;
306    }
307307
308   // parse out the data
309   if (xml_get_attribute(boundsnode, "left") != NULL)
310   {
311      // left/right/top/bottom format
312      bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "left", 0.0f);
313      bounds.x1 = xml_get_attribute_float_with_subst(machine, *boundsnode, "right", 1.0f);
314      bounds.y0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "top", 0.0f);
315      bounds.y1 = xml_get_attribute_float_with_subst(machine, *boundsnode, "bottom", 1.0f);
316   }
317   else if (xml_get_attribute(boundsnode, "x") != NULL)
318   {
319      // x/y/width/height format
320      bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "x", 0.0f);
321      bounds.x1 = bounds.x0 + xml_get_attribute_float_with_subst(machine, *boundsnode, "width", 1.0f);
322      bounds.y0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "y", 0.0f);
323      bounds.y1 = bounds.y0 + xml_get_attribute_float_with_subst(machine, *boundsnode, "height", 1.0f);
324   }
325   else
326      throw emu_fatalerror("Illegal bounds value in XML");
308    // parse out the data
309    if (xml_get_attribute(boundsnode, "left") != NULL)
310    {
311        // left/right/top/bottom format
312        bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "left", 0.0f);
313        bounds.x1 = xml_get_attribute_float_with_subst(machine, *boundsnode, "right", 1.0f);
314        bounds.y0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "top", 0.0f);
315        bounds.y1 = xml_get_attribute_float_with_subst(machine, *boundsnode, "bottom", 1.0f);
316    }
317    else if (xml_get_attribute(boundsnode, "x") != NULL)
318    {
319        // x/y/width/height format
320        bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "x", 0.0f);
321        bounds.x1 = bounds.x0 + xml_get_attribute_float_with_subst(machine, *boundsnode, "width", 1.0f);
322        bounds.y0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "y", 0.0f);
323        bounds.y1 = bounds.y0 + xml_get_attribute_float_with_subst(machine, *boundsnode, "height", 1.0f);
324    }
325    else
326        throw emu_fatalerror("Illegal bounds value in XML");
327327
328   // check for errors
329   if (bounds.x0 > bounds.x1 || bounds.y0 > bounds.y1)
330      throw emu_fatalerror("Illegal bounds value in XML: (%f-%f)-(%f-%f)", bounds.x0, bounds.x1, bounds.y0, bounds.y1);
328    // check for errors
329    if (bounds.x0 > bounds.x1 || bounds.y0 > bounds.y1)
330        throw emu_fatalerror("Illegal bounds value in XML: (%f-%f)-(%f-%f)", bounds.x0, bounds.x1, bounds.y0, bounds.y1);
331331}
332332
333333
r242703r242704
337337
338338void parse_color(running_machine &machine, xml_data_node *colornode, render_color &color)
339339{
340   // skip if nothing
341   if (colornode == NULL)
342   {
343      color.r = color.g = color.b = color.a = 1.0f;
344      return;
345   }
340    // skip if nothing
341    if (colornode == NULL)
342    {
343        color.r = color.g = color.b = color.a = 1.0f;
344        return;
345    }
346346
347   // parse out the data
348   color.r = xml_get_attribute_float_with_subst(machine, *colornode, "red", 1.0);
349   color.g = xml_get_attribute_float_with_subst(machine, *colornode, "green", 1.0);
350   color.b = xml_get_attribute_float_with_subst(machine, *colornode, "blue", 1.0);
351   color.a = xml_get_attribute_float_with_subst(machine, *colornode, "alpha", 1.0);
347    // parse out the data
348    color.r = xml_get_attribute_float_with_subst(machine, *colornode, "red", 1.0);
349    color.g = xml_get_attribute_float_with_subst(machine, *colornode, "green", 1.0);
350    color.b = xml_get_attribute_float_with_subst(machine, *colornode, "blue", 1.0);
351    color.a = xml_get_attribute_float_with_subst(machine, *colornode, "alpha", 1.0);
352352
353   // check for errors
354   if (color.r < 0.0 || color.r > 1.0 || color.g < 0.0 || color.g > 1.0 ||
355      color.b < 0.0 || color.b > 1.0 || color.a < 0.0 || color.a > 1.0)
356      throw emu_fatalerror("Illegal ARGB color value in XML: %f,%f,%f,%f", color.r, color.g, color.b, color.a);
353    // check for errors
354    if (color.r < 0.0 || color.r > 1.0 || color.g < 0.0 || color.g > 1.0 ||
355        color.b < 0.0 || color.b > 1.0 || color.a < 0.0 || color.a > 1.0)
356        throw emu_fatalerror("Illegal ARGB color value in XML: %f,%f,%f,%f", color.r, color.g, color.b, color.a);
357357}
358358
359359
r242703r242704
364364
365365static void parse_orientation(running_machine &machine, xml_data_node *orientnode, int &orientation)
366366{
367   // skip if nothing
368   if (orientnode == NULL)
369   {
370      orientation = ROT0;
371      return;
372   }
367    // skip if nothing
368    if (orientnode == NULL)
369    {
370        orientation = ROT0;
371        return;
372    }
373373
374   // parse out the data
375   int rotate = xml_get_attribute_int_with_subst(machine, *orientnode, "rotate", 0);
376   switch (rotate)
377   {
378      case 0:     orientation = ROT0;     break;
379      case 90:    orientation = ROT90;    break;
380      case 180:   orientation = ROT180;   break;
381      case 270:   orientation = ROT270;   break;
382      default:    throw emu_fatalerror("Invalid rotation in XML orientation node: %d", rotate);
383   }
384   if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "swapxy", "no")) == 0)
385      orientation ^= ORIENTATION_SWAP_XY;
386   if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "flipx", "no")) == 0)
387      orientation ^= ORIENTATION_FLIP_X;
388   if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "flipy", "no")) == 0)
389      orientation ^= ORIENTATION_FLIP_Y;
374    // parse out the data
375    int rotate = xml_get_attribute_int_with_subst(machine, *orientnode, "rotate", 0);
376    switch (rotate)
377    {
378        case 0:     orientation = ROT0;     break;
379        case 90:    orientation = ROT90;    break;
380        case 180:   orientation = ROT180;   break;
381        case 270:   orientation = ROT270;   break;
382        default:    throw emu_fatalerror("Invalid rotation in XML orientation node: %d", rotate);
383    }
384    if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "swapxy", "no")) == 0)
385        orientation ^= ORIENTATION_SWAP_XY;
386    if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "flipx", "no")) == 0)
387        orientation ^= ORIENTATION_FLIP_X;
388    if (strcmp("yes", xml_get_attribute_string_with_subst(machine, *orientnode, "flipy", "no")) == 0)
389        orientation ^= ORIENTATION_FLIP_Y;
390390}
391391
392392
r242703r242704
400400//-------------------------------------------------
401401
402402layout_element::layout_element(running_machine &machine, xml_data_node &elemnode, const char *dirname)
403   : m_next(NULL),
404      m_machine(machine),
405      m_defstate(0),
406      m_maxstate(0)
403    : m_next(NULL),
404        m_machine(machine),
405        m_defstate(0),
406        m_maxstate(0)
407407{
408   // extract the name
409   const char *name = xml_get_attribute_string_with_subst(machine, elemnode, "name", NULL);
410   if (name == NULL)
411      throw emu_fatalerror("All layout elements must have a name!\n");
412   m_name = name;
408    // extract the name
409    const char *name = xml_get_attribute_string_with_subst(machine, elemnode, "name", NULL);
410    if (name == NULL)
411        throw emu_fatalerror("All layout elements must have a name!\n");
412    m_name = name;
413413
414   // get the default state
415   m_defstate = xml_get_attribute_int_with_subst(machine, elemnode, "defstate", -1);
414    // get the default state
415    m_defstate = xml_get_attribute_int_with_subst(machine, elemnode, "defstate", -1);
416416
417   // parse components in order
418   bool first = true;
419   render_bounds bounds = { 0 };
420   for (xml_data_node *compnode = elemnode.child; compnode != NULL; compnode = compnode->next)
421   {
422      // allocate a new component
423      component &newcomp = m_complist.append(*global_alloc(component(machine, *compnode, dirname)));
417    // parse components in order
418    bool first = true;
419    render_bounds bounds = { 0 };
420    for (xml_data_node *compnode = elemnode.child; compnode != NULL; compnode = compnode->next)
421    {
422        // allocate a new component
423        component &newcomp = m_complist.append(*global_alloc(component(machine, *compnode, dirname)));
424424
425      // accumulate bounds
426      if (first)
427         bounds = newcomp.m_bounds;
428      else
429         union_render_bounds(&bounds, &newcomp.m_bounds);
430      first = false;
425        // accumulate bounds
426        if (first)
427            bounds = newcomp.m_bounds;
428        else
429            union_render_bounds(&bounds, &newcomp.m_bounds);
430        first = false;
431431
432      // determine the maximum state
433      if (newcomp.m_state > m_maxstate)
434         m_maxstate = newcomp.m_state;
435      if (newcomp.m_type == component::CTYPE_LED7SEG || newcomp.m_type == component::CTYPE_LED8SEG_GTS1)
436         m_maxstate = 255;
437      if (newcomp.m_type == component::CTYPE_LED14SEG)
438         m_maxstate = 16383;
439      if (newcomp.m_type == component::CTYPE_LED14SEGSC || newcomp.m_type == component::CTYPE_LED16SEG)
440         m_maxstate = 65535;
441      if (newcomp.m_type == component::CTYPE_LED16SEGSC)
442         m_maxstate = 262143;
443      if (newcomp.m_type == component::CTYPE_DOTMATRIX)
444         m_maxstate = 255;
445      if (newcomp.m_type == component::CTYPE_DOTMATRIX5DOT)
446         m_maxstate = 31;
447      if (newcomp.m_type == component::CTYPE_DOTMATRIXDOT)
448         m_maxstate = 1;
449      if (newcomp.m_type == component::CTYPE_SIMPLECOUNTER)
450         m_maxstate = xml_get_attribute_int_with_subst(machine, *compnode, "maxstate", 999);
451      if (newcomp.m_type == component::CTYPE_REEL)
452         m_maxstate = 65536;
453   }
432        // determine the maximum state
433        if (newcomp.m_state > m_maxstate)
434            m_maxstate = newcomp.m_state;
435        if (newcomp.m_type == component::CTYPE_LED7SEG || newcomp.m_type == component::CTYPE_LED8SEG_GTS1)
436            m_maxstate = 255;
437        if (newcomp.m_type == component::CTYPE_LED14SEG)
438            m_maxstate = 16383;
439        if (newcomp.m_type == component::CTYPE_LED14SEGSC || newcomp.m_type == component::CTYPE_LED16SEG)
440            m_maxstate = 65535;
441        if (newcomp.m_type == component::CTYPE_LED16SEGSC)
442            m_maxstate = 262143;
443        if (newcomp.m_type == component::CTYPE_DOTMATRIX)
444            m_maxstate = 255;
445        if (newcomp.m_type == component::CTYPE_DOTMATRIX5DOT)
446            m_maxstate = 31;
447        if (newcomp.m_type == component::CTYPE_DOTMATRIXDOT)
448            m_maxstate = 1;
449        if (newcomp.m_type == component::CTYPE_SIMPLECOUNTER)
450            m_maxstate = xml_get_attribute_int_with_subst(machine, *compnode, "maxstate", 999);
451        if (newcomp.m_type == component::CTYPE_REEL)
452            m_maxstate = 65536;
453    }
454454
455   if (m_complist.first() != NULL)
456   {
457      // determine the scale/offset for normalization
458      float xoffs = bounds.x0;
459      float yoffs = bounds.y0;
460      float xscale = 1.0f / (bounds.x1 - bounds.x0);
461      float yscale = 1.0f / (bounds.y1 - bounds.y0);
455    if (m_complist.first() != NULL)
456    {
457        // determine the scale/offset for normalization
458        float xoffs = bounds.x0;
459        float yoffs = bounds.y0;
460        float xscale = 1.0f / (bounds.x1 - bounds.x0);
461        float yscale = 1.0f / (bounds.y1 - bounds.y0);
462462
463      // normalize all the component bounds
464      for (component *curcomp = m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
465      {
466         curcomp->m_bounds.x0 = (curcomp->m_bounds.x0 - xoffs) * xscale;
467         curcomp->m_bounds.x1 = (curcomp->m_bounds.x1 - xoffs) * xscale;
468         curcomp->m_bounds.y0 = (curcomp->m_bounds.y0 - yoffs) * yscale;
469         curcomp->m_bounds.y1 = (curcomp->m_bounds.y1 - yoffs) * yscale;
470      }
471   }
463        // normalize all the component bounds
464        for (component *curcomp = m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
465        {
466            curcomp->m_bounds.x0 = (curcomp->m_bounds.x0 - xoffs) * xscale;
467            curcomp->m_bounds.x1 = (curcomp->m_bounds.x1 - xoffs) * xscale;
468            curcomp->m_bounds.y0 = (curcomp->m_bounds.y0 - yoffs) * yscale;
469            curcomp->m_bounds.y1 = (curcomp->m_bounds.y1 - yoffs) * yscale;
470        }
471    }
472472
473   // allocate an array of element textures for the states
474   m_elemtex.resize(m_maxstate + 1);
473    // allocate an array of element textures for the states
474    m_elemtex.resize(m_maxstate + 1);
475475}
476476
477477
r242703r242704
492492
493493render_texture *layout_element::state_texture(int state)
494494{
495   assert(state <= m_maxstate);
496   if (m_elemtex[state].m_texture == NULL)
497   {
498      m_elemtex[state].m_element = this;
499      m_elemtex[state].m_state = state;
500      m_elemtex[state].m_texture = machine().render().texture_alloc(element_scale, &m_elemtex[state]);
501   }
502   return m_elemtex[state].m_texture;
495    assert(state <= m_maxstate);
496    if (m_elemtex[state].m_texture == NULL)
497    {
498        m_elemtex[state].m_element = this;
499        m_elemtex[state].m_state = state;
500        m_elemtex[state].m_texture = machine().render().texture_alloc(element_scale, &m_elemtex[state]);
501    }
502    return m_elemtex[state].m_texture;
503503}
504504
505505
r242703r242704
511511
512512void layout_element::element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param)
513513{
514   texture *elemtex = (texture *)param;
514    texture *elemtex = (texture *)param;
515515
516   // iterate over components that are part of the current state
517   for (component *curcomp = elemtex->m_element->m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
518      if (curcomp->m_state == -1 || curcomp->m_state == elemtex->m_state)
519      {
520         // get the local scaled bounds
521         rectangle bounds;
522         bounds.min_x = render_round_nearest(curcomp->bounds().x0 * dest.width());
523         bounds.min_y = render_round_nearest(curcomp->bounds().y0 * dest.height());
524         bounds.max_x = render_round_nearest(curcomp->bounds().x1 * dest.width());
525         bounds.max_y = render_round_nearest(curcomp->bounds().y1 * dest.height());
526         bounds &= dest.cliprect();
516    // iterate over components that are part of the current state
517    for (component *curcomp = elemtex->m_element->m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
518        if (curcomp->m_state == -1 || curcomp->m_state == elemtex->m_state)
519        {
520            // get the local scaled bounds
521            rectangle bounds;
522            bounds.min_x = render_round_nearest(curcomp->bounds().x0 * dest.width());
523            bounds.min_y = render_round_nearest(curcomp->bounds().y0 * dest.height());
524            bounds.max_x = render_round_nearest(curcomp->bounds().x1 * dest.width());
525            bounds.max_y = render_round_nearest(curcomp->bounds().y1 * dest.height());
526            bounds &= dest.cliprect();
527527
528         // based on the component type, add to the texture
529         curcomp->draw(elemtex->m_element->machine(), dest, bounds, elemtex->m_state);
530      }
528            // based on the component type, add to the texture
529            curcomp->draw(elemtex->m_element->machine(), dest, bounds, elemtex->m_state);
530        }
531531}
532532
533533
r242703r242704
540540//-------------------------------------------------
541541
542542layout_element::texture::texture()
543   : m_element(NULL),
544      m_texture(NULL),
545      m_state(0)
543    : m_element(NULL),
544        m_texture(NULL),
545        m_state(0)
546546{
547547}
548548
r242703r242704
553553
554554layout_element::texture::~texture()
555555{
556   if (m_element != NULL)
557      m_element->machine().render().texture_free(m_texture);
556    if (m_element != NULL)
557        m_element->machine().render().texture_free(m_texture);
558558}
559559
560560
r242703r242704
568568//-------------------------------------------------
569569
570570layout_element::component::component(running_machine &machine, xml_data_node &compnode, const char *dirname)
571   : m_next(NULL),
572      m_type(CTYPE_INVALID),
573      m_state(0)
571    : m_next(NULL),
572        m_type(CTYPE_INVALID),
573        m_state(0)
574574{
575   for (int i=0;i<MAX_BITMAPS;i++)
576      m_hasalpha[i] = false;
575    for (int i=0;i<MAX_BITMAPS;i++)
576        m_hasalpha[i] = false;
577577
578   // fetch common data
579   m_state = xml_get_attribute_int_with_subst(machine, compnode, "state", -1);
580   parse_bounds(machine, xml_get_sibling(compnode.child, "bounds"), m_bounds);
581   parse_color(machine, xml_get_sibling(compnode.child, "color"), m_color);
578    // fetch common data
579    m_state = xml_get_attribute_int_with_subst(machine, compnode, "state", -1);
580    parse_bounds(machine, xml_get_sibling(compnode.child, "bounds"), m_bounds);
581    parse_color(machine, xml_get_sibling(compnode.child, "color"), m_color);
582582
583   // image nodes
584   if (strcmp(compnode.name, "image") == 0)
585   {
586      m_type = CTYPE_IMAGE;
587      if (dirname != NULL)
588         m_dirname = dirname;
589      m_imagefile[0] = xml_get_attribute_string_with_subst(machine, compnode, "file", "");
590      m_alphafile[0] = xml_get_attribute_string_with_subst(machine, compnode, "alphafile", "");
591      m_file[0].reset(global_alloc(emu_file(machine.options().art_path(), OPEN_FLAG_READ)));
592   }
583    // image nodes
584    if (strcmp(compnode.name, "image") == 0)
585    {
586        m_type = CTYPE_IMAGE;
587        if (dirname != NULL)
588            m_dirname = dirname;
589        m_imagefile[0] = xml_get_attribute_string_with_subst(machine, compnode, "file", "");
590        m_alphafile[0] = xml_get_attribute_string_with_subst(machine, compnode, "alphafile", "");
591        m_file[0].reset(global_alloc(emu_file(machine.options().art_path(), OPEN_FLAG_READ)));
592    }
593593
594   // text nodes
595   else if (strcmp(compnode.name, "text") == 0)
596   {
597      m_type = CTYPE_TEXT;
598      m_string = xml_get_attribute_string_with_subst(machine, compnode, "string", "");
599      m_textalign = xml_get_attribute_int_with_subst(machine, compnode, "align", 0);
600   }
594    // text nodes
595    else if (strcmp(compnode.name, "text") == 0)
596    {
597        m_type = CTYPE_TEXT;
598        m_string = xml_get_attribute_string_with_subst(machine, compnode, "string", "");
599        m_textalign = xml_get_attribute_int_with_subst(machine, compnode, "align", 0);
600    }
601601
602   // dotmatrix nodes
603   else if (strcmp(compnode.name, "dotmatrix") == 0)
604   {
605      m_type = CTYPE_DOTMATRIX;
606   }
607   else if (strcmp(compnode.name, "dotmatrix5dot") == 0)
608   {
609      m_type = CTYPE_DOTMATRIX5DOT;
610   }
611   else if (strcmp(compnode.name, "dotmatrixdot") == 0)
612   {
613      m_type = CTYPE_DOTMATRIXDOT;
614   }
602    // dotmatrix nodes
603    else if (strcmp(compnode.name, "dotmatrix") == 0)
604    {
605        m_type = CTYPE_DOTMATRIX;
606    }
607    else if (strcmp(compnode.name, "dotmatrix5dot") == 0)
608    {
609        m_type = CTYPE_DOTMATRIX5DOT;
610    }
611    else if (strcmp(compnode.name, "dotmatrixdot") == 0)
612    {
613        m_type = CTYPE_DOTMATRIXDOT;
614    }
615615
616   // simplecounter nodes
617   else if (strcmp(compnode.name, "simplecounter") == 0)
618   {
619      m_type = CTYPE_SIMPLECOUNTER;
620      m_digits = xml_get_attribute_int_with_subst(machine, compnode, "digits", 2);
621      m_textalign = xml_get_attribute_int_with_subst(machine, compnode, "align", 0);
622   }
616    // simplecounter nodes
617    else if (strcmp(compnode.name, "simplecounter") == 0)
618    {
619        m_type = CTYPE_SIMPLECOUNTER;
620        m_digits = xml_get_attribute_int_with_subst(machine, compnode, "digits", 2);
621        m_textalign = xml_get_attribute_int_with_subst(machine, compnode, "align", 0);
622    }
623623
624   // fruit machine reels
625   else if (strcmp(compnode.name, "reel") == 0)
626   {
627      m_type = CTYPE_REEL;
624    // fruit machine reels
625    else if (strcmp(compnode.name, "reel") == 0)
626    {
627        m_type = CTYPE_REEL;
628628
629      astring symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15");
629        astring symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15");
630630
631      // split out position names from string and figure out our number of symbols
632      int location = -1;
633      m_numstops = 0;
634      location=symbollist.find(0,",");
635      while (location!=-1)
636      {
637         m_stopnames[m_numstops] = symbollist;
638         m_stopnames[m_numstops].substr(0, location);
639         symbollist.substr(location+1, symbollist.len()-(location-1));
640         m_numstops++;
641         location=symbollist.find(0,",");
642      }
643      m_stopnames[m_numstops++] = symbollist;
631        // split out position names from string and figure out our number of symbols
632        int location = -1;
633        m_numstops = 0;
634        location=symbollist.find(0,",");
635        while (location!=-1)
636        {
637            m_stopnames[m_numstops] = symbollist;
638            m_stopnames[m_numstops].substr(0, location);
639            symbollist.substr(location+1, symbollist.len()-(location-1));
640            m_numstops++;
641            location=symbollist.find(0,",");
642        }
643        m_stopnames[m_numstops++] = symbollist;
644644
645      // careful, dirname is NULL if we're coming from internal layout, and our string assignment doesn't like that
646      if (dirname != NULL)
647         m_dirname = dirname;
645        // careful, dirname is NULL if we're coming from internal layout, and our string assignment doesn't like that
646        if (dirname != NULL)
647            m_dirname = dirname;
648648
649      for (int i=0;i<m_numstops;i++)
650      {
651         location=m_stopnames[i].find(0,":");
652         if (location!=-1)
653         {
654            m_imagefile[i] = m_stopnames[i];
655            m_stopnames[i].substr(0, location);
656            m_imagefile[i].substr(location+1, m_imagefile[i].len()-(location-1));
649        for (int i=0;i<m_numstops;i++)
650        {
651            location=m_stopnames[i].find(0,":");
652            if (location!=-1)
653            {
654                m_imagefile[i] = m_stopnames[i];
655                m_stopnames[i].substr(0, location);
656                m_imagefile[i].substr(location+1, m_imagefile[i].len()-(location-1));
657657
658            //m_alphafile[i] =
659            m_file[i].reset(global_alloc(emu_file(machine.options().art_path(), OPEN_FLAG_READ)));
660         }
661         else
662         {
663            //m_imagefile[i] = 0;
664            //m_alphafile[i] = 0;
665            m_file[i].reset();
666         }
667      }
658                //m_alphafile[i] =
659                m_file[i].reset(global_alloc(emu_file(machine.options().art_path(), OPEN_FLAG_READ)));
660            }
661            else
662            {
663                //m_imagefile[i] = 0;
664                //m_alphafile[i] = 0;
665                m_file[i].reset();
666            }
667        }
668668
669      m_stateoffset = xml_get_attribute_int_with_subst(machine, compnode, "stateoffset", 0);
670      m_numsymbolsvisible = xml_get_attribute_int_with_subst(machine, compnode, "numsymbolsvisible", 3);
671      m_reelreversed = xml_get_attribute_int_with_subst(machine, compnode, "reelreversed", 0);
672      m_beltreel = xml_get_attribute_int_with_subst(machine, compnode, "beltreel", 0);
669        m_stateoffset = xml_get_attribute_int_with_subst(machine, compnode, "stateoffset", 0);
670        m_numsymbolsvisible = xml_get_attribute_int_with_subst(machine, compnode, "numsymbolsvisible", 3);
671        m_reelreversed = xml_get_attribute_int_with_subst(machine, compnode, "reelreversed", 0);
672        m_beltreel = xml_get_attribute_int_with_subst(machine, compnode, "beltreel", 0);
673673
674   }
674    }
675675
676   // led7seg nodes
677   else if (strcmp(compnode.name, "led7seg") == 0)
678      m_type = CTYPE_LED7SEG;
676    // led7seg nodes
677    else if (strcmp(compnode.name, "led7seg") == 0)
678        m_type = CTYPE_LED7SEG;
679679
680   // led8seg_gts1 nodes
681   else if (strcmp(compnode.name, "led8seg_gts1") == 0)
682      m_type = CTYPE_LED8SEG_GTS1;
680    // led8seg_gts1 nodes
681    else if (strcmp(compnode.name, "led8seg_gts1") == 0)
682        m_type = CTYPE_LED8SEG_GTS1;
683683
684   // led14seg nodes
685   else if (strcmp(compnode.name, "led14seg") == 0)
686      m_type = CTYPE_LED14SEG;
684    // led14seg nodes
685    else if (strcmp(compnode.name, "led14seg") == 0)
686        m_type = CTYPE_LED14SEG;
687687
688   // led14segsc nodes
689   else if (strcmp(compnode.name, "led14segsc") == 0)
690      m_type = CTYPE_LED14SEGSC;
688    // led14segsc nodes
689    else if (strcmp(compnode.name, "led14segsc") == 0)
690        m_type = CTYPE_LED14SEGSC;
691691
692   // led16seg nodes
693   else if (strcmp(compnode.name, "led16seg") == 0)
694      m_type = CTYPE_LED16SEG;
692    // led16seg nodes
693    else if (strcmp(compnode.name, "led16seg") == 0)
694        m_type = CTYPE_LED16SEG;
695695
696   // led16segsc nodes
697   else if (strcmp(compnode.name, "led16segsc") == 0)
698      m_type = CTYPE_LED16SEGSC;
696    // led16segsc nodes
697    else if (strcmp(compnode.name, "led16segsc") == 0)
698        m_type = CTYPE_LED16SEGSC;
699699
700   // rect nodes
701   else if (strcmp(compnode.name, "rect") == 0)
702      m_type = CTYPE_RECT;
700    // rect nodes
701    else if (strcmp(compnode.name, "rect") == 0)
702        m_type = CTYPE_RECT;
703703
704   // disk nodes
705   else if (strcmp(compnode.name, "disk") == 0)
706      m_type = CTYPE_DISK;
704    // disk nodes
705    else if (strcmp(compnode.name, "disk") == 0)
706        m_type = CTYPE_DISK;
707707
708   // error otherwise
709   else
710      throw emu_fatalerror("Unknown element component: %s", compnode.name);
708    // error otherwise
709    else
710        throw emu_fatalerror("Unknown element component: %s", compnode.name);
711711}
712712
713713
r242703r242704
726726
727727void layout_element::component::draw(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
728728{
729   switch (m_type)
730   {
731      case CTYPE_IMAGE:
732         if (!m_bitmap[0].valid())
733            load_bitmap();
734         {
735            bitmap_argb32 destsub(dest, bounds);
736            render_resample_argb_bitmap_hq(destsub, m_bitmap[0], m_color);
737         }
738         break;
729    switch (m_type)
730    {
731        case CTYPE_IMAGE:
732            if (!m_bitmap[0].valid())
733                load_bitmap();
734            {
735                bitmap_argb32 destsub(dest, bounds);
736                render_resample_argb_bitmap_hq(destsub, m_bitmap[0], m_color);
737            }
738            break;
739739
740      case CTYPE_RECT:
741         draw_rect(dest, bounds);
742         break;
740        case CTYPE_RECT:
741            draw_rect(dest, bounds);
742            break;
743743
744      case CTYPE_DISK:
745         draw_disk(dest, bounds);
746         break;
744        case CTYPE_DISK:
745            draw_disk(dest, bounds);
746            break;
747747
748      case CTYPE_TEXT:
749         draw_text(machine, dest, bounds);
750         break;
748        case CTYPE_TEXT:
749            draw_text(machine, dest, bounds);
750            break;
751751
752      case CTYPE_LED7SEG:
753         draw_led7seg(dest, bounds, state);
754         break;
752        case CTYPE_LED7SEG:
753            draw_led7seg(dest, bounds, state);
754            break;
755755
756      case CTYPE_LED8SEG_GTS1:
757         draw_led8seg_gts1(dest, bounds, state);
758         break;
756        case CTYPE_LED8SEG_GTS1:
757            draw_led8seg_gts1(dest, bounds, state);
758            break;
759759
760      case CTYPE_LED14SEG:
761         draw_led14seg(dest, bounds, state);
762         break;
760        case CTYPE_LED14SEG:
761            draw_led14seg(dest, bounds, state);
762            break;
763763
764      case CTYPE_LED16SEG:
765         draw_led16seg(dest, bounds, state);
766         break;
764        case CTYPE_LED16SEG:
765            draw_led16seg(dest, bounds, state);
766            break;
767767
768      case CTYPE_LED14SEGSC:
769         draw_led14segsc(dest, bounds, state);
770         break;
768        case CTYPE_LED14SEGSC:
769            draw_led14segsc(dest, bounds, state);
770            break;
771771
772      case CTYPE_LED16SEGSC:
773         draw_led16segsc(dest, bounds, state);
774         break;
772        case CTYPE_LED16SEGSC:
773            draw_led16segsc(dest, bounds, state);
774            break;
775775
776      case CTYPE_DOTMATRIX:
777         draw_dotmatrix(8, dest, bounds, state);
778         break;
776        case CTYPE_DOTMATRIX:
777            draw_dotmatrix(8, dest, bounds, state);
778            break;
779779
780      case CTYPE_DOTMATRIX5DOT:
781         draw_dotmatrix(5, dest, bounds, state);
782         break;
780        case CTYPE_DOTMATRIX5DOT:
781            draw_dotmatrix(5, dest, bounds, state);
782            break;
783783
784      case CTYPE_DOTMATRIXDOT:
785         draw_dotmatrix(1, dest, bounds, state);
786         break;
784        case CTYPE_DOTMATRIXDOT:
785            draw_dotmatrix(1, dest, bounds, state);
786            break;
787787
788      case CTYPE_SIMPLECOUNTER:
789         draw_simplecounter(machine, dest, bounds, state);
790         break;
788        case CTYPE_SIMPLECOUNTER:
789            draw_simplecounter(machine, dest, bounds, state);
790            break;
791791
792      case CTYPE_REEL:
793         draw_reel(machine, dest, bounds, state);
794         break;
792        case CTYPE_REEL:
793            draw_reel(machine, dest, bounds, state);
794            break;
795795
796      default:
797         throw emu_fatalerror("Unknown component type requested draw()");
798   }
796        default:
797            throw emu_fatalerror("Unknown component type requested draw()");
798    }
799799}
800800
801801
r242703r242704
806806
807807void layout_element::component::draw_rect(bitmap_argb32 &dest, const rectangle &bounds)
808808{
809   // compute premultiplied colors
810   UINT32 r = m_color.r * m_color.a * 255.0;
811   UINT32 g = m_color.g * m_color.a * 255.0;
812   UINT32 b = m_color.b * m_color.a * 255.0;
813   UINT32 inva = (1.0f - m_color.a) * 255.0;
809    // compute premultiplied colors
810    UINT32 r = m_color.r * m_color.a * 255.0;
811    UINT32 g = m_color.g * m_color.a * 255.0;
812    UINT32 b = m_color.b * m_color.a * 255.0;
813    UINT32 inva = (1.0f - m_color.a) * 255.0;
814814
815   // iterate over X and Y
816   for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
817   {
818      for (UINT32 x = bounds.min_x; x <= bounds.max_x; x++)
819      {
820         UINT32 finalr = r;
821         UINT32 finalg = g;
822         UINT32 finalb = b;
815    // iterate over X and Y
816    for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
817    {
818        for (UINT32 x = bounds.min_x; x <= bounds.max_x; x++)
819        {
820            UINT32 finalr = r;
821            UINT32 finalg = g;
822            UINT32 finalb = b;
823823
824         // if we're translucent, add in the destination pixel contribution
825         if (inva > 0)
826         {
827            rgb_t dpix = dest.pix32(y, x);
828            finalr += (dpix.r() * inva) >> 8;
829            finalg += (dpix.g() * inva) >> 8;
830            finalb += (dpix.b() * inva) >> 8;
831         }
824            // if we're translucent, add in the destination pixel contribution
825            if (inva > 0)
826            {
827                rgb_t dpix = dest.pix32(y, x);
828                finalr += (dpix.r() * inva) >> 8;
829                finalg += (dpix.g() * inva) >> 8;
830                finalb += (dpix.b() * inva) >> 8;
831            }
832832
833         // store the target pixel, dividing the RGBA values by the overall scale factor
834         dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
835      }
836   }
833            // store the target pixel, dividing the RGBA values by the overall scale factor
834            dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
835        }
836    }
837837}
838838
839839
r242703r242704
844844
845845void layout_element::component::draw_disk(bitmap_argb32 &dest, const rectangle &bounds)
846846{
847   // compute premultiplied colors
848   UINT32 r = m_color.r * m_color.a * 255.0;
849   UINT32 g = m_color.g * m_color.a * 255.0;
850   UINT32 b = m_color.b * m_color.a * 255.0;
851   UINT32 inva = (1.0f - m_color.a) * 255.0;
847    // compute premultiplied colors
848    UINT32 r = m_color.r * m_color.a * 255.0;
849    UINT32 g = m_color.g * m_color.a * 255.0;
850    UINT32 b = m_color.b * m_color.a * 255.0;
851    UINT32 inva = (1.0f - m_color.a) * 255.0;
852852
853   // find the center
854   float xcenter = float(bounds.xcenter());
855   float ycenter = float(bounds.ycenter());
856   float xradius = float(bounds.width()) * 0.5f;
857   float yradius = float(bounds.height()) * 0.5f;
858   float ooyradius2 = 1.0f / (yradius * yradius);
853    // find the center
854    float xcenter = float(bounds.xcenter());
855    float ycenter = float(bounds.ycenter());
856    float xradius = float(bounds.width()) * 0.5f;
857    float yradius = float(bounds.height()) * 0.5f;
858    float ooyradius2 = 1.0f / (yradius * yradius);
859859
860   // iterate over y
861   for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
862   {
863      float ycoord = ycenter - ((float)y + 0.5f);
864      float xval = xradius * sqrt(1.0f - (ycoord * ycoord) * ooyradius2);
860    // iterate over y
861    for (UINT32 y = bounds.min_y; y <= bounds.max_y; y++)
862    {
863        float ycoord = ycenter - ((float)y + 0.5f);
864        float xval = xradius * sqrt(1.0f - (ycoord * ycoord) * ooyradius2);
865865
866      // compute left/right coordinates
867      INT32 left = (INT32)(xcenter - xval + 0.5f);
868      INT32 right = (INT32)(xcenter + xval + 0.5f);
866        // compute left/right coordinates
867        INT32 left = (INT32)(xcenter - xval + 0.5f);
868        INT32 right = (INT32)(xcenter + xval + 0.5f);
869869
870      // draw this scanline
871      for (UINT32 x = left; x < right; x++)
872      {
873         UINT32 finalr = r;
874         UINT32 finalg = g;
875         UINT32 finalb = b;
870        // draw this scanline
871        for (UINT32 x = left; x < right; x++)
872        {
873            UINT32 finalr = r;
874            UINT32 finalg = g;
875            UINT32 finalb = b;
876876
877         // if we're translucent, add in the destination pixel contribution
878         if (inva > 0)
879         {
880            rgb_t dpix = dest.pix32(y, x);
881            finalr += (dpix.r() * inva) >> 8;
882            finalg += (dpix.g() * inva) >> 8;
883            finalb += (dpix.b() * inva) >> 8;
884         }
877            // if we're translucent, add in the destination pixel contribution
878            if (inva > 0)
879            {
880                rgb_t dpix = dest.pix32(y, x);
881                finalr += (dpix.r() * inva) >> 8;
882                finalg += (dpix.g() * inva) >> 8;
883                finalb += (dpix.b() * inva) >> 8;
884            }
885885
886         // store the target pixel, dividing the RGBA values by the overall scale factor
887         dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
888      }
889   }
886            // store the target pixel, dividing the RGBA values by the overall scale factor
887            dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
888        }
889    }
890890}
891891
892892
r242703r242704
896896
897897void layout_element::component::draw_text(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds)
898898{
899   // compute premultiplied colors
900   UINT32 r = m_color.r * 255.0;
901   UINT32 g = m_color.g * 255.0;
902   UINT32 b = m_color.b * 255.0;
903   UINT32 a = m_color.a * 255.0;
899    // compute premultiplied colors
900    UINT32 r = m_color.r * 255.0;
901    UINT32 g = m_color.g * 255.0;
902    UINT32 b = m_color.b * 255.0;
903    UINT32 a = m_color.a * 255.0;
904904
905   // get the width of the string
906   render_font *font = machine.render().font_alloc("default");
907   float aspect = 1.0f;
908   INT32 width;
905    // get the width of the string
906    render_font *font = machine.render().font_alloc("default");
907    float aspect = 1.0f;
908    INT32 width;
909909
910910
911   while (1)
912   {
913      width = font->string_width(bounds.height(), aspect, m_string);
914      if (width < bounds.width())
915         break;
916      aspect *= 0.9f;
917   }
911    while (1)
912    {
913        width = font->string_width(bounds.height(), aspect, m_string);
914        if (width < bounds.width())
915            break;
916        aspect *= 0.9f;
917    }
918918
919919
920   // get alignment
921   INT32 curx;
922   switch (m_textalign)
923   {
924      // left
925      case 1:
926         curx = bounds.min_x;
927         break;
920    // get alignment
921    INT32 curx;
922    switch (m_textalign)
923    {
924        // left
925        case 1:
926            curx = bounds.min_x;
927            break;
928928
929      // right
930      case 2:
931         curx = bounds.max_x - width;
932         break;
929        // right
930        case 2:
931            curx = bounds.max_x - width;
932            break;
933933
934      // default to center
935      default:
936         curx = bounds.min_x + (bounds.width() - width) / 2;
937         break;
938   }
934        // default to center
935        default:
936            curx = bounds.min_x + (bounds.width() - width) / 2;
937            break;
938    }
939939
940   // allocate a temporary bitmap
941   bitmap_argb32 tempbitmap(dest.width(), dest.height());
940    // allocate a temporary bitmap
941    bitmap_argb32 tempbitmap(dest.width(), dest.height());
942942
943   // loop over characters
944   for (const char *s = m_string; *s != 0; s++)
945   {
946      // get the font bitmap
947      rectangle chbounds;
948      font->get_scaled_bitmap_and_bounds(tempbitmap, bounds.height(), aspect, *s, chbounds);
943    // loop over characters
944    for (const char *s = m_string; *s != 0; s++)
945    {
946        // get the font bitmap
947        rectangle chbounds;
948        font->get_scaled_bitmap_and_bounds(tempbitmap, bounds.height(), aspect, *s, chbounds);
949949
950      // copy the data into the target
951      for (int y = 0; y < chbounds.height(); y++)
952      {
953         int effy = bounds.min_y + y;
954         if (effy >= bounds.min_y && effy <= bounds.max_y)
955         {
956            UINT32 *src = &tempbitmap.pix32(y);
957            UINT32 *d = &dest.pix32(effy);
958            for (int x = 0; x < chbounds.width(); x++)
959            {
960               int effx = curx + x + chbounds.min_x;
961               if (effx >= bounds.min_x && effx <= bounds.max_x)
962               {
963                  UINT32 spix = rgb_t(src[x]).a();
964                  if (spix != 0)
965                  {
966                     rgb_t dpix = d[effx];
967                     UINT32 ta = (a * (spix + 1)) >> 8;
968                     UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
969                     UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
970                     UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
971                     d[effx] = rgb_t(tr, tg, tb);
972                  }
973               }
974            }
975         }
976      }
950        // copy the data into the target
951        for (int y = 0; y < chbounds.height(); y++)
952        {
953            int effy = bounds.min_y + y;
954            if (effy >= bounds.min_y && effy <= bounds.max_y)
955            {
956                UINT32 *src = &tempbitmap.pix32(y);
957                UINT32 *d = &dest.pix32(effy);
958                for (int x = 0; x < chbounds.width(); x++)
959                {
960                    int effx = curx + x + chbounds.min_x;
961                    if (effx >= bounds.min_x && effx <= bounds.max_x)
962                    {
963                        UINT32 spix = rgb_t(src[x]).a();
964                        if (spix != 0)
965                        {
966                            rgb_t dpix = d[effx];
967                            UINT32 ta = (a * (spix + 1)) >> 8;
968                            UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
969                            UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
970                            UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
971                            d[effx] = rgb_t(tr, tg, tb);
972                        }
973                    }
974                }
975            }
976        }
977977
978      // advance in the X direction
979      curx += font->char_width(bounds.height(), aspect, *s);
980   }
978        // advance in the X direction
979        curx += font->char_width(bounds.height(), aspect, *s);
980    }
981981
982   // free the temporary bitmap and font
983   machine.render().font_free(font);
982    // free the temporary bitmap and font
983    machine.render().font_free(font);
984984}
985985
986986void layout_element::component::draw_simplecounter(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
987987{
988   char temp[256];
989   sprintf(temp, "%0*d", m_digits, state);
990   m_string = astring(temp);
991   draw_text(machine, dest, bounds);
988    char temp[256];
989    sprintf(temp, "%0*d", m_digits, state);
990    m_string = astring(temp);
991    draw_text(machine, dest, bounds);
992992}
993993
994994/* state is a normalized value between 0 and 65536 so that we don't need to worry about how many motor steps here or in the .lay, only the number of symbols */
995995void layout_element::component::draw_reel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
996996{
997   if (m_beltreel)
998   {
999      draw_beltreel(machine,dest,bounds,state);
1000   }
1001   else
1002   {
1003      const int max_state_used = 0x10000;
997    if (m_beltreel)
998    {
999        draw_beltreel(machine,dest,bounds,state);
1000    }
1001    else
1002    {
1003        const int max_state_used = 0x10000;
10041004
1005      // shift the reels a bit based on this param, allows fine tuning
1006      int use_state = (state + m_stateoffset) % max_state_used;
1005        // shift the reels a bit based on this param, allows fine tuning
1006        int use_state = (state + m_stateoffset) % max_state_used;
10071007
1008      // compute premultiplied colors
1009      UINT32 r = m_color.r * 255.0;
1010      UINT32 g = m_color.g * 255.0;
1011      UINT32 b = m_color.b * 255.0;
1012      UINT32 a = m_color.a * 255.0;
1008        // compute premultiplied colors
1009        UINT32 r = m_color.r * 255.0;
1010        UINT32 g = m_color.g * 255.0;
1011        UINT32 b = m_color.b * 255.0;
1012        UINT32 a = m_color.a * 255.0;
10131013
1014      // get the width of the string
1015      render_font *font = machine.render().font_alloc("default");
1016      float aspect = 1.0f;
1017      INT32 width;
1014        // get the width of the string
1015        render_font *font = machine.render().font_alloc("default");
1016        float aspect = 1.0f;
1017        INT32 width;
10181018
10191019
1020      int curry = 0;
1021      int num_shown = m_numsymbolsvisible;
1020        int curry = 0;
1021        int num_shown = m_numsymbolsvisible;
10221022
1023      int ourheight = bounds.height();
1023        int ourheight = bounds.height();
10241024
1025      for (int fruit = 0;fruit<m_numstops;fruit++)
1026      {
1027         int basey;
1025        for (int fruit = 0;fruit<m_numstops;fruit++)
1026        {
1027            int basey;
10281028
1029         if (m_reelreversed==1)
1030         {
1031            basey = bounds.min_y + ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
1032         }
1033         else
1034         {
1035            basey = bounds.min_y - ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
1036         }
1029            if (m_reelreversed==1)
1030            {
1031                basey = bounds.min_y + ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
1032            }
1033            else
1034            {
1035                basey = bounds.min_y - ((use_state)*(ourheight/num_shown)/(max_state_used/m_numstops)) + curry;
1036            }
10371037
1038         // wrap around...
1039         if (basey < bounds.min_y)
1040            basey += ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
1041         if (basey > bounds.max_y)
1042            basey -= ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
1038            // wrap around...
1039            if (basey < bounds.min_y)
1040                basey += ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
1041            if (basey > bounds.max_y)
1042                basey -= ((max_state_used)*(ourheight/num_shown)/(max_state_used/m_numstops));
10431043
1044         int endpos = basey+ourheight/num_shown;
1044            int endpos = basey+ourheight/num_shown;
10451045
1046         // only render the symbol / text if it's atually in view because the code is SLOW
1047         if ((endpos >= bounds.min_y) && (basey <= bounds.max_y))
1048         {
1049            while (1)
1050            {
1051               width = font->string_width(ourheight/num_shown, aspect, m_stopnames[fruit]);
1052               if (width < bounds.width())
1053                  break;
1054               aspect *= 0.9f;
1055            }
1046            // only render the symbol / text if it's atually in view because the code is SLOW
1047            if ((endpos >= bounds.min_y) && (basey <= bounds.max_y))
1048            {
1049                while (1)
1050                {
1051                    width = font->string_width(ourheight/num_shown, aspect, m_stopnames[fruit]);
1052                    if (width < bounds.width())
1053                        break;
1054                    aspect *= 0.9f;
1055                }
10561056
1057            INT32 curx;
1058            curx = bounds.min_x + (bounds.width() - width) / 2;
1057                INT32 curx;
1058                curx = bounds.min_x + (bounds.width() - width) / 2;
10591059
1060            if (m_file[fruit])
1061               if (!m_bitmap[fruit].valid())
1062                  load_reel_bitmap(fruit);
1060                if (m_file[fruit])
1061                    if (!m_bitmap[fruit].valid())
1062                        load_reel_bitmap(fruit);
10631063
1064            if (m_file[fruit]) // render gfx
1065            {
1066               bitmap_argb32 tempbitmap2(dest.width(), ourheight/num_shown);
1064                if (m_file[fruit]) // render gfx
1065                {
1066                    bitmap_argb32 tempbitmap2(dest.width(), ourheight/num_shown);
10671067
1068               if (m_bitmap[fruit].valid())
1069               {
1070                  render_resample_argb_bitmap_hq(tempbitmap2, m_bitmap[fruit], m_color);
1068                    if (m_bitmap[fruit].valid())
1069                    {
1070                        render_resample_argb_bitmap_hq(tempbitmap2, m_bitmap[fruit], m_color);
10711071
1072                  for (int y = 0; y < ourheight/num_shown; y++)
1073                  {
1074                     int effy = basey + y;
1072                        for (int y = 0; y < ourheight/num_shown; y++)
1073                        {
1074                            int effy = basey + y;
10751075
1076                     if (effy >= bounds.min_y && effy <= bounds.max_y)
1077                     {
1078                        UINT32 *src = &tempbitmap2.pix32(y);
1079                        UINT32 *d = &dest.pix32(effy);
1080                        for (int x = 0; x < dest.width(); x++)
1081                        {
1082                           int effx = x;
1083                           if (effx >= bounds.min_x && effx <= bounds.max_x)
1084                           {
1085                              UINT32 spix = rgb_t(src[x]).a();
1086                              if (spix != 0)
1087                              {
1088                                 d[effx] = src[x];
1089                              }
1090                           }
1091                        }
1092                     }
1076                            if (effy >= bounds.min_y && effy <= bounds.max_y)
1077                            {
1078                                UINT32 *src = &tempbitmap2.pix32(y);
1079                                UINT32 *d = &dest.pix32(effy);
1080                                for (int x = 0; x < dest.width(); x++)
1081                                {
1082                                    int effx = x;
1083                                    if (effx >= bounds.min_x && effx <= bounds.max_x)
1084                                    {
1085                                        UINT32 spix = rgb_t(src[x]).a();
1086                                        if (spix != 0)
1087                                        {
1088                                            d[effx] = src[x];
1089                                        }
1090                                    }
1091                                }
1092                            }
10931093
1094                  }
1095               }
1096            }
1097            else // render text (fallback)
1098            {
1099               // allocate a temporary bitmap
1100               bitmap_argb32 tempbitmap(dest.width(), dest.height());
1094                        }
1095                    }
1096                }
1097                else // render text (fallback)
1098                {
1099                    // allocate a temporary bitmap
1100                    bitmap_argb32 tempbitmap(dest.width(), dest.height());
11011101
1102               // loop over characters
1103               for (const char *s = m_stopnames[fruit]; *s != 0; s++)
1104               {
1105                  // get the font bitmap
1106                  rectangle chbounds;
1107                  font->get_scaled_bitmap_and_bounds(tempbitmap, ourheight/num_shown, aspect, *s, chbounds);
1102                    // loop over characters
1103                    for (const char *s = m_stopnames[fruit]; *s != 0; s++)
1104                    {
1105                        // get the font bitmap
1106                        rectangle chbounds;
1107                        font->get_scaled_bitmap_and_bounds(tempbitmap, ourheight/num_shown, aspect, *s, chbounds);
11081108
1109                  // copy the data into the target
1110                  for (int y = 0; y < chbounds.height(); y++)
1111                  {
1112                     int effy = basey + y;
1109                        // copy the data into the target
1110                        for (int y = 0; y < chbounds.height(); y++)
1111                        {
1112                            int effy = basey + y;
11131113
1114                     if (effy >= bounds.min_y && effy <= bounds.max_y)
1115                     {
1116                        UINT32 *src = &tempbitmap.pix32(y);
1117                        UINT32 *d = &dest.pix32(effy);
1118                        for (int x = 0; x < chbounds.width(); x++)
1119                        {
1120                           int effx = curx + x + chbounds.min_x;
1121                           if (effx >= bounds.min_x && effx <= bounds.max_x)
1122                           {
1123                              UINT32 spix = rgb_t(src[x]).a();
1124                              if (spix != 0)
1125                              {
1126                                 rgb_t dpix = d[effx];
1127                                 UINT32 ta = (a * (spix + 1)) >> 8;
1128                                 UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
1129                                 UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
1130                                 UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
1131                                 d[effx] = rgb_t(tr, tg, tb);
1132                              }
1133                           }
1134                        }
1135                     }
1136                  }
1114                            if (effy >= bounds.min_y && effy <= bounds.max_y)
1115                            {
1116                                UINT32 *src = &tempbitmap.pix32(y);
1117                                UINT32 *d = &dest.pix32(effy);
1118                                for (int x = 0; x < chbounds.width(); x++)
1119                                {
1120                                    int effx = curx + x + chbounds.min_x;
1121                                    if (effx >= bounds.min_x && effx <= bounds.max_x)
1122                                    {
1123                                        UINT32 spix = rgb_t(src[x]).a();
1124                                        if (spix != 0)
1125                                        {
1126                                            rgb_t dpix = d[effx];
1127                                            UINT32 ta = (a * (spix + 1)) >> 8;
1128                                            UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
1129                                            UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
1130                                            UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
1131                                            d[effx] = rgb_t(tr, tg, tb);
1132                                        }
1133                                    }
1134                                }
1135                            }
1136                        }
11371137
1138                  // advance in the X direction
1139                  curx += font->char_width(ourheight/num_shown, aspect, *s);
1138                        // advance in the X direction
1139                        curx += font->char_width(ourheight/num_shown, aspect, *s);
11401140
1141               }
1141                    }
11421142
1143            }
1144         }
1143                }
1144            }
11451145
1146         curry += ourheight/num_shown;
1147      }
1148   // free the temporary bitmap and font
1149   machine.render().font_free(font);
1150   }
1146            curry += ourheight/num_shown;
1147        }
1148    // free the temporary bitmap and font
1149    machine.render().font_free(font);
1150    }
11511151}
11521152
11531153
11541154void layout_element::component::draw_beltreel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state)
11551155{
1156   const int max_state_used = 0x10000;
1156    const int max_state_used = 0x10000;
11571157
1158   // shift the reels a bit based on this param, allows fine tuning
1159   int use_state = (state + m_stateoffset) % max_state_used;
1158    // shift the reels a bit based on this param, allows fine tuning
1159    int use_state = (state + m_stateoffset) % max_state_used;
11601160
1161   // compute premultiplied colors
1162   UINT32 r = m_color.r * 255.0;
1163   UINT32 g = m_color.g * 255.0;
1164   UINT32 b = m_color.b * 255.0;
1165   UINT32 a = m_color.a * 255.0;
1161    // compute premultiplied colors
1162    UINT32 r = m_color.r * 255.0;
1163    UINT32 g = m_color.g * 255.0;
1164    UINT32 b = m_color.b * 255.0;
1165    UINT32 a = m_color.a * 255.0;
11661166
1167   // get the width of the string
1168   render_font *font = machine.render().font_alloc("default");
1169   float aspect = 1.0f;
1170   INT32 width;
1171   int currx = 0;
1172   int num_shown = m_numsymbolsvisible;
1167    // get the width of the string
1168    render_font *font = machine.render().font_alloc("default");
1169    float aspect = 1.0f;
1170    INT32 width;
1171    int currx = 0;
1172    int num_shown = m_numsymbolsvisible;
11731173
1174   int ourwidth = bounds.width();
1174    int ourwidth = bounds.width();
11751175
1176   for (int fruit = 0;fruit<m_numstops;fruit++)
1177   {
1178      int basex;
1179      if (m_reelreversed==1)
1180      {
1181         basex = bounds.min_x + ((use_state)*(ourwidth/num_shown)/(max_state_used/m_numstops)) + currx;
1182      }
1183      else
1184      {
1185         basex = bounds.min_x - ((use_state)*(ourwidth/num_shown)/(max_state_used/m_numstops)) + currx;
1186      }
1176    for (int fruit = 0;fruit<m_numstops;fruit++)
1177    {
1178        int basex;
1179        if (m_reelreversed==1)
1180        {
1181            basex = bounds.min_x + ((use_state)*(ourwidth/num_shown)/(max_state_used/m_numstops)) + currx;
1182        }
1183        else
1184        {
1185            basex = bounds.min_x - ((use_state)*(ourwidth/num_shown)/(max_state_used/m_numstops)) + currx;
1186        }
11871187
1188      // wrap around...
1189      if (basex < bounds.min_x)
1190         basex += ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
1191      if (basex > bounds.max_x)
1192         basex -= ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
1188        // wrap around...
1189        if (basex < bounds.min_x)
1190            basex += ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
1191        if (basex > bounds.max_x)
1192            basex -= ((max_state_used)*(ourwidth/num_shown)/(max_state_used/m_numstops));
11931193
1194      int endpos = basex+(ourwidth/num_shown);
1194        int endpos = basex+(ourwidth/num_shown);
11951195
1196      // only render the symbol / text if it's atually in view because the code is SLOW
1197      if ((endpos >= bounds.min_x) && (basex <= bounds.max_x))
1198      {
1199         while (1)
1200         {
1201            width = font->string_width(dest.height(), aspect, m_stopnames[fruit]);
1202            if (width < bounds.width())
1203               break;
1204            aspect *= 0.9f;
1205         }
1196        // only render the symbol / text if it's atually in view because the code is SLOW
1197        if ((endpos >= bounds.min_x) && (basex <= bounds.max_x))
1198        {
1199            while (1)
1200            {
1201                width = font->string_width(dest.height(), aspect, m_stopnames[fruit]);
1202                if (width < bounds.width())
1203                    break;
1204                aspect *= 0.9f;
1205            }
12061206
1207         INT32 curx;
1208         curx = bounds.min_x;
1207            INT32 curx;
1208            curx = bounds.min_x;
12091209
1210         if (m_file[fruit])
1211            if (!m_bitmap[fruit].valid())
1212               load_reel_bitmap(fruit);
1210            if (m_file[fruit])
1211                if (!m_bitmap[fruit].valid())
1212                    load_reel_bitmap(fruit);
12131213
1214         if (m_file[fruit]) // render gfx
1215         {
1216            bitmap_argb32 tempbitmap2(ourwidth/num_shown, dest.height());
1214            if (m_file[fruit]) // render gfx
1215            {
1216                bitmap_argb32 tempbitmap2(ourwidth/num_shown, dest.height());
12171217
1218            if (m_bitmap[fruit].valid())
1219            {
1220               render_resample_argb_bitmap_hq(tempbitmap2, m_bitmap[fruit], m_color);
1218                if (m_bitmap[fruit].valid())
1219                {
1220                    render_resample_argb_bitmap_hq(tempbitmap2, m_bitmap[fruit], m_color);
12211221
1222               for (int y = 0; y < dest.height(); y++)
1223               {
1224                  int effy = y;
1222                    for (int y = 0; y < dest.height(); y++)
1223                    {
1224                        int effy = y;
12251225
1226                  if (effy >= bounds.min_y && effy <= bounds.max_y)
1227                  {
1228                     UINT32 *src = &tempbitmap2.pix32(y);
1229                     UINT32 *d = &dest.pix32(effy);
1230                     for (int x = 0; x < ourwidth/num_shown; x++)
1231                     {
1232                        int effx = basex + x;
1233                        if (effx >= bounds.min_x && effx <= bounds.max_x)
1234                        {
1235                           UINT32 spix = rgb_t(src[x]).a();
1236                           if (spix != 0)
1237                           {
1238                              d[effx] = src[x];
1239                           }
1240                        }
1241                     }
1242                  }
1226                        if (effy >= bounds.min_y && effy <= bounds.max_y)
1227                        {
1228                            UINT32 *src = &tempbitmap2.pix32(y);
1229                            UINT32 *d = &dest.pix32(effy);
1230                            for (int x = 0; x < ourwidth/num_shown; x++)
1231                            {
1232                                int effx = basex + x;
1233                                if (effx >= bounds.min_x && effx <= bounds.max_x)
1234                                {
1235                                    UINT32 spix = rgb_t(src[x]).a();
1236                                    if (spix != 0)
1237                                    {
1238                                        d[effx] = src[x];
1239                                    }
1240                                }
1241                            }
1242                        }
12431243
1244               }
1245            }
1246         }
1247         else // render text (fallback)
1248         {
1249            // allocate a temporary bitmap
1250            bitmap_argb32 tempbitmap(dest.width(), dest.height());
1244                    }
1245                }
1246            }
1247            else // render text (fallback)
1248            {
1249                // allocate a temporary bitmap
1250                bitmap_argb32 tempbitmap(dest.width(), dest.height());
12511251
1252            // loop over characters
1253            for (const char *s = m_stopnames[fruit]; *s != 0; s++)
1254            {
1255               // get the font bitmap
1256               rectangle chbounds;
1257               font->get_scaled_bitmap_and_bounds(tempbitmap, dest.height(), aspect, *s, chbounds);
1252                // loop over characters
1253                for (const char *s = m_stopnames[fruit]; *s != 0; s++)
1254                {
1255                    // get the font bitmap
1256                    rectangle chbounds;
1257                    font->get_scaled_bitmap_and_bounds(tempbitmap, dest.height(), aspect, *s, chbounds);
12581258
1259               // copy the data into the target
1260               for (int y = 0; y < chbounds.height(); y++)
1261               {
1262                  int effy = y;
1259                    // copy the data into the target
1260                    for (int y = 0; y < chbounds.height(); y++)
1261                    {
1262                        int effy = y;
12631263
1264                  if (effy >= bounds.min_y && effy <= bounds.max_y)
1265                  {
1266                     UINT32 *src = &tempbitmap.pix32(y);
1267                     UINT32 *d = &dest.pix32(effy);
1268                     for (int x = 0; x < chbounds.width(); x++)
1269                     {
1270                        int effx = basex + curx + x;
1271                        if (effx >= bounds.min_x && effx <= bounds.max_x)
1272                        {
1273                           UINT32 spix = rgb_t(src[x]).a();
1274                           if (spix != 0)
1275                           {
1276                              rgb_t dpix = d[effx];
1277                              UINT32 ta = (a * (spix + 1)) >> 8;
1278                              UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
1279                              UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
1280                              UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
1281                              d[effx] = rgb_t(tr, tg, tb);
1282                           }
1283                        }
1284                     }
1285                  }
1286               }
1264                        if (effy >= bounds.min_y && effy <= bounds.max_y)
1265                        {
1266                            UINT32 *src = &tempbitmap.pix32(y);
1267                            UINT32 *d = &dest.pix32(effy);
1268                            for (int x = 0; x < chbounds.width(); x++)
1269                            {
1270                                int effx = basex + curx + x;
1271                                if (effx >= bounds.min_x && effx <= bounds.max_x)
1272                                {
1273                                    UINT32 spix = rgb_t(src[x]).a();
1274                                    if (spix != 0)
1275                                    {
1276                                        rgb_t dpix = d[effx];
1277                                        UINT32 ta = (a * (spix + 1)) >> 8;
1278                                        UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
1279                                        UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
1280                                        UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
1281                                        d[effx] = rgb_t(tr, tg, tb);
1282                                    }
1283                                }
1284                            }
1285                        }
1286                    }
12871287
1288               // advance in the X direction
1289               curx += font->char_width(dest.height(), aspect, *s);
1288                    // advance in the X direction
1289                    curx += font->char_width(dest.height(), aspect, *s);
12901290
1291            }
1291                }
12921292
1293         }
1294      }
1293            }
1294        }
12951295
1296      currx += ourwidth/num_shown;
1297   }
1296        currx += ourwidth/num_shown;
1297    }
12981298
1299   // free the temporary bitmap and font
1300   machine.render().font_free(font);
1299    // free the temporary bitmap and font
1300    machine.render().font_free(font);
13011301}
13021302
13031303
r242703r242704
13081308
13091309void layout_element::component::load_bitmap()
13101310{
1311   // load the basic bitmap
1312   assert(m_file[0] != NULL);
1313   m_hasalpha[0] = render_load_png(m_bitmap[0], *m_file[0], m_dirname, m_imagefile[0]);
1311    // load the basic bitmap
1312    assert(m_file[0] != NULL);
1313    m_hasalpha[0] = render_load_png(m_bitmap[0], *m_file[0], m_dirname, m_imagefile[0]);
13141314
1315   // load the alpha bitmap if specified
1316   if (m_bitmap[0].valid() && m_alphafile[0])
1317      render_load_png(m_bitmap[0], *m_file[0], m_dirname, m_alphafile[0], true);
1315    // load the alpha bitmap if specified
1316    if (m_bitmap[0].valid() && m_alphafile[0])
1317        render_load_png(m_bitmap[0], *m_file[0], m_dirname, m_alphafile[0], true);
13181318
1319   // if we can't load the bitmap, allocate a dummy one and report an error
1320   if (!m_bitmap[0].valid())
1321   {
1322      // draw some stripes in the bitmap
1323      m_bitmap[0].allocate(100, 100);
1324      m_bitmap[0].fill(0);
1325      for (int step = 0; step < 100; step += 25)
1326         for (int line = 0; line < 100; line++)
1327            m_bitmap[0].pix32((step + line) % 100, line % 100) = rgb_t(0xff,0xff,0xff,0xff);
1319    // if we can't load the bitmap, allocate a dummy one and report an error
1320    if (!m_bitmap[0].valid())
1321    {
1322        // draw some stripes in the bitmap
1323        m_bitmap[0].allocate(100, 100);
1324        m_bitmap[0].fill(0);
1325        for (int step = 0; step < 100; step += 25)
1326            for (int line = 0; line < 100; line++)
1327                m_bitmap[0].pix32((step + line) % 100, line % 100) = rgb_t(0xff,0xff,0xff,0xff);
13281328
1329      // log an error
1330      if (!m_alphafile[0])
1331         osd_printf_warning("Unable to load component bitmap '%s'\n", m_imagefile[0].cstr());
1332      else
1333         osd_printf_warning("Unable to load component bitmap '%s'/'%s'\n", m_imagefile[0].cstr(), m_alphafile[0].cstr());
1334   }
1329        // log an error
1330        if (!m_alphafile[0])
1331            osd_printf_warning("Unable to load component bitmap '%s'\n", m_imagefile[0].cstr());
1332        else
1333            osd_printf_warning("Unable to load component bitmap '%s'/'%s'\n", m_imagefile[0].cstr(), m_alphafile[0].cstr());
1334    }
13351335}
13361336
13371337
13381338void layout_element::component::load_reel_bitmap(int number)
13391339{
1340   // load the basic bitmap
1341   assert(m_file != NULL);
1342   /*m_hasalpha[number] = */ render_load_png(m_bitmap[number], *m_file[number], m_dirname, m_imagefile[number]);
1340    // load the basic bitmap
1341    assert(m_file != NULL);
1342    /*m_hasalpha[number] = */ render_load_png(m_bitmap[number], *m_file[number], m_dirname, m_imagefile[number]);
13431343
1344   // load the alpha bitmap if specified
1345   //if (m_bitmap[number].valid() && m_alphafile[number])
1346   //  render_load_png(m_bitmap[number], *m_file[number], m_dirname, m_alphafile[number], true);
1344    // load the alpha bitmap if specified
1345    //if (m_bitmap[number].valid() && m_alphafile[number])
1346    //  render_load_png(m_bitmap[number], *m_file[number], m_dirname, m_alphafile[number], true);
13471347
1348   // if we can't load the bitmap just use text rendering
1349   if (!m_bitmap[number].valid())
1350   {
1351      // fallback to text rendering
1352      m_file[number].reset();
1353   }
1348    // if we can't load the bitmap just use text rendering
1349    if (!m_bitmap[number].valid())
1350    {
1351        // fallback to text rendering
1352        m_file[number].reset();
1353    }
13541354
13551355}
13561356
r242703r242704
13621362
13631363void layout_element::component::draw_led7seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
13641364{
1365   const rgb_t onpen = rgb_t(0xff,0xff,0xff,0xff);
1366   const rgb_t offpen = rgb_t(0xff,0x20,0x20,0x20);
1365    const rgb_t onpen = rgb_t(0xff,0xff,0xff,0xff);
1366    const rgb_t offpen = rgb_t(0xff,0x20,0x20,0x20);
13671367
1368   // sizes for computation
1369   int bmwidth = 250;
1370   int bmheight = 400;
1371   int segwidth = 40;
1372   int skewwidth = 40;
1368    // sizes for computation
1369    int bmwidth = 250;
1370    int bmheight = 400;
1371    int segwidth = 40;
1372    int skewwidth = 40;
13731373
1374   // allocate a temporary bitmap for drawing
1375   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1376   tempbitmap.fill(rgb_t(0xff,0x00,0x00,0x00));
1374    // allocate a temporary bitmap for drawing
1375    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1376    tempbitmap.fill(rgb_t(0xff,0x00,0x00,0x00));
13771377
1378   // top bar
1379   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 0)) ? onpen : offpen);
1378    // top bar
1379    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 0)) ? onpen : offpen);
13801380
1381   // top-right bar
1382   draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 1)) ? onpen : offpen);
1381    // top-right bar
1382    draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 1)) ? onpen : offpen);
13831383
1384   // bottom-right bar
1385   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1384    // bottom-right bar
1385    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 2)) ? onpen : offpen);
13861386
1387   // bottom bar
1388   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2, segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1387    // bottom bar
1388    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2, segwidth, (pattern & (1 << 3)) ? onpen : offpen);
13891389
1390   // bottom-left bar
1391   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 4)) ? onpen : offpen);
1390    // bottom-left bar
1391    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 4)) ? onpen : offpen);
13921392
1393   // top-left bar
1394   draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 5)) ? onpen : offpen);
1393    // top-left bar
1394    draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 5)) ? onpen : offpen);
13951395
1396   // middle bar
1397   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1396    // middle bar
1397    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
13981398
1399   // apply skew
1400   apply_skew(tempbitmap, 40);
1399    // apply skew
1400    apply_skew(tempbitmap, 40);
14011401
1402   // decimal point
1403   draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1402    // decimal point
1403    draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
14041404
1405   // resample to the target size
1406   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1405    // resample to the target size
1406    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
14071407}
14081408
14091409
r242703r242704
14131413
14141414void layout_element::component::draw_led8seg_gts1(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
14151415{
1416   const rgb_t onpen = rgb_t(0xff,0xff,0xff,0xff);
1417   const rgb_t offpen = rgb_t(0xff,0x20,0x20,0x20);
1418   const rgb_t backpen = rgb_t(0xff,0x00,0x00,0x00);
1416    const rgb_t onpen = rgb_t(0xff,0xff,0xff,0xff);
1417    const rgb_t offpen = rgb_t(0xff,0x20,0x20,0x20);
1418    const rgb_t backpen = rgb_t(0xff,0x00,0x00,0x00);
14191419
1420   // sizes for computation
1421   int bmwidth = 250;
1422   int bmheight = 400;
1423   int segwidth = 40;
1424   int skewwidth = 40;
1420    // sizes for computation
1421    int bmwidth = 250;
1422    int bmheight = 400;
1423    int segwidth = 40;
1424    int skewwidth = 40;
14251425
1426   // allocate a temporary bitmap for drawing
1427   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1428   tempbitmap.fill(backpen);
1426    // allocate a temporary bitmap for drawing
1427    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1428    tempbitmap.fill(backpen);
14291429
1430   // top bar
1431   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 0)) ? onpen : offpen);
1430    // top bar
1431    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 0)) ? onpen : offpen);
14321432
1433   // top-right bar
1434   draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 1)) ? onpen : offpen);
1433    // top-right bar
1434    draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 1)) ? onpen : offpen);
14351435
1436   // bottom-right bar
1437   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1436    // bottom-right bar
1437    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2, segwidth, (pattern & (1 << 2)) ? onpen : offpen);
14381438
1439   // bottom bar
1440   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2, segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1439    // bottom bar
1440    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2, segwidth, (pattern & (1 << 3)) ? onpen : offpen);
14411441
1442   // bottom-left bar
1443   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 4)) ? onpen : offpen);
1442    // bottom-left bar
1443    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 4)) ? onpen : offpen);
14441444
1445   // top-left bar
1446   draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 5)) ? onpen : offpen);
1445    // top-left bar
1446    draw_segment_vertical(tempbitmap, 0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2, segwidth, (pattern & (1 << 5)) ? onpen : offpen);
14471447
1448   // horizontal bars
1449   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, 2*bmwidth/3 - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1450   draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3 + bmwidth/2, bmwidth - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1448    // horizontal bars
1449    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3, 2*bmwidth/3 - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1450    draw_segment_horizontal(tempbitmap, 0 + 2*segwidth/3 + bmwidth/2, bmwidth - 2*segwidth/3, bmheight/2, segwidth, (pattern & (1 << 6)) ? onpen : offpen);
14511451
1452   // vertical bars
1453   draw_segment_vertical(tempbitmap, 0 + segwidth/3 - 8, bmheight/2 - segwidth/3 + 2, 2*bmwidth/3 - segwidth/2 - 4, segwidth + 8, backpen);
1454   draw_segment_vertical(tempbitmap, 0 + segwidth/3, bmheight/2 - segwidth/3, 2*bmwidth/3 - segwidth/2 - 4, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1452    // vertical bars
1453    draw_segment_vertical(tempbitmap, 0 + segwidth/3 - 8, bmheight/2 - segwidth/3 + 2, 2*bmwidth/3 - segwidth/2 - 4, segwidth + 8, backpen);
1454    draw_segment_vertical(tempbitmap, 0 + segwidth/3, bmheight/2 - segwidth/3, 2*bmwidth/3 - segwidth/2 - 4, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
14551455
1456   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3 - 2, bmheight - segwidth/3 + 8, 2*bmwidth/3 - segwidth/2 - 4, segwidth + 8, backpen);
1457   draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - segwidth/3, 2*bmwidth/3 - segwidth/2 - 4, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1456    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3 - 2, bmheight - segwidth/3 + 8, 2*bmwidth/3 - segwidth/2 - 4, segwidth + 8, backpen);
1457    draw_segment_vertical(tempbitmap, bmheight/2 + segwidth/3, bmheight - segwidth/3, 2*bmwidth/3 - segwidth/2 - 4, segwidth, (pattern & (1 << 7)) ? onpen : offpen);
14581458
1459   // apply skew
1460   apply_skew(tempbitmap, 40);
1459    // apply skew
1460    apply_skew(tempbitmap, 40);
14611461
1462   // resample to the target size
1463   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1462    // resample to the target size
1463    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
14641464}
14651465
14661466
r242703r242704
14701470
14711471void layout_element::component::draw_led14seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
14721472{
1473   const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1474   const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
1473    const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1474    const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
14751475
1476   // sizes for computation
1477   int bmwidth = 250;
1478   int bmheight = 400;
1479   int segwidth = 40;
1480   int skewwidth = 40;
1476    // sizes for computation
1477    int bmwidth = 250;
1478    int bmheight = 400;
1479    int segwidth = 40;
1480    int skewwidth = 40;
14811481
1482   // allocate a temporary bitmap for drawing
1483   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1484   tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
1482    // allocate a temporary bitmap for drawing
1483    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1484    tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
14851485
1486   // top bar
1487   draw_segment_horizontal(tempbitmap,
1488      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1489      segwidth, (pattern & (1 << 0)) ? onpen : offpen);
1486    // top bar
1487    draw_segment_horizontal(tempbitmap,
1488        0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1489        segwidth, (pattern & (1 << 0)) ? onpen : offpen);
14901490
1491   // right-top bar
1492   draw_segment_vertical(tempbitmap,
1493      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1494      segwidth, (pattern & (1 << 1)) ? onpen : offpen);
1491    // right-top bar
1492    draw_segment_vertical(tempbitmap,
1493        0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1494        segwidth, (pattern & (1 << 1)) ? onpen : offpen);
14951495
1496   // right-bottom bar
1497   draw_segment_vertical(tempbitmap,
1498      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1499      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1496    // right-bottom bar
1497    draw_segment_vertical(tempbitmap,
1498        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1499        segwidth, (pattern & (1 << 2)) ? onpen : offpen);
15001500
1501   // bottom bar
1502   draw_segment_horizontal(tempbitmap,
1503      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1504      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1501    // bottom bar
1502    draw_segment_horizontal(tempbitmap,
1503        0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1504        segwidth, (pattern & (1 << 3)) ? onpen : offpen);
15051505
1506   // left-bottom bar
1507   draw_segment_vertical(tempbitmap,
1508      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1509      segwidth, (pattern & (1 << 4)) ? onpen : offpen);
1506    // left-bottom bar
1507    draw_segment_vertical(tempbitmap,
1508        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1509        segwidth, (pattern & (1 << 4)) ? onpen : offpen);
15101510
1511   // left-top bar
1512   draw_segment_vertical(tempbitmap,
1513      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1514      segwidth, (pattern & (1 << 5)) ? onpen : offpen);
1511    // left-top bar
1512    draw_segment_vertical(tempbitmap,
1513        0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1514        segwidth, (pattern & (1 << 5)) ? onpen : offpen);
15151515
1516   // horizontal-middle-left bar
1517   draw_segment_horizontal_caps(tempbitmap,
1518      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1519      segwidth, LINE_CAP_START, (pattern & (1 << 6)) ? onpen : offpen);
1516    // horizontal-middle-left bar
1517    draw_segment_horizontal_caps(tempbitmap,
1518        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1519        segwidth, LINE_CAP_START, (pattern & (1 << 6)) ? onpen : offpen);
15201520
1521   // horizontal-middle-right bar
1522   draw_segment_horizontal_caps(tempbitmap,
1523      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1524      segwidth, LINE_CAP_END, (pattern & (1 << 7)) ? onpen : offpen);
1521    // horizontal-middle-right bar
1522    draw_segment_horizontal_caps(tempbitmap,
1523        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1524        segwidth, LINE_CAP_END, (pattern & (1 << 7)) ? onpen : offpen);
15251525
1526   // vertical-middle-top bar
1527   draw_segment_vertical_caps(tempbitmap,
1528      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1529      segwidth, LINE_CAP_NONE, (pattern & (1 << 8)) ? onpen : offpen);
1526    // vertical-middle-top bar
1527    draw_segment_vertical_caps(tempbitmap,
1528        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1529        segwidth, LINE_CAP_NONE, (pattern & (1 << 8)) ? onpen : offpen);
15301530
1531   // vertical-middle-bottom bar
1532   draw_segment_vertical_caps(tempbitmap,
1533      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1534      segwidth, LINE_CAP_NONE, (pattern & (1 << 9)) ? onpen : offpen);
1531    // vertical-middle-bottom bar
1532    draw_segment_vertical_caps(tempbitmap,
1533        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1534        segwidth, LINE_CAP_NONE, (pattern & (1 << 9)) ? onpen : offpen);
15351535
1536   // diagonal-left-bottom bar
1537   draw_segment_diagonal_1(tempbitmap,
1538      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1539      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1540      segwidth, (pattern & (1 << 10)) ? onpen : offpen);
1536    // diagonal-left-bottom bar
1537    draw_segment_diagonal_1(tempbitmap,
1538        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1539        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1540        segwidth, (pattern & (1 << 10)) ? onpen : offpen);
15411541
1542   // diagonal-left-top bar
1543   draw_segment_diagonal_2(tempbitmap,
1544      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1545      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1546      segwidth, (pattern & (1 << 11)) ? onpen : offpen);
1542    // diagonal-left-top bar
1543    draw_segment_diagonal_2(tempbitmap,
1544        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1545        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1546        segwidth, (pattern & (1 << 11)) ? onpen : offpen);
15471547
1548   // diagonal-right-top bar
1549   draw_segment_diagonal_1(tempbitmap,
1550      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1551      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1552      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1548    // diagonal-right-top bar
1549    draw_segment_diagonal_1(tempbitmap,
1550        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1551        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1552        segwidth, (pattern & (1 << 12)) ? onpen : offpen);
15531553
1554   // diagonal-right-bottom bar
1555   draw_segment_diagonal_2(tempbitmap,
1556      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1557      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1558      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1554    // diagonal-right-bottom bar
1555    draw_segment_diagonal_2(tempbitmap,
1556        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1557        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1558        segwidth, (pattern & (1 << 13)) ? onpen : offpen);
15591559
1560   // apply skew
1561   apply_skew(tempbitmap, 40);
1560    // apply skew
1561    apply_skew(tempbitmap, 40);
15621562
1563   // resample to the target size
1564   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1563    // resample to the target size
1564    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
15651565}
15661566
15671567
r242703r242704
15721572
15731573void layout_element::component::draw_led14segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
15741574{
1575   const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1576   const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
1575    const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1576    const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
15771577
1578   // sizes for computation
1579   int bmwidth = 250;
1580   int bmheight = 400;
1581   int segwidth = 40;
1582   int skewwidth = 40;
1578    // sizes for computation
1579    int bmwidth = 250;
1580    int bmheight = 400;
1581    int segwidth = 40;
1582    int skewwidth = 40;
15831583
1584   // allocate a temporary bitmap for drawing, adding some extra space for the tail
1585   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
1586   tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
1584    // allocate a temporary bitmap for drawing, adding some extra space for the tail
1585    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
1586    tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
15871587
1588   // top bar
1589   draw_segment_horizontal(tempbitmap,
1590      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1591      segwidth, (pattern & (1 << 0)) ? onpen : offpen);
1588    // top bar
1589    draw_segment_horizontal(tempbitmap,
1590        0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1591        segwidth, (pattern & (1 << 0)) ? onpen : offpen);
15921592
1593   // right-top bar
1594   draw_segment_vertical(tempbitmap,
1595      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1596      segwidth, (pattern & (1 << 1)) ? onpen : offpen);
1593    // right-top bar
1594    draw_segment_vertical(tempbitmap,
1595        0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1596        segwidth, (pattern & (1 << 1)) ? onpen : offpen);
15971597
1598   // right-bottom bar
1599   draw_segment_vertical(tempbitmap,
1600      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1601      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1598    // right-bottom bar
1599    draw_segment_vertical(tempbitmap,
1600        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1601        segwidth, (pattern & (1 << 2)) ? onpen : offpen);
16021602
1603   // bottom bar
1604   draw_segment_horizontal(tempbitmap,
1605      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1606      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1603    // bottom bar
1604    draw_segment_horizontal(tempbitmap,
1605        0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1606        segwidth, (pattern & (1 << 3)) ? onpen : offpen);
16071607
1608   // left-bottom bar
1609   draw_segment_vertical(tempbitmap,
1610      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1611      segwidth, (pattern & (1 << 4)) ? onpen : offpen);
1608    // left-bottom bar
1609    draw_segment_vertical(tempbitmap,
1610        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1611        segwidth, (pattern & (1 << 4)) ? onpen : offpen);
16121612
1613   // left-top bar
1614   draw_segment_vertical(tempbitmap,
1615      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1616      segwidth, (pattern & (1 << 5)) ? onpen : offpen);
1613    // left-top bar
1614    draw_segment_vertical(tempbitmap,
1615        0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1616        segwidth, (pattern & (1 << 5)) ? onpen : offpen);
16171617
1618   // horizontal-middle-left bar
1619   draw_segment_horizontal_caps(tempbitmap,
1620      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1621      segwidth, LINE_CAP_START, (pattern & (1 << 6)) ? onpen : offpen);
1618    // horizontal-middle-left bar
1619    draw_segment_horizontal_caps(tempbitmap,
1620        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1621        segwidth, LINE_CAP_START, (pattern & (1 << 6)) ? onpen : offpen);
16221622
1623   // horizontal-middle-right bar
1624   draw_segment_horizontal_caps(tempbitmap,
1625      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1626      segwidth, LINE_CAP_END, (pattern & (1 << 7)) ? onpen : offpen);
1623    // horizontal-middle-right bar
1624    draw_segment_horizontal_caps(tempbitmap,
1625        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1626        segwidth, LINE_CAP_END, (pattern & (1 << 7)) ? onpen : offpen);
16271627
1628   // vertical-middle-top bar
1629   draw_segment_vertical_caps(tempbitmap,
1630      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1631      segwidth, LINE_CAP_NONE, (pattern & (1 << 8)) ? onpen : offpen);
1628    // vertical-middle-top bar
1629    draw_segment_vertical_caps(tempbitmap,
1630        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1631        segwidth, LINE_CAP_NONE, (pattern & (1 << 8)) ? onpen : offpen);
16321632
1633   // vertical-middle-bottom bar
1634   draw_segment_vertical_caps(tempbitmap,
1635      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1636      segwidth, LINE_CAP_NONE, (pattern & (1 << 9)) ? onpen : offpen);
1633    // vertical-middle-bottom bar
1634    draw_segment_vertical_caps(tempbitmap,
1635        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1636        segwidth, LINE_CAP_NONE, (pattern & (1 << 9)) ? onpen : offpen);
16371637
1638   // diagonal-left-bottom bar
1639   draw_segment_diagonal_1(tempbitmap,
1640      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1641      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1642      segwidth, (pattern & (1 << 10)) ? onpen : offpen);
1638    // diagonal-left-bottom bar
1639    draw_segment_diagonal_1(tempbitmap,
1640        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1641        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1642        segwidth, (pattern & (1 << 10)) ? onpen : offpen);
16431643
1644   // diagonal-left-top bar
1645   draw_segment_diagonal_2(tempbitmap,
1646      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1647      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1648      segwidth, (pattern & (1 << 11)) ? onpen : offpen);
1644    // diagonal-left-top bar
1645    draw_segment_diagonal_2(tempbitmap,
1646        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1647        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1648        segwidth, (pattern & (1 << 11)) ? onpen : offpen);
16491649
1650   // diagonal-right-top bar
1651   draw_segment_diagonal_1(tempbitmap,
1652      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1653      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1654      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1650    // diagonal-right-top bar
1651    draw_segment_diagonal_1(tempbitmap,
1652        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1653        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1654        segwidth, (pattern & (1 << 12)) ? onpen : offpen);
16551655
1656   // diagonal-right-bottom bar
1657   draw_segment_diagonal_2(tempbitmap,
1658      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1659      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1660      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1656    // diagonal-right-bottom bar
1657    draw_segment_diagonal_2(tempbitmap,
1658        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1659        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1660        segwidth, (pattern & (1 << 13)) ? onpen : offpen);
16611661
1662   // apply skew
1663   apply_skew(tempbitmap, 40);
1662    // apply skew
1663    apply_skew(tempbitmap, 40);
16641664
1665   // comma tail
1666   draw_segment_diagonal_1(tempbitmap,
1667      bmwidth - (segwidth/2), bmwidth + segwidth,
1668      bmheight - (segwidth), bmheight + segwidth*1.5,
1669      segwidth/2, (pattern & (1 << 15)) ? onpen : offpen);
1665    // comma tail
1666    draw_segment_diagonal_1(tempbitmap,
1667        bmwidth - (segwidth/2), bmwidth + segwidth,
1668        bmheight - (segwidth), bmheight + segwidth*1.5,
1669        segwidth/2, (pattern & (1 << 15)) ? onpen : offpen);
16701670
1671   // decimal point
1672   draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 14)) ? onpen : offpen);
1671    // decimal point
1672    draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 14)) ? onpen : offpen);
16731673
1674   // resample to the target size
1675   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1674    // resample to the target size
1675    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
16761676}
16771677
16781678
r242703r242704
16821682
16831683void layout_element::component::draw_led16seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
16841684{
1685   const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1686   const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
1685    const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1686    const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
16871687
1688   // sizes for computation
1689   int bmwidth = 250;
1690   int bmheight = 400;
1691   int segwidth = 40;
1692   int skewwidth = 40;
1688    // sizes for computation
1689    int bmwidth = 250;
1690    int bmheight = 400;
1691    int segwidth = 40;
1692    int skewwidth = 40;
16931693
1694   // allocate a temporary bitmap for drawing
1695   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1696   tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
1694    // allocate a temporary bitmap for drawing
1695    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
1696    tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
16971697
1698   // top-left bar
1699   draw_segment_horizontal_caps(tempbitmap,
1700      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, 0 + segwidth/2,
1701      segwidth, LINE_CAP_START, (pattern & (1 << 0)) ? onpen : offpen);
1698    // top-left bar
1699    draw_segment_horizontal_caps(tempbitmap,
1700        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, 0 + segwidth/2,
1701        segwidth, LINE_CAP_START, (pattern & (1 << 0)) ? onpen : offpen);
17021702
1703   // top-right bar
1704   draw_segment_horizontal_caps(tempbitmap,
1705      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1706      segwidth, LINE_CAP_END, (pattern & (1 << 1)) ? onpen : offpen);
1703    // top-right bar
1704    draw_segment_horizontal_caps(tempbitmap,
1705        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1706        segwidth, LINE_CAP_END, (pattern & (1 << 1)) ? onpen : offpen);
17071707
1708   // right-top bar
1709   draw_segment_vertical(tempbitmap,
1710      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1711      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1708    // right-top bar
1709    draw_segment_vertical(tempbitmap,
1710        0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1711        segwidth, (pattern & (1 << 2)) ? onpen : offpen);
17121712
1713   // right-bottom bar
1714   draw_segment_vertical(tempbitmap,
1715      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1716      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1713    // right-bottom bar
1714    draw_segment_vertical(tempbitmap,
1715        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1716        segwidth, (pattern & (1 << 3)) ? onpen : offpen);
17171717
1718   // bottom-right bar
1719   draw_segment_horizontal_caps(tempbitmap,
1720      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1721      segwidth, LINE_CAP_END, (pattern & (1 << 4)) ? onpen : offpen);
1718    // bottom-right bar
1719    draw_segment_horizontal_caps(tempbitmap,
1720        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1721        segwidth, LINE_CAP_END, (pattern & (1 << 4)) ? onpen : offpen);
17221722
1723   // bottom-left bar
1724   draw_segment_horizontal_caps(tempbitmap,
1725      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight - segwidth/2,
1726      segwidth, LINE_CAP_START, (pattern & (1 << 5)) ? onpen : offpen);
1723    // bottom-left bar
1724    draw_segment_horizontal_caps(tempbitmap,
1725        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight - segwidth/2,
1726        segwidth, LINE_CAP_START, (pattern & (1 << 5)) ? onpen : offpen);
17271727
1728   // left-bottom bar
1729   draw_segment_vertical(tempbitmap,
1730      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1731      segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1728    // left-bottom bar
1729    draw_segment_vertical(tempbitmap,
1730        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1731        segwidth, (pattern & (1 << 6)) ? onpen : offpen);
17321732
1733   // left-top bar
1734   draw_segment_vertical(tempbitmap,
1735      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1736      segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1733    // left-top bar
1734    draw_segment_vertical(tempbitmap,
1735        0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1736        segwidth, (pattern & (1 << 7)) ? onpen : offpen);
17371737
1738   // horizontal-middle-left bar
1739   draw_segment_horizontal_caps(tempbitmap,
1740      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1741      segwidth, LINE_CAP_START, (pattern & (1 << 8)) ? onpen : offpen);
1738    // horizontal-middle-left bar
1739    draw_segment_horizontal_caps(tempbitmap,
1740        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1741        segwidth, LINE_CAP_START, (pattern & (1 << 8)) ? onpen : offpen);
17421742
1743   // horizontal-middle-right bar
1744   draw_segment_horizontal_caps(tempbitmap,
1745      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1746      segwidth, LINE_CAP_END, (pattern & (1 << 9)) ? onpen : offpen);
1743    // horizontal-middle-right bar
1744    draw_segment_horizontal_caps(tempbitmap,
1745        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1746        segwidth, LINE_CAP_END, (pattern & (1 << 9)) ? onpen : offpen);
17471747
1748   // vertical-middle-top bar
1749   draw_segment_vertical_caps(tempbitmap,
1750      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1751      segwidth, LINE_CAP_NONE, (pattern & (1 << 10)) ? onpen : offpen);
1748    // vertical-middle-top bar
1749    draw_segment_vertical_caps(tempbitmap,
1750        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1751        segwidth, LINE_CAP_NONE, (pattern & (1 << 10)) ? onpen : offpen);
17521752
1753   // vertical-middle-bottom bar
1754   draw_segment_vertical_caps(tempbitmap,
1755      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1756      segwidth, LINE_CAP_NONE, (pattern & (1 << 11)) ? onpen : offpen);
1753    // vertical-middle-bottom bar
1754    draw_segment_vertical_caps(tempbitmap,
1755        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1756        segwidth, LINE_CAP_NONE, (pattern & (1 << 11)) ? onpen : offpen);
17571757
1758   // diagonal-left-bottom bar
1759   draw_segment_diagonal_1(tempbitmap,
1760      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1761      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1762      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1758    // diagonal-left-bottom bar
1759    draw_segment_diagonal_1(tempbitmap,
1760        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1761        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1762        segwidth, (pattern & (1 << 12)) ? onpen : offpen);
17631763
1764   // diagonal-left-top bar
1765   draw_segment_diagonal_2(tempbitmap,
1766      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1767      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1768      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1764    // diagonal-left-top bar
1765    draw_segment_diagonal_2(tempbitmap,
1766        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1767        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1768        segwidth, (pattern & (1 << 13)) ? onpen : offpen);
17691769
1770   // diagonal-right-top bar
1771   draw_segment_diagonal_1(tempbitmap,
1772      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1773      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1774      segwidth, (pattern & (1 << 14)) ? onpen : offpen);
1770    // diagonal-right-top bar
1771    draw_segment_diagonal_1(tempbitmap,
1772        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1773        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1774        segwidth, (pattern & (1 << 14)) ? onpen : offpen);
17751775
1776   // diagonal-right-bottom bar
1777   draw_segment_diagonal_2(tempbitmap,
1778      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1779      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1780      segwidth, (pattern & (1 << 15)) ? onpen : offpen);
1776    // diagonal-right-bottom bar
1777    draw_segment_diagonal_2(tempbitmap,
1778        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1779        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1780        segwidth, (pattern & (1 << 15)) ? onpen : offpen);
17811781
1782   // apply skew
1783   apply_skew(tempbitmap, 40);
1782    // apply skew
1783    apply_skew(tempbitmap, 40);
17841784
1785   // resample to the target size
1786   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1785    // resample to the target size
1786    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
17871787}
17881788
17891789
r242703r242704
17941794
17951795void layout_element::component::draw_led16segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
17961796{
1797   const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1798   const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
1797    const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1798    const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
17991799
1800   // sizes for computation
1801   int bmwidth = 250;
1802   int bmheight = 400;
1803   int segwidth = 40;
1804   int skewwidth = 40;
1800    // sizes for computation
1801    int bmwidth = 250;
1802    int bmheight = 400;
1803    int segwidth = 40;
1804    int skewwidth = 40;
18051805
1806   // allocate a temporary bitmap for drawing
1807   bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
1808   tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
1806    // allocate a temporary bitmap for drawing
1807    bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
1808    tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
18091809
1810   // top-left bar
1811   draw_segment_horizontal_caps(tempbitmap,
1812      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, 0 + segwidth/2,
1813      segwidth, LINE_CAP_START, (pattern & (1 << 0)) ? onpen : offpen);
1810    // top-left bar
1811    draw_segment_horizontal_caps(tempbitmap,
1812        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, 0 + segwidth/2,
1813        segwidth, LINE_CAP_START, (pattern & (1 << 0)) ? onpen : offpen);
18141814
1815   // top-right bar
1816   draw_segment_horizontal_caps(tempbitmap,
1817      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1818      segwidth, LINE_CAP_END, (pattern & (1 << 1)) ? onpen : offpen);
1815    // top-right bar
1816    draw_segment_horizontal_caps(tempbitmap,
1817        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1818        segwidth, LINE_CAP_END, (pattern & (1 << 1)) ? onpen : offpen);
18191819
1820   // right-top bar
1821   draw_segment_vertical(tempbitmap,
1822      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1823      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1820    // right-top bar
1821    draw_segment_vertical(tempbitmap,
1822        0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1823        segwidth, (pattern & (1 << 2)) ? onpen : offpen);
18241824
1825   // right-bottom bar
1826   draw_segment_vertical(tempbitmap,
1827      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1828      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1825    // right-bottom bar
1826    draw_segment_vertical(tempbitmap,
1827        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1828        segwidth, (pattern & (1 << 3)) ? onpen : offpen);
18291829
1830   // bottom-right bar
1831   draw_segment_horizontal_caps(tempbitmap,
1832      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1833      segwidth, LINE_CAP_END, (pattern & (1 << 4)) ? onpen : offpen);
1830    // bottom-right bar
1831    draw_segment_horizontal_caps(tempbitmap,
1832        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1833        segwidth, LINE_CAP_END, (pattern & (1 << 4)) ? onpen : offpen);
18341834
1835   // bottom-left bar
1836   draw_segment_horizontal_caps(tempbitmap,
1837      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight - segwidth/2,
1838      segwidth, LINE_CAP_START, (pattern & (1 << 5)) ? onpen : offpen);
1835    // bottom-left bar
1836    draw_segment_horizontal_caps(tempbitmap,
1837        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight - segwidth/2,
1838        segwidth, LINE_CAP_START, (pattern & (1 << 5)) ? onpen : offpen);
18391839
1840   // left-bottom bar
1841   draw_segment_vertical(tempbitmap,
1842      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1843      segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1840    // left-bottom bar
1841    draw_segment_vertical(tempbitmap,
1842        bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1843        segwidth, (pattern & (1 << 6)) ? onpen : offpen);
18441844
1845   // left-top bar
1846   draw_segment_vertical(tempbitmap,
1847      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1848      segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1845    // left-top bar
1846    draw_segment_vertical(tempbitmap,
1847        0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1848        segwidth, (pattern & (1 << 7)) ? onpen : offpen);
18491849
1850   // horizontal-middle-left bar
1851   draw_segment_horizontal_caps(tempbitmap,
1852      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1853      segwidth, LINE_CAP_START, (pattern & (1 << 8)) ? onpen : offpen);
1850    // horizontal-middle-left bar
1851    draw_segment_horizontal_caps(tempbitmap,
1852        0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1853        segwidth, LINE_CAP_START, (pattern & (1 << 8)) ? onpen : offpen);
18541854
1855   // horizontal-middle-right bar
1856   draw_segment_horizontal_caps(tempbitmap,
1857      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1858      segwidth, LINE_CAP_END, (pattern & (1 << 9)) ? onpen : offpen);
1855    // horizontal-middle-right bar
1856    draw_segment_horizontal_caps(tempbitmap,
1857        0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1858        segwidth, LINE_CAP_END, (pattern & (1 << 9)) ? onpen : offpen);
18591859
1860   // vertical-middle-top bar
1861   draw_segment_vertical_caps(tempbitmap,
1862      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1863      segwidth, LINE_CAP_NONE, (pattern & (1 << 10)) ? onpen : offpen);
1860    // vertical-middle-top bar
1861    draw_segment_vertical_caps(tempbitmap,
1862        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1863        segwidth, LINE_CAP_NONE, (pattern & (1 << 10)) ? onpen : offpen);
18641864
1865   // vertical-middle-bottom bar
1866   draw_segment_vertical_caps(tempbitmap,
1867      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1868      segwidth, LINE_CAP_NONE, (pattern & (1 << 11)) ? onpen : offpen);
1865    // vertical-middle-bottom bar
1866    draw_segment_vertical_caps(tempbitmap,
1867        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1868        segwidth, LINE_CAP_NONE, (pattern & (1 << 11)) ? onpen : offpen);
18691869
1870   // diagonal-left-bottom bar
1871   draw_segment_diagonal_1(tempbitmap,
1872      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1873      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1874      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1870    // diagonal-left-bottom bar
1871    draw_segment_diagonal_1(tempbitmap,
1872        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1873        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1874        segwidth, (pattern & (1 << 12)) ? onpen : offpen);
18751875
1876   // diagonal-left-top bar
1877   draw_segment_diagonal_2(tempbitmap,
1878      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1879      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1880      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1876    // diagonal-left-top bar
1877    draw_segment_diagonal_2(tempbitmap,
1878        0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1879        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1880        segwidth, (pattern & (1 << 13)) ? onpen : offpen);
18811881
1882   // diagonal-right-top bar
1883   draw_segment_diagonal_1(tempbitmap,
1884      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1885      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1886      segwidth, (pattern & (1 << 14)) ? onpen : offpen);
1882    // diagonal-right-top bar
1883    draw_segment_diagonal_1(tempbitmap,
1884        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1885        0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1886        segwidth, (pattern & (1 << 14)) ? onpen : offpen);
18871887
1888   // diagonal-right-bottom bar
1889   draw_segment_diagonal_2(tempbitmap,
1890      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1891      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1892      segwidth, (pattern & (1 << 15)) ? onpen : offpen);
1888    // diagonal-right-bottom bar
1889    draw_segment_diagonal_2(tempbitmap,
1890        bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1891        bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1892        segwidth, (pattern & (1 << 15)) ? onpen : offpen);
18931893
1894   // comma tail
1895   draw_segment_diagonal_1(tempbitmap,
1896      bmwidth - (segwidth/2), bmwidth + segwidth,
1897      bmheight - (segwidth), bmheight + segwidth*1.5,
1898      segwidth/2, (pattern & (1 << 17)) ? onpen : offpen);
1894    // comma tail
1895    draw_segment_diagonal_1(tempbitmap,
1896        bmwidth - (segwidth/2), bmwidth + segwidth,
1897        bmheight - (segwidth), bmheight + segwidth*1.5,
1898        segwidth/2, (pattern & (1 << 17)) ? onpen : offpen);
18991899
1900   // decimal point (draw last for priority)
1901   draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 16)) ? onpen : offpen);
1900    // decimal point (draw last for priority)
1901    draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 16)) ? onpen : offpen);
19021902
1903   // apply skew
1904   apply_skew(tempbitmap, 40);
1903    // apply skew
1904    apply_skew(tempbitmap, 40);
19051905
1906   // resample to the target size
1907   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1906    // resample to the target size
1907    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
19081908}
19091909
19101910
r242703r242704
19151915
19161916void layout_element::component::draw_dotmatrix(int dots, bitmap_argb32 &dest, const rectangle &bounds, int pattern)
19171917{
1918   const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1919   const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
1918    const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
1919    const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
19201920
1921   // sizes for computation
1922   int bmheight = 300;
1923   int dotwidth = 250;
1921    // sizes for computation
1922    int bmheight = 300;
1923    int dotwidth = 250;
19241924
1925   // allocate a temporary bitmap for drawing
1926   bitmap_argb32 tempbitmap(dotwidth*dots, bmheight);
1927   tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
1925    // allocate a temporary bitmap for drawing
1926    bitmap_argb32 tempbitmap(dotwidth*dots, bmheight);
1927    tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
19281928
1929   for (int i = 0; i < dots; i++)
1930      draw_segment_decimal(tempbitmap, ((dotwidth/2 )+ (i * dotwidth)), bmheight/2, dotwidth, (pattern & (1 << i))?onpen:offpen);
1929    for (int i = 0; i < dots; i++)
1930        draw_segment_decimal(tempbitmap, ((dotwidth/2 )+ (i * dotwidth)), bmheight/2, dotwidth, (pattern & (1 << i))?onpen:offpen);
19311931
1932   // resample to the target size
1933   render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
1932    // resample to the target size
1933    render_resample_argb_bitmap_hq(dest, tempbitmap, m_color);
19341934}
19351935
19361936
r242703r242704
19421942
19431943void layout_element::component::draw_segment_horizontal_caps(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, int caps, rgb_t color)
19441944{
1945   // loop over the width of the segment
1946   for (int y = 0; y < width / 2; y++)
1947   {
1948      UINT32 *d0 = &dest.pix32(midy - y);
1949      UINT32 *d1 = &dest.pix32(midy + y);
1950      int ty = (y < width / 8) ? width / 8 : y;
1945    // loop over the width of the segment
1946    for (int y = 0; y < width / 2; y++)
1947    {
1948        UINT32 *d0 = &dest.pix32(midy - y);
1949        UINT32 *d1 = &dest.pix32(midy + y);
1950        int ty = (y < width / 8) ? width / 8 : y;
19511951
1952      // loop over the length of the segment
1953      for (int x = minx + ((caps & LINE_CAP_START) ? ty : 0); x < maxx - ((caps & LINE_CAP_END) ? ty : 0); x++)
1954         d0[x] = d1[x] = color;
1955   }
1952        // loop over the length of the segment
1953        for (int x = minx + ((caps & LINE_CAP_START) ? ty : 0); x < maxx - ((caps & LINE_CAP_END) ? ty : 0); x++)
1954            d0[x] = d1[x] = color;
1955    }
19561956}
19571957
19581958
r242703r242704
19631963
19641964void layout_element::component::draw_segment_horizontal(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, rgb_t color)
19651965{
1966   draw_segment_horizontal_caps(dest, minx, maxx, midy, width, LINE_CAP_START | LINE_CAP_END, color);
1966    draw_segment_horizontal_caps(dest, minx, maxx, midy, width, LINE_CAP_START | LINE_CAP_END, color);
19671967}
19681968
19691969
r242703r242704
19751975
19761976void layout_element::component::draw_segment_vertical_caps(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, int caps, rgb_t color)
19771977{
1978   // loop over the width of the segment
1979   for (int x = 0; x < width / 2; x++)
1980   {
1981      UINT32 *d0 = &dest.pix32(0, midx - x);
1982      UINT32 *d1 = &dest.pix32(0, midx + x);
1983      int tx = (x < width / 8) ? width / 8 : x;
1978    // loop over the width of the segment
1979    for (int x = 0; x < width / 2; x++)
1980    {
1981        UINT32 *d0 = &dest.pix32(0, midx - x);
1982        UINT32 *d1 = &dest.pix32(0, midx + x);
1983        int tx = (x < width / 8) ? width / 8 : x;
19841984
1985      // loop over the length of the segment
1986      for (int y = miny + ((caps & LINE_CAP_START) ? tx : 0); y < maxy - ((caps & LINE_CAP_END) ? tx : 0); y++)
1987         d0[y * dest.rowpixels()] = d1[y * dest.rowpixels()] = color;
1988   }
1985        // loop over the length of the segment
1986        for (int y = miny + ((caps & LINE_CAP_START) ? tx : 0); y < maxy - ((caps & LINE_CAP_END) ? tx : 0); y++)
1987            d0[y * dest.rowpixels()] = d1[y * dest.rowpixels()] = color;
1988    }
19891989}
19901990
19911991
r242703r242704
19961996
19971997void layout_element::component::draw_segment_vertical(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, rgb_t color)
19981998{
1999   draw_segment_vertical_caps(dest, miny, maxy, midx, width, LINE_CAP_START | LINE_CAP_END, color);
1999    draw_segment_vertical_caps(dest, miny, maxy, midx, width, LINE_CAP_START | LINE_CAP_END, color);
20002000}
20012001
20022002
r242703r242704
20072007
20082008void layout_element::component::draw_segment_diagonal_1(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color)
20092009{
2010   // compute parameters
2011   width *= 1.5;
2012   float ratio = (maxy - miny - width) / (float)(maxx - minx);
2010    // compute parameters
2011    width *= 1.5;
2012    float ratio = (maxy - miny - width) / (float)(maxx - minx);
20132013
2014   // draw line
2015   for (int x = minx; x < maxx; x++)
2016      if (x >= 0 && x < dest.width())
2017      {
2018         UINT32 *d = &dest.pix32(0, x);
2019         int step = (x - minx) * ratio;
2014    // draw line
2015    for (int x = minx; x < maxx; x++)
2016        if (x >= 0 && x < dest.width())
2017        {
2018            UINT32 *d = &dest.pix32(0, x);
2019            int step = (x - minx) * ratio;
20202020
2021         for (int y = maxy - width - step; y < maxy - step; y++)
2022            if (y >= 0 && y < dest.height())
2023               d[y * dest.rowpixels()] = color;
2024      }
2021            for (int y = maxy - width - step; y < maxy - step; y++)
2022                if (y >= 0 && y < dest.height())
2023                    d[y * dest.rowpixels()] = color;
2024        }
20252025}
20262026
20272027
r242703r242704
20322032
20332033void layout_element::component::draw_segment_diagonal_2(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color)
20342034{
2035   // compute parameters
2036   width *= 1.5;
2037   float ratio = (maxy - miny - width) / (float)(maxx - minx);
2035    // compute parameters
2036    width *= 1.5;
2037    float ratio = (maxy - miny - width) / (float)(maxx - minx);
20382038
2039   // draw line
2040   for (int x = minx; x < maxx; x++)
2041      if (x >= 0 && x < dest.width())
2042      {
2043         UINT32 *d = &dest.pix32(0, x);
2044         int step = (x - minx) * ratio;
2039    // draw line
2040    for (int x = minx; x < maxx; x++)
2041        if (x >= 0 && x < dest.width())
2042        {
2043            UINT32 *d = &dest.pix32(0, x);
2044            int step = (x - minx) * ratio;
20452045
2046         for (int y = miny + step; y < miny + step + width; y++)
2047            if (y >= 0 && y < dest.height())
2048               d[y * dest.rowpixels()] = color;
2049      }
2046            for (int y = miny + step; y < miny + step + width; y++)
2047                if (y >= 0 && y < dest.height())
2048                    d[y * dest.rowpixels()] = color;
2049        }
20502050}
20512051
20522052
r242703r242704
20562056
20572057void layout_element::component::draw_segment_decimal(bitmap_argb32 &dest, int midx, int midy, int width, rgb_t color)
20582058{
2059   // compute parameters
2060   width /= 2;
2061   float ooradius2 = 1.0f / (float)(width * width);
2059    // compute parameters
2060    width /= 2;
2061    float ooradius2 = 1.0f / (float)(width * width);
20622062
2063   // iterate over y
2064   for (UINT32 y = 0; y <= width; y++)
2065   {
2066      UINT32 *d0 = &dest.pix32(midy - y);
2067      UINT32 *d1 = &dest.pix32(midy + y);
2068      float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2);
2069      INT32 left, right;
2063    // iterate over y
2064    for (UINT32 y = 0; y <= width; y++)
2065    {
2066        UINT32 *d0 = &dest.pix32(midy - y);
2067        UINT32 *d1 = &dest.pix32(midy + y);
2068        float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2);
2069        INT32 left, right;
20702070
2071      // compute left/right coordinates
2072      left = midx - (INT32)(xval + 0.5f);
2073      right = midx + (INT32)(xval + 0.5f);
2071        // compute left/right coordinates
2072        left = midx - (INT32)(xval + 0.5f);
2073        right = midx + (INT32)(xval + 0.5f);
20742074
2075      // draw this scanline
2076      for (UINT32 x = left; x < right; x++)
2077         d0[x] = d1[x] = color;
2078   }
2075        // draw this scanline
2076        for (UINT32 x = left; x < right; x++)
2077            d0[x] = d1[x] = color;
2078    }
20792079}
20802080
20812081
r242703r242704
20852085
20862086void layout_element::component::draw_segment_comma(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color)
20872087{
2088   // compute parameters
2089   width *= 1.5;
2090   float ratio = (maxy - miny - width) / (float)(maxx - minx);
2088    // compute parameters
2089    width *= 1.5;
2090    float ratio = (maxy - miny - width) / (float)(maxx - minx);
20912091
2092   // draw line
2093   for (int x = minx; x < maxx; x++)
2094   {
2095      UINT32 *d = &dest.pix32(0, x);
2096      int step = (x - minx) * ratio;
2092    // draw line
2093    for (int x = minx; x < maxx; x++)
2094    {
2095        UINT32 *d = &dest.pix32(0, x);
2096        int step = (x - minx) * ratio;
20972097
2098      for (int y = maxy; y < maxy  - width - step; y--)
2099         d[y * dest.rowpixels()] = color;
2100   }
2098        for (int y = maxy; y < maxy  - width - step; y--)
2099            d[y * dest.rowpixels()] = color;
2100    }
21012101}
21022102
21032103
r242703r242704
21072107
21082108void layout_element::component::apply_skew(bitmap_argb32 &dest, int skewwidth)
21092109{
2110   for (int y = 0; y < dest.height(); y++)
2111   {
2112      UINT32 *destrow = &dest.pix32(y);
2113      int offs = skewwidth * (dest.height() - y) / dest.height();
2114      for (int x = dest.width() - skewwidth - 1; x >= 0; x--)
2115         destrow[x + offs] = destrow[x];
2116      for (int x = 0; x < offs; x++)
2117         destrow[x] = 0;
2118   }
2110    for (int y = 0; y < dest.height(); y++)
2111    {
2112        UINT32 *destrow = &dest.pix32(y);
2113        int offs = skewwidth * (dest.height() - y) / dest.height();
2114        for (int x = dest.width() - skewwidth - 1; x >= 0; x--)
2115            destrow[x + offs] = destrow[x];
2116        for (int x = 0; x < offs; x++)
2117            destrow[x] = 0;
2118    }
21192119}
21202120
21212121
r242703r242704
21292129//-------------------------------------------------
21302130
21312131layout_view::layout_view(running_machine &machine, xml_data_node &viewnode, simple_list<layout_element> &elemlist)
2132   : m_next(NULL),
2133      m_aspect(1.0f),
2134      m_scraspect(1.0f)
2132    : m_next(NULL),
2133        m_aspect(1.0f),
2134        m_scraspect(1.0f)
21352135{
2136   // allocate a copy of the name
2137   m_name = xml_get_attribute_string_with_subst(machine, viewnode, "name", "");
2136    // allocate a copy of the name
2137    m_name = xml_get_attribute_string_with_subst(machine, viewnode, "name", "");
21382138
2139   // if we have a bounds item, load it
2140   xml_data_node *boundsnode = xml_get_sibling(viewnode.child, "bounds");
2141   m_expbounds.x0 = m_expbounds.y0 = m_expbounds.x1 = m_expbounds.y1 = 0;
2142   if (boundsnode != NULL)
2143      parse_bounds(machine, xml_get_sibling(boundsnode, "bounds"), m_expbounds);
2139    // if we have a bounds item, load it
2140    xml_data_node *boundsnode = xml_get_sibling(viewnode.child, "bounds");
2141    m_expbounds.x0 = m_expbounds.y0 = m_expbounds.x1 = m_expbounds.y1 = 0;
2142    if (boundsnode != NULL)
2143        parse_bounds(machine, xml_get_sibling(boundsnode, "bounds"), m_expbounds);
21442144
2145   // load backdrop items
2146   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "backdrop"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "backdrop"))
2147      m_backdrop_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2145    // load backdrop items
2146    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "backdrop"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "backdrop"))
2147        m_backdrop_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21482148
2149   // load screen items
2150   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "screen"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "screen"))
2151      m_screen_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2149    // load screen items
2150    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "screen"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "screen"))
2151        m_screen_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21522152
2153   // load overlay items
2154   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "overlay"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "overlay"))
2155      m_overlay_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2153    // load overlay items
2154    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "overlay"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "overlay"))
2155        m_overlay_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21562156
2157   // load bezel items
2158   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "bezel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "bezel"))
2159      m_bezel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2157    // load bezel items
2158    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "bezel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "bezel"))
2159        m_bezel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21602160
2161   // load cpanel items
2162   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "cpanel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "cpanel"))
2163      m_cpanel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2161    // load cpanel items
2162    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "cpanel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "cpanel"))
2163        m_cpanel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21642164
2165   // load marquee items
2166   for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "marquee"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "marquee"))
2167      m_marquee_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
2165    // load marquee items
2166    for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "marquee"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "marquee"))
2167        m_marquee_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
21682168
2169   // recompute the data for the view based on a default layer config
2170   recompute(render_layer_config());
2169    // recompute the data for the view based on a default layer config
2170    recompute(render_layer_config());
21712171}
21722172
21732173
r242703r242704
21872187
21882188layout_view::item *layout_view::first_item(item_layer layer) const
21892189{
2190   switch (layer)
2191   {
2192      case ITEM_LAYER_BACKDROP:   return m_backdrop_list.first();
2193      case ITEM_LAYER_SCREEN:     return m_screen_list.first();
2194      case ITEM_LAYER_OVERLAY:    return m_overlay_list.first();
2195      case ITEM_LAYER_BEZEL:      return m_bezel_list.first();
2196      case ITEM_LAYER_CPANEL:     return m_cpanel_list.first();
2197      case ITEM_LAYER_MARQUEE:    return m_marquee_list.first();
2198      default:                    return NULL;
2199   }
2190    switch (layer)
2191    {
2192        case ITEM_LAYER_BACKDROP:   return m_backdrop_list.first();
2193        case ITEM_LAYER_SCREEN:     return m_screen_list.first();
2194        case ITEM_LAYER_OVERLAY:    return m_overlay_list.first();
2195        case ITEM_LAYER_BEZEL:      return m_bezel_list.first();
2196        case ITEM_LAYER_CPANEL:     return m_cpanel_list.first();
2197        case ITEM_LAYER_MARQUEE:    return m_marquee_list.first();
2198        default:                    return NULL;
2199    }
22002200}
22012201
22022202
r242703r242704
22072207
22082208void layout_view::recompute(render_layer_config layerconfig)
22092209{
2210   // reset the bounds
2211   m_bounds.x0 = m_bounds.y0 = m_bounds.x1 = m_bounds.y1 = 0.0f;
2212   m_scrbounds.x0 = m_scrbounds.y0 = m_scrbounds.x1 = m_scrbounds.y1 = 0.0f;
2213   m_screens.reset();
2210    // reset the bounds
2211    m_bounds.x0 = m_bounds.y0 = m_bounds.x1 = m_bounds.y1 = 0.0f;
2212    m_scrbounds.x0 = m_scrbounds.y0 = m_scrbounds.x1 = m_scrbounds.y1 = 0.0f;
2213    m_screens.reset();
22142214
2215   // loop over all layers
2216   bool first = true;
2217   bool scrfirst = true;
2218   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2219   {
2220      // determine if this layer should be visible
2221      switch (layer)
2222      {
2223         case ITEM_LAYER_BACKDROP:   m_layenabled[layer] = layerconfig.backdrops_enabled();  break;
2224         case ITEM_LAYER_OVERLAY:    m_layenabled[layer] = layerconfig.overlays_enabled();   break;
2225         case ITEM_LAYER_BEZEL:      m_layenabled[layer] = layerconfig.bezels_enabled();     break;
2226         case ITEM_LAYER_CPANEL:     m_layenabled[layer] = layerconfig.cpanels_enabled();    break;
2227         case ITEM_LAYER_MARQUEE:    m_layenabled[layer] = layerconfig.marquees_enabled();   break;
2228         default:                    m_layenabled[layer] = true;                             break;
2229      }
2215    // loop over all layers
2216    bool first = true;
2217    bool scrfirst = true;
2218    for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2219    {
2220        // determine if this layer should be visible
2221        switch (layer)
2222        {
2223            case ITEM_LAYER_BACKDROP:   m_layenabled[layer] = layerconfig.backdrops_enabled();  break;
2224            case ITEM_LAYER_OVERLAY:    m_layenabled[layer] = layerconfig.overlays_enabled();   break;
2225            case ITEM_LAYER_BEZEL:      m_layenabled[layer] = layerconfig.bezels_enabled();     break;
2226            case ITEM_LAYER_CPANEL:     m_layenabled[layer] = layerconfig.cpanels_enabled();    break;
2227            case ITEM_LAYER_MARQUEE:    m_layenabled[layer] = layerconfig.marquees_enabled();   break;
2228            default:                    m_layenabled[layer] = true;                             break;
2229        }
22302230
2231      // only do it if requested
2232      if (m_layenabled[layer])
2233         for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
2234         {
2235            // accumulate bounds
2236            if (first)
2237               m_bounds = curitem->m_rawbounds;
2238            else
2239               union_render_bounds(&m_bounds, &curitem->m_rawbounds);
2240            first = false;
2231        // only do it if requested
2232        if (m_layenabled[layer])
2233            for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
2234            {
2235                // accumulate bounds
2236                if (first)
2237                    m_bounds = curitem->m_rawbounds;
2238                else
2239                    union_render_bounds(&m_bounds, &curitem->m_rawbounds);
2240                first = false;
22412241
2242            // accumulate screen bounds
2243            if (curitem->m_screen != NULL)
2244            {
2245               if (scrfirst)
2246                  m_scrbounds = curitem->m_rawbounds;
2247               else
2248                  union_render_bounds(&m_scrbounds, &curitem->m_rawbounds);
2249               scrfirst = false;
2242                // accumulate screen bounds
2243                if (curitem->m_screen != NULL)
2244                {
2245                    if (scrfirst)
2246                        m_scrbounds = curitem->m_rawbounds;
2247                    else
2248                        union_render_bounds(&m_scrbounds, &curitem->m_rawbounds);
2249                    scrfirst = false;
22502250
2251               // accumulate the screens in use while we're scanning
2252               m_screens.add(*curitem->m_screen);
2253            }
2254         }
2255   }
2251                    // accumulate the screens in use while we're scanning
2252                    m_screens.add(*curitem->m_screen);
2253                }
2254            }
2255    }
22562256
2257   // if we have an explicit bounds, override it
2258   if (m_expbounds.x1 > m_expbounds.x0)
2259      m_bounds = m_expbounds;
2257    // if we have an explicit bounds, override it
2258    if (m_expbounds.x1 > m_expbounds.x0)
2259        m_bounds = m_expbounds;
22602260
2261   // if we're handling things normally, the target bounds are (0,0)-(1,1)
2262   render_bounds target_bounds;
2263   if (!layerconfig.zoom_to_screen() || m_screens.count() == 0)
2264   {
2265      // compute the aspect ratio of the view
2266      m_aspect = (m_bounds.x1 - m_bounds.x0) / (m_bounds.y1 - m_bounds.y0);
2261    // if we're handling things normally, the target bounds are (0,0)-(1,1)
2262    render_bounds target_bounds;
2263    if (!layerconfig.zoom_to_screen() || m_screens.count() == 0)
2264    {
2265        // compute the aspect ratio of the view
2266        m_aspect = (m_bounds.x1 - m_bounds.x0) / (m_bounds.y1 - m_bounds.y0);
22672267
2268      target_bounds.x0 = target_bounds.y0 = 0.0f;
2269      target_bounds.x1 = target_bounds.y1 = 1.0f;
2270   }
2268        target_bounds.x0 = target_bounds.y0 = 0.0f;
2269        target_bounds.x1 = target_bounds.y1 = 1.0f;
2270    }
22712271
2272   // if we're cropping, we want the screen area to fill (0,0)-(1,1)
2273   else
2274   {
2275      // compute the aspect ratio of the screen
2276      m_scraspect = (m_scrbounds.x1 - m_scrbounds.x0) / (m_scrbounds.y1 - m_scrbounds.y0);
2272    // if we're cropping, we want the screen area to fill (0,0)-(1,1)
2273    else
2274    {
2275        // compute the aspect ratio of the screen
2276        m_scraspect = (m_scrbounds.x1 - m_scrbounds.x0) / (m_scrbounds.y1 - m_scrbounds.y0);
22772277
2278      float targwidth = (m_bounds.x1 - m_bounds.x0) / (m_scrbounds.x1 - m_scrbounds.x0);
2279      float targheight = (m_bounds.y1 - m_bounds.y0) / (m_scrbounds.y1 - m_scrbounds.y0);
2280      target_bounds.x0 = (m_bounds.x0 - m_scrbounds.x0) / (m_bounds.x1 - m_bounds.x0) * targwidth;
2281      target_bounds.y0 = (m_bounds.y0 - m_scrbounds.y0) / (m_bounds.y1 - m_bounds.y0) * targheight;
2282      target_bounds.x1 = target_bounds.x0 + targwidth;
2283      target_bounds.y1 = target_bounds.y0 + targheight;
2284   }
2278        float targwidth = (m_bounds.x1 - m_bounds.x0) / (m_scrbounds.x1 - m_scrbounds.x0);
2279        float targheight = (m_bounds.y1 - m_bounds.y0) / (m_scrbounds.y1 - m_scrbounds.y0);
2280        target_bounds.x0 = (m_bounds.x0 - m_scrbounds.x0) / (m_bounds.x1 - m_bounds.x0) * targwidth;
2281        target_bounds.y0 = (m_bounds.y0 - m_scrbounds.y0) / (m_bounds.y1 - m_bounds.y0) * targheight;
2282        target_bounds.x1 = target_bounds.x0 + targwidth;
2283        target_bounds.y1 = target_bounds.y0 + targheight;
2284    }
22852285
2286   // determine the scale/offset for normalization
2287   float xoffs = m_bounds.x0;
2288   float yoffs = m_bounds.y0;
2289   float xscale = (target_bounds.x1 - target_bounds.x0) / (m_bounds.x1 - m_bounds.x0);
2290   float yscale = (target_bounds.y1 - target_bounds.y0) / (m_bounds.y1 - m_bounds.y0);
2286    // determine the scale/offset for normalization
2287    float xoffs = m_bounds.x0;
2288    float yoffs = m_bounds.y0;
2289    float xscale = (target_bounds.x1 - target_bounds.x0) / (m_bounds.x1 - m_bounds.x0);
2290    float yscale = (target_bounds.y1 - target_bounds.y0) / (m_bounds.y1 - m_bounds.y0);
22912291
2292   // normalize all the item bounds
2293   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2294      for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
2295      {
2296         curitem->m_bounds.x0 = target_bounds.x0 + (curitem->m_rawbounds.x0 - xoffs) * xscale;
2297         curitem->m_bounds.x1 = target_bounds.x0 + (curitem->m_rawbounds.x1 - xoffs) * xscale;
2298         curitem->m_bounds.y0 = target_bounds.y0 + (curitem->m_rawbounds.y0 - yoffs) * yscale;
2299         curitem->m_bounds.y1 = target_bounds.y0 + (curitem->m_rawbounds.y1 - yoffs) * yscale;
2300      }
2292    // normalize all the item bounds
2293    for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2294        for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
2295        {
2296            curitem->m_bounds.x0 = target_bounds.x0 + (curitem->m_rawbounds.x0 - xoffs) * xscale;
2297            curitem->m_bounds.x1 = target_bounds.x0 + (curitem->m_rawbounds.x1 - xoffs) * xscale;
2298            curitem->m_bounds.y0 = target_bounds.y0 + (curitem->m_rawbounds.y0 - yoffs) * yscale;
2299            curitem->m_bounds.y1 = target_bounds.y0 + (curitem->m_rawbounds.y1 - yoffs) * yscale;
2300        }
23012301}
23022302
23032303
r242703r242704
23112311//-------------------------------------------------
23122312
23132313layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simple_list<layout_element> &elemlist)
2314   : m_next(NULL),
2315      m_element(NULL),
2316      m_input_mask(0),
2317      m_screen(NULL),
2318      m_orientation(ROT0)
2314    : m_next(NULL),
2315        m_element(NULL),
2316        m_input_mask(0),
2317        m_screen(NULL),
2318        m_orientation(ROT0)
23192319{
2320   // allocate a copy of the output name
2321   m_output_name = xml_get_attribute_string_with_subst(machine, itemnode, "name", "");
2320    // allocate a copy of the output name
2321    m_output_name = xml_get_attribute_string_with_subst(machine, itemnode, "name", "");
23222322
2323   // allocate a copy of the input tag
2324   m_input_tag = xml_get_attribute_string_with_subst(machine, itemnode, "inputtag", "");
2323    // allocate a copy of the input tag
2324    m_input_tag = xml_get_attribute_string_with_subst(machine, itemnode, "inputtag", "");
23252325
2326   // find the associated element
2327   const char *name = xml_get_attribute_string_with_subst(machine, itemnode, "element", NULL);
2328   if (name != NULL)
2329   {
2330      // search the list of elements for a match
2331      for (m_element = elemlist.first(); m_element != NULL; m_element = m_element->next())
2332         if (strcmp(name, m_element->name()) == 0)
2333            break;
2326    // find the associated element
2327    const char *name = xml_get_attribute_string_with_subst(machine, itemnode, "element", NULL);
2328    if (name != NULL)
2329    {
2330        // search the list of elements for a match
2331        for (m_element = elemlist.first(); m_element != NULL; m_element = m_element->next())
2332            if (strcmp(name, m_element->name()) == 0)
2333                break;
23342334
2335      // error if not found
2336      if (m_element == NULL)
2337         throw emu_fatalerror("Unable to find layout element %s", name);
2338   }
2335        // error if not found
2336        if (m_element == NULL)
2337            throw emu_fatalerror("Unable to find layout element %s", name);
2338    }
23392339
2340   // fetch common data
2341   int index = xml_get_attribute_int_with_subst(machine, itemnode, "index", -1);
2342   if (index != -1)
2343   {
2344      screen_device_iterator iter(machine.root_device());
2345      m_screen = iter.byindex(index);
2346   }
2347   m_input_mask = xml_get_attribute_int_with_subst(machine, itemnode, "inputmask", 0);
2348   if (m_output_name[0] != 0 && m_element != NULL)
2349      output_set_value(m_output_name, m_element->default_state());
2350   parse_bounds(machine, xml_get_sibling(itemnode.child, "bounds"), m_rawbounds);
2351   parse_color(machine, xml_get_sibling(itemnode.child, "color"), m_color);
2352   parse_orientation(machine, xml_get_sibling(itemnode.child, "orientation"), m_orientation);
2340    // fetch common data
2341    int index = xml_get_attribute_int_with_subst(machine, itemnode, "index", -1);
2342    if (index != -1)
2343    {
2344        screen_device_iterator iter(machine.root_device());
2345        m_screen = iter.byindex(index);
2346    }
2347    m_input_mask = xml_get_attribute_int_with_subst(machine, itemnode, "inputmask", 0);
2348    if (m_output_name[0] != 0 && m_element != NULL)
2349        output_set_value(m_output_name, m_element->default_state());
2350    parse_bounds(machine, xml_get_sibling(itemnode.child, "bounds"), m_rawbounds);
2351    parse_color(machine, xml_get_sibling(itemnode.child, "color"), m_color);
2352    parse_orientation(machine, xml_get_sibling(itemnode.child, "orientation"), m_orientation);
23532353
2354   // sanity checks
2355   if (strcmp(itemnode.name, "screen") == 0)
2356   {
2357      if (m_screen == NULL)
2358         throw emu_fatalerror("Layout references invalid screen index %d", index);
2359   }
2360   else
2361   {
2362      if (m_element == NULL)
2363         throw emu_fatalerror("Layout item of type %s require an element tag", itemnode.name);
2364   }
2354    // sanity checks
2355    if (strcmp(itemnode.name, "screen") == 0)
2356    {
2357        if (m_screen == NULL)
2358            throw emu_fatalerror("Layout references invalid screen index %d", index);
2359    }
2360    else
2361    {
2362        if (m_element == NULL)
2363            throw emu_fatalerror("Layout item of type %s require an element tag", itemnode.name);
2364    }
23652365}
23662366
23672367
r242703r242704
23812381
23822382render_container *layout_view::item::screen_container(running_machine &machine) const
23832383{
2384   return (m_screen != NULL) ? &m_screen->container() : NULL;
2384    return (m_screen != NULL) ? &m_screen->container() : NULL;
23852385}
23862386
23872387//-------------------------------------------------
r242703r242704
23902390
23912391int layout_view::item::state() const
23922392{
2393   int state = 0;
2393    int state = 0;
23942394
2395   assert(m_element != NULL);
2395    assert(m_element != NULL);
23962396
2397   // if configured to an output, fetch the output value
2398   if (m_output_name[0] != 0)
2399      state = output_get_value(m_output_name);
2397    // if configured to an output, fetch the output value
2398    if (m_output_name[0] != 0)
2399        state = output_get_value(m_output_name);
24002400
2401   // if configured to an input, fetch the input value
2402   else if (m_input_tag[0] != 0)
2403   {
2404      ioport_port *port = m_element->machine().root_device().ioport(m_input_tag);
2405      if (port != NULL)
2406      {
2407         ioport_field *field = port->field(m_input_mask);
2408         if (field != NULL)
2409            state = ((port->read() ^ field->defvalue()) & m_input_mask) ? 1 : 0;
2410      }
2411   }
2412   return state;
2401    // if configured to an input, fetch the input value
2402    else if (m_input_tag[0] != 0)
2403    {
2404        ioport_port *port = m_element->machine().root_device().ioport(m_input_tag);
2405        if (port != NULL)
2406        {
2407            ioport_field *field = port->field(m_input_mask);
2408            if (field != NULL)
2409                state = ((port->read() ^ field->defvalue()) & m_input_mask) ? 1 : 0;
2410        }
2411    }
2412    return state;
24132413}
24142414
24152415
r242703r242704
24232423//-------------------------------------------------
24242424
24252425layout_file::layout_file(running_machine &machine, xml_data_node &rootnode, const char *dirname)
2426   : m_next(NULL)
2426    : m_next(NULL)
24272427{
2428   // find the layout node
2429   xml_data_node *mamelayoutnode = xml_get_sibling(rootnode.child, "mamelayout");
2430   if (mamelayoutnode == NULL)
2431      throw emu_fatalerror("Invalid XML file: missing mamelayout node");
2428    // find the layout node
2429    xml_data_node *mamelayoutnode = xml_get_sibling(rootnode.child, "mamelayout");
2430    if (mamelayoutnode == NULL)
2431        throw emu_fatalerror("Invalid XML file: missing mamelayout node");
24322432
2433   // validate the config data version
2434   int version = xml_get_attribute_int(mamelayoutnode, "version", 0);
2435   if (version != LAYOUT_VERSION)
2436      throw emu_fatalerror("Invalid XML file: unsupported version");
2433    // validate the config data version
2434    int version = xml_get_attribute_int(mamelayoutnode, "version", 0);
2435    if (version != LAYOUT_VERSION)
2436        throw emu_fatalerror("Invalid XML file: unsupported version");
24372437
2438   // parse all the elements
2439   for (xml_data_node *elemnode = xml_get_sibling(mamelayoutnode->child, "element"); elemnode != NULL; elemnode = xml_get_sibling(elemnode->next, "element"))
2440      m_elemlist.append(*global_alloc(layout_element(machine, *elemnode, dirname)));
2438    // parse all the elements
2439    for (xml_data_node *elemnode = xml_get_sibling(mamelayoutnode->child, "element"); elemnode != NULL; elemnode = xml_get_sibling(elemnode->next, "element"))
2440        m_elemlist.append(*global_alloc(layout_element(machine, *elemnode, dirname)));
24412441
2442   // parse all the views
2443   for (xml_data_node *viewnode = xml_get_sibling(mamelayoutnode->child, "view"); viewnode != NULL; viewnode = xml_get_sibling(viewnode->next, "view"))
2444      m_viewlist.append(*global_alloc(layout_view(machine, *viewnode, m_elemlist)));
2442    // parse all the views
2443    for (xml_data_node *viewnode = xml_get_sibling(mamelayoutnode->child, "view"); viewnode != NULL; viewnode = xml_get_sibling(viewnode->next, "view"))
2444        m_viewlist.append(*global_alloc(layout_view(machine, *viewnode, m_elemlist)));
24452445}
24462446
24472447
trunk/src/emu/rendlay.h
r242703r242704
2020
2121enum item_layer
2222{
23   ITEM_LAYER_FIRST = 0,
24   ITEM_LAYER_BACKDROP = ITEM_LAYER_FIRST,
25   ITEM_LAYER_SCREEN,
26   ITEM_LAYER_OVERLAY,
27   ITEM_LAYER_BEZEL,
28   ITEM_LAYER_CPANEL,
29   ITEM_LAYER_MARQUEE,
30   ITEM_LAYER_MAX
23    ITEM_LAYER_FIRST = 0,
24    ITEM_LAYER_BACKDROP = ITEM_LAYER_FIRST,
25    ITEM_LAYER_SCREEN,
26    ITEM_LAYER_OVERLAY,
27    ITEM_LAYER_BEZEL,
28    ITEM_LAYER_CPANEL,
29    ITEM_LAYER_MARQUEE,
30    ITEM_LAYER_MAX
3131};
3232DECLARE_ENUM_OPERATORS(item_layer);
3333
r242703r242704
4343// a layout_element is a single named element, which may have multiple components
4444class layout_element
4545{
46   friend class simple_list<layout_element>;
46    friend class simple_list<layout_element>;
4747
4848public:
49   // construction/destruction
50   layout_element(running_machine &machine, xml_data_node &elemnode, const char *dirname);
51   virtual ~layout_element();
49    // construction/destruction
50    layout_element(running_machine &machine, xml_data_node &elemnode, const char *dirname);
51    virtual ~layout_element();
5252
53   // getters
54   layout_element *next() const { return m_next; }
55   const char *name() const { return m_name; }
56   running_machine &machine() const { return m_machine; }
57   int default_state() const { return m_defstate; }
58   int maxstate() const { return m_maxstate; }
59   render_texture *state_texture(int state);
53    // getters
54    layout_element *next() const { return m_next; }
55    const char *name() const { return m_name; }
56    running_machine &machine() const { return m_machine; }
57    int default_state() const { return m_defstate; }
58    int maxstate() const { return m_maxstate; }
59    render_texture *state_texture(int state);
6060
6161private:
62   // a component represents an image, rectangle, or disk in an element
63   class component
64   {
65      friend class layout_element;
66      friend class simple_list<component>;
62    // a component represents an image, rectangle, or disk in an element
63    class component
64    {
65        friend class layout_element;
66        friend class simple_list<component>;
6767
68   public:
69      // construction/destruction
70      component(running_machine &machine, xml_data_node &compnode, const char *dirname);
71      ~component();
68    public:
69        // construction/destruction
70        component(running_machine &machine, xml_data_node &compnode, const char *dirname);
71        ~component();
7272
73      // getters
74      component *next() const { return m_next; }
75      const render_bounds &bounds() const { return m_bounds; }
73        // getters
74        component *next() const { return m_next; }
75        const render_bounds &bounds() const { return m_bounds; }
7676
77      // operations
78      void draw(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
77        // operations
78        void draw(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
7979
80   private:
81      // component types
82      enum component_type
83      {
84         CTYPE_INVALID = 0,
85         CTYPE_IMAGE,
86         CTYPE_RECT,
87         CTYPE_DISK,
88         CTYPE_TEXT,
89         CTYPE_LED7SEG,
90         CTYPE_LED8SEG_GTS1,
91         CTYPE_LED14SEG,
92         CTYPE_LED16SEG,
93         CTYPE_LED14SEGSC,
94         CTYPE_LED16SEGSC,
95         CTYPE_DOTMATRIX,
96         CTYPE_DOTMATRIX5DOT,
97         CTYPE_DOTMATRIXDOT,
98         CTYPE_SIMPLECOUNTER,
99         CTYPE_REEL,
100         CTYPE_MAX
101      };
80    private:
81        // component types
82        enum component_type
83        {
84            CTYPE_INVALID = 0,
85            CTYPE_IMAGE,
86            CTYPE_RECT,
87            CTYPE_DISK,
88            CTYPE_TEXT,
89            CTYPE_LED7SEG,
90            CTYPE_LED8SEG_GTS1,
91            CTYPE_LED14SEG,
92            CTYPE_LED16SEG,
93            CTYPE_LED14SEGSC,
94            CTYPE_LED16SEGSC,
95            CTYPE_DOTMATRIX,
96            CTYPE_DOTMATRIX5DOT,
97            CTYPE_DOTMATRIXDOT,
98            CTYPE_SIMPLECOUNTER,
99            CTYPE_REEL,
100            CTYPE_MAX
101        };
102102
103      // helpers
104      void draw_rect(bitmap_argb32 &dest, const rectangle &bounds);
105      void draw_disk(bitmap_argb32 &dest, const rectangle &bounds);
106      void draw_text(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds);
107      void draw_simplecounter(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
108      void draw_reel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
109      void draw_beltreel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
110      void load_bitmap();
111      void load_reel_bitmap(int number);
112      void draw_led7seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
113      void draw_led8seg_gts1(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
114      void draw_led14seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
115      void draw_led14segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
116      void draw_led16seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
117      void draw_led16segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
118      void draw_dotmatrix(int dots,bitmap_argb32 &dest, const rectangle &bounds, int pattern);
119      void draw_segment_horizontal_caps(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, int caps, rgb_t color);
120      void draw_segment_horizontal(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, rgb_t color);
121      void draw_segment_vertical_caps(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, int caps, rgb_t color);
122      void draw_segment_vertical(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, rgb_t color);
123      void draw_segment_diagonal_1(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
124      void draw_segment_diagonal_2(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
125      void draw_segment_decimal(bitmap_argb32 &dest, int midx, int midy, int width, rgb_t color);
126      void draw_segment_comma(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
127      void apply_skew(bitmap_argb32 &dest, int skewwidth);
103        // helpers
104        void draw_rect(bitmap_argb32 &dest, const rectangle &bounds);
105        void draw_disk(bitmap_argb32 &dest, const rectangle &bounds);
106        void draw_text(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds);
107        void draw_simplecounter(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
108        void draw_reel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
109        void draw_beltreel(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state);
110        void load_bitmap();
111        void load_reel_bitmap(int number);
112        void draw_led7seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
113        void draw_led8seg_gts1(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
114        void draw_led14seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
115        void draw_led14segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
116        void draw_led16seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
117        void draw_led16segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern);
118        void draw_dotmatrix(int dots,bitmap_argb32 &dest, const rectangle &bounds, int pattern);
119        void draw_segment_horizontal_caps(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, int caps, rgb_t color);
120        void draw_segment_horizontal(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, rgb_t color);
121        void draw_segment_vertical_caps(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, int caps, rgb_t color);
122        void draw_segment_vertical(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, rgb_t color);
123        void draw_segment_diagonal_1(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
124        void draw_segment_diagonal_2(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
125        void draw_segment_decimal(bitmap_argb32 &dest, int midx, int midy, int width, rgb_t color);
126        void draw_segment_comma(bitmap_argb32 &dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color);
127        void apply_skew(bitmap_argb32 &dest, int skewwidth);
128128
129      #define MAX_BITMAPS 32
129        #define MAX_BITMAPS 32
130130
131      // internal state
132      component *         m_next;                     // link to next component
133      component_type      m_type;                     // type of component
134      int                 m_state;                    // state where this component is visible (-1 means all states)
135      render_bounds       m_bounds;                   // bounds of the element
136      render_color        m_color;                    // color of the element
137      astring             m_string;                   // string for text components
138      int                 m_digits;                   // number of digits for simple counters
139      int                 m_textalign;                // text alignment to box
140      bitmap_argb32       m_bitmap[MAX_BITMAPS];      // source bitmap for images
141      astring             m_dirname;                  // directory name of image file (for lazy loading)
142      auto_pointer<emu_file> m_file[MAX_BITMAPS];        // file object for reading image/alpha files
143      astring             m_imagefile[MAX_BITMAPS];   // name of the image file (for lazy loading)
144      astring             m_alphafile[MAX_BITMAPS];   // name of the alpha file (for lazy loading)
145      bool                m_hasalpha[MAX_BITMAPS];    // is there any alpha component present?
131        // internal state
132        component *         m_next;                     // link to next component
133        component_type      m_type;                     // type of component
134        int                 m_state;                    // state where this component is visible (-1 means all states)
135        render_bounds       m_bounds;                   // bounds of the element
136        render_color        m_color;                    // color of the element
137        astring             m_string;                   // string for text components
138        int                 m_digits;                   // number of digits for simple counters
139        int                 m_textalign;                // text alignment to box
140        bitmap_argb32       m_bitmap[MAX_BITMAPS];      // source bitmap for images
141        astring             m_dirname;                  // directory name of image file (for lazy loading)
142        auto_pointer<emu_file> m_file[MAX_BITMAPS];        // file object for reading image/alpha files
143        astring             m_imagefile[MAX_BITMAPS];   // name of the image file (for lazy loading)
144        astring             m_alphafile[MAX_BITMAPS];   // name of the alpha file (for lazy loading)
145        bool                m_hasalpha[MAX_BITMAPS];    // is there any alpha component present?
146146
147      // stuff for fruit machine reels
148      // basically made up of multiple text strings / gfx
149      int                 m_numstops;
150      astring             m_stopnames[MAX_BITMAPS];
151      int                 m_stateoffset;
152      int                 m_reelreversed;
153      int                 m_numsymbolsvisible;
154      int                 m_beltreel;
155   };
147        // stuff for fruit machine reels
148        // basically made up of multiple text strings / gfx
149        int                 m_numstops;
150        astring             m_stopnames[MAX_BITMAPS];
151        int                 m_stateoffset;
152        int                 m_reelreversed;
153        int                 m_numsymbolsvisible;
154        int                 m_beltreel;
155    };
156156
157   // a texture encapsulates a texture for a given element in a given state
158   class texture
159   {
160   public:
161      texture();
162      ~texture();
157    // a texture encapsulates a texture for a given element in a given state
158    class texture
159    {
160    public:
161        texture();
162        ~texture();
163163
164      layout_element *    m_element;      // pointer back to the element
165      render_texture *    m_texture;      // texture for this state
166      int                 m_state;        // associated state number
167   };
164        layout_element *    m_element;      // pointer back to the element
165        render_texture *    m_texture;      // texture for this state
166        int                 m_state;        // associated state number
167    };
168168
169   // internal helpers
170   static void element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
169    // internal helpers
170    static void element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
171171
172   // internal state
173   layout_element *    m_next;             // link to next element
174   running_machine &   m_machine;          // reference to the owning machine
175   astring             m_name;             // name of this element
176   simple_list<component> m_complist;      // list of components
177   int                 m_defstate;         // default state of this element
178   int                 m_maxstate;         // maximum state value for all components
179   dynamic_array<texture> m_elemtex;       // array of element textures used for managing the scaled bitmaps
172    // internal state
173    layout_element *    m_next;             // link to next element
174    running_machine &   m_machine;          // reference to the owning machine
175    astring             m_name;             // name of this element
176    simple_list<component> m_complist;      // list of components
177    int                 m_defstate;         // default state of this element
178    int                 m_maxstate;         // maximum state value for all components
179    dynamic_array<texture> m_elemtex;       // array of element textures used for managing the scaled bitmaps
180180};
181181
182182
r242703r242704
185185// a layout_view encapsulates a named list of items
186186class layout_view
187187{
188   friend class simple_list<layout_view>;
188    friend class simple_list<layout_view>;
189189
190190public:
191   // an item is a single backdrop, screen, overlay, bezel, cpanel, or marquee item
192   class item
193   {
194      friend class layout_view;
195      friend class simple_list<item>;
191    // an item is a single backdrop, screen, overlay, bezel, cpanel, or marquee item
192    class item
193    {
194        friend class layout_view;
195        friend class simple_list<item>;
196196
197   public:
198      // construction/destruction
199      item(running_machine &machine, xml_data_node &itemnode, simple_list<layout_element> &elemlist);
200      virtual ~item();
197    public:
198        // construction/destruction
199        item(running_machine &machine, xml_data_node &itemnode, simple_list<layout_element> &elemlist);
200        virtual ~item();
201201
202      // getters
203      item *next() const { return m_next; }
204      layout_element *element() const { return m_element; }
205      screen_device *screen() { return m_screen; }
206      const render_bounds &bounds() const { return m_bounds; }
207      const render_color &color() const { return m_color; }
208      int orientation() const { return m_orientation; }
209      render_container *screen_container(running_machine &machine) const;
210      bool has_input() const { return bool(m_input_tag); }
211      const char *input_tag_and_mask(ioport_value &mask) const { mask = m_input_mask; return m_input_tag; }
202        // getters
203        item *next() const { return m_next; }
204        layout_element *element() const { return m_element; }
205        screen_device *screen() { return m_screen; }
206        const render_bounds &bounds() const { return m_bounds; }
207        const render_color &color() const { return m_color; }
208        int orientation() const { return m_orientation; }
209        render_container *screen_container(running_machine &machine) const;
210        bool has_input() const { return bool(m_input_tag); }
211        const char *input_tag_and_mask(ioport_value &mask) const { mask = m_input_mask; return m_input_tag; }
212212
213      // fetch state based on configured source
214      int state() const;
213        // fetch state based on configured source
214        int state() const;
215215
216   private:
217      // internal state
218      item *              m_next;             // link to next item
219      layout_element *    m_element;          // pointer to the associated element (non-screens only)
220      astring             m_output_name;      // name of this item
221      astring             m_input_tag;        // input tag of this item
222      ioport_value        m_input_mask;       // input mask of this item
223      screen_device *     m_screen;           // pointer to screen
224      int                 m_orientation;      // orientation of this item
225      render_bounds       m_bounds;           // bounds of the item
226      render_bounds       m_rawbounds;        // raw (original) bounds of the item
227      render_color        m_color;            // color of the item
228   };
216    private:
217        // internal state
218        item *              m_next;             // link to next item
219        layout_element *    m_element;          // pointer to the associated element (non-screens only)
220        astring             m_output_name;      // name of this item
221        astring             m_input_tag;        // input tag of this item
222        ioport_value        m_input_mask;       // input mask of this item
223        screen_device *     m_screen;           // pointer to screen
224        int                 m_orientation;      // orientation of this item
225        render_bounds       m_bounds;           // bounds of the item
226        render_bounds       m_rawbounds;        // raw (original) bounds of the item
227        render_color        m_color;            // color of the item
228    };
229229
230   // construction/destruction
231   layout_view(running_machine &machine, xml_data_node &viewnode, simple_list<layout_element> &elemlist);
232   virtual ~layout_view();
230    // construction/destruction
231    layout_view(running_machine &machine, xml_data_node &viewnode, simple_list<layout_element> &elemlist);
232    virtual ~layout_view();
233233
234   // getters
235   layout_view *next() const { return m_next; }
236   item *first_item(item_layer layer) const;
237   const char *name() const { return m_name; }
238   const render_screen_list &screens() const { return m_screens; }
239   bool layer_enabled(item_layer layer) const { return m_layenabled[layer]; }
234    // getters
235    layout_view *next() const { return m_next; }
236    item *first_item(item_layer layer) const;
237    const char *name() const { return m_name; }
238    const render_screen_list &screens() const { return m_screens; }
239    bool layer_enabled(item_layer layer) const { return m_layenabled[layer]; }
240240
241   //
242   bool has_art() const { return (m_backdrop_list.count() + m_overlay_list.count() + m_bezel_list.count() + m_cpanel_list.count() + m_marquee_list.count() != 0); }
243   float effective_aspect(render_layer_config config) const { return (config.zoom_to_screen() && m_screens.count() != 0) ? m_scraspect : m_aspect; }
241    //
242    bool has_art() const { return (m_backdrop_list.count() + m_overlay_list.count() + m_bezel_list.count() + m_cpanel_list.count() + m_marquee_list.count() != 0); }
243    float effective_aspect(render_layer_config config) const { return (config.zoom_to_screen() && m_screens.count() != 0) ? m_scraspect : m_aspect; }
244244
245   // operations
246   void recompute(render_layer_config layerconfig);
245    // operations
246    void recompute(render_layer_config layerconfig);
247247
248248private:
249   // internal state
250   layout_view *       m_next;             // pointer to next layout in the list
251   astring             m_name;             // name of the layout
252   float               m_aspect;           // X/Y of the layout
253   float               m_scraspect;        // X/Y of the screen areas
254   render_screen_list  m_screens;          // list of active screens
255   render_bounds       m_bounds;           // computed bounds of the view
256   render_bounds       m_scrbounds;        // computed bounds of the screens within the view
257   render_bounds       m_expbounds;        // explicit bounds of the view
258   bool                m_layenabled[ITEM_LAYER_MAX]; // is this layer enabled?
259   simple_list<item>   m_backdrop_list;    // list of backdrop items
260   simple_list<item>   m_screen_list;      // list of screen items
261   simple_list<item>   m_overlay_list;     // list of overlay items
262   simple_list<item>   m_bezel_list;       // list of bezel items
263   simple_list<item>   m_cpanel_list;      // list of marquee items
264   simple_list<item>   m_marquee_list;     // list of marquee items
249    // internal state
250    layout_view *       m_next;             // pointer to next layout in the list
251    astring             m_name;             // name of the layout
252    float               m_aspect;           // X/Y of the layout
253    float               m_scraspect;        // X/Y of the screen areas
254    render_screen_list  m_screens;          // list of active screens
255    render_bounds       m_bounds;           // computed bounds of the view
256    render_bounds       m_scrbounds;        // computed bounds of the screens within the view
257    render_bounds       m_expbounds;        // explicit bounds of the view
258    bool                m_layenabled[ITEM_LAYER_MAX]; // is this layer enabled?
259    simple_list<item>   m_backdrop_list;    // list of backdrop items
260    simple_list<item>   m_screen_list;      // list of screen items
261    simple_list<item>   m_overlay_list;     // list of overlay items
262    simple_list<item>   m_bezel_list;       // list of bezel items
263    simple_list<item>   m_cpanel_list;      // list of marquee items
264    simple_list<item>   m_marquee_list;     // list of marquee items
265265};
266266
267267
r242703r242704
270270// a layout_file consists of a list of elements and a list of views
271271class layout_file
272272{
273   friend class simple_list<layout_file>;
273    friend class simple_list<layout_file>;
274274
275275public:
276   // construction/destruction
277   layout_file(running_machine &machine, xml_data_node &rootnode, const char *dirname);
278   virtual ~layout_file();
276    // construction/destruction
277    layout_file(running_machine &machine, xml_data_node &rootnode, const char *dirname);
278    virtual ~layout_file();
279279
280   // getters
281   layout_file *next() const { return m_next; }
282   layout_element *first_element() const { return m_elemlist.first(); }
283   layout_view *first_view() const { return m_viewlist.first(); }
280    // getters
281    layout_file *next() const { return m_next; }
282    layout_element *first_element() const { return m_elemlist.first(); }
283    layout_view *first_view() const { return m_viewlist.first(); }
284284
285285private:
286   // internal state
287   layout_file *       m_next;             // pointer to the next file in the list
288   simple_list<layout_element> m_elemlist; // list of shared layout elements
289   simple_list<layout_view> m_viewlist;    // list of views
286    // internal state
287    layout_file *       m_next;             // pointer to the next file in the list
288    simple_list<layout_element> m_elemlist; // list of shared layout elements
289    simple_list<layout_view> m_viewlist;    // list of views
290290};
291291
292292
trunk/src/emu/sound/pokey.c
r242703r242704
10551055
10561056}
10571057
1058WRITE_LINE_MEMBER( pokey_device::sid_w )
1059{
1060   if (state)
1061   {
1062      m_SKSTAT |= SK_SERIN;
1063   }
1064   else
1065   {
1066      m_SKSTAT &= ~SK_SERIN;
1067   }
1068}
1069
10701058void pokey_device::serin_ready(int after)
10711059{
10721060   timer_set(m_clock_period * after, 5, 0);
trunk/src/emu/sound/pokey.h
r242703r242704
234234   UINT8 read(offs_t offset);
235235   void  write(offs_t offset, UINT8 data);
236236
237   DECLARE_WRITE_LINE_MEMBER( sid_w ); // pin 24
238237   void serin_ready(int after);
239238
240239   // analog output configuration
trunk/src/emu/sound/tms5110.c
r242703r242704
963963   /* initialize the chip state */
964964   m_speaking_now = m_talk_status = 0;
965965   m_CTL_pins = 0;
966   m_RNG = 0x1fff;
966      m_RNG = 0x1fff;
967967   m_CTL_buffer = 0;
968   m_PDC = 0;
969968
970969   /* initialize the energy/pitch/k states */
971970   m_old_energy = m_new_energy = m_current_energy = m_target_energy = 0;
r242703r242704
10561055   else if (m_state == CTL_STATE_OUTPUT)
10571056   {
10581057      if (DEBUG_5110) logerror("Status read while outputting buffer (buffer=%2d)\n", m_CTL_buffer);
1059      return (m_CTL_buffer);
1058      return (m_CTL_buffer);
10601059   }
10611060   else // we're reading with the bus in input mode! just return the last thing written to the bus
10621061   {
r242703r242704
11501149/******************************************************************************
11511150
11521151     tms5110_set_frequency -- adjusts the playback frequency
1153     TODO: kill this function; we should be adjusting the tms51xx device clock itself,
1154     not setting it here!
1152    TODO: kill this function; we should be adjusting the tms51xx device clock itself,
1153    not setting it here!
11551154
11561155******************************************************************************/
11571156
trunk/src/emu/video/315_5124.c
r242703r242704
14201420         }
14211421         while (++x < 208);
14221422      }
1423
1423     
14241424      /* border on right side of the GG active screen */
14251425      do
14261426      {
trunk/src/emu/video/snes_ppu.c
r242703r242704
18101810 * the optimized averaging algorithm.
18111811 *********************************************/
18121812
1813void snes_ppu_device::refresh_scanline( bitmap_rgb32 &bitmap, UINT16 curline )
1813void snes_ppu_device::refresh_scanline( running_machine &machine, bitmap_rgb32 &bitmap, UINT16 curline )
18141814{
18151815   UINT16 ii;
18161816   int x;
r242703r242704
18181818   struct SNES_SCANLINE *scanline1, *scanline2;
18191819   UINT16 c;
18201820   UINT16 prev_colour = 0;
1821   int blurring = machine().root_device().ioport("OPTIONS")->read_safe(0) & 0x01;
1821   int blurring = machine.root_device().ioport("OPTIONS")->read_safe(0) & 0x01;
18221822
18231823   g_profiler.start(PROFILER_VIDEO);
18241824
r242703r242704
18661866      update_obsel();
18671867
18681868#if SNES_LAYER_DEBUG
1869      if (dbg_video(curline))
1869      if (dbg_video(machine, curline))
18701870      {
18711871         g_profiler.stop();
18721872         return;
r242703r242704
19781978static const UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
19791979
19801980// utility function - latches the H/V counters.  Used by IRQ, writes to WRIO, etc.
1981void snes_ppu_device::latch_counters()
1981void snes_ppu_device::latch_counters( running_machine &machine )
19821982{
1983   m_beam.current_horz = m_screen->hpos() / m_htmult;
1984   m_beam.latch_vert = m_screen->vpos();
1983   m_beam.current_horz = machine.first_screen()->hpos() / m_htmult;
1984   m_beam.latch_vert = machine.first_screen()->vpos();
19851985   m_beam.latch_horz = m_beam.current_horz;
19861986   m_stat78 |= 0x40;   // indicate we latched
19871987//  m_read_ophct = m_read_opvct = 0;    // clear read flags - 2009-08: I think we must clear these when STAT78 is read...
r242703r242704
19891989//  printf("latched @ H %d V %d\n", m_beam.latch_horz, m_beam.latch_vert);
19901990}
19911991
1992void snes_ppu_device::dynamic_res_change()
1992void snes_ppu_device::dynamic_res_change( running_machine &machine )
19931993{
1994   rectangle visarea = m_screen->visible_area();
1994   rectangle visarea = machine.first_screen()->visible_area();
19951995   attoseconds_t refresh;
19961996
19971997   visarea.min_x = visarea.min_y = 0;
r242703r242704
20082008   if ((m_stat78 & 0x10) == SNES_NTSC)
20092009   {
20102010      refresh = HZ_TO_ATTOSECONDS(DOTCLK_NTSC) * SNES_HTOTAL * SNES_VTOTAL_NTSC;
2011      m_screen->configure(SNES_HTOTAL * 2, SNES_VTOTAL_NTSC * m_interlace, visarea, refresh);
2011      machine.first_screen()->configure(SNES_HTOTAL * 2, SNES_VTOTAL_NTSC * m_interlace, visarea, refresh);
20122012   }
20132013   else
20142014   {
20152015      refresh = HZ_TO_ATTOSECONDS(DOTCLK_PAL) * SNES_HTOTAL * SNES_VTOTAL_PAL;
2016      m_screen->configure(SNES_HTOTAL * 2, SNES_VTOTAL_PAL * m_interlace, visarea, refresh);
2016      machine.first_screen()->configure(SNES_HTOTAL * 2, SNES_VTOTAL_PAL * m_interlace, visarea, refresh);
20172017   }
20182018}
20192019
r242703r242704
20332033 when interlace is active.
20342034*************************************************/
20352035
2036inline UINT32 snes_ppu_device::get_vram_address()
2036inline UINT32 snes_ppu_device::get_vram_address( running_machine &machine )
20372037{
20382038   UINT32 addr = m_vmadd;
20392039
r242703r242704
23082308            return m_ppu1_open_bus;
23092309         }
23102310      case SLHV:      /* Software latch for H/V counter */
2311         latch_counters();
2311         latch_counters(space.machine());
23122312         return m_openbus_cb(space, 0);       /* Return value is meaningless */
23132313
23142314      case ROAMDATA:  /* Read data from OAM (DR) */
r242703r242704
23232323         return m_ppu1_open_bus;
23242324      case RVMDATAL:  /* Read data from VRAM (low) */
23252325         {
2326            UINT32 addr = get_vram_address();
2326            UINT32 addr = get_vram_address(space.machine());
23272327            m_ppu1_open_bus = m_vram_read_buffer & 0xff;
23282328
23292329            if (!m_vram_fgr_high)
r242703r242704
23382338         }
23392339      case RVMDATAH:  /* Read data from VRAM (high) */
23402340         {
2341            UINT32 addr = get_vram_address();
2341            UINT32 addr = get_vram_address(space.machine());
23422342            m_ppu1_open_bus = (m_vram_read_buffer >> 8) & 0xff;
23432343
23442344            if (m_vram_fgr_high)
r242703r242704
24692469         return;
24702470      case BGMODE:    /* BG mode and character size settings */
24712471         m_mode = data & 0x07;
2472         dynamic_res_change();
2472         dynamic_res_change(space.machine());
24732473         m_bg3_priority_bit = BIT(data, 3);
24742474         m_layer[SNES_BG1].tile_size = BIT(data, 4);
24752475         m_layer[SNES_BG2].tile_size = BIT(data, 5);
r242703r242704
25712571         {
25722572            UINT32 addr;
25732573            m_vmadd = (m_vmadd & 0xff00) | (data << 0);
2574            addr = get_vram_address();
2574            addr = get_vram_address(space.machine());
25752575            m_vram_read_buffer = vram_read(space, addr);
25762576            m_vram_read_buffer |= (vram_read(space, addr + 1) << 8);
25772577         }
r242703r242704
25802580         {
25812581            UINT32 addr;
25822582            m_vmadd = (m_vmadd & 0x00ff) | (data << 8);
2583            addr = get_vram_address();
2583            addr = get_vram_address(space.machine());
25842584            m_vram_read_buffer = vram_read(space, addr);
25852585            m_vram_read_buffer |= (vram_read(space, addr + 1) << 8);
25862586         }
25872587         break;
25882588      case VMDATAL:   /* 2118: Data for VRAM write (low) */
25892589         {
2590            UINT32 addr = get_vram_address();
2590            UINT32 addr = get_vram_address(space.machine());
25912591            vram_write(space, addr, data);
25922592
25932593            if (!m_vram_fgr_high)
r242703r242704
25962596         return;
25972597      case VMDATAH:   /* 2119: Data for VRAM write (high) */
25982598         {
2599            UINT32 addr = get_vram_address();
2599            UINT32 addr = get_vram_address(space.machine());
26002600            vram_write(space, addr + 1, data);
26012601
26022602            if (m_vram_fgr_high)
r242703r242704
28002800         m_beam.last_visible_line = (data & 0x04) ? 240 : 225;
28012801         m_pseudo_hires = BIT(data, 3);
28022802         m_mode7.extbg = BIT(data, 6);
2803         dynamic_res_change();
2803         dynamic_res_change(space.machine());
28042804#ifdef SNES_DBG_REG_W
28052805         if ((data & 0x8) != (PPU_REG(SETINI) & 0x8))
28062806            osd_printf_debug("Pseudo 512 mode: %s\n", (data & 0x8) ? "on" : "off");
r242703r242704
28272827      popmessage MSG2;                          \
28282828   }
28292829
2830UINT8 snes_ppu_device::dbg_video( UINT16 curline )
2830UINT8 snes_ppu_device::dbg_video( running_machine &machine, UINT16 curline )
28312831{
28322832   int i;
2833   UINT8 toggles = machine().root_device().ioport("DEBUG1")->read_safe(0);
2833   UINT8 toggles = machine.root_device().ioport("DEBUG1")->read_safe(0);
28342834   m_debug_options.select_pri[SNES_BG1] = (toggles & 0x03);
28352835   m_debug_options.select_pri[SNES_BG2] = (toggles & 0x0c) >> 2;
28362836   m_debug_options.select_pri[SNES_BG3] = (toggles & 0x30) >> 4;
28372837   m_debug_options.select_pri[SNES_BG4] = (toggles & 0xc0) >> 6;
28382838
2839   toggles = machine().root_device().ioport("DEBUG2")->read_safe(0);
2839   toggles = machine.root_device().ioport("DEBUG2")->read_safe(0);
28402840   for (i = 0; i < 4; i++)
28412841      DEBUG_TOGGLE(i, m_debug_options.bg_disabled[i], ("Debug: Disabled BG%d.\n", i + 1), ("Debug: Enabled BG%d.\n", i + 1))
28422842   DEBUG_TOGGLE(4, m_debug_options.bg_disabled[SNES_OAM], ("Debug: Disabled OAM.\n"), ("Debug: Enabled OAM.\n"))
r242703r242704
28442844   DEBUG_TOGGLE(6, m_debug_options.colormath_disabled, ("Debug: Disabled Color Math.\n"), ("Debug: Enabled Color Math.\n"))
28452845   DEBUG_TOGGLE(7, m_debug_options.windows_disabled, ("Debug: Disabled Window Masks.\n"), ("Debug: Enabled Window Masks.\n"))
28462846
2847   toggles = machine().root_device().ioport("DEBUG4")->read_safe(0);
2847   toggles = machine.root_device().ioport("DEBUG4")->read_safe(0);
28482848   for (i = 0; i < 8; i++)
28492849      DEBUG_TOGGLE(i, m_debug_options.mode_disabled[i], ("Debug: Disabled Mode %d drawing.\n", i), ("Debug: Enabled Mode %d drawing.\n", i))
28502850
2851   toggles = machine().root_device().ioport("DEBUG3")->read_safe(0);
2851   toggles = machine.root_device().ioport("DEBUG3")->read_safe(0);
28522852   DEBUG_TOGGLE(2, m_debug_options.mosaic_disabled, ("Debug: Disabled Mosaic.\n"), ("Debug: Enabled Mosaic.\n"))
28532853   m_debug_options.sprite_reversed = BIT(toggles, 7);
28542854   m_debug_options.select_pri[SNES_OAM] = (toggles & 0x70) >> 4;
trunk/src/emu/video/snes_ppu.h
r242703r242704
248248   void update_windowmasks(void);
249249   void update_offsets(void);
250250   inline void draw_blend(UINT16 offset, UINT16 *colour, UINT8 prevent_color_math, UINT8 black_pen_clip, int switch_screens);
251   void refresh_scanline(bitmap_rgb32 &bitmap, UINT16 curline);
251   void refresh_scanline(running_machine &machine, bitmap_rgb32 &bitmap, UINT16 curline);
252252
253   void latch_counters();
254   void dynamic_res_change();
255   inline UINT32 get_vram_address();
256   UINT8 dbg_video(UINT16 curline);
253   void latch_counters(running_machine &machine);
254   void dynamic_res_change(running_machine &machine);
255   inline UINT32 get_vram_address(running_machine &machine);
256   UINT8 dbg_video(running_machine &machine, UINT16 curline);
257257
258258   UINT8 read(address_space &space, UINT32 offset, UINT8 wrio_bit7);
259259   void write(address_space &space, UINT32 offset, UINT8 data);
trunk/src/emu/video/stvvdp2.c
r242703r242704
57255725         m_vdp2_regs[offset] = (STV_VDP2_VRAMSZ << 15) |
57265726                                 ((0 << 0) & 0xf); // VDP2 version
57275727
5728         /* Games basically r/w the entire VDP2 register area when this is tripped. (example: Silhouette Mirage)
5728         /* Games basically r/w the entire VDP2 register area when this is tripped. (example: Silhouette Mirage)
57295729            Disable log for the time being. */
57305730         //if(!space.debugger_access())
5731         //  printf("Warning: VDP2 version read\n");
5731         //   printf("Warning: VDP2 version read\n");
57325732         break;
57335733      }
57345734
trunk/src/emu/video/tea1002.c
r242703r242704
1/***************************************************************************
2
3    TEA1002
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    PAL colour encoder and video summer
9
10***************************************************************************/
11
12#include "tea1002.h"
13
14
15//**************************************************************************
16//  CONSTANTS
17//**************************************************************************
18
19const float tea1002_device::m_luminance[] =
20{
21      0, 22.5, 44, 66.5,  8.5, 31, 52.5, 100, // INV = 0
22   75, 52.5, 31,  8.5, 66.5, 44, 22.5, 0    // INV = 1
23};
24
25const int tea1002_device::m_phase[] =
26{
27   0, 103, 241, 167, 347,  61, 283, 0, // INV = 0
28   0, 283,  61, 347, 167, 241, 103, 0  // INV = 1
29};
30
31const int tea1002_device::m_amplitute[] =
32{
33   0, 48, 44, 33, 33, 44, 48, 0, // INV = 0
34   0, 24, 22, 17, 17, 22, 24, 0  // INV = 1
35};
36
37
38//**************************************************************************
39//  DEVICE DEFINITIONS
40//**************************************************************************
41
42const device_type TEA1002 = &device_creator<tea1002_device>;
43
44
45//**************************************************************************
46//  LIVE DEVICE
47//**************************************************************************
48
49//-------------------------------------------------
50//  paula_device - constructor
51//-------------------------------------------------
52
53tea1002_device::tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
54   device_t(mconfig, TEA1002, "TEA1002 PAL colour encoder", tag, owner, clock, "tea1002", __FILE__)
55{
56}
57
58//-------------------------------------------------
59//  device_start - device-specific startup
60//-------------------------------------------------
61
62void tea1002_device::device_start()
63{
64}
65
66
67//**************************************************************************
68//  IMPLEMENTATION
69//**************************************************************************
70
71// this could be done in device_start() and cached, but it's only
72// accessed once at PALETTE_INIT anyway
73rgb_t tea1002_device::color(int index)
74{
75   // calculate yuv
76   double y = m_luminance[index] / 100;
77   double u = cos((m_phase[index] + m_tint) * M_PI / 180) * m_amplitute[index] / 100;
78   double v = sin((m_phase[index] + m_tint) * M_PI / 180) * m_amplitute[index] / 100;
79
80   // and convert to rgb
81   double r = y + v * 1.14;
82   double g = y - u * 0.395 - v * 0.581;
83   double b = y + u * 2.032;
84
85   return rgb_t(rgb_t::clamp(r * 255), rgb_t::clamp(g * 255), rgb_t::clamp(b * 255));
86}
trunk/src/emu/video/tea1002.h
r242703r242704
1/***************************************************************************
2
3    TEA1002
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    PAL colour encoder and video summer
9
10                            _____   _____
11                   INV   1 |*    \_/     | 18  CBLNK
12                     R   2 |             | 17  3,54 MHz
13                     G   3 |             | 16  GND
14                     B   4 |             | 15  CBF
15                _CSYNC   5 |   TEA1002   | 14  8,86 MHz
16       lum. delay line   6 |             | 13  8,86 MHz
17       lum. delay line   7 |             | 12  PAL switch
18   comp. video to mod.   8 |             | 11  chroma band limiting
19 d.c. adj. / colour bar  9 |_____________| 10  Vp
20
21***************************************************************************/
22
23#pragma once
24
25#ifndef __TEA1002_H__
26#define __TEA1002_H__
27
28#include "emu.h"
29
30
31//**************************************************************************
32//  INTERFACE CONFIGURATION MACROS
33//**************************************************************************
34
35#define MCFG_TEA1002_ADD(_tag, _clock) \
36   MCFG_DEVICE_ADD(_tag, TEA1002, _clock)
37
38
39//**************************************************************************
40//  TYPE DEFINITIONS
41//**************************************************************************
42
43// ======================> tea1002_device
44
45class tea1002_device : public device_t
46{
47public:
48   // construction/destruction
49   tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
50
51   rgb_t color(int index);
52
53protected:
54   // device_t overrides
55   virtual void device_start();
56
57private:
58   static const int m_tint = -6; // what is this based on?
59   static const float m_luminance[16];
60   static const int m_phase[16];
61   static const int m_amplitute[16];
62};
63
64// device type definition
65extern const device_type TEA1002;
66
67#endif // __TEA1002_H__
trunk/src/emu/video/video.mak
r242703r242704
483483
484484#-------------------------------------------------
485485#
486#@src/emu/video/tea1002.h,VIDEOS += TEA1002
487#-------------------------------------------------
488
489ifneq ($(filter TEA1002,$(VIDEOS)),)
490VIDEOOBJS += $(VIDEOOBJ)/tea1002.o
491endif
492
493#-------------------------------------------------
494#
495486#@src/emu/video/tlc34076.h,VIDEOS += TLC34076
496487#-------------------------------------------------
497488
trunk/src/lib/formats/ap2_dsk.c
r242703r242704
15501550
15511551bool a2_edd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
15521552{
1553   UINT8 *img;
1553   UINT8 img[2244608];
15541554   UINT8 nibble[16384], stream[16384];
15551555   int npos[16384];
1556
1557   img = (UINT8 *) malloc(2244608);
1558
1559   if (!img)
1560   {
1561      return false;
1562   }
1563
15641556   io_generic_read(io, img, 0, 2244608);
15651557
15661558   for(int i=0; i<137; i++) {
r242703r242704
16281620      generate_track_from_bitstream(i >> 2, 0, stream, len, image, i & 3);
16291621      image->set_write_splice_position(i >> 2, 0, UINT32(U64(200000000)*splice/len), i & 3);
16301622   }
1631   free(img);
16321623   return true;
16331624}
16341625
trunk/src/lib/formats/ap_dsk35.c
r242703r242704
11861186LEGACY_FLOPPY_OPTIONS_END
11871187
11881188LEGACY_FLOPPY_OPTIONS_START( apple35_iigs )
1189   LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image,po", "Apple raw 3.5\" disk image",   apple35_raw_identify,       apple35_raw_construct, NULL,
1189   LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image", "Apple raw 3.5\" disk image",   apple35_raw_identify,       apple35_raw_construct, NULL,
11901190      HEADS([1]-2)
11911191      TRACKS([80])
11921192      SECTOR_LENGTH([512])
trunk/src/lib/formats/coco_cas.c
r242703r242704
3131
3232**************************************************************************/
3333
34#include "coco_cas.h"
3435#include "emu.h"
35#include "coco_cas.h"
3636
3737#define COCO_WAVESAMPLES_HEADER     (1.0)
3838#define COCO_WAVESAMPLES_TRAILER    (1.0)
trunk/src/lib/formats/cpis_dsk.c
r242703r242704
88
99#include <string.h>
1010
11#include "emu.h"
1211#include "formats/cpis_dsk.h"
1312#include "formats/basicdsk.h"
1413
trunk/src/lib/formats/d88_dsk.c
r242703r242704
2727 *
2828 */
2929
30#include "emu.h"
3130#include "flopimg.h"
3231#include "imageutl.h"
3332
trunk/src/lib/formats/dcp_dsk.c
r242703r242704
77    PC98 DCP & DCU disk images
88
99    0xA2 header, followed by track data
10    header[0] - disk format
10   header[0] - disk format
1111    header[1-0xA1] - track map (1=track used, 0=track unused/unformatted)
12    header[0xA2] - all tracks used?
12    header[0xA2] - all tracks used?
1313                   (there seems to be a diff in its usage between DCP and DCU)
1414
15    TODO:
15    TODO:
1616     - add support for track map. images available for tests were all
1717       of type 0x01, with all 154 tracks present. combined with pete_j
1818       reporting some images have faulty track map, we need some more
1919       test cases to properly handle these disks!
20
20
2121*********************************************************************/
2222
2323#include "emu.h"
r242703r242704
5252   io_generic_read(io, h, 0, 0xa2);
5353
5454   // First byte is the disk format (see below in load() for details)
55   switch (h[0])
55   switch (h[0])
5656   {
5757      case 0x01:
5858      default:
r242703r242704
9999      if (h[i])
100100         count_tracks++;
101101
102   // in theory track map should be enough (former check), but some images have it wrong!
102   // in theory track map should be enough (former check), but some images have it wrong!
103103   // hence, if this check fails, we also allow for images with all tracks and wrong track map
104104   if (size - 0xa2 == (heads * count_tracks * spt * bps) || size - 0xa2 == (heads * tracks * spt * bps))
105105      return 100;
r242703r242704
107107   // for disk type 0x11 the head 0 track 0 has 26 sectors of half width, so we need to compensate calculation
108108   if (is_hdb && (size - 0xa2 + (0x80 * 26) == (heads * count_tracks * spt * bps) || size - 0xa2 + (0x80 * 26) == (heads * tracks * spt * bps)))
109109      return 100;
110
110   
111111   return 0;
112112}
113113
r242703r242704
116116   UINT8 h[0xa2];
117117   int heads, tracks, spt, bps;
118118   bool is_hdb = false;
119
119   
120120   io_generic_read(io, h, 0, 0xa2);
121
121   
122122   // First byte is the disk format:
123   switch (h[0])
123   switch (h[0])
124124   {
125125      case 0x01:
126126      default:
r242703r242704
212212   if (!is_hdb)
213213   {
214214      for (int track = 0; track < tracks; track++)
215         for (int head = 0; head < heads; head++)
215         for (int head = 0; head < heads; head++)
216216         {
217217            io_generic_read(io, sect_data, 0xa2 + bps * spt * (track * heads + head), bps * spt);
218
219            for (int i = 0; i < spt; i++)
218           
219            for (int i = 0; i < spt; i++)
220220            {
221221               sects[i].track       = track;
222222               sects[i].head        = head;
r242703r242704
227227               sects[i].bad_crc     = false;
228228               sects[i].data        = sect_data + i * bps;
229229            }
230
230           
231231            build_pc_track_mfm(track, head, image, cell_count, spt, sects, calc_default_pc_gap3_size(form_factor, bps));
232232         }
233233   }
234   else    // FIXME: the code below is untested, because no image was found... there might be some silly mistake in the disk geometry!
234   else   // FIXME: the code below is untested, because no image was found... there might be some silly mistake in the disk geometry!
235235   {
236236      // Read Head 0 Track 0 is FM with 26 sectors of 128bytes instead of 256
237237      io_generic_read(io, sect_data, 0xa2, 128 * spt);
238
239      for (int i = 0; i < spt; i++)
238     
239      for (int i = 0; i < spt; i++)
240240      {
241241         sects[i].track       = 0;
242242         sects[i].head        = 0;
r242703r242704
247247         sects[i].bad_crc     = false;
248248         sects[i].data        = sect_data + i * 128;
249249      }
250
250     
251251      build_pc_track_fm(0, 0, image, cell_count, spt, sects, calc_default_pc_gap3_size(form_factor, 128));
252
252     
253253      // Read Head 1 Track 0 is MFM with 26 sectors of 256bytes
254254      io_generic_read(io, sect_data, 0xa2 + 128 * spt, bps * spt);
255
256      for (int i = 0; i < spt; i++)
255     
256      for (int i = 0; i < spt; i++)
257257      {
258258         sects[i].track       = 0;
259259         sects[i].head        = 1;
r242703r242704
264264         sects[i].bad_crc     = false;
265265         sects[i].data        = sect_data + i * bps;
266266      }
267
267     
268268      build_pc_track_mfm(0, 1, image, cell_count, spt, sects, calc_default_pc_gap3_size(form_factor, bps));
269
269     
270270      // Read other tracks as usual
271271      UINT32 data_offs = 0xa2 + (26 * 0x80) + (26 * 0x100);
272272      for (int track = 1; track < tracks; track++)
273         for (int head = 0; head < heads; head++)
273         for (int head = 0; head < heads; head++)
274274         {
275275            io_generic_read(io, sect_data, data_offs + bps * spt * ((track - 1) * heads + head), bps * spt);
276
277            for (int i = 0; i < spt; i++)
276           
277            for (int i = 0; i < spt; i++)
278278            {
279279               sects[i].track       = track;
280280               sects[i].head        = head;
r242703r242704
285285               sects[i].bad_crc     = false;
286286               sects[i].data        = sect_data + i * bps;
287287            }
288
288           
289289            build_pc_track_mfm(track, head, image, cell_count, spt, sects, calc_default_pc_gap3_size(form_factor, bps));
290290         }
291291   }
292
292   
293293   return true;
294294}
295295
trunk/src/lib/formats/dim_dsk.c
r242703r242704
88
99#include <string.h>
1010
11#include "emu.h"
1211#include "dim_dsk.h"
1312#include "basicdsk.h"
1413
trunk/src/lib/formats/dip_dsk.c
r242703r242704
55    formats/dip_dsk.h
66
77    PC98 DIP disk images
8
8
99    0x100 header, followed by track data
1010
1111    TODO:
12    - Investigate header structure
12    - Investigate header structure
1313    - can this format be used to support different disc types?
1414
1515*********************************************************************/
r242703r242704
5656   tracks = 77;
5757   spt = 8;
5858   bps = 1024;
59
59   
6060   int cell_count = form_factor == floppy_image::FF_35 ? 200000 : 166666;
61
61   
6262   int ssize;
6363   for (ssize = 0; (128 << ssize) < bps; ssize++);
64
64   
6565   desc_pc_sector sects[256];
6666   UINT8 sect_data[65536];
67
67   
6868   for (int track = 0; track < tracks; track++)
69      for (int head = 0; head < heads; head++)
69      for (int head = 0; head < heads; head++)
7070      {
7171         io_generic_read(io, sect_data, 0x100 + bps * spt * (track * heads + head), bps * spt);
72
73         for (int i = 0; i < spt; i++)
72         
73         for (int i = 0; i < spt; i++)
7474         {
7575            sects[i].track       = track;
7676            sects[i].head        = head;
r242703r242704
8181            sects[i].bad_crc     = false;
8282            sects[i].data        = sect_data + i * bps;
8383         }
84
84         
8585         build_pc_track_mfm(track, head, image, cell_count, spt, sects, calc_default_pc_gap3_size(form_factor, bps));
8686      }
8787
trunk/src/lib/formats/dsk_dsk.c
r242703r242704
88
99#include <string.h>
1010
11#include "emu.h"
1211#include "imageutl.h"
1312#include "flopimg.h"
1413
trunk/src/lib/formats/fdd_dsk.c
r242703r242704
55    formats/fdd_dsk.h
66
77    PC98 FDD disk images
8
8
99    0xC3FC header, followed by track data
1010    Sector map starts at offset 0xDC, with 12bytes for each sector
1111
r242703r242704
1515    - 0x2 = sector number
1616    - 0x3 = sector size (128 << this byte)
1717    - 0x4 = fill byte. if it's not 0xff, then this sector in the original
18            disk consisted of this single value repeated for the whole
19            sector size, and the sector is skipped in the .fdd file.
20            if it's 0xff, then this sector is wholly contained in the .fdd
18            disk consisted of this single value repeated for the whole
19            sector size, and the sector is skipped in the .fdd file.
20            if it's 0xff, then this sector is wholly contained in the .fdd
2121            file
2222    - 0x5 = ??
2323    - 0x6 = ??
2424    - 0x7 = ??
2525    - 0x8-0x0b = absolute offset of the data for this sector, or 0xfffffff
26                 if the sector was skipped in the .fdd (and it has to be
26                 if the sector was skipped in the .fdd (and it has to be
2727                 filled with the value at 0x4)
2828
2929 TODO:
r242703r242704
5555
5656int fdd_format::identify(io_generic *io, UINT32 form_factor)
5757{
58   UINT8 h[7];
58   UINT8 h[7];   
5959   io_generic_read(io, h, 0, 7);
60
60   
6161   if (strncmp((const char *)h, "VFD1.0", 6) == 0)
6262      return 100;
63
63   
6464   return 0;
6565}
6666
6767bool fdd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
6868{
69   UINT8 hsec[0x0c];
70
69   UINT8 hsec[0x0c];   
70   
7171   // sector map
7272   UINT8 num_secs[160];
7373   UINT8 tracks[160 * 26];
r242703r242704
7676   UINT8 fill_vals[160 * 26];
7777   UINT32 sec_offs[160 * 26];
7878   UINT8 sec_sizes[160 * 26];
79
79   
8080   int pos = 0xdc;
81
81   
8282   for (int track = 0; track < 160; track++)
8383   {
8484      int curr_num_sec = 0, curr_track_size = 0;
r242703r242704
8787         // read sector map for this sector
8888         io_generic_read(io, hsec, pos, 0x0c);
8989         pos += 0x0c;
90
91         if (hsec[0] == 0xff)    // unformatted/unused sector
90         
91         if (hsec[0] == 0xff)   // unformatted/unused sector
9292            continue;
93
93         
9494         tracks[(track * 26) + sect] = hsec[0];
9595         heads[(track * 26) + sect] = hsec[1];
9696         secs[(track * 26) + sect] = hsec[2];
r242703r242704
110110   int cur_sec_map = 0, sector_size;
111111
112112   for (int track = 0; track < 160; track++)
113   {
113   {     
114114      int cur_pos = 0;
115      for (int i = 0; i < num_secs[track]; i++)
115      for (int i = 0; i < num_secs[track]; i++)
116116      {
117117         cur_sec_map = track * 26 + i;
118118         sector_size = 128 << sec_sizes[cur_sec_map];
r242703r242704
121121            memset(sect_data + cur_pos, fill_vals[cur_sec_map], sector_size);
122122         else
123123            io_generic_read(io, sect_data + cur_pos, sec_offs[cur_sec_map], sector_size);
124
124         
125125         sects[i].track       = tracks[cur_sec_map];
126126         sects[i].head        = heads[cur_sec_map];
127127         sects[i].sector      = secs[cur_sec_map];
r242703r242704
135135
136136      build_pc_track_mfm(track / 2, track % 2, image, cell_count, num_secs[track], sects, calc_default_pc_gap3_size(form_factor, (128 << sec_sizes[track * 26])));
137137   }
138
138   
139139   return true;
140140}
141141
trunk/src/lib/formats/imd_dsk.c
r242703r242704
77*********************************************************************/
88
99#include <string.h>
10#include "emu.h"
1110#include "flopimg.h"
1211
1312struct imddsk_tag
trunk/src/lib/formats/m20_dsk.c
r242703r242704
1414
1515#include <string.h>
1616
17#include "emu.h"
1817#include "m20_dsk.h"
1918#include "basicdsk.h"
2019
trunk/src/lib/formats/nfd_dsk.c
r242703r242704
3030    0xA     = PDA (disk type)
3131    0xB-0xF = reserved and equal to 0x00 (possibly available for future format extensions?)
3232
33
34    Revision 1
33 
34   Revision 1
3535    ==========
36
36
3737    header structure (variable length > 0x120, header length = DWORD at 0x110)
3838    0x000-0x11F = same as Rev. 0 format
39    0x120-0x3AF = 164 DWORDs containing, for each track, the absolute position of the sector maps
39   0x120-0x3AF = 164 DWORDs containing, for each track, the absolute position of the sector maps
4040                  for sectors of the track. for unformatted/unused tracks 0 is used
4141    0x3B0-0x3B3 = absolute position of addintional info in the header, if any
4242    0x3B4-0x3BF = reserved
43    0x120-EOHeader = sector map + special data for each track:
43    0x120-EOHeader = sector map + special data for each track:
4444                     first 0x10 of each track = #sectors (WORD), #extra data (WORD), reserved 0xc bytes zeroed
4545                     then 0x10 for each sector of this track and 0x10 for each extra data chunk
4646
4747    sector map structure
48    0x0     = track number
48   0x0     = track number
4949    0x1     = head
5050    0x2     = sector number
5151    0x3     = sector size (in 128byte chunks)
r242703r242704
7474    - add support for DDAM in Rev. 0 (need an image which set it in some sector)
7575    - investigate the READ DATA bytes of sector headers
7676    - investigate RETRY DATA chunks
77
77
7878 *********************************************************************/
7979
8080#include "emu.h"
r242703r242704
101101
102102int nfd_format::identify(io_generic *io, UINT32 form_factor)
103103{
104   UINT8 h[16];
104   UINT8 h[16];   
105105   io_generic_read(io, h, 0, 16);
106
106   
107107   if (strncmp((const char *)h, "T98FDDIMAGE.R0", 14) == 0 || strncmp((const char *)h, "T98FDDIMAGE.R1", 14) == 0)
108108      return 100;
109109
r242703r242704
113113bool nfd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
114114{
115115   UINT64 size = io_generic_size(io);
116   UINT8 h[0x120], hsec[0x10];
116   UINT8 h[0x120], hsec[0x10];   
117117   io_generic_read(io, h, 0, 0x120);
118118   int format_version = !strncmp((const char *)h, "T98FDDIMAGE.R0", 14) ? 0 : 1;
119119
r242703r242704
156156            for (int sect = 0; sect < num_secs[track]; sect++)
157157            {
158158               io_generic_read(io, hsec, secmap_addr, 0x10);
159
159               
160160               if (track == 0 && sect == 0)
161                  disk_type = hsec[0xb];  // can this change across the disk? I don't think so...
161                  disk_type = hsec[0xb];   // can this change across the disk? I don't think so...
162162               secmap_addr += 0x10;
163
163               
164164               tracks[(track * 26) + sect] = hsec[0];
165165               heads[(track * 26) + sect] = hsec[1];
166166               secs[(track * 26) + sect] = hsec[2];
167167               sec_sizes[(track * 26) + sect] = hsec[3];
168168               mfm[(track * 26) + sect] = hsec[4];
169
169               
170170               curr_track_size += (128 << hsec[3]);
171171            }
172172
r242703r242704
174174            {
175175               for (int sect = 0; sect < num_specials[track]; sect++)
176176               {
177                  io_generic_read(io, hsec, secmap_addr, 0x10);
177                  io_generic_read(io, hsec, secmap_addr, 0x10);   
178178                  secmap_addr += 0x10;
179179                  curr_track_size += (hsec[9] + 1) * LITTLE_ENDIANIZE_INT32(*(UINT32 *)(hsec + 0x0a));
180180               }
r242703r242704
200200            io_generic_read(io, hsec, pos, 0x10);
201201
202202            if (track == 0 && sect == 0)
203               disk_type = hsec[0xa];  // can this change across the disk? I don't think so...
203               disk_type = hsec[0xa];   // can this change across the disk? I don't think so...
204204            pos += 0x10;
205
206            if (hsec[0] == 0xff)    // unformatted/unused sector
205           
206            if (hsec[0] == 0xff)   // unformatted/unused sector
207207               continue;
208
208           
209209            tracks[(track * 26) + sect] = hsec[0];
210210            heads[(track * 26) + sect] = hsec[1];
211211            secs[(track * 26) + sect] = hsec[2];
212212            sec_sizes[(track * 26) + sect] = hsec[3];
213213            mfm[(track * 26) + sect] = hsec[4];
214
214           
215215            curr_track_size += (128 << hsec[3]);
216216            curr_num_sec++;
217217         }
r242703r242704
226226
227227   switch (disk_type)
228228   {
229      case 0x10:  // 640K disk, 2DD
229      case 0x10:   // 640K disk, 2DD
230230         image->set_variant(floppy_image::DSDD);
231231         break;
232      //case 0x30:    // 1.44M disk, ?? (no images found)
233      //  break;
234      case 0x90:  // 1.2M disk, 2HD
232      //case 0x30:   // 1.44M disk, ?? (no images found)
233      //   break;
234      case 0x90:   // 1.2M disk, 2HD
235235      default:
236236         image->set_variant(floppy_image::DSHD);
237237         break;
r242703r242704
246246   {
247247      io_generic_read(io, sect_data, pos, track_sizes[track]);
248248
249      for (int i = 0; i < num_secs[track]; i++)
249      for (int i = 0; i < num_secs[track]; i++)
250250      {
251251         cur_sec_map = track * 26 + i;
252252         sector_size = 128 << sec_sizes[cur_sec_map];
r242703r242704
261261      }
262262      pos += track_sizes[track];
263263
264      // notice that the operation below might fail if sectors of the same track have variable sec_sizes,
264      // notice that the operation below might fail if sectors of the same track have variable sec_sizes,
265265      // because the gap3 calculation would account correctly only for the first sector...
266266      // examined images had constant sec_sizes in the each track, so probably this is not an issue
267267      if (mfm[track * 26])
r242703r242704
269269      else
270270         build_pc_track_fm(track / 2, track % 2, image, cell_count, num_secs[track], sects, calc_default_pc_gap3_size(form_factor, (128 << sec_sizes[track * 26])));
271271   }
272
272   
273273   return true;
274274}
275275
trunk/src/lib/formats/pasti_dsk.c
r242703r242704
1#include "pasti_dsk.h"
12#include "emu.h"
2#include "pasti_dsk.h"
33
44// Pasti format supported using the documentation at
55// http://www.sarnau.info/atari:pasti_file_format
trunk/src/lib/formats/victor9k_dsk.c
r242703r242704
4040    cell 2.13 usec
4141
4242
43    Boot Disc Label Format
44    Track 0 Sector 0
43   Boot Disc Label Format
44   Track 0 Sector 0
4545
46    Byte
47    Offset         Name                Description
46   Byte
47   Offset         Name                Description
4848
49    0              System disc ID      literally, ff,00h for a system
50                                       disc
49   0              System disc ID      literally, ff,00h for a system
50                                      disc
5151
52    2              Load address        paragraph   to   load   booted
53                                       program at. If zero then  boot
54                                       loads in high memory.
52   2              Load address        paragraph   to   load   booted
53                                      program at. If zero then  boot
54                                      loads in high memory.
5555
56    4              Length              paragraph count to load.
56   4              Length              paragraph count to load.
5757
58    6              Entry offset        I.P.  value  for  transfer  of
59                                       control.
58   6              Entry offset        I.P.  value  for  transfer  of
59                                      control.
6060
61    8              Entry segment       C.S.  value  for  transfer  of
62                                       control.
61   8              Entry segment       C.S.  value  for  transfer  of
62                                      control.
6363
64    10             I.D.                disc identifier.
64   10             I.D.                disc identifier.
6565
66    18             Part number         system identifier  - displayed
67                                       by early versions of boot.
66   18             Part number         system identifier  - displayed
67                                      by early versions of boot.
6868
69    26             Sector size         byte count for sectors.
69   26             Sector size         byte count for sectors.
7070
71    28             Data start          first   data  sector  on  disc
72                                       (absolute sectors).
71   28             Data start          first   data  sector  on  disc
72                                      (absolute sectors).
7373
74    30             Boot start          first   absolute   sector   of
75                                       program  for boot to  load  at
76                                       'load  address'  for  'length'
77                                       paragraphs.
74   30             Boot start          first   absolute   sector   of
75                                      program  for boot to  load  at
76                                      'load  address'  for  'length'
77                                      paragraphs.
7878
79    32             Flags               indicators:
80                                            bit  meaning
81                                           15-12 interleave    factor
82                                                 (0-15)
83                                             0   0=single sided
84                                                 1=double sided
79   32             Flags               indicators:
80                                           bit  meaning
81                                          15-12 interleave    factor
82                                                (0-15)
83                                            0   0=single sided
84                                                1=double sided
8585
86    34             Disc type           00 = CP/M
87                                       01 = MS-DOS
86   34             Disc type           00 = CP/M
87                                      01 = MS-DOS
8888
89    35             Reserved
89   35             Reserved
9090
91    38             Speed table         information  for speed control
92                                       proc.
91   38             Speed table         information  for speed control
92                                      proc.
9393
94    56             Zone table          high track for each zone.
94   56             Zone table          high track for each zone.
9595
96    71             Sector/track        sectors  per  track  for  each
97                                       zone.
96   71             Sector/track        sectors  per  track  for  each
97                                      zone.
9898*/
9999
100100#include "emu.h"
trunk/src/lib/lib.mak
r242703r242704
559559
560560$(OBJ)/libsqlite3.a: $(SQLITEOBJS)
561561
562SQLITE3_FLAGS =
563ifdef SANITIZE
564ifneq (,$(findstring thread,$(SANITIZE)))
565SQLITE3_FLAGS += -fPIC
566endif
567ifneq (,$(findstring memory,$(SANITIZE)))
568SQLITE3_FLAGS += -fPIC
569endif
570endif
571
572562ifeq ($(TARGETOS),linux)
573563LIBS += -ldl
574564endif
575565
576566$(LIBOBJ)/sqlite3/sqlite3.o: $(LIBSRC)/sqlite3/sqlite3.c | $(OSPREBUILD)
577567   @echo Compiling $<...
578   $(CC) $(CDEFS) $(CONLYFLAGS) -Wno-bad-function-cast -I$(LIBSRC)/sqlite3 $(SQLITE3_FLAGS) -c $< -o $@
568   $(CC) $(CDEFS) $(CONLYFLAGS) -Wno-bad-function-cast -I$(LIBSRC)/sqlite3 -c $< -o $@
trunk/src/lib/util/chd.c
r242703r242704
1919#include <stddef.h>
2020#include <stdlib.h>
2121#include <new>
22#include "eminline.h"
2322
2423
2524//**************************************************************************
r242703r242704
452451               compressor = CHD_CODEC_PARENT;
453452               compbytes = 0;
454453               break;
455
456            default:
457               return CHDERR_UNKNOWN_COMPRESSION;
458454         }
459455         break;
460456   }
r242703r242704
24222418
24232419      // queue the next read
24242420      for (curitem = startitem; curitem < enditem; curitem++)
2425         atomic_exchange32(&m_work_item[curitem % WORK_BUFFER_HUNKS].m_status, WS_READING);
2421         m_work_item[curitem % WORK_BUFFER_HUNKS].m_status = WS_READING;
24262422      osd_work_item_queue(m_read_queue, async_read_static, this, WORK_ITEM_FLAG_AUTO_RELEASE);
24272423      m_read_queue_offset += WORK_BUFFER_HUNKS * hunk_bytes() / 2;
24282424   }
r242703r242704
24932489      } while (0);
24942490
24952491      // reset the item and advance
2496      atomic_exchange32(&item.m_status, WS_READY);
2492      item.m_status = WS_READY;
24972493      m_write_hunk++;
24982494
24992495      // if we hit the end, finalize
r242703r242704
25062502            m_read_queue_offset = m_read_done_offset = 0;
25072503            m_write_hunk = 0;
25082504            for (int itemnum = 0; itemnum < WORK_BUFFER_HUNKS; itemnum++)
2509               atomic_exchange32(&m_work_item[itemnum].m_status, WS_READY);
2505               m_work_item[itemnum].m_status = WS_READY;
25102506         }
25112507
25122508         // wait for all reads to finish and if we're compressed, write the final SHA1 and map
r242703r242704
25592555      item.m_hash[unit].m_crc16 = crc16_creator::simple(item.m_data + unit * unit_bytes(), hunk_bytes());
25602556      item.m_hash[unit].m_sha1 = sha1_creator::simple(item.m_data + unit * unit_bytes(), hunk_bytes());
25612557   }
2562   atomic_exchange32(&item.m_status, WS_COMPLETE);
2558   item.m_status = WS_COMPLETE;
25632559}
25642560
25652561
r242703r242704
25872583
25882584   // find the best compression scheme, unless we already have a self or parent match
25892585   // (note we may miss a self match from blocks not yet added, but this just results in extra work)
2590   // TODO: data race
25912586   if (m_current_map.find(item.m_hash[0].m_crc16, item.m_hash[0].m_sha1) == hashmap::NOT_FOUND &&
25922587      m_parent_map.find(item.m_hash[0].m_crc16, item.m_hash[0].m_sha1) == hashmap::NOT_FOUND)
25932588      item.m_compression = item.m_codecs->find_best_compressor(item.m_data, item.m_compressed, item.m_complen);
25942589
25952590   // mark us complete
2596   atomic_exchange32(&item.m_status, WS_COMPLETE);
2591   item.m_status = WS_COMPLETE;
25972592}
25982593
25992594
r242703r242704
26492644         UINT32 hunknum = curoffs / hunk_bytes();
26502645         work_item &item = m_work_item[hunknum % WORK_BUFFER_HUNKS];
26512646         assert(item.m_status == WS_READING);
2652         atomic_exchange32(&item.m_status, WS_QUEUED);
2647         item.m_status = WS_QUEUED;
26532648         item.m_hunknum = hunknum;
26542649         item.m_osd = osd_work_item_queue(m_work_queue, m_walking_parent ? async_walk_parent_static : async_compress_hunk_static, &item, 0);
26552650      }
trunk/src/lib/util/chd.h
r242703r242704
530530
531531      osd_work_item *     m_osd;              // OSD work item running on this block
532532      chd_file_compressor *m_compressor;      // pointer back to the compressor
533      // TODO: had to change this to be able to use atomic_* functions on this
534      //volatile work_status m_status;          // current status of this item
535      volatile INT32      m_status;           // current status of this item
533      volatile work_status m_status;          // current status of this item
536534      UINT32              m_hunknum;          // number of the hunk we're working on
537535      UINT8 *             m_data;             // pointer to the data we are working on
538536      UINT8 *             m_compressed;       // pointer to the compressed data
trunk/src/lib/util/coretmpl.h
r242703r242704
9999   void resize_and_clear(int count, UINT8 data = 0) { resize(count); clear(data); }
100100   void resize_keep_and_clear_new(int count, UINT8 data = 0) { int oldcount = m_count; resize_keep(count); if (oldcount < m_count) clear_internal(oldcount, m_count - oldcount, data); }
101101
102   // batch operations
103    void copyfrom(const dynamic_array<_ElementType> &source)
104    {
105        resize(source.count());
106        for (int i=0; i < source.count(); i++)
107            m_array[i] = source[i];
108    }
109
110102private:
111103   // internal helpers
112104   void expand_internal(int count)
trunk/src/lib/util/palette.h
r242703r242704
170170
171171   // entry list getters
172172   const rgb_t *entry_list_raw() const { return m_entry_color; }
173   const dynamic_array<rgb_t> *entry_list_adjusted_darray() const { return &m_adjusted_color; }
174    const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
173   const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
175174   const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; }
176175
177176   // group adjustments
trunk/src/mame/audio/dkong.c
r242703r242704
11451145 0: 14 16       ... checkpoint charlie
11461146 1: 14 18       ... checkpoint bravo
11471147 2: 14 1A       ... checkpoint alpha
1148 3: 1C          Use Caution (sounds kinda like 'You'll notice')
1148 3: 1C          You'll notice
11491149 4: 1E 1E       Complete attack mission
11501150 5: 10 10 10    trouble, trouble, trouble
11511151 6: 12 12       all pilots climb up
trunk/src/mame/drivers/5clown.c
r242703r242704
471471   required_device<ay8910_device> m_ay8910;
472472   required_device<gfxdecode_device> m_gfxdecode;
473473   required_device<palette_device> m_palette;
474
474   
475475   required_shared_ptr<UINT8> m_videoram;
476476   required_shared_ptr<UINT8> m_colorram;
477
477   
478478   UINT8 m_main_latch_d800;
479479   UINT8 m_snd_latch_0800;
480480   UINT8 m_snd_latch_0a02;
481481   UINT8 m_ay8910_addr;
482482   tilemap_t *m_bg_tilemap;
483483   int m_mux_data;
484
484   
485485   DECLARE_WRITE8_MEMBER(fclown_videoram_w);
486486   DECLARE_WRITE8_MEMBER(fclown_colorram_w);
487487   DECLARE_WRITE8_MEMBER(cpu_c048_w);
r242703r242704
505505};
506506
507507void _5clown_state::machine_start()
508{
508{   
509509   m_main_latch_d800 = m_snd_latch_0800 = m_snd_latch_0a02 = m_ay8910_addr = m_mux_data = 0;
510
510   
511511   save_item(NAME(m_main_latch_d800));
512512   save_item(NAME(m_snd_latch_0800));
513513   save_item(NAME(m_snd_latch_0a02));
trunk/src/mame/drivers/aleck64.c
r242703r242704
881881   PIF_BOOTROM
882882
883883   ROM_REGION32_BE( 0x4000000, "user2", 0 )
884   ROM_LOAD16_WORD_SWAP( "nus-zhaj.u3", 0x000000, 0x0800000, BAD_DUMP CRC(95258ba2) SHA1(0299b8fb9a8b1b24428d0f340f6bf1cfaf99c672) )
884   ROM_LOAD16_WORD_SWAP( "nus-zhaj.u3", 0x000000, 0x0800000,  CRC(95258ba2) SHA1(0299b8fb9a8b1b24428d0f340f6bf1cfaf99c672) )
885885
886886   ROM_REGION16_BE( 0x80, "normpoint", 0 )
887887   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
895895   PIF_BOOTROM
896896
897897   ROM_REGION32_BE( 0x4000000, "user2", 0 )
898   ROM_LOAD16_WORD_SWAP( "nus-zcaj.u4", 0x000000, 0x1000000, CRC(ec4563fc) SHA1(4d5a30873a5850cf4cd1c0bdbe24e1934f163cd0) )
898   ROM_LOAD16_WORD_SWAP( "nus-zcaj.u4", 0x000000, 0x1000000, CRC(ec4563fc) SHA1(4d5a30873a5850cf4cd1c0bdbe24e1934f163cd0) )
899899
900900   ROM_REGION32_BE( 0x100000, "user3", 0 )
901   ROM_LOAD ( "tet-01m.u5", 0x000000, 0x100000, CRC(f78f859b) SHA1(b07c85e0453869fe43792f42081f64a5327e58e6) )
901   ROM_LOAD ( "tet-01m.u5", 0x000000, 0x100000, CRC(f78f859b) SHA1(b07c85e0453869fe43792f42081f64a5327e58e6) )
902902
903903   ROM_REGION32_BE( 0x80, "user4", 0 )
904   ROM_LOAD ( "at24c01.u34", 0x000000, 0x80, CRC(ba7e503f) SHA1(454aa4fdde7d8694d1affaf25cd750fa678686bb) )
904   ROM_LOAD ( "at24c01.u34", 0x000000, 0x80, CRC(ba7e503f) SHA1(454aa4fdde7d8694d1affaf25cd750fa678686bb) )
905905
906906   ROM_REGION16_BE( 0x80, "normpoint", 0 )
907907   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
924924   PIF_BOOTROM
925925
926926   ROM_REGION32_BE( 0x4000000, "user2", 0 )
927   ROM_LOAD16_WORD_SWAP( "nus-zhbj-0.u3", 0x000000, 0xc00000, CRC(a4edac93) SHA1(3794606c008fb69f5d16dcccece94d03da23bf8a) )
927   ROM_LOAD16_WORD_SWAP( "nus-zhbj-0.u3", 0x000000, 0xc00000, CRC(a4edac93) SHA1(3794606c008fb69f5d16dcccece94d03da23bf8a) )
928928
929929   ROM_REGION16_BE( 0x80, "normpoint", 0 )
930930   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
939939   PIF_BOOTROM
940940
941941   ROM_REGION32_BE( 0x4000000, "user2", 0 )
942   ROM_LOAD16_WORD_SWAP( "nus-zsej-0.u2", 0x000000, 0x2000000, CRC(44f40102) SHA1(a78de955f2fcd99dda14e782984368b320eb5415) )
942   ROM_LOAD16_WORD_SWAP( "nus-zsej-0.u2", 0x000000, 0x2000000, CRC(44f40102) SHA1(a78de955f2fcd99dda14e782984368b320eb5415) )
943943
944944   ROM_REGION16_BE( 0x80, "normpoint", 0 )
945945   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
963963   PIF_BOOTROM
964964
965965   ROM_REGION32_BE( 0x4000000, "user2", 0 )
966   ROM_LOAD16_WORD_SWAP( "nus-zsaj-0.u3", 0x000000, 0x800000, CRC(f3220e29) SHA1(06d8b808cc19378b046803f4dc75c7d791b7767f) )
966   ROM_LOAD16_WORD_SWAP( "nus-zsaj-0.u3", 0x000000, 0x800000, CRC(f3220e29) SHA1(06d8b808cc19378b046803f4dc75c7d791b7767f) )
967967
968968   ROM_REGION16_BE( 0x80, "normpoint", 0 )
969969   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
991991   PIF_BOOTROM
992992
993993   ROM_REGION32_BE( 0x4000000, "user2", 0 )
994   ROM_LOAD16_WORD_SWAP( "ua3012--all02.u3", 0x000000, 0x1000000, CRC(904a91a7) SHA1(7dfa3447d2c489c0448c4004dc12d3037c05a0f3) )
994   ROM_LOAD16_WORD_SWAP( "ua3012--all02.u3", 0x000000, 0x1000000, CRC(904a91a7) SHA1(7dfa3447d2c489c0448c4004dc12d3037c05a0f3) )
995995
996996   ROM_REGION32_BE( 0x800000, "user3", 0 )
997   ROM_LOAD16_WORD_SWAP( "nus-zsij-0.u1", 0x000000, 0x800000, CRC(2389576f) SHA1(dc22b2eab4d7a02cb918827a62e6c120b3a84e6c) )
997   ROM_LOAD16_WORD_SWAP( "nus-zsij-0.u1", 0x000000, 0x800000, CRC(2389576f) SHA1(dc22b2eab4d7a02cb918827a62e6c120b3a84e6c) )
998998
999999   ROM_REGION16_BE( 0x80, "normpoint", 0 )
10001000   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
10091009   PIF_BOOTROM
10101010
10111011   ROM_REGION32_BE( 0x4000000, "user2", 0 )
1012   ROM_LOAD16_WORD_SWAP( "ua2011-all02.u3", 0x0000000, 0x1000000, CRC(eb4b96d0) SHA1(e909ea5b71b81087da07821c4f57244576363678) )
1013   ROM_LOAD16_WORD_SWAP( "ua2011-alh02.u4", 0x1000000, 0x1000000, CRC(b8e35ddf) SHA1(7c3e59f6520dc3f0aa592e682fa82e30ffd1f4d0) )
1012   ROM_LOAD16_WORD_SWAP( "ua2011-all02.u3", 0x0000000, 0x1000000,  CRC(eb4b96d0) SHA1(e909ea5b71b81087da07821c4f57244576363678) )
1013   ROM_LOAD16_WORD_SWAP( "ua2011-alh02.u4", 0x1000000, 0x1000000,  CRC(b8e35ddf) SHA1(7c3e59f6520dc3f0aa592e682fa82e30ffd1f4d0) )
10141014
10151015   ROM_REGION32_BE( 0x800000, "user3", 0 )
1016   ROM_LOAD16_WORD_SWAP( "nus-nsij-0.u1", 0x000000, 0x800000, CRC(94cf9f8d) SHA1(cd624d1f5de2be3bec3ece06556a2e39bef66d77) )
1016   ROM_LOAD16_WORD_SWAP( "nus-nsij-0.u1", 0x000000, 0x800000, CRC(94cf9f8d) SHA1(cd624d1f5de2be3bec3ece06556a2e39bef66d77) )
10171017
10181018   ROM_REGION16_BE( 0x80, "normpoint", 0 )
10191019   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
10281028   PIF_BOOTROM
10291029
10301030   ROM_REGION32_BE( 0x4000000, "user2", 0 )
1031   ROM_LOAD16_WORD_SWAP( "ua3088-all01.u3", 0x0000000, 0x1000000, CRC(00db4dbc) SHA1(824fdce01fffdfcbcc9b1fbda4ab389a10b2b418) )
1032   ROM_LOAD16_WORD_SWAP( "ua3088-alh04.u4", 0x1000000, 0x1000000, CRC(c96bc7c0) SHA1(2b6ca1a769dee74e112c2b287dacd0bf46dda091) )
1031   ROM_LOAD16_WORD_SWAP( "ua3088-all01.u3", 0x0000000, 0x1000000,  CRC(00db4dbc) SHA1(824fdce01fffdfcbcc9b1fbda4ab389a10b2b418) )
1032   ROM_LOAD16_WORD_SWAP( "ua3088-alh04.u4", 0x1000000, 0x1000000,  CRC(c96bc7c0) SHA1(2b6ca1a769dee74e112c2b287dacd0bf46dda091) )
10331033
10341034   ROM_REGION32_BE( 0x800000, "user3", 0 )
1035   ROM_LOAD16_WORD_SWAP( "nus-zsij-0.u1", 0x000000, 0x800000, CRC(2389576f) SHA1(dc22b2eab4d7a02cb918827a62e6c120b3a84e6c) ) // same as tower & shaft
1035   ROM_LOAD16_WORD_SWAP( "nus-zsij-0.u1", 0x000000, 0x800000,   CRC(2389576f) SHA1(dc22b2eab4d7a02cb918827a62e6c120b3a84e6c) ) // same as tower & shaft
10361036
10371037   ROM_REGION16_BE( 0x80, "normpoint", 0 )
10381038   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
10461046   PIF_BOOTROM
10471047
10481048   ROM_REGION32_BE( 0x4000000, "user2", 0 )
1049   ROM_LOAD16_WORD_SWAP( "ua3003-all01.u3", 0x0000000, 0x1000000, CRC(f362fa82) SHA1(4f41ee23edc18110be1218ba333d1c58376ab175) )
1050   ROM_LOAD16_WORD_SWAP( "ua3003-alh01.u4", 0x1000000, 0x1000000, CRC(47c56387) SHA1(c8cc6c0a456b593aef711d0a75b2342ba2f8203f) )
1049   ROM_LOAD16_WORD_SWAP( "ua3003-all01.u3", 0x0000000, 0x1000000,  CRC(f362fa82) SHA1(4f41ee23edc18110be1218ba333d1c58376ab175) )
1050   ROM_LOAD16_WORD_SWAP( "ua3003-alh01.u4", 0x1000000, 0x1000000,  CRC(47c56387) SHA1(c8cc6c0a456b593aef711d0a75b2342ba2f8203f) )
10511051
10521052   ROM_REGION32_BE( 0x800000, "user3", 0 )
10531053   ROM_LOAD16_WORD_SWAP( "nus-zsij-0.u1", 0x000000, 0x800000, CRC(547d8122) SHA1(347f0785767265acb0f0c21646e06cbe6f561821) )
r242703r242704
10651065   PIF_BOOTROM
10661066
10671067   ROM_REGION32_BE( 0x4000000, "user2", 0 )
1068   ROM_LOAD16_WORD_SWAP( "nus-zscj.u3", 0x000000, 0x800000, CRC(8b36eb91) SHA1(179745625c16c6813d5f8d29bfd7628783d55806) )
1068   ROM_LOAD16_WORD_SWAP( "nus-zscj.u3", 0x000000, 0x800000, CRC(8b36eb91) SHA1(179745625c16c6813d5f8d29bfd7628783d55806) )
10691069
10701070   ROM_REGION16_BE( 0x80, "normpoint", 0 )
10711071   ROM_LOAD( "normpnt.rom", 0x00, 0x80, CRC(e7f2a005) SHA1(c27b4a364a24daeee6e99fd286753fd6216362b4) )
r242703r242704
10791079
10801080
10811081// BIOS
1082GAME( 1998, aleck64,  0,        aleck64, aleck64, aleck64_state,  aleck64, ROT0, "Nintendo / Seta", "Aleck64 PIF BIOS", GAME_IS_BIOS_ROOT)
1082GAME( 1998, aleck64,        0,  aleck64, aleck64, aleck64_state,  aleck64, ROT0, "Nintendo / Seta", "Aleck64 PIF BIOS", GAME_IS_BIOS_ROOT)
10831083
10841084// games
10851085GAME( 1998, 11beat,   aleck64,  aleck64, 11beat, aleck64_state,   aleck64, ROT0, "Hudson", "Eleven Beat", GAME_NOT_WORKING|GAME_NO_SOUND )
trunk/src/mame/drivers/asteroid.c
r242703r242704
237237static ADDRESS_MAP_START( asteroid_map, AS_PROGRAM, 8, asteroid_state )
238238   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
239239   AM_RANGE(0x0000, 0x01ff) AM_RAM
240   AM_RANGE(0x0200, 0x02ff) AM_RAMBANK("ram1") AM_SHARE("ram1")
241   AM_RANGE(0x0300, 0x03ff) AM_RAMBANK("ram2") AM_SHARE("ram2")
240   AM_RANGE(0x0200, 0x02ff) AM_RAMBANK("bank1") AM_SHARE("ram1")
241   AM_RANGE(0x0300, 0x03ff) AM_RAMBANK("bank2") AM_SHARE("ram2")
242242   AM_RANGE(0x2000, 0x2007) AM_READ(asteroid_IN0_r)    /* IN0 */
243243   AM_RANGE(0x2400, 0x2407) AM_READ(asteroid_IN1_r)    /* IN1 */
244244   AM_RANGE(0x2800, 0x2803) AM_READ(asteroid_DSW1_r)   /* DSW1 */
r242703r242704
258258static ADDRESS_MAP_START( astdelux_map, AS_PROGRAM, 8, asteroid_state )
259259   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
260260   AM_RANGE(0x0000, 0x01ff) AM_RAM
261   AM_RANGE(0x0200, 0x02ff) AM_RAMBANK("ram1") AM_SHARE("ram1")
262   AM_RANGE(0x0300, 0x03ff) AM_RAMBANK("ram2") AM_SHARE("ram2")
261   AM_RANGE(0x0200, 0x02ff) AM_RAMBANK("bank1") AM_SHARE("ram1")
262   AM_RANGE(0x0300, 0x03ff) AM_RAMBANK("bank2") AM_SHARE("ram2")
263263   AM_RANGE(0x2000, 0x2007) AM_READ(asteroid_IN0_r)    /* IN0 */
264264   AM_RANGE(0x2400, 0x2407) AM_READ(asteroid_IN1_r)    /* IN1 */
265265   AM_RANGE(0x2800, 0x2803) AM_READ(asteroid_DSW1_r)   /* DSW1 */
r242703r242704
699699   MCFG_CPU_PROGRAM_MAP(llander_map)
700700   MCFG_CPU_PERIODIC_INT_DRIVER(asteroid_state, llander_interrupt,  (double)MASTER_CLOCK/4096/12)
701701
702   MCFG_MACHINE_RESET_OVERRIDE(asteroid_state, llander)
703
702704   MCFG_SCREEN_MODIFY("screen")
703705   MCFG_SCREEN_REFRESH_RATE(CLOCK_3KHZ/12/6)
704706   MCFG_SCREEN_VISIBLE_AREA(522, 1566, 270, 1070)
r242703r242704
10111013   m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x2007, read8_delegate(FUNC(asteroid_state::asterock_IN0_r),this));
10121014}
10131015
1016DRIVER_INIT_MEMBER(asteroid_state,astdelux)
1017{
1018   save_item(NAME(m_astdelux_bankswitch));
1019   machine().save().register_postload(save_prepost_delegate(FUNC(asteroid_state::astdelux_bankswitch_restore), this));
1020}
1021
10141022/*************************************
10151023 *
10161024 *  Game drivers
r242703r242704
10281036GAME( 1979, meteorho,  asteroid,  asteroid,  asteroid,  driver_device,  0,         ROT0, "bootleg (Hoei)",        "Meteor (bootleg of Asteroids)",     GAME_SUPPORTS_SAVE )
10291037GAME( 1979, hyperspc,  asteroid,  asteroid,  asteroid,  driver_device,  0,         ROT0, "bootleg (Rumiano)",     "Hyperspace (bootleg of Asteroids)", GAME_SUPPORTS_SAVE )
10301038
1031GAMEL(1980, astdelux,  0,         astdelux,  astdelux,  driver_device,  0,         ROT0, "Atari",   "Asteroids Deluxe (rev 3)", GAME_SUPPORTS_SAVE, layout_astdelux )
1032GAMEL(1980, astdelux2, astdelux,  astdelux,  astdelux,  driver_device,  0,         ROT0, "Atari",   "Asteroids Deluxe (rev 2)", GAME_SUPPORTS_SAVE, layout_astdelux )
1033GAMEL(1980, astdelux1, astdelux,  astdelux,  astdelux,  driver_device,  0,         ROT0, "Atari",   "Asteroids Deluxe (rev 1)", GAME_SUPPORTS_SAVE, layout_astdelux )
1039GAMEL(1980, astdelux,  0,         astdelux,  astdelux,  asteroid_state, astdelux,  ROT0, "Atari",   "Asteroids Deluxe (rev 3)", GAME_SUPPORTS_SAVE, layout_astdelux )
1040GAMEL(1980, astdelux2, astdelux,  astdelux,  astdelux,  asteroid_state, astdelux,  ROT0, "Atari",   "Asteroids Deluxe (rev 2)", GAME_SUPPORTS_SAVE, layout_astdelux )
1041GAMEL(1980, astdelux1, astdelux,  astdelux,  astdelux,  asteroid_state, astdelux,  ROT0, "Atari",   "Asteroids Deluxe (rev 1)", GAME_SUPPORTS_SAVE, layout_astdelux )
10341042
10351043GAME( 1979, llander,   0,         llander,   llander,   driver_device,  0,         ROT0, "Atari",   "Lunar Lander (rev 2)",     GAME_SUPPORTS_SAVE )
10361044GAME( 1979, llander1,  llander,   llander,   llander1,  driver_device,  0,         ROT0, "Atari",   "Lunar Lander (rev 1)",     GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/atvtrack.c
r242703r242704
409409
410410void smashdrv_state::machine_start()
411411{
412
412413}
413414
414415void smashdrv_state::machine_reset()
r242703r242704
422423static ADDRESS_MAP_START( atvtrack_main_map, AS_PROGRAM, 64, atvtrack_state )
423424   AM_RANGE(0x00000000, 0x000003ff) AM_RAM AM_SHARE("sharedmem")
424425   AM_RANGE(0x00020000, 0x00020007) AM_READWRITE(control_r, control_w) // control registers
425//  AM_RANGE(0x00020040, 0x0002007f) // audio DAC buffer
426//   AM_RANGE(0x00020040, 0x0002007f) // audio DAC buffer
426427   AM_RANGE(0x14000000, 0x14000007) AM_READWRITE(area2_r, area2_w) // data
427428   AM_RANGE(0x14100000, 0x14100007) AM_READWRITE(area3_r, area3_w) // command
428429   AM_RANGE(0x14200000, 0x14200007) AM_READWRITE(area4_r, area4_w) // address
r242703r242704
584585   ROM_LOAD("prg.ic23", 0x0000000, 0x0400000, CRC(5cc6d3ac) SHA1(0c8426774212d891796b59c95b8c70f64db5b67a) )
585586
586587   ROM_REGION( 0x4000000, "maincpu", ROMREGION_ERASEFF)
587   ROM_LOAD32_WORD("sdra.ic15",    0x00000000, 0x01000000, CRC(cf702287) SHA1(84cd83c339831deff15fe5fcc353e0b596667500) )
588   ROM_LOAD32_WORD("sdrb.ic14",    0x00000002, 0x01000000, CRC(39b76f0e) SHA1(529943b6075925e5f72c6e966796e04b2c33686c) )
589   ROM_LOAD32_WORD("sdrc.ic20",    0x02000000, 0x01000000, CRC(c9021dd7) SHA1(1d08aab433614810af858a0fc5d7f03c7b782237) )
588   ROM_LOAD32_WORD("sdra.ic15",   0x00000000,   0x01000000, CRC(cf702287) SHA1(84cd83c339831deff15fe5fcc353e0b596667500) )
589   ROM_LOAD32_WORD("sdrb.ic14",   0x00000002,   0x01000000, CRC(39b76f0e) SHA1(529943b6075925e5f72c6e966796e04b2c33686c) )
590   ROM_LOAD32_WORD("sdrc.ic20",   0x02000000,   0x01000000, CRC(c9021dd7) SHA1(1d08aab433614810af858a0fc5d7f03c7b782237) )
590591   // ic21 unpopulated
591592ROM_END
592593
trunk/src/mame/drivers/barata.c
r242703r242704
22// copyright-holders:FelipeSanches
33/*************************************************************************
44
5    barata.c
5   barata.c
66
7    "Dona Barata"
7   "Dona Barata"
88
9    Brazilian "whack-a-mole"-style game themed after stepping on cockroaches.
10    The name "Dona Barata" means "Lady Cockroach" in brazilian portuguese.
9   Brazilian "whack-a-mole"-style game themed after stepping on cockroaches.
10   The name "Dona Barata" means "Lady Cockroach" in brazilian portuguese.
1111
12    Manufactured by Matic: http://maticplay.com.br/
13    This driver still only emulates an early prototype of the game.
14    Propper dumps of the actual released game is still lacking.
15    Photos on the web make us believe that there are at least 2 official
12   Manufactured by Matic: http://maticplay.com.br/
13   This driver still only emulates an early prototype of the game.
14   Propper dumps of the actual released game is still lacking.
15   Photos on the web make us believe that there are at least 2 official
1616    releases of this game.
1717
18    http://www.maticplay.com.br/equipamentos.php?equipamento=dona-barata
19    http://www.valedosduendes.com.br/site/wp-content/uploads/2012/02/barata_1.jpg
18   http://www.maticplay.com.br/equipamentos.php?equipamento=dona-barata
19   http://www.valedosduendes.com.br/site/wp-content/uploads/2012/02/barata_1.jpg
2020
2121    Driver by Felipe Sanches <juca@members.fsf.org>
2222
2323**************************************************************************
2424
25    TO-DO:
25   TO-DO:
2626
27    * at the moment, the portbits for the rows are still a guess
28    * as we don't have access to actual PCBs, the CPU clock frequency is a guess
29        (but maybe it can be infered by analysing the 1ms delay routine used)
30    * we don't have sound samples or background music dumps
31        (i.e. we lack dumps of all of the sound memory)
32    * we don't have ROM dumps of the official releases of the game
33    * it would be nice to add photographic artwork to improve the layout
27   * at the moment, the portbits for the rows are still a guess
28   * as we don't have access to actual PCBs, the CPU clock frequency is a guess
29      (but maybe it can be infered by analysing the 1ms delay routine used)
30   * we don't have sound samples or background music dumps
31      (i.e. we lack dumps of all of the sound memory)
32   * we don't have ROM dumps of the official releases of the game
33   * it would be nice to add photographic artwork to improve the layout
3434
3535**************************************************************************/
3636
r242703r242704
138138   return segment;
139139}
140140
141#define FPGA_PLAY_BGM               0
142#define FPGA_STOP_BGM               1
143#define FPGA_PLAY_SAMPLE            2
144#define FPGA_LAMP                   3
145#define FPGA_COUNTER                4
146#define FPGA_WAITING_FOR_NEW_CMD    5
141#define FPGA_PLAY_BGM            0
142#define FPGA_STOP_BGM            1
143#define FPGA_PLAY_SAMPLE         2
144#define FPGA_LAMP               3
145#define FPGA_COUNTER            4
146#define FPGA_WAITING_FOR_NEW_CMD   5
147147
148148const char* mode_strings[] = {
149149"Play background music",
r242703r242704
193193            lamp_index = lamp_data & 0x0F;
194194
195195            if (erase_all){
196//                  logerror("LED: ERASE ALL\n");
196//               logerror("LED: ERASE ALL\n");
197197               for (int i=0; i<16; i++){
198198                  output_set_led_value(i, 1);
199199               }
r242703r242704
329329/*************************
330330*      Game Drivers      *
331331*************************/
332GAME( 2002, barata,     0,        barata,   barata,    driver_device, 0,        ROT0,  "Eletro Matic Equipamentos Eletromec??nicos", "Dona Barata (early prototype)", GAME_IMPERFECT_GRAPHICS )
332GAME( 2002, barata,     0,        barata,   barata,    driver_device, 0,        ROT0,  "Eletro Matic Equipamentos Eletromecânicos", "Dona Barata (early prototype)", GAME_IMPERFECT_GRAPHICS )
trunk/src/mame/drivers/bfm_sc1.c
r242703r242704
178178   DECLARE_READ8_MEMBER(nec_r);
179179   DECLARE_WRITE8_MEMBER(nec_reset_w);
180180   DECLARE_WRITE8_MEMBER(nec_latch_w);
181
181   
182182   void save_state();
183183
184184   DECLARE_DRIVER_INIT(toppoker);
trunk/src/mame/drivers/bfm_sc2.c
r242703r242704
14191419
14201420static ADDRESS_MAP_START( sc2_basemap, AS_PROGRAM, 8, bfm_sc2_state )
14211421   AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram") //8k
1422   AM_RANGE(0x2000, 0x2000) AM_READ(vfd_status_r)
1423   AM_RANGE(0x2000, 0x20FF) AM_WRITE(reel12_w)
1424   AM_RANGE(0x2100, 0x21FF) AM_WRITE(reel34_w)
1425   AM_RANGE(0x2200, 0x22FF) AM_WRITE(reel56_w)
14221426
14231427   AM_RANGE(0x2300, 0x230B) AM_READ(mux_input_r)
14241428   AM_RANGE(0x2300, 0x231F) AM_WRITE(mux_output_w)
r242703r242704
14621466   AM_RANGE(0x8000, 0xFFFF) AM_ROM
14631467ADDRESS_MAP_END
14641468
1465static ADDRESS_MAP_START( memmap_no_vid, AS_PROGRAM, 8, bfm_sc2_state )
1466   AM_IMPORT_FROM( sc2_basemap )
1467   AM_RANGE(0x2000, 0x2000) AM_READ(vfd_status_r)
1468   AM_RANGE(0x2000, 0x20FF) AM_WRITE(reel12_w)
1469   AM_RANGE(0x2100, 0x21FF) AM_WRITE(reel34_w)
1470   AM_RANGE(0x2200, 0x22FF) AM_WRITE(reel56_w)
1471ADDRESS_MAP_END
1472
14731469// memory map for scorpion2 board video addon /////////////////////////////
14741470
14751471static ADDRESS_MAP_START( memmap_vid, AS_PROGRAM, 8, bfm_sc2_state )
r242703r242704
21432139}
21442140
21452141static MACHINE_CONFIG_START( scorpion2_vid, bfm_sc2_state )
2142   MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state, init )                           // main scorpion2 board initialisation
2143   MCFG_QUANTUM_TIME(attotime::from_hz(960))                                   // needed for serial communication !!
21462144   MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 ) // 6809 CPU at 2 Mhz
21472145   MCFG_CPU_PROGRAM_MAP(memmap_vid)                    // setup scorpion2 board memorymap
21482146   MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq,  1000)               // generate 1000 IRQ's per second
21492147   MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9))
2150   MCFG_QUANTUM_TIME(attotime::from_hz(960))                                   // needed for serial communication !!
21512148
21522149   MCFG_BFMBD1_ADD("vfd0",0)
21532150   MCFG_BFMBD1_ADD("vfd1",1)
21542151
21552152   MCFG_MACHINE_START_OVERRIDE(bfm_sc2_state,bfm_sc2)
2156   MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state, init )                           // main scorpion2 board initialisation
21572153
21582154   MCFG_NVRAM_ADD_0FILL("nvram")
21592155   MCFG_NVRAM_ADD_CUSTOM_DRIVER("e2ram", bfm_sc2_state, e2ram_init)
r242703r242704
35963592static MACHINE_CONFIG_START( scorpion2, bfm_sc2_state )
35973593   MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state,awp_init)
35983594   MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 )
3599   MCFG_CPU_PROGRAM_MAP(memmap_no_vid)
3595   MCFG_CPU_PROGRAM_MAP(sc2_basemap)
36003596   MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq,  1000)
36013597   MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9))
36023598
r242703r242704
36173613
36183614   /* video hardware */
36193615   MCFG_DEFAULT_LAYOUT(layout_sc2_vfd)
3620
3616   
36213617   MCFG_DEVICE_ADD("reel0", STEPPER, 0)
36223618   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel0_optic_cb))
36233619   MCFG_DEVICE_ADD("reel1", STEPPER, 0)
r242703r242704
36253621   MCFG_DEVICE_ADD("reel2", STEPPER, 0)
36263622   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel2_optic_cb))
36273623   MCFG_DEVICE_ADD("reel3", STEPPER, 0)
3628   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel3_optic_cb))
3624   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel3_optic_cb))   
36293625   MCFG_DEVICE_ADD("reel4", STEPPER, 0)
36303626   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel4_optic_cb))
36313627   MCFG_DEVICE_ADD("reel5", STEPPER, 0)
r242703r242704
36363632/* machine driver for scorpion3 board */
36373633static MACHINE_CONFIG_DERIVED( scorpion3, scorpion2 )
36383634   MCFG_CPU_MODIFY("maincpu")
3639   MCFG_CPU_PROGRAM_MAP(memmap_no_vid)
3635   MCFG_CPU_PROGRAM_MAP(sc2_basemap)
36403636MACHINE_CONFIG_END
36413637
36423638
r242703r242704
36453641   MCFG_MACHINE_RESET_OVERRIDE(bfm_sc2_state,dm01_init)
36463642   MCFG_QUANTUM_TIME(attotime::from_hz(960))                                   // needed for serial communication !!
36473643   MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4 )
3648   MCFG_CPU_PROGRAM_MAP(memmap_no_vid)
3644   MCFG_CPU_PROGRAM_MAP(sc2_basemap)
36493645   MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, timer_irq,  1000)
36503646   MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9))
36513647
r242703r242704
36673663   MCFG_CPU_ADD("matrix", M6809, 2000000 )             /* matrix board 6809 CPU at 2 Mhz ?? I don't know the exact freq.*/
36683664   MCFG_CPU_PROGRAM_MAP(bfm_dm01_memmap)
36693665   MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc2_state, nmi_line_assert, 1500 )          /* generate 1500 NMI's per second ?? what is the exact freq?? */
3670
3666   
36713667   MCFG_DEVICE_ADD("reel0", STEPPER, 0)
36723668   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel0_optic_cb))
36733669   MCFG_DEVICE_ADD("reel1", STEPPER, 0)
r242703r242704
36753671   MCFG_DEVICE_ADD("reel2", STEPPER, 0)
36763672   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel2_optic_cb))
36773673   MCFG_DEVICE_ADD("reel3", STEPPER, 0)
3678   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel3_optic_cb))
3674   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel3_optic_cb))   
36793675   MCFG_DEVICE_ADD("reel4", STEPPER, 0)
36803676   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc2_state, reel4_optic_cb))
36813677   MCFG_DEVICE_ADD("reel5", STEPPER, 0)
trunk/src/mame/drivers/bfm_sc4.c
r242703r242704
2831728317GAMEL( 200?, sc4pacclb   ,sc4paccl,  sc4_5reel, sc4paccl, sc4_state, sc4paccl, ROT0, "Mazooma","Pac Man Club (PR2018, CPAC) (Mazooma) (Scorpion 4) (set 3)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 )
2831828318GAMEL( 200?, sc4pacclc   ,sc4paccl,  sc4_5reel, sc4paccl, sc4_state, sc4paccl, ROT0, "Mazooma","Pac Man Club (PR2018, CPAC) (Mazooma) (Scorpion 4) (set 4)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 )
2831928319
28320
28320 
2832128321// REEL 4 ERR 24 (what type should be here??)
2832228322
2832328323DRIVER_INIT_MEMBER(sc4_state,sc4pmani)
trunk/src/mame/drivers/bfm_sc4h.c
r242703r242704
522522      m_reel1->update( data    &0x0f);
523523      awp_draw_reel("reel1", m_reel1);
524524   }
525
526   if (m_reel2)
525   
526   if (m_reel2)   
527527   {
528528      m_reel2->update((data>>4)&0x0f);
529529      awp_draw_reel("reel2", m_reel2);
r242703r242704
651651      m_reel5->update( data    &0x0f);
652652      awp_draw_reel("reel5", m_reel5);
653653   }
654
655   if (m_reel6)
654   
655   if (m_reel6)   
656656   {
657657      m_reel6->update((data>>4)&0x0f);
658658      awp_draw_reel("reel6", m_reel6);
r242703r242704
712712   MCFG_YMZ280B_IRQ_HANDLER(WRITELINE(sc4_state, bfm_sc4_irqhandler))
713713   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
714714MACHINE_CONFIG_END
715
715   
716716//Standard 6 reels all connected
717717MACHINE_CONFIG_START( sc4, sc4_state )
718718   MCFG_FRAGMENT_ADD(sc4_common)
719
719     
720720   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
721721   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
722722   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
734734//Standard 3 reels
735735MACHINE_CONFIG_START( sc4_3reel, sc4_state )
736736   MCFG_FRAGMENT_ADD(sc4_common)
737
737     
738738   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
739739   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
740740   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
741741   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
742742   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
743743   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
744
744   
745745MACHINE_CONFIG_END
746746
747747//Standard 4 reels
748748MACHINE_CONFIG_START( sc4_4reel, sc4_state )
749749   MCFG_FRAGMENT_ADD(sc4_common)
750
750     
751751   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
752752   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
753753   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
762762MACHINE_CONFIG_START( sc4_4reel_alt, sc4_state )
763763
764764   MCFG_FRAGMENT_ADD(sc4_common)
765
765     
766766   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
767767   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
768768   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
769769   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
770770   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
771771   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
772
772   
773773   MCFG_STARPOINT_RM20_48STEP_ADD("reel5")
774774   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
775775MACHINE_CONFIG_END
r242703r242704
778778//Standard 5 reels
779779MACHINE_CONFIG_START( sc4_5reel, sc4_state )
780780   MCFG_FRAGMENT_ADD(sc4_common)
781
781     
782782   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
783783   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
784784   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
794794//5 reels, with RL4 skipped
795795MACHINE_CONFIG_START( sc4_5reel_alt, sc4_state )
796796   MCFG_FRAGMENT_ADD(sc4_common)
797
797     
798798   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
799799   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
800800   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
801801   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
802802   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
803803   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
804
804   
805805   MCFG_STARPOINT_RM20_48STEP_ADD("reel5")
806806   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
807807   MCFG_STARPOINT_RM20_48STEP_ADD("reel6")
808808   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
809
809   
810810MACHINE_CONFIG_END
811811
812812//6 reels, last 200 steps
813813MACHINE_CONFIG_START( sc4_200_std, sc4_state )
814814
815815   MCFG_FRAGMENT_ADD(sc4_common)
816
816     
817817   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
818818   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
819819   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
823823   MCFG_STARPOINT_RM20_48STEP_ADD("reel4")
824824   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
825825   MCFG_STARPOINT_RM20_48STEP_ADD("reel5")
826   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
826   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
827827   MCFG_STARPOINT_200STEP_ADD("reel6")
828828   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
829829MACHINE_CONFIG_END
r242703r242704
831831//6 reels, last 200 steps
832832MACHINE_CONFIG_START( sc4_200_alt, sc4_state )
833833   MCFG_FRAGMENT_ADD(sc4_common)
834
834     
835835   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
836836   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
837837   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
841841   MCFG_STARPOINT_200STEP_ADD("reel4")
842842   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
843843   MCFG_STARPOINT_200STEP_ADD("reel5")
844   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
844   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
845845   MCFG_STARPOINT_RM20_48STEP_ADD("reel6")
846846   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
847847MACHINE_CONFIG_END
r242703r242704
849849//6 reels, RL4 200 steps
850850MACHINE_CONFIG_START( sc4_200_alta, sc4_state )
851851   MCFG_FRAGMENT_ADD(sc4_common)
852
852     
853853   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
854854   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
855855   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
859859   MCFG_STARPOINT_RM20_48STEP_ADD("reel4")
860860   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
861861   MCFG_STARPOINT_200STEP_ADD("reel5")
862   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
862   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
863863   MCFG_STARPOINT_RM20_48STEP_ADD("reel6")
864864   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
865865MACHINE_CONFIG_END
r242703r242704
867867//6 reels, 3 48 step, 3 200 step
868868MACHINE_CONFIG_START( sc4_200_altb, sc4_state )
869869   MCFG_FRAGMENT_ADD(sc4_common)
870
870     
871871   MCFG_STARPOINT_200STEP_ADD("reel1")
872872   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
873873   MCFG_STARPOINT_200STEP_ADD("reel2")
r242703r242704
877877   MCFG_STARPOINT_RM20_48STEP_ADD("reel4")
878878   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
879879   MCFG_STARPOINT_RM20_48STEP_ADD("reel5")
880   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
880   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
881881   MCFG_STARPOINT_RM20_48STEP_ADD("reel6")
882882   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
883883MACHINE_CONFIG_END
r242703r242704
885885//5 reels, last one 200 steps
886886MACHINE_CONFIG_START( sc4_200_5r, sc4_state )
887887   MCFG_FRAGMENT_ADD(sc4_common)
888
888     
889889   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
890890   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
891891   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
893893   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
894894   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
895895   MCFG_STARPOINT_RM20_48STEP_ADD("reel4")
896   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
896   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))   
897897   MCFG_STARPOINT_200STEP_ADD("reel5")
898   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
898   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
899899MACHINE_CONFIG_END
900900
901901
r242703r242704
903903//5 reels, last one 200 steps, RL4 skipped
904904MACHINE_CONFIG_START( sc4_200_5ra, sc4_state )
905905   MCFG_FRAGMENT_ADD(sc4_common)
906
906     
907907   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
908908   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
909909   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
910910   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
911911   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
912912   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
913
913   
914914   MCFG_STARPOINT_RM20_48STEP_ADD("reel5")
915   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
915   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))   
916916   MCFG_STARPOINT_200STEP_ADD("reel6")
917917   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
918918MACHINE_CONFIG_END
r242703r242704
920920//5 reels, last one 200 steps, RL5 skipped
921921MACHINE_CONFIG_START( sc4_200_5rb, sc4_state )
922922   MCFG_FRAGMENT_ADD(sc4_common)
923
923     
924924   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
925925   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
926926   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
937937//5 reels, RL5 200 steps, RL4 skipped
938938MACHINE_CONFIG_START( sc4_200_5rc, sc4_state )
939939   MCFG_FRAGMENT_ADD(sc4_common)
940
940     
941941   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
942942   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
943943   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
944944   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
945945   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
946946   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
947
947   
948948   MCFG_STARPOINT_200STEP_ADD("reel5")
949949   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel5_optic_cb))
950950   MCFG_STARPOINT_RM20_48STEP_ADD("reel6")
951   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
951   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))   
952952MACHINE_CONFIG_END
953953
954954//4 reels, last one 200 steps
955955MACHINE_CONFIG_START( sc4_200_4r, sc4_state )
956956   MCFG_FRAGMENT_ADD(sc4_common)
957
957     
958958   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
959959   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
960960   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
962962   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
963963   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
964964   MCFG_STARPOINT_200STEP_ADD("reel4")
965   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
965   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))   
966966MACHINE_CONFIG_END
967967
968968//4 reels, last one 200 steps, RL4 skipped
969969MACHINE_CONFIG_START( sc4_200_4ra, sc4_state )
970970   MCFG_FRAGMENT_ADD(sc4_common)
971
971     
972972   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
973973   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
974974   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
r242703r242704
984984//4 reels, last one 200 steps, RL4,5 skipped
985985MACHINE_CONFIG_START( sc4_200_4rb, sc4_state )
986986   MCFG_FRAGMENT_ADD(sc4_common)
987
987     
988988   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
989989   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
990990   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
991991   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel2_optic_cb))
992992   MCFG_STARPOINT_RM20_48STEP_ADD("reel3")
993993   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
994
994   
995995   MCFG_STARPOINT_200STEP_ADD("reel6")
996996   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel6_optic_cb))
997997MACHINE_CONFIG_END
998998
999999MACHINE_CONFIG_START( sc4_4reel_200, sc4_state )
10001000   MCFG_FRAGMENT_ADD(sc4_common)
1001
1001     
10021002   MCFG_STARPOINT_200STEP_ADD("reel1")
10031003   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
10041004   MCFG_STARPOINT_200STEP_ADD("reel2")
r242703r242704
10061006   MCFG_STARPOINT_200STEP_ADD("reel3")
10071007   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
10081008   MCFG_STARPOINT_200STEP_ADD("reel4")
1009   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
1009   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))     
10101010MACHINE_CONFIG_END
10111011
10121012MACHINE_CONFIG_START( sc4_3reel_200, sc4_state )
10131013   MCFG_FRAGMENT_ADD(sc4_common)
1014
1014     
10151015   MCFG_STARPOINT_200STEP_ADD("reel1")
10161016   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
10171017   MCFG_STARPOINT_200STEP_ADD("reel2")
r242703r242704
10231023MACHINE_CONFIG_START( sc4_3reel_200_48, sc4_state )
10241024
10251025   MCFG_FRAGMENT_ADD(sc4_common)
1026
1026     
10271027   MCFG_STARPOINT_200STEP_ADD("reel1")
10281028   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
10291029   MCFG_STARPOINT_200STEP_ADD("reel2")
r242703r242704
10311031   MCFG_STARPOINT_200STEP_ADD("reel3")
10321032   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel3_optic_cb))
10331033   MCFG_STARPOINT_48STEP_ADD("reel4")
1034   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))
1034   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel4_optic_cb))   
10351035MACHINE_CONFIG_END
10361036
10371037MACHINE_CONFIG_START( sc4_no_reels, sc4_state )
r242703r242704
10471047
10481048MACHINE_CONFIG_START( sc4_adder4, sc4_adder4_state )
10491049   MCFG_FRAGMENT_ADD(sc4_common)
1050
1050   
10511051   MCFG_CPU_ADD("adder4", M68340, 25175000)     // 68340 (CPU32 core)
10521052   MCFG_CPU_PROGRAM_MAP(sc4_adder4_map)
10531053
r242703r242704
10661066   MCFG_CPU_PERIODIC_INT_DRIVER(sc4_state, nmi_line_assert, 1500 )          /* generate 1500 NMI's per second ?? what is the exact freq?? */
10671067
10681068   MCFG_MACHINE_START_OVERRIDE(sc4_state, sc4 )
1069
1069   
10701070   MCFG_STARPOINT_RM20_48STEP_ADD("reel1")
10711071   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(sc4_state, reel1_optic_cb))
10721072   MCFG_STARPOINT_RM20_48STEP_ADD("reel2")
trunk/src/mame/drivers/bwidow.c
r242703r242704
393393   AM_RANGE(0x0900, 0x0907) AM_READ(spacduel_IN3_r)    /* IN1 */
394394   AM_RANGE(0x0905, 0x0906) AM_WRITENOP /* ignore? */
395395   AM_RANGE(0x0a00, 0x0a00) AM_DEVREAD("earom", atari_vg_earom_device, read)
396   AM_RANGE(0x0c00, 0x0c00) AM_WRITE(spacduel_coin_counter_w) /* coin out */
396    AM_RANGE(0x0c00, 0x0c00) AM_WRITE(spacduel_coin_counter_w) /* coin out */
397397   AM_RANGE(0x0c80, 0x0c80) AM_DEVWRITE("avg", avg_device, go_w)
398398   AM_RANGE(0x0d00, 0x0d00) AM_WRITENOP /* watchdog clear */
399399   AM_RANGE(0x0d80, 0x0d80) AM_DEVWRITE("avg", avg_device, reset_w)
trunk/src/mame/drivers/chihiro.c
r242703r242704
777777      debug_console_printf(machine, "Register combiners disabled\n");
778778}
779779
780static void waitvblank_command(running_machine &machine, int ref, int params, const char **param)
781{
782   int en;
783
784   chihiro_state *chst = machine.driver_data<chihiro_state>();
785   en = chst->nvidia_nv2a->toggle_wait_vblank_support();
786   if (en != 0)
787      debug_console_printf(machine, "Vblank method enabled\n");
788   else
789      debug_console_printf(machine, "Vblank method disabled\n");
790}
791
792780static void grab_texture_command(running_machine &machine, int ref, int params, const char **param)
793781{
794782   UINT64 type;
r242703r242704
874862   debug_console_printf(machine, "  chihiro curthread -- Print information about current thread\n");
875863   debug_console_printf(machine, "  chihiro irq,<number> -- Generate interrupt with irq number 0-15\n");
876864   debug_console_printf(machine, "  chihiro nv2a_combiners -- Toggle use of register combiners\n");
877   debug_console_printf(machine, "  chihiro waitvblank -- Toggle support for wait vblank method\n");
878865   debug_console_printf(machine, "  chihiro grab_texture,<type>,<filename> -- Save to <filename> the next used texture of type <type>\n");
879866   debug_console_printf(machine, "  chihiro grab_vprog,<filename> -- save current vertex program instruction slots to <filename>\n");
880867   debug_console_printf(machine, "  chihiro vprogdis,<address>,<length>[,<type>] -- disassemble <lenght> vertex program instructions at <address> of <type>\n");
r242703r242704
899886      generate_irq_command(machine, ref, params - 1, param + 1);
900887   else if (strcmp("nv2a_combiners", param[0]) == 0)
901888      nv2a_combiners_command(machine, ref, params - 1, param + 1);
902   else if (strcmp("waitvblank", param[0]) == 0)
903      waitvblank_command(machine, ref, params - 1, param + 1);
904889   else if (strcmp("grab_texture", param[0]) == 0)
905890      grab_texture_command(machine, ref, params - 1, param + 1);
906891   else if (strcmp("grab_vprog", param[0]) == 0)
r242703r242704
18021787   save_item(NAME(smbusst.words));
18031788   save_item(NAME(pic16lc_buffer));
18041789   save_item(NAME(usbhack_counter));
1805   nvidia_nv2a->start();
18061790   nvidia_nv2a->savestate_items();
18071791}
18081792
trunk/src/mame/drivers/cps1.c
r242703r242704
18551855
18561856/* SWB.4, SWB.5 and SWB.6 need to be enabled simultaneously for turbo mode */
18571857static INPUT_PORTS_START( sf2amf )
1858   PORT_INCLUDE( sf2hack )
1858   PORT_INCLUDE( sf2 )
18591859
18601860   PORT_MODIFY("DSWB")
18611861   PORT_DIPNAME( 0x08, 0x08, "Turbo Mode Switch 1 of 3" )   PORT_DIPLOCATION("SW(B):4")
r242703r242704
1153211532   m_maincpu->space(AS_PROGRAM).install_read_handler(0xf18000, 0xf19fff, read16_delegate(FUNC(cps_state::dinohunt_sound_r), this));
1153311533   m_maincpu->space(AS_PROGRAM).install_read_port(0xfc0000, 0xfc0001, "IN2"); ;
1153411534   // the ym2151 doesn't seem to be used. Is it actually on the PCB?
11535
11535   
1153611536   DRIVER_INIT_CALL(cps1);
1153711537}
1153811538
r242703r242704
1166611666GAME( 1992, sf2acc,      sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator!, bootleg, set 1)", GAME_SUPPORTS_SAVE )          // 920313 - based on World version
1166711667GAME( 1992, sf2acca,     sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator!, bootleg, set 2)", GAME_SUPPORTS_SAVE )          // 920313 - based on World version
1166811668GAME( 1992, sf2accp2,    sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator Pt.II, bootleg)", GAME_SUPPORTS_SAVE )        // 920313 - based on World version
11669GAME( 1992, sf2amf,      sf2ce,    cps1_12MHz, sf2amf,   cps_state,   sf2hack,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (Alpha Magic-F, bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )     // 920313 - based on World version
11669GAME( 1992, sf2amf,      sf2ce,    cps1_12MHz, sf2amf,   cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Alpha Magic-F, bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )     // 920313 - based on World version
1167011670GAME( 1992, sf2amf2,     sf2ce,    cps1_12MHz, sf2hack,  cps_state,   sf2hack,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (L735 Test Rom, bootleg)", GAME_SUPPORTS_SAVE )     // 920313 - based on World version
1167111671GAME( 1992, sf2dkot2,    sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Double K.O. Turbo II, bootleg)", GAME_SUPPORTS_SAVE ) // 902140 !!! - based on USA version
1167211672GAME( 1992, sf2ceblp,    sf2ce,    cps1_10MHz, sf2,      cps_state,   sf2ceblp, ROT0,   "bootleg", "Street Fighter II': Champion Edition (protected bootleg on non-dash board)", GAME_SUPPORTS_SAVE )          // 920313 - based on USA version
trunk/src/mame/drivers/cps2.c
r242703r242704
28852885   ROM_LOAD16_WORD_SWAP( "dd2.12m",   0x200000, 0x200000, CRC(5ea2e7fa) SHA1(0e6a9fd007f637adcb2226c902394f07de45e803) )
28862886ROM_END
28872887
2888
2889ROM_START( ddsomar1 )
2890   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
2891   ROM_LOAD16_WORD_SWAP( "dd2a.03c", 0x000000, 0x80000, CRC(17162039) SHA1(d6e161cc888c2c7cd7b955ef9f1fc47a5302e29d) )
2892   ROM_LOAD16_WORD_SWAP( "dd2a.04c", 0x080000, 0x80000, CRC(950bec38) SHA1(99b50388015730142d28263de1b4f918f7a353fa) )
2893   ROM_LOAD16_WORD_SWAP( "dd2a.05c", 0x100000, 0x80000, CRC(fa298eba) SHA1(64d248de4e5655129bb3a420020ca041f5e7b740) )
2894   ROM_LOAD16_WORD_SWAP( "dd2a.06c", 0x180000, 0x80000, CRC(28f75b35) SHA1(01f8eb18918a674e5076ef2c09508b90d05d2e7d) )
2895   ROM_LOAD16_WORD_SWAP( "dd2.07",   0x200000, 0x80000, CRC(909a0b8b) SHA1(58bda17c36063a79df8b5031755c7909a9bda221) )
2896   ROM_LOAD16_WORD_SWAP( "dd2.08",   0x280000, 0x80000, CRC(e53c4d01) SHA1(bad872e4e793a39f68bc0e580772e982714b5876) )
2897   ROM_LOAD16_WORD_SWAP( "dd2.09",   0x300000, 0x80000, CRC(5f86279f) SHA1(c2a454e5f821b1cdd49f2cf0602e9bfb7ba63340) )
2898   ROM_LOAD16_WORD_SWAP( "dd2.10",   0x380000, 0x80000, CRC(ad954c26) SHA1(468c01735dbdb1114b37060546a660678290a97f) )
2899
2900   ROM_REGION( 0x1800000, "gfx", 0 )
2901   ROMX_LOAD( "dd2.13m",   0x0000000, 0x400000, CRC(a46b4e6e) SHA1(fb90f42868c581c481b4ceff9f692753fb186b30) , ROM_GROUPWORD | ROM_SKIP(6) )
2902   ROMX_LOAD( "dd2.15m",   0x0000002, 0x400000, CRC(d5fc50fc) SHA1(bc692f17b18bb47a724cd5152377cd5ccd6e184a) , ROM_GROUPWORD | ROM_SKIP(6) )
2903   ROMX_LOAD( "dd2.17m",   0x0000004, 0x400000, CRC(837c0867) SHA1(3d6db290a8f76299a23543f0ccf6a7905e1088ac) , ROM_GROUPWORD | ROM_SKIP(6) )
2904   ROMX_LOAD( "dd2.19m",   0x0000006, 0x400000, CRC(bb0ec21c) SHA1(e43ccc1cf63ccd2b504cc9fd701af849a7321914) , ROM_GROUPWORD | ROM_SKIP(6) )
2905   ROMX_LOAD( "dd2.14m",   0x1000000, 0x200000, CRC(6d824ce2) SHA1(0ccfe6c8a944937718e28a1a373b5822c7b7001b) , ROM_GROUPWORD | ROM_SKIP(6) )
2906   ROMX_LOAD( "dd2.16m",   0x1000002, 0x200000, CRC(79682ae5) SHA1(ee84f4791c29ce9e2bae06ba3ec47ff4d2cd7054) , ROM_GROUPWORD | ROM_SKIP(6) )
2907   ROMX_LOAD( "dd2.18m",   0x1000004, 0x200000, CRC(acddd149) SHA1(7f50de9b2d1cc733594c642be1804190519caffa) , ROM_GROUPWORD | ROM_SKIP(6) )
2908   ROMX_LOAD( "dd2.20m",   0x1000006, 0x200000, CRC(117fb0c0) SHA1(15c01fa1a71b6469b0e1bde0ce5835c5ff9d938c) , ROM_GROUPWORD | ROM_SKIP(6) )
2909
2910   ROM_REGION( QSOUND_SIZE, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
2911   ROM_LOAD( "dd2.01",   0x00000, 0x08000, CRC(99d657e5) SHA1(1528dd6b07a0e79951a35c0457c8a9c9770e9c78) )
2912   ROM_CONTINUE(         0x10000, 0x18000 )
2913   ROM_LOAD( "dd2.02",   0x28000, 0x20000, CRC(117a3824) SHA1(14f3a12170b601c5466c93af9d2f24e0b386b4e4) )
2914
2915   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
2916   ROM_LOAD16_WORD_SWAP( "dd2.11m",   0x000000, 0x200000, CRC(98d0c325) SHA1(7406e8d943d77c468eb418c4113261f4ab973bbf) )
2917   ROM_LOAD16_WORD_SWAP( "dd2.12m",   0x200000, 0x200000, CRC(5ea2e7fa) SHA1(0e6a9fd007f637adcb2226c902394f07de45e803) )
2918ROM_END
2919
29202888ROM_START( ddsomb )
29212889   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
29222890   ROM_LOAD16_WORD_SWAP( "dd2b.03a", 0x000000, 0x80000, CRC(e8ce7fbb) SHA1(645133fb07b34f663709896a0f55a9a51de4ee9b) )
r242703r242704
87618729GAME( 1996, ddsomj,     ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960619)", GAME_SUPPORTS_SAVE )
87628730GAME( 1996, ddsomjr1,   ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960206)", GAME_SUPPORTS_SAVE )
87638731GAME( 1996, ddsoma,     ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Asia 960619)", GAME_SUPPORTS_SAVE )
8764GAME( 1996, ddsomar1,   ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Asia 960208)", GAME_SUPPORTS_SAVE )
87658732GAME( 1996, ddsomh,     ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Hispanic 960223)", GAME_SUPPORTS_SAVE )
87668733GAME( 1996, ddsomb,     ddsom,    cps2, cps2_4p4b, cps_state, cps2,     ROT0,   "Capcom", "Dungeons & Dragons: Shadow over Mystara (Brazil 960223)", GAME_SUPPORTS_SAVE )
87678734GAME( 1996, sfa2,       0,        cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Alpha 2 (Euro 960229)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/cultures.c
r242703r242704
185185ADDRESS_MAP_END
186186
187187static ADDRESS_MAP_START( vrambank_map, AS_PROGRAM, 8, cultures_state )
188   AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(bg0_videoram_w) AM_SHARE("bg0_videoram")
188   AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(bg0_videoram_w) AM_SHARE("bg0_videoram")   
189189   AM_RANGE(0x4000, 0x6fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
190190ADDRESS_MAP_END
191191
trunk/src/mame/drivers/dreamwld.c
r242703r242704
383383
384384READ32_MEMBER(dreamwld_state::dreamwld_protdata_r)
385385{
386//  static int count = 0;
386//   static int count = 0;
387387
388388   UINT8 *protdata = memregion("user1")->base();
389389   size_t protsize = memregion("user1")->bytes();
390390   UINT8 dat = protdata[(m_protindex++) % protsize];
391391
392//  printf("protection read %04x %02x\n", count, dat);
393//  count++;
392//   printf("protection read %04x %02x\n", count, dat);
393//   count++;
394394
395395   // real hw returns 00 after end of data, I haven't checked if it's possible to overflow the read counter
396396   // and read out the internal rom.
r242703r242704
614614   PORT_START("DSW")
615615   PORT_DIPUNUSED_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW2:1" ) /* As listed in service mode, but tested */
616616   PORT_DIPUNUSED_DIPLOC( 0x0002, IP_ACTIVE_LOW, "SW2:2" ) /* These might have some use, requires investigation of code */
617   PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW2:3" )
618   PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW2:4" )
619   PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW2:5" )
620   PORT_DIPNAME( 0x0060, 0x0060, "Ticket Payout" )         PORT_DIPLOCATION("SW2:6,7")
621   PORT_DIPSETTING(      0x0000, DEF_STR( No ) )
622   PORT_DIPSETTING(      0x0020, "Little" )
623   PORT_DIPSETTING(      0x0060, DEF_STR( Normal ) )
624   PORT_DIPSETTING(      0x0040, "Much" )
625   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )    PORT_DIPLOCATION("SW2:8")
626   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
627   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
628   PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW1:1") /* Has no effect?? */
629   PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
630   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
631   PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:2,3,4")
632   PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
633   PORT_DIPSETTING(      0x0200, DEF_STR( 4C_1C ) )
634   PORT_DIPSETTING(      0x0400, DEF_STR( 3C_1C ) )
635   PORT_DIPSETTING(      0x0600, DEF_STR( 2C_1C ) )
636   PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
637   PORT_DIPSETTING(      0x0a00, DEF_STR( 2C_3C ) )
638   PORT_DIPSETTING(      0x0c00, DEF_STR( 1C_2C ) )
639   PORT_DIPSETTING(      0x0800, DEF_STR( 1C_3C ) )
640   PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW1:5,6,7")
641   PORT_DIPSETTING(      0x2000, "Level 1" )
642   PORT_DIPSETTING(      0x1000, "Level 2" )
643   PORT_DIPSETTING(      0x0000, "Level 3" )
644   PORT_DIPSETTING(      0x7000, "Level 4" )
645   PORT_DIPSETTING(      0x6000, "Level 5" )
646   PORT_DIPSETTING(      0x5000, "Level 6" )
647   PORT_DIPSETTING(      0x4000, "Level 7" )
648   PORT_DIPSETTING(      0x3000, "Level 8" )
649   PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW1:8" )
617    PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW2:3" )
618    PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW2:4" )
619    PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW2:5" )
620    PORT_DIPNAME( 0x0060, 0x0060, "Ticket Payout" )         PORT_DIPLOCATION("SW2:6,7")
621    PORT_DIPSETTING(      0x0000, DEF_STR( No ) )
622    PORT_DIPSETTING(      0x0020, "Little" )
623    PORT_DIPSETTING(      0x0060, DEF_STR( Normal ) )
624    PORT_DIPSETTING(      0x0040, "Much" )
625    PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )    PORT_DIPLOCATION("SW2:8")
626    PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
627    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
628    PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW1:1") /* Has no effect?? */
629    PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
630    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
631    PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:2,3,4")
632    PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
633    PORT_DIPSETTING(      0x0200, DEF_STR( 4C_1C ) )
634    PORT_DIPSETTING(      0x0400, DEF_STR( 3C_1C ) )
635    PORT_DIPSETTING(      0x0600, DEF_STR( 2C_1C ) )
636    PORT_DIPSETTING(      0x0e00, DEF_STR( 1C_1C ) )
637    PORT_DIPSETTING(      0x0a00, DEF_STR( 2C_3C ) )
638    PORT_DIPSETTING(      0x0c00, DEF_STR( 1C_2C ) )
639    PORT_DIPSETTING(      0x0800, DEF_STR( 1C_3C ) )
640    PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW1:5,6,7")
641    PORT_DIPSETTING(      0x2000, "Level 1" )
642    PORT_DIPSETTING(      0x1000, "Level 2" )
643    PORT_DIPSETTING(      0x0000, "Level 3" )
644    PORT_DIPSETTING(      0x7000, "Level 4" )
645    PORT_DIPSETTING(      0x6000, "Level 5" )
646    PORT_DIPSETTING(      0x5000, "Level 6" )
647    PORT_DIPSETTING(      0x4000, "Level 7" )
648    PORT_DIPSETTING(      0x3000, "Level 8" )
649    PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW1:8" )
650650INPUT_PORTS_END
651651
652652
r242703r242704
10731073GAME( 1997, baryon,   0,      baryon,   baryon,   driver_device, 0, ROT270, "SemiCom",         "Baryon - Future Assault (set 1)", GAME_SUPPORTS_SAVE )
10741074GAME( 1997, baryona,  baryon, baryon,   baryon,   driver_device, 0, ROT270, "SemiCom",         "Baryon - Future Assault (set 2)", GAME_SUPPORTS_SAVE )
10751075GAME( 1998, cutefght, 0,      dreamwld, cutefght, driver_device, 0, ROT0,   "SemiCom",         "Cute Fighter", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) // wrong linescroll?
1076GAME( 1999, rolcrush, 0,      baryon,   rolcrush, driver_device, 0, ROT0,   "Trust / SemiCom", "Rolling Crush (version 1.07.E - 1999/02/11)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) // wrong
1076GAME( 1999, rolcrush, 0,      baryon,   rolcrush, driver_device, 0, ROT0,   "Trust / SemiCom", "Rolling Crush (version 1.07.E - 1999/02/11)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) // wrong
10771077GAME( 2000, dreamwld, 0,      dreamwld, dreamwld, driver_device, 0, ROT0,   "SemiCom",         "Dream World", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/ecoinfr.c
r242703r242704
786786   MCFG_ECOIN_200STEP_ADD("reel2")
787787   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinfr_state, reel2_optic_cb))
788788   MCFG_ECOIN_200STEP_ADD("reel3")
789   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinfr_state, reel3_optic_cb))
789   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(ecoinfr_state, reel3_optic_cb))   
790790MACHINE_CONFIG_END
791791
792792
trunk/src/mame/drivers/f-32.c
r242703r242704
2727
2828   /* devices */
2929   required_device<e132xn_device>  m_maincpu;
30
30   
3131   /* memory pointers */
3232   required_shared_ptr<UINT32> m_videoram;
33
33   
3434   DECLARE_READ32_MEMBER(f32_input_port_1_r);
3535   UINT32 screen_update_mosaicf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3636};
trunk/src/mame/drivers/galpani2.c
r242703r242704
7171     PISCES - NEC uPD78324 series MCU with 32k internal rom. Clock 13.500MHz [27/2] on pins 51 & 52
7272      VSync - 59.1856Hz
7373      HSync - 15.625kHz
74
74     
7575      (TODO: VTOTAL = 264, HTOTAL = 432, pixel clock 27 MHz / 4)
76
76     
7777***************************************************************************/
7878
7979#include "emu.h"
r242703r242704
346346   AM_RANGE(0x300000, 0x301fff) AM_RAM                                             // ?
347347   AM_RANGE(0x302000, 0x303fff) AM_RAM AM_SHARE("spriteram")   // Sprites
348348   AM_RANGE(0x304000, 0x30401f) AM_DEVREADWRITE("kan_spr", kaneko16_sprite_device, kaneko16_sprites_regs_r, kaneko16_sprites_regs_w)
349//  AM_RANGE(0x308000, 0x308001) AM_WRITENOP                                        // ? 0 at startup
350//  AM_RANGE(0x30c000, 0x30c001) AM_WRITENOP                                        // ? hblank effect ?
349//   AM_RANGE(0x308000, 0x308001) AM_WRITENOP                                        // ? 0 at startup
350//   AM_RANGE(0x30c000, 0x30c001) AM_WRITENOP                                        // ? hblank effect ?
351351   AM_RANGE(0x310000, 0x3101ff) AM_RAM_DEVWRITE("bg8palette", palette_device, write) AM_SHARE("bg8palette")    // ?
352352   AM_RANGE(0x314000, 0x314001) AM_WRITENOP                                        // ? flip backgrounds ?
353353   AM_RANGE(0x318000, 0x318001) AM_READWRITE(galpani2_eeprom_r, galpani2_eeprom_w) // EEPROM
354354   AM_RANGE(0x380000, 0x387fff) AM_RAM                                             // Palette?
355355   AM_RANGE(0x388000, 0x38ffff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")   // Palette
356//  AM_RANGE(0x390000, 0x3901ff) AM_WRITENOP                                        // ? at startup of service mode
356//   AM_RANGE(0x390000, 0x3901ff) AM_WRITENOP                                        // ? at startup of service mode
357357
358358   AM_RANGE(0x400000, 0x43ffff) AM_RAM AM_SHARE("bg8.0")    // Background 0
359359   AM_RANGE(0x440000, 0x440001) AM_RAM AM_SHARE("bg8_scrollx.0")           // Background 0 Scroll X
360360   AM_RANGE(0x480000, 0x480001) AM_RAM AM_SHARE("bg8_scrolly.0")           // Background 0 Scroll Y
361//  AM_RANGE(0x4c0000, 0x4c0001) AM_WRITENOP                                        // ? 0 at startup only
361//   AM_RANGE(0x4c0000, 0x4c0001) AM_WRITENOP                                        // ? 0 at startup only
362362   AM_RANGE(0x500000, 0x53ffff) AM_RAM AM_SHARE("bg8.1")    // Background 1
363363   AM_RANGE(0x540000, 0x540001) AM_RAM AM_SHARE("bg8_scrollx.1")           // Background 1 Scroll X
364364   AM_RANGE(0x580000, 0x580001) AM_RAM AM_SHARE("bg8_scrolly.1")           // Background 1 Scroll Y
365//  AM_RANGE(0x5c0000, 0x5c0001) AM_WRITENOP                                        // ? 0 at startup only
365//   AM_RANGE(0x5c0000, 0x5c0001) AM_WRITENOP                                        // ? 0 at startup only
366366
367367   AM_RANGE(0x540572, 0x540573) AM_READNOP                                         // ? galpani2 at F0A4
368368   AM_RANGE(0x54057a, 0x54057b) AM_READNOP                                         // ? galpani2 at F148
r242703r242704
411411   AM_RANGE(0x000000, 0x03ffff) AM_ROM                                                             // ROM
412412   AM_RANGE(0x100000, 0x13ffff) AM_RAM AM_SHARE("ram2")                                        // Work RAM
413413   AM_RANGE(0x400000, 0x5fffff) AM_RAM AM_SHARE("bg15")  // bg15
414//  AM_RANGE(0x600000, 0x600001) AM_NOP // ? 0 at startup only
415//  AM_RANGE(0x640000, 0x640001) AM_WRITENOP                                // ? 0 at startup only
416//  AM_RANGE(0x680000, 0x680001) AM_WRITENOP                                // ? 0 at startup only
417//  AM_RANGE(0x6c0000, 0x6c0001) AM_WRITENOP                                // ? 0 at startup only
414//   AM_RANGE(0x600000, 0x600001) AM_NOP // ? 0 at startup only
415//   AM_RANGE(0x640000, 0x640001) AM_WRITENOP                                // ? 0 at startup only
416//   AM_RANGE(0x680000, 0x680001) AM_WRITENOP                                // ? 0 at startup only
417//   AM_RANGE(0x6c0000, 0x6c0001) AM_WRITENOP                                // ? 0 at startup only
418418   AM_RANGE(0x700000, 0x700001) AM_NOP                                 // Watchdog
419419//  AM_RANGE(0x740000, 0x740001) AM_WRITENOP                                // ? Reset mcu
420420   AM_RANGE(0x780000, 0x780001) AM_WRITE8(galpani2_mcu_nmi2_w, 0x00ff)             // ? 0 -> 1 -> 0 (lev 5)
r242703r242704
520520   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
521521   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
522522   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
523   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE2  ) // this button is used in gp2se as an alt way to bring up the service menu, booting with it held down breaks the game tho!
523    PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE2  ) // this button is used in gp2se as an alt way to bring up the service menu, booting with it held down breaks the game tho!
524524   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT     )
525525   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 )
526526
trunk/src/mame/drivers/gts1.c
r242703r242704
8484class gts1_state : public genpin_class
8585{
8686public:
87   gts1_state(const machine_config &mconfig, device_type type, const char *tag)
88      : genpin_class(mconfig, type, tag)
89      , m_maincpu(*this, "maincpu")
90      , m_switches(*this, "X")
91   { }
87    gts1_state(const machine_config &mconfig, device_type type, const char *tag)
88        : genpin_class(mconfig, type, tag)
89        , m_maincpu(*this, "maincpu")
90        , m_switches(*this, "X")
91    { }
9292
93   DECLARE_DRIVER_INIT(gts1);
93    DECLARE_DRIVER_INIT(gts1);
9494
95   DECLARE_READ8_MEMBER (gts1_solenoid_r);
96   DECLARE_WRITE8_MEMBER(gts1_solenoid_w);
97   DECLARE_READ8_MEMBER (gts1_switches_r);
98   DECLARE_WRITE8_MEMBER(gts1_switches_w);
99   DECLARE_WRITE8_MEMBER(gts1_display_w);
100   DECLARE_READ8_MEMBER (gts1_lamp_apm_r);
101   DECLARE_WRITE8_MEMBER(gts1_lamp_apm_w);
102   DECLARE_READ8_MEMBER (gts1_nvram_r);
103   DECLARE_WRITE8_MEMBER(gts1_nvram_w);
104   DECLARE_READ8_MEMBER (gts1_io_r);
105   DECLARE_WRITE8_MEMBER(gts1_io_w);
106   DECLARE_READ8_MEMBER (gts1_pa_r);
107   DECLARE_WRITE8_MEMBER(gts1_pa_w);
108   DECLARE_WRITE8_MEMBER(gts1_pb_w);
95    DECLARE_READ8_MEMBER (gts1_solenoid_r);
96    DECLARE_WRITE8_MEMBER(gts1_solenoid_w);
97    DECLARE_READ8_MEMBER (gts1_switches_r);
98    DECLARE_WRITE8_MEMBER(gts1_switches_w);
99    DECLARE_WRITE8_MEMBER(gts1_display_w);
100    DECLARE_READ8_MEMBER (gts1_lamp_apm_r);
101    DECLARE_WRITE8_MEMBER(gts1_lamp_apm_w);
102    DECLARE_READ8_MEMBER (gts1_nvram_r);
103    DECLARE_WRITE8_MEMBER(gts1_nvram_w);
104    DECLARE_READ8_MEMBER (gts1_io_r);
105    DECLARE_WRITE8_MEMBER(gts1_io_w);
106    DECLARE_READ8_MEMBER (gts1_pa_r);
107    DECLARE_WRITE8_MEMBER(gts1_pa_w);
108    DECLARE_WRITE8_MEMBER(gts1_pb_w);
109109private:
110   virtual void machine_reset();
111   required_device<cpu_device> m_maincpu;
112   required_ioport_array<5> m_switches;
113   UINT8 m_strobe;             //!< switches strobe lines (5 lower bits used)
114   UINT8 m_nvram_addr;         //!< NVRAM address
115   bool m_nvram_e2;            //!< NVRWAM enable (E2 line)
116   bool m_nvram_wr;            //!< NVRWAM write (W/R line)
117   UINT16 m_6351_addr;         //!< ROM MM6351 address (12 bits)
118   UINT16 m_z30_out;           //!< 4-to-16 decoder outputs
110    virtual void machine_reset();
111    required_device<cpu_device> m_maincpu;
112    required_ioport_array<5> m_switches;
113    UINT8 m_strobe;             //!< switches strobe lines (5 lower bits used)
114    UINT8 m_nvram_addr;         //!< NVRAM address
115    bool m_nvram_e2;            //!< NVRWAM enable (E2 line)
116    bool m_nvram_wr;            //!< NVRWAM write (W/R line)
117    UINT16 m_6351_addr;         //!< ROM MM6351 address (12 bits)
118    UINT16 m_z30_out;           //!< 4-to-16 decoder outputs
119119};
120120
121121static ADDRESS_MAP_START( gts1_map, AS_PROGRAM, 8, gts1_state )
122   AM_RANGE(0x0000, 0x0fff) AM_ROM
122    AM_RANGE(0x0000, 0x0fff) AM_ROM
123123ADDRESS_MAP_END
124124
125125static ADDRESS_MAP_START( gts1_data, AS_DATA, 8, gts1_state )
126   AM_RANGE(0x0000, 0x00ff) AM_RAM
127   AM_RANGE(0x0100, 0x01ff) AM_RAM AM_SHARE("nvram")
126    AM_RANGE(0x0000, 0x00ff) AM_RAM
127    AM_RANGE(0x0100, 0x01ff) AM_RAM AM_SHARE("nvram")
128128ADDRESS_MAP_END
129129
130130static ADDRESS_MAP_START( gts1_io, AS_IO, 8, gts1_state )
131   AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "u4", ra17xx_device, io_r, io_w ) // (U4) solenoid
132   AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips
133   AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix
134   AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip
135   AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "u6", r10788_device, io_r, io_w ) // (U6) display chip
136   AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w )         // catch undecoded I/O accesss
137   AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w )         // CPU I/O port A (input/output)
138   AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w )                               // CPU I/O port B (output only)
131    AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "u4", ra17xx_device, io_r, io_w ) // (U4) solenoid
132    AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips
133    AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix
134    AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip
135    AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "u6", r10788_device, io_r, io_w ) // (U6) display chip
136    AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w )         // catch undecoded I/O accesss
137    AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w )         // CPU I/O port A (input/output)
138    AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w )                               // CPU I/O port B (output only)
139139ADDRESS_MAP_END
140140
141141static INPUT_PORTS_START( gts1_dips )
142   PORT_START("DSW0")
143   PORT_DIPNAME( 0x01, 0x00, "S01")
144   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
145   PORT_DIPSETTING(    0x01, DEF_STR( On ))
146   PORT_DIPNAME( 0x02, 0x00, "S02")
147   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
148   PORT_DIPSETTING(    0x02, DEF_STR( On ))
149   PORT_DIPNAME( 0x04, 0x00, "S03")
150   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
151   PORT_DIPSETTING(    0x04, DEF_STR( On ))
152   PORT_DIPNAME( 0x08, 0x00, "S04")
153   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
154   PORT_DIPSETTING(    0x08, DEF_STR( On ))
155   PORT_DIPNAME( 0x10, 0x00, "S05")
156   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
157   PORT_DIPSETTING(    0x10, DEF_STR( On ))
158   PORT_DIPNAME( 0x20, 0x20, "S06")
159   PORT_DIPSETTING(    0x00, DEF_STR( No ))
160   PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
161   PORT_DIPNAME( 0x40, 0x40, "S07")
162   PORT_DIPSETTING(    0x00, DEF_STR( No ))
163   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
164   PORT_DIPNAME( 0x80, 0x80, "S08")
165   PORT_DIPSETTING(    0x00, DEF_STR( No ))
166   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
142    PORT_START("DSW0")
143    PORT_DIPNAME( 0x01, 0x00, "S01")
144    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
145    PORT_DIPSETTING(    0x01, DEF_STR( On ))
146    PORT_DIPNAME( 0x02, 0x00, "S02")
147    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
148    PORT_DIPSETTING(    0x02, DEF_STR( On ))
149    PORT_DIPNAME( 0x04, 0x00, "S03")
150    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
151    PORT_DIPSETTING(    0x04, DEF_STR( On ))
152    PORT_DIPNAME( 0x08, 0x00, "S04")
153    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
154    PORT_DIPSETTING(    0x08, DEF_STR( On ))
155    PORT_DIPNAME( 0x10, 0x00, "S05")
156    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
157    PORT_DIPSETTING(    0x10, DEF_STR( On ))
158    PORT_DIPNAME( 0x20, 0x20, "S06")
159    PORT_DIPSETTING(    0x00, DEF_STR( No ))
160    PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
161    PORT_DIPNAME( 0x40, 0x40, "S07")
162    PORT_DIPSETTING(    0x00, DEF_STR( No ))
163    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
164    PORT_DIPNAME( 0x80, 0x80, "S08")
165    PORT_DIPSETTING(    0x00, DEF_STR( No ))
166    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
167167
168   PORT_START("DSW1")
169   PORT_DIPNAME( 0x01, 0x00, "S09")
170   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
171   PORT_DIPSETTING(    0x01, DEF_STR( On ))
172   PORT_DIPNAME( 0x02, 0x00, "S10")
173   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
174   PORT_DIPSETTING(    0x02, DEF_STR( On ))
175   PORT_DIPNAME( 0x04, 0x00, "S11")
176   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
177   PORT_DIPSETTING(    0x04, DEF_STR( On ))
178   PORT_DIPNAME( 0x08, 0x00, "S12")
179   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
180   PORT_DIPSETTING(    0x08, DEF_STR( On ))
181   PORT_DIPNAME( 0x10, 0x00, "S13")
182   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
183   PORT_DIPSETTING(    0x10, DEF_STR( On ))
184   PORT_DIPNAME( 0x20, 0x00, "S14")
185   PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
186   PORT_DIPSETTING(    0x20, DEF_STR( No ))
187   PORT_DIPNAME( 0x40, 0x40, "S15")
188   PORT_DIPSETTING(    0x00, DEF_STR( No ))
189   PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
190   PORT_DIPNAME( 0x80, 0x00, "S16")
191   PORT_DIPSETTING(    0x00, DEF_STR( No ))
192   PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
168    PORT_START("DSW1")
169    PORT_DIPNAME( 0x01, 0x00, "S09")
170    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
171    PORT_DIPSETTING(    0x01, DEF_STR( On ))
172    PORT_DIPNAME( 0x02, 0x00, "S10")
173    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
174    PORT_DIPSETTING(    0x02, DEF_STR( On ))
175    PORT_DIPNAME( 0x04, 0x00, "S11")
176    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
177    PORT_DIPSETTING(    0x04, DEF_STR( On ))
178    PORT_DIPNAME( 0x08, 0x00, "S12")
179    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
180    PORT_DIPSETTING(    0x08, DEF_STR( On ))
181    PORT_DIPNAME( 0x10, 0x00, "S13")
182    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
183    PORT_DIPSETTING(    0x10, DEF_STR( On ))
184    PORT_DIPNAME( 0x20, 0x00, "S14")
185    PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
186    PORT_DIPSETTING(    0x20, DEF_STR( No ))
187    PORT_DIPNAME( 0x40, 0x40, "S15")
188    PORT_DIPSETTING(    0x00, DEF_STR( No ))
189    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
190    PORT_DIPNAME( 0x80, 0x00, "S16")
191    PORT_DIPSETTING(    0x00, DEF_STR( No ))
192    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
193193
194   PORT_START("DSW2")
195   PORT_DIPNAME( 0x01, 0x00, "S17")
196   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
197   PORT_DIPSETTING(    0x01, DEF_STR( On ))
198   PORT_DIPNAME( 0x02, 0x00, "S18")
199   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
200   PORT_DIPSETTING(    0x02, DEF_STR( On ))
201   PORT_DIPNAME( 0x04, 0x00, "S19")
202   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
203   PORT_DIPSETTING(    0x04, DEF_STR( On ))
204   PORT_DIPNAME( 0x08, 0x00, "S20")
205   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
206   PORT_DIPSETTING(    0x08, DEF_STR( On ))
207   PORT_DIPNAME( 0x10, 0x00, "S21")
208   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
209   PORT_DIPSETTING(    0x10, DEF_STR( On ))
210   PORT_DIPNAME( 0x20, 0x00, "S22")
211   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
212   PORT_DIPSETTING(    0x20, DEF_STR( On ))
213   PORT_DIPNAME( 0x40, 0x00, "S23")
214   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
215   PORT_DIPSETTING(    0x40, DEF_STR( On ))
216   PORT_DIPNAME( 0x80, 0x00, "S24")
217   PORT_DIPSETTING(    0x00, DEF_STR( Off ))
218   PORT_DIPSETTING(    0x80, DEF_STR( On ))
194    PORT_START("DSW2")
195    PORT_DIPNAME( 0x01, 0x00, "S17")
196    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
197    PORT_DIPSETTING(    0x01, DEF_STR( On ))
198    PORT_DIPNAME( 0x02, 0x00, "S18")
199    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
200    PORT_DIPSETTING(    0x02, DEF_STR( On ))
201    PORT_DIPNAME( 0x04, 0x00, "S19")
202    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
203    PORT_DIPSETTING(    0x04, DEF_STR( On ))
204    PORT_DIPNAME( 0x08, 0x00, "S20")
205    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
206    PORT_DIPSETTING(    0x08, DEF_STR( On ))
207    PORT_DIPNAME( 0x10, 0x00, "S21")
208    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
209    PORT_DIPSETTING(    0x10, DEF_STR( On ))
210    PORT_DIPNAME( 0x20, 0x00, "S22")
211    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
212    PORT_DIPSETTING(    0x20, DEF_STR( On ))
213    PORT_DIPNAME( 0x40, 0x00, "S23")
214    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
215    PORT_DIPSETTING(    0x40, DEF_STR( On ))
216    PORT_DIPNAME( 0x80, 0x00, "S24")
217    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
218    PORT_DIPSETTING(    0x80, DEF_STR( On ))
219219INPUT_PORTS_END
220220
221221static INPUT_PORTS_START( gts1_switches )
222   PORT_START("X.0")
223   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
224   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
225   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
226   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
227   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
228   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
229   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
230   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
231   PORT_START("X.1")
232   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
233   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
234   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
235   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
236   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
237   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
238   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
239   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
240   PORT_START("X.2")
241   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
242   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
243   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
244   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
245   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
246   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
247   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
248   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
249   PORT_START("X.3")
250   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
251   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
252   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
253   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
254   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
255   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
256   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
257   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
258   PORT_START("X.4")
259   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
260   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
261   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
262   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
263   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
264   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
265   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
266   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
222    PORT_START("X.0")
223    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
224    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
225    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
226    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
227    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
228    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
229    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
230    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
231    PORT_START("X.1")
232    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
233    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
234    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
235    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
236    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
237    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
238    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
239    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
240    PORT_START("X.2")
241    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
242    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
243    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
244    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
245    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
246    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
247    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
248    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
249    PORT_START("X.3")
250    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
251    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
252    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
253    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
254    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
255    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
256    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
257    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
258    PORT_START("X.4")
259    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER)
260    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
261    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
262    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
263    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER)
264    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER)
265    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
266    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
267267INPUT_PORTS_END
268268
269269static INPUT_PORTS_START( gts1 )
270   PORT_INCLUDE( gts1_dips )
270    PORT_INCLUDE( gts1_dips )
271271
272   PORT_INCLUDE( gts1_switches )
272    PORT_INCLUDE( gts1_switches )
273273INPUT_PORTS_END
274274
275275static INPUT_PORTS_START( jokrpokr )
276   PORT_INCLUDE( gts1_dips )
276    PORT_INCLUDE( gts1_dips )
277277
278   PORT_START("X.0")
279   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PLAY/TEST")
280   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("POP/BUMBER")
281   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXTRA BALL TARGET")
282   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SPECIAL ROLLOVER")
283   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("10 POINT CONTACTS")
284   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
285   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
286   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
278    PORT_START("X.0")
279    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PLAY/TEST")
280    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("POP/BUMBER")
281    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXTRA BALL TARGET")
282    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SPECIAL ROLLOVER")
283    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("10 POINT CONTACTS")
284    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
285    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
286    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
287287
288   PORT_START("X.1")
289   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#1 COIN CHUTE")
290   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" ROLLOVER")
291   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"10\" DROP TARGET")
292   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"Q\" DROP TARGET (red)")
293   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET (black)")
294   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (black)")
295   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
296   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
288    PORT_START("X.1")
289    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#1 COIN CHUTE")
290    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" ROLLOVER")
291    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"10\" DROP TARGET")
292    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"Q\" DROP TARGET (red)")
293    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET (black)")
294    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (black)")
295    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
296    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
297297
298   PORT_START("X.2")
299   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#2 COIN CHUTE")
300   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"B\" ROLLOVER")
301   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (black)")
302   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (black)")
303   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
304   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("JOKER DROP TARGET")
305   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
306   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
298    PORT_START("X.2")
299    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#2 COIN CHUTE")
300    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"B\" ROLLOVER")
301    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (black)")
302    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (black)")
303    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
304    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("JOKER DROP TARGET")
305    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
306    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
307307
308   PORT_START("X.3")
309   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("REPLAY BUTTON")
310   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"C\" ROLLOVER")
311   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (red)")
312   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (red)")
313   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
314   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
315   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
316   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
308    PORT_START("X.3")
309    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("REPLAY BUTTON")
310    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"C\" ROLLOVER")
311    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (red)")
312    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (red)")
313    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
314    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
315    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
316    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
317317
318   PORT_START("X.4")
319   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TILT PANEL")
320   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
321   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
322   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
323   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
324   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
325   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
326   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
318    PORT_START("X.4")
319    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TILT PANEL")
320    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
321    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
322    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
323    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
324    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
325    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
326    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
327327INPUT_PORTS_END
328328
329329void gts1_state::machine_reset()
330330{
331   m_strobe = 0;
332   m_nvram_addr = 0;
333   m_nvram_e2 = false;
334   m_nvram_wr = false;
335   m_6351_addr = 0;
336   m_z30_out = 0;
331    m_strobe = 0;
332    m_nvram_addr = 0;
333    m_nvram_e2 = false;
334    m_nvram_wr = false;
335    m_6351_addr = 0;
336    m_z30_out = 0;
337337}
338338
339339DRIVER_INIT_MEMBER(gts1_state,gts1)
r242703r242704
342342
343343READ8_MEMBER (gts1_state::gts1_solenoid_r)
344344{
345   UINT8 data = 0;
346   LOG(("%s: solenoid[%02x] -> %x\n", __FUNCTION__, offset, data));
347   return data;
345    UINT8 data = 0;
346    LOG(("%s: solenoid[%02x] -> %x\n", __FUNCTION__, offset, data));
347    return data;
348348}
349349
350350WRITE8_MEMBER(gts1_state::gts1_solenoid_w)
351351{
352   switch (offset)
353   {
354   case  0:
355      LOG(("%s: outhole <- %x\n", __FUNCTION__, data));
356      break;
357   case  1:
358      LOG(("%s: knocker <- %x\n", __FUNCTION__, data));
359      break;
360   case  2:
361      LOG(("%s: tens chime <- %x\n", __FUNCTION__, data));
362      break;
363   case  3:
364      LOG(("%s: hundreds chime <- %x\n", __FUNCTION__, data));
365      break;
366   case  4:
367      LOG(("%s: thousands chime <- %x\n", __FUNCTION__, data));
368      break;
369   case  5:
370      LOG(("%s: no. 6 <- %x\n", __FUNCTION__, data));
371      break;
372   case  6:
373      LOG(("%s: no. 7 <- %x\n", __FUNCTION__, data));
374      break;
375   case  7:
376      LOG(("%s: no. 8 <- %x\n", __FUNCTION__, data));
377      break;
378   case  8: case  9: case 10: case 11:
379      LOG(("%s: not used [%x] <- %x\n", __FUNCTION__, offset, data));
380      break;
381   case 12:    // spare
382      LOG(("%s: spare [%x] <- %x\n", __FUNCTION__, offset, data));
383      break;
384   case 13:    // RAM control E2
385      LOG(("%s: RAM control E2 <- %x\n", __FUNCTION__, data));
386      m_nvram_e2 = (data & 1) ? true : false;
387      break;
388   case 14:    // RAM control W/R
389      LOG(("%s: RAM control W/R <- %x\n", __FUNCTION__, data));
390      break;
391      m_nvram_wr = (data & 1) ? true : false;
392   case 15:    // spare
393      LOG(("%s: spare [%x] <- %x\n", __FUNCTION__, offset, data));
394      break;
395   }
352    switch (offset)
353    {
354    case  0:
355        LOG(("%s: outhole <- %x\n", __FUNCTION__, data));
356        break;
357    case  1:
358        LOG(("%s: knocker <- %x\n", __FUNCTION__, data));
359        break;
360    case  2:
361        LOG(("%s: tens chime <- %x\n", __FUNCTION__, data));
362        break;
363    case  3:
364        LOG(("%s: hundreds chime <- %x\n", __FUNCTION__, data));
365        break;
366    case  4:
367        LOG(("%s: thousands chime <- %x\n", __FUNCTION__, data));
368        break;
369    case  5:
370        LOG(("%s: no. 6 <- %x\n", __FUNCTION__, data));
371        break;
372    case  6:
373        LOG(("%s: no. 7 <- %x\n", __FUNCTION__, data));
374        break;
375    case  7:
376        LOG(("%s: no. 8 <- %x\n", __FUNCTION__, data));
377        break;
378    case  8: case  9: case 10: case 11:
379        LOG(("%s: not used [%x] <- %x\n", __FUNCTION__, offset, data));
380        break;
381    case 12:    // spare
382        LOG(("%s: spare [%x] <- %x\n", __FUNCTION__, offset, data));
383        break;
384    case 13:    // RAM control E2
385        LOG(("%s: RAM control E2 <- %x\n", __FUNCTION__, data));
386        m_nvram_e2 = (data & 1) ? true : false;
387        break;
388    case 14:    // RAM control W/R
389        LOG(("%s: RAM control W/R <- %x\n", __FUNCTION__, data));
390        break;
391        m_nvram_wr = (data & 1) ? true : false;
392    case 15:    // spare
393        LOG(("%s: spare [%x] <- %x\n", __FUNCTION__, offset, data));
394        break;
395    }
396396}
397397
398398READ8_MEMBER (gts1_state::gts1_switches_r)
399399{
400   UINT8 data = 1;
401   if (offset >= 8 && offset < 16) {
402      const int bit = offset - 8;
403      for (int i = 0; i < 5; i++) {
404         if (m_strobe & (1 << i)) {
405            data &= BIT(m_switches[i]->read(), bit);
406         }
407      }
408   }
409   LOG(("%s: switches[%x,%x] -> %x\n", __FUNCTION__, m_strobe, offset, data));
410   return data;
400    UINT8 data = 1;
401    if (offset >= 8 && offset < 16) {
402        const int bit = offset - 8;
403        for (int i = 0; i < 5; i++) {
404            if (m_strobe & (1 << i)) {
405                data &= BIT(m_switches[i]->read(), bit);
406            }
407        }
408    }
409    LOG(("%s: switches[%x,%x] -> %x\n", __FUNCTION__, m_strobe, offset, data));
410    return data;
411411}
412412
413413WRITE8_MEMBER(gts1_state::gts1_switches_w)
414414{
415   LOG(("%s: switches[%x] <- %x\n", __FUNCTION__, offset, data));
416   if (offset < 5) {
417      // outputs O-0 to O-4 are the 5 strobe lines
418      m_strobe = (m_strobe & ~(1 << offset)) | ((data & 1) << offset);
419   }
415    LOG(("%s: switches[%x] <- %x\n", __FUNCTION__, offset, data));
416    if (offset < 5) {
417        // outputs O-0 to O-4 are the 5 strobe lines
418        m_strobe = (m_strobe & ~(1 << offset)) | ((data & 1) << offset);
419    }
420420}
421421
422422/**
r242703r242704
426426 */
427427WRITE8_MEMBER(gts1_state::gts1_display_w)
428428{
429   /*
430    * The 7448 is modified to be disabled through RI/RBO
431    * when the input is 0001, and in this case the extra
432    * output H is generated instead.
433    */
429    /*
430     * The 7448 is modified to be disabled through RI/RBO
431     * when the input is 0001, and in this case the extra
432     * output H is generated instead.
433     */
434434#define _a (1 << 0)
435435#define _b (1 << 1)
436436#define _c (1 << 2)
r242703r242704
439439#define _f (1 << 5)
440440#define _g (1 << 6)
441441#define _h (1 << 7)
442   static const UINT8 ttl7448_mod[16] = {
443   /* 0 */  _a | _b | _c | _d | _e | _f,
444   /* 1 */  _h,
445   /* 2 */  _a | _b | _d | _e | _g,
446   /* 3 */  _a | _b | _c | _d | _g,
447   /* 4 */  _b | _c | _f | _g,
448   /* 5 */  _a | _c | _d | _f | _g,
449   /* 6 */  _a | _c | _d | _e | _f | _g,
450   /* 7 */  _a | _b | _c,
451   /* 8 */  _a | _b | _c | _d | _e | _f | _g,
452   /* 9 */  _a | _b | _c | _d | _f | _g,
453   /* a */  _d | _e | _g,
454   /* b */  _c | _d | _g,
455   /* c */  _b | _f | _g,
456   /* d */  _a | _d | _f | _g,
457   /* e */  _d | _e | _f | _g,
458   /* f */  0
459   };
460   UINT8 a = ttl7448_mod[(data >> 0) & 15];
461   UINT8 b = ttl7448_mod[(data >> 4) & 15];
462   // LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b));
463   if ((offset % 8) < 7) {
464      output_set_indexed_value("digit8_", offset, a);
465      output_set_indexed_value("digit8_", offset + 16, b);
466   } else {
467      /*
468       * For the 4 7-seg displays the segment h is turned back into
469       * segments b and c to display the 7-seg "1".
470       */
471      if (a & _h)
472         a = _b | _c;
473      if (b & _h)
474         b = _b | _c;
475      output_set_indexed_value("digit7_", offset, a);
476      // FIXME: there is nothing on outputs 22, 23, 30 and 31?
477      output_set_indexed_value("digit7_", offset + 16, b);
478   }
442    static const UINT8 ttl7448_mod[16] = {
443    /* 0 */  _a | _b | _c | _d | _e | _f,
444    /* 1 */  _h,
445    /* 2 */  _a | _b | _d | _e | _g,
446    /* 3 */  _a | _b | _c | _d | _g,
447    /* 4 */  _b | _c | _f | _g,
448    /* 5 */  _a | _c | _d | _f | _g,
449    /* 6 */  _a | _c | _d | _e | _f | _g,
450    /* 7 */  _a | _b | _c,
451    /* 8 */  _a | _b | _c | _d | _e | _f | _g,
452    /* 9 */  _a | _b | _c | _d | _f | _g,
453    /* a */  _d | _e | _g,
454    /* b */  _c | _d | _g,
455    /* c */  _b | _f | _g,
456    /* d */  _a | _d | _f | _g,
457    /* e */  _d | _e | _f | _g,
458    /* f */  0
459    };
460    UINT8 a = ttl7448_mod[(data >> 0) & 15];
461    UINT8 b = ttl7448_mod[(data >> 4) & 15];
462    // LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b));
463    if ((offset % 8) < 7) {
464        output_set_indexed_value("digit8_", offset, a);
465        output_set_indexed_value("digit8_", offset + 16, b);
466    } else {
467        /*
468         * For the 4 7-seg displays the segment h is turned back into
469         * segments b and c to display the 7-seg "1".
470         */
471        if (a & _h)
472            a = _b | _c;
473        if (b & _h)
474            b = _b | _c;
475        output_set_indexed_value("digit7_", offset, a);
476        // FIXME: there is nothing on outputs 22, 23, 30 and 31?
477        output_set_indexed_value("digit7_", offset + 16, b);
478    }
479479#undef _a
480480#undef _b
481481#undef _c
r242703r242704
493493 */
494494READ8_MEMBER (gts1_state::gts1_nvram_r)
495495{
496   UINT8 data = 0x0f;
497   switch (offset)
498   {
499      case 0: // group A
500         // FIXME: Schematics says TO Z5
501         if (!m_nvram_wr && m_nvram_e2) {
502            UINT8* nvram = memregion("nvram")->base();
503            assert(nvram != NULL);
504            data = nvram[m_nvram_addr];
505            LOG(("%s: nvram[%02x] -> %x\n", __FUNCTION__, m_nvram_addr, data));
506         }
507         break;
508      case 1: // group B
509      case 2: // group C
510         // Schematics says: SPARES
511         break;
512   }
513   return data;
496    UINT8 data = 0x0f;
497    switch (offset)
498    {
499        case 0: // group A
500            // FIXME: Schematics says TO Z5
501            if (!m_nvram_wr && m_nvram_e2) {
502                UINT8* nvram = memregion("nvram")->base();
503                assert(nvram != NULL);
504                data = nvram[m_nvram_addr];
505                LOG(("%s: nvram[%02x] -> %x\n", __FUNCTION__, m_nvram_addr, data));
506            }
507            break;
508        case 1: // group B
509        case 2: // group C
510            // Schematics says: SPARES
511            break;
512    }
513    return data;
514514}
515515
516516/**
r242703r242704
520520 */
521521WRITE8_MEMBER(gts1_state::gts1_nvram_w)
522522{
523   switch (offset)
524   {
525      case 0: // group A - address lines 3:0
526         m_nvram_addr = (m_nvram_addr & ~15) | (data & 15);
527         break;
528      case 1: // group B - address lines 7:4
529         m_nvram_addr = (m_nvram_addr & ~(15 << 4)) | ((data & 15) << 4);
530         break;
531      case 2: // group C - data bits 3:0 of NVRAM
532         if (m_nvram_wr && m_nvram_e2) {
533            LOG(("%s: nvram[%02x] <- %x\n", __FUNCTION__, m_nvram_addr, data & 15));
534            UINT8* nvram = memregion("nvram")->base();
535            assert(nvram != NULL);
536            nvram[m_nvram_addr] = data & 15;
537         }
538         break;
539   }
523    switch (offset)
524    {
525        case 0: // group A - address lines 3:0
526            m_nvram_addr = (m_nvram_addr & ~15) | (data & 15);
527            break;
528        case 1: // group B - address lines 7:4
529            m_nvram_addr = (m_nvram_addr & ~(15 << 4)) | ((data & 15) << 4);
530            break;
531        case 2: // group C - data bits 3:0 of NVRAM
532            if (m_nvram_wr && m_nvram_e2) {
533                LOG(("%s: nvram[%02x] <- %x\n", __FUNCTION__, m_nvram_addr, data & 15));
534                UINT8* nvram = memregion("nvram")->base();
535                assert(nvram != NULL);
536                nvram[m_nvram_addr] = data & 15;
537            }
538            break;
539    }
540540}
541541
542542/**
r242703r242704
546546 */
547547READ8_MEMBER (gts1_state::gts1_lamp_apm_r)
548548{
549   UINT8 data = 0x0f;
550   switch (offset) {
551      case 0: // group A switches S01-S04, S09-S12, S17-S20
552         if (m_z30_out & 1) {
553            UINT8 dsw0 = ioport("DSW0")->read();
554            if (0 == BIT(dsw0,0)) // S01
555               data &= ~(1 << 3);
556            if (0 == BIT(dsw0,1)) // S02
557               data &= ~(1 << 2);
558            if (0 == BIT(dsw0,2)) // S03
559               data &= ~(1 << 1);
560            if (0 == BIT(dsw0,3)) // S04
561               data &= ~(1 << 0);
562         }
563         if (m_z30_out & 2) {
564            UINT8 dsw1 = ioport("DSW1")->read();
565            if (0 == BIT(dsw1,0)) // S09
566               data &= ~(1 << 0);
567            if (0 == BIT(dsw1,1)) // S10
568               data &= ~(1 << 1);
569            if (0 == BIT(dsw1,2)) // S11
570               data &= ~(1 << 2);
571            if (0 == BIT(dsw1,3)) // S12
572               data &= ~(1 << 3);
573         }
574         if (m_z30_out & 4) {
575            UINT8 dsw2 = ioport("DSW2")->read();
576            if (0 == BIT(dsw2,0)) // S17
577               data &= ~(1 << 0);
578            if (0 == BIT(dsw2,1)) // S18
579               data &= ~(1 << 1);
580            if (0 == BIT(dsw2,2)) // S19
581               data &= ~(1 << 2);
582            if (0 == BIT(dsw2,3)) // S20
583               data &= ~(1 << 3);
584         }
585         break;
586      case 1: // group B switches S05-S08, S09-S12, S17-S20
587         if (m_z30_out & 1) {
588            UINT8 dsw0 = ioport("DSW0")->read();
589            if (0 == BIT(dsw0,4)) // S05
590               data &= ~(1 << 3);
591            if (0 == BIT(dsw0,5)) // S06
592               data &= ~(1 << 2);
593            if (0 == BIT(dsw0,6)) // S07
594               data &= ~(1 << 1);
595            if (0 == BIT(dsw0,7)) // S08
596               data &= ~(1 << 0);
597         }
598         if (m_z30_out & 2) {
599            UINT8 dsw1 = ioport("DSW1")->read();
600            if (0 == BIT(dsw1,4)) // S13
601               data &= ~(1 << 0);
602            if (0 == BIT(dsw1,5)) // S14
603               data &= ~(1 << 1);
604            if (0 == BIT(dsw1,6)) // S15
605               data &= ~(1 << 2);
606            if (0 == BIT(dsw1,7)) // S16
607               data &= ~(1 << 3);
608         }
609         if (m_z30_out & 4) {
610            UINT8 dsw2 = ioport("DSW2")->read();
611            if (0 == BIT(dsw2,4)) // S21
612               data &= ~(1 << 0);
613            if (0 == BIT(dsw2,5)) // S22
614               data &= ~(1 << 1);
615            if (0 == BIT(dsw2,6)) // S23
616               data &= ~(1 << 2);
617            if (0 == BIT(dsw2,7)) // S24
618               data &= ~(1 << 3);
619         }
620         break;
621      case 2: // TODO: connect
622         // IN-9 (unused?)
623         // IN-10 (reset sw25)
624         // IN-11 (outhole sw)
625         // IN-12 (slam sw)
626         break;
627   }
628   return data;
549    UINT8 data = 0x0f;
550    switch (offset) {
551        case 0: // group A switches S01-S04, S09-S12, S17-S20
552            if (m_z30_out & 1) {
553                UINT8 dsw0 = ioport("DSW0")->read();
554                if (0 == BIT(dsw0,0)) // S01
555                    data &= ~(1 << 3);
556                if (0 == BIT(dsw0,1)) // S02
557                    data &= ~(1 << 2);
558                if (0 == BIT(dsw0,2)) // S03
559                    data &= ~(1 << 1);
560                if (0 == BIT(dsw0,3)) // S04
561                    data &= ~(1 << 0);
562            }
563            if (m_z30_out & 2) {
564                UINT8 dsw1 = ioport("DSW1")->read();
565                if (0 == BIT(dsw1,0)) // S09
566                    data &= ~(1 << 0);
567                if (0 == BIT(dsw1,1)) // S10
568                    data &= ~(1 << 1);
569                if (0 == BIT(dsw1,2)) // S11
570                    data &= ~(1 << 2);
571                if (0 == BIT(dsw1,3)) // S12
572                    data &= ~(1 << 3);
573            }
574            if (m_z30_out & 4) {
575                UINT8 dsw2 = ioport("DSW2")->read();
576                if (0 == BIT(dsw2,0)) // S17
577                    data &= ~(1 << 0);
578                if (0 == BIT(dsw2,1)) // S18
579                    data &= ~(1 << 1);
580                if (0 == BIT(dsw2,2)) // S19
581                    data &= ~(1 << 2);
582                if (0 == BIT(dsw2,3)) // S20
583                    data &= ~(1 << 3);
584            }
585            break;
586        case 1: // group B switches S05-S08, S09-S12, S17-S20
587            if (m_z30_out & 1) {
588                UINT8 dsw0 = ioport("DSW0")->read();
589                if (0 == BIT(dsw0,4)) // S05
590                    data &= ~(1 << 3);
591                if (0 == BIT(dsw0,5)) // S06
592                    data &= ~(1 << 2);
593                if (0 == BIT(dsw0,6)) // S07
594                    data &= ~(1 << 1);
595                if (0 == BIT(dsw0,7)) // S08
596                    data &= ~(1 << 0);
597            }
598            if (m_z30_out & 2) {
599                UINT8 dsw1 = ioport("DSW1")->read();
600                if (0 == BIT(dsw1,4)) // S13
601                    data &= ~(1 << 0);
602                if (0 == BIT(dsw1,5)) // S14
603                    data &= ~(1 << 1);
604                if (0 == BIT(dsw1,6)) // S15
605                    data &= ~(1 << 2);
606                if (0 == BIT(dsw1,7)) // S16
607                    data &= ~(1 << 3);
608            }
609            if (m_z30_out & 4) {
610                UINT8 dsw2 = ioport("DSW2")->read();
611                if (0 == BIT(dsw2,4)) // S21
612                    data &= ~(1 << 0);
613                if (0 == BIT(dsw2,5)) // S22
614                    data &= ~(1 << 1);
615                if (0 == BIT(dsw2,6)) // S23
616                    data &= ~(1 << 2);
617                if (0 == BIT(dsw2,7)) // S24
618                    data &= ~(1 << 3);
619            }
620            break;
621        case 2: // TODO: connect
622            // IN-9 (unused?)
623            // IN-10 (reset sw25)
624            // IN-11 (outhole sw)
625            // IN-12 (slam sw)
626            break;
627    }
628    return data;
629629}
630630
631631/**
r242703r242704
635635 */
636636WRITE8_MEMBER(gts1_state::gts1_lamp_apm_w)
637637{
638   switch (offset) {
639      case 0: // LD1-LD4 on jumper J5
640         break;
641      case 1: // Z30 1-of-16 decoder
642         m_z30_out = 1 << (data & 15);
643         break;
644      case 2: // O9: PGOL PROM A8, O10: PGOL PROM A9
645         m_6351_addr = (m_6351_addr & ~(3 << 8)) | ((data & 3) << 8);
646         // O11 and O12 are unused(?)
647         break;
648   }
638    switch (offset) {
639        case 0: // LD1-LD4 on jumper J5
640            break;
641        case 1: // Z30 1-of-16 decoder
642            m_z30_out = 1 << (data & 15);
643            break;
644        case 2: // O9: PGOL PROM A8, O10: PGOL PROM A9
645            m_6351_addr = (m_6351_addr & ~(3 << 8)) | ((data & 3) << 8);
646            // O11 and O12 are unused(?)
647            break;
648    }
649649}
650650
651651READ8_MEMBER (gts1_state::gts1_io_r)
652652{
653   const UINT8 data = 0x0f;
654   LOG(("%s: unmapped io[%02x] -> %x\n", __FUNCTION__, offset, data));
655   return data;
653    const UINT8 data = 0x0f;
654    LOG(("%s: unmapped io[%02x] -> %x\n", __FUNCTION__, offset, data));
655    return data;
656656}
657657
658658WRITE8_MEMBER(gts1_state::gts1_io_w)
659659{
660   LOG(("%s: unmapped io[%02x] <- %x\n", __FUNCTION__, offset, data));
660    LOG(("%s: unmapped io[%02x] <- %x\n", __FUNCTION__, offset, data));
661661}
662662
663663READ8_MEMBER (gts1_state::gts1_pa_r)
664664{
665   // return ROM nibble
666   UINT8 *ROM = memregion("maincpu")->base();
667   UINT8 data = ROM[0x2000 + m_6351_addr] & 0x0f;
668   LOG(("%s: ROM[%03x]:%02x\n", __FUNCTION__, m_6351_addr, data));
669   return data;
665    // return ROM nibble
666    UINT8 *ROM = memregion("maincpu")->base();
667    UINT8 data = ROM[0x2000 + m_6351_addr] & 0x0f;
668    LOG(("%s: ROM[%03x]:%02x\n", __FUNCTION__, m_6351_addr, data));
669    return data;
670670}
671671
672672WRITE8_MEMBER(gts1_state::gts1_pa_w)
673673{
674   // write address lines 7-4
675   m_6351_addr = (m_6351_addr & 0x0f) | ((data & 0x0f) << 4);
676   LOG(("%s: ROM hi:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
674    // write address lines 7-4
675    m_6351_addr = (m_6351_addr & 0x0f) | ((data & 0x0f) << 4);
676    LOG(("%s: ROM hi:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
677677}
678678
679679WRITE8_MEMBER(gts1_state::gts1_pb_w)
680680{
681   // write address lines 3-0
682   m_6351_addr = (m_6351_addr & 0xf0) | (data & 0x0f);
683   LOG(("%s: ROM lo:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
681    // write address lines 3-0
682    m_6351_addr = (m_6351_addr & 0xf0) | (data & 0x0f);
683    LOG(("%s: ROM lo:%x addr:%02x\n", __FUNCTION__, data & 0x0f, m_6351_addr));
684684}
685685
686686
687687static MACHINE_CONFIG_START( gts1, gts1_state )
688   /* basic machine hardware */
689   MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
690   MCFG_CPU_PROGRAM_MAP(gts1_map)
691   MCFG_CPU_DATA_MAP(gts1_data)
692   MCFG_CPU_IO_MAP(gts1_io)
688    /* basic machine hardware */
689    MCFG_CPU_ADD("maincpu", PPS4, XTAL_3_579545MHz / 18)  // divided in the CPU
690    MCFG_CPU_PROGRAM_MAP(gts1_map)
691    MCFG_CPU_DATA_MAP(gts1_data)
692    MCFG_CPU_IO_MAP(gts1_io)
693693
694   MCFG_NVRAM_ADD_0FILL("nvram")
694    MCFG_NVRAM_ADD_0FILL("nvram")
695695
696   /* A1753CE 2048 x 8 ROM (000-7ff), 128 x 4 RAM (00-7f) and 16 I/O lines (20 ... 2f) */
697   MCFG_DEVICE_ADD( "u5", RA17XX, 0 )
698   MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_switches_r) )
699   MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_switches_w) )
696    /* A1753CE 2048 x 8 ROM (000-7ff), 128 x 4 RAM (00-7f) and 16 I/O lines (20 ... 2f) */
697    MCFG_DEVICE_ADD( "u5", RA17XX, 0 )
698    MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_switches_r) )
699    MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_switches_w) )
700700
701   /* A1752CF 2048 x 8 ROM (800-fff), 128 x 4 RAM (80-ff) and 16 I/O lines (40 ... 4f) */
702   MCFG_DEVICE_ADD( "u4", RA17XX, 0 )
703   MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_solenoid_r) )
704   MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_solenoid_w) )
701    /* A1752CF 2048 x 8 ROM (800-fff), 128 x 4 RAM (80-ff) and 16 I/O lines (40 ... 4f) */
702    MCFG_DEVICE_ADD( "u4", RA17XX, 0 )
703    MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_solenoid_r) )
704    MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_solenoid_w) )
705705
706   /* 10696 General Purpose Input/Output */
707   MCFG_DEVICE_ADD( "u2", R10696, 0 )
708   MCFG_R10696_IO( READ8 (gts1_state,gts1_nvram_r),
709               WRITE8(gts1_state,gts1_nvram_w) )
706    /* 10696 General Purpose Input/Output */
707    MCFG_DEVICE_ADD( "u2", R10696, 0 )
708    MCFG_R10696_IO( READ8 (gts1_state,gts1_nvram_r),
709                    WRITE8(gts1_state,gts1_nvram_w) )
710710
711   /* 10696 General Purpose Input/Output */
712   MCFG_DEVICE_ADD( "u3", R10696, 0 )
713   MCFG_R10696_IO( READ8 (gts1_state,gts1_lamp_apm_r),
714               WRITE8(gts1_state,gts1_lamp_apm_w) )
711    /* 10696 General Purpose Input/Output */
712    MCFG_DEVICE_ADD( "u3", R10696, 0 )
713    MCFG_R10696_IO( READ8 (gts1_state,gts1_lamp_apm_r),
714                    WRITE8(gts1_state,gts1_lamp_apm_w) )
715715
716   /* 10788 General Purpose Display and Keyboard */
717   MCFG_DEVICE_ADD( "u6", R10788, XTAL_3_579545MHz / 18 )  // divided in the circuit
718   MCFG_R10788_UPDATE( WRITE8(gts1_state,gts1_display_w) )
716    /* 10788 General Purpose Display and Keyboard */
717    MCFG_DEVICE_ADD( "u6", R10788, XTAL_3_579545MHz / 18 )  // divided in the circuit
718    MCFG_R10788_UPDATE( WRITE8(gts1_state,gts1_display_w) )
719719
720   /* Video */
721   MCFG_DEFAULT_LAYOUT( layout_gts1 )
720    /* Video */
721    MCFG_DEFAULT_LAYOUT( layout_gts1 )
722722
723   /* Sound */
724   MCFG_FRAGMENT_ADD( genpin_audio )
723    /* Sound */
724    MCFG_FRAGMENT_ADD( genpin_audio )
725725MACHINE_CONFIG_END
726726
727727
728728ROM_START( gts1 )
729   ROM_REGION( 0x10000, "maincpu", 0 )
730   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
731   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
729    ROM_REGION( 0x10000, "maincpu", 0 )
730    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
731    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
732732ROM_END
733733
734734ROM_START( gts1s )
735   ROM_REGION( 0x10000, "maincpu", 0 )
736   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
737   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
735    ROM_REGION( 0x10000, "maincpu", 0 )
736    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
737    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
738738ROM_END
739739
740740/*-------------------------------------------------------------------
741741/ Asteroid Annie and the Aliens (12/1980) #442
742742/-------------------------------------------------------------------*/
743743ROM_START(astannie)
744   ROM_REGION(0x10000, "maincpu", 0)
745   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
746   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
747   ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
748   ROM_REGION(0x10000, "cpu2", 0)
749   ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
750   ROM_RELOAD( 0x0800, 0x0400)
751   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
752   ROM_RELOAD( 0xfc00, 0x0400)
744    ROM_REGION(0x10000, "maincpu", 0)
745    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
746    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
747    ROM_LOAD("442.cpu", 0x2000, 0x0400, CRC(579521e0) SHA1(b1b19473e1ca3373955ee96104b87f586c4c311c))
748    ROM_REGION(0x10000, "cpu2", 0)
749    ROM_LOAD("442.snd", 0x0400, 0x0400, CRC(c70195b4) SHA1(ff06197f07111d6a4b8942dcfe8d2279bda6f281))
750    ROM_RELOAD( 0x0800, 0x0400)
751    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
752    ROM_RELOAD( 0xfc00, 0x0400)
753753ROM_END
754754
755755/*-------------------------------------------------------------------
756756/ Buck Rogers (01/1980) #437
757757/-------------------------------------------------------------------*/
758758ROM_START(buckrgrs)
759   ROM_REGION(0x10000, "maincpu", 0)
760   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
761   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
762   ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
763   ROM_REGION(0x10000, "cpu2", 0)
764   ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
765   ROM_RELOAD( 0x0800, 0x0400)
766   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
767   ROM_RELOAD( 0xfc00, 0x0400)
759    ROM_REGION(0x10000, "maincpu", 0)
760    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
761    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
762    ROM_LOAD("437.cpu", 0x2000, 0x0400, CRC(e57d9278) SHA1(dfc4ebff1e14b9a074468671a8e5ac7948d5b352))
763    ROM_REGION(0x10000, "cpu2", 0)
764    ROM_LOAD("437.snd", 0x0400, 0x0400, CRC(732b5a27) SHA1(7860ea54e75152246c3ac3205122d750b243b40c))
765    ROM_RELOAD( 0x0800, 0x0400)
766    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
767    ROM_RELOAD( 0xfc00, 0x0400)
768768ROM_END
769769
770770/*-------------------------------------------------------------------
771771/ Charlie's Angels (11/1978) #425
772772/-------------------------------------------------------------------*/
773773ROM_START(charlies)
774   ROM_REGION(0x10000, "maincpu", 0)
775   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
776   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
777   ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
774    ROM_REGION(0x10000, "maincpu", 0)
775    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
776    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
777    ROM_LOAD("425.cpu", 0x2000, 0x0400, CRC(928b4279) SHA1(51096d45e880d6a8263eaeaa0cdab0f61ad2f58d))
778778ROM_END
779779/*-------------------------------------------------------------------
780780/ Cleopatra (11/1977) #409
781781/-------------------------------------------------------------------*/
782782ROM_START(cleoptra)
783   ROM_REGION(0x10000, "maincpu", 0)
784   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
785   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
786   ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
783    ROM_REGION(0x10000, "maincpu", 0)
784    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
785    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
786    ROM_LOAD("409.cpu", 0x2000, 0x0400, CRC(8063ff71) SHA1(205f09f067bf79544d2ce2a48d23259901f935dd))
787787ROM_END
788788
789789/*-------------------------------------------------------------------
790790/ Close Encounters of the Third Kind (10/1978) #424
791791/-------------------------------------------------------------------*/
792792ROM_START(closeenc)
793   ROM_REGION(0x10000, "maincpu", 0)
794   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
795   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
796   ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
793    ROM_REGION(0x10000, "maincpu", 0)
794    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
795    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
796    ROM_LOAD("424.cpu", 0x2000, 0x0400, CRC(a7a5dd13) SHA1(223c67b9484baa719c91de52b363ff22813db160))
797797ROM_END
798798
799799/*-------------------------------------------------------------------
800800/ Count-Down (05/1979) #422
801801/-------------------------------------------------------------------*/
802802ROM_START(countdwn)
803   ROM_REGION(0x10000, "maincpu", 0)
804   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
805   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
806   ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
803    ROM_REGION(0x10000, "maincpu", 0)
804    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
805    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
806    ROM_LOAD("422.cpu", 0x2000, 0x0400, CRC(51bc2df0) SHA1(d4b555d106c6b4e420b0fcd1df8871f869476c22))
807807ROM_END
808808
809809/*-------------------------------------------------------------------
810810/ Dragon (10/1978) #419
811811/-------------------------------------------------------------------*/
812812ROM_START(dragon)
813   ROM_REGION(0x10000, "maincpu", 0)
814   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
815   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
816   ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
813    ROM_REGION(0x10000, "maincpu", 0)
814    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
815    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
816    ROM_LOAD("419.cpu", 0x2000, 0x0400, CRC(018d9b3a) SHA1(da37ef5017c71bc41bdb1f30d3fd7ac3b7e1ee7e))
817817ROM_END
818818
819819/*-------------------------------------------------------------------
820820/ Genie (11/1979) #435
821821/-------------------------------------------------------------------*/
822822ROM_START(geniep)
823   ROM_REGION(0x10000, "maincpu", 0)
824   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
825   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
826   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
827   ROM_REGION(0x10000, "cpu2", 0)
828   ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
829   ROM_RELOAD( 0x0800, 0x0400)
830   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
831   ROM_RELOAD( 0xfc00, 0x0400)
823    ROM_REGION(0x10000, "maincpu", 0)
824    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
825    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
826    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
827    ROM_REGION(0x10000, "cpu2", 0)
828    ROM_LOAD("435.snd", 0x0400, 0x0400, CRC(4a98ceed) SHA1(f1d7548e03107033c39953ee04b043b5301dbb47))
829    ROM_RELOAD( 0x0800, 0x0400)
830    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
831    ROM_RELOAD( 0xfc00, 0x0400)
832832ROM_END
833833
834834/*-------------------------------------------------------------------
835835/ Joker Poker (08/1978) #417
836836/-------------------------------------------------------------------*/
837837ROM_START(jokrpokr)
838   ROM_REGION(0x10000, "maincpu", 0)
839   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
840   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
841   ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
838    ROM_REGION(0x10000, "maincpu", 0)
839    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
840    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
841    ROM_LOAD("417.cpu", 0x2000, 0x0400, CRC(33dade08) SHA1(23b8dbd7b6c84b806fc0d2da95478235cbf9f80a))
842842ROM_END
843843
844844/*-------------------------------------------------------------------
r242703r242704
848848/ L'Hexagone (04/1986)
849849/-------------------------------------------------------------------*/
850850ROM_START(hexagone)
851   ROM_REGION(0x10000, "maincpu", 0)
852   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
853   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
854   ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
855   ROM_REGION(0x10000, "cpu2", 0)
856   ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
851    ROM_REGION(0x10000, "maincpu", 0)
852    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
853    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
854    ROM_LOAD("435.cpu", 0x2000, 0x0400, CRC(7749fd92) SHA1(9cd3e799842392e3939877bf295759c27f199e58))
855    ROM_REGION(0x10000, "cpu2", 0)
856    ROM_LOAD("hexagone.bin", 0, 0x4000, CRC(002b5464) SHA1(e2d971c4e85b4fb6580c2d3945c9946ea0cebc2e))
857857ROM_END
858858/*-------------------------------------------------------------------
859859/ Movie
r242703r242704
863863/ Pinball Pool (08/1979) #427
864864/-------------------------------------------------------------------*/
865865ROM_START(pinpool)
866   ROM_REGION(0x10000, "maincpu", 0)
867   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
868   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
869   ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
866    ROM_REGION(0x10000, "maincpu", 0)
867    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
868    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
869    ROM_LOAD("427.cpu", 0x2000, 0x0400, CRC(c496393d) SHA1(e91d9596aacdb4277fa200a3f8f9da099c278f32))
870870ROM_END
871871
872872/*-------------------------------------------------------------------
873873/ Roller Disco (02/1980) #440
874874/-------------------------------------------------------------------*/
875875ROM_START(roldisco)
876   ROM_REGION(0x10000, "maincpu", 0)
877   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
878   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
879   ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
880   ROM_REGION(0x10000, "cpu2", 0)
881   ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
882   ROM_RELOAD( 0x0800, 0x0400)
883   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
884   ROM_RELOAD( 0xfc00, 0x0400)
876    ROM_REGION(0x10000, "maincpu", 0)
877    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
878    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
879    ROM_LOAD("440.cpu", 0x2000, 0x0400, CRC(bc50631f) SHA1(6aa3124d09fc4e369d087a5ad6dd1737ace55e41))
880    ROM_REGION(0x10000, "cpu2", 0)
881    ROM_LOAD("440.snd", 0x0400, 0x0400, CRC(4a0a05ae) SHA1(88f21b5638494d8e78dc0b6b7d69873b76b5f75d))
882    ROM_RELOAD( 0x0800, 0x0400)
883    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
884    ROM_RELOAD( 0xfc00, 0x0400)
885885ROM_END
886886
887887/*-------------------------------------------------------------------
r242703r242704
892892/ Sinbad (05/1978) #412
893893/-------------------------------------------------------------------*/
894894ROM_START(sinbad)
895   ROM_REGION(0x10000, "maincpu", 0)
896   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
897   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
898   ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
895    ROM_REGION(0x10000, "maincpu", 0)
896    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
897    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
898    ROM_LOAD("412.cpu", 0x2000, 0x0400, CRC(84a86b83) SHA1(f331f2ffd7d1b279b4ffbb939aa8649e723f5fac))
899899ROM_END
900900
901901ROM_START(sinbadn)
902   ROM_REGION(0x10000, "maincpu", 0)
903   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
904   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
905   ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
902    ROM_REGION(0x10000, "maincpu", 0)
903    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
904    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
905    ROM_LOAD("412no1.cpu", 0x2000, 0x0400, CRC(f5373f5f) SHA1(027840501416ff01b2adf07188c7d667adf3ad5f))
906906ROM_END
907907
908908/*-------------------------------------------------------------------
r242703r242704
913913/ Solar Ride (02/1979) #421
914914/-------------------------------------------------------------------*/
915915ROM_START(solaride)
916   ROM_REGION(0x10000, "maincpu", 0)
917   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
918   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
919   ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
916    ROM_REGION(0x10000, "maincpu", 0)
917    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
918    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
919    ROM_LOAD("421.cpu", 0x2000, 0x0400, CRC(6b5c5da6) SHA1(a09b7009473be53586f53f48b7bfed9a0c5ecd55))
920920ROM_END
921921
922922/*-------------------------------------------------------------------
923923/ The Incredible Hulk (10/1979) #433
924924/-------------------------------------------------------------------*/
925925ROM_START(hulk)
926   ROM_REGION(0x10000, "maincpu", 0)
927   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
928   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
929   ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
930   ROM_REGION(0x10000, "cpu2", 0)
931   ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
932   ROM_RELOAD( 0x0800, 0x0400)
933   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
934   ROM_RELOAD( 0xfc00, 0x0400)
926    ROM_REGION(0x10000, "maincpu", 0)
927    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
928    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
929    ROM_LOAD("433.cpu", 0x2000, 0x0400, CRC(c05d2b52) SHA1(393fe063b029246317c90ee384db95a84d61dbb7))
930    ROM_REGION(0x10000, "cpu2", 0)
931    ROM_LOAD("433.snd", 0x0400, 0x0400, CRC(20cd1dff) SHA1(93e7c47ff7051c3c0dc9f8f95aa33ba094e7cf25))
932    ROM_RELOAD( 0x0800, 0x0400)
933    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
934    ROM_RELOAD( 0xfc00, 0x0400)
935935ROM_END
936936
937937/*-------------------------------------------------------------------
938938/ Torch (02/1980) #438
939939/-------------------------------------------------------------------*/
940940ROM_START(torch)
941   ROM_REGION(0x10000, "maincpu", 0)
942   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
943   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
944   ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
945   ROM_REGION(0x10000, "cpu2", 0)
946   ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
947   ROM_RELOAD( 0x0800, 0x0400)
948   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
949   ROM_RELOAD( 0xfc00, 0x0400)
941    ROM_REGION(0x10000, "maincpu", 0)
942    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
943    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
944    ROM_LOAD("438.cpu", 0x2000, 0x0400, CRC(2d396a64) SHA1(38a1862771500faa471071db08dfbadc6e8759e8))
945    ROM_REGION(0x10000, "cpu2", 0)
946    ROM_LOAD("438.snd", 0x0400, 0x0400, CRC(a9619b48) SHA1(1906bc1b059bf31082e3b4546f5a30159479ad3c))
947    ROM_RELOAD( 0x0800, 0x0400)
948    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
949    ROM_RELOAD( 0xfc00, 0x0400)
950950ROM_END
951951
952952/*-------------------------------------------------------------------
953953/ Totem (10/1979) #429
954954/-------------------------------------------------------------------*/
955955ROM_START(totem)
956   ROM_REGION(0x10000, "maincpu", 0)
957   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
958   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
959   ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
960   ROM_REGION(0x10000, "cpu2", 0)
961   ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
962   ROM_RELOAD( 0x0800, 0x0400)
963   ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
964   ROM_RELOAD( 0xfc00, 0x0400)
956    ROM_REGION(0x10000, "maincpu", 0)
957    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
958    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
959    ROM_LOAD("429.cpu", 0x2000, 0x0400, CRC(7885a384) SHA1(1770662af7d48ad8297097a9877c5c497119978d))
960    ROM_REGION(0x10000, "cpu2", 0)
961    ROM_LOAD("429.snd", 0x0400, 0x0400, CRC(5d1b7ed4) SHA1(4a584f880e907fb21da78f3b3a0617f20599688f))
962    ROM_RELOAD( 0x0800, 0x0400)
963    ROM_LOAD("6530sys1.bin", 0x0c00, 0x0400, CRC(b7831321) SHA1(c94f4bee97854d0373653a6867016e27d3fc1340))
964    ROM_RELOAD( 0xfc00, 0x0400)
965965ROM_END
966966
967967/*-------------------------------------------------------------------
968968/ System 1 Test prom
969969/-------------------------------------------------------------------*/
970970ROM_START(sys1test)
971   ROM_REGION(0x10000, "maincpu", 0)
972   ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
973   ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
974   ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
971    ROM_REGION(0x10000, "maincpu", 0)
972    ROM_LOAD("u5_cf.bin", 0x0000, 0x0800, CRC(e0d4b405) SHA1(17aadd79c0dcbb336aadd5d203bc6ca866492345))
973    ROM_LOAD("u4_ce.bin", 0x0800, 0x0800, CRC(4cd312dd) SHA1(31245daa9972ef8652caee69986585bb8239e86e))
974    ROM_LOAD("test.cpu", 0x2000, 0x0400, CRC(8b0704bb) SHA1(5f0eb8d5af867b815b6012c9d078927398efe6d8))
975975ROM_END
976976
977977
trunk/src/mame/drivers/gundealr.c
r242703r242704
495495
496496static MACHINE_CONFIG_DERIVED( yamyam, gundealr )
497497
498   MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(6000000/60)) /* 6mhz confirmed */
498   MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(6000000/60))   /* 6mhz confirmed */
499499MACHINE_CONFIG_END
500500
501501
trunk/src/mame/drivers/igs009.c
r242703r242704
510510
511511static INPUT_PORTS_START( jingbell )
512512   PORT_START("DSW1")
513   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("DSW1:1")
513   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )   PORT_DIPLOCATION("DSW1:1")
514514   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
515515   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
516   PORT_DIPNAME( 0x02, 0x00, "W-Up Bonus" )        PORT_DIPLOCATION("DSW1:2")
516   PORT_DIPNAME( 0x02, 0x00, "W-Up Bonus" )      PORT_DIPLOCATION("DSW1:2")
517517   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
518518   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
519   PORT_DIPNAME( 0x04, 0x04, "Min Bet" )           PORT_DIPLOCATION("DSW1:3")
519   PORT_DIPNAME( 0x04, 0x04, "Min Bet" )         PORT_DIPLOCATION("DSW1:3")
520520   PORT_DIPSETTING(    0x04, "1" )
521521   PORT_DIPSETTING(    0x00, "8" )
522   PORT_DIPNAME( 0x08, 0x08, "Spin Speed" )        PORT_DIPLOCATION("DSW1:4")
522   PORT_DIPNAME( 0x08, 0x08, "Spin Speed" )      PORT_DIPLOCATION("DSW1:4")
523523   PORT_DIPSETTING(    0x08, "Slow" )
524524   PORT_DIPSETTING(    0x00, "Quick" )
525   PORT_DIPNAME( 0x10, 0x00, "Strip Girl" )        PORT_DIPLOCATION("DSW1:5")
525   PORT_DIPNAME( 0x10, 0x00, "Strip Girl" )      PORT_DIPLOCATION("DSW1:5")
526526   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
527527   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
528   PORT_DIPNAME( 0x20, 0x20, "Payout Mode" )       PORT_DIPLOCATION("DSW1:6")
528   PORT_DIPNAME( 0x20, 0x20, "Payout Mode" )      PORT_DIPLOCATION("DSW1:6")
529529   PORT_DIPSETTING(    0x20, DEF_STR( Normal ) )
530530   PORT_DIPSETTING(    0x00, "Auto" )
531   PORT_DIPNAME( 0xc0, 0xc0, "Player's Panel" )    PORT_DIPLOCATION("DSW1:7,8")
531   PORT_DIPNAME( 0xc0, 0xc0, "Player's Panel" )   PORT_DIPLOCATION("DSW1:7,8")
532532   PORT_DIPSETTING(    0x00, "Type A" )
533533   PORT_DIPSETTING(    0xc0, "Type A" )
534534   PORT_DIPSETTING(    0x80, "Type B" )
535535   PORT_DIPSETTING(    0x40, "Type C" )
536536
537537   PORT_START("DSW2")
538   PORT_DIPNAME( 0x07, 0x07, "Main Game Rate (%)" )    PORT_DIPLOCATION("DSW2:1,2,3")
538   PORT_DIPNAME( 0x07, 0x07, "Main Game Rate (%)" )   PORT_DIPLOCATION("DSW2:1,2,3")
539539   PORT_DIPSETTING(    0x07, "55" )
540540   PORT_DIPSETTING(    0x06, "60" )
541541   PORT_DIPSETTING(    0x05, "65" )
r242703r242704
544544   PORT_DIPSETTING(    0x02, "80" )
545545   PORT_DIPSETTING(    0x01, "85" )
546546   PORT_DIPSETTING(    0x00, "90" )
547   PORT_DIPNAME( 0x38, 0x38, "W-Up Chance (%)" )   PORT_DIPLOCATION("DSW2:4,5,6")
547   PORT_DIPNAME( 0x38, 0x38, "W-Up Chance (%)" )   PORT_DIPLOCATION("DSW2:4,5,6")
548548   PORT_DIPSETTING(    0x38, "93" )
549549   PORT_DIPSETTING(    0x30, "94" )
550550   PORT_DIPSETTING(    0x28, "95" )
r242703r242704
553553   PORT_DIPSETTING(    0x10, "98" )
554554   PORT_DIPSETTING(    0x08, "99" )
555555   PORT_DIPSETTING(    0x00, "100" )
556   PORT_DIPNAME( 0xc0, 0xc0, "Key In Limit" )      PORT_DIPLOCATION("DSW2:7,8")
556   PORT_DIPNAME( 0xc0, 0xc0, "Key In Limit" )      PORT_DIPLOCATION("DSW2:7,8")
557557   PORT_DIPSETTING(    0xc0, "1k" )
558558   PORT_DIPSETTING(    0x80, "3k" )
559559   PORT_DIPSETTING(    0x40, "5k" )
560560   PORT_DIPSETTING(    0x00, "10k" )
561561
562562   PORT_START("DSW3")
563   PORT_DIPNAME( 0x07, 0x07, "Key In Rate" )       PORT_DIPLOCATION("DSW3:1,2,3")
563   PORT_DIPNAME( 0x07, 0x07, "Key In Rate" )      PORT_DIPLOCATION("DSW3:1,2,3")
564564   PORT_DIPSETTING(    0x07, "1" )
565565   PORT_DIPSETTING(    0x06, "5" )
566566   PORT_DIPSETTING(    0x05, "10" )
r242703r242704
569569   PORT_DIPSETTING(    0x02, "100" )
570570   PORT_DIPSETTING(    0x01, "200" )
571571   PORT_DIPSETTING(    0x00, "500" )
572   PORT_DIPNAME( 0x38, 0x38, "Coin 1 Rate" )       PORT_DIPLOCATION("DSW3:4,5,6")
572   PORT_DIPNAME( 0x38, 0x38, "Coin 1 Rate" )      PORT_DIPLOCATION("DSW3:4,5,6")
573573   PORT_DIPSETTING(    0x38, "1" )
574574   PORT_DIPSETTING(    0x30, "2" )
575575   PORT_DIPSETTING(    0x28, "5" )
r242703r242704
578578   PORT_DIPSETTING(    0x10, "25" )
579579   PORT_DIPSETTING(    0x08, "50" )
580580   PORT_DIPSETTING(    0x00, "100" )
581   PORT_DIPNAME( 0xc0, 0xc0, "System Limit" )      PORT_DIPLOCATION("DSW3:7,8")
581   PORT_DIPNAME( 0xc0, 0xc0, "System Limit" )      PORT_DIPLOCATION("DSW3:7,8")
582582   PORT_DIPSETTING(    0xc0, "5k" )
583583   PORT_DIPSETTING(    0x80, "10k" )
584584   PORT_DIPSETTING(    0x40, "30k" )
585585   PORT_DIPSETTING(    0x00, "Unlimited" )
586586
587587   PORT_START("DSW4")
588   PORT_DIPNAME( 0x01, 0x01, "Min Play For Fever" )    PORT_DIPLOCATION("DSW4:1")
588   PORT_DIPNAME( 0x01, 0x01, "Min Play For Fever" )   PORT_DIPLOCATION("DSW4:1")
589589   PORT_DIPSETTING(    0x01, "8" )
590590   PORT_DIPSETTING(    0x00, "16" )
591   PORT_DIPNAME( 0x02, 0x02, "Max Bet" )           PORT_DIPLOCATION("DSW4:2")
591   PORT_DIPNAME( 0x02, 0x02, "Max Bet" )         PORT_DIPLOCATION("DSW4:2")
592592   PORT_DIPSETTING(    0x02, "16" )
593593   PORT_DIPSETTING(    0x00, "32" )
594   PORT_DIPNAME( 0x1c, 0x1c, "Coin 2 Rate" )       PORT_DIPLOCATION("DSW4:3,4,5")
594   PORT_DIPNAME( 0x1c, 0x1c, "Coin 2 Rate" )      PORT_DIPLOCATION("DSW4:3,4,5")
595595   PORT_DIPSETTING(    0x1c, "1" )
596596   PORT_DIPSETTING(    0x18, "2" )
597597   PORT_DIPSETTING(    0x14, "5" )
r242703r242704
600600   PORT_DIPSETTING(    0x08, "40" )
601601   PORT_DIPSETTING(    0x04, "50" )
602602   PORT_DIPSETTING(    0x00, "100" )
603   PORT_DIPNAME( 0x60, 0x60, "Key Out Rate" )      PORT_DIPLOCATION("DSW4:6,7")
603   PORT_DIPNAME( 0x60, 0x60, "Key Out Rate" )      PORT_DIPLOCATION("DSW4:6,7")
604604   PORT_DIPSETTING(    0x60, "1" )
605605   PORT_DIPSETTING(    0x40, "10" )
606606   PORT_DIPSETTING(    0x20, "50" )
607607   PORT_DIPSETTING(    0x00, "100" )
608   PORT_DIPNAME( 0x80, 0x80, "Play Line" )         PORT_DIPLOCATION("DSW4:8")
608   PORT_DIPNAME( 0x80, 0x80, "Play Line" )         PORT_DIPLOCATION("DSW4:8")
609609   PORT_DIPSETTING(    0x80, "8" )
610610   PORT_DIPSETTING(    0x00, "16" )
611611
612// These are from the manual for v201us - DSW1-DSW4 match but DSW5 doesn't seem to match or actuallly do anything
612// These are from the manual for v201us - DSW1-DSW4 match but DSW5 doesn't seem to match or actuallly do anything
613613   PORT_START("DSW5")
614   PORT_DIPNAME( 0x03, 0x00, "Maximum Play" )      PORT_DIPLOCATION("DSW5:1,2")
614   PORT_DIPNAME( 0x03, 0x00, "Maximum Play" )      PORT_DIPLOCATION("DSW5:1,2")
615615   PORT_DIPSETTING(    0x00, "64" )
616616   PORT_DIPSETTING(    0x01, "32" )
617617   PORT_DIPSETTING(    0x02, "16" )
618618   PORT_DIPSETTING(    0x03, "8" )
619   PORT_DIPNAME( 0x04, 0x04, "Skill Stop" )        PORT_DIPLOCATION("DSW5:3")
619   PORT_DIPNAME( 0x04, 0x04, "Skill Stop" )      PORT_DIPLOCATION("DSW5:3")
620620   PORT_DIPSETTING(    0x04, "On" )
621621   PORT_DIPSETTING(    0x00, "Off" )
622   PORT_DIPNAME( 0x08, 0x00, "Hands Count" )       PORT_DIPLOCATION("DSW5:4")
622   PORT_DIPNAME( 0x08, 0x00, "Hands Count" )      PORT_DIPLOCATION("DSW5:4")
623623   PORT_DIPSETTING(    0x08, "No" )
624624   PORT_DIPSETTING(    0x00, "Yes" )
625   PORT_DIPNAME( 0x30, 0x00, "Hands Coin Rate" )   PORT_DIPLOCATION("DSW5:5,6")
625   PORT_DIPNAME( 0x30, 0x00, "Hands Coin Rate" )   PORT_DIPLOCATION("DSW5:5,6")
626626   PORT_DIPSETTING(    0x00, "25" )
627627   PORT_DIPSETTING(    0x20, "10" )
628628   PORT_DIPSETTING(    0x10, "5" )
629629   PORT_DIPSETTING(    0x30, "1" )
630   PORT_DIPNAME( 0x40, 0x40, "Hands Coin Value" )  PORT_DIPLOCATION("DSW5:7")
630   PORT_DIPNAME( 0x40, 0x40, "Hands Coin Value" )   PORT_DIPLOCATION("DSW5:7")
631631   PORT_DIPSETTING(    0x00, "40" )
632632   PORT_DIPSETTING(    0x40, "20" )
633   PORT_DIPNAME( 0x80, 0x80, "Unused" )            PORT_DIPLOCATION("DSW5:8")
633   PORT_DIPNAME( 0x80, 0x80, "Unused" )         PORT_DIPLOCATION("DSW5:8")
634634   PORT_DIPSETTING(    0x00, "On" )
635635   PORT_DIPSETTING(    0x80, "Off" )
636636
trunk/src/mame/drivers/jpmimpct.c
r242703r242704
13241324   MCFG_SOUND_ADD("upd",UPD7759, UPD7759_STANDARD_CLOCK)
13251325   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
13261326   MCFG_DEFAULT_LAYOUT(layout_jpmimpct)
1327
1327   
13281328   MCFG_STARPOINT_48STEP_ADD("reel0")
13291329   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(jpmimpct_state, reel0_optic_cb))
13301330   MCFG_STARPOINT_48STEP_ADD("reel1")
r242703r242704
13371337   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(jpmimpct_state, reel4_optic_cb))
13381338   MCFG_STARPOINT_48STEP_ADD("reel5")
13391339   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(jpmimpct_state, reel5_optic_cb))
1340
1340   
13411341MACHINE_CONFIG_END
13421342
13431343
trunk/src/mame/drivers/ksys573.c
r242703r242704
342342
343343  */
344344
345#include "cdrom.h"
345346#include "cpu/psx/psx.h"
346347#include "machine/adc083x.h"
347348#include "machine/ataintf.h"
r242703r242704
360361#include "sound/spu.h"
361362#include "sound/cdda.h"
362363#include "video/psx.h"
363#include "cdrom.h"
364364
365365#define VERBOSE_LEVEL ( 0 )
366366
trunk/src/mame/drivers/lindbergh.c
r242703r242704
114114 WCC Football Intercontinental Clubs 2008-2009 ?                 ?               ?
115115 WCC Football Intercontinental Clubs 2009-2010 ?                 ?               ?
116116
117* denotes these DVDs are archived.
118^ denotes these PICs are archived.
117* denotes these DVDs are archived.
118^ denotes these PICs are archived.
119119This list is not necessarily correct or complete.
120120Corrections and additions to the above are welcome.
121121
r242703r242704
386386   ROM_LOAD("fpr-24370b.ic6", 0x000000, 0x400000, CRC(c3b021a4) SHA1(1b6938a50fe0e4ae813864649eb103838c399ac0)) \
387387\
388388   ROM_REGION32_LE(0x10000, ":pci:01.0:00.0", 0) /* Geforce bios extension (custom for the card) */ \
389   ROM_LOAD("vid_bios.u504", 0x00000, 0x10000, CRC(f78d14d7) SHA1(f129787e487984edd23bf344f2e9500c85052275))
389   ROM_LOAD("vid_bios.u504", 0x00000, 0x10000, CRC(f78d14d7) SHA1(f129787e487984edd23bf344f2e9500c85052275)) \
390
390391ROM_START(lindbios)
391392   LINDBERGH_BIOS
392393ROM_END
trunk/src/mame/drivers/maygay1b.c
r242703r242704
105105// FIRQ, related to the sample playback?
106106READ8_MEMBER( maygay1b_state::m1_firq_trg_r )
107107{
108   if (m_msm6376)
108   int nar = m_msm6376->nar_r();
109   if (nar)
109110   {
110      int nar = m_msm6376->nar_r();
111      if (nar)
112      {
113         cpu0_firq(1);
114      }
111      cpu0_firq(1);
115112   }
116113   return 0xff;
117114}
r242703r242704
380377//A strange setup this, the address lines are used to move st to the right level
381378READ8_MEMBER(maygay1b_state::latch_st_hi)
382379{
383   if (m_msm6376)
384   {
385      m_msm6376->st_w(1);
386   }
380   m_msm6376->st_w(1);
387381   return 0xff;
388382}
389383
390384READ8_MEMBER(maygay1b_state::latch_st_lo)
391385{
392   if (m_msm6376)
393   {
394      m_msm6376->st_w(0);
395   }
386   m_msm6376->st_w(0);
396387   return 0xff;
397388}
398389
r242703r242704
637628   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(maygay1b_state, reel4_optic_cb))
638629   MCFG_STARPOINT_48STEP_ADD("reel5")
639630   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(maygay1b_state, reel5_optic_cb))
640
631   
641632   MCFG_NVRAM_ADD_0FILL("nvram")
642633
643634   MCFG_DEFAULT_LAYOUT(layout_maygay1b)
trunk/src/mame/drivers/maygay1bsw.c
r242703r242704
211211ROM_START( m1bankrlp )  ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00  )    ROM_LOAD( "sa5-227", 0x0000, 0x010000, CRC(96528366) SHA1(5927c519d9a610b1026d685647cdac285566b1fc) ) ROM_END_M1A_MCU //1.1P
212212ROM_START( m1bankrl2p ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00  )    ROM_LOAD( "sa5-225", 0x0000, 0x010000, CRC(14d2a45e) SHA1(8f5875dfd517826a89b3b13063474eda2725be68) ) ROM_END_M1A_MCU //2.1p
213213
214GAME( 1995, m1bankrl    ,0          ,maygay_m1_no_oki,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v1.1 (M1A/B)",GAME_FLAGS )
215GAME( 1995, m1bankrlp   ,m1bankrl   ,maygay_m1_no_oki,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v1.1 (Protocol) (M1A/B)",GAME_FLAGS )
216GAME( 1995, m1bankrl2p  ,m1bankrl   ,maygay_m1_no_oki,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v2.1 (Protocol) (M1A/B)",GAME_FLAGS )
214GAME( 1995, m1bankrl    ,0          ,maygay_m1,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v1.1 (M1A/B)",GAME_FLAGS )
215GAME( 1995, m1bankrlp   ,m1bankrl   ,maygay_m1,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v1.1 (Protocol) (M1A/B)",GAME_FLAGS )
216GAME( 1995, m1bankrl2p  ,m1bankrl   ,maygay_m1,maygay_m1, maygay1b_state,m1, ROT0, "Maygay", "Bank Roll (Maygay) v2.1 (Protocol) (M1A/B)",GAME_FLAGS )
217217
218218/*******************************************************************************************************************************************************************************************************
219219  Club Fever
trunk/src/mame/drivers/metro.c
r242703r242704
48884888      HSync - 15.55kHz
48894889
48904890
4891Korean version & international version of Dharma run on Metro hardware PCB Number - METRO CORP. MTR527
4891Korean version of Dharma runs on Metro hardware PCB Number - METRO CORP. MTR527
4892There is known to be an international version of Dharma on the MTR527 PCB:
48924893
4894DD WEA5 | Program roms
4895DD WEA6 /
48934896
4897DD WA 1 | Graphics roms
4898DD WA 2 |
4899DD WA 3 |
4900DD WA 4/
4901
4902DD WA 7 - Samples rom
4903DD WA 8 - 78C10 program rom
4904
48944905***************************************************************************/
48954906
48964907ROM_START( dharma )
48974908   ROM_REGION( 0x040000, "maincpu", 0 )        /* 68000 Code */
4898   ROM_LOAD16_BYTE( "dd__wea5.u39", 0x000000, 0x020000, CRC(960319d7) SHA1(f76783fcbb5e5a027889620c783f053d372346a8) )
4899   ROM_LOAD16_BYTE( "dd__wea6.u42", 0x000001, 0x020000, CRC(386eb6b3) SHA1(e353ea70bae521c4cc362cf2f5ce643c98c61681) )
4900
4901   ROM_REGION( 0x02c000, "audiocpu", 0 )       /* NEC78C10 Code */
4902   ROM_LOAD( "dd__wa-8.u9", 0x000000, 0x004000, CRC(af7ebc4c) SHA1(6abf0036346da10be56932f9674f8c250a3ea592) ) // (c)1992 Imagetek (11xxxxxxxxxxxxxxx = 0xFF) // == dd_ja-8
4903   ROM_CONTINUE(        0x010000, 0x01c000 )
4904
4905   ROM_REGION( 0x200000, "gfx1", 0 )   /* Gfx + Data (Addressable by CPU & Blitter) */
4906   ROMX_LOAD( "dd__wa-2.u4",  0x000000, 0x080000, CRC(2c67a5c8) SHA1(777d5f64446004bbb6dafee610ad9a1ff262349d) , ROM_GROUPWORD | ROM_SKIP(6))
4907   ROMX_LOAD( "dd__wa-4.u5",  0x000002, 0x080000, CRC(36ca7848) SHA1(278788727193ae65ed012d230a4e5966c07afe9e) , ROM_GROUPWORD | ROM_SKIP(6))
4908   ROMX_LOAD( "dd__wa-1.u10", 0x000004, 0x080000, CRC(d8034574) SHA1(a9bf29ae980033dfaae43b6ab46f850744020d92) , ROM_GROUPWORD | ROM_SKIP(6))
4909   ROMX_LOAD( "dd__wa-3.u11", 0x000006, 0x080000, CRC(fe320fa3) SHA1(80532cc38bd21608e4cff1254d993e0df72eaccf) , ROM_GROUPWORD | ROM_SKIP(6))
4910
4911   ROM_REGION( 0x040000, "oki", 0 )    /* Samples */
4912   ROM_LOAD( "dd__wa-7.u3", 0x000000, 0x040000, CRC(7ce817eb) SHA1(9dfb79021a552877fbc26049cca853c0b93735b5) ) // == dd_ja-7
4913ROM_END
4914
4915ROM_START( dharmaj )
4916   ROM_REGION( 0x040000, "maincpu", 0 )        /* 68000 Code */
49174909   ROM_LOAD16_BYTE( "dd_jc-5", 0x000000, 0x020000, CRC(b5d44426) SHA1(d68aaf6b9976ccf5cb665d7ec0afa44e2453094d) )
49184910   ROM_LOAD16_BYTE( "dd_jc-6", 0x000001, 0x020000, CRC(bc5a202e) SHA1(c2b6d2e44e3605e0525bde4030c5162badad4d4b) )
49194911
r242703r242704
62896281GAME( 1993, moegonta,  ladykill, karatour, moegonta, metro_state, karatour, ROT90,  "Yanyaka",                                         "Moeyo Gonta!! (Japan)",                  GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
62906282GAME( 1993, poitto,    0,        poitto,   poitto,   metro_state, metro,    ROT0,   "Metro / Able Corp.",                              "Poitto!",                                GAME_SUPPORTS_SAVE )
62916283GAME( 1994, blzntrnd,  0,        blzntrnd, blzntrnd, metro_state, blzntrnd, ROT0,   "Human Amusement",                                 "Blazing Tornado",                        GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
6292GAME( 1994, dharma,    0,        dharma,   dharma,   metro_state, dharmak,  ROT0,   "Metro",                                           "Dharma Doujou",                          GAME_SUPPORTS_SAVE )
6293GAME( 1994, dharmaj,   dharma,   dharma,   dharma,   metro_state, metro,    ROT0,   "Metro",                                           "Dharma Doujou (Japan)",                  GAME_SUPPORTS_SAVE )
6284GAME( 1994, dharma,    0,        dharma,   dharma,   metro_state, metro,    ROT0,   "Metro",                                           "Dharma Doujou",                          GAME_SUPPORTS_SAVE )
62946285GAME( 1994, dharmak,   dharma,   dharma,   dharma,   metro_state, dharmak,  ROT0,   "Metro",                                           "Dharma Doujou (Korea)",                  GAME_SUPPORTS_SAVE )
62956286GAME( 1994, lastfort,  0,        lastfort, lastfort, metro_state, metro,    ROT0,   "Metro",                                           "Last Fortress - Toride",                 GAME_SUPPORTS_SAVE )
62966287GAME( 1994, lastforte, lastfort, lastfort, lastfero, metro_state, metro,    ROT0,   "Metro",                                           "Last Fortress - Toride (Erotic, Rev C)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/mjkjidai.c
r242703r242704
282282void mjkjidai_state::machine_start()
283283{
284284   membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000);
285
285   
286286   save_item(NAME(m_adpcm_pos));
287287   save_item(NAME(m_adpcm_end));
288288   save_item(NAME(m_keyb));
trunk/src/mame/drivers/mpu3.c
r242703r242704
801801   MCFG_STEPPER_END_INDEX(3)\
802802   MCFG_STEPPER_INDEX_PATTERN(0x00)\
803803   MCFG_STEPPER_INIT_PHASE(2)
804
804   
805805static MACHINE_CONFIG_START( mpu3base, mpu3_state )
806806   MCFG_CPU_ADD("maincpu", M6808, MPU3_MASTER_CLOCK)///4)
807807   MCFG_CPU_PROGRAM_MAP(mpu3_basemap)
trunk/src/mame/drivers/mpu4.c
r242703r242704
22412241ROM_START( m4nod )
22422242   ROM_REGION( 0x10000, "maincpu", 0 )
22432243   ROM_LOAD( "nod.bin", 0x0000, 0x010000, CRC(bc738af5) SHA1(8df436139554ccfb48c4db0a32e3333dbf3c4f46) )
2244   ROM_REGION( 0x200000, "msm6376", ROMREGION_ERASE00 ) //region was called "upd" but machine is mod4oki? Which one is correct?
2244   ROM_REGION( 0x200000, "upd", ROMREGION_ERASE00 )
22452245   ROM_LOAD( "nodsnd.bin", 0x0000, 0x080000, CRC(2134494a) SHA1(3b665bf79567a71195b20e76c50b02707d15b78d) )
22462246ROM_END
22472247
trunk/src/mame/drivers/mpu4hw.c
r242703r242704
24772477   MCFG_STEPPER_END_INDEX(3)\
24782478   MCFG_STEPPER_INDEX_PATTERN(0x00)\
24792479   MCFG_STEPPER_INIT_PHASE(2)
2480
2480   
24812481#define MCFG_MPU4_TYPE2_REEL_ADD(_tag)\
24822482   MCFG_STEPPER_ADD(_tag)\
24832483   MCFG_STEPPER_REEL_TYPE(BARCREST_48STEP_REEL)\
r242703r242704
25012501   MCFG_STEPPER_END_INDEX(3)\
25022502   MCFG_STEPPER_INDEX_PATTERN(0x00)\
25032503   MCFG_STEPPER_INIT_PHASE(2)
2504   
25042505
2505
25062506MACHINE_CONFIG_FRAGMENT( mpu4_std_4reel )
25072507   MCFG_MPU4_STD_REEL_ADD("reel0")
25082508   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel0_optic_cb))
r242703r242704
25112511   MCFG_MPU4_STD_REEL_ADD("reel2")
25122512   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25132513   MCFG_MPU4_STD_REEL_ADD("reel3")
2514   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2515MACHINE_CONFIG_END
2514   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
2515MACHINE_CONFIG_END   
25162516
25172517MACHINE_CONFIG_FRAGMENT( mpu4_std_5reel )
25182518   MCFG_MPU4_STD_REEL_ADD("reel0")
r242703r242704
25222522   MCFG_MPU4_STD_REEL_ADD("reel2")
25232523   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25242524   MCFG_MPU4_STD_REEL_ADD("reel3")
2525   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2525   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
25262526   MCFG_MPU4_STD_REEL_ADD("reel4")
2527   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
2528MACHINE_CONFIG_END
2527   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))   
2528MACHINE_CONFIG_END   
25292529
25302530MACHINE_CONFIG_FRAGMENT( mpu4_std_6reel )
25312531   MCFG_MPU4_STD_REEL_ADD("reel0")
r242703r242704
25352535   MCFG_MPU4_STD_REEL_ADD("reel2")
25362536   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25372537   MCFG_MPU4_STD_REEL_ADD("reel3")
2538   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2538   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
25392539   MCFG_MPU4_STD_REEL_ADD("reel4")
2540   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
2540   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))   
25412541   MCFG_MPU4_STD_REEL_ADD("reel5")
2542   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
2543MACHINE_CONFIG_END
2542   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))   
2543MACHINE_CONFIG_END   
25442544
25452545MACHINE_CONFIG_FRAGMENT( mpu4_type2_6reel )
25462546   MCFG_MPU4_TYPE2_REEL_ADD("reel0")
r242703r242704
25502550   MCFG_MPU4_TYPE2_REEL_ADD("reel2")
25512551   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25522552   MCFG_MPU4_TYPE2_REEL_ADD("reel3")
2553   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2553   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
25542554   MCFG_MPU4_TYPE2_REEL_ADD("reel4")
25552555   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
25562556   MCFG_MPU4_TYPE2_REEL_ADD("reel5")
25572557   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel5_optic_cb))
2558MACHINE_CONFIG_END
2558MACHINE_CONFIG_END   
25592559
25602560
25612561MACHINE_CONFIG_FRAGMENT( mpu4_bwb_5reel )
r242703r242704
25662566   MCFG_MPU4_BWB_REEL_ADD("reel2")
25672567   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25682568   MCFG_MPU4_BWB_REEL_ADD("reel3")
2569   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2569   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
25702570   MCFG_MPU4_BWB_REEL_ADD("reel4")
25712571   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
2572MACHINE_CONFIG_END
2573
2572MACHINE_CONFIG_END   
2573   
25742574MACHINE_CONFIG_FRAGMENT( mpu4_alt_7reel )
25752575   MCFG_MPU4_TYPE3_REEL_ADD("reel0")
25762576   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel0_optic_cb))
r242703r242704
25792579   MCFG_MPU4_TYPE3_REEL_ADD("reel2")
25802580   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel2_optic_cb))
25812581   MCFG_MPU4_TYPE3_REEL_ADD("reel3")
2582   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))
2582   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel3_optic_cb))   
25832583   MCFG_MPU4_TYPE3_REEL_ADD("reel4")
25842584   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel4_optic_cb))
25852585   MCFG_MPU4_TYPE3_REEL_ADD("reel5")
r242703r242704
25872587   MCFG_MPU4_TYPE3_REEL_ADD("reel6")
25882588   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel6_optic_cb))
25892589   MCFG_MPU4_TYPE3_REEL_ADD("reel7")
2590   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel7_optic_cb))
2591MACHINE_CONFIG_END
2590   MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(mpu4_state, reel7_optic_cb))   
2591MACHINE_CONFIG_END   
25922592
25932593MACHINE_CONFIG_FRAGMENT( mpu4_common )
25942594   MCFG_TIMER_DRIVER_ADD_PERIODIC("50hz", mpu4_state, gen_50hz, attotime::from_hz(100))
r242703r242704
26542654   MCFG_PIA_CB2_HANDLER(WRITELINE(mpu4_state, pia_ic8_cb2_w))
26552655   MCFG_PIA_IRQA_HANDLER(WRITELINE(mpu4_state, cpu0_irq))
26562656   MCFG_PIA_IRQB_HANDLER(WRITELINE(mpu4_state, cpu0_irq))
2657
2657   
26582658MACHINE_CONFIG_END
26592659
26602660MACHINE_CONFIG_FRAGMENT( mpu4_common2 )
r242703r242704
27272727
27282728   MCFG_FRAGMENT_ADD(mpu4_common2)
27292729   MCFG_FRAGMENT_ADD(mpu4_std_6reel)
2730
2730   
27312731   MCFG_SOUND_ADD("msm6376", OKIM6376, 128000)     //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz
27322732   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
27332733   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
r242703r242704
27492749
27502750   MCFG_FRAGMENT_ADD(mpu4_common2)
27512751   MCFG_FRAGMENT_ADD(mpu4_std_5reel)
2752
2752   
27532753   MCFG_SOUND_ADD("msm6376", OKIM6376, 128000)     //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz
27542754   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
27552755   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
r242703r242704
27592759   MCFG_MACHINE_START_OVERRIDE(mpu4_state,mpu4bwb)
27602760   MCFG_FRAGMENT_ADD(mpu4_common2)
27612761   MCFG_FRAGMENT_ADD(mpu4_bwb_5reel)
2762
2762   
27632763   MCFG_SOUND_ADD("msm6376", OKIM6376, 128000)     //16KHz sample Can also be 85430 at 10.5KHz and 64000 at 8KHz
27642764   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
27652765   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
trunk/src/mame/drivers/namcops2.c
r242703r242704
325325// only known System Super 256 game; if more surface the BIOS should be moved out like 246/256
326326ROM_START( timecrs4 )
327327   ROM_REGION(0x200000, "bios", 0)
328   ROM_LOAD( "r27v1602f.8g", 0x000000, 0x200000, CRC(b2a8eeb6) SHA1(bc4fb4e1e53adbd92385f1726bd69663ff870f1e) )
328   ROM_LOAD( "r27v1602f.8g", 0x000000, 0x200000, CRC(b2a8eeb6) SHA1(bc4fb4e1e53adbd92385f1726bd69663ff870f1e) )
329329
330330   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
331   ROM_LOAD( "tsf1002-na-a.ic002", 0x000000, 0x800000, CRC(406183a4) SHA1(dd6afaa4808254b277c5969d071f1dd0019633a0) )
332   ROM_LOAD( "tsf1002-na-a_spr.ic002", 0x800000, 0x040000, CRC(e7339b66) SHA1(99a2fd5528daf11a7ea548d9de804f899a2a9c6b) )
331   ROM_LOAD( "tsf1002-na-a.ic002", 0x000000, 0x800000, CRC(406183a4) SHA1(dd6afaa4808254b277c5969d071f1dd0019633a0) )
332   ROM_LOAD( "tsf1002-na-a_spr.ic002", 0x800000, 0x040000, CRC(e7339b66) SHA1(99a2fd5528daf11a7ea548d9de804f899a2a9c6b) )
333333
334   DISK_REGION("dvd")  // HDD for this game
334   DISK_REGION("dvd")   // HDD for this game
335335   DISK_IMAGE_READONLY( "tsf1-ha", 0, SHA1(8ba7eec0d1add2192a115b295a32265c8d084aea) )
336336ROM_END
337337
r242703r242704
411411   SYSTEM256_BIOS
412412
413413   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
414   ROM_LOAD( "ted1vera.ic002", 0x000000, 0x800000, CRC(491521d1) SHA1(9c27836445690bc083c6f274a4b1a499d5677830) )
415   ROM_LOAD( "ted1vera_spr.ic002", 0x800000, 0x040000, CRC(a9e1e92b) SHA1(3843d0fea2f12f14f83d0a04430bb9b01cfdef07) )
414   ROM_LOAD( "ted1vera.ic002", 0x000000, 0x800000, CRC(491521d1) SHA1(9c27836445690bc083c6f274a4b1a499d5677830) )
415   ROM_LOAD( "ted1vera_spr.ic002", 0x800000, 0x040000, CRC(a9e1e92b) SHA1(3843d0fea2f12f14f83d0a04430bb9b01cfdef07) )
416416
417417   DISK_REGION("dvd")
418418   DISK_IMAGE_READONLY( "ted1dvd0b", 0, SHA1(5940cc628a1555763ef2055e518f840f9a44d123) )
r242703r242704
435435   SYSTEM246_BIOS
436436
437437   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
438   ROM_LOAD( "pr21vera.ic002", 0x000000, 0x800000, CRC(36634ad2) SHA1(e365a79220202640e5bc80bbd8a329012f22f9c4) )
439   ROM_LOAD( "pr21vera_spr.ic002", 0x000000, 0x040000, CRC(4e81ef24) SHA1(7b7b9d9a0193bcaccb1578cae9dde37fc456e6f8) )
438   ROM_LOAD( "pr21vera.ic002", 0x000000, 0x800000, CRC(36634ad2) SHA1(e365a79220202640e5bc80bbd8a329012f22f9c4) )
439   ROM_LOAD( "pr21vera_spr.ic002", 0x000000, 0x040000, CRC(4e81ef24) SHA1(7b7b9d9a0193bcaccb1578cae9dde37fc456e6f8) )
440440
441441   DISK_REGION("dvd")
442442   DISK_IMAGE_READONLY( "pr21dvd0", 0, SHA1(6bad5c25996bbe68da71199fbe8377b51fe78d81) )
r242703r242704
513513   SYSTEM246_BIOS
514514
515515   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
516   ROM_LOAD( "rrv2vera.ic002", 0x000000, 0x800000, CRC(4666f6b5) SHA1(974ed4f6c5869ecf879c0d3540db6ea576225c04) )
517   ROM_LOAD( "rrv2vera_spr.ic002", 0x800000, 0x040000, CRC(8d98ef04) SHA1(3f33046a8283b918226301fcf5538729be84bfbe) )
516   ROM_LOAD( "rrv2vera.ic002", 0x000000, 0x800000, CRC(4666f6b5) SHA1(974ed4f6c5869ecf879c0d3540db6ea576225c04) )
517   ROM_LOAD( "rrv2vera_spr.ic002", 0x800000, 0x040000, CRC(8d98ef04) SHA1(3f33046a8283b918226301fcf5538729be84bfbe) )
518518
519519   ROM_REGION(0x4010, "jvsio", 0)  // Namco "FCA" JVS I/O board PIC16F84 code (see namcos23.c for FCA details)
520520   ROM_LOAD( "fcap11.ic2",   0x000000, 0x004010, CRC(1b2592ce) SHA1(a1a487361053af564f6ec67e545413e370a3b38c) )
r242703r242704
579579   SYSTEM246_BIOS
580580
581581   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
582   ROM_LOAD( "qg1vera.ic002", 0x000000, 0x800000, CRC(650d55fa) SHA1(cf1210bc1f2d48c298ed19e3c6a1e5e564840e47) )
583   ROM_LOAD( "qg1vera_spr.ic002", 0x800000, 0x040000, CRC(d9715f53) SHA1(e45f0eef5b82b2e1afb054a137aced0344ddbd71) )
582   ROM_LOAD( "qg1vera.ic002", 0x000000, 0x800000, CRC(650d55fa) SHA1(cf1210bc1f2d48c298ed19e3c6a1e5e564840e47) )
583   ROM_LOAD( "qg1vera_spr.ic002", 0x800000, 0x040000, CRC(d9715f53) SHA1(e45f0eef5b82b2e1afb054a137aced0344ddbd71) )
584584
585585   DISK_REGION("dvd")
586586   DISK_IMAGE_READONLY( "qg1", 0, SHA1(80fe5cb325c7cfa439d66e9d264337c01559d0e5) )
r242703r242704
614614   SYSTEM256_BIOS
615615
616616   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
617   ROM_LOAD( "gvs1vera.ic002", 0x000000, 0x800000, CRC(b938b96d) SHA1(e79bc7f8c234d51d1b6a34be88f34abc8205a370) )
618   ROM_LOAD( "gvs1vera_spr.ic002", 0x800000, 0x040000, CRC(f2d65d54) SHA1(297726098c3723e38cbaf3a3150a4a027a9c2124) )
617   ROM_LOAD( "gvs1vera.ic002", 0x000000, 0x800000, CRC(b938b96d) SHA1(e79bc7f8c234d51d1b6a34be88f34abc8205a370) )
618   ROM_LOAD( "gvs1vera_spr.ic002", 0x800000, 0x040000, CRC(f2d65d54) SHA1(297726098c3723e38cbaf3a3150a4a027a9c2124) )
619619
620620   DISK_REGION("dvd")
621621   DISK_IMAGE_READONLY( "gvs1dvd0b", 0, SHA1(3cf9ade5495982fcb8e106e7be4067429530f864) )
r242703r242704
703703
704704// System Super 256
705705GAME(2006, timecrs4,   sys256, system256, system246, driver_device, 0, ROT0, "Namco", "Time Crisis 4", GAME_IS_SKELETON)
706
trunk/src/mame/drivers/overdriv.c
r242703r242704
274274static MACHINE_CONFIG_START( overdriv, overdriv_state )
275275
276276   /* basic machine hardware */
277   MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2)  /* 12 MHz */
277   MCFG_CPU_ADD("maincpu", M68000,24000000/2)  /* 12 MHz */
278278   MCFG_CPU_PROGRAM_MAP(overdriv_master_map)
279279   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", overdriv_state, overdriv_cpuA_scanline, "screen", 0, 1)
280280
281   MCFG_CPU_ADD("sub", M68000, XTAL_24MHz/2)  /* 12 MHz */
281   MCFG_CPU_ADD("sub", M68000,24000000/2)  /* 12 MHz */
282282   MCFG_CPU_PROGRAM_MAP(overdriv_slave_map)
283283   MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state,  cpuB_interrupt)   /* IRQ 5 and 6 are generated by the main CPU. */
284284                                       /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */
285285
286   MCFG_CPU_ADD("audiocpu", M6809, XTAL_3_579545MHz)     /* 1.789 MHz?? This might be the right speed, but ROM testing */
286   MCFG_CPU_ADD("audiocpu", M6809,3579545)     /* 1.789 MHz?? This might be the right speed, but ROM testing */
287287   MCFG_CPU_PROGRAM_MAP(overdriv_sound_map)    /* takes a little too much (the counter wraps from 0000 to 9999). */
288288                                    /* This might just mean that the video refresh rate is less than */
289289                                    /* 60 fps, that's how I fixed it for now. */
r242703r242704
330330   MCFG_K053250_ADD("k053250_1", "palette", "screen", 0, 0)
331331   MCFG_K053250_ADD("k053250_2", "palette", "screen", 0, 0)
332332
333   MCFG_DEVICE_ADD("k053252", K053252, XTAL_24MHz/4)
333   MCFG_DEVICE_ADD("k053252", K053252, 24000000/4)
334334   MCFG_K053252_OFFSETS(13*8, 2*8)
335335
336336   /* sound hardware */
337337   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
338338
339   MCFG_YM2151_ADD("ymsnd", XTAL_3_579545MHz)
339   MCFG_YM2151_ADD("ymsnd", 3579545)
340340   MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
341341   MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
342342
343   MCFG_K053260_ADD("k053260_1", XTAL_3_579545MHz)
343   MCFG_K053260_ADD("k053260_1", 3579545)
344344   MCFG_K053260_REGION("shared")
345345   MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
346346   MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
347347
348   MCFG_K053260_ADD("k053260_2", XTAL_3_579545MHz)
348   MCFG_K053260_ADD("k053260_2", 3579545)
349349   MCFG_K053260_REGION("shared")
350350   MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
351351   MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
r242703r242704
361361
362362ROM_START( overdriv )
363363   ROM_REGION( 0x40000, "maincpu", 0 )
364   ROM_LOAD16_BYTE( "789_n05.d17", 0x00000, 0x20000, CRC(f7885713) SHA1(8e84929dcc6ab889c3e11c450d22c56b183b0198) )
365   ROM_LOAD16_BYTE( "789_n04.b17", 0x00001, 0x20000, CRC(aefe87a6) SHA1(1bdf5a1f4c5e2b84d02b2981b3be91ed2406a1f8) )
364   ROM_LOAD16_BYTE( "789.2",        0x00000, 0x20000, CRC(77f18f3f) SHA1(a8c91435573c7851a7864d07eeacfb2f142abbe2) )
365   ROM_LOAD16_BYTE( "789.1",        0x00001, 0x20000, CRC(4f44e6ad) SHA1(9fa871f55e6b2ec353dd979ded568cd9da83f5d6) )
366366
367367   ROM_REGION( 0x40000, "sub", 0 )
368   ROM_LOAD16_BYTE( "789_e09.l10", 0x00000, 0x20000, CRC(46fb7e88) SHA1(f706a76aff9bec64abe6da325cba0715d6e6ed0a) ) /* also found labeled as "4" as well as "7" */
369   ROM_LOAD16_BYTE( "789_e08.k10", 0x00001, 0x20000, CRC(24427195) SHA1(48f4f81729acc0e497b40fddbde11242c5c4c573) ) /* also found labeled as "3" as well as "6" */
368   ROM_LOAD16_BYTE( "789.4",        0x00000, 0x20000, CRC(46fb7e88) SHA1(f706a76aff9bec64abe6da325cba0715d6e6ed0a) )
369   ROM_LOAD16_BYTE( "789.3",        0x00001, 0x20000, CRC(24427195) SHA1(48f4f81729acc0e497b40fddbde11242c5c4c573) )
370370
371371   ROM_REGION( 0x10000, "audiocpu", 0 )
372   ROM_LOAD( "789_e01.e4", 0x00000, 0x10000, CRC(1085f069) SHA1(27228cedb357ff2e130a4bd6d8aa01cf537e034f) ) /* also found labeled as "5" */
372   ROM_LOAD( "789.5",        0x00000, 0x10000, CRC(1085f069) SHA1(27228cedb357ff2e130a4bd6d8aa01cf537e034f) )
373373
374374   ROM_REGION( 0x400000, "gfx1", 0 )   /* graphics (addressable by the CPU) */
375   ROM_LOAD64_WORD( "789e12.r1",  0x000000, 0x100000, CRC(14a10fb2) SHA1(03fb9c15514c5ecc2d9ae4a53961c4bbb49cec73) )    /* sprites */
376   ROM_LOAD64_WORD( "789e13.r4",  0x000002, 0x100000, CRC(6314a628) SHA1(f8a8918998c266109348c77427a7696b503daeb3) )
377   ROM_LOAD64_WORD( "789e14.r10", 0x000004, 0x100000, CRC(b5eca14b) SHA1(a1c5f5e9cd8bbcfc875e2acb33be024724da63aa) )
378   ROM_LOAD64_WORD( "789e15.r15", 0x000006, 0x100000, CRC(5d93e0c3) SHA1(d5cb7666c0c28fd465c860c7f9dbb18a7f739a93) )
375   ROM_LOAD64_WORD( "e12.r1",       0x000000, 0x100000, CRC(14a10fb2) SHA1(03fb9c15514c5ecc2d9ae4a53961c4bbb49cec73) )    /* sprites */
376   ROM_LOAD64_WORD( "e13.r4",       0x000002, 0x100000, CRC(6314a628) SHA1(f8a8918998c266109348c77427a7696b503daeb3) )
377   ROM_LOAD64_WORD( "e14.r10",      0x000004, 0x100000, CRC(b5eca14b) SHA1(a1c5f5e9cd8bbcfc875e2acb33be024724da63aa) )
378   ROM_LOAD64_WORD( "e15.r15",      0x000006, 0x100000, CRC(5d93e0c3) SHA1(d5cb7666c0c28fd465c860c7f9dbb18a7f739a93) )
379379
380380   ROM_REGION( 0x020000, "k051316_1", 0 )
381   ROM_LOAD( "789e06.a21", 0x000000, 0x020000, CRC(14a085e6) SHA1(86dad6f223e13ff8af7075c3d99bb0a83784c384) )    /* zoom/rotate */
381   ROM_LOAD( "e06.a21",      0x000000, 0x020000, CRC(14a085e6) SHA1(86dad6f223e13ff8af7075c3d99bb0a83784c384) )    /* zoom/rotate */
382382
383383   ROM_REGION( 0x020000, "k051316_2", 0 )
384   ROM_LOAD( "789e07.c23", 0x000000, 0x020000, CRC(8a6ceab9) SHA1(1a52b7361f71a6126cd648a76af00223d5b25c7a) )    /* zoom/rotate */
384   ROM_LOAD( "e07.c23",      0x000000, 0x020000, CRC(8a6ceab9) SHA1(1a52b7361f71a6126cd648a76af00223d5b25c7a) )    /* zoom/rotate */
385385
386386   ROM_REGION( 0x0c0000, "k053250_1", 0 )
387   ROM_LOAD( "789e18.p22", 0x000000, 0x040000, CRC(985a4a75) SHA1(b726166c295be6fbec38a9d11098cc4a4a5de456) )
388   ROM_LOAD( "789e19.r22", 0x040000, 0x040000, CRC(15c54ea2) SHA1(5b10bd28e48e51613359820ba8c75d4a91c2d322) )
389   ROM_LOAD( "789e20.s22", 0x080000, 0x040000, CRC(ea204acd) SHA1(52b8c30234eaefcba1074496028a4ac2bca48e95) )
387   ROM_LOAD( "e18.p22",      0x000000, 0x040000, CRC(985a4a75) SHA1(b726166c295be6fbec38a9d11098cc4a4a5de456) )
388   ROM_LOAD( "e19.r22",      0x040000, 0x040000, CRC(15c54ea2) SHA1(5b10bd28e48e51613359820ba8c75d4a91c2d322) )
389   ROM_LOAD( "e20.s22",      0x080000, 0x040000, CRC(ea204acd) SHA1(52b8c30234eaefcba1074496028a4ac2bca48e95) )
390390
391391   ROM_REGION( 0x080000, "k053250_2", 0 )
392   ROM_LOAD( "789e17.p17", 0x000000, 0x040000, CRC(04c07248) SHA1(873445002cbf90c9fc5a35bf4a8f6c43193ee342) )
393   ROM_LOAD( "789e16.p12", 0x040000, 0x040000, CRC(9348dee1) SHA1(367193373e28962b5b0e54cc15d68ed88ab83f12) )
392   ROM_LOAD( "e17.p17",      0x000000, 0x040000, CRC(04c07248) SHA1(873445002cbf90c9fc5a35bf4a8f6c43193ee342) )
393   ROM_LOAD( "e16.p12",      0x040000, 0x040000, CRC(9348dee1) SHA1(367193373e28962b5b0e54cc15d68ed88ab83f12) )
394394
395395   ROM_REGION( 0x200000, "shared", 0 ) /* 053260 samples */
396   ROM_LOAD( "789e03.j1", 0x000000, 0x100000, CRC(51ebfebe) SHA1(17f0c23189258e801f48d5833fe934e7a48d071b) )
397   ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
396   ROM_LOAD( "e03.j1",       0x000000, 0x100000, CRC(51ebfebe) SHA1(17f0c23189258e801f48d5833fe934e7a48d071b) )
397   ROM_LOAD( "e02.f1",       0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
398398ROM_END
399399
400ROM_START( overdriva )
401   ROM_REGION( 0x40000, "maincpu", 0 )
402   ROM_LOAD16_BYTE( "2.d17", 0x00000, 0x20000, CRC(77f18f3f) SHA1(a8c91435573c7851a7864d07eeacfb2f142abbe2) )
403   ROM_LOAD16_BYTE( "1.b17", 0x00001, 0x20000, CRC(4f44e6ad) SHA1(9fa871f55e6b2ec353dd979ded568cd9da83f5d6) ) /* also found labeled as "3" */
404
405   ROM_REGION( 0x40000, "sub", 0 )
406   ROM_LOAD16_BYTE( "789_e09.l10", 0x00000, 0x20000, CRC(46fb7e88) SHA1(f706a76aff9bec64abe6da325cba0715d6e6ed0a) ) /* also found labeled as "4" as well as "7" */
407   ROM_LOAD16_BYTE( "789_e08.k10", 0x00001, 0x20000, CRC(24427195) SHA1(48f4f81729acc0e497b40fddbde11242c5c4c573) ) /* also found labeled as "3" as well as "6" */
408
409   ROM_REGION( 0x10000, "audiocpu", 0 )
410   ROM_LOAD( "789_e01.e4", 0x00000, 0x10000, CRC(1085f069) SHA1(27228cedb357ff2e130a4bd6d8aa01cf537e034f) ) /* also found labeled as "5" */
411
412   ROM_REGION( 0x400000, "gfx1", 0 )   /* graphics (addressable by the CPU) */
413   ROM_LOAD64_WORD( "789e12.r1",  0x000000, 0x100000, CRC(14a10fb2) SHA1(03fb9c15514c5ecc2d9ae4a53961c4bbb49cec73) )    /* sprites */
414   ROM_LOAD64_WORD( "789e13.r4",  0x000002, 0x100000, CRC(6314a628) SHA1(f8a8918998c266109348c77427a7696b503daeb3) )
415   ROM_LOAD64_WORD( "789e14.r10", 0x000004, 0x100000, CRC(b5eca14b) SHA1(a1c5f5e9cd8bbcfc875e2acb33be024724da63aa) )
416   ROM_LOAD64_WORD( "789e15.r15", 0x000006, 0x100000, CRC(5d93e0c3) SHA1(d5cb7666c0c28fd465c860c7f9dbb18a7f739a93) )
417
418   ROM_REGION( 0x020000, "k051316_1", 0 )
419   ROM_LOAD( "789e06.a21", 0x000000, 0x020000, CRC(14a085e6) SHA1(86dad6f223e13ff8af7075c3d99bb0a83784c384) )    /* zoom/rotate */
420
421   ROM_REGION( 0x020000, "k051316_2", 0 )
422   ROM_LOAD( "789e07.c23", 0x000000, 0x020000, CRC(8a6ceab9) SHA1(1a52b7361f71a6126cd648a76af00223d5b25c7a) )    /* zoom/rotate */
423
424   ROM_REGION( 0x0c0000, "k053250_1", 0 )
425   ROM_LOAD( "789e18.p22", 0x000000, 0x040000, CRC(985a4a75) SHA1(b726166c295be6fbec38a9d11098cc4a4a5de456) )
426   ROM_LOAD( "789e19.r22", 0x040000, 0x040000, CRC(15c54ea2) SHA1(5b10bd28e48e51613359820ba8c75d4a91c2d322) )
427   ROM_LOAD( "789e20.s22", 0x080000, 0x040000, CRC(ea204acd) SHA1(52b8c30234eaefcba1074496028a4ac2bca48e95) )
428
429   ROM_REGION( 0x080000, "k053250_2", 0 )
430   ROM_LOAD( "789e17.p17", 0x000000, 0x040000, CRC(04c07248) SHA1(873445002cbf90c9fc5a35bf4a8f6c43193ee342) )
431   ROM_LOAD( "789e16.p12", 0x040000, 0x040000, CRC(9348dee1) SHA1(367193373e28962b5b0e54cc15d68ed88ab83f12) )
432
433   ROM_REGION( 0x200000, "shared", 0 ) /* 053260 samples */
434   ROM_LOAD( "789e03.j1", 0x000000, 0x100000, CRC(51ebfebe) SHA1(17f0c23189258e801f48d5833fe934e7a48d071b) )
435   ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
436ROM_END
437
438ROM_START( overdrivb )
439   ROM_REGION( 0x40000, "maincpu", 0 )
440   ROM_LOAD16_BYTE( "4.d17", 0x00000, 0x20000, CRC(93c8e892) SHA1(fb41bb13787b93f533b962c3119e6b9f61e2f3f3) )
441   ROM_LOAD16_BYTE( "3.b17", 0x00001, 0x20000, CRC(4f44e6ad) SHA1(9fa871f55e6b2ec353dd979ded568cd9da83f5d6) ) /* also found labeled as "1" */
442
443   ROM_REGION( 0x40000, "sub", 0 )
444   ROM_LOAD16_BYTE( "789_e09.l10", 0x00000, 0x20000, CRC(46fb7e88) SHA1(f706a76aff9bec64abe6da325cba0715d6e6ed0a) ) /* also found labeled as "4" as well as "7" */
445   ROM_LOAD16_BYTE( "789_e08.k10", 0x00001, 0x20000, CRC(24427195) SHA1(48f4f81729acc0e497b40fddbde11242c5c4c573) ) /* also found labeled as "3" as well as "6" */
446
447   ROM_REGION( 0x10000, "audiocpu", 0 )
448   ROM_LOAD( "789_e01.e4", 0x00000, 0x10000, CRC(1085f069) SHA1(27228cedb357ff2e130a4bd6d8aa01cf537e034f) ) /* also found labeled as "5" */
449
450   ROM_REGION( 0x400000, "gfx1", 0 )   /* graphics (addressable by the CPU) */
451   ROM_LOAD64_WORD( "789e12.r1",  0x000000, 0x100000, CRC(14a10fb2) SHA1(03fb9c15514c5ecc2d9ae4a53961c4bbb49cec73) )    /* sprites */
452   ROM_LOAD64_WORD( "789e13.r4",  0x000002, 0x100000, CRC(6314a628) SHA1(f8a8918998c266109348c77427a7696b503daeb3) )
453   ROM_LOAD64_WORD( "789e14.r10", 0x000004, 0x100000, CRC(b5eca14b) SHA1(a1c5f5e9cd8bbcfc875e2acb33be024724da63aa) )
454   ROM_LOAD64_WORD( "789e15.r15", 0x000006, 0x100000, CRC(5d93e0c3) SHA1(d5cb7666c0c28fd465c860c7f9dbb18a7f739a93) )
455
456   ROM_REGION( 0x020000, "k051316_1", 0 )
457   ROM_LOAD( "789e06.a21", 0x000000, 0x020000, CRC(14a085e6) SHA1(86dad6f223e13ff8af7075c3d99bb0a83784c384) )    /* zoom/rotate */
458
459   ROM_REGION( 0x020000, "k051316_2", 0 )
460   ROM_LOAD( "789e07.c23", 0x000000, 0x020000, CRC(8a6ceab9) SHA1(1a52b7361f71a6126cd648a76af00223d5b25c7a) )    /* zoom/rotate */
461
462   ROM_REGION( 0x0c0000, "k053250_1", 0 )
463   ROM_LOAD( "789e18.p22", 0x000000, 0x040000, CRC(985a4a75) SHA1(b726166c295be6fbec38a9d11098cc4a4a5de456) )
464   ROM_LOAD( "789e19.r22", 0x040000, 0x040000, CRC(15c54ea2) SHA1(5b10bd28e48e51613359820ba8c75d4a91c2d322) )
465   ROM_LOAD( "789e20.s22", 0x080000, 0x040000, CRC(ea204acd) SHA1(52b8c30234eaefcba1074496028a4ac2bca48e95) )
466
467   ROM_REGION( 0x080000, "k053250_2", 0 )
468   ROM_LOAD( "789e17.p17", 0x000000, 0x040000, CRC(04c07248) SHA1(873445002cbf90c9fc5a35bf4a8f6c43193ee342) )
469   ROM_LOAD( "789e16.p12", 0x040000, 0x040000, CRC(9348dee1) SHA1(367193373e28962b5b0e54cc15d68ed88ab83f12) )
470
471   ROM_REGION( 0x200000, "shared", 0 ) /* 053260 samples */
472   ROM_LOAD( "789e03.j1", 0x000000, 0x100000, CRC(51ebfebe) SHA1(17f0c23189258e801f48d5833fe934e7a48d071b) )
473   ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
474ROM_END
475
476GAMEL( 1990, overdriv,         0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
477GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
478GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
No newline at end of file
400GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
trunk/src/mame/drivers/relief.c
r242703r242704
106106
107107static ADDRESS_MAP_START( oki_map, AS_0, 8, relief_state )
108108   AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("okibank")
109   AM_RANGE(0x20000, 0x3ffff) AM_ROM
109   AM_RANGE(0x20000, 0x3ffff) AM_ROM
110110ADDRESS_MAP_END
111111
112112
r242703r242704
431431}
432432
433433
434     
434435
435
436436/*************************************
437437 *
438438 *  Game driver(s)
trunk/src/mame/drivers/renegade.c
r242703r242704
131131   // (chip select for an unpopulated fourth ROM?)
132132   switch (data & 0x1c)
133133   {
134      case 0x18: m_adpcm_pos = 0 * 0x8000 * 2; break;     // 110 -> ic33
135      case 0x14: m_adpcm_pos = 1 * 0x8000 * 2; break;     // 101 -> ic32
136      case 0x0c: m_adpcm_pos = 2 * 0x8000 * 2; break;     // 011 -> ic31
137      default: m_adpcm_pos = m_adpcm_end = 0; return; // doesn't happen
134      case 0x18: m_adpcm_pos = 0 * 0x8000 * 2; break;      // 110 -> ic33
135      case 0x14: m_adpcm_pos = 1 * 0x8000 * 2; break;      // 101 -> ic32
136      case 0x0c: m_adpcm_pos = 2 * 0x8000 * 2; break;      // 011 -> ic31
137      default: m_adpcm_pos = m_adpcm_end = 0; return;   // doesn't happen
138138   }
139139   // bits 0-1 are a13-a14
140140   m_adpcm_pos |= (data & 0x03) * 0x2000 * 2;
trunk/src/mame/drivers/sbrkout.c
r242703r242704
66
77    Games supported:
88        * Super Breakout
9        * Super Breakout (Canyon and Vertical Breakout, prototype)
10        * Super Breakout (Cocktail, prototype)
9        * Super Breakout (Canyon and Vertical Breakout, prototype) - built from original source code
1110
1211    Known issues:
1312        * none at this time
r242703r242704
6059   UINT8 m_pot_trigger[2];
6160   DECLARE_WRITE8_MEMBER(irq_ack_w);
6261   DECLARE_READ8_MEMBER(switches_r);
63   DECLARE_READ8_MEMBER(sbrkoutct_switches_r);
6462   DECLARE_WRITE8_MEMBER(pot_mask1_w);
6563   DECLARE_WRITE8_MEMBER(pot_mask2_w);
6664   DECLARE_WRITE8_MEMBER(start_1_led_w);
6765   DECLARE_WRITE8_MEMBER(start_2_led_w);
6866   DECLARE_WRITE8_MEMBER(serve_led_w);
69   DECLARE_WRITE8_MEMBER(serve_2_led_w);
7067   DECLARE_WRITE8_MEMBER(coincount_w);
7168   DECLARE_READ8_MEMBER(sync_r);
7269   DECLARE_READ8_MEMBER(sync2_r);
r242703r242704
215212   return result;
216213}
217214
218READ8_MEMBER(sbrkout_state::sbrkoutct_switches_r)
219{
220   UINT8 result = 0xff;
221215
222   switch( offset )
223   {
224      case 0x28: result = ioport("SELECT")->read(); break;
225      case 0x2e: result = ioport("SERVE")->read(); break;
226      case 0x2f: result = ioport("SERVE2")->read(); break;
227      case 0x30: result = (ioport("DIPS")->read() & 0x03) << 6; break;
228      case 0x31: result = (ioport("DIPS")->read() & 0x0c) << 4; break;
229      case 0x32: result = ioport("DIPS")->read() & 0xc0; break;
230      case 0x33: result = (ioport("DIPS")->read() & 0x30) << 2; break;
231      default: logerror("Unknown port read %x\n", offset); break;
232   }
233   return result;
234}
235
236216void sbrkout_state::update_nmi_state()
237217{
238218   if ((m_pot_trigger[0] & ~m_pot_mask[0]) | (m_pot_trigger[1] & ~m_pot_mask[1]))
r242703r242704
295275   output_set_led_value(0, ~offset & 1);
296276}
297277
298WRITE8_MEMBER(sbrkout_state::serve_2_led_w)
299{
300   output_set_led_value(1, ~offset & 1);
301}
302278
303279WRITE8_MEMBER(sbrkout_state::coincount_w)
304280{
r242703r242704
411387   AM_RANGE(0x2800, 0x3fff) AM_ROM
412388ADDRESS_MAP_END
413389
414static ADDRESS_MAP_START( sbrkoutct_main_map, AS_PROGRAM, 8, sbrkout_state )
415   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
416   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x380) AM_RAMBANK("bank1")
417   AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sbrkout_videoram_w) AM_SHARE("videoram")
418   AM_RANGE(0x0800, 0x083f) AM_READ(sbrkoutct_switches_r)
419   AM_RANGE(0x0840, 0x0840) AM_MIRROR(0x003f) AM_READ_PORT("COIN")
420   AM_RANGE(0x0880, 0x0880) AM_MIRROR(0x003f) AM_READ_PORT("START")
421   AM_RANGE(0x08c0, 0x08c0) AM_MIRROR(0x003f) AM_READ_PORT("SERVICE")
422   AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x03ff) AM_READ(sync_r)
423   AM_RANGE(0x0c10, 0x0c11) AM_MIRROR(0x000e) AM_WRITE(serve_led_w)
424   AM_RANGE(0x0c20, 0x0c21) AM_MIRROR(0x000e) AM_WRITE(serve_2_led_w)
425   AM_RANGE(0x0c30, 0x0c31) AM_MIRROR(0x000e) AM_WRITE(start_1_led_w)
426   AM_RANGE(0x0c40, 0x0c41) AM_MIRROR(0x000e) AM_WRITE(start_2_led_w)
427   AM_RANGE(0x0c50, 0x0c51) AM_MIRROR(0x000e) AM_WRITE(pot_mask1_w)
428   AM_RANGE(0x0c60, 0x0c61) AM_MIRROR(0x000e) AM_WRITE(pot_mask2_w)
429   AM_RANGE(0x0c70, 0x0c71) AM_MIRROR(0x000e) AM_WRITE(coincount_w)
430   AM_RANGE(0x0c80, 0x0c80) AM_MIRROR(0x007f) AM_WRITE(watchdog_reset_w)
431   AM_RANGE(0x0e00, 0x0e00) AM_MIRROR(0x007f) AM_WRITE(irq_ack_w)
432   AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x03ff) AM_READ(sync2_r)
433   AM_RANGE(0x2800, 0x3fff) AM_ROM
434ADDRESS_MAP_END
435390
436391
437392/*************************************
r242703r242704
520475   PORT_CONFSETTING(    0x02, "Vertical" )
521476INPUT_PORTS_END
522477
523static INPUT_PORTS_START( sbrkoutct )
524   PORT_INCLUDE(sbrkout)
525
526   PORT_START("SERVE2")
527   PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
528   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
529
530   PORT_MODIFY("SELECT")
531   PORT_CONFNAME(0x80, 0x00, "Game Select" )
532   PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
533   PORT_CONFSETTING( 0x80, DEF_STR( On ) )
534INPUT_PORTS_END
535
536478/*************************************
537479 *
538480 *  Graphics definitions
r242703r242704
601543MACHINE_CONFIG_END
602544
603545
604static MACHINE_CONFIG_DERIVED(sbrkoutct, sbrkout)
605   MCFG_CPU_MODIFY("maincpu")
606   MCFG_CPU_PROGRAM_MAP(sbrkoutct_main_map)
607MACHINE_CONFIG_END
608546
609547/*************************************
610548 *
r242703r242704
660598   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
661599ROM_END
662600
663ROM_START( sbrkoutc ) // built from original Atari source code
601ROM_START( sbrkoutc )
664602   ROM_REGION( 0x4000, "maincpu", 0 )
665603   ROM_LOAD( "a33443.bin",   0x2800, 0x1800, CRC(bf418976) SHA1(d766e220a284a7b9caf876207e8191aff0497a03) )
666604
r242703r242704
676614   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
677615ROM_END
678616
679ROM_START( sbrkoutct ) // built from original Atari source code
680   ROM_REGION( 0x4000, "maincpu", 0 )
681   ROM_LOAD( "034555-01.c1",   0x2800, 0x0800, CRC(2da82521) SHA1(1f53e549676052647486cea6738c5c7a45133538) )
682   ROM_LOAD( "034556-01.d11",  0x3000, 0x0800, CRC(5a6497ae) SHA1(96c2a136fb1e649e2db17bcb12bdc2a8d250a63e) )
683   ROM_LOAD( "034557-01.ef1",  0x3800, 0x0800, CRC(b6b3b07b) SHA1(c4d2cdcca89c2944afd4a4ed0bb5003b3eca4c7e) )
684617
685   ROM_REGION( 0x0400, "gfx1", 0 )
686   ROM_LOAD( "034559-01.r4",    0x0000, 0x0200, CRC(84368539) SHA1(50b2c3f443346e3a355492ed1f7ec0a8cc6364d4) )
687   ROM_LOAD( "034558-01.p4",    0x0200, 0x0200, CRC(cc0f81f2) SHA1(a2180280991c9cf43f4e941d9ba4fe5654d1af65) )
688
689   ROM_REGION( 0x0020, "gfx2", 0 )
690   ROM_LOAD( "033282.k6",    0x0000, 0x0020, CRC(6228736b) SHA1(bc176261dba11521df19d545ce604f8cc294287a) )
691
692   ROM_REGION( 0x0120, "proms", 0 )
693   ROM_LOAD( "006400.m2",    0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) )    /* sync (not used) */
694   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
695ROM_END
696
697618/*************************************
698619 *
699620 *  Game drivers
700621 *
701622 *************************************/
702623
703GAMEL( 1978, sbrkout,   0,       sbrkout,   sbrkout,   driver_device, 0, ROT270, "Atari", "Super Breakout (rev 04)", GAME_SUPPORTS_SAVE, layout_sbrkout )
704GAMEL( 1978, sbrkout3,  sbrkout, sbrkout,   sbrkout,   driver_device, 0, ROT270, "Atari", "Super Breakout (rev 03)", GAME_SUPPORTS_SAVE, layout_sbrkout )
705GAMEL( 1978, sbrkoutc,  sbrkout, sbrkout,   sbrkoutc,  driver_device, 0, ROT270, "Atari", "Super Breakout (Canyon and Vertical Breakout, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
706GAMEL( 1978, sbrkoutct, sbrkout, sbrkoutct, sbrkoutct, driver_device, 0, ROT270, "Atari", "Super Breakout (Cocktail, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
624GAMEL( 1978, sbrkout, 0, sbrkout, sbrkout, driver_device, 0, ROT270,         "Atari", "Super Breakout (rev 04)", GAME_SUPPORTS_SAVE, layout_sbrkout )
625GAMEL( 1978, sbrkout3, sbrkout, sbrkout, sbrkout, driver_device, 0, ROT270,  "Atari", "Super Breakout (rev 03)", GAME_SUPPORTS_SAVE, layout_sbrkout )
626GAMEL( 1978, sbrkoutc, sbrkout, sbrkout, sbrkoutc, driver_device, 0, ROT270, "Atari", "Super Breakout (Canyon and Vertical Breakout, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
trunk/src/mame/drivers/segahang.c
r242703r242704
399399   // signal a VBLANK to the main CPU
400400   m_maincpu->set_input_line(4, HOLD_LINE);
401401
402   // clear add lifes protection flag
403   m_workram[0x0f0/2] = 0;
404
405402   // read I/O ports
406403   m_workram[0x492/2] = (ioport("ADC0")->read() << 8) | ioport("ADC1")->read();
407404}
trunk/src/mame/drivers/segas16b.c
r242703r242704
31023102INPUT_PORTS_END
31033103
31043104
3105static INPUT_PORTS_START( fantzoneta )
3106   PORT_INCLUDE( system16b_generic )
3107
3108   PORT_MODIFY("DSW2")
3109   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1")
3110   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
3111   PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
3112   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
3113   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
3114   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3115   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4")
3116   PORT_DIPSETTING(    0x08, "2" )
3117   PORT_DIPSETTING(    0x0c, "3" )
3118   PORT_DIPSETTING(    0x04, "4" )
3119   PORT_DIPSETTING(    0x00, "240 (Cheat)")
3120   PORT_DIPNAME( 0x30, 0x30, "Extra Ship Cost" ) PORT_DIPLOCATION("SW2:5,6")
3121   PORT_DIPSETTING(    0x30, "5000" )
3122   PORT_DIPSETTING(    0x20, "10000" )
3123   PORT_DIPSETTING(    0x10, "15000" )
3124   PORT_DIPSETTING(    0x00, "20000" )
3125   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8")
3126   PORT_DIPSETTING(    0x80, DEF_STR( Easy ) )
3127   PORT_DIPSETTING(    0xc0, DEF_STR( Normal ) )
3128   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
3129   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
3130INPUT_PORTS_END
3131
31323105// we use common sys16b tags to simplify port reads
31333106static INPUT_PORTS_START( atomicp )
31343107   PORT_START("SERVICE")   // P1
r242703r242704
32053178INPUT_PORTS_END
32063179
32073180
3208
3209
32103181// we use common sys16b tags to simplify port reads
32113182static INPUT_PORTS_START( snapper )
32123183   PORT_START("SERVICE")   // P1
r242703r242704
66326603   ROM_LOAD( "cpu2b.bin", 0x10000, 0x20000, CRC(2c8ad475) SHA1(9ef1ed5aab81a82844ccb0949cb393a8d1abac92) )
66336604ROM_END
66346605
6635ROM_START( fantzoneta ) // based on PS2 version, from bootleg conversion board
6636   ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code
6637   ROM_LOAD16_BYTE( "fzta__a07.bin", 0x00000, 0x20000, CRC(ad07d1fd) SHA1(63fbaa135a3860bd956d5147a5f64d951d2ebdba) )
6638   ROM_LOAD16_BYTE( "fzta__a05.bin", 0x00001, 0x20000, CRC(47dbe11b) SHA1(edc6960506745235bb8668eaf71139cef4a2cd16) )
66396606
6640   ROM_REGION( 0x30000, "gfx1", 0 ) // tiles
6641   ROM_LOAD( "fzta__a14.bin", 0x00000, 0x10000, CRC(9468ab33) SHA1(714660b9eafb78ef5d3aed218367b4e5708376f6) )
6642   ROM_LOAD( "fzta__a15.bin", 0x10000, 0x10000, CRC(22a3cf75) SHA1(6f21bc2a565738b997f898ed6ee631e9452662ca) )
6643   ROM_LOAD( "fzta__a16.bin", 0x20000, 0x10000, CRC(25cba87f) SHA1(abece2c27cd9d299319fa3ea87e016606426abc2) )
66446607
6645   ROM_REGION16_BE( 0x180000, "sprites", ROMREGION_ERASEFF ) // sprites
6646   ROM_LOAD16_BYTE( "fzta__b01.bin",  0x000001, 0x20000, CRC(0beb4a22) SHA1(e35f6d92b88f0730ccf03a090900ca2ed9824e74) )
6647   ROM_LOAD16_BYTE( "fzta__b05.bin",  0x000000, 0x20000, CRC(7f676c69) SHA1(231e7829b4ddb039f9075aebd1f2a123c79d396d) )
6648   ROM_LOAD16_BYTE( "fzta__a01.bin",  0x100001, 0x20000, CRC(40e1db9a) SHA1(305cd5e2d8512774638dfa724df6696ffa81ebb2) )
6649   ROM_LOAD16_BYTE( "fzta__b10.bin",  0x100000, 0x20000, CRC(acbb5cff) SHA1(bd356f664ec1c0e955161aa3afd06f2aeda80357) )
6650
6651   ROM_REGION( 0x50000, "soundcpu", 0 ) // sound CPU
6652   ROM_LOAD( "fzta__a10.bin", 0x00000, 0x08000, CRC(dab6fcd0) SHA1(151b62c5353533ae8660cbeebd8fe3219adbf4b5) )
6653ROM_END
6654
6655
66566608//**************************************************************************
66576609//  CONFIGURATION
66586610//**************************************************************************
r242703r242704
69776929GAME( 2008, fantzn2x,   0,        system16c,           fz2,      segas16b_state,generic_5704,       ROT0,   "Sega / M2", "Fantasy Zone II - The Tears of Opa-Opa (System 16C version)", 0 ) // The 1987 copyright date shown ingame is false
69786930GAME( 2008, fantzn2xp,  fantzn2x, system16c,           fz2,      segas16b_state,generic_5704,       ROT0,   "Sega / M2", "Fantasy Zone II - The Tears of Opa-Opa (System 16C version, prototype)", 0 ) // "
69796931
6980GAME( 2008, fantzoneta, fantzone, system16b,           fantzoneta,segas16b_state,generic_5704,       ROT0,  "bootleg", "Fantasy Zone (Time Attack, bootleg)", 0 ) // based on the PS2 version, unlicensed PCB conversion
6981
6982
69836932// Custom Korean Board - these probably belong with the bootlegs...
69846933GAME( 1990, atomicp,    0,        atomicp,             atomicp,  segas16b_state,generic_korean,     ROT0,   "Philko", "Atomic Point (Korea)", 0) // korean clone board..
69856934GAME( 1990, snapper,    0,        atomicp,             snapper,  segas16b_state,snapper,            ROT0,   "Philko", "Snapper (Korea)", 0) // korean clone board..
trunk/src/mame/drivers/snowbros.c
r242703r242704
14011401   PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0000, "SW1:6" )
14021402   PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0000, "SW1:7" )
14031403   PORT_SERVICE_DIPLOC(   0x0080, IP_ACTIVE_LOW, "SW1:8" )
1404   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Button 4 / Stand / Stop / Drop / Full Bet / Take") PORT_CODE(KEYCODE_V)
1405   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Button 1 / High") PORT_CODE(KEYCODE_Z)
1406   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Button 2 / Low") PORT_CODE(KEYCODE_X)
1407   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Button 3 / Hit / Go / Double Up") PORT_CODE(KEYCODE_C)
1404   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Button 4 / Stand / Stop / Drop / Full Bet / Take") PORT_CODE(KEYCODE_V)
1405   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Button 1 / High") PORT_CODE(KEYCODE_Z)
1406   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Button 2 / Low") PORT_CODE(KEYCODE_X)
1407   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Button 3 / Hit / Go / Double Up") PORT_CODE(KEYCODE_C)
14081408   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1409   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Button 6 / Bet / Raise") PORT_CODE(KEYCODE_N)
1409   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Button 6 / Bet / Raise") PORT_CODE(KEYCODE_N)
14101410   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14111411   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14121412
r242703r242704
14291429   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14301430
14311431   PORT_START("SYSTEM")
1432   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Button 5 / Start / Double / Call / Check") PORT_CODE(KEYCODE_B) // Double != Double Up
1432   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Button 5 / Start / Double / Call / Check") PORT_CODE(KEYCODE_B) // Double != Double Up
14331433   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14341434   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN1 )
14351435   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_COIN2 )
trunk/src/mame/drivers/sprint2.c
r242703r242704
3939   m_game = 3;
4040}
4141
42DRIVER_INIT_MEMBER(sprint2_state,dominos4)
43{
44   m_game = 3;
45   m_maincpu->space(AS_PROGRAM).install_read_port(0x0880, 0x0880, "SELFTTEST");
46   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0c50, 0x0c5f, write8_delegate(FUNC(sprint2_state::dominos4_lamp3_w),this));
47   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0c60, 0x0c6f, write8_delegate(FUNC(sprint2_state::dominos4_lamp4_w),this));
48}
49
5042int sprint2_state::service_mode()
5143{
5244   UINT8 v = ioport("INB")->read();
r242703r242704
242234   set_led_status(machine(), 1, offset & 1);
243235}
244236
245WRITE8_MEMBER(sprint2_state::dominos4_lamp3_w)
246{
247   set_led_status(machine(), 2, offset & 1);
248}
249WRITE8_MEMBER(sprint2_state::dominos4_lamp4_w)
250{
251   set_led_status(machine(), 3, offset & 1);
252}
253237
254238static ADDRESS_MAP_START( sprint2_map, AS_PROGRAM, 8, sprint2_state )
255   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
256239   AM_RANGE(0x0000, 0x03ff) AM_READWRITE(sprint2_wram_r,sprint2_wram_w)
257240   AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sprint2_video_ram_w) AM_SHARE("video_ram")
258241   AM_RANGE(0x0818, 0x081f) AM_READ(sprint2_input_A_r)
r242703r242704
278261   AM_RANGE(0x1400, 0x17ff) AM_READ(sprint2_collision2_r)
279262   AM_RANGE(0x1800, 0x1800) AM_READNOP  /* debugger ROM location? */
280263   AM_RANGE(0x2000, 0x3fff) AM_ROM
264   AM_RANGE(0xe000, 0xffff) AM_ROM
281265ADDRESS_MAP_END
282266
283267
r242703r242704
457441   PORT_ADJUSTER( 50, "R23 - Tone Freq" )
458442INPUT_PORTS_END
459443
460static INPUT_PORTS_START( dominos4 )
461   PORT_INCLUDE(dominos)
462444
463   PORT_MODIFY("INA")   /* input A */
464   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
465   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
466   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
467   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
468   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
469   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
470   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
471   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
472
473   PORT_MODIFY("INB")   /* input A */
474   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(3)
475   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(3)
476   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(3)
477   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(3)
478   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(4)
479   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(4)
480   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(4)
481   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(4)
482
483   PORT_START("SELFTTEST")
484   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
485INPUT_PORTS_END
486
487445static const gfx_layout tile_layout =
488446{
489447   16, 8,
r242703r242704
584542   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
585543MACHINE_CONFIG_END
586544
545
587546ROM_START( sprint1 )
588547   ROM_REGION( 0x10000, "maincpu", 0 )
589548   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
549   ROM_RELOAD(             0xe000, 0x0800 )
590550   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
551   ROM_RELOAD(             0xe800, 0x0800 )
591552   ROM_LOAD( "6442-01.d1", 0x3000, 0x0800, CRC(e9ff0124) SHA1(42fe028e2e595573ccc0821de3bb6970364c585d) )
553   ROM_RELOAD(             0xf000, 0x0800 )
592554   ROM_LOAD( "6443-01.e1", 0x3800, 0x0800, CRC(d6bb00d0) SHA1(cdcd4bb7b32be7a11480d3312fcd8d536e2d0caf) )
555   ROM_RELOAD(             0xf800, 0x0800 )
593556
594557   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
595558   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242703r242704
608571ROM_START( sprint2 )
609572   ROM_REGION( 0x10000, "maincpu", 0 )
610573   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
574   ROM_RELOAD(             0xe000, 0x0800 )
611575   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
576   ROM_RELOAD(             0xe800, 0x0800 )
612577   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
578   ROM_RELOAD(             0xf000, 0x0800 )
613579   ROM_LOAD( "6405.e1",    0x3800, 0x0800, CRC(6c991c80) SHA1(c30a5b340f05dd702c7a186eb62607a48fa19f72) )
580   ROM_RELOAD(             0xf800, 0x0800 )
614581
615582   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
616583   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242703r242704
629596ROM_START( sprint2a )
630597   ROM_REGION( 0x10000, "maincpu", 0 )
631598   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
599   ROM_RELOAD(             0xe000, 0x0800 )
632600   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
601   ROM_RELOAD(             0xe800, 0x0800 )
633602   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
603   ROM_RELOAD(             0xf000, 0x0800 )
634604   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(e80fd249) SHA1(7bcf7dfd72ca83fdd80593eaf392570da1f71298) )
605   ROM_RELOAD(             0xf800, 0x0800 )
635606
636607   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
637608   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242703r242704
650621ROM_START( sprint2h )
651622   ROM_REGION( 0x10000, "maincpu", 0 )
652623   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
624   ROM_RELOAD(             0xe000, 0x0800 )
653625   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
626   ROM_RELOAD(             0xe800, 0x0800 )
654627   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
628   ROM_RELOAD(             0xf000, 0x0800 )
655629   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(6de291f1) SHA1(00c2826011d80ac0784649a7bc156a97c26565fd) ) // sldh
630   ROM_RELOAD(             0xf800, 0x0800 )
656631
657632   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
658633   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242703r242704
671646ROM_START( dominos )
672647   ROM_REGION( 0x10000, "maincpu", 0 )
673648   ROM_LOAD( "7352-02.d1",   0x3000, 0x0800, CRC(738b4413) SHA1(3a90ab25bb5f65504692f97da43f03e21392dcd8) )
649   ROM_RELOAD(               0xf000, 0x0800 )
674650   ROM_LOAD( "7438-02.e1",   0x3800, 0x0800, CRC(c84e54e2) SHA1(383b388a1448a195f28352fc5e4ff1a2af80cc95) )
651   ROM_RELOAD(               0xf800, 0x0800 )
675652
676653   ROM_REGION( 0x200, "gfx1", 0 ) /* tiles */
677654   ROM_LOAD_NIB_HIGH( "7439-01.p4",   0x0000, 0x0200, CRC(4f42fdd6) SHA1(f8ea4b582e26cad37b746174cdc9f1c7ae0819c3) )
r242703r242704
685662   ROM_LOAD( "6401-01.e2", 0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )  /* address */
686663ROM_END
687664
688ROM_START( dominos4 ) // built from original Atari source code
689   ROM_REGION( 0x10000, "maincpu", 0 )
690   ROM_LOAD_NIB_HIGH( "007754-01.l1",   0x3000, 0x0400, CRC(03fae4a9) SHA1(a132bd8bc866e33cdf6b4881064c8d265c2b25f4) )
691   ROM_LOAD_NIB_LOW ( "007755-01.l0",   0x3000, 0x0400, CRC(fa2d0c04) SHA1(fcf618c7089db46d55933d58ea04701af515ad49) )
692   ROM_LOAD_NIB_HIGH( "007756-01.m1",   0x3400, 0x0400, CRC(d2acb1b5) SHA1(ad81eed9dd0a2d5ecfd42daf90825726e64063b3) )
693   ROM_LOAD_NIB_LOW ( "007757-01.m0",   0x3400, 0x0400, CRC(69f2db90) SHA1(a064c840599c4e7cb65670e5480adeb310247f16) )
694   ROM_LOAD_NIB_HIGH( "007758-01.n1",   0x3800, 0x0400, CRC(b49083b4) SHA1(41999e8d3fd6104c42f3a034045f9f9c75d8247a) )
695   ROM_LOAD_NIB_LOW ( "007759-01.n0",   0x3800, 0x0400, CRC(542200c7) SHA1(111f06e942e247b00b9f90fae2986c3c8d9ec8c5) )
696   ROM_LOAD_NIB_HIGH( "007760-01.p1",   0x3c00, 0x0400, CRC(7dc2a7a1) SHA1(9d02572cf689c6476b33226a5358dd1f72c4e61d) )
697   ROM_LOAD_NIB_LOW ( "007761-01.p0",   0x3c00, 0x0400, CRC(04365e0d) SHA1(fefc3c04e55f1aa8c80b1e5e1e403af8698c3530) )
698665
699   ROM_REGION( 0x200, "gfx1", 0 ) /* tiles */
700   ROM_LOAD_NIB_HIGH( "007764-01.p4",   0x0000, 0x0200, CRC(e4332dc0) SHA1(1f16c5b9f9fd7d478fd729cc79968f17746111f4) )
701   ROM_LOAD_NIB_LOW ( "007765-01.r4",   0x0000, 0x0200, CRC(6e4e6c75) SHA1(0fc77fecaa73eac57baf778bc51387c75883aad4) )
702
703   ROM_REGION( 0x200, "gfx2", 0 ) /* sprites, not used */
704   ROM_FILL( 0x0000, 0x0200, 0 )
705
706   ROM_REGION( 0x0120, "proms", 0 )
707   ROM_LOAD( "6400-01.m2", 0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) )  /* SYNC */
708   ROM_LOAD( "6401-01.e2", 0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )  /* address */
709ROM_END
710
711666GAME( 1978, sprint1,  0,       sprint1, sprint1, sprint2_state, sprint1, ROT0, "Atari (Kee Games)", "Sprint 1", 0 )
712667GAME( 1976, sprint2,  sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 1)", 0 )
713668GAME( 1976, sprint2a, sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 2)", 0 )
714669GAME( 1976, sprint2h, sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "hack", "Sprint 2 (color kit, Italy)", GAME_WRONG_COLORS ) // Italian hack, supposedly is color instead of b/w? how?
715670GAME( 1977, dominos,  0,       dominos, dominos, sprint2_state, dominos, ROT0, "Atari", "Dominos", 0 )
716GAME( 1977, dominos4, dominos, dominos, dominos4,sprint2_state, dominos4,ROT0, "Atari", "Dominos 4 (Cocktail)", 0 )
trunk/src/mame/drivers/taito_f3.c
r242703r242704
31433143   ROM_LOAD16_BYTE("e29-04.ic39", 0x800000, 0x200000, CRC(d1f42457) SHA1(2c77be6365deb5ef215da0c66da23b415623bdb1) )    // D2 C8 C9 CA
31443144   ROM_LOAD16_BYTE("e29-05.ic41", 0xc00000, 0x200000, CRC(e33c1234) SHA1(84c336ed6fd8723e824889fe7b52c284be659e62) )    // CB CC -std-
31453145
3146   ROM_REGION(0x034a, "pals", 0)
3147   ROM_LOAD("d77-12.ic48.bin", 0x0000, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3148   ROM_LOAD("d77-14.ic21.bin", 0x0001, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3149   ROM_LOAD("d77-11.ic37.bin", 0x0002, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3150   ROM_LOAD("d77-09.ic14.bin", 0x0003, 0x0001, NO_DUMP) /* PAL16L8ACN */
3151   ROM_LOAD("d77-10.ic28.bin", 0x0004, 0x0001, NO_DUMP) /* PAL16L8ACN */
3146    ROM_REGION(0x034a, "pals", 0)
3147    ROM_LOAD("d77-12.ic48.bin", 0x0000, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3148    ROM_LOAD("d77-14.ic21.bin", 0x0001, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3149    ROM_LOAD("d77-11.ic37.bin", 0x0002, 0x0001, NO_DUMP) /* PALCE16V8Q-15PC/4 */
3150    ROM_LOAD("d77-09.ic14.bin", 0x0003, 0x0001, NO_DUMP) /* PAL16L8ACN */
3151    ROM_LOAD("d77-10.ic28.bin", 0x0004, 0x0001, NO_DUMP) /* PAL16L8ACN */
31523152ROM_END
31533153
31543154ROM_START( arkretrn )
trunk/src/mame/drivers/tigeroad.c
r242703r242704
619619   MCFG_SCREEN_PALETTE("palette")
620620
621621   MCFG_GFXDECODE_ADD("gfxdecode", "palette", tigeroad)
622
622   
623623   MCFG_DEVICE_ADD("spritegen", TIGEROAD_SPRITE, 0)
624624
625625   MCFG_PALETTE_ADD("palette", 1024)
trunk/src/mame/drivers/vicdual.c
r242703r242704
33743374   ROM_LOAD( "borderb.14",  0x0000, 0x0020, CRC(55dcdef1) SHA1(6fbd041edc258b7e1b99bbe9526612cfb1b541f8) )
33753375ROM_END
33763376
3377ROM_START( startrks )
3378   ROM_REGION( 0x10000, "maincpu", 0 )
3379   ROM_LOAD( "0.1a",         0x0000, 0x0400, CRC(2ba4202a) SHA1(1e46e36c37c9f1cecb505a1fe393c24d0e271168) )
3380   ROM_LOAD( "1.3a",         0x0400, 0x0400, CRC(cf6081b8) SHA1(2294cf6849a8191928f268ba1dbef21659a1475f) )
3381   ROM_LOAD( "2.4a",         0x0800, 0x0400, CRC(fd983c0c) SHA1(a4aea8707878dcac8b4e3d9acad94f60eee956c6) )
3382   ROM_LOAD( "3.6a",         0x0c00, 0x0400, CRC(607991c7) SHA1(abfbfdbcedc7192a0cf84f2d28c600fe6f7c7a84) )
3383   ROM_LOAD( "4.8a",         0x1000, 0x0400, CRC(043bf767) SHA1(76dd79a4cdd23f75a4e7b5642db05e94e0d2b75e) )
3384   ROM_LOAD( "5.9a",         0x1400, 0x0400, CRC(2aa21da3) SHA1(85bb7b74b3df678bf32370ef77ee620c5d7249ab) )
3385   ROM_LOAD( "6.11a",        0x1800, 0x0400, CRC(a5315dc8) SHA1(ba6d27d03c9f0100fe89ebbf4b58d166bf259fa8) )
3386
3387   ROM_REGION( 0x0040, "user1", 0 )    /* timing PROMs */
3388   ROM_LOAD( "82s123.15c", 0x0000, 0x0020, CRC(e60a7960) SHA1(b8b8716e859c57c35310efc4594262afedb84823) )    /* control PROM */
3389   ROM_LOAD( "82s123.14c", 0x0020, 0x0020, CRC(a1506b9d) SHA1(037c3db2ea40eca459e8acba9d1506dd28d72d10) )    /* sequence PROM */
3390ROM_END
3391
33923377ROM_START( digger )
33933378   ROM_REGION( 0x10000, "maincpu", 0 )
33943379   ROM_LOAD( "684.u27",      0x0000, 0x0400, CRC(bba0d7c2) SHA1(1e55dd95b07b562dcc1e52ecf9460d302b14ee60) )
r242703r242704
34853470ROM_END
34863471
34873472
3473
34883474/*************************************
34893475 *
34903476 *  Game drivers
r242703r242704
35293515GAME( 1981, brdrlins,   brdrline, brdrline,  brdrline,  driver_device, 0, ROT270, "bootleg (Sidam)", "Borderline (Sidam bootleg)", GAME_NO_SOUND )
35303516GAME( 1981, brdrlinb,   brdrline, brdrline,  brdrline,  driver_device, 0, ROT270, "bootleg (Karateco)", "Borderline (Karateco bootleg)", GAME_NO_SOUND )
35313517GAME( 1981, brdrlinet,  brdrline, tranqgun,  tranqgun,  driver_device, 0, ROT270, "Sega", "Borderline (Tranquilizer Gun conversion)", GAME_NO_SOUND ) // official factory conversion
3532GAME( 198?, startrks,   0,        headons,   headons,   driver_device, 0, ROT0,   "bootleg (Sidam)", "Star Trek (Head On hardware)", GAME_IMPERFECT_SOUND )
35333518
35343519GAME( 1980, digger,     0,        digger,    digger,    driver_device, 0, ROT270, "Sega", "Digger", GAME_NO_SOUND )
35353520GAME( 1981, pulsar,     0,        pulsar,    pulsar,    driver_device, 0, ROT270, "Sega", "Pulsar", GAME_IMPERFECT_SOUND )
35363521GAME( 1979, heiankyo,   0,        heiankyo,  heiankyo,  driver_device, 0, ROT270, "Denki Onkyo", "Heiankyo Alien", GAME_NO_SOUND )
35373522GAME( 19??, alphaho,    0,        alphaho,   alphaho,   driver_device, 0, ROT270, "Data East Corporation", "Alpha Fighter / Head On", GAME_WRONG_COLORS | GAME_NO_SOUND )
3538
trunk/src/mame/drivers/viper.c
r242703r242704
8080       DS2430 - Dallas DS2430 256-bits 1-Wire EEPROM. Has 256 bits x8 EEPROM (32 bytes), 64 bits x8 (8 bytes)
8181                one-time programmable application register and unique factory-lasered and tested 64-bit
8282                registration number (8-bit family code + 48-bit serial number + 8-bit CRC) (TO-92 @ U37)
83                The OTP application register on the common DS2430 and the Police 911 2 DS2430 are not programmed
84                (application register reads all 0xFF and the status register reads back 0xFF), so it's probably safe
83                The OTP application register on the common DS2430 and the Police 911 2 DS2430 are not programmed
84                (application register reads all 0xFF and the status register reads back 0xFF), so it's probably safe
8585                to assume they're not used on any of them.
8686                It appears the DS2430 is not protected from reading and the unique silicon serial number is
8787                included in the 40 byte dump. This serial number is used as a check to verify the NVRAM and DS2430.
8888                In the Police 911 2 NVRAM dump the serial number of the DS2430 is located at 0x002A and 0x1026
8989                If the serial number in the NVRAM and DS2430 match then they are paired and the game accepts the NVRAM.
9090                If they don't match the game requires an external DS2430 (i.e. dongle) and flags the NVRAM as 'BAD'
91                The serial number is not present in the CF card (2 different Police 911 2 cards of the same version
91                The serial number is not present in the CF card (2 different Police 911 2 cards of the same version
9292                were dumped and matched).
93                When the lasered ROM is read from the DS2430, it comes out from LSB to MSB (family code, LSB of
93                When the lasered ROM is read from the DS2430, it comes out from LSB to MSB (family code, LSB of
9494                S/N->MSB of S/N, CRC)
9595                For Police 911 2 that is 0x14 0xB2 0xB7 0x4A 0x00 0x00 0x00 0x83
9696                Family code=0x14
r242703r242704
104104                It may be possible to hand craft a DS2430 for a dongle-protected version of a game simply by using
105105                one of the existing DS2430 dumps and adjusting the serial number found in a dump of the NVRAM to pair them
106106                or adjusting the serial number in the NVRAM to match the serial number found in one of the dumped DS2430s.
107                This Police 911 2 board was upgraded from Police 911 by plugging in the dongle and changing the CF card.
108                The NVRAM had previously died and the board was dead. Normally for a Viper game that is fatal. Using
109                the NVRAM from Police 911 allowed it to boot and then the NVRAM upgraded itself with some additional
107                This Police 911 2 board was upgraded from Police 911 by plugging in the dongle and changing the CF card.
108                The NVRAM had previously died and the board was dead. Normally for a Viper game that is fatal. Using
109                the NVRAM from Police 911 allowed it to boot and then the NVRAM upgraded itself with some additional
110110                data (the original data remained untouched). This means the dongle does more than just protect the game.
111                Another interesting fact about this upgrade is it has been discovered that the PCB can write to the
112                external DS2430 in the dongle. This has been proven because the serial number of the DS2430 soldered
111                Another interesting fact about this upgrade is it has been discovered that the PCB can write to the
112                external DS2430 in the dongle. This has been proven because the serial number of the DS2430 soldered
113113                on the PCB is present in the EEPROM area of the Police 911 2 DS2430.
114114                Here is a dump of the DS2430 from Police 911. Note the EEPROM area is empty and the serial number (from 0x20 onwards)
115115                is present in the above Police 911 2 DS2430 dump at locations 0x11, 0x10 and 0x0F
r242703r242704
117117                00000010h FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
118118                00000020h 14 A9 30 74 00 00 00 E7
119119                This proves that the EEPROM area in the DS2430 is unused by an unprotected game and in fact the on-board
120                DS2430 is completely unused by an unprotected game. That is why any unprotected game will work on any
120                DS2430 is completely unused by an unprotected game. That is why any unprotected game will work on any
121121                Viper PCB regardless of the on-board DS2430 serial number.
122                The existing DS2430 'common' dump used in the unprotected games was actually from a (dongle-protected)
122                The existing DS2430 'common' dump used in the unprotected games was actually from a (dongle-protected)
123123                Mahjong Fight Club PCB but that PCB was used to test and run all of the unprotected Viper games.
124124      M48T58Y - ST Microelectronics M48T58Y Timekeeper RAM (DIP28 @ U39). When this dies (after 10 year lifespan)
125125                the game will complain with error RTC BAD then reset. The data inside the RTC can not be hand created
126126                (yet) so to revive the PCB the correct RTC data must be re-programmed to a new RTC and replaced
127127                on the PCB.
128128                Regarding the RTC and protection-related checks....
129                "RTC OK" checks 0x0000->0x0945 (i.e. I can clear the contents after 0x0945 and the game will still
129                "RTC OK" checks 0x0000->0x0945 (i.e. I can clear the contents after 0x0945 and the game will still
130130                happily boot). The NVRAM contents are split into chunks, each of which are checksummed.  It is a 16-bit checksum,
131                computed by summing two consecutive bytes as a 16-bit integer, where the final sum must add up to 0xFFFF (mod
132                65536).  The last two bytes in the chunk are used to make the value 0xFFFF.  There doesn't appear to be a
133                complete checksum over all the chunks (I can pick and choose chunks from various NVRAMs, as long as each chunk
131                computed by summing two consecutive bytes as a 16-bit integer, where the final sum must add up to 0xFFFF (mod
132                65536).  The last two bytes in the chunk are used to make the value 0xFFFF.  There doesn't appear to be a
133                complete checksum over all the chunks (I can pick and choose chunks from various NVRAMs, as long as each chunk
134134                checksum checks out). The important chunks for booting are the first two.
135                The first chunk goes from 0x0000-0x000F.  This seems to be a game/region identifier, and doesn't like its
136                contents changed (I didn't try changing every byte, but several of the bytes would throw RTC errors, even with a
137                fixed checksum).  I'd guess that the CF verifies this value, since it's different for every game (i.e. Mocap
135                The first chunk goes from 0x0000-0x000F.  This seems to be a game/region identifier, and doesn't like its
136                contents changed (I didn't try changing every byte, but several of the bytes would throw RTC errors, even with a
137                fixed checksum).  I'd guess that the CF verifies this value, since it's different for every game (i.e. Mocap
138138                Boxing NVRAM would have a correct checksum, but shouldn't pass Police 911 checks).
139                The second chunk goes from 0x0010-0x0079.  This seems to be a board identifier.  This has (optionally)
140                several fields, each of which are 20 bytes long.  I'm unsure of the first 6 bytes, the following 6
141                bytes are the DS2430A S/N, and the last 8 bytes are a game/region/dongle identifier.  If running
142                without a dongle, only the first 20 byte field is present.  With a dongle, a second 20 byte field will
143                be present.  Moving this second field into the place of the first field (and fixing the checksum)
144                doesn't work, and the second field will be ignored if the first field is valid for the game (and in
145                which case the dongle will be ignored).  For example, Police 911 will boot with a valid first field,
146                with or without the second field, and with or without the dongle plugged in.  If you have both fields,
147                and leave the dongle plugged in, you can switch between Police 911 and Police 911/2 by simply swapping
139                The second chunk goes from 0x0010-0x0079.  This seems to be a board identifier.  This has (optionally)
140                several fields, each of which are 20 bytes long.  I'm unsure of the first 6 bytes, the following 6
141                bytes are the DS2430A S/N, and the last 8 bytes are a game/region/dongle identifier.  If running
142                without a dongle, only the first 20 byte field is present.  With a dongle, a second 20 byte field will
143                be present.  Moving this second field into the place of the first field (and fixing the checksum)
144                doesn't work, and the second field will be ignored if the first field is valid for the game (and in
145                which case the dongle will be ignored).  For example, Police 911 will boot with a valid first field,
146                with or without the second field, and with or without the dongle plugged in.  If you have both fields,
147                and leave the dongle plugged in, you can switch between Police 911 and Police 911/2 by simply swapping
148148                CF cards.
149149       29F002 - Fujitsu 29F002 256k x8 EEPROM stamped '941B01' (PLCC44 @ U25). Earlier revision stamped '941A01'
150150      CN4/CN5 - RCA-type network connection jacks
r242703r242704
244244      CN2/CN3 - Video output connector to external monitors
245245      CN4/CN5 - Multi-pin IDC connectors joining to main board CN15/CN16
246246
247An additional control PCB is used for Mocap Golf for the golf club sensor. It contains a ROMless MCU, an EPROM and
247An additional control PCB is used for Mocap Golf for the golf club sensor. It contains a ROMless MCU, an EPROM and
248248some other components. It will be documented at a later date.
249249
250250*/
trunk/src/mame/drivers/wallc.c
r242703r242704
6464
6565   required_device<cpu_device> m_maincpu;
6666   required_device<gfxdecode_device> m_gfxdecode;
67
67   
6868   required_shared_ptr<UINT8> m_videoram;
69
69   
7070   tilemap_t *m_bg_tilemap;
71
71   
7272   DECLARE_WRITE8_MEMBER(wallc_videoram_w);
7373   DECLARE_WRITE8_MEMBER(wallc_coin_counter_w);
7474   DECLARE_DRIVER_INIT(wallc);
trunk/src/mame/drivers/wrally.c
r242703r242704
126126{
127127   UINT8 *shareram = (UINT8 *)m_shareram.target();
128128
129   return shareram[BYTE_XOR_BE(offset)];
129   return shareram[BYTE_XOR_LE(offset) ^ 1];
130130}
131131
132132WRITE8_MEMBER(wrally_state::dallas_share_w)
133133{
134134   UINT8 *shareram = (UINT8 *)m_shareram.target();
135135
136   shareram[BYTE_XOR_BE(offset)] = data;
136   shareram[BYTE_XOR_LE(offset) ^ 1] = data;
137137}
138138
139139static ADDRESS_MAP_START( dallas_rom, AS_PROGRAM, 8, wrally_state )
trunk/src/mame/drivers/yunsun16.c
r242703r242704
634634   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
635635   MCFG_CPU_PROGRAM_MAP(main_map)
636636   MCFG_CPU_VBLANK_INT_DRIVER("screen", yunsun16_state,  irq2_line_hold)
637
637   
638638   MCFG_MACHINE_START_OVERRIDE(yunsun16_state, shocking)
639639   MCFG_MACHINE_RESET_OVERRIDE(yunsun16_state, shocking)
640640
r242703r242704
876876
877877   ROM_REGION( 0x080000, "oki", 0 )    /* Samples */
878878   ROM_LOAD( "u131.bin", 0x000000, 0x080000, CRC(bcf7aa12) SHA1(f7bf5258396ed0eb7e85eccf250c6d0a333a4d61) )
879
879   
880880ROM_END
881881
882882/***************************************************************************
r242703r242704
905905
906906   ROM_REGION( 0x080000, "oki", 0 )    /* Samples */
907907   ROM_LOAD( "yunsun16.131", 0x000000, 0x080000, CRC(d0a1bb8c) SHA1(10f33521bd6031ed73ee5c7be1382165925aa8f8) )
908
908   
909909ROM_END
910910
911911ROM_START( shockingk )
r242703r242704
928928
929929   ROM_REGION( 0x080000, "oki", 0 )    /* Samples */
930930   ROM_LOAD( "yunsun16.131", 0x000000, 0x080000, CRC(d0a1bb8c) SHA1(10f33521bd6031ed73ee5c7be1382165925aa8f8) )
931
931   
932932ROM_END
933933
934934
r242703r242704
960960
961961   ROM_REGION( 0x080000, "oki", 0 )    /* Samples */
962962   ROM_LOAD( "bk_u131", 0x000000, 0x080000, CRC(22cc5732) SHA1(38aefa4e543ea54e004eee428ee087121eb20905) )
963
963   
964964ROM_END
965965
966966ROM_START( bombkicka ) // marked 'Bomb Kick 98'
r242703r242704
983983
984984   ROM_REGION( 0x080000, "oki", 0 )    /* Samples */
985985   ROM_LOAD( "bk_u131", 0x000000, 0x080000, CRC(22cc5732) SHA1(38aefa4e543ea54e004eee428ee087121eb20905) )
986
986   
987987ROM_END
988988
989989/***************************************************************************
trunk/src/mame/drivers/zac2650.c
r242703r242704
315315ROM_END
316316
317317
318GAMEL(1979?,tinv2650, 0,        tinvader, tinvader, driver_device, 0, ROT270, "Zaccaria / Zelco", "The Invaders", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_tinv2650 )
319GAME( 1979?,sia2650,  tinv2650, tinvader, sinvader, driver_device, 0, ROT270, "bootleg (Sidam)", "Super Invader Attack (bootleg of The Invaders)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 1980?
320GAME( 1979, dodgem,   0,        tinvader, dodgem,   driver_device, 0, ROT0,   "Zaccaria", "Dodgem", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
318GAMEL(1979?,tinv2650, 0,        tinvader, tinvader, driver_device, 0, ROT270, "Zaccaria / Zelco", "The Invaders", GAME_IMPERFECT_SOUND, layout_tinv2650 )
319GAME( 1979?,sia2650,  tinv2650, tinvader, sinvader, driver_device, 0, ROT270, "bootleg (Sidam)", "Super Invader Attack (bootleg of The Invaders)", GAME_IMPERFECT_SOUND ) // 1980?
320GAME( 1979, dodgem,   0,        tinvader, dodgem,   driver_device, 0, ROT0,   "Zaccaria", "Dodgem", GAME_IMPERFECT_SOUND )
trunk/src/mame/drivers/zaccaria.c
r242703r242704
4040#include "emu.h"
4141#include "cpu/z80/z80.h"
4242#include "cpu/m6800/m6800.h"
43#include "machine/6821pia.h"
4344#include "machine/i8255.h"
45#include "sound/ay8910.h"
4446#include "sound/dac.h"
47#include "sound/tms5220.h"
4548#include "includes/zaccaria.h"
4649
4750
48void zaccaria_state::machine_start()
51WRITE8_MEMBER(zaccaria_state::zaccaria_dsw_sel_w)
4952{
50   save_item(NAME(m_dsw_sel));
51   save_item(NAME(m_active_8910));
52   save_item(NAME(m_port0a));
53   save_item(NAME(m_acs));
54   save_item(NAME(m_last_port0b));
55   save_item(NAME(m_toggle));
56   save_item(NAME(m_nmi_mask));
57}
58
59void zaccaria_state::machine_reset()
60{
61   m_dsw_sel = 0;
62   m_active_8910 = 0;
63   m_port0a = 0;
64   m_acs = 0;
65   m_last_port0b = 0;
66   m_toggle = 0;
67   m_nmi_mask = 0;
68}
69
70WRITE8_MEMBER(zaccaria_state::dsw_sel_w)
71{
7253   switch (data & 0xf0)
7354   {
7455      case 0xe0:
r242703r242704
8970   }
9071}
9172
92READ8_MEMBER(zaccaria_state::dsw_r)
73READ8_MEMBER(zaccaria_state::zaccaria_dsw_r)
9374{
9475   return m_dsw_port[m_dsw_sel]->read();
9576}
r242703r242704
11394   /* 150 below to scale to volume 100 */
11495   v = (150 * table[ba]) / (4700 + table[ba]);
11596   //printf("dac1w %02d %04d\n", ba, v);
116   m_ay2->set_volume(1, v);
97   machine().device<ay8910_device>("ay2")->set_volume(1, v);
11798}
11899
119READ8_MEMBER(zaccaria_state::port0a_r)
100
101WRITE_LINE_MEMBER(zaccaria_state::zaccaria_irq0a)
120102{
121   return (m_active_8910 == 0) ? m_ay1->data_r(space, 0) : m_ay2->data_r(space, 0);
103   m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
122104}
123105
124WRITE8_MEMBER(zaccaria_state::port0a_w)
106WRITE_LINE_MEMBER(zaccaria_state::zaccaria_irq0b)
125107{
108   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
109}
110
111READ8_MEMBER(zaccaria_state::zaccaria_port0a_r)
112{
113   return machine().device<ay8910_device>((m_active_8910 == 0) ? "ay1" : "ay2")->data_r(space, 0);
114}
115
116WRITE8_MEMBER(zaccaria_state::zaccaria_port0a_w)
117{
126118   m_port0a = data;
127119}
128120
129WRITE8_MEMBER(zaccaria_state::port0b_w)
121WRITE8_MEMBER(zaccaria_state::zaccaria_port0b_w)
130122{
131123   /* bit 1 goes to 8910 #0 BDIR pin  */
132124   if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00)
133125   {
134126      /* bit 0 goes to the 8910 #0 BC1 pin */
135      m_ay1->data_address_w(space, m_last_port0b, m_port0a);
127      machine().device<ay8910_device>("ay1")->data_address_w(space, m_last_port0b, m_port0a);
136128   }
137129   else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02)
138130   {
r242703r242704
144136   if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00)
145137   {
146138      /* bit 2 goes to the 8910 #1 BC1 pin */
147      m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a);
139      machine().device<ay8910_device>("ay2")->data_address_w(space, m_last_port0b >> 2, m_port0a);
148140   }
149141   else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08)
150142   {
r242703r242704
156148   m_last_port0b = data;
157149}
158150
159INTERRUPT_GEN_MEMBER(zaccaria_state::cb1_toggle)
151INTERRUPT_GEN_MEMBER(zaccaria_state::zaccaria_cb1_toggle)
160152{
161   m_pia0->cb1_w(m_toggle & 1);
153   pia6821_device *pia0 = machine().device<pia6821_device>("pia0");
154
155   pia0->cb1_w(m_toggle & 1);
162156   m_toggle ^= 1;
163157}
164158
165WRITE8_MEMBER(zaccaria_state::port1b_w)
159WRITE8_MEMBER(zaccaria_state::zaccaria_port1b_w)
166160{
161   tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
162
167163   // bit 0 = /RS
168   m_tms->rsq_w((data >> 0) & 0x01);
164   tms5220->rsq_w((data >> 0) & 0x01);
169165   // bit 1 = /WS
170   m_tms->wsq_w((data >> 1) & 0x01);
166   tms5220->wsq_w((data >> 1) & 0x01);
171167
172168   // bit 3 = "ACS" (goes, inverted, to input port 6 bit 3)
173169   m_acs = ~data & 0x08;
r242703r242704
185181
186182WRITE8_MEMBER(zaccaria_state::sound1_command_w)
187183{
188   m_pia0->ca1_w(data & 0x80);
184   pia6821_device *pia0 = machine().device<pia6821_device>("pia0");
185   pia0->ca1_w(data & 0x80);
189186   soundlatch2_byte_w(space, 0, data);
190187}
191188
189WRITE8_MEMBER(zaccaria_state::mc1408_data_w)
190{
191   m_dac2->write_unsigned8(data);
192}
193
194
192195GAME_EXTERN(monymony);
193196
194READ8_MEMBER(zaccaria_state::prot1_r)
197READ8_MEMBER(zaccaria_state::zaccaria_prot1_r)
195198{
196199   switch (offset)
197200   {
r242703r242704
211214   }
212215}
213216
214READ8_MEMBER(zaccaria_state::prot2_r)
217READ8_MEMBER(zaccaria_state::zaccaria_prot2_r)
215218{
216219   switch (offset)
217220   {
r242703r242704
246249static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zaccaria_state )
247250   AM_RANGE(0x0000, 0x5fff) AM_ROM
248251   AM_RANGE(0x6000, 0x63ff) AM_READONLY
249   AM_RANGE(0x6400, 0x6407) AM_READ(prot1_r)
250   AM_RANGE(0x6000, 0x67ff) AM_WRITE(videoram_w) AM_SHARE("videoram") /* 6400-67ff is 4 bits wide */
251   AM_RANGE(0x6800, 0x683f) AM_WRITE(attributes_w) AM_SHARE("attributesram")
252   AM_RANGE(0x6400, 0x6407) AM_READ(zaccaria_prot1_r)
253   AM_RANGE(0x6000, 0x67ff) AM_WRITE(zaccaria_videoram_w) AM_SHARE("videoram") /* 6400-67ff is 4 bits wide */
254   AM_RANGE(0x6800, 0x683f) AM_WRITE(zaccaria_attributes_w) AM_SHARE("attributesram")
252255   AM_RANGE(0x6840, 0x685f) AM_RAM AM_SHARE("spriteram")
253256   AM_RANGE(0x6881, 0x68c0) AM_RAM AM_SHARE("spriteram2")
254   AM_RANGE(0x6c00, 0x6c00) AM_WRITE(flip_screen_x_w)
255   AM_RANGE(0x6c01, 0x6c01) AM_WRITE(flip_screen_y_w)
257   AM_RANGE(0x6c00, 0x6c00) AM_WRITE(zaccaria_flip_screen_x_w)
258   AM_RANGE(0x6c01, 0x6c01) AM_WRITE(zaccaria_flip_screen_y_w)
256259   AM_RANGE(0x6c02, 0x6c02) AM_WRITENOP    /* sound reset */
257260   AM_RANGE(0x6c06, 0x6c06) AM_WRITE(coin_w)
258261   AM_RANGE(0x6c07, 0x6c07) AM_WRITE(nmi_mask_w)
259   AM_RANGE(0x6c00, 0x6c07) AM_READ(prot2_r)
260   AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(dsw_r, sound_command_w)
262   AM_RANGE(0x6c00, 0x6c07) AM_READ(zaccaria_prot2_r)
263   AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(zaccaria_dsw_r, sound_command_w)
261264   AM_RANGE(0x7000, 0x77ff) AM_RAM
262265   AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
263266   AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r)
r242703r242704
315318static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state )
316319   AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */
317320   AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C)
318   AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("mc1408", dac_device, write_unsigned8) AM_MIRROR(0x83FF) /* MC1408 */
321   AM_RANGE(0x1000, 0x1000) AM_WRITE(mc1408_data_w) AM_MIRROR(0x83FF) /* MC1408 */
319322   AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF)
320323   AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF)
321324   AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low
r242703r242704
508511
509512   MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */
510513   MCFG_CPU_PROGRAM_MAP(sound_map_1)
511   MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, cb1_toggle, (double)XTAL_3_579545MHz/4096)
514   MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, zaccaria_cb1_toggle, (double)XTAL_3_579545MHz/4096)
512515   MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
513516
514517   MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */
r242703r242704
519522   MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
520523   MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
521524   MCFG_I8255_IN_PORTC_CB(IOPORT("SYSTEM"))
522   MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, dsw_sel_w))
525   MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, zaccaria_dsw_sel_w))
523526
524527   MCFG_DEVICE_ADD( "pia0", PIA6821, 0)
525   MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, port0a_r))
526   MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, port0a_w))
527   MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, port0b_w))
528   MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line))
529   MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line))
528   MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, zaccaria_port0a_r))
529   MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, zaccaria_port0a_w))
530   MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, zaccaria_port0b_w))
531   MCFG_PIA_IRQA_HANDLER(WRITELINE(zaccaria_state, zaccaria_irq0a))
532   MCFG_PIA_IRQB_HANDLER(WRITELINE(zaccaria_state, zaccaria_irq0b))
530533
531534   MCFG_DEVICE_ADD( "pia1", PIA6821, 0)
532535   MCFG_PIA_READPA_HANDLER(DEVREAD8("tms", tms5220_device, status_r))
533536   MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("tms", tms5220_device, data_w))
534   MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,port1b_w))
537   MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,zaccaria_port1b_w))
535538
536539   /* video hardware */
537540   MCFG_SCREEN_ADD("screen", RASTER)
r242703r242704
539542   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
540543   MCFG_SCREEN_SIZE(32*8, 32*8)
541544   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
542   MCFG_SCREEN_UPDATE_DRIVER(zaccaria_state, screen_update)
545   MCFG_SCREEN_UPDATE_DRIVER(zaccaria_state, screen_update_zaccaria)
543546   MCFG_SCREEN_PALETTE("palette")
544547
545548   MCFG_GFXDECODE_ADD("gfxdecode", "palette", zaccaria)
r242703r242704
558561   MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
559562   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
560563
561   MCFG_DAC_ADD("mc1408")
564   MCFG_DAC_ADD("dac2")
562565   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
563566
564567   /* There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) */
r242703r242704
723726
724727
725728
726GAME( 1983, monymony,  0,        zaccaria, monymony, driver_device, 0, ROT90, "Zaccaria", "Money Money", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
727GAME( 1984, jackrabt,  0,        zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
728GAME( 1984, jackrabt2, jackrabt, zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
729GAME( 1984, jackrabts, jackrabt, zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (special)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
729GAME( 1983, monymony,  0,        zaccaria, monymony, driver_device, 0, ROT90, "Zaccaria", "Money Money", GAME_IMPERFECT_SOUND )
730GAME( 1984, jackrabt,  0,        zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (set 1)", GAME_IMPERFECT_SOUND )
731GAME( 1984, jackrabt2, jackrabt, zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (set 2)", GAME_IMPERFECT_SOUND )
732GAME( 1984, jackrabts, jackrabt, zaccaria, jackrabt, driver_device, 0, ROT90, "Zaccaria", "Jack Rabbit (special)", GAME_IMPERFECT_SOUND )
trunk/src/mame/includes/asteroid.h
r242703r242704
2222   required_device<cpu_device> m_maincpu;
2323   required_device<dvg_device> m_dvg;
2424   required_device<discrete_device> m_discrete;
25
26   /* memory banks */
27   optional_memory_bank m_ram1;
28   optional_memory_bank m_ram2;
29
25   
26   /* memory pointers */
27   optional_shared_ptr<UINT8> m_ram1;
28   optional_shared_ptr<UINT8> m_ram2;
29   
30   int m_astdelux_bankswitch; // for postload
31   
32   void astdelux_bankswitch_restore();
33     
3034   DECLARE_WRITE8_MEMBER(astdelux_coin_counter_w);
3135   DECLARE_WRITE8_MEMBER(llander_led_w);
3236   DECLARE_READ8_MEMBER(asteroid_IN0_r);
r242703r242704
4347   DECLARE_WRITE8_MEMBER(asteroid_noise_reset_w);
4448   DECLARE_WRITE8_MEMBER(llander_snd_reset_w);
4549   DECLARE_WRITE8_MEMBER(llander_sounds_w);
46
50   
4751   DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
48
52   
4953   INTERRUPT_GEN_MEMBER(asteroid_interrupt);
5054   INTERRUPT_GEN_MEMBER(asterock_interrupt);
5155   INTERRUPT_GEN_MEMBER(llander_interrupt);
52
56   
5357   DECLARE_DRIVER_INIT(asterock);
5458   DECLARE_DRIVER_INIT(asteroidb);
55
56   virtual void machine_start();
59   DECLARE_DRIVER_INIT(astdelux);
60   
5761   virtual void machine_reset();
62   DECLARE_MACHINE_RESET(llander);
5863};
5964
6065/*----------- defined in audio/asteroid.c -----------*/
trunk/src/mame/includes/bionicc.h
r242703r242704
2020      m_maincpu(*this, "maincpu"),
2121      m_gfxdecode(*this, "gfxdecode"),
2222      m_palette(*this, "palette"),
23      m_spritegen(*this, "spritegen")
23      m_spritegen(*this, "spritegen")   
2424   { }
2525
2626   /* memory pointers */
trunk/src/mame/includes/chihiro.h
r242703r242704
191191      rendertarget = NULL;
192192      depthbuffer = NULL;
193193      displayedtarget = NULL;
194      puller_channel = 0;
195      puller_subchannel = 0;
196      puller_waiting = 0;
197194      debug_grab_texttype = -1;
198195      debug_grab_textfile = NULL;
199      waitvblank_used = 0;
200196      memset(vertex_attribute_words, 0, sizeof(vertex_attribute_words));
201197      memset(vertex_attribute_offset, 0, sizeof(vertex_attribute_offset));
202198   }
r242703r242704
212208   int geforce_commandkind(UINT32 word);
213209   UINT32 geforce_object_offset(UINT32 handle);
214210   void geforce_read_dma_object(UINT32 handle, UINT32 &offset, UINT32 &size);
215   int geforce_exec_method(address_space &space, UINT32 channel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen);
211   void geforce_exec_method(address_space &space, UINT32 channel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen);
216212   UINT32 texture_get_texel(int number, int x, int y);
217213   void write_pixel(int x, int y, UINT32 color, UINT32 depth);
218214   void combiner_initialize_registers(UINT32 argb8[6]);
r242703r242704
242238   void computedilated(void);
243239   void putpixtex(int xp, int yp, int up, int vp);
244240   int toggle_register_combiners_usage();
245   int toggle_wait_vblank_support();
246241   void debug_grab_texture(int type, const char *filename);
247242   void debug_grab_vertex_program_slot(int slot, UINT32 *instruction);
248   void start();
249243   void savestate_items();
244
250245   void read_vertex(address_space & space, offs_t address, vertex_nv &vertex, int attrib);
251246   int read_vertices_0x1810(address_space & space, vertex_nv *destination, int offset, int limit);
252247   int read_vertices_0x1800(address_space & space, vertex_nv *destination, UINT32 address, int limit);
253248   int read_vertices_0x1818(address_space & space, vertex_nv *destination, UINT32 address, int limit);
254249   void convert_vertices_poly(vertex_nv *source, vertex_t *destination, int count);
255   TIMER_CALLBACK_MEMBER(puller_timer_work);
256250
257251   struct {
258252      UINT32 regs[0x80 / 4];
r242703r242704
435429   int enabled_vertex_attributes;
436430   int vertex_attribute_words[16];
437431   int vertex_attribute_offset[16];
438   emu_timer *puller_timer;
439   int puller_channel;
440   int puller_subchannel;
441   int puller_waiting;
442   address_space *puller_space;
443432   UINT32 dilated0[16][2048];
444433   UINT32 dilated1[16][2048];
445434   int dilatechose[256];
446435   nvidia_object_data *objectdata;
447436   int debug_grab_texttype;
448437   char *debug_grab_textfile;
449   int waitvblank_used;
450438
451439   enum VERTEX_PARAMETER {
452440      PARAM_COLOR_B = 0,
r242703r242704
491479      TEX3 = 12
492480   };
493481   enum NV2A_VTXBUF_TYPE {
494      NV2A_VTXBUF_TYPE_UBYTE2 = 0, // what is the difference with UBYTE ?
482      NV2A_VTXBUF_TYPE_UNKNOWN_0 = 0, // used for vertex color ?
495483      NV2A_VTXBUF_TYPE_FLOAT = 2,
496484      NV2A_VTXBUF_TYPE_UBYTE = 4,
497485      NV2A_VTXBUF_TYPE_USHORT = 5,
trunk/src/mame/includes/galaxold.h
r242703r242704
5252   required_device<gfxdecode_device> m_gfxdecode;
5353   required_device<screen_device> m_screen;
5454   required_device<palette_device> m_palette;
55
55   
5656   /* memory pointers */
5757   required_shared_ptr<UINT8> m_videoram;
5858   required_shared_ptr<UINT8> m_spriteram;
r242703r242704
6666   UINT8 m__4in1_bank;
6767   tilemap_t *m_bg_tilemap;
6868   tilemap_t *m_rockclim_tilemap;
69   int m_mooncrst_gfxextend;
6970   int m_spriteram2_present;
7071   UINT8 m_gfxbank[5];
7172   UINT8 m_flipscreen_x;
r242703r242704
7374   UINT8 m_color_mask;
7475   tilemap_t *m_dambustr_tilemap2;
7576   UINT8 *m_dambustr_videoram2;
76
77   
7778   void (galaxold_state::*m_modify_charcode)(UINT16 *code, UINT8 x);     /* function to call to do character banking */
7879   void (galaxold_state::*m_modify_spritecode)(UINT8 *spriteram, int*, int*, int*, int); /* function to call to do sprite banking */
7980   void (galaxold_state::*m_modify_color)(UINT8 *color);   /* function to call to do modify how the color codes map to the PROM */
r242703r242704
146147   DECLARE_WRITE8_MEMBER(dambustr_bg_split_line_w);
147148   DECLARE_WRITE8_MEMBER(dambustr_bg_color_w);
148149   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
149   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);
150
150   DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);   
151   
151152   DECLARE_CUSTOM_INPUT_MEMBER(_4in1_fake_port_r);
152153   DECLARE_CUSTOM_INPUT_MEMBER(vpool_lives_r);
153154   DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r);
154155   DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r);
155
156   
156157   DECLARE_DRIVER_INIT(bullsdrtg);
157158   DECLARE_DRIVER_INIT(ladybugg);
158159   DECLARE_DRIVER_INIT(4in1);
159160   DECLARE_DRIVER_INIT(guttangt);
160161   DECLARE_DRIVER_INIT(ckonggx);
161
162   
162163   TILE_GET_INFO_MEMBER(drivfrcg_get_tile_info);
163164   TILE_GET_INFO_MEMBER(racknrol_get_tile_info);
164165   TILE_GET_INFO_MEMBER(dambustr_get_tile_info2);
165166   TILE_GET_INFO_MEMBER(get_tile_info);
166167   TILE_GET_INFO_MEMBER(rockclim_get_tile_info);
167168   TILE_GET_INFO_MEMBER(harem_get_tile_info);
168
169   
169170   DECLARE_MACHINE_RESET(galaxold);
170171   DECLARE_MACHINE_RESET(devilfsg);
171172   DECLARE_MACHINE_RESET(hunchbkg);
172
173   
173174   DECLARE_PALETTE_INIT(galaxold);
174175   DECLARE_PALETTE_INIT(rockclim);
175176   DECLARE_PALETTE_INIT(scrambold);
r242703r242704
180181   DECLARE_PALETTE_INIT(mariner);
181182   DECLARE_PALETTE_INIT(dambustr);
182183   DECLARE_PALETTE_INIT(turtles);
183
184   
184185   DECLARE_VIDEO_START(galaxold);
185186   DECLARE_VIDEO_START(drivfrcg);
186187   DECLARE_VIDEO_START(racknrol);
r242703r242704
205206   DECLARE_VIDEO_START(dambustr);
206207   DECLARE_VIDEO_START(harem);
207208   DECLARE_VIDEO_START(bagmanmc);
208
209   
209210   UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
210211   UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
211
212   
212213   INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt);
213214   TIMER_CALLBACK_MEMBER(stars_blink_callback);
214215   TIMER_CALLBACK_MEMBER(stars_scroll_callback);
215216   TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer);
216217   IRQ_CALLBACK_MEMBER(hunchbkg_irq_callback);
217
218   
218219   void state_save_register();
219220   void video_start_common();
220221   void pisces_modify_spritecode(UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs);
trunk/src/mame/includes/renegade.h
r242703r242704
8484   DECLARE_WRITE8_MEMBER(adpcm_addr_w);
8585   DECLARE_WRITE8_MEMBER(adpcm_stop_w);
8686   DECLARE_WRITE_LINE_MEMBER(adpcm_int);
87
87   
8888   DECLARE_DRIVER_INIT(kuniokun);
8989   DECLARE_DRIVER_INIT(kuniokunb);
9090   DECLARE_DRIVER_INIT(renegade);
trunk/src/mame/includes/scramble.h
r242703r242704
2222   optional_shared_ptr<UINT8> m_soundram;
2323
2424   UINT8 m_cavelon_bank;
25   UINT8 m_security_2B_counter;
26   UINT8 m_xb;
2527
2628   // harem
2729   UINT8 m_harem_decrypt_mode;
r242703r242704
8183   DECLARE_DRIVER_INIT(billiard);
8284   DECLARE_MACHINE_RESET(scramble);
8385   DECLARE_MACHINE_RESET(explorer);
86   DECLARE_WRITE8_MEMBER(scramble_protection_w);
87   DECLARE_READ8_MEMBER(scramble_protection_r);
8488   DECLARE_WRITE_LINE_MEMBER(scramble_sh_7474_q_callback);
8589   void cavelon_banksw();
8690   inline int bit(int i,int n);
trunk/src/mame/includes/sprint2.h
r242703r242704
5454   DECLARE_WRITE8_MEMBER(sprint2_wram_w);
5555   DECLARE_WRITE8_MEMBER(sprint2_lamp1_w);
5656   DECLARE_WRITE8_MEMBER(sprint2_lamp2_w);
57   DECLARE_WRITE8_MEMBER(dominos4_lamp3_w);
58   DECLARE_WRITE8_MEMBER(dominos4_lamp4_w);
5957   DECLARE_READ8_MEMBER(sprint2_collision1_r);
6058   DECLARE_READ8_MEMBER(sprint2_collision2_r);
6159   DECLARE_WRITE8_MEMBER(sprint2_collision_reset1_w);
r242703r242704
6866   DECLARE_DRIVER_INIT(sprint1);
6967   DECLARE_DRIVER_INIT(sprint2);
7068   DECLARE_DRIVER_INIT(dominos);
71   DECLARE_DRIVER_INIT(dominos4);
7269   TILE_GET_INFO_MEMBER(get_tile_info);
7370   virtual void video_start();
7471   DECLARE_PALETTE_INIT(sprint2);
trunk/src/mame/includes/yunsun16.h
r242703r242704
2727   required_device<gfxdecode_device> m_gfxdecode;
2828   required_device<screen_device> m_screen;
2929   required_device<palette_device> m_palette;
30
30   
3131   /* memory pointers */
3232   required_shared_ptr<UINT16> m_vram_0;
3333   required_shared_ptr<UINT16> m_vram_1;
trunk/src/mame/includes/zac2650.h
r242703r242704
55public:
66   zac2650_state(const machine_config &mconfig, device_type type, const char *tag)
77      : driver_device(mconfig, type, tag),
8      m_videoram(*this, "videoram"),
9      m_s2636_0_ram(*this, "s2636_0_ram"),
810      m_maincpu(*this, "maincpu"),
911      m_s2636(*this, "s2636"),
1012      m_gfxdecode(*this, "gfxdecode"),
1113      m_screen(*this, "screen"),
12      m_palette(*this, "palette"),
13      m_videoram(*this, "videoram"),
14      m_s2636_0_ram(*this, "s2636_0_ram") { }
14      m_palette(*this, "palette") { }
1515
16   /* devices */
16   required_shared_ptr<UINT8> m_videoram;
17   required_shared_ptr<UINT8> m_s2636_0_ram;
18
1719   required_device<cpu_device> m_maincpu;
1820   required_device<s2636_device> m_s2636;
1921   required_device<gfxdecode_device> m_gfxdecode;
2022   required_device<screen_device> m_screen;
2123   required_device<palette_device> m_palette;
2224
23   /* memory pointers */
24   required_shared_ptr<UINT8> m_videoram;
25   required_shared_ptr<UINT8> m_s2636_0_ram;
26
2725   bitmap_ind16 m_bitmap;
2826   bitmap_ind16 m_spritebitmap;
2927   int m_CollisionBackground;
3028   int m_CollisionSprite;
3129   tilemap_t *m_bg_tilemap;
32
3330   DECLARE_WRITE8_MEMBER(tinvader_sound_w);
3431   DECLARE_WRITE8_MEMBER(tinvader_videoram_w);
3532   DECLARE_READ8_MEMBER(zac_s2636_r);
trunk/src/mame/includes/zaccaria.h
r242703r242704
1#include "machine/6821pia.h"
2#include "sound/ay8910.h"
3#include "sound/tms5220.h"
1#include "sound/dac.h"
42
53class zaccaria_state : public driver_device
64{
75public:
86   zaccaria_state(const machine_config &mconfig, device_type type, const char *tag)
97      : driver_device(mconfig, type, tag),
10      m_maincpu(*this, "maincpu"),
11      m_audio2(*this, "audio2"),
12      m_pia0(*this, "pia0"),
13      m_ay1(*this, "ay1"),
14      m_ay2(*this, "ay2"),
15      m_tms(*this, "tms"),
16      m_gfxdecode(*this, "gfxdecode"),
17      m_palette(*this, "palette"),
188      m_videoram(*this, "videoram"),
199      m_attributesram(*this, "attributesram"),
2010      m_spriteram(*this, "spriteram"),
2111      m_spriteram2(*this, "spriteram2"),
12      m_maincpu(*this, "maincpu"),
13      m_audiocpu(*this, "audiocpu"),
14      m_audio2(*this, "audio2"),
15      m_dac2(*this, "dac2"),
16      m_gfxdecode(*this, "gfxdecode"),
17      m_palette(*this, "palette"),
2218      m_dsw_port(*this, "DSW") { }
2319
24
25
26   /* devices */
27   required_device<cpu_device> m_maincpu;
28   required_device<cpu_device> m_audio2;
29   required_device<pia6821_device> m_pia0;
30   required_device<ay8910_device> m_ay1;
31   required_device<ay8910_device> m_ay2;
32   required_device<tms5220_device> m_tms;
33   required_device<gfxdecode_device> m_gfxdecode;
34   required_device<palette_device> m_palette;
35
36   /* memory pointers */
37   required_shared_ptr<UINT8> m_videoram;
38   required_shared_ptr<UINT8> m_attributesram;
39   required_shared_ptr<UINT8> m_spriteram;
40   required_shared_ptr<UINT8> m_spriteram2;
41
42   required_ioport_array<3> m_dsw_port;
43
4420   int m_dsw_sel;
4521   int m_active_8910;
4622   int m_port0a;
4723   int m_acs;
4824   int m_last_port0b;
4925   int m_toggle;
26   required_shared_ptr<UINT8> m_videoram;
27   required_shared_ptr<UINT8> m_attributesram;
5028   tilemap_t *m_bg_tilemap;
29   required_shared_ptr<UINT8> m_spriteram;
30   required_shared_ptr<UINT8> m_spriteram2;
5131   UINT8 m_nmi_mask;
52
53   DECLARE_READ8_MEMBER(dsw_r);
32   DECLARE_READ8_MEMBER(zaccaria_dsw_r);
5433   DECLARE_WRITE8_MEMBER(sound_command_w);
5534   DECLARE_WRITE8_MEMBER(sound1_command_w);
56   DECLARE_READ8_MEMBER(prot1_r);
57   DECLARE_READ8_MEMBER(prot2_r);
35   DECLARE_READ8_MEMBER(zaccaria_prot1_r);
36   DECLARE_READ8_MEMBER(zaccaria_prot2_r);
5837   DECLARE_WRITE8_MEMBER(coin_w);
5938   DECLARE_WRITE8_MEMBER(nmi_mask_w);
60   DECLARE_WRITE8_MEMBER(videoram_w);
61   DECLARE_WRITE8_MEMBER(attributes_w);
62   DECLARE_WRITE8_MEMBER(flip_screen_x_w);
63   DECLARE_WRITE8_MEMBER(flip_screen_y_w);
39   DECLARE_WRITE8_MEMBER(zaccaria_videoram_w);
40   DECLARE_WRITE8_MEMBER(zaccaria_attributes_w);
41   DECLARE_WRITE8_MEMBER(zaccaria_flip_screen_x_w);
42   DECLARE_WRITE8_MEMBER(zaccaria_flip_screen_y_w);
6443   DECLARE_CUSTOM_INPUT_MEMBER(acs_r);
65   DECLARE_WRITE8_MEMBER(dsw_sel_w);
44   DECLARE_WRITE8_MEMBER(zaccaria_dsw_sel_w);
6645   DECLARE_WRITE8_MEMBER(ay8910_port0a_w);
67   DECLARE_READ8_MEMBER(port0a_r);
68   DECLARE_WRITE8_MEMBER(port0a_w);
69   DECLARE_WRITE8_MEMBER(port0b_w);
70   DECLARE_WRITE8_MEMBER(port1b_w);
46   DECLARE_WRITE_LINE_MEMBER(zaccaria_irq0a);
47   DECLARE_WRITE_LINE_MEMBER(zaccaria_irq0b);
48   DECLARE_READ8_MEMBER(zaccaria_port0a_r);
49   DECLARE_WRITE8_MEMBER(zaccaria_port0a_w);
50   DECLARE_WRITE8_MEMBER(zaccaria_port0b_w);
51   DECLARE_WRITE8_MEMBER(zaccaria_port1b_w);
52   DECLARE_WRITE8_MEMBER(mc1408_data_w);
7153   TILE_GET_INFO_MEMBER(get_tile_info);
72   virtual void machine_start();
73   virtual void machine_reset();
7454   virtual void video_start();
7555   DECLARE_PALETTE_INIT(zaccaria);
76   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
77   INTERRUPT_GEN_MEMBER(cb1_toggle);
56   UINT32 screen_update_zaccaria(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
57   INTERRUPT_GEN_MEMBER(zaccaria_cb1_toggle);
7858   INTERRUPT_GEN_MEMBER(vblank_irq);
7959   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section);
60   required_device<cpu_device> m_maincpu;
61   required_device<cpu_device> m_audiocpu;
62   required_device<cpu_device> m_audio2;
63   required_device<dac_device> m_dac2;
64   required_device<gfxdecode_device> m_gfxdecode;
65   required_device<palette_device> m_palette;
66   required_ioport_array<3> m_dsw_port;
8067};
trunk/src/mame/machine/asteroid.c
r242703r242704
9494
9595WRITE8_MEMBER(asteroid_state::asteroid_bank_switch_w)
9696{
97   int bank = BIT(data, 2);
98   m_ram1->set_entry(bank);
99   m_ram2->set_entry(bank);
97   if (data & 4)
98   {
99      membank("bank1")->set_base(m_ram2);
100      membank("bank2")->set_base(m_ram1);
101   }
102   else
103   {
104      membank("bank1")->set_base(m_ram1);
105      membank("bank2")->set_base(m_ram2);
106   }
100107
101108   set_led_status (machine(), 0, ~data & 0x02);
102109   set_led_status (machine(), 1, ~data & 0x01);
r242703r242704
105112
106113WRITE8_MEMBER(asteroid_state::astdelux_bank_switch_w)
107114{
108   int bank = BIT(data, 7);
109   m_ram1->set_entry(bank);
110   m_ram2->set_entry(bank);
115   m_astdelux_bankswitch = data;
116   astdelux_bankswitch_restore();
111117}
112118
119void asteroid_state::astdelux_bankswitch_restore()
120{
121   if (m_astdelux_bankswitch & 0x80)
122   {
123      membank("bank1")->set_base(m_ram2);
124      membank("bank2")->set_base(m_ram1);
125   }
126   else
127   {
128      membank("bank1")->set_base(m_ram1);
129      membank("bank2")->set_base(m_ram2);
130   }
131}
132
113133WRITE8_MEMBER(asteroid_state::astdelux_led_w)
114134{
115135   set_led_status(machine(), offset, (data & 0x80) ? 0 : 1);
116136}
117137
118void asteroid_state::machine_start()
138void asteroid_state::machine_reset()
119139{
120   /* configure RAM banks if present (not on llander) */
121   if (m_ram1.target() != NULL)
122   {
123      UINT8 *ram1 = reinterpret_cast<UINT8 *>(memshare("ram1")->ptr());
124      UINT8 *ram2 = reinterpret_cast<UINT8 *>(memshare("ram2")->ptr());
125
126      /* swapped */
127      m_ram1->configure_entry(1, ram2);
128      m_ram2->configure_entry(1, ram1);
129      /* normal */
130      m_ram1->configure_entry(0, ram1);
131      m_ram2->configure_entry(0, ram2);
132   }
140   asteroid_bank_switch_w(m_maincpu->space(AS_PROGRAM), 0, 0);
141   m_dvg->reset_w(m_maincpu->space(AS_PROGRAM), 0, 0);
133142}
134143
135void asteroid_state::machine_reset()
144MACHINE_RESET_MEMBER(asteroid_state, llander)
136145{
137146   m_dvg->reset_w(m_maincpu->space(AS_PROGRAM), 0, 0);
138
139   /* reset RAM banks if present */
140   if (m_ram1.target() != NULL)
141   {
142      m_ram1->set_entry(0);
143      m_ram2->set_entry(0);
144   }
145147}
trunk/src/mame/machine/atarigen.c
r242703r242704
11991199   {
12001200      if (!m_slapstic_device)
12011201      fatalerror("Slapstic device is missing?\n");
1202
1202   
12031203      slapstic_update_bank(m_slapstic_device->slapstic_bank());
12041204   }
12051205}
trunk/src/mame/machine/cps2crpt.c
r242703r242704
877877   { "ddsomj",   { 0xae92fa94,0x315a9045 }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
878878   { "ddsomjr1", { 0xae92fa94,0x315a9045 }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
879879   { "ddsoma",   { 0x8719abcd,0xef028345 }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
880   { "ddsomar1", { 0x8719abcd,0xef028345 }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
881880   { "ddsomh",   { 0x42134245,0x120de607 }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
882881   { "ddsomb",   { 0x7149a782,0xf3a5bfce }, 0x100000 },    // 0C81 1966 0419  cmpi.l  #$19660419,D1
883882   { "megaman2", { 0x50501cac,0xed346550 }, 0x100000 },    // 0C80 0164 7101  cmpi.l  #$01647101,D0
trunk/src/mame/machine/scramble.c
r242703r242704
1919
2020   if (m_audiocpu != NULL)
2121      sh_init();
22
23   m_security_2B_counter = 0;
2224}
2325
2426MACHINE_RESET_MEMBER(scramble_state,explorer)
r242703r242704
4749
4850/* state of the security PAL (6J) */
4951
52WRITE8_MEMBER(scramble_state::scramble_protection_w)
53{
54   m_xb = data;
55}
5056
57READ8_MEMBER(scramble_state::scramble_protection_r)
58{
59   switch (m_maincpu->pc())
60   {
61   case 0x00a8: return 0xf0;
62   case 0x00be: return 0xb0;
63   case 0x0c1d: return 0xf0;
64   case 0x0c6a: return 0xb0;
65   case 0x0ceb: return 0x40;
66   case 0x0d37: return 0x60;
67   case 0x1ca2: return 0x00;  /* I don't think it's checked */
68   case 0x1d7e: return 0xb0;
69   default:
70      logerror("%s: read protection\n",machine().describe_context());
71      return 0;
72   }
73}
74
75
5176READ8_MEMBER(scramble_state::mariner_protection_1_r )
5277{
5378   return 7;
trunk/src/mame/machine/snes.c
r242703r242704
3232{
3333   /* NTSC SNES draw range is 1-225. */
3434   for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
35      m_ppu->refresh_scanline(bitmap, y + 1);
35      m_ppu->refresh_scanline(machine(), bitmap, y + 1);
3636
3737   return 0;
3838}
r242703r242704
8787{
8888   // latch the counters and pull IRQ
8989   // (don't need to switch to the 65816 context, we don't do anything dependant on it)
90   m_ppu->latch_counters();
90   m_ppu->latch_counters(machine());
9191   SNES_CPU_REG(TIMEUP) = 0x80;    /* Indicate that irq occurred */
9292   m_maincpu->set_input_line(G65816_LINE_IRQ, ASSERT_LINE);
9393
r242703r242704
142142      {
143143         SNES_CPU_REG(TIMEUP) = 0x80;    /* Indicate that irq occurred */
144144         // IRQ latches the counters, do it now
145         m_ppu->latch_counters();
145         m_ppu->latch_counters(machine());
146146         m_maincpu->set_input_line(G65816_LINE_IRQ, ASSERT_LINE );
147147      }
148148   }
r242703r242704
539539         if (!(SNES_CPU_REG(WRIO) & 0x80) && (data & 0x80))
540540         {
541541            // external latch
542            m_ppu->latch_counters();
542            m_ppu->latch_counters(space.machine());
543543         }
544544         SNES_CPU_REG(WRIO) = data;
545545         return;
r242703r242704
10751075
10761076   snes_init_timers();
10771077
1078   for (int i = 0; i < 8; i++)
1078   for (int i = 0; i < 6; i++)
10791079   {
10801080      save_item(NAME(m_dma_channel[i].dmap), i);
10811081      save_item(NAME(m_dma_channel[i].dest_addr), i);
trunk/src/mame/mame.lst
r242703r242704
34113411ddsomjr1        // 06/02/1996 (c) 1996 (Japan)
34123412ddsomj          // 19/06/1996 (c) 1996 (Japan)
34133413ddsoma          // 19/06/1996 (c) 1996 (Asia)
3414ddsomar1      // 08/02/1996 (c) 1996 (Asia)
34153414ddsomh          // 23/02/1996 (c) 1996 (Hispanic)
34163415ddsomb          // 23/02/1996 (c) 1996 (Brazil)
34173416sfa2            // 06/03/1996 (c) 1996 (Euro)
r242703r242704
43304329brdrlins        // Sidam bootleg
43314330brdrlinb        // Karateco bootleg
43324331brdrlinet       // (c) 1981 Sega
4333startrks        // Sidam bootleg
43344332digger          // 684-691 no copyright notice
43354333pulsar          // 790-805 (c) 1981 Sega
43364334heiankyo        // (c) [1979?] Denki Onkyo
r242703r242704
46444642wrestwar        // (c) 1989 (8751)
46454643wrestwar2       // (c) 1989 (FD1094, decrypted)
46464644wrestwar1       // (c) 1989 (FD1094, decrypted)
4647fantzoneta      // (c) 2008 Sega / M2 (bootleg conversion)
46484645
46494646// System 16C
46504647fantzn2x        // (c) 2008 Sega / M2
r242703r242704
65956592
65966593// Konami dual 68000 games
65976594overdriv        // GX789 (c) 1990
6598overdriva       // GX789 (c) 1990
6599overdrivb       // GX789 (c) 1990
66006595gradius3        // GX945 (c) 1989 (World)
66016596gradius3j       // GX945 (c) 1989 (Japan)
66026597gradius3a       // GX945 (c) 1989 (Asia)
r242703r242704
68656860sprint4a        // 008716           1977/12 [6502]
68666861nitedrvr        // 006321           1976/10 [6502]
68676862dominos         // 007305           1977/01 [6502]
6868dominos4        // 007754-007765    ??????? [6502]
68696863triplhnt        // 008422-008791    1977/04 [6800]
68706864sprint8         // ??????           1977/05 [6800]
68716865sprint8a        // ??????           1977/05 [6800]
r242703r242704
68926886sbrkout3        // 033442-033452    1978/09 [6502]
68936887sbrkout         // 033453-033455    1978/09 [6502]
68946888sbrkoutc        // unrealeased proto
6895sbrkoutct       // 034555-034559 proto ???? [6502]
68966889atarifb         // 033xxx           1978/10 [6502]
68976890atarifb1        // 033xxx           1978/10 [6502]
6898atarifb2        // 035330-035350    ???     [6502]
6891atarifb2      // 035330-035350   ???      [6502]
68996892orbit           // 033689-033702    1978/11 [6800]
69006893boxer           // ?????? prototype 1978    [6502]
69016894wolfpack        // ?????? prototype         [6502]
r242703r242704
92499242wiseguy         // (c) 1990 Dooyong
92509243lastday         // (c) 1990 Dooyong
92519244lastdaya        // (c) 1990 Dooyong
9252ddaydoo         // (c) 1990 Dooyong
9245ddaydoo         // (c) 1990 Dooyong
92539246gulfstrm        // (c) 1991 Dooyong
92549247gulfstrma       // (c) 1991 Dooyong
92559248gulfstrmb       // (c) 1991 Dooyong
r242703r242704
93699362skyalert        // (c) 1992
93709363poitto          // (c) 1993 Metro / Able Corp.
93719364dharma          // (c) 1994
9372dharmaj         // (c) 1994
93739365dharmak         // (c) 1994
93749366lastfort        // (c) 1994
93759367lastforte       // (c) 1994
r242703r242704
1037810370rundeep         // (c) 1988 Cream (bootleg?)
1037910371wallc           // (c) 1984 Midcoin
1038010372wallca          // (c) 1984 Midcoin
10381brkblast        // bootleg (Fadesa)
10373brkblast      // bootleg (Fadesa)
1038210374sidampkr        //
1038310375wink            // (c) 1985 Midcoin
1038410376winka           // (c) 1985 Midcoin
trunk/src/mame/video/chihiro.c
r242703r242704
546546            }
547547         }
548548         if ((d->OutputWriteMask != 0) && (d->MultiplexerControl == 0)) {
549            //o[1] = 1;
549            //o[1] = 1;
550550            if (d->OutputSelect) { // assign to output
551551               int wm = d->OutputWriteMask;
552552               for (p1 = 0; p1 < 4; p1++) {
r242703r242704
737737      t_out[2] = par_in[p1_A + 2] * par_in[p2_B + 2];
738738      t_out[3] = par_in[p1_A + 3] * par_in[p2_B + 3];
739739      break;
740   case 3: // "ADD"
740   case 3: // "ADD"
741741      t_out[0] = par_in[p1_A + 0] + par_in[p3_C + 0];
742742      t_out[1] = par_in[p1_A + 1] + par_in[p3_C + 1];
743743      t_out[2] = par_in[p1_A + 2] + par_in[p3_C + 2];
744744      t_out[3] = par_in[p1_A + 3] + par_in[p3_C + 3];
745745      break;
746   case 4: // "MAD"
746   case 4: // "MAD"
747747      t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0] + par_in[p3_C + 0];
748748      t_out[1] = par_in[p1_A + 1] * par_in[p2_B + 1] + par_in[p3_C + 1];
749749      t_out[2] = par_in[p1_A + 2] * par_in[p2_B + 2] + par_in[p3_C + 2];
750750      t_out[3] = par_in[p1_A + 3] * par_in[p2_B + 3] + par_in[p3_C + 3];
751751      break;
752   case 5: // "DP3"
752   case 5: // "DP3"
753753      t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0] + par_in[p1_A + 1] * par_in[p2_B + 1] + par_in[p1_A + 2] * par_in[p2_B + 2];
754754      t_out[1] = t_out[2] = t_out[3] = t_out[0];
755755      break;
756   case 6: // "DPH"
756   case 6: // "DPH"
757757      t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0] + par_in[p1_A + 1] * par_in[p2_B + 1] + par_in[p1_A + 2] * par_in[p2_B + 2] + par_in[p2_B + 3];
758758      t_out[1] = t_out[2] = t_out[3] = t_out[0];
759759      break;
760   case 7: // "DP4"
760   case 7: // "DP4"
761761      t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0] + par_in[p1_A + 1] * par_in[p2_B + 1] + par_in[p1_A + 2] * par_in[p2_B + 2] + par_in[p1_A + 3] * par_in[p2_B + 3];
762762      t_out[1] = t_out[2] = t_out[3] = t_out[0];
763763      break;
764   case 8: // "DST"
764   case 8: // "DST"
765765      t_out[0] = 1.0;
766766      t_out[1] = par_in[p1_A + 1] * par_in[p2_B + 1];
767767      t_out[2] = par_in[p1_A + 2];
768768      t_out[3] = par_in[p2_B + 3];
769769      break;
770   case 9: // "MIN"
770   case 9: // "MIN"
771771      t_out[0] = fmin(par_in[p1_A + 0], par_in[p2_B + 0]);
772772      t_out[1] = fmin(par_in[p1_A + 1], par_in[p2_B + 1]);
773773      t_out[2] = fmin(par_in[p1_A + 2], par_in[p2_B + 2]);
774774      t_out[3] = fmin(par_in[p1_A + 3], par_in[p2_B + 3]);
775775      break;
776   case 10: // "MAX"
776   case 10: // "MAX"
777777      t_out[0] = fmax(par_in[p1_A + 0], par_in[p2_B + 0]);
778778      t_out[1] = fmax(par_in[p1_A + 1], par_in[p2_B + 1]);
779779      t_out[2] = fmax(par_in[p1_A + 2], par_in[p2_B + 2]);
780780      t_out[3] = fmax(par_in[p1_A + 3], par_in[p2_B + 3]);
781781      break;
782   case 11: // "SLT"
782   case 11: // "SLT"
783783      t_out[0] = (par_in[p1_A + 0] < par_in[p2_B + 0]) ? 1.0 : 0;
784784      t_out[1] = (par_in[p1_A + 1] < par_in[p2_B + 1]) ? 1.0 : 0;
785785      t_out[2] = (par_in[p1_A + 2] < par_in[p2_B + 2]) ? 1.0 : 0;
786786      t_out[3] = (par_in[p1_A + 3] < par_in[p2_B + 3]) ? 1.0 : 0;
787787      break;
788   case 12: // "SGE"
788   case 12: // "SGE"
789789      t_out[0] = (par_in[p1_A + 0] >= par_in[p2_B + 0]) ? 1.0 : 0;
790790      t_out[1] = (par_in[p1_A + 1] >= par_in[p2_B + 1]) ? 1.0 : 0;
791791      t_out[2] = (par_in[p1_A + 2] >= par_in[p2_B + 2]) ? 1.0 : 0;
r242703r242704
817817      t_out[2] = par_in[p3_C + 2];
818818      t_out[3] = par_in[p3_C + 3];
819819      break;
820   case 2: // "RCP"
820   case 2:   // "RCP"
821821      t_out[0] = t_out[1] = t_out[2] = t_out[3] = 1.0 / par_in[p3_C + 0];
822822      break;
823   case 3: // "RCC"
823   case 3:   // "RCC"
824824      t_out[0] = t_out[1] = t_out[2] = t_out[3] = 1.0 / par_in[p3_C + 0]; // ?
825825      break;
826   case 4: // "RSQ"
826   case 4: // "RSQ"
827827      t_out[0] = t_out[1] = t_out[2] = t_out[3] = 1.0 / sqrt(abs(par_in[p3_C + 0]));
828828      break;
829   case 5: // "EXP"
829   case 5: // "EXP"
830830      t_out[0] = pow(2, floor(par_in[p3_C + 0]));
831831      t_out[1] = par_in[p3_C + 0] - floor(par_in[p3_C + 0]);
832832      t.f = pow(2, par_in[p3_C + 0]);
r242703r242704
834834      t_out[2] = t.f;
835835      t_out[3] = 1.0;
836836      break;
837   case 6: // "LOG"
837   case 6: // "LOG"
838838      t_out[1] = frexp(par_in[p3_C + 0], &e)*2.0; // frexp gives mantissa as 0.5....1
839839      t_out[0] = e - 1;
840840      t.f = log2(abs(par_in[p3_C + 0]));
r242703r242704
958958{
959959int xx1,yy1,xx2,yy2;
960960
961    xx1=x1;
962    xx2=x2;
963    yy1=y1;
964    yy2=y2;
965    if (xx1 == xx2) {
966        if (yy1 > yy2) {
967            int t=yy1;
968            yy1=yy2;
969            yy2=t;
970        }
971        for (int y=yy1;y <= yy2;y++)
972            *((UINT32 *)bmp.raw_pixptr(y,xx1))= -1;
973        } else if (yy1 == yy2) {
974        if (xx1 > xx2) {
975            int t=xx1;
976            xx1=xx2;
977            xx2=t;
978        }
979        for (int x=xx1;x <= xx2;x++)
980            *((UINT32 *)bmp.raw_pixptr(yy1,x))= -1;
981    }
961   xx1=x1;
962   xx2=x2;
963   yy1=y1;
964   yy2=y2;
965   if (xx1 == xx2) {
966      if (yy1 > yy2) {
967         int t=yy1;
968         yy1=yy2;
969         yy2=t;
970      }
971      for (int y=yy1;y <= yy2;y++)
972         *((UINT32 *)bmp.raw_pixptr(y,xx1))= -1;
973      } else if (yy1 == yy2) {
974      if (xx1 > xx2) {
975         int t=xx1;
976         xx1=xx2;
977         xx2=t;
978      }
979      for (int x=xx1;x <= xx2;x++)
980         *((UINT32 *)bmp.raw_pixptr(yy1,x))= -1;
981   }
982982}*/
983983
984984inline UINT32 convert_a4r4g4b4_a8r8g8b8(UINT32 a4r4g4b4)
r242703r242704
20272027      }
20282028      break;
20292029   case NV2A_VTXBUF_TYPE_UBYTE:
2030      u = space.read_dword(address + 0);
2031      for (c = l-1; c >= l; c--) {
2032         vertex.attribute[attrib].fv[c] = (u & 0xff) / 255.0;
2033         u = u >> 8;
2034      }
20352030      break;
2036   case  NV2A_VTXBUF_TYPE_UBYTE2:
2031   case  NV2A_VTXBUF_TYPE_UNKNOWN_0:
20372032      u = space.read_dword(address + 0);
20382033      for (c = 0; c < l; c++) {
20392034         vertex.attribute[attrib].fv[c] = (u & 0xff) / 255.0;
r242703r242704
21472142            destination[m].p[PARAM_TEXTURE0_U + u * 2] = source[m].attribute[9 + u].fv[0];
21482143            destination[m].p[PARAM_TEXTURE0_V + u * 2] = source[m].attribute[9 + u].fv[1];
21492144         }
2150         destination[m].p[PARAM_Z] = 0xffffff;
2145         destination[m].p[PARAM_Z] = 0+0xffffff;
21512146      }
21522147   }
21532148   else {
r242703r242704
21692164   }
21702165}
21712166
2172int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen)
2167void nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen)
21732168{
21742169   UINT32 maddress;
21752170   UINT32 data;
r242703r242704
23692364         if (countlen < 0) {
23702365            logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen);
23712366            countlen = 0;
2372            return 0;
2367            return;
23732368         }
23742369         address = address + c * 4;
23752370         for (n = 1; countlen > 0; n++) {
r242703r242704
23972392         if (countlen < 0) {
23982393            logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen);
23992394            countlen = 0;
2400            return 0;
2395            return;
24012396         }
24022397         address = address + c * 4;
24032398         for (n = 0; countlen > 0; n++) {
r242703r242704
24442439         if (countlen < 0) {
24452440            logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen);
24462441            countlen = 0;
2447            return 0;
2442            return;
24482443         }
24492444         address = address + c * 4;
24502445         for (n = 0; countlen > 0; n += 2) {
r242703r242704
24542449            if (countlen < 0) {
24552450               logerror("Method 0x1818 missing %d words to draw a complete primitive\n", -countlen);
24562451               countlen = 0;
2457               return 0;
2452               return;
24582453            }
24592454            address = address + c * 4;
24602455            render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, xy[n & 3], xy[(n + 1) & 3], xy[(n + 2) & 3]);
r242703r242704
24822477      vertexbuffer_kind[bit] = data & 15;
24832478      vertexbuffer_size[bit] = (data >> 4) & 15;
24842479      switch (vertexbuffer_kind[bit]) {
2485      case NV2A_VTXBUF_TYPE_UBYTE2:
2480      case NV2A_VTXBUF_TYPE_UNKNOWN_0:
24862481         vertex_attribute_words[bit] = (vertexbuffer_size[bit] * 1) >> 2;
24872482         break;
24882483      case NV2A_VTXBUF_TYPE_FLOAT:
r242703r242704
25462541         m = 2;
25472542      else
25482543         m = 1;
2549      // possible buffers: color, depth, stencil
2544      // possible buffers: color, depth, stencil, and accumulation
25502545      // clear framebuffer
25512546      if (data & 0xf0) {
25522547         bitmap_rgb32 bm(rendertarget, (limits_rendertarget.right() + 1) * m, (limits_rendertarget.bottom() + 1) * m, pitch_rendertarget / 4); // why *2 ?
r242703r242704
25552550         bm.fill(color);
25562551         //printf("clearscreen\n\r");
25572552      }
2558      if ((data & 0x03) == 3) {
2553      if (data & 0x01) {
25592554         bitmap_rgb32 bm(depthbuffer, (limits_rendertarget.right() + 1) * m, (limits_rendertarget.bottom() + 1) * m, pitch_rendertarget / 4); // why *2 ?
2560         // clear zbuffer and stencil
2561         UINT32 depth_stencil = channel[chanel][subchannel].object.method[0x1d8c / 4];
2562         bm.fill(depth_stencil);
2555         // clear zbuffer
2556         UINT32 depth = channel[chanel][subchannel].object.method[0x1d8c / 4];
2557         bm.fill(depth);
25632558      }
2564      else if (((data & 0x03) == 1) || ((data & 0x03) == 2))
2565         logerror("Unsupported clear method parameter %d\n\r", data & 0x03);
25662559      countlen--;
25672560   }
25682561   if (maddress == 0x0200) {
r242703r242704
25902583         displayedtarget = (UINT32 *)space.get_write_ptr(data);
25912584      }
25922585   }
2593   if (maddress == 0x0130) {
2594      countlen--;
2595      if (waitvblank_used == 1)
2596         return 1; // block until next vblank
2597      else
2598         return 0;
2599   }
26002586   if (maddress == 0x0210) {
26012587      // framebuffer offset ?
26022588      rendertarget = (UINT32 *)space.get_write_ptr(data);
r242703r242704
29702956      //combiner.=(data >> 27) & 7;
29712957      countlen--;
29722958   }
2973   return 0;
29742959}
29752960
29762961int nv2a_renderer::toggle_register_combiners_usage()
r242703r242704
29792964   return combiner.used;
29802965}
29812966
2982int nv2a_renderer::toggle_wait_vblank_support()
2983{
2984   waitvblank_used = 1 - waitvblank_used;
2985   return waitvblank_used;
2986}
2987
29882967void nv2a_renderer::debug_grab_texture(int type, const char *filename)
29892968{
29902969   debug_grab_texttype = type;
r242703r242704
30032982   instruction[3] = vertexprogram.exec.op[slot].i[3];
30042983}
30052984
2985void nv2a_renderer::savestate_items()
2986{
2987}
2988
30062989void nv2a_renderer::combiner_argb8_float(UINT32 color, float reg[4])
30072990{
30082991   reg[0] = (float)(color & 0xff) / 255.0;
r242703r242704
35863569      pmc[0x100 / 4] |= 0x1000000;
35873570   else
35883571      pmc[0x100 / 4] &= ~0x1000000;
3589   if ((state == true) && (puller_waiting == 1)) {
3590      puller_waiting = 0;
3591      puller_timer_work(NULL, 0);
3592   }
35933572   if ((pmc[0x100 / 4] != 0) && (pmc[0x140 / 4] != 0)) {
35943573      // send interrupt
35953574      return true;
r242703r242704
36103589   return 0;
36113590}
36123591
3613TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work)
3614{
3615   int chanel, subchannel;
3616   int method, count, handle, objclass;
3617   UINT32 *dmaput, *dmaget;
3618   UINT32 cmd, cmdtype;
3619   int countlen;
3620   int ret;
3621   address_space *space = puller_space;
3622
3623   chanel = puller_channel;
3624   subchannel = puller_subchannel;
3625   dmaput = &channel[chanel][subchannel].regs[0x40 / 4];
3626   dmaget = &channel[chanel][subchannel].regs[0x44 / 4];
3627   chanel = puller_channel;
3628   subchannel = puller_subchannel;
3629   while (*dmaget != *dmaput) {
3630      cmd = space->read_dword(*dmaget);
3631      *dmaget += 4;
3632      cmdtype = geforce_commandkind(cmd);
3633      switch (cmdtype)
3634      {
3635      case 6: // jump
3636#ifdef LOG_NV2A
3637         printf("jump dmaget %08X", *dmaget);
3638#endif
3639         *dmaget = cmd & 0xfffffffc;
3640#ifdef LOG_NV2A
3641         printf(" -> %08X\n\r", *dmaget);
3642#endif
3643         break;
3644      case 0: // increasing method
3645         method = (cmd >> 2) & 2047; // method*4 is address // if method >= 0x40 send it to assigned object
3646#ifdef LOG_NV2A
3647         subch = (cmd >> 13) & 7;
3648#endif
3649         count = (cmd >> 18) & 2047;
3650         if ((method == 0) && (count == 1)) {
3651            handle = space->read_dword(*dmaget);
3652            handle = geforce_object_offset(handle);
3653#ifdef LOG_NV2A
3654            logerror("  assign to subchannel %d object at %d\n", subch, handle);
3655#endif
3656            channel[chanel][subchannel].object.objhandle = handle;
3657            handle = ramin[handle / 4];
3658            objclass = handle & 0xff;
3659            channel[chanel][subchannel].object.objclass = objclass;
3660            *dmaget += 4;
3661         }
3662         else {
3663#ifdef LOG_NV2A
3664            logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3665#endif
3666            ret = 0;
3667            while (count > 0) {
3668               countlen = 1;
3669               ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen);
3670               count--;
3671               method++;
3672               *dmaget += 4;
3673               if (ret != 0)
3674                  break;
3675            }
3676            if (ret != 0) {
3677               puller_timer->enable(false);
3678               puller_waiting = 1;
3679               return;
3680            }
3681         }
3682         break;
3683      case 5: // non-increasing method
3684         method = (cmd >> 2) & 2047;
3685#ifdef LOG_NV2A
3686         subch = (cmd >> 13) & 7;
3687#endif
3688         count = (cmd >> 18) & 2047;
3689         if ((method == 0) && (count == 1)) {
3690#ifdef LOG_NV2A
3691            logerror("  assign channel %d\n", subch);
3692#endif
3693            handle = space->read_dword(*dmaget);
3694            handle = geforce_object_offset(handle);
3695#ifdef LOG_NV2A
3696            logerror("  assign to subchannel %d object at %d\n", subch, handle);
3697#endif
3698            channel[chanel][subchannel].object.objhandle = handle;
3699            handle = ramin[handle / 4];
3700            objclass = handle & 0xff;
3701            channel[chanel][subchannel].object.objclass = objclass;
3702            *dmaget += 4;
3703         }
3704         else {
3705#ifdef LOG_NV2A
3706            logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3707#endif
3708            while (count > 0) {
3709               countlen = count;
3710               ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen);
3711               *dmaget += 4 * (count - countlen);
3712               count = countlen;
3713            }
3714         }
3715         break;
3716      case 3: // long non-increasing method
3717         method = (cmd >> 2) & 2047;
3718#ifdef LOG_NV2A
3719         subch = (cmd >> 13) & 7;
3720#endif
3721         count = space->read_dword(*dmaget);
3722         *dmaget += 4;
3723         if ((method == 0) && (count == 1)) {
3724            handle = space->read_dword(*dmaget);
3725            handle = geforce_object_offset(handle);
3726#ifdef LOG_NV2A
3727            logerror("  assign to subchannel %d object at %d\n", subch, handle);
3728#endif
3729            channel[chanel][subchannel].object.objhandle = handle;
3730            handle = ramin[handle / 4];
3731            objclass = handle & 0xff;
3732            channel[chanel][subchannel].object.objclass = objclass;
3733            *dmaget += 4;
3734         }
3735         else {
3736#ifdef LOG_NV2A
3737            logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3738#endif
3739            while (count > 0) {
3740               countlen = count;
3741               ret=geforce_exec_method(*space, chanel, subchannel, method, *dmaget, countlen);
3742               *dmaget += 4 * (count - countlen);
3743               count = countlen;
3744            }
3745         }
3746         break;
3747      default:
3748         logerror("  unimplemented command %08X\n", cmd);
3749      }
3750   }
3751}
3752
37533592READ32_MEMBER(nv2a_renderer::geforce_r)
37543593{
37553594   static int x, ret;
r242703r242704
38453684   else if ((offset >= 0x00800000 / 4) && (offset < 0x00900000 / 4)) {
38463685      // 32 channels size 0x10000 each, 8 subchannels per channel size 0x2000 each
38473686      int chanel, subchannel, suboffset;
3848      //int method, count, handle, objclass;
3687      int method, count, handle, objclass;
38493688#ifdef LOG_NV2A
38503689      int subch;
38513690#endif
r242703r242704
38603699      COMBINE_DATA(&channel[chanel][subchannel].regs[suboffset]);
38613700      if ((suboffset == 0x40 / 4) || (suboffset == 0x44 / 4)) { // DMA_PUT or DMA_GET
38623701         UINT32 *dmaput, *dmaget;
3702         UINT32 cmd, cmdtype;
3703         int countlen;
38633704
38643705         dmaput = &channel[chanel][subchannel].regs[0x40 / 4];
38653706         dmaget = &channel[chanel][subchannel].regs[0x44 / 4];
38663707         //printf("dmaget %08X dmaput %08X\n\r",*dmaget,*dmaput);
3867         if ((*dmaput == 0x048cf000) && (*dmaget == 0x07f4d000)) {
3708         if ((*dmaput == 0x048cf000) && (*dmaget == 0x07f4d000))
38683709            *dmaget = *dmaput;
3869            puller_waiting = 0;
3870            puller_timer->enable(false);
3871            return;
3872         }
3873         if (*dmaget != *dmaput) {
3874            if (puller_waiting == 0) {
3875               puller_channel = chanel;
3876               puller_subchannel = subchannel;
3877               puller_space = &space;
3878               puller_timer->enable();
3879               puller_timer->adjust(attotime::zero);
3710         while (*dmaget != *dmaput) {
3711            cmd = space.read_dword(*dmaget);
3712            *dmaget += 4;
3713            cmdtype = geforce_commandkind(cmd);
3714            switch (cmdtype)
3715            {
3716            case 6: // jump
3717#ifdef LOG_NV2A
3718               printf("jump dmaget %08X", *dmaget);
3719#endif
3720               *dmaget = cmd & 0xfffffffc;
3721#ifdef LOG_NV2A
3722               printf(" -> %08X\n\r", *dmaget);
3723#endif
3724               break;
3725            case 0: // increasing method
3726               method = (cmd >> 2) & 2047; // method*4 is address // if method >= 0x40 send it to assigned object
3727#ifdef LOG_NV2A
3728               subch = (cmd >> 13) & 7;
3729#endif
3730               count = (cmd >> 18) & 2047;
3731               if ((method == 0) && (count == 1)) {
3732                  handle = space.read_dword(*dmaget);
3733                  handle = geforce_object_offset(handle);
3734#ifdef LOG_NV2A
3735                  logerror("  assign to subchannel %d object at %d\n", subch, handle);
3736#endif
3737                  channel[chanel][subchannel].object.objhandle = handle;
3738                  handle = ramin[handle / 4];
3739                  objclass = handle & 0xff;
3740                  channel[chanel][subchannel].object.objclass = objclass;
3741                  *dmaget += 4;
3742               }
3743               else {
3744#ifdef LOG_NV2A
3745                  logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3746#endif
3747                  while (count > 0) {
3748                     countlen = 1;
3749                     geforce_exec_method(space, chanel, subchannel, method, *dmaget, countlen);
3750                     count--;
3751                     method++;
3752                     *dmaget += 4;
3753                  }
3754               }
3755               break;
3756            case 5: // non-increasing method
3757               method = (cmd >> 2) & 2047;
3758#ifdef LOG_NV2A
3759               subch = (cmd >> 13) & 7;
3760#endif
3761               count = (cmd >> 18) & 2047;
3762               if ((method == 0) && (count == 1)) {
3763#ifdef LOG_NV2A
3764                  logerror("  assign channel %d\n", subch);
3765#endif
3766                  handle = space.read_dword(*dmaget);
3767                  handle = geforce_object_offset(handle);
3768#ifdef LOG_NV2A
3769                  logerror("  assign to subchannel %d object at %d\n", subch, handle);
3770#endif
3771                  channel[chanel][subchannel].object.objhandle = handle;
3772                  handle = ramin[handle / 4];
3773                  objclass = handle & 0xff;
3774                  channel[chanel][subchannel].object.objclass = objclass;
3775                  *dmaget += 4;
3776               }
3777               else {
3778#ifdef LOG_NV2A
3779                  logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3780#endif
3781                  while (count > 0) {
3782                     countlen = count;
3783                     geforce_exec_method(space, chanel, subchannel, method, *dmaget, countlen);
3784                     *dmaget += 4 * (count - countlen);
3785                     count = countlen;
3786                  }
3787               }
3788               break;
3789            case 3: // long non-increasing method
3790               method = (cmd >> 2) & 2047;
3791#ifdef LOG_NV2A
3792               subch = (cmd >> 13) & 7;
3793#endif
3794               count = space.read_dword(*dmaget);
3795               *dmaget += 4;
3796               if ((method == 0) && (count == 1)) {
3797                  handle = space.read_dword(*dmaget);
3798                  handle = geforce_object_offset(handle);
3799#ifdef LOG_NV2A
3800                  logerror("  assign to subchannel %d object at %d\n", subch, handle);
3801#endif
3802                  channel[chanel][subchannel].object.objhandle = handle;
3803                  handle = ramin[handle / 4];
3804                  objclass = handle & 0xff;
3805                  channel[chanel][subchannel].object.objclass = objclass;
3806                  *dmaget += 4;
3807               }
3808               else {
3809#ifdef LOG_NV2A
3810                  logerror("  subch. %d method %04x offset %04x count %d\n", subch, method, method * 4, count);
3811#endif
3812                  while (count > 0) {
3813                     countlen = count;
3814                     geforce_exec_method(space, chanel, subchannel, method, *dmaget, countlen);
3815                     *dmaget += 4 * (count - countlen);
3816                     count = countlen;
3817                  }
3818               }
3819               break;
3820            default:
3821               logerror("  unimplemented command %08X\n", cmd);
38803822            }
38813823         }
38823824      }
38833825   }
3884   //else
3826   else;
38853827   //      logerror("NV_2A: write at %08X mask %08X value %08X\n",0xfd000000+offset*4,mem_mask,data);
38863828}
3887
3888void nv2a_renderer::savestate_items()
3889{
3890}
3891
3892void nv2a_renderer::start()
3893{
3894   puller_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nv2a_renderer::puller_timer_work), this), (void *)"NV2A Puller Timer");
3895   puller_timer->enable(false);
3896}
trunk/src/mame/video/galaxold.c
r242703r242704
404404   m_modify_color = 0;
405405   m_modify_ypos = 0;
406406
407   m_mooncrst_gfxextend = 0;
408
407409   m_draw_bullets = 0;
408410
409411   m_draw_background = &galaxold_state::galaxold_draw_background;
trunk/src/mame/video/galpani2.c
r242703r242704
115115void galpani2_state::copybg15(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
116116{
117117   UINT16* ram = m_bg15 + 0x40000/2;
118
118   
119119   //int x = 0;
120120   //int y = 0;
121121
trunk/src/mame/video/k001005.c
r242703r242704
13201320   {
13211321      case 0x000:         // FIFO write
13221322      {
1323         //osd_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc());
1323         osd_printf_debug("K001005 FIFO write: %08X at %08X\n", data, space.device().safe_pc());
13241324         if (m_status != 1 && m_status != 2)
13251325         {
13261326            if (m_fifo_write_ptr < 0x400)
trunk/src/mame/video/segaic16.c
r242703r242704
11261126      info->tilemaps[pagenum]->set_scrolldx(0, 22);
11271127      info->tilemaps[pagenum]->set_scrolldy(0, 38);
11281128   }
1129
1129   
11301130   save_item(NAME(info->flip), which);
11311131   save_item(NAME(info->rowscroll), which);
11321132   save_item(NAME(info->colscroll), which);
trunk/src/mame/video/tigeroad.c
r242703r242704
122122   m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2);
123123   return 0;
124124}
125
trunk/src/mame/video/tigeroad_spr.c
r242703r242704
11/*
22
3    very simple sprite scheme, used by some Capcom games and hardware cloned from them
3   very simple sprite scheme, used by some Capcom games and hardware cloned from them
44
5    bionicc.c
6    tigeroad.c
7    supduck.c
5   bionicc.c
6   tigeroad.c
7   supduck.c
88
9    it is unknown if this is handled by a custom chip, or simple logic.
10    y positions are inverted in Bionic Commando, but it seems otherwise the same as
11    Tiger Road
9   it is unknown if this is handled by a custom chip, or simple logic.
10   y positions are inverted in Bionic Commando, but it seems otherwise the same as
11   Tiger Road
1212
1313*/
1414
r242703r242704
3939   4  words per sprite
4040
4141   0  ---- ---t tttt tttt = tile number
42
42   
4343   1  ---- ---- --cc cc-- = colour
4444   1  ---- ---- ---- --x- = flip x
4545   1  ---- ---- ---- ---y = flip y
trunk/src/mame/video/zac2650.c
r242703r242704
1616
1717WRITE8_MEMBER(zac2650_state::tinvader_videoram_w)
1818{
19   m_videoram[offset] = data;
19   UINT8 *videoram = m_videoram;
20   videoram[offset] = data;
2021   m_bg_tilemap->mark_tile_dirty(offset);
2122}
2223
r242703r242704
110111
111112TILE_GET_INFO_MEMBER(zac2650_state::get_bg_tile_info)
112113{
113   int code = m_videoram[tile_index];
114   UINT8 *videoram = m_videoram;
115   int code = videoram[tile_index];
114116
115117   SET_TILE_INFO_MEMBER(0, code, 0, 0);
116118}
r242703r242704
125127
126128   m_gfxdecode->gfx(1)->set_source(m_s2636_0_ram);
127129   m_gfxdecode->gfx(2)->set_source(m_s2636_0_ram);
128
129   save_item(NAME(m_bitmap));
130   save_item(NAME(m_spritebitmap));
131   save_item(NAME(m_CollisionBackground));
132   save_item(NAME(m_CollisionSprite));
133130}
134131
135132void zac2650_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
trunk/src/mame/video/zaccaria.c
r242703r242704
142142
143143***************************************************************************/
144144
145WRITE8_MEMBER(zaccaria_state::videoram_w)
145WRITE8_MEMBER(zaccaria_state::zaccaria_videoram_w)
146146{
147147   m_videoram[offset] = data;
148148   m_bg_tilemap->mark_tile_dirty(offset & 0x3ff);
149149}
150150
151WRITE8_MEMBER(zaccaria_state::attributes_w)
151WRITE8_MEMBER(zaccaria_state::zaccaria_attributes_w)
152152{
153153   if (offset & 1)
154154   {
r242703r242704
166166   m_attributesram[offset] = data;
167167}
168168
169WRITE8_MEMBER(zaccaria_state::flip_screen_x_w)
169WRITE8_MEMBER(zaccaria_state::zaccaria_flip_screen_x_w)
170170{
171171   flip_screen_x_set(data & 1);
172172}
173173
174WRITE8_MEMBER(zaccaria_state::flip_screen_y_w)
174WRITE8_MEMBER(zaccaria_state::zaccaria_flip_screen_y_w)
175175{
176176   flip_screen_y_set(data & 1);
177177}
r242703r242704
236236   }
237237}
238238
239UINT32 zaccaria_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
239UINT32 zaccaria_state::screen_update_zaccaria(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
240240{
241241   m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
242242
trunk/src/mess/drivers/altos5.c
r242703r242704
221221WRITE8_MEMBER(altos5_state::memory_write_byte)
222222{
223223   address_space& prog_space = m_maincpu->space(AS_PROGRAM);
224   prog_space.write_byte(offset, data);
224   return prog_space.write_byte(offset, data);
225225}
226226
227227READ8_MEMBER(altos5_state::io_read_byte)
r242703r242704
233233WRITE8_MEMBER(altos5_state::io_write_byte)
234234{
235235   address_space& prog_space = m_maincpu->space(AS_IO);
236   prog_space.write_byte(offset, data);
236   return prog_space.write_byte(offset, data);
237237}
238238
239239WRITE_LINE_MEMBER( altos5_state::busreq_w )
trunk/src/mess/drivers/amaztron.c
r242703r242704
1// license:BSD-3-Clause
2// copyright-holders:hap
3/***************************************************************************
4
5  Coleco Amaze-A-Tron
6  * TMS1100 MCU, labeled MP3405(die label too)
7
8  This is an electronic board game with a selection of 8 maze games,
9  most of them for 2 players. A 5x5 playing grid and four markers are
10  required to play. Refer to the official manual for more information.
11
12***************************************************************************/
13
14#include "emu.h"
15#include "cpu/tms0980/tms0980.h"
16#include "sound/speaker.h"
17
18#include "amaztron.lh"
19
20// master clock is a single stage RC oscillator: R=33K?, C=100pf,
21// according to the TMS 1000 series data manual this is around 350kHz
22#define MASTER_CLOCK (350000)
23
24
25class amaztron_state : public driver_device
26{
27public:
28   amaztron_state(const machine_config &mconfig, device_type type, const char *tag)
29      : driver_device(mconfig, type, tag),
30      m_maincpu(*this, "maincpu"),
31      m_button_matrix(*this, "IN"),
32      m_speaker(*this, "speaker")
33   { }
34
35   required_device<cpu_device> m_maincpu;
36   required_ioport_array<6> m_button_matrix;
37   required_device<speaker_sound_device> m_speaker;
38
39   UINT16 m_r;
40   UINT16 m_o;
41
42   DECLARE_READ8_MEMBER(read_k);
43   DECLARE_WRITE16_MEMBER(write_o);
44   DECLARE_WRITE16_MEMBER(write_r);
45
46   void leds_update();
47
48   virtual void machine_start();
49};
50
51
52
53/***************************************************************************
54
55  I/O
56
57***************************************************************************/
58
59void amaztron_state::leds_update()
60{
61   for (int i = 0; i < 2; i++)
62      if (m_r >> (i + 8) & 1)
63         output_set_digit_value(i, m_o);
64}
65
66READ8_MEMBER(amaztron_state::read_k)
67{
68   UINT8 k = 0;
69
70   // read selected button rows
71   for (int i = 0; i < 6; i++)
72   {
73      if (m_r >> i & 1)
74         k |= m_button_matrix[i]->read();
75   }
76
77   // the 5th row is tied to K4+K8
78   if (k & 0x10) k |= 0xc;
79   return k & 0xf;
80}
81
82WRITE16_MEMBER(amaztron_state::write_r)
83{
84   // R0-R5: input mux
85   // R6,R7: lamps
86   output_set_lamp_value(0, data >> 6 & 1);
87   output_set_lamp_value(1, data >> 7 & 1);
88
89   // R8,R9: select digit
90   m_r = data;
91   leds_update();
92
93   // R10: speaker out
94   m_speaker->level_w(data >> 10 & 1);
95}
96
97WRITE16_MEMBER(amaztron_state::write_o)
98{
99   // O0-O6: digit segments
100   // O7: N/C
101   m_o = data & 0x7f;
102   leds_update();
103}
104
105
106
107/***************************************************************************
108
109  Inputs
110
111***************************************************************************/
112
113static INPUT_PORTS_START( amaztron )
114   PORT_START("IN.0") // R0
115   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("Button 1")
116   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("Button 6")
117   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Button 11")
118   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("Button 16")
119   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Button 21")
120
121   PORT_START("IN.1") // R1
122   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("Button 2")
123   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("Button 7")
124   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("Button 12")
125   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("Button 17")
126   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("Button 22")
127
128   PORT_START("IN.2") // R2
129   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("Button 3")
130   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("Button 8")
131   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("Button 13")
132   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("Button 18")
133   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("Button 23")
134
135   PORT_START("IN.3") // R3
136   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("Button 4")
137   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("Button 9")
138   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("Button 14")
139   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("Button 19")
140   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("Button 24")
141
142   PORT_START("IN.4") // R4
143   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("Button 5")
144   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("Button 10")
145   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("Button 15")
146   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("Button 20")
147   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("Button 25")
148
149   PORT_START("IN.5") // R5
150   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("Game Select")
151   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("Game Start")
152   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
153   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
154   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
155INPUT_PORTS_END
156
157
158
159/***************************************************************************
160
161  Machine Config
162
163***************************************************************************/
164
165void amaztron_state::machine_start()
166{
167   m_r = 0;
168   m_o = 0;
169
170   save_item(NAME(m_r));
171   save_item(NAME(m_o));
172}
173
174
175static MACHINE_CONFIG_START( amaztron, amaztron_state )
176
177   /* basic machine hardware */
178   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
179   MCFG_TMS1XXX_READ_K_CB(READ8(amaztron_state, read_k))
180   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(amaztron_state, write_o))
181   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(amaztron_state, write_r))
182
183   MCFG_DEFAULT_LAYOUT(layout_amaztron)
184
185   /* no video! */
186
187   /* sound hardware */
188   MCFG_SPEAKER_STANDARD_MONO("mono")
189   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
190   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
191MACHINE_CONFIG_END
192
193
194
195/***************************************************************************
196
197  Game driver(s)
198
199***************************************************************************/
200
201ROM_START( amaztron )
202   ROM_REGION( 0x0800, "maincpu", 0 )
203   ROM_LOAD( "tms1100nll_mp3405", 0x0000, 0x0800, CRC(9cbc0009) SHA1(17772681271b59280687492f37fa0859998f041d) )
204
205   ROM_REGION( 867, "maincpu:mpla", 0 )
206   ROM_LOAD( "tms1100_amaztron_mpla.pla", 0, 867, CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) )
207   ROM_REGION( 365, "maincpu:opla", 0 )
208   ROM_LOAD( "tms1100_amaztron_opla.pla", 0, 365, CRC(f3875384) SHA1(3c256a3db4f0aa9d93cf78124db39f4cbdc57e4a) )
209ROM_END
210
211
212CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/aquarius.c
r242703r242704
357357   MCFG_SCREEN_PALETTE("palette")
358358
359359   MCFG_GFXDECODE_ADD("gfxdecode", "palette", aquarius )
360   MCFG_TEA1002_ADD("encoder", XTAL_8_867238MHz)
361360   MCFG_PALETTE_ADD("palette", 512)
362361   MCFG_PALETTE_INDIRECT_ENTRIES(16)
363362   MCFG_PALETTE_INIT_OWNER(aquarius_state, aquarius)
trunk/src/mess/drivers/atari400.c
r242703r242704
4848#include "machine/atarifdc.h"
4949#include "bus/a800/a800_slot.h"
5050#include "bus/a800/a800_carts.h"
51#include "bus/a8sio/a8sio.h"
5251
5352
5453/******************************************************************************
r242703r242704
20762075 *
20772076 **************************************************************/
20782077
2079
20802078static MACHINE_CONFIG_START( atari_common_nodac, a400_state )
20812079   /* basic machine hardware */
20822080   MCFG_CPU_ADD("maincpu", M6502, FREQ_17_EXACT)
r242703r242704
20962094   MCFG_DEVICE_ADD("pia", PIA6821, 0)
20972095   MCFG_PIA_READPA_HANDLER(IOPORT("djoy_0_1"))
20982096   MCFG_PIA_READPB_HANDLER(IOPORT("djoy_2_3"))
2099   MCFG_PIA_CA2_HANDLER(DEVWRITELINE("a8sio", a8sio_device, motor_w))
21002097   MCFG_PIA_CB2_HANDLER(DEVWRITELINE("fdc", atari_fdc_device, pia_cb2_w))
21012098
2102   MCFG_DEVICE_ADD("a8sio", A8SIO, 0)
2103   MCFG_A8SIO_DATA_IN_CB(DEVWRITELINE("pokey", pokey_device, sid_w))
2104   MCFG_A8SIO_SLOT_ADD("a8sio", "sio", NULL)
2105
21062099   /* sound hardware */
21072100   MCFG_SPEAKER_STANDARD_MONO("mono")
21082101   MCFG_SOUND_ADD("pokey", POKEY, FREQ_17_EXACT)
trunk/src/mess/drivers/bitgraph.c
r242703r242704
165165static ADDRESS_MAP_START(bitgrapha_mem, AS_PROGRAM, 16, bitgraph_state)
166166   ADDRESS_MAP_UNMAP_HIGH
167167   AM_RANGE(0x000000, 0x007fff) AM_ROM
168   AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00)   // HOST
168   AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00)   // HOST
169169   AM_RANGE(0x010002, 0x010003) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, status_r, control_w, 0xff00)
170   AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff)   // KEYBOARD
170   AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff)   // KEYBOARD
171171   AM_RANGE(0x01000a, 0x01000b) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, status_r, control_w, 0x00ff)
172   AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff)   // DEBUGGER
172   AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff)   // DEBUGGER
173173   AM_RANGE(0x010012, 0x010013) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, status_r, control_w, 0x00ff)
174   AM_RANGE(0x010018, 0x010019) AM_DEVREADWRITE8(ACIA3_TAG, acia6850_device, data_r, data_w, 0x00ff)   // POINTER
174   AM_RANGE(0x010018, 0x010019) AM_DEVREADWRITE8(ACIA3_TAG, acia6850_device, data_r, data_w, 0x00ff)   // POINTER
175175   AM_RANGE(0x01001a, 0x01001b) AM_DEVREADWRITE8(ACIA3_TAG, acia6850_device, status_r, control_w, 0x00ff)
176176   AM_RANGE(0x010020, 0x010027) AM_READWRITE8(adlc_r, adlc_w, 0xff00)
177   AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00)    // EAROM, PSG
177   AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00)   // EAROM, PSG
178178   AM_RANGE(0x010030, 0x010031) AM_WRITE(baud_write)
179179   AM_RANGE(0x3e0000, 0x3fffff) AM_RAM
180180ADDRESS_MAP_END
r242703r242704
182182static ADDRESS_MAP_START(bitgraphb_mem, AS_PROGRAM, 16, bitgraph_state)
183183   ADDRESS_MAP_UNMAP_HIGH
184184   AM_RANGE(0x000000, 0x007fff) AM_ROM
185   AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00)   // HOST
185   AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00)   // HOST
186186   AM_RANGE(0x010002, 0x010003) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, status_r, control_w, 0xff00)
187   AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff)   // KEYBOARD
187   AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff)   // KEYBOARD
188188   AM_RANGE(0x01000a, 0x01000b) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, status_r, control_w, 0x00ff)
189   AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff)   // DEBUGGER
189   AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff)   // DEBUGGER
190190   AM_RANGE(0x010012, 0x010013) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, status_r, control_w, 0x00ff)
191191   AM_RANGE(0x01001a, 0x01001b) AM_WRITE8(misccr_write, 0x00ff)
192192   AM_RANGE(0x010020, 0x010027) AM_READWRITE8(adlc_r, adlc_w, 0xff00)
193   AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00)    // EAROM, PSG
193   AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00)   // EAROM, PSG
194194   AM_RANGE(0x010030, 0x010031) AM_WRITE(baud_write)
195//  AM_RANGE(0x010030, 0x010037) AM_READ8(ppu_read, 0x00ff)
196//  AM_RANGE(0x010038, 0x01003f) AM_WRITE8(ppu_write, 0x00ff)
195//   AM_RANGE(0x010030, 0x010037) AM_READ8(ppu_read, 0x00ff)
196//   AM_RANGE(0x010038, 0x01003f) AM_WRITE8(ppu_write, 0x00ff)
197197   AM_RANGE(0x380000, 0x3fffff) AM_RAM
198198ADDRESS_MAP_END
199199
r242703r242704
257257   m_pia_b = data;
258258
259259   switch (m_pia_b & 0x03) {
260      case 2: m_psg->data_w(space, 0, m_pia_a); break;
261      case 3: m_psg->address_w(space, 0, m_pia_a); break;
260      case 2:   m_psg->data_w(space, 0, m_pia_a); break;
261      case 3:   m_psg->address_w(space, 0, m_pia_a); break;
262262   }
263263
264264   if (BIT(m_pia_b, 3)) {
r242703r242704
302302WRITE16_MEMBER(bitgraph_state::baud_write)
303303{
304304   DBG_LOG(1,"Baud", ("%04X\n", data));
305   m_dbrgb->str_w(data & 15);      // 2 DBG
306   m_dbrga->stt_w((data >> 4) & 15);   // 1 KBD
307   m_dbrgb->stt_w((data >> 8) & 15);   // 3 PNT
308   m_dbrga->str_w((data >> 12) & 15);  // 0 HOST
305   m_dbrgb->str_w(data & 15);      // 2 DBG
306   m_dbrga->stt_w((data >> 4) & 15);   // 1 KBD
307   m_dbrgb->stt_w((data >> 8) & 15);   // 3 PNT
308   m_dbrga->str_w((data >> 12) & 15);   // 0 HOST
309309}
310310
311311WRITE_LINE_MEMBER(bitgraph_state::com8116_a_fr_w)
r242703r242704
398398
399399#ifdef UNUSED_FUNCTION
400400static ADDRESS_MAP_START(ppu_io, AS_IO, 8, bitgraph_state)
401//  AM_RANGE(0x00, 0x00) AM_READ(ppu_irq)
402//  AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1)
403//  AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(ppu_t0_r)
401//   AM_RANGE(0x00, 0x00) AM_READ(ppu_irq)
402//   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1)
403//   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(ppu_t0_r)
404404   AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("i8243", i8243_device, i8243_prog_w)
405405ADDRESS_MAP_END
406406#endif
407407
408408/*
409    p4  O: Centronics data 3..0
410    p5  O: Centronics data 7..4
411    p6  O: Centronics control
412    p7  I: Centronics status
409   p4   O: Centronics data 3..0
410   p5   O: Centronics data 7..4
411   p6   O: Centronics control
412   p7   I: Centronics status
413413*/
414414WRITE8_MEMBER(bitgraph_state::ppu_i8243_w)
415415{
r242703r242704
572572   MCFG_CPU_PROGRAM_MAP(bitgraphb_mem)
573573
574574   MCFG_FRAGMENT_ADD(bg_motherboard)
575//  MCFG_FRAGMENT_ADD(bg_ppu)
575//   MCFG_FRAGMENT_ADD(bg_ppu)
576576
577577   MCFG_DEVICE_ADD("system_clock", CLOCK, 1040)
578578   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(bitgraph_state, system_clock_write))
trunk/src/mess/drivers/c128.c
r242703r242704
16151615   MCFG_MOS8563_ADD(MOS8563_TAG, SCREEN_VDC_TAG, XTAL_16MHz, vdc_videoram_map)
16161616   MCFG_MC6845_SHOW_BORDER_AREA(true)
16171617   MCFG_MC6845_CHAR_WIDTH(8)
1618   MCFG_MC6845_SHOW_BORDER_AREA(true)
1619   MCFG_MC6845_CHAR_WIDTH(8)
16181620   MCFG_SCREEN_ADD(SCREEN_VDC_TAG, RASTER)
16191621   MCFG_SCREEN_REFRESH_RATE(60)
16201622   MCFG_SCREEN_SIZE(640, 200)
trunk/src/mess/drivers/cnsector.c
r242703r242704
44
55  Parker Brothers Code Name: Sector
66  * MP0905BNL ZA0379 (die labeled 0970F-05B)
7
7 
88  This is a tabletop submarine pursuit game. A grid board and small toy
99  boats are used to remember your locations (a Paint app should be ok too).
1010  Refer to the official manual for more information, it is not a simple game.
r242703r242704
6969void cnsector_state::leds_update()
7070{
7171   UINT16 active_state[0x10];
72
72   
7373   for (int i = 0; i < 0x10; i++)
7474   {
7575      active_state[i] = 0;
76
76     
7777      for (int j = 0; j < 0x10; j++)
7878      {
7979         int di = j << 4 | i;
80
80         
8181         // turn on powered leds
8282         if (m_leds_state[i] >> j & 1)
8383            m_leds_decay[di] = LEDS_DECAY_TIME;
84
84         
8585         // determine active state
8686         int ds = (m_leds_decay[di] != 0) ? 1 : 0;
8787         active_state[i] |= (ds << j);
8888      }
8989   }
90
90   
9191   // on difference, send to output
9292   for (int i = 0; i < 0x10; i++)
9393      if (m_leds_cache[i] != active_state[i])
9494         output_set_digit_value(i, active_state[i]);
95
95   
9696   memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
9797}
9898
r242703r242704
102102   for (int i = 0; i < 0x100; i++)
103103      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
104104         m_leds_decay[i]--;
105
105   
106106   leds_update();
107107}
108108
r242703r242704
122122   for (int i = 0; i < 5; i++)
123123      if (m_o >> i & 1)
124124         k |= m_button_matrix[i]->read();
125
125   
126126   return k;
127127}
128128
r242703r242704
201201   memset(m_leds_decay, 0, sizeof(m_leds_decay));
202202
203203   m_o = 0;
204
204   
205205   // register for savestates
206206   save_item(NAME(m_leds_state));
207207   save_item(NAME(m_leds_cache));
r242703r242704
218218   MCFG_TMS1XXX_READ_K_CB(READ8(cnsector_state, read_k))
219219   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cnsector_state, write_o))
220220   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cnsector_state, write_r))
221
221   
222222   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", cnsector_state, leds_decay_tick, attotime::from_msec(10))
223223
224224   MCFG_DEFAULT_LAYOUT(layout_cnsector)
trunk/src/mess/drivers/comp4.c
r242703r242704
44
55  Milton Bradley Comp IV
66  * TMC0904NL CP0904A (die labeled 4A0970D-04A)
7
7 
88  This is small tabletop Mastermind game; a code-breaking game where the player
99  needs to find out the correct sequence of colours (numbers in our case).
1010  It is known as Logic 5 in Europe, and as Pythaligoras in Japan.
11
11 
1212  Press the R key to start, followed by a set of unique numbers and E.
1313  Refer to the official manual for more information.
1414
r242703r242704
7474      // turn on powered leds
7575      if (m_leds_state >> i & 1)
7676         m_leds_decay[i] = LEDS_DECAY_TIME;
77
77     
7878      // send to output
7979      output_set_lamp_value(i, (m_leds_decay[i] != 0) ? 1 : 0);
8080   }
r242703r242704
8686   for (int i = 0; i < 0x10; i++)
8787      if (!(m_leds_state >> i & 1) && m_leds_decay[i])
8888         m_leds_decay[i]--;
89
89   
9090   leds_update();
9191}
9292
r242703r242704
106106   for (int i = 0; i < 3; i++)
107107      if (m_o >> (i+1) & 1)
108108         k |= m_button_matrix[i]->read();
109
109   
110110   return k;
111111}
112112
r242703r242704
173173   memset(m_leds_decay, 0, sizeof(m_leds_decay));
174174
175175   m_o = 0;
176
176   
177177   // register for savestates
178178   save_item(NAME(m_leds_state));
179179   save_item(NAME(m_leds_decay));
r242703r242704
189189   MCFG_TMS1XXX_READ_K_CB(READ8(comp4_state, read_k))
190190   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(comp4_state, write_o))
191191   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(comp4_state, write_r))
192
192   
193193   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", comp4_state, leds_decay_tick, attotime::from_msec(10))
194194
195195   MCFG_DEFAULT_LAYOUT(layout_comp4)
trunk/src/mess/drivers/ec184x.c
r242703r242704
202202
203203static ADDRESS_MAP_START( ec1847_io, AS_IO, 8, ec184x_state )
204204   ADDRESS_MAP_UNMAP_HIGH
205//  AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender
205//   AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender
206206ADDRESS_MAP_END
207207
208208
trunk/src/mess/drivers/excali64.c
r242703r242704
101101   DECLARE_WRITE8_MEMBER(motor_w);
102102   DECLARE_MACHINE_RESET(excali64);
103103   required_device<palette_device> m_palette;
104
104   
105105private:
106106   const UINT8 *m_p_chargen;
107107   UINT8 *m_p_videoram;
r242703r242704
302302   if (BIT(data, 1))
303303      floppy = m_floppy1->get_device();
304304
305   m_fdc->set_floppy(floppy);
306305   if (floppy)
306   {
307      m_fdc->set_floppy(floppy);
307308      floppy->ss_w(BIT(data, 4));
308
309   }
309310#else
310311   if BIT(data, 0)
311312      m_fdc->set_drive(0);
r242703r242704
585586      }
586587      else
587588         gfx = m_p_chargen[(chr<<4) | ra]; // normal character
588
589     
589590      gfx ^= (x == cursor_x) ? 0xff : 0;
590591
591592      /* Display a scanline of a character */
r242703r242704
653654   MCFG_CASSETTE_ADD( "cassette" )
654655#if NEWFDC
655656   MCFG_WD2793x_ADD("fdc", XTAL_16MHz / 16)
657   MCFG_WD_FDC_FORCE_READY
656658   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
657   MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", excali64_state::floppy_formats)
658   MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", excali64_state::floppy_formats)
659   MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)// excali64_state::floppy_formats)
660   MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)
659661#else
660662   MCFG_DEVICE_ADD("fdc", WD2793, 0)
661663   MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
trunk/src/mess/drivers/gamate.c
r242703r242704
22 PeT mess@utanet.at 2007, 2014
33 Peter Wilhelmsen peter.wilhelmsen@gmail.com
44 Morten Shearman Kirkegaard morten+gamate@afdelingp.dk
5 Juan F??lix Mateos vectrex@hackermesh.org
5 Juan Félix Mateos vectrex@hackermesh.org
66******************************************************************************/
77
88#include "emu.h"
r242703r242704
1818      : driver_device(mconfig, type, tag)
1919      , m_maincpu(*this, "maincpu")
2020      , m_cart(*this, "cartslot")
21//      , m_gfxdecode(*this, "gfxdecode")
21//      , m_gfxdecode(*this, "gfxdecode")
2222      , m_io_joy(*this, "JOY")
2323      , m_palette(*this, "palette")
2424      , m_bios(*this, "bios")
r242703r242704
4747
4848   struct
4949   {
50   UINT8 reg[8];
51   struct {
52      bool write;
53      bool page2; // else page1
50     UINT8 reg[8];
51     struct {
52       bool write;
53       bool page2; // else page1
5454   UINT8 ypos, xpos/*tennis*/;
55      UINT8 data[2][0x100][0x20];
56      } bitmap;
57   UINT8 x, y;
55       UINT8 data[2][0x100][0x20];
56     } bitmap;
57     UINT8 x, y;
5858      bool y_increment;
5959   } video;
6060
r242703r242704
6868
6969   required_device<cpu_device> m_maincpu;
7070   required_device<generic_slot_device> m_cart;
71//  required_device<gfxdecode_device> m_gfxdecode;
71//   required_device<gfxdecode_device> m_gfxdecode;
7272   required_ioport m_io_joy;
7373   required_device<palette_device> m_palette;
7474   required_shared_ptr<UINT8> m_bios;
r242703r242704
113113
114114WRITE8_MEMBER( gamate_state::gamate_video_w )
115115{
116   video.reg[offset]=data;
117   switch (offset) {
118   case 1: video.bitmap.write=data&0xc0; // more addressing mode
116  video.reg[offset]=data;
117  switch (offset) {
118  case 1: video.bitmap.write=data&0xc0; // more addressing mode
119119      video.y_increment=data&0x40;
120120      break;
121121   case 2: video.bitmap.xpos=data;break; // at least 7 bits
122122   case 3: video.bitmap.ypos=data;break; // at least 7 bits
123   case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
124   case 5: video.y=data;break;
125   case 7:
126   if (video.bitmap.write) {
127      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
128      video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
129      else
130      logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
131   } else {
132      video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
133   }
134   if (video.y_increment) video.y++;
123  case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
124  case 5: video.y=data;break;
125  case 7:
126    if (video.bitmap.write) {
127      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
128        video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
129      else
130        logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
131    } else {
132        video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
133    }
134    if (video.y_increment) video.y++;
135135      else video.x++;
136   }
136  }
137137}
138138
139139WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w )
r242703r242704
149149READ8_MEMBER( gamate_state::gamate_video_r )
150150{
151151   if (offset!=6) return 0;
152   UINT8 data=0;
153   if (video.bitmap.write) {
154      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
155      data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
156      else
157      logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
158   } else {
159   data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
160   }
161   if (m_maincpu->pc()<0xf000)
162   logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
163   return data;
152  UINT8 data=0;
153  if (video.bitmap.write) {
154      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
155        data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
156      else
157        logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
158  } else {
159    data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
160  }
161  if (m_maincpu->pc()<0xf000)
162    logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
163  return data;
164164}
165165
166166WRITE8_MEMBER( gamate_state::gamate_audio_w )
167167{
168   logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
168  logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
169169}
170170
171171READ8_MEMBER( gamate_state::gamate_audio_r )
172172{
173   logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
173  logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
174174   return 0;
175175}
176176
177177
178178READ8_MEMBER( gamate_state::gamate_pad_r )
179179{
180   UINT8 data=m_io_joy->read();
181   return data;
180  UINT8 data=m_io_joy->read();
181  return data;
182182}
183183
184184static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state )
185   AM_RANGE(0x0000, 0x03ff) AM_RAM
186   AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
187   AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
188   AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
189   AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
185    AM_RANGE(0x0000, 0x03ff) AM_RAM
186  AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
187  AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
188  AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
189  AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
190190
191   AM_RANGE(0x6000, 0x9fff) AM_READ_BANK("bankmulti")
192   AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
191  AM_RANGE(0x6000, 0x9fff) AM_READ_BANK("bankmulti")
192  AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
193193
194194   AM_RANGE(0x6000, 0x6002) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w)
195//  AM_RANGE(0x6000, 0xdfff) AM_READWRITE(gamate_cart_r, gamate_cart_w)
195//   AM_RANGE(0x6000, 0xdfff) AM_READWRITE(gamate_cart_r, gamate_cart_w)
196196   AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w)
197197   AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w)
198198
199   AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
199  AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
200200ADDRESS_MAP_END
201201
202202
r242703r242704
215215#ifdef UNUSED_CODE
216216static const struct gfx_layout gamate_charlayout =
217217{
218      4,      /* width of object */
219      1,      /* height of object */
220      256,/* 256 characters */
221      2,      /* bits per pixel */
222      { 0,1 }, /* no bitplanes */
223      /* x offsets */
224      { 0,2,4,6 },
225      /* y offsets */
226      { 0 },
227      8*1 /* size of 1 object in bits */
218        4,      /* width of object */
219        1,      /* height of object */
220        256,/* 256 characters */
221        2,      /* bits per pixel */
222        { 0,1 }, /* no bitplanes */
223        /* x offsets */
224        { 0,2,4,6 },
225        /* y offsets */
226        { 0 },
227        8*1 /* size of 1 object in bits */
228228};
229229
230230static const unsigned short gamate_palette[4] =
r242703r242704
233233};
234234
235235static GFXDECODE_START( gamate_charlayout )
236      GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
236        GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
237237GFXDECODE_END
238238#endif
239239
240240/* palette in red, green, blue tribles */
241241static const unsigned char gamate_colors[4][3] =
242242{
243   { 255,255,255 },
244   { 0xa0, 0xa0, 0xa0 },
245   { 0x60, 0x60, 0x60 },
246   { 0, 0, 0 }
243  { 255,255,255 },
244  { 0xa0, 0xa0, 0xa0 },
245  { 0x60, 0x60, 0x60 },
246  { 0, 0, 0 }
247247};
248248
249249PALETTE_INIT_MEMBER(gamate_state, gamate)
r242703r242704
274274
275275UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
276276{
277   int x, y, j;
278   for (y=0;y<152;y++) {
279   for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {
280      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
281      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
282      BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
283      BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
284   }
285   }
286   return 0;
277  int x, y, j;
278  for (y=0;y<152;y++) {
279    for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {
280      UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
281      UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
282      BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
283      BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
284    }
285  }
286  return 0;
287287}
288288
289289DRIVER_INIT_MEMBER(gamate_state,gamate)
290290{
291291   memset(&video, 0, sizeof(video));/* memset(m_ram, 0, sizeof(m_ram));*/
292   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
292   UINT8 *gfx=memregion("gfx1")->base();   for (int i=0; i<256; i++) gfx[i]=i;
293293   timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this));
294294   timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this));
295295}
r242703r242704
298298void gamate_state::machine_start()
299299{
300300   if (m_cart->exists()) {
301//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
301//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
302302      membank("bankmulti")->set_base(m_cart->get_rom_base());
303303      membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset
304304   }
r242703r242704
355355   MCFG_SCREEN_UPDATE_DRIVER(gamate_state, screen_update_gamate)
356356   MCFG_SCREEN_PALETTE("palette")
357357
358//  MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
358//   MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
359359   MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors))
360//  MCFG_PALETTE_INDIRECT_ENTRIES(4)
360//   MCFG_PALETTE_INDIRECT_ENTRIES(4)
361361   MCFG_PALETTE_INIT_OWNER(gamate_state, gamate)
362362   MCFG_DEFAULT_LAYOUT(layout_lcd)
363363
r242703r242704
371371ROM_START(gamate)
372372   ROM_REGION(0x10000,"maincpu", 0)
373373   ROM_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297) )
374   ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
374 ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
375375ROM_END
376376
377377
378378/*    YEAR  NAME      PARENT  COMPAT    MACHINE   INPUT    CLASS          INIT      COMPANY    FULLNAME */
379379CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND)
380
381
trunk/src/mess/drivers/hp16500.c
r242703r242704
11/***************************************************************************
2 
3   Hewlett-Packard HP16500b Logic Analyzer
24
3  Hewlett-Packard HP16500a/b/c Logic Analyzer
4
5  These are weird, the "a" has more in common with the older 1650/1651
6  than the 16500b.
7
8  16500a rev 00.00:
9    MC68000 @ 10 MHz
10    MC68A45 CRTC
11    FDC9793 floppy controller (WD1793 type)
12    TMS9914A GPIB bus interface
13    SCN2661 DUART/timer
14
15  IRQ1 = VBL, IRQ2 = 20b007, IRQ3 = ?, IRQ4 = 20d000, IRQ5 = 20d007,
16  IRQ6 = ?, IRQ7 = ?
17
18  16500a rev 00.02:
19    MC68000 @ 10 MHz
20    MC68A45 CRTC
21    Z0765A08PSC floppy controller (NEC765 type)
22   TMS9914A GPIB bus interface
23    SCN2661 DUART/timer
24
25  16500b:
265    MC68EC030 @ 25 MHz
276
287    WD37C65C floppy controller (NEC765 type)
r242703r242704
3716    IRQ 5 = 814a
3817    IRQ 6 = 35c8 (jump 840120)
3918    IRQ 7 = 35d4 (jump 840120)
40
41  16500c:
42    Same as 16500b, but add:
43    53C720 SCSI controller
44    DP83934 SONIC ethernet
45
19 
4620****************************************************************************/
4721
4822#include "emu.h"
4923#include "cpu/m68000/m68000.h"
50#include "video/mc6845.h"
51#include "machine/mc68681.h"
5224
53#define MAINCPU_TAG   "maincpu"
54#define CRTC_TAG   "crtc"
55#define SCREEN_TAG   "screen"
56#define DUART_TAG   "duart"
57
5825class hp16500_state : public driver_device
5926{
6027public:
6128   hp16500_state(const machine_config &mconfig, device_type type, const char *tag)
6229      : driver_device(mconfig, type, tag),
63      m_maincpu(*this, MAINCPU_TAG)
64      { }
30      m_maincpu(*this, "maincpu")
31    { }                                     
6532
6633   virtual void video_start();
6734   UINT32 screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
68   UINT32 screen_update_hp16500a(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
6935
7036   required_device<cpu_device> m_maincpu;
7137   dynamic_array<UINT8> m_vram;
r242703r242704
8046   DECLARE_WRITE8_MEMBER (val_w);
8147   DECLARE_READ32_MEMBER(vbl_state_r);
8248   DECLARE_WRITE32_MEMBER(vbl_ack_w);
83   DECLARE_READ16_MEMBER(vbl_ack16_r);
84   DECLARE_WRITE16_MEMBER(vbl_ack16_w);
8549
86   DECLARE_WRITE8_MEMBER(pal_ctrl_w);
87   DECLARE_WRITE8_MEMBER(pal_r_w);
88   DECLARE_WRITE8_MEMBER(pal_g_w);
89   DECLARE_WRITE8_MEMBER(pal_b_w);
90
91   DECLARE_WRITE16_MEMBER(maskval_w);
92
93   DECLARE_WRITE_LINE_MEMBER(vsync_changed);
94   MC6845_UPDATE_ROW(crtc_update_row);
95   MC6845_UPDATE_ROW(crtc_update_row_1650);
96
9750   INTERRUPT_GEN_MEMBER(vblank);
9851
9952private:
r242703r242704
10255
10356READ32_MEMBER(hp16500_state::vbl_state_r)
10457{
105   return 0x03000000;  // bit 0 set means the interrupt handler advances the pSOS tick counter.
58   return 0x03000000;   // bit 0 set means the interrupt handler advances the pSOS tick counter.
10659}
10760
10861WRITE32_MEMBER(hp16500_state::vbl_ack_w)
r242703r242704
11063   m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
11164}
11265
113READ16_MEMBER(hp16500_state::vbl_ack16_r)
114{
115   m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
116   return 0;
117}
118
119WRITE16_MEMBER(hp16500_state::vbl_ack16_w)
120{
121   m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
122}
123
124WRITE_LINE_MEMBER( hp16500_state::vsync_changed )
125{
126   if (state)
127   {
128      m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE);
129   }
130}
131
132MC6845_UPDATE_ROW( hp16500_state::crtc_update_row )
133{
134   UINT32 *p = &bitmap.pix32(y);
135   int i, pos;
136
137   pos =  y * 144;
138
139   for (i = 0; i < x_count; i++)
140   {
141      *p++  = m_palette[m_vram[pos+0x00000]];
142      *p++  = m_palette[m_vram[pos+0x10000]];
143      *p++  = m_palette[m_vram[pos+0x20000]];
144      *p++  = m_palette[m_vram[pos+0x30000]];
145      pos++;
146      *p++  = m_palette[m_vram[pos+0x00000]];
147      *p++  = m_palette[m_vram[pos+0x10000]];
148      *p++  = m_palette[m_vram[pos+0x20000]];
149      *p++  = m_palette[m_vram[pos+0x30000]];
150      pos++;
151   }
152}
153
154MC6845_UPDATE_ROW( hp16500_state::crtc_update_row_1650 )
155{
156   UINT32 *p = &bitmap.pix32(y);
157   int i, pos;
158
159   pos =  y * 148;
160
161   for (i = 0; i < x_count; i++)
162   {
163      *p++  = m_palette[m_vram[pos+0x00000]];
164      *p++  = m_palette[m_vram[pos+0x10000]];
165      *p++  = m_palette[m_vram[pos+0x20000]];
166      *p++  = m_palette[m_vram[pos+0x30000]];
167      pos++;
168      *p++  = m_palette[m_vram[pos+0x00000]];
169      *p++  = m_palette[m_vram[pos+0x10000]];
170      *p++  = m_palette[m_vram[pos+0x20000]];
171      *p++  = m_palette[m_vram[pos+0x30000]];
172      pos++;
173   }
174}
175
176WRITE8_MEMBER(hp16500_state::pal_ctrl_w)
177{
178   m_clutoffs = data & 0xf;
179}
180
181
182WRITE8_MEMBER(hp16500_state::pal_r_w)
183{
184   m_colors[0] = (data<<4);
185   m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
186}
187
188WRITE8_MEMBER(hp16500_state::pal_g_w)
189{
190   m_colors[1] = (data<<4);
191   m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
192}
193
194WRITE8_MEMBER(hp16500_state::pal_b_w)
195{
196   m_colors[2] = (data<<4);
197   m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
198}
199
200WRITE16_MEMBER(hp16500_state::maskval_w)
201{
202   // by analogy with the string printer code from the 16500b, which
203   // appears to be a direct port...
204   m_val =  ((data>>8) & 0xff) ^ 0xff;
205   m_mask = (data & 0xff) ^ 0xff;
206}
207
208static ADDRESS_MAP_START(hp1650_map, AS_PROGRAM, 16, hp16500_state)
209   AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_REGION("bios", 0)
210
211   AM_RANGE(0x201000, 0x201001) AM_WRITE(maskval_w)
212
213   AM_RANGE(0x204000, 0x204001) AM_WRITE8(pal_ctrl_w, 0x00ff)
214   AM_RANGE(0x205000, 0x205001) AM_WRITE8(pal_r_w, 0x00ff)
215   AM_RANGE(0x206000, 0x206001) AM_WRITE8(pal_g_w, 0x00ff)
216   AM_RANGE(0x207000, 0x207001) AM_WRITE8(pal_b_w, 0x00ff)
217
218   AM_RANGE(0x20c000, 0x20c001) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, status_r, address_w, 0x00ff)
219   AM_RANGE(0x20c002, 0x20c003) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, register_r, register_w, 0x00ff)
220
221   AM_RANGE(0x20e000, 0x20e001) AM_READWRITE(vbl_ack16_r, vbl_ack16_w)
222
223   AM_RANGE(0x2050fe, 0x2050ff) AM_NOP
224   AM_RANGE(0x206000, 0x206001) AM_NOP
225   AM_RANGE(0x20f000, 0x20f001) AM_NOP
226
227   AM_RANGE(0x600000, 0x61ffff) AM_WRITE(vram_w)
228   AM_RANGE(0x600000, 0x67ffff) AM_READ8(vram_r, 0x00ff)
229
230   AM_RANGE(0x900000, 0x9fffff) AM_RAM
231ADDRESS_MAP_END
232
233// like 1650 but moves main RAM to match 16500a
234static ADDRESS_MAP_START(hp1651_map, AS_PROGRAM, 16, hp16500_state)
235   AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_REGION("bios", 0)
236
237   AM_RANGE(0x201000, 0x201001) AM_WRITE(maskval_w)
238
239   AM_RANGE(0x204000, 0x204001) AM_WRITE8(pal_ctrl_w, 0x00ff)
240   AM_RANGE(0x205000, 0x205001) AM_WRITE8(pal_r_w, 0x00ff)
241   AM_RANGE(0x206000, 0x206001) AM_WRITE8(pal_g_w, 0x00ff)
242   AM_RANGE(0x207000, 0x207001) AM_WRITE8(pal_b_w, 0x00ff)
243
244   AM_RANGE(0x20c000, 0x20c001) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, status_r, address_w, 0x00ff)
245   AM_RANGE(0x20c002, 0x20c003) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, register_r, register_w, 0x00ff)
246
247   AM_RANGE(0x20e000, 0x20e001) AM_READWRITE(vbl_ack16_r, vbl_ack16_w)
248
249   AM_RANGE(0x2050fe, 0x2050ff) AM_NOP
250   AM_RANGE(0x206000, 0x206001) AM_NOP
251   AM_RANGE(0x20f000, 0x20f001) AM_NOP
252
253   AM_RANGE(0x600000, 0x61ffff) AM_WRITE(vram_w)
254   AM_RANGE(0x600000, 0x67ffff) AM_READ8(vram_r, 0x00ff)
255
256   AM_RANGE(0x980000, 0xa7ffff) AM_RAM
257ADDRESS_MAP_END
258
259static ADDRESS_MAP_START(hp16500a_map, AS_PROGRAM, 16, hp16500_state)
260   AM_RANGE(0x000000, 0x00ffff) AM_ROM AM_REGION("bios", 0)
261
262   AM_RANGE(0x201000, 0x201001) AM_WRITE(maskval_w)
263
264   AM_RANGE(0x204000, 0x204001) AM_WRITE8(pal_ctrl_w, 0x00ff)
265   AM_RANGE(0x205000, 0x205001) AM_WRITE8(pal_r_w, 0x00ff)
266   AM_RANGE(0x206000, 0x206001) AM_WRITE8(pal_g_w, 0x00ff)
267   AM_RANGE(0x207000, 0x207001) AM_WRITE8(pal_b_w, 0x00ff)
268
269   AM_RANGE(0x20c000, 0x20c001) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, status_r, address_w, 0x00ff)
270   AM_RANGE(0x20c002, 0x20c003) AM_DEVREADWRITE8(CRTC_TAG, mc6845_device, register_r, register_w, 0x00ff)
271
272   AM_RANGE(0x20e000, 0x20e001) AM_READWRITE(vbl_ack16_r, vbl_ack16_w)
273
274   AM_RANGE(0x600000, 0x61ffff) AM_WRITE(vram_w)
275   AM_RANGE(0x600000, 0x67ffff) AM_READ8(vram_r, 0x00ff)
276
277   AM_RANGE(0x980000, 0xa7ffff) AM_RAM
278ADDRESS_MAP_END
279
280UINT32 hp16500_state::screen_update_hp16500a(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
281{
282   return 0;
283}
284
28566static ADDRESS_MAP_START(hp16500_map, AS_PROGRAM, 32, hp16500_state)
28667   AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("bios", 0)
28768   AM_RANGE(0x0020f000, 0x0020f003) AM_WRITE(palette_w)
r242703r242704
29071   AM_RANGE(0x00203000, 0x00203003) AM_WRITE(vbl_ack_w)
29172   AM_RANGE(0x00209800, 0x00209803) AM_READ(vbl_state_r)
29273
293   AM_RANGE(0x0020b800, 0x0020b8ff) AM_RAM // system ram test is really strange.
74   AM_RANGE(0x0020b800, 0x0020b8ff) AM_RAM   // system ram test is really strange.
29475
29576   AM_RANGE(0x00600000, 0x0061ffff) AM_WRITE16(vram_w, 0xffffffff)
29677   AM_RANGE(0x00600000, 0x0067ffff) AM_READ8  (vram_r, 0x00ff00ff)
r242703r242704
393174   return 0;
394175}
395176
396static MACHINE_CONFIG_START( hp1650, hp16500_state )
397   /* basic machine hardware */
398   MCFG_CPU_ADD(MAINCPU_TAG, M68000, 10000000)
399   MCFG_CPU_PROGRAM_MAP(hp1650_map)
400
401   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
402   MCFG_SCREEN_RAW_PARAMS(25000000, 0x330, 0, 0x250, 0x198, 0, 0x180 )
403   MCFG_SCREEN_UPDATE_DEVICE( CRTC_TAG, mc6845_device, screen_update )
404
405   MCFG_MC6845_ADD(CRTC_TAG, MC6845, SCREEN_TAG, 25000000/9)
406   MCFG_MC6845_SHOW_BORDER_AREA(false)
407   MCFG_MC6845_CHAR_WIDTH(8)
408   MCFG_MC6845_UPDATE_ROW_CB(hp16500_state, crtc_update_row_1650)
409   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(hp16500_state, vsync_changed))
410
411   MCFG_DEVICE_ADD(DUART_TAG, MC68681, 20000000)
412
413   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
414MACHINE_CONFIG_END
415
416static MACHINE_CONFIG_START( hp1651, hp16500_state )
417   /* basic machine hardware */
418   MCFG_CPU_ADD(MAINCPU_TAG, M68000, 10000000)
419   MCFG_CPU_PROGRAM_MAP(hp1651_map)
420
421   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
422   MCFG_SCREEN_RAW_PARAMS(25000000, 0x330, 0, 0x250, 0x198, 0, 0x180 )
423   MCFG_SCREEN_UPDATE_DEVICE( CRTC_TAG, mc6845_device, screen_update )
424
425   MCFG_MC6845_ADD(CRTC_TAG, MC6845, SCREEN_TAG, 25000000/9)
426   MCFG_MC6845_SHOW_BORDER_AREA(false)
427   MCFG_MC6845_CHAR_WIDTH(8)
428   MCFG_MC6845_UPDATE_ROW_CB(hp16500_state, crtc_update_row_1650)
429   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(hp16500_state, vsync_changed))
430
431   MCFG_DEVICE_ADD(DUART_TAG, MC68681, 20000000)
432
433   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
434MACHINE_CONFIG_END
435
436static MACHINE_CONFIG_START( hp16500a, hp16500_state )
437   /* basic machine hardware */
438   MCFG_CPU_ADD(MAINCPU_TAG, M68000, 10000000)
439   MCFG_CPU_PROGRAM_MAP(hp16500a_map)
440
441   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
442   MCFG_SCREEN_RAW_PARAMS(25000000, 0x320, 0, 0x240, 0x19c, 0, 0x170 )
443   MCFG_SCREEN_UPDATE_DEVICE( CRTC_TAG, mc6845_device, screen_update )
444
445   MCFG_MC6845_ADD(CRTC_TAG, MC6845, SCREEN_TAG, 25000000/9)
446   MCFG_MC6845_SHOW_BORDER_AREA(false)
447   MCFG_MC6845_CHAR_WIDTH(8)
448   MCFG_MC6845_UPDATE_ROW_CB(hp16500_state, crtc_update_row)
449   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(hp16500_state, vsync_changed))
450
451   MCFG_DEVICE_ADD(DUART_TAG, MC68681, 20000000)
452
453   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
454MACHINE_CONFIG_END
455
456177static MACHINE_CONFIG_START( hp16500, hp16500_state )
457178   /* basic machine hardware */
458   MCFG_CPU_ADD(MAINCPU_TAG, M68EC030, 25000000)
179   MCFG_CPU_ADD("maincpu", M68EC030, 25000000)
459180   MCFG_CPU_PROGRAM_MAP(hp16500_map)
460   MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, hp16500_state, vblank)
181   MCFG_CPU_VBLANK_INT_DRIVER("screen", hp16500_state, vblank)
461182
462   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
183   MCFG_SCREEN_ADD("screen", RASTER)
463184   MCFG_SCREEN_UPDATE_DRIVER(hp16500_state, screen_update_hp16500)
464185   MCFG_SCREEN_SIZE(576,384)
465186   MCFG_SCREEN_VISIBLE_AREA(0, 576-1, 0, 384-1)
466187   MCFG_SCREEN_REFRESH_RATE(60)
467188
468   MCFG_DEVICE_ADD(DUART_TAG, MC68681, 20000000)
469
470189   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
471190MACHINE_CONFIG_END
472191
473192static INPUT_PORTS_START( hp16500 )
474193INPUT_PORTS_END
475194
476ROM_START( hp1650b )
477   ROM_REGION16_BE(0x20000, "bios", 0)
478   ROM_LOAD16_BYTE( "la1.bin",      0x000000, 0x008000, CRC(7c60e334) SHA1(c3661e4bb58e0951e9c13208b4991f5d9dda633b) )
479   ROM_LOAD16_BYTE( "la2.bin",      0x000001, 0x008000, CRC(b0c6fe60) SHA1(a77b2e7098f26af93b0946abe6e89711b3332210) )
480ROM_END
481
482ROM_START( hp1651b )
483   ROM_REGION16_BE(0x20000, "bios", 0)
484   ROM_LOAD16_BYTE( "u102.bin",     0x000000, 0x008000, CRC(d7e1b091) SHA1(af813cc7ae748aedf1b1d9d522ee2154961315c2) )
485   ROM_LOAD16_BYTE( "u103.bin",     0x000001, 0x008000, CRC(f32a37c7) SHA1(8addda59923f64fd9b7e909eb0e3a17cc02bb70e) )
486ROM_END
487
488ROM_START( hp165ka0 )
489   ROM_REGION16_BE(0x20000, "bios", 0)
490   ROM_LOAD16_BYTE( "16500-80002.bin", 0x000000, 0x008000, CRC(0324b75a) SHA1(837855fce9288139226c914cc0c43061e25b57d2) )
491   ROM_LOAD16_BYTE( "16500-80001.bin", 0x000001, 0x008000, CRC(362c8cbf) SHA1(812b79d1a31d09ec632a6842b11548168d82b5e7) )
492ROM_END
493
494195ROM_START( hp16500b )
495196   ROM_REGION32_BE(0x20000, "bios", 0)
496   ROM_LOAD32_BYTE( "16500-80014.bin", 0x000000, 0x008000, CRC(35187716) SHA1(82067737892ecd356a5454a43d9ce9b38ac2397f) )
497   ROM_LOAD32_BYTE( "16500-80015.bin", 0x000001, 0x008000, CRC(d8d26c1c) SHA1(b5b956c17c9d6e54519a686b5e4aa733b266bf6f) )
498   ROM_LOAD32_BYTE( "16500-80016.bin", 0x000002, 0x008000, CRC(61457b39) SHA1(f209315ec22a8ee9d44a0ec009b1afb47794bece) )
499   ROM_LOAD32_BYTE( "16500-80017.bin", 0x000003, 0x008000, CRC(e0b1096b) SHA1(426bb9a4756d8087bded4f6b61365d733ffbb09a) )
197      ROM_LOAD32_BYTE( "16500-80014.bin", 0x000000, 0x008000, CRC(35187716) SHA1(82067737892ecd356a5454a43d9ce9b38ac2397f) )
198      ROM_LOAD32_BYTE( "16500-80015.bin", 0x000001, 0x008000, CRC(d8d26c1c) SHA1(b5b956c17c9d6e54519a686b5e4aa733b266bf6f) )
199      ROM_LOAD32_BYTE( "16500-80016.bin", 0x000002, 0x008000, CRC(61457b39) SHA1(f209315ec22a8ee9d44a0ec009b1afb47794bece) )
200      ROM_LOAD32_BYTE( "16500-80017.bin", 0x000003, 0x008000, CRC(e0b1096b) SHA1(426bb9a4756d8087bded4f6b61365d733ffbb09a) )
500201ROM_END
501202
502COMP( 1989, hp1650b,  0, 0, hp1650,  hp16500, driver_device, 0,  "Hewlett Packard", "HP 1650b", GAME_NOT_WORKING|GAME_NO_SOUND)
503COMP( 1989, hp1651b,  0, 0, hp1651,  hp16500, driver_device, 0,  "Hewlett Packard", "HP 1651b", GAME_NOT_WORKING|GAME_NO_SOUND)
504COMP( 1991, hp165ka0, 0, 0, hp16500a, hp16500, driver_device, 0, "Hewlett Packard", "HP 16500a", GAME_NOT_WORKING|GAME_NO_SOUND)
505COMP( 1991, hp16500b, 0, 0, hp16500, hp16500, driver_device, 0,  "Hewlett Packard", "HP 16500b", GAME_NOT_WORKING|GAME_NO_SOUND)
203COMP( 1994, hp16500b, 0, 0, hp16500, hp16500, driver_device, 0,  "Hewlett Packard", "HP 16500b", GAME_NOT_WORKING|GAME_NO_SOUND)
204
trunk/src/mess/drivers/hp9k_3xx.c
r242703r242704
11// license:BSD-3-Clause
22// copyright-holders:R. Belmont
33/***************************************************************************
4 
4 
55  hp9k3xx.c: preliminary driver for HP9000 300 Series (aka HP9000/3xx)
6
6
77  Currently supporting:
8
9  310:
10      MC68010 CPU @ 10 MHz
11      HP custom MMU
12
8 
139  320:
1410      MC68020 CPU @ 16.67 MHz
1511      HP custom MMU
1612      MC68881 FPU
17
13
1814  330:
1915     MC68020 CPU @ 16.67 MHz
2016     MC68851 MMU
2117     MC68881 FPU
22
23  340:
24      MC68030 CPU @ 16.67 MHz w/built-in MMU
25     MC68881 FPU
26
27  380:
28    MC68040 CPU @ 25 MHz w/built-in MMU and FPU
29
30  382:
31    MC68040 CPU @ 25? MHz w/built-in MMU and FPU
32   Built-in VGA compatible video
33
18 
3419  All models have an MC6840 PIT on IRQ6 clocked at 250 kHz.
35
20
3621  TODO:
3722    BBCADDR   0x420000
3823    RTC_DATA: 0x420001
r242703r242704
4227    KBDNMIST: 0x478005
4328    DMA:      0x500000
4429    FRAMEBUF: 0x560000
45
30
4631    6840:     0x5F8001/3/5/7/9, IRQ 6
47
32
4833****************************************************************************/
4934
5035#include "emu.h"
r242703r242704
6045   hp9k3xx_state(const machine_config &mconfig, device_type type, const char *tag)
6146      : driver_device(mconfig, type, tag),
6247      m_maincpu(*this, MAINCPU_TAG),
63      m_vram16(*this, "vram16"),
6448      m_vram(*this, "vram")
6549      { }
6650
6751   required_device<cpu_device> m_maincpu;
6852   virtual void machine_reset();
6953
70   optional_shared_ptr<UINT16> m_vram16;
7154   optional_shared_ptr<UINT32> m_vram;
7255
7356   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7457   UINT32 hp98544_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
75   UINT32 hp98544_16_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7658
77   DECLARE_READ16_MEMBER(buserror16_r);
78   DECLARE_WRITE16_MEMBER(buserror16_w);
7959   DECLARE_READ32_MEMBER(buserror_r);
8060   DECLARE_WRITE32_MEMBER(buserror_w);
8161
8262private:
83   bool m_in_buserr;
84   UINT32 m_last_buserr_pc;
8563};
8664
87UINT32 hp9k3xx_state::hp98544_16_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
88{
89   UINT32 *scanline;
90   int x, y;
91   UINT16 pixels;
92   UINT32 m_palette[2] = { 0x00000000, 0xffffffff };
93
94   for (y = 0; y < 768; y++)
95   {
96      scanline = &bitmap.pix32(y);
97      for (x = 0; x < 1024/2; x++)
98      {
99         pixels = m_vram16[(y * 512) + x];
100
101         *scanline++ = m_palette[(pixels>>8) & 1];
102         *scanline++ = m_palette[(pixels & 1)];
103      }
104   }
105
106   return 0;
107}
108
10965UINT32 hp9k3xx_state::hp98544_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
11066{
11167   UINT32 *scanline;
r242703r242704
13490static ADDRESS_MAP_START(hp9k3xx_common, AS_PROGRAM, 32, hp9k3xx_state)
13591   AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP   // writes to 1fffc are the LED
13692
137   AM_RANGE(0x00500000, 0x0050000f) AM_RAM   // this is sufficient to pass the DMA test for now
93   AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram")   // 98544 mono framebuffer
94   AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000)   // 98544 mono ROM
13895
13996   AM_RANGE(0x00510000, 0x00510003) AM_READWRITE(buserror_r, buserror_w)    // no "Alpha display"
14097   AM_RANGE(0x00538000, 0x00538003) AM_READWRITE(buserror_r, buserror_w)   // no "Graphics"
r242703r242704
14299   AM_RANGE(0x005f8000, 0x005f800f) AM_DEVREADWRITE8(PTM6840_TAG, ptm6840_device, read, write, 0x00ff00ff)
143100ADDRESS_MAP_END
144101
145// 9000/310 - has onboard video that the graphics card used in other 3xxes conflicts with
146static ADDRESS_MAP_START(hp9k310_map, AS_PROGRAM, 16, hp9k3xx_state)
147   AM_RANGE(0x000000, 0x01ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP   // writes to 1fffc are the LED
148
149   AM_RANGE(0x510000, 0x510003) AM_READWRITE(buserror16_r, buserror16_w)    // no "Alpha display"
150   AM_RANGE(0x538000, 0x538003) AM_READWRITE(buserror16_r, buserror16_w)   // no "Graphics"
151   AM_RANGE(0x5c0000, 0x5c0003) AM_READWRITE(buserror16_r, buserror16_w)   // no add-on FP coprocessor
152
153   AM_RANGE(0x5f8000, 0x5f800f) AM_DEVREADWRITE8(PTM6840_TAG, ptm6840_device, read, write, 0x00ff)
154
155   AM_RANGE(0x200000, 0x2fffff) AM_RAM AM_SHARE("vram16")   // 98544 mono framebuffer
156   AM_RANGE(0x560000, 0x563fff) AM_ROM AM_REGION("graphics", 0x0000)   // 98544 mono ROM
157
158   AM_RANGE(0x700000, 0x7fffff) AM_READWRITE(buserror16_r, buserror16_w)
159   AM_RANGE(0x800000, 0xffffff) AM_RAM
160ADDRESS_MAP_END
161
162102// 9000/320
163103static ADDRESS_MAP_START(hp9k320_map, AS_PROGRAM, 32, hp9k3xx_state)
164   AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram")   // 98544 mono framebuffer
165   AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000)   // 98544 mono ROM
166
167104   AM_RANGE(0xffe00000, 0xffefffff) AM_READWRITE(buserror_r, buserror_w)
168105   AM_RANGE(0xfff00000, 0xffffffff) AM_RAM
169106
170107   AM_IMPORT_FROM(hp9k3xx_common)
171108ADDRESS_MAP_END
172109
173// 9000/330 and 9000/340
174static ADDRESS_MAP_START(hp9k330_map, AS_PROGRAM, 32, hp9k3xx_state)
175   AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram")   // 98544 mono framebuffer
176   AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000)   // 98544 mono ROM
177110
111static ADDRESS_MAP_START(hp9k330_map, AS_PROGRAM, 32, hp9k3xx_state)
178112   AM_RANGE(0xffb00000, 0xffbfffff) AM_READWRITE(buserror_r, buserror_w)
179113   AM_RANGE(0xffc00000, 0xffffffff) AM_RAM
180114
181115   AM_IMPORT_FROM(hp9k3xx_common)
182116ADDRESS_MAP_END
183117
184// 9000/370 - 8 MB RAM standard
185static ADDRESS_MAP_START(hp9k370_map, AS_PROGRAM, 32, hp9k3xx_state)
186   AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram")   // 98544 mono framebuffer
187   AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000)   // 98544 mono ROM
188
189   AM_RANGE(0xff700000, 0xff7fffff) AM_READWRITE(buserror_r, buserror_w)
190   AM_RANGE(0xff800000, 0xffffffff) AM_RAM
191
192   AM_IMPORT_FROM(hp9k3xx_common)
193ADDRESS_MAP_END
194
195// 9000/382 - onboard VGA compatible video (where?)
196static ADDRESS_MAP_START(hp9k382_map, AS_PROGRAM, 32, hp9k3xx_state)
197   AM_RANGE(0xffb00000, 0xffbfffff) AM_READWRITE(buserror_r, buserror_w)
198   AM_RANGE(0xffc00000, 0xffffffff) AM_RAM
199
200   AM_IMPORT_FROM(hp9k3xx_common)
201ADDRESS_MAP_END
202
203118UINT32 hp9k3xx_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
204119{
205120   return 0;
r242703r242704
212127
213128void hp9k3xx_state::machine_reset()
214129{
215   m_in_buserr = false;
216   m_last_buserr_pc = 0;
217130}
218131
219READ16_MEMBER(hp9k3xx_state::buserror16_r)
220{
221   if (m_last_buserr_pc == space.device().safe_pc())
222   {
223      return 0;
224   }
225
226   if (!m_in_buserr)
227   {
228      m_in_buserr = true;
229      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
230      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
231      m_in_buserr = false;
232      m_last_buserr_pc = space.device().safe_pc();
233   }
234   return 0;
235}
236
237WRITE16_MEMBER(hp9k3xx_state::buserror16_w)
238{
239   if (m_last_buserr_pc == space.device().safe_pc())
240   {
241      return;
242   }
243
244   if (!m_in_buserr)
245   {
246      m_in_buserr = true;
247      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
248      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
249      m_in_buserr = false;
250      m_last_buserr_pc = space.device().safe_pc();
251   }
252}
253
254132READ32_MEMBER(hp9k3xx_state::buserror_r)
255133{
256   if (m_last_buserr_pc == space.device().safe_pc())
257   {
258      return 0;
259   }
260
261   if (!m_in_buserr)
262   {
263      m_in_buserr = true;
264      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
265      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
266      m_in_buserr = false;
267      m_last_buserr_pc = space.device().safe_pc();
268   }
134   m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
135   m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
269136   return 0;
270137}
271138
272139WRITE32_MEMBER(hp9k3xx_state::buserror_w)
273140{
274   if (m_last_buserr_pc == space.device().safe_pc())
275   {
276      return;
277   }
278
279   if (!m_in_buserr)
280   {
281      m_in_buserr = true;
282      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
283      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
284      m_in_buserr = false;
285      m_last_buserr_pc = space.device().safe_pc();
286   }
141   m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
142   m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
287143}
288144
289static MACHINE_CONFIG_START( hp9k310, hp9k3xx_state )
290   /* basic machine hardware */
291   MCFG_CPU_ADD(MAINCPU_TAG, M68010, 10000000)
292   MCFG_CPU_PROGRAM_MAP(hp9k310_map)
293
294   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
295   MCFG_PTM6840_INTERNAL_CLOCK(250000.0f)   // from oscillator module next to the 6840
296   MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
297
298   MCFG_SCREEN_ADD( "screen", RASTER)
299   MCFG_SCREEN_UPDATE_DRIVER(hp9k3xx_state, hp98544_16_update)
300   MCFG_SCREEN_SIZE(1024,768)
301   MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
302   MCFG_SCREEN_REFRESH_RATE(70)
303MACHINE_CONFIG_END
304
305145static MACHINE_CONFIG_START( hp9k320, hp9k3xx_state )
306146   /* basic machine hardware */
307   MCFG_CPU_ADD(MAINCPU_TAG, M68020FPU, 16670000)
147   MCFG_CPU_ADD(MAINCPU_TAG, M68020, 16670000)
308148   MCFG_CPU_PROGRAM_MAP(hp9k320_map)
309149
310150   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
r242703r242704
334174   MCFG_SCREEN_REFRESH_RATE(70)
335175MACHINE_CONFIG_END
336176
337static MACHINE_CONFIG_START( hp9k340, hp9k3xx_state )
338   /* basic machine hardware */
339   MCFG_CPU_ADD(MAINCPU_TAG, M68030, 16670000)
340   MCFG_CPU_PROGRAM_MAP(hp9k330_map)
341
342   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
343   MCFG_PTM6840_INTERNAL_CLOCK(250000.0f)   // from oscillator module next to the 6840
344   MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
345
346   MCFG_SCREEN_ADD( "screen", RASTER)
347   MCFG_SCREEN_UPDATE_DRIVER(hp9k3xx_state, hp98544_update)
348   MCFG_SCREEN_SIZE(1024,768)
349   MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
350   MCFG_SCREEN_REFRESH_RATE(70)
351MACHINE_CONFIG_END
352
353static MACHINE_CONFIG_START( hp9k370, hp9k3xx_state )
354   /* basic machine hardware */
355   MCFG_CPU_ADD(MAINCPU_TAG, M68030, 33000000)
356   MCFG_CPU_PROGRAM_MAP(hp9k370_map)
357
358   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
359   MCFG_PTM6840_INTERNAL_CLOCK(250000.0f)   // from oscillator module next to the 6840
360   MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
361
362   MCFG_SCREEN_ADD( "screen", RASTER)
363   MCFG_SCREEN_UPDATE_DRIVER(hp9k3xx_state, hp98544_update)
364   MCFG_SCREEN_SIZE(1024,768)
365   MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
366   MCFG_SCREEN_REFRESH_RATE(70)
367MACHINE_CONFIG_END
368
369static MACHINE_CONFIG_START( hp9k380, hp9k3xx_state )
370   /* basic machine hardware */
371   MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000)   // 25 MHz?  33?
372   MCFG_CPU_PROGRAM_MAP(hp9k330_map)
373
374   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
375   MCFG_PTM6840_INTERNAL_CLOCK(250000.0f)   // from oscillator module next to the 6840
376   MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
377
378   MCFG_SCREEN_ADD( "screen", RASTER)
379   MCFG_SCREEN_UPDATE_DRIVER(hp9k3xx_state, hp98544_update)
380   MCFG_SCREEN_SIZE(1024,768)
381   MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
382   MCFG_SCREEN_REFRESH_RATE(70)
383MACHINE_CONFIG_END
384
385static MACHINE_CONFIG_START( hp9k382, hp9k3xx_state )
386   /* basic machine hardware */
387   MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000)   // 25 MHz?  33?
388   MCFG_CPU_PROGRAM_MAP(hp9k382_map)
389
390   MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
391   MCFG_PTM6840_INTERNAL_CLOCK(250000.0f)   // from oscillator module next to the 6840
392   MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
393
394   MCFG_SCREEN_ADD( "screen", RASTER)
395   MCFG_SCREEN_UPDATE_DRIVER(hp9k3xx_state, screen_update)
396   MCFG_SCREEN_SIZE(1024,768)
397   MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1)
398   MCFG_SCREEN_REFRESH_RATE(70)
399MACHINE_CONFIG_END
400
401ROM_START( hp9k310 )
402   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
403   ROM_LOAD16_BYTE( "1818-3771.bin", 0x000001, 0x008000, CRC(b9e4e3ad) SHA1(ed6f1fad94a15d95362701dbe124b52877fc3ec4) )
404   ROM_LOAD16_BYTE( "1818-3772.bin", 0x000000, 0x008000, CRC(a3665919) SHA1(ec1bc7e5b7990a1b09af947a06401e8ed3cb0516) )
405
406   ROM_REGION( 0x800, "mcu", 0 )
407   ROM_LOAD( "1820-4784_1.bin", 0x000000, 0x000800, CRC(e929044a) SHA1(90849a10bdb8c6e38e73ce027c9c0ad8b3956b1b) )
408   ROM_LOAD( "1820-4784_2.bin", 0x000000, 0x000800, CRC(8defcf50) SHA1(d3abfea468a43db7c2369500a3e390e77a8e22e6) )
409
410   ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE )
411   ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000000, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
412ROM_END
413
414177ROM_START( hp9k320 )
415178   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
416179   ROM_LOAD16_BYTE( "5061-6538.bin", 0x000001, 0x004000, CRC(d6aafeb1) SHA1(88c6b0b2f504303cbbac0c496c26b85458ac5d63) )
r242703r242704
431194   ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
432195ROM_END
433196
434ROM_START( hp9k340 )
435   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
436   ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
437   ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
438
439   ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
440   ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
441ROM_END
442
443ROM_START( hp9k370 )
444   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
445   ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
446   ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
447
448   ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
449   ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
450ROM_END
451
452ROM_START( hp9k380 )
453   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
454   ROM_LOAD16_WORD_SWAP( "1818-5062_98754_9000-380_27c210.bin", 0x000000, 0x020000, CRC(500a0797) SHA1(4c0a3929e45202a2689e353657e5c4b58ff9a1fd) )
455
456   ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
457   ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
458ROM_END
459
460ROM_START( hp9k382 )
461   ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
462   ROM_LOAD16_WORD_SWAP( "1818-5468_27c1024.bin", 0x000000, 0x020000, CRC(d1d9ef13) SHA1(6bbb17b9adad402fbc516dc2f3143e9c38ceef8e) )
463
464   ROM_REGION( 0x2000, "unknown", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
465   ROM_LOAD( "1818-5282_8ce61e951207_28c64.bin", 0x000000, 0x002000, CRC(740442f3) SHA1(ab65bd4eec1024afb97fc2dd3bd3f017e90f49ae) )
466ROM_END
467
468/*    YEAR  NAME    PARENT   COMPAT  MACHINE   INPUT                 INIT    COMPANY          FULLNAME       FLAGS */
469COMP( 1985, hp9k310, 0,      0,      hp9k310,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/310", GAME_NOT_WORKING | GAME_NO_SOUND)
470COMP( 1985, hp9k320, 0,      0,      hp9k320,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/320", GAME_NOT_WORKING | GAME_NO_SOUND)
471COMP( 1987, hp9k330, 0,      0,      hp9k330,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/330", GAME_NOT_WORKING | GAME_NO_SOUND)
472COMP( 1989, hp9k340, hp9k330,0,      hp9k340,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/340", GAME_NOT_WORKING | GAME_NO_SOUND)
473COMP( 1988, hp9k370, hp9k330,0,      hp9k370,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/370", GAME_NOT_WORKING | GAME_NO_SOUND)
474COMP( 1991, hp9k380, 0,      0,      hp9k380,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/380", GAME_NOT_WORKING | GAME_NO_SOUND)
475COMP( 1991, hp9k382, 0,      0,      hp9k382,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/382", GAME_NOT_WORKING | GAME_NO_SOUND)
197/*    YEAR  NAME    PARENT  COMPAT  MACHINE   INPUT                 INIT    COMPANY          FULLNAME       FLAGS */
198COMP( 1985, hp9k320, 0,     0,      hp9k320,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/320", GAME_NOT_WORKING | GAME_NO_SOUND)
199COMP( 1987, hp9k330, 0,     0,      hp9k330,  hp9k330, driver_device, 0, "Hewlett-Packard", "HP9000/330", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/intv.c
r242703r242704
682682
683683TI    8S030N  1149-0360  0360.U58  32x8  Timing prom?
684684TI    8S030N  1149-0370  0370.U74  32x8  Timing prom?
685
685
686686GI    RO-3-9502-024       024.U60  2Kx10 Mask ROM+Addr Decoder, CP1600 code
687687GI    9316B-4D72         4D72.U62  2Kx8  Mask ROM, CP1600 code (upper)
688688GI    9316B-4D71         4D71.U63  2Kx8  Mask ROM, CP1600 code (lower)
r242703r242704
691691Main board also includes:
692692
693693    2  2114 DRAMS        1Kx4  Character memory
694    10 MM5290J DRAMS    16Kx10 CP1600 memory?
694    10 MM5290J DRAMS    16Kx10 CP1600 memory?     
695695    1  6502
696696    1  Mystery 40-pin chip (under heat sink)
697697       (actually a SMC CRT5027 aka TI TMS9927 CRT controller)
r242703r242704
715715
716716   ROM_REGION(0x0100,"proms",0)
717717   ROM_LOAD( "0360.u58", 0x00, 0x20, CRC(1295528a) SHA1(b35e598891f1185e02cbacb4811d2334357abd79))
718   ROM_LOAD( "0370.u74", 0x20, 0x20, CRC(19da5096) SHA1(76af50e4fd29649fc4837120c245321a8fc84cd3))
718   ROM_LOAD( "0370.u74", 0x20, 0x20, CRC(19da5096) SHA1(76af50e4fd29649fc4837120c245321a8fc84cd3))   
719719ROM_END
720720
721721DRIVER_INIT_MEMBER(intv_state,intv)
trunk/src/mess/drivers/leapster.c
r242703r242704
232232      return rand() | (rand()<<16); // there is a loop checking that this is above a certain value
233233   }
234234
235   DECLARE_WRITE32_MEMBER(leapster_aux004b_w)
236   {
237      printf("leapster_aux004b_w %04x\n", data);
238   }
239
240235protected:
241236   required_device<cpu_device> m_maincpu;
242237   required_device<generic_slot_device> m_cart;
r242703r242704
288283static ADDRESS_MAP_START( leapster_map, AS_PROGRAM, 32, leapster_state )
289284   AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_MIRROR(0x40000000) // pointers in the bios region seem to be to the 40xxxxxx region, either we mirror there or something (real bios?) is acutally missing
290285   AM_RANGE(0x0180D800, 0x0180D803) AM_READ(leapster_random_r)
291   AM_RANGE(0x03000000, 0x030007ff) AM_RAM // puts stack here, writes a pointer @ 0x03000000 on startup
292   AM_RANGE(0x3c000000, 0x3c1fffff) AM_RAM // really ram, or has our code execution gone wrong?
293//  AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present
286   AM_RANGE(0x03000000, 0x030007ff) AM_RAM // puts stack here, writes a pointer @ 0x03000000 on startup
287//   AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present
294288ADDRESS_MAP_END
295289
296static ADDRESS_MAP_START( leapster_aux, AS_IO, 32, leapster_state )
297   AM_RANGE(0x00000012c, 0x00000012f) AM_WRITE(leapster_aux004b_w) // this address isn't used by ARC internal stuff afaik, so probably leapster specific
298ADDRESS_MAP_END
299
300290static MACHINE_CONFIG_START( leapster, leapster_state )
301291   /* basic machine hardware */
302292   // CPU is ArcTangent-A5 '5.1' (ARCompact core)
303293   MCFG_CPU_ADD("maincpu", ARCA5, 96000000/10)
304294   MCFG_CPU_PROGRAM_MAP(leapster_map)
305   MCFG_CPU_IO_MAP(leapster_aux)
306295
296
307297   /* video hardware */
308298   MCFG_SCREEN_ADD("screen", LCD)
309299   MCFG_SCREEN_REFRESH_RATE(60)
r242703r242704
332322
333323DRIVER_INIT_MEMBER(leapster_state,leapster)
334324{
325
335326}
336327
337328CONS(2003,  leapster,    0,         0,  leapster,    leapster, leapster_state, leapster,    "LeapFrog",   "Leapster (Germany)",    GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IS_SKELETON )
trunk/src/mess/drivers/mac.c
r242703r242704
22202220
22212221
22222222ROM_START( macplus )
2223   ROM_REGION16_BE(0x40000, "bootrom", 0)
2224   ROM_SYSTEM_BIOS(0, "v3", "Loud Harmonicas")
2225   ROMX_LOAD( "macplus.rom",  0x00000, 0x20000, CRC(b2102e8e) SHA1(7d2f808a045aa3a1b242764f0e2c7d13e288bf1f), ROM_GROUPWORD | ROM_BIOS(1) )
2226   ROM_SYSTEM_BIOS(1, "v2", "Lonely Heifers")
2227   ROMX_LOAD( "23512-1007__342-0342-a.rom-lo.u7d", 0x000000, 0x010000, CRC(5aaa4a2f) SHA1(5dfbfbe279ddadfae691c95f552fd9db41e3ed90), ROM_SKIP(1) | ROM_BIOS(2) )
2228   ROMX_LOAD( "23512-1010__342-0341-b.rom-hi.u6d", 0x000001, 0x010000, CRC(65341487) SHA1(bf43fa4f5a3dcbbac20f1fe1deedee0895454379), ROM_SKIP(1) | ROM_BIOS(2) )
2229   ROM_SYSTEM_BIOS(2, "v1", "Lonely Hearts")
2230   ROMX_LOAD( "4d1eeee1 - macplus v1.rom", 0x000000, 0x020000, CRC(4fa5b399) SHA1(e0da7165b92dee90d8b1522429c033729fa73fd2), ROM_GROUPWORD | ROM_BIOS(3) )
2231   ROM_SYSTEM_BIOS(3, "romdisk", "mac68k.info self-boot (1/1/2015)")
2232   ROMX_LOAD( "modplus-harp2.bin", 0x000000, 0x028000, CRC(ba56078d) SHA1(debdf328ac73e1662d274a044d8750224f47edef), ROM_GROUPWORD | ROM_BIOS(4) )
2223   ROM_REGION16_BE(0x20000, "bootrom", 0)
2224   ROM_LOAD16_WORD( "macplus.rom",  0x00000, 0x20000, CRC(b2102e8e) SHA1(7d2f808a045aa3a1b242764f0e2c7d13e288bf1f))
22332225ROM_END
22342226
22352227
trunk/src/mess/drivers/mathmagi.c
r242703r242704
66  * TMS1100 MP1030 - MCU
77  * 2 x DS8870N - Hex LED Digit Driver
88  * 2 x DS8861N - MOS-to-LED 5-Segment Driver
9
9 
1010  This is a tabletop educational calculator. It came with plastic overlays
1111  for playing different kind of games. Refer to the manual on how to use it.
1212  In short, to start from scratch, press [SEL]. By default the device is in
1313  calculator teaching mode. If [SEL] is followed with 1-6 and then [NXT],
1414  one of the games is started.
15
15 
1616  1) Number Machine
1717  2) Countin' On
1818  3) Walk The Plank
r242703r242704
2424  TODO:
2525  - some of the led symbols are probably wrong, output PLA is unknown
2626  - microinstructions PLA is not verified
27
27 
2828***************************************************************************/
2929
3030#include "emu.h"
r242703r242704
102102         if (i >= 8)
103103            for (int j = 0; j < 8; j++)
104104               output_set_lamp_value(i*10 + j, m_o >> j & 1);
105
105         
106106         // R0-R7: 7seg leds
107107         else
108108            output_set_digit_value(i, m_o >> 1 & 0x7f);
trunk/src/mess/drivers/mbee.c
r242703r242704
1515    TeleTerm roms dumped by ejwords. The correct slots found by ubee512 author.
1616    Swedish roms dumped by nama. The correct slots found by ubee512 author.
1717
18    Please note: the rom version 1.31 which appears to fit the 256TC is actually
19    part of the Z80 emulation in the Matilda model. If you fit this rom into a real
20    256TC, the floppy disk will not be detected.
21
22    The unemulated Matilda is a IBM XT clone fitted with a NEC V40, and has the
23    ability to emulate the 256TC as mentioned above.
24
2518    Floppy Disk types (as used by ubee512)
2619    - ss80 - single sided 80 track
2720    - ds40 - double-sided 40 track - 400KB
r242703r242704
656649
657650static SLOT_INTERFACE_START( mbee_floppies )
658651   SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
659   SLOT_INTERFACE( "525dd", FLOPPY_525_QD )
660652SLOT_INTERFACE_END
661653
662654
r242703r242704
813805   MCFG_CPU_IO_MAP(mbee56_io)
814806   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee56 )
815807   MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) // divided by 2 externally, then divided by 2 internally (/ENMF pin not emulated)
816   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "525dd", mbee_state::floppy_formats)
808   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "35dd", mbee_state::floppy_formats)
817809   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "35dd", mbee_state::floppy_formats)
818810MACHINE_CONFIG_END
819811
r242703r242704
831823   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128 )
832824   MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4)
833825   MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbee_floppies, "35dd", mbee_state::floppy_formats)
834   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "525dd", mbee_state::floppy_formats)
826   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "35dd", mbee_state::floppy_formats)
835827MACHINE_CONFIG_END
836828
837829static MACHINE_CONFIG_DERIVED( mbee256, mbee128 )
r242703r242704
11631155   ROM_REGION(0x40000,"maincpu", ROMREGION_ERASEFF)
11641156
11651157   ROM_REGION(0x7000,"bootrom", ROMREGION_ERASEFF)
1166   ROM_SYSTEM_BIOS( 0, "1.20", "Version 1.20" )
1167   ROMX_LOAD("256tc_boot_1.20.rom", 0x0000,  0x4000, CRC(fe8d6a84) SHA1(a037a1b90b18a2180e9f5f216b829fcd480449a4), ROM_BIOS(1) )
1168   ROM_SYSTEM_BIOS( 1, "1.15", "Version 1.15" )
1169   ROMX_LOAD("256tc_boot_1.15.rom", 0x0000,  0x4000, CRC(1902062d) SHA1(e4a1c0b3f4996e313da0bac0edb6d34e3270723e), ROM_BIOS(2) )
1158   ROM_SYSTEM_BIOS( 0, "1.31", "Version 1.31" )
1159   ROMX_LOAD("256tc_boot_1.31.rom", 0x0000,  0x4000, CRC(923baef9) SHA1(3d30d18e765439fb913fbd3e03dd5127fd6b9167), ROM_BIOS(1) )
1160   ROM_SYSTEM_BIOS( 1, "1.20", "Version 1.20" )
1161   ROMX_LOAD("256tc_boot_1.20.rom", 0x0000,  0x4000, CRC(fe8d6a84) SHA1(a037a1b90b18a2180e9f5f216b829fcd480449a4), ROM_BIOS(2) )
1162   ROM_SYSTEM_BIOS( 2, "1.15", "Version 1.15" )
1163   ROMX_LOAD("256tc_boot_1.15.rom", 0x0000,  0x4000, CRC(1902062d) SHA1(e4a1c0b3f4996e313da0bac0edb6d34e3270723e), ROM_BIOS(3) )
11701164
11711165   ROM_REGION(0x9800, "gfx", 0)
11721166   ROM_LOAD("char256.bin",           0x1000,  0x1000, CRC(9372af3c) SHA1(a63591822c0504de2fed52e88d64e1dbd6124b74) )
trunk/src/mess/drivers/mc1502.c
r242703r242704
5151   key |= ioport("Y10")->read();
5252   key |= ioport("Y11")->read();
5353   key |= ioport("Y12")->read();
54//  DBG_LOG(1,"mc1502_k_s_c",("= %02X (%d) %s\n", key, m_kbd.pulsing,
55//      (key || m_kbd.pulsing) ? " will IRQ" : ""));
54//   DBG_LOG(1,"mc1502_k_s_c",("= %02X (%d) %s\n", key, m_kbd.pulsing,
55//       (key || m_kbd.pulsing) ? " will IRQ" : ""));
5656
5757   /*
5858      If a key is pressed and we're not pulsing yet, start pulsing the IRQ1;
r242703r242704
7373
7474WRITE8_MEMBER(mc1502_state::mc1502_ppi_portb_w)
7575{
76//  DBG_LOG(2,"mc1502_ppi_portb_w",("( %02X )\n", data));
76//   DBG_LOG(2,"mc1502_ppi_portb_w",("( %02X )\n", data));
7777   m_ppi_portb = data;
7878   m_pit8253->write_gate2(BIT(data, 0));
7979   mc1502_speaker_set_spkrdata(BIT(data, 1));
r242703r242704
8787// bit 3: i8251 SYNDET pin triggers NMI (default = 1 = no)
8888WRITE8_MEMBER(mc1502_state::mc1502_ppi_portc_w)
8989{
90//  DBG_LOG(2,"mc1502_ppi_portc_w",("( %02X )\n", data));
90//   DBG_LOG(2,"mc1502_ppi_portc_w",("( %02X )\n", data));
9191   m_ppi_portc = data & 15;
9292}
9393
r242703r242704
104104   data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 );
105105   data = ( data & ~0x10 ) | ( (BIT(m_ppi_portb, 1) && m_pit_out2) ? 0x10 : 0x00 );
106106
107//  DBG_LOG(2,"mc1502_ppi_portc_r",("= %02X (tap_val %f t2out %d) at %s\n",
108//      data, tap_val, m_pit_out2, machine().describe_context()));
107//   DBG_LOG(2,"mc1502_ppi_portc_r",("= %02X (tap_val %f t2out %d) at %s\n",
108//       data, tap_val, m_pit_out2, machine().describe_context()));
109109   return data;
110110}
111111
r242703r242704
126126   if (m_kbd.mask & 0x0400) { key |= ioport("Y11")->read(); }
127127   if (m_kbd.mask & 0x0800) { key |= ioport("Y12")->read(); }
128128   key ^= 0xff;
129//  DBG_LOG(2,"mc1502_kppi_porta_r",("= %02X\n", key));
129//   DBG_LOG(2,"mc1502_kppi_porta_r",("= %02X\n", key));
130130   return key;
131131}
132132
r242703r242704
138138      m_kbd.mask |= 1 << 11;
139139   else
140140      m_kbd.mask &= ~(1 << 11);
141//  DBG_LOG(2,"mc1502_kppi_portb_w",("( %02X -> %04X )\n", data, m_kbd.mask));
141//   DBG_LOG(2,"mc1502_kppi_portb_w",("( %02X -> %04X )\n", data, m_kbd.mask));
142142}
143143
144144WRITE8_MEMBER(mc1502_state::mc1502_kppi_portc_w)
145145{
146146   m_kbd.mask &= ~(7 << 8);
147147   m_kbd.mask |= ((data ^ 7) & 7) << 8;
148//  DBG_LOG(2,"mc1502_kppi_portc_w",("( %02X -> %04X )\n", data, m_kbd.mask));
148//   DBG_LOG(2,"mc1502_kppi_portc_w",("( %02X -> %04X )\n", data, m_kbd.mask));
149149}
150150
151151WRITE_LINE_MEMBER(mc1502_state::mc1502_i8251_syndet)
r242703r242704
326326MACHINE_CONFIG_END
327327
328328static MACHINE_CONFIG_DERIVED( pk88, mc1502 )
329   MCFG_CPU_MODIFY("maincpu")
329   MCFG_CPU_REPLACE("maincpu", I8088, XTAL_16MHz/3)
330330   MCFG_CPU_PROGRAM_MAP(pk88_map)
331   MCFG_CPU_IO_MAP(mc1502_io)
331332MACHINE_CONFIG_END
332333
333334
trunk/src/mess/drivers/megadriv.c
r242703r242704
769769
770770ROM_START( megacdj )
771771   ROM_REGION16_BE( 0x400000, "maincpu", ROMREGION_ERASE00 )
772   ROM_DEFAULT_BIOS("v100g")   // this seems the only revision where the cursor in CD menu works, allowing to boot games
772   ROM_DEFAULT_BIOS("v100g")   // this seems the only revision where the cursor in CD menu works, allowing to boot games
773773   /* Confirmed by ElBarto */
774774   ROM_SYSTEM_BIOS(0, "v100s", "v1.00S")
775775   ROMX_LOAD( "mpr-14088h.bin", 0x000000,  0x020000, CRC(3773d5aa) SHA1(bbf729a1aaa1667b783749299e1ad932aaf5f253), ROM_BIOS(1) | ROM_GROUPWORD | ROM_REVERSE)
r242703r242704
782782   /* Confirmed by ElBarto */
783783   ROM_SYSTEM_BIOS(3, "v100o", "v1.00O")
784784   ROMX_LOAD( "epr-14088d.bin", 0x000000,  0x020000, CRC(dfa95ee9) SHA1(e13666c76fa0a2e94e2f651b26b0fd625bf55f07), ROM_BIOS(4) | ROM_GROUPWORD | ROM_REVERSE)
785   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")   // CRC: e2e70bc8 when byteswapped
785   ROM_SYSTEM_BIOS(4, "v100p", "v1.00P")   // CRC: e2e70bc8 when byteswapped
786786   ROMX_LOAD( "epr-14088e.bin", 0x000000,  0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
787787ROM_END
788788
trunk/src/mess/drivers/merlin.c
r242703r242704
44
55  Parker Bros Merlin handheld computer game
66  * TMS1100NLL MP3404A-N2 (has internal ROM)
7
7 
88  To start a game, press NEW GAME, followed by a number:
99  1: Tic-Tac-Toe
1010  2: Music Machine
r242703r242704
1212  4: Blackjack 13
1313  5: Magic Square
1414  6: Mindbender
15
15 
1616  Refer to the official manual for more information on the games.
17
18
17 
18 
1919  Other handhelds assumed to be on similar hardware:
2020  - Dr. Smith - by Tomy, released in Japan (basically a white version of Merlin,
2121    let's assume for now that the ROM contents is identical)
2222  - Master Merlin
23
23 
2424  Another sequel, called Split Second, looks like different hardware.
2525
2626
r242703r242704
7575READ8_MEMBER(merlin_state::read_k)
7676{
7777   UINT8 k = 0;
78
78   
7979   // read selected button rows
8080   for (int i = 0; i < 4; i++)
8181      if (m_o >> i & 1)
trunk/src/mess/drivers/nes.c
r242703r242704
757757      slot->prgram_alloc(0x8000);
758758
759759      slot->pcb_start(machine(), m_ciram, FALSE);
760      slot->pcb_reg_postload(machine());
760761      m_ppu->space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(FUNC(device_nes_cart_interface::chr_r),(device_nes_cart_interface *)slot), write8_delegate(FUNC(device_nes_cart_interface::chr_w),(device_nes_cart_interface *)slot));
761762      m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(device_nes_cart_interface::nt_r),(device_nes_cart_interface *)slot), write8_delegate(FUNC(device_nes_cart_interface::nt_w),(device_nes_cart_interface *)slot));
762763      m_ppu->set_scanline_callback(ppu2c0x_scanline_delegate(FUNC(device_nes_cart_interface::scanline_irq),(device_nes_cart_interface *)slot));
r242703r242704
771772   m_ciram = auto_alloc_array(machine(), UINT8, 0x800);
772773   setup_ioports();
773774   setup_disk(m_disk);
774   state_register();
775775}
776776
777777MACHINE_RESET_MEMBER( nes_state, fds )
trunk/src/mess/drivers/ngen.c
r242703r242704
44
55    10-11-14 - Skeleton driver
66
7    Interrupts based on patents:
8    level 1 - SIO
9    level 3 - timer (from PIT, presumably channel 0? Patent says "channel 3")
10    level 4 - "interrupt detector" - keyboard, printer, RTC
11    level 7 - floppy/hard disk
7   Interrupts based on patents:
8   level 1 - SIO
9   level 3 - timer (from PIT, presumably channel 0? Patent says "channel 3")
10   level 4 - "interrupt detector" - keyboard, printer, RTC
11   level 7 - floppy/hard disk
1212
13    DMA channels:
14    channel 0 - communications (RS-232)
15    channel 1 - X-Bus expansion modules (except disk and graphics)
16    channel 2 - graphics?
17    channel 3 - hard disk
18
13   DMA channels:
14   channel 0 - communications (RS-232)
15   channel 1 - X-Bus expansion modules (except disk and graphics)
16   channel 2 - graphics?
17   channel 3 - hard disk
18   
1919    To get to "menu mode", press Space quickly after reset (might need good timing)
2020    The bootstrap ROM version number is displayed, along with "B,D,L,M,P,T:"
2121    You can press one of these keys for the following tests:
r242703r242704
3333    T: Type of Operating System
3434       Gives an "OS:" prompt, at which you can enter the number of the system image to
3535       load at the master workstation.
36
36       
3737    Panel Debugger:
3838    - Open/Modify RAM
3939    Enter an address (seg:off) followed by a forward-slash, the contents of this word will
4040    appear, you can enter a value to set it to, or just press Next (default: Enter) to leave
41    it as is.  It will then go on to the next word.  Pressing Return (scan code unknown
41    it as is.  It will then go on to the next word.  Pressing Return (scan code unknown
4242    currently) will return to the debugger prompt.
4343    - Open/Modify Register
4444    Enter the register only, and the contents will appear, you can leave it or alter it (you
4545    must enter all digits (eg: 0A03 if you're modifying DX) then press Return.
4646    - I/O to or from a port
47    Input: Address (segment is ignored, and not required) followed by I, a byte is read from
47    Input: Address (segment is ignored, and not required) followed by I, a byte is read from
4848    the port defined by the offset, and the byte is displayed.
4949    Output: Address followed by O, you are now prompted with an '='.  Enter the byte to send
5050    to the port, and press Return.
r242703r242704
5252    Enter an address (seg:off) followed by H.  Sets a haltpoint at the specified address.  Does
5353    not work for ROM addresses.  Only one allowed at a time.  Haltpoint info is stored at
5454    0000:01F0.  Uses a software interrupt (INT 7C), rather than INT 3.
55
55   
5656    To start or continue from the current address, enter P.
5757    To start from a specific address, enter the address (seg:off) followed by a G.
5858*/
r242703r242704
624624   MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd))
625625   MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen")
626626   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd))
627
627   
628628   MCFG_DEVICE_ADD("refresh_clock", CLOCK, 19200*16)  // should be 19530Hz
629629   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ngen_state,timer_clk_out))
630630
r242703r242704
662662   ROM_REGION( 0x2000, "bios", 0)
663663   ROM_LOAD16_BYTE( "72-00414_80186_cpu.bin",  0x000000, 0x001000, CRC(e1387a03) SHA1(ddca4eba67fbf8b731a8009c14f6b40edcbc3279) )  // bootstrap ROM v8.4
664664   ROM_LOAD16_BYTE( "72-00415_80186_cpu.bin",  0x000001, 0x001000, CRC(a6dde7d9) SHA1(b4d15c1bce31460ab5b92ff43a68c15ac5485816) )
665
665   
666666   ROM_REGION( 0x1000, "disk", 0)
667667   ROM_LOAD( "72-00422_10mb_disk.bin", 0x000000, 0x001000,  CRC(f5b046b6) SHA1(b303c6f6aa40504016de9826879bc316e44389aa) )
668
668   
669669   ROM_REGION( 0x20, "disk_prom", 0)
670670   ROM_LOAD( "72-00422_10mb_disk_15d.bin", 0x000000, 0x000020,  CRC(121ee494) SHA1(9a8d3c336cc7378a71f9d48c99f88515eb236fbf) )
671671ROM_END
trunk/src/mess/drivers/sage2.c
r242703r242704
171171   PORT_DIPNAME( 0x40, 0x00, "IEEE-488 LISTEN" ) PORT_DIPLOCATION("J6:7")
172172   PORT_DIPSETTING(    0x00, "Disabled" )
173173   PORT_DIPSETTING(    0x40, "Enabled" )
174   PORT_DIPNAME( 0x80, 0x00, "IEEE-488 Consecutive Addresses" ) PORT_DIPLOCATION("J6:8")
174   PORT_DIPNAME( 0x80, 0x00, "IEEE-488 Consecutive Adresses" ) PORT_DIPLOCATION("J6:8")
175175   PORT_DIPSETTING(    0x00, "1" )
176176   PORT_DIPSETTING(    0x80, "2" )
177177INPUT_PORTS_END
trunk/src/mess/drivers/sdk86.c
r242703r242704
99        22/06/2011 Working [Robbbert]
1010
1111    TODO:
12    Add optional 2x 8255A port read/write logging
12    Add 8251A for serial
13    Add optional 2x 8255A
1314
1415
1516
r242703r242704
1819There is no speaker or storage facility in the standard kit.
1920
2021Download the User Manual to get the operating procedures.
21The user manual is available from: http://www.bitsavers.org/pdf/intel/8086/9800698A_SDK-86_Users_Man_Apr79.pdf
2222
2323ToDo:
2424- Artwork
trunk/src/mess/drivers/simon.c
r242703r242704
33/***************************************************************************
44
55  Milton Bradley Simon
6
6 
77  Revision A hardware:
88  * TMS1000 (has internal ROM), DS75494 lamp driver
9
9 
1010  Newer revisions have a smaller 16-pin MB4850 chip instead of the TMS1000.
1111  This one has been decapped too, but we couldn't find an internal ROM.
1212  It is possibly a cost-reduced custom ASIC specifically for Simon.
13
13 
1414  Other games assumed to be on similar hardware:
1515  - Pocket Simon, but there's a chance it only exists with MB4850 chip
1616  - Super Simon (TMS1100)
r242703r242704
6161READ8_MEMBER(simon_state::read_k)
6262{
6363   UINT8 k = 0;
64
64   
6565   // read selected button rows
6666   for (int i = 0; i < 4; i++)
6767   {
r242703r242704
8282   // R7 -> 75494 IN2 -> blue lamp
8383   for (int i = 0; i < 4; i++)
8484      output_set_lamp_value(i, data >> (4 + i) & 1);
85
85   
8686   // R8 -> 75494 IN0 -> speaker
8787   m_speaker->level_w(data >> 8 & 1);
8888
trunk/src/mess/drivers/sms.c
r242703r242704
1313 To do:
1414
1515 - SIO interface for Game Gear (needs netplay, I guess)
16 - Gear to Gear Port SMS Controller Adaptor
1617 - Sega Demo Unit II (kiosk expansion device)
1718 - SMS Disk System (floppy disk drive expansion device) - unreleased
1819 - Rapid button of Japanese Master System
r242703r242704
2324 - Software compatibility flags, by region and/or BIOS
2425 - Emulate SRAM cartridges? (for use with Bock's dump tool)
2526 - Support for other DE-9 compatible controllers, like the Mega Drive 6-Button
26   that has homebrew software support
27   that has software support (at least a test tool made by Charles MacDonald)
2728
2829 The Game Gear SIO hardware is not emulated but has some
2930 placeholders in 'machine/sms.c'
r242703r242704
4647
4748--------------------------------------------------------------------------------
4849
49General compatibility issues on real hardware (not emulation bugs):
50
51- Some ROMs have issues or don't work when running on a console of different
52  region;
53- Many Japanese/Korean or homebrew ROMs don't have the signature required by
54  BIOSes of consoles sold overseas;
55- Paddle games need to detect the system region as Japanese to work with the
56  Paddle controller;
57- Few games of the ones with FM support need to detect the system region as
58  Japanese to play FM sound;
59- The Light Phaser gun doesn't work with the Japanese SMS;
60- There are reports about Light Phaser working on the second Korean console
61  version, and a Korean advert shows support on the first version (Gam*Boy I,
62  although based on Japanese SMS);
63- The Korean SMS versions have Japanese-format cartridge slot, but only on the
64  first (Gam*Boy I) the region is detected as Japanese;
65- Some SMS ROMs don't run when are plugged-in to SMS expansion slot, through
66  the gender adapter;
67- Some SMS ROMs don't run when are plugged-in to a Game Gear, through the
68  Master Gear adapter;
69
70--------------------------------------------------------------------------------
71
7250Sega Master System II
7351Sega 1990
7452
r242703r242704
360338   AM_RANGE(0x40, 0x7f)                 AM_DEVWRITE("gamegear", gamegear_device, write)
361339   AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, vram_read, vram_write)
362340   AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, register_read, register_write)
363   AM_RANGE(0xc0, 0xc0)                 AM_READ(sms_input_port_dc_r)
364   AM_RANGE(0xc1, 0xc1)                 AM_READ(sms_input_port_dd_r)
365   AM_RANGE(0xdc, 0xdc)                 AM_READ(sms_input_port_dc_r)
366   AM_RANGE(0xdd, 0xdd)                 AM_READ(sms_input_port_dd_r)
341   AM_RANGE(0xc0, 0xc0)                 AM_READ_PORT("GG_PORT_DC")
342   AM_RANGE(0xc1, 0xc1)                 AM_READ_PORT("GG_PORT_DD")
343   AM_RANGE(0xdc, 0xdc)                 AM_READ_PORT("GG_PORT_DC")
344   AM_RANGE(0xdd, 0xdd)                 AM_READ_PORT("GG_PORT_DD")
367345ADDRESS_MAP_END
368346
369347
r242703r242704
461439   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
462440   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
463441
442   PORT_START("GG_PORT_DD")
443   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
444
464445   PORT_START("START")
465446   PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
466447   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") /* Game Gear START */
r242703r242704
804785   MCFG_GG_CARTRIDGE_ADD("slot", gg_cart, NULL)
805786
806787   MCFG_SOFTWARE_LIST_ADD("cart_list", "gamegear")
807
808   MCFG_GG_GEAR2GEAR_PORT_ADD("gear2gear", gg_gear2gear_port_devices, NULL)
809   MCFG_GG_GEAR2GEAR_PORT_TH_INPUT_HANDLER(WRITELINE(sms_state, sms_ctrl2_th_input)) // not verified
810   //MCFG_GG_GEAR2GEAR_PORT_PIXEL_HANDLER(READ32(sms_state, sms_pixel_color)) // only for GG-TV mod
811788MACHINE_CONFIG_END
812789
813790
r242703r242704
986963   - Sega Mark III Soft Desk 10
987964   - Sega Shooting Zone
988965
989   The SMS Store Display Unit is labeled PD-W UNIT. Pictures found on Internet
990   show cartridges with a label where a not-for-sale message is written along
991   the information that it is for use on the Product Display-Working Unit.
992
993966***************************************************************************/
994967
995968/*    YEAR  NAME        PARENT      COMPAT  MACHINE      INPUT     CLASS           INIT      COMPANY     FULLNAME                            FLAGS */
trunk/src/mess/drivers/starwbc.c
r242703r242704
44
55  Kenner Star Wars - Electronic Battle Command
66  * TMS1100 MCU, labeled MP3438A
7
7 
88  This is a small tabletop space-dogfighting game. To start the game,
99  press BASIC/INTER/ADV and enter P#(number of players), then
1010  START TURN. Refer to the official manual for more information.
r242703r242704
4646   DECLARE_READ8_MEMBER(read_k);
4747   DECLARE_WRITE16_MEMBER(write_o);
4848   DECLARE_WRITE16_MEMBER(write_r);
49
49   
5050   TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
5151   void leds_update();
5252   void prepare_and_update();
r242703r242704
7171void starwbc_state::leds_update()
7272{
7373   UINT16 active_state[0x10];
74
74   
7575   for (int i = 0; i < 0x10; i++)
7676   {
7777      active_state[i] = 0;
78
78     
7979      for (int j = 0; j < 0x10; j++)
8080      {
8181         int di = j << 4 | i;
82
82         
8383         // turn on powered leds
8484         if (m_leds_state[i] >> j & 1)
8585            m_leds_decay[di] = LEDS_DECAY_TIME;
86
86         
8787         // determine active state
8888         int ds = (m_leds_decay[di] != 0) ? 1 : 0;
8989         active_state[i] |= (ds << j);
9090      }
9191   }
92
92   
9393   // on difference, send to output
9494   for (int i = 0; i < 0x10; i++)
9595      if (m_leds_cache[i] != active_state[i])
9696      {
9797         output_set_digit_value(i, active_state[i]);
98
98         
9999         for (int j = 0; j < 8; j++)
100100            output_set_lamp_value(i*10 + j, active_state[i] >> j & 1);
101101      }
102
102   
103103   memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
104104}
105105
r242703r242704
109109   for (int i = 0; i < 0x100; i++)
110110      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
111111         m_leds_decay[i]--;
112
112   
113113   leds_update();
114114}
115115
r242703r242704
117117{
118118   UINT8 o = (m_o << 4 & 0xf0) | (m_o >> 4 & 0x0f);
119119   const UINT8 mask[5] = { 0x30, 0xff, 0xff, 0x7f, 0x7f };
120
120   
121121   // R0,R2,R4,R6,R8
122122   for (int i = 0; i < 5; i++)
123123      m_leds_state[i*2] = (m_r >> (i*2) & 1) ? (o & mask[i]) : 0;
r242703r242704
155155   // R0,R1,R3,R5,R7: input mux
156156   // R9: piezo speaker
157157   m_speaker->level_w(data >> 9 & 1);
158
158   
159159   m_r = data;
160160   prepare_and_update();
161161}
r242703r242704
233233
234234   m_r = 0;
235235   m_o = 0;
236
236   
237237   // register for savestates
238238   save_item(NAME(m_leds_state));
239239   save_item(NAME(m_leds_cache));
r242703r242704
253253   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(starwbc_state, write_r))
254254
255255   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", starwbc_state, leds_decay_tick, attotime::from_msec(10))
256
256   
257257   MCFG_DEFAULT_LAYOUT(layout_starwbc)
258258
259259   /* no video! */
trunk/src/mess/drivers/stopthie.c
r242703r242704
44
55  Parker Brothers Stop Thief
66  * TMS0980NLL MP6101B (die labeled 0980B-01A)
7
7 
88  Stop Thief is actually a board game, the electronic device emulated here
99  (called Electronic Crime Scanner) is an accessory. To start a game, press
1010  the ON button. Otherwise, it is in test-mode where you can hear all sounds.
r242703r242704
7878void stopthief_state::leds_update()
7979{
8080   UINT16 active_state[0x10];
81
81   
8282   for (int i = 0; i < 0x10; i++)
8383   {
8484      active_state[i] = 0;
85
85     
8686      for (int j = 0; j < 0x10; j++)
8787      {
8888         int di = j << 4 | i;
89
89         
9090         // turn on powered leds
9191         if (m_leds_state[i] >> j & 1)
9292            m_leds_decay[di] = LEDS_DECAY_TIME;
93
93         
9494         // determine active state
9595         int ds = (m_power_on && m_leds_decay[di] != 0) ? 1 : 0;
9696         active_state[i] |= (ds << j);
9797      }
9898   }
99
99   
100100   // on difference, send to output
101101   for (int i = 0; i < 0x10; i++)
102102      if (m_leds_cache[i] != active_state[i])
103103         output_set_digit_value(i, active_state[i]);
104
104   
105105   memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
106106}
107107
r242703r242704
111111   for (int i = 0; i < 0x100; i++)
112112      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
113113         m_leds_decay[i]--;
114
114   
115115   leds_update();
116116}
117117
r242703r242704
145145   UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f;
146146   for (int i = 0; i < 3; i++)
147147      m_leds_state[i] = (data >> i & 1) ? o : 0;
148
148   
149149   leds_update();
150
150   
151151   // R3-R8: speaker on
152152   m_speaker->level_w((data & 0x1f8 && m_o & 8) ? 1 : 0);
153153}
r242703r242704
261261   MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(stopthief_state, auto_power_off))
262262
263263   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", stopthief_state, leds_decay_tick, attotime::from_msec(10))
264
264   
265265   MCFG_DEFAULT_LAYOUT(layout_stopthie)
266266
267267   /* no video! */
trunk/src/mess/drivers/super6.c
r242703r242704
367367WRITE8_MEMBER(super6_state::memory_write_byte)
368368{
369369   address_space& prog_space = m_maincpu->space(AS_PROGRAM);
370   prog_space.write_byte(offset, data);
370   return prog_space.write_byte(offset, data);
371371}
372372
373373READ8_MEMBER(super6_state::io_read_byte)
r242703r242704
379379WRITE8_MEMBER(super6_state::io_write_byte)
380380{
381381   address_space& prog_space = m_maincpu->space(AS_IO);
382   prog_space.write_byte(offset, data);
382   return prog_space.write_byte(offset, data);
383383}
384384
385385//-------------------------------------------------
r242703r242704
400400//-------------------------------------------------
401401
402402static SLOT_INTERFACE_START( super6_floppies )
403   SLOT_INTERFACE( "525dd", FLOPPY_525_QD )
403   SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
404404SLOT_INTERFACE_END
405405
406406WRITE_LINE_MEMBER( super6_state::fdc_intrq_w )
trunk/src/mess/drivers/tandy12.c
r242703r242704
44
55  Tandy Radio Shack Computerized Arcade (1981, 1982, 1995)
66  * TMS1100 CD7282SL
7
7 
88  This handheld contains 12 minigames. It looks and plays like "Fabulous Fred"
99  by the Japanese company Mego Corp. in 1980, which in turn is a mix of Merlin
1010  and Simon. Unlike Merlin and Simon, spin-offs like these were not successful.
1111  There were releases with and without the prefix "Tandy-12", I don't know
1212  which name was more common. Also not worth noting is that it needed five
1313  batteries; 4 C-cells and a 9-volt.
14
14 
1515  Some of the games require accessories included with the toy (eg. the Baseball
1616  game is played with a board representing the playing field). To start a game,
1717  hold the [SELECT] button, then press [START] when the game button lights up.
1818  As always, refer to the official manual for more information.
19
19 
2020  See below at the input defs for a list of the games.
2121
22
22 
2323  TODO:
2424  - output PLA is not verified
2525  - microinstructions PLA is not verified
r242703r242704
7070READ8_MEMBER(tandy12_state::read_k)
7171{
7272   UINT8 k = 0;
73
73   
7474   // read selected button rows
7575   for (int i = 0; i < 5; i++)
7676      if (m_r >> (i+5) & 1)
r242703r242704
114114
115115    [purple]1     [blue]5       [l-green]9
116116    ORGAN         TAG-IT        TREASURE HUNT
117
117   
118118    [l-orange]2   [turquoise]6  [red]10
119119    SONG WRITER   ROULETTE      COMPETE
120
120   
121121    [pink]3       [yellow]7     [violet]11
122122    REPEAT        BASEBALL      FIRE AWAY
123123
r242703r242704
180180   // these are certain
181181   0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
182182   0x80, 0x00, 0x00, 0x00, 0x00,
183
183   
184184   // rest is unused?
185185   0x00, 0x00, 0x00,
186186   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
trunk/src/mess/drivers/ticalc1x.c
r242703r242704
33/***************************************************************************
44
55  Texas Instruments TMS1xxx/0970/0980 handheld calculators (mostly single-chip)
6
6 
77  Refer to their official manuals on how to use them.
88
9
9 
1010  TODO:
1111  - MCU clocks are unknown
1212
r242703r242704
8585void ticalc1x_state::leds_update()
8686{
8787   UINT16 active_state[0x10];
88
88   
8989   for (int i = 0; i < 0x10; i++)
9090   {
9191      active_state[i] = 0;
92
92     
9393      for (int j = 0; j < 0x10; j++)
9494      {
9595         int di = j << 4 | i;
96
96         
9797         // turn on powered leds
9898         if (m_leds_state[i] >> j & 1)
9999            m_leds_decay[di] = LEDS_DECAY_TIME;
100
100         
101101         // determine active state
102102         int ds = (m_power_on && m_leds_decay[di] != 0) ? 1 : 0;
103103         active_state[i] |= (ds << j);
104104      }
105105   }
106
106   
107107   // on difference, send to output
108108   for (int i = 0; i < 0x10; i++)
109109      if (m_leds_cache[i] != active_state[i])
110110      {
111111         output_set_digit_value(i, active_state[i]);
112
112         
113113         for (int j = 0; j < 8; j++)
114114            output_set_lamp_value(i*10 + j, active_state[i] >> j & 1);
115115      }
r242703r242704
123123   for (int i = 0; i < 0x100; i++)
124124      if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
125125         m_leds_decay[i]--;
126
126   
127127   leds_update();
128128}
129129
r242703r242704
143143   for (int i = 0; i < 11; i++)
144144      if (m_r >> i & 1)
145145         m_leds_state[i] = m_o;
146
146   
147147   // exponent sign (not 100% sure this is correct)
148148   m_leds_state[11] = (m_leds_state[0] | m_leds_state[1]) ? 0x40 : 0;
149149
r242703r242704
169169   // R0-R10: input mux
170170   // R0-R10: select digit (right-to-left)
171171   m_r = data;
172
172   
173173   tisr16_leds_update();
174174}
175175
r242703r242704
233233   // note: 3rd digit is custom(not 7seg), for math symbols
234234   for (int i = 0; i < 9; i++)
235235      m_leds_state[i] = (data >> i & 1) ? m_o : 0;
236
236   
237237   // 6th digit only has A and G for =
238238   m_leds_state[3] &= 0x41;
239239
r242703r242704
272272   UINT8 o = BITSWAP8(m_o,7,5,2,1,4,0,6,3);
273273   for (int i = 0; i < 9; i++)
274274      m_leds_state[i] = (data >> i & 1) ? o : 0;
275
275   
276276   // 1st digit only has segments B,F,G,DP
277277   m_leds_state[0] &= 0xe2;
278278
trunk/src/mess/drivers/tispeak.c
r242703r242704
33/***************************************************************************
44
55  Texas Instruments Speak & Spell hardware
6
6 
77  (still need to write notes here..)
88
9  Other stuff on similar hardware:
10  - Language Tutor/Translator
11  - Touch & Tell, but it runs on a TMS1100!
12  - Speak & Spell Compact, Speak & Write (UK version), TMS1100? TMS0980?
13  - Speak & Read
14
159***************************************************************************/
1610
1711#include "emu.h"
r242703r242704
2418#include "tispeak.lh"
2519
2620// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
27// In an early 1979 Speak & Spell, C is 68pf, R is a 50kohm trimpot which is set to around 33.6kohm
28// (measured in-circuit). CPUCLK is this osc freq /2, ROMCLK is this osc freq /4.
21// C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4.
2922// The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency,
30// which is 640kHz for 8KHz according to the TMS5100 documentation.
23// which is 640kHz according to the TMS5100 documentation.
3124
3225#define MASTER_CLOCK (640000)
3326
r242703r242704
134127      // schedule delayed filament-off
135128      m_filoff_timer->adjust(attotime::from_msec(FILOFF_DECAY_TIME));
136129   }
137
130   
138131   // update digit state
139132   for (int i = 0; i < 9; i++)
140133      if (m_r >> i & 1)
r242703r242704
145138   {
146139      // standard led14seg
147140      output_set_digit_value(i, m_filament_on ? m_digit_state[i] & 0x3fff : 0);
148
141     
149142      // DP(display point) and AP(apostrophe) segments as lamps
150143      output_set_lamp_value(i*10 + 0, m_digit_state[i] >> 14 & m_filament_on);
151144      output_set_lamp_value(i*10 + 1, m_digit_state[i] >> 15 & m_filament_on);
r242703r242704
233226INPUT_CHANGED_MEMBER(tispeak_state::power_button)
234227{
235228   int on = (int)(FPTR)param;
236
229   
237230   if (on && !m_power_on)
238231   {
239232      m_power_on = 1;
r242703r242704
391384   save_item(NAME(m_o));
392385   save_item(NAME(m_filament_on));
393386   save_item(NAME(m_power_on));
394
387   
395388   // init cartridge
396389   if (m_cart != NULL && m_cart->exists())
397390   {
r242703r242704
442435   /* basic machine hardware */
443436   MCFG_CPU_MODIFY("maincpu")
444437   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
445
438   
446439   /* cartridge */
447440   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "snspell")
448441   MCFG_GENERIC_EXTENSIONS("vsm")
r242703r242704
461454
462455ROM_START( snspell )
463456   ROM_REGION( 0x1000, "maincpu", 0 )
464   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
457   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
465458
466459   ROM_REGION( 1246, "maincpu:ipla", 0 )
467460   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
r242703r242704
490483   ROM_LOAD( "cd2350a.vsm", 0x0000, 0x4000, CRC(2adda742) SHA1(3f868ed8284b723c815a30343057e03467c043b5) )
491484ROM_END
492485
493ROM_START( snspelluk )
486ROM_START( snspellp )
494487   ROM_REGION( 0x1000, "maincpu", 0 )
495   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
488   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
496489
497490   ROM_REGION( 1246, "maincpu:ipla", 0 )
498491   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
r242703r242704
502495   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
503496
504497   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
505   ROM_LOAD( "cd2303.vsm", 0x0000, 0x4000, CRC(0fae755c) SHA1(b68c3120a63a61db474feb5d71a6e5dd67910d80) )
506   ROM_LOAD( "cd2304.vsm", 0x4000, 0x4000, CRC(e2a270eb) SHA1(c13c95ad15f1923a4841f66504e0f22646e71d99) )
498   ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) )
499   ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) )
507500ROM_END
508501
509ROM_START( snspelluka )
502ROM_START( snspelluk )
510503   ROM_REGION( 0x1000, "maincpu", 0 )
511504   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
512505
513506   ROM_REGION( 1246, "maincpu:ipla", 0 )
514507   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
515508   ROM_REGION( 2127, "maincpu:mpla", 0 )
516   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
509   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271
517510   ROM_REGION( 1246, "maincpu:opla", 0 )
518511   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
519512
520   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
521   ROM_LOAD( "cd62175.vsm", 0x0000, 0x4000, CRC(6e1063d4) SHA1(b5c66c51148c5921ecb8ffccd7a460ae639cdb68) )
513   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
514   ROM_LOAD( "cd2303.vsm", 0x0000, 0x4000, CRC(0fae755c) SHA1(b68c3120a63a61db474feb5d71a6e5dd67910d80) )
515   ROM_LOAD( "cd2304.vsm", 0x4000, 0x4000, CRC(e2a270eb) SHA1(c13c95ad15f1923a4841f66504e0f22646e71d99) )
522516ROM_END
523517
524ROM_START( snspelljp )
518ROM_START( snspelluka )
525519   ROM_REGION( 0x1000, "maincpu", 0 )
526520   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
527521
528522   ROM_REGION( 1246, "maincpu:ipla", 0 )
529523   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
530524   ROM_REGION( 2127, "maincpu:mpla", 0 )
531   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271
525   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
532526   ROM_REGION( 1246, "maincpu:opla", 0 )
533527   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
534528
535   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
536   ROM_LOAD( "cd2321.vsm", 0x0000, 0x4000, CRC(ac010cce) SHA1(c0200d857b62be696248ac2d684a390c66ab0c31) )
537   ROM_LOAD( "cd2322.vsm", 0x4000, 0x4000, CRC(b6f4bba4) SHA1(65d686a9385b5ef3f080a5f47c6b2418bb9455b0) )
529   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
530   ROM_LOAD( "cd62175.vsm", 0x0000, 0x4000, CRC(6e1063d4) SHA1(b5c66c51148c5921ecb8ffccd7a460ae639cdb68) )
538531ROM_END
539532
540533ROM_START( ladictee )
r242703r242704
556549
557550ROM_START( snmath )
558551   ROM_REGION( 0x1000, "maincpu", 0 )
559   // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
560   // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
561   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
552   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have
562553
563554   ROM_REGION( 1246, "maincpu:ipla", 0 )
564555   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
565556   ROM_REGION( 2127, "maincpu:mpla", 0 )
566   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704
557   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
567558   ROM_REGION( 1246, "maincpu:opla", 0 )
568   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
559   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have
569560
570561   ROM_REGION( 0x8000, "tms6100", 0 )
571562   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
r242703r242704
591582   ROM_RELOAD(             0x7000, 0x1000 )
592583ROM_END
593584
585ROM_START( snmathp )
586   ROM_REGION( 0x1000, "maincpu", 0 )
587   // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
588   // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
589   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
594590
591   ROM_REGION( 1246, "maincpu:ipla", 0 )
592   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
593   ROM_REGION( 2127, "maincpu:mpla", 0 )
594   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704
595   ROM_REGION( 1246, "maincpu:opla", 0 )
596   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
595597
596COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
598   ROM_REGION( 0x8000, "tms6100", 0 )
599   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
600   ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) )
601ROM_END
602
603
604
605COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
597606COMP( 1980, snspella,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
607COMP( 1978, snspellp,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND )
598608COMP( 1978, snspelluk,  snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
599609COMP( 1981, snspelluka, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
600COMP( 1979, snspelljp,  snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (Japan)",       GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
601COMP( 1980, ladictee,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work due to missing CD2702 MCU dump, German version has CD2702 too
610COMP( 1980, ladictee,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work, custom MCU ROM?
602611
603COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
612COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
604613COMP( 1986, snmatha,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
614COMP( 1980, snmathp,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND )
trunk/src/mess/drivers/trs80.c
r242703r242704
55
660000-2fff ROM                 R   D0-D7
773000-37ff ROM on Model III        R   D0-D7
8      unused on Model I
8          unused on Model I
9937de      UART status             R/W D0-D7
101037df      UART data           R/W D0-D7
111137e0      interrupt latch address (lnw80 = for the realtime clock)
r242703r242704
161637e5      select disk drive 2         W
171737e7      select disk drive 3         W
181837e0-37e3 floppy motor            W   D0-D3
19      or floppy head select   W   D3
19          or floppy head select   W   D3
202037e8      send a byte to printer          W   D0-D7
212137e8      read printer status             R   D7
222237ec-37ef FDC WD179x              R/W D0-D7
r242703r242704
4242Due to the above, the only working emulated UART is for the Model 3.
4343
4444Cassette baud rates:    Model I level I - 250 baud
45        Model I level II and all clones - 500 baud
46        Model III/4 - 500 and 1500 baud selectable at boot time
47        - When it says "Cass?" press L for 500 baud, or Enter otherwise.
48        LNW-80 - 500 baud @1.77MHz and 1000 baud @4MHz.
45            Model I level II and all clones - 500 baud
46            Model III/4 - 500 and 1500 baud selectable at boot time
47            - When it says "Cass?" press L for 500 baud, or Enter otherwise.
48            LNW-80 - 500 baud @1.77MHz and 1000 baud @4MHz.
4949
5050I/O ports
5151FF:
r242703r242704
9292    - 80-8F hires graphics (optional)
9393
9494About the ht1080z - This was made for schools in Hungary. Each comes with a BASIC extension roms
95    which activated Hungarian features. To activate - start emulation - enter SYSTEM
96    Enter /12288 and the extensions will be installed and you are returned to READY.
97    The ht1080z is identical to the System 80, apart from the character rom.
98    The ht1080z2 has a modified extension rom and character generator.
95        which activated Hungarian features. To activate - start emulation - enter SYSTEM
96        Enter /12288 and the extensions will be installed and you are returned to READY.
97        The ht1080z is identical to the System 80, apart from the character rom.
98        The ht1080z2 has a modified extension rom and character generator.
9999
100100About the RTC - The time is incremented while ever the cursor is flashing. It is stored in a series
101    of bytes in the computer's work area. The bytes are in a certain order, this is:
102    seconds, minutes, hours, year, day, month. On a model 1, the seconds are stored at
103    0x4041, while on the model 4 it is 0x4217. A reboot always sets the time to zero.
101        of bytes in the computer's work area. The bytes are in a certain order, this is:
102        seconds, minutes, hours, year, day, month. On a model 1, the seconds are stored at
103        0x4041, while on the model 4 it is 0x4217. A reboot always sets the time to zero.
104104
105105Model 4 memory organisation -
106    Mode 0: ROM=0-37E7 and 37EA-3FFF; Printer=37E8-37E9; Keyboard=3800-3BFF; Video=3C00-3FFF
107    Mode 1: Keyboard and Video as above; 0-3FFF read=ROM and write=RAM
108    Mode 2: Keyboard=F400-F7FF; Video=F800-FFFF; the rest is RAM
109    Mode 3: All RAM
110    In the "maincpu" memory map, the first 64k is given to the ROM, keyboard, printer and video,
111        while the second 64k is RAM that is switched in as needed. The area from 4800-FFFF
112        is considered a "black hole", any writes to there will disappear.
113    The video is organised as 2 banks of 0x400 bytes, except in Mode 2 where it becomes contiguous.
106        Mode 0: ROM=0-37E7 and 37EA-3FFF; Printer=37E8-37E9; Keyboard=3800-3BFF; Video=3C00-3FFF
107        Mode 1: Keyboard and Video as above; 0-3FFF read=ROM and write=RAM
108        Mode 2: Keyboard=F400-F7FF; Video=F800-FFFF; the rest is RAM
109        Mode 3: All RAM
110        In the "maincpu" memory map, the first 64k is given to the ROM, keyboard, printer and video,
111            while the second 64k is RAM that is switched in as needed. The area from 4800-FFFF
112            is considered a "black hole", any writes to there will disappear.
113        The video is organised as 2 banks of 0x400 bytes, except in Mode 2 where it becomes contiguous.
114114
115115Model 4P - is the same as Model 4 except:
116    - ROM is only 0000-0FFF, while 1000-37FF is given over to RAM
117    - There is no cassette support in hardware.
116        - ROM is only 0000-0FFF, while 1000-37FF is given over to RAM
117        - There is no cassette support in hardware.
118118
119119***************************************************************************
120120
trunk/src/mess/drivers/unk3403.c
r242703r242704
1// license:BSD-3-Clause
2// copyright-holders:hap
3/***************************************************************************
4
5  TMS1100NLL MP3403 DBS 7836 SINGAPORE some game board with 7-segs.
6
7  What old electronic game is this?
8
9  some clues:
10  - it's from 1978
11  - Merlin is MP3404, Amaze-A-Tron is MP3405, this one is MP3403
12  - it plays some short jingles (you need to be lucky with button mashing),
13    jingles feel like maybe a horse racing game
14
15***************************************************************************/
16
17#include "emu.h"
18#include "cpu/tms0980/tms0980.h"
19#include "sound/speaker.h"
20
21// master clock is unknown, the value below is an approximation
22#define MASTER_CLOCK (350000)
23
24
25class unk3403_state : public driver_device
26{
27public:
28   unk3403_state(const machine_config &mconfig, device_type type, const char *tag)
29      : driver_device(mconfig, type, tag),
30      m_maincpu(*this, "maincpu"),
31      m_button_matrix(*this, "IN"),
32      m_speaker(*this, "speaker")
33   { }
34
35   required_device<cpu_device> m_maincpu;
36   required_ioport_array<4> m_button_matrix;
37   required_device<speaker_sound_device> m_speaker;
38
39   UINT16 m_r;
40   UINT16 m_o;
41
42   DECLARE_READ8_MEMBER(read_k);
43   DECLARE_WRITE16_MEMBER(write_o);
44   DECLARE_WRITE16_MEMBER(write_r);
45
46   void leds_update();
47
48   virtual void machine_start();
49};
50
51
52
53/***************************************************************************
54
55  I/O
56
57***************************************************************************/
58
59void unk3403_state::leds_update()
60{
61   // show debug clues
62   static UINT8 leds[0x10] = { 0 };
63   char msg[0x100] = { 0 };
64   char dig[0x100] = { 0 };
65   sprintf(msg, "R,  *R,  O[R]");
66
67   for (int i = 0; i < 11; i++)
68   {
69      if (m_r >> i & 1)
70      {
71         leds[i]=m_o;
72      }
73      sprintf(dig, "\n  %X   %c   %02X",i, (m_r >> i & 1) ? 'X' : '_', leds[i]);
74      strcat(msg, dig);
75   }
76
77   popmessage("%s", msg);
78}
79
80READ8_MEMBER(unk3403_state::read_k)
81{
82   UINT8 k = 0;
83
84   // read selected button rows
85   for (int i = 0; i < 4; i++)
86   {
87      if (m_r >> (i + 4) & 1)
88         k |= m_button_matrix[i]->read();
89   }
90
91   return k;
92}
93
94WRITE16_MEMBER(unk3403_state::write_r)
95{
96   // R4-R7: input mux
97   // R10: maybe a switch or other button row?
98   // R9: speaker out
99   m_speaker->level_w(data >> 9 & 1);
100
101   // others: ?
102   m_r = data;
103   leds_update();
104}
105
106WRITE16_MEMBER(unk3403_state::write_o)
107{
108   // ?
109   m_o = data;
110   leds_update();
111}
112
113
114
115/***************************************************************************
116
117  Inputs
118
119***************************************************************************/
120
121static INPUT_PORTS_START( unk3403 )
122   PORT_START("IN.0") // R4
123   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)
124   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)
125   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)
126   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)
127
128   PORT_START("IN.1") // R5
129   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)
130   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)
131   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E)
132   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R)
133
134   PORT_START("IN.2") // R6
135   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A)
136   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S)
137   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D)
138   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) // reset/newgame?
139
140   PORT_START("IN.3") // R7
141   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)
142   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X)
143   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C)
144   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V)
145INPUT_PORTS_END
146
147
148
149/***************************************************************************
150
151  Machine Config
152
153***************************************************************************/
154
155void unk3403_state::machine_start()
156{
157   m_r = 0;
158   m_o = 0;
159
160   save_item(NAME(m_r));
161   save_item(NAME(m_o));
162}
163
164
165static const UINT16 unk3403_output_pla[0x20] =
166{
167   /* O output PLA configuration currently unknown */
168   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
169   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
170   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
171   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
172};
173
174
175static MACHINE_CONFIG_START( unk3403, unk3403_state )
176
177   /* basic machine hardware */
178   MCFG_CPU_ADD("maincpu", TMS1100, MASTER_CLOCK)
179   MCFG_TMS1XXX_OUTPUT_PLA(unk3403_output_pla)
180   MCFG_TMS1XXX_READ_K_CB(READ8(unk3403_state, read_k))
181   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(unk3403_state, write_o))
182   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(unk3403_state, write_r))
183
184   /* no video! */
185
186   /* sound hardware */
187   MCFG_SPEAKER_STANDARD_MONO("mono")
188   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
189   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
190MACHINE_CONFIG_END
191
192
193
194/***************************************************************************
195
196  Game driver(s)
197
198***************************************************************************/
199
200ROM_START( unk3403 )
201   ROM_REGION( 0x0800, "maincpu", 0 )
202   ROM_LOAD( "tms1100nll_mp3403", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
203
204   ROM_REGION( 867, "maincpu:mpla", 0 )
205   ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
206   ROM_REGION( 365, "maincpu:opla", 0 )
207   ROM_LOAD( "tms1100_xxx_opla.pla", 0, 365, NO_DUMP )
208ROM_END
209
210
211CONS( 1978, unk3403, 0, 0, unk3403, unk3403, driver_device, 0, "<unknown>", "unknown TMS1100 electronic game", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
trunk/src/mess/drivers/victor9k.c
r242703r242704
1414    TODO:
1515
1616    - keyboard
17    - expansion bus
18        - Z80 card
19        - Winchester DMA card (Xebec S1410 + Tandon TM502/TM603SE)
20        - RAM cards
21        - clock cards
17   - expansion bus
18      - Z80 card
19      - Winchester DMA card (Xebec S1410 + Tandon TM502/TM603SE)
20      - RAM cards
21      - clock cards
2222    - floppy 8048
2323    - hires graphics
2424    - brightness/contrast
trunk/src/mess/drivers/vt240.c
r242703r242704
205205   MCFG_T11_INITIAL_MODE(5 << 13)
206206
207207/*
208    MCFG_CPU_ADD("charcpu", I8085A, XTAL_16MHz / 4)
209    MCFG_CPU_PROGRAM_MAP(vt240_char_mem)
210    MCFG_CPU_IO_MAP(vt240_char_io)
211    MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
208   MCFG_CPU_ADD("charcpu", I8085A, XTAL_16MHz / 4)
209   MCFG_CPU_PROGRAM_MAP(vt240_char_mem)
210   MCFG_CPU_IO_MAP(vt240_char_io)
211   MCFG_CPU_VBLANK_INT_DRIVER("screen", vt240_state, vt240_irq)
212212*/
213213
214214   MCFG_SCREEN_ADD("screen", RASTER)
r242703r242704
216216   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
217217   MCFG_SCREEN_SIZE(640, 480)
218218   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
219//  MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
219//   MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240)
220220   MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
221221   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
222222   MCFG_GFXDECODE_ADD("gfxdecode", "palette", vt240)
r242703r242704
226226   MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(vt240_state, hgdc_draw_text)
227227
228228   MCFG_MC68681_ADD("duart", XTAL_3_6864MHz) /* 2681 duart (not 68681!) */
229//  MCFG_MC68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
229//   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
230230   MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
231//  MCFG_MC68681_B_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
232//  MCFG_MC68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
233//  MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
234//  MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
235//  MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
231//   MCFG_MC68681_B_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
232//   MCFG_MC68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
233//   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
234//   MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
235//   MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
236236
237237   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "null_modem")
238238   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duart", mc68681_device, rx_a_w))
239//  MCFG_RS232_DSR_HANDLER(DEVWRITELINE("duart", mc68681_device, ipX_w))
239//   MCFG_RS232_DSR_HANDLER(DEVWRITELINE("duart", mc68681_device, ipX_w))
240240MACHINE_CONFIG_END
241241
242242static MACHINE_CONFIG_START( mc7105, vt240_state )
r242703r242704
244244
245245   // serial connection to MS7004 keyboard
246246   MCFG_DEVICE_ADD("i8251", I8251, 0)
247//  MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
247//   MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
248248
249249   MCFG_DEVICE_ADD("ms7004", MS7004, 0)
250250   MCFG_MS7004_TX_HANDLER(DEVWRITELINE("i8251", i8251_device, write_rxd))
trunk/src/mess/includes/aquarius.h
r242703r242704
99
1010#include "emu.h"
1111#include "cpu/z80/z80.h"
12#include "video/tea1002.h"
1312#include "imagedev/cassette.h"
1413#include "machine/ram.h"
1514#include "sound/ay8910.h"
r242703r242704
3938         m_y7(*this, "Y7"),
4039         m_gfxdecode(*this, "gfxdecode"),
4140         m_screen(*this, "screen"),
42         m_tea1002(*this, "encoder"),
4341         m_palette(*this, "palette")
4442   { }
4543
r242703r242704
6058   required_ioport m_y7;
6159   required_device<gfxdecode_device> m_gfxdecode;
6260   required_device<screen_device> m_screen;
63   required_device<tea1002_device> m_tea1002;
6461   required_device<palette_device> m_palette;
6562
6663   UINT8 m_scrambler;
trunk/src/mess/includes/sms.h
r242703r242704
1919#define CONTROL1_TAG   "ctrl1"
2020#define CONTROL2_TAG   "ctrl2"
2121
22#include "bus/gamegear/gear2gear.h"
2322#include "bus/sms_ctrl/smsctrl.h"
2423#include "bus/sms_exp/smsexp.h"
2524#include "bus/sega8/sega8_slot.h"
r242703r242704
3736      m_region_maincpu(*this, "maincpu"),
3837      m_port_ctrl1(*this, CONTROL1_TAG),
3938      m_port_ctrl2(*this, CONTROL2_TAG),
40      m_port_gear2gear(*this, "gear2gear"),
41      m_port_gg_dc(*this, "GG_PORT_DC"),
4239      m_port_pause(*this, "PAUSE"),
4340      m_port_reset(*this, "RESET"),
4441      m_port_start(*this, "START"),
r242703r242704
6663   required_memory_region m_region_maincpu;
6764   optional_device<sms_control_port_device> m_port_ctrl1;
6865   optional_device<sms_control_port_device> m_port_ctrl2;
69   optional_device<gg_gear2gear_port_device> m_port_gear2gear;
70   optional_ioport m_port_gg_dc;
7166   optional_ioport m_port_pause;
7267   optional_ioport m_port_reset;
7368   optional_ioport m_port_start;
r242703r242704
200195   void setup_media_slots();
201196   void setup_enabled_slots();
202197   void lphaser_hcount_latch();
203   void sms_get_inputs();
198   void sms_get_inputs(address_space &space);
204199};
205200
206201class smssdisp_state : public sms_state
trunk/src/mess/includes/victor9k.h
r242703r242704
4848#define RS232_A_TAG     "rs232a"
4949#define RS232_B_TAG     "rs232b"
5050#define SCREEN_TAG      "screen"
51#define KB_TAG          "kb"
51#define KB_TAG         "kb"
5252#define FDC_TAG         "fdc"
5353
5454class victor9k_state : public driver_device
trunk/src/mess/layout/amaztron.lay
r242703r242704
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="digit" defstate="0">
7      <led7seg><color red="1.0" green="0.2" blue="0.2" /></led7seg>
8   </element>
9
10   <element name="lamp_red" defstate="0">
11      <disk state="0"><color red="0.2" green="0.04" blue="0.04" /></disk>
12      <disk state="1"><color red="1.0" green="0.2" blue="0.2" /></disk>
13   </element>
14   <element name="lamp_green" defstate="0">
15      <disk state="0"><color red="0.04" green="0.2" blue="0.04" /></disk>
16      <disk state="1"><color red="0.2" green="1.0" blue="0.2" /></disk>
17   </element>
18
19
20
21<!-- build screen -->
22
23   <view name="Internal Layout">
24      <bounds left="0" right="50" top="0" bottom="15" />
25
26      <bezel name="lamp0" element="lamp_red"><bounds x="3.5" y="6" width="3" height="3" /></bezel>
27      <bezel name="lamp1" element="lamp_green"><bounds x="13.5" y="6" width="3" height="3" /></bezel>
28
29      <bezel name="digit1" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
30      <bezel name="digit0" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel>
31
32   </view>
33</mamelayout>
trunk/src/mess/layout/starwbc.lay
r242703r242704
5050
5151   <view name="Internal Layout">
5252      <bounds left="0" right="165" top="0" bottom="105" />
53
53     
5454      <bezel element="static_yellow"><bounds x="3" y="17" width="10" height="83" /></bezel>
5555      <bezel element="static_black"><bounds x="4" y="18" width="8" height="81" /></bezel>
5656
r242703r242704
7575      <bezel element="text_3"><bounds x="64.5" y="4" width="8" height="8" /></bezel>
7676      <bezel element="text_4"><bounds x="84.5" y="4" width="8" height="8" /></bezel>
7777
78
78     
7979   <!-- lamp matrix -->
80
80     
8181      <bezel element="static_gray"><bounds x="17" y="17" width="83" height="83" /></bezel>
8282
8383      <bezel name="lamp20" element="lamp"><bounds x="20" y="20" width="17" height="17" /></bezel>
trunk/src/mess/machine/gamecom.c
r242703r242704
500500         UINT16 dest_addr = m_dma.dest_current & m_dma.dest_mask;
501501         UINT8 dest_adj = (3 - (m_dma.dest_x_current & 3)) << 1;
502502         UINT8 src_adj = (3 - (m_dma.source_x_current & 3)) << 1;
503
503         
504504         /* handle DMA for 1 pixel */
505505         // Get new pixel
506506         UINT8 source_pixel = (m_dma.source_bank[src_addr] >> src_adj) & 3;
trunk/src/mess/machine/mac.c
r242703r242704
725725      if (LOG_KEYBOARD)
726726         logerror("keyboard command : inquiry\n");
727727
728      m_inquiry_timeout->adjust(
729         attotime(0, DOUBLE_TO_ATTOSECONDS(0.25)), 0);
728      m_keyboard_reply = scan_keyboard();
729      if (m_keyboard_reply == 0x7B)
730      {
731         /* if NULL, wait until key pressed or timeout */
732         m_inquiry_timeout->adjust(
733            attotime(0, DOUBLE_TO_ATTOSECONDS(0.25)), 0);
734      }
730735      break;
731736
732737   case 0x14:
r242703r242704
835840      {
836841         count_x++;
837842         m_mouse_bit_x = 0;
838         x_needs_update = 2;
839843      }
840844      else
841845      {
842846         count_x--;
843847         m_mouse_bit_x = 1;
844         x_needs_update = 1;
845848      }
849      x_needs_update = 1;
846850   }
847851   else if (count_y)
848852   {
r242703r242704
850854      {
851855         count_y++;
852856         m_mouse_bit_y = 1;
853         y_needs_update = 1;
854857      }
855858      else
856859      {
857860         count_y--;
858861         m_mouse_bit_y = 0;
859         y_needs_update = 2;
860862      }
863      y_needs_update = 1;
861864   }
862865
863866   if (x_needs_update || y_needs_update)
r242703r242704
10371040void mac_state::scc_mouse_irq(int x, int y)
10381041{
10391042   scc8530_t *scc = machine().device<scc8530_t>("scc");
1040   static int lasty = 0;
1041   static int lastx = 0;
1042
10431043   if (x && y)
10441044   {
1045      if (m_last_was_x) {
1045      if (m_last_was_x)
10461046         scc->set_status(0x0a);
1047         if(x == 2) {
1048            if(lastx) {
1049               scc->set_reg_a(0, 0x04);
1050               m_mouse_bit_x = 0;
1051            } else {
1052               scc->set_reg_a(0, 0x0C);
1053               m_mouse_bit_x = 1;
1054            }
1055         } else {
1056            if(lastx) {
1057               scc->set_reg_a(0, 0x04);
1058               m_mouse_bit_x = 1;
1059            } else {
1060               scc->set_reg_a(0, 0x0C);
1061               m_mouse_bit_x = 0;
1062            }
1063         }
1064         lastx = !lastx;
1065      } else {
1047      else
10661048         scc->set_status(0x02);
1067         if(y == 2) {
1068            if(lasty) {
1069               scc->set_reg_b(0, 0x04);
1070               m_mouse_bit_y = 0;
1071            } else {
1072               scc->set_reg_b(0, 0x0C);
1073               m_mouse_bit_y = 1;
1074            }
1075         } else {
1076            if(lasty) {
1077               scc->set_reg_b(0, 0x04);
1078               m_mouse_bit_y = 1;
1079            } else {
1080               scc->set_reg_b(0, 0x0C);
1081               m_mouse_bit_y = 0;
1082            }
1083         }
1084         lasty = !lasty;
1085      }
10861049
10871050      m_last_was_x ^= 1;
10881051   }
10891052   else
10901053   {
1091      if (x) {
1054      if (x)
10921055         scc->set_status(0x0a);
1093         if(x == 2) {
1094            if(lastx) {
1095               scc->set_reg_a(0, 0x04);
1096               m_mouse_bit_x = 0;
1097            } else {
1098               scc->set_reg_a(0, 0x0C);
1099               m_mouse_bit_x = 1;
1100            }
1101         } else {
1102            if(lastx) {
1103               scc->set_reg_a(0, 0x04);
1104               m_mouse_bit_x = 1;
1105            } else {
1106               scc->set_reg_a(0, 0x0C);
1107               m_mouse_bit_x = 0;
1108            }
1109         }
1110         lastx = !lastx;
1111      } else {
1056      else
11121057         scc->set_status(0x02);
1113         if(y == 2) {
1114            if(lasty) {
1115               scc->set_reg_b(0, 0x04);
1116               m_mouse_bit_y = 0;
1117            } else {
1118               scc->set_reg_b(0, 0x0C);
1119               m_mouse_bit_y = 1;
1120            }
1121         } else {
1122            if(lasty) {
1123               scc->set_reg_b(0, 0x04);
1124               m_mouse_bit_y = 1;
1125            } else {
1126               scc->set_reg_b(0, 0x0C);
1127               m_mouse_bit_y = 0;
1128            }
1129         }
1130         lasty = !lasty;
1131      }
11321058   }
11331059
11341060   this->set_scc_interrupt(1);
r242703r242704
20902016      /* set up RAM mirror at 0x600000-0x6fffff (0x7fffff ???) */
20912017      mac_install_memory(0x600000, 0x6fffff, m_ram->size(), m_ram->pointer(), FALSE, "bank2");
20922018
2093      /* set up ROM at 0x400000-0x4fffff (-0x5fffff for mac 128k/512k/512ke) */
2094      mac_install_memory(0x400000, (model >= MODEL_MAC_PLUS) ? 0x4fffff : 0x5fffff,
2019      /* set up ROM at 0x400000-0x43ffff (-0x5fffff for mac 128k/512k/512ke) */
2020      mac_install_memory(0x400000, (model >= MODEL_MAC_PLUS) ? 0x43ffff : 0x5fffff,
20952021         memregion("bootrom")->bytes(), memregion("bootrom")->base(), TRUE, "bank3");
20962022   }
20972023
r242703r242704
22222148
22232149#ifndef MAC_USE_EMULATED_KBD
22242150   /* handle keyboard */
2225   if (m_kbd_comm == TRUE && m_kbd_receive == FALSE)
2151   if (m_kbd_comm == TRUE)
22262152   {
22272153      int keycode = scan_keyboard();
22282154
trunk/src/mess/machine/ngen_kb.c
r242703r242704
216216}
217217
218218const device_type NGEN_KEYBOARD = &device_creator<ngen_keyboard_device>;
219
trunk/src/mess/machine/pce_cd.c
r242703r242704
940940      }
941941      else
942942      {
943         logerror("Successfully read mode1 frame #%d\n", m_current_frame);
943         logerror("Succesfully read mode1 frame #%d\n", m_current_frame);
944944      }
945945
946946      m_data_buffer_index = 0;
trunk/src/mess/machine/sms.c
r242703r242704
4545
4646WRITE_LINE_MEMBER(sms_state::sms_ctrl2_th_input)
4747{
48   if (m_is_gamegear && (!m_cartslot->exists() || !m_cartslot->m_cart->get_sms_mode()))
49      return;
50
5148   // Check if TH of controller port 2 is set to input (1)
5249   if (m_io_ctrl_reg & 0x08)
5350   {
r242703r242704
6663}
6764
6865
69void sms_state::sms_get_inputs()
66void sms_state::sms_get_inputs( address_space &space )
7067{
71   UINT8 data1 = 0xff;
72   UINT8 data2 = 0xff;
68   UINT8 data1, data2;
7369
7470   m_port_dc_reg = 0xff;
7571   m_port_dd_reg = 0xff;
r242703r242704
7874   // physical pins numbering. For register bits whose order differs,
7975   // it's necessary move the equivalent controller bits to match.
8076
81   if (m_is_gamegear)
82   {
83      data1 = m_port_gg_dc->read();
84      m_port_dc_reg &= ~0x03f | data1;
85   }
86   else
87   {
88      data1 = m_port_ctrl1->port_r();
89      m_port_dc_reg &= ~0x0f | data1; // Up, Down, Left, Right
90      m_port_dc_reg &= ~0x10 | (data1 >> 1); // TL (Button 1)
91      m_port_dc_reg &= ~0x20 | (data1 >> 2); // TR (Button 2)
92   }
77   data1 = m_port_ctrl1->port_r();
78   m_port_dc_reg &= ~0x0f | data1; // Up, Down, Left, Right
79   m_port_dc_reg &= ~0x10 | (data1 >> 1); // TL (Button 1)
80   m_port_dc_reg &= ~0x20 | (data1 >> 2); // TR (Button 2)
9381
94   if (m_is_gamegear)
95   {
96      if (m_cartslot->exists() && m_cartslot->m_cart->get_sms_mode())
97         data2 = m_port_gear2gear->port_r();
98   }
99   else
100   {
101      data2 = m_port_ctrl2->port_r();
102   }
82   data2 = m_port_ctrl2->port_r();
10383   m_port_dc_reg &= ~0xc0 | (data2 << 6); // Up, Down
10484   m_port_dd_reg &= ~0x03 | (data2 >> 2); // Left, Right
10585   m_port_dd_reg &= ~0x04 | (data2 >> 3); // TL (Button 1)
r242703r242704
136116      }
137117      else
138118      {
139         sms_get_inputs();
119         sms_get_inputs(space);
140120         return m_port_dc_reg;
141121      }
142122   }
r242703r242704
149129   UINT8 ctrl1_port_data = 0xff;
150130   UINT8 ctrl2_port_data = 0xff;
151131
152   if (m_is_gamegear && (!m_cartslot->exists() || !m_cartslot->m_cart->get_sms_mode()))
153   {
154      m_io_ctrl_reg = data;
155      return;
156   }
157
158132   // Controller Port 1:
159133
160134   // check if TR or TH are set to output (0).
r242703r242704
197171      }
198172      if (!m_is_gamegear)
199173         m_port_ctrl2->port_w(ctrl2_port_data);
200      else
201         m_port_gear2gear->port_w(ctrl2_port_data); // not verified
202174   }
203175   // check if TH is set to input (1).
204176   if (data & 0x08)
205177   {
206178      if (!m_is_gamegear)
207179         ctrl2_port_data &= ~0x40 | m_port_ctrl2->port_r();
208      else
209         ctrl2_port_data &= ~0x40 | m_port_gear2gear->port_r(); // not verified
210180
211181      // check if TH input level is high (1) and was output/low (0)
212182      if ((ctrl2_port_data & 0x40) && !(m_io_ctrl_reg & 0x88))
r242703r242704
262232{
263233   if (m_is_mark_iii)
264234   {
265      sms_get_inputs();
235      sms_get_inputs(space);
266236      return m_port_dc_reg;
267237   }
268238
269   if (!m_is_gamegear && (m_mem_ctrl_reg & IO_CHIP))
239   if (m_mem_ctrl_reg & IO_CHIP)
270240   {
271241      return 0xff;
272242   }
273243   else
274244   {
275      sms_get_inputs();
245      sms_get_inputs(space);
276246
277247      // Check if TR of controller port 1 is set to output (0)
278248      if (!(m_io_ctrl_reg & 0x01))
r242703r242704
290260{
291261   if (m_is_mark_iii)
292262   {
293      sms_get_inputs();
263      sms_get_inputs(space);
294264      return m_port_dd_reg;
295265   }
296266
297   if (!m_is_gamegear && (m_mem_ctrl_reg & IO_CHIP))
267   if (m_mem_ctrl_reg & IO_CHIP)
298268      return 0xff;
299269
300   sms_get_inputs();
270   sms_get_inputs(space);
301271
302272   // Check if TR of controller port 2 is set to output (0)
303273   if (!(m_io_ctrl_reg & 0x04))
r242703r242704
306276      m_port_dd_reg &= ~0x08 | ((m_io_ctrl_reg & 0x40) >> 3);
307277   }
308278
309   if (m_is_smsj || (m_is_gamegear && m_is_gg_region_japan))
279   if (m_is_smsj)
310280   {
311281      // For Japanese Master System, set upper 4 bits with TH/TR
312282      // direction bits of IO control register, according to Enri's
313283      // docs (http://www43.tok2.com/home/cmpslv/Sms/EnrSms.htm).
314284      // This makes the console incapable of using the Light Phaser.
315      // Assume the same for a Japanese Game Gear.
316285      m_port_dd_reg &= ~0x10 | ((m_io_ctrl_reg & 0x01) << 4);
317286      m_port_dd_reg &= ~0x20 | ((m_io_ctrl_reg & 0x04) << 3);
318287      m_port_dd_reg &= ~0x40 | ((m_io_ctrl_reg & 0x02) << 5);
r242703r242704
12991268               /* Do horizontal scaling */
13001269               for (int plot_x = plot_min_x; plot_x <= plot_max_x;)
13011270               {
1302                  for (int j = (plot_x - plot_x_group); j <= MIN(1, plot_max_x - plot_x_group); j++)
1271                   for (int j = (plot_x - plot_x_group); j <= MIN(1, plot_max_x - plot_x_group); j++)
13031272                  {
13041273                     if (sms_x + j >= vdp_bitmap.cliprect().min_x && sms_x + j + 1 <= vdp_bitmap.cliprect().max_x)
13051274                     {
r242703r242704
13661335               rgb_t   c4 = line4[plot_x];
13671336               p_bitmap[plot_x] =
13681337                  rgb_t( ( c1.r() / 6 + c2.r() / 3 + c3.r() / 3 + c4.r() / 6 ),
1369                        ( c1.g() / 6 + c2.g() / 3 + c3.g() / 3 + c4.g() / 6 ),
1370                        ( c1.b() / 6 + c2.b() / 3 + c3.b() / 3 + c4.b() / 6 ) );
1338                         ( c1.g() / 6 + c2.g() / 3 + c3.g() / 3 + c4.g() / 6 ),
1339                         ( c1.b() / 6 + c2.b() / 3 + c3.b() / 3 + c4.b() / 6 ) );
13711340            }
13721341         }
13731342      }
trunk/src/mess/machine/trs80.c
r242703r242704
593593    d1, d0 Cassette output */
594594
595595   static const double levels[4] = { 0.0, -1.0, 0.0, 1.0 };
596   static int init = 0;
597596
598597   m_cassette->change_state(( data & 4 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR );
599598   m_cassette->output(levels[data & 3]);
r242703r242704
601600
602601   m_mode = (m_mode & 0xfe) | ((data & 8) >> 3);
603602
604   if (!init)
605   {
606      init = 1;
607      static INT16 speaker_levels[4] = { 0, -32768, 0, 32767 };
608      m_speaker->static_set_levels(*m_speaker, 4, speaker_levels);
609
610   }
611603   /* Speaker for System-80 MK II - only sounds if relay is off */
612604   if (~data & 4)
613605      m_speaker->level_w(data & 3);
trunk/src/mess/machine/victor9k_fdc.c
r242703r242704
1111
1212/*
1313
14    value   error description
14   value   error description
1515
16    01      no sync pulse detected
17    02      no header track
18    03      checksum error in header
19    04      not right track
20    05      not right sector
21    06      not a data block
22    07      data checksum error
23    08      sync too long
24    99      not a system disc
16   01      no sync pulse detected
17   02      no header track
18   03      checksum error in header
19   04      not right track
20   05      not right sector
21   06      not a data block
22   07      data checksum error
23   08      sync too long
24   99      not a system disc
2525
26    11      Noise on sync
27    FF      No sync (bad or unformatted disk)
26   11      Noise on sync
27   FF      No sync (bad or unformatted disk)
2828
2929*/
3030
r242703r242704
3232
3333    TODO:
3434
35    - communication error with SCP after loading boot sector
36        - bp ff1a8
37        - patch ff1ab=c3
35   - communication error with SCP after loading boot sector
36      - bp ff1a8
37      - patch ff1ab=c3
3838    - single/double sided jumper
3939    - header sync length unknown (6 is too short)
4040    - 8048 spindle speed control
r242703r242704
6060
6161// this is exactly the same decode/encode as used in the Commodore 4040/8050 series drives
6262#define GCR_DECODE(_e, _i) \
63   ((BIT(_e, 6) << 7) | (BIT(_i, 7) << 6) | (_e & 0x33) | (BIT(_e, 2) << 3) | (_i & 0x04))
63    ((BIT(_e, 6) << 7) | (BIT(_i, 7) << 6) | (_e & 0x33) | (BIT(_e, 2) << 3) | (_i & 0x04))
6464
6565// E7 E6 I7 E5 E4 E3 E2 I2 E1 E0
6666#define GCR_ENCODE(_e, _i) \
67   ((_e & 0xc0) << 2 | (_i & 0x80) | (_e & 0x3c) << 1 | (_i & 0x04) | (_e & 0x03))
67    ((_e & 0xc0) << 2 | (_i & 0x80) | (_e & 0x3c) << 1 | (_i & 0x04) | (_e & 0x03))
6868
6969// Tandon TM-100 spindle @ 300RPM, measured TACH 12VAC 256Hz
7070// TACH = RPM / 60 * SPINDLE RATIO * MOTOR POLES
7171// 256 = 300 / 60 * 6.4 * 8
72#define SPINDLE_RATIO   6.4
73#define MOTOR_POLES     8
72#define SPINDLE_RATIO    6.4
73#define MOTOR_POLES      8
7474
7575// TODO wrong values here! motor speed is controlled by an LM2917, with help from the spindle TACH and a DAC0808 whose value is set by the SCP 8048
7676const int victor_9000_fdc_t::rpm[] = { 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 254, 255, 257, 259, 260, 262, 264, 266, 267, 269, 271, 273, 275, 276, 278, 280, 282, 284, 286, 288, 290, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 318, 320, 322, 324, 326, 328, 330, 333, 335, 337, 339, 342, 344, 346, 348, 351, 353, 355, 358, 360, 362, 365, 367, 370, 372, 375, 377, 380, 382, 385, 387, 390, 392, 395, 398, 400, 403, 406, 408, 411, 414, 416, 419, 422, 425, 428, 430, 433, 436, 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 482, 485, 488, 491, 494, 498, 501, 504, 508, 511, 514, 518, 521, 525, 528, 532, 535, 539, 542, 546, 550, 553, 557, 561, 564, 568, 572, 576, 579, 583, 587, 591, 595, 599, 603, 607, 611, 615, 619, 623, 627, 631, 636, 640, 644, 648, 653, 657, 661, 666, 670, 674, 679, 683, 688, 693, 697, 702, 706, 711, 716, 721, 725, 730, 735, 740, 745, 750, 755, 760, 765, 770, 775, 780, 785, 790, 796, 801, 806, 812, 817, 822, 828, 833, 839, 844, 850, 856, 861, 867, 873, 878, 884 };
trunk/src/mess/machine/victor9kb.c
r242703r242704
347347
348348#define I8021_TAG   "z3"
349349
350#define LOG         0
350#define LOG       0
351351
352352
353353
r242703r242704
433433   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // S36
434434   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // S56
435435   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // S57
436   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S75") // unused // S75
436   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S75") // unused // S75
437437   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // S76
438438
439439   PORT_START("Y2")
440   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 # >") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CHAR('>') // S16
440   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 # >") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('3') PORT_CHAR('3')// S16
441441   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 $ \xc2\xb7") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // centered closed dot U+00B7 // S17
442442   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // S37
443443   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // S38
trunk/src/mess/mess.lst
r242703r242704
214214prsarcde  // Telegames Personal Arcade
215215adam      // Coleco Adam
216216
217amaztron
218
219217// NEC
220218pce    // PC/Engine NEC 1987-1993
221219tg16      // Turbo Grafix-16  NEC 1989-1993
r242703r242704
10661064
10671065// TI Speak & Spell
10681066snspell
1067snspellp
10691068snspella
10701069snspelluk
10711070snspelluka
1072snspelljp
10731071ladictee
10741072snmath
10751073snmatha
1074snmathp
10761075
10771076// Texas Instruments Calculators
10781077tisr16    // 1974 SR-16
r242703r242704
17231722hp48gp  // HP 48G+
17241723hp49g
17251724hp49gp  // HP 49G+
1726hp1650b
1727hp1651b
1728hp165ka0
17291725hp16500b
17301726hp9816
17311727hp9845a
r242703r242704
17351731hp9845b
17361732hp9845t
17371733hp9845c
1738hp9k310
17391734hp9k320
17401735hp9k330
1741hp9k340
1742hp9k370
1743hp9k380
1744hp9k382
17451736
17461737// SpectraVideo
17471738svi318  // SVI-318 (PAL)
r242703r242704
25952586excali64
25962587bitgrpha
25972588bitgrphb
2598unk3403
trunk/src/mess/mess.mak
r242703r242704
313313VIDEOS += SNES_PPU
314314VIDEOS += STVVDP
315315VIDEOS += T6A04
316VIDEOS += TEA1002
317316#VIDEOS += TLC34076
318317#VIDEOS += TMS34061
319318VIDEOS += TMS3556
r242703r242704
570569BUSES += A2BUS
571570BUSES += A7800
572571BUSES += A800
573BUSES += A8SIO
574572BUSES += ABCBUS
575573BUSES += ABCKB
576574BUSES += ADAM
r242703r242704
597595BUSES += EP64
598596BUSES += EPSON_SIO
599597BUSES += GAMEBOY
600BUSES += GAMEGEAR
601598BUSES += GBA
602599BUSES += GENERIC
603600BUSES += IEEE488
r242703r242704
11201117   $(MESS_DRIVERS)/adam.o      \
11211118   $(MESS_DRIVERS)/coleco.o    \
11221119   $(MESS_MACHINE)/coleco.o    \
1123   $(MESS_DRIVERS)/amaztron.o  \
11241120
11251121$(MESSOBJ)/cromemco.a:          \
11261122   $(MESS_DRIVERS)/c10.o       \
r242703r242704
13031299   $(MESS_DRIVERS)/hp49gp.o    \
13041300   $(MESS_DRIVERS)/hp9845.o    \
13051301   $(MESS_DRIVERS)/hp9k.o      \
1306   $(MESS_DRIVERS)/hp9k_3xx.o  \
1302   $(MESS_DRIVERS)/hp9k_3xx.o   \
13071303
13081304
13091305$(MESSOBJ)/hec2hrp.a:           \
r242703r242704
19961992   $(MESS_DRIVERS)/ti630.o     \
19971993   $(MESS_DRIVERS)/tsispch.o   \
19981994   $(MESS_DRIVERS)/unistar.o   \
1999   $(MESS_DRIVERS)/unk3403.o   \
20001995   $(MESS_DRIVERS)/v6809.o     \
20011996   $(MESS_DRIVERS)/vector4.o   \
20021997   $(MESS_DRIVERS)/vii.o       \
r242703r242704
20772072$(MESS_DRIVERS)/aim65.o:    $(MESS_LAYOUT)/aim65.lh
20782073$(MESS_DRIVERS)/aim65_40.o: $(MESS_LAYOUT)/aim65_40.lh
20792074$(MESS_DRIVERS)/alesis.o:   $(MESS_LAYOUT)/sr16.lh
2080$(MESS_DRIVERS)/amaztron.o: $(MESS_LAYOUT)/amaztron.lh
20812075$(MESS_DRIVERS)/amico2k.o:  $(MESS_LAYOUT)/amico2k.lh
20822076$(MESS_DRIVERS)/amiga.o:    $(MESS_LAYOUT)/amiga.lh
20832077$(MESS_VIDEO)/apollo.o:     $(MESS_LAYOUT)/apollo.lh \
trunk/src/mess/tools/castool/castool.mak
r242703r242704
3636# TODO: Visual Studio wants $(FLAC_LIB) and $(7Z_LIB) during linking...
3737$(CASTOOL): $(CASTOOL_OBJS) $(FORMATS_LIB) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(FLAC_LIB) $(7Z_LIB)
3838   @echo Linking $@...
39   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
39   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
trunk/src/mess/tools/floptool/floptool.mak
r242703r242704
3636# TODO: Visual Studio wants $(FLAC_LIB) and $(7Z_LIB) during linking...
3737$(FLOPTOOL): $(FLOPTOOL_OBJS) $(FORMATS_LIB) $(LIBEMU) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(FLAC_LIB) $(7Z_LIB)
3838   @echo Linking $@...
39   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
39   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
trunk/src/mess/tools/imgtool/imgtool.mak
r242703r242704
7676
7777$(IMGTOOL): $(IMGTOOL_OBJS) $(LIBIMGTOOL) $(FORMATS_LIB) $(LIBEMU) $(LIBUTIL) $(EXPAT) $(ZLIB) $(FLAC_LIB) $(7Z_LIB) $(LIBOCORE)
7878   @echo Linking $@...
79   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
79   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
trunk/src/mess/video/apple2.c
r242703r242704
756756   m_altcharset = false;
757757   m_dhires = false;
758758   m_flash = false;
759   m_mix = false;
760759   m_sysconfig = 0;
761760}
762761
r242703r242704
12091208               }
12101209               else
12111210               {
1212                  artifact_map_ptr = &m_hires_artifact_map[((vram_row[col + 1] & 0x80) >> 7) * 16];
1211                  artifact_map_ptr = &m_hires_artifact_map[((vram_row[col + 1] & 0x80) >> 7) * 16];
12131212               }
12141213               for (b = 0; b < 7; b++)
12151214               {
trunk/src/mess/video/aquarius.c
r242703r242704
1010#include "includes/aquarius.h"
1111
1212
13
14static const rgb_t aquarius_colors[] =
15{
16   rgb_t::black,                  /* Black */
17   rgb_t(0xff, 0x00, 0x00), /* Red */
18   rgb_t(0x00, 0xff, 0x00), /* Green */
19   rgb_t(0xff, 0xff, 0x00), /* Yellow */
20   rgb_t(0x00, 0x00, 0xff), /* Blue */
21   rgb_t(0x7f, 0x00, 0x7f), /* Violet */
22   rgb_t(0x7f, 0xff, 0xff), /* Light Blue-Green */
23   rgb_t::white,                  /* White */
24   rgb_t(0xc0, 0xc0, 0xc0), /* Light Gray */
25   rgb_t(0x00, 0xff, 0xff), /* Blue-Green */
26   rgb_t(0xff, 0x00, 0xff), /* Magenta */
27   rgb_t(0x00, 0x00, 0x7f), /* Dark Blue */
28   rgb_t(0xff, 0xff, 0x7f), /* Light Yellow */
29   rgb_t(0x7f, 0xff, 0x7f), /* Light Green */
30   rgb_t(0xff, 0x7f, 0x00), /* Orange */
31   rgb_t(0x7f, 0x7f, 0x7f)  /* Dark Gray */
32};
33
1334static const unsigned short aquarius_palette[] =
1435{
1536   0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, 0,
r242703r242704
3556   int i;
3657
3758   for (i = 0; i < 16; i++)
38      m_palette->set_indirect_color(i, m_tea1002->color(i));
59      m_palette->set_indirect_color(i, aquarius_colors[i]);
3960
4061   for (i = 0; i < 512; i++)
4162      m_palette->set_pen_indirect(i, aquarius_palette[i]);
trunk/src/mess/video/gb_lcd.c
r242703r242704
215215void gb_lcd_device::common_start()
216216{
217217   m_screen->register_screen_bitmap(m_bitmap);
218   save_item(NAME(m_bitmap));
219218   m_oam = auto_alloc_array_clear(machine(), UINT8, 0x100);
220219
221220   machine().save().register_postload(save_prepost_delegate(FUNC(gb_lcd_device::videoptr_restore), this));
trunk/src/mess/video/maria.c
r242703r242704
44
55
66  - some history:
7    2014-12-01 Mike Saarna, Robert Tuccitto Implemented "colorburst kill" bit
8                of the MARIA CTRL register.
7    2014-12-01 Mike Saarna, Robert Tuccitto Implemented "colorburst kill" bit
8               of the MARIA CTRL register.
99    2014-10-05 Mike Saarna, Robert Tuccitto Last Line DMA value corrected
1010                to 6. GCC and Atari docs both show a difference between
1111                Other Line and Last Line as +6 at the lowest part of the
trunk/src/mess/video/wswan_video.c
r242703r242704
6969   save_item(NAME(m_timer_hblank_enable));
7070   save_item(NAME(m_timer_hblank_mode));
7171   save_item(NAME(m_timer_hblank_reload));
72   save_item(NAME(m_timer_hblank_count));
7372   save_item(NAME(m_timer_vblank_enable));
7473   save_item(NAME(m_timer_vblank_mode));
7574   save_item(NAME(m_timer_vblank_reload));
r242703r242704
11541153         else
11551154            m_timer_hblank_reload = 0;
11561155
1157         logerror( "triggering hbltmr interrupt\n" );
1156         logerror( "trigerring hbltmr interrupt\n" );
11581157         m_set_irq_cb(WSWAN_VIDEO_IFLAG_HBLTMR);
11591158      }
11601159   }
trunk/src/osd/modules/debugger/debugosx.m
r242703r242704
2222//  * Scroll views with content narrower than clipping area are flaky under Tiger - nothing I can do about this
2323
2424
25// Workaround for Nil being re=defined in luabridge
26#include "emu.h"
27
2825// standard Cocoa headers
2926#include <AvailabilityMacros.h>
3027#import <Cocoa/Cocoa.h>
3128
3229// MAME headers
33//#include "emu.h"
30#include "emu.h"
3431#include "debug/debugvw.h"
3532#include "debug/debugcon.h"
3633#include "debug/debugcpu.h"
trunk/src/osd/modules/debugger/qt/debugqtdeviceswindow.c
r242703r242704
1414
1515QVariant DevicesWindowModel::data(const QModelIndex &index, int role) const
1616{
17   if(!index.isValid() || role != Qt::DisplayRole)
18      return QVariant();
17    if(!index.isValid() || role != Qt::DisplayRole)
18        return QVariant();
1919
2020   device_t *dev = static_cast<device_t *>(index.internalPointer());
2121   switch(index.column()) {
r242703r242704
4343
4444QModelIndex DevicesWindowModel::index(int row, int column, const QModelIndex &parent) const
4545{
46   if(!hasIndex(row, column, parent))
47      return QModelIndex();
46    if(!hasIndex(row, column, parent))
47        return QModelIndex();
4848
4949   device_t *target = NULL;
5050
r242703r242704
6767
6868QModelIndex DevicesWindowModel::parent(const QModelIndex &index) const
6969{
70   if(!index.isValid())
71      return QModelIndex();
70    if(!index.isValid())
71        return QModelIndex();
7272
73   device_t *dchild = static_cast<device_t *>(index.internalPointer());
73    device_t *dchild = static_cast<device_t *>(index.internalPointer());
7474   device_t *dparent = dchild->owner();
7575
7676   if(!dparent)
r242703r242704
8282      for(device_t *child = dpp->first_subdevice(); child && child != dparent; child = child->next())
8383         row++;
8484   }
85   return createIndex(row, 0, dparent);
85    return createIndex(row, 0, dparent);
8686}
8787
8888int DevicesWindowModel::rowCount(const QModelIndex &parent) const
8989{
9090   if(!parent.isValid())
9191      return 1;
92
92   
9393   device_t *dparent = static_cast<device_t *>(parent.internalPointer());
9494   int count = 0;
9595   for(device_t *child = dparent->first_subdevice(); child; child = child->next())
r242703r242704
157157void DevicesWindowQtConfig::buildFromQWidget(QWidget* widget)
158158{
159159   WindowQtConfig::buildFromQWidget(widget);
160   //  DevicesWindow* window = dynamic_cast<DevicesWindow*>(widget);
160   //   DevicesWindow* window = dynamic_cast<DevicesWindow*>(widget);
161161}
162162
163163
164164void DevicesWindowQtConfig::applyToQWidget(QWidget* widget)
165165{
166166   WindowQtConfig::applyToQWidget(widget);
167   //  DevicesWindow* window = dynamic_cast<DevicesWindow*>(widget);
167   //   DevicesWindow* window = dynamic_cast<DevicesWindow*>(widget);
168168}
169169
170170
trunk/src/osd/modules/debugger/qt/debugqtdeviceswindow.h
r242703r242704
2323   QVariant headerData(int section, Qt::Orientation orientation,
2424                  int role = Qt::DisplayRole) const;
2525   QModelIndex index(int row, int column,
26                  const QModelIndex &parent = QModelIndex()) const;
26                 const QModelIndex &parent = QModelIndex()) const;
2727   QModelIndex parent(const QModelIndex &index) const;
2828   int rowCount(const QModelIndex &parent = QModelIndex()) const;
2929   int columnCount(const QModelIndex &parent = QModelIndex()) const;
30
30   
3131private:
3232   running_machine *m_machine;
3333};
r242703r242704
4444   virtual ~DevicesWindow();
4545
4646public slots:
47   void currentRowChanged(const QModelIndex &current, const QModelIndex &previous);
48   void activated(const QModelIndex &index);
47    void currentRowChanged(const QModelIndex &current, const QModelIndex &previous);
48    void activated(const QModelIndex &index);
4949
5050private:
5151   QTreeView *m_devices_view;
trunk/src/osd/sdl/blit13.h
r242703r242704
5353#define OP_RGB32_ARGB32(_src) ((_src) | 0xff000000)
5454
5555#define OP_RGB32PAL_ARGB32(_src) \
56   (palbase[0x200 + (((_src) >> 16) & 0xff) ] | \
57      palbase[0x100 + (((_src) >> 8) & 0xff) ] | \
58      palbase[((_src) & 0xff) ] | 0xff000000)
56   (texsource->palette[0x200 + (((_src) >> 16) & 0xff) ] | \
57      texsource->palette[0x100 + (((_src) >> 8) & 0xff) ] | \
58      texsource->palette[((_src) & 0xff) ] | 0xff000000)
5959
60#define OP_PAL16_ARGB32(_src) (0xff000000 | palbase[_src])
60#define OP_PAL16_ARGB32(_src) (0xff000000 | texsource->palette[_src])
6161
62#define OP_PAL16A_ARGB32(_src) (palbase[_src])
62#define OP_PAL16A_ARGB32(_src) (texsource->palette[_src])
6363
6464#define OP_RGB15_ARGB32(_src) (0xff000000 | ((_src & 0x7c00) << 9) | ((_src & 0x03e0) << 6) | ((_src & 0x001f) << 3) | \
6565   ((((_src & 0x7c00) << 9) | ((_src & 0x03e0) << 6) | ((_src & 0x001f) << 3) >> 5) & 0x070707))
6666
67#define OP_RGB15PAL_ARGB32(_src) (0xff000000 | palbase[0x40 + ((_src >> 10) & 0x1f)] | \
68      palbase[0x20 + ((_src >> 5) & 0x1f)] | palbase[0x00 + ((_src >> 0) & 0x1f)])
67#define OP_RGB15PAL_ARGB32(_src) (0xff000000 | texsource->palette[0x40 + ((_src >> 10) & 0x1f)] | \
68      texsource->palette[0x20 + ((_src >> 5) & 0x1f)] | texsource->palette[0x00 + ((_src >> 0) & 0x1f)])
6969
7070#define OP_ARGB32_RGB32(_pixel) premult32(_pixel)
7171
72#define OP_PAL16A_RGB32(_src) premult32(palbase[_src])
72#define OP_PAL16A_RGB32(_src) premult32(texsource->palette[_src])
7373
74#define OP_PAL16_ARGB1555(_src) ((palbase[_src]&0xf80000) >> 9 | \
75         (palbase[_src]&0x00f800) >> 6 | \
76         (palbase[_src]&0x0000f8) >> 3 | 0x8000)
74#define OP_PAL16_ARGB1555(_src) ((texsource->palette[_src]&0xf80000) >> 9 | \
75         (texsource->palette[_src]&0x00f800) >> 6 | \
76         (texsource->palette[_src]&0x0000f8) >> 3 | 0x8000)
7777
7878#define OP_RGB15_ARGB1555(_src) ((_src) | 0x8000)
7979
80#define OP_RGB15PAL_ARGB1555(_src) ((palbase[(_src) >> 10] & 0xf8) << 7 | \
81         (palbase[((_src) >> 5) & 0x1f] & 0xf8) << 2 | \
82         (palbase[(_src) & 0x1f] & 0xf8) >> 3 | 0x8000)
80#define OP_RGB15PAL_ARGB1555(_src) ((texsource->palette[(_src) >> 10] & 0xf8) << 7 | \
81         (texsource->palette[((_src) >> 5) & 0x1f] & 0xf8) << 2 | \
82         (texsource->palette[(_src) & 0x1f] & 0xf8) >> 3 | 0x8000)
8383
8484#define OP_YUV16_UYVY(_src) (_src)
8585
86#define OP_YUV16PAL_UYVY(_src) ((palbase[((_src) >> 8) & 0xff] << 8) | ((_src) & 0x00ff))
86#define OP_YUV16PAL_UYVY(_src) ((texsource->palette[((_src) >> 8) & 0xff] << 8) | ((_src) & 0x00ff))
8787
88#define OP_YUV16PAL_YVYU(_src) ((palbase[((_src) >> 8) & 0xff] & 0xff) | ((_src & 0xff) << 8))
88#define OP_YUV16PAL_YVYU(_src) ((texsource->palette[((_src) >> 8) & 0xff] & 0xff) | ((_src & 0xff) << 8))
8989
9090#define OP_YUV16_YVYU(_src) ((((_src) >> 8) & 0xff) | ((_src & 0xff) << 8))
9191
9292#define OP_YUV16_YUY2(_src) ( ((_src) & 0xff00ff00) | \
9393   (((_src)>>16)&0xff) | (((_src)<<16)&0xff0000) )
9494
95#define OP_YUV16PAL_YUY2(_src) ( (palbase[((_src)>>8) & 0xff]) | \
96      (palbase[((_src)>>24) & 0xff]<<16) | \
95#define OP_YUV16PAL_YUY2(_src) ( (texsource->palette[((_src)>>8) & 0xff]) | \
96      (texsource->palette[((_src)>>24) & 0xff]<<16) | \
9797   (((_src)<<8)&0xff00ff00) )
9898
9999#define OP_YUV16_ARGB32(_src) \
r242703r242704
101101   | ((UINT64)ycc_to_rgb(((_src) >> 24) & 0xff, (_src) & 0xff , ((_src)>>16) & 0xff) << 32)
102102
103103#define OP_YUV16PAL_ARGB32(_src) \
104      (UINT64)ycc_to_rgb(palbase[((_src) >>  8) & 0xff], (_src) & 0xff , ((_src)>>16) & 0xff) \
105   | ((UINT64)ycc_to_rgb(palbase[((_src) >> 24) & 0xff], (_src) & 0xff , ((_src)>>16) & 0xff) << 32)
104      (UINT64)ycc_to_rgb(texsource->palette[((_src) >>  8) & 0xff], (_src) & 0xff , ((_src)>>16) & 0xff) \
105   | ((UINT64)ycc_to_rgb(texsource->palette[((_src) >> 24) & 0xff], (_src) & 0xff , ((_src)>>16) & 0xff) << 32)
106106
107107#define OP_YUV16_ARGB32ROT(_src) pixel_ycc_to_rgb(&(_src))
108108
109#define OP_YUV16PAL_ARGB32ROT(_src) pixel_ycc_to_rgb_pal(&(_src), palbase)
109#define OP_YUV16PAL_ARGB32ROT(_src) pixel_ycc_to_rgb_pal(&(_src), texsource->palette)
110110
111111//============================================================
112112//  Copy and rotation
113113//============================================================
114114
115115#define TEXCOPY_M( _name, _src_type, _dest_type,  _op, _len_div) \
116INLINE void texcopy_##_name (const texture_info *texture, const render_texinfo *texsource) { \
117    ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
116INLINE void texcopy_##_name (texture_info *texture, const render_texinfo *texsource) { \
118117   int x, y; \
119118   /* loop over Y */ \
120119   for (y = 0; y < texsource->height; y++) { \
121120      _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div); \
122      _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); \
121      _dest_type *dst = (_dest_type *)((UINT8 *)texture->pixels + y * texture->pitch); \
123122      x = texsource->width / (_len_div); \
124123      while (x > 0) { \
125124         *dst++ = _op(*src); \
r242703r242704
133132   TEXCOPY_M( _name, _src_type, _dest_type,  _op, 1)
134133
135134#define TEXROT( _name, _src_type, _dest_type, _op) \
136INLINE void texcopy_rot_##_name (const texture_info *texture, const render_texinfo *texsource) { \
137    ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
135INLINE void texcopy_rot_##_name (texture_info *texture, const render_texinfo *texsource) { \
138136   int x, y; \
139   const quad_setup_data *setup = &texture->m_setup; \
137   quad_setup_data *setup = &texture->setup; \
140138   int dudx = setup->dudx; \
141139   int dvdx = setup->dvdx; \
142140   /* loop over Y */ \
143141   for (y = 0; y < setup->rotheight; y++) { \
144142      INT32 curu = setup->startu + y * setup->dudy; \
145143      INT32 curv = setup->startv + y * setup->dvdy; \
146      _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); \
144      _dest_type *dst = (_dest_type *)((UINT8 *)texture->pixels + y * texture->pitch); \
147145      x = setup->rotwidth; \
148146      while (x>0) { \
149147         _src_type *src = (_src_type *) texsource->base + (curv >> 16) * texsource->rowpixels + (curu >> 16); \
trunk/src/osd/sdl/draw13.c
r242703r242704
4343
4444
4545//============================================================
46//  Inline functions
46//  MACROS
4747//============================================================
4848
49static inline bool is_opaque(const float &a)
50{
51    return (a >= 1.0f);
52}
49#define IS_OPAQUE(a)        (a >= 1.0f)
50#define IS_TRANSPARENT(a)   (a <  0.0001f)
5351
54static inline bool is_transparent(const float &a)
55{
56    return (a <  0.0001f);
57}
52#define MAX4(a, b, c, d) MAX(a, MAX(b, MAX(c, d)))
53#define MIN4(a, b, c, d) MIN(a, MIN(b, MIN(c, d)))
5854
55
5956//============================================================
6057//  TYPES
6158//============================================================
r242703r242704
6360
6461struct quad_setup_data
6562{
66    quad_setup_data()
67    : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0),
68      rotwidth(0), rotheight(0)
69    {}
70    void compute(const render_primitive &prim);
71
7263   INT32           dudx, dvdx, dudy, dvdy;
7364   INT32           startu, startv;
7465   INT32           rotwidth, rotheight;
7566};
7667
77class texture_info;
68struct texture_info;
7869
79typedef void (*texture_copy_func)(const texture_info *texture, const render_texinfo *texsource);
70typedef void (*texture_copy_func)(texture_info *texture, const render_texinfo *texsource);
8071
81struct copy_info_t {
72struct copy_info {
8273   int                 src_fmt;
8374   Uint32              dst_fmt;
8475   int                 dst_bpp;
r242703r242704
9384   int                 samples;
9485   int                 perf;
9586   /* list */
96   copy_info_t           *next;
87   copy_info           *next;
9788};
9889
99//============================================================
100//  Textures
101//============================================================
102
103struct sdl_info;
104
10590/* texture_info holds information about a texture */
106class texture_info
91struct texture_info
10792{
108    friend class simple_list<texture_info>;
109public:
110    texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags);
111    ~texture_info();
93   texture_info *      next;               // next texture in the list
11294
113    void set_data(const render_texinfo &texsource, const UINT32 flags);
114    void render_quad(const render_primitive *prim, const int x, const int y);
115    bool matches(const render_primitive &prim, const quad_setup_data &setup);
95   HashT               hash;               // hash value for the texture (must be >= pointer size)
96   UINT32              flags;              // rendering flags
97   render_texinfo      texinfo;            // copy of the texture info
11698
117    copy_info_t *compute_size_type();
99   int                 rawwidth, rawheight;// raw width/height of the texture
118100
119   void                *m_pixels;            // pixels for the texture
120   int                 m_pitch;
101   int                 format;             // texture format
102   void                *pixels;            // pixels for the texture
103   int                 pitch;
104   int                 pixels_own;         // do we own / allocated it ?
121105
122   copy_info_t         *m_copyinfo;
123   quad_setup_data     m_setup;
106   SDL_Texture         *texture_id;
124107
125   osd_ticks_t         m_last_access;
108   copy_info           *copyinfo;
109   Uint32              sdl_access;
110   SDL_BlendMode       sdl_blendmode;
111   quad_setup_data     setup;
112   int                 is_rotated;
126113
127   int raw_width() const { return m_texinfo.width; }
128    int raw_height() const { return m_texinfo.height; }
129
130    texture_info *next() { return m_next; }
131    const render_texinfo &texinfo() const { return m_texinfo; }
132    render_texinfo &texinfo() { return m_texinfo; }
133
134    const HashT hash() const { return m_hash; }
135    const UINT32 flags() const { return m_flags; }
136    const bool is_pixels_owned() const { // do we own / allocated it ?
137        return m_sdl_access == SDL_TEXTUREACCESS_STATIC
138                && m_copyinfo->func != NULL ;
139    }
140
141private:
142    SDL_Renderer *      m_renderer;
143    render_texinfo      m_texinfo;            // copy of the texture info
144    HashT               m_hash;               // hash value for the texture (must be >= pointer size)
145    UINT32              m_flags;              // rendering flags
146
147    SDL_Texture *       m_texture_id;
148    int                 m_is_rotated;
149
150    int                 m_format;             // texture format
151    SDL_BlendMode       m_sdl_blendmode;
152    Uint32              m_sdl_access;
153
154    texture_info *      m_next;               // next texture in the list
114   osd_ticks_t         last_access;
155115};
156116
157117/* sdl_info is the information about SDL for the current screen */
158118struct sdl_info
159119{
160    sdl_info()
161    : m_blittimer(0), m_renderer(NULL),
162      m_hofs(0), m_vofs(0),
163      m_resize_pending(0), m_resize_width(0), m_resize_height(0),
164      m_last_blit_time(0), m_last_blit_pixels(0)
165    {}
120   INT32           blittimer;
121   UINT32          extra_flags;
166122
167    void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
123   SDL_Renderer    *sdl_renderer;
124   texture_info *  texlist;                // list of active textures
125   INT32           texture_max_width;      // texture maximum width
126   INT32           texture_max_height;     // texture maximum height
168127
169    texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
170    texture_info *texture_update(const render_primitive &prim);
128   float           last_hofs;
129   float           last_vofs;
171130
172   INT32           m_blittimer;
173
174   SDL_Renderer *  m_renderer;
175   simple_list<texture_info>  m_texlist;                // list of active textures
176
177   float           m_hofs;
178   float           m_vofs;
179
180131   // resize information
181132
182   UINT8           m_resize_pending;
183   UINT32          m_resize_width;
184   UINT32          m_resize_height;
133   UINT8           resize_pending;
134   UINT32          resize_width;
135   UINT32          resize_height;
185136
186137   // Stats
187   INT64           m_last_blit_time;
188   INT64           m_last_blit_pixels;
138   INT64           last_blit_time;
139   INT64           last_blit_pixels;
189140};
190141
191142//============================================================
r242703r242704
200151static void drawsdl2_window_resize(sdl_window_info *window, int width, int height);
201152static void drawsdl2_window_destroy(sdl_window_info *window);
202153static int drawsdl2_window_draw(sdl_window_info *window, UINT32 dc, int update);
203static void drawsdl2_set_target_bounds(sdl_window_info *window);
154static render_primitive_list &drawsdl2_window_get_primitives(sdl_window_info *window);
204155static void drawsdl2_destroy_all_textures(sdl_window_info *window);
205156static void drawsdl2_window_clear(sdl_window_info *window);
206157static int drawsdl2_xy_to_render_target(sdl_window_info *window, int x, int y, int *xt, int *yt);
158static void drawsdl2_destroy_texture(sdl_info *sdl, texture_info *texture);
207159
208160//============================================================
161//  Textures
162//============================================================
163
164static void texture_set_data(sdl_info *sdl, texture_info *texture, const render_texinfo *texsource, UINT32 flags);
165static texture_info *texture_create(sdl_window_info *window, const render_texinfo *texsource, quad_setup_data *setup, UINT32 flags);
166static texture_info *texture_find(sdl_info *sdl, const render_primitive *prim, quad_setup_data *setup);
167static texture_info * texture_update(sdl_window_info *window, const render_primitive *prim);
168
169
170//============================================================
209171//  TEXCOPY FUNCS
210172//============================================================
211173
r242703r242704
224186#define ENTRY_BM(a,b,c,d,f,bm) { SDL_TEXFORMAT_ ## a, SDL_PIXELFORMAT_ ## b, c, d, texcopy_ ## f, bm, #a, #b, 0, 0, 0, 0}
225187#define ENTRY_LR(a,b,c,d,f) { SDL_TEXFORMAT_ ## a, SDL_PIXELFORMAT_ ## b, c, d, texcopy_ ## f, BM_ALL, #a, #b, 0, 0, 0, -1}
226188
227static copy_info_t blit_info_default[] =
189static copy_info blit_info_default[] =
228190{
229191   /* no rotation */
230192   ENTRY(ARGB32,           ARGB8888,   4, 0, NULL),
231193   ENTRY_LR(ARGB32,        RGB888,     4, 0, argb32_rgb32),
232   /* Entry primarily for directfb */
194   /* Entry for primarily for directfb */
233195   ENTRY_BM(ARGB32,        RGB888,     4, 0, argb32_rgb32, SDL_BLENDMODE_ADD),
234196   ENTRY_BM(ARGB32,        RGB888,     4, 0, argb32_rgb32, SDL_BLENDMODE_MOD),
235197   ENTRY_BM(ARGB32,        RGB888,     4, 0, argb32_rgb32, SDL_BLENDMODE_NONE),
r242703r242704
269231   /* rotation */
270232   ENTRY(ARGB32,           ARGB8888,   4, 1, rot_argb32_argb32),
271233   ENTRY_LR(ARGB32,        RGB888,     4, 1, rot_argb32_rgb32),
272   /* Entry primarily for directfb */
234   /* Entry for primarily for directfb */
273235   ENTRY_BM(ARGB32,        RGB888,     4, 1, rot_argb32_rgb32, SDL_BLENDMODE_ADD),
274236   ENTRY_BM(ARGB32,        RGB888,     4, 1, rot_argb32_rgb32, SDL_BLENDMODE_MOD),
275237   ENTRY_BM(ARGB32,        RGB888,     4, 1, rot_argb32_rgb32, SDL_BLENDMODE_NONE),
r242703r242704
303265{ -1 },
304266};
305267
306static copy_info_t *blit_info[SDL_TEXFORMAT_LAST+1];
268static copy_info *blit_info[SDL_TEXFORMAT_LAST+1];
307269
308270static struct
309271{
r242703r242704
322284   return floor(f + 0.5f);
323285}
324286
325INLINE HashT texture_compute_hash(const render_texinfo &texture, const UINT32 flags)
287INLINE HashT texture_compute_hash(const render_texinfo *texture, UINT32 flags)
326288{
327   return (HashT)texture.base ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
289   return (HashT)texture->base ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
328290}
329291
330INLINE SDL_BlendMode map_blendmode(const int blendmode)
292INLINE SDL_BlendMode map_blendmode(int blendmode)
331293{
332294   switch (blendmode)
333295   {
r242703r242704
353315   UINT32 sa = (UINT32)(255.0f * color->a);
354316
355317
356   if (color->r >= 1.0f && color->g >= 1.0f && color->b >= 1.0f && is_opaque(color->a))
318   if (color->r >= 1.0f && color->g >= 1.0f && color->b >= 1.0f && IS_OPAQUE(color->a))
357319   {
358320      SDL_SetTextureColorMod(texture_id, 0xFF, 0xFF, 0xFF);
359321      SDL_SetTextureAlphaMod(texture_id, 0xFF);
360322   }
361323   /* coloring-only case */
362   else if (is_opaque(color->a))
324   else if (IS_OPAQUE(color->a))
363325   {
364326      SDL_SetTextureColorMod(texture_id, sr, sg, sb);
365327      SDL_SetTextureAlphaMod(texture_id, 0xFF);
366328   }
367329   /* alpha and/or coloring case */
368   else if (!is_transparent(color->a))
330   else if (!IS_TRANSPARENT(color->a))
369331   {
370332      SDL_SetTextureColorMod(texture_id, sr, sg, sb);
371333      SDL_SetTextureAlphaMod(texture_id, sa);
r242703r242704
377339   }
378340}
379341
380void texture_info::render_quad(const render_primitive *prim, const int x, const int y)
342INLINE void render_quad(sdl_info *sdl, texture_info *texture, render_primitive *prim, int x, int y)
381343{
344   SDL_Texture *texture_id;
382345   SDL_Rect target_rect;
383346
384347   target_rect.x = x;
r242703r242704
386349   target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
387350   target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
388351
352   if (texture)
353   {
354      texture_id = texture->texture_id;
355
356      texture->copyinfo->time -= osd_ticks();
389357#if 0
390   // no longer supported in SDL2
391    if ((PRIMFLAG_GET_SCREENTEX(prim->m_flags)) && video_config.filter)
392    {
393        SDL_SetTextureScaleMode(texture->m_texture_id,  DRAW2_SCALEMODE_BEST);
394    }
395    else
396    {
397        SDL_SetTextureScaleMode(texture->m_texture_id,  DRAW2_SCALEMODE_NEAREST);
398    }
358      if ((PRIMFLAG_GET_SCREENTEX(prim->flags)) && video_config.filter)
359      {
360         SDL_SetTextureScaleMode(texture->texture_id,  DRAW2_SCALEMODE_BEST);
361      }
362      else
363      {
364         SDL_SetTextureScaleMode(texture->texture_id,  DRAW2_SCALEMODE_NEAREST);
365      }
399366#endif
400    SDL_SetTextureBlendMode(m_texture_id, m_sdl_blendmode);
401    set_coloralphamode(m_texture_id, &prim->color);
402    SDL_RenderCopy(m_renderer,  m_texture_id, NULL, &target_rect);
367      SDL_SetTextureBlendMode(texture_id, texture->sdl_blendmode);
368      set_coloralphamode(texture_id, &prim->color);
369      SDL_RenderCopy(sdl->sdl_renderer,  texture_id, NULL, &target_rect);
370      texture->copyinfo->time += osd_ticks();
371
372      texture->copyinfo->pixel_count += MAX(STAT_PIXEL_THRESHOLD , (texture->rawwidth * texture->rawheight));
373      if (sdl->last_blit_pixels)
374      {
375         texture->copyinfo->time += (sdl->last_blit_time * (INT64) (texture->rawwidth * texture->rawheight)) / (INT64) sdl->last_blit_pixels;
376      }
377      texture->copyinfo->samples++;
378      texture->copyinfo->perf = ( texture->copyinfo->pixel_count * (osd_ticks_per_second()/1000)) / texture->copyinfo->time;
379   }
380   else
381   {
382      UINT32 sr = (UINT32)(255.0f * prim->color.r);
383      UINT32 sg = (UINT32)(255.0f * prim->color.g);
384      UINT32 sb = (UINT32)(255.0f * prim->color.b);
385      UINT32 sa = (UINT32)(255.0f * prim->color.a);
386
387      SDL_SetRenderDrawBlendMode(sdl->sdl_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
388      SDL_SetRenderDrawColor(sdl->sdl_renderer, sr, sg, sb, sa);
389      SDL_RenderFillRect(sdl->sdl_renderer, &target_rect);
390   }
403391}
404392
405void sdl_info::render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y)
393#if 0
394static int RendererSupportsFormat(Uint32 format, Uint32 access, const char *sformat)
406395{
407    SDL_Rect target_rect;
396   struct SDL_RendererInfo render_info;
397   int i;
408398
409    target_rect.x = x;
410    target_rect.y = y;
411    target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
412    target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
399   SDL_GetRendererInfo(&render_info);
413400
414    if (texture)
415    {
416        copy_info_t *copyinfo = texture->m_copyinfo;
417        copyinfo->time -= osd_ticks();
418        texture->render_quad(prim, x, y);
419        copyinfo->time += osd_ticks();
420
421        copyinfo->pixel_count += MAX(STAT_PIXEL_THRESHOLD , (texture->raw_width() * texture->raw_height()));
422        if (m_last_blit_pixels)
423        {
424            copyinfo->time += (m_last_blit_time * (INT64) (texture->raw_width() * texture->raw_height())) / (INT64) m_last_blit_pixels;
425        }
426        copyinfo->samples++;
427        copyinfo->perf = ( texture->m_copyinfo->pixel_count * (osd_ticks_per_second()/1000)) / texture->m_copyinfo->time;
428    }
429    else
430    {
431        UINT32 sr = (UINT32)(255.0f * prim->color.r);
432        UINT32 sg = (UINT32)(255.0f * prim->color.g);
433        UINT32 sb = (UINT32)(255.0f * prim->color.b);
434        UINT32 sa = (UINT32)(255.0f * prim->color.a);
435
436        SDL_SetRenderDrawBlendMode(m_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
437        SDL_SetRenderDrawColor(m_renderer, sr, sg, sb, sa);
438        SDL_RenderFillRect(m_renderer, &target_rect);
439    }
401   for (i=0; i < render_info.num_texture_formats; i++)
402   {
403      if (format == render_info.texture_formats[i])
404         return 1;
405   }
406   osd_printf_verbose("Pixelformat <%s> not supported\n", sformat);
407   return 0;
440408}
441
409#else
442410static int RendererSupportsFormat(SDL_Renderer *renderer, Uint32 format, Uint32 access, const char *sformat)
443411{
444412   int i;
r242703r242704
465433   fmt_support[i].status = 0;
466434   return 0;
467435}
436#endif
468437
469438//============================================================
470439//  drawsdl2_init
471440//============================================================
472441
473static void add_list(copy_info_t **head, copy_info_t *element, Uint32 bm)
442static void add_list(copy_info **head, copy_info *element, Uint32 bm)
474443{
475   copy_info_t *newci = global_alloc(copy_info_t);
444   copy_info *newci = (copy_info *) osd_malloc(sizeof(copy_info));
476445   *newci = *element;
477446
478447   newci->bm_mask = bm;
r242703r242704
480449   *head = newci;
481450}
482451
483static void expand_copy_info(copy_info_t *list)
452static void expand_copy_info(copy_info *list)
484453{
485   copy_info_t   *bi;
454   copy_info   *bi;
486455
487456   for (bi = list; bi->src_fmt != -1; bi++)
488457   {
r242703r242704
521490
522491   // No fatalerror here since not all video drivers support GL !
523492   if (SDL_GL_LoadLibrary(stemp) != 0) // Load library (default for e==NULL
524      osd_printf_warning("Warning: Unable to load opengl library: %s\n", stemp ? stemp : "<default>");
493      osd_printf_verbose("Warning: Unable to load opengl library: %s\n", stemp ? stemp : "<default>");
525494   else
526495      osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : "<default>");
527496
r242703r242704
536505static void drawsdl2_exit(void)
537506{
538507   int i;
539   copy_info_t *bi, *freeme;
508   copy_info *bi, *freeme;
540509   for (i = 0; i <= SDL_TEXFORMAT_LAST; i++)
541510      for (bi = blit_info[i]; bi != NULL; )
542511      {
r242703r242704
546515                  (int) bi->perf);
547516         freeme = bi;
548517         bi = bi->next;
549         global_free(freeme);
518         osd_free(freeme);
550519      }
551520}
552521
r242703r242704
559528   // fill in the callbacks
560529   window->create = drawsdl2_window_create;
561530   window->resize = drawsdl2_window_resize;
562   window->set_target_bounds = drawsdl2_set_target_bounds;
531   window->get_primitives = drawsdl2_window_get_primitives;
563532   window->draw = drawsdl2_window_draw;
564533   window->destroy = drawsdl2_window_destroy;
565534   window->destroy_all_textures = drawsdl2_destroy_all_textures;
r242703r242704
574543static int drawsdl2_window_create(sdl_window_info *window, int width, int height)
575544{
576545   // allocate memory for our structures
577   sdl_info *sdl = global_alloc(sdl_info);
546   sdl_info *sdl = (sdl_info *) osd_malloc(sizeof(*sdl));
578547
579548   osd_printf_verbose("Enter drawsdl2_window_create\n");
580549
550   memset(sdl, 0, sizeof(*sdl));
551
581552   window->dxdata = sdl;
582553
583   UINT32 extra_flags = (window->fullscreen() ?
554   sdl->extra_flags = (window->fullscreen ?
584555         SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
585556
586557   // create the SDL window
587   window->sdl_window = SDL_CreateWindow(window->title, window->monitor()->monitor_x, 0,
588         width, height, extra_flags);
558   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
559         width, height, sdl->extra_flags);
589560
590   if (window->fullscreen() && video_config.switchres)
561   if (window->fullscreen && video_config.switchres)
591562   {
592563      SDL_DisplayMode mode;
593      SDL_GetCurrentDisplayMode(window->monitor()->handle, &mode);
564      SDL_GetCurrentDisplayMode(window->monitor->handle, &mode);
594565      mode.w = width;
595566      mode.h = height;
596567      if (window->refresh)
r242703r242704
623594   // create renderer
624595
625596   if (video_config.waitvsync)
626      sdl->m_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
597      sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
627598   else
628      sdl->m_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_ACCELERATED);
599      sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_ACCELERATED);
629600
630   if (!sdl->m_renderer)
601   if (!sdl->sdl_renderer)
631602   {
632603      fatalerror("Error on creating renderer: %s\n", SDL_GetError());
633604   }
r242703r242704
640611   SDL_GetWindowSize(window->sdl_window, &window->width, &window->height);
641612
642613
643   sdl->m_blittimer = 3;
614   sdl->blittimer = 3;
644615
645   SDL_RenderPresent(sdl->m_renderer);
616   // in case any textures try to come up before these are validated,
617   // OpenGL guarantees all implementations can handle something this size.
618   sdl->texture_max_width = 64;
619   sdl->texture_max_height = 64;
620
621   SDL_RenderPresent(sdl->sdl_renderer);
646622   osd_printf_verbose("Leave drawsdl2_window_create\n");
647623   return 0;
648624}
r242703r242704
655631{
656632   sdl_info *sdl = (sdl_info *) window->dxdata;
657633
658   sdl->m_resize_pending = 1;
659   sdl->m_resize_height = height;
660   sdl->m_resize_width = width;
634   sdl->resize_pending = 1;
635   sdl->resize_height = height;
636   sdl->resize_width = width;
661637
662638   window->width = width;
663639   window->height = height;
664640
665   sdl->m_blittimer = 3;
641   sdl->blittimer = 3;
666642
667643}
668644
r242703r242704
674650{
675651   sdl_info *sdl = (sdl_info *) window->dxdata;
676652
677   *xt = x - sdl->m_hofs;
678   *yt = y - sdl->m_vofs;
653   *xt = x - sdl->last_hofs;
654   *yt = y - sdl->last_vofs;
679655   if (*xt<0 || *xt >= window->blitwidth)
680656      return 0;
681657   if (*yt<0 || *yt >= window->blitheight)
r242703r242704
687663//  drawsdl2_window_get_primitives
688664//============================================================
689665
690static void drawsdl2_set_target_bounds(sdl_window_info *window)
666static render_primitive_list &drawsdl2_window_get_primitives(sdl_window_info *window)
691667{
692   window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor()));
668   if ((!window->fullscreen) || (video_config.switchres))
669   {
670      sdlwindow_blit_surface_size(window, window->width, window->height);
671   }
672   else
673   {
674      sdlwindow_blit_surface_size(window, window->monitor->center_width, window->monitor->center_height);
675   }
676   window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor));
677   return window->target->get_primitives();
693678}
694679
695680//============================================================
r242703r242704
709694      return 0;
710695   }
711696
712   if (sdl->m_resize_pending)
697   if (sdl->resize_pending)
713698   {
714      SDL_SetWindowSize(window->sdl_window, sdl->m_resize_width, sdl->m_resize_height);
699      SDL_SetWindowSize(window->sdl_window, sdl->resize_width, sdl->resize_height);
715700      SDL_GetWindowSize(window->sdl_window, &window->width, &window->height);
716      sdl->m_resize_pending = 0;
717      SDL_RenderSetViewport(sdl->m_renderer, NULL);
701      sdl->resize_pending = 0;
702      SDL_RenderSetViewport(sdl->sdl_renderer, NULL);
718703   }
719704
720705   //SDL_SelectRenderer(window->sdl_window);
721706
722   if (sdl->m_blittimer > 0)
707   if (sdl->blittimer > 0)
723708   {
724709      /* SDL Underlays need alpha = 0 ! */
725      SDL_SetRenderDrawBlendMode(sdl->m_renderer, SDL_BLENDMODE_NONE);
710      SDL_SetRenderDrawBlendMode(sdl->sdl_renderer, SDL_BLENDMODE_NONE);
726711      //SDL_SetRenderDrawColor(0,0,0,255);
727      SDL_SetRenderDrawColor(sdl->m_renderer, 0,0,0,0);
728      SDL_RenderFillRect(sdl->m_renderer, NULL);
729      sdl->m_blittimer--;
712      SDL_SetRenderDrawColor(sdl->sdl_renderer, 0,0,0,0);
713      SDL_RenderFillRect(sdl->sdl_renderer, NULL);
714      sdl->blittimer--;
730715   }
731716
732717   // compute centering parameters
r242703r242704
736721   {
737722      int ch, cw;
738723
739      if ((window->fullscreen()) && (!video_config.switchres))
724      if ((window->fullscreen) && (!video_config.switchres))
740725      {
741         ch = window->monitor()->center_height;
742         cw = window->monitor()->center_width;
726         ch = window->monitor->center_height;
727         cw = window->monitor->center_width;
743728      }
744729      else
745730      {
r242703r242704
757742      }
758743   }
759744
760   sdl->m_hofs = hofs;
761   sdl->m_vofs = vofs;
745   sdl->last_hofs = hofs;
746   sdl->last_vofs = vofs;
762747
763748   window->primlist->acquire_lock();
764749
r242703r242704
775760            sb = (int)(255.0f * prim->color.b);
776761            sa = (int)(255.0f * prim->color.a);
777762
778            SDL_SetRenderDrawBlendMode(sdl->m_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
779            SDL_SetRenderDrawColor(sdl->m_renderer, sr, sg, sb, sa);
780            SDL_RenderDrawLine(sdl->m_renderer, prim->bounds.x0 + hofs, prim->bounds.y0 + vofs,
763            SDL_SetRenderDrawBlendMode(sdl->sdl_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
764            SDL_SetRenderDrawColor(sdl->sdl_renderer, sr, sg, sb, sa);
765            SDL_RenderDrawLine(sdl->sdl_renderer, prim->bounds.x0 + hofs, prim->bounds.y0 + vofs,
781766                  prim->bounds.x1 + hofs, prim->bounds.y1 + vofs);
782767            break;
783768         case render_primitive::QUAD:
784            texture = sdl->texture_update(*prim);
769            texture = texture_update(window, prim);
785770            if (texture)
786               blit_pixels += (texture->raw_height() * texture->raw_width());
787            sdl->render_quad(texture, prim,
771               blit_pixels += (texture->rawheight * texture->rawwidth);
772            render_quad(sdl, texture, prim,
788773                  round_nearest(hofs + prim->bounds.x0),
789774                  round_nearest(vofs + prim->bounds.y0));
790775            break;
r242703r242704
795780
796781   window->primlist->release_lock();
797782
798   sdl->m_last_blit_pixels = blit_pixels;
799   sdl->m_last_blit_time = -osd_ticks();
800   SDL_RenderPresent(sdl->m_renderer);
801   sdl->m_last_blit_time += osd_ticks();
783   sdl->last_blit_pixels = blit_pixels;
784   sdl->last_blit_time = -osd_ticks();
785   SDL_RenderPresent(sdl->sdl_renderer);
786   sdl->last_blit_time += osd_ticks();
802787
803788   return 0;
804789}
r242703r242704
812797{
813798   sdl_info *sdl = (sdl_info *) window->dxdata;
814799
815   sdl->m_blittimer = 2;
800   sdl->blittimer = 2;
816801}
817802
818803
r242703r242704
834819
835820   SDL_DestroyWindow(window->sdl_window);
836821
837   global_free(sdl);
822   osd_free(sdl);
838823   window->dxdata = NULL;
839824}
840825
r242703r242704
846831//  texture_compute_size and type
847832//============================================================
848833
849copy_info_t *texture_info::compute_size_type()
834static copy_info *texture_compute_size_type(SDL_Renderer *renderer, const render_texinfo *texsource, texture_info *texture, UINT32 flags)
850835{
851   copy_info_t *bi;
852   copy_info_t *result = NULL;
836   copy_info *bi;
837   copy_info *result = NULL;
853838   int maxperf = 0;
839   //int bm = PRIMFLAG_GET_BLENDMODE(flags);
854840
855   for (bi = blit_info[m_format]; bi != NULL; bi = bi->next)
841   for (bi = blit_info[texture->format]; bi != NULL; bi = bi->next)
856842   {
857      if ((m_is_rotated == bi->rotate)
858            && (m_sdl_blendmode == bi->bm_mask))
843      if ((texture->is_rotated == bi->rotate)
844            && (texture->sdl_blendmode == bi->bm_mask))
859845      {
860         if (RendererSupportsFormat(m_renderer, bi->dst_fmt, m_sdl_access, bi->dstname))
846         if (RendererSupportsFormat(renderer, bi->dst_fmt, texture->sdl_access, bi->dstname))
861847         {
862             int perf = bi->perf;
863            if (perf == 0)
848            if (bi->perf == 0)
864849               return bi;
865            else if (perf > (maxperf * 102) / 100)
850            else if (bi->perf > (maxperf * 102) / 100)
866851            {
867852               result = bi;
868               maxperf = perf;
853               maxperf = bi->perf;
869854            }
870855         }
871856      }
r242703r242704
873858   if (result)
874859      return result;
875860   /* try last resort handlers */
876   for (bi = blit_info[m_format]; bi != NULL; bi = bi->next)
861   for (bi = blit_info[texture->format]; bi != NULL; bi = bi->next)
877862   {
878      if ((m_is_rotated == bi->rotate)
879         && (m_sdl_blendmode == bi->bm_mask))
880         if (RendererSupportsFormat(m_renderer, bi->dst_fmt, m_sdl_access, bi->dstname))
863      if ((texture->is_rotated == bi->rotate)
864         && (texture->sdl_blendmode == bi->bm_mask))
865         if (RendererSupportsFormat(renderer, bi->dst_fmt, texture->sdl_access, bi->dstname))
881866            return bi;
882867   }
883868   //FIXME: crash implement a -do nothing handler */
r242703r242704
885870}
886871
887872//============================================================
888//  texture_info::matches
873//  texture_create
889874//============================================================
890875
891bool texture_info::matches(const render_primitive &prim, const quad_setup_data &setup)
876static texture_info *texture_create(sdl_window_info *window, const render_texinfo *texsource, quad_setup_data *setup, UINT32 flags)
892877{
893    return  texinfo().base == prim.texture.base &&
894            texinfo().width == prim.texture.width &&
895            texinfo().height == prim.texture.height &&
896            texinfo().rowpixels == prim.texture.rowpixels &&
897            m_setup.dudx == setup.dudx &&
898            m_setup.dvdx == setup.dvdx &&
899            m_setup.dudy == setup.dudy &&
900            m_setup.dvdy == setup.dvdy &&
901            ((flags() ^ prim.flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0;
902}
878   sdl_info *sdl = (sdl_info *) window->dxdata;
879   texture_info *texture;
903880
904//============================================================
905//  texture_create
906//============================================================
881   // allocate a new texture
882   texture = (texture_info *) osd_malloc(sizeof(*texture));
883   memset(texture, 0, sizeof(*texture));
907884
908texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, UINT32 flags)
909{
910
911885   // fill in the core data
912    m_renderer = renderer;
913   m_hash = texture_compute_hash(texsource, flags);
914   m_flags = flags;
915   m_texinfo = texsource;
916   m_texinfo.seqid = -1; // force set data
917   m_is_rotated = FALSE;
918   m_setup = setup;
919   m_sdl_blendmode = map_blendmode(PRIMFLAG_GET_BLENDMODE(flags));
920   m_pitch = 0;
886   texture->hash = texture_compute_hash(texsource, flags);
887   texture->flags = flags;
888   texture->texinfo = *texsource;
889   texture->texinfo.seqid = -1; // force set data
890   texture->is_rotated = FALSE;
891   texture->setup = *setup;
892   texture->sdl_blendmode = map_blendmode(PRIMFLAG_GET_BLENDMODE(flags));
921893
922894   switch (PRIMFLAG_GET_TEXFORMAT(flags))
923895   {
924896      case TEXFORMAT_ARGB32:
925         m_format = SDL_TEXFORMAT_ARGB32;
897         texture->format = SDL_TEXFORMAT_ARGB32;
926898         break;
927899      case TEXFORMAT_RGB32:
928         m_format = texsource.palette() ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32;
900         texture->format = texsource->palette ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32;
929901         break;
930902      case TEXFORMAT_PALETTE16:
931         m_format = SDL_TEXFORMAT_PALETTE16;
903         texture->format = SDL_TEXFORMAT_PALETTE16;
932904         break;
933905      case TEXFORMAT_PALETTEA16:
934         m_format = SDL_TEXFORMAT_PALETTE16A;
906         texture->format = SDL_TEXFORMAT_PALETTE16A;
935907         break;
936908      case TEXFORMAT_YUY16:
937         m_format = texsource.palette() ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16;
909         texture->format = texsource->palette ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16;
938910         break;
939911
940912      default:
941913         osd_printf_error("Unknown textureformat %d\n", PRIMFLAG_GET_TEXFORMAT(flags));
942914   }
943915
944   if (setup.rotwidth != m_texinfo.width || setup.rotheight != m_texinfo.height
945         || setup.dudx < 0 || setup.dvdy < 0)
946      m_is_rotated = TRUE;
916   texture->rawwidth = texsource->width;
917   texture->rawheight = texsource->height;
918   if (setup->rotwidth != texture->rawwidth || setup->rotheight != texture->rawheight
919         || setup->dudx < 0 )
920      texture->is_rotated = TRUE;
947921   else
948      m_is_rotated = FALSE;
922      texture->is_rotated = FALSE;
949923
950   //m_sdl_access = SDL_TEXTUREACCESS_STATIC;
951   m_sdl_access = SDL_TEXTUREACCESS_STREAMING;
924   //texture->sdl_access = SDL_TEXTUREACCESS_STATIC;
925   texture->sdl_access = SDL_TEXTUREACCESS_STREAMING;
952926
953927   // Watch out for 0x0 textures ...
954   if (!m_setup.rotwidth || !m_setup.rotheight)
928   if (!texture->setup.rotwidth || !texture->setup.rotheight)
955929      osd_printf_warning("Trying to create texture with zero dim\n");
956930
957   // set copy_info
931   // compute the size
932   texture->copyinfo = texture_compute_size_type(sdl->sdl_renderer, texsource, texture, flags);
958933
959   m_copyinfo = compute_size_type();
934   texture->texture_id = SDL_CreateTexture(sdl->sdl_renderer, texture->copyinfo->dst_fmt, texture->sdl_access,
935         texture->setup.rotwidth, texture->setup.rotheight);
960936
961   m_texture_id = SDL_CreateTexture(m_renderer, m_copyinfo->dst_fmt, m_sdl_access,
962         m_setup.rotwidth, m_setup.rotheight);
937   if (!texture->texture_id)
938      osd_printf_error("Error creating texture: %d x %d, pixelformat %s error: %s\n", texture->setup.rotwidth, texture->setup.rotheight,
939            texture->copyinfo->dstname, SDL_GetError());
963940
964   if (!m_texture_id)
965      osd_printf_error("Error creating texture: %d x %d, pixelformat %s error: %s\n", m_setup.rotwidth, m_setup.rotheight,
966            m_copyinfo->dstname, SDL_GetError());
967
968   if (m_sdl_access == SDL_TEXTUREACCESS_STATIC)
941   if ( (texture->copyinfo->func != NULL) && (texture->sdl_access == SDL_TEXTUREACCESS_STATIC))
969942   {
970       if (m_copyinfo->func != NULL)
971           m_pixels = malloc(m_setup.rotwidth * m_setup.rotheight * m_copyinfo->dst_bpp);
972       else
973           m_pixels = NULL;
943      texture->pixels = osd_malloc_array(texture->setup.rotwidth * texture->setup.rotheight * texture->copyinfo->dst_bpp);
944      texture->pixels_own=TRUE;
974945   }
975   m_last_access = osd_ticks();
946   /* add us to the texture list */
947   texture->next = sdl->texlist;
948   sdl->texlist = texture;
976949
977}
950   texture->last_access = osd_ticks();
978951
979texture_info::~texture_info()
980{
981    SDL_DestroyTexture(m_texture_id);
982    if ( is_pixels_owned() && m_pixels != NULL )
983        free(m_pixels);
952   return texture;
984953}
985954
986955//============================================================
987956//  texture_set_data
988957//============================================================
989958
990void texture_info::set_data(const render_texinfo &texsource, const UINT32 flags)
959static void texture_set_data(sdl_info *sdl, texture_info *texture, const render_texinfo *texsource, UINT32 flags)
991960{
992   m_copyinfo->time -= osd_ticks();
993   if (m_sdl_access == SDL_TEXTUREACCESS_STATIC)
961   texture->copyinfo->time -= osd_ticks();
962   if (texture->sdl_access == SDL_TEXTUREACCESS_STATIC)
994963   {
995      if ( m_copyinfo->func )
964      if ( texture->copyinfo->func )
996965      {
997         m_pitch = m_setup.rotwidth * m_copyinfo->dst_bpp;
998         m_copyinfo->func(this, &texsource);
966         texture->pitch = texture->setup.rotwidth * texture->copyinfo->dst_bpp;
967         texture->copyinfo->func(texture, texsource);
999968      }
1000969      else
1001970      {
1002         m_pixels = texsource.base;
1003         m_pitch = m_texinfo.rowpixels * m_copyinfo->dst_bpp;
971         texture->pixels = texsource->base;
972         texture->pitch = texture->texinfo.rowpixels * texture->copyinfo->dst_bpp;
1004973      }
1005      SDL_UpdateTexture(m_texture_id, NULL, m_pixels, m_pitch);
974      SDL_UpdateTexture(texture->texture_id, NULL, texture->pixels, texture->pitch);
1006975   }
1007976   else
1008977   {
1009      SDL_LockTexture(m_texture_id, NULL, (void **) &m_pixels, &m_pitch);
1010      if ( m_copyinfo->func )
1011         m_copyinfo->func(this, &texsource);
978      SDL_LockTexture(texture->texture_id, NULL, (void **) &texture->pixels, &texture->pitch);
979      if ( texture->copyinfo->func )
980         texture->copyinfo->func(texture, texsource);
1012981      else
1013982      {
1014         UINT8 *src = (UINT8 *) texsource.base;
1015         UINT8 *dst = (UINT8 *) m_pixels;
1016         int spitch = texsource.rowpixels * m_copyinfo->dst_bpp;
1017         int num = texsource.width * m_copyinfo->dst_bpp;
1018         int h = texsource.height;
983         UINT8 *src = (UINT8 *) texsource->base;
984         UINT8 *dst = (UINT8 *) texture->pixels;
985         int spitch = texsource->rowpixels * texture->copyinfo->dst_bpp;
986         int num = texsource->width * texture->copyinfo->dst_bpp;
987         int h = texsource->height;
1019988         while (h--) {
1020989            memcpy(dst, src, num);
1021990            src += spitch;
1022            dst += m_pitch;
991            dst += texture->pitch;
1023992         }
1024993      }
1025      SDL_UnlockTexture(m_texture_id);
994      SDL_UnlockTexture(texture->texture_id);
1026995   }
1027   m_copyinfo->time += osd_ticks();
996   texture->copyinfo->time += osd_ticks();
1028997}
1029998
1030999//============================================================
10311000//  compute rotation setup
10321001//============================================================
10331002
1034void quad_setup_data::compute(const render_primitive &prim)
1003static void compute_setup(sdl_info *sdl, const render_primitive *prim, quad_setup_data *setup, int flags)
10351004{
1036   const render_quad_texuv *texcoords = &prim.texcoords;
1037   int texwidth = prim.texture.width;
1038   int texheight = prim.texture.height;
1005   const render_quad_texuv *texcoords = &prim->texcoords;
1006   int texwidth = prim->texture.width;
1007   int texheight = prim->texture.height;
10391008   float fdudx, fdvdx, fdudy, fdvdy;
10401009   float width, height;
10411010   float fscale;
10421011   /* determine U/V deltas */
1043   if ((PRIMFLAG_GET_SCREENTEX(prim.flags)))
1012   if ((PRIMFLAG_GET_SCREENTEX(flags)))
10441013      fscale = (float) video_config.prescale;
10451014   else
10461015      fscale = 1.0f;
r242703r242704
10501019   fdudy = (texcoords->bl.u - texcoords->tl.u) / fscale; // b a12
10511020   fdvdy = (texcoords->bl.v - texcoords->tl.v) / fscale; // d a22
10521021
1053#if 0
1054   printf("tl.u %f tl.v %f\n", texcoords->tl.u, texcoords->tl.v);
1055    printf("tr.u %f tr.v %f\n", texcoords->tr.u, texcoords->tr.v);
1056    printf("bl.u %f bl.v %f\n", texcoords->bl.u, texcoords->bl.v);
1057    printf("br.u %f br.v %f\n", texcoords->br.u, texcoords->br.v);
10581022   /* compute start and delta U,V coordinates now */
1059#endif
10601023
1061   dudx = round_nearest(65536.0f * fdudx);
1062   dvdx = round_nearest(65536.0f * fdvdx);
1063   dudy = round_nearest(65536.0f * fdudy);
1064   dvdy = round_nearest(65536.0f * fdvdy);
1065   startu = round_nearest(65536.0f * (float) texwidth * texcoords->tl.u);
1066   startv = round_nearest(65536.0f * (float) texheight * texcoords->tl.v);
1024   setup->dudx = round_nearest(65536.0f * fdudx);
1025   setup->dvdx = round_nearest(65536.0f * fdvdx);
1026   setup->dudy = round_nearest(65536.0f * fdudy);
1027   setup->dvdy = round_nearest(65536.0f * fdvdy);
1028   setup->startu = round_nearest(65536.0f * (float) texwidth * texcoords->tl.u);
1029   setup->startv = round_nearest(65536.0f * (float) texheight * texcoords->tl.v);
10671030
10681031   /* clamp to integers */
10691032
10701033   width = fabs((fdudx * (float) (texwidth) + fdvdx * (float) (texheight)) * fscale * fscale);
10711034   height = fabs((fdudy * (float)(texwidth) + fdvdy * (float) (texheight)) * fscale * fscale);
10721035
1073   rotwidth = width;
1074   rotheight = height;
1036   setup->rotwidth = width;
1037   setup->rotheight = height;
10751038
1076   startu += (dudx + dudy) / 2;
1077   startv += (dvdx + dvdy) / 2;
1039   setup->startu += (setup->dudx + setup->dudy) / 2;
1040   setup->startv += (setup->dvdx + setup->dvdy) / 2;
10781041
10791042}
10801043
r242703r242704
10821045//  texture_find
10831046//============================================================
10841047
1085texture_info *sdl_info::texture_find(const render_primitive &prim, const quad_setup_data &setup)
1048static texture_info *texture_find(sdl_info *sdl, const render_primitive *prim, quad_setup_data *setup)
10861049{
1087   HashT texhash = texture_compute_hash(prim.texture, prim.flags);
1050   HashT texhash = texture_compute_hash(&prim->texture, prim->flags);
10881051   texture_info *texture;
10891052   osd_ticks_t now = osd_ticks();
10901053
10911054   // find a match
1092   for (texture = m_texlist.first(); texture != NULL; )
1093      if (texture->hash() == texhash &&
1094         texture->matches(prim, setup))
1055   for (texture = sdl->texlist; texture != NULL; )
1056      if (texture->hash == texhash &&
1057         texture->texinfo.base == prim->texture.base &&
1058         texture->texinfo.width == prim->texture.width &&
1059         texture->texinfo.height == prim->texture.height &&
1060         texture->texinfo.rowpixels == prim->texture.rowpixels &&
1061         texture->setup.dudx == setup->dudx &&
1062         texture->setup.dvdx == setup->dvdx &&
1063         texture->setup.dudy == setup->dudy &&
1064         texture->setup.dvdy == setup->dvdy &&
1065         ((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
10951066      {
1096         /* would we choose another blitter based on performance ? */
1097         if ((texture->m_copyinfo->samples & 0x7f) == 0x7f)
1067         /* would we choose another blitter ? */
1068         if ((texture->copyinfo->samples & 0x1f) == 0x1f)
10981069         {
1099            if (texture->m_copyinfo != texture->compute_size_type())
1070            if (texture->copyinfo != texture_compute_size_type(sdl->sdl_renderer, &texture->texinfo, texture, prim->flags))
11001071               return NULL;
1072#if 0
1073            else
1074            {
1075               /* reset stats */
1076               texture->copyinfo->samples = 0;
1077               texture->copyinfo->time = 0;
1078               texture->copyinfo->pixel_count = 0;
1079            }
1080#endif
11011081         }
1102         texture->m_last_access = now;
1082         texture->last_access = now;
11031083         return texture;
11041084      }
11051085      else
11061086      {
11071087         /* free resources not needed any longer? */
11081088         texture_info *expire = texture;
1109         texture = texture->next();
1110         if (now - expire->m_last_access > osd_ticks_per_second())
1111            m_texlist.remove(*expire);
1089         texture = texture->next;
1090         if (now - expire->last_access > osd_ticks_per_second())
1091            drawsdl2_destroy_texture(sdl, expire);
11121092      }
11131093
11141094   // nothing found
r242703r242704
11191099//  texture_update
11201100//============================================================
11211101
1122texture_info * sdl_info::texture_update(const render_primitive &prim)
1102static texture_info * texture_update(sdl_window_info *window, const render_primitive *prim)
11231103{
1104   sdl_info *sdl = (sdl_info *) window->dxdata;
11241105   quad_setup_data setup;
11251106   texture_info *texture;
11261107
1127   setup.compute(prim);
1108   compute_setup(sdl, prim, &setup, prim->flags);
11281109
1129   texture = texture_find(prim, setup);
1110   texture = texture_find(sdl, prim, &setup);
11301111
11311112   // if we didn't find one, create a new texture
1132   if (texture == NULL && prim.texture.base != NULL)
1113   if (texture == NULL && prim->texture.base != NULL)
11331114   {
1134      texture = global_alloc(texture_info(m_renderer, prim.texture, setup, prim.flags));
1135       /* add us to the texture list */
1136      m_texlist.prepend(*texture);
1137
1115      texture = texture_create(window, &prim->texture, &setup, prim->flags);
11381116   }
11391117
11401118   if (texture != NULL)
11411119   {
1142      if (prim.texture.base != NULL && texture->texinfo().seqid != prim.texture.seqid)
1120      if (prim->texture.base != NULL && texture->texinfo.seqid != prim->texture.seqid)
11431121      {
1144         texture->texinfo().seqid = prim.texture.seqid;
1122         texture->texinfo.seqid = prim->texture.seqid;
11451123         // if we found it, but with a different seqid, copy the data
1146         texture->set_data(prim.texture, prim.flags);
1124         texture_set_data(sdl, texture, &prim->texture, prim->flags);
11471125      }
11481126
11491127   }
11501128   return texture;
11511129}
11521130
1131static void drawsdl2_destroy_texture(sdl_info *sdl, texture_info *texture)
1132{
1133   texture_info *p;
11531134
1135   SDL_DestroyTexture(texture->texture_id);
1136   if ( texture->pixels_own )
1137   {
1138      osd_free(texture->pixels);
1139      texture->pixels=NULL;
1140      texture->pixels_own=FALSE;
1141   }
1142
1143   for (p=sdl->texlist; p != NULL; p = p->next)
1144      if (p->next == texture)
1145         break;
1146   if (p == NULL)
1147      sdl->texlist = NULL;
1148   else
1149      p->next = texture->next;
1150   osd_free(texture);
1151}
1152
11541153static void drawsdl2_destroy_all_textures(sdl_window_info *window)
11551154{
11561155   sdl_info *sdl = (sdl_info *) window->dxdata;
1156   texture_info *next_texture=NULL, *texture = NULL;
1157   int lock=FALSE;
11571158
11581159   if (sdl == NULL)
11591160      return;
11601161
11611162   if(window->primlist)
11621163   {
1164      lock=TRUE;
11631165      window->primlist->acquire_lock();
1164        sdl->m_texlist.reset();
1165        window->primlist->release_lock();
11661166   }
1167   else
1168        sdl->m_texlist.reset();
1167
1168   texture = sdl->texlist;
1169
1170   while (texture)
1171   {
1172      next_texture = texture->next;
1173      drawsdl2_destroy_texture(sdl, texture);
1174      texture = next_texture;
1175   }
1176
1177   if (lock)
1178      window->primlist->release_lock();
11691179}
trunk/src/osd/sdl/drawogl.c
r242703r242704
161161/* texture_info holds information about a texture */
162162struct texture_info
163163{
164    texture_info()
165    : hash(0), flags(0), rawwidth(0), rawheight(0),
166      rawwidth_create(0), rawheight_create(0),
167      type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0),
168      texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL),
169      data_own(0), texCoordBufferName(0)
170    {
171        for (int i=0; i<2; i++)
172        {
173            mpass_textureunit[i] = 0;
174            mpass_texture_mamebm[i] = 0;
175            mpass_fbo_mamebm[i] = 0;
176            mpass_texture_scrn[i] = 0;
177            mpass_fbo_scrn[i] = 0;
178        }
179        for (int i=0; i<8; i++)
180            texCoord[i] = 0.0f;
181    }
182
183164   HashT               hash;               // hash value for the texture (must be >= pointer size)
184165   UINT32              flags;              // rendering flags
185166   render_texinfo      texinfo;            // copy of the texture info
r242703r242704
217198/* sdl_info is the information about SDL for the current screen */
218199struct sdl_info
219200{
220    sdl_info()
221    : blittimer(0), extra_flags(0),
222#if (SDLMAME_SDL2)
223      gl_context_id(0),
224#else
225      sdlsurf(NULL),
226#endif
227      initialized(0),
228      last_blendmode(0),
229      texture_max_width(0),
230      texture_max_height(0),
231      texpoweroftwo(0),
232      usevbo(0), usepbo(0), usefbo(0), useglsl(0), glsl(NULL),
233      glsl_program_num(0),
234      glsl_program_mb2sc(0),
235      usetexturerect(0),
236      init_context(0),
237      last_hofs(0.0f),
238      last_vofs(0.0f),
239      surf_w(0),
240      surf_h(0)
241    {
242        for (int i=0; i < HASH_SIZE + OVERFLOW_SIZE; i++)
243            texhash[i] = NULL;
244        for (int i=0; i < 2*GLSL_SHADER_MAX; i++)
245            glsl_program[i] = 0;
246        for (int i=0; i < 8; i++)
247            texVerticex[i] = 0.0f;
248    }
249
250201   INT32           blittimer;
251202   UINT32          extra_flags;
252203
r242703r242704
367318static void drawogl_window_resize(sdl_window_info *window, int width, int height);
368319static void drawogl_window_destroy(sdl_window_info *window);
369320static int drawogl_window_draw(sdl_window_info *window, UINT32 dc, int update);
370static void drawogl_set_target_bounds(sdl_window_info *window);
321static render_primitive_list &drawogl_window_get_primitives(sdl_window_info *window);
371322static void drawogl_destroy_all_textures(sdl_window_info *window);
372323static void drawogl_window_clear(sdl_window_info *window);
373324static int drawogl_xy_to_render_target(sdl_window_info *window, int x, int y, int *xt, int *yt);
r242703r242704
454405   // fill in the callbacks
455406   window->create = drawogl_window_create;
456407   window->resize = drawogl_window_resize;
457   window->set_target_bounds = drawogl_set_target_bounds;
408   window->get_primitives = drawogl_window_get_primitives;
458409   window->draw = drawogl_window_draw;
459410   window->destroy = drawogl_window_destroy;
460411   window->destroy_all_textures = drawogl_destroy_all_textures;
r242703r242704
536487   int has_and_allow_texturerect = 0;
537488
538489   // allocate memory for our structures
539   sdl = global_alloc(sdl_info);
490   sdl = (sdl_info *) osd_malloc(sizeof(*sdl));
491   memset(sdl, 0, sizeof(*sdl));
540492
541493   window->dxdata = sdl;
542494
543495#if (SDLMAME_SDL2)
544   sdl->extra_flags = (window->fullscreen() ?
496   sdl->extra_flags = (window->fullscreen ?
545497         SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
546498   sdl->extra_flags |= SDL_WINDOW_OPENGL;
547499
r242703r242704
558510   //load_gl_lib(window->machine());
559511
560512   // create the SDL window
561   window->sdl_window = SDL_CreateWindow(window->title, window->monitor()->monitor_x, 0,
513   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
562514         width, height, sdl->extra_flags);
563515
564516   if  (!window->sdl_window )
r242703r242704
567519      return 1;
568520   }
569521
570   if (window->fullscreen() && video_config.switchres)
522   if (window->fullscreen && video_config.switchres)
571523   {
572524      SDL_DisplayMode mode;
573      SDL_GetCurrentDisplayMode(window->monitor()->handle, &mode);
525      SDL_GetCurrentDisplayMode(window->monitor->handle, &mode);
574526      mode.w = width;
575527      mode.h = height;
576528      if (window->refresh)
r242703r242704
595547   SDL_GL_SetSwapInterval(video_config.waitvsync ? 2 : 0);
596548
597549#else
598   sdl->extra_flags = (window->fullscreen() ?  SDL_FULLSCREEN : SDL_RESIZABLE);
550   sdl->extra_flags = (window->fullscreen ?  SDL_FULLSCREEN : SDL_RESIZABLE);
599551   sdl->extra_flags |= SDL_OPENGL | SDL_DOUBLEBUF;
600552
601553   SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
r242703r242704
840792//  drawogl_window_get_primitives
841793//============================================================
842794
843static void drawogl_set_target_bounds(sdl_window_info *window)
795static render_primitive_list &drawogl_window_get_primitives(sdl_window_info *window)
844796{
845   window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor()));
797   if ((!window->fullscreen) || (video_config.switchres))
798   {
799      sdlwindow_blit_surface_size(window, window->width, window->height);
800   }
801   else
802   {
803      sdlwindow_blit_surface_size(window, window->monitor->center_width, window->monitor->center_height);
804   }
805   window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor));
806   return window->target->get_primitives();
846807}
847808
848809//============================================================
r242703r242704
11821143      screen_device_iterator myiter(window->machine().root_device());
11831144      for (screen = myiter.first(); screen != NULL; screen = myiter.next())
11841145      {
1185         if (window->index() == 0)
1146         if (window->index == 0)
11861147         {
11871148            if ((screen->width() != window->screen_width) || (screen->height() != window->screen_height))
11881149            {
r242703r242704
12191180   screen_device_iterator iter(window->machine().root_device());
12201181   for (screen = iter.first(); screen != NULL; screen = iter.next())
12211182   {
1222      if (scrnum == window->index())
1183      if (scrnum == window->index)
12231184      {
12241185         is_vector = (screen->screen_type() == SCREEN_TYPE_VECTOR) ? 1 : 0;
12251186         break;
r242703r242704
13101271   {
13111272      int ch, cw;
13121273
1313      if ((window->fullscreen()) && (!video_config.switchres))
1274      if ((window->fullscreen) && (!video_config.switchres))
13141275      {
1315         ch = window->monitor()->center_height;
1316         cw = window->monitor()->center_width;
1276         ch = window->monitor->center_height;
1277         cw = window->monitor->center_width;
13171278      }
13181279      else
13191280      {
r242703r242704
16511612   }
16521613#endif
16531614
1654   global_free(sdl);
1615   osd_free(sdl);
16551616   window->dxdata = NULL;
16561617}
16571618
r242703r242704
16931654   if    ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] &&
16941655         !texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_HAS_PALETTE] &&
16951656         texture->xprescale == 1 && texture->yprescale == 1 &&
1696         !texture->borderpix && !texsource->palette() &&
1657         !texture->borderpix && !texsource->palette &&
16971658         texsource->rowpixels <= sdl->texture_max_width )
16981659   {
16991660      texture->nocopy = TRUE;
r242703r242704
21072068   texture_info *texture;
21082069
21092070   // allocate a new texture
2110   texture = global_alloc(texture_info);
2071   texture = (texture_info *) malloc(sizeof(*texture));
2072   memset(texture, 0, sizeof(*texture));
21112073
21122074   // fill in the core data
21132075   texture->hash = texture_compute_hash(texsource, flags);
r242703r242704
21452107         texture->format = SDL_TEXFORMAT_ARGB32;
21462108         break;
21472109      case TEXFORMAT_RGB32:
2148         if (texsource->palette() != NULL)
2110         if (texsource->palette != NULL)
21492111            texture->format = SDL_TEXFORMAT_RGB32_PALETTED;
21502112         else
21512113            texture->format = SDL_TEXFORMAT_RGB32;
r242703r242704
21572119         texture->format = SDL_TEXFORMAT_PALETTE16A;
21582120         break;
21592121      case TEXFORMAT_YUY16:
2160         if (texsource->palette() != NULL)
2122         if (texsource->palette != NULL)
21612123            texture->format = SDL_TEXFORMAT_YUY16_PALETTED;
21622124         else
21632125            texture->format = SDL_TEXFORMAT_YUY16;
r242703r242704
21812143   {
21822144      if ( texture_shader_create(window, texsource, texture, flags) )
21832145      {
2184         global_free(texture);
2146         free(texture);
21852147         return NULL;
21862148      }
21872149   }
r242703r242704
22672229            sdl->texhash[i] = texture;
22682230            break;
22692231         }
2270      assert_always(i < HASH_SIZE + OVERFLOW_SIZE, "texture hash exhausted ...");
2232      assert(i < HASH_SIZE + OVERFLOW_SIZE);
22712233   }
22722234
22732235   if(sdl->usevbo)
r242703r242704
25992561            switch (PRIMFLAG_GET_TEXFORMAT(flags))
26002562            {
26012563               case TEXFORMAT_PALETTE16:
2602                  copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2564                  copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
26032565                  break;
26042566
26052567               case TEXFORMAT_PALETTEA16:
2606                  copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2568                  copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
26072569                  break;
26082570
26092571               case TEXFORMAT_RGB32:
2610                  copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2572                  copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
26112573                  break;
26122574
26132575               case TEXFORMAT_ARGB32:
2614                  copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2576                  copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
26152577                  break;
26162578
26172579               case TEXFORMAT_YUY16:
2618                  copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2580                  copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
26192581                  break;
26202582
26212583               default:
r242703r242704
26882650      texture->texinfo.width == prim->texture.width &&
26892651      texture->texinfo.height == prim->texture.height &&
26902652      texture->texinfo.rowpixels == prim->texture.rowpixels &&
2691      /* texture->texinfo.palette() == prim->texture.palette() && */
2653      texture->texinfo.palette == prim->texture.palette &&
26922654      ((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
26932655      return 1;
26942656   else
r242703r242704
30793041      sdl->texhash[i] = NULL;
30803042      if (texture != NULL)
30813043      {
3082            if(sdl->usevbo)
3083            {
3084                pfn_glDeleteBuffers( 1, &(texture->texCoordBufferName) );
3085                texture->texCoordBufferName=0;
3086            }
3044      if(sdl->usevbo)
3045      {
3046         pfn_glDeleteBuffers( 1, &(texture->texCoordBufferName) );
3047         texture->texCoordBufferName=0;
3048      }
30873049
3088            if(sdl->usepbo && texture->pbo)
3089            {
3090                pfn_glDeleteBuffers( 1, (GLuint *)&(texture->pbo) );
3091                texture->pbo=0;
3092            }
3050      if(sdl->usepbo && texture->pbo)
3051      {
3052         pfn_glDeleteBuffers( 1, (GLuint *)&(texture->pbo) );
3053         texture->pbo=0;
3054      }
30933055
3094            if( sdl->glsl_program_num > 1 )
3095            {
3096                assert(sdl->usefbo);
3097                pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_mamebm[0]);
3098                glDeleteTextures(2, (GLuint *)&texture->mpass_texture_mamebm[0]);
3099            }
3056      if( sdl->glsl_program_num > 1 )
3057      {
3058         assert(sdl->usefbo);
3059         pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_mamebm[0]);
3060         glDeleteTextures(2, (GLuint *)&texture->mpass_texture_mamebm[0]);
3061      }
31003062
3101            if ( sdl->glsl_program_mb2sc < sdl->glsl_program_num - 1 )
3102            {
3103                assert(sdl->usefbo);
3104                pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_scrn[0]);
3105                glDeleteTextures(2, (GLuint *)&texture->mpass_texture_scrn[0]);
3106            }
3063      if ( sdl->glsl_program_mb2sc < sdl->glsl_program_num - 1 )
3064      {
3065         assert(sdl->usefbo);
3066         pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_scrn[0]);
3067         glDeleteTextures(2, (GLuint *)&texture->mpass_texture_scrn[0]);
3068      }
31073069
3108            glDeleteTextures(1, (GLuint *)&texture->texture);
3109            if ( texture->data_own )
3110            {
3111                free(texture->data);
3112                texture->data=NULL;
3113                texture->data_own=FALSE;
3114            }
3115            global_free(texture);
3070      glDeleteTextures(1, (GLuint *)&texture->texture);
3071      if ( texture->data_own )
3072      {
3073         free(texture->data);
3074         texture->data=NULL;
3075         texture->data_own=FALSE;
31163076      }
3077      free(texture);
3078      }
31173079      i++;
31183080   }
31193081   if ( sdl->useglsl )
trunk/src/osd/sdl/drawsdl.c
r242703r242704
105105static int drawsdl_window_create(sdl_window_info *window, int width, int height);
106106static void drawsdl_window_resize(sdl_window_info *window, int width, int height);
107107static void drawsdl_window_destroy(sdl_window_info *window);
108static void drawsdl_set_target_bounds(sdl_window_info *window);
108static render_primitive_list &drawsdl_window_get_primitives(sdl_window_info *window);
109109static int drawsdl_window_draw(sdl_window_info *window, UINT32 dc, int update);
110110static void drawsdl_destroy_all_textures(sdl_window_info *window);
111111static void drawsdl_window_clear(sdl_window_info *window);
r242703r242704
221221   // fill in the callbacks
222222   window->create = drawsdl_window_create;
223223   window->resize = drawsdl_window_resize;
224   window->set_target_bounds = drawsdl_set_target_bounds;
224   window->get_primitives = drawsdl_window_get_primitives;
225225   window->draw = drawsdl_window_draw;
226226   window->destroy = drawsdl_window_destroy;
227227   window->destroy_all_textures = drawsdl_destroy_all_textures;
r242703r242704
251251   UINT32 fmt;
252252
253253   // Determine preferred pixelformat and set up yuv if necessary
254   SDL_GetCurrentDisplayMode(window->monitor()->handle, &mode);
254   SDL_GetCurrentDisplayMode(window->monitor->handle, &mode);
255255
256256   if (sdl->yuv_bitmap)
257257   {
r242703r242704
402402
403403   SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode);
404404
405   sdl->extra_flags = (window->fullscreen() ?
405   sdl->extra_flags = (window->fullscreen ?
406406         SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS
407407         | SDL_WINDOW_INPUT_GRABBED : SDL_WINDOW_RESIZABLE);
408408
409409   window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
410410         width, height, sdl->extra_flags);
411411
412   if (window->fullscreen() && video_config.switchres)
412   if (window->fullscreen && video_config.switchres)
413413   {
414414      SDL_DisplayMode mode;
415      SDL_GetCurrentDisplayMode(window->monitor()->handle, &mode);
415      SDL_GetCurrentDisplayMode(window->monitor->handle, &mode);
416416      mode.w = width;
417417      mode.h = height;
418418      if (window->refresh)
r242703r242704
424424
425425   SDL_ShowWindow(window->sdl_window);
426426
427   SDL_SetWindowFullscreen(window->sdl_window, (SDL_bool) window->fullscreen());
427   SDL_SetWindowFullscreen(window->sdl_window, (SDL_bool) window->fullscreen);
428428   SDL_GetWindowSize(window->sdl_window, &window->width, &window->height);
429429   SDL_RaiseWindow(window->sdl_window);
430430
431431   /* FIXME: Bug in SDL 1.3 */
432   if (window->fullscreen())
432   if (window->fullscreen)
433433      SDL_SetWindowGrab(window->sdl_window, SDL_TRUE);
434434
435435   // create a texture
r242703r242704
460460
461461         if (!found)
462462         {
463            fatalerror("window: Scale mode %s not supported!", sm->name);
463            osd_printf_verbose("window: Scale mode %s not supported!\n", sm->name);
464            window->machine().ui().popup_time(3, "Scale mode %s not supported!", sm->name);
464465         }
465466      }
466467   }
467468
468469   setup_texture(window, width, height);
469470#else
470   sdl->extra_flags = (window->fullscreen() ?  SDL_FULLSCREEN : SDL_RESIZABLE);
471   sdl->extra_flags = (window->fullscreen ?  SDL_FULLSCREEN : SDL_RESIZABLE);
471472
472473   sdl->extra_flags |= sm->extra_flags;
473474
r242703r242704
617618//  drawsdl_window_get_primitives
618619//============================================================
619620
620static void drawsdl_set_target_bounds(sdl_window_info *window)
621static render_primitive_list &drawsdl_window_get_primitives(sdl_window_info *window)
621622{
622623   sdl_info *sdl = (sdl_info *) window->dxdata;
623624   const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode];
624625
626   if ((!window->fullscreen) || (video_config.switchres))
627   {
628      sdlwindow_blit_surface_size(window, window->width, window->height);
629   }
630   else
631   {
632      sdlwindow_blit_surface_size(window, window->monitor->center_width, window->monitor->center_height);
633   }
634
625635   if (!sm->is_scale)
626      window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor()));
636      window->target->set_bounds(window->blitwidth, window->blitheight, sdlvideo_monitor_get_aspect(window->monitor));
627637   else
628638      window->target->set_bounds(sdl->hw_scale_width, sdl->hw_scale_height);
639
640   return window->target->get_primitives();
629641}
630642
631643//============================================================
r242703r242704
735747   // figure out what coordinate system to use for centering - in window mode it's always the
736748   // SDL surface size.  in fullscreen the surface covers all monitors, so center according to
737749   // the first one only
738   if ((window->fullscreen()) && (!video_config.switchres))
750   if ((window->fullscreen) && (!video_config.switchres))
739751   {
740      ch = window->monitor()->center_height;
741      cw = window->monitor()->center_width;
752      ch = window->monitor->center_height;
753      cw = window->monitor->center_width;
742754   }
743755   else
744756   {
trunk/src/osd/sdl/input.c
r242703r242704
15661566      {
15671567         if (w->resize_width && w->resize_height && ((now - w->last_resize) > osd_ticks_per_second() / 10))
15681568         {
1569            w->window_resize(w->resize_width, w->resize_height);
1569            sdlwindow_resize(w, w->resize_width, w->resize_height);
15701570            w->resize_width = 0;
15711571            w->resize_height = 0;
15721572         }
r242703r242704
19411941         machine.schedule_exit();
19421942         break;
19431943      case SDL_VIDEORESIZE:
1944         sdl_window_list->window_resize(event.resize.w, event.resize.h);
1944         sdlwindow_resize(sdl_window_list, event.resize.w, event.resize.h);
19451945         break;
19461946#else
19471947      case SDL_TEXTINPUT:
r242703r242704
19731973            app_has_mouse_focus = 0;
19741974            break;
19751975         case SDL_WINDOWEVENT_MOVED:
1976            window->window_clear();
1976            sdlwindow_clear(window);
19771977            focus_window = window;
19781978            break;
19791979         case SDL_WINDOWEVENT_RESIZED:
r242703r242704
19861986            else
19871987            {
19881988               if (event.window.data1 != window->width || event.window.data2 != window->height)
1989                  window->window_resize(event.window.data1, event.window.data2);
1989                  sdlwindow_resize(window, event.window.data1, event.window.data2);
19901990            }
19911991            focus_window = window;
19921992            break;
trunk/src/osd/sdl/sdl.mak
r242703r242704
7777# change for custom OS X installations
7878SDL_FRAMEWORK_PATH = /Library/Frameworks/
7979
80# uncomment to use SDL1.2 (depracated)
81# SDL_LIBVER = sdl
82
8380###########################################################################
8481##################   END USER-CONFIGURABLE OPTIONS   ######################
8582###########################################################################
r242703r242704
341338ifndef NO_USE_QTDEBUG
342339QT_INSTALL_HEADERS = $(shell qmake -query QT_INSTALL_HEADERS)
343340INCPATH += -I$(QT_INSTALL_HEADERS)/QtCore -I$(QT_INSTALL_HEADERS)/QtGui -I$(QT_INSTALL_HEADERS)
344BASELIBS += -lcomdlg32 -loleaut32 -limm32 -lwinspool -lmsimg32 -lole32 -luuid -lws2_32 -lshell32 -lkernel32
345341LIBS += -L$(shell qmake -query QT_INSTALL_LIBS) -lqtmain -lQtGui4 -lQtCore4 -lcomdlg32 -loleaut32 -limm32 -lwinspool -lmsimg32 -lole32 -luuid -lws2_32 -lshell32 -lkernel32
346342endif
347343endif
r242703r242704
500496# Compile using framework (compile using libSDL is the exception)
501497ifeq ($(SDL_LIBVER),sdl2)
502498LIBS += -F$(SDL_FRAMEWORK_PATH) -framework SDL2 -framework Cocoa -framework OpenGL -lpthread
503BASELIBS += -F$(SDL_FRAMEWORK_PATH) -framework SDL2 -framework Cocoa -framework OpenGL -lpthread
504499else
505500LIBS += -F$(SDL_FRAMEWORK_PATH) -framework SDL -framework Cocoa -framework OpenGL -lpthread
506BASELIBS += -F$(SDL_FRAMEWORK_PATH) -framework SDL -framework Cocoa -framework OpenGL -lpthread
507501endif
508502INCPATH += -F$(SDL_FRAMEWORK_PATH)
509503else
r242703r242704
561555endif
562556CCOMFLAGS += `$(SDL_CONFIG) --cflags  | sed -e 's:/SDL[2]*::' -e 's:\(-I[^ ]*\)::g'`
563557
564BASELIBS += `$(SDL_CONFIG) --libs`
565558LIBS += `$(SDL_CONFIG) --libs`
566559
567560ifeq ($(SDL_LIBVER),sdl2)
r242703r242704
584577
585578# libs that Haiku doesn't want but are mandatory on *IX
586579ifneq ($(TARGETOS),haiku)
587BASELIBS += -lm -lutil -lpthread
588580LIBS += -lm -lutil -lpthread
589581endif
590582
r242703r242704
653645
654646ifeq ($(SDL_LIBVER),sdl2)
655647LIBS += -lSDL2 -lImm32 -lversion -lole32 -loleaut32 -static
656BASELIBS += -lImm32 -lversion -lole32 -loleaut32 -static
657648else
658649LIBS += -lSDL -static
659650endif
660651LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
661BASELIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
652
662653endif   # Win32
663654
664655#-------------------------------------------------
r242703r242704
742733# Default libs
743734DEFS += -DSDLMAME_X11
744735LIBS += -lX11 -lXinerama
745ifneq ($(SDL_LIBVER),sdl2)
746BASELIBS += -lX11
747endif
748736
749737# The newer debugger uses QT
750738ifndef NO_USE_QTDEBUG
r242703r242704
778766# Network (TAP/TUN)
779767#-------------------------------------------------
780768
781OSDOBJS += $(SDLOBJ)/netdev.o
782
783769ifndef DONT_USE_NETWORK
784
785770ifeq ($(SDL_NETWORK),taptun)
786OSDOBJS += $(SDLOBJ)/netdev_tap.o
771OSDOBJS += \
772   $(SDLOBJ)/netdev.o \
773   $(SDLOBJ)/netdev_tap.o
787774
788775DEFS += -DSDLMAME_NETWORK -DSDLMAME_NET_TAPTUN
789776endif
790777
791778ifeq ($(SDL_NETWORK),pcap)
779OSDOBJS += $(SDLOBJ)/netdev.o
792780
793781ifeq ($(TARGETOS),macosx)
794782OSDOBJS += $(SDLOBJ)/netdev_pcap_osx.o
r242703r242704
797785endif
798786
799787DEFS += -DSDLMAME_NETWORK -DSDLMAME_NET_PCAP
800
801788ifneq ($(TARGETOS),win32)
802789LIBS += -lpcap
803790endif
791endif
792else
793OSDOBJS += $(SDLOBJ)/netdev.o
794endif
804795
805endif # ifeq ($(SDL_NETWORK),pcap)
806
807endif # ifndef DONT_USE_NETWORK
808
809796#-------------------------------------------------
810797# Dependencies
811798#-------------------------------------------------
r242703r242704
855842
856843testkeys$(EXE): $(TESTKEYSOBJS) $(LIBUTIL) $(LIBOCORE) $(SDLUTILMAIN)
857844   @echo Linking $@...
858   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
845   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
859846
860847#-------------------------------------------------
861848# clean up
trunk/src/osd/sdl/sdlsync_tc.c
r242703r242704
167167{
168168   hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
169169
170   //pthread_mutex_unlock(&mutex->id);
170   pthread_mutex_unlock(&mutex->id);
171171   pthread_mutex_destroy(&mutex->id);
172172   free(mutex);
173173}
trunk/src/osd/sdl/sdlwork.c
r242703r242704
9797   volatile INT32      items;          // items in the queue
9898   volatile INT32      livethreads;    // number of live threads
9999   volatile INT32      waiting;        // is someone waiting on the queue to complete?
100   volatile INT32      exiting;        // should the threads exit on their next opportunity?
100   volatile UINT8      exiting;        // should the threads exit on their next opportunity?
101101   UINT32              threads;        // number of threads in this queue
102102   UINT32              flags;          // creation flags
103103   work_thread_info *  thread;         // array of thread information
r242703r242704
139139static int effective_num_processors(void);
140140static void * worker_thread_entry(void *param);
141141static void worker_thread_process(osd_work_queue *queue, work_thread_info *thread);
142static bool queue_has_list_items(osd_work_queue *queue);
143142
144143
145144//============================================================
r242703r242704
314313      end_timing(queue->thread[queue->threads].waittime);
315314
316315      // signal all the threads to exit
317      atomic_exchange32(&queue->exiting, TRUE);
316      queue->exiting = TRUE;
318317      for (threadnum = 0; threadnum < queue->threads; threadnum++)
319318      {
320319         work_thread_info *thread = &queue->thread[threadnum];
r242703r242704
413412      osd_work_item *item;
414413
415414      // first allocate a new work item; try the free list first
416      INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
417415      do
418416      {
419417         item = (osd_work_item *)queue->free;
420418      } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item);
421      osd_scalable_lock_release(queue->lock, lockslot);
422419
423420      // if nothing, allocate something new
424421      if (item == NULL)
r242703r242704
429426            return NULL;
430427         item->event = NULL;
431428         item->queue = queue;
432         item->done = FALSE;
433429      }
434      else
435      {
436         atomic_exchange32(&item->done, FALSE); // needs to be set this way to prevent data race/usage of uninitialized memory on Linux
437      }
438430
439431      // fill in the basics
440432      item->next = NULL;
r242703r242704
442434      item->param = parambase;
443435      item->result = NULL;
444436      item->flags = flags;
437      item->done = FALSE;
445438
446439      // advance to the next
447440      lastitem = item;
r242703r242704
507500
508501   // if we don't have an event, create one
509502   if (item->event == NULL)
510   {
511      INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
512503      item->event = osd_event_alloc(TRUE, FALSE);     // manual reset, not signalled
513      osd_scalable_lock_release(item->queue->lock, lockslot);
514   }
515504   else
516      osd_event_reset(item->event);
505         osd_event_reset(item->event);
517506
518507   // if we don't have an event, we need to spin (shouldn't ever really happen)
519508   if (item->event == NULL)
r242703r242704
557546   osd_work_item_wait(item, 100 * osd_ticks_per_second());
558547
559548   // add us to the free list on our queue
560   INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
561549   do
562550   {
563551      next = (osd_work_item *)item->queue->free;
564552      item->next = next;
565553   } while (compare_exchange_ptr((PVOID volatile *)&item->queue->free, next, item) != next);
566   osd_scalable_lock_release(item->queue->lock, lockslot);
567554}
568555
569556
r242703r242704
615602   {
616603      // block waiting for work or exit
617604      // bail on exit, and only wait if there are no pending items in queue
618      if (queue->exiting)
619         break;
620
621      if (!queue_has_list_items(queue))
605      if (!queue->exiting && queue->list == NULL)
622606      {
623607         begin_timing(thread->waittime);
624608         osd_event_wait(thread->wakeevent, INFINITE);
625609         end_timing(thread->waittime);
626610      }
627
628611      if (queue->exiting)
629612         break;
630613
r242703r242704
656639         }
657640
658641         // if nothing more, release the processor
659         if (!queue_has_list_items(queue))
642         if (queue->list == NULL)
660643            break;
661644         add_to_stat(&queue->spinloops, 1);
662645      }
r242703r242704
685668   begin_timing(thread->runtime);
686669
687670   // loop until everything is processed
688   while (true)
671   while (queue->list != NULL)
689672   {
690      osd_work_item *item = NULL;
673      osd_work_item *item;
674      INT32 lockslot;
691675
692      bool end_loop = false;
693
694676      // use a critical section to synchronize the removal of items
677      lockslot = osd_scalable_lock_acquire(queue->lock);
695678      {
696         INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
697         if (queue->list == NULL)
679         // pull the item from the queue
680         item = (osd_work_item *)queue->list;
681         if (item != NULL)
698682         {
699            end_loop = true;
683            queue->list = item->next;
684            if (queue->list == NULL)
685               queue->tailptr = (osd_work_item **)&queue->list;
700686         }
701         else
702         {
703            // pull the item from the queue
704            item = (osd_work_item *)queue->list;
705            if (item != NULL)
706            {
707               queue->list = item->next;
708               if (queue->list == NULL)
709                  queue->tailptr = (osd_work_item **)&queue->list;
710            }
711         }
712         osd_scalable_lock_release(queue->lock, lockslot);
713687      }
688      osd_scalable_lock_release(queue->lock, lockslot);
714689
715      if (end_loop)
716         break;
717
718690      // process non-NULL items
719691      if (item != NULL)
720692      {
r242703r242704
733705            osd_work_item_release(item);
734706
735707         // set the result and signal the event
736         else
708         else if (item->event != NULL)
737709         {
738            INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
739            if (item->event != NULL)
740            {
741               osd_event_set(item->event);
742               add_to_stat(&item->queue->setevents, 1);
743            }
744            osd_scalable_lock_release(item->queue->lock, lockslot);
710            osd_event_set(item->event);
711            add_to_stat(&item->queue->setevents, 1);
745712         }
746713
747714         // if we removed an item and there's still work to do, bump the stats
748         if (queue_has_list_items(queue))
715         if (queue->list != NULL)
749716            add_to_stat(&queue->extraitems, 1);
750717      }
751718   }
r242703r242704
760727   end_timing(thread->runtime);
761728}
762729
763bool queue_has_list_items(osd_work_queue *queue)
764{
765   INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
766   bool has_list_items = (queue->list != NULL);
767   osd_scalable_lock_release(queue->lock, lockslot);
768   return has_list_items;
769}
770730#endif // SDLMAME_NOASM
trunk/src/osd/sdl/video.c
r242703r242704
326326   {
327327//      profiler_mark(PROFILER_BLIT);
328328      for (window = sdl_window_list; window != NULL; window = window->next)
329         window->video_window_update(machine());
329         sdlwindow_video_window_update(machine(), window);
330330//      profiler_mark(PROFILER_END);
331331   }
332332
r242703r242704
568568
569569      while (curwin != (sdl_window_info *)NULL)
570570      {
571         curwin->toggle_full_screen(machine);
571         sdlwindow_toggle_full_screen(machine, curwin);
572572         curwin = curwin->next;
573573      }
574574   }
r242703r242704
597597   #endif
598598
599599   if (ui_input_pressed(machine, IPT_OSD_6))
600      window->modify_prescale(machine, -1);
600      sdlwindow_modify_prescale(machine, window, -1);
601601
602602   if (ui_input_pressed(machine, IPT_OSD_7))
603      window->modify_prescale(machine, 1);
603      sdlwindow_modify_prescale(machine, window, 1);
604604}
605605
606606//============================================================
trunk/src/osd/sdl/video.h
r242703r242704
7070   float               aspect;                 // computed/configured aspect ratio of the physical device
7171   int                 center_width;           // width of first physical screen for centering
7272   int                 center_height;          // height of first physical screen for centering
73   int                 monitor_x;              // X position of this monitor in virtual desktop space (SDL virtual space has them all horizontally stacked, not real geometry)
73   int               monitor_x;            // X position of this monitor in virtual desktop space (SDL virtual space has them all horizontally stacked, not real geometry)
7474};
7575
7676
trunk/src/osd/sdl/window.c
r242703r242704
101101static sdl_draw_info draw;
102102
103103struct worker_param {
104   worker_param()
105   : m_window(NULL), m_list(NULL), m_machine(NULL), m_resize_new_width(0), m_resize_new_height(0)
106   {
107   }
108   worker_param(running_machine &amachine, sdl_window_info *awindow)
109   : m_window(awindow), m_list(NULL), m_machine(&amachine), m_resize_new_width(0), m_resize_new_height(0)
110   {
111   }
112   worker_param(running_machine &amachine, sdl_window_info *awindow, render_primitive_list &alist)
113   : m_window(awindow), m_list(&alist), m_machine(&amachine), m_resize_new_width(0), m_resize_new_height(0)
114   {
115   }
116   worker_param(sdl_window_info *awindow, int anew_width, int anew_height)
117   : m_window(awindow), m_list(NULL), m_machine(NULL), m_resize_new_width(anew_width), m_resize_new_height(anew_height)
118   {
119   }
120   worker_param(sdl_window_info *awindow)
121   : m_window(awindow), m_list(NULL), m_machine(NULL), m_resize_new_width(0), m_resize_new_height(0)
122   {
123   }
124104   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
125   sdl_window_info *window() const { assert(m_window != NULL); return m_window; }
126   render_primitive_list *list() const { return m_list; }
127   int new_width() const { return m_resize_new_width; }
128   int new_height() const { return m_resize_new_height; }
129   // FIXME: only needed for window set-up which returns an error.
130   void set_window(sdl_window_info *window) { m_window = window; }
131private:
132   sdl_window_info *m_window;
133   render_primitive_list *m_list;
105   sdl_window_info *window;
106   render_primitive_list *list;
134107   running_machine *m_machine;
135   int m_resize_new_width;
136   int m_resize_new_height;
108   int resize_new_width;
109   int resize_new_height;
137110};
138111
139112
r242703r242704
141114//  PROTOTYPES
142115//============================================================
143116
117static void sdlwindow_video_window_destroy(running_machine &machine, sdl_window_info *window);
144118static OSDWORK_CALLBACK( draw_video_contents_wt );
145119static OSDWORK_CALLBACK( sdlwindow_video_window_destroy_wt );
146120static OSDWORK_CALLBACK( sdlwindow_resize_wt );
r242703r242704
148122static void sdlwindow_update_cursor_state(running_machine &machine, sdl_window_info *window);
149123static void sdlwindow_sync(void);
150124
125static void get_min_bounds(sdl_window_info *window, int *window_width, int *window_height, int constrain);
126static void get_max_bounds(sdl_window_info *window, int *window_width, int *window_height, int constrain);
127
151128static void *complete_create_wt(void *param, int threadid);
152129static void set_starting_view(running_machine &machine, int index, sdl_window_info *window, const char *defview, const char *view);
153130
154131//============================================================
132//  clear the worker_param structure, inline - faster than memset
133//============================================================
134
135INLINE void clear_worker_param(worker_param *wp)
136{
137   wp->window=NULL;
138   wp->list=NULL;
139   wp->m_machine=NULL;
140   wp->resize_new_width=0;
141   wp->resize_new_height=0;
142}
143
144
145//============================================================
155146//  execute_async
156147//============================================================
157148
158149
159INLINE void execute_async(osd_work_callback callback, const worker_param &wp)
150INLINE void execute_async(osd_work_callback callback, worker_param *wp)
160151{
161   worker_param *wp_temp = (worker_param *) osd_malloc(sizeof(worker_param));
162   *wp_temp = wp;
152   worker_param *wp_temp = NULL;
163153
154   if (wp)
155   {
156      wp_temp = (worker_param *) osd_malloc(sizeof(worker_param));
157      *wp_temp = *wp;
158   }
164159   if (multithreading_enabled)
165160   {
166161      osd_work_item_queue(work_queue, callback, (void *) wp_temp, WORK_ITEM_FLAG_AUTO_RELEASE);
r242703r242704
168163      callback((void *) wp_temp, 0);
169164}
170165
171INLINE void execute_sync(osd_work_callback callback, const worker_param &wp)
172{
173   worker_param *wp_temp = (worker_param *) osd_malloc(sizeof(worker_param));
174   *wp_temp = wp;
175166
176   callback((void *) wp_temp, 0);
177}
178
179
180167//============================================================
181168//  execute_async_wait
182169//============================================================
183170
184INLINE void execute_async_wait(osd_work_callback callback, const worker_param &wp)
171INLINE void execute_async_wait(osd_work_callback callback, worker_param *wp)
185172{
186173   execute_async(callback, wp);
187174   sdlwindow_sync();
r242703r242704
307294
308295void sdl_osd_interface::window_exit()
309296{
310   worker_param wp_dummy;
311
312297   ASSERT_MAIN_THREAD();
313298
314299   osd_printf_verbose("Enter sdlwindow_exit\n");
r242703r242704
318303   {
319304      sdl_window_info *temp = sdl_window_list;
320305      sdl_window_list = temp->next;
321      temp->video_window_destroy(machine());
322      // free the window itself
323      global_free(temp);
306      sdlwindow_video_window_destroy(machine(), temp);
324307   }
325308
326309   // if we're multithreaded, clean up the window thread
r242703r242704
332315   // kill the drawers
333316   (*draw.exit)();
334317
335   execute_async_wait(&sdlwindow_exit_wt, wp_dummy);
318   execute_async_wait(&sdlwindow_exit_wt, NULL);
336319
337320   if (multithreading_enabled)
338321   {
r242703r242704
355338   return (fabs(desired_aspect - aspect0) < fabs(desired_aspect - aspect1)) ? 0 : 1;
356339}
357340
358void sdl_window_info::blit_surface_size(int window_width, int window_height)
341void sdlwindow_blit_surface_size(sdl_window_info *window, int window_width, int window_height)
359342{
360343   INT32 newwidth, newheight;
361344   int xscale = 1, yscale = 1;
r242703r242704
364347   INT32 target_height = window_height;
365348
366349   // start with the minimum size
367   target->compute_minimum_size(newwidth, newheight);
350   window->target->compute_minimum_size(newwidth, newheight);
368351
369352   // compute the appropriate visible area if we're trying to keepaspect
370353   if (video_config.keepaspect)
371354   {
372355      // make sure the monitor is up-to-date
373      sdlvideo_monitor_refresh(m_monitor);
374      target->compute_visible_area(target_width, target_height, sdlvideo_monitor_get_aspect(m_monitor), target->orientation(), target_width, target_height);
356      sdlvideo_monitor_refresh(window->monitor);
357      window->target->compute_visible_area(target_width, target_height, sdlvideo_monitor_get_aspect(window->monitor), window->target->orientation(), target_width, target_height);
375358      desired_aspect = (float)target_width / (float)target_height;
376359   }
377360
r242703r242704
423406   }
424407
425408   //FIXME: really necessary to distinguish for yuv_modes ?
426   if (target->zoom_to_screen()
409   if (window->target->zoom_to_screen()
427410      && (video_config.scale_mode == VIDEO_SCALE_MODE_NONE ))
428411      newwidth = window_width;
429412
430   if ((blitwidth != newwidth) || (blitheight != newheight))
431      window_clear();
413   if ((window->blitwidth != newwidth) || (window->blitheight != newheight))
414      sdlwindow_clear(window);
432415
433   blitwidth = newwidth;
434   blitheight = newheight;
416   window->blitwidth = newwidth;
417   window->blitheight = newheight;
435418}
436419
437420
r242703r242704
443426static OSDWORK_CALLBACK( sdlwindow_resize_wt )
444427{
445428   worker_param *      wp = (worker_param *) param;
446   sdl_window_info *   window = wp->window();
429   sdl_window_info *   window = wp->window;
447430
448431   ASSERT_WINDOW_THREAD();
449432
450433   window->destroy_all_textures(window);
451   window->resize(window, wp->new_width(), wp->new_height());
434   window->resize(window, wp->resize_new_width, wp->resize_new_height);
452435
453   window->blit_surface_size(wp->new_width(), wp->new_height());
436   sdlwindow_blit_surface_size(window, wp->resize_new_width, wp->resize_new_height);
454437
455   window->window_clear();
438   sdlwindow_clear(window);
456439
457440   osd_free(wp);
458441   return NULL;
459442}
460443
461void sdl_window_info::window_resize(INT32 width, INT32 height)
444void sdlwindow_resize(sdl_window_info *window, INT32 width, INT32 height)
462445{
446   worker_param wp;
447
463448   ASSERT_MAIN_THREAD();
464449
465   if (width == this->width && height == this->height)
450   if (width == window->width && height == window->height)
466451      return;
467452
468   execute_async_wait(&sdlwindow_resize_wt, worker_param(this, width, height));
453   clear_worker_param(&wp);
454   wp.resize_new_width = width;
455   wp.resize_new_height = height;
456   wp.window = window;
457
458   execute_async_wait(&sdlwindow_resize_wt, &wp);
469459}
470460
471461
r242703r242704
477467static OSDWORK_CALLBACK( sdlwindow_clear_surface_wt )
478468{
479469   worker_param *wp = (worker_param *) param;
480   sdl_window_info *window = wp->window();
470   sdl_window_info *window = wp->window;
481471
482472   ASSERT_WINDOW_THREAD();
483473
r242703r242704
486476   return NULL;
487477}
488478
489void sdl_window_info::window_clear()
479void sdlwindow_clear(sdl_window_info *window)
490480{
491   worker_param wp;
481   worker_param *wp = (worker_param *) osd_malloc(sizeof(worker_param));
492482
483   clear_worker_param(wp);
484   wp->window = window;
485
493486   if (SDL_ThreadID() == main_threadid)
494487   {
495      execute_async_wait(&sdlwindow_clear_surface_wt, worker_param(this));
488      execute_async_wait(&sdlwindow_clear_surface_wt, wp);
489      osd_free(wp);
496490   }
497491   else
498      execute_sync(&sdlwindow_clear_surface_wt, worker_param(this));
492      sdlwindow_clear_surface_wt( (void *) wp, 0);
499493}
500494
501495
r242703r242704
507501static OSDWORK_CALLBACK( sdlwindow_toggle_full_screen_wt )
508502{
509503   worker_param *wp = (worker_param *) param;
510   sdl_window_info *window = wp->window();
504   sdl_window_info *window = wp->window;
511505
512506   ASSERT_WINDOW_THREAD();
513507
r242703r242704
516510      return NULL;
517511
518512   // If we are going fullscreen (leaving windowed) remember our windowed size
519   if (!window->fullscreen())
513   if (!window->fullscreen)
520514   {
521515      window->windowed_width = window->width;
522516      window->windowed_height = window->height;
r242703r242704
526520   sdlinput_release_keys(wp->machine());
527521
528522   // toggle the window mode
529   window->set_fullscreen(!window->fullscreen());
523   window->fullscreen = !window->fullscreen;
530524
531525   complete_create_wt(param, 0);
532526
533527   return NULL;
534528}
535529
536void sdl_window_info::toggle_full_screen(running_machine &machine)
530void sdlwindow_toggle_full_screen(running_machine &machine, sdl_window_info *window)
537531{
532   worker_param wp;
533
538534   ASSERT_MAIN_THREAD();
539535
540   execute_async_wait(&sdlwindow_toggle_full_screen_wt, worker_param(machine, this));
536   clear_worker_param(&wp);
537   wp.window = window;
538   wp.m_machine = &machine;
539
540   execute_async_wait(&sdlwindow_toggle_full_screen_wt, &wp);
541541}
542542
543543static OSDWORK_CALLBACK( destroy_all_textures_wt )
544544{
545545   worker_param *wp = (worker_param *) param;
546546
547   sdl_window_info *window = wp->window();
547   sdl_window_info *window = wp->window;
548548
549549   window->destroy_all_textures(window);
550550
r242703r242704
552552   return NULL;
553553}
554554
555void sdl_window_info::modify_prescale(running_machine &machine, int dir)
555void sdlwindow_modify_prescale(running_machine &machine, sdl_window_info *window, int dir)
556556{
557   worker_param wp = worker_param(machine, this);
558   int new_prescale = prescale;
557   worker_param wp;
558   int new_prescale = window->prescale;
559559
560   if (dir > 0 && prescale < 3)
561      new_prescale = prescale + 1;
562   if (dir < 0 && prescale > 1)
563      new_prescale = prescale - 1;
560   clear_worker_param(&wp);
564561
565   if (new_prescale != prescale)
562   wp.window = window;
563   wp.m_machine = &machine;
564
565   if (dir > 0 && window->prescale < 3)
566      new_prescale = window->prescale + 1;
567   if (dir < 0 && window->prescale > 1)
568      new_prescale = window->prescale - 1;
569
570   if (new_prescale != window->prescale)
566571   {
567      if (m_fullscreen && video_config.switchres)
572      if (window->fullscreen && video_config.switchres)
568573      {
569         execute_async_wait(&sdlwindow_video_window_destroy_wt, wp);
574         execute_async_wait(&sdlwindow_video_window_destroy_wt, &wp);
570575
571         prescale = new_prescale;
576         window->prescale = new_prescale;
572577
573         execute_async_wait(&complete_create_wt, wp);
578         execute_async_wait(&complete_create_wt, &wp);
574579
575580      }
576581      else
577582      {
578         execute_async_wait(destroy_all_textures_wt, wp);
579         prescale = new_prescale;
583         execute_async_wait(destroy_all_textures_wt, &wp);
584         window->prescale = new_prescale;
580585      }
581      machine.ui().popup_time(1, "Prescale %d", prescale);
586      machine.ui().popup_time(1, "Prescale %d", window->prescale);
582587   }
583588}
584589
r242703r242704
606611   {
607612      //FIXME: SDL1.3: really broken: the whole SDL code
608613      //       will only work correct with relative mouse movements ...
609      if (!window->fullscreen() && !sdlinput_should_hide_mouse(machine))
614      if (!window->fullscreen && !sdlinput_should_hide_mouse(machine))
610615      {
611616         SDL_ShowCursor(SDL_ENABLE);
612617         if (SDL_GetWindowGrab(window->sdl_window ))
r242703r242704
628633   // the possibility of losing control
629634   if (!(machine.debug_flags & DEBUG_FLAG_OSD_ENABLED))
630635   {
631      if ( window->fullscreen() || sdlinput_should_hide_mouse(machine) )
636      if ( window->fullscreen || sdlinput_should_hide_mouse(machine) )
632637      {
633638         SDL_ShowCursor(SDL_DISABLE);
634639         if (!SDL_WM_GrabInput(SDL_GRAB_QUERY))
r242703r242704
649654#endif
650655}
651656
652static OSDWORK_CALLBACK( sdlwindow_update_cursor_state_wt )
653{
654   worker_param *      wp = (worker_param *) param;
655   //sdl_window_info *   window = wp->window;
656657
657   sdlwindow_update_cursor_state(wp->machine(), wp->window());
658
659   osd_free(wp);
660   return NULL;
661}
662
663
664658//============================================================
665659//  sdlwindow_video_window_create
666660//  (main thread)
r242703r242704
674668
675669   ASSERT_MAIN_THREAD();
676670
671   clear_worker_param(wp);
672
677673   // allocate a new window object
678   window = global_alloc(sdl_window_info(&machine, monitor, index, config));
674   window = global_alloc_clear(sdl_window_info);
675   window->maxwidth = config->width;
676   window->maxheight = config->height;
677   window->depth = config->depth;
678   window->refresh = config->refresh;
679   window->monitor = monitor;
680   window->m_machine = &machine;
681   window->index = index;
679682
683   //FIXME: these should be per_window in config-> or even better a bit set
684   window->fullscreen = !video_config.windowed;
685   window->prescale = video_config.prescale;
686
680687   // set the initial maximized state
681688   // FIXME: Does not belong here
682689   sdl_options &options = downcast<sdl_options &>(machine.options());
683690   window->startmaximized = options.maximize();
684691
692   if (!window->fullscreen)
693   {
694      window->windowed_width = config->width;
695      window->windowed_height = config->height;
696   }
697
685698   // add us to the list
686699   *last_window_ptr = window;
687700   last_window_ptr = &window->next;
r242703r242704
703716   else
704717      sprintf(window->title, "%s: %s [%s] - Screen %d", emulator_info::get_appname(), machine.system().description, machine.system().name, index);
705718
706   wp->set_window(window);
719   wp->window = window;
707720
708   // FIXME: pass error back in a different way
709721   if (multithreading_enabled)
710722   {
711723      osd_work_item *wi;
r242703r242704
725737   return 0;
726738
727739error:
728   window->video_window_destroy(machine);
729   // free the window itself
730   global_free(window);
740   sdlwindow_video_window_destroy(machine, window);
731741   return 1;
732742}
733743
r242703r242704
740750static OSDWORK_CALLBACK( sdlwindow_video_window_destroy_wt )
741751{
742752   worker_param *      wp = (worker_param *) param;
743   sdl_window_info *   window = wp->window();
753   sdl_window_info *   window = wp->window;
744754
745755   ASSERT_WINDOW_THREAD();
746756
r242703r242704
755765   return NULL;
756766}
757767
758void sdl_window_info::video_window_destroy(running_machine &machine)
768static void sdlwindow_video_window_destroy(running_machine &machine, sdl_window_info *window)
759769{
760770   sdl_window_info **prevptr;
771   worker_param wp;
761772
762773   ASSERT_MAIN_THREAD();
763774   if (multithreading_enabled)
r242703r242704
769780
770781   // remove us from the list
771782   for (prevptr = &sdl_window_list; *prevptr != NULL; prevptr = &(*prevptr)->next)
772      if (*prevptr == this)
783      if (*prevptr == window)
773784      {
774         *prevptr = this->next;
785         *prevptr = window->next;
775786         break;
776787      }
777788
778789   // free the textures etc
779   execute_async_wait(&sdlwindow_video_window_destroy_wt, worker_param(machine, this));
790   clear_worker_param(&wp);
791   wp.window = window;
792   wp.m_machine = &machine;
793   execute_async_wait(&sdlwindow_video_window_destroy_wt, &wp);
780794
781795   // free the render target, after the textures!
782   this->machine().render().target_free(target);
796   window->machine().render().target_free(window->target);
783797
784798   // free the event
785   osd_event_free(rendered_event);
799   osd_event_free(window->rendered_event);
786800
801   // free the window itself
802   global_free(window);
787803}
788804
789805
r242703r242704
792808//============================================================
793809
794810#if SDLMAME_SDL2
795void sdl_window_info::pick_best_mode(int *fswidth, int *fsheight)
811static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight)
796812{
797813   int minimum_width, minimum_height, target_width, target_height;
798814   int i;
r242703r242704
800816   float size_score, best_score = 0.0f;
801817
802818   // determine the minimum width/height for the selected target
803   target->compute_minimum_size(minimum_width, minimum_height);
819   window->target->compute_minimum_size(minimum_width, minimum_height);
804820
805821   // use those as the target for now
806   target_width = minimum_width * MAX(1, prescale);
807   target_height = minimum_height * MAX(1, prescale);
822   target_width = minimum_width * MAX(1, window->prescale);
823   target_height = minimum_height * MAX(1, window->prescale);
808824
809825   // if we're not stretching, allow some slop on the minimum since we can handle it
810826   {
r242703r242704
812828      minimum_height -= 4;
813829   }
814830
815   num = SDL_GetNumDisplayModes(m_monitor->handle);
831   num = SDL_GetNumDisplayModes(window->monitor->handle);
816832
817833   if (num == 0)
818834   {
r242703r242704
824840      for (i = 0; i < num; ++i)
825841      {
826842         SDL_DisplayMode mode;
827         SDL_GetDisplayMode(m_monitor->handle, i, &mode);
843         SDL_GetDisplayMode(window->monitor->handle, i, &mode);
828844
829845         // compute initial score based on difference between target and current
830846         size_score = 1.0f / (1.0f + fabsf((INT32)mode.w - target_width) + fabsf((INT32)mode.h - target_height));
r242703r242704
838854            size_score *= 0.1f;
839855
840856         // if we're looking for a particular mode, that's a winner
841         if (mode.w == m_maxwidth && mode.h == m_maxheight)
857         if (mode.w == window->maxwidth && mode.h == window->maxheight)
842858            size_score = 2.0f;
843859
844860         // refresh adds some points
845         if (refresh)
846            size_score *= 1.0f / (1.0f + fabsf(refresh - mode.refresh_rate) / 10.0f);
861         if (window->refresh)
862            size_score *= 1.0f / (1.0f + fabsf(window->refresh - mode.refresh_rate) / 10.0f);
847863
848864         osd_printf_verbose("%4dx%4d@%2d -> %f\n", (int)mode.w, (int)mode.h, (int) mode.refresh_rate, size_score);
849865
r242703r242704
859875   }
860876}
861877#else
862void sdl_window_info::pick_best_mode(int *fswidth, int *fsheight)
878static void pick_best_mode(sdl_window_info *window, int *fswidth, int *fsheight)
863879{
864880   int minimum_width, minimum_height, target_width, target_height;
865881   int i;
r242703r242704
867883   SDL_Rect **modes;
868884
869885   // determine the minimum width/height for the selected target
870   target->compute_minimum_size(minimum_width, minimum_height);
886   window->target->compute_minimum_size(minimum_width, minimum_height);
871887
872888   // use those as the target for now
873   target_width = minimum_width * MAX(1, prescale);
874   target_height = minimum_height * MAX(1, prescale);
889   target_width = minimum_width * MAX(1, window->prescale);
890   target_height = minimum_height * MAX(1, window->prescale);
875891
876892   // if we're not stretching, allow some slop on the minimum since we can handle it
877893   {
r242703r242704
887903    */
888904   modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_DOUBLEBUF);
889905#else
890   modes = window->m_monitor->modes;
906   modes = window->monitor->modes;
891907#endif
892908
893909   if (modes == (SDL_Rect **)0)
r242703r242704
897913   }
898914   else if (modes == (SDL_Rect **)-1)  // all modes are possible
899915   {
900      *fswidth = m_maxwidth;
901      *fsheight = m_maxheight;
916      *fswidth = window->maxwidth;
917      *fsheight = window->maxheight;
902918   }
903919   else
904920   {
r242703r242704
916932            size_score *= 0.1f;
917933
918934         // if we're looking for a particular mode, that's a winner
919         if (modes[i]->w == m_maxwidth && modes[i]->h == m_maxheight)
935         if (modes[i]->w == window->maxwidth && modes[i]->h == window->maxheight)
920936            size_score = 2.0f;
921937
922938         osd_printf_verbose("%4dx%4d -> %f\n", (int)modes[i]->w, (int)modes[i]->h, size_score);
r242703r242704
939955//  (main thread)
940956//============================================================
941957
942void sdl_window_info::video_window_update(running_machine &machine)
958void sdlwindow_video_window_update(running_machine &machine, sdl_window_info *window)
943959{
944960   osd_ticks_t     event_wait_ticks;
945961   ASSERT_MAIN_THREAD();
946962
947963   // adjust the cursor state
948   //sdlwindow_update_cursor_state(machine, window);
964   sdlwindow_update_cursor_state(machine, window);
949965
950   execute_async(&sdlwindow_update_cursor_state_wt, worker_param(machine, this));
951
952966   // if we're visible and running and not in the middle of a resize, draw
953   if (target != NULL)
967   if (window->target != NULL)
954968   {
955969      int tempwidth, tempheight;
956970
957971      // see if the games video mode has changed
958      target->compute_minimum_size(tempwidth, tempheight);
959      if (tempwidth != m_minwidth || tempheight != m_minheight)
972      window->target->compute_minimum_size(tempwidth, tempheight);
973      if (tempwidth != window->minwidth || tempheight != window->minheight)
960974      {
961         m_minwidth = tempwidth;
962         m_minheight = tempheight;
975         window->minwidth = tempwidth;
976         window->minheight = tempheight;
963977
964         if (!this->m_fullscreen)
978         if (!window->fullscreen)
965979         {
966            blit_surface_size(width, height);
967            window_resize(blitwidth, blitheight);
980            sdlwindow_blit_surface_size(window, window->width, window->height);
981            sdlwindow_resize(window, window->blitwidth, window->blitheight);
968982         }
969983         else if (video_config.switchres)
970984         {
971            this->pick_best_mode(&tempwidth, &tempheight);
972            window_resize(tempwidth, tempheight);
985            pick_best_mode(window, &tempwidth, &tempheight);
986            sdlwindow_resize(window, tempwidth, tempheight);
973987         }
974988      }
975989
r242703r242704
978992      else
979993         event_wait_ticks = 0;
980994
981      if (osd_event_wait(rendered_event, event_wait_ticks))
995      if (osd_event_wait(window->rendered_event, event_wait_ticks))
982996      {
983          if ((!fullscreen()) || (video_config.switchres))
984          {
985              blit_surface_size(width, height);
986          }
987          else
988          {
989              blit_surface_size(monitor()->center_width, monitor()->center_height);
990          }
997         worker_param wp;
998         render_primitive_list *primlist;
991999
1000         clear_worker_param(&wp);
1001
9921002         // ensure the target bounds are up-to-date, and then get the primitives
993          set_target_bounds(this);
1003         primlist = &window->get_primitives(window);
9941004
995         render_primitive_list &primlist = target->get_primitives();
996
9971005         // and redraw now
9981006
999         execute_async(&draw_video_contents_wt, worker_param(machine, this, primlist));
1007         wp.list = primlist;
1008         wp.window = window;
1009         wp.m_machine = &machine;
1010
1011         execute_async(&draw_video_contents_wt, &wp);
10001012      }
10011013   }
10021014}
r242703r242704
10341046static OSDWORK_CALLBACK( complete_create_wt )
10351047{
10361048   worker_param *      wp = (worker_param *) param;
1037   sdl_window_info *   window = wp->window();
1049   sdl_window_info *   window = wp->window;
10381050
10391051   int tempwidth, tempheight;
10401052   static int result[2] = {0,1};
r242703r242704
10421054   ASSERT_WINDOW_THREAD();
10431055   osd_free(wp);
10441056
1045   if (window->fullscreen())
1057   if (window->fullscreen)
10461058   {
10471059      // default to the current mode exactly
1048      tempwidth = window->monitor()->monitor_width;
1049      tempheight = window->monitor()->monitor_height;
1060      tempwidth = window->monitor->monitor_width;
1061      tempheight = window->monitor->monitor_height;
10501062
10511063      // if we're allowed to switch resolutions, override with something better
10521064      if (video_config.switchres)
1053         window->pick_best_mode(&tempwidth, &tempheight);
1065         pick_best_mode(window, &tempwidth, &tempheight);
10541066   }
10551067   else if (window->windowed_width)
10561068   {
r242703r242704
10631075      if (window->startmaximized)
10641076      {
10651077         tempwidth = tempheight = 0;
1066         window->get_max_bounds(&tempwidth, &tempheight, video_config.keepaspect );
1078         get_max_bounds(window, &tempwidth, &tempheight, video_config.keepaspect );
10671079      }
10681080      else
10691081      {
r242703r242704
10711083            instead of letting sdlwindow_blit_surface_size() resize it
10721084            this stops the window from "flashing" from the wrong aspect
10731085            size to the right one at startup. */
1074         tempwidth = (window->m_maxwidth != 0) ? window->m_maxwidth : 640;
1075         tempheight = (window->m_maxheight != 0) ? window->m_maxheight : 480;
1086         tempwidth = (window->maxwidth != 0) ? window->maxwidth : 640;
1087         tempheight = (window->maxheight != 0) ? window->maxheight : 480;
10761088
1077         window->get_min_bounds(&tempwidth, &tempheight, video_config.keepaspect );
1089         get_min_bounds(window, &tempwidth, &tempheight, video_config.keepaspect );
10781090      }
10791091   }
10801092
r242703r242704
11421154   UINT32  dc =        0;
11431155   int     update =    1;
11441156   worker_param *wp = (worker_param *) param;
1145   sdl_window_info *window = wp->window();
1157   sdl_window_info *window = wp->window;
11461158
11471159   ASSERT_REDRAW_THREAD();
11481160
11491161   // Some configurations require events to be polled in the worker thread
11501162   sdlinput_process_events_buf(wp->machine());
11511163
1152   window->primlist = wp->list();
1164   window->primlist = wp->list;
11531165
11541166   // if no bitmap, just fill
11551167   if (window->primlist == NULL)
r242703r242704
11771189//  (window thread)
11781190//============================================================
11791191
1180void sdl_window_info::constrain_to_aspect_ratio(int *window_width, int *window_height, int adjustment)
1192static void constrain_to_aspect_ratio(sdl_window_info *window, int *window_width, int *window_height, int adjustment)
11811193{
11821194   INT32 extrawidth = 0;
11831195   INT32 extraheight = 0;
r242703r242704
11881200   float pixel_aspect;
11891201
11901202   // make sure the monitor is up-to-date
1191   sdlvideo_monitor_refresh(m_monitor);
1203   sdlvideo_monitor_refresh(window->monitor);
11921204
11931205   // get the pixel aspect ratio for the target monitor
1194   pixel_aspect = sdlvideo_monitor_get_aspect(m_monitor);
1206   pixel_aspect = sdlvideo_monitor_get_aspect(window->monitor);
11951207
11961208   // determine the proposed width/height
11971209   propwidth = *window_width - extrawidth;
r242703r242704
12031215   {
12041216      case WMSZ_BOTTOM:
12051217      case WMSZ_TOP:
1206         target->compute_visible_area(10000, propheight, pixel_aspect, target->orientation(), propwidth, propheight);
1218         window->target->compute_visible_area(10000, propheight, pixel_aspect, window->target->orientation(), propwidth, propheight);
12071219         break;
12081220
12091221      case WMSZ_LEFT:
12101222      case WMSZ_RIGHT:
1211         target->compute_visible_area(propwidth, 10000, pixel_aspect, target->orientation(), propwidth, propheight);
1223         window->target->compute_visible_area(propwidth, 10000, pixel_aspect, window->target->orientation(), propwidth, propheight);
12121224         break;
12131225
12141226      default:
1215         target->compute_visible_area(propwidth, propheight, pixel_aspect, target->orientation(), propwidth, propheight);
1227         window->target->compute_visible_area(propwidth, propheight, pixel_aspect, window->target->orientation(), propwidth, propheight);
12161228         break;
12171229   }
12181230
12191231   // get the minimum width/height for the current layout
1220   target->compute_minimum_size(minwidth, minheight);
1232   window->target->compute_minimum_size(minwidth, minheight);
12211233
12221234   // clamp against the absolute minimum
12231235   propwidth = MAX(propwidth, MIN_WINDOW_DIM);
r242703r242704
12281240   propheight = MAX(propheight, minheight);
12291241
12301242   // clamp against the maximum (fit on one screen for full screen mode)
1231   if (this->m_fullscreen)
1243   if (window->fullscreen)
12321244   {
1233      maxwidth = m_monitor->center_width - extrawidth;
1234      maxheight = m_monitor->center_height - extraheight;
1245      maxwidth = window->monitor->center_width - extrawidth;
1246      maxheight = window->monitor->center_height - extraheight;
12351247   }
12361248   else
12371249   {
1238      maxwidth = m_monitor->center_width - extrawidth;
1239      maxheight = m_monitor->center_height - extraheight;
1250      maxwidth = window->monitor->center_width - extrawidth;
1251      maxheight = window->monitor->center_height - extraheight;
12401252
12411253      // further clamp to the maximum width/height in the window
1242      if (this->m_maxwidth != 0)
1243         maxwidth = MIN(maxwidth, this->m_maxwidth + extrawidth);
1244      if (this->m_maxheight != 0)
1245         maxheight = MIN(maxheight, this->m_maxheight + extraheight);
1254      if (window->maxwidth != 0)
1255         maxwidth = MIN(maxwidth, window->maxwidth + extrawidth);
1256      if (window->maxheight != 0)
1257         maxheight = MIN(maxheight, window->maxheight + extraheight);
12461258   }
12471259
12481260   // clamp to the maximum
r242703r242704
12501262   propheight = MIN(propheight, maxheight);
12511263
12521264   // compute the visible area based on the proposed rectangle
1253   target->compute_visible_area(propwidth, propheight, pixel_aspect, target->orientation(), viswidth, visheight);
1265   window->target->compute_visible_area(propwidth, propheight, pixel_aspect, window->target->orientation(), viswidth, visheight);
12541266
12551267   *window_width = viswidth;
12561268   *window_height = visheight;
r242703r242704
12621274//  (window thread)
12631275//============================================================
12641276
1265void sdl_window_info::get_min_bounds(int *window_width, int *window_height, int constrain)
1277static void get_min_bounds(sdl_window_info *window, int *window_width, int *window_height, int constrain)
12661278{
12671279   INT32 minwidth, minheight;
12681280
12691281   // get the minimum target size
1270   this->target->compute_minimum_size(minwidth, minheight);
1282   window->target->compute_minimum_size(minwidth, minheight);
12711283
12721284   // expand to our minimum dimensions
12731285   if (minwidth < MIN_WINDOW_DIM)
r242703r242704
12831295
12841296      // first constrain with no height limit
12851297      test1w = minwidth; test1h = 10000;
1286      this->constrain_to_aspect_ratio(&test1w, &test1h, WMSZ_BOTTOMRIGHT);
1298      constrain_to_aspect_ratio(window, &test1w, &test1h, WMSZ_BOTTOMRIGHT);
12871299
12881300      // then constrain with no width limit
12891301      test2w = 10000; test2h = minheight;
1290      this->constrain_to_aspect_ratio(&test2w, &test2h, WMSZ_BOTTOMRIGHT);
1302      constrain_to_aspect_ratio(window, &test2w, &test2h, WMSZ_BOTTOMRIGHT);
12911303
12921304      // pick the larger
12931305      if ( test1w > test2w )
r242703r242704
13121324//  (window thread)
13131325//============================================================
13141326
1315void sdl_window_info::get_max_bounds(int *window_width, int *window_height, int constrain)
1327static void get_max_bounds(sdl_window_info *window, int *window_width, int *window_height, int constrain)
13161328{
13171329   INT32 maxwidth, maxheight;
13181330
13191331   // compute the maximum client area
1320   maxwidth = m_monitor->center_width;
1321   maxheight = m_monitor->center_height;
1332   maxwidth = window->monitor->center_width;
1333   maxheight = window->monitor->center_height;
13221334
13231335   // clamp to the window's max
1324   if (this->m_maxwidth != 0)
1336   if (window->maxwidth != 0)
13251337   {
1326      int temp = this->m_maxwidth + WINDOW_DECORATION_WIDTH;
1338      int temp = window->maxwidth + WINDOW_DECORATION_WIDTH;
13271339      if (temp < maxwidth)
13281340         maxwidth = temp;
13291341   }
1330   if (this->m_maxheight != 0)
1342   if (window->maxheight != 0)
13311343   {
1332      int temp = this->m_maxheight + WINDOW_DECORATION_HEIGHT;
1344      int temp = window->maxheight + WINDOW_DECORATION_HEIGHT;
13331345      if (temp < maxheight)
13341346         maxheight = temp;
13351347   }
13361348
13371349   // constrain to fit
13381350   if (constrain)
1339      this->constrain_to_aspect_ratio(&maxwidth, &maxheight, WMSZ_BOTTOMRIGHT);
1351      constrain_to_aspect_ratio(window, &maxwidth, &maxheight, WMSZ_BOTTOMRIGHT);
13401352   //else
13411353   {
13421354      maxwidth -= WINDOW_DECORATION_WIDTH;
trunk/src/osd/sdl/window.h
r242703r242704
3434
3535struct sdl_window_info
3636{
37   sdl_window_info(running_machine *a_machine, sdl_monitor_info *a_monitor,
38         int index, const sdl_window_config *config)
39   : next(NULL), m_minwidth(0), m_minheight(0),
40      startmaximized(0),
41      rendered_event(0), target(0), primlist(NULL), dxdata(NULL),
42      width(0), height(0), blitwidth(0), blitheight(0),
43      start_viewscreen(0),
44#if (SDLMAME_SDL2)
45      sdl_window(NULL),
46      resize_width(0),
47      resize_height(0),
48      last_resize(0),
49#else
50      screen_width(0), screen_height(0),
51#endif
52      m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0), m_index(0)
53   {
54      m_maxwidth = config->width;
55      m_maxheight = config->height;
56      depth = config->depth;
57      refresh = config->refresh;
58      m_index = index;
59
60      //FIXME: these should be per_window in config-> or even better a bit set
61      m_fullscreen = !video_config.windowed;
62      prescale = video_config.prescale;
63
64      if (!m_fullscreen)
65      {
66         windowed_width = config->width;
67         windowed_height = config->height;
68      }
69   }
70
71   void video_window_update(running_machine &machine);
72   void blit_surface_size(int window_width, int window_height);
73   void toggle_full_screen(running_machine &machine);
74   void modify_prescale(running_machine &machine, int dir);
75   void window_resize(INT32 width, INT32 height);
76   void window_clear();
77
78   void video_window_destroy(running_machine &machine);
79   void pick_best_mode(int *fswidth, int *fsheight);
80   void get_min_bounds(int *window_width, int *window_height, int constrain);
81   void get_max_bounds(int *window_width, int *window_height, int constrain);
82
8337   // Pointer to next window
8438   sdl_window_info *   next;
8539
40   // Pointer to machine
8641   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
87   sdl_monitor_info *monitor() const { return m_monitor; }
88   int fullscreen() const { return m_fullscreen; }
89   int index() const { return m_index; }
42   running_machine *   m_machine;
9043
91   void set_fullscreen(int afullscreen) { m_fullscreen = afullscreen; }
92
9344   // Draw Callbacks
9445   int (*create)(sdl_window_info *window, int width, int height);
9546   void (*resize)(sdl_window_info *window, int width, int height);
9647   int (*draw)(sdl_window_info *window, UINT32 dc, int update);
97   void (*set_target_bounds)(sdl_window_info *window);
48   render_primitive_list &(*get_primitives)(sdl_window_info *window);
9849   int (*xy_to_render_target)(sdl_window_info *window, int x, int y, int *xt, int *yt);
9950   void (*destroy_all_textures)(sdl_window_info *window);
10051   void (*destroy)(sdl_window_info *window);
r242703r242704
10354   // window handle and info
10455   char                title[256];
10556
57   // monitor info
58   sdl_monitor_info *  monitor;
59   int                 fullscreen;
60   int         index;
61
10662   // diverse flags
107   int                 m_minwidth, m_minheight;
108   int                 m_maxwidth, m_maxheight;
63   int                 minwidth, minheight;
64   int                 maxwidth, maxheight;
10965   int                 depth;
11066   int                 refresh;
11167   int                 windowed_width;
r242703r242704
144100   int                 screen_width;
145101   int                 screen_height;
146102#endif
147
148private:
149   void constrain_to_aspect_ratio(int *window_width, int *window_height, int adjustment);
150
151   // Pointer to machine
152   running_machine *   m_machine;
153   // monitor info
154   sdl_monitor_info *  m_monitor;
155   int                 m_fullscreen;
156   int                 m_index;
157
158103};
159104
160105struct sdl_draw_info
r242703r242704
176121
177122// creation/deletion of windows
178123int sdlwindow_video_window_create(running_machine &machine, int index, sdl_monitor_info *monitor, const sdl_window_config *config);
124void sdlwindow_video_window_update(running_machine &machine, sdl_window_info *window);
125void sdlwindow_blit_surface_size(sdl_window_info *window, int window_width, int window_height);
126void sdlwindow_toggle_full_screen(running_machine &machine, sdl_window_info *window);
127void sdlwindow_modify_prescale(running_machine &machine, sdl_window_info *window, int dir);
128void sdlwindow_resize(sdl_window_info *window, INT32 width, INT32 height);
129void sdlwindow_clear(sdl_window_info *window);
179130
131
180132//============================================================
181133// PROTOTYPES - drawsdl.c
182134//============================================================
trunk/src/osd/windows/d3dhlsl.c
r242703r242704
940940      texture.rowpixels = shadow_bitmap.rowpixels();
941941      texture.width = shadow_bitmap.width();
942942      texture.height = shadow_bitmap.height();
943      texture.set_palette(NULL);
943      texture.palette = NULL;
944944      texture.seqid = 0;
945945
946946      // now create it
trunk/src/osd/windows/drawd3d.c
r242703r242704
528528      texture.rowpixels = m_default_bitmap.rowpixels();
529529      texture.width = m_default_bitmap.width();
530530      texture.height = m_default_bitmap.height();
531      texture.set_palette(NULL);
531      texture.palette = NULL;
532532      texture.seqid = 0;
533533
534534      // now create it
r242703r242704
545545      texture.rowpixels = m_vector_bitmap.rowpixels();
546546      texture.width = m_vector_bitmap.width();
547547      texture.height = m_vector_bitmap.height();
548      texture.set_palette(NULL);
548      texture.palette = NULL;
549549      texture.seqid = 0;
550550
551551      // now create it
r242703r242704
25802580      switch (PRIMFLAG_GET_TEXFORMAT(flags))
25812581      {
25822582         case TEXFORMAT_PALETTE16:
2583            copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2583            copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25842584            break;
25852585
25862586         case TEXFORMAT_PALETTEA16:
2587            copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2587            copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25882588            break;
25892589
25902590         case TEXFORMAT_RGB32:
2591            copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2591            copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25922592            break;
25932593
25942594         case TEXFORMAT_ARGB32:
2595            copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2595            copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25962596            break;
25972597
25982598         case TEXFORMAT_YUY16:
25992599            if (m_texture_manager->get_yuv_format() == D3DFMT_YUY2)
2600               copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2600               copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
26012601            else if (m_texture_manager->get_yuv_format() == D3DFMT_UYVY)
2602               copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2602               copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
26032603            else
2604               copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2604               copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
26052605            break;
26062606
26072607         default:
trunk/src/osd/windows/vconv.c
r242703r242704
205205   // retrieve the version info
206206   if (!GetFileVersionInfo(path, 0, version_info_size, version_info))
207207   {
208      GlobalFree(version_info);
209208      fprintf(stderr, "GetFileVersionInfo() failed\n");
210209      exit(-100);
211210   }
r242703r242704
213212   // extract the VS_FIXEDFILEINFO from the version info
214213   if (!VerQueryValue(version_info, sub_block, &sub_buffer, &sub_buffer_size))
215214   {
216      GlobalFree(version_info);
217215      fprintf(stderr, "VerQueryValue() failed\n");
218216      exit(-100);
219217   }
trunk/src/osd/windows/windows.mak
r242703r242704
302302include $(SRC)/build/cc_detection.mak
303303
304304# ensure we statically link the gcc runtime lib
305LDFLAGS += -static-libgcc -static
305LDFLAGS += -static-libgcc
306306
307307# TODO: needs to use $(CC)
308308TEST_GCC := $(shell gcc --version)
r242703r242704
312312endif
313313
314314# add the windows libraries
315BASELIBS += -luser32 -lgdi32 -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi -lwsock32
316315LIBS += -luser32 -lgdi32 -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi -lwsock32
317316
318317ifdef USE_SDL
trunk/src/osd/windows/winprefix.h
r242703r242704
3838#define min(x,y) fmin(x,y)
3939#define max(x,y) fmax(x,y)
4040#endif
41#ifdef _MSC_VER
42#if _MSC_VER < 1800
43#define _USE_MATH_DEFINES
44#include <math.h>
45static __inline double fmin(double x, double y){ return (x < y) ? x : y; }
46static __inline double fmax(double x, double y){ return (x > y) ? x : y; }
47static __inline double log2(double x) { return log(x) * M_LOG2E; }
48#endif
49#endif
5041
5142#define PATH_SEPARATOR      "\\"
trunk/src/osd/windows/winwork.c
r242703r242704
109109   volatile INT32      items;          // items in the queue
110110   volatile INT32      livethreads;    // number of live threads
111111   volatile INT32      waiting;        // is someone waiting on the queue to complete?
112   volatile INT32      exiting;        // should the threads exit on their next opportunity?
112   volatile UINT8      exiting;        // should the threads exit on their next opportunity?
113113   UINT32              threads;        // number of threads in this queue
114114   UINT32              flags;          // creation flags
115115   work_thread_info *  thread;         // array of thread information
r242703r242704
149149static int effective_num_processors(void);
150150static void * worker_thread_entry(void *param);
151151static void worker_thread_process(osd_work_queue *queue, work_thread_info *thread);
152static bool queue_has_list_items(osd_work_queue *queue);
153152
154153
155154//============================================================
r242703r242704
324323      end_timing(queue->thread[queue->threads].waittime);
325324
326325      // signal all the threads to exit
327      atomic_exchange32(&queue->exiting, TRUE);
326      queue->exiting = TRUE;
328327      for (threadnum = 0; threadnum < queue->threads; threadnum++)
329328      {
330329         work_thread_info *thread = &queue->thread[threadnum];
r242703r242704
423422      osd_work_item *item;
424423
425424      // first allocate a new work item; try the free list first
426      INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
427425      do
428426      {
429427         item = (osd_work_item *)queue->free;
430428      } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item);
431      osd_scalable_lock_release(queue->lock, lockslot);
432429
433430      // if nothing, allocate something new
434431      if (item == NULL)
r242703r242704
439436            return NULL;
440437         item->event = NULL;
441438         item->queue = queue;
442         item->done = FALSE;
443439      }
444      else
445      {
446         atomic_exchange32(&item->done, FALSE); // needs to be set this way to prevent data race/usage of uninitialized memory on Linux
447      }
448440
449441      // fill in the basics
450442      item->next = NULL;
r242703r242704
452444      item->param = parambase;
453445      item->result = NULL;
454446      item->flags = flags;
447      item->done = FALSE;
455448
456449      // advance to the next
457450      lastitem = item;
r242703r242704
514507
515508   // if we don't have an event, create one
516509   if (item->event == NULL)
517   {
518      INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
519510      item->event = osd_event_alloc(TRUE, FALSE);     // manual reset, not signalled
520      osd_scalable_lock_release(item->queue->lock, lockslot);
521   }
522511   else
523      osd_event_reset(item->event);
512         osd_event_reset(item->event);
524513
525514   // if we don't have an event, we need to spin (shouldn't ever really happen)
526515   if (item->event == NULL)
r242703r242704
561550   osd_work_item_wait(item, 100 * osd_ticks_per_second());
562551
563552   // add us to the free list on our queue
564   INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
565553   do
566554   {
567555      next = (osd_work_item *)item->queue->free;
568556      item->next = next;
569557   } while (compare_exchange_ptr((PVOID volatile *)&item->queue->free, next, item) != next);
570   osd_scalable_lock_release(item->queue->lock, lockslot);
571558}
572559
573560
r242703r242704
615602   {
616603      // block waiting for work or exit
617604      // bail on exit, and only wait if there are no pending items in queue
618      if (queue->exiting)
619         break;
620
621      if (!queue_has_list_items(queue))
605      if (!queue->exiting && queue->list == NULL)
622606      {
623607         begin_timing(thread->waittime);
624608         osd_event_wait(thread->wakeevent, INFINITE);
625609         end_timing(thread->waittime);
626610      }
627
628611      if (queue->exiting)
629612         break;
630613
r242703r242704
652635         }
653636
654637         // if nothing more, release the processor
655         if (!queue_has_list_items(queue))
638         if (queue->list == NULL)
656639            break;
657640         add_to_stat(&queue->spinloops, 1);
658641      }
r242703r242704
676659   begin_timing(thread->runtime);
677660
678661   // loop until everything is processed
679   while (true)
662   while (queue->list != NULL)
680663   {
681      osd_work_item *item = NULL;
664      osd_work_item *item;
665      INT32 lockslot;
682666
683      bool end_loop = false;
684
685667      // use a critical section to synchronize the removal of items
668      lockslot = osd_scalable_lock_acquire(queue->lock);
686669      {
687         INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
688         if (queue->list == NULL)
670         // pull the item from the queue
671         item = (osd_work_item *)queue->list;
672         if (item != NULL)
689673         {
690            end_loop = true;
674            queue->list = item->next;
675            if (queue->list == NULL)
676               queue->tailptr = (osd_work_item **)&queue->list;
691677         }
692         else
693         {
694            // pull the item from the queue
695            item = (osd_work_item *)queue->list;
696            if (item != NULL)
697            {
698               queue->list = item->next;
699               if (queue->list == NULL)
700                  queue->tailptr = (osd_work_item **)&queue->list;
701            }
702         }
703         osd_scalable_lock_release(queue->lock, lockslot);
704678      }
679      osd_scalable_lock_release(queue->lock, lockslot);
705680
706      if (end_loop)
707         break;
708
709681      // process non-NULL items
710682      if (item != NULL)
711683      {
r242703r242704
724696            osd_work_item_release(item);
725697
726698         // set the result and signal the event
727         else
699         else if (item->event != NULL)
728700         {
729            INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
730            if (item->event != NULL)
731            {
732               osd_event_set(item->event);
733               add_to_stat(&item->queue->setevents, 1);
734            }
735            osd_scalable_lock_release(item->queue->lock, lockslot);
701            osd_event_set(item->event);
702            add_to_stat(&item->queue->setevents, 1);
736703         }
737704
738705         // if we removed an item and there's still work to do, bump the stats
739         if (queue_has_list_items(queue))
706         if (queue->list != NULL)
740707            add_to_stat(&queue->extraitems, 1);
741708      }
742709   }
r242703r242704
750717
751718   end_timing(thread->runtime);
752719}
753
754bool queue_has_list_items(osd_work_queue *queue)
755{
756   INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
757   bool has_list_items = (queue->list != NULL);
758   osd_scalable_lock_release(queue->lock, lockslot);
759   return has_list_items;
760}
trunk/src/tools/nltool.c
r242703r242704
1010#include <stdlib.h>
1111#include <string.h>
1212#include <ctype.h>
13#include <sstream>
1413#include "astring.h"
1514#include "corefile.h"
1615#include "corestr.h"
trunk/src/tools/tools.mak
r242703r242704
7474
7575romcmp$(EXE): $(ROMCMPOBJS) $(LIBUTIL) $(ZLIB) $(EXPAT) $(LIBOCORE)
7676   @echo Linking $@...
77   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
77   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
7878
7979
8080
r242703r242704
8888chdman$(EXE): $(CHDMANOBJS) $(LIBUTIL) $(ZLIB) $(EXPAT) $(FLAC_LIB) $(7Z_LIB) $(LIBOCORE)
8989   $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
9090   @echo Linking $@...
91   $(LD) $(LDFLAGS) $(VERSIONOBJ) $^ $(BASELIBS) $(FLAC_LIB) -o $@
91   $(LD) $(LDFLAGS) $(VERSIONOBJ) $^ $(LIBS) $(FLAC_LIB) -o $@
9292
9393
9494
r242703r242704
101101
102102jedutil$(EXE): $(JEDUTILOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
103103   @echo Linking $@...
104   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
104   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
105105
106106
107107
r242703r242704
115115# TODO: Visual Studio wants $(FLAC_LIB) and $(7Z_LIB) during linking...
116116unidasm$(EXE): $(UNIDASMOBJS) $(LIBDASM) $(LIBEMU) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT) $(FLAC_LIB) $(7Z_LIB)
117117   @echo Linking $@...
118   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
118   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
119119
120120
121121
r242703r242704
128128
129129ldresample$(EXE): $(LDRESAMPLEOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(FLAC_LIB) $(7Z_LIB) $(EXPAT)
130130   @echo Linking $@...
131   $(LD) $(LDFLAGS) $^ $(BASELIBS) $(FLAC_LIB) -o $@
131   $(LD) $(LDFLAGS) $^ $(LIBS) $(FLAC_LIB) -o $@
132132
133133
134134
r242703r242704
141141
142142ldverify$(EXE): $(LDVERIFYOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(FLAC_LIB) $(7Z_LIB) $(EXPAT)
143143   @echo Linking $@...
144   $(LD) $(LDFLAGS) $^ $(BASELIBS) $(FLAC_LIB) -o $@
144   $(LD) $(LDFLAGS) $^ $(LIBS) $(FLAC_LIB) -o $@
145145
146146
147147
r242703r242704
154154
155155regrep$(EXE): $(REGREPOBJS) $(LIBUTIL) $(FLAC_LIB) $(LIBOCORE) $(ZLIB) $(EXPAT)
156156   @echo Linking $@...
157   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
157   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
158158
159159
160160
r242703r242704
167167
168168srcclean$(EXE): $(SRCCLEANOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
169169   @echo Linking $@...
170   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
170   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
171171
172172
173173
r242703r242704
180180
181181src2html$(EXE): $(SRC2HTMLOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
182182   @echo Linking $@...
183   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
183   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
184184
185185
186186
r242703r242704
194194# TODO: Visual Studio wants $(FLAC_LIB) and $(7Z_LIB) during linking...
195195split$(EXE): $(SPLITOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT) $(FLAC_LIB) $(7Z_LIB)
196196   @echo Linking $@...
197   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
197   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
198198
199199
200200
r242703r242704
207207
208208pngcmp$(EXE): $(PNGCMPOBJS) $(LIBUTIL) $(FLAC_LIB) $(LIBOCORE) $(ZLIB)
209209   @echo Linking $@...
210   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
210   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
211211
212212#-------------------------------------------------
213213# nltool
r242703r242704
219219
220220nltool$(EXE): $(NLTOOLOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
221221   @echo Linking $@...
222   $(LD) $(LDFLAGS) $^ $(BASELIBS) -o $@
222   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
223223
trunk/src/version.c
r242703r242704
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.157"
11#define BARE_BUILD_VERSION "0.156"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team