Previous 199869 Revisions Next

r33555 Wednesday 26th November, 2014 at 09:37:58 UTC by Miodrag Milanović
Cleanups and version bump
[hash]apfimag_cass.xml cgenie_cass.xml compclr2_flop.xml epson_cpm.xml jupace_cass.xml leapster.xml m5_cass.xml pc98.xml svi318_cass.xml to7_cart.xml tvc_cass.xml vsmile_cart.xml
[src]version.c
[src/emu]memory.c memory.h romload.c
[src/emu/bus/a2bus]a2bus.h a2eext80col.c a2estd80col.c a2swyft.c ramcard128k.c ramcard16k.c
[src/emu/bus/astrocde]exp.h ram.c ram.h rom.c rom.h slot.c
[src/emu/bus/centronics]epson_lx810l.h
[src/emu/bus/coco]coco_dwsock.c coco_dwsock.h
[src/emu/bus/cpc]playcity.c playcity.h
[src/emu/bus/gameboy]gb_slot.c
[src/emu/bus/isa]mda.c xsu_cards.c
[src/emu/bus/pce]pce_slot.c
[src/emu/bus/pet]hsg.c hsg.h
[src/emu/bus/spc1000]fdd.c fdd.h vdp.c vdp.h
[src/emu/cpu/cp1610]cp1610.c cp1610.h
[src/emu/cpu/powerpc]ppc.h
[src/emu/cpu/rsp]rsp.h rspcp2.c rspcp2.h rspcp2d.c rspcp2d.h rspcp2s.c rspcp2s.h rspdrc.c
[src/emu/cpu/upd7810]upd7810.c
[src/emu/machine]i6300esb.c i6300esb.h i82875p.h intelfsh.c intelfsh.h lpc-acpi.c lpc-rtc.c lpc-rtc.h lpc.c lpc.h omti5100.c omti5100.h pci.c pci.h pla.c pla.h
[src/emu/sound]sn76477.h
[src/emu/video]315_5124.h 315_5313.c snes_ppu.c
[src/lib/formats]flopimg.c flopimg.h spc1000_cas.c victor9k_dsk.c
[src/lib/util]plaparse.c
[src/lib/web]mongoose.c
[src/lib/winpcap]Packet32.h Win32-Extensions.h bittypes.h ip6_misc.h pcap-bpf.h pcap-namedb.h pcap-stdinc.h pcap.h remote-ext.h
[src/lib/winpcap/pcap]bluetooth.h bpf.h namedb.h pcap.h sll.h usb.h vlan.h
[src/mame]mame.lst
[src/mame/drivers]airbustr.c alinvade.c alpha68k.c arkanoid.c astrcorp.c atetris.c cobra.c cv1k.c cybertnk.c darius.c dec0.c dragrace.c dreamwld.c fcrash.c gts3.c gts3a.c gts80b.c harddriv.c lethal.c lindbergh.c maygay1b.c naomi.c pacman.c peplus.c pse.c raiden2.c sbrkout.c segacoin.c segas16b.c segas18.c segaufo.c sfbonus.c suna8.c supduck.c tnzs.c twin16.c videopin.c
[src/mame/includes]atetris.h exidy440.h harddriv.h konamigx.h mario.h segas18.h suna8.h tnzs.h
[src/mame/machine]315-5881_crypt.c 315-5881_crypt.h 315_5296.h harddriv.c naomim2.c naomim2.h naomim4.c segabb.c slapstic.c stvprot.c
[src/mame/video]cps1.c dooyong.c exidy440.c harddriv.c model3.c psychic5.c rdpspn16.c sshangha.c
[src/mess]mess.lst
[src/mess/audio]dave.c
[src/mess/drivers]apple2.c apple2e.c apple2gs.c comp4.c dvk_ksm.c ec184x.c gamate.c iskr103x.c leapster.c merlin.c ngen.c pc9801.c pcd.c px4.c px8.c simon.c spc1000.c ti85.c ticalc1x.c tk2000.c
[src/mess/includes]pet.h ti85.h victor9k.h wswan.h xerox820.h
[src/mess/machine]coco.c gamecom.c hec2hrp.c ie15_kbd.c ms7004.c ti85.c victor9k_fdc.c victor9kb.c wswan.c x820kb.c
[src/mess/tools/castool]main.c
[src/mess/video]apple2.c apple2.h wswan_video.c wswan_video.h
[src/osd]osdnet.c
[src/osd/modules/debugger/qt]debugqtdasmwindow.c debugqtlogwindow.c debugqtmainwindow.c debugqtmainwindow.h debugqtmemorywindow.c debugqtview.c debugqtview.h

trunk/hash/apfimag_cass.xml
r242066r242067
33
44<softwarelist name="apfimag_cass" description="APF Imagination cassettes">
55
6<!-- To load a tape, just start APF Imagination with the BASIC cart inserted, and type CLOAD followed by <Return>
6<!-- To load a tape, just start APF Imagination with the BASIC cart inserted, and type CLOAD followed by <Return>
77(by default mapped to your ']' key). Then start the tape from the Internal UI and press <Return>.
88
99If you don't press <Return>, the system won't read the tape (this is fairly unusual but it's the way the system works)
trunk/hash/cgenie_cass.xml
r242066r242067
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33
4<!--
4<!--
55
66  TODO:
77  * document basic tapes when they are fixed!
trunk/hash/compclr2_flop.xml
r242066r242067
187187         </dataarea>
188188      </part>
189189   </software>
190   
190
191191   <software name="asteroida" cloneof="asteroid">
192192      <description>Asteroids (Alt)</description>
193193      <year>19??</year>
trunk/hash/epson_cpm.xml
r242066r242067
55
66<softwarelist name="epson_cpm" description="Epson CPM systems floppy disks">
77
8    <!-- This disk is used to boot the intelligent TF-20 floppy drive -->
8   <!-- This disk is used to boot the intelligent TF-20 floppy drive -->
99
1010   <software name="tf20boot">
1111      <description>TF-20 boot disk</description>
r242066r242067
1919      </part>
2020   </software>
2121
22    <!-- The following disks are part of the vfloppy distribution -->
22   <!-- The following disks are part of the vfloppy distribution -->
2323
2424   <software name="arcs">
2525      <description>Archivers</description>
trunk/hash/jupace_cass.xml
r242066r242067
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33
4<!--
4<!--
55
6  TODO:
7  * update to latest TOSEC (2014-10-31)
6  TODO:
7  * update to latest TOSEC (2014-10-31)
88  * add usage instructions
99  * check which games work and which don't and fix the supported flag accordingly
1010-->
trunk/hash/leapster.xml
r242066r242067
4141
4242
4343
44 
44
4545<softwarelist name="leapster" description="LeapFrog Leapster cartridges">
4646
4747   <software name="findnemo" supported="no">
r242066r242067
6565         </dataarea>
6666      </part>
6767   </software>
68 
68
6969   <software name="spdrman" supported="no">
7070      <description>Spider-Man - Schachmatt den Schildersaboteuren! (German)</description>
7171      <year>2003</year>
r242066r242067
9898         </dataarea>
9999      </part>
100100   </software>
101 
101
102102   <software name="demo" supported="no">
103103      <description>Demo - Herbst 2004 II (German)</description>
104104      <year>2003</year>
r242066r242067
120120         </dataarea>
121121      </part>
122122   </software>
123 
123
124124   <software name="disprinz" supported="no">
125125      <description>Disney Prinzessinnen - Zauberhaftes Lernen (German)</description>
126126      <year>2003</year>
trunk/hash/m5_cass.xml
r242066r242067
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33
4<!--
5   Cassettes that load with CHAIN cannot auto-start correctly.
6   Mount the BASIC-I cart first, then the cassette to load + run them.
7   
8   Other tapes should auto-load and run.
4<!--
5    Cassettes that load with CHAIN cannot auto-start correctly.
6    Mount the BASIC-I cart first, then the cassette to load + run them.
7
8    Other tapes should auto-load and run.
99-->
1010
1111<softwarelist name="m5_cass" description="Sord M5 cassettes">
r242066r242067
220220      <year>19??</year>
221221      <publisher>&lt;unknown&gt;</publisher>
222222      <info name="usage" value="Mount together with &quot;BASIC-I&quot; and load with CHAIN"/>
223   <!--<sharedfeat name="requirement" value="m5_cart:basici"/>-->   
223   <!--<sharedfeat name="requirement" value="m5_cart:basici"/>-->
224224
225225      <part name="cass1" interface="m5_cass">
226226         <dataarea name="cass" size="3278">
trunk/hash/pc98.xml
r242066r242067
55
66  This software list collects disks from many different sources, including the 13GB pack with ~90 rar files floating around since 2011
77  Origin for many of the disks is Japanese BBS and/or P2P, so it is hard to properly credits whoever dumped them
8  A huge credit goes however to Tokugawa Boards people (Ben, pete_j, Starscream the 2nd, delicious, Ashura, fa123, kobushi, Trickless, etc.)
8  A huge credit goes however to Tokugawa Boards people (Ben, pete_j, Starscream the 2nd, delicious, Ashura, fa123, kobushi, Trickless, etc.)
99  for sharing and dumping a lot of disks and for the researches on the disks
1010
1111-->
r242066r242067
4674046740         </dataarea>
4674146741      </part>
4674246742   </software>
46743
46743
4674446744   <software name="paradox" supported="no">
4674546745      <description>Paradox</description>
4674646746      <year>19??</year>
r242066r242067
4882348823
4882448824
4882548825
48826<!--
48826<!--
4882748827
4882848828  Game Packs, hopefully to be replaced with real disk images of the single games eventually
4882948829
r242066r242067
5688356883
5688456884
5688556885
56886<!--
56886<!--
5688756887
5688856888  Coverdisks
5688956889
r242066r242067
5784157841
5784257842
5784357843
57844<!--
57844<!--
5784557845
5784657846  Game and Software Packs / Collections
5784757847
r242066r242067
5832358323   </software>
5832458324
5832558325
58326<!--
58326<!--
5832758327
5832858328  Bio 100% Freeware software
5832958329
r242066r242067
5862258622   </software>
5862358623
5862458624
58625<!--
58625<!--
5862658626
5862758627  VECTOR Freeware software
58628 
58628
5862958629  These were available for download at Vector's homepage
5863058630  The disk images below have been created by users to launch the games in emulators
5863158631
r242066r242067
6243762437
6243862438
6243962439
62440<!--   <software name="">
62441      <description>lodoss tou senki - custom (turbo program?) / ロードス島戦記カスタム</description>
62442      <year>19??</year>
62443      <publisher>&lt;unknown&gt;</publisher>
62444      <part name="flop1" interface="floppy_5_25">
62445         <feature name="part_id" value="Disk A"/>
62446         <dataarea name="flop" size="1265664">
62447            <rom name="custom_program.fdi" size="1265664" crc="b78832f3" sha1="853bbf51085570147777460b2481be3149c710e4" offset="0" />
62448         </dataarea>
62449      </part>
62450      <part name="flop2" interface="floppy_5_25">
62451         <feature name="part_id" value="Disk A"/>
62452         <dataarea name="flop" size="1265664">
62453            <rom name="custom_scenario.fdi" size="1265664" crc="8e8ee17d" sha1="f8b900cfdf557af018634003a6382aa7c35faab6" offset="0" /> <!- - same as in lodoss? - ->
62454         </dataarea>
62455      </part>
62456   </software>
62440<!--    <software name="">
62441        <description>lodoss tou senki - custom (turbo program?) / ロードス島戦記カスタム</description>
62442        <year>19??</year>
62443        <publisher>&lt;unknown&gt;</publisher>
62444        <part name="flop1" interface="floppy_5_25">
62445            <feature name="part_id" value="Disk A"/>
62446            <dataarea name="flop" size="1265664">
62447                <rom name="custom_program.fdi" size="1265664" crc="b78832f3" sha1="853bbf51085570147777460b2481be3149c710e4" offset="0" />
62448            </dataarea>
62449        </part>
62450        <part name="flop2" interface="floppy_5_25">
62451            <feature name="part_id" value="Disk A"/>
62452            <dataarea name="flop" size="1265664">
62453                <rom name="custom_scenario.fdi" size="1265664" crc="8e8ee17d" sha1="f8b900cfdf557af018634003a6382aa7c35faab6" offset="0" /> <!- - same as in lodoss? - ->
62454            </dataarea>
62455        </part>
62456    </software>
6245762457-->
6245862458
62459<!--   <software name="">
62460      <description>morita shougi ii + hanyuu data / 森田将棋2+ 羽生 データ</description>
62461      <year>19??</year>
62462      <publisher>&lt;unknown&gt;</publisher>
62463      <part name="flop1" interface="floppy_5_25">
62464         <dataarea name="flop" size="1281968">
62465            <rom name="morita2p.d88" size="1281968" crc="99effa5b" sha1="c7c4a60e71b7112d94b85eb4fe0d156fae2c0c35" offset="0" />
62466         </dataarea>
62467      </part>
62468   </software>
62459<!--    <software name="">
62460        <description>morita shougi ii + hanyuu data / 森田将棋2+ 羽生 データ</description>
62461        <year>19??</year>
62462        <publisher>&lt;unknown&gt;</publisher>
62463        <part name="flop1" interface="floppy_5_25">
62464            <dataarea name="flop" size="1281968">
62465                <rom name="morita2p.d88" size="1281968" crc="99effa5b" sha1="c7c4a60e71b7112d94b85eb4fe0d156fae2c0c35" offset="0" />
62466            </dataarea>
62467        </part>
62468    </software>
6246962469-->
6247062470
6247162471
trunk/hash/svi318_cass.xml
r242066r242067
22072207   </software>
22082208
22092209   <!-- Joystick -->
2210   
2210
22112211   <software name="joysti01">
22122212      <description>Joystick 01</description>
22132213      <year>1985</year>
r242066r242067
23392339         </dataarea>
23402340      </part>
23412341   </software>
2342   
2342
23432343   <!-- MKOD -->
2344   
2344
23452345   <software name="mkod01">
23462346      <description>MKOD Collection 01</description>
23472347      <year>19??</year>
r242066r242067
25692569         </dataarea>
25702570      </part>
25712571   </software>
2572   
2572
25732573   <!-- BASIC Collections -->
25742574
25752575   <software name="basicc01">
trunk/hash/to7_cart.xml
r242066r242067
2828         </dataarea>
2929      </part>
3030   </software>
31   
31
3232   <software name="6809langb" cloneof="6809lang">
3333      <description>6809 Language Module (v1.0)</description>
3434      <year>1984</year>
r242066r242067
5252         </dataarea>
5353      </part>
5454   </software>
55   
55
5656   <software name="airbus">
5757      <description>Airbus</description>
5858      <year>1984</year>
r242066r242067
6464         </dataarea>
6565      </part>
6666   </software>
67   
67
6868   <software name="atomium">
6969      <description>Atomium</description>
7070      <year>1982</year>
r242066r242067
7676         </dataarea>
7777      </part>
7878   </software>
79   
79
8080   <software name="basic">
8181      <description>BASIC (v1.0)</description>
8282      <year>1982</year>
r242066r242067
8888         </dataarea>
8989      </part>
9090   </software>
91   
91
9292   <software name="blitz">
9393      <description>Blitz!</description>
9494      <year>1984</year>
r242066r242067
104104   <software name="budgfami">
105105      <description>Budget Familial</description>
106106      <year>1982</year>
107      <publisher>Answare</publisher>   
108   
107      <publisher>Answare</publisher>
108
109109      <part name="cart" interface="to7_cart">
110110         <dataarea name="rom" size="16384">
111111            <rom name="bf.7001.bin" size="16384" crc="193a8b14" sha1="82d3f56cd9c27ee80decf722a9e107761b42851e" offset="0x0000" />
112112         </dataarea>
113113      </part>
114114   </software>
115   
115
116116   <software name="caractr2">
117117      <description>Caractor II</description>
118118      <year>1984</year>
r242066r242067
124124         </dataarea>
125125      </part>
126126   </software>
127   
127
128128   <software name="caractor">
129129      <description>Caractor</description>
130130      <year>1983</year>
r242066r242067
136136         </dataarea>
137137      </part>
138138   </software>
139   
139
140140   <software name="choplift">
141141      <description>Choplifter</description>
142142      <year>1985</year>
r242066r242067
160160         </dataarea>
161161      </part>
162162   </software>
163   
163
164164   <software name="clrpaint">
165165      <description>Colorpaint</description>
166166      <year>1985</year>
r242066r242067
184184         </dataarea>
185185      </part>
186186   </software>
187   
187
188188   <software name="controle">
189189      <description>Controle Aerien</description>
190190      <year>1984</year>
r242066r242067
196196         </dataarea>
197197      </part>
198198   </software>
199   
199
200200   <software name="crypto">
201201      <description>Crypto</description>
202202      <year>1982</year>
r242066r242067
245245         </dataarea>
246246      </part>
247247   </software>
248   
248
249249   <software name="gemini">
250250      <description>Gemini</description>
251251      <year>1982</year>
r242066r242067
256256            <rom name="gemini (1982)(vifi-nathan)(fr).bin" size="4096" crc="c20c1d82" sha1="92ee16ef7d14b241e8df390b0e6192810a8eda40" offset="0x0000" />
257257         </dataarea>
258258      </part>
259   </software>   
260   
259   </software>
260
261261   <software name="gerfiche">
262262      <description>Gerez vos Fiches</description>
263263      <year>1984</year>
r242066r242067
280280            <rom name="gerez vos fiches (answare) (inconnus) (1984) (memo7).bin" size="16384" crc="f3ad6a2c" sha1="396427d6fcf22a69c5de6a4873e20a5b3b7062f9" offset="0x0000" />
281281         </dataarea>
282282      </part>
283   </software>   
284   
283   </software>
284
285285   <software name="gerteque">
286286      <description>Gerez Votre Bibliotheque-Discotheque-Videotheque</description>
287287      <year>1983</year>
r242066r242067
292292            <rom name="gerez votre bibliotheque-discotheque-videotheque (1983)(answare)(fr).bin" size="8192" crc="cb6f0f85" sha1="56ce86e414a7debdadac4a416bad4c70d289be95" offset="0x0000" />
293293         </dataarea>
294294      </part>
295   </software>   
296   
295   </software>
296
297297   <software name="chiflett">
298298      <description>Les Chiffres et les Lettres</description>
299299      <year>1984</year>
r242066r242067
305305         </dataarea>
306306      </part>
307307   </software>
308   
308
309309   <software name="logicod">
310310      <description>Logicod</description>
311311      <year>1982</year>
r242066r242067
317317         </dataarea>
318318      </part>
319319   </software>
320   
320
321321   <software name="logo">
322322      <description>LOGO (v1.0)</description>
323323      <year>1984</year>
r242066r242067
353353         </dataarea>
354354      </part>
355355   </software>
356   
356
357357   <software name="lsegedl">
358358      <description>LSEG-EDL (v3.51)</description>
359359      <year>1985</year>
r242066r242067
401401         </dataarea>
402402      </part>
403403   </software>
404   
404
405405   <software name="melodia">
406406      <description>Melodia</description>
407407      <year>1982</year>
r242066r242067
450450         </dataarea>
451451      </part>
452452   </software>
453   
453
454454   <software name="pictor">
455455      <description>Pictor</description>
456456      <year>1983</year>
r242066r242067
464464   </software>
465465
466466<!--
467   <software name="polyphon">
468      <description>Polyphonia</description>
469      <year>19??</year>
470      <publisher>&lt;unknown&gt;</publisher>
467    <software name="polyphon">
468        <description>Polyphonia</description>
469        <year>19??</year>
470        <publisher>&lt;unknown&gt;</publisher>
471471
472      <part name="cart" interface="to7_cart">
473         <dataarea name="rom" size="16384">
474            <rom name="polyphonia.bin" size="16384" crc="a38e60e0" sha1="a69569db7ca416159fc7e1921a60b38d40da8c8d" offset="0x0000" />
475         </dataarea>
476      </part>
477   </software>
472        <part name="cart" interface="to7_cart">
473            <dataarea name="rom" size="16384">
474                <rom name="polyphonia.bin" size="16384" crc="a38e60e0" sha1="a69569db7ca416159fc7e1921a60b38d40da8c8d" offset="0x0000" />
475            </dataarea>
476        </part>
477    </software>
478478-->
479479
480480   <software name="praxitel">
r242066r242067
488488         </dataarea>
489489      </part>
490490   </software>
491   
491
492492   <software name="prolog">
493493      <description>Prolog (v1.0)</description>
494494      <year>1986</year>
r242066r242067
500500         </dataarea>
501501      </part>
502502   </software>
503   
503
504504   <software name="quest">
505505      <description>Quest</description>
506506      <year>1983</year>
r242066r242067
512512         </dataarea>
513513      </part>
514514   </software>
515   
515
516516   <software name="scriptor">
517517      <description>Scriptor</description>
518518      <year>1984</year>
r242066r242067
560560         </dataarea>
561561      </part>
562562   </software>
563   
563
564564   <software name="threshld">
565565      <description>Threshold</description>
566566      <year>1984</year>
trunk/hash/tvc_cass.xml
r242066r242067
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3<!--
4   If you want to use these cassettes, you must remove the hbf floppy interface from the slot devices.
5   After doing so, mount the cassette and load with the "LOAD" command. In most cases the program will
6   auto-start.
3<!--
4    If you want to use these cassettes, you must remove the hbf floppy interface from the slot devices.
5    After doing so, mount the cassette and load with the "LOAD" command. In most cases the program will
6    auto-start.
77
8   NOTE: The multipart sets in TOSEC are from floppy-based games and cannot be loaded via cassette.
9   So, they are not listed here.
8    NOTE: The multipart sets in TOSEC are from floppy-based games and cannot be loaded via cassette.
9    So, they are not listed here.
1010-->
1111<softwarelist name="tvc_cass" description="Videoton TVC cassettes">
1212   <software name="advgame">
r242066r242067
13881388         </dataarea>
13891389      </part>
13901390   </software>
1391   
1391
13921392   <software name="labirnt1">
13931393      <description>Labirintus (Zoltán Gugi)</description>
13941394      <year>198?</year>
trunk/hash/vsmile_cart.xml
r242066r242067
1010V.Smile Motion:               80-08****  (Smartridges are orange)
1111V.Smile Smartbook Software:   80-089***  (Smartridges are red)
1212V.Smile:                      80-09****  (Smartridges are purple, some are gray because of plastic defects)
13V.Smile Baby                  80-099***  (Smartridges are yellow, incompatible with TV based V.Smile consoles)
13V.Smile Baby                  80-099***  (Smartridges are yellow, incompatible with TV based V.Smile consoles)
1414
1515Addons (w/ yellow Smartridges)
1616
r242066r242067
2525
2626V.Smile Art Studio           80-67000(US)
2727V.Smile Art Studio           80-67003(UK)
28V.Smile Zeichenatelier (Magic Malboard)       80-67004(GE)
28V.Smile Zeichenatelier (Magic Malboard)       80-67004(GE)
2929V.Smile Studio De Dessin     80-67005(FR)
3030V.Smile Estudio de Arte ORG  80-67022(SP)
3131V.Smile Estudio de Arte PINK 80-67057(SP)
r242066r242067
4040
4141Language:
4242********0 = US  (White labels on back)
43********1 = Italy  Apparently distributed by company 'Giochi Preziosi'
43********1 = Italy  Apparently distributed by company 'Giochi Preziosi'
4444********2 = Netherlands (Red or White labels on back)
4545********3 = UK (Red labels on back)
4646********4 = Germany (Blue labels on back)
r242066r242067
4949********7 = Spain (Green labels on back)
5050
515180-084000(US)   | Action Mania
52         (IT)   | ?????   
5380-084002(NL)   | Sports Games
52         (IT)   | ?????
5380-084002(NL)   | Sports Games
545480-084003(UK)   | Action Mania
555580-084004(GE)   | Sportskanone
565680-084005(FR)   | Sporti Folies
r242066r242067
14314380-084322(NL)   | TinkerBell
14414480-084323(UK)   | TinkerBell
14514580-084324(GE)   | TinkerBell
14680-084325(FR)   | La fee Clochette
14680-084325(FR)   | La fee Clochette
14714780-084326(PT)   | Sininho (84336 on cart)
14814880-084327(SP)   | Campanilla
149149-
r242066r242067
16016080-084364(GE)   | Meister Manny's Werkzeugkiste
16116180-084365(FR)   | Manny Et Ses Outils
16216280-084366(PT)   | Manny Maozinhas (84376 on cart)
16380-084367(SP)   | Manny Manitas
16380-084367(SP)   | Manny Manitas
164164-
16516580-084380(US)   | Winnie the Pooh - The Honey Hunt
166166         (IT)   | Winnie the Pooh - e la caccia al miele  ???
r242066r242067
18618680-084425(FR)   | Toy Story 3
18718780-084427(SP)   | Toy Story 3
188188-
18980-084440(US)   | Monsters vs. Aliens
19080-084442(NL)   | Monsters vs. Aliens
18980-084440(US)   | Monsters vs. Aliens
19080-084442(NL)   | Monsters vs. Aliens
19119180-084443(UK)   | Monsters vs. Aliens
19219280-084444(GE)   | Monsters vs. Aliens
19319380-084445(FR)   | Monsters vs. Aliens
r242066r242067
29929980-092004(GE)   | Abenteuer im ABC Park
30030080-092005(FR)   | ABC Land Aventure
30130180-092006(PT)   | ABC Adventure (EAN is 3417768920162 cart#92016)
30280-092007(SP)   | Aventuras en el Parque Alfabeto (purple)
30280-092007(SP)   | Aventuras en el Parque Alfabeto (purple)
30330380-092007(SP)   | Aventuras en el Parque Alfabeto (translucent) (No # on label)
304304-
30530580-092020(US)   | The Adventures of Little Red Riding Hood
r242066r242067
30830880-092025(FR)   | Les aventures du Le Petit Chaperon Rouge
309309-
31031080-092040(US)   | Learnin' Wheels  (blue car with guy driving)
31180-092043(UK)   | Learnin' Wheels 
31180-092043(UK)   | Learnin' Wheels
31231280-092044(GE)   | Freds Zahlen Rally  (note to self, guy in blue car wrong serial#)  80-092924(GE) on label
31331380-092045(FR)   | Apprenti' Pilote
314314-
31531580-092060(US)   | Winnie The Pooh: The Honey Hunt
316         (IT)   | Winnie the Pooh - e la caccia al miele
316         (IT)   | Winnie the Pooh - e la caccia al miele
31731780-092062(NL)   | Winnie de Poeh - De winderwereld van Poeh
31831880-092063(UK)   | Winnie The Pooh: The Honey Hunt
31931980-092064(GE)   | Pooh - Die Honigjagd
r242066r242067
34434480-092107(SP)   | Rey Leon - La Gran Aventura de Simba
345345-
34634680-092120(US)   | The Little Mermaid - Ariel's Majestic Journey
34780-092121(IT)   | Sirenetta - Ariel e le
34780-092121(IT)   | Sirenetta - Ariel e le
34834880-092122(NL)   | De Kleine Zeemeermin - De Wunderwereld von Ariel
34934980-092123(UK)   | The Little Mermaid - Ariel's Majestic Journey
35035080-092124(GE)   | Arielle die Meerjungfrau - Arielles aufregendes Abenteuer
35135180-092125(FR)   | La Petite Sirene - Ariel devient une princesse
35280-092126(PT)   |
35280-092126(PT)   |
35335380-092127(SP)   | La Sirenita - El Vieje Fantastico de Ariel
354354-
35535580-092140(US)   | Spider-Man & Friends - Secret Missions
r242066r242067
370370         (IT)   | Scooby-Doo! - Avventura e Funland
37137180-092162(NL)   | Scooby-Doo griezelen in het pretpark
37237280-092163(UK)   | Scooby-Doo! - Funland Frenzy
37380-092163-103(UK)   | Scooby-Doo! - Funland Frenzy
37380-092163-103(UK)   | Scooby-Doo! - Funland Frenzy
37437480-092163-293(UK)   | Scooby-Doo! - Funland Frenzy (Yellow, only Scooby on label might be motion version)
37537580-092165(FR)   | Scooby-Doo! - Panique a Funland
37637680-092165(FR)   | Scooby-Doo! - Panique a Funland (translucent purple, packin)
r242066r242067
37937980-092180(US)   | Care Bears - A Lesson in Caring
38038080-092183(UK)   | Care Bears - A Lesson in Caring
38138180-092184(GE)   | Gluecksbarchis  <- existance not proven
38280-092185(FR)   | Les Bisounours - Le Monde Merveilleux des Bisounours
38280-092185(FR)   | Les Bisounours - Le Monde Merveilleux des Bisounours
38338380-092187(SP)   | Osos Amorosos - Una Leccion de Amor
384384-
38538580-092200(US)   | Aladdin - Aladdin's Wonders of the World
r242066r242067
57057080-092827(SP)   | Campeonato de Futbol
571571-
57257280-092840(US)   | Wall-E
573         (IT)   | Wall-E  (GPZ07996)
573         (IT)   | Wall-E  (GPZ07996)
57457480-092842(NL)   | Wall-E
57557580-092843(UK)   | Wall-E
57657680-092844(GE)   | Wall-E
57757780-092845(FR)   | Wall-E
57880-092847(SP)   | Wall-E         
57880-092847(SP)   | Wall-E
579579-
58058080-092860(US)   | Shrek the Third: Arthur's School Day Adventure
581581         (IT)   | Shrek Terzo L'Advventura Do Artu in un Giorno di Scuola
trunk/src/emu/bus/a2bus/a2bus.h
r242066r242067
1616#include "emu.h"
1717
1818// /INH special addresses
19#define INH_START_INVALID   0xffff;
20#define INH_END_INVALID      0x0000;
19#define INH_START_INVALID   0xffff;
20#define INH_END_INVALID     0x0000;
2121
22// /INH types                       
23#define INH_NONE         0x00
24#define   INH_READ         0x01
25#define INH_WRITE         0x02
22// /INH types
23#define INH_NONE            0x00
24#define INH_READ            0x01
25#define INH_WRITE           0x02
2626
2727//**************************************************************************
2828//  INTERFACE CONFIGURATION MACROS
r242066r242067
120120
121121   devcb_write_line    m_out_irq_cb;
122122   devcb_write_line    m_out_nmi_cb;
123   devcb_write8      m_out_inh_cb;
123   devcb_write8        m_out_inh_cb;
124124
125125   device_a2bus_card_interface *m_device_list[8];
126126   const char *m_cputag;
trunk/src/emu/bus/a2bus/a2eext80col.c
r242066r242067
7171{
7272   return &m_ram[0];
7373}
74
trunk/src/emu/bus/a2bus/a2estd80col.c
r242066r242067
7878{
7979   return &m_ram[0];
8080}
81
trunk/src/emu/bus/a2bus/a2swyft.c
r242066r242067
7474{
7575   m_rombank = 0;
7676
77   m_inh_state = INH_READ;   // read-enable the ROM
77   m_inh_state = INH_READ; // read-enable the ROM
7878   recalc_slot_inh();
7979}
8080
r242066r242067
146146{
147147   return m_inh_state;
148148}
149
trunk/src/emu/bus/a2bus/ramcard128k.c
r242066r242067
126126   }
127127
128128   #if 0
129   printf("LC: (ofs %x) new state %c%c dxxx=%04x main=%05x\n",
130         offset,
131         (m_inh_state & INH_READ) ? 'R' : 'x',
132         (m_inh_state & INH_WRITE) ? 'W' : 'x',
133         m_dxxx_bank, m_main_bank);
129   printf("LC: (ofs %x) new state %c%c dxxx=%04x main=%05x\n",
130         offset,
131         (m_inh_state & INH_READ) ? 'R' : 'x',
132         (m_inh_state & INH_WRITE) ? 'W' : 'x',
133         m_dxxx_bank, m_main_bank);
134134   #endif
135135}
136136
r242066r242067
157157
158158UINT8 a2bus_ssramcard_device::read_inh_rom(address_space &space, UINT16 offset)
159159{
160   assert(m_inh_state & INH_READ);   // this should never happen
160   assert(m_inh_state & INH_READ); // this should never happen
161161
162162   if (offset < 0xe000)
163163   {
r242066r242067
188188{
189189   return m_inh_state;
190190}
191
trunk/src/emu/bus/a2bus/ramcard16k.c
r242066r242067
107107   }
108108
109109   #if 0
110   printf("LC: new state %c%c dxxx=%04x\n",
111         (m_inh_state & INH_READ) ? 'R' : 'x',
112         (m_inh_state & INH_WRITE) ? 'W' : 'x',
113         m_dxxx_bank);
110   printf("LC: new state %c%c dxxx=%04x\n",
111         (m_inh_state & INH_READ) ? 'R' : 'x',
112         (m_inh_state & INH_WRITE) ? 'W' : 'x',
113         m_dxxx_bank);
114114   #endif
115115}
116116
r242066r242067
137137
138138UINT8 a2bus_ramcard_device::read_inh_rom(address_space &space, UINT16 offset)
139139{
140   assert(m_inh_state & INH_READ);   // this should never happen
140   assert(m_inh_state & INH_READ); // this should never happen
141141
142142   if (offset < 0xe000)
143143   {
r242066r242067
168168{
169169   return m_inh_state;
170170}
171
trunk/src/emu/bus/astrocde/exp.h
r242066r242067
3434   virtual void device_start();
3535
3636   bool get_card_mounted() { return m_card_mounted; }
37   
37
3838   // reading and writing
3939   virtual DECLARE_READ8_MEMBER(read);
4040   virtual DECLARE_WRITE8_MEMBER(write);
trunk/src/emu/bus/astrocde/ram.c
r242066r242067
1919      mapped to the cartridge memory starting at $2000.  So it would be possible to
2020      load a cartridge program from tape into the expansion memory, then flip the range
2121      switch and run it as a cartridge.  This is useful for cartridge development.
22     
22
2323      Blue RAM -- available in 4K, 16K, and 32K.  These also use an INS8154 chip,
2424      (not yet implemented) which has an additional $80 bytes of RAM mapped
2525      immediately after the end of the expansion address space.  This memory
r242066r242067
2929      past this range)
3030      16K:  $6000 to $9FFF
3131      32K:  $6000 to $DFFF
32     
32
3333      VIPER System 1 -- This is available in 16K only.  It also includes a keyboard (not implemented).
3434      16K:  $6000 to $9FFF
35     
35
3636      Lil' WHITE RAM -- This is available in 32K only.  Attempts to read and write
3737      to memory outside of its address range ($D000 to $FFFF) are mapped to the expansion
3838      memory $5000 to $7FFF.  The current implementation won't allow the shadow RAM area
3939      to be accessed when RAM protect is on, but there is no known software that will
4040      access the upper range of the expansion RAM when RAM protect is enabled.
4141      32K:  $5000 to $CFFF
42     
42
4343      R&L 64K RAM Board -- This is a highly configurable kit.  RAM can be installed in
4444      2K increments.  So, the entire 44K expansion memory can be filled.  It is also
4545      possible to override the rest of the memory map with RAM (not implemented).
r242066r242067
4848      installing switches.  The ranges are $0000 to $0FFF (first 4K), $0000 to $3FFF (first 16K),
4949      and $0000 to $FFFF (all 64K).  The current implementation is for 44K expansion memory mapped from
5050      $5000 to $FFFF, with only a single write protect covering this entire range.
51
51
5252 ***********************************************************************************************************/
5353
5454
r242066r242067
209209   if (!m_write_prot->read())
210210      m_ram[offset] = data;
211211}
212
213
trunk/src/emu/bus/astrocde/ram.h
r242066r242067
3737public:
3838   // construction/destruction
3939   astrocade_blueram_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
40   
40
4141   virtual void device_start() { m_ram.resize(0x4000); save_item(NAME(m_ram)); }
4242};
4343
r242066r242067
4848public:
4949   // construction/destruction
5050   astrocade_blueram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
51   
51
5252   virtual void device_start() { m_ram.resize(0x8000); save_item(NAME(m_ram)); }
5353};
5454
r242066r242067
6060public:
6161   // construction/destruction
6262   astrocade_viper_sys1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
63   
63
6464   // device-level overrides
6565   virtual void device_start() { m_ram.resize(0x4000); save_item(NAME(m_ram)); }
6666   virtual void device_reset() {}
r242066r242067
6969   // reading and writing
7070   virtual DECLARE_READ8_MEMBER(read);
7171   virtual DECLARE_WRITE8_MEMBER(write);
72   
72
7373private:
7474   dynamic_buffer m_ram;
7575   required_ioport m_write_prot;
r242066r242067
8383public:
8484   // construction/destruction
8585   astrocade_whiteram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
86   
86
8787   // device-level overrides
8888   virtual void device_start() { m_ram.resize(0x8000); save_item(NAME(m_ram)); }
8989   virtual void device_reset() {}
9090   virtual ioport_constructor device_input_ports() const;
91   
91
9292   // reading and writing
9393   virtual DECLARE_READ8_MEMBER(read);
9494   virtual DECLARE_WRITE8_MEMBER(write);
95   
95
9696private:
9797   dynamic_buffer m_ram;
9898   required_ioport m_write_prot;
r242066r242067
106106public:
107107   // construction/destruction
108108   astrocade_rl64ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
109   
109
110110   // device-level overrides
111111   virtual void device_start() { m_ram.resize(0xb000); save_item(NAME(m_ram)); }
112112   virtual void device_reset() {}
113113   virtual ioport_constructor device_input_ports() const;
114   
114
115115   // reading and writing
116116   virtual DECLARE_READ8_MEMBER(read);
117117   virtual DECLARE_WRITE8_MEMBER(write);
118   
118
119119private:
120120   dynamic_buffer m_ram;
121121   required_ioport m_write_prot;
trunk/src/emu/bus/astrocde/rom.c
r242066r242067
8080
8181READ8_MEMBER(astrocade_rom_256k_device::read_rom)
8282{
83   if (offset < 0x1000)   // 0x2000-0x2fff
83   if (offset < 0x1000)    // 0x2000-0x2fff
8484      return m_rom[offset + 0x1000 * 0x3f];
85   else if (offset < 0x1fc0)   // 0x3000-0x3fbf
85   else if (offset < 0x1fc0)   // 0x3000-0x3fbf
8686      return m_rom[(offset & 0xfff) + (0x1000 * m_base_bank)];
87   else   // 0x3fc0-0x3fff
87   else    // 0x3fc0-0x3fff
8888      return m_base_bank = offset & 0x3f;
8989}
9090
9191READ8_MEMBER(astrocade_rom_512k_device::read_rom)
9292{
93   if (offset < 0x1000)   // 0x2000-0x2fff
93   if (offset < 0x1000)    // 0x2000-0x2fff
9494      return m_rom[offset + 0x1000 * 0x7f];
95   else if (offset < 0x1f80)   // 0x3000-0x3fbf
95   else if (offset < 0x1f80)   // 0x3000-0x3fbf
9696      return m_rom[(offset & 0xfff) + (0x1000 * m_base_bank)];
97   else   // 0x3fc0-0x3fff
97   else    // 0x3fc0-0x3fff
9898      return m_base_bank = offset & 0x7f;
9999}
100
trunk/src/emu/bus/astrocde/rom.h
r242066r242067
3131public:
3232   // construction/destruction
3333   astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34   
34
3535   virtual void device_start();
3636   virtual void device_reset();
3737
3838   // reading and writing
3939   virtual DECLARE_READ8_MEMBER(read_rom);
40   
40
4141private:
4242   UINT8 m_base_bank;
4343};
r242066r242067
4949public:
5050   // construction/destruction
5151   astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
52   
52
5353   virtual void device_start();
5454   virtual void device_reset();
55   
55
5656   // reading and writing
5757   virtual DECLARE_READ8_MEMBER(read_rom);
58   
58
5959private:
6060   UINT8 m_base_bank;
6161};
trunk/src/emu/bus/astrocde/slot.c
r242066r242067
207207      const char *slot_string = "rom";
208208      UINT32 size = core_fsize(m_file);
209209      int type = ASTROCADE_STD;
210     
210
211211      if (size == 0x40000)
212212         type = ASTROCADE_256K;
213213      if (size == 0x80000)
r242066r242067
236236   else
237237      return 0xff;
238238}
239
trunk/src/emu/bus/centronics/epson_lx810l.h
r242066r242067
2828// ======================> epson_lx810l_t
2929
3030class epson_lx810l_t : public device_t,
31                       public device_centronics_peripheral_interface
31                  public device_centronics_peripheral_interface
3232{
3333public:
3434   // construction/destruction
3535   epson_lx810l_t(const machine_config &mconfig, const char *tag,
36                  device_t *owner, UINT32 clock);
36               device_t *owner, UINT32 clock);
3737   epson_lx810l_t(const machine_config &mconfig, device_type type,
38                  const char *name, const char *tag, device_t *owner,
39                  UINT32 clock, const char *shortname, const char *source);
38               const char *name, const char *tag, device_t *owner,
39               UINT32 clock, const char *shortname, const char *source);
4040
4141   // optional information overrides
4242   virtual const rom_entry *device_rom_region() const;
r242066r242067
103103public:
104104   // construction/destruction
105105   epson_ap2000_t(const machine_config &mconfig, const char *tag,
106                  device_t *owner, UINT32 clock);
106               device_t *owner, UINT32 clock);
107107
108108   // optional information overrides
109109   virtual const rom_entry *device_rom_region() const;
trunk/src/emu/bus/coco/coco_dwsock.c
r242066r242067
2424
2525INPUT_PORTS_START( coco_drivewire )
2626   PORT_START(DRIVEWIRE_PORT_TAG)
27   PORT_CONFNAME( 0xffff, 65504, "Drivewire Server TCP Port")           
28      PORT_CHANGED_MEMBER(DEVICE_SELF, beckerport_device, drivewire_port_changed, NULL )
27   PORT_CONFNAME( 0xffff, 65504, "Drivewire Server TCP Port")
28      PORT_CHANGED_MEMBER(DEVICE_SELF, beckerport_device, drivewire_port_changed, NULL )
2929   PORT_CONFSETTING(      65500, "65500" )
3030   PORT_CONFSETTING(      65501, "65501" )
3131   PORT_CONFSETTING(      65502, "65502" )
r242066r242067
5252//-------------------------------------------------
5353INPUT_CHANGED_MEMBER(beckerport_device::drivewire_port_changed)
5454{
55    this->update_port();
55   this->update_port();
5656}
5757
5858//**************************************************************************
r242066r242067
6464//-------------------------------------------------
6565
6666beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
67 : device_t(mconfig, COCO_DWSOCK, "Virtual Becker Port", tag, owner, clock, "coco_dwsock", __FILE__),
68   m_dwconfigport(*this, DRIVEWIRE_PORT_TAG)
67   : device_t(mconfig, COCO_DWSOCK, "Virtual Becker Port", tag, owner, clock, "coco_dwsock", __FILE__),
68   m_dwconfigport(*this, DRIVEWIRE_PORT_TAG)
6969{
70    m_pSocket = NULL;
71    m_head = 0;
72    m_rx_pending = 0;
70   m_pSocket = NULL;
71   m_head = 0;
72   m_rx_pending = 0;
7373}
7474
7575beckerport_device::~beckerport_device()
7676{
77    if (m_pSocket != NULL)
78        device_stop();
77   if (m_pSocket != NULL)
78      device_stop();
7979}
8080
8181/*-------------------------------------------------
r242066r242067
8484
8585void beckerport_device::device_start(void)
8686{
87    char chAddress[64];
87   char chAddress[64];
8888
89    /* format address string for opening the port */
90    snprintf(chAddress, sizeof(chAddress), "socket.%s:%d", m_hostname, m_dwtcpport);
89   /* format address string for opening the port */
90   snprintf(chAddress, sizeof(chAddress), "socket.%s:%d", m_hostname, m_dwtcpport);
9191
92    fprintf(stderr, "Connecting to Drivewire server on %s:%d... ", m_hostname, m_dwtcpport);
92   fprintf(stderr, "Connecting to Drivewire server on %s:%d... ", m_hostname, m_dwtcpport);
9393
94    UINT64 filesize; // unused
95    file_error filerr = osd_open(chAddress, 0, &m_pSocket, &filesize);
96    if (filerr != FILERR_NONE)
97    {
98        fprintf(stderr, "Error: osd_open returned error %i!\n", (int) filerr);
99        return;
100    }
94   UINT64 filesize; // unused
95   file_error filerr = osd_open(chAddress, 0, &m_pSocket, &filesize);
96   if (filerr != FILERR_NONE)
97   {
98      fprintf(stderr, "Error: osd_open returned error %i!\n", (int) filerr);
99      return;
100   }
101101
102    fprintf(stderr, "Connected!\n");
102   fprintf(stderr, "Connected!\n");
103103}
104104
105105/*-------------------------------------------------
r242066r242067
108108
109109void beckerport_device::device_stop(void)
110110{
111    if (m_pSocket != NULL)
112    {
113        printf("Closing connection to Drivewire server\n");
114        osd_close(m_pSocket);
115        m_pSocket = NULL;
116    }
111   if (m_pSocket != NULL)
112   {
113      printf("Closing connection to Drivewire server\n");
114      osd_close(m_pSocket);
115      m_pSocket = NULL;
116   }
117117}
118118
119119/*-------------------------------------------------
r242066r242067
132132
133133READ8_MEMBER(beckerport_device::read)
134134{
135    unsigned char data = 0x5a;
135   unsigned char data = 0x5a;
136136
137    if (m_pSocket == NULL)
138        return data;
137   if (m_pSocket == NULL)
138      return data;
139139
140    switch (offset)
141    {
142        case DWS_STATUS:
143            if (!m_rx_pending)
144            {
145                /* Try to read from dws */
146                file_error filerr = osd_read(m_pSocket, m_buf, 0, sizeof(m_buf), &m_rx_pending);
147                if (filerr != FILERR_NONE && filerr != FILERR_FAILURE)  // FILERR_FAILURE means no data available, so don't throw error message
148                    fprintf(stderr, "coco_dwsock.c: beckerport_device::read() socket read operation failed with file_error %i\n", filerr);
149                else
150                    m_head = 0;
151            }
152            //printf("beckerport_device: status read. %i bytes remaining.\n", m_rx_pending);
153            data = (m_rx_pending > 0) ? 2 : 0;
154            break;
155        case DWS_DATA:
156            if (!m_rx_pending) {
157                fprintf(stderr, "coco_dwsock.c: beckerport_device::read() buffer underrun\n");
158                break;
159            }
160            data = m_buf[m_head++];
161            m_rx_pending--;
162            //printf("beckerport_device: data read 1 byte (0x%02x).  %i bytes remaining.\n", data&0xff, m_rx_pending);
163            break;
164        default:
165            fprintf(stderr, "%s: read from bad offset %d\n", __FILE__, offset);
166    }
140   switch (offset)
141   {
142      case DWS_STATUS:
143         if (!m_rx_pending)
144         {
145            /* Try to read from dws */
146            file_error filerr = osd_read(m_pSocket, m_buf, 0, sizeof(m_buf), &m_rx_pending);
147            if (filerr != FILERR_NONE && filerr != FILERR_FAILURE)  // FILERR_FAILURE means no data available, so don't throw error message
148               fprintf(stderr, "coco_dwsock.c: beckerport_device::read() socket read operation failed with file_error %i\n", filerr);
149            else
150               m_head = 0;
151         }
152         //printf("beckerport_device: status read. %i bytes remaining.\n", m_rx_pending);
153         data = (m_rx_pending > 0) ? 2 : 0;
154         break;
155      case DWS_DATA:
156         if (!m_rx_pending) {
157            fprintf(stderr, "coco_dwsock.c: beckerport_device::read() buffer underrun\n");
158            break;
159         }
160         data = m_buf[m_head++];
161         m_rx_pending--;
162         //printf("beckerport_device: data read 1 byte (0x%02x).  %i bytes remaining.\n", data&0xff, m_rx_pending);
163         break;
164      default:
165         fprintf(stderr, "%s: read from bad offset %d\n", __FILE__, offset);
166   }
167167
168    return (int)data;
168   return (int)data;
169169}
170170
171171/*-------------------------------------------------
r242066r242067
174174
175175WRITE8_MEMBER(beckerport_device::write)
176176{
177    char d = (char)data;
178    file_error filerr;
177   char d = (char)data;
178   file_error filerr;
179179
180    if (m_pSocket == NULL)
181        return;
180   if (m_pSocket == NULL)
181      return;
182182
183    switch (offset)
184    {
185        case DWS_STATUS:
186            //printf("beckerport_write: error: write (0x%02x) to status register\n", d);
187            break;
188        case DWS_DATA:
189            filerr = osd_write(m_pSocket, &d, 0, 1, NULL);
190            if (filerr != FILERR_NONE)
191                fprintf(stderr, "coco_dwsock.c: beckerport_device::write() socket write operation failed with file_error %i\n", filerr);
192            //printf("beckerport_write: data write one byte (0x%02x)\n", d & 0xff);
193            break;
194        default:
195            fprintf(stderr, "%s: write to bad offset %d\n", __FILE__, offset);
196    }
183   switch (offset)
184   {
185      case DWS_STATUS:
186         //printf("beckerport_write: error: write (0x%02x) to status register\n", d);
187         break;
188      case DWS_DATA:
189         filerr = osd_write(m_pSocket, &d, 0, 1, NULL);
190         if (filerr != FILERR_NONE)
191            fprintf(stderr, "coco_dwsock.c: beckerport_device::write() socket write operation failed with file_error %i\n", filerr);
192         //printf("beckerport_write: data write one byte (0x%02x)\n", d & 0xff);
193         break;
194      default:
195         fprintf(stderr, "%s: write to bad offset %d\n", __FILE__, offset);
196   }
197197}
198198
199199/*-------------------------------------------------
r242066r242067
202202
203203void beckerport_device::update_port(void)
204204{
205    device_stop();
206    m_dwtcpport = m_dwconfigport->read_safe(65504);
207    device_start();
205   device_stop();
206   m_dwtcpport = m_dwconfigport->read_safe(65504);
207   device_start();
208208}
209
trunk/src/emu/bus/coco/coco_dwsock.h
r242066r242067
2323class beckerport_device : public device_t
2424{
2525public:
26    beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
27    virtual ~beckerport_device();
26   beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
27   virtual ~beckerport_device();
2828
29    // optional information overrides
30    virtual ioport_constructor device_input_ports() const;
29   // optional information overrides
30   virtual ioport_constructor device_input_ports() const;
3131
32    virtual void device_start(void);
33    virtual void device_stop(void);
34    virtual void device_config_complete(void);
32   virtual void device_start(void);
33   virtual void device_stop(void);
34   virtual void device_config_complete(void);
3535
36    void    update_port(void);
36   void    update_port(void);
3737
38    // driver update handlers
39    DECLARE_INPUT_CHANGED_MEMBER(drivewire_port_changed);
38   // driver update handlers
39   DECLARE_INPUT_CHANGED_MEMBER(drivewire_port_changed);
4040
41    virtual DECLARE_READ8_MEMBER(read);
42    virtual DECLARE_WRITE8_MEMBER(write);
41   virtual DECLARE_READ8_MEMBER(read);
42   virtual DECLARE_WRITE8_MEMBER(write);
4343
44    // types
45    enum dwsock_ports {
46       DWS_STATUS,
47       DWS_DATA
48    };
44   // types
45   enum dwsock_ports {
46      DWS_STATUS,
47      DWS_DATA
48   };
4949
5050private:
51    /* IP hostname */
52    const char *            m_hostname;
51   /* IP hostname */
52   const char *            m_hostname;
5353
5454   /* IP port */
5555   required_ioport         m_dwconfigport;
r242066r242067
6969typedef device_type_iterator<&device_creator<beckerport_device>, beckerport_device> beckerport_device_iterator;
7070
7171#endif /* _DWSOCK_H_ */
72
trunk/src/emu/bus/cpc/playcity.c
r242066r242067
1/*
1/*
22   PlayCity expansion device
33
44   Z80 CTC
r242066r242067
158158   m_ymz2->ay_set_clock(clk);
159159   popmessage("YMZ clocks set to %d Hz",clk);
160160}
161
trunk/src/emu/bus/cpc/playcity.h
r242066r242067
1/*
1/*
22   PlayCity expansion device
33
4   I/O ports:
5   * F880 - Z80CTC channel 0 (input is system clock (4MHz), output to YMZ294 clock)
6   * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to /NMI)
7   * F882 - Z80CTC channel 2 (input is system clock (4MHz), output to channel 3 input)
8   * F883 - Z80CTC channel 3 (input is channel 2 output)
9   * F884 - YMZ294 #1 (right) data
10   * F888 - YMZ294 #2 (left) data
11   * F984 - YMZ294 #1 (right) register select
12   * F988 - YMZ294 #2 (left) register select
4    I/O ports:
5    * F880 - Z80CTC channel 0 (input is system clock (4MHz), output to YMZ294 clock)
6    * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to /NMI)
7    * F882 - Z80CTC channel 2 (input is system clock (4MHz), output to channel 3 input)
8    * F883 - Z80CTC channel 3 (input is channel 2 output)
9    * F884 - YMZ294 #1 (right) data
10    * F888 - YMZ294 #2 (left) data
11    * F984 - YMZ294 #1 (right) register select
12    * F988 - YMZ294 #2 (left) register select
1313*/
1414
1515#ifndef CPC_PLAYCITY_H_
r242066r242067
6464
6565
6666#endif /* CPC_PLAYCITY_H_ */
67
trunk/src/emu/bus/gameboy/gb_slot.c
r242066r242067
557557
558558   /* Check if we're dealing with the multigame variant of the MBC1 mapper */
559559   if (type == GB_MBC_MBC1)
560   {   // bomberman collection korea
560   {   // bomberman collection korea
561561      if (ROM[0x134] == 0x42 && ROM[0x135] == 0x4f && ROM[0x136] == 0x4d && ROM[0x137] == 0x53)
562562         type = GB_MBC_MBC1_COL;
563//      if (ROM[0x13f] == 0x42 && ROM[0x140] == 0x32 && ROM[0x141] == 0x43 && ROM[0x142] == 0x4B)
564//         type = GB_MBC_MBC1_COL;
563//      if (ROM[0x13f] == 0x42 && ROM[0x140] == 0x32 && ROM[0x141] == 0x43 && ROM[0x142] == 0x4B)
564//          type = GB_MBC_MBC1_COL;
565565      // genjin collection
566566      if (ROM[0x134] == 0x47 && ROM[0x135] == 0x45 && ROM[0x136] == 0x4e && ROM[0x137] == 0x43)
567567         type = GB_MBC_MBC1_COL;
trunk/src/emu/bus/isa/mda.c
r242066r242067
968968{
969969   if (m_update_row_type == -1)
970970      return;
971   
971
972972   switch (m_update_row_type)
973973   {
974974      case MDA_LOWRES_TEXT_INTEN:
trunk/src/emu/bus/isa/xsu_cards.c
r242066r242067
3939SLOT_INTERFACE_END
4040
4141SLOT_INTERFACE_START( ec184x_isa8_cards )
42   SLOT_INTERFACE("ec1840.0002", ISA8_EC1840_0002)   // MDA with downloadable font
43   SLOT_INTERFACE("ec1841.0002", ISA8_EC1841_0002)   // CGA with downloadable font
42   SLOT_INTERFACE("ec1840.0002", ISA8_EC1840_0002) // MDA with downloadable font
43   SLOT_INTERFACE("ec1841.0002", ISA8_EC1841_0002) // CGA with downloadable font
4444   SLOT_INTERFACE("ec1841.0003", ISA8_FDC_XT)
4545/*
46   SLOT_INTERFACE("ec1841.0010", ISA8_EC1841_0010)   // 8089-based HDC
47   SLOT_INTERFACE("ec1841.0003", ISA8_EC1841_0003)   // FDC + mouse port
48   SLOT_INTERFACE("ec1841.0004", ISA8_EC1841_0004)   // BSC-like serial ports + parallel port
46    SLOT_INTERFACE("ec1841.0010", ISA8_EC1841_0010) // 8089-based HDC
47    SLOT_INTERFACE("ec1841.0003", ISA8_EC1841_0003) // FDC + mouse port
48    SLOT_INTERFACE("ec1841.0004", ISA8_EC1841_0004) // BSC-like serial ports + parallel port
4949*/
5050   SLOT_INTERFACE("mda", ISA8_MDA)
5151   SLOT_INTERFACE("hdc", ISA8_HDC_EC1841)
trunk/src/emu/bus/pce/pce_slot.c
r242066r242067
66
77 TODO:
88   - reimplement cart mirroring in a better way
9
9
1010 ***********************************************************************************************************/
1111
1212
trunk/src/emu/bus/pet/hsg.c
r242066r242067
1313
1414    TODO:
1515
16   http://www.6502.org/users/sjgray/computer/hsg/index.html
16    http://www.6502.org/users/sjgray/computer/hsg/index.html
1717
1818    - version A (EF9365, 512x512 interlaced, 1 page)
1919    - version B (EF9366, 512x256 non-interlaced, 2 pages)
trunk/src/emu/bus/pet/hsg.h
r242066r242067
2626// ======================> cbm8000_hsg_t
2727
2828class cbm8000_hsg_t : public device_t,
29                 public device_pet_expansion_card_interface
29                  public device_pet_expansion_card_interface
3030{
3131public:
3232   // construction/destruction
trunk/src/emu/bus/spc1000/fdd.c
r242066r242067
3434READ8_MEMBER( spc1000_fdd_exp_device::tc_r )
3535{
3636   logerror("%s: tc_r\n", space.machine().describe_context());
37   
37
3838   // toggle tc on read
3939   m_fdc->tc_w(true);
4040   m_timer_tc->adjust(attotime::zero);
41   
41
4242   return 0xff;
4343}
4444
4545WRITE8_MEMBER( spc1000_fdd_exp_device::control_w )
4646{
4747   logerror("%s: control_w(%02x)\n", space.machine().describe_context(), data);
48   
48
4949   // bit 0, motor on signal
5050   if (m_fd0)
5151      m_fd0->mon_w(!BIT(data, 0));
r242066r242067
150150{
151151   m_timer_tc = timer_alloc(TIMER_TC);
152152   m_timer_tc->adjust(attotime::never);
153   
153
154154   m_fd0 = subdevice<floppy_connector>("upd765:0")->get_device();
155155   m_fd1 = subdevice<floppy_connector>("upd765:1")->get_device();
156156}
trunk/src/emu/bus/spc1000/fdd.h
r242066r242067
3636   DECLARE_WRITE8_MEMBER(i8255_b_w);
3737   DECLARE_READ8_MEMBER(i8255_c_r);
3838   DECLARE_WRITE8_MEMBER(i8255_c_w);
39   
39
4040private:
4141   // internal state
4242   required_device<z80_device> m_cpu;
r242066r242067
4747   floppy_image_device *m_fd1;
4848
4949   emu_timer *m_timer_tc;
50   
50
5151   UINT8 m_i8255_0_pc;
5252   UINT8 m_i8255_1_pc;
5353   UINT8 m_i8255_portb;
54   
54
5555   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5656   static const device_timer_id TIMER_TC = 0;
5757};
trunk/src/emu/bus/spc1000/vdp.c
r242066r242067
1919
2020static MACHINE_CONFIG_FRAGMENT(scp1000_vdp)
2121
22   MCFG_DEVICE_ADD("tms", TMS9928A, XTAL_10_738635MHz / 2)   // TODO: which clock?
22   MCFG_DEVICE_ADD("tms", TMS9928A, XTAL_10_738635MHz / 2) // TODO: which clock?
2323   MCFG_TMS9928A_VRAM_SIZE(0x4000)
2424   MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(spc1000_vdp_exp_device, vdp_interrupt))
2525   MCFG_TMS9928A_SCREEN_ADD_NTSC("tms_screen")
trunk/src/emu/bus/spc1000/vdp.h
r242066r242067
3030   virtual DECLARE_WRITE8_MEMBER(write);
3131
3232   DECLARE_WRITE_LINE_MEMBER(vdp_interrupt);
33   
33
3434private:
3535   // internal state
3636   required_device<tms9928a_device>   m_vdp;
trunk/src/emu/cpu/cp1610/cp1610.c
r242066r242067
10091009 *  S Z C OV 1 000 s1e e p ppp ppp ppp ppp ppp
10101010 *  - - - -  BEXT ADDR, eeee
10111011 ***************************************************/
1012 void cp1610_cpu_device::cp1610_bext(int ext, int dir)
1012   void cp1610_cpu_device::cp1610_bext(int ext, int dir)
10131013{
10141014   UINT16 offset = cp1610_readop(m_r[7]);
10151015   m_r[7]++;
1016   
1016
10171017   if (m_read_bext(ext))
10181018   {
10191019      m_r[7] += (offset ^ dir);
trunk/src/emu/cpu/cp1610/cp1610.h
r242066r242067
3535
3636#define MCFG_CP1610_BEXT_CALLBACK(_read) \
3737   downcast<cp1610_cpu_device *>(device)->set_bext_callback(DEVCB_##_read);
38   
39   
38
39
4040class cp1610_cpu_device :  public cpu_device
4141{
4242public:
r242066r242067
4747   {
4848      m_read_bext.set_callback(rd);
4949   }
50   
50
5151protected:
5252   // device-level overrides
5353   virtual void device_start();
r242066r242067
8787   int     m_mask_interrupts;
8888   address_space *m_program;
8989   int m_icount;
90   
90
9191   devcb_read8 m_read_bext;
9292
9393   void cp1610_illegal();
trunk/src/emu/cpu/powerpc/ppc.h
r242066r242067
217217   static void set_bus_frequency(device_t &device, UINT32 bus_frequency) { downcast<ppc_device &>(device).c_bus_frequency = bus_frequency; }
218218
219219   void ppc_set_dcstore_callback(write32_delegate callback);
220   
220
221221   void ppcdrc_set_options(UINT32 options);
222222   void ppcdrc_add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base);
223223   void ppcdrc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles);
trunk/src/emu/cpu/rsp/rsp.h
r242066r242067
269269   direct_read_data *m_direct;
270270
271271private:
272   rsp_cop2   *m_cop2;
272   rsp_cop2    *m_cop2;
273273
274274   UINT32 *m_dmem32;
275275   UINT16 *m_dmem16;
trunk/src/emu/cpu/rsp/rspcp2.c
r242066r242067
2727    Helpful Defines
2828***************************************************************************/
2929
30#define VDREG   ((op >> 6) & 0x1f)
31#define VS1REG   ((op >> 11) & 0x1f)
32#define VS2REG   ((op >> 16) & 0x1f)
33#define EL      ((op >> 21) & 0xf)
30#define VDREG   ((op >> 6) & 0x1f)
31#define VS1REG  ((op >> 11) & 0x1f)
32#define VS2REG  ((op >> 16) & 0x1f)
33#define EL      ((op >> 21) & 0xf)
3434
35#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
36#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
37#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
35#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
36#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
37#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
3838
3939#define VREG_B(reg, offset)     m_v[(reg)].b[(offset)^1]
4040#define VREG_S(reg, offset)     m_v[(reg)].s[(offset)]
r242066r242067
5656#define ZERO        3
5757#define CLIP2       4
5858
59#define ACCUM(x)           m_accum[x].q
60#define ACCUM_H(x)         (UINT16)m_accum[x].w[3]
61#define ACCUM_M(x)         (UINT16)m_accum[x].w[2]
62#define ACCUM_L(x)         (UINT16)m_accum[x].w[1]
63#define ACCUM_LL(x)         (UINT16)m_accum[x].w[0]
59#define ACCUM(x)            m_accum[x].q
60#define ACCUM_H(x)          (UINT16)m_accum[x].w[3]
61#define ACCUM_M(x)          (UINT16)m_accum[x].w[2]
62#define ACCUM_L(x)          (UINT16)m_accum[x].w[1]
63#define ACCUM_LL(x)         (UINT16)m_accum[x].w[0]
6464
6565#define SET_ACCUM_H(v, x)       m_accum[x].w[3] = v;
6666#define SET_ACCUM_M(v, x)       m_accum[x].w[2] = v;
r242066r242067
123123};
124124
125125rsp_cop2::rsp_cop2(rsp_device &rsp, running_machine &machine)
126    : m_rsp(rsp)
127    , m_machine(machine)
128    , m_reciprocal_res(0)
126   : m_rsp(rsp)
127   , m_machine(machine)
128   , m_reciprocal_res(0)
129129   , m_reciprocal_high(0)
130130   , m_dp_allowed(0)
131131{
trunk/src/emu/cpu/rsp/rspcp2.h
r242066r242067
126126   virtual void mtc2();
127127   virtual void ctc2();
128128
129   virtual void   handle_cop2(UINT32 op);
129   virtual void    handle_cop2(UINT32 op);
130130
131   void         log_instruction_execution();
132   virtual void   cfunc_unimplemented_opcode() { }
131   void            log_instruction_execution();
132   virtual void    cfunc_unimplemented_opcode() { }
133133
134134protected:
135   virtual int    generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; }
135   virtual int     generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; }
136136
137   UINT16          SATURATE_ACCUM(int accum, int slice, UINT16 negative, UINT16 positive);
138   UINT16         SATURATE_ACCUM1(int accum, UINT16 negative, UINT16 positive);
137   UINT16          SATURATE_ACCUM(int accum, int slice, UINT16 negative, UINT16 positive);
138   UINT16          SATURATE_ACCUM1(int accum, UINT16 negative, UINT16 positive);
139139
140   UINT32         m_op;
140   UINT32          m_op;
141141
142   rsp_device&      m_rsp;
142   rsp_device&     m_rsp;
143143   running_machine& m_machine;
144   UINT32         m_vres[8];         /* used for temporary vector results */
144   UINT32          m_vres[8];          /* used for temporary vector results */
145145
146   VECTOR_REG      m_v[32];
146   VECTOR_REG      m_v[32];
147147
148   ACCUMULATOR_REG   m_accum[8];
149   UINT16         m_vflag[6][8];
148   ACCUMULATOR_REG m_accum[8];
149   UINT16          m_vflag[6][8];
150150
151   INT32         m_reciprocal_res;
152   UINT32         m_reciprocal_high;
153   INT32         m_dp_allowed;
151   INT32           m_reciprocal_res;
152   UINT32          m_reciprocal_high;
153   INT32           m_dp_allowed;
154154
155155private:
156   void         handle_lwc2(UINT32 op);
157   void         handle_swc2(UINT32 op);
158   void         handle_vector_ops(UINT32 op);
156   void            handle_lwc2(UINT32 op);
157   void            handle_swc2(UINT32 op);
158   void            handle_vector_ops(UINT32 op);
159159};
160160
161#endif /* __RSPCP2_H__ */
No newline at end of file
161#endif /* __RSPCP2_H__ */
trunk/src/emu/cpu/rsp/rspcp2d.c
r242066r242067
2828    Helpful Defines
2929***************************************************************************/
3030
31#define VDREG   ((op >> 6) & 0x1f)
32#define VS1REG   ((op >> 11) & 0x1f)
33#define VS2REG   ((op >> 16) & 0x1f)
34#define EL      ((op >> 21) & 0xf)
31#define VDREG   ((op >> 6) & 0x1f)
32#define VS1REG  ((op >> 11) & 0x1f)
33#define VS2REG  ((op >> 16) & 0x1f)
34#define EL      ((op >> 21) & 0xf)
3535
36#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
37#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
38#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
36#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
37#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
38#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
3939
4040#define VREG_B(reg, offset)         m_v[(reg)].b[(offset)^1]
4141#define W_VREG_S(reg, offset)       m_v[(reg)].s[(offset)]
r242066r242067
6060#define ACCUM_M(x)           (UINT16)m_accum[x].w[2]
6161#define ACCUM_L(x)           (UINT16)m_accum[x].w[1]
6262#define ACCUM_LL(x)          (UINT16)m_accum[x].w[0]
63#define ACCUM(x)          m_accum[x].q
63#define ACCUM(x)            m_accum[x].q
6464
6565#define SET_ACCUM_H(v, x)       m_accum[x].w[3] = v;
6666#define SET_ACCUM_M(v, x)       m_accum[x].w[2] = v;
6767#define SET_ACCUM_L(v, x)       m_accum[x].w[1] = v;
6868#define SET_ACCUM_LL(v, x)      m_accum[x].w[0] = v;
69#define SET_ACCUM(v, x)         m_accum[x].q = v;
69#define SET_ACCUM(v, x)         m_accum[x].q = v;
7070
71#define GET_VS1(out, i)         out = VREG_S(vs1reg, i)
72#define GET_VS2(out, i)         out = VREG_S(vs2reg, VEC_EL_2(el, i))
71#define GET_VS1(out, i)         out = VREG_S(vs1reg, i)
72#define GET_VS2(out, i)         out = VREG_S(vs2reg, VEC_EL_2(el, i))
7373
7474#define CARRY_FLAG(x)          (m_vflag[CARRY][x & 7] != 0 ? 0xffff : 0)
7575#define COMPARE_FLAG(x)        (m_vflag[COMPARE][x & 7] != 0 ? 0xffff : 0)
r242066r242067
9696#define CLEAR_CLIP2_FLAG(x)         { m_vflag[CLIP2][x & 7] = 0; }
9797
9898#define CACHE_VALUES() \
99   const int op = m_op;   \
100   const int vdreg = VDREG;   \
101   const int vs1reg = VS1REG;   \
102   const int vs2reg = VS2REG;   \
99   const int op = m_op;    \
100   const int vdreg = VDREG;    \
101   const int vs1reg = VS1REG;  \
102   const int vs2reg = VS2REG;  \
103103   const int el = EL;
104104
105105#define WRITEBACK_RESULT() { \
r242066r242067
21052105            W_VREG_S(vdreg, i) = ACCUM_L(i);
21062106         }
21072107         break;
2108      default:      // Unsupported
2108      default:        // Unsupported
21092109      {
21102110         for (int i = 0; i < 8; i++)
21112111         {
r242066r242067
34653465         UML_CALLC(block, cfunc_vmov, this);
34663466         return TRUE;
34673467
3468      case 0x34:      /* VRSQ */
3469         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);         // mov     [arg0],desc->opptr.l
3468      case 0x34:      /* VRSQ */
3469         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);         // mov     [arg0],desc->opptr.l
34703470         UML_CALLC(block, cfunc_vrsq, this);
34713471         return TRUE;
34723472
r242066r242067
34803480         UML_CALLC(block, cfunc_vrsqh, this);
34813481         return TRUE;
34823482
3483      case 0x37:      /* VNOP */
3484      case 0x3F:      /* VNULL */
3483      case 0x37:      /* VNOP */
3484      case 0x3F:      /* VNULL */
34853485         return TRUE;
34863486
34873487      default:
r242066r242067
37083708      case 0x00:  /* MFCz */
37093709         if (RTREG != 0)
37103710         {
3711            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3712            UML_CALLC(block, cfunc_mfc2, this);            // callc   mfc2
3711            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3712            UML_CALLC(block, cfunc_mfc2, this);             // callc   mfc2
37133713         }
37143714         return TRUE;
37153715
37163716      case 0x02:  /* CFCz */
37173717         if (RTREG != 0)
37183718         {
3719            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3720            UML_CALLC(block, cfunc_cfc2, this);            // callc   cfc2
3719            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3720            UML_CALLC(block, cfunc_cfc2, this);             // callc   cfc2
37213721         }
37223722         return TRUE;
37233723
37243724      case 0x04:  /* MTCz */
3725         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3726         UML_CALLC(block, cfunc_mtc2, this);            // callc   mtc2
3725         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3726         UML_CALLC(block, cfunc_mtc2, this);             // callc   mtc2
37273727         return TRUE;
37283728
37293729      case 0x06:  /* CTCz */
3730         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3731         UML_CALLC(block, cfunc_ctc2, this);            // callc   ctc2
3730         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3731         UML_CALLC(block, cfunc_ctc2, this);             // callc   ctc2
37323732         return TRUE;
37333733
37343734      case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
r242066r242067
37363736         return generate_vector_opcode(block, compiler, desc);
37373737   }
37383738   return FALSE;
3739}
No newline at end of file
3739}
trunk/src/emu/cpu/rsp/rspcp2d.h
r242066r242067
104104   virtual void ctc2();
105105
106106private:
107   virtual int    generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc);
107   virtual int     generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc);
108108};
109109
110#endif /* __RSPCP2D_H__ */
No newline at end of file
110#endif /* __RSPCP2D_H__ */
trunk/src/emu/cpu/rsp/rspcp2s.c
r242066r242067
2626    Helpful Defines
2727***************************************************************************/
2828
29#define VDREG   ((op >> 6) & 0x1f)
30#define VS1REG   ((op >> 11) & 0x1f)
31#define VS2REG   ((op >> 16) & 0x1f)
32#define EL      ((op >> 21) & 0xf)
29#define VDREG   ((op >> 6) & 0x1f)
30#define VS1REG  ((op >> 11) & 0x1f)
31#define VS2REG  ((op >> 16) & 0x1f)
32#define EL      ((op >> 21) & 0xf)
3333
34#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
35#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
36#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
34#define RSVAL   (m_rsp.m_rsp_state->r[RSREG])
35#define RTVAL   (m_rsp.m_rsp_state->r[RTREG])
36#define RDVAL   (m_rsp.m_rsp_state->r[RDREG])
3737
3838#define EXTRACT16(reg, value, element) \
3939   switch((element) & 7) \
r242066r242067
23222322         m_xv[VDREG] = m_accum_l;
23232323         break;
23242324      }
2325      default:      // Unsupported, writes 0 to VD
2325      default:        // Unsupported, writes 0 to VD
23262326      {
2327
23282327      }
23292328   }
23302329}
r242066r242067
36023601      case 0x00:  /* MFCz */
36033602         if (RTREG != 0)
36043603         {
3605            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3606            UML_CALLC(block, cfunc_mfc2, this);            // callc   mfc2
3604            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3605            UML_CALLC(block, cfunc_mfc2, this);             // callc   mfc2
36073606         }
36083607         return TRUE;
36093608
36103609      case 0x02:  /* CFCz */
36113610         if (RTREG != 0)
36123611         {
3613            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3614            UML_CALLC(block, cfunc_cfc2, this);            // callc   cfc2
3612            UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3613            UML_CALLC(block, cfunc_cfc2, this);             // callc   cfc2
36153614         }
36163615         return TRUE;
36173616
36183617      case 0x04:  /* MTCz */
3619         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3620         UML_CALLC(block, cfunc_mtc2, this);            // callc   mtc2
3618         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3619         UML_CALLC(block, cfunc_mtc2, this);             // callc   mtc2
36213620         return TRUE;
36223621
36233622      case 0x06:  /* CTCz */
3624         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3625         UML_CALLC(block, cfunc_ctc2, this);            // callc   ctc2
3623         UML_MOV(block, mem(&m_op), desc->opptr.l[0]);   // mov     [arg0],desc->opptr.l
3624         UML_CALLC(block, cfunc_ctc2, this);             // callc   ctc2
36263625         return TRUE;
36273626
36283627      case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
trunk/src/emu/cpu/rsp/rspcp2s.h
r242066r242067
111111#endif
112112
113113private:
114   virtual int    generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc);
114   virtual int     generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc);
115115
116   UINT16         ACCUM_H(int x);
117   UINT16         ACCUM_M(int x);
118   UINT16         ACCUM_L(int x);
119   UINT16         ACCUM_LL(int x);
120   UINT16         CARRY_FLAG(const int x);
121   UINT16         COMPARE_FLAG(const int x);
122   UINT16         CLIP1_FLAG(const int x);
123   UINT16         ZERO_FLAG(const int x);
124   UINT16         CLIP2_FLAG(const int x);
125   UINT16         SATURATE_ACCUM(int accum, int slice, UINT16 negative, UINT16 positive);
116   UINT16          ACCUM_H(int x);
117   UINT16          ACCUM_M(int x);
118   UINT16          ACCUM_L(int x);
119   UINT16          ACCUM_LL(int x);
120   UINT16          CARRY_FLAG(const int x);
121   UINT16          COMPARE_FLAG(const int x);
122   UINT16          CLIP1_FLAG(const int x);
123   UINT16          ZERO_FLAG(const int x);
124   UINT16          CLIP2_FLAG(const int x);
125   UINT16          SATURATE_ACCUM(int accum, int slice, UINT16 negative, UINT16 positive);
126126
127   __m128i         m_accum_h;
128   __m128i         m_accum_m;
129   __m128i         m_accum_l;
130   __m128i         m_accum_ll;
127   __m128i         m_accum_h;
128   __m128i         m_accum_m;
129   __m128i         m_accum_l;
130   __m128i         m_accum_ll;
131131
132132   // Mirror of v[] for now, to be used in parallel as
133133   // more vector ops are transitioned over
134   __m128i         m_xv[32];
135   __m128i         m_xvflag[6];
134   __m128i         m_xv[32];
135   __m128i         m_xvflag[6];
136136
137137#if SIMUL_SIMD
138   UINT32         m_old_r[35];
139   UINT8         m_old_dmem[4096];
138   UINT32          m_old_r[35];
139   UINT8           m_old_dmem[4096];
140140
141   UINT32         m_scalar_r[35];
142   UINT8         m_scalar_dmem[4096];
141   UINT32          m_scalar_r[35];
142   UINT8           m_scalar_dmem[4096];
143143
144   INT32         m_old_reciprocal_res;
145   UINT32         m_old_reciprocal_high;
146   INT32         m_old_dp_allowed;
144   INT32           m_old_reciprocal_res;
145   UINT32          m_old_reciprocal_high;
146   INT32           m_old_dp_allowed;
147147
148   INT32         m_scalar_reciprocal_res;
149   UINT32         m_scalar_reciprocal_high;
150   INT32         m_scalar_dp_allowed;
148   INT32           m_scalar_reciprocal_res;
149   UINT32          m_scalar_reciprocal_high;
150   INT32           m_scalar_dp_allowed;
151151
152   INT32         m_simd_reciprocal_res;
153   UINT32         m_simd_reciprocal_high;
154   INT32         m_simd_dp_allowed;
152   INT32           m_simd_reciprocal_res;
153   UINT32          m_simd_reciprocal_high;
154   INT32           m_simd_dp_allowed;
155155#endif
156156};
157157
158#endif /* __RSPCP2S_H__ */
No newline at end of file
158#endif /* __RSPCP2S_H__ */
trunk/src/emu/cpu/rsp/rspdrc.c
r242066r242067
786786   /* update the cycles and jump through the hash table to the target */
787787   if (desc->targetpc != BRANCH_TARGET_DYNAMIC)
788788   {
789      generate_update_cycles(block, &compiler_temp, desc->targetpc, TRUE);   // <subtract cycles>
789      generate_update_cycles(block, &compiler_temp, desc->targetpc, TRUE);    // <subtract cycles>
790790      if (desc->flags & OPFLAG_INTRABLOCK_BRANCH)
791         UML_JMP(block, desc->targetpc | 0x80000000);                  // jmp     desc->targetpc
791         UML_JMP(block, desc->targetpc | 0x80000000);                        // jmp     desc->targetpc
792792      else
793         UML_HASHJMP(block, 0, desc->targetpc, *m_nocode);               // hashjmp <mode>,desc->targetpc,nocode
793         UML_HASHJMP(block, 0, desc->targetpc, *m_nocode);                   // hashjmp <mode>,desc->targetpc,nocode
794794   }
795795   else
796796   {
797      generate_update_cycles(block, &compiler_temp, mem(&m_rsp_state->jmpdest), TRUE);   // <subtract cycles>
798      UML_HASHJMP(block, 0, mem(&m_rsp_state->jmpdest), *m_nocode);                  // hashjmp <mode>,<rsreg>,nocode
797      generate_update_cycles(block, &compiler_temp, mem(&m_rsp_state->jmpdest), TRUE);    // <subtract cycles>
798      UML_HASHJMP(block, 0, mem(&m_rsp_state->jmpdest), *m_nocode);                       // hashjmp <mode>,<rsreg>,nocode
799799   }
800800}
801801
trunk/src/emu/cpu/upd7810/upd7810.c
r242066r242067
13451345            IRR |= INTFE1;
13461346         /* Conditions When ECNT Causes a CO0 Output Change */
13471347         if (((0x00 == (ETMM & 0x30)) && (ETM0 == ECNT)) || /* set CO0 if ECNT == ETM0 */
1348          /* ((0x10 == (ETMM & 0x30)) prohibited */
1349             ((0x20 == (ETMM & 0x30)) && (ETM0 == ECNT)) || /* set CO0 if ECNT == ETM0 or at falling CI input */
1350             ((0x30 == (ETMM & 0x30)) && (ETM0 == ECNT || ETM1 == ECNT))) /* latch CO0 if ECNT == ETM0 or ECNT == ETM1 */
1348            /* ((0x10 == (ETMM & 0x30)) prohibited */
1349            ((0x20 == (ETMM & 0x30)) && (ETM0 == ECNT)) || /* set CO0 if ECNT == ETM0 or at falling CI input */
1350            ((0x30 == (ETMM & 0x30)) && (ETM0 == ECNT || ETM1 == ECNT))) /* latch CO0 if ECNT == ETM0 or ECNT == ETM1 */
13511351         {
13521352            upd7810_co0_output_change();
13531353         }
13541354         /* Conditions When ECNT Causes a CO1 Output Change */
13551355         if (((0x00 == (ETMM & 0xc0)) && (ETM1 == ECNT)) || /* set CO1 if ECNT == ETM1 */
1356          /* ((0x40 == (ETMM & 0xc0)) prohibited */
1357             ((0x80 == (ETMM & 0xc0)) && (ETM1 == ECNT)) || /* set CO1 if ECNT == ETM1 or at falling CI input */
1358             ((0xc0 == (ETMM & 0xc0)) && (ETM0 == ECNT || ETM1 == ECNT))) /* latch CO1 if ECNT == ETM0 or ECNT == ETM1 */
1356            /* ((0x40 == (ETMM & 0xc0)) prohibited */
1357            ((0x80 == (ETMM & 0xc0)) && (ETM1 == ECNT)) || /* set CO1 if ECNT == ETM1 or at falling CI input */
1358            ((0xc0 == (ETMM & 0xc0)) && (ETM0 == ECNT || ETM1 == ECNT))) /* latch CO1 if ECNT == ETM0 or ECNT == ETM1 */
13591359         {
13601360            upd7810_co1_output_change();
13611361         }
r242066r242067
18161816   m_itf = 0;
18171817   m_nmi = 0;
18181818   m_int1 = 0;
1819   m_int2 = 1;   /* physical (inverted) INT2 line state */
1819   m_int2 = 1; /* physical (inverted) INT2 line state */
18201820
18211821   m_txs = 0;
18221822   m_rxs = 0;
trunk/src/emu/machine/i6300esb.c
r242066r242067
8686
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")
89      acpi(*this, "acpi"),
90      rtc (*this, "rtc")
9191{
9292}
9393
r242066r242067
661661{
662662   // Ignore idsel, a16 inversion for now
663663   UINT32 mask = m_region->bytes() - 1;
664   memory_space->install_rom(start, end, m_region->base() + (start & mask));   
664   memory_space->install_rom(start, end, m_region->base() + (start & mask));
665665}
666666
667667void i6300esb_lpc_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
r242066r242067
750750   if(rtc_conf & 4)
751751      rtc->map_extdevice(memory_window_start, memory_window_end, 0, memory_space, io_window_start, io_window_end, 0, io_space);
752752}
753
754
trunk/src/emu/machine/i6300esb.h
r242066r242067
1919
2020   virtual void reset_all_mappings();
2121   virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
22                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
22                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
2323
2424   virtual DECLARE_ADDRESS_MAP(config_map, 32);
2525
trunk/src/emu/machine/i82875p.h
r242066r242067
55
66#include "pci.h"
77
8#define MCFG_I82875P_HOST_ADD(_tag, _subdevice_id, _cpu_tag, _ram_size)         \
8#define MCFG_I82875P_HOST_ADD(_tag, _subdevice_id, _cpu_tag, _ram_size)         \
99   MCFG_PCI_HOST_ADD(_tag, I82875P_HOST, 0x80862578, 0x02, _subdevice_id) \
1010   downcast<i82875p_host_device *>(device)->set_cpu_tag(_cpu_tag); \
1111   downcast<i82875p_host_device *>(device)->set_ram_size(_ram_size);
r242066r242067
2121   void set_ram_size(int ram_size);
2222
2323   virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
24                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
24                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
2525
2626   virtual DECLARE_ADDRESS_MAP(config_map, 32);
2727
trunk/src/emu/machine/intelfsh.c
r242066r242067
379379
380380fujitsu_29f160t_device::fujitsu_29f160t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
381381   : intelfsh8_device(mconfig, FUJITSU_29F160T, "Fujitsu 29F160 Flash", tag, owner, clock, FLASH_FUJITSU_29F160T, "fujitsu_29f160t", __FILE__) { }
382   
382
383383fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
384384   : intelfsh8_device(mconfig, FUJITSU_29F016A, "Fujitsu 29F016A Flash", tag, owner, clock, FLASH_FUJITSU_29F016A, "fujitsu_29f016a", __FILE__) { }
385385
r242066r242067
400400
401401amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
402402   : intelfsh8_device(mconfig, AMD_29F080, "AMD 29F080 Flash", tag, owner, clock, FLASH_AMD_29F080, "amd_29f080", __FILE__) { }
403   
403
404404amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
405405   : intelfsh8_device(mconfig, AMD_29F080, "AMD 29F400 Flash", tag, owner, clock, FLASH_AMD_29F400T, "amd_29f400t", __FILE__) { }
406   
406
407407amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
408408   : intelfsh8_device(mconfig, AMD_29F080, "AMD 29F800 Flash", tag, owner, clock, FLASH_AMD_29F080, "amd_29f800t", __FILE__) { }
409409
trunk/src/emu/machine/intelfsh.h
r242066r242067
3939
4040#define MCFG_FUJITSU_29F160T_ADD(_tag) \
4141   MCFG_DEVICE_ADD(_tag, FUJITSU_29F160T, 0)
42   
42
4343#define MCFG_FUJITSU_29F016A_ADD(_tag) \
4444   MCFG_DEVICE_ADD(_tag, FUJITSU_29F016A, 0)
4545
r242066r242067
161161   UINT8                   m_maker_id;
162162   bool                    m_sector_is_4k;
163163   bool                    m_sector_is_16k;
164   bool               m_top_boot_sector;
164   bool                    m_top_boot_sector;
165165   UINT8                   m_page_size;
166166
167167   // internal state
trunk/src/emu/machine/lpc-acpi.c
r242066r242067
4040}
4141
4242void lpc_acpi_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
43                        UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
43                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
4444{
4545   io_space->install_device(io_offset, io_window_end, *this, &lpc_acpi_device::map);
4646}
trunk/src/emu/machine/lpc-rtc.c
r242066r242067
1818}
1919
2020void lpc_rtc_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
21                        UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
21                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
2222{
2323   io_space->install_device(io_offset, io_window_end, *this, &lpc_rtc_device::map);
2424}
2525
2626void lpc_rtc_device::map_extdevice(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
27                        UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
27                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
2828{
2929   io_space->install_device(io_offset, io_window_end, *this, &lpc_rtc_device::extmap);
3030}
trunk/src/emu/machine/lpc-rtc.h
r242066r242067
1414                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
1515
1616   virtual void map_extdevice(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
17                          UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
17                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
1818
1919   DECLARE_READ8_MEMBER(  index_r);
2020   DECLARE_WRITE8_MEMBER( index_w);
trunk/src/emu/machine/lpc.c
r242066r242067
44   device_t(mconfig, type, name, tag, owner, clock, shortname, source)
55{
66}
7
trunk/src/emu/machine/lpc.h
r242066r242067
1212};
1313
1414#endif
15
trunk/src/emu/machine/omti5100.c
r242066r242067
5151//-------------------------------------------------
5252
5353static MACHINE_CONFIG_FRAGMENT( omti5100_z8 )
54//   MCFG_CPU_ADD("z8", Z8681, XTAL_20MHz / 3 /* ??? */)
54//  MCFG_CPU_ADD("z8", Z8681, XTAL_20MHz / 3 /* ??? */)
5555MACHINE_CONFIG_END
5656
5757machine_config_constructor omti5100_device::device_mconfig_additions() const
r242066r242067
7070
7171omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7272   device_t(mconfig, OMTI5100, "OMTI 5100 SCSI/SASI Controller", tag, owner, clock, "omti5100", __FILE__),
73//   m_cpu(*this, "z8"),
73//  m_cpu(*this, "z8"),
7474   m_bsy_w(*this),
7575   m_cd_w(*this),
7676   m_io_w(*this),
trunk/src/emu/machine/omti5100.h
r242066r242067
8888   virtual void device_reset();
8989
9090private:
91//   required_device<z8681_device> m_cpu;
91//  required_device<z8681_device> m_cpu;
9292
9393   devcb_write_line m_bsy_w;
9494   devcb_write_line m_cd_w;
trunk/src/emu/machine/pci.c
r242066r242067
226226   }
227227
228228   map_extra(memory_window_start, memory_window_end, memory_offset, memory_space,
229           io_window_start, io_window_end, io_offset, io_space);
229            io_window_start, io_window_end, io_offset, io_space);
230230}
231231
232232void pci_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
233                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
233                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
234234{
235235}
236236
r242066r242067
291291
292292pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
293293   : pci_device(mconfig, PCI_BRIDGE, "PCI-PCI Bridge", tag, owner, clock, "pci_bridge", __FILE__),
294     device_memory_interface(mconfig, *this),
295     configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20)
294      device_memory_interface(mconfig, *this),
295      configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20)
296296{
297297}
298298
299299pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
300300   : pci_device(mconfig, type, name, tag, owner, clock, shortname, source),
301     device_memory_interface(mconfig, *this),
302     configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20)
301      device_memory_interface(mconfig, *this),
302      configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20)
303303{
304304}
305305
r242066r242067
373373
374374
375375void pci_bridge_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
376                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
376                           UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
377377{
378378   for(int i = all_devices.count()-1; i>=0; i--)
379379      if(all_devices[i] != this)
380380         all_devices[i]->map_device(memory_window_start, memory_window_end, memory_offset, memory_space,
381                              io_window_start, io_window_end, io_offset, io_space);
381                              io_window_start, io_window_end, io_offset, io_space);
382382
383383   map_extra(memory_window_start, memory_window_end, memory_offset, memory_space,
384           io_window_start, io_window_end, io_offset, io_space);
384            io_window_start, io_window_end, io_offset, io_space);
385385}
386386
387387
r242066r242067
458458   io_space->unmap_readwrite(io_window_start, io_window_end);
459459
460460   map_device(memory_window_start, memory_window_end, memory_offset, memory_space,
461            io_window_start, io_window_end, io_offset, io_space);
461            io_window_start, io_window_end, io_offset, io_space);
462462}
463463
464464READ32_MEMBER(pci_host_device::config_address_r)
r242066r242067
492492      }
493493   } else
494494      abort();
495   
495
496496   return data;
497497}
498498
trunk/src/emu/machine/pci.h
r242066r242067
3737   virtual void map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
3838                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
3939   virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
40                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
40                     UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
4141
4242   void map_config(UINT8 device, address_space *config_space);
4343
trunk/src/emu/machine/pla.c
r242066r242067
5959   m_cache.resize(csize);
6060   for (int i = 0; i < csize; i++)
6161      m_cache[i] = read(i);
62   
62
6363   m_cache_size = csize;
6464}
6565
r242066r242067
7272{
7373   jed_data jed;
7474   int result = JEDERR_NONE;
75   
75
7676   // read pla file
7777   switch (m_format)
7878   {
7979      case PLA_FMT_JEDBIN:
8080         result = jedbin_parse(region()->base(), region()->bytes(), &jed);
8181         break;
82     
82
8383      case PLA_FMT_BERKELEY:
8484         result = pla_parse(region()->base(), region()->bytes(), &jed);
8585         break;
8686   }
87   
87
8888   if (result != JEDERR_NONE)
8989   {
9090      for (int p = 0; p < m_terms; p++)
r242066r242067
9292         m_term[p].and_mask = 0;
9393         m_term[p].or_mask = 0;
9494      }
95     
95
9696      logerror("%s PLA parse error %d!\n", tag(), result);
9797      return;
9898   }
99   
99
100100   // parse it
101101   UINT32 fusenum = 0;
102102
r242066r242067
148148   // try the cache first
149149   if (input < m_cache_size)
150150      return m_cache[input];
151   
151
152152   for (int i = 0; i < CACHE2_SIZE; ++i)
153153   {
154154      UINT64 cache2_entry = m_cache2[i];
trunk/src/emu/machine/pla.h
r242066r242067
9999   static void set_num_terms(device_t &device, UINT32 t) { downcast<pla_device &>(device).m_terms = t; }
100100   static void set_inputmask(device_t &device, UINT32 mask) { downcast<pla_device &>(device).m_input_mask = mask; } // UINT32!
101101   static void set_format(device_t &device, int format) { downcast<pla_device &>(device).m_format = format; }
102   
102
103103   UINT32 inputs() { return m_inputs; }
104104   UINT32 outputs() { return m_outputs; }
105105
r242066r242067
113113   void parse_fusemap();
114114
115115   int m_format;
116   
116
117117   UINT32 m_inputs;
118118   UINT32 m_outputs;
119119   UINT32 m_terms;
trunk/src/emu/memory.c
r242066r242067
34353435      for (int i=0; i<size; i++)
34363436         subptr[i] = subentry;
34373437      m_table[l1index] = newentry;
3438      UINT32 subkey = subentry + (subentry << 8) + (subentry << 16) + (subentry << 24);
3438      UINT32 subkey = subentry + (subentry << 8) + (subentry << 16) + (subentry << 24);
34393439      m_subtable[newentry - SUBTABLE_BASE].m_checksum = subkey * (((1 << level2_bits())/4));
34403440      subentry = newentry;
34413441   }
trunk/src/emu/memory.h
r242066r242067
649649         m_endianness(endianness),
650650         m_bitwidth(width),
651651         m_bytewidth(width <= 8 ? 1 : width <= 16 ? 2 : width <= 32 ? 4 : 8)
652 { }
652   { }
653653
654654   // getters
655655   memory_share *next() const { return m_next; }
trunk/src/emu/romload.c
r242066r242067
537537      return;
538538
539539   LOG(("+ datawidth=%dbit endian=%s\n", region->bitwidth(),
540      region->endianness() == ENDIANNESS_LITTLE ? "little" : "big"));
540         region->endianness() == ENDIANNESS_LITTLE ? "little" : "big"));
541541
542542   /* if the region is inverted, do that now */
543543   if (invert)
trunk/src/emu/sound/sn76477.h
r242066r242067
116116      dev.m_vco_voltage = volt;
117117      dev.m_vco_cap = cap;
118118      dev.m_vco_res = res;
119   }   
119   }
120120   static void set_pitch_voltage(device_t &device, double volt) { downcast<sn76477_device &>(device).m_pitch_voltage = volt; }
121121   static void set_slf_params(device_t &device, double cap, double res)
122122   {
r242066r242067
137137      dev.m_mixer_a = a;
138138      dev.m_mixer_b = b;
139139      dev.m_mixer_c = c;
140   }   
140   }
141141   static void set_envelope_params(device_t &device, UINT32 env1, UINT32 env2)
142142   {
143143      sn76477_device &dev = downcast<sn76477_device &>(device);
144144      dev.m_envelope_1 = env1;
145145      dev.m_envelope_2 = env2;
146   }   
146   }
147147   static void set_enable(device_t &device, UINT32 enable) { downcast<sn76477_device &>(device).m_enable = enable; }
148   
149   
148
149
150150   /* these functions take 0 or 1 as a logic input */
151151   WRITE_LINE_MEMBER( enable_w );      /* active LO, 0 = enabled, 1 = disabled */
152152   WRITE_LINE_MEMBER( mixer_a_w );
r242066r242067
257257   UINT32 m_mixer_c;
258258   UINT32 m_envelope_1;
259259   UINT32 m_envelope_2;
260   
260
261261   /* others */
262262   sound_stream *m_channel;              /* returned by stream_create() */
263263   int m_our_sample_rate;                    /* from machine.sample_rate() */
trunk/src/emu/video/315_5124.h
r242066r242067
6262   sega315_5124_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 cram_size, UINT8 palette_offset, bool supports_224_240, const char *shortname, const char *source, int xscroll_hpos = X_SCROLL_HPOS_5124);
6363
6464   static void set_signal_type(device_t &device, bool is_pal) { downcast<sega315_5124_device &>(device).m_is_pal = is_pal; }
65   
6665
6766
67
6868   template<class _Object> static devcb_base &set_int_callback(device_t &device, _Object object) { return downcast<sega315_5124_device &>(device).m_int_cb.set_callback(object); }
6969   template<class _Object> static devcb_base &set_pause_callback(device_t &device, _Object object) { return downcast<sega315_5124_device &>(device).m_pause_cb.set_callback(object); }
7070
trunk/src/emu/video/315_5313.c
r242066r242067
25032503{
25042504   UINT16 *lineptr;
25052505
2506   
25072506
2507
25082508   if (!m_use_alt_timing)
25092509   {
25102510      if (scanline >= m_render_bitmap->height()) // safety, shouldn't happen now we allocate a fixed amount tho
trunk/src/emu/video/snes_ppu.c
r242066r242067
361361
362362void snes_ppu_device::device_reset()
363363{
364   
365364#if SNES_LAYER_DEBUG
366365   memset(&m_debug_options, 0, sizeof(m_debug_options));
367366#endif
368   
367
369368   /* Inititialize registers/variables */
370369   m_update_windows = 1;
371370   m_beam.latch_vert = 0;
r242066r242067
376375   m_mode = 0;
377376   m_ppu1_version = 1;  // 5C77 chip version number, read by STAT77, only '1' is known
378377   m_ppu2_version = 3;  // 5C78 chip version number, read by STAT78, only '2' & '3' encountered so far.
379   
378
380379   m_cgram_address = 0;
381380   m_read_ophct = 0;
382381   m_read_opvct = 0;
383382
384383   m_vmadd = 0;
385   
384
386385   PPU_REG(VMAIN) = 0x80;
387386   // what about other regs?
388   
387
389388   /* Inititialize mosaic table */
390389   for (int j = 0; j < 16; j++)
391390   {
392391      for (int i = 0; i < 4096; i++)
393392         m_mosaic_table[j][i] = (i / (j + 1)) * (j + 1);
394393   }
395   
394
396395   /* Init VRAM */
397396   memset(m_vram, 0, SNES_VRAM_SIZE);
398   
397
399398   /* Init Palette RAM */
400399   memset((UINT8 *)m_cgram, 0, SNES_CGRAM_SIZE);
401   
400
402401   /* Init oam RAM */
403402   memset((UINT8 *)m_oam_ram, 0xff, SNES_OAM_SIZE);
404   
403
405404   m_stat78 = 0;
406405
407406   // other initializations to 0
r242066r242067
419418      memset(m_scanlines[i].layer, 0, SNES_SCR_WIDTH);
420419      memset(m_scanlines[i].blend_exception, 0, SNES_SCR_WIDTH);
421420   }
422   
421
423422   for (int i = 0; i < 6; i++)
424423   {
425424      m_layer[i].window1_enabled = 0;
r242066r242067
439438      m_layer[i].sub_bg_enabled = 0;
440439      m_layer[i].hoffs = 0;
441440      m_layer[i].voffs = 0;
442     
441
443442      memset(m_clipmasks[i], 0, SNES_SCR_WIDTH);
444443   }
445   
444
446445   for (int i = 0; i < ARRAY_LENGTH(m_oam_spritelist); i++)
447446   {
448447      m_oam_spritelist[i].tile = 0;
r242066r242067
456455      m_oam_spritelist[i].height = 0;
457456      m_oam_spritelist[i].width = 0;
458457   }
459   
458
460459   for (int i = 0; i < ARRAY_LENGTH(m_oam_tilelist); i++)
461460   {
462461      m_oam_tilelist[i].x = 0;
trunk/src/lib/formats/flopimg.c
r242066r242067
13071307   for(int i=0; i != MAX_CRC_COUNT; i++)
13081308      if(crcs[i].write != -1) {
13091309         switch(crcs[i].type) {
1310         case CRC_AMIGA:         fixup_crc_amiga(buffer, crcs+i); break;
1311         case CRC_CBM:         fixup_crc_cbm(buffer, crcs+i); break;
1312         case CRC_CCITT:         fixup_crc_ccitt(buffer, crcs+i); break;
1313         case CRC_CCITT_FM:      fixup_crc_ccitt_fm(buffer, crcs+i); break;
1314         case CRC_MACHEAD:      fixup_crc_machead(buffer, crcs+i); break;
1315         case CRC_FCS:         fixup_crc_fcs(buffer, crcs+i); break;
1316         case CRC_VICTOR_HDR:   fixup_crc_victor_header(buffer, crcs+i); break;
1317         case CRC_VICTOR_DATA:   fixup_crc_victor_data(buffer, crcs+i); break;
1310         case CRC_AMIGA:         fixup_crc_amiga(buffer, crcs+i); break;
1311         case CRC_CBM:           fixup_crc_cbm(buffer, crcs+i); break;
1312         case CRC_CCITT:         fixup_crc_ccitt(buffer, crcs+i); break;
1313         case CRC_CCITT_FM:      fixup_crc_ccitt_fm(buffer, crcs+i); break;
1314         case CRC_MACHEAD:       fixup_crc_machead(buffer, crcs+i); break;
1315         case CRC_FCS:           fixup_crc_fcs(buffer, crcs+i); break;
1316         case CRC_VICTOR_HDR:    fixup_crc_victor_header(buffer, crcs+i); break;
1317         case CRC_VICTOR_DATA:   fixup_crc_victor_data(buffer, crcs+i); break;
13181318         }
13191319         if(crcs[i].fixup_mfm_clock) {
13201320            int offset = crcs[i].write + crc_cells_size(crcs[i].type);
trunk/src/lib/formats/flopimg.h
r242066r242067
348348      CRC_CBM_START,          //!< Start a CBM checksum calculation (xor of original data values, gcr5-encoded), p1 = crc id
349349      CRC_MACHEAD_START,      //!< Start of the mac gcr6 sector header checksum calculation (xor of pre-encode 6-bits values, gcr6-encoded)
350350      CRC_FCS_START,          //!< Start a Compucolor File Control System checksum calculation, p1 = crc id
351      CRC_VICTOR_HDR_START,   //!< Start a Victor 9000 checksum calculation, p1 = crc id
352      CRC_VICTOR_DATA_START,   //!< Start a Victor 9000 checksum calculation, p1 = crc id
351      CRC_VICTOR_HDR_START,   //!< Start a Victor 9000 checksum calculation, p1 = crc id
352      CRC_VICTOR_DATA_START,  //!< Start a Victor 9000 checksum calculation, p1 = crc id
353353      CRC_END,                //!< End the checksum, p1 = crc id
354354      CRC,                    //!< Write a checksum in the apporpriate format, p1 = crc id
355355
trunk/src/lib/formats/spc1000_cas.c
r242066r242067
1010TAP: This is a series of 0x30 and 0x31 bytes, representing binary
1111     0 and 1. It includes the header and leaders.
1212
13CAS: Files in this format consist of a 16 bytes header (SPC-1000.CASfmt )
13CAS: Files in this format consist of a 16 bytes header (SPC-1000.CASfmt )
1414     followed by cassette bits packed together (each byte of a .cas file
1515     are 8 bits, most significant bit first)
1616
r242066r242067
7474static int spc1000_handle_cas(INT16 *buffer, const UINT8 *bytes)
7575{
7676   UINT32 sample_count = 0;
77   
77
7878   /* data (skipping first 16 bytes, which is CAS header) */
7979   for (UINT32 i = 0x10; i < spc1000_image_size; i++)
8080      for (int j = 0; j < 8; j++)
8181         sample_count += spc1000_output_bit(buffer, sample_count, (bytes[i] >> (7 - j)) & 1);
82   
82
8383   return sample_count;
8484}
8585
r242066r242067
112112static int spc1000_cas_calculate_size_in_samples(const UINT8 *bytes, int length)
113113{
114114   spc1000_image_size = length;
115   
115
116116   return spc1000_handle_cas(NULL, bytes);
117117}
118118
trunk/src/lib/formats/victor9k_dsk.c
r242066r242067
22// copyright-holders:Curt Coder
33/*********************************************************************
44
5   formats/victor9k_dsk.c
5    formats/victor9k_dsk.c
66
7   Victor 9000 sector disk image format
7    Victor 9000 sector disk image format
88
99*********************************************************************/
1010
1111/*
1212
13   Sector format
14   -------------
13    Sector format
14    -------------
1515
16   Header sync
17   Sector header (header ID, track ID, sector ID, and checksum)
18   Gap 1
19   Data Sync
20   Data field (data sync, data ID, data bytes, and checksum)
21   Gap 2
16    Header sync
17    Sector header (header ID, track ID, sector ID, and checksum)
18    Gap 1
19    Data Sync
20    Data field (data sync, data ID, data bytes, and checksum)
21    Gap 2
2222
23   Track format
24   ------------
23    Track format
24    ------------
2525
26   ZONE        LOWER HEAD  UPPER HEAD  SECTORS     ROTATIONAL   RPM
27   NUMBER      TRACKS      TRACKS      PER TRACK   PERIOD (MS)
26    ZONE        LOWER HEAD  UPPER HEAD  SECTORS     ROTATIONAL   RPM
27    NUMBER      TRACKS      TRACKS      PER TRACK   PERIOD (MS)
2828
29   0           0-3         unused      19          237.9        252
30   1           4-15        0-7         18          224.5        267
31   2           16-26       8-18        17          212.2        283
32   3           27-37       19-29       16          199.9        300
33   4           38-48       30-40       15          187.6        320
34   5           49-59       41-51       14          175.3        342
35   6           60-70       52-62       13          163.0        368
36   7           71-79       63-74       12          149.6        401
37   8           unused      75-79       11          144.0        417
29    0           0-3         unused      19          237.9        252
30    1           4-15        0-7         18          224.5        267
31    2           16-26       8-18        17          212.2        283
32    3           27-37       19-29       16          199.9        300
33    4           38-48       30-40       15          187.6        320
34    5           49-59       41-51       14          175.3        342
35    6           60-70       52-62       13          163.0        368
36    7           71-79       63-74       12          149.6        401
37    8           unused      75-79       11          144.0        417
3838
39   Interleave factor 3
40   cell 2.13 usec
39    Interleave factor 3
40    cell 2.13 usec
4141
4242*/
4343
trunk/src/lib/util/plaparse.c
r242066r242067
6464static UINT32 suck_number(const UINT8 **src, const UINT8 *srcend)
6565{
6666   UINT32 value = 0;
67   
67
6868   // find first digit
6969   while (*src < srcend && !iscrlf(**src) && !isdigit(**src))
7070      (*src)++;
r242066r242067
9494   UINT32 curinput = 0;
9595   UINT32 curoutput = 0;
9696   bool outputs = false;
97   
97
9898   // symbols for 0, 1, dont_care, no_meaning
9999   // PLA format documentation also describes them as simply 0, 1, 2, 3
100100   static const char symbols[] = { "01-~" };
r242066r242067
106106         // and-matrix
107107         if (strrchr(symbols, **src))
108108            curinput++;
109         
109
110110         switch (**src)
111111         {
112112            case '0':
r242066r242067
146146                  if (LOG_PARSE) printf(" ");
147147               }
148148               break;
149     
149
150150            default:
151151               break;
152152         }
r242066r242067
175175      {
176176         outputs = false;
177177         if (LOG_PARSE) printf("\n");
178         
178
179179         if (curinput != pinfo->inputs || curoutput != pinfo->outputs)
180180            return false;
181181
r242066r242067
185185
186186      (*src)++;
187187   }
188   
188
189189   return true;
190190}
191191
r242066r242067
206206      KW_TERMS,
207207      KW_PHASE,
208208      KW_END,
209     
209
210210      KW_INVALID
211211   };
212   
212
213213   // find keyword
214214   char dest[0x10];
215215   memset(dest, 0, ARRAY_LENGTH(dest));
216216   const UINT8 *seek = *src;
217217   int destptr = 0;
218   
218
219219   while (seek < srcend && isalpha(*seek) && destptr < ARRAY_LENGTH(dest) - 1)
220220   {
221221      dest[destptr] = tolower(*seek);
222222      seek++;
223223      destptr++;
224224   }
225   
225
226226   UINT8 find = 0;
227227   while (strlen(keywords[find]) && strcmp(dest, keywords[find]))
228228      find++;
229   
229
230230   if (find == KW_INVALID)
231231      return false;
232   
232
233233   (*src) += strlen(keywords[find]);
234   
234
235235   // handle it
236236   switch (find)
237237   {
r242066r242067
261261
262262         if (LOG_PARSE) printf("Terms: %u\n", pinfo->terms);
263263         break;
264     
264
265265      // output polarity (optional)
266266      case KW_PHASE:
267267         if (LOG_PARSE) printf("Phase...\n");
r242066r242067
283283         if (LOG_PARSE) printf("End of file\n");
284284         break;
285285   }
286   
286
287287   return true;
288288}
289289
r242066r242067
298298{
299299   const UINT8 *src = (const UINT8 *)data;
300300   const UINT8 *srcend = src + length;
301   
301
302302   parse_info pinfo;
303303   memset(&pinfo, 0, sizeof(pinfo));
304304
r242066r242067
321321            if (!process_field(result, &src, srcend, &pinfo))
322322               return JEDERR_INVALID_DATA;
323323            break;
324         
324
325325         // terms
326326         case '0': case '1': case '-': case '~':
327327            if (!process_terms(result, &src, srcend, &pinfo))
328328               return JEDERR_INVALID_DATA;
329329            break;
330         
330
331331         default:
332332            src++;
333333            break;
334334      }
335335   }
336   
336
337337   // write output polarity
338338   if (pinfo.xorptr > 0)
339339   {
340340      if (LOG_PARSE) printf("Polarity: ");
341     
341
342342      for (int i = 0; i < pinfo.outputs; i++)
343343      {
344344         int bit = pinfo.xorval[i/32] >> (i & 31) & 1;
trunk/src/lib/web/mongoose.c
r242066r242067
51695169
51705170   p = malloc(len);
51715171   if (!p)
5172       return NULL;
5172      return NULL;
51735173
51745174   curpos = lseek(fd, 0, SEEK_CUR);
51755175   lseek(fd, offset, SEEK_SET);
trunk/src/lib/winpcap/Packet32.h
r242066r242067
1212 * 2. Redistributions in binary form must reproduce the above copyright
1313 * notice, this list of conditions and the following disclaimer in the
1414 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 * nor the names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
15 * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 * nor the names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
1818 * permission.
1919 *
2020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
r242066r242067
3232 */
3333
3434/** @ingroup packetapi
35 *  @{
35 *  @{
3636 */
3737
3838/** @defgroup packet32h Packet.dll definitions and data structures
r242066r242067
7070
7171/// Alignment macro. Defines the alignment size.
7272#define Packet_ALIGNMENT sizeof(int)
73/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT.
73/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT.
7474#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
7575
76#define NdisMediumNull   -1      ///< Custom linktype: NDIS doesn't provide an equivalent
77#define NdisMediumCHDLC   -2      ///< Custom linktype: NDIS doesn't provide an equivalent
78#define NdisMediumPPPSerial   -3   ///< Custom linktype: NDIS doesn't provide an equivalent
79#define NdisMediumBare80211   -4   ///< Custom linktype: NDIS doesn't provide an equivalent
80#define NdisMediumRadio80211   -5   ///< Custom linktype: NDIS doesn't provide an equivalent
81#define NdisMediumPpi      -6   ///< Custom linktype: NDIS doesn't provide an equivalent
76#define NdisMediumNull  -1      ///< Custom linktype: NDIS doesn't provide an equivalent
77#define NdisMediumCHDLC -2      ///< Custom linktype: NDIS doesn't provide an equivalent
78#define NdisMediumPPPSerial -3  ///< Custom linktype: NDIS doesn't provide an equivalent
79#define NdisMediumBare80211 -4  ///< Custom linktype: NDIS doesn't provide an equivalent
80#define NdisMediumRadio80211    -5  ///< Custom linktype: NDIS doesn't provide an equivalent
81#define NdisMediumPpi       -6  ///< Custom linktype: NDIS doesn't provide an equivalent
8282
8383// Loopback behaviour definitions
84#define NPF_DISABLE_LOOPBACK   1   ///< Drop the packets sent by the NPF driver
85#define NPF_ENABLE_LOOPBACK      2   ///< Capture the packets sent by the NPF driver
84#define NPF_DISABLE_LOOPBACK    1   ///< Drop the packets sent by the NPF driver
85#define NPF_ENABLE_LOOPBACK     2   ///< Capture the packets sent by the NPF driver
8686
8787/*!
8888  \brief Network type structure.
r242066r242067
9191*/
9292typedef struct NetType
9393{
94   UINT LinkType;   ///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
95   ULONGLONG LinkSpeed;   ///< The speed of the network in bits per second
94   UINT LinkType;  ///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
95   ULONGLONG LinkSpeed;    ///< The speed of the network in bits per second
9696}NetType;
9797
9898
r242066r242067
103103/*!
104104  \brief A BPF pseudo-assembly program.
105105
106  The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet.
106  The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet.
107107*/
108struct bpf_program
108struct bpf_program
109109{
110   UINT bf_len;            ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
111   struct bpf_insn *bf_insns;   ///< A pointer to the first instruction of the program.
110   UINT bf_len;                ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
111   struct bpf_insn *bf_insns;  ///< A pointer to the first instruction of the program.
112112};
113113
114114/*!
r242066r242067
116116
117117  bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver.
118118*/
119struct bpf_insn
119struct bpf_insn
120120{
121   USHORT   code;      ///< Instruction type and addressing mode.
122   UCHAR    jt;         ///< Jump if true
123   UCHAR    jf;         ///< Jump if false
124   int k;            ///< Generic field used for various purposes.
121   USHORT  code;       ///< Instruction type and addressing mode.
122   UCHAR   jt;         ///< Jump if true
123   UCHAR   jf;         ///< Jump if false
124   int k;              ///< Generic field used for various purposes.
125125};
126126
127127/*!
r242066r242067
129129
130130  It is used by packet.dll to return statistics about a capture session.
131131*/
132struct bpf_stat
132struct bpf_stat
133133{
134   UINT bs_recv;      ///< Number of packets that the driver received from the network adapter
135                  ///< from the beginning of the current capture. This value includes the packets
134   UINT bs_recv;       ///< Number of packets that the driver received from the network adapter
135                  ///< from the beginning of the current capture. This value includes the packets
136136                  ///< lost by the driver.
137   UINT bs_drop;      ///< number of packets that the driver lost from the beginning of a capture.
138                  ///< Basically, a packet is lost when the the buffer of the driver is full.
137   UINT bs_drop;       ///< number of packets that the driver lost from the beginning of a capture.
138                  ///< Basically, a packet is lost when the the buffer of the driver is full.
139139                  ///< In this situation the packet cannot be stored and the driver rejects it.
140   UINT ps_ifdrop;      ///< drops by interface. XXX not yet supported
141   UINT bs_capt;      ///< number of packets that pass the filter, find place in the kernel buffer and
140   UINT ps_ifdrop;     ///< drops by interface. XXX not yet supported
141   UINT bs_capt;       ///< number of packets that pass the filter, find place in the kernel buffer and
142142                  ///< thus reach the application.
143143};
144144
r242066r242067
147147
148148  This structure defines the header associated with every packet delivered to the application.
149149*/
150struct bpf_hdr
150struct bpf_hdr
151151{
152   struct timeval   bh_tstamp;   ///< The timestamp associated with the captured packet.
152   struct timeval  bh_tstamp;  ///< The timestamp associated with the captured packet.
153153                        ///< It is stored in a TimeVal structure.
154   UINT   bh_caplen;         ///< Length of captured portion. The captured portion <b>can be different</b>
154   UINT    bh_caplen;          ///< Length of captured portion. The captured portion <b>can be different</b>
155155                        ///< from the original packet, because it is possible (with a proper filter)
156156                        ///< to instruct the driver to capture only a portion of the packets.
157   UINT   bh_datalen;         ///< Original length of packet
158   USHORT      bh_hdrlen;      ///< Length of bpf header (this struct plus alignment padding). In some cases,
157   UINT    bh_datalen;         ///< Original length of packet
158   USHORT      bh_hdrlen;      ///< Length of bpf header (this struct plus alignment padding). In some cases,
159159                        ///< a padding could be added between the end of this structure and the packet
160                        ///< data for performance reasons. This filed can be used to retrieve the actual data
160                        ///< data for performance reasons. This filed can be used to retrieve the actual data
161161                        ///< of the packet.
162162};
163163
r242066r242067
169169  packet in a dump file. This makes straightforward sending WinPcap dump files to the network.
170170*/
171171struct dump_bpf_hdr{
172    struct timeval   ts;         ///< Time stamp of the packet
173    UINT         caplen;      ///< Length of captured portion. The captured portion can smaller than the
174                        ///< the original packet, because it is possible (with a proper filter) to
175                        ///< instruct the driver to capture only a portion of the packets.
176    UINT         len;      ///< Length of the original packet (off wire).
172   struct timeval  ts;         ///< Time stamp of the packet
173   UINT            caplen;     ///< Length of captured portion. The captured portion can smaller than the
174                        ///< the original packet, because it is possible (with a proper filter) to
175                        ///< instruct the driver to capture only a portion of the packets.
176   UINT            len;        ///< Length of the original packet (off wire).
177177};
178178
179179
r242066r242067
181181
182182struct bpf_stat;
183183
184#define        DOSNAMEPREFIX   TEXT("Packet_")   ///< Prefix added to the adapters device names to create the WinPcap devices
185#define        MAX_LINK_NAME_LENGTH   64         //< Maximum length of the devices symbolic links
184#define        DOSNAMEPREFIX   TEXT("Packet_")  ///< Prefix added to the adapters device names to create the WinPcap devices
185#define        MAX_LINK_NAME_LENGTH 64          //< Maximum length of the devices symbolic links
186186#define        NMAX_PACKET 65535
187187
188188/*!
189189  \brief Addresses of a network adapter.
190190
191  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with
191  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with
192192  an adapter.
193193*/
194194typedef struct npf_if_addr {
195   struct sockaddr_storage IPAddress;   ///< IP address.
196   struct sockaddr_storage SubnetMask;   ///< Netmask for that address.
197   struct sockaddr_storage Broadcast;   ///< Broadcast address.
195   struct sockaddr_storage IPAddress;  ///< IP address.
196   struct sockaddr_storage SubnetMask; ///< Netmask for that address.
197   struct sockaddr_storage Broadcast;  ///< Broadcast address.
198198}npf_if_addr;
199199
200200
201#define ADAPTER_NAME_LENGTH 256 + 12   ///<  Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
202#define ADAPTER_DESC_LENGTH 128         ///<  Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
203#define MAX_MAC_ADDR_LENGTH 8         ///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
204#define MAX_NETWORK_ADDRESSES 16      ///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
201#define ADAPTER_NAME_LENGTH 256 + 12    ///<  Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
202#define ADAPTER_DESC_LENGTH 128         ///<  Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
203#define MAX_MAC_ADDR_LENGTH 8           ///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
204#define MAX_NETWORK_ADDRESSES 16        ///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
205205
206206
207207typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
208208typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
209209
210#define INFO_FLAG_NDIS_ADAPTER      0   ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
211#define INFO_FLAG_NDISWAN_ADAPTER   1   ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET
212#define INFO_FLAG_DAG_CARD         2   ///< Flag for ADAPTER_INFO: this is a DAG card
213#define INFO_FLAG_DAG_FILE         6   ///< Flag for ADAPTER_INFO: this is a DAG file
214#define INFO_FLAG_DONT_EXPORT      8   ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
215#define INFO_FLAG_AIRPCAP_CARD      16   ///< Flag for ADAPTER_INFO: this is an airpcap card
216#define INFO_FLAG_NPFIM_DEVICE      32
210#define INFO_FLAG_NDIS_ADAPTER      0   ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
211#define INFO_FLAG_NDISWAN_ADAPTER   1   ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET
212#define INFO_FLAG_DAG_CARD          2   ///< Flag for ADAPTER_INFO: this is a DAG card
213#define INFO_FLAG_DAG_FILE          6   ///< Flag for ADAPTER_INFO: this is a DAG file
214#define INFO_FLAG_DONT_EXPORT       8   ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
215#define INFO_FLAG_AIRPCAP_CARD      16  ///< Flag for ADAPTER_INFO: this is an airpcap card
216#define INFO_FLAG_NPFIM_DEVICE      32
217217
218218/*!
219219  \brief Describes an opened network adapter.
r242066r242067
221221  This structure is the most important for the functioning of packet.dll, but the great part of its fields
222222  should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters
223223*/
224typedef struct _ADAPTER  {
225   HANDLE hFile;            ///< \internal Handle to an open instance of the NPF driver.
224typedef struct _ADAPTER  {
225   HANDLE hFile;               ///< \internal Handle to an open instance of the NPF driver.
226226   CHAR  SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened.
227   int NumWrites;            ///< \internal Number of times a packets written on this adapter will be repeated
227   int NumWrites;              ///< \internal Number of times a packets written on this adapter will be repeated
228228                        ///< on the wire.
229   HANDLE ReadEvent;         ///< A notification event associated with the read calls on the adapter.
229   HANDLE ReadEvent;           ///< A notification event associated with the read calls on the adapter.
230230                        ///< It can be passed to standard Win32 functions (like WaitForSingleObject
231                        ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some
232                        ///< data. It is particularly useful in GUI applications that need to wait
231                        ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some
232                        ///< data. It is particularly useful in GUI applications that need to wait
233233                        ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy()
234234                        ///< function can be used to define the minimum amount of data in the kernel buffer
235                        ///< that will cause the event to be signalled.
236   
237   UINT ReadTimeOut;         ///< \internal The amount of time after which a read on the driver will be released and
235                        ///< that will cause the event to be signalled.
236
237   UINT ReadTimeOut;           ///< \internal The amount of time after which a read on the driver will be released and
238238                        ///< ReadEvent will be signaled, also if no packets were captured
239239   CHAR Name[ADAPTER_NAME_LENGTH];
240240   PWAN_ADAPTER pWanAdapter;
241   UINT Flags;               ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
241   UINT Flags;                 ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
242242
243243#ifdef HAVE_AIRPCAP_API
244   PAirpcapHandle   AirpcapAd;
244   PAirpcapHandle  AirpcapAd;
245245#endif // HAVE_AIRPCAP_API
246246
247247#ifdef HAVE_NPFIM_API
r242066r242067
249249#endif // HAVE_NPFIM_API
250250
251251#ifdef HAVE_DAG_API
252   dagc_t *pDagCard;         ///< Pointer to the dagc API adapter descriptor for this adapter
253   PCHAR DagBuffer;         ///< Pointer to the buffer with the packets that is received from the DAG card
254   struct timeval DagReadTimeout;   ///< Read timeout. The dagc API requires a timeval structure
255   unsigned DagFcsLen;         ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
256   DWORD DagFastProcess;      ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
252   dagc_t *pDagCard;           ///< Pointer to the dagc API adapter descriptor for this adapter
253   PCHAR DagBuffer;            ///< Pointer to the buffer with the packets that is received from the DAG card
254   struct timeval DagReadTimeout;  ///< Read timeout. The dagc API requires a timeval structure
255   unsigned DagFcsLen;         ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
256   DWORD DagFastProcess;       ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
257257#endif // HAVE_DAG_API
258258}  ADAPTER, *LPADAPTER;
259259
r242066r242067
262262
263263  This structure defines the header associated with every packet delivered to the application.
264264*/
265typedef struct _PACKET { 
266   HANDLE       hEvent;      ///< \deprecated Still present for compatibility with old applications.
267   OVERLAPPED   OverLapped;   ///< \deprecated Still present for compatibility with old applications.
268   PVOID        Buffer;      ///< Buffer with containing the packets. See the PacketReceivePacket() for
265typedef struct _PACKET {
266   HANDLE       hEvent;        ///< \deprecated Still present for compatibility with old applications.
267   OVERLAPPED   OverLapped;    ///< \deprecated Still present for compatibility with old applications.
268   PVOID        Buffer;        ///< Buffer with containing the packets. See the PacketReceivePacket() for
269269                        ///< details about the organization of the data in this buffer
270   UINT         Length;      ///< Length of the buffer
271   DWORD        ulBytesReceived;   ///< Number of valid bytes present in the buffer, i.e. amount of data
270   UINT         Length;        ///< Length of the buffer
271   DWORD        ulBytesReceived;   ///< Number of valid bytes present in the buffer, i.e. amount of data
272272                           ///< received by the last call to PacketReceivePacket()
273   BOOLEAN      bIoComplete;   ///< \deprecated Still present for compatibility with old applications.
273   BOOLEAN      bIoComplete;   ///< \deprecated Still present for compatibility with old applications.
274274}  PACKET, *LPPACKET;
275275
276276/*!
277277  \brief Structure containing an OID request.
278278
279  It is used by the PacketRequest() function to send an OID to the interface card driver.
280  It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address,
279  It is used by the PacketRequest() function to send an OID to the interface card driver.
280  It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address,
281281  the list of the multicast groups defined on it, and so on.
282282*/
283283struct _PACKET_OID_DATA {
284    ULONG Oid;               ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
284   ULONG Oid;                  ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
285285                        ///< for a complete list of valid codes.
286    ULONG Length;            ///< Length of the data field
287    UCHAR Data[1];            ///< variable-lenght field that contains the information passed to or received
286   ULONG Length;               ///< Length of the data field
287   UCHAR Data[1];              ///< variable-lenght field that contains the information passed to or received
288288                        ///< from the adapter.
289};
289};
290290typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
291291
292292#ifdef __cplusplus
r242066r242067
299299
300300/*
301301BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName,
302                         CHAR *Value,
303                         UINT *pValueLen,
304                         CHAR *DefaultVal);
302                                 CHAR *Value,
303                                 UINT *pValueLen,
304                                 CHAR *DefaultVal);
305305
306306BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName,
307                         WCHAR *Value,
308                         UINT *pValueLen,
309                         WCHAR *DefaultVal);
307                                 WCHAR *Value,
308                                 UINT *pValueLen,
309                                 WCHAR *DefaultVal);
310310*/
311                         
311
312312//---------------------------------------------------------------------------
313313// EXPORTED FUNCTIONS
314314//---------------------------------------------------------------------------
r242066r242067
350350//
351351// Used by PacketStartOemEx
352352//
353#define PACKET_START_OEM_NO_NETMON   0x00000001
353#define PACKET_START_OEM_NO_NETMON  0x00000001
354354
355355#ifdef __cplusplus
356356}
357#endif
357#endif
358358
359359#endif //__PACKET32
trunk/src/lib/winpcap/Win32-Extensions.h
r242066r242067
1212 * 2. Redistributions in binary form must reproduce the above copyright
1313 * notice, this list of conditions and the following disclaimer in the
1414 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 * nor the names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
15 * 3. Neither the name of the Politecnico di Torino, CACE Technologies
16 * nor the names of its contributors may be used to endorse or promote
17 * products derived from this software without specific prior written
1818 * permission.
1919 *
2020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
r242066r242067
4545*/
4646struct pcap_send_queue
4747{
48   u_int maxlen;      ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
49   u_int len;         ///< Current size of the queue, in bytes.
50   char *buffer;      ///< Buffer containing the packets to be sent.
48   u_int maxlen;       ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
49   u_int len;          ///< Current size of the queue, in bytes.
50   char *buffer;       ///< Buffer containing the packets to be sent.
5151};
5252
5353typedef struct pcap_send_queue pcap_send_queue;
r242066r242067
6060typedef struct _AirpcapHandle *PAirpcapHandle;
6161#endif
6262
63#define      BPF_MEM_EX_IMM   0xc0
64#define      BPF_MEM_EX_IND   0xe0
63#define     BPF_MEM_EX_IMM  0xc0
64#define     BPF_MEM_EX_IND  0xe0
6565
6666/*used for ST*/
67#define      BPF_MEM_EX      0xc0
68#define      BPF_TME               0x08
67#define     BPF_MEM_EX      0xc0
68#define     BPF_TME                 0x08
6969
70#define      BPF_LOOKUP            0x90   
71#define      BPF_EXECUTE            0xa0
72#define      BPF_INIT            0xb0
73#define      BPF_VALIDATE         0xc0
74#define      BPF_SET_ACTIVE         0xd0
75#define      BPF_RESET            0xe0
76#define      BPF_SET_MEMORY         0x80
77#define      BPF_GET_REGISTER_VALUE   0x70
78#define      BPF_SET_REGISTER_VALUE   0x60
79#define      BPF_SET_WORKING         0x50
80#define      BPF_SET_ACTIVE_READ      0x40
81#define      BPF_SET_AUTODELETION   0x30
82#define      BPF_SEPARATION         0xff
70#define     BPF_LOOKUP              0x90
71#define     BPF_EXECUTE             0xa0
72#define     BPF_INIT                0xb0
73#define     BPF_VALIDATE            0xc0
74#define     BPF_SET_ACTIVE          0xd0
75#define     BPF_RESET               0xe0
76#define     BPF_SET_MEMORY          0x80
77#define     BPF_GET_REGISTER_VALUE  0x70
78#define     BPF_SET_REGISTER_VALUE  0x60
79#define     BPF_SET_WORKING         0x50
80#define     BPF_SET_ACTIVE_READ     0x40
81#define     BPF_SET_AUTODELETION    0x30
82#define     BPF_SEPARATION          0xff
8383
8484/* Prototypes */
8585pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
trunk/src/lib/winpcap/bittypes.h
r242066r242067
11/*
22 * Copyright (C) 1999 WIDE Project.
33 * All rights reserved.
4 *
4 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
77 * are met:
r242066r242067
1313 * 3. Neither the name of the project nor the names of its contributors
1414 *    may be used to endorse or promote products derived from this software
1515 *    without specific prior written permission.
16 *
16 *
1717 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1818 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1919 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
r242066r242067
4545
4646#endif /* HAVE_U_INT8_T */
4747
48#ifndef HAVE_U_INT16_T
48#ifndef HAVE_U_INT16_T
4949
5050#if SIZEOF_SHORT == 2
5151typedef unsigned short u_int16_t;
r242066r242067
104104
105105#ifndef PRId64
106106#ifdef _MSC_EXTENSIONS
107#define PRId64   "I64d"
107#define PRId64  "I64d"
108108#else /* _MSC_EXTENSIONS */
109#define PRId64   "lld"
109#define PRId64  "lld"
110110#endif /* _MSC_EXTENSIONS */
111111#endif /* PRId64 */
112112
113113#ifndef PRIo64
114114#ifdef _MSC_EXTENSIONS
115#define PRIo64   "I64o"
115#define PRIo64  "I64o"
116116#else /* _MSC_EXTENSIONS */
117#define PRIo64   "llo"
117#define PRIo64  "llo"
118118#endif /* _MSC_EXTENSIONS */
119119#endif /* PRIo64 */
120120
121121#ifndef PRIx64
122122#ifdef _MSC_EXTENSIONS
123#define PRIx64   "I64x"
123#define PRIx64  "I64x"
124124#else /* _MSC_EXTENSIONS */
125#define PRIx64   "llx"
125#define PRIx64  "llx"
126126#endif /* _MSC_EXTENSIONS */
127127#endif /* PRIx64 */
128128
129129#ifndef PRIu64
130130#ifdef _MSC_EXTENSIONS
131#define PRIu64   "I64u"
131#define PRIu64  "I64u"
132132#else /* _MSC_EXTENSIONS */
133#define PRIu64   "llu"
133#define PRIu64  "llu"
134134#endif /* _MSC_EXTENSIONS */
135135#endif /* PRIu64 */
136136
trunk/src/lib/winpcap/ip6_misc.h
r242066r242067
11/*
22 * Copyright (c) 1993, 1994, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that: (1) source code distributions
r242066r242067
3030#include <ws2tcpip.h>
3131
3232#ifndef __MINGW32__
33#define   IN_MULTICAST(a)      IN_CLASSD(a)
33#define IN_MULTICAST(a)     IN_CLASSD(a)
3434#endif
3535
36#define   IN_EXPERIMENTAL(a)   ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
36#define IN_EXPERIMENTAL(a)  ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
3737
38#define   IN_LOOPBACKNET      127
38#define IN_LOOPBACKNET      127
3939
4040#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
4141/* IPv6 address */
4242struct in6_addr
43  {
44    union
45      {
46   u_int8_t      u6_addr8[16];
47   u_int16_t   u6_addr16[8];
48   u_int32_t   u6_addr32[4];
49      } in6_u;
50#define s6_addr         in6_u.u6_addr8
51#define s6_addr16      in6_u.u6_addr16
52#define s6_addr32      in6_u.u6_addr32
53#define s6_addr64      in6_u.u6_addr64
54  };
43   {
44   union
45      {
46   u_int8_t        u6_addr8[16];
47   u_int16_t   u6_addr16[8];
48   u_int32_t   u6_addr32[4];
49      } in6_u;
50#define s6_addr         in6_u.u6_addr8
51#define s6_addr16       in6_u.u6_addr16
52#define s6_addr32       in6_u.u6_addr32
53#define s6_addr64       in6_u.u6_addr64
54   };
5555
5656#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
5757#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
r242066r242067
5959
6060
6161#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF))
62typedef unsigned short   sa_family_t;
62typedef unsigned short  sa_family_t;
6363#endif
6464
6565
6666#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
6767
68#define   __SOCKADDR_COMMON(sa_prefix) \
69  sa_family_t sa_prefix##family
68#define __SOCKADDR_COMMON(sa_prefix) \
69   sa_family_t sa_prefix##family
7070
7171/* Ditto, for IPv6.  */
7272struct sockaddr_in6
73  {
74    __SOCKADDR_COMMON (sin6_);
75    u_int16_t sin6_port;      /* Transport layer port # */
76    u_int32_t sin6_flowinfo;   /* IPv6 flow information */
77    struct in6_addr sin6_addr;   /* IPv6 address */
78  };
73   {
74   __SOCKADDR_COMMON (sin6_);
75   u_int16_t sin6_port;        /* Transport layer port # */
76   u_int32_t sin6_flowinfo;    /* IPv6 flow information */
77   struct in6_addr sin6_addr;  /* IPv6 address */
78   };
7979
8080#define IN6_IS_ADDR_V4MAPPED(a) \
8181   ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
82    (((u_int32_t *) (a))[2] == htonl (0xffff)))
82      (((u_int32_t *) (a))[2] == htonl (0xffff)))
8383
8484#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
8585
r242066r242067
8888
8989#define IN6_IS_ADDR_LOOPBACK(a) \
9090   (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
91    ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
91      ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
9292#endif /* __MINGW32__ */
9393
9494#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
r242066r242067
104104#define nd_rd_reserved           nd_rd_hdr.icmp6_data32[0]
105105
106106/*
107 *   IPV6 extension headers
107 *  IPV6 extension headers
108108 */
109#define IPPROTO_HOPOPTS      0   /* IPv6 hop-by-hop options   */
110#define IPPROTO_IPV6      41  /* IPv6 header.  */
111#define IPPROTO_ROUTING      43   /* IPv6 routing header      */
112#define IPPROTO_FRAGMENT   44   /* IPv6 fragmentation header   */
113#define IPPROTO_ESP      50   /* encapsulating security payload */
114#define IPPROTO_AH      51   /* authentication header   */
115#define IPPROTO_ICMPV6      58   /* ICMPv6         */
116#define IPPROTO_NONE      59   /* IPv6 no next header      */
117#define IPPROTO_DSTOPTS      60   /* IPv6 destination options   */
118#define IPPROTO_PIM         103 /* Protocol Independent Multicast.  */
109#define IPPROTO_HOPOPTS     0   /* IPv6 hop-by-hop options  */
110#define IPPROTO_IPV6        41  /* IPv6 header.  */
111#define IPPROTO_ROUTING     43  /* IPv6 routing header      */
112#define IPPROTO_FRAGMENT    44  /* IPv6 fragmentation header    */
113#define IPPROTO_ESP     50  /* encapsulating security payload */
114#define IPPROTO_AH      51  /* authentication header    */
115#define IPPROTO_ICMPV6      58  /* ICMPv6           */
116#define IPPROTO_NONE        59  /* IPv6 no next header      */
117#define IPPROTO_DSTOPTS     60  /* IPv6 destination options */
118#define IPPROTO_PIM         103 /* Protocol Independent Multicast.  */
119119
120#define    IPV6_RTHDR_TYPE_0 0
120#define IPV6_RTHDR_TYPE_0 0
121121
122122/* Option types and related macros */
123#define IP6OPT_PAD1      0x00   /* 00 0 00000 */
124#define IP6OPT_PADN      0x01   /* 00 0 00001 */
125#define IP6OPT_JUMBO      0xC2   /* 11 0 00010 = 194 */
126#define IP6OPT_JUMBO_LEN   6
127#define IP6OPT_ROUTER_ALERT   0x05   /* 00 0 00101 */
123#define IP6OPT_PAD1     0x00    /* 00 0 00000 */
124#define IP6OPT_PADN     0x01    /* 00 0 00001 */
125#define IP6OPT_JUMBO        0xC2    /* 11 0 00010 = 194 */
126#define IP6OPT_JUMBO_LEN    6
127#define IP6OPT_ROUTER_ALERT 0x05    /* 00 0 00101 */
128128
129#define IP6OPT_RTALERT_LEN   4
130#define IP6OPT_RTALERT_MLD   0   /* Datagram contains an MLD message */
131#define IP6OPT_RTALERT_RSVP   1   /* Datagram contains an RSVP message */
132#define IP6OPT_RTALERT_ACTNET   2    /* contains an Active Networks msg */
133#define IP6OPT_MINLEN      2
129#define IP6OPT_RTALERT_LEN  4
130#define IP6OPT_RTALERT_MLD  0   /* Datagram contains an MLD message */
131#define IP6OPT_RTALERT_RSVP 1   /* Datagram contains an RSVP message */
132#define IP6OPT_RTALERT_ACTNET   2   /* contains an Active Networks msg */
133#define IP6OPT_MINLEN       2
134134
135#define IP6OPT_BINDING_UPDATE   0xc6   /* 11 0 00110 */
136#define IP6OPT_BINDING_ACK   0x07   /* 00 0 00111 */
137#define IP6OPT_BINDING_REQ   0x08   /* 00 0 01000 */
138#define IP6OPT_HOME_ADDRESS   0xc9   /* 11 0 01001 */
139#define IP6OPT_EID      0x8a   /* 10 0 01010 */
135#define IP6OPT_BINDING_UPDATE   0xc6    /* 11 0 00110 */
136#define IP6OPT_BINDING_ACK  0x07    /* 00 0 00111 */
137#define IP6OPT_BINDING_REQ  0x08    /* 00 0 01000 */
138#define IP6OPT_HOME_ADDRESS 0xc9    /* 11 0 01001 */
139#define IP6OPT_EID      0x8a    /* 10 0 01010 */
140140
141#define IP6OPT_TYPE(o)      ((o) & 0xC0)
142#define IP6OPT_TYPE_SKIP   0x00
143#define IP6OPT_TYPE_DISCARD   0x40
144#define IP6OPT_TYPE_FORCEICMP   0x80
145#define IP6OPT_TYPE_ICMP   0xC0
141#define IP6OPT_TYPE(o)      ((o) & 0xC0)
142#define IP6OPT_TYPE_SKIP    0x00
143#define IP6OPT_TYPE_DISCARD 0x40
144#define IP6OPT_TYPE_FORCEICMP   0x80
145#define IP6OPT_TYPE_ICMP    0xC0
146146
147#define IP6OPT_MUTABLE      0x20
147#define IP6OPT_MUTABLE      0x20
148148
149149
150150#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
151151#ifndef EAI_ADDRFAMILY
152152struct addrinfo {
153   int   ai_flags;   /* AI_PASSIVE, AI_CANONNAME */
154   int   ai_family;   /* PF_xxx */
155   int   ai_socktype;   /* SOCK_xxx */
156   int   ai_protocol;   /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
157   size_t   ai_addrlen;   /* length of ai_addr */
158   char   *ai_canonname;   /* canonical name for hostname */
159   struct sockaddr *ai_addr;   /* binary address */
160   struct addrinfo *ai_next;   /* next structure in linked list */
153   int ai_flags;   /* AI_PASSIVE, AI_CANONNAME */
154   int ai_family;  /* PF_xxx */
155   int ai_socktype;    /* SOCK_xxx */
156   int ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
157   size_t  ai_addrlen; /* length of ai_addr */
158   char    *ai_canonname;  /* canonical name for hostname */
159   struct sockaddr *ai_addr;   /* binary address */
160   struct addrinfo *ai_next;   /* next structure in linked list */
161161};
162162#endif
163163#endif /* __MINGW32__ */
trunk/src/lib/winpcap/pcap-bpf.h
r242066r242067
11/*-
22 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * This code is derived from the Stanford/CMU enet packet filter,
66 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
88 * Berkeley Laboratory.
99 *
1010 * Redistribution and use in source and binary forms, with or without
trunk/src/lib/winpcap/pcap-namedb.h
r242066r242067
11/*
22 * Copyright (c) 1994, 1996
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
r242066r242067
1212 *    documentation and/or other materials provided with the distribution.
1313 * 3. All advertising materials mentioning features or use of this software
1414 *    must display the following acknowledgement:
15 *   This product includes software developed by the Computer Systems
16 *   Engineering Group at Lawrence Berkeley Laboratory.
15 *  This product includes software developed by the Computer Systems
16 *  Engineering Group at Lawrence Berkeley Laboratory.
1717 * 4. Neither the name of the University nor of the Laboratory may be used
1818 *    to endorse or promote products derived from this software without
1919 *    specific prior written permission.
trunk/src/lib/winpcap/pcap-stdinc.h
r242066r242067
3939#endif
4040
4141/*
42 * Avoids a compiler warning in case this was already defined     
42 * Avoids a compiler warning in case this was already defined
4343 * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
4444 * to prevent it from including 'winsock.h')
4545 */
r242066r242067
6767#endif
6868
6969#if defined(_MSC_VER) && (_MSC_VER < 1700)
70#define inline __inline
70#define inline __inline
7171#endif
7272
7373#ifdef __MINGW32__
r242066r242067
9090typedef _W64 int   intptr_t;
9191#endif
9292#define _INTPTR_T_DEFINED
93#endif
93#endif
9494
9595#endif /*__MINGW32__*/
trunk/src/lib/winpcap/pcap.h
r242066r242067
11/*
22 * Copyright (c) 1993, 1994, 1995, 1996, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
r242066r242067
1212 *    documentation and/or other materials provided with the distribution.
1313 * 3. All advertising materials mentioning features or use of this software
1414 *    must display the following acknowledgement:
15 *   This product includes software developed by the Computer Systems
16 *   Engineering Group at Lawrence Berkeley Laboratory.
15 *  This product includes software developed by the Computer Systems
16 *  Engineering Group at Lawrence Berkeley Laboratory.
1717 * 4. Neither the name of the University nor of the Laboratory may be used
1818 *    to endorse or promote products derived from this software without
1919 *    specific prior written permission.
trunk/src/lib/winpcap/pcap/bluetooth.h
r242066r242067
1111 * 2. Redistributions in binary form must reproduce the above copyright
1212 * notice, this list of conditions and the following disclaimer in the
1313 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote
15 * products derived from this software without specific prior written
14 * 3. The name of the author may not be used to endorse or promote
15 * products derived from this software without specific prior written
1616 * permission.
1717 *
1818 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
r242066r242067
3232 *
3333 * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $
3434 */
35
35
3636#ifndef _PCAP_BLUETOOTH_STRUCTS_H__
3737#define _PCAP_BLUETOOTH_STRUCTS_H__
3838
trunk/src/lib/winpcap/pcap/bpf.h
r242066r242067
11/*-
22 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * This code is derived from the Stanford/CMU enet packet filter,
66 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
88 * Berkeley Laboratory.
99 *
1010 * Redistribution and use in source and binary forms, with or without
r242066r242067
6464typedef long          bpf_int32;
6565typedef unsigned long bpf_u_int32;
6666#else
67typedef   int bpf_int32;
68typedef   u_int bpf_u_int32;
67typedef int bpf_int32;
68typedef u_int bpf_u_int32;
6969#endif
7070
7171/*
72 * Alignment macros.  BPF_WORDALIGN rounds up to the next
73 * even multiple of BPF_ALIGNMENT.
72 * Alignment macros.  BPF_WORDALIGN rounds up to the next
73 * even multiple of BPF_ALIGNMENT.
7474 */
7575#ifndef __NetBSD__
7676#define BPF_ALIGNMENT sizeof(bpf_int32)
r242066r242067
8989   u_int bf_len;
9090   struct bpf_insn *bf_insns;
9191};
92
92
9393/*
94 * Struct return by BIOCVERSION.  This represents the version number of
94 * Struct return by BIOCVERSION.  This represents the version number of
9595 * the filter language described by the instruction encodings below.
9696 * bpf understands a program iff kernel_major == filter_major &&
9797 * kernel_minor >= filter_minor, that is, if the value returned by the
r242066r242067
125125 * These are the types that are the same on all platforms, and that
126126 * have been defined by <net/bpf.h> for ages.
127127 */
128#define DLT_NULL   0   /* BSD loopback encapsulation */
129#define DLT_EN10MB   1   /* Ethernet (10Mb) */
130#define DLT_EN3MB   2   /* Experimental Ethernet (3Mb) */
131#define DLT_AX25   3   /* Amateur Radio AX.25 */
132#define DLT_PRONET   4   /* Proteon ProNET Token Ring */
133#define DLT_CHAOS   5   /* Chaos */
134#define DLT_IEEE802   6   /* 802.5 Token Ring */
135#define DLT_ARCNET   7   /* ARCNET, with BSD-style header */
136#define DLT_SLIP   8   /* Serial Line IP */
137#define DLT_PPP      9   /* Point-to-point Protocol */
138#define DLT_FDDI   10   /* FDDI */
128#define DLT_NULL    0   /* BSD loopback encapsulation */
129#define DLT_EN10MB  1   /* Ethernet (10Mb) */
130#define DLT_EN3MB   2   /* Experimental Ethernet (3Mb) */
131#define DLT_AX25    3   /* Amateur Radio AX.25 */
132#define DLT_PRONET  4   /* Proteon ProNET Token Ring */
133#define DLT_CHAOS   5   /* Chaos */
134#define DLT_IEEE802 6   /* 802.5 Token Ring */
135#define DLT_ARCNET  7   /* ARCNET, with BSD-style header */
136#define DLT_SLIP    8   /* Serial Line IP */
137#define DLT_PPP     9   /* Point-to-point Protocol */
138#define DLT_FDDI    10  /* FDDI */
139139
140140/*
141141 * These are types that are different on some platforms, and that
r242066r242067
146146 * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
147147 * but I don't know what the right #define is for BSD/OS.
148148 */
149#define DLT_ATM_RFC1483   11   /* LLC-encapsulated ATM */
149#define DLT_ATM_RFC1483 11  /* LLC-encapsulated ATM */
150150
151151#ifdef __OpenBSD__
152#define DLT_RAW      14   /* raw IP */
152#define DLT_RAW     14  /* raw IP */
153153#else
154#define DLT_RAW      12   /* raw IP */
154#define DLT_RAW     12  /* raw IP */
155155#endif
156156
157157/*
r242066r242067
162162 */
163163#if defined(__NetBSD__) || defined(__FreeBSD__)
164164#ifndef DLT_SLIP_BSDOS
165#define DLT_SLIP_BSDOS   13   /* BSD/OS Serial Line IP */
166#define DLT_PPP_BSDOS   14   /* BSD/OS Point-to-point Protocol */
165#define DLT_SLIP_BSDOS  13  /* BSD/OS Serial Line IP */
166#define DLT_PPP_BSDOS   14  /* BSD/OS Point-to-point Protocol */
167167#endif
168168#else
169#define DLT_SLIP_BSDOS   15   /* BSD/OS Serial Line IP */
170#define DLT_PPP_BSDOS   16   /* BSD/OS Point-to-point Protocol */
169#define DLT_SLIP_BSDOS  15  /* BSD/OS Serial Line IP */
170#define DLT_PPP_BSDOS   16  /* BSD/OS Point-to-point Protocol */
171171#endif
172172
173173/*
r242066r242067
176176 * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
177177 */
178178
179#define DLT_ATM_CLIP   19   /* Linux Classical-IP over ATM */
179#define DLT_ATM_CLIP    19  /* Linux Classical-IP over ATM */
180180
181181/*
182182 * Apparently Redback uses this for its SmartEdge 400/800.  I hope
183183 * nobody else decided to use it, too.
184184 */
185#define DLT_REDBACK_SMARTEDGE   32
185#define DLT_REDBACK_SMARTEDGE   32
186186
187187/*
188188 * These values are defined by NetBSD; other platforms should refrain from
189189 * using them for other purposes, so that NetBSD savefiles with link
190190 * types of 50 or 51 can be read as this type on all platforms.
191191 */
192#define DLT_PPP_SERIAL   50   /* PPP over serial with HDLC encapsulation */
193#define DLT_PPP_ETHER   51   /* PPP over Ethernet */
192#define DLT_PPP_SERIAL  50  /* PPP over serial with HDLC encapsulation */
193#define DLT_PPP_ETHER   51  /* PPP over Ethernet */
194194
195195/*
196196 * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
r242066r242067
199199 * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
200200 * I've seen.
201201 */
202#define DLT_SYMANTEC_FIREWALL   99
202#define DLT_SYMANTEC_FIREWALL   99
203203
204204/*
205205 * Values between 100 and 103 are used in capture file headers as
r242066r242067
221221 * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
222222 * for source compatibility with programs written for libpcap 0.5.
223223 */
224#define DLT_C_HDLC   104   /* Cisco HDLC */
225#define DLT_CHDLC   DLT_C_HDLC
224#define DLT_C_HDLC  104 /* Cisco HDLC */
225#define DLT_CHDLC   DLT_C_HDLC
226226
227#define DLT_IEEE802_11   105   /* IEEE 802.11 wireless */
227#define DLT_IEEE802_11  105 /* IEEE 802.11 wireless */
228228
229229/*
230230 * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
r242066r242067
239239 * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
240240 * (DLCI, etc.).
241241 */
242#define DLT_FRELAY   107
242#define DLT_FRELAY  107
243243
244244/*
245245 * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
r242066r242067
249249 * we don't use 12 for it in OSes other than OpenBSD.
250250 */
251251#ifdef __OpenBSD__
252#define DLT_LOOP   12
252#define DLT_LOOP    12
253253#else
254#define DLT_LOOP   108
254#define DLT_LOOP    108
255255#endif
256256
257257/*
r242066r242067
260260 * than OpenBSD.
261261 */
262262#ifdef __OpenBSD__
263#define DLT_ENC      13
263#define DLT_ENC     13
264264#else
265#define DLT_ENC      109
265#define DLT_ENC     109
266266#endif
267267
268268/*
r242066r242067
275275/*
276276 * This is for Linux cooked sockets.
277277 */
278#define DLT_LINUX_SLL   113
278#define DLT_LINUX_SLL   113
279279
280280/*
281281 * Apple LocalTalk hardware.
282282 */
283#define DLT_LTALK   114
283#define DLT_LTALK   114
284284
285285/*
286286 * Acorn Econet.
287287 */
288#define DLT_ECONET   115
288#define DLT_ECONET  115
289289
290290/*
291291 * Reserved for use with OpenBSD ipfilter.
292292 */
293#define DLT_IPFILTER   116
293#define DLT_IPFILTER    116
294294
295295/*
296296 * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
r242066r242067
299299 * XXX: is there a conflict with DLT_PFSYNC 18 as well?
300300 */
301301#ifdef __OpenBSD__
302#define DLT_OLD_PFLOG   17
303#define DLT_PFSYNC   18
302#define DLT_OLD_PFLOG   17
303#define DLT_PFSYNC  18
304304#endif
305#define DLT_PFLOG   117
305#define DLT_PFLOG   117
306306
307307/*
308308 * Registered for Cisco-internal use.
309309 */
310#define DLT_CISCO_IOS   118
310#define DLT_CISCO_IOS   118
311311
312312/*
313313 * For 802.11 cards using the Prism II chips, with a link-layer
314314 * header including Prism monitor mode information plus an 802.11
315315 * header.
316316 */
317#define DLT_PRISM_HEADER   119
317#define DLT_PRISM_HEADER    119
318318
319319/*
320320 * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
321321 * (see Doug Ambrisko's FreeBSD patches).
322322 */
323#define DLT_AIRONET_HEADER   120
323#define DLT_AIRONET_HEADER  120
324324
325325/*
326326 * Reserved for Siemens HiPath HDLC.
327327 */
328#define DLT_HHDLC      121
328#define DLT_HHDLC       121
329329
330330/*
331331 * This is for RFC 2625 IP-over-Fibre Channel.
r242066r242067
335335 * where the link-layer header starts with an RFC 2625 Network_Header
336336 * field.
337337 */
338#define DLT_IP_OVER_FC      122
338#define DLT_IP_OVER_FC      122
339339
340340/*
341341 * This is for Full Frontal ATM on Solaris with SunATM, with a
r242066r242067
351351 * and the like don't have to infer the presence or absence of a
352352 * pseudo-header and the form of the pseudo-header.
353353 */
354#define DLT_SUNATM      123   /* Solaris+SunATM */
354#define DLT_SUNATM      123 /* Solaris+SunATM */
355355
356/*
356/*
357357 * Reserved as per request from Kent Dahlgren <kent@praesum.com>
358358 * for private use.
359359 */
r242066r242067
366366 * including radio information, used by some recent BSD drivers as
367367 * well as the madwifi Atheros driver for Linux.
368368 */
369#define DLT_IEEE802_11_RADIO   127   /* 802.11 plus radiotap radio header */
369#define DLT_IEEE802_11_RADIO    127 /* 802.11 plus radiotap radio header */
370370
371371/*
372372 * Reserved for the TZSP encapsulation, as per request from
r242066r242067
389389 *
390390 * We therefore have to have separate DLT_ values for them.
391391 */
392#define DLT_ARCNET_LINUX   129   /* ARCNET */
392#define DLT_ARCNET_LINUX    129 /* ARCNET */
393393
394394/*
395395 * Juniper-private data link types, as per request from
r242066r242067
411411 * <dieter@apple.com>.  The header that's presented is an Ethernet-like
412412 * header:
413413 *
414 *   #define FIREWIRE_EUI64_LEN   8
415 *   struct firewire_header {
416 *      u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
417 *      u_char  firewire_shost[FIREWIRE_EUI64_LEN];
418 *      u_short firewire_type;
419 *   };
414 *  #define FIREWIRE_EUI64_LEN  8
415 *  struct firewire_header {
416 *      u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
417 *      u_char  firewire_shost[FIREWIRE_EUI64_LEN];
418 *      u_short firewire_type;
419 *  };
420420 *
421421 * with "firewire_type" being an Ethernet type value, rather than,
422422 * for example, raw GASP frames being handed up.
423423 */
424#define DLT_APPLE_IP_OVER_IEEE1394   138
424#define DLT_APPLE_IP_OVER_IEEE1394  138
425425
426426/*
427427 * Various SS7 encapsulations, as per a request from Jeff Morriss
428428 * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
429429 */
430#define DLT_MTP2_WITH_PHDR   139   /* pseudo-header with various info, followed by MTP2 */
431#define DLT_MTP2      140   /* MTP2, without pseudo-header */
432#define DLT_MTP3      141   /* MTP3, without pseudo-header or MTP2 */
433#define DLT_SCCP      142   /* SCCP, without pseudo-header or MTP2 or MTP3 */
430#define DLT_MTP2_WITH_PHDR  139 /* pseudo-header with various info, followed by MTP2 */
431#define DLT_MTP2        140 /* MTP2, without pseudo-header */
432#define DLT_MTP3        141 /* MTP3, without pseudo-header or MTP2 */
433#define DLT_SCCP        142 /* SCCP, without pseudo-header or MTP2 or MTP3 */
434434
435435/*
436436 * DOCSIS MAC frames.
437437 */
438#define DLT_DOCSIS      143
438#define DLT_DOCSIS      143
439439
440440/*
441441 * Linux-IrDA packets. Protocol defined at http://www.irda.org.
r242066r242067
452452 * issue and define a real DLT_IRDA...
453453 * Jean II
454454 */
455#define DLT_LINUX_IRDA      144
455#define DLT_LINUX_IRDA      144
456456
457457/*
458458 * Reserved for IBM SP switch and IBM Next Federation switch.
459459 */
460#define DLT_IBM_SP      145
461#define DLT_IBM_SN      146
460#define DLT_IBM_SP      145
461#define DLT_IBM_SN      146
462462
463463/*
464464 * Reserved for private use.  If you have some link-layer header type
r242066r242067
485485 * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
486486 * as per the comment above, and use the type you're given.
487487 */
488#define DLT_USER0      147
489#define DLT_USER1      148
490#define DLT_USER2      149
491#define DLT_USER3      150
492#define DLT_USER4      151
493#define DLT_USER5      152
494#define DLT_USER6      153
495#define DLT_USER7      154
496#define DLT_USER8      155
497#define DLT_USER9      156
498#define DLT_USER10      157
499#define DLT_USER11      158
500#define DLT_USER12      159
501#define DLT_USER13      160
502#define DLT_USER14      161
503#define DLT_USER15      162
488#define DLT_USER0       147
489#define DLT_USER1       148
490#define DLT_USER2       149
491#define DLT_USER3       150
492#define DLT_USER4       151
493#define DLT_USER5       152
494#define DLT_USER6       153
495#define DLT_USER7       154
496#define DLT_USER8       155
497#define DLT_USER9       156
498#define DLT_USER10      157
499#define DLT_USER11      158
500#define DLT_USER12      159
501#define DLT_USER13      160
502#define DLT_USER14      161
503#define DLT_USER15      162
504504
505505/*
506506 * For future use with 802.11 captures - defined by AbsoluteValue
507507 * Systems to store a number of bits of link-layer information
508508 * including radio information:
509509 *
510 *   http://www.shaftnet.org/~pizza/software/capturefrm.txt
510 *  http://www.shaftnet.org/~pizza/software/capturefrm.txt
511511 *
512512 * but it might be used by some non-AVS drivers now or in the
513513 * future.
514514 */
515#define DLT_IEEE802_11_RADIO_AVS 163   /* 802.11 plus AVS radio header */
515#define DLT_IEEE802_11_RADIO_AVS 163    /* 802.11 plus AVS radio header */
516516
517517/*
518518 * Juniper-private data link type, as per request from
r242066r242067
525525/*
526526 * Reserved for BACnet MS/TP.
527527 */
528#define DLT_BACNET_MS_TP   165
528#define DLT_BACNET_MS_TP    165
529529
530530/*
531531 * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
r242066r242067
541541 * The first byte of the PPP header (0xff03) is modified to accomodate
542542 * the direction - 0x00 = IN, 0x01 = OUT.
543543 */
544#define DLT_PPP_PPPD      166
544#define DLT_PPP_PPPD        166
545545
546546/*
547547 * Names for backwards compatibility with older versions of some PPP
548548 * software; new software should use DLT_PPP_PPPD.
549549 */
550#define DLT_PPP_WITH_DIRECTION   DLT_PPP_PPPD
551#define DLT_LINUX_PPP_WITHDIRECTION   DLT_PPP_PPPD
550#define DLT_PPP_WITH_DIRECTION  DLT_PPP_PPPD
551#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD
552552
553553/*
554554 * Juniper-private data link type, as per request from
r242066r242067
559559#define DLT_JUNIPER_PPPOE       167
560560#define DLT_JUNIPER_PPPOE_ATM   168
561561
562#define DLT_GPRS_LLC      169   /* GPRS LLC */
563#define DLT_GPF_T      170   /* GPF-T (ITU-T G.7041/Y.1303) */
564#define DLT_GPF_F      171   /* GPF-F (ITU-T G.7041/Y.1303) */
562#define DLT_GPRS_LLC        169 /* GPRS LLC */
563#define DLT_GPF_T       170 /* GPF-T (ITU-T G.7041/Y.1303) */
564#define DLT_GPF_F       171 /* GPF-F (ITU-T G.7041/Y.1303) */
565565
566566/*
567567 * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
568568 * monitoring equipment.
569569 */
570#define DLT_GCOM_T1E1      172
571#define DLT_GCOM_SERIAL      173
570#define DLT_GCOM_T1E1       172
571#define DLT_GCOM_SERIAL     173
572572
573573/*
574574 * Juniper-private data link type, as per request from
r242066r242067
583583 * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
584584 * the link-layer header.
585585 */
586#define DLT_ERF_ETH      175   /* Ethernet */
587#define DLT_ERF_POS      176   /* Packet-over-SONET */
586#define DLT_ERF_ETH     175 /* Ethernet */
587#define DLT_ERF_POS     176 /* Packet-over-SONET */
588588
589589/*
590590 * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
r242066r242067
592592 * includes additional information before the LAPD header, so it's
593593 * not necessarily a generic LAPD header.
594594 */
595#define DLT_LINUX_LAPD      177
595#define DLT_LINUX_LAPD      177
596596
597597/*
598598 * Juniper-private data link type, as per request from
599 * Hannes Gredler <hannes@juniper.net>.
599 * Hannes Gredler <hannes@juniper.net>.
600600 * The DLT_ are used for prepending meta-information
601601 * like interface index, interface name
602602 * before standard Ethernet, PPP, Frelay & C-HDLC Frames
r242066r242067
613613
614614/*
615615 * Juniper-private data link type, as per request from
616 * Hannes Gredler <hannes@juniper.net>.
616 * Hannes Gredler <hannes@juniper.net>.
617617 * The DLT_ is used for internal communication with a
618618 * voice Adapter Card (PIC)
619619 */
r242066r242067
639639 * USB packets, beginning with a USB setup header; requested by
640640 * Paolo Abeni <paolo.abeni@email.it>.
641641 */
642#define DLT_USB         186
642#define DLT_USB         186
643643
644644/*
645645 * Bluetooth HCI UART transport layer (part H:4); requested by
646646 * Paolo Abeni.
647647 */
648#define DLT_BLUETOOTH_HCI_H4   187
648#define DLT_BLUETOOTH_HCI_H4    187
649649
650650/*
651651 * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
652652 * <cruz_petagay@bah.com>.
653653 */
654#define DLT_IEEE802_16_MAC_CPS   188
654#define DLT_IEEE802_16_MAC_CPS  188
655655
656656/*
657657 * USB packets, beginning with a Linux USB header; requested by
658658 * Paolo Abeni <paolo.abeni@email.it>.
659659 */
660#define DLT_USB_LINUX      189
660#define DLT_USB_LINUX       189
661661
662662/*
663663 * Controller Area Network (CAN) v. 2.0B packets.
r242066r242067
672672 * IEEE 802.15.4, with address fields padded, as is done by Linux
673673 * drivers; requested by Juergen Schimmer.
674674 */
675#define DLT_IEEE802_15_4_LINUX   191
675#define DLT_IEEE802_15_4_LINUX  191
676676
677677/*
678678 * Per Packet Information encapsulated packets.
679679 * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
680680 */
681#define DLT_PPI         192
681#define DLT_PPI         192
682682
683683/*
684684 * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
685685 * requested by Charles Clancy.
686686 */
687#define DLT_IEEE802_16_MAC_CPS_RADIO   193
687#define DLT_IEEE802_16_MAC_CPS_RADIO    193
688688
689689/*
690690 * Juniper-private data link type, as per request from
691 * Hannes Gredler <hannes@juniper.net>.
691 * Hannes Gredler <hannes@juniper.net>.
692692 * The DLT_ is used for internal communication with a
693693 * integrated service module (ISM).
694694 */
r242066r242067
698698 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
699699 * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
700700 */
701#define DLT_IEEE802_15_4   195
701#define DLT_IEEE802_15_4    195
702702
703703/*
704704 * Various link-layer types, with a pseudo-header, for SITA
705705 * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
706706 */
707#define DLT_SITA      196
707#define DLT_SITA        196
708708
709709/*
710710 * Various link-layer types, with a pseudo-header, for Endace DAG cards;
711711 * encapsulates Endace ERF records.  Requested by Stephen Donnelly
712712 * <stephen@endace.com>.
713713 */
714#define DLT_ERF         197
714#define DLT_ERF         197
715715
716716/*
717717 * Special header prepended to Ethernet packets when capturing from a
718718 * u10 Networks board.  Requested by Phil Mulholland
719719 * <phil@u10networks.com>.
720720 */
721#define DLT_RAIF1      198
721#define DLT_RAIF1       198
722722
723723/*
724724 * IPMB packet for IPMI, beginning with the I2C slave address, followed
725725 * by the netFn and LUN, etc..  Requested by Chanthy Toeung
726726 * <chanthy.toeung@ca.kontron.com>.
727727 */
728#define DLT_IPMB      199
728#define DLT_IPMB        199
729729
730730/*
731731 * Juniper-private data link type, as per request from
732 * Hannes Gredler <hannes@juniper.net>.
732 * Hannes Gredler <hannes@juniper.net>.
733733 * The DLT_ is used for capturing data on a secure tunnel interface.
734734 */
735735#define DLT_JUNIPER_ST          200
r242066r242067
738738 * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
739739 * that includes direction information; requested by Paolo Abeni.
740740 */
741#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR   201
741#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR  201
742742
743743/*
744744 * AX.25 packet with a 1-byte KISS header; see
745745 *
746 *   http://www.ax25.net/kiss.htm
746 *  http://www.ax25.net/kiss.htm
747747 *
748748 * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
749749 */
750#define DLT_AX25_KISS      202
750#define DLT_AX25_KISS       202
751751
752752/*
753753 * LAPD packets from an ISDN channel, starting with the address field,
754754 * with no pseudo-header.
755755 * Requested by Varuna De Silva <varunax@gmail.com>.
756756 */
757#define DLT_LAPD      203
757#define DLT_LAPD        203
758758
759759/*
760760 * Variants of various link-layer headers, with a one-byte direction
r242066r242067
762762 * non-zero (any non-zero value) means "sent by this host" - as per
763763 * Will Barker <w.barker@zen.co.uk>.
764764 */
765#define DLT_PPP_WITH_DIR   204   /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
766#define DLT_C_HDLC_WITH_DIR   205   /* Cisco HDLC */
767#define DLT_FRELAY_WITH_DIR   206   /* Frame Relay */
768#define DLT_LAPB_WITH_DIR   207   /* LAPB */
765#define DLT_PPP_WITH_DIR    204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
766#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
767#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */
768#define DLT_LAPB_WITH_DIR   207 /* LAPB */
769769
770770/*
771771 * 208 is reserved for an as-yet-unspecified proprietary link-layer
r242066r242067
776776 * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
777777 * <avn@pigeonpoint.com>.
778778 */
779#define DLT_IPMB_LINUX      209
779#define DLT_IPMB_LINUX      209
780780
781781/*
782782 * FlexRay automotive bus - http://www.flexray.com/ - as requested
783783 * by Hannes Kaelber <hannes.kaelber@x2e.de>.
784784 */
785#define DLT_FLEXRAY      210
785#define DLT_FLEXRAY     210
786786
787787/*
788788 * Media Oriented Systems Transport (MOST) bus for multimedia
789789 * transport - http://www.mostcooperation.com/ - as requested
790790 * by Hannes Kaelber <hannes.kaelber@x2e.de>.
791791 */
792#define DLT_MOST      211
792#define DLT_MOST        211
793793
794794/*
795795 * Local Interconnect Network (LIN) bus for vehicle networks -
796796 * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
797797 * <hannes.kaelber@x2e.de>.
798798 */
799#define DLT_LIN         212
799#define DLT_LIN         212
800800
801801/*
802802 * X2E-private data link type used for serial line capture,
803803 * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
804804 */
805#define DLT_X2E_SERIAL      213
805#define DLT_X2E_SERIAL      213
806806
807807/*
808808 * X2E-private data link type used for the Xoraya data logger
809809 * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
810810 */
811#define DLT_X2E_XORAYA      214
811#define DLT_X2E_XORAYA      214
812812
813813/*
814814 * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
r242066r242067
819819 *
820820 * Requested by Max Filippov <jcmvbkbc@gmail.com>.
821821 */
822#define DLT_IEEE802_15_4_NONASK_PHY   215
822#define DLT_IEEE802_15_4_NONASK_PHY 215
823823
824824
825825/*
r242066r242067
827827 * a member of that class.  A class value of 0 indicates a regular
828828 * DLT_/LINKTYPE_ value.
829829 */
830#define DLT_CLASS(x)      ((x) & 0x03ff0000)
830#define DLT_CLASS(x)        ((x) & 0x03ff0000)
831831
832832/*
833833 * NetBSD-specific generic "raw" link type.  The class value indicates
r242066r242067
836836 * do not assume that they correspond to AF_ values for your operating
837837 * system.
838838 */
839#define   DLT_CLASS_NETBSD_RAWAF   0x02240000
840#define   DLT_NETBSD_RAWAF(af)   (DLT_CLASS_NETBSD_RAWAF | (af))
841#define   DLT_NETBSD_RAWAF_AF(x)   ((x) & 0x0000ffff)
842#define   DLT_IS_NETBSD_RAWAF(x)   (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
839#define DLT_CLASS_NETBSD_RAWAF  0x02240000
840#define DLT_NETBSD_RAWAF(af)    (DLT_CLASS_NETBSD_RAWAF | (af))
841#define DLT_NETBSD_RAWAF_AF(x)  ((x) & 0x0000ffff)
842#define DLT_IS_NETBSD_RAWAF(x)  (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
843843
844844
845845/*
r242066r242067
847847 */
848848/* instruction classes */
849849#define BPF_CLASS(code) ((code) & 0x07)
850#define      BPF_LD      0x00
851#define      BPF_LDX      0x01
852#define      BPF_ST      0x02
853#define      BPF_STX      0x03
854#define      BPF_ALU      0x04
855#define      BPF_JMP      0x05
856#define      BPF_RET      0x06
857#define      BPF_MISC   0x07
850#define     BPF_LD      0x00
851#define     BPF_LDX     0x01
852#define     BPF_ST      0x02
853#define     BPF_STX     0x03
854#define     BPF_ALU     0x04
855#define     BPF_JMP     0x05
856#define     BPF_RET     0x06
857#define     BPF_MISC    0x07
858858
859859/* ld/ldx fields */
860#define BPF_SIZE(code)   ((code) & 0x18)
861#define      BPF_W      0x00
862#define      BPF_H      0x08
863#define      BPF_B      0x10
864#define BPF_MODE(code)   ((code) & 0xe0)
865#define      BPF_IMM    0x00
866#define      BPF_ABS      0x20
867#define      BPF_IND      0x40
868#define      BPF_MEM      0x60
869#define      BPF_LEN      0x80
870#define      BPF_MSH      0xa0
860#define BPF_SIZE(code)  ((code) & 0x18)
861#define     BPF_W       0x00
862#define     BPF_H       0x08
863#define     BPF_B       0x10
864#define BPF_MODE(code)  ((code) & 0xe0)
865#define     BPF_IMM     0x00
866#define     BPF_ABS     0x20
867#define     BPF_IND     0x40
868#define     BPF_MEM     0x60
869#define     BPF_LEN     0x80
870#define     BPF_MSH     0xa0
871871
872872/* alu/jmp fields */
873#define BPF_OP(code)   ((code) & 0xf0)
874#define      BPF_ADD      0x00
875#define      BPF_SUB      0x10
876#define      BPF_MUL      0x20
877#define      BPF_DIV      0x30
878#define      BPF_OR      0x40
879#define      BPF_AND      0x50
880#define      BPF_LSH      0x60
881#define      BPF_RSH      0x70
882#define      BPF_NEG      0x80
883#define      BPF_JA      0x00
884#define      BPF_JEQ      0x10
885#define      BPF_JGT      0x20
886#define      BPF_JGE      0x30
887#define      BPF_JSET   0x40
888#define BPF_SRC(code)   ((code) & 0x08)
889#define      BPF_K      0x00
890#define      BPF_X      0x08
873#define BPF_OP(code)    ((code) & 0xf0)
874#define     BPF_ADD     0x00
875#define     BPF_SUB     0x10
876#define     BPF_MUL     0x20
877#define     BPF_DIV     0x30
878#define     BPF_OR      0x40
879#define     BPF_AND     0x50
880#define     BPF_LSH     0x60
881#define     BPF_RSH     0x70
882#define     BPF_NEG     0x80
883#define     BPF_JA      0x00
884#define     BPF_JEQ     0x10
885#define     BPF_JGT     0x20
886#define     BPF_JGE     0x30
887#define     BPF_JSET    0x40
888#define BPF_SRC(code)   ((code) & 0x08)
889#define     BPF_K       0x00
890#define     BPF_X       0x08
891891
892892/* ret - BPF_K and BPF_X also apply */
893#define BPF_RVAL(code)   ((code) & 0x18)
894#define      BPF_A      0x10
893#define BPF_RVAL(code)  ((code) & 0x18)
894#define     BPF_A       0x10
895895
896896/* misc */
897897#define BPF_MISCOP(code) ((code) & 0xf8)
898#define      BPF_TAX      0x00
899#define      BPF_TXA      0x80
898#define     BPF_TAX     0x00
899#define     BPF_TXA     0x80
900900
901901/*
902902 * The instruction data structure.
903903 */
904904struct bpf_insn {
905   u_short   code;
906   u_char    jt;
907   u_char    jf;
905   u_short code;
906   u_char  jt;
907   u_char  jf;
908908   bpf_u_int32 k;
909909};
910910
trunk/src/lib/winpcap/pcap/namedb.h
r242066r242067
11/*
22 * Copyright (c) 1994, 1996
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
r242066r242067
1212 *    documentation and/or other materials provided with the distribution.
1313 * 3. All advertising materials mentioning features or use of this software
1414 *    must display the following acknowledgement:
15 *   This product includes software developed by the Computer Systems
16 *   Engineering Group at Lawrence Berkeley Laboratory.
15 *  This product includes software developed by the Computer Systems
16 *  Engineering Group at Lawrence Berkeley Laboratory.
1717 * 4. Neither the name of the University nor of the Laboratory may be used
1818 *    to endorse or promote products derived from this software without
1919 *    specific prior written permission.
r242066r242067
5454#ifndef PCAP_ETHERS_FILE
5555#define PCAP_ETHERS_FILE "/etc/ethers"
5656#endif
57struct   pcap_etherent *pcap_next_etherent(FILE *);
57struct  pcap_etherent *pcap_next_etherent(FILE *);
5858u_char *pcap_ether_hostton(const char*);
5959u_char *pcap_ether_aton(const char *);
6060
r242066r242067
6464#endif
6565bpf_u_int32 pcap_nametonetaddr(const char *);
6666
67int   pcap_nametoport(const char *, int *, int *);
68int   pcap_nametoportrange(const char *, int *, int *, int *);
69int   pcap_nametoproto(const char *);
70int   pcap_nametoeproto(const char *);
71int   pcap_nametollc(const char *);
67int pcap_nametoport(const char *, int *, int *);
68int pcap_nametoportrange(const char *, int *, int *, int *);
69int pcap_nametoproto(const char *);
70int pcap_nametoeproto(const char *);
71int pcap_nametollc(const char *);
7272/*
7373 * If a protocol is unknown, PROTO_UNDEF is returned.
7474 * Also, pcap_nametoport() returns the protocol along with the port number.
7575 * If there are ambiguous entried in /etc/services (i.e. domain
7676 * can be either tcp or udp) PROTO_UNDEF is returned.
7777 */
78#define PROTO_UNDEF      -1
78#define PROTO_UNDEF     -1
7979
8080/* XXX move these to pcap-int.h? */
8181int __pcap_atodn(const char *, bpf_u_int32 *);
8282int __pcap_atoin(const char *, bpf_u_int32 *);
83u_short   __pcap_nametodnaddr(const char *);
83u_short __pcap_nametodnaddr(const char *);
8484
8585#ifdef __cplusplus
8686}
trunk/src/lib/winpcap/pcap/pcap.h
r242066r242067
11/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
22/*
33 * Copyright (c) 1993, 1994, 1995, 1996, 1997
4 *   The Regents of the University of California.  All rights reserved.
4 *  The Regents of the University of California.  All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without
77 * modification, are permitted provided that the following conditions
r242066r242067
1313 *    documentation and/or other materials provided with the distribution.
1414 * 3. All advertising materials mentioning features or use of this software
1515 *    must display the following acknowledgement:
16 *   This product includes software developed by the Computer Systems
17 *   Engineering Group at Lawrence Berkeley Laboratory.
16 *  This product includes software developed by the Computer Systems
17 *  Engineering Group at Lawrence Berkeley Laboratory.
1818 * 4. Neither the name of the University nor of the Laboratory may be used
1919 *    to endorse or promote products derived from this software without
2020 *    specific prior written permission.
r242066r242067
3838#define lib_pcap_pcap_h
3939
4040#if defined(WIN32)
41  #include <pcap-stdinc.h>
41   #include <pcap-stdinc.h>
4242#elif defined(MSDOS)
43  #include <sys/types.h>
44  #include <sys/socket.h>  /* u_int, u_char etc. */
43   #include <sys/types.h>
44   #include <sys/socket.h>  /* u_int, u_char etc. */
4545#else /* UN*X */
46  #include <sys/types.h>
47  #include <sys/time.h>
46   #include <sys/types.h>
47   #include <sys/time.h>
4848#endif /* WIN32/MSDOS/UN*X */
4949
5050#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
r242066r242067
8080 * predates the bpf typedefs for 64-bit support.
8181 */
8282#if BPF_RELEASE - 0 < 199406
83typedef   int bpf_int32;
84typedef   u_int bpf_u_int32;
83typedef int bpf_int32;
84typedef u_int bpf_u_int32;
8585#endif
8686
8787typedef struct pcap pcap_t;
r242066r242067
105105 *
106106 * Instead:
107107 *
108 *   introduce a new structure for the new format, if the layout
109 *   of the structure changed;
108 *  introduce a new structure for the new format, if the layout
109 *  of the structure changed;
110110 *
111 *   send mail to "tcpdump-workers@lists.tcpdump.org", requesting
112 *   a new magic number for your new capture file format, and, when
113 *   you get the new magic number, put it in "savefile.c";
111 *  send mail to "tcpdump-workers@lists.tcpdump.org", requesting
112 *  a new magic number for your new capture file format, and, when
113 *  you get the new magic number, put it in "savefile.c";
114114 *
115 *   use that magic number for save files with the changed file
116 *   header;
115 *  use that magic number for save files with the changed file
116 *  header;
117117 *
118 *   make the code in "savefile.c" capable of reading files with
119 *   the old file header as well as files with the new file header
120 *   (using the magic number to determine the header format).
118 *  make the code in "savefile.c" capable of reading files with
119 *  the old file header as well as files with the new file header
120 *  (using the magic number to determine the header format).
121121 *
122122 * Then supply the changes as a patch at
123123 *
124 *   http://sourceforge.net/projects/libpcap/
124 *  http://sourceforge.net/projects/libpcap/
125125 *
126126 * so that future versions of libpcap and programs that use it (such as
127127 * tcpdump) will be able to read your new capture file format.
r242066r242067
130130   bpf_u_int32 magic;
131131   u_short version_major;
132132   u_short version_minor;
133   bpf_int32 thiszone;   /* gmt to local correction */
134   bpf_u_int32 sigfigs;   /* accuracy of timestamps */
135   bpf_u_int32 snaplen;   /* max length saved portion of each pkt */
136   bpf_u_int32 linktype;   /* data link type (LINKTYPE_*) */
133   bpf_int32 thiszone; /* gmt to local correction */
134   bpf_u_int32 sigfigs;    /* accuracy of timestamps */
135   bpf_u_int32 snaplen;    /* max length saved portion of each pkt */
136   bpf_u_int32 linktype;   /* data link type (LINKTYPE_*) */
137137};
138138
139139/*
140140 * Macros for the value returned by pcap_datalink_ext().
141 *
141 *
142142 * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro
143143 * gives the FCS length of packets in the capture.
144144 */
145#define LT_FCS_LENGTH_PRESENT(x)   ((x) & 0x04000000)
146#define LT_FCS_LENGTH(x)      (((x) & 0xF0000000) >> 28)
147#define LT_FCS_DATALINK_EXT(x)      ((((x) & 0xF) << 28) | 0x04000000)
145#define LT_FCS_LENGTH_PRESENT(x)    ((x) & 0x04000000)
146#define LT_FCS_LENGTH(x)        (((x) & 0xF0000000) >> 28)
147#define LT_FCS_DATALINK_EXT(x)      ((((x) & 0xF) << 28) | 0x04000000)
148148
149149typedef enum {
150       PCAP_D_INOUT = 0,
151       PCAP_D_IN,
152       PCAP_D_OUT
150      PCAP_D_INOUT = 0,
151      PCAP_D_IN,
152      PCAP_D_OUT
153153} pcap_direction_t;
154154
155155/*
r242066r242067
165165 * that's not what the underlying packet capture mechanism supplies.
166166 */
167167struct pcap_pkthdr {
168   struct timeval ts;   /* time stamp */
169   bpf_u_int32 caplen;   /* length of portion present */
170   bpf_u_int32 len;   /* length this packet (off wire) */
168   struct timeval ts;  /* time stamp */
169   bpf_u_int32 caplen; /* length of portion present */
170   bpf_u_int32 len;    /* length this packet (off wire) */
171171};
172172
173173/*
174174 * As returned by the pcap_stats()
175175 */
176176struct pcap_stat {
177   u_int ps_recv;      /* number of packets received */
178   u_int ps_drop;      /* number of packets dropped */
179   u_int ps_ifdrop;   /* drops by interface XXX not yet supported */
177   u_int ps_recv;      /* number of packets received */
178   u_int ps_drop;      /* number of packets dropped */
179   u_int ps_ifdrop;    /* drops by interface XXX not yet supported */
180180#ifdef HAVE_REMOTE
181   u_int ps_capt;      /* number of packets that are received by the application; please get rid off the Win32 ifdef */
182   u_int ps_sent;      /* number of packets sent by the server on the network */
183   u_int ps_netdrop;   /* number of packets lost on the network */
181   u_int ps_capt;      /* number of packets that are received by the application; please get rid off the Win32 ifdef */
182   u_int ps_sent;      /* number of packets sent by the server on the network */
183   u_int ps_netdrop;   /* number of packets lost on the network */
184184#endif /* HAVE_REMOTE */
185185};
186186
r242066r242067
189189 * As returned by the pcap_stats_ex()
190190 */
191191struct pcap_stat_ex {
192       u_long  rx_packets;        /* total packets received       */
193       u_long  tx_packets;        /* total packets transmitted    */
194       u_long  rx_bytes;          /* total bytes received         */
195       u_long  tx_bytes;          /* total bytes transmitted      */
196       u_long  rx_errors;         /* bad packets received         */
197       u_long  tx_errors;         /* packet transmit problems     */
198       u_long  rx_dropped;        /* no space in Rx buffers       */
199       u_long  tx_dropped;        /* no space available for Tx    */
200       u_long  multicast;         /* multicast packets received   */
201       u_long  collisions;
192      u_long  rx_packets;        /* total packets received       */
193      u_long  tx_packets;        /* total packets transmitted    */
194      u_long  rx_bytes;          /* total bytes received         */
195      u_long  tx_bytes;          /* total bytes transmitted      */
196      u_long  rx_errors;         /* bad packets received         */
197      u_long  tx_errors;         /* packet transmit problems     */
198      u_long  rx_dropped;        /* no space in Rx buffers       */
199      u_long  tx_dropped;        /* no space available for Tx    */
200      u_long  multicast;         /* multicast packets received   */
201      u_long  collisions;
202202
203       /* detailed rx_errors: */
204       u_long  rx_length_errors;
205       u_long  rx_over_errors;    /* receiver ring buff overflow  */
206       u_long  rx_crc_errors;     /* recv'd pkt with crc error    */
207       u_long  rx_frame_errors;   /* recv'd frame alignment error */
208       u_long  rx_fifo_errors;    /* recv'r fifo overrun          */
209       u_long  rx_missed_errors;  /* recv'r missed packet         */
203      /* detailed rx_errors: */
204      u_long  rx_length_errors;
205      u_long  rx_over_errors;    /* receiver ring buff overflow  */
206      u_long  rx_crc_errors;     /* recv'd pkt with crc error    */
207      u_long  rx_frame_errors;   /* recv'd frame alignment error */
208      u_long  rx_fifo_errors;    /* recv'r fifo overrun          */
209      u_long  rx_missed_errors;  /* recv'r missed packet         */
210210
211       /* detailed tx_errors */
212       u_long  tx_aborted_errors;
213       u_long  tx_carrier_errors;
214       u_long  tx_fifo_errors;
215       u_long  tx_heartbeat_errors;
216       u_long  tx_window_errors;
217     };
211      /* detailed tx_errors */
212      u_long  tx_aborted_errors;
213      u_long  tx_carrier_errors;
214      u_long  tx_fifo_errors;
215      u_long  tx_heartbeat_errors;
216      u_long  tx_window_errors;
217      };
218218#endif
219219
220220/*
r242066r242067
222222 */
223223struct pcap_if {
224224   struct pcap_if *next;
225   char *name;      /* name to hand to "pcap_open_live()" */
226   char *description;   /* textual description of interface, or NULL */
225   char *name;     /* name to hand to "pcap_open_live()" */
226   char *description;  /* textual description of interface, or NULL */
227227   struct pcap_addr *addresses;
228   bpf_u_int32 flags;   /* PCAP_IF_ interface flags */
228   bpf_u_int32 flags;  /* PCAP_IF_ interface flags */
229229};
230230
231#define PCAP_IF_LOOPBACK   0x00000001   /* interface is loopback */
231#define PCAP_IF_LOOPBACK    0x00000001  /* interface is loopback */
232232
233233/*
234234 * Representation of an interface address.
235235 */
236236struct pcap_addr {
237237   struct pcap_addr *next;
238   struct sockaddr *addr;      /* address */
239   struct sockaddr *netmask;   /* netmask for that address */
240   struct sockaddr *broadaddr;   /* broadcast address for that address */
241   struct sockaddr *dstaddr;   /* P2P destination address for that address */
238   struct sockaddr *addr;      /* address */
239   struct sockaddr *netmask;   /* netmask for that address */
240   struct sockaddr *broadaddr; /* broadcast address for that address */
241   struct sockaddr *dstaddr;   /* P2P destination address for that address */
242242};
243243
244244typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
245              const u_char *);
245               const u_char *);
246246
247247/*
248248 * Error codes for the pcap API.
r242066r242067
250250 * failure of a call that returns these codes by checking for a
251251 * negative value.
252252 */
253#define PCAP_ERROR         -1   /* generic error code */
254#define PCAP_ERROR_BREAK      -2   /* loop terminated by pcap_breakloop */
255#define PCAP_ERROR_NOT_ACTIVATED   -3   /* the capture needs to be activated */
256#define PCAP_ERROR_ACTIVATED      -4   /* the operation can't be performed on already activated captures */
257#define PCAP_ERROR_NO_SUCH_DEVICE   -5   /* no such device exists */
258#define PCAP_ERROR_RFMON_NOTSUP      -6   /* this device doesn't support rfmon (monitor) mode */
259#define PCAP_ERROR_NOT_RFMON      -7   /* operation supported only in monitor mode */
260#define PCAP_ERROR_PERM_DENIED      -8   /* no permission to open the device */
261#define PCAP_ERROR_IFACE_NOT_UP      -9   /* interface isn't up */
253#define PCAP_ERROR          -1  /* generic error code */
254#define PCAP_ERROR_BREAK        -2  /* loop terminated by pcap_breakloop */
255#define PCAP_ERROR_NOT_ACTIVATED    -3  /* the capture needs to be activated */
256#define PCAP_ERROR_ACTIVATED        -4  /* the operation can't be performed on already activated captures */
257#define PCAP_ERROR_NO_SUCH_DEVICE   -5  /* no such device exists */
258#define PCAP_ERROR_RFMON_NOTSUP     -6  /* this device doesn't support rfmon (monitor) mode */
259#define PCAP_ERROR_NOT_RFMON        -7  /* operation supported only in monitor mode */
260#define PCAP_ERROR_PERM_DENIED      -8  /* no permission to open the device */
261#define PCAP_ERROR_IFACE_NOT_UP     -9  /* interface isn't up */
262262
263263/*
264264 * Warning codes for the pcap API.
265265 * These will all be positive and non-zero, so they won't look like
266266 * errors.
267267 */
268#define PCAP_WARNING         1   /* generic warning code */
269#define PCAP_WARNING_PROMISC_NOTSUP   2   /* this device doesn't support promiscuous mode */
268#define PCAP_WARNING            1   /* generic warning code */
269#define PCAP_WARNING_PROMISC_NOTSUP 2   /* this device doesn't support promiscuous mode */
270270
271char   *pcap_lookupdev(char *);
272int   pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
271char    *pcap_lookupdev(char *);
272int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
273273
274pcap_t   *pcap_create(const char *, char *);
275int   pcap_set_snaplen(pcap_t *, int);
276int   pcap_set_promisc(pcap_t *, int);
277int   pcap_can_set_rfmon(pcap_t *);
278int   pcap_set_rfmon(pcap_t *, int);
279int   pcap_set_timeout(pcap_t *, int);
280int   pcap_set_buffer_size(pcap_t *, int);
281int   pcap_activate(pcap_t *);
274pcap_t  *pcap_create(const char *, char *);
275int pcap_set_snaplen(pcap_t *, int);
276int pcap_set_promisc(pcap_t *, int);
277int pcap_can_set_rfmon(pcap_t *);
278int pcap_set_rfmon(pcap_t *, int);
279int pcap_set_timeout(pcap_t *, int);
280int pcap_set_buffer_size(pcap_t *, int);
281int pcap_activate(pcap_t *);
282282
283pcap_t   *pcap_open_live(const char *, int, int, int, char *);
284pcap_t   *pcap_open_dead(int, int);
285pcap_t   *pcap_open_offline(const char *, char *);
283pcap_t  *pcap_open_live(const char *, int, int, int, char *);
284pcap_t  *pcap_open_dead(int, int);
285pcap_t  *pcap_open_offline(const char *, char *);
286286#if defined(WIN32)
287287pcap_t  *pcap_hopen_offline(intptr_t, char *);
288288#if !defined(LIBPCAP_EXPORTS)
r242066r242067
292292static pcap_t *pcap_fopen_offline(FILE *, char *);
293293#endif
294294#else /*WIN32*/
295pcap_t   *pcap_fopen_offline(FILE *, char *);
295pcap_t  *pcap_fopen_offline(FILE *, char *);
296296#endif /*WIN32*/
297297
298void   pcap_close(pcap_t *);
299int   pcap_loop(pcap_t *, int, pcap_handler, u_char *);
300int   pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
298void    pcap_close(pcap_t *);
299int pcap_loop(pcap_t *, int, pcap_handler, u_char *);
300int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
301301const u_char*
302302   pcap_next(pcap_t *, struct pcap_pkthdr *);
303int    pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
304void   pcap_breakloop(pcap_t *);
305int   pcap_stats(pcap_t *, struct pcap_stat *);
306int   pcap_setfilter(pcap_t *, struct bpf_program *);
307int    pcap_setdirection(pcap_t *, pcap_direction_t);
308int   pcap_getnonblock(pcap_t *, char *);
309int   pcap_setnonblock(pcap_t *, int, char *);
310int   pcap_inject(pcap_t *, const void *, size_t);
311int   pcap_sendpacket(pcap_t *, const u_char *, int);
303int     pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
304void    pcap_breakloop(pcap_t *);
305int pcap_stats(pcap_t *, struct pcap_stat *);
306int pcap_setfilter(pcap_t *, struct bpf_program *);
307int     pcap_setdirection(pcap_t *, pcap_direction_t);
308int pcap_getnonblock(pcap_t *, char *);
309int pcap_setnonblock(pcap_t *, int, char *);
310int pcap_inject(pcap_t *, const void *, size_t);
311int pcap_sendpacket(pcap_t *, const u_char *, int);
312312const char *pcap_statustostr(int);
313313const char *pcap_strerror(int);
314char   *pcap_geterr(pcap_t *);
315void   pcap_perror(pcap_t *, char *);
316int   pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
317       bpf_u_int32);
318int   pcap_compile_nopcap(int, int, struct bpf_program *,
319       const char *, int, bpf_u_int32);
320void   pcap_freecode(struct bpf_program *);
321int   pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
322       const u_char *);
323int   pcap_datalink(pcap_t *);
324int   pcap_datalink_ext(pcap_t *);
325int   pcap_list_datalinks(pcap_t *, int **);
326int   pcap_set_datalink(pcap_t *, int);
327void   pcap_free_datalinks(int *);
328int   pcap_datalink_name_to_val(const char *);
314char    *pcap_geterr(pcap_t *);
315void    pcap_perror(pcap_t *, char *);
316int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
317      bpf_u_int32);
318int pcap_compile_nopcap(int, int, struct bpf_program *,
319      const char *, int, bpf_u_int32);
320void    pcap_freecode(struct bpf_program *);
321int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
322      const u_char *);
323int pcap_datalink(pcap_t *);
324int pcap_datalink_ext(pcap_t *);
325int pcap_list_datalinks(pcap_t *, int **);
326int pcap_set_datalink(pcap_t *, int);
327void    pcap_free_datalinks(int *);
328int pcap_datalink_name_to_val(const char *);
329329const char *pcap_datalink_val_to_name(int);
330330const char *pcap_datalink_val_to_description(int);
331int   pcap_snapshot(pcap_t *);
332int   pcap_is_swapped(pcap_t *);
333int   pcap_major_version(pcap_t *);
334int   pcap_minor_version(pcap_t *);
331int pcap_snapshot(pcap_t *);
332int pcap_is_swapped(pcap_t *);
333int pcap_major_version(pcap_t *);
334int pcap_minor_version(pcap_t *);
335335
336336/* XXX */
337FILE   *pcap_file(pcap_t *);
338int   pcap_fileno(pcap_t *);
337FILE    *pcap_file(pcap_t *);
338int pcap_fileno(pcap_t *);
339339
340340pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
341341pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
342FILE   *pcap_dump_file(pcap_dumper_t *);
343long   pcap_dump_ftell(pcap_dumper_t *);
344int   pcap_dump_flush(pcap_dumper_t *);
345void   pcap_dump_close(pcap_dumper_t *);
346void   pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
342FILE    *pcap_dump_file(pcap_dumper_t *);
343long    pcap_dump_ftell(pcap_dumper_t *);
344int pcap_dump_flush(pcap_dumper_t *);
345void    pcap_dump_close(pcap_dumper_t *);
346void    pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
347347
348int   pcap_findalldevs(pcap_if_t **, char *);
349void   pcap_freealldevs(pcap_if_t *);
348int pcap_findalldevs(pcap_if_t **, char *);
349void    pcap_freealldevs(pcap_if_t *);
350350
351351const char *pcap_lib_version(void);
352352
353353/* XXX this guy lives in the bpf tree */
354u_int   bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
355int   bpf_validate(const struct bpf_insn *f, int len);
356char   *bpf_image(const struct bpf_insn *, int);
357void   bpf_dump(const struct bpf_program *, int);
354u_int   bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
355int bpf_validate(const struct bpf_insn *f, int len);
356char    *bpf_image(const struct bpf_insn *, int);
357void    bpf_dump(const struct bpf_program *, int);
358358
359359#if defined(WIN32)
360360
r242066r242067
391391 * UN*X definitions
392392 */
393393
394int   pcap_get_selectable_fd(pcap_t *);
394int pcap_get_selectable_fd(pcap_t *);
395395
396396#endif /* WIN32/MSDOS/UN*X */
397397
398398#ifdef HAVE_REMOTE
399399/* Includes most of the public stuff that is needed for the remote capture */
400400#include <remote-ext.h>
401#endif    /* HAVE_REMOTE */
401#endif  /* HAVE_REMOTE */
402402
403403#ifdef __cplusplus
404404}
trunk/src/lib/winpcap/pcap/sll.h
r242066r242067
11/*-
22 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * This code is derived from the Stanford/CMU enet packet filter,
66 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
r242066r242067
4242 * For captures on Linux cooked sockets, we construct a fake header
4343 * that includes:
4444 *
45 *   a 2-byte "packet type" which is one of:
45 *  a 2-byte "packet type" which is one of:
4646 *
47 *      LINUX_SLL_HOST      packet was sent to us
48 *      LINUX_SLL_BROADCAST   packet was broadcast
49 *      LINUX_SLL_MULTICAST   packet was multicast
50 *      LINUX_SLL_OTHERHOST   packet was sent to somebody else
51 *      LINUX_SLL_OUTGOING   packet was sent *by* us;
47 *      LINUX_SLL_HOST      packet was sent to us
48 *      LINUX_SLL_BROADCAST packet was broadcast
49 *      LINUX_SLL_MULTICAST packet was multicast
50 *      LINUX_SLL_OTHERHOST packet was sent to somebody else
51 *      LINUX_SLL_OUTGOING  packet was sent *by* us;
5252 *
53 *   a 2-byte Ethernet protocol field;
53 *  a 2-byte Ethernet protocol field;
5454 *
55 *   a 2-byte link-layer type;
55 *  a 2-byte link-layer type;
5656 *
57 *   a 2-byte link-layer address length;
57 *  a 2-byte link-layer address length;
5858 *
59 *   an 8-byte source link-layer address, whose actual length is
60 *   specified by the previous value.
59 *  an 8-byte source link-layer address, whose actual length is
60 *  specified by the previous value.
6161 *
6262 * All fields except for the link-layer address are in network byte order.
6363 *
r242066r242067
7979/*
8080 * A DLT_LINUX_SLL fake link-layer header.
8181 */
82#define SLL_HDR_LEN   16      /* total header length */
83#define SLL_ADDRLEN   8      /* length of address field */
82#define SLL_HDR_LEN 16      /* total header length */
83#define SLL_ADDRLEN 8       /* length of address field */
8484
8585struct sll_header {
86   u_int16_t sll_pkttype;      /* packet type */
87   u_int16_t sll_hatype;      /* link-layer address type */
88   u_int16_t sll_halen;      /* link-layer address length */
89   u_int8_t sll_addr[SLL_ADDRLEN];   /* link-layer address */
90   u_int16_t sll_protocol;      /* protocol */
86   u_int16_t sll_pkttype;      /* packet type */
87   u_int16_t sll_hatype;       /* link-layer address type */
88   u_int16_t sll_halen;        /* link-layer address length */
89   u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
90   u_int16_t sll_protocol;     /* protocol */
9191};
9292
9393/*
r242066r242067
9696 * available even on systems other than Linux, and so that they
9797 * don't change even if the PACKET_ values change.
9898 */
99#define LINUX_SLL_HOST      0
100#define LINUX_SLL_BROADCAST   1
101#define LINUX_SLL_MULTICAST   2
102#define LINUX_SLL_OTHERHOST   3
103#define LINUX_SLL_OUTGOING   4
99#define LINUX_SLL_HOST      0
100#define LINUX_SLL_BROADCAST 1
101#define LINUX_SLL_MULTICAST 2
102#define LINUX_SLL_OTHERHOST 3
103#define LINUX_SLL_OUTGOING  4
104104
105105/*
106106 * The LINUX_SLL_ values for "sll_protocol"; these correspond to the
r242066r242067
108108 * available even on systems other than Linux.  We assume, for now,
109109 * that the ETH_P_ values won't change in Linux; if they do, then:
110110 *
111 *   if we don't translate them in "pcap-linux.c", capture files
112 *   won't necessarily be readable if captured on a system that
113 *   defines ETH_P_ values that don't match these values;
111 *  if we don't translate them in "pcap-linux.c", capture files
112 *  won't necessarily be readable if captured on a system that
113 *  defines ETH_P_ values that don't match these values;
114114 *
115 *   if we do translate them in "pcap-linux.c", that makes life
116 *   unpleasant for the BPF code generator, as the values you test
117 *   for in the kernel aren't the values that you test for when
118 *   reading a capture file, so the fixup code run on BPF programs
119 *   handed to the kernel ends up having to do more work.
115 *  if we do translate them in "pcap-linux.c", that makes life
116 *  unpleasant for the BPF code generator, as the values you test
117 *  for in the kernel aren't the values that you test for when
118 *  reading a capture file, so the fixup code run on BPF programs
119 *  handed to the kernel ends up having to do more work.
120120 *
121121 * Add other values here as necessary, for handling packet types that
122122 * might show up on non-Ethernet, non-802.x networks.  (Not all the ones
123123 * in the Linux "if_ether.h" will, I suspect, actually show up in
124124 * captures.)
125125 */
126#define LINUX_SLL_P_802_3   0x0001   /* Novell 802.3 frames without 802.2 LLC header */
127#define LINUX_SLL_P_802_2   0x0004   /* 802.2 frames (not D/I/X Ethernet) */
126#define LINUX_SLL_P_802_3   0x0001  /* Novell 802.3 frames without 802.2 LLC header */
127#define LINUX_SLL_P_802_2   0x0004  /* 802.2 frames (not D/I/X Ethernet) */
128128
129129#endif
trunk/src/lib/winpcap/pcap/usb.h
r242066r242067
1111 * 2. Redistributions in binary form must reproduce the above copyright
1212 * notice, this list of conditions and the following disclaimer in the
1313 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote
15 * products derived from this software without specific prior written
14 * 3. The name of the author may not be used to endorse or promote
15 * products derived from this software without specific prior written
1616 * permission.
1717 *
1818 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
r242066r242067
3232 *
3333 * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $
3434 */
35
35
3636#ifndef _PCAP_USB_STRUCTS_H__
3737#define _PCAP_USB_STRUCTS_H__
3838
39/*
39/*
4040 * possible transfer mode
4141 */
4242#define URB_TRANSFER_IN   0x80
trunk/src/lib/winpcap/pcap/vlan.h
r242066r242067
11/*-
22 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3 *   The Regents of the University of California.  All rights reserved.
3 *  The Regents of the University of California.  All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
r242066r242067
3737#define lib_pcap_vlan_h
3838
3939struct vlan_tag {
40   u_int16_t   vlan_tpid;      /* ETH_P_8021Q */
41   u_int16_t   vlan_tci;      /* VLAN TCI */
40   u_int16_t   vlan_tpid;      /* ETH_P_8021Q */
41   u_int16_t   vlan_tci;       /* VLAN TCI */
4242};
4343
44#define VLAN_TAG_LEN   4
44#define VLAN_TAG_LEN    4
4545
4646#endif
trunk/src/lib/winpcap/remote-ext.h
r242066r242067
22 * Copyright (c) 2002 - 2003
33 * NetGroup, Politecnico di Torino (Italy)
44 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
88 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
9 *
10 * 1. Redistributions of source code must retain the above copyright
1111 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
30 *
3131 */
3232
3333
r242066r242067
4949#endif
5050
5151/*!
52   \file remote-ext.h
52    \file remote-ext.h
5353
54   The goal of this file it to include most of the new definitions that should be
55   placed into the pcap.h file.
54    The goal of this file it to include most of the new definitions that should be
55    placed into the pcap.h file.
5656
57   It includes all new definitions (structures and functions like pcap_open().
58    Some of the functions are not really a remote feature, but, right now,
59   they are placed here.
57    It includes all new definitions (structures and functions like pcap_open().
58    Some of the functions are not really a remote feature, but, right now,
59    they are placed here.
6060*/
6161
6262
6363
6464// All this stuff is public
6565/*! \addtogroup remote_struct
66   \{
66    \{
6767*/
6868
6969
7070
7171
7272/*!
73   \brief Defines the maximum buffer size in which address, port, interface names are kept.
73    \brief Defines the maximum buffer size in which address, port, interface names are kept.
7474
75   In case the adapter name or such is larger than this value, it is truncated.
76   This is not used by the user; however it must be aware that an hostname / interface
77   name longer than this value will be truncated.
75    In case the adapter name or such is larger than this value, it is truncated.
76    This is not used by the user; however it must be aware that an hostname / interface
77    name longer than this value will be truncated.
7878*/
7979#define PCAP_BUF_SIZE 1024
8080
8181
8282/*! \addtogroup remote_source_ID
83   \{
83    \{
8484*/
8585
8686
8787/*!
88   \brief Internal representation of the type of source in use (file,
89   remote/local interface).
88    \brief Internal representation of the type of source in use (file,
89    remote/local interface).
9090
91   This indicates a file, i.e. the user want to open a capture from a local file.
91    This indicates a file, i.e. the user want to open a capture from a local file.
9292*/
9393#define PCAP_SRC_FILE 2
9494/*!
95   \brief Internal representation of the type of source in use (file,
96   remote/local interface).
95    \brief Internal representation of the type of source in use (file,
96    remote/local interface).
9797
98   This indicates a local interface, i.e. the user want to open a capture from
99   a local interface. This does not involve the RPCAP protocol.
98    This indicates a local interface, i.e. the user want to open a capture from
99    a local interface. This does not involve the RPCAP protocol.
100100*/
101101#define PCAP_SRC_IFLOCAL 3
102102/*!
103   \brief Internal representation of the type of source in use (file,
104   remote/local interface).
103    \brief Internal representation of the type of source in use (file,
104    remote/local interface).
105105
106   This indicates a remote interface, i.e. the user want to open a capture from
107   an interface on a remote host. This does involve the RPCAP protocol.
106    This indicates a remote interface, i.e. the user want to open a capture from
107    an interface on a remote host. This does involve the RPCAP protocol.
108108*/
109109#define PCAP_SRC_IFREMOTE 4
110110
111111/*!
112   \}
112    \}
113113*/
114114
115115
116116
117117/*! \addtogroup remote_source_string
118118
119   The formats allowed by the pcap_open() are the following:
120   - file://path_and_filename [opens a local file]
121   - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
122   - rpcap://host/devicename [opens the selected device available on a remote host]
123   - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
124   - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
125   - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
119    The formats allowed by the pcap_open() are the following:
120    - file://path_and_filename [opens a local file]
121    - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
122    - rpcap://host/devicename [opens the selected device available on a remote host]
123    - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
124    - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
125    - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
126126
127   The formats allowed by the pcap_findalldevs_ex() are the following:
128   - file://folder/ [lists all the files in the given folder]
129   - rpcap:// [lists all local adapters]
130   - rpcap://host:port/ [lists the devices available on a remote host]
127    The formats allowed by the pcap_findalldevs_ex() are the following:
128    - file://folder/ [lists all the files in the given folder]
129    - rpcap:// [lists all local adapters]
130    - rpcap://host:port/ [lists the devices available on a remote host]
131131
132   Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since
133   IPv6 is fully supported, these are the allowed formats:
132    Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since
133    IPv6 is fully supported, these are the allowed formats:
134134
135   - host (literal): e.g. host.foo.bar
136   - host (numeric IPv4): e.g. 10.11.12.13
137   - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13]
138   - host (numeric IPv6): e.g. [1:2:3::4]
139   - port: can be either numeric (e.g. '80') or literal (e.g. 'http')
135    - host (literal): e.g. host.foo.bar
136    - host (numeric IPv4): e.g. 10.11.12.13
137    - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13]
138    - host (numeric IPv6): e.g. [1:2:3::4]
139    - port: can be either numeric (e.g. '80') or literal (e.g. 'http')
140140
141   Here you find some allowed examples:
142   - rpcap://host.foo.bar/devicename [everything literal, no port number]
143   - rpcap://host.foo.bar:1234/devicename [everything literal, with port number]
144   - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number]
145   - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number]
146   - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number]
147   - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number]
148   - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number]
149   - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number]
150   
151   \{
141    Here you find some allowed examples:
142    - rpcap://host.foo.bar/devicename [everything literal, no port number]
143    - rpcap://host.foo.bar:1234/devicename [everything literal, with port number]
144    - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number]
145    - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number]
146    - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number]
147    - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number]
148    - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number]
149    - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number]
150
151    \{
152152*/
153153
154154
155155/*!
156   \brief String that will be used to determine the type of source in use (file,
157   remote/local interface).
156    \brief String that will be used to determine the type of source in use (file,
157    remote/local interface).
158158
159   This string will be prepended to the interface name in order to create a string
160   that contains all the information required to open the source.
159    This string will be prepended to the interface name in order to create a string
160    that contains all the information required to open the source.
161161
162   This string indicates that the user wants to open a capture from a local file.
162    This string indicates that the user wants to open a capture from a local file.
163163*/
164164#define PCAP_SRC_FILE_STRING "file://"
165165/*!
166   \brief String that will be used to determine the type of source in use (file,
167   remote/local interface).
166    \brief String that will be used to determine the type of source in use (file,
167    remote/local interface).
168168
169   This string will be prepended to the interface name in order to create a string
170   that contains all the information required to open the source.
169    This string will be prepended to the interface name in order to create a string
170    that contains all the information required to open the source.
171171
172   This string indicates that the user wants to open a capture from a network interface.
173   This string does not necessarily involve the use of the RPCAP protocol. If the
174   interface required resides on the local host, the RPCAP protocol is not involved
175   and the local functions are used.
172    This string indicates that the user wants to open a capture from a network interface.
173    This string does not necessarily involve the use of the RPCAP protocol. If the
174    interface required resides on the local host, the RPCAP protocol is not involved
175    and the local functions are used.
176176*/
177177#define PCAP_SRC_IF_STRING "rpcap://"
178178
179179/*!
180   \}
180    \}
181181*/
182182
183183
r242066r242067
185185
186186
187187/*!
188   \addtogroup remote_open_flags
189   \{
188    \addtogroup remote_open_flags
189    \{
190190*/
191191
192192/*!
193   \brief Defines if the adapter has to go in promiscuous mode.
193    \brief Defines if the adapter has to go in promiscuous mode.
194194
195   It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise.
196   Note that even if this parameter is false, the interface could well be in promiscuous
197   mode for some other reason (for example because another capture process with
198   promiscuous mode enabled is currently using that interface).
199   On on Linux systems with 2.2 or later kernels (that have the "any" device), this
200   flag does not work on the "any" device; if an argument of "any" is supplied,
201   the 'promisc' flag is ignored.
195    It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise.
196    Note that even if this parameter is false, the interface could well be in promiscuous
197    mode for some other reason (for example because another capture process with
198    promiscuous mode enabled is currently using that interface).
199    On on Linux systems with 2.2 or later kernels (that have the "any" device), this
200    flag does not work on the "any" device; if an argument of "any" is supplied,
201    the 'promisc' flag is ignored.
202202*/
203#define PCAP_OPENFLAG_PROMISCUOUS      1
203#define PCAP_OPENFLAG_PROMISCUOUS       1
204204
205205/*!
206   \brief Defines if the data trasfer (in case of a remote
207   capture) has to be done with UDP protocol.
206    \brief Defines if the data trasfer (in case of a remote
207    capture) has to be done with UDP protocol.
208208
209   If it is '1' if you want a UDP data connection, '0' if you want
210   a TCP data connection; control connection is always TCP-based.
211   A UDP connection is much lighter, but it does not guarantee that all
212   the captured packets arrive to the client workstation. Moreover,
213   it could be harmful in case of network congestion.
214   This flag is meaningless if the source is not a remote interface.
215   In that case, it is simply ignored.
209    If it is '1' if you want a UDP data connection, '0' if you want
210    a TCP data connection; control connection is always TCP-based.
211    A UDP connection is much lighter, but it does not guarantee that all
212    the captured packets arrive to the client workstation. Moreover,
213    it could be harmful in case of network congestion.
214    This flag is meaningless if the source is not a remote interface.
215    In that case, it is simply ignored.
216216*/
217#define PCAP_OPENFLAG_DATATX_UDP         2
217#define PCAP_OPENFLAG_DATATX_UDP            2
218218
219219
220220/*!
221   \brief Defines if the remote probe will capture its own generated traffic.
221    \brief Defines if the remote probe will capture its own generated traffic.
222222
223   In case the remote probe uses the same interface to capture traffic and to send
224   data back to the caller, the captured traffic includes the RPCAP traffic as well.
225   If this flag is turned on, the RPCAP traffic is excluded from the capture, so that
226   the trace returned back to the collector is does not include this traffic.
223    In case the remote probe uses the same interface to capture traffic and to send
224    data back to the caller, the captured traffic includes the RPCAP traffic as well.
225    If this flag is turned on, the RPCAP traffic is excluded from the capture, so that
226    the trace returned back to the collector is does not include this traffic.
227227*/
228#define PCAP_OPENFLAG_NOCAPTURE_RPCAP   4
228#define PCAP_OPENFLAG_NOCAPTURE_RPCAP   4
229229
230230/*!
231   \brief Defines if the local adapter will capture its own generated traffic.
231    \brief Defines if the local adapter will capture its own generated traffic.
232232
233   This flag tells the underlying capture driver to drop the packets that were sent by itself.
234   This is usefult when building applications like bridges, that should ignore the traffic
235   they just sent.
233    This flag tells the underlying capture driver to drop the packets that were sent by itself.
234    This is usefult when building applications like bridges, that should ignore the traffic
235    they just sent.
236236*/
237#define PCAP_OPENFLAG_NOCAPTURE_LOCAL   8
237#define PCAP_OPENFLAG_NOCAPTURE_LOCAL   8
238238
239239/*!
240   \brief This flag configures the adapter for maximum responsiveness.
240    \brief This flag configures the adapter for maximum responsiveness.
241241
242   In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before
243   copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage,
244   i.e. better performance, which is good for applications like sniffers. If the user sets the
245   PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application
246   is ready to receive them. This is suggested for real time applications (like, for example, a bridge)
247   that need the best responsiveness.*/
248#define PCAP_OPENFLAG_MAX_RESPONSIVENESS   16
242    In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before
243    copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage,
244    i.e. better performance, which is good for applications like sniffers. If the user sets the
245    PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application
246    is ready to receive them. This is suggested for real time applications (like, for example, a bridge)
247    that need the best responsiveness.*/
248#define PCAP_OPENFLAG_MAX_RESPONSIVENESS    16
249249
250250/*!
251   \}
251    \}
252252*/
253253
254254
255255/*!
256   \addtogroup remote_samp_methods
257   \{
256    \addtogroup remote_samp_methods
257    \{
258258*/
259259
260260/*!
261   \brief No sampling has to be done on the current capture.
261    \brief No sampling has to be done on the current capture.
262262
263   In this case, no sampling algorithms are applied to the current capture.
263    In this case, no sampling algorithms are applied to the current capture.
264264*/
265#define PCAP_SAMP_NOSAMP   0
265#define PCAP_SAMP_NOSAMP    0
266266
267267/*!
268   \brief It defines that only 1 out of N packets must be returned to the user.
268    \brief It defines that only 1 out of N packets must be returned to the user.
269269
270   In this case, the 'value' field of the 'pcap_samp' structure indicates the
271   number of packets (minus 1) that must be discarded before one packet got accepted.
272   In other words, if 'value = 10', the first packet is returned to the caller, while
273   the following 9 are discarded.
270    In this case, the 'value' field of the 'pcap_samp' structure indicates the
271    number of packets (minus 1) that must be discarded before one packet got accepted.
272    In other words, if 'value = 10', the first packet is returned to the caller, while
273    the following 9 are discarded.
274274*/
275#define PCAP_SAMP_1_EVERY_N   1
275#define PCAP_SAMP_1_EVERY_N 1
276276
277277/*!
278   \brief It defines that we have to return 1 packet every N milliseconds.
278    \brief It defines that we have to return 1 packet every N milliseconds.
279279
280   In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting
281   time' in milliseconds before one packet got accepted.
282   In other words, if 'value = 10', the first packet is returned to the caller; the next
283   returned one will be the first packet that arrives when 10ms have elapsed.
280    In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting
281    time' in milliseconds before one packet got accepted.
282    In other words, if 'value = 10', the first packet is returned to the caller; the next
283    returned one will be the first packet that arrives when 10ms have elapsed.
284284*/
285285#define PCAP_SAMP_FIRST_AFTER_N_MS 2
286286
287287/*!
288   \}
288    \}
289289*/
290290
291291
292292/*!
293   \addtogroup remote_auth_methods
294   \{
293    \addtogroup remote_auth_methods
294    \{
295295*/
296296
297297/*!
298   \brief It defines the NULL authentication.
298    \brief It defines the NULL authentication.
299299
300   This value has to be used within the 'type' member of the pcap_rmtauth structure.
301   The 'NULL' authentication has to be equal to 'zero', so that old applications
302   can just put every field of struct pcap_rmtauth to zero, and it does work.
300    This value has to be used within the 'type' member of the pcap_rmtauth structure.
301    The 'NULL' authentication has to be equal to 'zero', so that old applications
302    can just put every field of struct pcap_rmtauth to zero, and it does work.
303303*/
304304#define RPCAP_RMTAUTH_NULL 0
305305/*!
306   \brief It defines the username/password authentication.
306    \brief It defines the username/password authentication.
307307
308   With this type of authentication, the RPCAP protocol will use the username/
309   password provided to authenticate the user on the remote machine. If the
310   authentication is successful (and the user has the right to open network devices)
311   the RPCAP connection will continue; otherwise it will be dropped.
308    With this type of authentication, the RPCAP protocol will use the username/
309    password provided to authenticate the user on the remote machine. If the
310    authentication is successful (and the user has the right to open network devices)
311    the RPCAP connection will continue; otherwise it will be dropped.
312312
313   This value has to be used within the 'type' member of the pcap_rmtauth structure.
313    This value has to be used within the 'type' member of the pcap_rmtauth structure.
314314*/
315315#define RPCAP_RMTAUTH_PWD 1
316316
317317/*!
318   \}
318    \}
319319*/
320320
321321
r242066r242067
323323
324324/*!
325325
326   \brief This structure keeps the information needed to autheticate
327   the user on a remote machine.
328   
329   The remote machine can either grant or refuse the access according
330   to the information provided.
331   In case the NULL authentication is required, both 'username' and
332   'password' can be NULL pointers.
333   
334   This structure is meaningless if the source is not a remote interface;
335   in that case, the functions which requires such a structure can accept
336   a NULL pointer as well.
326    \brief This structure keeps the information needed to autheticate
327    the user on a remote machine.
328
329    The remote machine can either grant or refuse the access according
330    to the information provided.
331    In case the NULL authentication is required, both 'username' and
332    'password' can be NULL pointers.
333
334    This structure is meaningless if the source is not a remote interface;
335    in that case, the functions which requires such a structure can accept
336    a NULL pointer as well.
337337*/
338338struct pcap_rmtauth
339339{
340340   /*!
341      \brief Type of the authentication required.
341       \brief Type of the authentication required.
342342
343      In order to provide maximum flexibility, we can support different types
344      of authentication based on the value of this 'type' variable. The currently
345      supported authentication methods are defined into the
346      \link remote_auth_methods Remote Authentication Methods Section\endlink.
343       In order to provide maximum flexibility, we can support different types
344       of authentication based on the value of this 'type' variable. The currently
345       supported authentication methods are defined into the
346       \link remote_auth_methods Remote Authentication Methods Section\endlink.
347347
348348   */
349349   int type;
350350   /*!
351      \brief Zero-terminated string containing the username that has to be
352      used on the remote machine for authentication.
353     
354      This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
355      and it can be NULL.
351       \brief Zero-terminated string containing the username that has to be
352       used on the remote machine for authentication.
353
354       This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
355       and it can be NULL.
356356   */
357357   char *username;
358358   /*!
359      \brief Zero-terminated string containing the password that has to be
360      used on the remote machine for authentication.
361     
362      This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
363      and it can be NULL.
359       \brief Zero-terminated string containing the password that has to be
360       used on the remote machine for authentication.
361
362       This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
363       and it can be NULL.
364364   */
365365   char *password;
366366};
367367
368368
369369/*!
370   \brief This structure defines the information related to sampling.
370    \brief This structure defines the information related to sampling.
371371
372   In case the sampling is requested, the capturing device should read
373   only a subset of the packets coming from the source. The returned packets depend
374   on the sampling parameters.
372    In case the sampling is requested, the capturing device should read
373    only a subset of the packets coming from the source. The returned packets depend
374    on the sampling parameters.
375375
376   \warning The sampling process is applied <strong>after</strong> the filtering process.
377   In other words, packets are filtered first, then the sampling process selects a
378   subset of the 'filtered' packets and it returns them to the caller.
376    \warning The sampling process is applied <strong>after</strong> the filtering process.
377    In other words, packets are filtered first, then the sampling process selects a
378    subset of the 'filtered' packets and it returns them to the caller.
379379*/
380380struct pcap_samp
381381{
382382   /*!
383      Method used for sampling. Currently, the supported methods are listed in the
384      \link remote_samp_methods Sampling Methods Section\endlink.
383       Method used for sampling. Currently, the supported methods are listed in the
384       \link remote_samp_methods Sampling Methods Section\endlink.
385385   */
386386   int method;
387387
388388   /*!
389      This value depends on the sampling method defined. For its meaning, please check
390      at the \link remote_samp_methods Sampling Methods Section\endlink.
389       This value depends on the sampling method defined. For its meaning, please check
390       at the \link remote_samp_methods Sampling Methods Section\endlink.
391391   */
392392   int value;
393393};
r242066r242067
400400
401401
402402/*!
403   \}
403    \}
404404*/ // end of public documentation
405405
406406
r242066r242067
410410
411411/** \name New WinPcap functions
412412
413   This section lists the new functions that are able to help considerably in writing
414   WinPcap programs because of their easiness of use.
413    This section lists the new functions that are able to help considerably in writing
414    WinPcap programs because of their easiness of use.
415415 */
416416//\{
417417pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
r242066r242067
427427
428428/** \name Remote Capture functions
429429 */
430//\{
430//\{
431431SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
432432int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
433433int pcap_remoteact_close(const char *host, char *errbuf);
r242066r242067
441441
442442
443443#endif
444
trunk/src/mame/drivers/airbustr.c
r242066r242067
581581static MACHINE_CONFIG_START( airbustr, airbustr_state )
582582
583583   /* basic machine hardware */
584   MCFG_CPU_ADD("master", Z80, XTAL_12MHz/2)   /* verified on pcb */
584   MCFG_CPU_ADD("master", Z80, XTAL_12MHz/2)   /* verified on pcb */
585585   MCFG_CPU_PROGRAM_MAP(master_map)
586586   MCFG_CPU_IO_MAP(master_io_map)
587587   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", airbustr_state, airbustr_scanline, "screen", 0, 1)
588588
589   MCFG_CPU_ADD("slave", Z80, XTAL_12MHz/2)   /* verified on pcb */
589   MCFG_CPU_ADD("slave", Z80, XTAL_12MHz/2)    /* verified on pcb */
590590   MCFG_CPU_PROGRAM_MAP(slave_map)
591591   MCFG_CPU_IO_MAP(slave_io_map)
592592   MCFG_CPU_VBLANK_INT_DRIVER("screen", airbustr_state,  slave_interrupt) /* nmi signal from master cpu */
593593
594   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2)   /* verified on pcb */
594   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2) /* verified on pcb */
595595   MCFG_CPU_PROGRAM_MAP(sound_map)
596596   MCFG_CPU_IO_MAP(sound_io_map)
597597   MCFG_CPU_VBLANK_INT_DRIVER("screen", airbustr_state,  irq0_line_hold)       // nmi are caused by sub cpu writing a sound command
r242066r242067
622622   /* sound hardware */
623623   MCFG_SPEAKER_STANDARD_MONO("mono")
624624
625   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)   /* verified on pcb */
625   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)   /* verified on pcb */
626626   MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))       // DSW-1 connected to port A
627627   MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))       // DSW-2 connected to port B
628628   MCFG_SOUND_ROUTE(0, "mono", 0.25)
r242066r242067
630630   MCFG_SOUND_ROUTE(2, "mono", 0.25)
631631   MCFG_SOUND_ROUTE(3, "mono", 0.50)
632632
633   MCFG_OKIM6295_ADD("oki", XTAL_12MHz/4, OKIM6295_PIN7_LOW)   /* verified on pcb */
633   MCFG_OKIM6295_ADD("oki", XTAL_12MHz/4, OKIM6295_PIN7_LOW)   /* verified on pcb */
634634   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
635635MACHINE_CONFIG_END
636636
trunk/src/mame/drivers/alinvade.c
r242066r242067
11/*
22
33 tiny bartop b&w Space Invaders type game with colour overlay
4
4
55 Driver by David Haywood and Mariusz Wojcieszek
66
77 TODO:
88 - 16 bytes are protected in the c*** range. I'm guessing they used a PROM to protect a
99   simple sub-routine because:
10   * It attempts to jsr from RAM to that area with a 0x10 byte offset (i.e. ROM copies a code snippet to RAM; when it executes
10   * It attempts to jsr from RAM to that area with a 0x10 byte offset (i.e. ROM copies a code snippet to RAM; when it executes
1111     it code executes jsr 0xc400 then self-modifies it to 0xc410, rinse and repeat ... up to 0xc7f0 and rolls back);
12   * After that the program has an amusing left-over located at 0xe000-0xe00f (yup, NOPs + a RTS), with the
12   * After that the program has an amusing left-over located at 0xe000-0xe00f (yup, NOPs + a RTS), with the
1313     exact same number of times as above;
1414   It's unknown at current stage what it really protects tho, game seems working for all I can see ... -AS
1515
1616 - Sound is entirely guesswork.
17
17
1818 */
1919
2020#include "emu.h"
r242066r242067
2828   alinvade_state(const machine_config &mconfig, device_type type, const char *tag)
2929      : driver_device(mconfig, type, tag)
3030      , m_maincpu(*this, "maincpu")
31        , m_videoram(*this, "videoram")
31      , m_videoram(*this, "videoram")
3232      , m_discrete(*this, "discrete")
3333   { }
34   
34
3535   DECLARE_READ8_MEMBER(irqmask_r);
3636   DECLARE_WRITE8_MEMBER(irqmask_w);
3737   DECLARE_WRITE8_MEMBER(sound_w);
r242066r242067
9090{
9191   if((!(irqff & 1)) && (data & 1)) // f/f, active high? If the above actually returns 0xff this could be active low ...
9292      irqmask^= 1;
93     
93
9494   irqff = data;
9595}
9696
trunk/src/mame/drivers/alpha68k.c
r242066r242067
18761876//  AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE_LEGACY("adpcm", saiyugoub1_adpcm_control_w)
18771877ADDRESS_MAP_END
18781878
1879// Pixel clock, assuming that it can't be 4 MHz because 4 MHz / 15,20 KHz = 263 HTOTAL (VERY unlikely).
1879// Pixel clock, assuming that it can't be 4 MHz because 4 MHz / 15,20 KHz = 263 HTOTAL (VERY unlikely).
18801880#define ALPHA68K_PIXEL_CLOCK XTAL_24MHz/4
18811881#define ALPHA68K_HTOTAL 394
18821882#define ALPHA68K_HBEND 0
r242066r242067
19091909
19101910   /* video hardware */
19111911   MCFG_SCREEN_ADD("screen", RASTER)
1912//   MCFG_SCREEN_REFRESH_RATE(60)
1913//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1914//   MCFG_SCREEN_SIZE(32*8, 32*8)
1915//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1912//  MCFG_SCREEN_REFRESH_RATE(60)
1913//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1914//  MCFG_SCREEN_SIZE(32*8, 32*8)
1915//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
19161916   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
19171917   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_sstingry)
19181918   MCFG_SCREEN_PALETTE("palette")
r242066r242067
19581958
19591959   /* video hardware */
19601960   MCFG_SCREEN_ADD("screen", RASTER)
1961//   MCFG_SCREEN_REFRESH_RATE(60)
1962//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1963//   MCFG_SCREEN_SIZE(32*8, 32*8)
1964//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1961//  MCFG_SCREEN_REFRESH_RATE(60)
1962//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1963//  MCFG_SCREEN_SIZE(32*8, 32*8)
1964//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
19651965   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
19661966   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_kyros)
19671967   MCFG_SCREEN_PALETTE("palette")
r242066r242067
20062006
20072007   /* video hardware */
20082008   MCFG_SCREEN_ADD("screen", RASTER)
2009//   MCFG_SCREEN_REFRESH_RATE(60)
2010//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2011//   MCFG_SCREEN_SIZE(32*8, 32*8)
2012//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2009//  MCFG_SCREEN_REFRESH_RATE(60)
2010//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2011//  MCFG_SCREEN_SIZE(32*8, 32*8)
2012//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
20132013   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
20142014   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_kyros)
20152015   MCFG_SCREEN_PALETTE("palette")
r242066r242067
20432043
20442044   /* video hardware */
20452045   MCFG_SCREEN_ADD("screen", RASTER)
2046//   MCFG_SCREEN_REFRESH_RATE(60)
2047//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2048//   MCFG_SCREEN_SIZE(32*8, 32*8)
2049//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2046//  MCFG_SCREEN_REFRESH_RATE(60)
2047//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2048//  MCFG_SCREEN_SIZE(32*8, 32*8)
2049//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
20502050   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
20512051   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_I)
20522052   MCFG_SCREEN_PALETTE("palette")
r242066r242067
20882088
20892089   /* video hardware */
20902090   MCFG_SCREEN_ADD("screen", RASTER)
2091//   MCFG_SCREEN_REFRESH_RATE(60)
2092//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2093//   MCFG_SCREEN_SIZE(32*8, 32*8)
2094//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2091//  MCFG_SCREEN_REFRESH_RATE(60)
2092//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2093//  MCFG_SCREEN_SIZE(32*8, 32*8)
2094//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
20952095   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
20962096   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_II)
20972097   MCFG_SCREEN_PALETTE("palette")
r242066r242067
21412141
21422142   /* video hardware */
21432143   MCFG_SCREEN_ADD("screen", RASTER)
2144//   MCFG_SCREEN_REFRESH_RATE(60)
2145//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2146//   MCFG_SCREEN_SIZE(32*8, 32*8)
2147//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2144//  MCFG_SCREEN_REFRESH_RATE(60)
2145//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2146//  MCFG_SCREEN_SIZE(32*8, 32*8)
2147//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
21482148   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
21492149   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_II)
21502150   MCFG_SCREEN_PALETTE("palette")
r242066r242067
21872187
21882188   /* video hardware */
21892189   MCFG_SCREEN_ADD("screen", RASTER)
2190//   MCFG_SCREEN_REFRESH_RATE(60)
2191//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2192//   MCFG_SCREEN_SIZE(32*8, 32*8)
2193//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2190//  MCFG_SCREEN_REFRESH_RATE(60)
2191//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2192//  MCFG_SCREEN_SIZE(32*8, 32*8)
2193//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
21942194   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
21952195   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_V)
21962196   MCFG_SCREEN_PALETTE("palette")
r242066r242067
22332233
22342234   /* video hardware */
22352235   MCFG_SCREEN_ADD("screen", RASTER)
2236//   MCFG_SCREEN_REFRESH_RATE(60)
2237//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2238//   MCFG_SCREEN_SIZE(32*8, 32*8)
2239//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2236//  MCFG_SCREEN_REFRESH_RATE(60)
2237//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2238//  MCFG_SCREEN_SIZE(32*8, 32*8)
2239//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
22402240   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
22412241   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_V_sb)
22422242   MCFG_SCREEN_PALETTE("palette")
r242066r242067
22782278
22792279   /* video hardware */
22802280   MCFG_SCREEN_ADD("screen", RASTER)
2281//   MCFG_SCREEN_REFRESH_RATE(60)
2282//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2283//   MCFG_SCREEN_SIZE(32*8, 32*8)
2284//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2281//  MCFG_SCREEN_REFRESH_RATE(60)
2282//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
2283//  MCFG_SCREEN_SIZE(32*8, 32*8)
2284//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
22852285   MCFG_SCREEN_RAW_PARAMS(ALPHA68K_PIXEL_CLOCK,ALPHA68K_HTOTAL,ALPHA68K_HBEND,ALPHA68K_HBSTART,ALPHA68K_VTOTAL,ALPHA68K_VBEND,ALPHA68K_VBSTART)
22862286   MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_I)
22872287   MCFG_SCREEN_PALETTE("palette")
trunk/src/mame/drivers/arkanoid.c
r242066r242067
12481248
12491249   /* video hardware */
12501250   MCFG_SCREEN_ADD("screen", RASTER)
1251//   MCFG_SCREEN_REFRESH_RATE(60)
1252//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1253//   MCFG_SCREEN_SIZE(32*8, 32*8)
1254//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1251//  MCFG_SCREEN_REFRESH_RATE(60)
1252//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1253//  MCFG_SCREEN_SIZE(32*8, 32*8)
1254//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
12551255   MCFG_SCREEN_RAW_PARAMS(ARKANOID_PIXEL_CLOCK,ARKANOID_HTOTAL,ARKANOID_HBEND,ARKANOID_HBSTART,ARKANOID_VTOTAL,ARKANOID_VBEND,ARKANOID_VBSTART)
12561256   MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_arkanoid)
12571257   MCFG_SCREEN_PALETTE("palette")
r242066r242067
12821282
12831283   /* video hardware */
12841284   MCFG_SCREEN_ADD("screen", RASTER)
1285//   MCFG_SCREEN_REFRESH_RATE(60)
1286//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1287//   MCFG_SCREEN_SIZE(32*8, 32*8)
1288//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1285//  MCFG_SCREEN_REFRESH_RATE(60)
1286//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1287//  MCFG_SCREEN_SIZE(32*8, 32*8)
1288//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
12891289   MCFG_SCREEN_RAW_PARAMS(ARKANOID_PIXEL_CLOCK,ARKANOID_HTOTAL,ARKANOID_HBEND,ARKANOID_HBSTART,ARKANOID_VTOTAL,ARKANOID_VBEND,ARKANOID_VBSTART)
12901290   MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa)
12911291   MCFG_SCREEN_PALETTE("palette")
r242066r242067
13381338
13391339   /* video hardware */
13401340   MCFG_SCREEN_ADD("screen", RASTER)
1341//   MCFG_SCREEN_REFRESH_RATE(60)
1342//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1343//   MCFG_SCREEN_SIZE(32*8, 32*8)
1344//   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1341//  MCFG_SCREEN_REFRESH_RATE(60)
1342//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1343//  MCFG_SCREEN_SIZE(32*8, 32*8)
1344//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
13451345   MCFG_SCREEN_RAW_PARAMS(ARKANOID_PIXEL_CLOCK,ARKANOID_HTOTAL,ARKANOID_HBEND,ARKANOID_HBSTART,ARKANOID_VTOTAL,ARKANOID_VBEND,ARKANOID_VBSTART)
13461346   MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa)
13471347   MCFG_SCREEN_PALETTE("palette")
trunk/src/mame/drivers/astrcorp.c
r242066r242067
491491
492492   /* video hardware */
493493   MCFG_SCREEN_ADD("screen", RASTER)
494//   MCFG_SCREEN_REFRESH_RATE(58.846)    // measured on pcb
495//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
496//   MCFG_SCREEN_SIZE(320, 240)
497//   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
494//  MCFG_SCREEN_REFRESH_RATE(58.846)    // measured on pcb
495//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
496//  MCFG_SCREEN_SIZE(320, 240)
497//  MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
498498   MCFG_SCREEN_RAW_PARAMS(ASTROCORP_PIXEL_CLOCK,ASTROCORP_HTOTAL,ASTROCORP_HBEND,320,ASTROCORP_VTOTAL,ASTROCORP_VBEND,ASTROCORP_VBSTART)
499499   MCFG_SCREEN_UPDATE_DRIVER(astrocorp_state, screen_update_astrocorp)
500500   MCFG_SCREEN_PALETTE("palette")
r242066r242067
545545
546546   /* video hardware */
547547   MCFG_SCREEN_ADD("screen", RASTER)
548//   MCFG_SCREEN_REFRESH_RATE(58.846)
549//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
550//   MCFG_SCREEN_SIZE(0x200, 0x100)
551//   MCFG_SCREEN_VISIBLE_AREA(0, 0x200-1, 0, 0xf0-1)
548//  MCFG_SCREEN_REFRESH_RATE(58.846)
549//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
550//  MCFG_SCREEN_SIZE(0x200, 0x100)
551//  MCFG_SCREEN_VISIBLE_AREA(0, 0x200-1, 0, 0xf0-1)
552552   MCFG_SCREEN_RAW_PARAMS(ASTROCORP_PIXEL_CLOCK,ASTROCORP_HTOTAL,ASTROCORP_HBEND,512,ASTROCORP_VTOTAL,ASTROCORP_VBEND,ASTROCORP_VBSTART)
553553   MCFG_SCREEN_UPDATE_DRIVER(astrocorp_state, screen_update_astrocorp)
554554   MCFG_SCREEN_PALETTE("palette")
trunk/src/mame/drivers/atetris.c
r242066r242067
99
1010    Known bugs:
1111        * the bootlegs don't actually have the slapstic. The additional
12        hardware needs to be emulated.
12          hardware needs to be emulated.
1313
1414****************************************************************************
1515
r242066r242067
364364   /* basic machine hardware */
365365   MCFG_CPU_ADD("maincpu", M6502,BOOTLEG_CLOCK/8)
366366   MCFG_CPU_PROGRAM_MAP(atetrisb2_map)
367   
367
368368   MCFG_SLAPSTIC_ADD("slapstic")
369369
370370   MCFG_NVRAM_ADD_1FILL("nvram")
r242066r242067
401401
402402   MCFG_CPU_REPLACE("maincpu", M6502, MASTER_CLOCK/8)
403403   MCFG_CPU_PROGRAM_MAP(atetrisb3_map)
404   
404
405405   //8749 at 10 MHz instead of slapstic
406406
407407   MCFG_SOUND_REPLACE("sn1", SN76489, 4000000)
408408   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
409   
409
410410   MCFG_SOUND_REPLACE("sn2", SN76489, 4000000)
411411   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
412   
412
413413   MCFG_SOUND_REPLACE("sn3", SN76489, 4000000)
414414   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
415415MACHINE_CONFIG_END
r242066r242067
500500
501501   ROM_REGION( 0x10000, "gfx1", 0 )
502502   ROM_LOAD( "gfx.bin",     0x0000, 0x10000, CRC(84a1939f) SHA1(d8577985fc8ed4e74f74c68b7c00c4855b7c3270) )
503   
503
504504   // 8749 (10 MHz OSC) instead of the slapstic, needs to be hooked up.
505505   ROM_REGION( 0x0800, "user1", 0 )
506506   ROM_LOAD( "8749h.bin",    0x0000, 0x0800, CRC(a66a9c47) SHA1(fbebd755a5e826c7d94ebcafdff2f9a01c9fd1a5) )
507   
507
508508   // currently unused
509509   ROM_REGION( 0x0020, "proms", 0 )
510510   ROM_LOAD( "82s123.bin", 0x00000, 0x0020, CRC(79656af3) SHA1(bf55f100806520b291157c03999606367dd14ecc) )
trunk/src/mame/drivers/cobra.c
r242066r242067
634634   DECLARE_READ64_MEMBER(main_mpc106_r);
635635   DECLARE_WRITE64_MEMBER(main_mpc106_w);
636636   DECLARE_WRITE32_MEMBER(main_cpu_dc_store);
637   
637
638638   DECLARE_READ32_MEMBER(sub_comram_r);
639639   DECLARE_WRITE32_MEMBER(sub_comram_w);
640640   DECLARE_READ32_MEMBER(sub_sound_r);
r242066r242067
665665   DECLARE_READ64_MEMBER(gfx_fifo_r);
666666   DECLARE_WRITE64_MEMBER(gfx_buf_w);
667667   DECLARE_WRITE32_MEMBER(gfx_cpu_dc_store);
668   
668
669669   DECLARE_WRITE8_MEMBER(sub_jvs_w);
670670
671671   DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
trunk/src/mame/drivers/cv1k.c
r242066r242067
847847
848848READ64_MEMBER( cv1k_state::mushitam_speedup_r )
849849{
850
851850   if (m_maincpu->pc()==  0xc04a0da)  m_maincpu->spin_until_time( attotime::from_usec(10)); // mushitam / mushitama
852851   return m_ram[0x0022f0/8];
853852}
trunk/src/mame/drivers/cybertnk.c
r242066r242067
207207   required_shared_ptr<UINT16> m_tilemap1scroll;
208208   required_shared_ptr<UINT16> m_tilemap2scroll;
209209   required_shared_ptr<UINT16> m_roadram;
210   
210
211211   tilemap_t *m_tilemap0_tilemap;
212212   tilemap_t *m_tilemap1_tilemap;
213213   tilemap_t *m_tilemap2_tilemap;
trunk/src/mame/drivers/darius.c
r242066r242067
574574   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
575575
576576   PORT_START("DSW")   /* DSW */
577   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:1")
577   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )  PORT_DIPLOCATION("SW1:1")
578578   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
579579   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
580   PORT_DIPNAME( 0x0002, 0x0002, "Autofire" )      PORT_DIPLOCATION("SW1:2")
580   PORT_DIPNAME( 0x0002, 0x0002, "Autofire" )      PORT_DIPLOCATION("SW1:2")
581581   PORT_DIPSETTING(      0x0002, DEF_STR( Normal ) )
582582   PORT_DIPSETTING(      0x0000, "Fast" )
583583   PORT_SERVICE_DIPLOC(  0x0004, IP_ACTIVE_LOW, "SW1:3" )
584   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Demo_Sounds ) )   PORT_DIPLOCATION("SW1:4")
584   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW1:4")
585585   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
586586   PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
587   PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )   PORT_DIPLOCATION("SW1:5,6")
587   PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )   PORT_DIPLOCATION("SW1:5,6")
588588   PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
589589   PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
590590   PORT_DIPSETTING(      0x0020, DEF_STR( 2C_1C ) )
591591   PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
592   PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )   PORT_DIPLOCATION("SW1:7,8")
592   PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )   PORT_DIPLOCATION("SW1:7,8")
593593   PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_2C ) )
594594   PORT_DIPSETTING(      0x0080, DEF_STR( 1C_3C ) )
595595   PORT_DIPSETTING(      0x0040, DEF_STR( 1C_4C ) )
596596   PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
597597
598   PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
598   PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
599599   PORT_DIPSETTING(      0x0200, DEF_STR( Easy ) )
600600   PORT_DIPSETTING(      0x0300, DEF_STR( Medium ) )
601601   PORT_DIPSETTING(      0x0100, DEF_STR( Hard ) )
602602   PORT_DIPSETTING(      0x0000, DEF_STR( Hardest ) )
603   PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:3,4")
603   PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION("SW2:3,4")
604604   PORT_DIPSETTING(      0x0800, "every 600k" )
605605   PORT_DIPSETTING(      0x0c00, "600k only" )
606606   PORT_DIPSETTING(      0x0400, "800k only" )
607607   PORT_DIPSETTING(      0x0000, DEF_STR( None ) )
608   PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )   PORT_DIPLOCATION("SW2:5,6")
608   PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )    PORT_DIPLOCATION("SW2:5,6")
609609   PORT_DIPSETTING(      0x3000, "3" )
610610   PORT_DIPSETTING(      0x2000, "4" )
611611   PORT_DIPSETTING(      0x1000, "5" )
612612   PORT_DIPSETTING(      0x0000, "6" )
613   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW2:7")
613   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )  PORT_DIPLOCATION("SW2:7")
614614   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
615615   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
616616   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:8")
trunk/src/mame/drivers/dec0.c
r242066r242067
12561256/******************************************************************************/
12571257
12581258
1259/* This is guesswork, in order to get ~57,41 Hz.
1259/* This is guesswork, in order to get ~57,41 Hz.
12601260 * If real Pixel Clock isn't 5 MHz then htotal/vtotal is different too ... */
12611261#define DEC0_PIXEL_CLOCK XTAL_20MHz/4
12621262#define DEC0_HTOTAL 320
trunk/src/mame/drivers/dragrace.c
r242066r242067
369369   ROM_LOAD( "8516dr.l0", 0x400, 0x200, CRC(d1e74af1) SHA1(f55a3bfd7d152ac9af128697f55c9a0c417779f5) )
370370   ROM_LOAD( "8518dr.n0", 0x600, 0x200, CRC(b1369028) SHA1(598a8779982d532c9f34345e793a79fcb29cac62) )
371371
372   ROM_REGION( 0x100, "sync", 0 )   /* sync prom located at L8, it's a 82s129 */
372   ROM_REGION( 0x100, "sync", 0 )  /* sync prom located at L8, it's a 82s129 */
373373   ROM_LOAD( "l8.bin", 0x000, 0x100, CRC(3610b453) SHA1(9e33ee04f22a9174c29fafb8e71781fa330a7a08) )
374374ROM_END
375375
trunk/src/mame/drivers/dreamwld.c
r242066r242067
372372
373373READ32_MEMBER(dreamwld_state::dreamwld_protdata_r)
374374{
375//   static int count = 0;
375//  static int count = 0;
376376
377377
378//   printf("protection read %04x\n", count);
379//   count++;
378//  printf("protection read %04x\n", count);
379//  count++;
380380
381381   UINT8 *protdata = memregion("user1")->base();
382382   size_t protsize = memregion("user1")->bytes();
trunk/src/mame/drivers/fcrash.c
r242066r242067
27892789{
27902790   /* bootleg sprite ram */
27912791   m_bootleg_sprite_ram = (UINT16*)m_maincpu->space(AS_PROGRAM).install_ram(0x700000, 0x703fff);
2792   m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram);
2792   m_maincpu->space(AS_PROGRAM).install_ram(0x704000, 0x707fff, m_bootleg_sprite_ram);
27932793
27942794   DRIVER_INIT_CALL(cps1);
27952795}
r242066r242067
29142914GAME( 1992, sf2mdta,   sf2ce,    sf2mdt,    sf2mdt,   cps_state, sf2mdta,  ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   // 920313 - based on World version
29152915GAME( 1992, sf2mdtb,   sf2ce,    sf2mdt,    sf2mdtb,  cps_state, sf2mdtb,  ROT0,   "bootleg", "Street Fighter II': Magic Delta Turbo (bootleg, set 3)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   // 920313 - based on World version
29162916
2917GAME( 1992, sf2b,        sf2,       sf2b,       sf2mdt,   cps_state, sf2b,     ROT0,   "bootleg", "Street Fighter II: The World Warrior (bootleg)",  GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )   //910204 - based on World version
2917GAME( 1992, sf2b,      sf2,      sf2b,      sf2mdt,   cps_state, sf2b,     ROT0,   "bootleg", "Street Fighter II: The World Warrior (bootleg)",  GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) //910204 - based on World version
29182918
29192919GAME( 1992, sf2m9,     sf2ce,    sf2m1,     sf2,      cps_state, dinopic,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (M9, bootleg)",  GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // 920313 ETC
29202920
trunk/src/mame/drivers/gts3.c
r242066r242067
247247   m_lampclk = clk_bit;
248248
249249
250//   printf("B=%s=%X ",machine().describe_context(),data&0xe0);
250//  printf("B=%s=%X ",machine().describe_context(),data&0xe0);
251251}
252252
253253READ8_MEMBER( gts3_state::u4a_r )
trunk/src/mame/drivers/gts3a.c
r242066r242067
55  PINBALL
66  Gottlieb System 3
77  Dot Matrix Display
8 
8
99  You need to pick "Pixel Aspect (4:1)" video option in the tab menu.
1010
1111Status:
r242066r242067
256256   m_lampclk = clk_bit;
257257
258258
259//   printf("B=%s=%X ",machine().describe_context(),data&0xe0);
259//  printf("B=%s=%X ",machine().describe_context(),data&0xe0);
260260}
261261
262262READ8_MEMBER( gts3a_state::u4a_r )
trunk/src/mame/drivers/gts80b.c
r242066r242067
252252INPUT_PORTS_END
253253
254254static const UINT16 patterns[] = {
255  /* 0x00-0x07 */ 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
256  /* 0x08-0x0f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
257  /* 0x10-0x17 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
258  /* 0x18-0x1f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
259  /* 0x20-0x27 */ 0x0000, 0x0309, 0x0220, 0x2A4E, 0x2A6D, 0x6E65, 0x135D, 0x0400,
260  /* 0x28-0x2f */ 0x1400, 0x4100, 0x7F40, 0x2A40, 0x0000, 0x0840, 0x0000, 0x4400,
261  /* 0x30-0x37 */ 0x003f, 0x2200, 0x085B, 0x084f, 0x0866, 0x086D, 0x087D, 0x0007,
262  /* 0x38-0x3f */ 0x087F, 0x086F, 0x0009, 0x4001, 0x4408, 0x0848, 0x1108, 0x2803,
263  /* 0x40-0x47 */ 0x205F, 0x0877, 0x2A0F, 0x0039, 0x220F, 0x0079, 0x0071, 0x083D,
264  /* 0x48-0x4f */ 0x0876, 0x2209, 0x001E, 0x1470, 0x0038, 0x0536, 0x1136, 0x003f,
265  /* 0x50-0x57 */ 0x0873, 0x103F, 0x1873, 0x086D, 0x2201, 0x003E, 0x4430, 0x5036,
266  /* 0x58-0x5f */ 0x5500, 0x2500, 0x4409, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
267  /* 0x60-0x67 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
268  /* 0x68-0x6f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
269  /* 0x70-0x77 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
270  /* 0x78-0x7f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
255   /* 0x00-0x07 */ 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
256   /* 0x08-0x0f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
257   /* 0x10-0x17 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
258   /* 0x18-0x1f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
259   /* 0x20-0x27 */ 0x0000, 0x0309, 0x0220, 0x2A4E, 0x2A6D, 0x6E65, 0x135D, 0x0400,
260   /* 0x28-0x2f */ 0x1400, 0x4100, 0x7F40, 0x2A40, 0x0000, 0x0840, 0x0000, 0x4400,
261   /* 0x30-0x37 */ 0x003f, 0x2200, 0x085B, 0x084f, 0x0866, 0x086D, 0x087D, 0x0007,
262   /* 0x38-0x3f */ 0x087F, 0x086F, 0x0009, 0x4001, 0x4408, 0x0848, 0x1108, 0x2803,
263   /* 0x40-0x47 */ 0x205F, 0x0877, 0x2A0F, 0x0039, 0x220F, 0x0079, 0x0071, 0x083D,
264   /* 0x48-0x4f */ 0x0876, 0x2209, 0x001E, 0x1470, 0x0038, 0x0536, 0x1136, 0x003f,
265   /* 0x50-0x57 */ 0x0873, 0x103F, 0x1873, 0x086D, 0x2201, 0x003E, 0x4430, 0x5036,
266   /* 0x58-0x5f */ 0x5500, 0x2500, 0x4409, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
267   /* 0x60-0x67 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
268   /* 0x68-0x6f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
269   /* 0x70-0x77 */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
270   /* 0x78-0x7f */ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
271271};
272272
273273READ8_MEMBER( gts80b_state::port1a_r )
r242066r242067
410410MACHINE_CONFIG_END
411411
412412//static MACHINE_CONFIG_DERIVED( gts80b_ss, gts80b )
413//   MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
414//   //MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound")  // votrax crashes
415//   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
413//  MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
414//  //MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound")  // votrax crashes
415//  MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
416416//MACHINE_CONFIG_END
417417
418418static MACHINE_CONFIG_DERIVED( gts80b_s1, gts80b )
trunk/src/mame/drivers/harddriv.c
r242066r242067
342342
343343harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
344344   : device_t(mconfig, HARDDRIV_DEVICE, "Hard Drivin' PCB Family", tag, owner, clock, "harddriv_pcb", __FILE__),
345/*   device_video_interface(mconfig, *this, false), */
345/*  device_video_interface(mconfig, *this, false), */
346346         m_maincpu(*this, "maincpu"),
347347         m_gsp(*this, "gsp"),
348348         m_msp(*this, "msp"),
r242066r242067
433433         m_ds3xdsp_sdata(0),
434434         m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer"),
435435         m_adc_control(0),
436          m_adc8_select(0),
437           m_adc8_data(0),
438           m_adc12_select(0),
439           m_adc12_byte(0),
440           m_adc12_data(0),
441           m_hdc68k_last_wheel(0),
442           m_hdc68k_last_port1(0),
443           m_hdc68k_wheel_edge(0),
444           m_hdc68k_shifter_state(0),
445           m_st68k_sloop_bank(0),
446           m_st68k_last_alt_sloop_offset(0),
447          m_next_msp_sync(0),
436         m_adc8_select(0),
437         m_adc8_data(0),
438         m_adc12_select(0),
439         m_adc12_byte(0),
440         m_adc12_data(0),
441         m_hdc68k_last_wheel(0),
442         m_hdc68k_last_port1(0),
443         m_hdc68k_wheel_edge(0),
444         m_hdc68k_shifter_state(0),
445         m_st68k_sloop_bank(0),
446         m_st68k_last_alt_sloop_offset(0),
447         m_next_msp_sync(0),
448448         m_soundflag(0),
449          m_mainflag(0),
450           m_sounddata(0),
451           m_maindata(0),
452           m_dacmute(0),
453           m_cramen(0),
454           m_irq68k(0),
455           m_sound_rom_offs(0),
456           m_rombase(0),
457           m_romsize(0),
458           m_last_bio_cycles(0),
459           m_vram_mask(0),
460           m_shiftreg_enable(0),
461           m_gsp_shiftreg_source(0),
449         m_mainflag(0),
450         m_sounddata(0),
451         m_maindata(0),
452         m_dacmute(0),
453         m_cramen(0),
454         m_irq68k(0),
455         m_sound_rom_offs(0),
456         m_rombase(0),
457         m_romsize(0),
458         m_last_bio_cycles(0),
459         m_vram_mask(0),
460         m_shiftreg_enable(0),
461         m_gsp_shiftreg_source(0),
462462         m_gfx_finescroll(0),
463463         m_gfx_palettebank(0),
464464         m_dac(*this, "dac"),
r242066r242067
526526
527527WRITE16_MEMBER( harddriv_state::watchdog_reset16_w )
528528{
529
530529}
531530
532531static ADDRESS_MAP_START( driver_68k_map, AS_PROGRAM, 16, harddriv_state )
r242066r242067
876875
877876   PORT_START("mainpcb:12BADC3")       /* b80000 - 12 bit ADC 3 */
878877   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
879   
878
880879INPUT_PORTS_END
881880
882881
r242066r242067
964963
965964static INPUT_PORTS_START( racedriv_pan )
966965   PORT_INCLUDE( racedriv )
967   
966
968967   PORT_START("leftpcb:IN0")       /* 600000 */
969968   PORT_DIPNAME( 0x01, 0x01, "Diagnostic jumper (Left)" )
970969   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
r242066r242067
15091508/* Driver board with MSP (used by Hard Drivin' cockpit) */
15101509static MACHINE_CONFIG_FRAGMENT( driver_msp )
15111510
1512   MCFG_FRAGMENT_ADD( driver_nomsp )
1511   MCFG_FRAGMENT_ADD( driver_nomsp )
15131512
15141513   /* basic machine hardware */
15151514   MCFG_CPU_ADD("msp", TMS34010, XTAL_50MHz)
r242066r242067
15261525/* Multisync board without MSP (used by STUN Runner, Steel Talons, Race Drivin' compact) */
15271526static MACHINE_CONFIG_FRAGMENT( multisync_nomsp )
15281527
1529   MCFG_FRAGMENT_ADD( driver_nomsp )
1528   MCFG_FRAGMENT_ADD( driver_nomsp )
15301529
15311530   /* basic machine hardware */
15321531   MCFG_CPU_MODIFY("maincpu")
r242066r242067
15471546/* Multisync board with MSP (used by Hard Drivin' compact) */
15481547static MACHINE_CONFIG_FRAGMENT( multisync_msp )
15491548
1550   MCFG_FRAGMENT_ADD( multisync_nomsp )
1549   MCFG_FRAGMENT_ADD( multisync_nomsp )
15511550
15521551   /* basic machine hardware */
15531552   MCFG_CPU_ADD("msp", TMS34010, XTAL_50MHz)
r242066r242067
15641563/* Multisync II board (used by Hard Drivin's Airborne) */
15651564static MACHINE_CONFIG_FRAGMENT( multisync2 )
15661565
1567   MCFG_FRAGMENT_ADD( multisync_nomsp )
1566   MCFG_FRAGMENT_ADD( multisync_nomsp )
15681567
15691568   /* basic machine hardware */
15701569   MCFG_CPU_MODIFY("maincpu")
r242066r242067
16971696 *************************************/
16981697
16991698static MACHINE_CONFIG_FRAGMENT( harddriv )
1700   MCFG_FRAGMENT_ADD( driver_msp )
1699   MCFG_FRAGMENT_ADD( driver_msp )
17011700   /* basic machine hardware */        /* original driver board with MSP */
17021701   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
17031702   MCFG_FRAGMENT_ADD( driversnd )      /* driver sound board */
17041703MACHINE_CONFIG_END
17051704
17061705static MACHINE_CONFIG_FRAGMENT( harddrivc )
1707   MCFG_FRAGMENT_ADD( multisync_msp )
1706   MCFG_FRAGMENT_ADD( multisync_msp )
17081707
17091708   /* basic machine hardware */        /* multisync board with MSP */
17101709   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
r242066r242067
17121711MACHINE_CONFIG_END
17131712
17141713static MACHINE_CONFIG_FRAGMENT( racedriv )
1715   MCFG_FRAGMENT_ADD( driver_nomsp )
1714   MCFG_FRAGMENT_ADD( driver_nomsp )
17161715
17171716   /* basic machine hardware */        /* original driver board without MSP */
17181717   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
r242066r242067
17221721
17231722static MACHINE_CONFIG_FRAGMENT( racedrivc )
17241723
1725   MCFG_FRAGMENT_ADD( multisync_nomsp )
1724   MCFG_FRAGMENT_ADD( multisync_nomsp )
17261725
17271726   /* basic machine hardware */        /* multisync board without MSP */
17281727   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
r242066r242067
17331732
17341733static MACHINE_CONFIG_FRAGMENT( racedrivc_panorama_side )
17351734
1736   MCFG_FRAGMENT_ADD( multisync_nomsp )
1735   MCFG_FRAGMENT_ADD( multisync_nomsp )
17371736
17381737   /* basic machine hardware */        /* multisync board without MSP */
17391738   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
1740//   MCFG_FRAGMENT_ADD( dsk )            /* DSK board */
1741//   MCFG_FRAGMENT_ADD( driversnd )      /* driver sound board */
1739//  MCFG_FRAGMENT_ADD( dsk )            /* DSK board */
1740//  MCFG_FRAGMENT_ADD( driversnd )      /* driver sound board */
17421741MACHINE_CONFIG_END
17431742
17441743WRITE_LINE_MEMBER(harddriv_state::sound_int_write_line)
r242066r242067
17501749
17511750static MACHINE_CONFIG_FRAGMENT( stunrun )
17521751
1753   MCFG_FRAGMENT_ADD( multisync_nomsp )
1752   MCFG_FRAGMENT_ADD( multisync_nomsp )
17541753
17551754   /* basic machine hardware */        /* multisync board without MSP */
17561755   MCFG_CPU_MODIFY("gsp")
r242066r242067
17701769MACHINE_CONFIG_END
17711770
17721771static MACHINE_CONFIG_FRAGMENT( steeltal )
1773   MCFG_FRAGMENT_ADD( multisync_msp )
1772   MCFG_FRAGMENT_ADD( multisync_msp )
17741773
17751774   /* basic machine hardware */        /* multisync board with MSP */
17761775   MCFG_FRAGMENT_ADD( ds3 )            /* DS III board */
r242066r242067
17931792
17941793static MACHINE_CONFIG_FRAGMENT( strtdriv )
17951794
1796   MCFG_FRAGMENT_ADD( multisync_nomsp )
1795   MCFG_FRAGMENT_ADD( multisync_nomsp )
17971796
17981797   /* basic machine hardware */        /* multisync board */
17991798   MCFG_FRAGMENT_ADD( ds3 )            /* DS III board */
r242066r242067
18051804
18061805static MACHINE_CONFIG_FRAGMENT( hdrivair )
18071806
1808   MCFG_FRAGMENT_ADD( multisync2 )
1807   MCFG_FRAGMENT_ADD( multisync2 )
18091808
18101809   /* basic machine hardware */        /* multisync II board */
18111810   MCFG_FRAGMENT_ADD( ds3 )            /* DS IV board */
r242066r242067
18331832/* Compact */
18341833
18351834void harddrivc_board_device_state::device_start()
1836{   
1835{
18371836   init_harddrivc();
18381837   harddriv_state::device_start();
18391838}
r242066r242067
20902089   MCFG_DEVICE_ADD("leftpcb", RACEDRIVC_PANORAMA_SIDE_BOARD_DEVICE, 0)
20912090   MCFG_DEVICE_ADD("rightpcb", RACEDRIVC_PANORAMA_SIDE_BOARD_DEVICE, 0)
20922091
2093//   MCFG_QUANTUM_TIME(attotime::from_hz(100000))
2092//  MCFG_QUANTUM_TIME(attotime::from_hz(100000))
20942093   MCFG_DEVICE_MODIFY("mainpcb:duartn68681")
20952094   MCFG_MC68681_A_TX_CALLBACK(WRITELINE(racedriv_board_device_state,tx_a ))
20962095
2097   MCFG_TIMER_DRIVER_ADD_PERIODIC("hack_timer", harddriv_new_state, hack_timer, attotime::from_hz(60))   
2098//   MCFG_QUANTUM_TIME(attotime::from_hz(60000))
2096   MCFG_TIMER_DRIVER_ADD_PERIODIC("hack_timer", harddriv_new_state, hack_timer, attotime::from_hz(60))
2097//  MCFG_QUANTUM_TIME(attotime::from_hz(60000))
20992098MACHINE_CONFIG_END
21002099
21012100// this is an ugly hack, otherwise MAME's core can't seem to handle partial updates if you have multiple screens with different update frequencies.
r242066r242067
21552154   ROM_LOAD( "harddriv.200e",   0x000000, 0x000800, CRC(aed020f7) SHA1(494fc2eb74b4924c07f18bef5e69efd5476deec2) )
21562155
21572156   ROM_REGION( 0x800, "mainpcb:210e", 0 )
2158   ROM_LOAD( "harddriv.210e",   0x000000, 0x000800, CRC(4a91835b) SHA1(96f0087ba7e577748758a2fbe61225048862bb65) )   
2157   ROM_LOAD( "harddriv.210e",   0x000000, 0x000800, CRC(4a91835b) SHA1(96f0087ba7e577748758a2fbe61225048862bb65) )
21592158ROM_END
21602159
21612160
r242066r242067
42044203
42054204   ROM_REGION( 0x800, "mainpcb:210e", 0 )
42064205   ROM_LOAD( "racedriv.210e",   0x000000, 0x000800, CRC(3d7c732e) SHA1(e7de81d4a54327514fdd339e93c888c63a344d2c) )
4207   
4206
42084207   /* Left PCB ( Multisync PCB (A046901) )*/
42094208   ROM_REGION( 0x200000, "leftpcb:maincpu", 0 )        /* 2MB for 68000 code */
42104209   ROM_LOAD16_BYTE( "088-2002.bin", 0x000000, 0x010000, CRC(77724070) SHA1(5862f30f7e2ab9c0beb06cf5599bcb1ff97f3a47) )
r242066r242067
42334232   ROM_LOAD16_BYTE( "088-1022.bin",  0x40001, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
42344233
42354234   ROM_REGION( 0x800, "leftpcb:200e", 0 ) // set to display left monitor, controls not calibrated with valid values (don't think they need to be)
4236   ROM_LOAD( "leftpcb_200e",   0x000000, 0x000800, CRC(a618d02e) SHA1(cc1068fe4f6ec9a26b6e8fdbe05f4364a64559c1) )   
4235   ROM_LOAD( "leftpcb_200e",   0x000000, 0x000800, CRC(a618d02e) SHA1(cc1068fe4f6ec9a26b6e8fdbe05f4364a64559c1) )
42374236   ROM_REGION( 0x800, "leftpcb:210e", 0 )
42384237   ROM_LOAD( "leftpcb_210e",   0x000000, 0x000800, CRC(108ea834) SHA1(d7aec78287647dc52f92143cdb6d7765de0b4e39) )
42394238
r242066r242067
42654264   ROM_LOAD16_BYTE( "088-1022.bin",  0x40001, 0x10000, CRC(4f1e1c5d) SHA1(3e72813129cae9e9bf084bfb1b747aa46b92591e) )
42664265
42674266   ROM_REGION( 0x800, "rightpcb:200e", 0 ) // set to display right monitor, controls not calibrated with valid values (don't think they need to be)
4268   ROM_LOAD( "rightpcb_200e",   0x000000, 0x000800, CRC(6f1b7094) SHA1(6194a5b99aebe43f02c8d267290207b32c5bdbbd) )   
4267   ROM_LOAD( "rightpcb_200e",   0x000000, 0x000800, CRC(6f1b7094) SHA1(6194a5b99aebe43f02c8d267290207b32c5bdbbd) )
42694268   ROM_REGION( 0x800, "rightpcb:210e", 0 )
42704269   ROM_LOAD( "rightpcb_210e",   0x000000, 0x000800, CRC(108ea834) SHA1(d7aec78287647dc52f92143cdb6d7765de0b4e39) )
42714270ROM_END
r242066r242067
50785077   m_gsp_protection = m_gsp->space(AS_PROGRAM).install_write_handler(gsp_protection, gsp_protection + 0x0f, write16_delegate(FUNC(harddriv_state::hdgsp_protection_w), this));
50795078
50805079   /* set up gsp speedup handler (todo, work these out) */
5081//   m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
5082//   m_gsp->space(AS_PROGRAM).install_read_handler(0xfff76f60, 0xfff76f6f, read16_delegate(FUNC(harddriv_state::rdgsp_speedup1_r), this));
5083//   m_gsp_speedup_pc = 0xfff43a00;
5080//  m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM).install_write_handler(0xfff76f60, 0xfff76f6f, write16_delegate(FUNC(harddriv_state::rdgsp_speedup1_w), this));
5081//  m_gsp->space(AS_PROGRAM).install_read_handler(0xfff76f60, 0xfff76f6f, read16_delegate(FUNC(harddriv_state::rdgsp_speedup1_r), this));
5082//  m_gsp_speedup_pc = 0xfff43a00;
50845083
50855084   /* set up adsp speedup handlers */
50865085   m_adsp->space(AS_DATA).install_read_handler(0x1fff, 0x1fff, read16_delegate(FUNC(harddriv_state::hdadsp_speedup_r), this));
r242066r242067
53015300
53025301GAME( 1993, hdrivair,  0,        hdrivair_machine, hdrivair, driver_device, 0, ROT0, "Atari Games", "Hard Drivin's Airborne (prototype)", GAME_IMPERFECT_SOUND )
53035302GAME( 1993, hdrivairp, hdrivair, hdrivairp_machine, hdrivair, driver_device, 0,ROT0, "Atari Games", "Hard Drivin's Airborne (prototype, early rev)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5304
5305
trunk/src/mame/drivers/lethal.c
r242066r242067
359359ADDRESS_MAP_END
360360
361361static ADDRESS_MAP_START( bank4000_map, AS_PROGRAM, 8, lethal_state )
362    // VRD = 0 or 1, CBNK = 0
362   // VRD = 0 or 1, CBNK = 0
363363   AM_RANGE(0x0840, 0x084f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k053244", k05324x_device, k053244_r, k053244_w)
364364   AM_RANGE(0x0880, 0x089f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k054000", k054000_device, read, write)
365365   AM_RANGE(0x08c6, 0x08c6) AM_MIRROR(0x8000) AM_WRITE(sound_cmd_w)
trunk/src/mame/drivers/lindbergh.c
r242066r242067
246246#if 0
247247static ADDRESS_MAP_START(lindbergh_map, AS_PROGRAM, 32, lindbergh_state)
248248   AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
249                            //   AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
250                            //   AM_RANGE(0x000c0000, 0x000cffff) AM_ROM AM_REGION("vid_bios", 0)
249                              //  AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
250                              //  AM_RANGE(0x000c0000, 0x000cffff) AM_ROM AM_REGION("vid_bios", 0)
251251//  0xd0000 - 0xdffff tested, wants 0x414d ("AM") in there
252252   AM_RANGE(0x000f0000, 0x000fffff) AM_ROM AM_REGION("mb_bios", 0xf0000)
253//   AM_RANGE(0xfd000000, 0xfd3fffff) AM_ROM AM_REGION("jvs_bios", 0)    /* Hack to see the data */
253//  AM_RANGE(0xfd000000, 0xfd3fffff) AM_ROM AM_REGION("jvs_bios", 0)    /* Hack to see the data */
254254   AM_RANGE(0xfff00000, 0xffffffff) AM_ROM AM_REGION("mb_bios", 0)     /* System BIOS */
255255ADDRESS_MAP_END
256256
257257static ADDRESS_MAP_START(lindbergh_io, AS_IO, 32, lindbergh_state)
258//   AM_IMPORT_FROM(pcat32_io_common)
258//  AM_IMPORT_FROM(pcat32_io_common)
259259
260//   AM_RANGE(0x00e8, 0x00ef) AM_NOP
261//   AM_RANGE(0x0cf8, 0x0cff) AM_DEVREADWRITE("pcibus", pci_bus_legacy_device, read, write)
260//  AM_RANGE(0x00e8, 0x00ef) AM_NOP
261//  AM_RANGE(0x0cf8, 0x0cff) AM_DEVREADWRITE("pcibus", pci_bus_legacy_device, read, write)
262262ADDRESS_MAP_END
263263#endif
264264
r242066r242067
277277static MACHINE_CONFIG_START(lindbergh, lindbergh_state)
278278//  MCFG_CPU_ADD("maincpu", PENTIUM, 2800000000U) /* Actually Celeron D at 2,8 GHz */
279279   MCFG_CPU_ADD("maincpu", PENTIUM4, 28000000U*5) /* Actually Celeron D at 2,8 GHz */
280//   MCFG_CPU_PROGRAM_MAP(lindbergh_map)
281//   MCFG_CPU_IO_MAP(lindbergh_io)
282//   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
280//  MCFG_CPU_PROGRAM_MAP(lindbergh_map)
281//  MCFG_CPU_IO_MAP(lindbergh_io)
282//  MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
283283
284//   MCFG_FRAGMENT_ADD( pcat_common )
285//   MCFG_FRAGMENT_ADD( pcvideo_vga )
284//  MCFG_FRAGMENT_ADD( pcat_common )
285//  MCFG_FRAGMENT_ADD( pcvideo_vga )
286286
287//   MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
287//  MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
288288
289289   MCFG_PCI_ROOT_ADD(                ":pci")
290290   MCFG_I82875P_HOST_ADD(            ":pci:00.0",                        0x103382c0, ":maincpu", 512*1024*1024)
trunk/src/mame/drivers/maygay1b.c
r242066r242067
167167   int i;
168168   for (i=0; i<8; i++)
169169   {
170      if ( data & (1 << i) )     
170      if ( data & (1 << i) )
171171      {
172172         output_set_indexed_value("triac", i, data & (1 << i));
173173      }
r242066r242067
377377      break;
378378      case 2: // Enable
379379      {
380            if ( m_NMIENABLE == 0 && ( data & 1 ))
380         if ( m_NMIENABLE == 0 && ( data & 1 ))
381381         {
382382            m_NMIENABLE = (data & 1);
383383            cpu0_nmi();
384384         }
385         m_NMIENABLE = (data & 1);     
385         m_NMIENABLE = (data & 1);
386386      }
387387      break;
388388      case 3: // RTS
r242066r242067
495495READ8_MEMBER(maygay1b_state::nec_reset_r)
496496{
497497   m_upd7759->reset_w(0);
498   m_upd7759->reset_w(1);   
498   m_upd7759->reset_w(1);
499499   return 0xff;
500500}
501501
r242066r242067
504504   m_upd7759->set_bank_base(0x00000);
505505   m_upd7759->port_w(space, 0, data);
506506   m_upd7759->start_w(0);
507   m_upd7759->start_w(1);   
507   m_upd7759->start_w(1);
508508}
509509
510510WRITE8_MEMBER(maygay1b_state::nec_bank1_w)
r242066r242067
512512   m_upd7759->set_bank_base(0x20000);
513513   m_upd7759->port_w(space, 0, data);
514514   m_upd7759->start_w(0);
515   m_upd7759->start_w(1);   
515   m_upd7759->start_w(1);
516516}
517517
518518static ADDRESS_MAP_START( m1_nec_memmap, AS_PROGRAM, 8, maygay1b_state )
r242066r242067
665665   MCFG_CPU_PROGRAM_MAP(m1_nec_memmap)
666666
667667   MCFG_DEVICE_REMOVE("msm6376")
668   
668
669669   MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK)
670670   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
671671   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
trunk/src/mame/drivers/naomi.c
r242066r242067
341341Sega Tetris                                     840-0018C    22909    6 (64Mb)   present     315-6213  317-0268-COM
342342Slashout                                        840-0041C    23341   17 (64Mb)   ?           315-6213  317-0286-COM   joystick + 4 buttons
343343Spawn In the Demon's Hand (Rev B)               841-0005C    22977B  10 (64Mb)   ?           315-6213  317-5051-COM   joystick + 4 buttons
344Super Major League '99                          840-0012C    22059   21 (64Mb)   ?           315-6213  ?
344Super Major League '99                          840-0012C    22059   21 (64Mb)   ?           315-6213  ?
345345The Typing of the Dead (Rev A)                  840-0026C    23021A  20 (64Mb)   present     315-6213  not present
346346Touch de UNO! / Unou Nouryoku Check Machine     840-0008C    22073    4 (64Mb)   present     315-6213  317-0255-JPN   requires special JVS board with touch input and printer
347347Toy Fighter / Waffupu                           840-0011C    22035   10 (64Mb)   present     315-6212  317-0257-COM   joystick + 3 buttons
r242066r242067
78357835
78367836   ROM_REGION( 0xa800000, "rom_board", ROMREGION_ERASEFF)
78377837   ROM_LOAD( "epr-23819a.ic22", 0x0000000, 0x00400000, CRC(92f11b29) SHA1(b33f7eefb849754cfe194be1d48d770ed77ff69a) )
7838   ROM_LOAD("mpr-23808.ic1",  0x00800000,   0x01000000, CRC(e911bc86) SHA1(0dc658851e20425b2e697e538bb4297a221f6ae8) )
7839   ROM_LOAD("mpr-23809.ic2",  0x01800000,   0x01000000, CRC(2716aba0) SHA1(4c245874da244926bf9ac6636af4fa67e07a21e8) )
7840   ROM_LOAD("mpr-23810.ic3",  0x02800000,   0x01000000, CRC(2226accb) SHA1(c4dc71e87c2ccd866f4180129181b7ced8caf22c) )
7841   ROM_LOAD("mpr-23811.ic4",  0x03800000,   0x01000000, CRC(bbad4a93) SHA1(724c3376102b2dc79b852af1e90748b2e0023b82) )
7842   ROM_LOAD("mpr-23812.ic5",  0x04800000,   0x01000000, CRC(7beabe22) SHA1(d3cd926fc768d480ff45f1e30024bb0e31bd7d2c) )
7843   ROM_LOAD("mpr-23813.ic6",  0x05800000,   0x01000000, CRC(fe0b94ea) SHA1(0e46dff932036bec49c78a612bcfd27e07b516e8) )
7844   ROM_LOAD("mpr-23814.ic7",  0x06800000,   0x01000000, CRC(0cdf7325) SHA1(41668f873b7842dac1bc85aa2b6bd6512edc9b64) )
7845   ROM_LOAD("mpr-23815.ic8",  0x07800000,   0x01000000, CRC(ef327ab8) SHA1(9dfc564084a75b9c3935374347f1709d2e86e469) )
7846   ROM_LOAD("mpr-23816.ic9",  0x08800000,   0x01000000, CRC(bbaf0765) SHA1(3b79a4eff504b2156bea8b86c6cdd8e41e7bf268) )
7847   ROM_LOAD("mpr-23817.ic10", 0x09800000,   0x01000000, CRC(e179cfb6) SHA1(1120036238439f8ac1041150396e4b60e4a243bc) )
7838   ROM_LOAD("mpr-23808.ic1",  0x00800000,  0x01000000, CRC(e911bc86) SHA1(0dc658851e20425b2e697e538bb4297a221f6ae8) )
7839   ROM_LOAD("mpr-23809.ic2",  0x01800000,  0x01000000, CRC(2716aba0) SHA1(4c245874da244926bf9ac6636af4fa67e07a21e8) )
7840   ROM_LOAD("mpr-23810.ic3",  0x02800000,  0x01000000, CRC(2226accb) SHA1(c4dc71e87c2ccd866f4180129181b7ced8caf22c) )
7841   ROM_LOAD("mpr-23811.ic4",  0x03800000,  0x01000000, CRC(bbad4a93) SHA1(724c3376102b2dc79b852af1e90748b2e0023b82) )
7842   ROM_LOAD("mpr-23812.ic5",  0x04800000,  0x01000000, CRC(7beabe22) SHA1(d3cd926fc768d480ff45f1e30024bb0e31bd7d2c) )
7843   ROM_LOAD("mpr-23813.ic6",  0x05800000,  0x01000000, CRC(fe0b94ea) SHA1(0e46dff932036bec49c78a612bcfd27e07b516e8) )
7844   ROM_LOAD("mpr-23814.ic7",  0x06800000,  0x01000000, CRC(0cdf7325) SHA1(41668f873b7842dac1bc85aa2b6bd6512edc9b64) )
7845   ROM_LOAD("mpr-23815.ic8",  0x07800000,  0x01000000, CRC(ef327ab8) SHA1(9dfc564084a75b9c3935374347f1709d2e86e469) )
7846   ROM_LOAD("mpr-23816.ic9",  0x08800000,  0x01000000, CRC(bbaf0765) SHA1(3b79a4eff504b2156bea8b86c6cdd8e41e7bf268) )
7847   ROM_LOAD("mpr-23817.ic10", 0x09800000,  0x01000000, CRC(e179cfb6) SHA1(1120036238439f8ac1041150396e4b60e4a243bc) )
78487848
78497849   ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 )
78507850ROM_END
r242066r242067
89488948/* 0039 */ GAME( 2000, gram2000, naomi,    naomim1, naomi,   naomi_state, gram2000,ROT0, "Sega", "Giant Gram 2000 (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
89498949/* 0040 */ GAME( 2000, wwfroyal, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "WWF Royal Rumble (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
89508950/* 0041 */ GAME( 2000, slasho,   naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Slashout (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
8951// 0042 Ferrari F355 Challenge 2 (twin) - identical to 834-????? listed above.
8951// 0042 Ferrari F355 Challenge 2 (twin) - identical to 834-????? listed above.
89528952/* 0043 */ GAME( 2000, crackndj, naomi,    naomim2, crackndj,naomi_state, naomi,   ROT0, "Sega", "Crackin' DJ", GAME_FLAGS )
89538953/* 0044 */ GAME( 2000, csmasho,  csmash,   naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Cosmic Smash (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
89548954/* 0044 */ GAME( 2000, csmash,   naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Cosmic Smash (JPN, USA, EXP, KOR, AUS) (Rev A)", GAME_FLAGS )
trunk/src/mame/drivers/pacman.c
r242066r242067
40814081
40824082
40834083
4084  256*4 = 1024 bit
4085 
4086     +--\/--+
4087  A6 |01  16| Vcc
4088  A5 |02  15| A7
4089  A4 |03  14| /CE2
4090  A3 |04  13| /CE1
4091  A0 |05  12| D0
4092  A1 |06  11| D1
4093  A2 |07  10| D2
4094  GND|08  09| D3
4095     +------+
4084  256*4 = 1024 bit
40964085
4097   NEC   Fujitsu Fairchild Intersil Mitsubishi
4098  ------ ------- --------- -------- ----------
4099  uPB423 MB7052   93427    IM5623    M54700
4100         MB7114
4101 
4102  Signetics     MMI    TI       Harris  Raytheon  AMD   National Intel  OKI
4086     +--\/--+
4087  A6 |01  16| Vcc
4088  A5 |02  15| A7
4089  A4 |03  14| /CE2
4090  A3 |04  13| /CE1
4091  A0 |05  12| D0
4092  A1 |06  11| D1
4093  A2 |07  10| D2
4094  GND|08  09| D3
4095     +------+
4096
4097   NEC   Fujitsu Fairchild Intersil Mitsubishi
4098  ------ ------- --------- -------- ----------
4099  uPB423 MB7052   93427    IM5623    M54700
4100         MB7114
4101
4102  Signetics     MMI    TI       Harris  Raytheon  AMD   National Intel  OKI
41034103  ------------ ------ -------- -------- -------- ------ -------- ----- --------
4104  82S129       6301-1 TBP24S10 HM7611-5 29661    27S21  74S287   3621  MBL8521A
4104  82S129       6301-1 TBP24S10 HM7611-5 29661    27S21  74S287   3621  MBL8521A
41054105  82S129A      63S141 TBP34S10 HM7611A           27S21A
41064106  82S27                                                          27S11
4107 
41084107
41094108
4109
41104110  Dumps and docs by Robbie.
41114111  Credits: Roberto Fresca, ytsejam
41124112
trunk/src/mame/drivers/peplus.c
r242066r242067
142142   XnnnnnnP Poker Data. Contains poker game + paytable percentages
143143             Data roms will not work with every Program rom. Incompatible combos report: Incompatible Data EPROM
144144             X000055P is a good example, it works with 19 XP000xxx Program roms. Others may be as few as 2.
145  XMPnnnnn  Multi-Poker Programs. Different options for each set, but all use the same XMnnnnnP data
145  XMPnnnnn  Multi-Poker Programs. Different options for each set, but all use the same XMnnnnnP data
146146             XMP00002 through XMP00006 & XMP00024 Use the XM000xxP Multi-Poker Data
147147             XMP00014, XMP00017 & XMP00030 Use the WING Board add-on and use the XnnnnnnP Poker Data (Not all are compatible!)
148148             XMP00013, XMP00022 & XMP00026 Use the WING Board add-on & CG2346 + CAPX2346 for Spanish paytables
r242066r242067
226226   required_device<screen_device> m_screen;
227227   required_device<gfxdecode_device> m_gfxdecode;
228228   required_device<palette_device> m_palette;
229   
229
230230   required_shared_ptr<UINT8> m_cmos_ram;
231231   required_shared_ptr<UINT8> m_program_ram;
232232   required_shared_ptr<UINT8> m_s3000_ram;
r242066r242067
237237   required_shared_ptr<UINT8> m_sd000_ram;
238238   required_shared_ptr<UINT8> m_sf000_ram;
239239   required_shared_ptr<UINT8> m_io_port;
240   
240
241241   tilemap_t *m_bg_tilemap;
242242   UINT8 m_wingboard;
243243   UINT8 m_doorcycle;
r242066r242067
265265   UINT8 m_bv_data_bit;
266266   UINT8 m_bv_loop_count;
267267   UINT16 id023_data;
268   
268
269269   DECLARE_WRITE8_MEMBER(peplus_bgcolor_w);
270270   DECLARE_WRITE8_MEMBER(peplus_crtc_display_w);
271271   DECLARE_WRITE8_MEMBER(peplus_duart_w);
trunk/src/mame/drivers/pse.c
r242066r242067
22
33 Project Support Engineering Games
44
5 Game Name                  DATA
5 Game Name                  DATA
66 --------------------------------
77 Maneater (1975)            YES
88 Knights in Armor (1976)    YES
r242066r242067
114114   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
115115
116116   ROM_REGION( 0x0800, "roms", ROMREGION_ERASE00 )
117   ROM_LOAD( "bd1.d2", 0x0000, 0x0400, CRC(e4c8e4ab) SHA1(0b989ca9369139f212dcea1d1461998f20057db8)) // computer program game code. 6341-1 or 82S181 according to Desert Patrol schematics
118   ROM_LOAD( "bd1.e2", 0x0000, 0x0400, CRC(256b3320) SHA1(712573e3d9625a84c54bbe2e3edafb8879a14b2e)) // computer program game code. 6341-1 or 82S181 according to Desert Patrol schematics
117   ROM_LOAD( "bd1.d2", 0x0000, 0x0400, CRC(e4c8e4ab) SHA1(0b989ca9369139f212dcea1d1461998f20057db8)) // computer program game code. 6341-1 or 82S181 according to Desert Patrol schematics
118   ROM_LOAD( "bd1.e2", 0x0000, 0x0400, CRC(256b3320) SHA1(712573e3d9625a84c54bbe2e3edafb8879a14b2e)) // computer program game code. 6341-1 or 82S181 according to Desert Patrol schematics
119119
120   ROM_LOAD( "bd2.l4", 0x0000, 0x0200, CRC(bc87c648) SHA1(c4709d155aa50cc87146abd152a11de618cfd64c)) // prom 1 contains aircraft target images and explosion image. pcb has 82S141; schematics show 6341-1
121   ROM_LOAD( "bd2.l1", 0x0000, 0x0800, CRC(f1e8ba9e) SHA1(605db3fdbaff4ba13729371ad0c4fbab3889378e)) // prom 2 contains parachute and man, falling man. pcb has 82S141; schematics show 6341-1
120   ROM_LOAD( "bd2.l4", 0x0000, 0x0200, CRC(bc87c648) SHA1(c4709d155aa50cc87146abd152a11de618cfd64c)) // prom 1 contains aircraft target images and explosion image. pcb has 82S141; schematics show 6341-1
121   ROM_LOAD( "bd2.l1", 0x0000, 0x0800, CRC(f1e8ba9e) SHA1(605db3fdbaff4ba13729371ad0c4fbab3889378e)) // prom 2 contains parachute and man, falling man. pcb has 82S141; schematics show 6341-1
122122
123   ROM_LOAD( "bd2.h7", 0x0000, 0x0020, NO_DUMP) // contains prom address codes and image speeds. Each image has its own speed and address block in the image PROM. chip is 82S123
123   ROM_LOAD( "bd2.h7", 0x0000, 0x0020, NO_DUMP) // contains prom address codes and image speeds. Each image has its own speed and address block in the image PROM. chip is 82S123
124124
125   ROM_LOAD( "bd3.d1", 0x0000, 0x0020, NO_DUMP ) // data in prom is organized to produce the waveform of a human scream. Chip type is 8574 or MM6301-0J
125   ROM_LOAD( "bd3.d1", 0x0000, 0x0020, NO_DUMP ) // data in prom is organized to produce the waveform of a human scream. Chip type is 8574 or MM6301-0J
126126ROM_END
127127
128128/*
129129ROM_START( knightar )
130   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
130    ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
131131
132   ROM_REGION( 0x0020, "roms", ROMREGION_ERASE00 )
133   ROM_LOAD( "1.m1" ) // Man rom stores image characters of knights. 82S115P or 8205R according to KIA schematics
134   ROM_LOAD( "2.m2" ) // Horse rom stores image characters of horses. 82S115P or 8205R according to KIA schematics
132    ROM_REGION( 0x0020, "roms", ROMREGION_ERASE00 )
133    ROM_LOAD( "1.m1" ) // Man rom stores image characters of knights. 82S115P or 8205R according to KIA schematics
134    ROM_LOAD( "2.m2" ) // Horse rom stores image characters of horses. 82S115P or 8205R according to KIA schematics
135135ROM_END
136136*/
137137
138138/*
139139ROM_START( gametree )
140   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
140    ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
141141
142   ROM_REGION( 0x0020, "roms", ROMREGION_ERASE00 )
143   ROM_LOAD( "bd1.d2" ) // computer program game code. 6341-1 or 82S181 according to Game Tree schematics
144   ROM_LOAD( "bd1.e2" ) // computer program game code. 6341-1 or 82S181 according to Game Tree schematics
142    ROM_REGION( 0x0020, "roms", ROMREGION_ERASE00 )
143    ROM_LOAD( "bd1.d2" ) // computer program game code. 6341-1 or 82S181 according to Game Tree schematics
144    ROM_LOAD( "bd1.e2" ) // computer program game code. 6341-1 or 82S181 according to Game Tree schematics
145145
146   ROM_LOAD( "bd2.f12" ) // prom 1 contains squirrel and squirrel point value. 82S141 or 6341-1 according to Game Tree layout
147   ROM_LOAD( "bd2.f14" ) // prom 1 contains squirrel and squirrel point value. 82S141 or 6341-1 according to Game Tree layout
146    ROM_LOAD( "bd2.f12" ) // prom 1 contains squirrel and squirrel point value. 82S141 or 6341-1 according to Game Tree layout
147    ROM_LOAD( "bd2.f14" ) // prom 1 contains squirrel and squirrel point value. 82S141 or 6341-1 according to Game Tree layout
148148
149149
150   ROM_LOAD( "bd2.e12" ) // prom 2 contains other targets (rabbit and turkey) and point values
151   ROM_LOAD( "bd2.e14" ) // prom 2 82S141 or 6341-1 according to Game Tree layout.
150    ROM_LOAD( "bd2.e12" ) // prom 2 contains other targets (rabbit and turkey) and point values
151    ROM_LOAD( "bd2.e14" ) // prom 2 82S141 or 6341-1 according to Game Tree layout.
152152
153153
154   ROM_LOAD( "bd2.a2" ) // contains prom address codes and image speeds. Each has its own speed and address block in the image prom.
154    ROM_LOAD( "bd2.a2" ) // contains prom address codes and image speeds. Each has its own speed and address block in the image prom.
155155
156   ROM_LOAD( "bd2.a3" ) // contains prom address codes and image speeds. 82S123 or 6331-1 according to Game Tree layout.
156    ROM_LOAD( "bd2.a3" ) // contains prom address codes and image speeds. 82S123 or 6331-1 according to Game Tree layout.
157157ROM_END
158158*/
159159
160160
161GAME( 1977, dpatrol, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Desert Patrol [TTL]", GAME_IS_SKELETON )
162//GAME( 1976, knightar, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Knights in Armor [TTL]", GAME_IS_SKELETON )
163//GAME( 1978, gametree, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Game Tree [TTL]", GAME_IS_SKELETON )
164
161GAME( 1977, dpatrol, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Desert Patrol [TTL]", GAME_IS_SKELETON )
162//GAME( 1976, knightar, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Knights in Armor [TTL]", GAME_IS_SKELETON )
163//GAME( 1978, gametree, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Game Tree [TTL]", GAME_IS_SKELETON )
trunk/src/mame/drivers/raiden2.c
r242066r242067
13681368   /* video hardware */
13691369   MCFG_SCREEN_ADD("screen", RASTER)
13701370   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
1371#if 1   
1371#if 1
13721372   MCFG_SCREEN_REFRESH_RATE(55.47) /* verified on pcb */
13731373   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(500) /* not accurate */)
13741374   MCFG_SCREEN_SIZE(44*8, 34*8)
trunk/src/mame/drivers/sbrkout.c
r242066r242067
66
77    Games supported:
88        * Super Breakout
9      * Super Breakout (Canyon and Vertical Breakout, prototype) - built from original source code
9        * Super Breakout (Canyon and Vertical Breakout, prototype) - built from original source code
1010
1111    Known issues:
1212        * none at this time
trunk/src/mame/drivers/segacoin.c
r242066r242067
33/***************************************************************************
44
55  Sega Z80 Coin Pusher hardware
6 
6
77  1992 - Western Dream
88  * 2 x Z80 (prg, sound), 3 x YM3438 (6ch), ..
99  Hexagon shaped cab, with a toy train riding circles in the top compartment.
1010  6 players, each with a coin pusher, and a LED roulette on the back panel.
11 
11
1212  more...
13 
1413
14
1515TODO:
1616- everything
1717
trunk/src/mame/drivers/segas16b.c
r242066r242067
61746174   ROM_LOAD16_BYTE( "epr-12326.a5",  0x00001, 0x20000, CRC(f998862b) SHA1(69902ab0162eb42e1d6a9792651a5d41cb77477d) )
61756175
61766176   ROM_REGION( 0x30000, "gfx1", 0 ) // tiles
6177   ROM_LOAD( "opr-12268.a14", 0x00000, 0x10000, CRC(e0dac07f) SHA1(c7f6de42eb93a8f34afdc300628735b5f40a34c2) )   // ROMS are Toshiba TMM24512AF one time programmable roms
6178   ROM_LOAD( "opr-12269.a15", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) )   // Some ROM boards might have standard EPR numbers with
6179   ROM_LOAD( "opr-12270.a16", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) )   //  standard EPROM chips instead
6177   ROM_LOAD( "opr-12268.a14", 0x00000, 0x10000, CRC(e0dac07f) SHA1(c7f6de42eb93a8f34afdc300628735b5f40a34c2) ) // ROMS are Toshiba TMM24512AF one time programmable roms
6178   ROM_LOAD( "opr-12269.a15", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) ) // Some ROM boards might have standard EPR numbers with
6179   ROM_LOAD( "opr-12270.a16", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) ) //  standard EPROM chips instead
61806180
61816181   ROM_REGION16_BE( 0x100000, "sprites", 0 ) // sprites
6182   ROM_LOAD16_BYTE( "opr-12279.b1", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )   // ROMS are Toshiba TMM24512AF one time programmable roms
6183   ROM_LOAD16_BYTE( "opr-12283.b5", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )   // Some ROM boards might have standard EPR numbers with
6184   ROM_LOAD16_BYTE( "opr-12278.b2", 0x40001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )   //  standard EPROM chips instead
6182   ROM_LOAD16_BYTE( "opr-12279.b1", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )   // ROMS are Toshiba TMM24512AF one time programmable roms
6183   ROM_LOAD16_BYTE( "opr-12283.b5", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )   // Some ROM boards might have standard EPR numbers with
6184   ROM_LOAD16_BYTE( "opr-12278.b2", 0x40001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )   //  standard EPROM chips instead
61856185   ROM_LOAD16_BYTE( "opr-12282.b6", 0x40000, 0x10000, CRC(e8671ee1) SHA1(a3732938c370f1936d867aae9c3d1e9bbfb57ede) )
61866186   ROM_LOAD16_BYTE( "opr-12277.b3", 0x80001, 0x10000, CRC(f16b6ba2) SHA1(00cc04c7b5aad82d51d2d252e1e57bcdc5e2c9e3) )
61876187   ROM_LOAD16_BYTE( "opr-12281.b7", 0x80000, 0x10000, CRC(1ef1077f) SHA1(8ce6fd7d32a20b93b3f91aaa43fe22720da7236f) )
r242066r242067
69176917
69186918GAME( 1994, toryumon,   0,        system16b_5797,      toryumon, segas16b_state,generic_5797,       ROT0,   "Sega", "Toryumon", 0 )
69196919
6920GAME( 1989, tturf,      0,        system16b_i8751,     tturf,    segas16b_state,tturf_5704,         ROT0,   "Sega / Sunsoft", "Tough Turf (set 2, Japan, 8751 317-0104)", 0 )
6920GAME( 1989, tturf,      0,        system16b_i8751,     tturf,    segas16b_state,tturf_5704,         ROT0,   "Sega / Sunsoft", "Tough Turf (set 2, Japan, 8751 317-0104)", 0 )
69216921GAME( 1989, tturfu,     tturf,    system16b_i8751,     tturf,    segas16b_state,generic_5358,       ROT0,   "Sega / Sunsoft", "Tough Turf (set 1, US, 8751 317-0099)", 0)
69226922
69236923GAME( 1988, wb3,        0,        system16b_i8751,     wb3,      segas16b_state,wb3_5704,           ROT0,   "Sega / Westone", "Wonder Boy III - Monster Lair (set 6, World, System 16B, 8751 317-0098)", 0 )
trunk/src/mame/drivers/segas18.c
r242066r242067
912912   PORT_INCLUDE( system18_generic )
913913
914914   PORT_MODIFY("DSW")
915   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
915   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
916916   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
917917   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
918918   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
919919   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
920   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )   PORT_DIPLOCATION("SW2:3,4")
920   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )    PORT_DIPLOCATION("SW2:3,4")
921921   PORT_DIPSETTING(    0x08, "1" )
922922   PORT_DIPSETTING(    0x04, "2" )
923923   PORT_DIPSETTING(    0x0c, "3" )
924924   PORT_DIPSETTING(    0x00, "5" )
925925   //"SW2:5" is unknown - Not listed in the service mode
926926   //"SW2:6" is unknown - Not listed in the service mode
927   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )   PORT_DIPLOCATION("SW2:7")
927   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SW2:7")
928928   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
929929   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
930   PORT_DIPNAME( 0x80, 0x80, "2 Credits to Start" )   PORT_DIPLOCATION("SW2:8")
930   PORT_DIPNAME( 0x80, 0x80, "2 Credits to Start" )    PORT_DIPLOCATION("SW2:8")
931931   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
932932   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
933933INPUT_PORTS_END
r242066r242067
18871887   ROM_LOAD16_BYTE( "c18.bin", 0x080001, 0x40000, CRC(0f8fe8bb) SHA1(e6f68442b8d4def29b106458496a47344f70d511) )
18881888   ROM_LOAD16_BYTE( "11.bin",  0x080000, 0x40000, CRC(2b5eacbc) SHA1(ba3690501588b9c88a31022b44bc3c82b44ae26b) )
18891889   ROM_LOAD16_BYTE( "c19.bin", 0x100001, 0x40000, CRC(3c616caa) SHA1(d48a6239b7a52ac13971f7513a65a17af492bfdf) ) // 11xxxxxxxxxxxxxxxx = 0xFF
1890    ROM_LOAD16_BYTE( "12.bin",  0x100000, 0x40000, CRC(c7bbd579) SHA1(ab87bfdad66ea241cb23c9bbfea05f5a1574d6c9) ) // 1ST AND 2ND HALF IDENTICAL (but ok, because pairing ROM has no data in the 2nd half anyway)
1890   ROM_LOAD16_BYTE( "12.bin",  0x100000, 0x40000, CRC(c7bbd579) SHA1(ab87bfdad66ea241cb23c9bbfea05f5a1574d6c9) ) // 1ST AND 2ND HALF IDENTICAL (but ok, because pairing ROM has no data in the 2nd half anyway)
18911891
18921892   ROM_REGION( 0x210000, "soundcpu", ROMREGION_ERASEFF ) // sound CPU
18931893   ROM_LOAD( "c16.bin", 0x010000, 0x40000, CRC(913cc18c) SHA1(4bf4ec14937586c3ae77fcad57dcb21f6433ef81) )
trunk/src/mame/drivers/segaufo.c
r242066r242067
88  1st gen
99    * ?
1010  - # UFO Catcher (1985)
11 
11
1212  2nd gen:
1313    * ?
1414  - # UFO Catcher DX (1987)
r242066r242067
2121  - UFO Catcher Mini (1991) (1P)
2222  - # UFO Catcher Sega Sonic (1991)
2323  - # School Kids (1993)
24 
24
2525  4th gen - EX brd
2626    * Z80, 2 Sega 315-5296(I/O), 315-5338A, YM3438, NEC uPD71054C, optional NEC uPD7759C
2727  - # Dream Palace (1992)
r242066r242067
3232  - UFO Catcher 800 (1998) (1P)
3333  - # Baby UFO (1998)
3434  - # Prize Sensor (1998)
35 
35
3636  More games were released after 2000, assumed to be on more modern hardware.
3737
3838  TODO:
r242066r242067
5757
5858/* simulation parameters */
5959// x/y/z cabinet dimensions per player (motor range)
60#define CABINET_WIDTH   400
60#define CABINET_WIDTH   400
6161#define CABINET_DEPTH   400
6262#define CABINET_HEIGHT  300
6363
r242066r242067
8585   required_device<sega_315_5296_device> m_io1;
8686   required_device<sega_315_5296_device> m_io2;
8787   optional_device<upd7759_device> m_upd;
88   
88
8989   struct Player
9090   {
9191      struct Motor
r242066r242067
9696         float speed;
9797      } motor[4];
9898   } m_player[2];
99   
99
100100   UINT8 m_stepper;
101   
101
102102   void motor_tick(int p, int m);
103103
104104   DECLARE_WRITE_LINE_MEMBER(pit_out0);
r242066r242067
121121   DECLARE_WRITE8_MEMBER(ex_ufo800_lamps_w);
122122   DECLARE_READ8_MEMBER(ex_upd_busy_r);
123123   DECLARE_WRITE8_MEMBER(ex_upd_start_w);
124   
124
125125   virtual void machine_reset();
126126   virtual void machine_start();
127127   TIMER_DEVICE_CALLBACK_MEMBER(simulate_xyz);
r242066r242067
135135   float delta = m_player[p].motor[m].speed;
136136   if (m_player[p].motor[m].direction)
137137      delta = -delta;
138   
138
139139   if (m_player[p].motor[m].running)
140140      m_player[p].motor[m].position += delta;
141   
141
142142   if (m_player[p].motor[m].position < 0)
143143      m_player[p].motor[m].position = 0;
144144   if (m_player[p].motor[m].position > 1)
r242066r242067
163163   for (int p = 0; p < 2; p++)
164164      for (int m = 0; m < 4; m++)
165165         output_set_indexed_value("counter", p*4 + m, (UINT8)(m_player[p].motor[m].position * 100));
166   
166
167167#if 0
168168   char msg1[0x100] = {0};
169169   char msg2[0x100] = {0};
r242066r242067
226226   // d6: crane open sensor (reflective sticker on the stepper motor rotation disc)
227227   if (m_player[p].motor[3].position >= 0.97)
228228      ret ^= 0x40;
229   
229
230230   // d7: prize sensor (mirror?)
231231   ret |= (ioport(p ? "IN2" : "IN1")->read() & 0x80);
232232
r242066r242067
249249      // d0-d3: p1, d4-d7: p2
250250      UINT8 cur = data >> (p*4) & 0xf;
251251      UINT8 prev = m_stepper >> (p*4) & 0xf;
252     
252
253253      for (int i = 0; i < 4; i++)
254254      {
255255         if (sequence[i] == prev && sequence[(i+1) & 3] == cur)
256256         {
257257            m_player[p].motor[3].running = 1;
258258            motor_tick(p, 3);
259           
259
260260            // change direction after each quarter rotate
261261            if (m_player[p].motor[3].position <= 0 || m_player[p].motor[3].position >= 1)
262262               m_player[p].motor[3].direction ^= 1;
263           
263
264264            break;
265265         }
266266      }
267267   }
268   
268
269269   m_stepper = data;
270270}
271271
r242066r242067
281281{
282282   static const UINT8 lut_7448[0x10] =
283283      { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
284   
284
285285   // d0-d3: cpanel digit
286286   // other bits: ?
287287   output_set_digit_value(offset & 1, lut_7448[data & 0xf]);
r242066r242067
290290WRITE8_MEMBER(ufo_state::crane_xyz_w)
291291{
292292   int p = offset & 1;
293   
293
294294   // d0: x/z axis (0:x, 1:z + halt x/y)
295295   // d1: x/z direction
296296   // d2: y direction
r242066r242067
315315   // 10 = red,   green
316316   output_set_lamp_value(10, data & 3);
317317   output_set_lamp_value(11, data >> 2 & 3);
318   
318
319319   // d4,d5: ?
320320   // d6,d7: coincounters
321321   coin_counter_w(machine(), 0, data & 0x40); // 100 Y
r242066r242067
346346      ret ^= (m_player[p].motor[m].position >= 1) << shift;
347347      ret ^= (m_player[p].motor[m].position <= 0) << (shift+1);
348348   }
349   
349
350350   return ret;
351351}
352352
r242066r242067
354354{
355355   // d0-d3: p1, d4-d7: p2
356356   UINT8 ret = 0xff;
357   
357
358358   for (int p = 0; p < 2; p++)
359359   {
360360      // d0: crane open sensor
361361      if (m_player[p].motor[3].position >= 0.97)
362362         ret ^= (1 << (p*4));
363     
363
364364      // d1: coincounter is plugged in (ufo800 gives error 14 otherwise)
365365      // d2,d3: ?
366366   }
367   
367
368368   return ret;
369369}
370370
r242066r242067
382382   // d0,d1,d4,d5: p1/p2 button lamps
383383   for (int i = 0; i < 4; i++)
384384      output_set_lamp_value(i, ~data >> ((i&1) + (i&2) * 2) & 1);
385   
385
386386   // d2,d3,d6,d7: p1/p2 coincounters
387387   for (int i = 0; i < 4; i++)
388388      coin_counter_w(machine(), i, data >> (2 + (i&1) + (i&2) * 2) & 1);
r242066r242067
391391WRITE8_MEMBER(ufo_state::ex_crane_xyz_w)
392392{
393393   int p = offset & 1;
394   
394
395395   // more straightforward setup than on UFO board hardware
396396   // d0: move left
397397   // d1: move right
r242066r242067
464464   AM_RANGE(0x60, 0x60) AM_WRITE(ex_upd_start_w) AM_READNOP
465465   AM_RANGE(0x61, 0x61) AM_READ(ex_upd_busy_r)
466466   AM_RANGE(0x64, 0x65) AM_WRITE(ex_ufo21_lamps_w) AM_READNOP
467//   AM_RANGE(0x68, 0x68) AM_WRITENOP // ?
467//  AM_RANGE(0x68, 0x68) AM_WRITENOP // ?
468468   AM_IMPORT_FROM( ufo_portmap )
469469ADDRESS_MAP_END
470470
471471static ADDRESS_MAP_START( ex_ufo800_portmap, AS_IO, 8, ufo_state )
472//   AM_RANGE(0x60, 0x67) AM_NOP // unused?
473//   AM_RANGE(0x68, 0x68) AM_WRITENOP // ?
472//  AM_RANGE(0x60, 0x67) AM_NOP // unused?
473//  AM_RANGE(0x68, 0x68) AM_WRITENOP // ?
474474   AM_IMPORT_FROM( ufo_portmap )
475475ADDRESS_MAP_END
476476
r242066r242067
723723   // init/zerofill/register for savestates
724724   static const float motor_speeds[4] =
725725      { 1.0f/CABINET_WIDTH, 1.0f/CABINET_DEPTH, 1.0f/CABINET_HEIGHT, 1.0f/CRANE_SIZE };
726   
726
727727   for (int m = 0; m < 4; m++)
728728   {
729729      for (int p = 0; p < 2; p++)
r242066r242067
742742      save_item(NAME(m_player[1].motor[m].direction), m);
743743      save_item(NAME(m_player[1].motor[m].position), m);
744744   }
745   
745
746746   m_stepper = 0;
747747   save_item(NAME(m_stepper));
748748}
r242066r242067
761761
762762   MCFG_TIMER_DRIVER_ADD_PERIODIC("motor_timer", ufo_state, simulate_xyz, attotime::from_hz(MOTOR_SPEED))
763763   MCFG_TIMER_DRIVER_ADD_PERIODIC("update_timer", ufo_state, update_info, attotime::from_hz(60))
764   
764
765765   MCFG_DEVICE_ADD("io1", SEGA_315_5296, XTAL_16MHz)
766766   // all ports set to input
767767   MCFG_315_5296_IN_PORTA_CB(READ8(ufo_state, crane_limits_r))
trunk/src/mame/drivers/sfbonus.c
r242066r242067
297297   required_device<cpu_device> m_maincpu;
298298   required_device<gfxdecode_device> m_gfxdecode;
299299   required_device<palette_device> m_palette;
300   
300
301301   required_shared_ptr<UINT8> m_nvram;
302302   required_shared_ptr<UINT8> m_1800_regs;
303303   required_shared_ptr<UINT8> m_vregs;
r242066r242067
305305   required_shared_ptr<UINT8> m_2c01_regs;
306306   required_shared_ptr<UINT8> m_3000_regs;
307307   required_shared_ptr<UINT8> m_3800_regs;
308   
308
309309   bitmap_ind16 *m_temp_reel_bitmap;
310310   tilemap_t *m_tilemap;
311311   tilemap_t *m_reel_tilemap;
r242066r242067
318318   UINT8 *m_reel3_ram;
319319   UINT8 *m_reel4_ram;
320320   UINT8* m_videoram;
321   
321
322322   DECLARE_WRITE8_MEMBER(sfbonus_videoram_w);
323323   DECLARE_WRITE8_MEMBER(sfbonus_bank_w);
324324   DECLARE_READ8_MEMBER(sfbonus_2800_r);
trunk/src/mame/drivers/suna8.c
r242066r242067
18601860   MCFG_CPU_IO_MAP(rranger_io_map)
18611861   MCFG_CPU_VBLANK_INT_DRIVER("screen", suna8_state,  irq0_line_hold)  /* IRQ & NMI ! */
18621862
1863   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 8)   /* verified on pcb */
1863   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 8)   /* verified on pcb */
18641864   MCFG_CPU_PROGRAM_MAP(rranger_sound_map)
18651865   MCFG_CPU_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* NMI = retn */
18661866
r242066r242067
18831883   /* sound hardware */
18841884   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
18851885
1886   MCFG_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 16)   /* verified on pcb */
1886   MCFG_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 16)  /* verified on pcb */
18871887   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, rranger_play_samples_w))
18881888   MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
18891889   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
18901890   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
18911891
1892   MCFG_SOUND_ADD("ym2", YM2203, SUNA8_MASTER_CLOCK / 16)   /* verified on pcb */
1892   MCFG_SOUND_ADD("ym2", YM2203, SUNA8_MASTER_CLOCK / 16)  /* verified on pcb */
18931893   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
18941894   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
18951895
trunk/src/mame/drivers/supduck.c
r242066r242067
177177
178178   int color = (data & 0x0f00)>>8;
179179   int flags = (data & 0x2000) ? TILE_FLIPX : 0;
180       flags |=(data & 0x1000) ? TILE_FLIPY : 0;
180      flags |=(data & 0x1000) ? TILE_FLIPY : 0;
181181
182182
183183   SET_TILE_INFO_MEMBER(1, code, color, flags);
r242066r242067
185185
186186TILE_GET_INFO_MEMBER(supduck_state::get_back_tile_info)
187187{
188
189188   UINT16 *videoram = m_back_videoram;
190189   int data = videoram[tile_index];
191190
r242066r242067
195194
196195   int color = (data & 0x0f00)>>8;
197196   int flags = (data & 0x2000) ? TILE_FLIPX : 0;
198       flags |=(data & 0x1000) ? TILE_FLIPY : 0;
197      flags |=(data & 0x1000) ? TILE_FLIPY : 0;
199198
200199   SET_TILE_INFO_MEMBER(2, code, color, flags);
201200}
r242066r242067
244243
245244WRITE16_MEMBER(supduck_state::supduck_4000_w)
246245{
247
248246}
249247
250248WRITE16_MEMBER(supduck_state::supduck_paletteram_w)
r242066r242067
298296
299297static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, supduck_state )
300298   AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_WRITENOP
301   AM_RANGE(0xfe0000, 0xfe1fff) AM_RAM AM_SHARE("spriteram")
299   AM_RANGE(0xfe0000, 0xfe1fff) AM_RAM AM_SHARE("spriteram")
302300
303301   AM_RANGE(0xfe4000, 0xfe4001) AM_READ_PORT("P1_P2") AM_WRITE( supduck_4000_w )
304302   AM_RANGE(0xfe4002, 0xfe4003) AM_READ_PORT("SYSTEM") AM_WRITE( supduck_4002_w )
r242066r242067
306304
307305   AM_RANGE(0xfe8000, 0xfe8007) AM_WRITE(supduck_scroll_w)
308306   AM_RANGE(0xfe800e, 0xfe800f) AM_WRITENOP // watchdog or irqack
309   
307
310308   AM_RANGE(0xfec000, 0xfecfff) AM_RAM_WRITE(text_videoram_w) AM_SHARE("textvideoram")
311309   AM_RANGE(0xff0000, 0xff3fff) AM_RAM_WRITE(back_videoram_w) AM_SHARE("backvideoram")
312310   AM_RANGE(0xff4000, 0xff7fff) AM_RAM_WRITE(fore_videoram_w) AM_SHARE("forevideoram")
r242066r242067
444442};
445443
446444// same as the ROM tilemap layout from tigeroad
447static const gfx_layout tile_layout =
445static const gfx_layout tile_layout =
448446{
449447   32, 32,
450448   RGN_FRAC(1, 2),
r242066r242067
512510   MCFG_GFXDECODE_ADD("gfxdecode", "palette", supduck)
513511
514512   MCFG_PALETTE_ADD("palette", 0x800/2)
515//   MCFG_PALETTE_FORMAT(xRGBRRRRGGGGBBBB) // can't use this, the RGB bits are the lowest bits with this format, for this game they're the highest bits
513//  MCFG_PALETTE_FORMAT(xRGBRRRRGGGGBBBB) // can't use this, the RGB bits are the lowest bits with this format, for this game they're the highest bits
516514
517515   /* sound hardware */
518516   MCFG_SPEAKER_STANDARD_MONO("mono")
r242066r242067
562560
563561   ROM_REGION( 0x80000, "oki", 0 )
564562   ROM_LOAD( "2.su12",   0x00000, 0x20000, CRC(745d42fb) SHA1(f9aee3ddbad3cc2f3a7002ee0d762eb041967e1e) ) // static sample data
565   
563
566564   ROM_REGION( 0x80000, "okibank", 0 )
567565   ROM_LOAD( "1.su13",   0x00000, 0x80000, CRC(7fb1ed42) SHA1(77ec86a6454398e329066aa060e9b6a39085ce71) ) // banked sample data
568566ROM_END
trunk/src/mame/drivers/tnzs.c
r242066r242067
26952695
26962696GAME( 1989, insectx,   0,        insectx,  insectx,  tnzs_state,    insectx,  ROT0,   "Taito Corporation Japan", "Insector X (World)", 0 )
26972697GAME( 1989, insectxj,  insectx,  insectx,  insectxj, tnzs_state,    insectx,  ROT0,   "Taito Corporation",       "Insector X (Japan)", 0 )
2698
trunk/src/mame/drivers/twin16.c
r242066r242067
8585   {
8686      int rising_edge = ~old & m_CPUA_register;
8787      int falling_edge = old & ~m_CPUA_register;
88     
88
8989      if (rising_edge & 0x08)
9090         m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
9191
trunk/src/mame/drivers/videopin.c
r242066r242067
235235   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
236236
237237   PORT_START("DSW")   /* IN1 */
238   PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Coinage ) )      PORT_DIPLOCATION("DSW:8,7")
238   PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Coinage ) )      PORT_DIPLOCATION("DSW:8,7")
239239   PORT_DIPSETTING(    0xc0, DEF_STR( 2C_1C ) )
240240   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) )
241241   PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
242242   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
243   PORT_DIPNAME( 0x30, 0x00, DEF_STR( Language ) )      PORT_DIPLOCATION("DSW:6,5")
243   PORT_DIPNAME( 0x30, 0x00, DEF_STR( Language ) )     PORT_DIPLOCATION("DSW:6,5")
244244   PORT_DIPSETTING(    0x00, DEF_STR( English ) )
245245   PORT_DIPSETTING(    0x10, DEF_STR( German ) )
246246   PORT_DIPSETTING(    0x20, DEF_STR( French ) )
247247   PORT_DIPSETTING(    0x30, DEF_STR( Spanish ) )
248   PORT_DIPNAME( 0x08, 0x08, "Balls" )               PORT_DIPLOCATION("DSW:4")
248   PORT_DIPNAME( 0x08, 0x08, "Balls" )                 PORT_DIPLOCATION("DSW:4")
249249   PORT_DIPSETTING(    0x08, "3" )
250250   PORT_DIPSETTING(    0x00, "5" )
251   PORT_DIPNAME( 0x04, 0x00, "Replay" )            PORT_DIPLOCATION("DSW:3")
251   PORT_DIPNAME( 0x04, 0x00, "Replay" )                PORT_DIPLOCATION("DSW:3")
252252   PORT_DIPSETTING(    0x04, "Off (award 80000 points instead)" )
253253   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
254   PORT_DIPNAME( 0x02, 0x00, "Extra Ball" )         PORT_DIPLOCATION("DSW:2")
254   PORT_DIPNAME( 0x02, 0x00, "Extra Ball" )            PORT_DIPLOCATION("DSW:2")
255255   PORT_DIPSETTING(    0x02, "Off (award 50000 points instead)" )
256256   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
257   PORT_DIPNAME( 0x01, 0x01, "Replay Level" )         PORT_DIPLOCATION("DSW:1")
257   PORT_DIPNAME( 0x01, 0x01, "Replay Level" )          PORT_DIPLOCATION("DSW:1")
258258   PORT_DIPSETTING(    0x00, "180000 (3 balls) / 300000 (5 balls)" )
259259   PORT_DIPSETTING(    0x01, "210000 (3 balls) / 350000 (5 balls)" )
260260
r242066r242067
275275static INPUT_PORTS_START( solarwar )
276276   PORT_INCLUDE( videopin )
277277   PORT_MODIFY("DSW")
278   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("DSW:8,7")
278   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("DSW:8,7")
279279   PORT_DIPSETTING(    0xc0, DEF_STR( 2C_1C ) )
280280   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) )
281281   PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
282282   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
283283   PORT_DIPUNKNOWN_DIPLOC( 0x30, 0x30, "DSW:6,5" )
284   PORT_DIPNAME( 0x01, 0x01, "Replay Level" )         PORT_DIPLOCATION("DSW:1")
284   PORT_DIPNAME( 0x01, 0x01, "Replay Level" )          PORT_DIPLOCATION("DSW:1")
285285   PORT_DIPSETTING(    0x00, "180000 (3 balls) / 300000 (5 balls)" )
286286   PORT_DIPSETTING(    0x01, "300000 (3 balls) / 500000 (5 balls)" )
287287INPUT_PORTS_END
r242066r242067
410410
411411ROM_START( solarwar )
412412   ROM_REGION( 0x10000, "maincpu", 0 )
413   ROM_LOAD_NIB_LOW ( "36159-01.e0", 0x2000, 0x0400, CRC(0db9f0fc) SHA1(191429a25b43727694f75c0ae9cbff705fbc4d77) )
414   ROM_LOAD_NIB_HIGH( "36154-01.k0", 0x2000, 0x0400, CRC(64629efc) SHA1(4da3870c35e693ed334502ea17ae023a0073ff85) )
415   ROM_LOAD_NIB_LOW ( "36160-01.d0", 0x2400, 0x0400, CRC(63a25dee) SHA1(cff0f1c4d381eb99a30f2fe09ff6f42ca994a19f) )
416   ROM_LOAD_NIB_HIGH( "36155-01.j0", 0x2400, 0x0400, CRC(5fa64f47) SHA1(64e37380be0df761ba81c516592fef87bba30b91) )
417   ROM_LOAD_NIB_LOW ( "36167-01.h1", 0x2800, 0x0400, CRC(5a85bca8) SHA1(7af9895c2e567d569ed60305fa1245081e346fc1) )
418   ROM_LOAD_NIB_HIGH( "36166-01.h1", 0x2800, 0x0400, CRC(6ce095a6) SHA1(e3bb534487d3cd0cecccff47c0742de8f951b46c) )
419   ROM_LOAD_NIB_LOW ( "36161-01.c0", 0x2c00, 0x0400, CRC(a9e2e08f) SHA1(5539a86d4fb69735182762e21cf3cc26d16eff80) )
420   ROM_LOAD_NIB_HIGH( "36157-01.h0", 0x2c00, 0x0400, CRC(30b6eb18) SHA1(ae819dd97c6a7e26981731e7706cbfa3699b6a0b) )
421   ROM_LOAD_NIB_LOW ( "36169-01.e1", 0x3000, 0x0400, CRC(f702127c) SHA1(7fb83c616671e4ea9697282a04662ec035d5d8ed) )
422   ROM_LOAD_NIB_HIGH( "36164-01.k1", 0x3000, 0x0400, CRC(3dcded96) SHA1(eacdf017b08a7c3305fd79430fbbf07292d0cfa0) )
423   ROM_LOAD_NIB_LOW ( "36163-02.a0", 0x3400, 0x0400, CRC(3e176619) SHA1(9b6a9a5fa02b1d87bdaa43fad8971ff3317b132d) )
424   ROM_LOAD_NIB_HIGH( "36156-02.h0", 0x3400, 0x0400, CRC(e51363fb) SHA1(c01b263dfd6d448a18ff855a93aa4e48afc6d725) )
425   ROM_LOAD_NIB_LOW ( "36168-01.f1", 0x3800, 0x0400, CRC(5ccbcf7e) SHA1(10f8932265abe6e62e9f243c653d7fad770a2ff5) )
426   ROM_LOAD_NIB_HIGH( "36165-01.j1", 0x3800, 0x0400, CRC(e2ee4f7d) SHA1(be2f602a5bcfe404509ac8d6914a03213573b0a6) )
427   ROM_LOAD_NIB_LOW ( "36162-02.b0", 0x3c00, 0x0400, CRC(cec1baaa) SHA1(15c130b01a7b8b9aa07e01f7c84c4c26494f39d8) )
413   ROM_LOAD_NIB_LOW ( "36159-01.e0", 0x2000, 0x0400, CRC(0db9f0fc) SHA1(191429a25b43727694f75c0ae9cbff705fbc4d77) )
414   ROM_LOAD_NIB_HIGH( "36154-01.k0", 0x2000, 0x0400, CRC(64629efc) SHA1(4da3870c35e693ed334502ea17ae023a0073ff85) )
415   ROM_LOAD_NIB_LOW ( "36160-01.d0", 0x2400, 0x0400, CRC(63a25dee) SHA1(cff0f1c4d381eb99a30f2fe09ff6f42ca994a19f) )
416   ROM_LOAD_NIB_HIGH( "36155-01.j0", 0x2400, 0x0400, CRC(5fa64f47) SHA1(64e37380be0df761ba81c516592fef87bba30b91) )
417   ROM_LOAD_NIB_LOW ( "36167-01.h1", 0x2800, 0x0400, CRC(5a85bca8) SHA1(7af9895c2e567d569ed60305fa1245081e346fc1) )
418   ROM_LOAD_NIB_HIGH( "36166-01.h1", 0x2800, 0x0400, CRC(6ce095a6) SHA1(e3bb534487d3cd0cecccff47c0742de8f951b46c) )
419   ROM_LOAD_NIB_LOW ( "36161-01.c0", 0x2c00, 0x0400, CRC(a9e2e08f) SHA1(5539a86d4fb69735182762e21cf3cc26d16eff80) )
420   ROM_LOAD_NIB_HIGH( "36157-01.h0", 0x2c00, 0x0400, CRC(30b6eb18) SHA1(ae819dd97c6a7e26981731e7706cbfa3699b6a0b) )
421   ROM_LOAD_NIB_LOW ( "36169-01.e1", 0x3000, 0x0400, CRC(f702127c) SHA1(7fb83c616671e4ea9697282a04662ec035d5d8ed) )
422   ROM_LOAD_NIB_HIGH( "36164-01.k1", 0x3000, 0x0400, CRC(3dcded96) SHA1(eacdf017b08a7c3305fd79430fbbf07292d0cfa0) )
423   ROM_LOAD_NIB_LOW ( "36163-02.a0", 0x3400, 0x0400, CRC(3e176619) SHA1(9b6a9a5fa02b1d87bdaa43fad8971ff3317b132d) )
424   ROM_LOAD_NIB_HIGH( "36156-02.h0", 0x3400, 0x0400, CRC(e51363fb) SHA1(c01b263dfd6d448a18ff855a93aa4e48afc6d725) )
425   ROM_LOAD_NIB_LOW ( "36168-01.f1", 0x3800, 0x0400, CRC(5ccbcf7e) SHA1(10f8932265abe6e62e9f243c653d7fad770a2ff5) )
426   ROM_LOAD_NIB_HIGH( "36165-01.j1", 0x3800, 0x0400, CRC(e2ee4f7d) SHA1(be2f602a5bcfe404509ac8d6914a03213573b0a6) )
427   ROM_LOAD_NIB_LOW ( "36162-02.b0", 0x3c00, 0x0400, CRC(cec1baaa) SHA1(15c130b01a7b8b9aa07e01f7c84c4c26494f39d8) )
428428   ROM_RELOAD(                       0xfc00, 0x0400 )
429   ROM_LOAD_NIB_HIGH( "36158-02.f0", 0x3c00, 0x0400, CRC(2606b87e) SHA1(ea72e36837eccf29cd5c82fe9a6a018a1a94730c) )
429   ROM_LOAD_NIB_HIGH( "36158-02.f0", 0x3c00, 0x0400, CRC(2606b87e) SHA1(ea72e36837eccf29cd5c82fe9a6a018a1a94730c) )
430430   ROM_RELOAD(                       0xfc00, 0x0400 )
431431
432432   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
trunk/src/mame/includes/atetris.h
r242066r242067
2323   required_device<gfxdecode_device> m_gfxdecode;
2424   required_device<screen_device> m_screen;
2525   optional_device<atari_slapstic_device> m_slapstic_device;
26   
26
2727   required_shared_ptr<UINT8>  m_nvram;
2828   required_shared_ptr<UINT8> m_videoram;
29   
29
3030   UINT8 *m_slapstic_source;
3131   UINT8 *m_slapstic_base;
3232   UINT8 m_current_bank;
3333   UINT8 m_nvram_write_enable;
3434   emu_timer *m_interrupt_timer;
3535   tilemap_t *m_bg_tilemap;
36   
36
3737   DECLARE_WRITE8_MEMBER(irq_ack_w);
3838   DECLARE_READ8_MEMBER(slapstic_r);
3939   DECLARE_WRITE8_MEMBER(coincount_w);
trunk/src/mame/includes/exidy440.h
r242066r242067
8080   DECLARE_VIDEO_START(exidy440);
8181   DECLARE_VIDEO_START(topsecex);
8282   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
83   void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,   int scroll_offset, int check_collision);
83   void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,  int scroll_offset, int check_collision);
8484   UINT32 screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8585   UINT32 screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8686   INTERRUPT_GEN_MEMBER(exidy440_vblank_interrupt);
trunk/src/mame/includes/harddriv.h
r242066r242067
3838
3939
4040class harddriv_state :  public device_t
41 /* public device_video_interface */
41   /* public device_video_interface */
4242{
4343public:
4444   harddriv_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r242066r242067
253253   void steeltal_init_common(offs_t ds3_transfer_pc, int proto_sloop);
254254
255255   void init_strtdriv(void);
256   
256
257257   void init_harddriv(void);
258   
258
259259   void init_harddrivc(void);
260260
261261   void init_racedriv(void);
262   void init_racedrivb1(void);   
262   void init_racedrivb1(void);
263263
264264   void init_racedrivc(void);
265265   void init_racedrivc1(void);
266   
266
267267   void init_hdrivair(void);
268268   void init_hdrivairp(void);
269   
269
270270   void init_steeltal(void);
271271   void init_steeltal1(void);
272272   void init_steeltalp(void);
273   
273
274274   void init_stunrun(void);
275275   void init_racedrivc_panorama_side();
276276
r242066r242067
461461
462462   TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_driver);
463463   TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_multisync);
464   
464
465465   UINT8               m_sound_int_state;
466466   UINT8               m_video_int_state;
467467
r242066r242067
487487protected:
488488   virtual machine_config_constructor device_mconfig_additions() const;
489489   virtual void device_start();
490//   virtual void device_reset();   
490//  virtual void device_reset();
491491};
492492
493493/* Hard Drivin' Compact */
r242066r242067
500500protected:
501501   virtual machine_config_constructor device_mconfig_additions() const;
502502   virtual void device_start();
503//   virtual void device_reset();   
503//  virtual void device_reset();
504504};
505505
506506/* Race Drivin' */
r242066r242067
514514protected:
515515   virtual machine_config_constructor device_mconfig_additions() const;
516516   virtual void device_start();
517//   virtual void device_reset();   
517//  virtual void device_reset();
518518};
519519
520520class racedrivb1_board_device_state :  public racedriv_board_device_state
r242066r242067
538538protected:
539539   virtual machine_config_constructor device_mconfig_additions() const;
540540   virtual void device_start();
541//   virtual void device_reset();   
541//  virtual void device_reset();
542542};
543543
544544class racedrivc1_board_device_state :  public racedrivc_board_device_state
r242066r242067
573573protected:
574574   virtual machine_config_constructor device_mconfig_additions() const;
575575   virtual void device_start();
576//   virtual void device_reset();   
576//  virtual void device_reset();
577577};
578578
579579/* Steel Talons */
r242066r242067
586586protected:
587587   virtual machine_config_constructor device_mconfig_additions() const;
588588   virtual void device_start();
589//   virtual void device_reset();   
589//  virtual void device_reset();
590590};
591591
592592class steeltal1_board_device_state :  public steeltal_board_device_state
r242066r242067
623623protected:
624624   virtual machine_config_constructor device_mconfig_additions() const;
625625   virtual void device_start();
626//   virtual void device_reset();   
626//  virtual void device_reset();
627627};
628628
629629/* Hard Drivin' Airbourne */
r242066r242067
636636protected:
637637   virtual machine_config_constructor device_mconfig_additions() const;
638638   virtual void device_start();
639//   virtual void device_reset();   
639//  virtual void device_reset();
640640};
641641
642642class hdrivairp_board_device_state :  public hdrivair_board_device_state
r242066r242067
645645   hdrivairp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
646646      hdrivair_board_device_state(mconfig, tag, owner, clock)
647647      {};
648     
648
649649protected:
650650   virtual void device_start();
651651};
652
653
654
655
trunk/src/mame/includes/konamigx.h
r242066r242067
6767   optional_shared_ptr<UINT16> m_k053936_0_linectrl_16;
6868   optional_shared_ptr<UINT32> m_konamigx_type3_psac2_bank;
6969   optional_shared_ptr<UINT32> m_generic_paletteram_32;
70   
70
7171   optional_ioport m_an0, m_an1, m_light0_x, m_light0_y, m_light1_x, m_light1_y, m_eepromout;
7272
7373   DECLARE_WRITE32_MEMBER(esc_w);
r242066r242067
167167   void fantjour_dma_install();
168168
169169   void konamigx_mixer_primode(int mode);
170   
170
171171   typedef void (konamigx_state::*esc_cb)(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
172   
172
173173   void tkmmpzdm_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
174174   void dragoonj_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
175175   void sal2_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
176176   void sexyparo_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
177177   void tbyahhoo_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
178178   void daiskiss_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);
179   
179
180180   inline int K053247GX_combine_c18(int attrib);
181181   inline int K055555GX_decode_objcolor(int c18);
182182   inline int K055555GX_decode_inpri(int c18);
r242066r242067
193193   int m_gx_cfgport;
194194   int m_suspension_active, m_resume_trigger;
195195   int m_last_prot_op, m_last_prot_clk;
196     
196
197197   UINT8 m_esc_program[4096];
198198   esc_cb m_esc_cb;
199   
199
200200   UINT16 m_prot_data[0x20];
201   
201
202202   UINT16 *m_gx_spriteram;
203   
203
204204   // mirrored K054338 settings
205205   int *m_K054338_shdRGB;
206   
206
207207   // 1st-Tier GX/MW Variables
208208   // frequently used registers
209209   int m_k053247_vrcbk[4];
r242066r242067
213213   int m_vinmix, m_vmixon, m_osinmix, m_osmixon;
214214   UINT8  m_gx_wrport1_0, m_gx_wrport1_1;
215215   UINT16 m_gx_wrport2;
216   
217   // 2nd-Tier GX/MW Graphics Variables
216
217   // 2nd-Tier GX/MW Graphics Variables
218218   UINT8 *m_gx_objzbuf, *m_gx_shdzbuf;
219219   int m_layer_colorbase[4];
220220   INT32 m_gx_tilebanks[8], m_gx_oldbanks[8];
r242066r242067
229229   int m_konamigx_palformat;
230230   bitmap_rgb32 *m_dualscreen_left_tempbitmap;
231231   bitmap_rgb32 *m_dualscreen_right_tempbitmap;
232   
232
233233   /* On Type-1 the K053936 output is rendered to these temporary bitmaps as raw data
234    the 'voxel' effect to give the pixels height is a post-process operation on the
235    output of the K053936 (this can clearly be seen in videos as large chunks of
236    scenary flicker when in the distance due to single pixels in the K053936 output
237    becoming visible / invisible due to drawing precision.
234   the 'voxel' effect to give the pixels height is a post-process operation on the
235   output of the K053936 (this can clearly be seen in videos as large chunks of
236   scenary flicker when in the distance due to single pixels in the K053936 output
237   becoming visible / invisible due to drawing precision.
238238
239    -- however, progress on this has stalled as our K053936 doesn't seem to give
240       the right output for post processing, I suspect the game is using some
241       unsupported flipping modes (probably due to the way it's hooked up to the
242       rest of the chips) which is causing entirely the wrong output.
239   -- however, progress on this has stalled as our K053936 doesn't seem to give
240      the right output for post processing, I suspect the game is using some
241      unsupported flipping modes (probably due to the way it's hooked up to the
242      rest of the chips) which is causing entirely the wrong output.
243243
244    -- furthermore video\k053936.c contains an implementation of
245       the K053936_zoom_draw named K053936GP_zoom_draw that's only used in konamigx ...
244   -- furthermore video\k053936.c contains an implementation of
245      the K053936_zoom_draw named K053936GP_zoom_draw that's only used in konamigx ...
246246
247247
248    */
248   */
249249   bitmap_ind16 *m_gxtype1_roz_dstbitmap;
250250   bitmap_ind16 *m_gxtype1_roz_dstbitmap2;
251251   rectangle m_gxtype1_roz_dstbitmapclip;
252   
252
253253   int m_konamigx_type3_psac2_actual_bank;
254254   //int m_konamigx_type3_psac2_actual_last_bank = 0;
255255};
trunk/src/mame/includes/mario.h
r242066r242067
3636public:
3737   mario_state(const machine_config &mconfig, device_type type, const char *tag)
3838      : driver_device(mconfig, type, tag),
39     
39
4040      m_maincpu(*this, "maincpu"),
4141      m_audiocpu(*this, "audiocpu"),
4242      m_gfxdecode(*this, "gfxdecode"),
trunk/src/mame/includes/segas18.h
r242066r242067
9696
9797   DECLARE_WRITE_LINE_MEMBER(set_grayscale);
9898   DECLARE_WRITE_LINE_MEMBER(set_vdp_enable);
99   
99
100100protected:
101101   // timer IDs
102102   enum
trunk/src/mame/includes/suna8.h
r242066r242067
1717      m_gfxdecode(*this, "gfxdecode"),
1818      m_screen(*this, "screen"),
1919      m_palette(*this, "palette"),
20     
20
2121      m_prot_opcode_toggle(0)
2222      { }
2323
r242066r242067
4646   UINT8 m_write_disable;
4747   UINT8 m_prot_opcode_toggle;
4848   UINT8* m_decrypt;
49   
49
5050   enum GFXBANK_TYPE_T
5151   {
5252      GFXBANK_TYPE_SPARKMAN,
trunk/src/mame/includes/tnzs.h
r242066r242067
3333      m_dac(*this, "dac"),
3434      m_samples(*this, "samples"),
3535      m_palette(*this, "palette"),
36      m_mainbank(*this, "mainbank")   
36      m_mainbank(*this, "mainbank")
3737      { }
3838
3939   /* video-related */
trunk/src/mame/machine/315-5881_crypt.c
r242066r242067
814814         }
815815      }
816816   }
817}
No newline at end of file
817}
trunk/src/mame/machine/315-5881_crypt.h
r242066r242067
1717public:
1818   // construction/destruction
1919   sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
20   
2120
21
2222   UINT16 do_decrypt(UINT8 *&base);
2323   void set_addr_low(UINT16 data);
2424   void set_addr_high(UINT16 data);
trunk/src/mame/machine/315_5296.h
r242066r242067
100100
101101   DECLARE_READ8_MEMBER( read );
102102   DECLARE_WRITE8_MEMBER( write );
103   
103
104104   UINT8 debug_peek_output(offs_t offset) { return m_output_latch[offset & 7]; }
105105
106106protected:
trunk/src/mame/machine/harddriv.c
r242066r242067
222222       0x8000 = SW1 #1
223223   */
224224   screen_device &scr = m_gsp->screen();
225   
225
226226   int temp = (ioport("SW1")->read_safe(0xff) << 8) | ioport("IN0")->read_safe(0xff);
227227   if (get_hblank(scr)) temp ^= 0x0002;
228228   temp ^= 0x0018;     /* both EOCs always high for now */
trunk/src/mame/machine/naomim2.c
r242066r242067
150150
151151void naomi_m2_board::board_get_buffer(UINT8 *&base, UINT32 &limit)
152152{
153
154153   if(rom_cur_address & 0x40000000) {
155154      if(rom_cur_address == 0x4001fffe) {
156155         m_cryptdevice->do_decrypt(base);
r242066r242067
178177
179178void naomi_m2_board::board_write(offs_t offset, UINT16 data)
180179{
181
182
183180   if(offset & 0x40000000) {
184181      if((offset & 0x0f000000) == 0x02000000) {
185182         offset &= RAM_SIZE-1;
r242066r242067
188185         return;
189186      }
190187      switch(offset & 0x1fffffff) {
191
192188      case 0x1fff8: m_cryptdevice->set_addr_low(data); return;
193189      case 0x1fffa: m_cryptdevice->set_addr_high(data);  return;
194190      case 0x1fffc: m_cryptdevice->set_subkey(data); return;
r242066r242067
219215{
220216   return MACHINE_CONFIG_NAME( naomim2 );
221217}
222
trunk/src/mame/machine/naomim2.h
r242066r242067
3434
3535   const char *key_tag;
3636
37   
37
3838   required_device<sega_315_5881_crypt_device> m_cryptdevice;
3939};
4040
trunk/src/mame/machine/naomim4.c
r242066r242067
192192      UINT16 dec = iv;
193193      iv = decrypt_one_round(enc ^ iv, subkey1);
194194      dec ^= decrypt_one_round(iv, subkey2);
195     
195
196196      buffer[buffer_actual_size++] = dec;
197197      buffer[buffer_actual_size++] = dec >> 8;
198198
trunk/src/mame/machine/segabb.c
r242066r242067
2121   pci_device::device_start();
2222   add_map(   128*1024, M_MEM, FUNC(sega_lindbergh_baseboard_device::map1));
2323   add_map(  1024*1024, M_MEM, FUNC(sega_lindbergh_baseboard_device::map2));
24   add_map(2*1024*1024, M_MEM, FUNC(sega_lindbergh_baseboard_device::map3));   
24   add_map(2*1024*1024, M_MEM, FUNC(sega_lindbergh_baseboard_device::map3));
2525}
2626
2727void sega_lindbergh_baseboard_device::device_reset()
trunk/src/mame/machine/slapstic.c
r242066r242067
235235
236236void atari_slapstic_device::device_start()
237237{
238
239238}
240239
241240void atari_slapstic_device::device_reset()
242241{
243
244242}
245243
246244/*************************************
trunk/src/mame/machine/stvprot.c
r242066r242067
572572*
573573*************************************/
574574
575// the naomi hookup of 315-5881 reads 16-bits at a time, here we seem to read 32?
575// the naomi hookup of 315-5881 reads 16-bits at a time, here we seem to read 32?
576576
577577READ32_MEMBER( stv_state::common_prot_r )
578578{
r242066r242067
671671{
672672   install_common_protection();
673673   m_prot_readback = astrass_prot_read_callback;
674//   m_cryptdevice->set_key(0x00000000);
674//  m_cryptdevice->set_key(0x00000000);
675675}
676676
677677void stv_state::install_ffreveng_protection()
trunk/src/mame/mame.lst
r242066r242067
104104mspacmanbgd     // bootleg
105105mspacmanbcc     // bootleg
106106mspacmanblt     // bootleg
107clubpacm      // Miky
107clubpacm        // Miky
108108woodpeck        // (c) 1981 Amenip (Palcom Queen River)
109109woodpeca        // (c) 1981 Amenip Nova Games Ltd.
110110mspacmab        // bootleg
r242066r242067
442442bigkong         // bootleg
443443monkeyd         // bootleg
444444dking           // Crazy Kong Bootleg
445ckongdks      // Spanish Crazy Kong bootleg
445ckongdks        // Spanish Crazy Kong bootleg
446446ckongpt2        // (c) 1981 Falcon
447447ckongpt2a       // (c) 1981 Falcon
448448ckongpt2j       // (c) 1981 Falcon
r242066r242067
710710nextfase        // bootleg
711711phoenixs        // bootleg (Sonic)
712712avefenix        // bootleg (Video Game)
713avefenixrf      // bootleg (Recreativos Franco)
713avefenixrf      // bootleg (Recreativos Franco)
714714pleiads         // (c) 1981 Tehkan
715715pleiadsb2       // bootleg
716716pleiadbl        // bootleg
r242066r242067
14781478gunchamp        // (c) 1980 Model Racing
14791479gunchamps       // (c) 1980 Model Racing (sshot.c)
14801480spaceatt        // (c) 1978 Video Games GMBH
1481galmonst      // (c) Laguna S.A.
1481galmonst        // (c) Laguna S.A.
14821482spaceat2        // (c) 1980 Zenitone-Microsec Ltd
14831483spacecom        // bootleg
14841484sinvzen         // Zenitone-Microsec Ltd
r242066r242067
16501650tron2           // (c) 1982
16511651tron3           // (c) 1982
16521652tron4           // (c) 1982
1653tronger         // (c) 1982
1653tronger         // (c) 1982
16541654kroozr          // (c) 1982
16551655domino          // (c) 1982
16561656wacko           // (c) 1982
r242066r242067
18001800youjyudn        // (c) 1986 (Japan)
18011801
18021802vigilant        // (c) 1988 (World)
1803vigilantb      // (c) 1988 (World)
1803vigilantb       // (c) 1988 (World)
18041804vigilant1       // (c) 1988 (World)
18051805vigilantu       // (c) 1988 (US)
18061806vigilantu2      // (c) 1988 (US)
r242066r242067
20892089kicknrunu       // A87 (c) 1986 Taito Corporation
20902090mexico86        // bootleg (Micro Research)
20912091darius          // A96 (c) 1986 Taito Corporation Japan (World)
2092dariusu         // A96 (c) 1986 Taito America Corporation (US)
2092dariusu         // A96 (c) 1986 Taito America Corporation (US)
20932093dariusj         // A96 (c) 1986 Taito Corporation (Japan)
20942094dariuso         // A96 (c) 1986 Taito Corporation (Japan)
20952095dariuse         // A96 (c) 1986 Taito Corporation (Japan)
r242066r242067
22802280cubybop         // ??? no copyright message
22812281plgirls         // (c) 1992 Hot-B.
22822282plgirls2        // (c) 1993 Hot-B.
2283plgirls2b      //
2283plgirls2b       //
22842284lagirl          // plgirls bootleg?
22852285
22862286// Taito H-System games
r242066r242067
28532853tjumpman        // (c) 1999 Namco
28542854
28552855mushisam        // (c) 2004 Cave (AMI license) - 2004/10/12.MASTER VER.
2856mushisama       // (c) 2004 Cave (AMI license) - 2004/10/12 MASTER VER.     
2856mushisama       // (c) 2004 Cave (AMI license) - 2004/10/12 MASTER VER.
28572857mushisamb       // (c) 2004 Cave (AMI license) - 2004/10/12 MASTER VER
28582858espgal2         // (c) 2005 Cave (AMI license) - 2005/11/14 MASTER VER
28592859ibara           // (c) 2005 Cave (AMI license) - 2005/03/22 MASTER VER..
r242066r242067
30293029bionicc1        //  3/1987 (c) 1987 (US)
30303030bionicc2        //  3/1987 (c) 1987 (US)
30313031topsecrt        //  3/1987 (c) 1987 (Japan)
3032supduck         // (c) Comad
3032supduck         // (c) Comad
303330331943            //  6/1987 (c) 1987 (Euro)
303430341943u           //  6/1987 (c) 1987 (US) Rev C
303530351943j           //  6/1987 (c) 1987 (Japan) Rev B
r242066r242067
32203220sf2mdt          // bootleg
32213221sf2mdta         // bootleg
32223222sf2mdtb         // bootleg
3223sf2b           // bootleg
3223sf2b            // bootleg
32243224cworld2j        // 11/06/1992 (c) 1992 (Japan)
32253225varth           // 14/07/1992 (c) 1992 (World)
32263226varthr1         // 12/06/1992 (c) 1992 (World)
r242066r242067
45874587dduxj           // (c) 1989 (FD1094, decrypted)
45884588ddux1           // (c) 1989 (8751)
45894589dunkshot        // (c) 1986 (FD1094, decrypted)
4590dunkshoto      // (c) 1986 (FD1094, decrypted)
4590dunkshoto       // (c) 1986 (FD1094, decrypted)
45914591eswat           // (c) 1989 (FD1094, decrypted)
45924592eswatu          // (c) 1989 (FD1094, decrypted)
45934593eswatj          // (c) 1989 (FD1094, decrypted)
r242066r242067
52625262aladmdb         // MegaDrive-based hack
52635263mk3mdb          // MegaDrive-based hack
52645264srmdb           // MegaDrive-based hack
5265sonic2mb      // MegaDrive-based hack
5265sonic2mb        // MegaDrive-based hack
52665266
52675267// Sega Naomi-based (Dreamcast) systems
52685268naomi           // 1998.?? Naomi BIOS
r242066r242067
58425842gekitsui        // (c) 1985 Data East Corporation (Japan)
58435843tryout          // (c) 1985 Data East Corporation (Japan)
58445844firetrap        // (c) 1986 Data East USA (US)
5845firetrapa      // (c) 1986 Data East USA (US)
5845firetrapa       // (c) 1986 Data East USA (US)
58465846firetrapj       // (c) 1986 Wood Place Inc. (Japan)
58475847firetrapbl      // bootleg
58485848metlclsh        // (c) 1985 Data East
r242066r242067
64576457tmntua          // GX963 (c) 1989 (US)
64586458tmht            // GX963 (c) 1989 (UK)
64596459tmhta           // GX963 (c) 1989 (UK)
6460tmhtb         // GX963 (c) 1989 (UK?)
6460tmhtb           // GX963 (c) 1989 (UK?)
64616461tmntj           // GX963 (c) 1990 (Japan)
64626462tmht2p          // GX963 (c) 1989 (UK)
64636463tmht2pa         // GX963 (c) 1989 (UK)
r242066r242067
68616861// Smokey Joe   // 030926           1978/07 [6502]
68626862sbrkout3        // 033442-033452    1978/09 [6502]
68636863sbrkout         // 033453-033455    1978/09 [6502]
6864sbrkoutc      // unrealeased proto
6864sbrkoutc        // unrealeased proto
68656865atarifb         // 033xxx           1978/10 [6502]
68666866atarifb1        // 033xxx           1978/10 [6502]
68676867orbit           // 033689-033702    1978/11 [6800]
r242066r242067
79297929ninjakd2a       // UPL-????? (c) 1987
79307930ninjakd2b       // UPL-????? (c) 1987
79317931rdaction        // UPL-87003?(c) 1987 + World Games license
7932jt104         // hack?
7932jt104           // hack?
79337933mnight          // UPL-????? (c) 1987 distributed by Kawakus
79347934arkarea         // UPL-87007 (c) 1988 (Arcade TV Game List - P.67, Right, 2 from top)
79357935robokid         // UPL-88013 (c) 1988
r242066r242067
83228322sbagman         // (c) 1984
83238323sbagmans        // (c) 1984 + Stern license
83248324botanic         // (c) 1983
8325botanicf      // (c) 1984
8325botanicf        // (c) 1984
83268326squaitsa        // (c) 1985
83278327tankbust        // (c) 1985
83288328
r242066r242067
83758375goodejana       // (c) 1991 Seibu/Tecmo
83768376
83778377raiden2         // (c) 1993 Seibu Kaihatsu + Fabtek license
8378raiden2sw      // (c) 1993 Seibu Kaihats
8378raiden2sw       // (c) 1993 Seibu Kaihats
83798379raiden2u        // (c) 1993 Seibu Kaihatsu + Fabtek license
83808380raiden2hk       // (c) 1993 Seibu Kaihatsu + Metrotainment license
83818381raiden2j        // (c) 1993 Seibu Kaihatsu
r242066r242067
87218721baryona         // (c) 1997 SemiCom
87228722dreamwld        // (c) 2000 SemiCom
87238723rolcrush        // (c) 1999 Trust
8724cutefght      // (c) 1998 SemiCom
8724cutefght        // (c) 1998 SemiCom
87258725
87268726// SH2 board
87278727s1945ii         // (c) 1997
r242066r242067
88368836// SH-4 hardware
88378837atvtrack        // (c) 2002 - Ref 020419
88388838atvtracka       // (c) 2002 - Ref 020419
8839smashdrv      // (c) 2000
8839smashdrv        // (c) 2000
88408840
88418841/*
88428842  Remaining Gaelco Games:
r242066r242067
93179317musicbal        // (c) 1987
93189318sauro           // (c) 1987
93199319saurop          // (c) 1987
9320saurorr         // (c) 1987
9320saurorr         // (c) 1987
93219321trckydoc        // (c) 1987
93229322trckydoca       // (c) 1987
93239323
r242066r242067
95889588jongtei         // "532" Mahjong Jong-Tei (C) 1999 Dynax
95899589seljan2         // "557" 1996 Dynax / Face
95909590realbrk         // "600" Billiard Academy Real Break 1998 (Europe)
9591realbrko      // "600" Billiard Academy Real Break 1998 (Europe)
9591realbrko        // "600" Billiard Academy Real Break 1998 (Europe)
95929592realbrkk        // "600" Billiard Academy Real Break 1998 (Korea)
95939593janshinp        // "700j" 1996 Dynax / Sigma
95949594dtoyoken        // "700d" 1996 Dynax / Sigma
r242066r242067
97499749dw2v100x        //
97509750drgw2c          //
97519751drgw2j          //
9752drgw2hk         //
9752drgw2hk         //
97539753drgw3           // (c) 1998 Dragon World 3
97549754drgw3105        //
97559755drgw3100        //
r242066r242067
98509850// IGS PGM2 Platform
98519851orleg2          // (c) 2007
98529852orleg2o         //
9853orleg2oa      //
9853orleg2oa        //
98549854kov2nl          // (c) 2008
98559855kov2nlo         //
9856kov2nloa      //
9856kov2nloa        //
98579857ddpdojh         //
98589858kov3            //
98599859
r242066r242067
3186431864cocoloco   // 198?, Petaco S.A.
3186531865
3186631866alinvade
31867
trunk/src/mame/video/cps1.c
r242066r242067
15251525   {"sf2mdt",      CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 },
15261526   {"sf2mdta",     CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 },
15271527   {"sf2mdtb",     CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 },
1528   {"sf2b",       CPS_B_17,     mapper_STF29,  0x36, 0, 0, 1  },
1528   {"sf2b",        CPS_B_17,     mapper_STF29,  0x36, 0, 0, 1  },
15291529   {"varth",       CPS_B_04,     mapper_VA63B },   /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */  // wrong, this set uses VA24B, dumped but equations still not added
15301530   {"varthr1",     CPS_B_04,     mapper_VA63B },   /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */  // wrong, this set uses VA24B, dumped but equations still not added
15311531   {"varthu",      CPS_B_04,     mapper_VA63B },   /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */
trunk/src/mame/video/dooyong.c
r242066r242067
185185      flags = TILE_FLIPYX((attr & 0x06) >> 1);
186186   }
187187   else
188   {   /* primella/popbingo */
188   {   /* primella/popbingo */
189189      /* Tiles take two bytes in ROM:
190190                       MSB   LSB
191191         [offs + 0x00] YXCC CCcc    (Y flip, X flip, bits 3-0 of color code, bits 9-8 of gfx code)
trunk/src/mame/video/exidy440.c
r242066r242067
381381 *
382382 *************************************/
383383
384void exidy440_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,   int scroll_offset, int check_collision)
384void exidy440_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,  int scroll_offset, int check_collision)
385385{
386386   /* draw any dirty scanlines from the VRAM directly */
387387   int sy = scroll_offset + cliprect.min_y;
trunk/src/mame/video/harddriv.c
r242066r242067
410410TMS340X0_SCANLINE_IND16_CB_MEMBER(harddriv_state::scanline_driver)
411411{
412412   UINT8 *vram_base = &m_gsp_vram[(params->rowaddr << 12) & m_vram_mask];
413   
413
414414   if (!vram_base) return;
415   
415
416416   UINT16 *dest = &bitmap.pix16(scanline);
417417   int coladdr = (params->yoffset << 9) + ((params->coladdr & 0xff) << 4) - 15 + (m_gfx_finescroll & 0x0f);
418418   int x;
r242066r242067
429429{
430430   UINT8 *vram_base = &m_gsp_vram[(params->rowaddr << 11) & m_vram_mask];
431431
432   if (!vram_base) return;   
433   
432   if (!vram_base) return;
433
434434   UINT16 *dest = &bitmap.pix16(scanline);
435435   int coladdr = (params->yoffset << 9) + ((params->coladdr & 0xff) << 3) - 7 + (m_gfx_finescroll & 0x07);
436436   int x;
trunk/src/mame/video/model3.c
r242066r242067
1111#define TRI_PARAM_TEXTURE_ENABLE        0x8
1212#define TRI_PARAM_ALPHA_TEST            0x10
1313
14#define TRI_BUFFER_SIZE               35000
15#define TRI_ALPHA_BUFFER_SIZE         15000
14#define TRI_BUFFER_SIZE                 35000
15#define TRI_ALPHA_BUFFER_SIZE           15000
1616
1717struct model3_polydata
1818{
r242066r242067
412412
413413    0xF1180000:         ?
414414    0xF1180004:         ?
415   0xF1180008:         ?                           lostwsga: writes 0x7f010000
416                                             lemans24, magtruck, von2, lamachin: writes 0xee000000
417                                             bass, vs2, harley, scud, skichamp, fvipers2, eca: writes 0xef000000
418                                             srally2, swtrilgy: writes 0x70010000
419                                             daytona2: writes 0x4f010000
415    0xF1180008:         ?                                   lostwsga: writes 0x7f010000
416                                                            lemans24, magtruck, von2, lamachin: writes 0xee000000
417                                                            bass, vs2, harley, scud, skichamp, fvipers2, eca: writes 0xef000000
418                                                            srally2, swtrilgy: writes 0x70010000
419                                                            daytona2: writes 0x4f010000
420420
421421    0xF1180010:                                             VBL IRQ acknowledge
422422
r242066r242067
855855            -------- -xxxxx-- -------- -------- Polygon transparency (0 = fully transparent)
856856            -------- -------x -------- -------- 1 = disable lighting
857857            -------- -------- xxxxx--- -------- Polygon luminosity
858         -------- -------- -----x-- -------- Texture enable
858            -------- -------- -----x-- -------- Texture enable
859859            -------- -------- ------xx x------- Texture format
860860            -------- -------- -------- -------x Alpha enable?
861861            -------- ------x- -------- -xxxxxx- ?
r242066r242067
10331033      int ti = m_viewport_tri_index[i];
10341034      int tia = m_viewport_tri_alpha_index[i];
10351035      if (i < 3)
1036      {         
1036      {
10371037         ticount = m_viewport_tri_index[i+1] - ti;
10381038         tiacount = m_viewport_tri_alpha_index[i+1] - tia;
10391039      }
r242066r242067
13311331         return NULL;
13321332         //fatalerror("push_triangle: tri buffer max exceeded");
13331333      }
1334     
1334
13351335      m_tri_buffer_ptr++;
13361336      return &m_tri_buffer[i];
13371337   }
r242066r242067
15751575         }
15761576
15771577         for (i=2; i < num_vertices; i++)
1578         {           
1579            bool alpha = (header[6] & 0x1) || (header[6] & 0x80000000);      // put to alpha buffer if there's any transparency involved
1578         {
1579            bool alpha = (header[6] & 0x1) || (header[6] & 0x80000000);     // put to alpha buffer if there's any transparency involved
15801580            m3_triangle* tri = push_triangle(alpha);
15811581
15821582            // bail out if tri buffer is maxed out (happens during harley boot)
r242066r242067
18591859   cliprect.min_y = 0;
18601860   cliprect.max_x = 495;
18611861   cliprect.max_y = 383;
1862   
1862
18631863   float zvalue = 10000000000.0f;
18641864   m_zb->fill(*(int*)&zvalue, cliprect);
18651865}
r242066r242067
18771877   cliprect.max_x = 495;
18781878   cliprect.max_y = 383;
18791879
1880//   printf("draw opaque: %d\n", num_tris);
1880//  printf("draw opaque: %d\n", num_tris);
18811881
18821882   vertex_t v[3];
18831883
r242066r242067
18971897            v[i].p[3] = tri->v[i].v * 256.0f;
18981898            v[i].p[4] = tri->v[i].i;
18991899         }
1900   
1900
19011901         model3_polydata &extra = object_data_alloc();
19021902         extra.texture = tri->texture;
19031903         extra.transparency = tri->transparency;
r242066r242067
19311931   cliprect.max_x = 495;
19321932   cliprect.max_y = 383;
19331933
1934//   printf("draw alpha: %d\n", num_tris);
1934//  printf("draw alpha: %d\n", num_tris);
19351935
19361936   vertex_t v[3];
19371937
r242066r242067
19511951            v[i].p[3] = tri->v[i].v * 256.0f;
19521952            v[i].p[4] = tri->v[i].i;
19531953         }
1954   
1954
19551955         model3_polydata &extra = object_data_alloc();
19561956         extra.texture = tri->texture;
19571957         extra.transparency = tri->transparency;
trunk/src/mame/video/psychic5.c
r242066r242067
129129}
130130
131131WRITE8_MEMBER( psychic5_state::bg_videoram_w )
132{   
132{
133133   m_bg_videoram[offset] = data;
134134   m_bg_tilemap->mark_tile_dirty(offset >> 1);
135135}
trunk/src/mame/video/rdpspn16.c
r242066r242067
209209      dzpix = object.MiscState.PrimitiveDZ;
210210      dzinc = 0;
211211   }
212   
212
213213   if (object.MiscState.FBSize < 2 || object.MiscState.FBSize > 4)
214214      fatalerror("unsupported FBSize %d\n", object.MiscState.FBSize);
215215
trunk/src/mame/video/sshangha.c
r242066r242067
3535   // I'm pretty sure only the original has the 2nd spriteram, used for the Japanese text on the 2nd scene (non-scrolling text) in the intro of the quest (3rd in JPN) mode
3636   if (m_spriteram2 != NULL)
3737      m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
38   
38
3939   // flip screen
4040   address_space &space = machine().driver_data()->generic_space();
4141   UINT16 flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
trunk/src/mess/audio/dave.c
r242066r242067
9797   save_item(NAME(m_mame_volumes));
9898
9999   for (int i = 0; i < ARRAY_LENGTH(m_period); i++)
100      m_period[i] = (STEP * machine().sample_rate()) / 125000;   
100      m_period[i] = (STEP * machine().sample_rate()) / 125000;
101101
102102   for (int i = 0; i < ARRAY_LENGTH(m_count); i++)
103103      m_count[i] = (STEP * machine().sample_rate()) / 125000;
trunk/src/mess/drivers/apple2.c
r242066r242067
22// copyright-holders:R. Belmont
33/***************************************************************************
44
5   apple2.c - Apple II/II Plus and clones
5    apple2.c - Apple II/II Plus and clones
66
7    Next generation driver written in September/October 2014 by R. Belmont.
8    Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont
9    Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie.
10 
11II: original base model.  RAM sizes of 4, 8, 12, 16, 20, 24, 32, 36, and 48 KB possible.
7    Next generation driver written in September/October 2014 by R. Belmont.
8    Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont
9    Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie.
10
11II: original base model.  RAM sizes of 4, 8, 12, 16, 20, 24, 32, 36, and 48 KB possible.
1212    8K of ROM at $E000-$FFFF, empty sockets for $D000-$D7FF and $D800-$DFFF.
1313    Programmer's Aid #1 was sold by Apple for $D000-$D7FF, some third-party ROMs
1414    were also available.
r242066r242067
1919
2020    ROM contains original non-autostart Monitor and Integer BASIC; apparently
2121    Autostart + Integer is also possible.
22 
23II Plus: RAM options reduced to 16/32/48 KB.
22
23II Plus: RAM options reduced to 16/32/48 KB.
2424    ROM expanded to 12KB from $D000-$FFFF containing Applesoft BASIC and
2525    the Autostart Monitor.  Applesoft is a licensed version of Microsoft's
2626    6502 BASIC as also found in Commodore and many other computers.
27 
28 
27
28
2929    Users of both models often connected the SHIFT key to the paddle #2 button
3030    (mapped to $C063) in order to inform properly written software that characters
3131    were to be intended upper/lower case.
32
32
3333    Both models commonly included a RAM "language card" in slot 0 which added 16K
3434    of RAM which could be banked into the $D000-$FFFF space to replace the ROMs.
3535    This allowed running Applesoft on a II and Integer BASIC on a II Plus.
3636    A II Plus with this card installed is often called a "64K Apple II"; this is
3737    the base configuration required to run ProDOS and some larger games.
38 
39************************************************************************/
40 
38
39************************************************************************/
40
4141#include "emu.h"
4242#include "machine/bankdev.h"
4343#include "machine/ram.h"
r242066r242067
212212   {
213213      // assume no cards are pulling /INH
214214      m_inh_slot = -1;
215                           
215
216216      // scan the slots to figure out which card(s) are INHibiting stuff
217217      for (int i = 0; i <= 7; i++)
218218      {
r242066r242067
226226               {
227227                  if (m_inh_bank != 1)
228228                  {
229                     m_upperbank->set_bank(1);
229                     m_upperbank->set_bank(1);
230230                     m_inh_bank = 1;
231231                  }
232232               }
r242066r242067
234234               {
235235                  if (m_inh_bank != 0)
236236                  {
237                     m_upperbank->set_bank(0);
237                     m_upperbank->set_bank(0);
238238                     m_inh_bank = 0;
239239                  }
240240               }
r242066r242067
248248      // if no slots are inhibiting, make sure ROM is fully switched in
249249      if ((m_inh_slot == -1) && (m_inh_bank != 0))
250250      {
251         m_upperbank->set_bank(0);
251         m_upperbank->set_bank(0);
252252         m_inh_bank = 0;
253253      }
254254   }
r242066r242067
315315   m_anykeydown = false;
316316}
317317
318/***************************************************************************
318/***************************************************************************
319319    VIDEO
320320***************************************************************************/
321321
r242066r242067
332332      m_video->m_sysconfig = m_sysconfig->read();
333333
334334      // check reset
335      if (m_resetdip)   // if reset DIP is present, use it
335      if (m_resetdip) // if reset DIP is present, use it
336336      {
337337         if (m_resetdip->read() & 1)
338         {      // CTRL-RESET
338         {       // CTRL-RESET
339339            if ((m_kbspecial->read() & 0x88) == 0x88)
340340            {
341341               m_maincpu->reset();
342342            }
343343         }
344         else   // plain RESET
344         else    // plain RESET
345345         {
346346            if (m_kbspecial->read() & 0x80)
347347            {
r242066r242067
349349            }
350350         }
351351      }
352      else   // no DIP, so always plain RESET
352      else    // no DIP, so always plain RESET
353353      {
354354         if (m_kbspecial->read() & 0x80)
355355         {
r242066r242067
383383            m_video->hgr_update(screen, bitmap, cliprect, 0, 191);
384384         }
385385      }
386      else   // lo-res
387      {   
386      else    // lo-res
387      {
388388         if (m_video->m_mix)
389389         {
390390            m_video->lores_update(screen, bitmap, cliprect, 0, 159);
r242066r242067
404404   return 0;
405405}
406406
407/***************************************************************************
407/***************************************************************************
408408    I/O
409409***************************************************************************/
410410// most softswitches don't care about read vs write, so handle them here
r242066r242067
440440         m_video->m_mix = true; break;
441441
442442      case 0x54:  // set page 1
443         m_page2 = false;
443         m_page2 = false;
444444         m_video->m_page2 = false;
445445         break;
446446
447447      case 0x55:  // set page 2
448         m_page2 = true;
448         m_page2 = true;
449449         m_video->m_page2 = true;
450450         break;
451451
r242066r242067
479479      case 0x5f: // AN3 on
480480         m_an3 = true; break;
481481
482      case 0x68:   // IIgs STATE register, which ProDOS touches
482      case 0x68:  // IIgs STATE register, which ProDOS touches
483483         break;
484484
485485      case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77:
r242066r242067
510510      case 0x68:
511511         return m_cassette->input() > 0.0 ? 0x80 : 0;
512512
513      case 0x61:   // button 0
513      case 0x61:  // button 0
514514      case 0x69:
515515         return (m_joybuttons->read() & 0x10) ? 0x80 : 0;
516516
517      case 0x62:   // button 1
517      case 0x62:  // button 1
518518      case 0x6a:
519519         return (m_joybuttons->read() & 0x20) ? 0x80 : 0;
520520
521      case 0x63:   // button 2
521      case 0x63:  // button 2
522522      case 0x6b:
523523         // check if SHIFT key mod configured
524524         if (m_sysconfig->read() & 0x04)
r242066r242067
527527         }
528528         return (m_joybuttons->read() & 0x40) ? 0x80 : 0;
529529
530      case 0x64:   // joy 1 X axis
530      case 0x64:  // joy 1 X axis
531531      case 0x6c:
532532         return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0;
533533
534      case 0x65:   // joy 1 Y axis
534      case 0x65:  // joy 1 Y axis
535535      case 0x6d:
536536         return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0;
537537
r242066r242067
666666{
667667   if (m_inh_slot != -1)
668668   {
669      return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000);
669      return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000);
670670   }
671671
672   assert(0);   // hitting inh_r with invalid m_inh_slot should not be possible
672   assert(0);  // hitting inh_r with invalid m_inh_slot should not be possible
673673   return read_floatingbus();
674674}
675675
r242066r242067
942942      if (m_transchar != 0)
943943      {
944944         m_strobe = 0x80;
945//         printf("new char = %04x (%02x)\n", m_lastchar&0x3f, m_transchar);
945//          printf("new char = %04x (%02x)\n", m_lastchar&0x3f, m_transchar);
946946      }
947947   }
948948}
r242066r242067
10211021   PORT_CONFSETTING(0x02, "Green")
10221022   PORT_CONFSETTING(0x03, "Amber")
10231023
1024   PORT_CONFNAME(0x04, 0x04, "Shift key mod")   // default to installed
1024   PORT_CONFNAME(0x04, 0x04, "Shift key mod")  // default to installed
10251025   PORT_CONFSETTING(0x00, "Not present")
10261026   PORT_CONFSETTING(0x04, "Installed")
10271027INPUT_PORTS_END
r242066r242067
10531053   PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)  PORT_CHAR('7') PORT_CHAR('\'')
10541054   PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)  PORT_CHAR('8') PORT_CHAR('(')
10551055   PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9)  PORT_CHAR('9') PORT_CHAR(')')
1056   PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)  PORT_CHAR('0')
1056   PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0)  PORT_CHAR('0')
10571057   PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS)  PORT_CHAR(':') PORT_CHAR('*')
10581058   PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=')
10591059
r242066r242067
11861186
11871187static SLOT_INTERFACE_START(apple2_slot0_cards)
11881188   SLOT_INTERFACE("lang", A2BUS_RAMCARD16K)      /* Apple II RAM Language Card */
1189   SLOT_INTERFACE("ssram", A2BUS_RAMCARD128K)     /* Saturn Systems 128K extended language card */
1189   SLOT_INTERFACE("ssram", A2BUS_RAMCARD128K)    /* Saturn Systems 128K extended language card */
11901190SLOT_INTERFACE_END
11911191
11921192static SLOT_INTERFACE_START(apple2_cards)
r242066r242067
12771277   MCFG_AY3600_SHIFT_CB(READLINE(napple2_state, ay3600_shift_r))
12781278   MCFG_AY3600_CONTROL_CB(READLINE(napple2_state, ay3600_control_r))
12791279   MCFG_AY3600_DATA_READY_CB(WRITELINE(napple2_state, ay3600_data_ready_w))
1280   MCFG_AY3600_AKO_CB(WRITELINE(napple2_state, ay3600_ako_w))
1280   MCFG_AY3600_AKO_CB(WRITELINE(napple2_state, ay3600_ako_w))
12811281
12821282   /* repeat timer.  15 Hz from page 90 of "The Apple II Circuit Description */
12831283   MCFG_TIMER_DRIVER_ADD_PERIODIC("repttmr", napple2_state, ay3600_repeat, attotime::from_hz(15))
trunk/src/mess/drivers/apple2e.c
r242066r242067
44
55    apple2e.c - Apple IIe/IIc/IIc Plus and clones
66
7    Next generation driver written in September/October 2014 by R. Belmont.
8    Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont
9    Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie.
10 
11 
12    IIe: base of this driver.  64K RAM, slot 0 language card emulation without the double-read requirement,
7    Next generation driver written in September/October 2014 by R. Belmont.
8    Thanks to the original Apple II series driver's authors: Mike Balfour, Nathan Woods, and R. Belmont
9    Special thanks to the Apple II Documentation Project/Antoine Vignau and Peter Ferrie.
10
11
12    IIe: base of this driver.  64K RAM, slot 0 language card emulation without the double-read requirement,
1313         lowercase and SHIFT key on button 2, Open and Solid Apple buttons on joy buttons 0 and 1,
1414         auxiliary slot, built-in 80 column support if extra RAM added.
15 
16       Physical slot 0 was eliminated thanks to the built-in language card.
17 
18       Most of the write-only softswitches gained readback locations, necessary to make interrupt-driven
19       software possible.
20 
21       Base 80-column card: 1K RAM, allows 80 columns and double-lo-res,
22       no double-hi-res.
23 
24       Extended 80-column card: 64K RAM (including a second language card),
25       allows 80 columns, double-lo-res, and double-hi-res.
26 
27       Revision A motherboards (very rare) don't support double-hi-res; it's unclear
28       if double-lo-res works or not.  We emulate the much more common Rev B or later
29       board.
30 
31   IIe enhanced: 65C02 CPU with more instructions, MouseText in the character generator.
32 
33   IIe platinum: Like enhanced but with added numeric keypad and extended 80-column card
34       included in the box.  Keypad CLEAR generates ESC by default, one hardware mod
35       made it generate CTRL-X instead.  (new keyboard encoder ROM?)
36 
37   NOTE: On real IIe and IIe enhanced h/w, pressing SHIFT and paddle button 2 will
38   short out the power supply and cause a safety shutdown.  (We don't emulate
39   this "feature", and it was relatively rare in real life as Apple joysticks only
40   had buttons 0 and 1 normally).
41 
42   IIc: IIe enhanced shrunken into a pizzabox with a Disk II compatible
43       half-height drive included in the case.
44   
45    No slots, but included functionality equivalent to the following slots
46    on the motherboard:
15
16         Physical slot 0 was eliminated thanks to the built-in language card.
17
18         Most of the write-only softswitches gained readback locations, necessary to make interrupt-driven
19         software possible.
20
21         Base 80-column card: 1K RAM, allows 80 columns and double-lo-res,
22         no double-hi-res.
23
24         Extended 80-column card: 64K RAM (including a second language card),
25         allows 80 columns, double-lo-res, and double-hi-res.
26
27         Revision A motherboards (very rare) don't support double-hi-res; it's unclear
28         if double-lo-res works or not.  We emulate the much more common Rev B or later
29         board.
30
31    IIe enhanced: 65C02 CPU with more instructions, MouseText in the character generator.
32
33    IIe platinum: Like enhanced but with added numeric keypad and extended 80-column card
34         included in the box.  Keypad CLEAR generates ESC by default, one hardware mod
35         made it generate CTRL-X instead.  (new keyboard encoder ROM?)
36
37    NOTE: On real IIe and IIe enhanced h/w, pressing SHIFT and paddle button 2 will
38    short out the power supply and cause a safety shutdown.  (We don't emulate
39    this "feature", and it was relatively rare in real life as Apple joysticks only
40    had buttons 0 and 1 normally).
41
42    IIc: IIe enhanced shrunken into a pizzabox with a Disk II compatible
43         half-height drive included in the case.
44
45     No slots, but included functionality equivalent to the following slots
46     on the motherboard:
4747     - 2 Super Serial Cards (modem and printer ports)
4848     - extended 80 column card / 128K RAM
4949     - Disk II IWM controller
5050     - Apple II Mouse card (firmware entry points are compatible,
5151       but the hardware implementation omits the 68705 and is quite different!)
52
52
5353     Has a 40/80 column switch and a QWERTY/DVORAK switch.
54 
55   IIc (UniDisk 3.5): IIc with ROM doubled to 32K and the ROMSWITCH register
56       added to page between the original 16K ROM and the new added 16K.  The
57       extra firmware space was dedicated to implementing the Protocol Converter,
58       later renamed "SmartPort", which communicates with "smart" packet devices
59       over the IWM bus.
60 
61       Partial AppleTalk code also exists in this ROM but it doesn't work and
62       was not completed.
63 
64   IIc (Original Memory Expansion):
65       Removes AppleTalk and adds support for a memory expansion card with up
66       to 1 MB; this is identical both in hardware and firmware to the "Slinky"
67       memory expansion card for the Apple IIe (a2bus/a2memexp.c).
6854
69   IIc (Revised Memory Expansion, Rev. 3):
70      Fixes several nasty bugs in the Original Memory Expansion version.  Not
71      currently dumped.
72 
73   IIc (Rev 4):
74      Fixes memory size detection for memory cards with less than 1MB.  Fixes
75      several screen hole errors introduced in Rev 3, and fixes Terminal Mode
76      wherein the firmware can be put into a built-in terminal mode for simple
77      tests with a modem.
78 
79   IIc Plus:
80      Like IIc with memory expansion, but with licensed built-in Zip Chip which
81      runs the 65C02 at 4 MHz turbo speed with a small cache RAM.
55    IIc (UniDisk 3.5): IIc with ROM doubled to 32K and the ROMSWITCH register
56         added to page between the original 16K ROM and the new added 16K.  The
57         extra firmware space was dedicated to implementing the Protocol Converter,
58         later renamed "SmartPort", which communicates with "smart" packet devices
59         over the IWM bus.
8260
83      The machine has an internal "Apple 3.5" drive plus a custom gate array
84      which emulates the functionality of the UniDisk 3.5's on-board 65C02. 
85      This gets around the fact that 1 MHz isn't sufficient to handle direct
86      Woz-style control of a double-density 3.5" drive.
61         Partial AppleTalk code also exists in this ROM but it doesn't work and
62         was not completed.
8763
88      External drive port allows IIgs-style daisy-chaining.
64    IIc (Original Memory Expansion):
65         Removes AppleTalk and adds support for a memory expansion card with up
66         to 1 MB; this is identical both in hardware and firmware to the "Slinky"
67         memory expansion card for the Apple IIe (a2bus/a2memexp.c).
8968
69    IIc (Revised Memory Expansion, Rev. 3):
70        Fixes several nasty bugs in the Original Memory Expansion version.  Not
71        currently dumped.
72
73    IIc (Rev 4):
74        Fixes memory size detection for memory cards with less than 1MB.  Fixes
75        several screen hole errors introduced in Rev 3, and fixes Terminal Mode
76        wherein the firmware can be put into a built-in terminal mode for simple
77        tests with a modem.
78
79    IIc Plus:
80        Like IIc with memory expansion, but with licensed built-in Zip Chip which
81        runs the 65C02 at 4 MHz turbo speed with a small cache RAM.
82
83        The machine has an internal "Apple 3.5" drive plus a custom gate array
84        which emulates the functionality of the UniDisk 3.5's on-board 65C02.
85        This gets around the fact that 1 MHz isn't sufficient to handle direct
86        Woz-style control of a double-density 3.5" drive.
87
88        External drive port allows IIgs-style daisy-chaining.
89
9090----------------------------------
9191
9292TK3000 keyboard matrix
r242066r242067
163163#define A2_AUXSLOT_TAG "auxbus"
164164#define A2_VIDEO_TAG "a2video"
165165
166#define A2_0000_TAG   "r00bank"
167#define A2_0200_TAG   "r02bank"
168#define A2_0400_TAG   "r04bank"
169#define A2_0800_TAG   "r08bank"
170#define A2_2000_TAG   "r20bank"
171#define A2_4000_TAG   "r40bank"
172#define A2_C100_TAG   "c1bank"
173#define A2_C300_TAG   "c3bank"
174#define A2_C400_TAG   "c4bank"
175#define A2_C800_TAG   "c8bank"
166#define A2_0000_TAG "r00bank"
167#define A2_0200_TAG "r02bank"
168#define A2_0400_TAG "r04bank"
169#define A2_0800_TAG "r08bank"
170#define A2_2000_TAG "r20bank"
171#define A2_4000_TAG "r40bank"
172#define A2_C100_TAG "c1bank"
173#define A2_C300_TAG "c3bank"
174#define A2_C400_TAG "c4bank"
175#define A2_C800_TAG "c8bank"
176176#define A2_LCBANK_TAG "lcbank"
177177
178178#define MOUSE_BUTTON_TAG    "mse_button"
179179#define MOUSE_XAXIS_TAG     "mse_x"
180180#define MOUSE_YAXIS_TAG     "mse_y"
181181
182#define CNXX_UNCLAIMED    -1
183#define CNXX_INTROM    -2
182#define CNXX_UNCLAIMED  -1
183#define CNXX_INTROM     -2
184184
185185#define IRQ_SLOT 0
186#define IRQ_VBL    1
186#define IRQ_VBL 1
187187#define IRQ_MOUSEXY 2
188188
189189class apple2e_state : public driver_device
r242066r242067
430430   {
431431      // assume no cards are pulling /INH
432432      m_inh_slot = -1;
433                           
433
434434      // scan the slots to figure out which card(s) are INHibiting stuff
435435      for (int i = 0; i <= 7; i++)
436436      {
r242066r242067
444444               {
445445                  if (m_inh_bank != 1)
446446                  {
447                     m_upperbank->set_bank(1);
447                     m_upperbank->set_bank(1);
448448                     m_inh_bank = 1;
449449                  }
450450               }
r242066r242067
452452               {
453453                  if (m_inh_bank != 0)
454454                  {
455                     m_upperbank->set_bank(0);
455                     m_upperbank->set_bank(0);
456456                     m_inh_bank = 0;
457457                  }
458458               }
r242066r242067
466466      // if no slots are inhibiting, make sure ROM is fully switched in
467467      if ((m_inh_slot == -1) && (m_inh_bank != 0))
468468      {
469         m_upperbank->set_bank(0);
469         m_upperbank->set_bank(0);
470470         m_inh_bank = 0;
471471      }
472472   }
r242066r242067
485485   {
486486      if (m_exp_liveptr <= m_exp_addrmask)
487487      {
488         retval = m_exp_ram[m_exp_liveptr];
488         retval = m_exp_ram[m_exp_liveptr];
489489      }
490490      else
491491      {
r242066r242067
569569   m_cassette_out = 0;
570570   if (m_cassette)
571571   {
572      m_cassette->output(-1.0f);
572      m_cassette->output(-1.0f);
573573   }
574574   m_upperbank->set_bank(0);
575575   m_lcbank->set_bank(0);
r242066r242067
587587      m_exp_addrmask = m_ram_size - (128*1024) - 1;
588588      m_exp_ram = m_ram_ptr + (128*1024);
589589   }
590   else   // no expansion
590   else    // no expansion
591591   {
592592      m_exp_addrmask = 0;
593593      m_exp_ram = NULL;
r242066r242067
612612      m_aux_ptr = m_auxslotdevice->get_vram_ptr();
613613      m_aux_bank_ptr = m_auxslotdevice->get_auxbank_ptr();
614614   }
615   else   // IIc has 128K right on the motherboard
615   else    // IIc has 128K right on the motherboard
616616   {
617617      m_auxslotdevice = NULL;
618618
619619      if (m_ram_size >= (128*1024))
620620      {
621         m_aux_ptr = &m_ram_ptr[0x10000];
621         m_aux_ptr = &m_ram_ptr[0x10000];
622622         m_aux_bank_ptr = m_aux_ptr;
623623      }
624624   }
r242066r242067
749749
750750   if (m_irqmask)
751751   {
752      m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
752      m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
753753   }
754754}
755755
r242066r242067
760760
761761   if (!m_irqmask)
762762   {
763      m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
763      m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
764764   }
765765}
766766
767/***************************************************************************
767/***************************************************************************
768768    VIDEO
769769***************************************************************************/
770770
r242066r242067
779779
780780   if (m_isiic)
781781   {
782      update_iic_mouse();
782      update_iic_mouse();
783783   }
784784
785785   if (scanline == 192)
r242066r242067
828828         {
829829            if (m_video->m_dhires)
830830            {
831               m_video->dhgr_update(screen, bitmap, cliprect, 0, 159);
831               m_video->dhgr_update(screen, bitmap, cliprect, 0, 159);
832832            }
833833            else
834834            {
835               m_video->hgr_update(screen, bitmap, cliprect, 0, 159);
835               m_video->hgr_update(screen, bitmap, cliprect, 0, 159);
836836            }
837837            m_video->text_update(screen, bitmap, cliprect, 160, 191);
838838         }
r242066r242067
848848            }
849849         }
850850      }
851      else   // lo-res
852      {   
851      else    // lo-res
852      {
853853         if (m_video->m_mix)
854854         {
855855            if (m_video->m_dhires)
r242066r242067
867867         {
868868            if (m_video->m_dhires)
869869            {
870               m_video->dlores_update(screen, bitmap, cliprect, 0, 191);
870               m_video->dlores_update(screen, bitmap, cliprect, 0, 191);
871871            }
872872            else
873873            {
874               m_video->lores_update(screen, bitmap, cliprect, 0, 191);
874               m_video->lores_update(screen, bitmap, cliprect, 0, 191);
875875            }
876876         }
877877      }
r242066r242067
886886   return 0;
887887}
888888
889/***************************************************************************
889/***************************************************************************
890890    I/O
891891***************************************************************************/
892892void apple2e_state::auxbank_update()
r242066r242067
954954   m_c100bank->set_bank(cxswitch);
955955   m_c400bank->set_bank(cxswitch);
956956
957//   printf("intcxrom %d cnxx_slot %d isiic %d romswitch %d\n", m_intcxrom, m_cnxx_slot, m_isiic, m_romswitch);
957//  printf("intcxrom %d cnxx_slot %d isiic %d romswitch %d\n", m_intcxrom, m_cnxx_slot, m_isiic, m_romswitch);
958958   if ((m_intcxrom) || (m_cnxx_slot < 0) || (m_isiic))
959959   {
960960      if (m_romswitch)
961961      {
962         m_c800bank->set_bank(2);
962         m_c800bank->set_bank(2);
963963      }
964964      else
965965      {
966         m_c800bank->set_bank(1);
966         m_c800bank->set_bank(1);
967967      }
968968   }
969969   else
r242066r242067
975975   {
976976      if (m_romswitch)
977977      {
978         m_c300bank->set_bank(2);
978         m_c300bank->set_bank(2);
979979      }
980980      else
981981      {
982         m_c300bank->set_bank(1);
982         m_c300bank->set_bank(1);
983983      }
984984   }
985985   else
986986   {
987       m_c300bank->set_bank(0);
987      m_c300bank->set_bank(0);
988988   }
989989}
990990
r242066r242067
10181018   {
10191019      if (m_lcram)
10201020      {
1021         m_lcbank->set_bank(1);
1021         m_lcbank->set_bank(1);
10221022      }
10231023      else
10241024      {
10251025         if (m_romswitch)
10261026         {
1027            m_lcbank->set_bank(2);
1027            m_lcbank->set_bank(2);
10281028         }
10291029         else
10301030         {
1031            m_lcbank->set_bank(0);
1031            m_lcbank->set_bank(0);
10321032         }
10331033      }
10341034   }
10351035
10361036   #if 0
1037   printf("LC: new state %c%c dxxx=%04x altzp=%d\n",
1038         m_lcram ? 'R' : 'x',
1039         m_lcwriteenable ? 'W' : 'x',
1040         m_lcram2 ? 0x1000 : 0x0000,
1041         m_altzp);
1037   printf("LC: new state %c%c dxxx=%04x altzp=%d\n",
1038         m_lcram ? 'R' : 'x',
1039         m_lcwriteenable ? 'W' : 'x',
1040         m_lcram2 ? 0x1000 : 0x0000,
1041         m_altzp);
10421042   #endif
10431043}
10441044
r242066r242067
10551055      {
10561056         switch (offset)
10571057         {
1058            case 0x58:   // DisXY
1058            case 0x58:  // DisXY
10591059               m_xy = false; break;
10601060
1061            case 0x59:   // EnbXY
1061            case 0x59:  // EnbXY
10621062               m_xy = true; break;
10631063
1064            case 0x5a:   // DisVBL
1064            case 0x5a:  // DisVBL
10651065               m_vblmask = false; break;
10661066
1067            case 0x5b:   // EnVBL
1067            case 0x5b:  // EnVBL
10681068               m_vblmask = true; break;
10691069
1070            case 0x5c:   // RisX0Edge
1070            case 0x5c:  // RisX0Edge
10711071               m_x0edge = false; break;
10721072
1073            case 0x5d:   // FalX0Edge
1073            case 0x5d:  // FalX0Edge
10741074               m_x0edge = true; break;
10751075
1076            case 0x5e:   // RisY0Edge
1076            case 0x5e:  // RisY0Edge
10771077               if (!m_ioudis)
10781078               {
1079                  m_y0edge = false;
1079                  m_y0edge = false;
10801080               }
10811081               break;
10821082
1083            case 0x5f:   // FalY0Edge
1083            case 0x5f:  // FalY0Edge
10841084               if (!m_ioudis)
10851085               {
1086                  m_y0edge = true;
1086                  m_y0edge = true;
10871087               }
10881088               break;
10891089         }
r242066r242067
10911091
10921092      if (m_ioudis)
10931093      {
1094         switch (offset)
1094         switch (offset)
10951095         {
1096            case 0x5e:   // SETDHIRES
1097               m_video->m_dhires = true;
1096            case 0x5e:  // SETDHIRES
1097               m_video->m_dhires = true;
10981098               break;
10991099
1100            case 0x5f:   // CLRDHIRES
1101               m_video->m_dhires = false;
1100            case 0x5f:  // CLRDHIRES
1101               m_video->m_dhires = false;
11021102               break;
11031103         }
11041104      }
r242066r242067
11111111      case 0x20:
11121112         if (m_cassette)
11131113         {
1114            m_cassette_state ^= 1;
1114            m_cassette_state ^= 1;
11151115            m_cassette->output(m_cassette_state ? 1.0f : -1.0f);
11161116         }
11171117         break;
r242066r242067
11271127            {
11281128               if (m_romswitch)
11291129               {
1130                  m_lcbank->set_bank(2);
1130                  m_lcbank->set_bank(2);
11311131               }
11321132               else
11331133               {
1134                  m_lcbank->set_bank(0);
1134                  m_lcbank->set_bank(0);
11351135               }
11361136            }
11371137         }
r242066r242067
11421142         m_speaker->level_w(m_speaker_state);
11431143         break;
11441144
1145      case 0x48:   // (IIc only) clear mouse X/Y interrupt flags
1145      case 0x48:  // (IIc only) clear mouse X/Y interrupt flags
11461146         m_xirq = m_yirq = false;
11471147         lower_irq(IRQ_MOUSEXY);
11481148         break;
r242066r242067
11601160         m_video->m_mix = true; break;
11611161
11621162      case 0x54:  // set page 1
1163         m_page2 = false;
1163         m_page2 = false;
11641164         m_video->m_page2 = false;
11651165         auxbank_update();
11661166         break;
11671167
11681168      case 0x55:  // set page 2
1169         m_page2 = true;
1169         m_page2 = true;
11701170         m_video->m_page2 = true;
11711171         auxbank_update();
11721172         break;
11731173
11741174      case 0x56: // select lo-res
1175         m_video->m_hires = false;
1175         m_video->m_hires = false;
11761176         auxbank_update();
11771177         break;
11781178
11791179      case 0x57: // select hi-res
1180         m_video->m_hires = true;
1180         m_video->m_hires = true;
11811181         auxbank_update();
11821182         break;
11831183
r242066r242067
12051205      case 0x5f: // AN3 on
12061206         m_an3 = true; break;
12071207
1208      case 0x68:   // IIgs STATE register, which ProDOS touches
1208      case 0x68:  // IIgs STATE register, which ProDOS touches
12091209         break;
12101210
1211      // trigger joypad read
1211      // trigger joypad read
12121212      case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77:
12131213      case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f:
12141214         if (is_iic)
r242066r242067
12381238      case 0x00:  // keyboard latch
12391239         return m_transchar | m_strobe;
12401240
1241      case 0x02:   // RAMRDOFF
1241      case 0x02:  // RAMRDOFF
12421242         m_ramrd = false;
12431243         auxbank_update();
12441244         break;
12451245
1246      case 0x03:   // RAMRDON
1246      case 0x03:  // RAMRDON
12471247         m_ramrd = true;
12481248         auxbank_update();
12491249         break;
12501250
1251      case 0x04:   // RAMWRTOFF
1251      case 0x04:  // RAMWRTOFF
12521252         m_ramwrt = false;
12531253         auxbank_update();
12541254         break;
12551255
1256      case 0x05:   // RAMWRTON
1256      case 0x05:  // RAMWRTON
12571257         m_ramwrt = true;
12581258         auxbank_update();
12591259         break;
r242066r242067
12651265            return rv;
12661266         }
12671267
1268      case 0x11:   // read LCRAM2 (LC Dxxx bank)
1268      case 0x11:  // read LCRAM2 (LC Dxxx bank)
12691269         return m_lcram2 ? 0x80 : 0x00;
12701270
1271      case 0x12:   // read LCRAM (is LC readable?)
1271      case 0x12:  // read LCRAM (is LC readable?)
12721272         return m_lcram ? 0x80 : 0x00;
12731273
1274      case 0x13:   // read RAMRD
1274      case 0x13:  // read RAMRD
12751275         return m_ramrd ? 0x80 : 0x00;
12761276
1277      case 0x14:   // read RAMWRT
1277      case 0x14:  // read RAMWRT
12781278         return m_ramwrt ? 0x80 : 0x00;
12791279
1280      case 0x15:   // read INTCXROM
1280      case 0x15:  // read INTCXROM
12811281         return m_intcxrom ? 0x80 : 0x00;
12821282
1283      case 0x16:   // read ALTZP
1283      case 0x16:  // read ALTZP
12841284         return m_altzp ? 0x80 : 0x00;
12851285
1286      case 0x17:   // read SLOTC3ROM
1286      case 0x17:  // read SLOTC3ROM
12871287         return m_slotc3rom ? 0x80 : 0x00;
12881288
1289      case 0x18:   // read 80STORE
1289      case 0x18:  // read 80STORE
12901290         return m_80store ? 0x80 : 0x00;
12911291
1292      case 0x19:   // read VBLBAR
1292      case 0x19:  // read VBLBAR
12931293         return space.machine().first_screen()->vblank() ? 0x00 : 0x80;
12941294
1295      case 0x1a:   // read TEXT
1295      case 0x1a:  // read TEXT
12961296         return m_video->m_graphics ? 0x00 : 0x80;
12971297
1298      case 0x1b:   // read MIXED
1298      case 0x1b:  // read MIXED
12991299         return m_video->m_mix ? 0x80 : 0x00;
13001300
1301      case 0x1c:   // read PAGE2
1301      case 0x1c:  // read PAGE2
13021302         return m_page2 ? 0x80 : 0x00;
13031303
1304      case 0x1d:   // read HIRES
1304      case 0x1d:  // read HIRES
13051305         return m_video->m_hires ? 0x80 : 0x00;
13061306
1307      case 0x1e:   // read ALTCHARSET
1307      case 0x1e:  // read ALTCHARSET
13081308         return m_video->m_altcharset ? 0x80 : 0x00;
13091309
1310      case 0x1f:   // read 80COL
1310      case 0x1f:  // read 80COL
13111311         return m_video->m_80col ? 0x80 : 0x00;
13121312
13131313      case 0x60: // cassette in
13141314      case 0x68:
13151315         if (m_cassette)
13161316         {
1317            return m_cassette->input() > 0.0 ? 0x80 : 0;
1317            return m_cassette->input() > 0.0 ? 0x80 : 0;
13181318         }
13191319         return 0;
13201320
1321      case 0x61:   // button 0 or Open Apple
1321      case 0x61:  // button 0 or Open Apple
13221322      case 0x69:
13231323         return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0;
13241324
1325      case 0x62:   // button 1 or Solid Apple
1325      case 0x62:  // button 1 or Solid Apple
13261326      case 0x6a:
13271327         return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0;
13281328
1329      case 0x63:   // button 2 or SHIFT key
1329      case 0x63:  // button 2 or SHIFT key
13301330      case 0x6b:
13311331         return ((m_joybuttons->read() & 0x40) || (m_kbspecial->read() & 0x06)) ? 0x80 : 0;
13321332
1333      case 0x64:   // joy 1 X axis
1333      case 0x64:  // joy 1 X axis
13341334      case 0x6c:
13351335         return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0;
13361336
1337      case 0x65:   // joy 1 Y axis
1337      case 0x65:  // joy 1 Y axis
13381338      case 0x6d:
13391339         return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0;
13401340
r242066r242067
13461346      case 0x6f:
13471347         return (space.machine().time().as_double() < m_joystick_y2_time) ? 0x80 : 0;
13481348
1349      case 0x7e:   // read IOUDIS
1349      case 0x7e:  // read IOUDIS
13501350         return m_ioudis ? 0x80 : 0x00;
13511351
1352      case 0x7f:   // read DHIRES
1352      case 0x7f:  // read DHIRES
13531353         return m_video->m_dhires ? 0x00 : 0x80;
13541354
13551355      default:
r242066r242067
13661366
13671367   switch (offset)
13681368   {
1369      case 0x00:   // 80STOREOFF
1369      case 0x00:  // 80STOREOFF
13701370         m_80store = false;
13711371         auxbank_update();
13721372         break;
13731373
1374      case 0x01:   // 80STOREON
1374      case 0x01:  // 80STOREON
13751375         m_80store = true;
13761376         auxbank_update();
13771377         break;
13781378
1379      case 0x02:   // RAMRDOFF
1379      case 0x02:  // RAMRDOFF
13801380         m_ramrd = false;
13811381         auxbank_update();
13821382         break;
13831383
1384      case 0x03:   // RAMRDON
1384      case 0x03:  // RAMRDON
13851385         m_ramrd = true;
13861386         auxbank_update();
13871387         break;
13881388
1389      case 0x04:   // RAMWRTOFF
1389      case 0x04:  // RAMWRTOFF
13901390         m_ramwrt = false;
13911391         auxbank_update();
13921392         break;
13931393
1394      case 0x05:   // RAMWRTON
1394      case 0x05:  // RAMWRTON
13951395         m_ramwrt = true;
13961396         auxbank_update();
13971397         break;
13981398
1399      case 0x06:   // INTCXROMOFF
1399      case 0x06:  // INTCXROMOFF
14001400         m_intcxrom = false;
14011401         update_slotrom_banks();
14021402         break;
14031403
1404      case 0x07:   // INTCXROMON
1404      case 0x07:  // INTCXROMON
14051405         m_intcxrom = true;
14061406         update_slotrom_banks();
14071407         break;
14081408
1409      case 0x08:   // ALTZPOFF
1409      case 0x08:  // ALTZPOFF
14101410         m_altzp = false;
14111411         auxbank_update();
14121412         break;
14131413
1414      case 0x09:   // ALTZPON
1414      case 0x09:  // ALTZPON
14151415         m_altzp = true;
14161416         auxbank_update();
14171417         break;
14181418
1419      case 0x0a:   // SETINTC3ROM
1419      case 0x0a:  // SETINTC3ROM
14201420         m_slotc3rom = false;
14211421         update_slotrom_banks();
14221422         break;
14231423
1424      case 0x0b:   // SETSLOTC3ROM
1424      case 0x0b:  // SETSLOTC3ROM
14251425         m_slotc3rom = true;
14261426         update_slotrom_banks();
14271427         break;
14281428
1429      case 0x0c:   // 80COLOFF
1429      case 0x0c:  // 80COLOFF
14301430         m_video->m_80col = false;
14311431         break;
14321432
1433      case 0x0d:   // 80COLON
1433      case 0x0d:  // 80COLON
14341434         m_video->m_80col = true;
14351435         break;
14361436
1437      case 0x0e:   // ALTCHARSETOFF
1437      case 0x0e:  // ALTCHARSETOFF
14381438         m_video->m_altcharset = false;
14391439         break;
14401440
1441      case 0x0f:   // ALTCHARSETON
1441      case 0x0f:  // ALTCHARSETON
14421442         m_video->m_altcharset = true;
14431443         break;
14441444
r242066r242067
14461446         m_strobe = 0;
14471447         break;
14481448
1449      case 0x20:   // cassette output
1449      case 0x20:  // cassette output
14501450         if (m_cassette)
14511451         {
1452            m_cassette_out ^= 1;
1452            m_cassette_out ^= 1;
14531453            m_cassette->output(m_cassette_out ? 1.0f : -1.0f);
14541454         }
14551455         break;
r242066r242067
14631463            // card may have banked auxram; get a new bank pointer
14641464            m_aux_bank_ptr = m_auxslotdevice->get_auxbank_ptr();
14651465         }
1466         do_io(space, offset, false);   // make sure it also side-effect resets the paddles as documented
1466         do_io(space, offset, false);    // make sure it also side-effect resets the paddles as documented
14671467         break;
14681468
1469      case 0x7e:   // SETIOUDIS
1469      case 0x7e:  // SETIOUDIS
14701470         m_ioudis = true; break;
14711471
1472      case 0x7f:   // CLRIOUDIS
1472      case 0x7f:  // CLRIOUDIS
14731473         m_ioudis = false; break;
14741474
14751475      default:
r242066r242067
14871487      case 0x00:  // keyboard latch
14881488         return m_transchar | m_strobe;
14891489
1490      case 0x02:   // RAMRDOFF
1490      case 0x02:  // RAMRDOFF
14911491         m_ramrd = false;
14921492         auxbank_update();
14931493         break;
14941494
1495      case 0x03:   // RAMRDON
1495      case 0x03:  // RAMRDON
14961496         m_ramrd = true;
14971497         auxbank_update();
14981498         break;
14991499
1500      case 0x04:   // RAMWRTOFF
1500      case 0x04:  // RAMWRTOFF
15011501         m_ramwrt = false;
15021502         auxbank_update();
15031503         break;
15041504
1505      case 0x05:   // RAMWRTON
1505      case 0x05:  // RAMWRTON
15061506         m_ramwrt = true;
15071507         auxbank_update();
15081508         break;
15091509
1510      case 0x10:  // read any key down, reset keyboard strobe
1510      case 0x10:  // read any key down, reset keyboard strobe
15111511         {
15121512            UINT8 rv = m_transchar | m_anykeydown;
15131513            m_strobe = 0;
15141514            return rv;
15151515         }
15161516
1517      case 0x11:   // read LCRAM2 (LC Dxxx bank)
1517      case 0x11:  // read LCRAM2 (LC Dxxx bank)
15181518         return m_lcram2 ? 0x80 : 0x00;
1519         break;     
1519         break;
15201520
1521      case 0x12:   // read LCRAM (is LC readable?)
1521      case 0x12:  // read LCRAM (is LC readable?)
15221522         return m_lcram ? 0x80 : 0x00;
15231523         break;
15241524
1525      case 0x13:   // read RAMRD
1525      case 0x13:  // read RAMRD
15261526         return m_ramrd ? 0x80 : 0x00;
15271527
1528      case 0x14:   // read RAMWRT
1528      case 0x14:  // read RAMWRT
15291529         return m_ramwrt ? 0x80 : 0x00;
15301530
1531      case 0x15:   // read & reset mouse X0 interrupt flag
1531      case 0x15:  // read & reset mouse X0 interrupt flag
15321532         lower_irq(IRQ_MOUSEXY);
15331533         return m_xirq ? 0x80 : 0x00;
15341534
1535      case 0x16:   // read ALTZP
1535      case 0x16:  // read ALTZP
15361536         return m_altzp ? 0x80 : 0x00;
15371537
1538      case 0x17:   // read & reset mouse Y0 interrupt flag
1538      case 0x17:  // read & reset mouse Y0 interrupt flag
15391539         lower_irq(IRQ_MOUSEXY);
15401540         return m_yirq ? 0x80 : 0x00;
15411541
1542      case 0x18:   // read 80STORE
1542      case 0x18:  // read 80STORE
15431543         return m_80store ? 0x80 : 0x00;
15441544
1545      case 0x19:   // read VBL
1545      case 0x19:  // read VBL
15461546         return m_vbl ? 0x80 : 0x00;
15471547
1548      case 0x1a:   // read TEXT
1548      case 0x1a:  // read TEXT
15491549         return m_video->m_graphics ? 0x00 : 0x80;
15501550
1551      case 0x1b:   // read MIXED
1551      case 0x1b:  // read MIXED
15521552         return m_video->m_mix ? 0x80 : 0x00;
15531553
1554      case 0x1c:   // read PAGE2
1554      case 0x1c:  // read PAGE2
15551555         return m_page2 ? 0x80 : 0x00;
15561556
1557      case 0x1d:   // read HIRES
1557      case 0x1d:  // read HIRES
15581558         return m_video->m_hires ? 0x80 : 0x00;
15591559
1560      case 0x1e:   // read ALTCHARSET
1560      case 0x1e:  // read ALTCHARSET
15611561         return m_video->m_altcharset ? 0x80 : 0x00;
15621562
1563      case 0x1f:   // read 80COL
1563      case 0x1f:  // read 80COL
15641564         return m_video->m_80col ? 0x80 : 0x00;
15651565
1566      case 0x40:   // read XYMask (IIc only)
1566      case 0x40:  // read XYMask (IIc only)
15671567         return m_xy ? 0x80 : 0x00;
15681568
1569      case 0x41:   // read VBL mask (IIc only)
1569      case 0x41:  // read VBL mask (IIc only)
15701570         return m_vblmask ? 0x80 : 0x00;
15711571
1572      case 0x42:   // read X0Edge (IIc only)
1572      case 0x42:  // read X0Edge (IIc only)
15731573         return m_x0edge ? 0x80 : 0x00;
15741574
1575      case 0x43:   // read Y0Edge (IIc only)
1575      case 0x43:  // read Y0Edge (IIc only)
15761576         return m_y0edge ? 0x80 : 0x00;
15771577
15781578      case 0x60: // 40/80 column switch (IIc only)
15791579         return (m_sysconfig->read() & 0x04) ? 0x80 : 0;
15801580
1581      case 0x61:   // button 0 or Open Apple or mouse button 1
1581      case 0x61:  // button 0 or Open Apple or mouse button 1
15821582      case 0x69:
15831583         return ((m_joybuttons->read() & 0x10) || (m_kbspecial->read() & 0x10)) ? 0x80 : 0;
15841584
1585      case 0x62:   // button 1 or Solid Apple
1585      case 0x62:  // button 1 or Solid Apple
15861586      case 0x6a:
15871587         return ((m_joybuttons->read() & 0x20) || (m_kbspecial->read() & 0x20)) ? 0x80 : 0;
15881588
1589      case 0x63:   // mouse button 2 (no other function on IIc)
1589      case 0x63:  // mouse button 2 (no other function on IIc)
15901590      case 0x6b:
15911591         return m_mouseb->read() ? 0 : 0x80;
15921592
1593      case 0x64:   // joy 1 X axis
1593      case 0x64:  // joy 1 X axis
15941594      case 0x6c:
15951595         return (space.machine().time().as_double() < m_joystick_x1_time) ? 0x80 : 0;
15961596
1597      case 0x65:   // joy 1 Y axis
1597      case 0x65:  // joy 1 Y axis
15981598      case 0x6d:
15991599         return (space.machine().time().as_double() < m_joystick_y1_time) ? 0x80 : 0;
16001600
r242066r242067
16061606      case 0x6f:
16071607         return m_y1 ? 0x80 : 0;
16081608
1609      case 0x7e:   // read IOUDIS
1609      case 0x7e:  // read IOUDIS
16101610         m_vbl = false;
16111611         lower_irq(IRQ_VBL);
16121612         return m_ioudis ? 0x80 : 0x00;
16131613
1614      case 0x7f:   // read DHIRES
1614      case 0x7f:  // read DHIRES
16151615         return m_video->m_dhires ? 0x00 : 0x80;
16161616
16171617      default:
r242066r242067
16281628
16291629   switch (offset)
16301630   {
1631      case 0x00:   // 80STOREOFF
1631      case 0x00:  // 80STOREOFF
16321632         m_80store = false;
16331633         auxbank_update();
16341634         break;
16351635
1636      case 0x01:   // 80STOREON
1636      case 0x01:  // 80STOREON
16371637         m_80store = true;
16381638         auxbank_update();
16391639         break;
16401640
1641      case 0x02:   // RAMRDOFF
1641      case 0x02:  // RAMRDOFF
16421642         m_ramrd = false;
16431643         auxbank_update();
16441644         break;
16451645
1646      case 0x03:   // RAMRDON
1646      case 0x03:  // RAMRDON
16471647         m_ramrd = true;
16481648         auxbank_update();
16491649         break;
16501650
1651      case 0x04:   // RAMWRTOFF
1651      case 0x04:  // RAMWRTOFF
16521652         m_ramwrt = false;
16531653         auxbank_update();
16541654         break;
16551655
1656      case 0x05:   // RAMWRTON
1656      case 0x05:  // RAMWRTON
16571657         m_ramwrt = true;
16581658         auxbank_update();
16591659         break;
16601660
1661      case 0x06:   // INTCXROMOFF
1661      case 0x06:  // INTCXROMOFF
16621662         m_intcxrom = false;
16631663         update_slotrom_banks();
16641664         break;
16651665
1666      case 0x07:   // INTCXROMON
1666      case 0x07:  // INTCXROMON
16671667         m_intcxrom = true;
16681668         update_slotrom_banks();
16691669         break;
16701670
1671      case 0x08:   // ALTZPOFF
1671      case 0x08:  // ALTZPOFF
16721672         m_altzp = false;
16731673         auxbank_update();
16741674         break;
16751675
1676      case 0x09:   // ALTZPON
1676      case 0x09:  // ALTZPON
16771677         m_altzp = true;
16781678         auxbank_update();
16791679         break;
16801680
1681      case 0x0a:   // SETINTC3ROM
1681      case 0x0a:  // SETINTC3ROM
16821682         m_slotc3rom = false;
16831683         update_slotrom_banks();
16841684         break;
16851685
1686      case 0x0b:   // SETSLOTC3ROM
1686      case 0x0b:  // SETSLOTC3ROM
16871687         m_slotc3rom = true;
16881688         update_slotrom_banks();
16891689         break;
16901690
1691      case 0x0c:   // 80COLOFF
1691      case 0x0c:  // 80COLOFF
16921692         m_video->m_80col = false;
16931693         break;
16941694
1695      case 0x0d:   // 80COLON
1695      case 0x0d:  // 80COLON
16961696         m_video->m_80col = true;
16971697         break;
16981698
1699      case 0x0e:   // ALTCHARSETOFF
1699      case 0x0e:  // ALTCHARSETOFF
17001700         m_video->m_altcharset = false;
17011701         break;
17021702
1703      case 0x0f:   // ALTCHARSETON
1703      case 0x0f:  // ALTCHARSETON
17041704         m_video->m_altcharset = true;
17051705         break;
17061706
r242066r242067
17141714         lower_irq(IRQ_VBL);
17151715         break;
17161716
1717      case 0x7e:   // SETIOUDIS
1718         m_ioudis = true;
1717      case 0x7e:  // SETIOUDIS
1718         m_ioudis = true;
17191719         break;
17201720
1721      case 0x7f:   // CLRIOUDIS
1722         m_ioudis = false;
1721      case 0x7f:  // CLRIOUDIS
1722         m_ioudis = false;
17231723         break;
17241724
17251725      default:
r242066r242067
18351835      }
18361836      else
18371837      {
1838         if (m_slotdevice[slot] != NULL)
1838         if (m_slotdevice[slot] != NULL)
18391839         {
18401840            return m_slotdevice[slot]->read_c0nx(space, offset % 0x10);
18411841         }
r242066r242067
18671867
18681868UINT8 apple2e_state::read_slot_rom(address_space &space, int slotbias, int offset)
18691869{
1870   int slotnum = ((offset>>8) & 0xf) + slotbias;
1870   int slotnum = ((offset>>8) & 0xf) + slotbias;
18711871
18721872   if (m_slotdevice[slotnum] != NULL)
18731873   {
r242066r242067
19701970{
19711971   if (m_inh_slot != -1)
19721972   {
1973      return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000);
1973      return m_slotdevice[m_inh_slot]->read_inh_rom(space, offset + 0xd000);
19741974   }
19751975
1976   assert(0);   // hitting inh_r with invalid m_inh_slot should not be possible
1976   assert(0);  // hitting inh_r with invalid m_inh_slot should not be possible
19771977   return read_floatingbus();
19781978}
19791979
r242066r242067
19891989{
19901990   if (m_altzp)
19911991   {
1992      if (m_aux_bank_ptr)
1993      {
1994         if (offset < 0x1000)
1992      if (m_aux_bank_ptr)
1993      {
1994         if (offset < 0x1000)
19951995         {
19961996            if (m_lcram2)
19971997            {
r242066r242067
20042004         }
20052005
20062006         return m_aux_bank_ptr[(offset & 0x1fff) + 0xe000];
2007      }
2008      else
2009      {
2010         return read_floatingbus();
20112007      }
2008      else
2009      {
2010         return read_floatingbus();
2011      }
20122012   }
20132013   else
20142014   {
2015      if (offset < 0x1000)
2015      if (offset < 0x1000)
20162016      {
20172017         if (m_lcram2)
20182018         {
r242066r242067
20382038   if (m_altzp)
20392039   {
20402040      if (m_aux_bank_ptr)
2041      {
2042         if (offset < 0x1000)
2041      {
2042         if (offset < 0x1000)
20432043         {
20442044            if (m_lcram2)
20452045            {
r242066r242067
20572057   }
20582058   else
20592059   {
2060      if (offset < 0x1000)
2060      if (offset < 0x1000)
20612061      {
20622062         if (m_lcram2)
20632063         {
r242066r242067
22952295   AM_RANGE(0x2000, 0x3fff) AM_DEVICE(A2_2000_TAG, address_map_bank_device, amap8)
22962296   AM_RANGE(0x4000, 0xbfff) AM_DEVICE(A2_4000_TAG, address_map_bank_device, amap8)
22972297   AM_RANGE(0xc000, 0xc07f) AM_READWRITE(c000_r, c000_w)
2298//   AM_RANGE(0xc098, 0xc09b) AM_DEVREADWRITE(IIC_ACIA1_TAG, mos6551_device, read, write)
2299//   AM_RANGE(0xc0a8, 0xc0ab) AM_DEVREADWRITE(IIC_ACIA2_TAG, mos6551_device, read, write)
2298//  AM_RANGE(0xc098, 0xc09b) AM_DEVREADWRITE(IIC_ACIA1_TAG, mos6551_device, read, write)
2299//  AM_RANGE(0xc0a8, 0xc0ab) AM_DEVREADWRITE(IIC_ACIA2_TAG, mos6551_device, read, write)
23002300   AM_RANGE(0xc0d0, 0xc0d3) AM_READWRITE(memexp_r, memexp_w)
23012301   AM_RANGE(0xc0e0, 0xc0ef) AM_DEVREADWRITE(LASER128_UDC_TAG, applefdc_base_device, read, write)
23022302   AM_RANGE(0xc080, 0xc0ff) AM_READWRITE(c080_r, c080_w)
r242066r242067
23092309
23102310static ADDRESS_MAP_START( r0000bank_map, AS_PROGRAM, 8, apple2e_state )
23112311   AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0000_r, ram0000_w)
2312   AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0000_r, auxram0000_w)
2312   AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0000_r, auxram0000_w)
23132313ADDRESS_MAP_END
23142314
23152315static ADDRESS_MAP_START( r0200bank_map, AS_PROGRAM, 8, apple2e_state )
2316   AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0200_r, ram0200_w)   // wr 0 rd 0
2316   AM_RANGE(0x0000, 0x01ff) AM_READWRITE(ram0200_r, ram0200_w) // wr 0 rd 0
23172317   AM_RANGE(0x0200, 0x03ff) AM_READWRITE(auxram0200_r, ram0200_w) // wr 0 rd 1
23182318   AM_RANGE(0x0400, 0x05ff) AM_READWRITE(ram0200_r, auxram0200_w) // wr 1 rd 0
23192319   AM_RANGE(0x0600, 0x07ff) AM_READWRITE(auxram0200_r, auxram0200_w) // wr 1 rd 1
23202320ADDRESS_MAP_END
23212321
23222322static ADDRESS_MAP_START( r0400bank_map, AS_PROGRAM, 8, apple2e_state )
2323   AM_RANGE(0x0000, 0x03ff) AM_READWRITE(ram0400_r, ram0400_w)   // wr 0 rd 0
2324   AM_RANGE(0x0400, 0x07ff) AM_READWRITE(auxram0400_r, ram0400_w)   // wr 0 rd 1
2325   AM_RANGE(0x0800, 0x0bff) AM_READWRITE(ram0400_r, auxram0400_w)   // wr 1 rd 0
2323   AM_RANGE(0x0000, 0x03ff) AM_READWRITE(ram0400_r, ram0400_w) // wr 0 rd 0
2324   AM_RANGE(0x0400, 0x07ff) AM_READWRITE(auxram0400_r, ram0400_w)  // wr 0 rd 1
2325   AM_RANGE(0x0800, 0x0bff) AM_READWRITE(ram0400_r, auxram0400_w)  // wr 1 rd 0
23262326   AM_RANGE(0x0c00, 0x0fff) AM_READWRITE(auxram0400_r, auxram0400_w) // wr 1 rd 1
23272327ADDRESS_MAP_END
23282328
r242066r242067
23302330   AM_RANGE(0x0000, 0x17ff) AM_READWRITE(ram0800_r, ram0800_w)
23312331   AM_RANGE(0x2000, 0x37ff) AM_READWRITE(auxram0800_r, ram0800_w)
23322332   AM_RANGE(0x4000, 0x57ff) AM_READWRITE(ram0800_r, auxram0800_w)
2333   AM_RANGE(0x6000, 0x77ff) AM_READWRITE(auxram0800_r, auxram0800_w)
2333   AM_RANGE(0x6000, 0x77ff) AM_READWRITE(auxram0800_r, auxram0800_w)
23342334ADDRESS_MAP_END
23352335
23362336static ADDRESS_MAP_START( r2000bank_map, AS_PROGRAM, 8, apple2e_state )
23372337   AM_RANGE(0x0000, 0x1fff) AM_READWRITE(ram2000_r, ram2000_w)
23382338   AM_RANGE(0x2000, 0x3fff) AM_READWRITE(auxram2000_r, ram2000_w)
23392339   AM_RANGE(0x4000, 0x5fff) AM_READWRITE(ram2000_r, auxram2000_w)
2340   AM_RANGE(0x6000, 0x7fff) AM_READWRITE(auxram2000_r, auxram2000_w)
2340   AM_RANGE(0x6000, 0x7fff) AM_READWRITE(auxram2000_r, auxram2000_w)
23412341ADDRESS_MAP_END
23422342
23432343static ADDRESS_MAP_START( r4000bank_map, AS_PROGRAM, 8, apple2e_state )
23442344   AM_RANGE(0x00000, 0x07fff) AM_READWRITE(ram4000_r, ram4000_w)
23452345   AM_RANGE(0x08000, 0x0ffff) AM_READWRITE(auxram4000_r, ram4000_w)
23462346   AM_RANGE(0x10000, 0x17fff) AM_READWRITE(ram4000_r, auxram4000_w)
2347   AM_RANGE(0x18000, 0x1ffff) AM_READWRITE(auxram4000_r, auxram4000_w)
2347   AM_RANGE(0x18000, 0x1ffff) AM_READWRITE(auxram4000_r, auxram4000_w)
23482348ADDRESS_MAP_END
23492349
23502350static ADDRESS_MAP_START( c100bank_map, AS_PROGRAM, 8, apple2e_state )
r242066r242067
23722372ADDRESS_MAP_END
23732373
23742374static ADDRESS_MAP_START( inhbank_map, AS_PROGRAM, 8, apple2e_state )
2375   AM_RANGE(0x0000, 0x2fff) AM_DEVICE(A2_LCBANK_TAG, address_map_bank_device, amap8)
2375   AM_RANGE(0x0000, 0x2fff) AM_DEVICE(A2_LCBANK_TAG, address_map_bank_device, amap8)
23762376   AM_RANGE(0x3000, 0x5fff) AM_READWRITE(inh_r, inh_w)
23772377ADDRESS_MAP_END
23782378
r242066r242067
24242424      trans |= (m_kbspecial->read() & 0x01) ? 0x0000 : 0x0200;    // caps lock is bit 9 (active low)
24252425
24262426      if (m_isiic)
2427      {
2427      {
24282428         if (m_sysconfig->read() & 0x08)
24292429         {
2430            trans += 0x400;   // go to DVORAK half of the ROM
2430            trans += 0x400; // go to DVORAK half of the ROM
24312431         }
24322432      }
24332433
r242066r242067
24592459      }
24602460      else
24612461      {
2462         m_strobe = 0x80;
2462         m_strobe = 0x80;
24632463      }
24642464   }
24652465}
r242066r242067
31693169   MCFG_AY3600_SHIFT_CB(READLINE(apple2e_state, ay3600_shift_r))
31703170   MCFG_AY3600_CONTROL_CB(READLINE(apple2e_state, ay3600_control_r))
31713171   MCFG_AY3600_DATA_READY_CB(WRITELINE(apple2e_state, ay3600_data_ready_w))
3172   MCFG_AY3600_AKO_CB(WRITELINE(apple2e_state, ay3600_ako_w))
3172   MCFG_AY3600_AKO_CB(WRITELINE(apple2e_state, ay3600_ako_w))
31733173
31743174   /* repeat timer.  15 Hz from page 7-15 of "Understanding the Apple IIe" */
31753175   MCFG_TIMER_DRIVER_ADD_PERIODIC("repttmr", apple2e_state, ay3600_repeat, attotime::from_hz(15))
r242066r242067
32153215   MCFG_CPU_REPLACE("maincpu", M65C02, 1021800)        /* close to actual CPU frequency of 1.020484 MHz */
32163216   MCFG_CPU_PROGRAM_MAP(apple2e_map)
32173217
3218//   MCFG_CPU_ADD("subcpu", Z80, 1021800)    // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock
3219//   MCFG_CPU_PROGRAM_MAP(tk3000_kbd_map)
3218//  MCFG_CPU_ADD("subcpu", Z80, 1021800)    // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock
3219//  MCFG_CPU_PROGRAM_MAP(tk3000_kbd_map)
32203220MACHINE_CONFIG_END
32213221
32223222static MACHINE_CONFIG_DERIVED( apple2ep, apple2e )
r242066r242067
35973597COMP( 1986, apple2c3, apple2c,  0,        apple2c_mem, apple2c, driver_device,  0,        "Apple Computer",    "Apple //c (Original Memory Expansion)", GAME_SUPPORTS_SAVE )
35983598COMP( 1986, apple2c4, apple2c,  0,        apple2c_mem, apple2c, driver_device,  0,        "Apple Computer",    "Apple //c (rev 4)", GAME_SUPPORTS_SAVE )
35993599COMP( 1988, apple2cp, apple2c,  0,        apple2cp,    apple2c, driver_device,  0,        "Apple Computer",    "Apple //c Plus", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
3600
trunk/src/mess/drivers/apple2gs.c
r242066r242067
143143{
144144   int i;
145145
146//   PALETTE_INIT_NAME(apple2)(palette);
146//  PALETTE_INIT_NAME(apple2)(palette);
147147
148148   for (i = 0; i < 16; i++)
149149   {
trunk/src/mess/drivers/comp4.c
r242066r242067
44
55  Milton Bradley Comp IV
66  * TMC0904NL CP0904A (die labeled 4A0970D-04A)
7 
7
88  This is a handheld 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
r242066r242067
6363   for (int i = 0; i < 3; i++)
6464      if (m_o & (1 << (i + 1)))
6565         k |= m_button_matrix[i]->read();
66   
66
6767   return k;
6868}
6969
trunk/src/mess/drivers/dvk_ksm.c
r242066r242067
1818    F4 + 0..9 on numeric keypad = setup mode.  0 changes serial port speed,
1919    1..9 toggle one of mode bits:
2020
21   1   XON/XOFF   0: Off  1: On
22   2   Character set   0: N0/N1  2: N2
23   3   Auto LF      0: Off  1: On
24   4   Auto repeat   0: On  1: Off
25   5   Auto wraparound   0: On  1: Off
26   6   Interpret controls   0: Interpret  1: Display
27   7   Parity check   0: Off  1: On
28   8   Parity bits   0: None  1: Even
29   9   Stop bits
21    1   XON/XOFF    0: Off  1: On
22    2   Character set   0: N0/N1  2: N2
23    3   Auto LF     0: Off  1: On
24    4   Auto repeat 0: On  1: Off
25    5   Auto wraparound 0: On  1: Off
26    6   Interpret controls  0: Interpret  1: Display
27    7   Parity check    0: Off  1: On
28    8   Parity bits 0: None  1: Even
29    9   Stop bits
3030
3131    N0/N1 charset has regular ASCII in C0 page and Cyrillic in C1 page,
3232    switching between them via SI/SO.   N2 charset has uppercase Cyrillic
r242066r242067
3939    Terminfo description would be something like
4040
4141ksm|DVK KSM,
42   am, bw, dch1=\EP, ich1=\EQ,
43   acsc=hRiTjXkClJmFnNqUtEuPv\174wKxW.M\054Q\055S\053\136~_{@}Z0\177,
44   use=vt52,
42    am, bw, dch1=\EP, ich1=\EQ,
43    acsc=hRiTjXkClJmFnNqUtEuPv\174wKxW.M\054Q\055S\053\136~_{@}Z0\177,
44    use=vt52,
4545
4646    To do:
4747    - make Caps Lock work
r242066r242067
220220
221221WRITE_LINE_MEMBER(ksm_state::write_keyboard_clock)
222222{
223//   KSM never sends data to keyboard
224//   m_i8251kbd->write_txc(state);
223//  KSM never sends data to keyboard
224//  m_i8251kbd->write_txc(state);
225225   m_i8251kbd->write_rxc(state);
226226}
227227
r242066r242067
284284{
285285   UINT16 y = m_screen->vpos();
286286   UINT16 offset;
287   
287
288288   DBG_LOG(2,"scanline_cb",
289289      ("addr %02x frame %" I64FMT "d x %.4d y %.3d row %.2d\n",
290290      m_video.line, m_screen->frame_number(), m_screen->hpos(), y, y%11));
r242066r242067
384384
385385
386386/*
387   Assumes that SRAM is at 0x2000, which is where technical manual puts it.
388   Chargen has 1 missing pixel in 'G' character.
387    Assumes that SRAM is at 0x2000, which is where technical manual puts it.
388    Chargen has 1 missing pixel in 'G' character.
389389*/
390390ROM_START( dvk_ksm )
391391   ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00)
r242066r242067
397397ROM_END
398398
399399/*
400   Assumes that SRAM is at 0x2100, otherwise identical.
401   Chargen has no missing pixels in 'G' character.
400    Assumes that SRAM is at 0x2100, otherwise identical.
401    Chargen has no missing pixels in 'G' character.
402402*/
403403ROM_START( dvk_ksm01 )
404404   ROM_REGION(0x1000, "maincpu", ROMREGION_ERASE00)
trunk/src/mess/drivers/ec184x.c
r242066r242067
232232   MCFG_DEVICE_INPUT_DEFAULTS(ec1840)
233233
234234   MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1840.0002", false)
235   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false)   // actually ec1840.0003 -- w/o mouse port
235   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false)   // actually ec1840.0003 -- w/o mouse port
236236   MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, NULL, false)
237237   MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false)
238238   MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false)
r242066r242067
258258   MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu")
259259   MCFG_DEVICE_INPUT_DEFAULTS(ec1841)
260260
261   MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false)   // cga
262   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false)   // fdc + mouse port
261   MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false)   // cga
262   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false)   // fdc + mouse port
263263   MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, "hdc", false)
264264   MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false)
265265   MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false)
trunk/src/mess/drivers/gamate.c
r242066r242067
6767   case 5: video.y=data;break;
6868   case 7:
6969   if (video.bitmap.write) {
70      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
70      if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
7171      video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
7272      else
7373      logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
trunk/src/mess/drivers/iskr103x.c
r242066r242067
7777   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu")
7878   MCFG_DEVICE_INPUT_DEFAULTS(iskr1030m)
7979
80   MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1030m", false)   // actually MDA?
80   MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1030m", false)   // actually MDA?
8181   MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false)
8282   MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, NULL, false) // hdc is WIP
8383   MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, NULL, false)
trunk/src/mess/drivers/leapster.c
r242066r242067
1/*
1/*
22    LeapFrog - Leapster
33
4   educational system from 2003, software is all developed in MXFlash
4    educational system from 2003, software is all developed in MXFlash
55
6   hwspecs
6    hwspecs
77
8   
8
99    CPU:
10     Custom ASIC (ARCTangent 5.1 CPU @ 96MHz)
10      Custom ASIC (ARCTangent 5.1 CPU @ 96MHz)
1111
12    Memory:
13     Leapster: 2MB onboard RAM, 256 bytes NVRAM.
14     Leapster2: 16MB RAM, 128kbytes NVRAM
12    Memory:
13      Leapster: 2MB onboard RAM, 256 bytes NVRAM.
14      Leapster2: 16MB RAM, 128kbytes NVRAM
1515
1616    Media type:
17     Cartridges of 4-16MB with between 2 and 512kb NVRAM
18   
19   Graphics:
20     4Mb ATI chip.
17      Cartridges of 4-16MB with between 2 and 512kb NVRAM
2118
19    Graphics:
20      4Mb ATI chip.
21
2222    Audio:
23     Custom
23      Custom
2424
2525    Screen:
26     160x160 CSTN with touchscreen.
26      160x160 CSTN with touchscreen.
2727
28   
29   The Leapster 2 also has
30      USB 1.1 (client only) + full-sized SD slot.
3128
29    The Leapster 2 also has
30        USB 1.1 (client only) + full-sized SD slot.
31
3232*/
3333
3434/* Cartridge pinout - for games list see hash/leapster.xml
r242066r242067
8181               |                             |
8282  +------------|                             |------------+
8383  |            | C A R T R I D G E - S L O T |            |
84  |            |                             |            |
84  |            |                             |            |
8585  |            +-----------------------------+            |
8686  |                                                       |
8787  |ASY 310-10069    +-------------------+                 |
r242066r242067
160160  (GND)<- A2-|     |-SCL
161161         VSS-|     |-SDA
162162             +-----+
163         
164163
165164
166165
167166
167
168168PCB - LEAPSTER-TV:
169169
170170
r242066r242067
194194          |          | C A R T R I D G E - S L O T |          |
195195          |          +-----------------------------+          |
196196           \                                                 /
197            +-----------------------------------------------+ 
197            +-----------------------------------------------+
198198
199     
200     
201     
202199
203200
204201
202
203
204
205205*/
206206
207207#include "emu.h"
trunk/src/mess/drivers/merlin.c
r242066r242067
22
33  Parker Bros Merlin handheld computer game
44  * TMS1100NLL MP3404A-N2 (has internal ROM)
5 
5
66  To start a game, press NEW GAME, followed by a number:
77  1: Tic-Tac-Toe
88  2: Music Machine
r242066r242067
1010  4: Blackjack 13
1111  5: Magic Square
1212  6: Mindbender
13 
13
1414  Refer to the official manual for more information on the games.
15 
16 
15
16
1717  Other handhelds assumed to be on similar hardware:
1818  - Dr. Smith - by Tomy, released in Japan (basically a white version of Merlin,
1919    let's assume for now that the ROM contents is identical)
2020  - Master Merlin
21 
21
2222  Another sequel, called Split Second, looks like different hardware.
2323
2424
r242066r242067
9696READ8_MEMBER(merlin_state::read_k)
9797{
9898   UINT8 k = 0;
99   
99
100100   // read selected button rows
101101   for (int i = 0; i < 4; i++)
102102      if (m_o & (1 << i))
trunk/src/mess/drivers/ngen.c
r242066r242067
11/*
22
3   Convergent NGen series
3    Convergent NGen series
44
5   10-11-14 - Skeleton driver
5    10-11-14 - Skeleton driver
66
77*/
88
r242066r242067
115115         m_maincpu->device_t::memory().space(AS_IO).install_readwrite_handler(addr, addr + 0x3ff, read16_delegate(FUNC(ngen_state::peripheral_r), this), write16_delegate(FUNC(ngen_state::peripheral_w), this));
116116         logerror("Mapped peripherals to I/O 0x%04x\n",addr);
117117      }
118      break;   
118      break;
119119   case 4:
120120      m_middle = data;
121121      break;
r242066r242067
301301
302302void ngen_state::set_dma_channel(int channel, int state)
303303{
304   if(!state)
304   if(!state)
305305      m_dma_channel = channel;
306306   else if(m_dma_channel == channel)
307307      m_dma_channel = -1;
trunk/src/mess/drivers/pc9801.c
r242066r242067
1717    - rewrite using slot devices
1818    - some later SWs put "Invalid command byte 05" (Absolutely Mahjong on Epson logo)
1919    - investigate on POR bit
20   - test 2dd more
20    - test 2dd more
2121
2222    TODO (PC-9801RS):
2323    - extra features;
r242066r242067
607607   DECLARE_WRITE8_MEMBER(pc9801rs_access_ctrl_w);
608608   DECLARE_WRITE8_MEMBER(pc9801rs_nmi_w);
609609   DECLARE_READ8_MEMBER(pc9801rs_midi_r);
610//   DECLARE_READ8_MEMBER(winram_r);
611//   DECLARE_WRITE8_MEMBER(winram_w);
610//  DECLARE_READ8_MEMBER(winram_r);
611//  DECLARE_WRITE8_MEMBER(winram_w);
612612//  DECLARE_READ8_MEMBER(pc9801_ext_opna_r);
613613//  DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w);
614614   DECLARE_READ8_MEMBER(pic_r);
r242066r242067
21222122
21232123/*READ8_MEMBER(pc9801_state::winram_r)
21242124{
2125   offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000;
2126   return
2125    offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000;
2126    return
21272127}
21282128
21292129
21302130WRITE8_MEMBER(pc9801_state::winram_w)
21312131{
2132   offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000;
2132    offset = (offset & 0x1ffff) | (m_pc9821_window_bank & 0xfe) * 0x10000;
21332133}*/
21342134
21352135static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state )
r242066r242067
32223222   ROM_LOAD( "font_ux.rom",     0x000000, 0x046800, BAD_DUMP CRC(19a76eeb) SHA1(96a006e8515157a624599c2b53a581ae0dd560fd) )
32233223
32243224   LOAD_KANJI_ROMS
3225//   LOAD_IDE_ROM
3225//  LOAD_IDE_ROM
32263226ROM_END
32273227
32283228/*
r242066r242067
33253325   ROM_LOAD( "font_vm.rom",     0x000000, 0x046800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff) )
33263326
33273327   LOAD_KANJI_ROMS
3328//   LOAD_IDE_ROM
3328//  LOAD_IDE_ROM
33293329ROM_END
33303330
33313331/*
trunk/src/mess/drivers/pcd.c
r242066r242067
128128   AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
129129   AM_RANGE(0xf840, 0xf841) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xff00)
130130   AM_RANGE(0xf900, 0xf907) AM_DEVREADWRITE8("fdc", wd2793_t, read, write, 0x00ff)
131//   AM_RANGE(0xf940, 0xf941) // sasi controller here?
131//  AM_RANGE(0xf940, 0xf941) // sasi controller here?
132132   AM_RANGE(0xf980, 0xf981) AM_READWRITE8(crt_data_r, crt_data_w, 0x00ff) AM_READ8(crt_status_r, 0xff00)
133//   AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
133//  AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
134134ADDRESS_MAP_END
135135
136136
trunk/src/mess/drivers/px4.c
r242066r242067
4545//  TYPE DEFINITIONS
4646//**************************************************************************
4747
48class px4_state : public driver_device,   public device_serial_interface
48class px4_state : public driver_device, public device_serial_interface
4949{
5050public:
5151   px4_state(const machine_config &mconfig, device_type type, const char *tag) :
r242066r242067
6060   m_speaker(*this, "speaker"),
6161   m_sio(*this, "sio"),
6262   m_rs232(*this, "rs232"),
63   m_caps1(*this, "capsule1"),   m_caps2(*this, "capsule2"),
63   m_caps1(*this, "capsule1"), m_caps2(*this, "capsule2"),
6464   m_caps1_rom(NULL), m_caps2_rom(NULL),
6565   m_ctrl1(0), m_icrb(0), m_bankr(0),
6666   m_isr(0), m_ier(0), m_str(0), m_sior(0xbf),
r242066r242067
565565      {
566566      case 1: m_sior = (dec_2_bcd(m_time.local_time.year) >> 4) & 0xf; break;
567567      case 2: m_sior = dec_2_bcd(m_time.local_time.year) & 0xf; break;
568      case 3:   m_sior = dec_2_bcd(m_time.local_time.month + 1); break;
568      case 3: m_sior = dec_2_bcd(m_time.local_time.month + 1); break;
569569      case 4: m_sior = dec_2_bcd(m_time.local_time.mday); break;
570570      case 5: m_sior = dec_2_bcd(m_time.local_time.hour); break;
571571      case 6: m_sior = dec_2_bcd(m_time.local_time.minute); break;
trunk/src/mess/drivers/px8.c
r242066r242067
801801   /* internal ram */
802802   MCFG_RAM_ADD(RAM_TAG)
803803   MCFG_RAM_DEFAULT_SIZE("64K")
804   
804
805805   // software
806806   MCFG_SOFTWARE_LIST_ADD("epson_cpm_list", "epson_cpm")
807807MACHINE_CONFIG_END
trunk/src/mess/drivers/simon.c
r242066r242067
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)
r242066r242067
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   {
r242066r242067
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/spc1000.c
r242066r242067
391391
392392READ8_MEMBER(spc1000_state::mc6847_videoram_r)
393393{
394   if (offset == ~0)
394   if (offset == ~0)
395395      return 0xff;
396396
397397   // m_GMODE layout: CSS|NA|PS2|PS1|~A/G|GM0|GM1|NA
r242066r242067
416416   data |= (m_cass->input() > 0.0038) ? 0x80 : 0;
417417   data |= ((m_cass->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY) ? 0x00 : 0x40;
418418   data &= ~(m_io_joy->read() & 0x3f);
419   
419
420420   return data;
421421}
422422
trunk/src/mess/drivers/ti85.c
r242066r242067
170170    2: ?
171171    3: ON status, LCD power
172172    4: Interrupt status
173   5: Memory page 3
173    5: Memory page 3
174174    6: Memory page 1
175175    7: Memory page 2
176176    10: Controll port for the display controller
177177    11: Data port for the display controller
178   15: Asic Version
179     
178    15: Asic Version
179
180180TI-85 ports:
181181    0: Video buffer offset (write only)
182182    1: Keypad
r242066r242067
296296   AM_RANGE(0x0015, 0x0015) AM_READ(ti83pse_port_0015_r)
297297   AM_RANGE(0x0020, 0x0020) AM_READWRITE(ti83pse_port_0020_r, ti83pse_port_0020_w )
298298   AM_RANGE(0x0021, 0x0021) AM_READWRITE(ti83pse_port_0021_r, ti83pse_port_0021_w )
299   
299
300300   AM_RANGE(0x0030, 0x0030) AM_READWRITE(ti83pse_ctimer1_setup_r, ti83pse_ctimer1_setup_w )
301301   AM_RANGE(0x0031, 0x0031) AM_READWRITE(ti83pse_ctimer1_loop_r, ti83pse_ctimer1_loop_w )
302302   AM_RANGE(0x0032, 0x0032) AM_READWRITE(ti83pse_ctimer1_count_r, ti83pse_ctimer1_count_w )
r242066r242067
306306   AM_RANGE(0x0036, 0x0036) AM_READWRITE(ti83pse_ctimer3_setup_r, ti83pse_ctimer3_setup_w )
307307   AM_RANGE(0x0037, 0x0037) AM_READWRITE(ti83pse_ctimer3_loop_r, ti83pse_ctimer3_loop_w )
308308   AM_RANGE(0x0038, 0x0038) AM_READWRITE(ti83pse_ctimer3_count_r, ti83pse_ctimer3_count_w )
309   
309
310310   AM_RANGE(0x0055, 0x0055) AM_READ(ti84pse_port_0055_r)
311311   AM_RANGE(0x0056, 0x0056) AM_READ(ti84pse_port_0056_r)
312312ADDRESS_MAP_END
r242066r242067
713713   MCFG_SPEAKER_STANDARD_MONO("mono")
714714   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
715715   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
716   
716
717717   MCFG_AMD_29F400T_ADD("flash")
718718
719719   //MCFG_TI83PSERIAL_ADD( "tiserial" )
r242066r242067
721721
722722static MACHINE_CONFIG_DERIVED( ti83pse, ti83p )
723723   MCFG_CPU_MODIFY("maincpu")
724   MCFG_CPU_CLOCK( 15000000)
724   MCFG_CPU_CLOCK( 15000000)
725725   MCFG_CPU_IO_MAP(ti83pse_io)
726   
726
727727   MCFG_DEVICE_MODIFY("membank1")
728728   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
729729
730730   MCFG_DEVICE_MODIFY("membank2")
731731   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
732   
732
733733   MCFG_DEVICE_MODIFY("membank3")
734734   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
735   
735
736736   MCFG_DEVICE_MODIFY("membank4")
737737   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
738738
r242066r242067
743743MACHINE_CONFIG_END
744744
745745static MACHINE_CONFIG_DERIVED( ti84p, ti83pse )
746    MCFG_DEVICE_MODIFY("membank1")
746   MCFG_DEVICE_MODIFY("membank1")
747747   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
748748
749749   MCFG_DEVICE_MODIFY("membank2")
r242066r242067
756756   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
757757
758758   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84p )
759    MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
759   MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
760760MACHINE_CONFIG_END
761761
762762static MACHINE_CONFIG_DERIVED( ti84pse, ti83pse )
r242066r242067
909909ROM_END
910910
911911ROM_START (ti84p)
912    ROM_REGION (0x100000, "flash",0)
913    ROM_DEFAULT_BIOS("b100v255mp")
914    ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" )
915    ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) )
912   ROM_REGION (0x100000, "flash",0)
913   ROM_DEFAULT_BIOS("b100v255mp")
914   ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" )
915   ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) )
916916ROM_END
917917
918918/*    YEAR  NAME        PARENT  COMPAT  MACHINE INPUT   INIT   COMPANY                 FULLNAME                        FLAGS */
trunk/src/mess/drivers/ticalc1x.c
r242066r242067
33/***************************************************************************
44
55  Texas Instruments TMS1xxx/0970/0980 handheld calculators
6 
6
77  Texas Instruments WIZ-A-TRON
88  * TMC0907NL DP0907BS (die labeled 0970F-07B)
99
r242066r242067
6161   for (int i = 0; i < 4; i++)
6262      if (m_o & (1 << (i + 1)))
6363         k |= m_button_matrix[i]->read();
64   
64
6565   return k;
6666}
6767
trunk/src/mess/drivers/tk2000.c
r242066r242067
22// copyright-holders:R. Belmont
33/***************************************************************************
44
5   tk2000.c - Microdigital TK2000
6 
5    tk2000.c - Microdigital TK2000
6
77    Driver by R. Belmont
8
8
99    This system is only vaguely Apple II compatible.
1010    The keyboard works entirely differently, which is a big deal.
11
11
1212    $C05A - banks RAM from c100-ffff
1313    $C05B - banks ROM from c100-ffff
14 
15************************************************************************/
16 
14
15************************************************************************/
16
1717#include "emu.h"
1818#include "machine/bankdev.h"
1919#include "machine/ram.h"
r242066r242067
129129   m_strobe = 0;
130130}
131131
132/***************************************************************************
132/***************************************************************************
133133    VIDEO
134134***************************************************************************/
135135
r242066r242067
158158   return 0;
159159}
160160
161/***************************************************************************
161/***************************************************************************
162162    I/O
163163***************************************************************************/
164164// most softswitches don't care about read vs write, so handle them here
r242066r242067
181181         m_speaker->level_w(m_speaker_state);
182182         break;
183183
184      case 0x50:   // monochrome
184      case 0x50:  // monochrome
185185         break;
186186
187      case 0x51:   // color
187      case 0x51:  // color
188188         break;
189189
190190      case 0x54:  // set page 1
191         m_page2 = false;
191         m_page2 = false;
192192         m_video->m_page2 = false;
193193         break;
194194
195195      case 0x55:  // set page 2
196         m_page2 = true;
196         m_page2 = true;
197197         m_video->m_page2 = true;
198198         break;
199199
200      case 0x5a:   // ROM
200      case 0x5a:  // ROM
201201         m_upperbank->set_bank(0);
202202         break;
203203
204      case 0x5b:   // RAM
204      case 0x5b:  // RAM
205205         m_upperbank->set_bank(1);
206206         break;
207207
r242066r242067
240240{
241241   switch (offset)
242242   {
243      case 0x00:   // write row mask for keyboard scan
243      case 0x00:  // write row mask for keyboard scan
244244         switch (data)
245245         {
246246            case 0:
r242066r242067
255255            case 0x40: m_strobe = m_row6->read(); break;
256256            case 0x80: m_strobe = m_row7->read(); break;
257257         }
258         break;
258         break;
259259
260260      case 0x5f:
261         m_strobe = m_kbspecial->read();
261         m_strobe = m_kbspecial->read();
262262         break;
263263
264264      default:
r242066r242067
454454    INPUT PORTS
455455***************************************************************************/
456456
457/*
458   TK2000 matrix:
459 
460        0  1 2 3 4 5 6 7
457/*
458    TK2000 matrix:
459
460          0  1 2 3 4 5 6 7
461461       0SHIF B V C X Z
462      1     G F D S A
462       1     G F D S A
463463       2 SPC T R E W Q
464      3 LFT 5 4 3 2 1
465      4 RGT 6 7 8 9 0
466      5 DWN Y U I O P
467      6 UP  H J K L :
464       3 LFT 5 4 3 2 1
465       4 RGT 6 7 8 9 0
466       5 DWN Y U I O P
467       6 UP  H J K L :
468468       7 RTN N M , . ?
469
469
470470       write row mask 1/2/4/8/10/20/40/80 to $C000
471471       read column at $C010
472
472
473473       If $C05F is written, the Ctrl key is read in bit 0 of $C010 immediately afterwards.
474474*/
475475static INPUT_PORTS_START( tk2000 )
trunk/src/mess/includes/pet.h
r242066r242067
236236class cbm8096_state : public pet80_state
237237{
238238public:
239   cbm8096_state(const machine_config &mconfig, device_type type, const char *tag)   :
239   cbm8096_state(const machine_config &mconfig, device_type type, const char *tag) :
240240      pet80_state(mconfig, type, tag)
241241   { }
242242};
trunk/src/mess/includes/ti85.h
r242066r242067
181181   TIMER_CALLBACK_MEMBER(ti85_timer_callback);
182182   TIMER_CALLBACK_MEMBER(ti83_timer1_callback);
183183   TIMER_CALLBACK_MEMBER(ti83_timer2_callback);
184   
184
185185   //crystal timers
186186   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
187187   void ti83pse_count( UINT8 timer, UINT8 data);
r242066r242067
207207   DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_loop_w );
208208   DECLARE_READ8_MEMBER( ti83pse_ctimer3_count_r );
209209   DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_count_w );
210   
211   
210
211
212212   void update_ti85_memory ();
213213   void update_ti83p_memory ();
214214   void update_ti83pse_memory ();
r242066r242067
218218   void ti86_setup_snapshot (UINT8 * data);
219219   DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x );
220220   DECLARE_DIRECT_UPDATE_MEMBER( ti83p_direct_update_handler );
221   
221
222222   ti83pse_timer m_ctimer[3];
223   
223
224224   //address_space &asic;
225225};
226226
trunk/src/mess/includes/victor9k.h
r242066r242067
4848#define RS232_B_TAG     "rs232b"
4949#define SCREEN_TAG      "screen"
5050#define VICTOR9K_KEYBOARD_TAG   "victor9kb"
51#define FDC_TAG         "fdc"
51#define FDC_TAG         "fdc"
5252
5353class victor9k_state : public driver_device
5454{
trunk/src/mess/includes/wswan.h
r242066r242067
4040      m_cart(*this, "cartslot"),
4141      m_cursx(*this, "CURSX"),
4242      m_cursy(*this, "CURSY"),
43      m_buttons(*this, "BUTTONS")
43      m_buttons(*this, "BUTTONS")
4444   { }
45   
45
4646   required_device<cpu_device> m_maincpu;
4747   required_device<wswan_video_device> m_vdp;
4848   required_device<wswan_sound_device> m_sound;
r242066r242067
5050   DECLARE_READ8_MEMBER(bios_r);
5151   DECLARE_READ8_MEMBER(port_r);
5252   DECLARE_WRITE8_MEMBER(port_w);
53   
53
5454   UINT8 m_ws_portram[256];
5555   UINT8 m_internal_eeprom[INTERNAL_EEPROM_SIZE];
5656   UINT8 m_system_type;
r242066r242067
5858   UINT8 *m_ws_bios_bank;
5959   UINT8 m_bios_disabled;
6060   UINT8 m_rotate;
61   
61
6262   void set_irq_line(int irq);
6363   void dma_sound_cb();
6464   void common_start();
r242066r242067
6767   DECLARE_PALETTE_INIT(wswan);
6868   DECLARE_MACHINE_START(wscolor);
6969   DECLARE_PALETTE_INIT(wscolor);
70   
70
7171protected:
7272   /* Interrupt flags */
7373   static const UINT8 WSWAN_IFLAG_STX    = 0x01;
r242066r242067
7878   static const UINT8 WSWAN_IFLAG_VBLTMR = 0x20;
7979   static const UINT8 WSWAN_IFLAG_VBL    = 0x40;
8080   static const UINT8 WSWAN_IFLAG_HBLTMR = 0x80;
81   
81
8282   /* Interrupts */
8383   static const UINT8 WSWAN_INT_STX    = 0;
8484   static const UINT8 WSWAN_INT_KEY    = 1;
r242066r242067
8888   static const UINT8 WSWAN_INT_VBLTMR = 5;
8989   static const UINT8 WSWAN_INT_VBL    = 6;
9090   static const UINT8 WSWAN_INT_HBLTMR = 7;
91   
91
9292   required_ioport m_cursx;
9393   required_ioport m_cursy;
9494   required_ioport m_buttons;
95   
95
9696   void register_save();
9797   void handle_irqs();
9898   void clear_irq_line(int irq);
trunk/src/mess/includes/xerox820.h
r242066r242067
3636#define SASIBUS_TAG     "sasi"
3737#define RS232_A_TAG     "rs232a"
3838#define RS232_B_TAG     "rs232b"
39#define KEYBOARD_TAG   "kb"
39#define KEYBOARD_TAG    "kb"
4040
4141#define XEROX820_VIDEORAM_SIZE  0x1000
4242#define XEROX820_VIDEORAM_MASK  0x0fff
trunk/src/mess/machine/coco.c
r242066r242067
681681   /* determine the sound mux status */
682682   soundmux_status_t status = soundmux_status();
683683
684    /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */
685    bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1));
686    bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2));
687    UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0);
688    UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0);
684   /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */
685   bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1));
686   bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2));
687   UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0);
688   UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0);
689689
690690   /* determine the value to send to the DAC */
691691   m_dac_output = (m_pia_1->a_output() & 0xFC) >> 2;
r242066r242067
11611161
11621162READ8_MEMBER( coco_state::ff40_read )
11631163{
1164    if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1)
1165    {
1166        return m_beckerport->read(space, offset-1, mem_mask);
1167    }
1164   if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1)
1165   {
1166      return m_beckerport->read(space, offset-1, mem_mask);
1167   }
11681168
11691169   return m_cococart->read(space, offset, mem_mask);
11701170}
r242066r242067
11771177
11781178WRITE8_MEMBER( coco_state::ff40_write )
11791179{
1180    if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1)
1181    {
1182        return m_beckerport->write(space, offset-1, data, mem_mask);
1183    }
1180   if (offset >= 1 && offset <= 2 && m_beckerportconfig->read_safe(0) == 1)
1181   {
1182      return m_beckerport->write(space, offset-1, data, mem_mask);
1183   }
11841184
11851185   m_cococart->write(space, offset, data, mem_mask);
11861186}
trunk/src/mess/machine/gamecom.c
r242066r242067
192192READ8_MEMBER( gamecom_state::gamecom_internal_r )
193193{
194194// ToDo: Read from vblank bit
195//   if(SM8521_LCV == offset + 0x20)
196//      popmessage("Read from vblank bit, TODO");
195//  if(SM8521_LCV == offset + 0x20)
196//      popmessage("Read from vblank bit, TODO");
197197
198198   return m_p_ram[offset + 0x20];
199199}
trunk/src/mess/machine/hec2hrp.c
r242066r242067
878878   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
879879
880880MACHINE_CONFIG_END
881
trunk/src/mess/machine/ie15_kbd.c
r242066r242067
170170/*
171171Y1  Y2  Y3  Y4  Y5  Y6  Y7  Y8  Y9  Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20 Y21 Y22 Y23 Y24
172172--
173;+  1!  2"  3#  4$  5%  6&  7'  8(  9)  0   -=      7   8   9   ТАБ ГТ  СБР СТР СТС f1  f2  f3
174ЙJ  ЦC  УU  КK  ЕE  НN  ГG  Ш[  Щ]  ЗZ  ХH  :*      4   5   6   ПС  ВК  АР1 С1  АР2 f4  f5  f6
175ФF  ЫY  ВW  АA  ПP  РR  ОO  ЛL  ДD  ЖV  Э\  .>  ЗБ  1   2   3           ПРД ПРМ ПРС f7  f8  f9
176ЯQ  Ч^  СS  МM  ИI  ТT  ЬX  БB  Ю@  ,<  /?  _   SPC 0       ,                       fA  fB  fC
173;+  1!  2"  3#  4$  5%  6&  7'  8(  9)  0   -=      7   8   9   ?????? ????  ?????? ?????? ?????? f1  f2  f3
174??J  ??C  ??U  ??K  ??E  ??N  ??G  ??[  ??]  ??Z  ??H  :*      4   5   6   ????  ????  ????1 ??1  ????2 f4  f5  f6
175??F  ??Y  ??W  ??A  ??P  ??R  ??O  ??L  ??D  ??V  ??\  .>  ????  1   2   3           ?????? ?????? ?????? f7  f8  f9
176??Q  ??^  ??S  ??M  ??I  ??T  ??X  ??B  ??@  ,<  /?  _   SPC 0       ,                       fA  fB  fC
177177
178178rom:
179179
r242066r242067
310310
311311   PORT_START("TERM_LINEC")
312312   PORT_BIT(0x000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
313//   PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)  PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
313//  PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)  PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
314314   PORT_BIT(0x000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SetUp") PORT_CODE(KEYCODE_RSHIFT) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(RSHIFT))
315315   PORT_BIT(0x000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SetUp") PORT_CODE(KEYCODE_PRTSCR) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(PRTSCR))
316316INPUT_PORTS_END
trunk/src/mess/machine/ms7004.c
r242066r242067
8787//  INPUT_PORTS( ms7004 )
8888//-------------------------------------------------
8989/*
90bit   sig   XSn   ВРn
91---   ---   ---   ---
920   8   16   15
931   9   15   14
942   10   14   13
953   11   13   12
964   12   19   16
975   13   12   11
986   14   11   10
997   15   10   9
1008   16   9   8
1019   17   8   7
10210   18   7   6
10311   19   6   5
10412   20   3   1
10513   21   1   2
10614   22   4   3
10715   23   5   4
90bit sig XSn ????n
91--- --- --- ---
920   8   16  15
931   9   15  14
942   10  14  13
953   11  13  12
964   12  19  16
975   13  12  11
986   14  11  10
997   15  10  9
1008   16  9   8
1019   17  8   7
10210  18  7   6
10311  19  6   5
10412  20  3   1
10513  21  1   2
10614  22  4   3
10715  23  5   4
108108
1090xc9   KEY_LANGLE_RANGLE   'резервная клавиша'
1100xbc   KEY_DELETE   ЗБ
1110xbd   KEY_RETURN   ВК
1120xbf   KEY_TILDE   '; +'
1130xc4   -      'Ъ'
1140xca   -      '/ ?'
1150xed   KEY_PERIOD   'Ю @'
1160xf1   -      '_'
1090xc9    KEY_LANGLE_RANGLE   '?????????????????? ??????????????'
1100xbc    KEY_DELETE  ????
1110xbd    KEY_RETURN  ????
1120xbf    KEY_TILDE   '; +'
1130xc4    -       '??'
1140xca    -       '/ ?'
1150xed    KEY_PERIOD  '?? @'
1160xf1    -       '_'
117117<...>
118118
1190x56   KEY_F1      СТОП КАДР
1200x57   KEY_F2      ПЕЧАТЬ КАДРА
1210x58   KEY_F3      ПАУЗА
1220x59   KEY_F4      УСТ РЕЖИМА
1230x5a   KEY_F5      Ф5
1190x56    KEY_F1      ???????? ????????
1200x57    KEY_F2      ???????????? ??????????
1210x58    KEY_F3      ??????????
1220x59    KEY_F4      ?????? ????????????
1230x5a    KEY_F5      ??5
124124
1250x64   KEY_F6      ПРЕРЫВ
1260x65   KEY_F7      ПРОДОЛЖ
1270x66   KEY_F8      ОТМЕН
1280x67   KEY_F9      ОСНОВН КАДР
1290x69   KEY_F10      ВЫХОД
1250x64    KEY_F6      ????????????
1260x65    KEY_F7      ??????????????
1270x66    KEY_F8      ??????????
1280x67    KEY_F9      ???????????? ????????
1290x69    KEY_F10     ??????????
130130
1310x71   KEY_F11      Ф11 (АР2)
1320x72   KEY_F12      Ф12 (ВШ)
1330x73   KEY_F13      Ф13 (ПС)
1340x74   KEY_F14      ДОП ВАРИАНТ
1310x71    KEY_F11     ??11 (????2)
1320x72    KEY_F12     ??12 (????)
1330x73    KEY_F13     ??13 (????)
1340x74    KEY_F14     ?????? ??????????????
135135
1360x7c   KEY_HELP   ПМ
1370x7d   KEY_MENU   ИСП
1360x7c    KEY_HELP    ????
1370x7d    KEY_MENU    ??????
138138
1390x80   KEY_F17      Ф17
1400x81   KEY_F18      Ф18
1410x82   KEY_F19      Ф19
1420x83   KEY_F20      Ф20
1390x80    KEY_F17     ??17
1400x81    KEY_F18     ??18
1410x82    KEY_F19     ??19
1420x83    KEY_F20     ??20
143143
1440xb0   KEY_LOCK   ФКС
1450xae   KEY_SHIFT   ВР
1460xaf   KEY_CTRL   СУ
1440xb0    KEY_LOCK    ??????
1450xae    KEY_SHIFT   ????
1460xaf    KEY_CTRL    ????
147147
1480xb1   KEY_META   КМП
1490xb2   -      РУС/ЛАТ
1480xb1    KEY_META    ??????
1490xb2    -       ??????/??????
150150
1510x8a   KEY_FIND   НТ
1520x8b   KEY_INSERT_HERE   ВСТ
1530x8c   KEY_REMOVE   УДАЛ
1540x8d   KEY_SELECT   ВЫБР
1550x8e   KEY_PREV_SCREEN   ПРЕД КАДР
1560x8f   KEY_NEXT_SCREEN   СЛЕД КАДР
1510x8a    KEY_FIND    ????
1520x8b    KEY_INSERT_HERE ??????
1530x8c    KEY_REMOVE  ????????
1540x8d    KEY_SELECT  ????????
1550x8e    KEY_PREV_SCREEN ???????? ????????
1560x8f    KEY_NEXT_SCREEN ???????? ????????
157157
158158nothing sends '@' or '`'
159159
160`/~   sends ^/~
1612/@   sends 2/"
1626/^   sends 6/&
1637/&   sends 7/'
1648/ *   sends 8/(
1659/(   sends 9/)
1660/)   sends 0/0
167-/_   sends _/_
168+/=   sends -/=
169;/:   sends ;/+
170'/"   sends :/ *
160`/~ sends ^/~
1612/@ sends 2/"
1626/^ sends 6/&
1637/& sends 7/'
1648/ *    sends 8/(
1659/( sends 9/)
1660/) sends 0/0
167-/_ sends _/_
168+/= sends -/=
169;/: sends ;/+
170'/" sends :/ *
171171
172F10   sends ^C
173F11   sends ESC
174F12   sends ^H
172F10 sends ^C
173F11 sends ESC
174F12 sends ^H
175175*/
176176INPUT_PORTS_START( ms7004 )
177   PORT_START("KBD12")   // vertical row 1
177   PORT_START("KBD12") // vertical row 1
178178   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Print Screen (F2)") PORT_CODE(KEYCODE_F2)
179179   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Hold Screen (F1)") PORT_CODE(KEYCODE_F1)
180180   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // '{' / '|'
r242066r242067
184184   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) // what
185185   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LShift") PORT_CODE(KEYCODE_LSHIFT)
186186
187   PORT_START("KBD13")   // vertical row 2
187   PORT_START("KBD13") // vertical row 2
188188   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Setup (F3)") PORT_CODE(KEYCODE_F3)
189189   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Data / Talk (F4)") PORT_CODE(KEYCODE_F4)
190190   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1") PORT_CODE(KEYCODE_1)
r242066r242067
194194   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_ESC)
195195   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Compose") PORT_CODE(KEYCODE_LALT)
196196
197   PORT_START("KBD14")   // vertical row 3
197   PORT_START("KBD14") // vertical row 3
198198   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Break (F5)") PORT_CODE(KEYCODE_F5)
199199   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
200200   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2") PORT_CODE(KEYCODE_2)
r242066r242067
204204   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
205205   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
206206
207   PORT_START("KBD15")   // vertical row 4
207   PORT_START("KBD15") // vertical row 4
208208   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
209209   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3") PORT_CODE(KEYCODE_3)
210210   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("4") PORT_CODE(KEYCODE_4)
r242066r242067
214214   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
215215   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
216216
217   PORT_START("KBD11")   // vertical row 5
217   PORT_START("KBD11") // vertical row 5
218218   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Interrupt (F6)") PORT_CODE(KEYCODE_F6)
219219   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("5") PORT_CODE(KEYCODE_5)
220220   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E)
r242066r242067
224224   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
225225   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
226226
227   PORT_START("KBD10")   // vertical row 6
227   PORT_START("KBD10") // vertical row 6
228228   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Resume (F7)") PORT_CODE(KEYCODE_F7)
229229   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6") PORT_CODE(KEYCODE_6)
230230   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N)
r242066r242067
234234   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I)
235235   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
236236
237   PORT_START("KBD9")   // vertical row 7
237   PORT_START("KBD9")  // vertical row 7
238238   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Cancel (F8)") PORT_CODE(KEYCODE_F8)
239239   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Main Screen (F9)") PORT_CODE(KEYCODE_F9)
240240   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7") PORT_CODE(KEYCODE_7)
r242066r242067
244244   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X)
245245   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B)
246246
247   PORT_START("KBD8")   // vertical row 8
247   PORT_START("KBD8")  // vertical row 8
248248   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Exit (F10)") PORT_CODE(KEYCODE_F10)
249249   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9") PORT_CODE(KEYCODE_9)
250250   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8") PORT_CODE(KEYCODE_8)
r242066r242067
254254   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) // '@'
255255   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
256256
257   PORT_START("KBD7")   // vertical row 9
257   PORT_START("KBD7")  // vertical row 9
258258   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
259259   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ESC (F11)") PORT_CODE(KEYCODE_F11)
260260   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0)
r242066r242067
264264   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
265265   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
266266
267   PORT_START("KBD6")   // vertical row 10
267   PORT_START("KBD6")  // vertical row 10
268268   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("BS (F12)") PORT_CODE(KEYCODE_F12)
269269   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LF (F13)") PORT_CODE(KEYCODE_PRTSCR)
270270   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // '}'
271271   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
272272   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) // ':'
273   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // 'ъ'
273   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // '??'
274274   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
275275   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
276276
277   PORT_START("KBD5")   // vertical row 11
277   PORT_START("KBD5")  // vertical row 11
278278   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Additional Options (F14)") PORT_CODE(KEYCODE_PAUSE)
279279   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
280280   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Delete <X") PORT_CODE(KEYCODE_BACKSPACE)
281   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // ???
281   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // ???
282282   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER)
283283   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
284284   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RShift") PORT_CODE(KEYCODE_RSHIFT)
285285   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
286286
287   PORT_START("KBD3")   // vertical row 12
287   PORT_START("KBD3")  // vertical row 12
288288   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Help (F15)") PORT_CODE(KEYCODE_RALT)
289289   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Insert Here") PORT_CODE(KEYCODE_HOME)
290290   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Find") PORT_CODE(KEYCODE_INSERT)
r242066r242067
294294   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
295295   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
296296
297   PORT_START("KBD2")   // vertical row 13
297   PORT_START("KBD2")  // vertical row 13
298298   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
299299   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Remove") PORT_CODE(KEYCODE_PGUP)
300300   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Next [v]") PORT_CODE(KEYCODE_PGDN)
r242066r242067
304304   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
305305   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
306306
307   PORT_START("KBD1")   // vertical row 14
307   PORT_START("KBD1")  // vertical row 14
308308   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Do (F16)") PORT_CODE(KEYCODE_RCONTROL)
309309   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
310310   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF1") PORT_CODE(KEYCODE_NUMLOCK)
r242066r242067
314314   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD)
315315   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD)
316316
317   PORT_START("KBD0")   // vertical row 15
317   PORT_START("KBD0")  // vertical row 15
318318   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F17")
319319   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F18")
320320   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF2") PORT_CODE(KEYCODE_SLASH_PAD)
r242066r242067
324324   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD)
325325   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD)
326326
327   PORT_START("KBD4")   // vertical row 16
327   PORT_START("KBD4")  // vertical row 16
328328   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F19")
329329   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F20")
330330   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF4") PORT_CODE(KEYCODE_MINUS_PAD)
r242066r242067
355355
356356ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
357357   : device_t(mconfig, MS7004, "MS7004 keyboard", tag, owner, clock, "ms7004", __FILE__),
358//   device_serial_interface(mconfig, *this),
358//  device_serial_interface(mconfig, *this),
359359   m_maincpu(*this, MS7004_CPU_TAG),
360360   m_speaker(*this, MS7004_SPK_TAG),
361361   m_i8243(*this, "i8243"),
r242066r242067
458458
459459   DBG_LOG(2,0,( "%s: 8243 port %d data %02xH\n",
460460      tag(), offset + 4, data));
461   
461
462462   if (data) {
463463      switch(offset << 4 | data) {
464464         case 0x01: sense = m_kbd0->read(); break;
trunk/src/mess/machine/ti85.c
r242066r242067
155155   //address_space &space = m_maincpu->space(AS_PROGRAM);
156156
157157   m_membank1->set_bank(m_booting ? 0x1f : 0); //Always flash page 0, well allmost
158   
158
159159   if (m_ti83p_port4 & 1)
160160   {
161     
162161      m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe);
163162
164      m_membank3->set_bank(m_ti8x_memory_page_1);
163      m_membank3->set_bank(m_ti8x_memory_page_1);
165164
166165      m_membank4->set_bank(m_ti8x_memory_page_2);
167   
166
168167   }
169168   else
170169   {
171
172170      m_membank2->set_bank(m_ti8x_memory_page_1);
173171
174172      m_membank3->set_bank(m_ti8x_memory_page_2);
r242066r242067
181179void ti85_state::update_ti83pse_memory ()
182180{
183181   //address_space &space = m_maincpu->space(AS_PROGRAM);
184   
182
185183   m_membank1->set_bank(m_booting ? (m_model==TI84P ? 0x3f : 0x7f) : 0);
186   
184
187185   if (m_ti83p_port4 & 1)
188    {
189     
186   {
190187      m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe);
191     
188
192189      m_membank3->set_bank(m_ti8x_memory_page_1 | 1);
193190
194191      m_membank4->set_bank(m_ti8x_memory_page_2);
195192
196     
193
197194   }
198195   else
199196   {
200
201197      m_membank2->set_bank(m_ti8x_memory_page_1);
202198
203199      m_membank3->set_bank(m_ti8x_memory_page_2);
r242066r242067
277273{
278274   if (m_booting)
279275   {
280        if (((m_ti83p_port4 & 1) && (address >= 0x4000 && address < 0xc000)) || (address >= 0x4000 && address < 0x8000))
281        {
282            m_booting = false;
276      if (((m_ti83p_port4 & 1) && (address >= 0x4000 && address < 0xc000)) || (address >= 0x4000 && address < 0x8000))
277      {
278         m_booting = false;
283279         update_ti83p_memory();
284280      }
285    }
281   }
286282   return address;
287283}
288284
r242066r242067
294290   m_PCR = 0xc0;
295291
296292
297    m_ti8x_memory_page_1 = 0;
293   m_ti8x_memory_page_1 = 0;
298294   m_ti8x_memory_page_2 = 0;
299295   m_ti8x_memory_page_3 = 0;
300296   m_ti83p_port4 = 1;
301297   m_booting = true;
302298   if (m_model == TI83P)
303    {
304        update_ti83p_memory();
305    }
306    else
307    {
308        update_ti83pse_memory();
309    }
299   {
300      update_ti83p_memory();
301   }
302   else
303   {
304      update_ti83pse_memory();
305   }
310306}
311307
312308MACHINE_START_MEMBER(ti85_state,ti83p)
r242066r242067
336332
337333   m_booting = true;
338334
339    ti85_state::update_ti83p_memory();
335   ti85_state::update_ti83p_memory();
340336
341337
342338   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
r242066r242067
345341
346342   /* save states and debugging */
347343   save_item(NAME(m_timer_interrupt_status));
348    save_item(NAME(m_timer_interrupt_mask));
344   save_item(NAME(m_timer_interrupt_mask));
349345   save_item(NAME(m_ti8x_memory_page_1));
350346   save_item(NAME(m_ti8x_memory_page_2));
351347   save_item(NAME(m_ti8x_memory_page_3));
r242066r242067
400396
401397MACHINE_START_MEMBER(ti85_state,ti83pse)
402398{
403    m_model = TI84PSE;
399   m_model = TI84PSE;
404400
405    ti8xpse_init_common();
401   ti8xpse_init_common();
406402}
407403
408404MACHINE_START_MEMBER(ti85_state,ti84pse)
409405{
410    m_model = TI83PSE;
406   m_model = TI83PSE;
411407
412    ti8xpse_init_common();
408   ti8xpse_init_common();
413409}
414410
415411MACHINE_START_MEMBER(ti85_state,ti84p)
416412{
417    m_model = TI84P;
413   m_model = TI84P;
418414
419415   ti8xpse_init_common();
420416}
r242066r242067
572568      data |= 0x08;
573569
574570   data |= m_timer_interrupt_status;
575   
571
576572   return data;
577573}
578574
r242066r242067
606602   data |= m_timer_interrupt_status;
607603
608604   data |= m_ctimer_interrupt_status;
609   
605
610606   return data;
611607}
612608
r242066r242067
758754   //m_LCD_mask = (data&0x08) >> 2;
759755   m_ON_interrupt_mask = data & 0x01;
760756   m_ON_interrupt_status &= m_ON_interrupt_mask;
761   
757
762758   m_timer_interrupt_mask = data & 0x06;
763759
764760   m_timer_interrupt_status &= m_timer_interrupt_mask;
r242066r242067
796792
797793WRITE8_MEMBER(ti85_state::ti83pse_port_0006_w)
798794{
799
800795   if ((m_model == TI84P) && (data < 0x80))
801796   {
802797      m_ti8x_memory_page_1 = data & 0x3f;
r242066r242067
873868
874869   if (m_ctimer[timer].setup)
875870   {
876      switch (m_ctimer[timer].setup & 0x07)
871      switch (m_ctimer[timer].setup & 0x07)
877872      {
878873      case 0x00:
879874         m_ctimer[timer].divsor = 3.0;
r242066r242067
914909         m_crystal_timer3->adjust(attotime::zero, 0, attotime::from_hz( 32768.0/m_ctimer[timer].divsor));
915910         m_crystal_timer3->enable(true);
916911         break;
917         
912
918913      }
919914   }
920915}
trunk/src/mess/machine/victor9k_fdc.c
r242066r242067
1313
1414    TODO:
1515
16   - disk error 2 (cannot find block header?)
17   - 8048 spindle speed control
16    - disk error 2 (cannot find block header?)
17    - 8048 spindle speed control
1818    - read PLL
1919    - write logic
2020
trunk/src/mess/machine/victor9kb.c
r242066r242067
355355       bit     description
356356
357357       P20     ?
358       P21    KBRDY
358       P21     KBRDY
359359       P22     ?
360360       P23     KBDATA
361361
trunk/src/mess/machine/wswan.c
r242066r242067
155155   save_item(NAME(m_internal_eeprom));
156156   save_item(NAME(m_bios_disabled));
157157   save_item(NAME(m_rotate));
158   
158
159159   save_item(NAME(m_sound_dma.source));
160160   save_item(NAME(m_sound_dma.size));
161161   save_item(NAME(m_sound_dma.enable));
162   
162
163163   if (m_cart->exists())
164164      m_cart->save_nvram();
165165}
r242066r242067
168168{
169169   m_ws_bios_bank = auto_alloc_array(machine(), UINT8, 0x10000);
170170   memcpy(m_ws_bios_bank + 0xffc0, ws_fake_bios_code, 0x40);
171   
171
172172   register_save();
173   
173
174174   machine().device<nvram_device>("nvram")->set_base(m_internal_eeprom, INTERNAL_EEPROM_SIZE);
175   
175
176176   if (m_cart->exists())
177177   {
178178      // ROM
179179      m_maincpu->space(AS_PROGRAM).install_read_handler(0x20000, 0x2ffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom20),(ws_cart_slot_device*)m_cart));
180180      m_maincpu->space(AS_PROGRAM).install_read_handler(0x30000, 0x3ffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom30),(ws_cart_slot_device*)m_cart));
181181      m_maincpu->space(AS_PROGRAM).install_read_handler(0x40000, 0xeffff, read8_delegate(FUNC(ws_cart_slot_device::read_rom40),(ws_cart_slot_device*)m_cart));
182     
182
183183      // SRAM
184184      if (m_cart->get_type() == WS_SRAM)
185185      {
r242066r242067
204204void wswan_state::machine_reset()
205205{
206206   m_bios_disabled = 0;
207   
207
208208   if (m_cart->exists())
209209      m_rotate = m_cart->get_is_rotated();
210210   else
211211      m_rotate = 0;
212   
212
213213   /* Intialize ports */
214214   memcpy(m_ws_portram, ws_portram_init, 256);
215   
215
216216   render_target *target = machine().render().first_target();
217217   target->set_view(m_rotate);
218   
218
219219   /* Initialize sound DMA */
220220   memset(&m_sound_dma, 0, sizeof(m_sound_dma));
221221}
r242066r242067
231231READ8_MEMBER( wswan_state::port_r )
232232{
233233   UINT8 value = m_ws_portram[offset];
234   
234
235235   if (offset != 2)
236236      logerror("PC=%X: port read %02X\n", m_maincpu->pc(), offset);
237   
237
238238   if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0))
239239      return m_vdp->reg_r(space, offset);
240   
240
241241   switch (offset)
242242   {
243243      case 0x4a:      // Sound DMA source address (low)
r242066r242067
288288         value = m_cart->read_io(space, offset & 0x0f);
289289         break;
290290   }
291   
291
292292   return value;
293293}
294294
r242066r242067
297297   address_space &mem = m_maincpu->space(AS_PROGRAM);
298298   UINT8 input;
299299   logerror("PC=%X: port write %02X <- %02X\n", m_maincpu->pc(), offset, data);
300   
300
301301   if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0))
302302   {
303303      m_vdp->reg_w(space, offset, data);
304304      return;
305305   }
306   
306
307307   switch (offset)
308308   {
309309      case 0x40:  /* DMA source address (low)
310                Bit 0-7 - DMA source address bit 0-7
311                */
310                     Bit 0-7 - DMA source address bit 0-7
311                     */
312312      case 0x41:  /* DMA source address (high)
313                Bit 0-7 - DMA source address bit 8-15
314                */
313                     Bit 0-7 - DMA source address bit 8-15
314                     */
315315      case 0x42:  /* DMA source bank
316                Bit 0-7 - DMA source bank number
317                */
316                     Bit 0-7 - DMA source bank number
317                     */
318318      case 0x43:  /* DMA destination bank
319                Bit 0-7 - DMA destination bank number
320                */
319                     Bit 0-7 - DMA destination bank number
320                     */
321321      case 0x44:  /* DMA destination address (low)
322                Bit 0-7 - DMA destination address bit 0-7
323                */
322                     Bit 0-7 - DMA destination address bit 0-7
323                     */
324324      case 0x45:  /* DMA destination address (high)
325                Bit 0-7 - DMA destination address bit 8-15
326                */
325                     Bit 0-7 - DMA destination address bit 8-15
326                     */
327327      case 0x46:  /* Size of copied data (low)
328                Bit 0-7 - DMA size bit 0-7
329                */
328                     Bit 0-7 - DMA size bit 0-7
329                     */
330330      case 0x47:  /* Size of copied data (high)
331                Bit 0-7 - DMA size bit 8-15
332                */
331                     Bit 0-7 - DMA size bit 8-15
332                     */
333333         break;
334334      case 0x48:  /* DMA control
335                Bit 0-6 - Unknown
336                Bit 7   - DMA stop/start
337                */
335                     Bit 0-6 - Unknown
336                     Bit 7   - DMA stop/start
337                     */
338338         if (data & 0x80)
339339         {
340340            UINT32 src, dst;
341341            UINT16 length;
342           
342
343343            src = m_ws_portram[0x40] + (m_ws_portram[0x41] << 8) + (m_ws_portram[0x42] << 16);
344344            dst = m_ws_portram[0x44] + (m_ws_portram[0x45] << 8) + (m_ws_portram[0x43] << 16);
345345            length = m_ws_portram[0x46] + (m_ws_portram[0x47] << 8);
r242066r242067
362362         }
363363         break;
364364      case 0x4a:  /* Sound DMA source address (low)
365                Bit 0-7 - Sound DMA source address bit 0-7
366                */
365                     Bit 0-7 - Sound DMA source address bit 0-7
366                     */
367367         m_sound_dma.source = (m_sound_dma.source & 0x0fff00) | data;
368368         break;
369369      case 0x4b:  /* Sound DMA source address (high)
370                Bit 0-7 - Sound DMA source address bit 8-15
371                */
370                     Bit 0-7 - Sound DMA source address bit 8-15
371                     */
372372         m_sound_dma.source = (m_sound_dma.source & 0x0f00ff) | (data << 8);
373373         break;
374374      case 0x4c:  /* Sound DMA source memory segment
375                Bit 0-3 - Sound DMA source address segment
376                Bit 4-7 - Unknown
377                */
375                     Bit 0-3 - Sound DMA source address segment
376                     Bit 4-7 - Unknown
377                     */
378378         m_sound_dma.source = (m_sound_dma.source & 0xffff) | ((data & 0x0f) << 16);
379379         break;
380380      case 0x4d:  /* Unknown */
381381         break;
382382      case 0x4e:  /* Sound DMA transfer size (low)
383                Bit 0-7 - Sound DMA transfer size bit 0-7
384                */
383                     Bit 0-7 - Sound DMA transfer size bit 0-7
384                     */
385385         m_sound_dma.size = (m_sound_dma.size & 0xff00) | data;
386386         break;
387387      case 0x4f:  /* Sound DMA transfer size (high)
388                Bit 0-7 - Sound DMA transfer size bit 8-15
389                */
388                     Bit 0-7 - Sound DMA transfer size bit 8-15
389                     */
390390         m_sound_dma.size = (m_sound_dma.size & 0xff) | (data << 8);
391391         break;
392392      case 0x50:  /* Unknown */
393393      case 0x51:  /* Unknown */
394394         break;
395395      case 0x52:  /* Sound DMA start/stop
396                Bit 0-6 - Unknown
397                Bit 7   - Sound DMA stop/start
398                */
396                     Bit 0-6 - Unknown
397                     Bit 7   - Sound DMA stop/start
398                     */
399399         m_sound_dma.enable = data;
400400         break;
401401      case 0x60:
402402         m_vdp->reg_w(space, offset, data);
403403         break;
404404      case 0x80:  /* Audio 1 freq (lo)
405                Bit 0-7 - Audio channel 1 frequency bit 0-7
406                */
405                     Bit 0-7 - Audio channel 1 frequency bit 0-7
406                     */
407407      case 0x81:  /* Audio 1 freq (hi)
408                Bit 0-7 - Audio channel 1 frequency bit 8-15
409                */
408                     Bit 0-7 - Audio channel 1 frequency bit 8-15
409                     */
410410      case 0x82:  /* Audio 2 freq (lo)
411                Bit 0-7 - Audio channel 2 frequency bit 0-7
412                */
411                     Bit 0-7 - Audio channel 2 frequency bit 0-7
412                     */
413413      case 0x83:  /* Audio 2 freq (hi)
414                Bit 0-7 - Audio channel 2 frequency bit 8-15
415                */
414                     Bit 0-7 - Audio channel 2 frequency bit 8-15
415                     */
416416      case 0x84:  /* Audio 3 freq (lo)
417                Bit 0-7 - Audio channel 3 frequency bit 0-7
418                */
417                     Bit 0-7 - Audio channel 3 frequency bit 0-7
418                     */
419419      case 0x85:  /* Audio 3 freq (hi)
420                Bit 0-7 - Audio channel 3 frequency bit 8-15
421                */
420                     Bit 0-7 - Audio channel 3 frequency bit 8-15
421                     */
422422      case 0x86:  /* Audio 4 freq (lo)
423                Bit 0-7 - Audio channel 4 frequency bit 0-7
424                */
423                     Bit 0-7 - Audio channel 4 frequency bit 0-7
424                     */
425425      case 0x87:  /* Audio 4 freq (hi)
426                Bit 0-7 - Audio channel 4 frequency bit 8-15
427                */
426                     Bit 0-7 - Audio channel 4 frequency bit 8-15
427                     */
428428      case 0x88:  /* Audio 1 volume
429                Bit 0-3 - Right volume audio channel 1
430                Bit 4-7 - Left volume audio channel 1
431                */
429                     Bit 0-3 - Right volume audio channel 1
430                     Bit 4-7 - Left volume audio channel 1
431                     */
432432      case 0x89:  /* Audio 2 volume
433                Bit 0-3 - Right volume audio channel 2
434                Bit 4-7 - Left volume audio channel 2
435                */
433                     Bit 0-3 - Right volume audio channel 2
434                     Bit 4-7 - Left volume audio channel 2
435                     */
436436      case 0x8a:  /* Audio 3 volume
437                Bit 0-3 - Right volume audio channel 3
438                Bit 4-7 - Left volume audio channel 3
439                */
437                     Bit 0-3 - Right volume audio channel 3
438                     Bit 4-7 - Left volume audio channel 3
439                     */
440440      case 0x8b:  /* Audio 4 volume
441                Bit 0-3 - Right volume audio channel 4
442                Bit 4-7 - Left volume audio channel 4
443                */
441                     Bit 0-3 - Right volume audio channel 4
442                     Bit 4-7 - Left volume audio channel 4
443                     */
444444      case 0x8c:  /* Sweep step
445                Bit 0-7 - Sweep step
446                */
445                     Bit 0-7 - Sweep step
446                     */
447447      case 0x8d:  /* Sweep time
448                Bit 0-7 - Sweep time
449                */
448                     Bit 0-7 - Sweep time
449                     */
450450      case 0x8e:  /* Noise control
451                Bit 0-2 - Noise generator type
452                Bit 3   - Reset
453                Bit 4   - Enable
454                Bit 5-7 - Unknown
455                */
451                     Bit 0-2 - Noise generator type
452                     Bit 3   - Reset
453                     Bit 4   - Enable
454                     Bit 5-7 - Unknown
455                     */
456456      case 0x8f:  /* Sample location
457                Bit 0-7 - Sample address location 0 00xxxxxx xx000000
458                */
457                     Bit 0-7 - Sample address location 0 00xxxxxx xx000000
458                     */
459459      case 0x90:  /* Audio control
460                Bit 0   - Audio 1 enable
461                Bit 1   - Audio 2 enable
462                Bit 2   - Audio 3 enable
463                Bit 3   - Audio 4 enable
464                Bit 4   - Unknown
465                Bit 5   - Audio 2 voice mode enable
466                Bit 6   - Audio 3 sweep mode enable
467                Bit 7   - Audio 4 noise mode enable
468                */
460                     Bit 0   - Audio 1 enable
461                     Bit 1   - Audio 2 enable
462                     Bit 2   - Audio 3 enable
463                     Bit 3   - Audio 4 enable
464                     Bit 4   - Unknown
465                     Bit 5   - Audio 2 voice mode enable
466                     Bit 6   - Audio 3 sweep mode enable
467                     Bit 7   - Audio 4 noise mode enable
468                     */
469469      case 0x91:  /* Audio output
470                Bit 0   - Mono select
471                Bit 1-2 - Output volume
472                Bit 3   - External stereo
473                Bit 4-6 - Unknown
474                Bit 7   - External speaker (Read-only, set by hardware)
475                */
470                     Bit 0   - Mono select
471                     Bit 1-2 - Output volume
472                     Bit 3   - External stereo
473                     Bit 4-6 - Unknown
474                     Bit 7   - External speaker (Read-only, set by hardware)
475                     */
476476      case 0x92:  /* Noise counter shift register (lo)
477                Bit 0-7 - Noise counter shift register bit 0-7
478                */
477                     Bit 0-7 - Noise counter shift register bit 0-7
478                     */
479479      case 0x93:  /* Noise counter shift register (hi)
480                Bit 0-6 - Noise counter shift register bit 8-14
481                bit 7   - Unknown
482                */
480                     Bit 0-6 - Noise counter shift register bit 8-14
481                     bit 7   - Unknown
482                     */
483483      case 0x94:  /* Master volume
484                Bit 0-3 - Master volume
485                Bit 4-7 - Unknown
486                */
484                     Bit 0-3 - Master volume
485                     Bit 4-7 - Unknown
486                     */
487487         m_sound->port_w(space, offset, data);
488488         break;
489489      case 0xa0:  /* Hardware type - this is probably read only
490                Bit 0   - Enable cartridge slot and/or disable bios
491                Bit 1   - Hardware type: 0 = WS, 1 = WSC
492                Bit 2-7 - Unknown
493                */
490                     Bit 0   - Enable cartridge slot and/or disable bios
491                     Bit 1   - Hardware type: 0 = WS, 1 = WSC
492                     Bit 2-7 - Unknown
493                     */
494494         if ((data & 0x01) && !m_bios_disabled)
495495            m_bios_disabled = 1;
496496         break;
497         
497
498498      case 0xb0:  /* Interrupt base vector
499                Bit 0-7 - Interrupt base vector
500                */
499                     Bit 0-7 - Interrupt base vector
500                     */
501501         break;
502502      case 0xb1:  /* Communication byte
503                Bit 0-7 - Communication byte
504                */
503                     Bit 0-7 - Communication byte
504                     */
505505         break;
506506      case 0xb2:  /* Interrupt enable
507                Bit 0   - Serial transmit interrupt enable
508                Bit 1   - Key press interrupt enable
509                Bit 2   - RTC alarm interrupt enable
510                Bit 3   - Serial receive interrupt enable
511                Bit 4   - Drawing line detection interrupt enable
512                Bit 5   - VBlank timer interrupt enable
513                Bit 6   - VBlank interrupt enable
514                Bit 7   - HBlank timer interrupt enable
515                */
507                     Bit 0   - Serial transmit interrupt enable
508                     Bit 1   - Key press interrupt enable
509                     Bit 2   - RTC alarm interrupt enable
510                     Bit 3   - Serial receive interrupt enable
511                     Bit 4   - Drawing line detection interrupt enable
512                     Bit 5   - VBlank timer interrupt enable
513                     Bit 6   - VBlank interrupt enable
514                     Bit 7   - HBlank timer interrupt enable
515                     */
516516         break;
517517      case 0xb3:  /* serial communication control
518                Bit 0   - Receive complete
519                Bit 1   - Error
520                Bit 2   - Send complete
521                Bit 3-4 - Unknown
522                Bit 5   - Send data interrupt generation
523                Bit 6   - Connection speed: 0 = 9600 bps, 1 = 38400 bps
524                bit 7   - Receive data interrupt generation
525                */
518                     Bit 0   - Receive complete
519                     Bit 1   - Error
520                     Bit 2   - Send complete
521                     Bit 3-4 - Unknown
522                     Bit 5   - Send data interrupt generation
523                     Bit 6   - Connection speed: 0 = 9600 bps, 1 = 38400 bps
524                     bit 7   - Receive data interrupt generation
525                     */
526526         //          data |= 0x02;
527527         m_ws_portram[0xb1] = 0xff;
528528         if (data & 0x80)
r242066r242067
536536         }
537537         break;
538538      case 0xb5:  /* Read controls
539                Bit 0-3 - Current state of input lines (read-only)
540                Bit 4-6 - Select line of inputs to read
541                001 - Read Y cursors
542                010 - Read X cursors
543                100 - Read START,A,B buttons
544                Bit 7   - Unknown
545                */
539                     Bit 0-3 - Current state of input lines (read-only)
540                     Bit 4-6 - Select line of inputs to read
541                     001 - Read Y cursors
542                     010 - Read X cursors
543                     100 - Read START,A,B buttons
544                     Bit 7   - Unknown
545                     */
546546         data = data & 0xf0;
547547         switch (data)
548548      {
r242066r242067
576576      }
577577         break;
578578      case 0xb6:  /* Interrupt acknowledge
579                Bit 0   - Serial transmit interrupt acknowledge
580                Bit 1   - Key press interrupt acknowledge
581                Bit 2   - RTC alarm interrupt acknowledge
582                Bit 3   - Serial receive interrupt acknowledge
583                Bit 4   - Drawing line detection interrupt acknowledge
584                Bit 5   - VBlank timer interrupt acknowledge
585                Bit 6   - VBlank interrupt acknowledge
586                Bit 7   - HBlank timer interrupt acknowledge
587                */
579                     Bit 0   - Serial transmit interrupt acknowledge
580                     Bit 1   - Key press interrupt acknowledge
581                     Bit 2   - RTC alarm interrupt acknowledge
582                     Bit 3   - Serial receive interrupt acknowledge
583                     Bit 4   - Drawing line detection interrupt acknowledge
584                     Bit 5   - VBlank timer interrupt acknowledge
585                     Bit 6   - VBlank interrupt acknowledge
586                     Bit 7   - HBlank timer interrupt acknowledge
587                     */
588588         clear_irq_line(data);
589589         data = m_ws_portram[0xb6];
590590         break;
591591      case 0xba:  /* Internal EEPROM data (low)
592                Bit 0-7 - Internal EEPROM data transfer bit 0-7
593                */
592                     Bit 0-7 - Internal EEPROM data transfer bit 0-7
593                     */
594594      case 0xbb:  /* Internal EEPROM data (high)
595                Bit 0-7 - Internal EEPROM data transfer bit 8-15
596                */
595                     Bit 0-7 - Internal EEPROM data transfer bit 8-15
596                     */
597597         break;
598598      case 0xbc:  /* Internal EEPROM address (low)
599                Bit 0-7 - Internal EEPROM address bit 1-8
600                */
599                     Bit 0-7 - Internal EEPROM address bit 1-8
600                     */
601601      case 0xbd:  /* Internal EEPROM address (high)
602                Bit 0   - Internal EEPROM address bit 9(?)
603                Bit 1-7 - Unknown
604                Only 1KByte internal EEPROM??
605                */
602                     Bit 0   - Internal EEPROM address bit 9(?)
603                     Bit 1-7 - Unknown
604                     Only 1KByte internal EEPROM??
605                     */
606606         break;
607607      case 0xbe:  /* Internal EEPROM command
608                Bit 0   - Read complete (read only)
609                Bit 1   - Write complete (read only)
610                Bit 2-3 - Unknown
611                Bit 4   - Read
612                Bit 5   - Write
613                Bit 6   - Protect
614                Bit 7   - Initialize
615                */
608                     Bit 0   - Read complete (read only)
609                     Bit 1   - Write complete (read only)
610                     Bit 2-3 - Unknown
611                     Bit 4   - Read
612                     Bit 5   - Write
613                     Bit 6   - Protect
614                     Bit 7   - Initialize
615                     */
616616         if (data & 0x20)
617617         {
618618            UINT16 addr = ( ( ( m_ws_portram[0xbd] << 8 ) | m_ws_portram[0xbc] ) << 1 ) & 0x1FF;
r242066r242067
654654         logerror( "Write to unsupported port: %X - %X\n", offset, data );
655655         break;
656656   }
657   
657
658658   /* Update the port value */
659659   m_ws_portram[offset] = data;
660660}
trunk/src/mess/machine/x820kb.c
r242066r242067
3636
3737/*
3838
39   TODO:
39    TODO:
4040
41   - repeat
42   - what are T0/T1/INT?
41    - repeat
42    - what are T0/T1/INT?
4343
4444*/
4545
r242066r242067
307307{
308308   /*
309309
310      bit    description
310       bit     description
311311
312      0       A0
313      1       A1
314      2       A2
315      3       A3
316      4         KBSTB
317      5
318      6
319      7      ? (toggled if T1=0)
312       0       A0
313       1       A1
314       2       A2
315       3       A3
316       4       KBSTB
317       5
318       6
319       7       ? (toggled if T1=0)
320320
321321   */
322322
trunk/src/mess/mess.lst
r242066r242067
25572557gameking
25582558leapster
25592559leapstertv
2560
trunk/src/mess/tools/castool/main.c
r242066r242067
104104   {"sol20", sol20_cassette_formats           ,"PTC SOL-20"},
105105   {"sorcerer", sorcerer_cassette_formats     ,"Exidy Sorcerer"},
106106   {"sordm5", sordm5_cassette_formats         ,"Sord M5"},
107   {"spc1000", spc1000_cassette_formats       ,"Samsung SPC-1000"},   
107   {"spc1000", spc1000_cassette_formats       ,"Samsung SPC-1000"},
108108   {"svi", svi_cassette_formats               ,"Spectravideo SVI-318 & SVI-328"},
109109   {"to7", to7_cassette_formats               ,"Thomson TO-series"},
110110   {"trs80l2", trs80l2_cassette_formats       ,"TRS-80 Level 2"},
r242066r242067
120120   {"zx81_p", zx81_p_format                   ,"Sinclair ZX81"},
121121
122122
123   
123
124124   {NULL,NULL,NULL}
125125};
126126
trunk/src/mess/video/apple2.c
r242066r242067
668668}
669669
670670/*
671   New implementation
671    New implementation
672672*/
673673
674674const device_type APPLE2_VIDEO = &device_creator<a2_video_device>;
r242066r242067
784784   {
785785      if ((code >= 0x60) && (code <= 0x7f))
786786      {
787         code |= 0x80;   // map to lowercase normal
788         i = fg;         // and flip the color
787         code |= 0x80;   // map to lowercase normal
788         i = fg;         // and flip the color
789789         fg = bg;
790790         bg = i;
791791      }
r242066r242067
10221022            {
10231023               UINT16 *vram = &bitmap.pix16(row + y, (col * 14));
10241024
1025               *vram++ = abits & (1 << 0) ? fg : 0;
1026               *vram++ = abits & (1 << 1) ? fg : 0;
1027               *vram++ = abits & (1 << 2) ? fg : 0;
1028               *vram++ = abits & (1 << 3) ? fg : 0;
1029               *vram++ = abits & (1 << 0) ? fg : 0;
1030               *vram++ = abits & (1 << 1) ? fg : 0;
1031               *vram++ = abits & (1 << 2) ? fg : 0;
1032               *vram++ = bits & (1 << 0) ? fg : 0;
1033               *vram++ = bits & (1 << 1) ? fg : 0;
1034               *vram++ = bits & (1 << 2) ? fg : 0;
1035               *vram++ = bits & (1 << 3) ? fg : 0;
1036               *vram++ = bits & (1 << 0) ? fg : 0;
1037               *vram++ = bits & (1 << 1) ? fg : 0;
1038               *vram++ = bits & (1 << 2) ? fg : 0;
1025               *vram++ = abits & (1 << 0) ? fg : 0;
1026               *vram++ = abits & (1 << 1) ? fg : 0;
1027               *vram++ = abits & (1 << 2) ? fg : 0;
1028               *vram++ = abits & (1 << 3) ? fg : 0;
1029               *vram++ = abits & (1 << 0) ? fg : 0;
1030               *vram++ = abits & (1 << 1) ? fg : 0;
1031               *vram++ = abits & (1 << 2) ? fg : 0;
1032               *vram++ = bits & (1 << 0) ? fg : 0;
1033               *vram++ = bits & (1 << 1) ? fg : 0;
1034               *vram++ = bits & (1 << 2) ? fg : 0;
1035               *vram++ = bits & (1 << 3) ? fg : 0;
1036               *vram++ = bits & (1 << 0) ? fg : 0;
1037               *vram++ = bits & (1 << 1) ? fg : 0;
1038               *vram++ = bits & (1 << 2) ? fg : 0;
10391039            }
10401040
10411041            bits = (code >> 4) & 0x0F;
r242066r242067
10451045            {
10461046               UINT16 *vram = &bitmap.pix16(row + y, (col * 14));
10471047
1048               *vram++ = abits & (1 << 0) ? fg : 0;
1049               *vram++ = abits & (1 << 1) ? fg : 0;
1050               *vram++ = abits & (1 << 2) ? fg : 0;
1051               *vram++ = abits & (1 << 3) ? fg : 0;
1052               *vram++ = abits & (1 << 0) ? fg : 0;
1053               *vram++ = abits & (1 << 1) ? fg : 0;
1054               *vram++ = abits & (1 << 2) ? fg : 0;
1055               *vram++ = bits & (1 << 0) ? fg : 0;
1056               *vram++ = bits & (1 << 1) ? fg : 0;
1057               *vram++ = bits & (1 << 2) ? fg : 0;
1058               *vram++ = bits & (1 << 3) ? fg : 0;
1059               *vram++ = bits & (1 << 0) ? fg : 0;
1060               *vram++ = bits & (1 << 1) ? fg : 0;
1061               *vram++ = bits & (1 << 2) ? fg : 0;
1048               *vram++ = abits & (1 << 0) ? fg : 0;
1049               *vram++ = abits & (1 << 1) ? fg : 0;
1050               *vram++ = abits & (1 << 2) ? fg : 0;
1051               *vram++ = abits & (1 << 3) ? fg : 0;
1052               *vram++ = abits & (1 << 0) ? fg : 0;
1053               *vram++ = abits & (1 << 1) ? fg : 0;
1054               *vram++ = abits & (1 << 2) ? fg : 0;
1055               *vram++ = bits & (1 << 0) ? fg : 0;
1056               *vram++ = bits & (1 << 1) ? fg : 0;
1057               *vram++ = bits & (1 << 2) ? fg : 0;
1058               *vram++ = bits & (1 << 3) ? fg : 0;
1059               *vram++ = bits & (1 << 0) ? fg : 0;
1060               *vram++ = bits & (1 << 1) ? fg : 0;
1061               *vram++ = bits & (1 << 2) ? fg : 0;
10621062            }
10631063         }
10641064      }
r242066r242067
10701070   int row, col;
10711071   UINT32 start_address;
10721072   UINT32 address;
1073   UINT8 *aux_page = m_ram_ptr;
1073   UINT8 *aux_page = m_ram_ptr;
10741074   int fg = 0;
10751075   int bg = 0;
10761076
r242066r242067
10791079      start_address = 0x400;
10801080      if (m_aux_ptr)
10811081      {
1082         aux_page = m_aux_ptr;
1082         aux_page = m_aux_ptr;
10831083      }
10841084   }
10851085   else
10861086   {
1087      start_address = m_page2 ? 0x800 : 0x400;
1087      start_address = m_page2 ? 0x800 : 0x400;
10881088   }
10891089
10901090   beginrow = MAX(beginrow, cliprect.min_y - (cliprect.min_y % 8));
r242066r242067
11021102   {
11031103      if (m_80col)
11041104      {
1105         for (col = 0; col < 40; col++)
1105         for (col = 0; col < 40; col++)
11061106         {
11071107            /* calculate address */
11081108            address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
r242066r242067
11151115      }
11161116      else
11171117      {
1118         for (col = 0; col < 40; col++)
1118         for (col = 0; col < 40; col++)
11191119         {
11201120            /* calculate address */
11211121            address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
r242066r242067
11291129void a2_video_device::text_update_orig(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow)
11301130{
11311131   int row, col;
1132   UINT32 start_address = m_page2 ? 0x800 : 0x400; 
1132   UINT32 start_address = m_page2 ? 0x800 : 0x400;
11331133   UINT32 address;
11341134   int fg = 0;
11351135   int bg = 0;
r242066r242067
11471147
11481148   for (row = beginrow; row <= endrow; row += 8)
11491149   {
1150      for (col = 0; col < 40; col++)
1150      for (col = 0; col < 40; col++)
11511151      {
11521152         /* calculate address */
11531153         address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
r242066r242067
13611361   vram = &m_ram_ptr[page];
13621362   if (m_aux_ptr)
13631363   {
1364      vaux = m_aux_ptr;
1364      vaux = m_aux_ptr;
13651365   }
13661366   else
13671367   {
r242066r242067
14621462{
14631463   palette.set_pen_colors(0, apple2_palette, ARRAY_LENGTH(apple2_palette));
14641464}
1465
1466
trunk/src/mess/video/apple2.h
r242066r242067
11/*********************************************************************
2 
3   video/apple2.h   - Video handling for 8-bit Apple IIs
4 
2
3    video/apple2.h  - Video handling for 8-bit Apple IIs
4
55*********************************************************************/
66
77#ifndef __A2_VIDEO__
trunk/src/mess/video/wswan_video.c
r242066r242067
11/***************************************************************************
2
2
33 wswan_video.c
4
4
55 File to handle video emulation of the Bandai WonderSwan VDP.
6
6
77 Anthony Kruize
88 Wilbert Pol
9
9
1010 TODO:
1111   - remove the redundant parts of m_regs
1212   - split the Color VDP from the Mono VDP?
13
13
1414 ***************************************************************************/
1515
1616#include "wswan_video.h"
r242066r242067
3232   save_item(NAME(m_palette_port));
3333   save_item(NAME(m_pal));
3434   save_item(NAME(m_regs));
35   
35
3636   save_item(NAME(m_layer_bg_enable));
3737   save_item(NAME(m_layer_fg_enable));
3838   save_item(NAME(m_sprites_enable));
r242066r242067
7979void wswan_video_device::device_start()
8080{
8181   machine().first_screen()->register_screen_bitmap(m_bitmap);
82   
82
8383   m_timer = timer_alloc(TIMER_SCANLINE);
8484   m_timer->adjust(attotime::from_ticks(256, 3072000), 0, attotime::from_ticks(256, 3072000));
85   
85
8686   // bind callbacks
8787   m_set_irq_cb.bind_relative_to(*owner());
8888   m_snd_dma_cb.bind_relative_to(*owner());
r242066r242067
166166   m_timer_vblank_mode = 0;
167167   m_timer_vblank_reload = 0;
168168   m_timer_vblank_count = 0;      /* Vertical blank timer counter value */
169   
169
170170   memset(m_sprite_table_buffer, 0, sizeof(m_sprite_table_buffer));
171171   memset(m_main_palette, 0, sizeof(m_main_palette));
172172   memcpy(m_regs, vdp_regs_init, 256);
r242066r242067
190190
191191void wswan_video_device::setup_palettes()
192192{
193   if (m_color_mode)
193   if (m_color_mode)
194194   {
195      for (int i = 0; i < 16; i++)
196         for (int j = 0; j < 16; j++)
195      for (int i = 0; i < 16; i++)
196         for (int j = 0; j < 16; j++)
197197            m_pal[i][j] = ((m_palette_vram[(i << 5) + j * 2 + 1] << 8) | m_palette_vram[(i << 5) + j * 2]) & 0x0fff;
198   }
199   else
198   }
199   else
200200   {
201      for (int  i = 0; i < 16; i++)
201      for (int  i = 0; i < 16; i++)
202202      {
203203         m_pal[i][0] = (m_palette_port[(i << 1)] >> 0) & 0x07;
204204         m_pal[i][1] = (m_palette_port[(i << 1)] >> 4) & 0x07;
r242066r242067
212212{
213213   UINT16 map_addr = m_layer_bg_address + (((m_current_line + m_layer_bg_scroll_y) & 0xf8) << 3);
214214   UINT8 start_column = (m_layer_bg_scroll_x >> 3);
215   
216   for (int column = 0; column < 29; column++)
215
216   for (int column = 0; column < 29; column++)
217217   {
218218      UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0;
219219      int x_offset, tile_line, tile_address;
r242066r242067
221221                  | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)];
222222      int tile_number = tile_data & 0x01ff;
223223      int tile_palette = (tile_data >> 9) & 0x0f;
224     
224
225225      tile_line = (m_current_line + m_layer_bg_scroll_y) & 0x07;
226226      if (tile_data & 0x8000) // vflip
227227         tile_line = 7 - tile_line;
228     
229      if (m_colors_16)
228
229      if (m_colors_16)
230230      {
231231         tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2);
232         if (m_tile_packed)
232         if (m_tile_packed)
233233         {
234234            plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3];
235         }
236         else
235         }
236         else
237237         {
238238            plane0 = m_vram[tile_address + 0];
239239            plane1 = m_vram[tile_address + 1] << 1;
240240            plane2 = m_vram[tile_address + 2] << 2;
241241            plane3 = m_vram[tile_address + 3] << 3;
242242         }
243      }
244      else
243      }
244      else
245245      {
246246         tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1);
247         if (m_tile_packed)
247         if (m_tile_packed)
248248         {
249249            plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1];
250         }
251         else
250         }
251         else
252252         {
253253            plane0 = m_vram[tile_address + 0];
254254            plane1 = m_vram[tile_address + 1] << 1;
r242066r242067
256256            plane3 = 0;
257257         }
258258      }
259     
260      for (int x = 0; x < 8; x++)
259
260      for (int x = 0; x < 8; x++)
261261      {
262262         int col;
263         if (m_tile_packed)
263         if (m_tile_packed)
264264         {
265            if (m_colors_16)
265            if (m_colors_16)
266266            {
267267               col = plane0 & 0x0f;
268268               plane0 = plane0 >> 4;
269            }
270            else
269            }
270            else
271271            {
272272               col = plane0 & 0x03;
273273               plane0 = plane0 >> 2;
274274            }
275         }
276         else
275         }
276         else
277277         {
278278            col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1);
279279            plane3 = plane3 >> 1;
r242066r242067
282282            plane0 = plane0 >> 1;
283283         }
284284
285         if (tile_data & 0x4000)
285         if (tile_data & 0x4000)
286286            x_offset = x + (column << 3) - (m_layer_bg_scroll_x & 0x07);
287287         else
288288            x_offset = 7 - x + (column << 3) - (m_layer_bg_scroll_x & 0x07);
289289
290         if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
290         if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
291291         {
292            if (m_colors_16)
292            if (m_colors_16)
293293            {
294               if (col)
294               if (col)
295295               {
296296                  if (m_color_mode)
297297                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
298                  else
298                  else
299299                  {
300300                     /* Hmmmm, what should we do here... Is this correct?? */
301301                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
302302                  }
303303               }
304            }
305            else
304            }
305            else
306306            {
307               if (col || !(tile_palette & 4))
307               if (col || !(tile_palette & 4))
308308               {
309309                  if (m_color_mode)
310310                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
322322   UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3);
323323   UINT8 start_column = (m_layer_fg_scroll_x >> 3);
324324
325   for (int column = 0; column < 29; column++)
325   for (int column = 0; column < 29; column++)
326326   {
327327      UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0;
328328      int x_offset, tile_line, tile_address;
r242066r242067
330330                  | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)];
331331      int tile_number = tile_data & 0x01ff;
332332      int tile_palette = (tile_data >> 9) & 0x0f;
333     
333
334334      tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07;
335335      if (tile_data & 0x8000) // vflip
336336         tile_line = 7 - tile_line;
337     
338      if (m_colors_16)
337
338      if (m_colors_16)
339339      {
340340         tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2);
341         if (m_tile_packed)
341         if (m_tile_packed)
342342         {
343343            plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3];
344         }
345         else
344         }
345         else
346346         {
347347            plane0 = m_vram[tile_address + 0];
348348            plane1 = m_vram[tile_address + 1] << 1;
349349            plane2 = m_vram[tile_address + 2] << 2;
350350            plane3 = m_vram[tile_address + 3] << 3;
351351         }
352      }
353      else
352      }
353      else
354354      {
355355         tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1);
356         if (m_tile_packed)
356         if (m_tile_packed)
357357         {
358358            plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1];
359         }
360         else
359         }
360         else
361361         {
362362            plane0 = m_vram[tile_address + 0];
363363            plane1 = m_vram[tile_address + 1] << 1;
r242066r242067
366366         }
367367      }
368368
369      for (int x = 0; x < 8; x++ )
369      for (int x = 0; x < 8; x++ )
370370      {
371371         int col;
372         if (m_tile_packed)
372         if (m_tile_packed)
373373         {
374            if (m_colors_16)
374            if (m_colors_16)
375375            {
376376               col = plane0 & 0x0f;
377377               plane0 = plane0 >> 4;
378            }
379            else
378            }
379            else
380380            {
381381               col = plane0 & 0x03;
382382               plane0 = plane0 >> 2;
383383            }
384         }
385         else
384         }
385         else
386386         {
387387            col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1);
388388            plane3 = plane3 >> 1;
r242066r242067
391391            plane0 = plane0 >> 1;
392392         }
393393
394         if (tile_data & 0x4000)
394         if (tile_data & 0x4000)
395395            x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
396396         else
397397            x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
398398
399         if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
399         if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
400400         {
401            if (m_colors_16)
401            if (m_colors_16)
402402            {
403               if (col)
403               if (col)
404404               {
405405//                      if (m_color_mode) {
406406                  m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
409409//                          m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
410410//                      }
411411               }
412            }
413            else
412            }
413            else
414414            {
415               if (col || !(tile_palette & 4))
415               if (col || !(tile_palette & 4))
416416               {
417417                  if (m_color_mode)
418418                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
429429{
430430   UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3);
431431   UINT8 start_column = (m_layer_fg_scroll_x >> 3);
432   
433   for (int column = 0; column < 29; column++)
432
433   for (int column = 0; column < 29; column++)
434434   {
435435      UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0;
436436      int x_offset, tile_line, tile_address;
r242066r242067
438438                  | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)];
439439      int tile_number = tile_data & 0x01ff;
440440      int tile_palette = (tile_data >> 9) & 0x0f;
441     
441
442442      tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07;
443443      if (tile_data & 0x8000) // vflip
444444         tile_line = 7 - tile_line;
445445
446     
447      if (m_colors_16)
446
447      if (m_colors_16)
448448      {
449449         tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2);
450         if (m_tile_packed)
450         if (m_tile_packed)
451451         {
452452            plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3];
453         }
454         else
453         }
454         else
455455         {
456456            plane0 = m_vram[tile_address + 0];
457457            plane1 = m_vram[tile_address + 1] << 1;
458458            plane2 = m_vram[tile_address + 2] << 2;
459459            plane3 = m_vram[tile_address + 3] << 3;
460460         }
461      }
462      else
461      }
462      else
463463      {
464464         tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1);
465         if (m_tile_packed)
465         if (m_tile_packed)
466466         {
467467            plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1];
468         }
469         else
468         }
469         else
470470         {
471471            plane0 = m_vram[tile_address + 0];
472472            plane1 = m_vram[tile_address + 1] << 1;
r242066r242067
475475         }
476476      }
477477
478      for (int x = 0; x < 8; x++)
478      for (int x = 0; x < 8; x++)
479479      {
480480         int col;
481         if (m_tile_packed)
481         if (m_tile_packed)
482482         {
483            if (m_colors_16)
483            if (m_colors_16)
484484            {
485485               col = plane0 & 0x0f;
486486               plane0 = plane0 >> 4;
487            }
488            else
487            }
488            else
489489            {
490490               col = plane0 & 0x03;
491491               plane0 = plane0 >> 2;
492492            }
493         }
494         else
493         }
494         else
495495         {
496496            col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1);
497497            plane3 = plane3 >> 1;
r242066r242067
500500            plane0 = plane0 >> 1;
501501         }
502502
503         if (tile_data & 0x4000)
503         if (tile_data & 0x4000)
504504            x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
505505         else
506506            x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
507507
508         if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset < m_window_fg_right && x_offset < WSWAN_X_PIXELS)
508         if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset < m_window_fg_right && x_offset < WSWAN_X_PIXELS)
509509         {
510            if (m_colors_16)
510            if (m_colors_16)
511511            {
512               if (col)
512               if (col)
513513               {
514514                  if (m_color_mode)
515515                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
517517                     /* Hmmmm, what should we do here... Is this correct?? */
518518                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
519519               }
520            }
521            else
520            }
521            else
522522            {
523               if (col || !(tile_palette & 4))
523               if (col || !(tile_palette & 4))
524524               {
525525                  if (m_color_mode)
526526                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
537537{
538538   UINT16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3);
539539   UINT8 start_column = (m_layer_fg_scroll_x >> 3);
540   
541   for (int column = 0; column < 29; column++)
540
541   for (int column = 0; column < 29; column++)
542542   {
543543      UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0;
544544      int x_offset, tile_line, tile_address;
r242066r242067
550550      tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07;
551551      if (tile_data & 0x8000) // vflip
552552         tile_line = 7 - tile_line;
553     
554      if (m_colors_16)
553
554      if (m_colors_16)
555555      {
556556         tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2);
557         if (m_tile_packed)
557         if (m_tile_packed)
558558         {
559559            plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3];
560         }
561         else
560         }
561         else
562562         {
563563            plane0 = m_vram[tile_address + 0];
564564            plane1 = m_vram[tile_address + 1] << 1;
565565            plane2 = m_vram[tile_address + 2] << 2;
566566            plane3 = m_vram[tile_address + 3] << 3;
567567         }
568      }
569      else
568      }
569      else
570570      {
571571         tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1);
572         if (m_tile_packed)
572         if (m_tile_packed)
573573         {
574574            plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1];
575         }
576         else
575         }
576         else
577577         {
578578            plane0 = m_vram[tile_address + 0];
579579            plane1 = m_vram[tile_address + 1] << 1;
r242066r242067
582582         }
583583      }
584584
585      for (int x = 0; x < 8; x++)
585      for (int x = 0; x < 8; x++)
586586      {
587587         int col;
588         if (m_tile_packed)
588         if (m_tile_packed)
589589         {
590            if (m_colors_16)
590            if (m_colors_16)
591591            {
592592               col = plane0 & 0x0f;
593593               plane0 = plane0 >> 4;
594            }
595            else
594            }
595            else
596596            {
597597               col = plane0 & 0x03;
598598               plane0 = plane0 >> 2;
599599            }
600         }
601         else
600         }
601         else
602602         {
603603            col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1);
604604            plane3 = plane3 >> 1;
r242066r242067
607607            plane0 = plane0 >> 1;
608608         }
609609
610         if (tile_data & 0x4000)
610         if (tile_data & 0x4000)
611611            x_offset = x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
612612         else
613613            x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07);
614614
615         if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset >= m_window_fg_right && x_offset < WSWAN_X_PIXELS))
615         if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset >= m_window_fg_right && x_offset < WSWAN_X_PIXELS))
616616         {
617            if (m_colors_16)
617            if (m_colors_16)
618618            {
619               if (col)
619               if (col)
620620               {
621621                  if (m_color_mode)
622622                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
624624                     /* Hmmmm, what should we do here... Is this correct?? */
625625                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
626626               }
627            }
628            else
627            }
628            else
629629            {
630               if (col || !(tile_palette & 4))
630               if (col || !(tile_palette & 4))
631631               {
632632                  if (m_color_mode)
633633                     m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
645645   if (m_sprite_count == 0)
646646      return;
647647
648   for (int i = m_sprite_first + m_sprite_count - 1; i >= m_sprite_first; i--)
648   for (int i = m_sprite_first + m_sprite_count - 1; i >= m_sprite_first; i--)
649649   {
650650      UINT16 tile_data = (m_sprite_table_buffer[i * 4 + 1] << 8) | m_sprite_table_buffer[i * 4];
651651      UINT8 y = m_sprite_table_buffer[ i * 4 + 2 ];
652652      UINT8 x = m_sprite_table_buffer[ i * 4 + 3 ];
653653      int tile_line = (m_current_line - y) & 0xff;
654654
655      if ((tile_line >= 0) && (tile_line < 8) && ((tile_data & 0x2000) == mask))
655      if ((tile_line >= 0) && (tile_line < 8) && ((tile_data & 0x2000) == mask))
656656      {
657657         UINT32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0;
658658         int x_offset, tile_address;
r242066r242067
662662
663663         if (tile_data & 0x8000)
664664            tile_line = 7 - tile_line;
665         
666         if (m_colors_16)
665
666         if (m_colors_16)
667667         {
668668            tile_address = 0x4000 + (tile_number * 32) + (tile_line << 2);
669            if (m_tile_packed)
669            if (m_tile_packed)
670670            {
671671               plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3];
672            }
673            else
672            }
673            else
674674            {
675675               plane0 = m_vram[tile_address + 0];
676676               plane1 = m_vram[tile_address + 1] << 1;
677677               plane2 = m_vram[tile_address + 2] << 2;
678678               plane3 = m_vram[tile_address + 3] << 3;
679679            }
680         }
681         else
680         }
681         else
682682         {
683683            tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1);
684            if (m_tile_packed)
684            if (m_tile_packed)
685685            {
686686               plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1];
687            }
688            else
687            }
688            else
689689            {
690690               plane0 = m_vram[tile_address + 0];
691691               plane1 = m_vram[tile_address + 1] << 1;
r242066r242067
693693               plane3 = 0;
694694            }
695695         }
696         
697         if (m_window_sprites_enable)
696
697         if (m_window_sprites_enable)
698698         {
699            if (tile_data & 0x1000)
699            if (tile_data & 0x1000)
700700            {
701701               if (m_current_line >= m_window_sprites_top && m_current_line <= m_window_sprites_bottom)
702702                  check_clip = 1;
703            }
704            else
703            }
704            else
705705            {
706706               if (m_current_line < m_window_sprites_top || m_current_line > m_window_sprites_bottom)
707707                  continue;
708708            }
709709         }
710         
711         for (int j = 0; j < 8; j++)
710
711         for (int j = 0; j < 8; j++)
712712         {
713713            int col;
714            if (m_tile_packed)
714            if (m_tile_packed)
715715            {
716               if (m_colors_16)
716               if (m_colors_16)
717717               {
718718                  col = plane0 & 0x0f;
719719                  plane0 = plane0 >> 4;
720               }
721               else
720               }
721               else
722722               {
723723                  col = plane0 & 0x03;
724724                  plane0 = plane0 >> 2;
725725               }
726            }
727            else
726            }
727            else
728728            {
729729               col = (plane3 & 8) | (plane2 & 4) | (plane1 & 2) | (plane0 & 1);
730730               plane3 = plane3 >> 1;
r242066r242067
740740
741741            x_offset = x_offset & 0xff;
742742
743            if (m_window_sprites_enable)
743            if (m_window_sprites_enable)
744744            {
745               if (tile_data & 0x1000 && check_clip)
745               if (tile_data & 0x1000 && check_clip)
746746               {
747747                  if (x_offset >= m_window_sprites_left && x_offset <= m_window_sprites_right)
748748                     continue;
749               }
750               else
749               }
750               else
751751               {
752                  if (x_offset < m_window_sprites_left || x_offset > m_window_sprites_right)
752                  if (x_offset < m_window_sprites_left || x_offset > m_window_sprites_right)
753753                  {
754754//                          continue;
755755                  }
756756               }
757757            }
758            if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
758            if (x_offset >= 0 && x_offset < WSWAN_X_PIXELS)
759759            {
760               if (m_colors_16)
760               if (m_colors_16)
761761               {
762                  if (col)
762                  if (col)
763763                  {
764764                     if (m_color_mode)
765765                        m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
767767                        /* Hmmmm, what should we do here... Is this correct?? */
768768                        m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
769769                  }
770               }
771               else
770               }
771               else
772772               {
773                  if (col || !(tile_palette & 4))
773                  if (col || !(tile_palette & 4))
774774                  {
775775                     if (m_color_mode)
776776                        m_bitmap.pix16(m_current_line, x_offset) = m_pal[tile_palette][col];
r242066r242067
788788void wswan_video_device::refresh_scanline()
789789{
790790   setup_palettes();
791   
791
792792   rectangle rec(0, WSWAN_X_PIXELS, m_current_line, m_current_line);
793   if (m_lcd_control)
793   if (m_lcd_control)
794794   {
795795      /* Not sure if these background color checks and settings are correct */
796796      if (m_color_mode && m_colors_16)
r242066r242067
798798      else
799799         m_bitmap.fill(m_main_palette[m_bg_control & 0x07], rec);
800800   }
801   else
801   else
802802   {
803803      m_bitmap.fill(0, rec);
804804      return;
805805   }
806   
806
807807   // Draw background layer
808808   if (m_layer_bg_enable)
809809      draw_background();
810   
810
811811   // Draw sprites between background and foreground layers
812812   if (m_sprites_enable)
813813      handle_sprites(0);
814   
814
815815   // Draw foreground layer, taking window settings into account
816   if (m_layer_fg_enable)
816   if (m_layer_fg_enable)
817817   {
818      switch (m_window_fg_mode)
818      switch (m_window_fg_mode)
819819      {
820820         case 0: // FG inside & outside window area
821821            draw_foreground_0();
r242066r242067
835835            break;
836836      }
837837   }
838   
838
839839   // Draw sprites in front of foreground layer
840840   if (m_sprites_enable)
841841      handle_sprites(0x2000);
r242066r242067
881881         value = m_timer_vblank_count >> 8;
882882         break;
883883   }
884   
884
885885   return value;
886886}
887887
r242066r242067
900900      m_palette_port[offset & 0x1f] = data;
901901      return;
902902   }
903     
903
904904   switch (offset)
905905   {
906906      case 0x00:  // Display control
r242066r242067
11401140{
11411141   if (m_current_line < 144)
11421142      refresh_scanline();
1143   
1143
11441144   // Decrement 12kHz (HBlank) counter
11451145   if (m_timer_hblank_enable && m_timer_hblank_reload != 0)
11461146   {
r242066r242067
11521152            m_timer_hblank_count = m_timer_hblank_reload;
11531153         else
11541154            m_timer_hblank_reload = 0;
1155         
1155
11561156         logerror( "trigerring hbltmr interrupt\n" );
11571157         m_set_irq_cb(WSWAN_VIDEO_IFLAG_HBLTMR);
11581158      }
11591159   }
1160   
1160
11611161   // Handle Sound DMA
11621162   m_snd_dma_cb();
1163   
1163
11641164//  m_current_line = (m_current_line + 1) % 159;
1165   
1165
11661166   if (m_current_line == 144) // buffer sprite table
11671167   {
11681168      memcpy(m_sprite_table_buffer, &m_vram[m_sprite_table_address], 512);
11691169      m_sprite_first = m_sprite_first_latch; // always zero?
11701170      m_sprite_count = m_sprite_count_latch;
11711171   }
1172   
1172
11731173   if (m_current_line == 144)
11741174   {
11751175      m_set_irq_cb(WSWAN_VIDEO_IFLAG_VBL);
r242066r242067
11841184               m_timer_vblank_count = m_timer_vblank_reload;
11851185            else
11861186               m_timer_vblank_reload = 0;
1187           
1187
11881188            logerror("triggering vbltmr interrupt\n");
11891189            m_set_irq_cb(WSWAN_VIDEO_IFLAG_VBLTMR);
11901190         }
11911191      }
11921192   }
1193   
1193
11941194//  m_current_line = (m_current_line + 1) % 159;
1195   
1195
11961196   if (m_current_line == m_line_compare)
11971197      m_set_irq_cb(WSWAN_VIDEO_IFLAG_LCMP);
1198   
1198
11991199   m_current_line = (m_current_line + 1) % 159;
12001200}
12011201
trunk/src/mess/video/wswan_video.h
r242066r242067
11/**********************************************************************
22
33 wswan.h
4
4
55 File to handle video emulation of the Bandai WonderSwan.
6
6
77 Anthony Kruize
88 Wilbert Pol
99
r242066r242067
7474   void refresh_scanline();
7575   void scanline_interrupt();
7676   void common_save();
77   
77
7878   bitmap_ind16 m_bitmap;
7979   UINT8 m_layer_bg_enable;          /* Background layer on/off */
8080   UINT8 m_layer_fg_enable;          /* Foreground layer on/off */
trunk/src/osd/modules/debugger/qt/debugqtdasmwindow.c
r242066r242067
3838
3939   // The main disasm window
4040   m_dasmView = new DebuggerView(DVT_DISASSEMBLY,
41                          m_machine,
42                          this);
41                           m_machine,
42                           this);
4343
4444   // Force a recompute of the disassembly region
4545   downcast<debug_view_disasm*>(m_dasmView->view())->set_expression("curpc");
r242066r242067
136136         // Find an existing breakpoint at this address
137137         INT32 bpindex = -1;
138138         for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
139             bp != NULL;
140             bp = bp->next())
139               bp != NULL;
140               bp = bp->next())
141141         {
142142            if (address == bp->address())
143143            {
trunk/src/osd/modules/debugger/qt/debugqtlogwindow.c
r242066r242067
2525
2626   // The main log view
2727   m_logView = new DebuggerView(DVT_LOG,
28                         m_machine,
29                         this);
28                           m_machine,
29                           this);
3030
3131   // Layout
3232   QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame);
trunk/src/osd/modules/debugger/qt/debugqtmainwindow.c
r242066r242067
2727
2828   // The log view
2929   m_consoleView = new DebuggerView(DVT_CONSOLE,
30                            m_machine,
31                            mainWindowFrame);
30                              m_machine,
31                              mainWindowFrame);
3232   m_consoleView->setFocusPolicy(Qt::NoFocus);
3333   m_consoleView->setPreferBottom(true);
3434
r242066r242067
211211         // Find an existing breakpoint at this address
212212         INT32 bpindex = -1;
213213         for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first();
214             bp != NULL;
215             bp = bp->next())
214               bp != NULL;
215               bp = bp->next())
216216         {
217217            if (address == bp->address())
218218            {
r242066r242067
287287
288288   // Send along the command
289289   debug_console_execute_command(*m_machine,
290                          command.toLocal8Bit().data(),
291                          true);
290                           command.toLocal8Bit().data(),
291                           true);
292292
293293   // Add history & set the index to be the top of the stack
294294   addToHistory(command);
trunk/src/osd/modules/debugger/qt/debugqtmainwindow.h
r242066r242067
7878      m_machine(machine)
7979   {
8080      m_dasmView = new DebuggerView(DVT_DISASSEMBLY,
81                             m_machine,
82                             this);
81                              m_machine,
82                              this);
8383
8484      // Force a recompute of the disassembly region
8585      downcast<debug_view_disasm*>(m_dasmView->view())->set_expression("curpc");
r242066r242067
130130      m_machine(machine)
131131   {
132132      m_processorView = new DebuggerView(DVT_STATE,
133                                 m_machine,
134                                 this);
133                                 m_machine,
134                                 this);
135135      m_processorView->setFocusPolicy(Qt::NoFocus);
136136
137137      QVBoxLayout* cvLayout = new QVBoxLayout(this);
trunk/src/osd/modules/debugger/qt/debugqtmemorywindow.c
r242066r242067
234234
235235   m_memoryComboBox->clear();
236236   for (const debug_view_source* source = m_memTable->view()->first_source();
237       source != NULL;
238       source = source->next())
237         source != NULL;
238         source = source->next())
239239   {
240240      m_memoryComboBox->addItem(source->name());
241241   }
r242066r242067
300300         address_space* addressSpace = source->space();
301301         const int nativeDataWidth = addressSpace->data_width() / 8;
302302         const UINT64 memValue = debug_read_memory(*addressSpace,
303                                         addressSpace->address_to_byte(address),
304                                         nativeDataWidth,
305                                         true);
303                                          addressSpace->address_to_byte(address),
304                                          nativeDataWidth,
305                                          true);
306306         const offs_t pc = source->device()->debug()->track_mem_pc_from_space_address_data(addressSpace->spacenum(),
307                                                                       address,
308                                                                       memValue);
307                                                                        address,
308                                                                        memValue);
309309         if (pc != (offs_t)(-1))
310310         {
311311            // TODO: You can specify a box that the tooltip stays alive within - might be good?
trunk/src/osd/modules/debugger/qt/debugqtview.c
r242066r242067
33#include "debugqtview.h"
44
55DebuggerView::DebuggerView(const debug_view_type& type,
6                     running_machine* machine,
7                     QWidget* parent) :
6                     running_machine* machine,
7                     QWidget* parent) :
88   QAbstractScrollArea(parent),
99   m_preferBottom(false),
1010   m_view(NULL),
r242066r242067
122122            if(textAttr & DCA_DISABLED)
123123            {
124124               fgColor.setRgb((fgColor.red()   + bgColor.red())   >> 1,
125                           (fgColor.green() + bgColor.green()) >> 1,
126                           (fgColor.blue()  + bgColor.blue())  >> 1);
125                           (fgColor.green() + bgColor.green()) >> 1,
126                           (fgColor.blue()  + bgColor.blue())  >> 1);
127127            }
128128            if(textAttr & DCA_COMMENT)
129129            {
r242066r242067
141141         // There is a touchy interplay between font height, drawing difference, visible position, etc
142142         // Fonts don't get drawn "down and to the left" like boxes, so some wiggling is needed.
143143         painter.drawText(x*fontWidth,
144                      (y*fontHeight + (fontHeight*0.80)),
145                      QString(m_view->viewdata()[viewDataOffset].byte));
144                        (y*fontHeight + (fontHeight*0.80)),
145                        QString(m_view->viewdata()[viewDataOffset].byte));
146146         viewDataOffset++;
147147      }
148148   }
r242066r242067
254254               break;
255255            text.append(QChar(viewdata[viewDataOffset + width].byte));
256256         }
257           
257
258258         // Your characters are not guaranteed to take up the entire length x fontWidth x fontHeight, so fill before.
259259         painter.fillRect(x*fontWidth, y*fontHeight, width*fontWidth, fontHeight, bgBrush);
260260
trunk/src/osd/modules/debugger/qt/debugqtview.h
r242066r242067
1212
1313public:
1414   DebuggerView(const debug_view_type& type,
15             running_machine* machine,
16             QWidget* parent=NULL);
15               running_machine* machine,
16               QWidget* parent=NULL);
1717   virtual ~DebuggerView();
1818
1919   void paintEvent(QPaintEvent* event);
trunk/src/osd/osdnet.c
r242066r242067
119119
120120   printf("Available network adapters:\n");
121121   const netdev_entry_t *entry = netdev_first();
122   while(entry) {   
123      printf("   %s\n", entry->description);
122   while(entry) {
123      printf("    %s\n", entry->description);
124124      entry = entry->m_next;
125125   }
126   
126
127127   #else
128128   printf("Network is not supported in this build\n");
129129   #endif
130130}
131
trunk/src/version.c
r242066r242067
99***************************************************************************/
1010
1111extern const char build_version[];
12const char build_version[] = "0.155 (" __DATE__")";
12const char build_version[] = "0.156 (" __DATE__")";


Previous 199869 Revisions Next


© 1997-2024 The MAME Team