Previous 199869 Revisions Next

r40040 Wednesday 29th July, 2015 at 06:34:21 UTC by Miodrag Milanović
Cleanups and version bump
[hash]a7800.xml cgenie_cass.xml gameking.xml gameking3.xml i7000_card.xml ibm5170_cdrom.xml msx2_flop.xml nes.xml pet_cass.xml pet_flop.xml pet_rom.xml svi318_flop.xml
[src]version.c
[src/emu]mconfig.h schedule.c screen.h
[src/emu/bus/c64]c128_partner.c c128_partner.h
[src/emu/bus/cbmiec]c1526.h vic1515.h vic1520.h
[src/emu/bus/cpc]ddi1.c
[src/emu/bus/msx_cart]ascii.c moonsound.c
[src/emu/cpu/hphybrid]hphybrid.c hphybrid.h
[src/emu/cpu/m68000]m68kcpu.c
[src/emu/cpu/rsp]rsp.c rspcp2.c rspcp2.h vadd.h vcl.h vmudh.h vmulh.h vrcpsq.h vrsq.h
[src/emu/cpu/sh2]sh2.c sh2.h sh2comn.c
[src/emu/cpu/sm510]sm510.c sm510.h sm510d.c sm510op.c sm511core.c
[src/emu/cpu/ucom4]ucom4.h ucom4op.c
[src/emu/machine]68230pit.c 68230pit.h atapihle.c nvram.c pci.c saturn.c smpc.c stvcd.c tms6100.c wd_fdc.h
[src/emu/netlist]nl_base.c nl_base.h nl_factory.c nl_setup.h
[src/emu/netlist/analog]nld_opamps.c
[src/emu/netlist/devices]net_lib.c nld_log.h nld_system.h
[src/emu/netlist/macro]nlm_cd4xxx.c nlm_opamp.c nlm_opamp.h nlm_other.c nlm_other.h nlm_ttl74xx.c nlm_ttl74xx.h
[src/emu/netlist/plib]palloc.h pconfig.h plists.h pstate.c
[src/emu/netlist/solver]mat_cr.h vector_base.h
[src/emu/netlist/tools]nl_convert.c
[src/emu/sound]c140.c discrete.c scsp.c tms36xx.c ymf278b.c
[src/emu/video]hd44780.h i82730.c i82730.h mb_vcu.c rgbsse.h vooddefs.h
[src/mame]arcade.lst mess.lst
[src/mame/audio]seibu.h
[src/mame/drivers]aerofgt.c aleisttl.c appoooh.c arkanoid.c atarisy1.c atarisy2.c bmcpokr.c chihiro.c coolridr.c cps2.c ddenlovr.c deadang.c deco32.c destroyr.c dreamwld.c dynax.c firebeat.c galaxian.c gladiatr.c gstriker.c itech8.c mazerbla.c mcr3.c midyunit.c mmagic.c model3.c namcona1.c naomi.c naughtyb.c nbmj9195.c nycaptor.c pcktgal.c photon2.c poolshrk.c rainbow.c sbowling.c segas32.c segaybd.c silvmil.c suna8.c system1.c system16.c taitoair.c thedealr.c tnzs.c ttchamp.c turbo.c vegas.c xyonix.c
[src/mame/includes]cclimber.h deco32.h itech8.h micro3d.h nbmj9195.h pcktgal.h taitoair.h
[src/mame/machine]awboard.c dc.c fd1089.c m1comm.c mc8123.h pgmcrypt.c s32comm.c s32comm.h segacrp2.c segacrp2.h
[src/mame/video]deco32.c hexion.c itech8.c namcona1.c naughtyb.c nbmj9195.c segas32.c shadfrce.c starcrus.c taitoair.c tank8.c vsystem_spr.c
[src/mess/drivers]apple2.c casloopy.c coleco.c daruma.c force68k.c hh_sm510.c hp64k.c i7000.c icatel.c rainbow.c rambo.c rc759.c sdk80.c smc777.c tb303.c xbox.c
[src/mess/layout]tb303.lay
[src/mess/machine]amstrad.c
[src/tools]nltool.c nlwav.c

trunk/hash/a7800.xml
r248551r248552
23702370   </software>
23712371
23722372   <!-- XM board enhanced -->
2373    <!-- from http://atariage.com/forums/topic/204250-donkey-kong-xm-pre-order-and-demo/ -->
2373   <!-- from http://atariage.com/forums/topic/204250-donkey-kong-xm-pre-order-and-demo/ -->
23742374
2375    <!-- these ones are listed as 'working in MESS' but are apparently the only images that work on real hardware too -->
2376    <software name="dkongxm">
2377      <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2)</description>
2378      <year>2012</year>
2379      <publisher>&lt;homebrew&gt;</publisher>
2380      <info name="programmer" value="TEP392" />
2381      <sharedfeat name="compatibility" value="PAL"/>
2382      <part name="cart" interface="a7800_cart">
2383        <feature name="slot" value="a78_sg9" />
2384        <dataarea name="rom" size="147456">
2385          <rom name="dkxm_demo_v12_pal.bin" size="147456" crc="9f6c0600" sha1="18409eace880dda3646792f9ec050a87a3b1b382" offset="0" />
2386        </dataarea>
2387      </part>
2388    </software>
2375   <!-- these ones are listed as 'working in MESS' but are apparently the only images that work on real hardware too -->
2376   <software name="dkongxm">
2377      <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2)</description>
2378      <year>2012</year>
2379      <publisher>&lt;homebrew&gt;</publisher>
2380      <info name="programmer" value="TEP392" />
2381      <sharedfeat name="compatibility" value="PAL"/>
2382      <part name="cart" interface="a7800_cart">
2383      <feature name="slot" value="a78_sg9" />
2384      <dataarea name="rom" size="147456">
2385         <rom name="dkxm_demo_v12_pal.bin" size="147456" crc="9f6c0600" sha1="18409eace880dda3646792f9ec050a87a3b1b382" offset="0" />
2386      </dataarea>
2387      </part>
2388   </software>
23892389
2390    <software name="dkongxmu" cloneof="dkongxm">
2391      <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2)</description>
2392      <year>2012</year>
2393      <publisher>&lt;homebrew&gt;</publisher>
2394      <info name="programmer" value="TEP392" />
2395      <sharedfeat name="compatibility" value="NTSC"/>
2396      <part name="cart" interface="a7800_cart">
2397        <feature name="slot" value="a78_sg9" />
2398        <dataarea name="rom" size="147456">
2399          <rom name="dkxm_demo_v12_ntsc.bin" size="147456" crc="8b06bb4b" sha1="3129cbc91dc8f223f00db5c3273a4a330320be99" offset="0" />
2400        </dataarea>
2401      </part>
2402    </software>
2390   <software name="dkongxmu" cloneof="dkongxm">
2391      <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2)</description>
2392      <year>2012</year>
2393      <publisher>&lt;homebrew&gt;</publisher>
2394      <info name="programmer" value="TEP392" />
2395      <sharedfeat name="compatibility" value="NTSC"/>
2396      <part name="cart" interface="a7800_cart">
2397      <feature name="slot" value="a78_sg9" />
2398      <dataarea name="rom" size="147456">
2399         <rom name="dkxm_demo_v12_ntsc.bin" size="147456" crc="8b06bb4b" sha1="3129cbc91dc8f223f00db5c3273a4a330320be99" offset="0" />
2400      </dataarea>
2401      </part>
2402   </software>
24032403
2404    <!-- these are listed as 'with HSC emulation' and are designed for the prosystem emulator, they simulate some of the HSC features -->
2405    <!-- remove them? -->
2406   
2407    <software name="dkongxmps"  cloneof="dkongxm" supported="no">
2408      <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2, for prosystem emulator)</description>
2409      <year>2012</year>
2410      <publisher>&lt;homebrew&gt;</publisher>
2411      <info name="programmer" value="TEP392" />
2412      <sharedfeat name="compatibility" value="PAL"/>
2413      <part name="cart" interface="a7800_cart">
2414        <feature name="slot" value="a78_sg9" />
2415        <dataarea name="rom" size="147456">
2416          <rom name="dkxm_final_demo_pal_hsc.bin" size="147456" crc="6510b674" sha1="65b723b470d287af51e9888813149c43fb11ac26" offset="0" />
2417        </dataarea>
2418      </part>
2419    </software>
2404   <!-- these are listed as 'with HSC emulation' and are designed for the prosystem emulator, they simulate some of the HSC features -->
2405   <!-- remove them? -->
24202406
2421    <software name="dkongxmups" cloneof="dkongxm" supported="no">
2422      <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2, for prosystem emulator)</description>
2423      <year>2012</year>
2424      <publisher>&lt;homebrew&gt;</publisher>
2425      <info name="programmer" value="TEP392" />
2426      <sharedfeat name="compatibility" value="NTSC"/>
2427      <part name="cart" interface="a7800_cart">
2428        <feature name="slot" value="a78_sg9" />
2429        <dataarea name="rom" size="147456">
2430          <rom name="dkxm_final_demo_ntsc_hsc.bin" size="147456" crc="2c67fea7" sha1="7825c1946e3c7492fa9bbfae33029cd68c0d1135" offset="0" />
2431        </dataarea>
2432      </part>
2433    </software>
2434   
2407   <software name="dkongxmps"  cloneof="dkongxm" supported="no">
2408      <description>Donkey Kong (PAL, Demo, XM enhanced, V1.2, for prosystem emulator)</description>
2409      <year>2012</year>
2410      <publisher>&lt;homebrew&gt;</publisher>
2411      <info name="programmer" value="TEP392" />
2412      <sharedfeat name="compatibility" value="PAL"/>
2413      <part name="cart" interface="a7800_cart">
2414      <feature name="slot" value="a78_sg9" />
2415      <dataarea name="rom" size="147456">
2416         <rom name="dkxm_final_demo_pal_hsc.bin" size="147456" crc="6510b674" sha1="65b723b470d287af51e9888813149c43fb11ac26" offset="0" />
2417      </dataarea>
2418      </part>
2419   </software>
24352420
2421   <software name="dkongxmups" cloneof="dkongxm" supported="no">
2422      <description>Donkey Kong (NTSC, Demo, XM enhanced, V1.2, for prosystem emulator)</description>
2423      <year>2012</year>
2424      <publisher>&lt;homebrew&gt;</publisher>
2425      <info name="programmer" value="TEP392" />
2426      <sharedfeat name="compatibility" value="NTSC"/>
2427      <part name="cart" interface="a7800_cart">
2428      <feature name="slot" value="a78_sg9" />
2429      <dataarea name="rom" size="147456">
2430         <rom name="dkxm_final_demo_ntsc_hsc.bin" size="147456" crc="2c67fea7" sha1="7825c1946e3c7492fa9bbfae33029cd68c0d1135" offset="0" />
2431      </dataarea>
2432      </part>
2433   </software>
24362434
2437    <!-- an older version? sound is broken, did it work on the real hardware? -->
2438    <software name="dkongxmo" cloneof="dkongxm" supported="no">
2439        <description>Donkey Kong (PAL, Demo, XM enhanced, older)</description>
2440        <year>2012</year>
2441        <publisher>&lt;homebrew&gt;</publisher>
2442        <info name="programmer" value="TEP392" />
2443        <sharedfeat name="compatibility" value="PAL"/>
2444        <part name="cart" interface="a7800_cart">
2445           <feature name="slot" value="a78_sg9" />
2446           <dataarea name="rom" size="147456">
2447              <rom name="dkxm_final_demo_pal.bin" size="147456" crc="d362712e" sha1="118c462d6698bd23c378785f80062fdd7d65ca00" offset="0" />
2448           </dataarea>
2449        </part>
2450     </software>
24512435
2452     <software name="dkongxmou" cloneof="dkongxm" supported="no" >
2453        <description>Donkey Kong (NTSC, Demo, XM enhanced, older)</description>
2454        <year>2012</year>
2455        <publisher>&lt;homebrew&gt;</publisher>
2456        <info name="programmer" value="TEP392" />
2457        <sharedfeat name="compatibility" value="NTSC"/>
2458        <part name="cart" interface="a7800_cart">
2459           <feature name="slot" value="a78_sg9" />
2460           <dataarea name="rom" size="147456">
2461              <rom name="dkxm_final_demo_ntsc.bin" size="147456" crc="6e170055" sha1="f4da231312da06ff9e8af5681b5013b14886b455" offset="0" />
2462           </dataarea>
2463        </part>
2464     </software>
2465   
2466    <!-- this one is meant to detect PAL / NTSC and runs on an A7800 CC2 development board, without sound? based off older code? -->
2467    <software name="dkongxmcc" cloneof="dkongxm" supported="no">
2468      <description>Donkey Kong (PAL/NTSC, Demo, XM enhanced, older, for CC2 board)</description>
2469      <year>2012</year>
2470      <publisher>&lt;homebrew&gt;</publisher>
2471      <info name="programmer" value="TEP392" />
2472      <part name="cart" interface="a7800_cart">
2473        <feature name="slot" value="a78_sg9" />
2474        <dataarea name="rom" size="147456">
2475          <rom name="dkxm_final_demo.bin" size="0x20000" crc="fd503bd4" sha1="454d754a0c4603323e476d9418f343a6a1a0d017" offset="0x4000" />
2476          <rom size="0x4000" offset="0x0000" loadflag="continue" />
2477        </dataarea>
2478      </part>
2479    </software>
2480 
2436
2437   <!-- an older version? sound is broken, did it work on the real hardware? -->
2438   <software name="dkongxmo" cloneof="dkongxm" supported="no">
2439         <description>Donkey Kong (PAL, Demo, XM enhanced, older)</description>
2440         <year>2012</year>
2441         <publisher>&lt;homebrew&gt;</publisher>
2442         <info name="programmer" value="TEP392" />
2443         <sharedfeat name="compatibility" value="PAL"/>
2444         <part name="cart" interface="a7800_cart">
2445            <feature name="slot" value="a78_sg9" />
2446            <dataarea name="rom" size="147456">
2447               <rom name="dkxm_final_demo_pal.bin" size="147456" crc="d362712e" sha1="118c462d6698bd23c378785f80062fdd7d65ca00" offset="0" />
2448            </dataarea>
2449         </part>
2450      </software>
2451
2452      <software name="dkongxmou" cloneof="dkongxm" supported="no" >
2453         <description>Donkey Kong (NTSC, Demo, XM enhanced, older)</description>
2454         <year>2012</year>
2455         <publisher>&lt;homebrew&gt;</publisher>
2456         <info name="programmer" value="TEP392" />
2457         <sharedfeat name="compatibility" value="NTSC"/>
2458         <part name="cart" interface="a7800_cart">
2459            <feature name="slot" value="a78_sg9" />
2460            <dataarea name="rom" size="147456">
2461               <rom name="dkxm_final_demo_ntsc.bin" size="147456" crc="6e170055" sha1="f4da231312da06ff9e8af5681b5013b14886b455" offset="0" />
2462            </dataarea>
2463         </part>
2464      </software>
2465
2466   <!-- this one is meant to detect PAL / NTSC and runs on an A7800 CC2 development board, without sound? based off older code? -->
2467   <software name="dkongxmcc" cloneof="dkongxm" supported="no">
2468      <description>Donkey Kong (PAL/NTSC, Demo, XM enhanced, older, for CC2 board)</description>
2469      <year>2012</year>
2470      <publisher>&lt;homebrew&gt;</publisher>
2471      <info name="programmer" value="TEP392" />
2472      <part name="cart" interface="a7800_cart">
2473      <feature name="slot" value="a78_sg9" />
2474      <dataarea name="rom" size="147456">
2475         <rom name="dkxm_final_demo.bin" size="0x20000" crc="fd503bd4" sha1="454d754a0c4603323e476d9418f343a6a1a0d017" offset="0x4000" />
2476         <rom size="0x4000" offset="0x0000" loadflag="continue" />
2477      </dataarea>
2478      </part>
2479   </software>
2480
24812481</softwarelist>
trunk/hash/cgenie_cass.xml
r248551r248552
8888   </software>
8989
9090   <!-- Missing: Break Out -->
91   <!-- Missing: Colour-Assembler -->   
91   <!-- Missing: Colour-Assembler -->
9292
9393   <software name="colcom" supported="yes">
9494      <description>Colour Basic Compiler 3.05</description>
trunk/hash/gameking.xml
r248551r248552
1717      </part>
1818   </software>
1919
20  <software name="4in1a" supported="no">
21    <description>4 in 1 Vol. 8</description>
22    <year>200?</year>
23    <publisher>TimeTop</publisher>
24    <part name="cart" interface="gameking_cart">
25      <dataarea name="rom" size="524288">
26        <rom name="4in1_vol8.bin" size="524288" crc="6741847e" sha1="b561ca1b52e3492f86e7558722c8c8956e845bc5" offset="0x00000" />
27      </dataarea>
28    </part>
29  </software>
20   <software name="4in1a" supported="no">
21   <description>4 in 1 Vol. 8</description>
22   <year>200?</year>
23   <publisher>TimeTop</publisher>
24   <part name="cart" interface="gameking_cart">
25      <dataarea name="rom" size="524288">
26      <rom name="4in1_vol8.bin" size="524288" crc="6741847e" sha1="b561ca1b52e3492f86e7558722c8c8956e845bc5" offset="0x00000" />
27      </dataarea>
28   </part>
29   </software>
3030
31  <software name="2004" supported="no">
31   <software name="2004" supported="no">
3232      <description>2004</description>
3333      <year>200?</year>
3434      <publisher>TimeTop</publisher>
r248551r248552
238238   </software>
239239
240240
241 
241
242242</softwarelist>
trunk/hash/gameking3.xml
r248551r248552
55
66<softwarelist name="gameking3" description="TimeTop GameKing 3 cartridges">
77
8  <software name="urgent" supported="no">
9    <description>Urgent Action</description>
10    <year>200?</year>
11    <publisher>TimeTop</publisher>
12    <part name="cart" interface="gameking_cart">
13      <dataarea name="rom" size="524288">
14        <rom name="urgenaction.gk3" size="524288" crc="dcf935f8" sha1="9c1375c622caab9e328ee66434087a18a16ea036" offset="0x00000" />
15      </dataarea>
16    </part>
17  </software>
8   <software name="urgent" supported="no">
9   <description>Urgent Action</description>
10   <year>200?</year>
11   <publisher>TimeTop</publisher>
12   <part name="cart" interface="gameking_cart">
13      <dataarea name="rom" size="524288">
14      <rom name="urgenaction.gk3" size="524288" crc="dcf935f8" sha1="9c1375c622caab9e328ee66434087a18a16ea036" offset="0x00000" />
15      </dataarea>
16   </part>
17   </software>
1818
19  <software name="adventr" supported="no">
20    <description>Adventure</description>
21    <year>200?</year>
22    <publisher>TimeTop</publisher>
23    <part name="cart" interface="gameking_cart">
24      <dataarea name="rom" size="524288">
25        <rom name="adventure.gk3" size="524288" crc="70082274" sha1="83b164719b2c2d5c133ca05c9fac0102b0d88e4c" offset="0x00000" />
26      </dataarea>
27    </part>
28  </software>
29 
19   <software name="adventr" supported="no">
20   <description>Adventure</description>
21   <year>200?</year>
22   <publisher>TimeTop</publisher>
23   <part name="cart" interface="gameking_cart">
24      <dataarea name="rom" size="524288">
25      <rom name="adventure.gk3" size="524288" crc="70082274" sha1="83b164719b2c2d5c133ca05c9fac0102b0d88e4c" offset="0x00000" />
26      </dataarea>
27   </part>
28   </software>
29
3030</softwarelist>
trunk/hash/i7000_card.xml
r248551r248552
6262      <part name="card" interface="i7000_card">
6363         <dataarea name="rom" size="0x6000">
6464            <rom name="i-7107_set_vt52_v1.0_r02_25_02_86_1.rom" size="0x2000" crc="ead3f48e" sha1="ec7951591cab8e8c2cb22f7e6352c709d24b9706" offset="0x0000" />
65                <!-- the 2nd EPROM connector is unpopulated -->
65            <!-- the 2nd EPROM connector is unpopulated -->
6666            <rom name="i-7107_set_vt52_v1.0_r02_25_02_86_2.rom" size="0x2000" crc="da848ec0" sha1="7ed1898de94c7382c081ec3a78f60a6850daa25a" offset="0x4000" />
67                <!-- the 4th EPROM connector is unpopulated -->
67            <!-- the 4th EPROM connector is unpopulated -->
6868         </dataarea>
6969      </part>
7070   </software>
trunk/hash/ibm5170_cdrom.xml
r248551r248552
9595      </part>
9696   </software>
9797
98  <!-- Untouched image from original CD created with an ASUS DRW-1814BLT (EAC drive sample read offset reported as +6)
99       If you subtract 0x18 (4 * 6) bytes from a .wav extracted from this CHD the audio matches a rip done with EAC (verified) -->
98   <!-- Untouched image from original CD created with an ASUS DRW-1814BLT (EAC drive sample read offset reported as +6)
99      If you subtract 0x18 (4 * 6) bytes from a .wav extracted from this CHD the audio matches a rip done with EAC (verified) -->
100100   <software name="kingsq6e">
101101      <description>King's Quest VI (Windows 3.1 enhanced)</description>
102102      <year>1993</year>
r248551r248552
109109      </part>
110110   </software>
111111
112   <!-- Untouched image from original CD created with an ASUS DRW-1814BLT (EAC drive sample read offset reported as +6)
113       If you subtract 0x18 (4 * 6) bytes from a .wav extracted from this CHD the audio matches a rip done with EAC (verified) -->
112   <!-- Untouched image from original CD created with an ASUS DRW-1814BLT (EAC drive sample read offset reported as +6)
113      If you subtract 0x18 (4 * 6) bytes from a .wav extracted from this CHD the audio matches a rip done with EAC (verified) -->
114114   <software name="krondor">
115115      <description>Betrayal at Krondor (1994 release, CDDA)</description>
116116      <year>1994</year>
r248551r248552
122122         </diskarea>
123123      </part>
124124   </software>
125 
125
126126   <software name="krondora" cloneof="krondor">
127127      <description>Betrayal at Krondor (1998 release, no CDDA)</description>
128128      <year>1998</year>
r248551r248552
135135      </part>
136136   </software>
137137
138  <!-- various Windows CDROMs
139       so far the listed discs should all be full english language retail discs, this can be expanded later -->
140     
138   <!-- various Windows CDROMs
139      so far the listed discs should all be full english language retail discs, this can be expanded later -->
140
141141   <software name="win95">
142142      <description>Windows 95 (en 4.00.950)</description>
143143      <year>1995</year>
r248551r248552
161161         </diskarea>
162162      </part>
163163   </software>
164 
164
165165   <software name="win95b">
166166      <description>Windows 95 OSR2 (en 4.00.1111.osr2)</description> <!-- aka Windows 95B -->
167167      <year>1995</year>
r248551r248552
172172            <disk name="win95_4.00.1111_osr2_en" sha1="e15bd9a4e2c930bd4913996a2d9d11d1567635f5" />
173173         </diskarea>
174174      </part>
175  </software>
176 
177    <software name="win95c">
175   </software>
176
177   <software name="win95c">
178178      <description>Windows 95 OSR2.5 (en 4.03.1216.osr2.5)</description> <!-- aka Windows 95C -->
179179      <year>1995</year>
180180      <publisher>Microsoft</publisher>
r248551r248552
184184            <disk name="win95_4.03.1216_osr2_5_en" sha1="b000931531cedcbb3f9a00d13d315406cf7c2d52" />
185185         </diskarea>
186186      </part>
187  </software>
188 
189    <software name="win98">
187   </software>
188
189   <software name="win98">
190190      <description>Windows 98 (en 4.10.1998) (Retail Full)</description> <!-- aka Windows 98 First Edition -->
191191      <year>1998</year>
192192      <publisher>Microsoft</publisher>
r248551r248552
198198      </part>
199199   </software>
200200
201    <software name="win98se">
201   <software name="win98se">
202202      <description>Windows 98 Second Edition (en 4.10.2222) (Retail Full)</description>
203203      <year>1998</year>
204204      <publisher>Microsoft</publisher>
r248551r248552
210210      </part>
211211   </software>
212212
213    <software name="winme">
213   <software name="winme">
214214      <description>Windows ME (en 4.90.3000) (Retail Full)</description> <!-- aka Millennium Edition -->
215215      <year>1999</year>
216216      <publisher>Microsoft</publisher>
r248551r248552
222222      </part>
223223   </software>
224224
225    <software name="win2kps4">
225   <software name="win2kps4">
226226      <description>Windows 2000 Professional (with Service Pack 4) (en 5.00.2195.6717)</description>
227227      <year>1999</year>
228228      <publisher>Microsoft</publisher>
trunk/hash/msx2_flop.xml
r248551r248552
1117511175      <description>The Tower? of Cabin - Cabin Panic (Jpn)</description>
1117611176      <year>1992</year>
1117711177      <publisher>Micro Cabin</publisher>
11178        <part name="flop1" interface="floppy_3_5">
11179            <dataarea name="flop" size="737280">
11180                <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 1 of 3).dsk" size="737280" crc="0471dbee" sha1="0e8d2b0177bd601e84c71735b4b498be2818085f" offset="0" />
11181            </dataarea>
11182        </part>
11183        <part name="flop2" interface="floppy_3_5">
11184            <dataarea name="flop" size="737280">
11185                <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 2 of 3).dsk" size="737280" crc="0d3afd17" sha1="d8cb95e558065b19f21f434a97a4a59b1892fc1a" offset="0" />
11186            </dataarea>
11187        </part>
11188        <part name="flop3" interface="floppy_3_5">
11189            <dataarea name="flop" size="737280">
11190                <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 3 of 3).dsk" size="737280" crc="9ad7d280" sha1="ed0e55d97817e9d98d563fdeb634cc6443564840" offset="0" />
11191            </dataarea>
11192        </part>
11178      <part name="flop1" interface="floppy_3_5">
11179         <dataarea name="flop" size="737280">
11180            <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 1 of 3).dsk" size="737280" crc="0471dbee" sha1="0e8d2b0177bd601e84c71735b4b498be2818085f" offset="0" />
11181         </dataarea>
11182      </part>
11183      <part name="flop2" interface="floppy_3_5">
11184         <dataarea name="flop" size="737280">
11185            <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 2 of 3).dsk" size="737280" crc="0d3afd17" sha1="d8cb95e558065b19f21f434a97a4a59b1892fc1a" offset="0" />
11186         </dataarea>
11187      </part>
11188      <part name="flop3" interface="floppy_3_5">
11189         <dataarea name="flop" size="737280">
11190            <rom name="tower of cabin, the (1992)(micro cabin)(jp)(disk 3 of 3).dsk" size="737280" crc="9ad7d280" sha1="ed0e55d97817e9d98d563fdeb634cc6443564840" offset="0" />
11191         </dataarea>
11192      </part>
1119311193   </software>
1119411194
1119511195   <software name="towercaba" cloneof="towercab">
trunk/hash/nes.xml
r248551r248552
7987979879         </dataarea>
7988079880      </part>
7988179881   </software>
79882 
79883  <software name="mc_cb280" supported="no">
79884    <description>Coolboy RS-18 (280-in-1)</description>
79885    <year>19??</year>
79886    <publisher>&lt;unknown&gt;</publisher>
79887    <part name="cart" interface="nes_cart">
79888      <!--<feature name="slot" value="coolboy" />
79889      <feature name="pcb" value="UNL-COOLBOY" /> -->
79890      <dataarea name="prg" size="4194304">
79891        <rom name="w25q32.u5" size="4194304" crc="c9541bdf" sha1="f0ce46f18658ca5dbed881e5a80460e59820bbd0" offset="00000" />
79892      </dataarea>
79893      <!-- ?? -->
79894      <dataarea name="vram" size="131072">
79895      </dataarea>
79896    </part>
79897  </software>
7989879882
79899  <software name="mc_samur" supported="no">
79900    <!-- a VT03 OneBus based system -->
79901    <description>Samurai (60-in-1)</description>
79902    <year>2006</year>
79903    <publisher>Team Hummer</publisher>
79904    <part name="cart" interface="nes_cart">
79905      <dataarea name="prg" size="2097152">
79906        <rom name="29lv160b.bin" size="2097152" crc="7dac8efe" sha1="ffb27ebb4299d5b9a4b976c418fcc7695200060c" offset="00000" />
79907      </dataarea>
79908      <!-- ?? -->
79909      <dataarea name="vram" size="131072">
79910      </dataarea>
79911    </part>
79912  </software>
79883   <software name="mc_cb280" supported="no">
79884   <description>Coolboy RS-18 (280-in-1)</description>
79885   <year>19??</year>
79886   <publisher>&lt;unknown&gt;</publisher>
79887   <part name="cart" interface="nes_cart">
79888      <!--<feature name="slot" value="coolboy" />
79889      <feature name="pcb" value="UNL-COOLBOY" /> -->
79890      <dataarea name="prg" size="4194304">
79891      <rom name="w25q32.u5" size="4194304" crc="c9541bdf" sha1="f0ce46f18658ca5dbed881e5a80460e59820bbd0" offset="00000" />
79892      </dataarea>
79893      <!-- ?? -->
79894      <dataarea name="vram" size="131072">
79895      </dataarea>
79896   </part>
79897   </software>
7991379898
79914  <software name="mc_sg360" supported="no">
79899   <software name="mc_samur" supported="no">
79900   <!-- a VT03 OneBus based system -->
79901   <description>Samurai (60-in-1)</description>
79902   <year>2006</year>
79903   <publisher>Team Hummer</publisher>
79904   <part name="cart" interface="nes_cart">
79905      <dataarea name="prg" size="2097152">
79906      <rom name="29lv160b.bin" size="2097152" crc="7dac8efe" sha1="ffb27ebb4299d5b9a4b976c418fcc7695200060c" offset="00000" />
79907      </dataarea>
79908      <!-- ?? -->
79909      <dataarea name="vram" size="131072">
79910      </dataarea>
79911   </part>
79912   </software>
79913
79914   <software name="mc_sg360" supported="no">
7991579915      <description>Super Game 360-in-1</description>
7991679916      <year>19??</year>
7991779917      <publisher>&lt;unknown&gt;</publisher>
trunk/hash/pet_cass.xml
r248551r248552
26352635   <software name="ppdm2">
26362636      <description>The Pet Professor Whole Numbers Fractions Decimals D-M-2</description>
26372637      <year>1979</year>
2638 
2638
26392639      <!-- pet2001n16 Side A: DEC.MULT.2-PP -->
26402640      <publisher>Cow Bay Computing</publisher>
26412641      <part name="cass" interface="cbm_cass">
r248551r248552
27002700   <software name="ppds2">
27012701      <description>The Pet Professor Whole Numbers Fractions Decimals D-S-2</description>
27022702      <year>1979</year>
2703 
2703
27042704      <!-- pet2001n16 Side A: DEC.SUB.2-PP -->
27052705      <publisher>Cow Bay Computing</publisher>
27062706      <part name="cass" interface="cbm_cass">
trunk/hash/pet_flop.xml
r248551r248552
168168      <!--
169169      VisiCalc(R)                                                 PET 2001, CBM 2001
170170      Program Diskette                                              and CBM 8032 32K
171                             [VisiCorp logo]                for 2040 and 4040
171                                    [VisiCorp logo]                for 2040 and 4040
172172      One of the VisiTM programs                                     Diskette Drives
173173      from VisiCorp                                           by Software Arts, Inc.
174174
175                              VisiCorpTM
176                           PERSONAL SOFTWARETM
175                                      VisiCorpTM
176                                  PERSONAL SOFTWARETM
177177
178178      Program Copyright (C) 1979, 1981
179179      Software Arts, Inc. All Rights Reserved
180                                                         20910-5511
180                                                                          20910-5511
181181      -->
182182      <part name="flop1" interface="floppy_5_25">
183183         <dataarea name="flop" size="174848">
r248551r248552
201201      <!--
202202      VisiCalc(R)                                                 PET 2001, CBM 2001
203203      Program Diskette                                         CBM 8032 and CBM 8096
204                             [VisiCorp logo]          for 8050 Diskette Drive
204                                    [VisiCorp logo]          for 8050 Diskette Drive
205205      One of the VisiTM programs                              by Software Arts, Inc.
206206      from VisiCorp
207207
208                              VisiCorpTM
209                           PERSONAL SOFTWARETM
208                                      VisiCorpTM
209                                  PERSONAL SOFTWARETM
210210
211211      Program Copyright (C) 1979, 1982
212212      Software Arts, Inc. All Rights Reserved
213                                                         20910-5612
213                                                                          20910-5612
214214      -->
215215      <part name="flop1" interface="floppy_5_25">
216216         <dataarea name="flop" size="533248">
r248551r248552
825825      <info name="serial" value="CP2-620-580" />
826826
827827      <!--
828              C P / M   ( R )       V e r s i o n   2 . 2
828                C P / M   ( R )       V e r s i o n   2 . 2
829829      ( C )   1 9 7 6 - 1 9 8 0   D i g i t a l   R e s e a r c h
830830      s e r i a l  #  C P 2 - 6 2 0 -   5 8 0   # #
831831      8050 format / 4040 on back   (C) 1982 Madison Computer
r248551r248552
849849      <year>2012</year>
850850      <publisher>Steve Gray</publisher>
851851      <!-- These disks contain some programs typed in from the HSG manual,
852          along with new programs that were written in 2012. -->
852          along with new programs that were written in 2012. -->
853853
854854      <part name="flop1" interface="floppy_5_25">
855855         <dataarea name="flop" size="174848">
trunk/hash/pet_rom.xml
r248551r248552
292292      <part name="rom" interface="pet_b000_rom">
293293      <!--
294294      TODO: The screen fills with garbage when run like this:
295         $ mame64 pet2001n32 toolkit2
295          $ mame64 pet2001n32 toolkit2
296296      and started with:
297         SYS 45056
297          SYS 45056
298298      We need to check this and should add notes with the emulator
299299      options required to run the various versions of Toolkit.
300300      -->
trunk/hash/svi318_flop.xml
r248551r248552
5454         <dataarea name="flop" size="172032">
5555            <rom name="cpmss.dsk" size="172032" crc="cb7f1edb" sha1="676b5752141acaba7f1056909ed75be53ff388ff" offset="0" />
5656         </dataarea>
57      </part>   
57      </part>
5858   </software>
5959
6060   <software name="cpm224ds">
r248551r248552
6565         <dataarea name="flop" size="346112">
6666            <rom name="cpmds.dsk" size="346112" crc="f7323e1a" sha1="7bfd8c46f8361cb31e9f4f640448cddaad91c55b" offset="0" />
6767         </dataarea>
68      </part>   
68      </part>
6969   </software>
7070
7171   <software name="diskbas">
r248551r248552
7676         <dataarea name="flop" size="346112">
7777            <rom name="diskbasic10.dsk" size="346112" crc="0744ac56" sha1="eef7d033263d1cc2703d019bf062b1a02b641570" offset="0" />
7878         </dataarea>
79      </part>   
79      </part>
8080   </software>
81   
81
8282   <software name="zcpr3">
8383      <description>Z-CPR3</description>
8484      <year>1985?</year>
r248551r248552
8787         <dataarea name="flop" size="172032">
8888            <rom name="zcpr3.dsk" size="172032" crc="a6ea5b81" sha1="c08a6743e713fe8f3b8b694cd92fc70680fc6f66" offset="0" />
8989         </dataarea>
90      </part>   
90      </part>
9191   </software>
9292
9393</softwarelist>
trunk/src/emu/bus/c64/c128_partner.c
r248551r248552
1111    PCB Layout
1212    ----------
1313
14   |---------------|
15   |LS74  SW     CN|
16   |LS09      LS273|
17   |LS139   RAM    |
18   |LS133          |
19   |     LS240     |
20   |LS33    ROM    |
21   |LS09           |
22    |||||||||||||||
14    |---------------|
15    |LS74  SW     CN|
16    |LS09      LS273|
17    |LS139   RAM    |
18    |LS133          |
19    |     LS240     |
20    |LS33    ROM    |
21    |LS09           |
22     |||||||||||||||
2323
2424    ROM     - Toshiba TMM24128AP 16Kx8 EPROM (blank label)
2525    RAM     - Sony CXK5864PN-15L 8Kx8 SRAM
trunk/src/emu/bus/c64/c128_partner.h
r248551r248552
2424// ======================> partner128_t
2525
2626class partner128_t : public device_t,
27                public device_c64_expansion_card_interface,
28                public device_vcs_control_port_interface
27                  public device_c64_expansion_card_interface,
28                  public device_vcs_control_port_interface
2929{
3030public:
3131   // construction/destruction
trunk/src/emu/bus/cbmiec/c1526.h
r248551r248552
4040// ======================> c1526_t
4141
4242class c1526_t :  public c1526_base_t,
43            public device_cbm_iec_interface
43               public device_cbm_iec_interface
4444{
4545public:
4646   // construction/destruction
r248551r248552
6262// ======================> c4023_t
6363
6464class c4023_t :  public c1526_base_t,
65            public device_ieee488_interface
65               public device_ieee488_interface
6666{
6767public:
6868   // construction/destruction
trunk/src/emu/bus/cbmiec/vic1515.h
r248551r248552
2424// ======================> vic1515_t
2525
2626class vic1515_t :  public device_t,
27               public device_cbm_iec_interface
27               public device_cbm_iec_interface
2828{
2929public:
3030   // construction/destruction
trunk/src/emu/bus/cbmiec/vic1520.h
r248551r248552
2424// ======================> vic1520_t
2525
2626class vic1520_t :  public device_t,
27               public device_cbm_iec_interface
27               public device_cbm_iec_interface
2828{
2929public:
3030   // construction/destruction
trunk/src/emu/bus/cpc/ddi1.c
r248551r248552
125125READ8_MEMBER(cpc_ddi1_device::fdc_r)
126126{
127127   UINT8 data = 0xff;
128   
128
129129   switch(offset)
130130   {
131131   case 0x00:
r248551r248552
137137   }
138138   return data;
139139}
140
trunk/src/emu/bus/msx_cart/ascii.c
r248551r248552
533533         break;
534534   }
535535}
536
trunk/src/emu/bus/msx_cart/moonsound.c
r248551r248552
4141   MCFG_YMF278B_IRQ_HANDLER(WRITELINE(msx_cart_moonsound,irq_w))
4242   MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
4343   MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
44    MCFG_SOUND_ROUTE(2, "lspeaker", 0.40)
45    MCFG_SOUND_ROUTE(3, "rspeaker", 0.40)
46    MCFG_SOUND_ROUTE(4, "lspeaker", 0.40)
47    MCFG_SOUND_ROUTE(5, "rspeaker", 0.40)
44   MCFG_SOUND_ROUTE(2, "lspeaker", 0.40)
45   MCFG_SOUND_ROUTE(3, "rspeaker", 0.40)
46   MCFG_SOUND_ROUTE(4, "lspeaker", 0.40)
47   MCFG_SOUND_ROUTE(5, "rspeaker", 0.40)
4848MACHINE_CONFIG_END
4949
5050
r248551r248552
124124   LOG(("moonsound: read 0xc0\n"));
125125   return 0x00;
126126}
127
trunk/src/emu/cpu/hphybrid/hphybrid.c
r248551r248552
66#include "hphybrid.h"
77
88enum {
9                HPHYBRID_A,
10                HPHYBRID_B,
11                HPHYBRID_C,
12                HPHYBRID_D,
13                HPHYBRID_P,
14                HPHYBRID_R,
15                HPHYBRID_IV,
16                HPHYBRID_PA,
17                HPHYBRID_DMAPA,
18                HPHYBRID_DMAMA,
19                HPHYBRID_DMAC,
20                HPHYBRID_I
9            HPHYBRID_A,
10            HPHYBRID_B,
11            HPHYBRID_C,
12            HPHYBRID_D,
13            HPHYBRID_P,
14            HPHYBRID_R,
15            HPHYBRID_IV,
16            HPHYBRID_PA,
17            HPHYBRID_DMAPA,
18            HPHYBRID_DMAMA,
19            HPHYBRID_DMAC,
20            HPHYBRID_I
2121};
2222
2323#define BIT_MASK(n) (1U << (n))
r248551r248552
5151
5252WRITE_LINE_MEMBER(hp_hybrid_cpu_device::dmar_w)
5353{
54                if (state) {
55                                BIT_SET(m_flags , HPHYBRID_DMAR_BIT);
56                } else {
57                                BIT_CLR(m_flags , HPHYBRID_DMAR_BIT);
58                }
54            if (state) {
55                        BIT_SET(m_flags , HPHYBRID_DMAR_BIT);
56            } else {
57                        BIT_CLR(m_flags , HPHYBRID_DMAR_BIT);
58            }
5959}
6060
6161hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
6262: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
63                m_program_config("program", ENDIANNESS_BIG, 16, 16, -1),
64                m_io_config("io", ENDIANNESS_BIG, 16, 6, -1)
63            m_program_config("program", ENDIANNESS_BIG, 16, 16, -1),
64            m_io_config("io", ENDIANNESS_BIG, 16, 6, -1)
6565{
6666}
6767
6868void hp_hybrid_cpu_device::device_start()
6969{
70                m_reg_A = 0;
71                m_reg_B = 0;
72                m_reg_P = HP_RESET_ADDR;
73                m_reg_R = 0;
74                m_reg_C = 0;
75                m_reg_D = 0;
76                m_reg_IV = 0;
77                m_reg_PA[ 0 ] = 0;
78                m_reg_PA[ 1 ] = 0;
79                m_reg_PA[ 2 ] = 0;
80                m_flags = 0;
81                m_dmapa = 0;
82                m_dmama = 0;
83                m_dmac = 0;
84                m_reg_I = 0;
70            m_reg_A = 0;
71            m_reg_B = 0;
72            m_reg_P = HP_RESET_ADDR;
73            m_reg_R = 0;
74            m_reg_C = 0;
75            m_reg_D = 0;
76            m_reg_IV = 0;
77            m_reg_PA[ 0 ] = 0;
78            m_reg_PA[ 1 ] = 0;
79            m_reg_PA[ 2 ] = 0;
80            m_flags = 0;
81            m_dmapa = 0;
82            m_dmama = 0;
83            m_dmac = 0;
84            m_reg_I = 0;
8585
86                {
87                                state_add(HPHYBRID_A,  "A", m_reg_A);
88                                state_add(HPHYBRID_B,  "B", m_reg_B);
89                                state_add(HPHYBRID_C,  "C", m_reg_C);
90                                state_add(HPHYBRID_D,  "D", m_reg_D);
91                                state_add(HPHYBRID_P,  "P", m_reg_P);
92                                state_add(STATE_GENPC, "GENPC", m_reg_P).noshow();
93                                state_add(HPHYBRID_R,  "R", m_reg_R);
94                                state_add(STATE_GENSP, "GENSP", m_reg_R).noshow();
95                                state_add(HPHYBRID_IV, "IV", m_reg_IV);
96                                state_add(HPHYBRID_PA, "PA", m_reg_PA[ 0 ]);
97                                state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).noshow().formatstr("%9s");
98                                state_add(HPHYBRID_DMAPA , "DMAPA" , m_dmapa).noshow();
99                                state_add(HPHYBRID_DMAMA , "DMAMA" , m_dmama).noshow();
100                                state_add(HPHYBRID_DMAC , "DMAC" , m_dmac).noshow();
101                                state_add(HPHYBRID_I , "I" , m_reg_I).noshow();
102                }
86            {
87                        state_add(HPHYBRID_A,  "A", m_reg_A);
88                        state_add(HPHYBRID_B,  "B", m_reg_B);
89                        state_add(HPHYBRID_C,  "C", m_reg_C);
90                        state_add(HPHYBRID_D,  "D", m_reg_D);
91                        state_add(HPHYBRID_P,  "P", m_reg_P);
92                        state_add(STATE_GENPC, "GENPC", m_reg_P).noshow();
93                        state_add(HPHYBRID_R,  "R", m_reg_R);
94                        state_add(STATE_GENSP, "GENSP", m_reg_R).noshow();
95                        state_add(HPHYBRID_IV, "IV", m_reg_IV);
96                        state_add(HPHYBRID_PA, "PA", m_reg_PA[ 0 ]);
97                        state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).noshow().formatstr("%9s");
98                        state_add(HPHYBRID_DMAPA , "DMAPA" , m_dmapa).noshow();
99                        state_add(HPHYBRID_DMAMA , "DMAMA" , m_dmama).noshow();
100                        state_add(HPHYBRID_DMAC , "DMAC" , m_dmac).noshow();
101                        state_add(HPHYBRID_I , "I" , m_reg_I).noshow();
102            }
103103
104                m_program = &space(AS_PROGRAM);
105                m_direct = &m_program->direct();
106                m_io = &space(AS_IO);
104            m_program = &space(AS_PROGRAM);
105            m_direct = &m_program->direct();
106            m_io = &space(AS_IO);
107107
108                save_item(NAME(m_reg_A));
109                save_item(NAME(m_reg_B));
110                save_item(NAME(m_reg_C));
111                save_item(NAME(m_reg_D));
112                save_item(NAME(m_reg_P));
113                save_item(NAME(m_reg_R));
114                save_item(NAME(m_reg_IV));
115                save_item(NAME(m_reg_PA[0]));
116                save_item(NAME(m_reg_PA[1]));
117                save_item(NAME(m_reg_PA[2]));
118                save_item(NAME(m_flags));
119                save_item(NAME(m_dmapa));
120                save_item(NAME(m_dmama));
121                save_item(NAME(m_dmac));
122                save_item(NAME(m_reg_I));
108            save_item(NAME(m_reg_A));
109            save_item(NAME(m_reg_B));
110            save_item(NAME(m_reg_C));
111            save_item(NAME(m_reg_D));
112            save_item(NAME(m_reg_P));
113            save_item(NAME(m_reg_R));
114            save_item(NAME(m_reg_IV));
115            save_item(NAME(m_reg_PA[0]));
116            save_item(NAME(m_reg_PA[1]));
117            save_item(NAME(m_reg_PA[2]));
118            save_item(NAME(m_flags));
119            save_item(NAME(m_dmapa));
120            save_item(NAME(m_dmama));
121            save_item(NAME(m_dmac));
122            save_item(NAME(m_reg_I));
123123
124                m_icountptr = &m_icount;
124            m_icountptr = &m_icount;
125125}
126126
127127void hp_hybrid_cpu_device::device_reset()
128128{
129                m_reg_P = HP_RESET_ADDR;
130                m_reg_I = RM(m_reg_P);
131                m_flags = 0;
129            m_reg_P = HP_RESET_ADDR;
130            m_reg_I = RM(m_reg_P);
131            m_flags = 0;
132132}
133133
134134void hp_hybrid_cpu_device::execute_run()
135135{
136                do {
137                                if (BIT(m_flags , HPHYBRID_DMAEN_BIT) && BIT(m_flags , HPHYBRID_DMAR_BIT)) {
138                                                handle_dma();
139                                } else {
140                                                debugger_instruction_hook(this, m_reg_P);
136            do {
137                        if (BIT(m_flags , HPHYBRID_DMAEN_BIT) && BIT(m_flags , HPHYBRID_DMAR_BIT)) {
138                                    handle_dma();
139                        } else {
140                                    debugger_instruction_hook(this, m_reg_P);
141141
142                                                // Check for interrupts
143                                                check_for_interrupts();
142                                    // Check for interrupts
143                                    check_for_interrupts();
144144
145                                                m_reg_I = execute_one(m_reg_I);
146                                }
147                } while (m_icount > 0);
145                                    m_reg_I = execute_one(m_reg_I);
146                        }
147            } while (m_icount > 0);
148148}
149149
150150void hp_hybrid_cpu_device::execute_set_input(int inputnum, int state)
151151{
152                if (inputnum < HPHYBRID_INT_LVLS) {
153                                if (state) {
154                                                BIT_SET(m_flags , HPHYBRID_IRH_BIT + inputnum);
155                                } else {
156                                                BIT_CLR(m_flags , HPHYBRID_IRH_BIT + inputnum);
157                                }
158                }
152            if (inputnum < HPHYBRID_INT_LVLS) {
153                        if (state) {
154                                    BIT_SET(m_flags , HPHYBRID_IRH_BIT + inputnum);
155                        } else {
156                                    BIT_CLR(m_flags , HPHYBRID_IRH_BIT + inputnum);
157                        }
158            }
159159}
160160
161161/**
r248551r248552
167167 */
168168UINT16 hp_hybrid_cpu_device::execute_one(UINT16 opcode)
169169{
170                if ((opcode & 0x7fe0) == 0x7000) {
171                                // EXE
172                                m_icount -= 8;
173                                return RM(opcode & 0x1f);
174                } else {
175                                m_reg_P = execute_one_sub(opcode);
176                                return RM(m_reg_P);
177                }
170            if ((opcode & 0x7fe0) == 0x7000) {
171                        // EXE
172                        m_icount -= 8;
173                        return RM(opcode & 0x1f);
174            } else {
175                        m_reg_P = execute_one_sub(opcode);
176                        return RM(m_reg_P);
177            }
178178}
179179
180180/**
r248551r248552
186186 */
187187UINT16 hp_hybrid_cpu_device::execute_one_sub(UINT16 opcode)
188188{
189                UINT16 ea;
190                UINT16 tmp;
189            UINT16 ea;
190            UINT16 tmp;
191191
192                switch (opcode & 0x7800) {
193                case 0x0000:
194                                // LDA
195                                m_icount -= 13;
196                                m_reg_A = RM(get_ea(opcode));
197                                break;
192            switch (opcode & 0x7800) {
193            case 0x0000:
194                        // LDA
195                        m_icount -= 13;
196                        m_reg_A = RM(get_ea(opcode));
197                        break;
198198
199                case 0x0800:
200                                // LDB
201                                m_icount -= 13;
202                                m_reg_B = RM(get_ea(opcode));
203                                break;
199            case 0x0800:
200                        // LDB
201                        m_icount -= 13;
202                        m_reg_B = RM(get_ea(opcode));
203                        break;
204204
205                case 0x1000:
206                                // CPA
207                                m_icount -= 16;
208                                if (m_reg_A != RM(get_ea(opcode))) {
209                                                // Skip next instruction
210                                                return m_reg_P + 2;
211                                }
212                                break;
205            case 0x1000:
206                        // CPA
207                        m_icount -= 16;
208                        if (m_reg_A != RM(get_ea(opcode))) {
209                                    // Skip next instruction
210                                    return m_reg_P + 2;
211                        }
212                        break;
213213
214                case 0x1800:
215                                // CPB
216                                m_icount -= 16;
217                                if (m_reg_B != RM(get_ea(opcode))) {
218                                                // Skip next instruction
219                                                return m_reg_P + 2;
220                                }
221                                break;
214            case 0x1800:
215                        // CPB
216                        m_icount -= 16;
217                        if (m_reg_B != RM(get_ea(opcode))) {
218                                    // Skip next instruction
219                                    return m_reg_P + 2;
220                        }
221                        break;
222222
223                case 0x2000:
224                                // ADA
225                                m_icount -= 13;
226                                do_add(m_reg_A , RM(get_ea(opcode)));
227                                break;
223            case 0x2000:
224                        // ADA
225                        m_icount -= 13;
226                        do_add(m_reg_A , RM(get_ea(opcode)));
227                        break;
228228
229                case 0x2800:
230                                // ADB
231                                m_icount -= 13;
232                                do_add(m_reg_B , RM(get_ea(opcode)));
233                                break;
229            case 0x2800:
230                        // ADB
231                        m_icount -= 13;
232                        do_add(m_reg_B , RM(get_ea(opcode)));
233                        break;
234234
235                case 0x3000:
236                                // STA
237                                m_icount -= 13;
238                                WM(get_ea(opcode) , m_reg_A);
239                                break;
235            case 0x3000:
236                        // STA
237                        m_icount -= 13;
238                        WM(get_ea(opcode) , m_reg_A);
239                        break;
240240
241                case 0x3800:
242                                // STB
243                                m_icount -= 13;
244                                WM(get_ea(opcode) , m_reg_B);
245                                break;
241            case 0x3800:
242                        // STB
243                        m_icount -= 13;
244                        WM(get_ea(opcode) , m_reg_B);
245                        break;
246246
247                case 0x4000:
248                                // JSM
249                                m_icount -= 17;
250                                WM(++m_reg_R , m_reg_P);
251                                return get_ea(opcode);
247            case 0x4000:
248                        // JSM
249                        m_icount -= 17;
250                        WM(++m_reg_R , m_reg_P);
251                        return get_ea(opcode);
252252
253                case 0x4800:
254                                // ISZ
255                                m_icount -= 19;
256                                ea = get_ea(opcode);
257                                tmp = RM(ea) + 1;
258                                WM(ea , tmp);
259                                if (tmp == 0) {
260                                                // Skip next instruction
261                                                return m_reg_P + 2;
262                                }
263                                break;
253            case 0x4800:
254                        // ISZ
255                        m_icount -= 19;
256                        ea = get_ea(opcode);
257                        tmp = RM(ea) + 1;
258                        WM(ea , tmp);
259                        if (tmp == 0) {
260                                    // Skip next instruction
261                                    return m_reg_P + 2;
262                        }
263                        break;
264264
265                case 0x5000:
266                                // AND
267                                m_icount -= 13;
268                                m_reg_A &= RM(get_ea(opcode));
269                                break;
265            case 0x5000:
266                        // AND
267                        m_icount -= 13;
268                        m_reg_A &= RM(get_ea(opcode));
269                        break;
270270
271                case 0x5800:
272                                // DSZ
273                                m_icount -= 19;
274                                ea = get_ea(opcode);
275                                tmp = RM(ea) - 1;
276                                WM(ea , tmp);
277                                if (tmp == 0) {
278                                                // Skip next instruction
279                                                return m_reg_P + 2;
280                                }
281                                break;
271            case 0x5800:
272                        // DSZ
273                        m_icount -= 19;
274                        ea = get_ea(opcode);
275                        tmp = RM(ea) - 1;
276                        WM(ea , tmp);
277                        if (tmp == 0) {
278                                    // Skip next instruction
279                                    return m_reg_P + 2;
280                        }
281                        break;
282282
283                case 0x6000:
284                                // IOR
285                                m_icount -= 13;
286                                m_reg_A |= RM(get_ea(opcode));
287                                break;
283            case 0x6000:
284                        // IOR
285                        m_icount -= 13;
286                        m_reg_A |= RM(get_ea(opcode));
287                        break;
288288
289                case 0x6800:
290                                // JMP
291                                m_icount -= 8;
292                                return get_ea(opcode);
289            case 0x6800:
290                        // JMP
291                        m_icount -= 8;
292                        return get_ea(opcode);
293293
294                default:
295                                switch (opcode & 0xfec0) {
296                                case 0x7400:
297                                                // RZA
298                                                // SZA
299                                                m_icount -= 14;
300                                                return get_skip_addr(opcode , m_reg_A == 0);
294            default:
295                        switch (opcode & 0xfec0) {
296                        case 0x7400:
297                                    // RZA
298                                    // SZA
299                                    m_icount -= 14;
300                                    return get_skip_addr(opcode , m_reg_A == 0);
301301
302                                case 0x7440:
303                                                // RIA
304                                                // SIA
305                                                m_icount -= 14;
306                                                return get_skip_addr(opcode , m_reg_A++ == 0);
302                        case 0x7440:
303                                    // RIA
304                                    // SIA
305                                    m_icount -= 14;
306                                    return get_skip_addr(opcode , m_reg_A++ == 0);
307307
308                                case 0x7480:
309                                                // SFS
310                                                // SFC
311                                                m_icount -= 14;
312                                                // TODO: read flag bit
313                                                return get_skip_addr(opcode , true);
308                        case 0x7480:
309                                    // SFS
310                                    // SFC
311                                    m_icount -= 14;
312                                    // TODO: read flag bit
313                                    return get_skip_addr(opcode , true);
314314
315                                case 0x7C00:
316                                                // RZB
317                                                // SZB
318                                                m_icount -= 14;
319                                                return get_skip_addr(opcode , m_reg_B == 0);
315                        case 0x7C00:
316                                    // RZB
317                                    // SZB
318                                    m_icount -= 14;
319                                    return get_skip_addr(opcode , m_reg_B == 0);
320320
321                                case 0x7C40:
322                                                // RIB
323                                                // SIB
324                                                m_icount -= 14;
325                                                return get_skip_addr(opcode , m_reg_B++ == 0);
321                        case 0x7C40:
322                                    // RIB
323                                    // SIB
324                                    m_icount -= 14;
325                                    return get_skip_addr(opcode , m_reg_B++ == 0);
326326
327                                case 0x7c80:
328                                                // SSS
329                                                // SSC
330                                                m_icount -= 14;
331                                                // TODO: read status bit
332                                                return get_skip_addr(opcode , true);
327                        case 0x7c80:
328                                    // SSS
329                                    // SSC
330                                    m_icount -= 14;
331                                    // TODO: read status bit
332                                    return get_skip_addr(opcode , true);
333333
334                                case 0x7cc0:
335                                                // SHS
336                                                // SHC
337                                                m_icount -= 14;
338                                                return get_skip_addr(opcode , !BIT(m_flags , HPHYBRID_HALT_BIT));
334                        case 0x7cc0:
335                                    // SHS
336                                    // SHC
337                                    m_icount -= 14;
338                                    return get_skip_addr(opcode , !BIT(m_flags , HPHYBRID_HALT_BIT));
339339
340                                default:
341                                                switch (opcode & 0xfe00) {
342                                                case 0x7600:
343                                                                // SLA
344                                                                // RLA
345                                                                m_icount -= 14;
346                                                                return get_skip_addr_sc(opcode , m_reg_A , 0);
340                        default:
341                                    switch (opcode & 0xfe00) {
342                                    case 0x7600:
343                                                // SLA
344                                                // RLA
345                                                m_icount -= 14;
346                                                return get_skip_addr_sc(opcode , m_reg_A , 0);
347347
348                                                case 0x7e00:
349                                                                // SLB
350                                                                // RLB
351                                                                m_icount -= 14;
352                                                                return get_skip_addr_sc(opcode , m_reg_B , 0);
348                                    case 0x7e00:
349                                                // SLB
350                                                // RLB
351                                                m_icount -= 14;
352                                                return get_skip_addr_sc(opcode , m_reg_B , 0);
353353
354                                                case 0xf400:
355                                                                // SAP
356                                                                // SAM
357                                                                m_icount -= 14;
358                                                                return get_skip_addr_sc(opcode , m_reg_A , 15);
354                                    case 0xf400:
355                                                // SAP
356                                                // SAM
357                                                m_icount -= 14;
358                                                return get_skip_addr_sc(opcode , m_reg_A , 15);
359359
360                                                case 0xf600:
361                                                                // SOC
362                                                                // SOS
363                                                                m_icount -= 14;
364                                                                return get_skip_addr_sc(opcode , m_flags , HPHYBRID_O_BIT);
360                                    case 0xf600:
361                                                // SOC
362                                                // SOS
363                                                m_icount -= 14;
364                                                return get_skip_addr_sc(opcode , m_flags , HPHYBRID_O_BIT);
365365
366                                                case 0xfc00:
367                                                                // SBP
368                                                                // SBM
369                                                                m_icount -= 14;
370                                                                return get_skip_addr_sc(opcode , m_reg_B , 15);
366                                    case 0xfc00:
367                                                // SBP
368                                                // SBM
369                                                m_icount -= 14;
370                                                return get_skip_addr_sc(opcode , m_reg_B , 15);
371371
372                                                case 0xfe00:
373                                                                // SEC
374                                                                // SES
375                                                                m_icount -= 14;
376                                                                return get_skip_addr_sc(opcode , m_flags , HPHYBRID_C_BIT);
372                                    case 0xfe00:
373                                                // SEC
374                                                // SES
375                                                m_icount -= 14;
376                                                return get_skip_addr_sc(opcode , m_flags , HPHYBRID_C_BIT);
377377
378                                                default:
379                                                                switch (opcode & 0xfff0) {
380                                                                case 0xf100:
381                                                                                // AAR
382                                                                                tmp = (opcode & 0xf) + 1;
383                                                                                m_icount -= (9 + tmp);
384                                                                                // A shift by 16 positions is equivalent to a shift by 15
385                                                                                tmp = tmp > 15 ? 15 : tmp;
386                                                                                m_reg_A = ((m_reg_A ^ 0x8000) >> tmp) - (0x8000 >> tmp);
387                                                                                break;
378                                    default:
379                                                switch (opcode & 0xfff0) {
380                                                case 0xf100:
381                                                            // AAR
382                                                            tmp = (opcode & 0xf) + 1;
383                                                            m_icount -= (9 + tmp);
384                                                            // A shift by 16 positions is equivalent to a shift by 15
385                                                            tmp = tmp > 15 ? 15 : tmp;
386                                                            m_reg_A = ((m_reg_A ^ 0x8000) >> tmp) - (0x8000 >> tmp);
387                                                            break;
388388
389                                                                case 0xf900:
390                                                                                // ABR
391                                                                                tmp = (opcode & 0xf) + 1;
392                                                                                m_icount -= (9 + tmp);
393                                                                                tmp = tmp > 15 ? 15 : tmp;
394                                                                                m_reg_B = ((m_reg_B ^ 0x8000) >> tmp) - (0x8000 >> tmp);
395                                                                                break;
389                                                case 0xf900:
390                                                            // ABR
391                                                            tmp = (opcode & 0xf) + 1;
392                                                            m_icount -= (9 + tmp);
393                                                            tmp = tmp > 15 ? 15 : tmp;
394                                                            m_reg_B = ((m_reg_B ^ 0x8000) >> tmp) - (0x8000 >> tmp);
395                                                            break;
396396
397                                                                case 0xf140:
398                                                                                // SAR
399                                                                                tmp = (opcode & 0xf) + 1;
400                                                                                m_icount -= (9 + tmp);
401                                                                                m_reg_A >>= tmp;
402                                                                                break;
397                                                case 0xf140:
398                                                            // SAR
399                                                            tmp = (opcode & 0xf) + 1;
400                                                            m_icount -= (9 + tmp);
401                                                            m_reg_A >>= tmp;
402                                                            break;
403403
404                                                                case 0xf940:
405                                                                                // SBR
406                                                                                tmp = (opcode & 0xf) + 1;
407                                                                                m_icount -= (9 + tmp);
408                                                                                m_reg_B >>= tmp;
409                                                                                break;
404                                                case 0xf940:
405                                                            // SBR
406                                                            tmp = (opcode & 0xf) + 1;
407                                                            m_icount -= (9 + tmp);
408                                                            m_reg_B >>= tmp;
409                                                            break;
410410
411                                                                case 0xf180:
412                                                                                // SAL
413                                                                                tmp = (opcode & 0xf) + 1;
414                                                                                m_icount -= (9 + tmp);
415                                                                                m_reg_A <<= tmp;
416                                                                                break;
411                                                case 0xf180:
412                                                            // SAL
413                                                            tmp = (opcode & 0xf) + 1;
414                                                            m_icount -= (9 + tmp);
415                                                            m_reg_A <<= tmp;
416                                                            break;
417417
418                                                                case 0xf980:
419                                                                                // SBL
420                                                                                tmp = (opcode & 0xf) + 1;
421                                                                                m_icount -= (9 + tmp);
422                                                                                m_reg_B <<= tmp;
423                                                                                break;
418                                                case 0xf980:
419                                                            // SBL
420                                                            tmp = (opcode & 0xf) + 1;
421                                                            m_icount -= (9 + tmp);
422                                                            m_reg_B <<= tmp;
423                                                            break;
424424
425                                                                case 0xf1c0:
426                                                                                // RAR
427                                                                                tmp = (opcode & 0xf) + 1;
428                                                                                m_icount -= (9 + tmp);
429                                                                                m_reg_A = (m_reg_A >> tmp) | (m_reg_A << (16 - tmp));
430                                                                                break;
425                                                case 0xf1c0:
426                                                            // RAR
427                                                            tmp = (opcode & 0xf) + 1;
428                                                            m_icount -= (9 + tmp);
429                                                            m_reg_A = (m_reg_A >> tmp) | (m_reg_A << (16 - tmp));
430                                                            break;
431431
432                                                                case 0xf9c0:
433                                                                                // RBR
434                                                                                tmp = (opcode & 0xf) + 1;
435                                                                                m_icount -= (9 + tmp);
436                                                                                m_reg_B = (m_reg_B >> tmp) | (m_reg_B << (16 - tmp));
437                                                                                break;
432                                                case 0xf9c0:
433                                                            // RBR
434                                                            tmp = (opcode & 0xf) + 1;
435                                                            m_icount -= (9 + tmp);
436                                                            m_reg_B = (m_reg_B >> tmp) | (m_reg_B << (16 - tmp));
437                                                            break;
438438
439                                                                default:
440                                                                                if ((opcode & 0xf760) == 0x7160) {
441                                                                                                // Place/withdraw instructions
442                                                                                                m_icount -= 23;
443                                                                                                do_pw(opcode);
444                                                                                } else if ((opcode & 0xff80) == 0xf080) {
445                                                                                                // RET
446                                                                                                m_icount -= 16;
447                                                                                                if (BIT(opcode , 6)) {
448                                                                                                                // Pop PA stack
449                                                                                                                if (BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) {
450                                                                                                                                BIT_CLR(m_flags , HPHYBRID_IRH_SVC_BIT);
451                                                                                                                                memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
452                                                                                                                } else if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
453                                                                                                                                BIT_CLR(m_flags , HPHYBRID_IRL_SVC_BIT);
454                                                                                                                                memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
455                                                                                                                }
456                                                                                                }
457                                                                                                tmp = RM(m_reg_R--) + (opcode & 0x1f);
458                                                                                                return BIT(opcode , 5) ? tmp - 0x20 : tmp;
459                                                                                } else {
460                                                                                                switch (opcode) {
461                                                                                                case 0x7100:
462                                                                                                                // SDO
463                                                                                                                m_icount -= 12;
464                                                                                                                BIT_SET(m_flags , HPHYBRID_DMADIR_BIT);
465                                                                                                                break;
439                                                default:
440                                                            if ((opcode & 0xf760) == 0x7160) {
441                                                                        // Place/withdraw instructions
442                                                                        m_icount -= 23;
443                                                                        do_pw(opcode);
444                                                            } else if ((opcode & 0xff80) == 0xf080) {
445                                                                        // RET
446                                                                        m_icount -= 16;
447                                                                        if (BIT(opcode , 6)) {
448                                                                                    // Pop PA stack
449                                                                                    if (BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) {
450                                                                                                BIT_CLR(m_flags , HPHYBRID_IRH_SVC_BIT);
451                                                                                                memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
452                                                                                    } else if (BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
453                                                                                                BIT_CLR(m_flags , HPHYBRID_IRL_SVC_BIT);
454                                                                                                memmove(&m_reg_PA[ 0 ] , &m_reg_PA[ 1 ] , HPHYBRID_INT_LVLS);
455                                                                                    }
456                                                                        }
457                                                                        tmp = RM(m_reg_R--) + (opcode & 0x1f);
458                                                                        return BIT(opcode , 5) ? tmp - 0x20 : tmp;
459                                                            } else {
460                                                                        switch (opcode) {
461                                                                        case 0x7100:
462                                                                                    // SDO
463                                                                                    m_icount -= 12;
464                                                                                    BIT_SET(m_flags , HPHYBRID_DMADIR_BIT);
465                                                                                    break;
466466
467                                                                                                case 0x7108:
468                                                                                                                // SDI
469                                                                                                                m_icount -= 12;
470                                                                                                                BIT_CLR(m_flags , HPHYBRID_DMADIR_BIT);
471                                                                                                                break;
467                                                                        case 0x7108:
468                                                                                    // SDI
469                                                                                    m_icount -= 12;
470                                                                                    BIT_CLR(m_flags , HPHYBRID_DMADIR_BIT);
471                                                                                    break;
472472
473                                                                                                case 0x7110:
474                                                                                                                // EIR
475                                                                                                                m_icount -= 12;
476                                                                                                                BIT_SET(m_flags , HPHYBRID_INTEN_BIT);
477                                                                                                                break;
473                                                                        case 0x7110:
474                                                                                    // EIR
475                                                                                    m_icount -= 12;
476                                                                                    BIT_SET(m_flags , HPHYBRID_INTEN_BIT);
477                                                                                    break;
478478
479                                                                                                case 0x7118:
480                                                                                                                // DIR
481                                                                                                                m_icount -= 12;
482                                                                                                                BIT_CLR(m_flags , HPHYBRID_INTEN_BIT);
483                                                                                                                break;
479                                                                        case 0x7118:
480                                                                                    // DIR
481                                                                                    m_icount -= 12;
482                                                                                    BIT_CLR(m_flags , HPHYBRID_INTEN_BIT);
483                                                                                    break;
484484
485                                                                                                case 0x7120:
486                                                                                                                // DMA
487                                                                                                                m_icount -= 12;
488                                                                                                                BIT_SET(m_flags , HPHYBRID_DMAEN_BIT);
489                                                                                                                break;
485                                                                        case 0x7120:
486                                                                                    // DMA
487                                                                                    m_icount -= 12;
488                                                                                    BIT_SET(m_flags , HPHYBRID_DMAEN_BIT);
489                                                                                    break;
490490
491                                                                                                case 0x7138:
492                                                                                                                // DDR
493                                                                                                                m_icount -= 12;
494                                                                                                                BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT);
495                                                                                                                break;
491                                                                        case 0x7138:
492                                                                                    // DDR
493                                                                                    m_icount -= 12;
494                                                                                    BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT);
495                                                                                    break;
496496
497                                                                                                case 0x7140:
498                                                                                                                // DBL
499                                                                                                                m_icount -= 12;
500                                                                                                                BIT_CLR(m_flags , HPHYBRID_DB_BIT);
501                                                                                                                break;
497                                                                        case 0x7140:
498                                                                                    // DBL
499                                                                                    m_icount -= 12;
500                                                                                    BIT_CLR(m_flags , HPHYBRID_DB_BIT);
501                                                                                    break;
502502
503                                                                                                case 0x7148:
504                                                                                                                // CBL
505                                                                                                                m_icount -= 12;
506                                                                                                                BIT_CLR(m_flags , HPHYBRID_CB_BIT);
507                                                                                                                break;
503                                                                        case 0x7148:
504                                                                                    // CBL
505                                                                                    m_icount -= 12;
506                                                                                    BIT_CLR(m_flags , HPHYBRID_CB_BIT);
507                                                                                    break;
508508
509                                                                                                case 0x7150:
510                                                                                                                // DBU
511                                                                                                                m_icount -= 12;
512                                                                                                                BIT_SET(m_flags , HPHYBRID_DB_BIT);
513                                                                                                                break;
509                                                                        case 0x7150:
510                                                                                    // DBU
511                                                                                    m_icount -= 12;
512                                                                                    BIT_SET(m_flags , HPHYBRID_DB_BIT);
513                                                                                    break;
514514
515                                                                                                case 0x7158:
516                                                                                                                // CBU
517                                                                                                                m_icount -= 12;
518                                                                                                                BIT_SET(m_flags , HPHYBRID_CB_BIT);
519                                                                                                                break;
515                                                                        case 0x7158:
516                                                                                    // CBU
517                                                                                    m_icount -= 12;
518                                                                                    BIT_SET(m_flags , HPHYBRID_CB_BIT);
519                                                                                    break;
520520
521                                                                                                case 0xf020:
522                                                                                                                // TCA
523                                                                                                                m_icount -= 9;
524                                                                                                                m_reg_A = ~m_reg_A;
525                                                                                                                do_add(m_reg_A , 1);
526                                                                                                                break;
521                                                                        case 0xf020:
522                                                                                    // TCA
523                                                                                    m_icount -= 9;
524                                                                                    m_reg_A = ~m_reg_A;
525                                                                                    do_add(m_reg_A , 1);
526                                                                                    break;
527527
528                                                                                                case 0xf060:
529                                                                                                                // CMA
530                                                                                                                m_icount -= 9;
531                                                                                                                m_reg_A = ~m_reg_A;
532                                                                                                                break;
528                                                                        case 0xf060:
529                                                                                    // CMA
530                                                                                    m_icount -= 9;
531                                                                                    m_reg_A = ~m_reg_A;
532                                                                                    break;
533533
534                                                                                                case 0xf820:
535                                                                                                                // TCB
536                                                                                                                m_icount -= 9;
537                                                                                                                m_reg_B = ~m_reg_B;
538                                                                                                                do_add(m_reg_B , 1);
539                                                                                                                break;
534                                                                        case 0xf820:
535                                                                                    // TCB
536                                                                                    m_icount -= 9;
537                                                                                    m_reg_B = ~m_reg_B;
538                                                                                    do_add(m_reg_B , 1);
539                                                                                    break;
540540
541                                                                                                case 0xf860:
542                                                                                                                // CMB
543                                                                                                                m_icount -= 9;
544                                                                                                                m_reg_B = ~m_reg_B;
545                                                                                                                break;
541                                                                        case 0xf860:
542                                                                                    // CMB
543                                                                                    m_icount -= 9;
544                                                                                    m_reg_B = ~m_reg_B;
545                                                                                    break;
546546
547                                                                                                default:
548                                                                                                                // Unrecognized instructions: NOP
549                                                                                                                // Execution time is fictional
550                                                                                                                m_icount -= 6;
551                                                                                                }
552                                                                                }
553                                                                }
554                                                }
555                                }
556                }
547                                                                        default:
548                                                                                    // Unrecognized instructions: NOP
549                                                                                    // Execution time is fictional
550                                                                                    m_icount -= 6;
551                                                                        }
552                                                            }
553                                                }
554                                    }
555                        }
556            }
557557
558                return m_reg_P + 1;
558            return m_reg_P + 1;
559559}
560560
561561void hp_hybrid_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
562562{
563                if (entry.index() == STATE_GENFLAGS) {
564                                strprintf(str, "%s %s %c %c",
565                                                        BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..",
566                                                        BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..",
567                                                        BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.',
568                                                        BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.');
569                }
563            if (entry.index() == STATE_GENFLAGS) {
564                        strprintf(str, "%s %s %c %c",
565                                          BIT(m_flags , HPHYBRID_DB_BIT) ? "Db":"..",
566                                          BIT(m_flags , HPHYBRID_CB_BIT) ? "Cb":"..",
567                                          BIT(m_flags , HPHYBRID_O_BIT) ? 'O':'.',
568                                          BIT(m_flags , HPHYBRID_C_BIT) ? 'E':'.');
569            }
570570}
571571
572572offs_t hp_hybrid_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
573573{
574                extern CPU_DISASSEMBLE(hp_hybrid);
575                return CPU_DISASSEMBLE_NAME(hp_hybrid)(this, buffer, pc, oprom, opram, options);
574            extern CPU_DISASSEMBLE(hp_hybrid);
575            return CPU_DISASSEMBLE_NAME(hp_hybrid)(this, buffer, pc, oprom, opram, options);
576576}
577577
578578UINT16 hp_hybrid_cpu_device::get_ea(UINT16 opcode)
579579{
580                UINT16 base;
581                UINT16 off;
580            UINT16 base;
581            UINT16 off;
582582
583                if (BIT(opcode , 10)) {
584                                // Current page
585                                base = m_reg_P;
586                } else {
587                                // Base page
588                                base = 0;
589                }
583            if (BIT(opcode , 10)) {
584                        // Current page
585                        base = m_reg_P;
586            } else {
587                        // Base page
588                        base = 0;
589            }
590590
591                off = opcode & 0x3ff;
592                if (off & 0x200) {
593                                off -= 0x400;
594                }
591            off = opcode & 0x3ff;
592            if (off & 0x200) {
593                        off -= 0x400;
594            }
595595
596                base += off;
596            base += off;
597597
598                if (BIT(opcode , 15)) {
599                                // Indirect addressing
600                                m_icount -= 6;
601                                return RM(base);
602                } else {
603                                // Direct addressing
604                                return base;
605                }
598            if (BIT(opcode , 15)) {
599                        // Indirect addressing
600                        m_icount -= 6;
601                        return RM(base);
602            } else {
603                        // Direct addressing
604                        return base;
605            }
606606}
607607
608608void hp_hybrid_cpu_device::do_add(UINT16& addend1 , UINT16 addend2)
609609{
610                UINT32 tmp = addend1 + addend2;
610            UINT32 tmp = addend1 + addend2;
611611
612                if (BIT(tmp , 16)) {
613                                // Carry
614                                BIT_SET(m_flags , HPHYBRID_C_BIT);
615                }
612            if (BIT(tmp , 16)) {
613                        // Carry
614                        BIT_SET(m_flags , HPHYBRID_C_BIT);
615            }
616616
617                if (BIT((tmp ^ addend1) & (tmp ^ addend2) , 15)) {
618                                // Overflow
619                                BIT_SET(m_flags , HPHYBRID_O_BIT);
620                }
617            if (BIT((tmp ^ addend1) & (tmp ^ addend2) , 15)) {
618                        // Overflow
619                        BIT_SET(m_flags , HPHYBRID_O_BIT);
620            }
621621
622                addend1 = (UINT16)tmp;
622            addend1 = (UINT16)tmp;
623623}
624624
625625UINT16 hp_hybrid_cpu_device::get_skip_addr(UINT16 opcode , bool condition) const
626626{
627                bool skip_val = BIT(opcode , 8) != 0;
627            bool skip_val = BIT(opcode , 8) != 0;
628628
629                if (condition == skip_val) {
630                                UINT16 off = opcode & 0x1f;
629            if (condition == skip_val) {
630                        UINT16 off = opcode & 0x1f;
631631
632                                if (BIT(opcode , 5)) {
633                                                off -= 0x20;
634                                }
635                                return m_reg_P + off;
636                } else {
637                                return m_reg_P + 1;
638                }
632                        if (BIT(opcode , 5)) {
633                                    off -= 0x20;
634                        }
635                        return m_reg_P + off;
636            } else {
637                        return m_reg_P + 1;
638            }
639639}
640640
641641UINT16 hp_hybrid_cpu_device::get_skip_addr_sc(UINT16 opcode , UINT16& v , unsigned n)
642642{
643                bool val = BIT(v , n);
643            bool val = BIT(v , n);
644644
645                if (BIT(opcode , 7)) {
646                                if (BIT(opcode , 6)) {
647                                                BIT_SET(v , n);
648                                } else {
649                                                BIT_CLR(v , n);
650                                }
651                }
645            if (BIT(opcode , 7)) {
646                        if (BIT(opcode , 6)) {
647                                    BIT_SET(v , n);
648                        } else {
649                                    BIT_CLR(v , n);
650                        }
651            }
652652
653                return get_skip_addr(opcode , val);
653            return get_skip_addr(opcode , val);
654654}
655655
656656void hp_hybrid_cpu_device::do_pw(UINT16 opcode)
657657{
658                UINT16 tmp;
659                UINT16 reg_addr = opcode & 7;
660                UINT16 *ptr_reg;
661                UINT16 b_mask;
658            UINT16 tmp;
659            UINT16 reg_addr = opcode & 7;
660            UINT16 *ptr_reg;
661            UINT16 b_mask;
662662
663                if (BIT(opcode , 3)) {
664                                ptr_reg = &m_reg_D;
665                                b_mask = BIT_MASK(HPHYBRID_DB_BIT);
666                } else {
667                                ptr_reg = &m_reg_C;
668                                b_mask = BIT_MASK(HPHYBRID_CB_BIT);
669                }
663            if (BIT(opcode , 3)) {
664                        ptr_reg = &m_reg_D;
665                        b_mask = BIT_MASK(HPHYBRID_DB_BIT);
666            } else {
667                        ptr_reg = &m_reg_C;
668                        b_mask = BIT_MASK(HPHYBRID_CB_BIT);
669            }
670670
671                if (BIT(opcode , 4)) {
672                                // Withdraw
673                                if (BIT(opcode , 11)) {
674                                                // Byte
675                                                UINT32 tmp_addr = (UINT32)(*ptr_reg);
676                                                if (m_flags & b_mask) {
677                                                                tmp_addr |= 0x10000;
678                                                }
679                                                tmp = RM((UINT16)(tmp_addr >> 1));
680                                                if (BIT(tmp_addr , 0)) {
681                                                                tmp &= 0xff;
682                                                } else {
683                                                                tmp >>= 8;
684                                                }
685                                } else {
686                                                // Word
687                                                tmp = RM(*ptr_reg);
688                                }
689                                WM(reg_addr , tmp);
671            if (BIT(opcode , 4)) {
672                        // Withdraw
673                        if (BIT(opcode , 11)) {
674                                    // Byte
675                                    UINT32 tmp_addr = (UINT32)(*ptr_reg);
676                                    if (m_flags & b_mask) {
677                                                tmp_addr |= 0x10000;
678                                    }
679                                    tmp = RM((UINT16)(tmp_addr >> 1));
680                                    if (BIT(tmp_addr , 0)) {
681                                                tmp &= 0xff;
682                                    } else {
683                                                tmp >>= 8;
684                                    }
685                        } else {
686                                    // Word
687                                    tmp = RM(*ptr_reg);
688                        }
689                        WM(reg_addr , tmp);
690690
691                                if (BIT(opcode , 7)) {
692                                                // Post-decrement
693                                                if ((*ptr_reg)-- == 0) {
694                                                                m_flags ^= b_mask;
695                                                }
696                                } else {
697                                                // Post-increment
698                                                if (++(*ptr_reg) == 0) {
699                                                                m_flags ^= b_mask;
700                                                }
701                                }
702                } else {
703                                // Place
704                                if (BIT(opcode , 7)) {
705                                                // Pre-decrement
706                                                if ((*ptr_reg)-- == 0) {
707                                                                m_flags ^= b_mask;
708                                                }
709                                } else {
710                                                // Pre-increment
711                                                if (++(*ptr_reg) == 0) {
712                                                                m_flags ^= b_mask;
713                                                }
714                                }
715                                tmp = RM(reg_addr);
716                                if (BIT(opcode , 11)) {
717                                                // Byte
718                                                UINT32 tmp_addr = (UINT32)(*ptr_reg);
719                                                if (m_flags & b_mask) {
720                                                                tmp_addr |= 0x10000;
721                                                }
722                                                WMB(tmp_addr , (UINT8)tmp);
723                                } else {
724                                                // Word
725                                                WM(*ptr_reg , tmp);
726                                }
727                }
691                        if (BIT(opcode , 7)) {
692                                    // Post-decrement
693                                    if ((*ptr_reg)-- == 0) {
694                                                m_flags ^= b_mask;
695                                    }
696                        } else {
697                                    // Post-increment
698                                    if (++(*ptr_reg) == 0) {
699                                                m_flags ^= b_mask;
700                                    }
701                        }
702            } else {
703                        // Place
704                        if (BIT(opcode , 7)) {
705                                    // Pre-decrement
706                                    if ((*ptr_reg)-- == 0) {
707                                                m_flags ^= b_mask;
708                                    }
709                        } else {
710                                    // Pre-increment
711                                    if (++(*ptr_reg) == 0) {
712                                                m_flags ^= b_mask;
713                                    }
714                        }
715                        tmp = RM(reg_addr);
716                        if (BIT(opcode , 11)) {
717                                    // Byte
718                                    UINT32 tmp_addr = (UINT32)(*ptr_reg);
719                                    if (m_flags & b_mask) {
720                                                tmp_addr |= 0x10000;
721                                    }
722                                    WMB(tmp_addr , (UINT8)tmp);
723                        } else {
724                                    // Word
725                                    WM(*ptr_reg , tmp);
726                        }
727            }
728728}
729729
730730void hp_hybrid_cpu_device::check_for_interrupts(void)
731731{
732                if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) {
733                                return;
734                }
732            if (!BIT(m_flags , HPHYBRID_INTEN_BIT) || BIT(m_flags , HPHYBRID_IRH_SVC_BIT)) {
733                        return;
734            }
735735
736                int irqline;
736            int irqline;
737737
738                if (BIT(m_flags , HPHYBRID_IRH_BIT)) {
739                                // Service high-level interrupt
740                                BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT);
741                                irqline = HPHYBRID_IRH;
742                } else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
743                                // Service low-level interrupt
744                                BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT);
745                                irqline = HPHYBRID_IRL;
746                } else {
747                                return;
748                }
738            if (BIT(m_flags , HPHYBRID_IRH_BIT)) {
739                        // Service high-level interrupt
740                        BIT_SET(m_flags , HPHYBRID_IRH_SVC_BIT);
741                        irqline = HPHYBRID_IRH;
742            } else if (BIT(m_flags , HPHYBRID_IRL_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
743                        // Service low-level interrupt
744                        BIT_SET(m_flags , HPHYBRID_IRL_SVC_BIT);
745                        irqline = HPHYBRID_IRL;
746            } else {
747                        return;
748            }
749749
750                // Get interrupt vector in low byte
751                UINT8 vector = (UINT8)standard_irq_callback(irqline);
752                UINT8 new_PA;
750            // Get interrupt vector in low byte
751            UINT8 vector = (UINT8)standard_irq_callback(irqline);
752            UINT8 new_PA;
753753
754                // Get highest numbered 1
755                // Don't know what happens if vector is 0, here we assume bit 7 = 1
756                if (vector == 0) {
757                                new_PA = 7;
758                } else {
759                                for (new_PA = 7; new_PA && !BIT(vector , 7); new_PA--, vector <<= 1) {
760                                }
761                }
762                if (irqline == HPHYBRID_IRH) {
763                                BIT_SET(new_PA , 3);
764                }
754            // Get highest numbered 1
755            // Don't know what happens if vector is 0, here we assume bit 7 = 1
756            if (vector == 0) {
757                        new_PA = 7;
758            } else {
759                        for (new_PA = 7; new_PA && !BIT(vector , 7); new_PA--, vector <<= 1) {
760                        }
761            }
762            if (irqline == HPHYBRID_IRH) {
763                        BIT_SET(new_PA , 3);
764            }
765765
766                // Push PA stack
767                memmove(&m_reg_PA[ 1 ] , &m_reg_PA[ 0 ] , HPHYBRID_INT_LVLS);
766            // Push PA stack
767            memmove(&m_reg_PA[ 1 ] , &m_reg_PA[ 0 ] , HPHYBRID_INT_LVLS);
768768
769                CURRENT_PA = new_PA;
769            CURRENT_PA = new_PA;
770770
771                // Is this correct? Patent @ pg 210 suggests that the whole interrupt recognition sequence
772                // lasts for 32 cycles (6 are already accounted for in get_ea for one indirection)
773                m_icount -= 26;
771            // Is this correct? Patent @ pg 210 suggests that the whole interrupt recognition sequence
772            // lasts for 32 cycles (6 are already accounted for in get_ea for one indirection)
773            m_icount -= 26;
774774
775                // Do a double-indirect JSM IV,I instruction
776                WM(++m_reg_R , m_reg_P);
777                m_reg_P = RM(get_ea(0xc008));
778                m_reg_I = RM(m_reg_P);
775            // Do a double-indirect JSM IV,I instruction
776            WM(++m_reg_R , m_reg_P);
777            m_reg_P = RM(get_ea(0xc008));
778            m_reg_I = RM(m_reg_P);
779779}
780780
781781void hp_hybrid_cpu_device::handle_dma(void)
782782{
783                // Patent hints at the fact that terminal count is detected by bit 15 of dmac being 1 after decrementing
784                bool tc = BIT(--m_dmac , 15) != 0;
785                UINT16 tmp;
783            // Patent hints at the fact that terminal count is detected by bit 15 of dmac being 1 after decrementing
784            bool tc = BIT(--m_dmac , 15) != 0;
785            UINT16 tmp;
786786
787                if (BIT(m_flags , HPHYBRID_DMADIR_BIT)) {
788                                // "Outward" DMA: memory -> peripheral
789                                tmp = RM(m_dmama++);
790                                WIO(m_dmapa , tc ? 2 : 0 , tmp);
791                                m_icount -= 10;
792                } else {
793                                // "Inward" DMA: peripheral -> memory
794                                tmp = RIO(m_dmapa , tc ? 2 : 0);
795                                WM(m_dmama++ , tmp);
796                                m_icount -= 9;
797                }
787            if (BIT(m_flags , HPHYBRID_DMADIR_BIT)) {
788                        // "Outward" DMA: memory -> peripheral
789                        tmp = RM(m_dmama++);
790                        WIO(m_dmapa , tc ? 2 : 0 , tmp);
791                        m_icount -= 10;
792            } else {
793                        // "Inward" DMA: peripheral -> memory
794                        tmp = RIO(m_dmapa , tc ? 2 : 0);
795                        WM(m_dmama++ , tmp);
796                        m_icount -= 9;
797            }
798798
799                // This is the one of the biggest question marks: is the DMA automatically disabled on TC?
800                // Here we assume it is. After all it would make no difference because there is no way
801                // to read the DMA enable flag back, so each time the DMA is needed it has to be enabled again.
802                if (tc) {
803                                BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT);
804                }
799            // This is the one of the biggest question marks: is the DMA automatically disabled on TC?
800            // Here we assume it is. After all it would make no difference because there is no way
801            // to read the DMA enable flag back, so each time the DMA is needed it has to be enabled again.
802            if (tc) {
803                        BIT_CLR(m_flags , HPHYBRID_DMAEN_BIT);
804            }
805805}
806806
807807UINT16 hp_hybrid_cpu_device::RM(UINT16 addr)
808808{
809                UINT16 tmp;
809            UINT16 tmp;
810810
811                if (addr <= HP_REG_LAST_ADDR) {
812                                // Memory mapped registers
813                                switch (addr) {
814                                case HP_REG_A_ADDR:
815                                                return m_reg_A;
811            if (addr <= HP_REG_LAST_ADDR) {
812                        // Memory mapped registers
813                        switch (addr) {
814                        case HP_REG_A_ADDR:
815                                    return m_reg_A;
816816
817                                case HP_REG_B_ADDR:
818                                                return m_reg_B;
817                        case HP_REG_B_ADDR:
818                                    return m_reg_B;
819819
820                                case HP_REG_P_ADDR:
821                                                return m_reg_P;
820                        case HP_REG_P_ADDR:
821                                    return m_reg_P;
822822
823                                case HP_REG_R_ADDR:
824                                                return m_reg_R;
823                        case HP_REG_R_ADDR:
824                                    return m_reg_R;
825825
826                                case HP_REG_R4_ADDR:
827                                case HP_REG_R5_ADDR:
828                                case HP_REG_R6_ADDR:
829                                case HP_REG_R7_ADDR:
830                                                return RIO(CURRENT_PA , addr - HP_REG_R4_ADDR);
826                        case HP_REG_R4_ADDR:
827                        case HP_REG_R5_ADDR:
828                        case HP_REG_R6_ADDR:
829                        case HP_REG_R7_ADDR:
830                                    return RIO(CURRENT_PA , addr - HP_REG_R4_ADDR);
831831
832                                case HP_REG_IV_ADDR:
833                                                // Correct?
834                                                if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
835                                                                return m_reg_IV;
836                                                } else {
837                                                                return m_reg_IV | CURRENT_PA;
838                                                }
832                        case HP_REG_IV_ADDR:
833                                    // Correct?
834                                    if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
835                                                return m_reg_IV;
836                                    } else {
837                                                return m_reg_IV | CURRENT_PA;
838                                    }
839839
840                                case HP_REG_PA_ADDR:
841                                                return CURRENT_PA;
840                        case HP_REG_PA_ADDR:
841                                    return CURRENT_PA;
842842
843                                case HP_REG_DMAPA_ADDR:
844                                                tmp = m_dmapa & HP_REG_PA_MASK;
845                                                if (BIT(m_flags , HPHYBRID_CB_BIT)) {
846                                                                BIT_SET(tmp , 15);
847                                                }
848                                                if (BIT(m_flags , HPHYBRID_DB_BIT)) {
849                                                                BIT_SET(tmp , 14);
850                                                }
851                                                return tmp;
843                        case HP_REG_DMAPA_ADDR:
844                                    tmp = m_dmapa & HP_REG_PA_MASK;
845                                    if (BIT(m_flags , HPHYBRID_CB_BIT)) {
846                                                BIT_SET(tmp , 15);
847                                    }
848                                    if (BIT(m_flags , HPHYBRID_DB_BIT)) {
849                                                BIT_SET(tmp , 14);
850                                    }
851                                    return tmp;
852852
853                                case HP_REG_DMAMA_ADDR:
854                                                return m_dmama;
853                        case HP_REG_DMAMA_ADDR:
854                                    return m_dmama;
855855
856                                case HP_REG_DMAC_ADDR:
857                                                return m_dmac;
856                        case HP_REG_DMAC_ADDR:
857                                    return m_dmac;
858858
859                                case HP_REG_C_ADDR:
860                                                return m_reg_C;
859                        case HP_REG_C_ADDR:
860                                    return m_reg_C;
861861
862                                case HP_REG_D_ADDR:
863                                                return m_reg_D;
862                        case HP_REG_D_ADDR:
863                                    return m_reg_D;
864864
865                                default:
866                                                // Unknown registers are returned as 0
867                                                return 0;
868                                }
869                } else {
870                                return m_direct->read_word((offs_t)addr << 1);
871                }
865                        default:
866                                    // Unknown registers are returned as 0
867                                    return 0;
868                        }
869            } else {
870                        return m_direct->read_word((offs_t)addr << 1);
871            }
872872}
873873
874874void hp_hybrid_cpu_device::WM(UINT16 addr , UINT16 v)
875875{
876                if (addr <= HP_REG_LAST_ADDR) {
877                                // Memory mapped registers
878                                switch (addr) {
879                                case HP_REG_A_ADDR:
880                                                m_reg_A = v;
881                                                break;
876            if (addr <= HP_REG_LAST_ADDR) {
877                        // Memory mapped registers
878                        switch (addr) {
879                        case HP_REG_A_ADDR:
880                                    m_reg_A = v;
881                                    break;
882882
883                                case HP_REG_B_ADDR:
884                                                m_reg_B = v;
885                                                break;
883                        case HP_REG_B_ADDR:
884                                    m_reg_B = v;
885                                    break;
886886
887                                case HP_REG_P_ADDR:
888                                                m_reg_P = v;
889                                                break;
887                        case HP_REG_P_ADDR:
888                                    m_reg_P = v;
889                                    break;
890890
891                                case HP_REG_R_ADDR:
892                                                m_reg_R = v;
893                                                break;
891                        case HP_REG_R_ADDR:
892                                    m_reg_R = v;
893                                    break;
894894
895                                case HP_REG_R4_ADDR:
896                                case HP_REG_R5_ADDR:
897                                case HP_REG_R6_ADDR:
898                                case HP_REG_R7_ADDR:
899                                                WIO(CURRENT_PA , addr - HP_REG_R4_ADDR , v);
900                                                break;
895                        case HP_REG_R4_ADDR:
896                        case HP_REG_R5_ADDR:
897                        case HP_REG_R6_ADDR:
898                        case HP_REG_R7_ADDR:
899                                    WIO(CURRENT_PA , addr - HP_REG_R4_ADDR , v);
900                                    break;
901901
902                                case HP_REG_IV_ADDR:
903                                                m_reg_IV = v & HP_REG_IV_MASK;
904                                                break;
902                        case HP_REG_IV_ADDR:
903                                    m_reg_IV = v & HP_REG_IV_MASK;
904                                    break;
905905
906                                case HP_REG_PA_ADDR:
907                                                CURRENT_PA = v & HP_REG_PA_MASK;
908                                                break;
906                        case HP_REG_PA_ADDR:
907                                    CURRENT_PA = v & HP_REG_PA_MASK;
908                                    break;
909909
910                                case HP_REG_DMAPA_ADDR:
911                                                m_dmapa = v & HP_REG_PA_MASK;
912                                                break;
910                        case HP_REG_DMAPA_ADDR:
911                                    m_dmapa = v & HP_REG_PA_MASK;
912                                    break;
913913
914                                case HP_REG_DMAMA_ADDR:
915                                                m_dmama = v;
916                                                break;
914                        case HP_REG_DMAMA_ADDR:
915                                    m_dmama = v;
916                                    break;
917917
918                                case HP_REG_DMAC_ADDR:
919                                                m_dmac = v;
920                                                break;
918                        case HP_REG_DMAC_ADDR:
919                                    m_dmac = v;
920                                    break;
921921
922                                case HP_REG_C_ADDR:
923                                                m_reg_C = v;
924                                                break;
922                        case HP_REG_C_ADDR:
923                                    m_reg_C = v;
924                                    break;
925925
926                                case HP_REG_D_ADDR:
927                                                m_reg_D = v;
928                                                break;
926                        case HP_REG_D_ADDR:
927                                    m_reg_D = v;
928                                    break;
929929
930                                default:
931                                                // Unknown registers are silently discarded
932                                                break;
933                                }
934                } else {
935                                m_program->write_word((offs_t)addr << 1 , v);
936                }
930                        default:
931                                    // Unknown registers are silently discarded
932                                    break;
933                        }
934            } else {
935                        m_program->write_word((offs_t)addr << 1 , v);
936            }
937937}
938938
939939void hp_hybrid_cpu_device::WMB(UINT32 addr , UINT8 v)
940940{
941                if (addr <= (HP_REG_LAST_ADDR * 2 + 1)) {
942                                // Cannot write bytes to registers
943                } else {
944                                m_program->write_byte(addr , v);
945                }
941            if (addr <= (HP_REG_LAST_ADDR * 2 + 1)) {
942                        // Cannot write bytes to registers
943            } else {
944                        m_program->write_byte(addr , v);
945            }
946946}
947947
948948UINT16 hp_hybrid_cpu_device::RIO(UINT8 pa , UINT8 ic)
949949{
950                return m_io->read_word(HP_MAKE_IOADDR(pa, ic) << 1);
950            return m_io->read_word(HP_MAKE_IOADDR(pa, ic) << 1);
951951}
952952
953953void hp_hybrid_cpu_device::WIO(UINT8 pa , UINT8 ic , UINT16 v)
954954{
955                m_io->write_word(HP_MAKE_IOADDR(pa, ic) << 1 , v);
955            m_io->write_word(HP_MAKE_IOADDR(pa, ic) << 1 , v);
956956}
957957
958958hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/emu/cpu/hphybrid/hphybrid.h
r248551r248552
6565class hp_hybrid_cpu_device : public cpu_device
6666{
6767public:
68        DECLARE_WRITE_LINE_MEMBER(dmar_w);
68      DECLARE_WRITE_LINE_MEMBER(dmar_w);
6969
7070protected:
7171      hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
r248551r248552
126126      UINT16 get_skip_addr_sc(UINT16 opcode , UINT16& v , unsigned n);
127127      void do_pw(UINT16 opcode);
128128      void check_for_interrupts(void);
129                void handle_dma(void);
129            void handle_dma(void);
130130
131131      UINT16 RM(UINT16 addr);
132132      void   WM(UINT16 addr , UINT16 v);
trunk/src/emu/cpu/m68000/m68kcpu.c
r248551r248552
23362336
23372337m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
23382338   : cpu_device(mconfig, M68K, "M68K", tag, owner, clock, "m68k", __FILE__),
2339     m_program_config("program", ENDIANNESS_BIG, 16, 24),
2340     m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, 16, 24)
2339      m_program_config("program", ENDIANNESS_BIG, 16, 24),
2340      m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, 16, 24)
23412341{
23422342   clear_all();
23432343}
r248551r248552
23482348m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *name, const char *tag, device_t *owner, UINT32 clock,
23492349                              const device_type type, UINT32 prg_data_width, UINT32 prg_address_bits, address_map_constructor internal_map, const char *shortname, const char *source)
23502350   : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
2351     m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
2352     m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map)
2351      m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map),
2352      m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map)
23532353{
23542354   clear_all();
23552355}
r248551r248552
23582358m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *name, const char *tag, device_t *owner, UINT32 clock,
23592359                              const device_type type, UINT32 prg_data_width, UINT32 prg_address_bits, const char *shortname, const char *source)
23602360   : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
2361     m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
2362     m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits)
2361      m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits),
2362      m_oprogram_config("decrypted_opcodes", ENDIANNESS_BIG, prg_data_width, prg_address_bits)
23632363{
23642364   clear_all();
23652365}
trunk/src/emu/cpu/rsp/rsp.c
r248551r248552
801801         m_rsp_state->icount = MIN(m_rsp_state->icount, 0);
802802      }
803803      /*m_cop2->dump(op);
804        if (((op >> 26) & 0x3f) == 0x3a)
805        {
806            m_cop2->dump_dmem();
807        }*/
804      if (((op >> 26) & 0x3f) == 0x3a)
805      {
806          m_cop2->dump_dmem();
807      }*/
808808   }
809809}
trunk/src/emu/cpu/rsp/rspcp2.c
r248551r248552
206206      { 0xffff, 0xffff, 0x0000, 0x0000 }, // L
207207      { 0xffff, 0xffff, 0xffff, 0xffff }  // D
208208   },
209    { // word_reverse
210        0x0203, 0x0001, 0x0607, 0x0405, 0x0a0b, 0x0809, 0x0e0f, 0x0c0d
211    }
209   { // word_reverse
210      0x0203, 0x0001, 0x0607, 0x0405, 0x0a0b, 0x0809, 0x0e0f, 0x0c0d
211   }
212212};
213213
214214#if !(defined(__SSSE3__) || defined(_MSC_VER))
r248551r248552
322322   dqm = _mm_shuffle_epi8(dqm, ekey);
323323#endif
324324
325  // Align the data to the DQM so we can mask it in.
325   // Align the data to the DQM so we can mask it in.
326326#if !(defined(__SSSE3__) || defined(_MSC_VER))
327327   data = sse2_pshufb(data, m_vec_helpers.ror_b2l_keys[ror & 0xF]);
328328#else
r248551r248552
330330   data = _mm_shuffle_epi8(data, ekey);
331331#endif
332332
333  // Mask and mux in the data.
333   // Mask and mux in the data.
334334#if (defined(__SSE4_1__) || defined(_MSC_VER))
335335   reg = _mm_blendv_epi8(reg, data, dqm);
336336#else
r248551r248552
377377   }
378378
379379   // "Unpack" the data.
380    rsp_vec_t zero = _mm_setzero_si128();
380   rsp_vec_t zero = _mm_setzero_si128();
381381   data = _mm_unpacklo_epi8(zero, data);
382382
383383   if (request_type != RSP_MEM_REQUEST_PACK)
r248551r248552
385385      data = _mm_srli_epi16(data, 1);
386386   }
387387
388    data = _mm_shufflehi_epi16(data, _MM_SHUFFLE(0, 1, 2, 3));
389    data = _mm_shufflelo_epi16(data, _MM_SHUFFLE(0, 1, 2, 3));
388   data = _mm_shufflehi_epi16(data, _MM_SHUFFLE(0, 1, 2, 3));
389   data = _mm_shufflelo_epi16(data, _MM_SHUFFLE(0, 1, 2, 3));
390390
391    _mm_store_si128((rsp_vec_t *) regp, data);
391   _mm_store_si128((rsp_vec_t *) regp, data);
392392}
393393
394394//
r248551r248552
403403{
404404   UINT32 aligned_addr = addr & 0xFF0;
405405   UINT32 offset = addr & 0xF;
406    static UINT32 call_count = 0;
406   static UINT32 call_count = 0;
407407
408408   rsp_vec_t data = _mm_load_si128((rsp_vec_t *) (m_rsp.get_dmem() + aligned_addr));
409409
r248551r248552
439439
440440   _mm_store_si128((rsp_vec_t *) regp, data);
441441
442    call_count++;
442   call_count++;
443443}
444444
445445//
r248551r248552
542542   reg = _mm_shuffle_epi8(reg, dkey);
543543#endif
544544
545    // TODO: Always store in 8-byte chunks to emulate wraparound.
545   // TODO: Always store in 8-byte chunks to emulate wraparound.
546546   _mm_storel_epi64((rsp_vec_t *) (m_rsp.get_dmem() + addr), reg);
547547}
548548
r248551r248552
574574   reg = _mm_shuffle_epi8(reg, ekey);
575575#endif
576576
577  // Mask and mux out the data, write.
577   // Mask and mux out the data, write.
578578#if (defined(__SSE4_1__) || defined(_MSC_VER))
579579   data = _mm_blendv_epi8(data, reg, dqm);
580580#else
r248551r248552
702702   memset(m_vflag, 0, sizeof(m_vflag));
703703   memset(m_accum, 0, sizeof(m_accum));
704704#if USE_SIMD
705    memset(&m_acc, 0, sizeof(m_acc));
706    memset(&m_flags, 0, sizeof(aligned_rsp_2vect_t) * 3);
707    m_div_out = 0;
708    m_div_in = 0;
705   memset(&m_acc, 0, sizeof(m_acc));
706   memset(&m_flags, 0, sizeof(aligned_rsp_2vect_t) * 3);
707   m_div_out = 0;
708   m_div_in = 0;
709709#endif
710710   m_rspcop2_state = (internal_rspcop2_state *)rsp.m_cache.alloc_near(sizeof(internal_rspcop2_state));
711711}
r248551r248552
877877         //
878878         // Load 1 byte to vector byte index
879879
880            //printf("LBV ");
880         //printf("LBV ");
881881#if USE_SIMD
882882         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
883883#else
r248551r248552
896896         //
897897         // Loads 2 bytes starting from vector byte index
898898
899            //printf("LSV ");
899         //printf("LSV ");
900900#if USE_SIMD
901901         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
902902#else
r248551r248552
922922         //
923923         // Loads 4 bytes starting from vector byte index
924924
925            //printf("LLV ");
925         //printf("LLV ");
926926#if USE_SIMD
927927         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
928928#else
r248551r248552
948948         //
949949         // Loads 8 bytes starting from vector byte index
950950
951            //printf("LDV ");
951         //printf("LDV ");
952952#if USE_SIMD
953953         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
954954#else
r248551r248552
974974         //
975975         // Loads up to 16 bytes starting from vector byte index
976976
977            //printf("LQV ");
977         //printf("LQV ");
978978#if USE_SIMD
979979         vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]);
980980#else
r248551r248552
10011001         //
10021002         // Stores up to 16 bytes starting from right side until 16-byte boundary
10031003
1004            //printf("LRV ");
1004         //printf("LRV ");
10051005#if USE_SIMD
10061006         vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]);
10071007#else
r248551r248552
10291029         //
10301030         // Loads a byte as the upper 8 bits of each element
10311031
1032            //printf("LPV ");
1032         //printf("LPV ");
10331033#if USE_SIMD
10341034         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
10351035#else
r248551r248552
10521052         //
10531053         // Loads a byte as the bits 14-7 of each element
10541054
1055            //printf("LUV ");
1055         //printf("LUV ");
10561056#if USE_SIMD
10571057         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
10581058#else
r248551r248552
10751075         //
10761076         // Loads a byte as the bits 14-7 of each element, with 2-byte stride
10771077
1078            //printf("LHV ");
1078         //printf("LHV ");
10791079#if USE_SIMD
10801080         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
10811081#else
r248551r248552
10981098         //
10991099         // Loads a byte as the bits 14-7 of upper or lower quad, with 4-byte stride
11001100
1101            //printf("LFV ");
1101         //printf("LFV ");
11021102#if USE_SIMD
11031103         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
11041104#else
r248551r248552
11271127         // Loads the full 128-bit vector starting from vector byte index and wrapping to index 0
11281128         // after byte index 15
11291129
1130            //printf("LWV ");
1130         //printf("LWV ");
11311131#if USE_SIMD
11321132#else
11331133         ea = (base) ? m_rsp.m_rsp_state->r[base] + (offset * 16) : (offset * 16);
r248551r248552
11541154
11551155         // FIXME: has a small problem with odd indices
11561156
1157            //printf("LTV ");
1157         //printf("LTV ");
11581158#if 0
11591159#else
1160           INT32 index = (op >> 7) & 0xf;
1161           INT32 offset = (op & 0x7f);
1162           if (offset & 0x40)
1163              offset |= 0xffffffc0;
1160         INT32 index = (op >> 7) & 0xf;
1161         INT32 offset = (op & 0x7f);
1162         if (offset & 0x40)
1163            offset |= 0xffffffc0;
11641164
1165            INT32 vs = (op >> 16) & 0x1f;
1165         INT32 vs = (op >> 16) & 0x1f;
11661166         INT32 ve = vs + 8;
11671167         if (ve > 32)
11681168            ve = 32;
r248551r248552
12251225         //
12261226         // Stores 1 byte from vector byte index
12271227
1228            //printf("SBV ");
1228         //printf("SBV ");
12291229#if USE_SIMD
12301230         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
12311231#else
r248551r248552
12441244         //
12451245         // Stores 2 bytes starting from vector byte index
12461246
1247            //printf("SSV ");
1247         //printf("SSV ");
12481248#if USE_SIMD
12491249         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
12501250#else
r248551r248552
12701270         //
12711271         // Stores 4 bytes starting from vector byte index
12721272
1273            //printf("SLV ");
1273         //printf("SLV ");
12741274#if USE_SIMD
12751275         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
12761276#else
r248551r248552
12961296         //
12971297         // Stores 8 bytes starting from vector byte index
12981298
1299            //printf("SDV ");
1299         //printf("SDV ");
13001300#if USE_SIMD
13011301         vec_lbdlsv_sbdlsv(op, m_rsp.m_rsp_state->r[base]);
13021302#else
r248551r248552
13221322         //
13231323         // Stores up to 16 bytes starting from vector byte index until 16-byte boundary
13241324
1325            //printf("SQV ");
1325         //printf("SQV ");
13261326#if USE_SIMD
13271327         vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]);
13281328#else
r248551r248552
13481348         //
13491349         // Stores up to 16 bytes starting from right side until 16-byte boundary
13501350
1351            //printf("SRV ");
1351         //printf("SRV ");
13521352#if USE_SIMD
13531353         vec_lqrv_sqrv(op, m_rsp.m_rsp_state->r[base]);
13541354#else
r248551r248552
13771377         //
13781378         // Stores upper 8 bits of each element
13791379
1380            //printf("SPV ");
1380         //printf("SPV ");
13811381#if USE_SIMD
13821382         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
13831383#else
r248551r248552
14091409         //
14101410         // Stores bits 14-7 of each element
14111411
1412            //printf("SUV ");
1412         //printf("SUV ");
14131413#if USE_SIMD
14141414         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
14151415#else
r248551r248552
14411441         //
14421442         // Stores bits 14-7 of each element, with 2-byte stride
14431443
1444            //printf("SHV ");
1444         //printf("SHV ");
14451445#if USE_SIMD
14461446         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
14471447#else
r248551r248552
14701470
14711471         // FIXME: only works for index 0 and index 8
14721472
1473            //printf("SFV ");
1473         //printf("SFV ");
14741474#if USE_SIMD
14751475         vec_lfhpuv_sfhpuv(op, m_rsp.m_rsp_state->r[base]);
14761476#else
r248551r248552
15001500         // Stores the full 128-bit vector starting from vector byte index and wrapping to index 0
15011501         // after byte index 15
15021502
1503            //printf("SWV ");
1503         //printf("SWV ");
15041504#if USE_SIMD
15051505#else
15061506         ea = (base) ? m_rsp.m_rsp_state->r[base] + (offset * 16) : (offset * 16);
r248551r248552
15281528         //
15291529         // Stores one element from maximum of 8 vectors, while incrementing element index
15301530
1531            //printf("STV ");
1531         //printf("STV ");
15321532#if 0
15331533#else
1534           INT32 index = (op >> 7) & 0xf;
1535           INT32 offset = (op & 0x7f);
1536           if (offset & 0x40)
1537              offset |= 0xffffffc0;
1534         INT32 index = (op >> 7) & 0xf;
1535         INT32 offset = (op & 0x7f);
1536         if (offset & 0x40)
1537            offset |= 0xffffffc0;
15381538
15391539         INT32 vs = (op >> 16) & 0x1f;
15401540         INT32 ve = vs + 8;
r248551r248552
15481548         INT32 eaoffset = (ea & 0xf) + (element * 2);
15491549         ea &= ~0xf;
15501550
1551            for (INT32 i = vs; i < ve; i++)
1551         for (INT32 i = vs; i < ve; i++)
15521552         {
15531553            m_rsp.WRITE16(ea + (eaoffset & 0xf), VREG_S(i, element & 0x7));
15541554            eaoffset += 2;
r248551r248552
16541654         //
16551655         // Multiplies signed integer by signed integer * 2
16561656
1657            //printf("MULF ");
1657         //printf("MULF ");
16581658#if USE_SIMD
16591659         UINT16 *acc = m_acc.s;
16601660         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
17061706         // ------------------------------------------------------
17071707         //
17081708
1709            //printf("MULU ");
1709         //printf("MULU ");
17101710#if USE_SIMD
17111711         UINT16 *acc = m_acc.s;
17121712         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
17621762         // Stores the higher 16 bits of the 32-bit result to accumulator
17631763         // The low slice of accumulator is stored into destination element
17641764
1765            //printf("MUDL ");
1765         //printf("MUDL ");
17661766#if USE_SIMD
17671767         UINT16 *acc = m_acc.s;
17681768         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
18091809         // The result is stored into accumulator
18101810         // The middle slice of accumulator is stored into destination element
18111811
1812            //printf("MUDM ");
1812         //printf("MUDM ");
18131813#if USE_SIMD
18141814         UINT16 *acc = m_acc.s;
18151815         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
18571857         // The result is stored into accumulator
18581858         // The low slice of accumulator is stored into destination element
18591859
1860            //printf("MUDN ");
1860         //printf("MUDN ");
18611861#if USE_SIMD
18621862         UINT16 *acc = m_acc.s;
18631863         rsp_vec_t acc_lo = read_acc_lo(acc);
r248551r248552
19021902         // The result is stored into highest 32 bits of accumulator, the low slice is zero
19031903         // The highest 32 bits of accumulator is saturated into destination element
19041904
1905            //printf("MUDH ");
1905         //printf("MUDH ");
19061906#if USE_SIMD
19071907         UINT16 *acc = m_acc.s;
19081908         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
19501950         // Multiplies signed integer by signed integer * 2
19511951         // The result is added to accumulator
19521952
1953            //printf("MACF ");
1953         //printf("MACF ");
19541954#if USE_SIMD
19551955         UINT16 *acc = m_acc.s;
19561956         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
20012001         // ------------------------------------------------------
20022002         //
20032003
2004            //printf("MACU ");
2004         //printf("MACU ");
20052005#if USE_SIMD
20062006         UINT16 *acc = m_acc.s;
20072007         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
20712071         // Adds the higher 16 bits of the 32-bit result to accumulator
20722072         // The low slice of accumulator is stored into destination element
20732073
2074            //printf("MADL ");
2074         //printf("MADL ");
20752075#if USE_SIMD
20762076         UINT16 *acc = m_acc.s;
20772077         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
21202120         // The result is added into accumulator
21212121         // The middle slice of accumulator is stored into destination element
21222122
2123            //printf("MADM ");
2123         //printf("MADM ");
21242124#if USE_SIMD
21252125         UINT16 *acc = m_acc.s;
21262126         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
21712171         // The result is added into accumulator
21722172         // The low slice of accumulator is stored into destination element
21732173
2174            //printf("MADN ");
2174         //printf("MADN ");
21752175#if USE_SIMD
21762176         UINT16 *acc = m_acc.s;
21772177         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
22252225         // The result is added into highest 32 bits of accumulator, the low slice is zero
22262226         // The highest 32 bits of accumulator is saturated into destination element
22272227
2228            //printf("MADH ");
2228         //printf("MADH ");
22292229#if USE_SIMD
22302230         UINT16 *acc = m_acc.s;
22312231         rsp_vec_t acc_lo, acc_mid, acc_hi;
r248551r248552
22752275
22762276         // TODO: check VS2REG == VDREG
22772277
2278            //printf("ADD ");
2278         //printf("ADD ");
22792279#if USE_SIMD
22802280         rsp_vec_t acc_lo;
22812281         UINT16 *acc = m_acc.s;
r248551r248552
23212321
23222322         // TODO: check VS2REG == VDREG
23232323
2324            //printf("SUB ");
2324         //printf("SUB ");
23252325#if USE_SIMD
23262326         rsp_vec_t acc_lo;
23272327         UINT16 *acc = m_acc.s;
r248551r248552
23672367         // Changes the sign of source register 2 if source register 1 is negative and stores
23682368         // the result to destination register
23692369
2370            //printf("ABS ");
2370         //printf("ABS ");
23712371#if USE_SIMD
23722372         rsp_vec_t acc_lo;
23732373         UINT16 *acc = m_acc.s;
r248551r248552
24232423
24242424         // TODO: check VS2REG = VDREG
24252425
2426            //printf("ADDC ");
2426         //printf("ADDC ");
24272427#if USE_SIMD
24282428         UINT16 *acc = m_acc.s;
24292429         rsp_vec_t sn;
r248551r248552
24712471
24722472         // TODO: check VS2REG = VDREG
24732473
2474            //printf("SUBC ");
2474         //printf("SUBC ");
24752475#if USE_SIMD
24762476         UINT16 *acc = m_acc.s;
24772477         rsp_vec_t eq, sn;
r248551r248552
25212521         //
25222522         // Stores high, middle or low slice of accumulator to destination vector
25232523
2524            //printf("SAW ");
2524         //printf("SAW ");
25252525#if USE_SIMD
25262526         UINT16 *acc = m_acc.s;
25272527         switch (EL)
r248551r248552
25862586         // Sets compare flags if elements in VS1 are less than VS2
25872587         // Moves the element in VS2 to destination vector
25882588
2589            //printf("LT ");
2589         //printf("LT ");
25902590#if USE_SIMD
25912591         UINT16 *acc = m_acc.s;
25922592         rsp_vec_t le;
r248551r248552
26552655         // Sets compare flags if elements in VS1 are equal with VS2
26562656         // Moves the element in VS2 to destination vector
26572657
2658            //printf("EQ ");
2658         //printf("EQ ");
26592659#if USE_SIMD
26602660         UINT16 *acc = m_acc.s;
26612661         rsp_vec_t le;
r248551r248552
27122712         // Sets compare flags if elements in VS1 are not equal with VS2
27132713         // Moves the element in VS2 to destination vector
27142714
2715            //printf("NE ");
2715         //printf("NE ");
27162716#if USE_SIMD
27172717         UINT16 *acc = m_acc.s;
27182718         rsp_vec_t le;
r248551r248552
27702770         // Sets compare flags if elements in VS1 are greater or equal with VS2
27712771         // Moves the element in VS2 to destination vector
27722772
2773            //printf("GE ");
2773         //printf("GE ");
27742774#if USE_SIMD
27752775         UINT16 *acc = m_acc.s;
27762776         rsp_vec_t le;
r248551r248552
28272827         //
28282828         // Vector clip low
28292829
2830            //printf("CL ");
2830         //printf("CL ");
28312831#if USE_SIMD
28322832         UINT16 *acc = m_acc.s;
28332833
r248551r248552
29442944         //
29452945         // Vector clip high
29462946
2947            //printf("CH ");
2947         //printf("CH ");
29482948#if USE_SIMD
29492949         UINT16 *acc = m_acc.s;
29502950         rsp_vec_t ge, le, sign, eq, vce;
r248551r248552
30473047         //
30483048         // Vector clip reverse
30493049
3050            //printf("CR ");
3050         //printf("CR ");
30513051#if USE_SIMD
30523052         UINT16 *acc = m_acc.s;
30533053         rsp_vec_t ge, le;
r248551r248552
31253125         //
31263126         // Merges two vectors according to compare flags
31273127
3128            //printf("MRG ");
3128         //printf("MRG ");
31293129#if USE_SIMD
31303130         UINT16 *acc = m_acc.s;
31313131         rsp_vec_t le = read_vcc_lo(m_flags[RSP_VCC].s);
r248551r248552
31663166         //
31673167         // Bitwise AND of two vector registers
31683168
3169            //printf("AND ");
3169         //printf("AND ");
31703170#if USE_SIMD
31713171         UINT16 *acc = m_acc.s;
31723172
r248551r248552
31963196         //
31973197         // Bitwise NOT AND of two vector registers
31983198
3199            //printf("NAND ");
3199         //printf("NAND ");
32003200#if USE_SIMD
32013201         UINT16 *acc = m_acc.s;
32023202
r248551r248552
32263226         //
32273227         // Bitwise OR of two vector registers
32283228
3229            //printf("OR ");
3229         //printf("OR ");
32303230#if USE_SIMD
32313231         UINT16 *acc = m_acc.s;
32323232
r248551r248552
32563256         //
32573257         // Bitwise NOT OR of two vector registers
32583258
3259            //printf("NOR ");
3259         //printf("NOR ");
32603260#if USE_SIMD
32613261         UINT16 *acc = m_acc.s;
32623262
r248551r248552
32863286         //
32873287         // Bitwise XOR of two vector registers
32883288
3289            //printf("XOR ");
3289         //printf("XOR ");
32903290#if USE_SIMD
32913291         UINT16 *acc = m_acc.s;
32923292
r248551r248552
33163316         //
33173317         // Bitwise NOT XOR of two vector registers
33183318
3319            //printf("NXOR ");
3319         //printf("NXOR ");
33203320#if USE_SIMD
33213321         UINT16 *acc = m_acc.s;
33223322
r248551r248552
33473347         //
33483348         // Calculates reciprocal
33493349
3350            //printf("RCP ");
3350         //printf("RCP ");
33513351#if USE_SIMD
33523352         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
33533353
r248551r248552
34183418         //
34193419         // Calculates reciprocal low part
34203420
3421            //printf("RCPL ");
3421         //printf("RCPL ");
34223422#if USE_SIMD
34233423         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
34243424
r248551r248552
35053505         //
35063506         // Calculates reciprocal high part
35073507
3508            //printf("RCPH ");
3508         //printf("RCPH ");
35093509#if USE_SIMD
35103510         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
35113511
r248551r248552
35373537         //
35383538         // Moves element from vector to destination vector
35393539
3540            //printf("MOV ");
3540         //printf("MOV ");
35413541#if USE_SIMD
35423542         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
35433543         m_v[VDREG].v = vec_vmov(VS2REG, EL, VDREG, VS1REG);
r248551r248552
35613561         //
35623562         // Calculates reciprocal square-root
35633563
3564            //printf("RSQ ");
3564         //printf("RSQ ");
35653565#if USE_SIMD
35663566         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
35673567
r248551r248552
36333633         //
36343634         // Calculates reciprocal square-root low part
36353635
3636            //printf("RSQL ");
3636         //printf("RSQL ");
36373637#if USE_SIMD
36383638         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
36393639
r248551r248552
37233723         //
37243724         // Calculates reciprocal square-root high part
37253725
3726            //printf("RSQH ");
3726         //printf("RSQH ");
37273727#if USE_SIMD
37283728         write_acc_lo(m_acc.s, vec_load_and_shuffle_operand(m_v[VS2REG].s, EL));
37293729
r248551r248552
37543754         //
37553755         // Vector null instruction
37563756
3757            //printf("NOP ");
3757         //printf("NOP ");
37583758         break;
37593759      }
37603760
r248551r248552
37773777         // | 010010 | 00000 | TTTTT | DDDDD | IIII | 0000000 |
37783778         // ---------------------------------------------------
37793779         //
3780            //printf("MFC2 ");
3780         //printf("MFC2 ");
37813781         int el = (op >> 7) & 0xf;
37823782         UINT16 b1 = VREG_B(RDREG, (el+0) & 0xf);
37833783         UINT16 b2 = VREG_B(RDREG, (el+1) & 0xf);
r248551r248552
37923792         // | 010010 | 00010 | TTTTT | DDDDD | 00000000000 |
37933793         // ------------------------------------------------
37943794         //
3795            //printf("CFC2 ");
3795         //printf("CFC2 ");
37963796         if (RTREG)
37973797         {
37983798#if USE_SIMD
3799                INT32 src = RDREG & 3;
3800                if (src == 3) {
3801                    src = 2;
3802                }
3803                RTVAL = get_flags(m_flags[src].s);
3799            INT32 src = RDREG & 3;
3800            if (src == 3) {
3801               src = 2;
3802            }
3803            RTVAL = get_flags(m_flags[src].s);
38043804#else
38053805            switch(RDREG)
38063806            {
r248551r248552
38653865         // | 010010 | 00100 | TTTTT | DDDDD | IIII | 0000000 |
38663866         // ---------------------------------------------------
38673867         //
3868            //printf("MTC2 ");
3868         //printf("MTC2 ");
38693869         int el = (op >> 7) & 0xf;
38703870         W_VREG_B(RDREG, (el+0) & 0xf, (RTVAL >> 8) & 0xff);
38713871         W_VREG_B(RDREG, (el+1) & 0xf, (RTVAL >> 0) & 0xff);
r248551r248552
39663966      case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
39673967      case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f:
39683968      {
3969            //printf("V");
3969         //printf("V");
39703970         handle_vector_ops(op);
39713971         break;
39723972      }
r248551r248552
41854185   }
41864186
41874187#if USE_SIMD
4188    printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[0], m_acc.s[1], m_acc.s[2], m_acc.s[3], m_acc.s[4], m_acc.s[5], m_acc.s[6], m_acc.s[7]);
4189    printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[8], m_acc.s[9], m_acc.s[10], m_acc.s[11], m_acc.s[12], m_acc.s[13], m_acc.s[14], m_acc.s[15]);
4190    printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[16], m_acc.s[17], m_acc.s[18], m_acc.s[19], m_acc.s[20], m_acc.s[21], m_acc.s[22], m_acc.s[23]);
4191    printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[0], m_flags[RSP_VCC].s[1], m_flags[RSP_VCC].s[2], m_flags[RSP_VCC].s[3], m_flags[RSP_VCC].s[4], m_flags[RSP_VCC].s[5], m_flags[RSP_VCC].s[6], m_flags[RSP_VCC].s[7]);
4192    printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[8], m_flags[RSP_VCC].s[9], m_flags[RSP_VCC].s[10], m_flags[RSP_VCC].s[11], m_flags[RSP_VCC].s[12], m_flags[RSP_VCC].s[13], m_flags[RSP_VCC].s[14], m_flags[RSP_VCC].s[15]);
4193    printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[0], m_flags[RSP_VCO].s[1], m_flags[RSP_VCO].s[2], m_flags[RSP_VCO].s[3], m_flags[RSP_VCO].s[4], m_flags[RSP_VCO].s[5], m_flags[RSP_VCO].s[6], m_flags[RSP_VCO].s[7]);
4194    printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[8], m_flags[RSP_VCO].s[9], m_flags[RSP_VCO].s[10], m_flags[RSP_VCO].s[11], m_flags[RSP_VCO].s[12], m_flags[RSP_VCO].s[13], m_flags[RSP_VCO].s[14], m_flags[RSP_VCO].s[15]);
4195    printf("vce:    %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCE].s[0], m_flags[RSP_VCE].s[1], m_flags[RSP_VCE].s[2], m_flags[RSP_VCE].s[3], m_flags[RSP_VCE].s[4], m_flags[RSP_VCE].s[5], m_flags[RSP_VCE].s[6], m_flags[RSP_VCE].s[7]);
4188   printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[0], m_acc.s[1], m_acc.s[2], m_acc.s[3], m_acc.s[4], m_acc.s[5], m_acc.s[6], m_acc.s[7]);
4189   printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[8], m_acc.s[9], m_acc.s[10], m_acc.s[11], m_acc.s[12], m_acc.s[13], m_acc.s[14], m_acc.s[15]);
4190   printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_acc.s[16], m_acc.s[17], m_acc.s[18], m_acc.s[19], m_acc.s[20], m_acc.s[21], m_acc.s[22], m_acc.s[23]);
4191   printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[0], m_flags[RSP_VCC].s[1], m_flags[RSP_VCC].s[2], m_flags[RSP_VCC].s[3], m_flags[RSP_VCC].s[4], m_flags[RSP_VCC].s[5], m_flags[RSP_VCC].s[6], m_flags[RSP_VCC].s[7]);
4192   printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCC].s[8], m_flags[RSP_VCC].s[9], m_flags[RSP_VCC].s[10], m_flags[RSP_VCC].s[11], m_flags[RSP_VCC].s[12], m_flags[RSP_VCC].s[13], m_flags[RSP_VCC].s[14], m_flags[RSP_VCC].s[15]);
4193   printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[0], m_flags[RSP_VCO].s[1], m_flags[RSP_VCO].s[2], m_flags[RSP_VCO].s[3], m_flags[RSP_VCO].s[4], m_flags[RSP_VCO].s[5], m_flags[RSP_VCO].s[6], m_flags[RSP_VCO].s[7]);
4194   printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCO].s[8], m_flags[RSP_VCO].s[9], m_flags[RSP_VCO].s[10], m_flags[RSP_VCO].s[11], m_flags[RSP_VCO].s[12], m_flags[RSP_VCO].s[13], m_flags[RSP_VCO].s[14], m_flags[RSP_VCO].s[15]);
4195   printf("vce:    %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_flags[RSP_VCE].s[0], m_flags[RSP_VCE].s[1], m_flags[RSP_VCE].s[2], m_flags[RSP_VCE].s[3], m_flags[RSP_VCE].s[4], m_flags[RSP_VCE].s[5], m_flags[RSP_VCE].s[6], m_flags[RSP_VCE].s[7]);
41964196#else
4197    printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_H(0), ACCUM_H(1), ACCUM_H(2), ACCUM_H(3), ACCUM_H(4), ACCUM_H(5), ACCUM_H(6), ACCUM_H(7));
4198    printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_M(0), ACCUM_M(1), ACCUM_M(2), ACCUM_M(3), ACCUM_M(4), ACCUM_M(5), ACCUM_M(6), ACCUM_M(7));
4199    printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_L(0), ACCUM_L(1), ACCUM_L(2), ACCUM_L(3), ACCUM_L(4), ACCUM_L(5), ACCUM_L(6), ACCUM_L(7));
4200    printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[4][0], m_vflag[4][1], m_vflag[4][2], m_vflag[4][3], m_vflag[4][4], m_vflag[4][5], m_vflag[4][6], m_vflag[4][7]);
4201    printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[1][0], m_vflag[1][1], m_vflag[1][2], m_vflag[1][3], m_vflag[1][4], m_vflag[1][5], m_vflag[1][6], m_vflag[1][7]);
4202    printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[3][0], m_vflag[3][1], m_vflag[3][2], m_vflag[3][3], m_vflag[3][4], m_vflag[3][5], m_vflag[3][6], m_vflag[3][7]);
4203    printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[0][0], m_vflag[0][1], m_vflag[0][2], m_vflag[0][3], m_vflag[0][4], m_vflag[0][5], m_vflag[0][6], m_vflag[0][7]);
4204    printf("vce:    %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[2][0], m_vflag[2][1], m_vflag[2][2], m_vflag[2][3], m_vflag[2][4], m_vflag[2][5], m_vflag[2][6], m_vflag[2][7]);
4197   printf("acc_h: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_H(0), ACCUM_H(1), ACCUM_H(2), ACCUM_H(3), ACCUM_H(4), ACCUM_H(5), ACCUM_H(6), ACCUM_H(7));
4198   printf("acc_m: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_M(0), ACCUM_M(1), ACCUM_M(2), ACCUM_M(3), ACCUM_M(4), ACCUM_M(5), ACCUM_M(6), ACCUM_M(7));
4199   printf("acc_l: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", ACCUM_L(0), ACCUM_L(1), ACCUM_L(2), ACCUM_L(3), ACCUM_L(4), ACCUM_L(5), ACCUM_L(6), ACCUM_L(7));
4200   printf("vcc_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[4][0], m_vflag[4][1], m_vflag[4][2], m_vflag[4][3], m_vflag[4][4], m_vflag[4][5], m_vflag[4][6], m_vflag[4][7]);
4201   printf("vcc_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[1][0], m_vflag[1][1], m_vflag[1][2], m_vflag[1][3], m_vflag[1][4], m_vflag[1][5], m_vflag[1][6], m_vflag[1][7]);
4202   printf("vco_hi: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[3][0], m_vflag[3][1], m_vflag[3][2], m_vflag[3][3], m_vflag[3][4], m_vflag[3][5], m_vflag[3][6], m_vflag[3][7]);
4203   printf("vco_lo: %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[0][0], m_vflag[0][1], m_vflag[0][2], m_vflag[0][3], m_vflag[0][4], m_vflag[0][5], m_vflag[0][6], m_vflag[0][7]);
4204   printf("vce:    %04x|%04x|%04x|%04x|%04x|%04x|%04x|%04x\n", m_vflag[2][0], m_vflag[2][1], m_vflag[2][2], m_vflag[2][3], m_vflag[2][4], m_vflag[2][5], m_vflag[2][6], m_vflag[2][7]);
42054205#endif
42064206}
42074207
42084208void rsp_cop2::dump_dmem()
42094209{
4210    UINT8* dmem = m_rsp.get_dmem();
4211    printf("\n");
4212    for (int i = 0; i < 0x1000; i += 32)
4213    {
4214        printf("%04x: ", i);
4215        for (int j = 0; j < 32; j++)
4216        {
4217            printf("%02x ", dmem[i + j]);
4218        }
4219        printf("\n");
4220    }
4221    printf("\n");
4222}
No newline at end of file
4210   UINT8* dmem = m_rsp.get_dmem();
4211   printf("\n");
4212   for (int i = 0; i < 0x1000; i += 32)
4213   {
4214      printf("%04x: ", i);
4215      for (int j = 0; j < 32; j++)
4216      {
4217         printf("%02x ", dmem[i + j]);
4218      }
4219      printf("\n");
4220   }
4221   printf("\n");
4222}
trunk/src/emu/cpu/rsp/rspcp2.h
r248551r248552
1717#include "rsp.h"
1818#include "rspdiv.h"
1919
20#define SIMD_OFF      (1)
20#define SIMD_OFF        (1)
2121
2222#if (defined(__SSE2__) || defined(__SSE3__) || defined(__SSSE3__) || defined(__SSE4_1__) || defined(__SSE4_2__))
23#define SSE_AVAILABLE   (1)
23#define SSE_AVAILABLE   (1)
2424#else
25#define SSE_AVAILABLE   (0)
25#define SSE_AVAILABLE   (0)
2626#endif
2727
2828#if (SSE_AVAILABLE || defined(_MSC_VER)) && defined(PTR64) && !SIMD_OFF
29#define USE_SIMD   (1)
29#define USE_SIMD    (1)
3030#else
31#define USE_SIMD   (0)
31#define USE_SIMD    (0)
3232#endif
3333
3434#if USE_SIMD
r248551r248552
167167   void            log_instruction_execution();
168168   virtual void    cfunc_unimplemented_opcode() { }
169169
170   void         dump(UINT32 op);
171    void            dump_dmem();
170   void            dump(UINT32 op);
171   void            dump_dmem();
172172
173173protected:
174174   virtual int     generate_vector_opcode(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; }
r248551r248552
342342
343343   static inline INT16 get_flags(const UINT16 *flags)
344344   {
345        return _mm_movemask_epi8(_mm_packs_epi16(_mm_load_si128((rsp_vec_t*) (flags + (sizeof(rsp_vec_t) >> 1))), _mm_load_si128((rsp_vec_t*) flags)));
345      return _mm_movemask_epi8(_mm_packs_epi16(_mm_load_si128((rsp_vec_t*) (flags + (sizeof(rsp_vec_t) >> 1))), _mm_load_si128((rsp_vec_t*) flags)));
346346   }
347347
348348   static inline rsp_vec_t vec_zero()
r248551r248552
389389   void            handle_swc2(UINT32 op);
390390   void            handle_vector_ops(UINT32 op);
391391
392   UINT32         m_div_in;
393   UINT32         m_div_out;
392   UINT32          m_div_in;
393   UINT32          m_div_out;
394394};
395395
396396#endif /* __RSPCP2_H__ */
trunk/src/emu/cpu/rsp/vadd.h
r248551r248552
1414   minimum = _mm_subs_epi16(minimum, carry);
1515   return _mm_adds_epi16(minimum, maximum);
1616}
17
trunk/src/emu/cpu/rsp/vcl.h
r248551r248552
4646   *ge = _mm_or_si128(ge_eq, *ge);
4747#endif
4848
49  // Mux the result based on the value of sign.
49   // Mux the result based on the value of sign.
5050#if (defined(__SSE4_1__) || defined(_MSC_VER))
5151   rsp_vec_t mux_mask = _mm_blendv_epi8(*ge, *le, sign);
5252#else
trunk/src/emu/cpu/rsp/vmudh.h
r248551r248552
88
99   return sclamp_acc_to_mid(*acc_md, *acc_hi);
1010}
11
trunk/src/emu/cpu/rsp/vmulh.h
r248551r248552
2828
2929   return sclamp_acc_to_mid(*acc_md, *acc_hi);
3030}
31
trunk/src/emu/cpu/rsp/vrcpsq.h
r248551r248552
2626   }
2727   else if (input == -32768)
2828   {
29       result = 0xffff0000;
29      result = 0xffff0000;
3030   }
3131   else // Main case: compute the reciprocal.
3232   {
trunk/src/emu/cpu/rsp/vrsq.h
r248551r248552
2626   }
2727   else if (input == -32768)
2828   {
29       result = 0xffff0000;
29      result = 0xffff0000;
3030   }
3131   else // Main case: compute the reciprocal.
3232   {
trunk/src/emu/cpu/sh2/sh2.c
r248551r248552
143143
144144static ADDRESS_MAP_START( sh7604_map, AS_PROGRAM, 32, sh2_device )
145145   AM_RANGE(0x40000000, 0xbfffffff) AM_READ(sh2_internal_a5)
146/*!
146/*!
147147  @todo: cps3boot breaks with this enabled. Needs customization ...
148148  */
149//   AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM // cache data array
150//   AM_RANGE(0xffffff88, 0xffffff8b) AM_READWRITE(dma_dtcr0_r,dma_dtcr0_w)
149//  AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM // cache data array
150//  AM_RANGE(0xffffff88, 0xffffff8b) AM_READWRITE(dma_dtcr0_r,dma_dtcr0_w)
151151   AM_RANGE(0xe0000000, 0xe00001ff) AM_MIRROR(0x1ffffe00) AM_READWRITE(sh7604_r, sh7604_w)
152152ADDRESS_MAP_END
153153
r248551r248552
159159   AM_RANGE(0x05ffff48, 0x05ffff4b) AM_READWRITE16(dma_tcr0_r, dma_tcr0_w,0x0000ffff)
160160   AM_RANGE(0x05ffff4c, 0x05ffff4f) AM_READWRITE16(dma_chcr0_r, dma_chcr0_w, 0x0000ffff)
161161//  fall-back
162    AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7021_r,sh7021_w,0xffffffff) // SH-7032H internal i/o
163//   AM_RANGE(0x07000000, 0x070003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb)
164//   AM_RANGE(0x0f000000, 0x0f0003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb)
162   AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7021_r,sh7021_w,0xffffffff) // SH-7032H internal i/o
163//  AM_RANGE(0x07000000, 0x070003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb)
164//  AM_RANGE(0x0f000000, 0x0f0003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb)
165165ADDRESS_MAP_END
166166
167167static ADDRESS_MAP_START( sh7032_map, AS_PROGRAM, 32, sh1_device )
168168//  fall-back
169    AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o
169   AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o
170170ADDRESS_MAP_END
171171
172172sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r248551r248552
300300      m_program->write_byte(A & AM,V);
301301      return;
302302   }
303   
303
304304   m_program->write_byte(A,V);
305305}
306306
r248551r248552
311311      m_program->write_word(A & AM,V);
312312      return;
313313   }
314   
314
315315   m_program->write_word(A,V);
316316}
317317
r248551r248552
322322      m_program->write_dword(A & AM,V);
323323      return;
324324   }
325   
325
326326   /* 0x20000000 no Cache */
327327   /* 0x00000000 read thru Cache if CE bit is 1 */
328328   m_program->write_dword(A,V);
trunk/src/emu/cpu/sh2/sh2.h
r248551r248552
513513   DECLARE_READ16_MEMBER(sh7021_r);
514514   DECLARE_WRITE16_MEMBER(sh7021_w);
515515   void sh7032_dma_exec(int ch);
516   
516
517517private:
518518   UINT16 m_sh7021_regs[0x200];
519519   struct
520520   {
521      UINT32              sar;   /**< Source Address Register */
522      UINT32              dar;   /**< Destination Address Register */
523      UINT16            tcr;   /**< Transfer Count Register */
524      UINT16            chcr;   /**< Channel Control Register */
521      UINT32              sar;    /**< Source Address Register */
522      UINT32              dar;    /**< Destination Address Register */
523      UINT16              tcr;    /**< Transfer Count Register */
524      UINT16              chcr;   /**< Channel Control Register */
525525   } m_dma[4];
526   UINT16 m_dmaor;               /**< DMA Operation Register (status flags) */
526   UINT16 m_dmaor;                 /**< DMA Operation Register (status flags) */
527527
528528};
529529
trunk/src/emu/cpu/sh2/sh2comn.c
r248551r248552
899899void sh2a_device::sh7032_dma_exec(int ch)
900900{
901901   const short dma_word_size[4] = { 0, +1, -1, 0 };
902   UINT8 rs = (m_dma[ch].chcr >> 8) & 0xf;   /**< Resource Select bits */
902   UINT8 rs = (m_dma[ch].chcr >> 8) & 0xf; /**< Resource Select bits */
903903   if(rs != 0xc) // Auto-Request
904904   {
905905      logerror("Warning: SH7032 DMA enables non auto-request transfer\n");
r248551r248552
911911      return;
912912
913913   printf("%08x %08x %04x\n",m_dma[ch].sar,m_dma[ch].dar,m_dma[ch].chcr);
914   UINT8 dm = (m_dma[ch].chcr >> 14) & 3;   /**< Destination Address Mode bits */
915   UINT8 sm = (m_dma[ch].chcr >> 12) & 3;   /**< Source Address Mode bits */
916   bool ts = (m_dma[ch].chcr & 8);       /**< Transfer Size bit */
914   UINT8 dm = (m_dma[ch].chcr >> 14) & 3;  /**< Destination Address Mode bits */
915   UINT8 sm = (m_dma[ch].chcr >> 12) & 3;  /**< Source Address Mode bits */
916   bool ts = (m_dma[ch].chcr & 8);         /**< Transfer Size bit */
917917   int src_word_size = dma_word_size[sm] * ((ts == true) ? 2 : 1);
918918   int dst_word_size = dma_word_size[dm] * ((ts == true) ? 2 : 1);
919919   UINT32 src_addr = m_dma[ch].sar;
r248551r248552
10251025#if (defined(__MINGW32__) && (__GNUC__ >= 5))
10261026#pragma GCC diagnostic pop
10271027#endif
1028
trunk/src/emu/cpu/sm510/sm510.c
r248551r248552
66  - SM510: 2.7Kx8 ROM, 128x4 RAM(32x4 for LCD)
77  - SM511: 4Kx8 ROM, 128x4 RAM(32x4 for LCD), melody controller
88  - SM512: 4Kx8 ROM, 128x4 RAM(48x4 for LCD), melody controller
9 
9
1010  Other chips that may be in the same family, investigate more when one of
1111  them needs to get emulated: SM500, SM530/31, SM4A, SM3903, ..
1212
1313  References:
1414  - 1990 Sharp Microcomputers Data Book
1515  - 1996 Sharp Microcomputer Databook
16 
16
1717  TODO:
1818  - proper support for LFSR program counter in debugger
1919  - callback for lcd screen as MAME bitmap (when needed)
r248551r248552
146146   m_op = m_prev_op = 0;
147147   do_branch(3, 7, 0);
148148   m_prev_pc = m_pc;
149   
149
150150   // lcd is on (Bp on, BC off, bs(y) off)
151151   m_bp = true;
152152   m_bc = false;
153153   m_y = 0;
154   
154
155155   m_r = 0;
156156   m_write_r(0, 0, 0xff);
157157   m_melody_rd &= ~1;
r248551r248552
168168   // output 0 if lcd blackpate/bleeder is off, or in case row doesn't exist
169169   if (ram == NULL || m_bc || !m_bp)
170170      return 0;
171   
171
172172   UINT16 rowdata = 0;
173173   for (int i = 0; i < 0x10; i++)
174174      rowdata |= (ram[i] >> column & 1) << i;
175   
175
176176   return rowdata;
177177}
178178
r248551r248552
185185      m_write_sega(h | SM510_PORT_SEGA, get_lcd_row(h, m_lcd_ram_a), 0xffff);
186186      m_write_segb(h | SM510_PORT_SEGB, get_lcd_row(h, m_lcd_ram_b), 0xffff);
187187      m_write_segc(h | SM510_PORT_SEGC, get_lcd_row(h, m_lcd_ram_c), 0xffff);
188     
188
189189      // bs output from L/X and Y regs
190190      UINT8 bs = (m_l >> h & 1) | ((m_x*2) >> h & 2);
191191      m_write_segbs(h | SM510_PORT_SEGBS, (m_bc || !m_bp) ? 0 : bs, 0xffff);
192192   }
193   
193
194194   // schedule next timeout
195195   m_lcd_timer->adjust(attotime::from_ticks(0x200, unscaled_clock()));
196196}
r248551r248552
222222      0, 0, 8, 8, 9, 9, 10,10,11,12,12,13,14,15, 8*2, 8*2,
223223      0, 0, 8, 9, 9, 10,10,11,11,12,13,14,14,15, 8*2, 9*2
224224   };
225   
225
226226   UINT8 cmd = m_melody_rom[m_melody_address] & 0x3f;
227227   UINT8 out = 0;
228   
228
229229   // clock duty cycle if tone is active
230230   if ((cmd & 0xf) > 1)
231231   {
r248551r248552
245245      // rest tell signal
246246      m_melody_rd |= 2;
247247   }
248   
248
249249   // clock time base on F8(d7)
250250   if ((m_div & 0x7f) == 0)
251251   {
r248551r248552
255255      if (m_melody_step_count == 0)
256256         m_melody_address++;
257257   }
258   
258
259259   // output to R pin
260260   if (out != m_r)
261261   {
r248551r248552
293293      // after waking up, but we leave it unchanged
294294      m_halt = false;
295295      do_branch(1, 0, 0);
296     
296
297297      standard_irq_callback(0);
298298      return true;
299299   }
r248551r248552
305305{
306306   if (line != SM510_INPUT_LINE_K)
307307      return;
308   
308
309309   // set K input lines active state
310310   m_k_active = (state != 0);
311311}
r248551r248552
317317   // 1S signal on overflow(falling edge of f1)
318318   if (m_div == 0)
319319      m_1s = true;
320   
320
321321   clock_melody();
322322}
323323
trunk/src/emu/cpu/sm510/sm510.h
r248551r248552
134134   int m_stack_levels;
135135   UINT16 m_stack[2];
136136   int m_icount;
137   
137
138138   UINT8 m_acc;
139139   UINT8 m_bl;
140140   UINT8 m_bm;
r248551r248552
177177   bool wake_me_up();
178178   void init_divider();
179179   TIMER_CALLBACK_MEMBER(div_timer_cb);
180   
180
181181   // other i/o handlers
182182   devcb_read8 m_read_k;
183183   devcb_read_line m_read_ba;
r248551r248552
251251
252252   void op_rm();
253253   void op_sm();
254   
254
255255   void op_pre();
256256   void op_sme();
257257   void op_rme();
258258   void op_tmel();
259   
259
260260   void op_skip();
261261   void op_cend();
262262   void op_idiv();
r248551r248552
274274   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
275275   virtual void execute_one();
276276   virtual void get_opcode_param();
277   
277
278278   virtual void update_w_latch() { m_write_s(0, m_w, 0xff); } // W is connected directly to S
279279};
280280
trunk/src/emu/cpu/sm510/sm510d.c
r248551r248552
103103      param = oprom[s_next_pc[pc & 0x3f]];
104104      len++;
105105   }
106   
106
107107   // extended opcode
108108   bool is_extended = (instr == mEXT);
109109   if (is_extended)
r248551r248552
131131         UINT16 address = (param << 4 & 0xc00) | (mask << 6 & 0x3c0) | (param & 0x03f);
132132         dst += sprintf(dst, "$%03X", address);
133133      }
134     
134
135135      // show param offset
136136      if (bits >= 8)
137137         dst += sprintf(dst, " [$%03X]", pc + s_next_pc[pc & 0x3f]);
138138   }
139   
139
140140   return len | s_flags[instr] | DASMFLAG_SUPPORTED;
141141}
142142
r248551r248552
210210   UINT8 ext[0x100];
211211   memset(ext, 0, 0x100);
212212   memcpy(ext + 0x30, sm511_extended, 0x10);
213   
213
214214   return sm510_common_disasm(sm511_mnemonic, ext, buffer, pc, oprom, opram);
215215}
trunk/src/emu/cpu/sm510/sm510op.c
r248551r248552
5757void sm510_base_device::op_lb()
5858{
5959   // LB x: load BM/BL with 4-bit immediate value (partial)
60   
60
6161   // SM510 WIP..
6262   // bm and bl(low) are probably ok!
6363   m_bm = (m_bm & 4) | (m_op & 3);
6464   m_bl = (m_op >> 2 & 3);
65   
65
6666   // bl(high) is still unclear, official doc is confusing
6767   UINT8 hi = 0;
6868   switch (m_bl)
trunk/src/emu/cpu/sm510/sm511core.c
r248551r248552
102102         switch (m_op)
103103         {
104104      case 0x00: op_rot(); break;
105//      case 0x01: op_xxx(); break; // ?
105//      case 0x01: op_xxx(); break; // ?
106106      case 0x02: op_sbm(); break;
107107      case 0x03: op_atpl(); break;
108108      case 0x08: op_add(); break;
r248551r248552
119119      case 0x5a: op_ta0(); break;
120120      case 0x5b: op_tabl(); break;
121121      case 0x5c: op_atx(); break;
122//      case 0x5d: op_cend(); break;
122//      case 0x5d: op_cend(); break;
123123      case 0x5e: op_tal(); break;
124124      case 0x5f: op_lbl(); break;
125125
r248551r248552
127127      case 0x62: op_wr(); break;
128128      case 0x63: op_ws(); break;
129129      case 0x64: op_incb(); break;
130//      case 0x65: op_idiv(); break;
130//      case 0x65: op_idiv(); break;
131131      case 0x66: op_rc(); break;
132132      case 0x67: op_sc(); break;
133133      case 0x6c: op_decb(); break;
134134      case 0x6d: op_ptw(); break;
135135      case 0x6e: op_rtn0(); break;
136136      case 0x6f: op_rtn1(); break;
137     
137
138138      // extended opcodes
139139      case 0x60:
140140         m_op = m_op << 8 | m_param;
trunk/src/emu/cpu/ucom4/ucom4.h
r248551r248552
323323public:
324324   upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
325325
326protected:   
326protected:
327327   virtual UINT8 input_r(int index);
328328};
329329
trunk/src/emu/cpu/ucom4/ucom4op.c
r248551r248552
5959   // bidirectional ports are 'push-pull', meaning it will output 0 when it's read
6060   if ((index & 0xf) == NEC_UCOM4_PORTC || (index & 0xf) == NEC_UCOM4_PORTD)
6161      output_w(index, 0);
62   
62
6363   return ucom4_cpu_device::input_r(index);
6464}
6565
trunk/src/emu/machine/68230pit.c
r248551r248552
11// license:BSD-3-Clause
2// copyright-holders:Joakim Larsson Edström
2// copyright-holders:Joakim Larsson Edstr??m
33/**********************************************************************
44
55    Motorola MC68230 PI/T Parallell Interface and Timer
r248551r248552
4646//-------------------------------------------------
4747
4848pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
49        : device_t(mconfig, PIT68230, "Motorola 68230 PI/T", tag, owner, clock, "pit68230", __FILE__)
49      : device_t(mconfig, PIT68230, "Motorola 68230 PI/T", tag, owner, clock, "pit68230", __FILE__)
5050{
5151}
5252
5353void pit68230_device::device_start()
5454{
55  printf("PIT68230 device started\n");
55   printf("PIT68230 device started\n");
5656}
5757
5858void pit68230_device::device_reset()
5959{
60  printf("PIT68230 device reseted\n");
61  m_pgcr = 0;
62  m_psrr = 0;
63  m_paddr = 0;
64  m_pbddr = 0;
65  m_pcddr = 0;
66  m_pacr = 0;
67  m_pbcr = 0;
68  m_padr = 0;
69  m_pbdr = 0;
70  m_psr = 0;
60   printf("PIT68230 device reseted\n");
61   m_pgcr = 0;
62   m_psrr = 0;
63   m_paddr = 0;
64   m_pbddr = 0;
65   m_pcddr = 0;
66   m_pacr = 0;
67   m_pbcr = 0;
68   m_padr = 0;
69   m_pbdr = 0;
70   m_psr = 0;
7171}
7272
7373WRITE8_MEMBER( pit68230_device::data_w )
7474{
75  printf("data_w: %04x -> ", data);
76  switch (offset)
77  {
78  case PIT_68230_PGCR:
79    printf("PGCR");
80    m_pgcr = data;
81    break;
82  case PIT_68230_PSRR:
83    printf("PSRR");
84    m_psrr = data;
85    break;
86  case PIT_68230_PADDR:
87    printf("PADDR");
88    m_paddr = data;
89    break;
90  case PIT_68230_PBDDR:
91    printf("PBDDR");
92    m_pbddr = data;
93    break;
94  case PIT_68230_PACR:
95    printf("PACR");
96    m_pacr = data;
97    break;
98  case PIT_68230_PBCR:
99    printf("PBCR");
100    m_pbcr = data;
101    break;
102  case PIT_68230_PADR:
103    printf("PADR");
104    m_padr = data;
105    break;
106  case PIT_68230_PSR:
107    printf("PSR");
108    m_padr = data;
109    break;
110  default:
111    printf("unhandled register %02x", offset);
112  }
113  printf("\n");
75   printf("data_w: %04x -> ", data);
76   switch (offset)
77   {
78   case PIT_68230_PGCR:
79   printf("PGCR");
80   m_pgcr = data;
81   break;
82   case PIT_68230_PSRR:
83   printf("PSRR");
84   m_psrr = data;
85   break;
86   case PIT_68230_PADDR:
87   printf("PADDR");
88   m_paddr = data;
89   break;
90   case PIT_68230_PBDDR:
91   printf("PBDDR");
92   m_pbddr = data;
93   break;
94   case PIT_68230_PACR:
95   printf("PACR");
96   m_pacr = data;
97   break;
98   case PIT_68230_PBCR:
99   printf("PBCR");
100   m_pbcr = data;
101   break;
102   case PIT_68230_PADR:
103   printf("PADR");
104   m_padr = data;
105   break;
106   case PIT_68230_PSR:
107   printf("PSR");
108   m_padr = data;
109   break;
110   default:
111   printf("unhandled register %02x", offset);
112   }
113   printf("\n");
114114}
115115
116116READ8_MEMBER( pit68230_device::data_r )
117117{
118  UINT8 data = 0;
118   UINT8 data = 0;
119119
120  printf("data_r: ");
121  switch (offset)
122  {
123  case PIT_68230_PGCR:
124    printf("PGCR");
125    data = m_pgcr;
126    break;
127  case PIT_68230_PSRR:
128    printf("PSRR");
129    data = m_psrr;
130    break;
131  case PIT_68230_PADDR:
132    printf("PADDR");
133    data = m_paddr;
134    break;
135  case PIT_68230_PBDDR:
136    printf("PBDDR");
137    data = m_pbddr;
138    break;
139  case PIT_68230_PACR:
140    printf("PACR");
141    data = m_pacr;
142    break;
143  case PIT_68230_PBCR:
144    printf("PBCR");
145    data = m_pbcr;
146    break;
147  case PIT_68230_PADR:
148    printf("PADR");
149    data = m_padr;
150    break;
151  case PIT_68230_PBDR:
152    /* 4.6.2. PORT B DATA REGISTER (PBDR). The port B data register is a holding register for moving data
120   printf("data_r: ");
121   switch (offset)
122   {
123   case PIT_68230_PGCR:
124   printf("PGCR");
125   data = m_pgcr;
126   break;
127   case PIT_68230_PSRR:
128   printf("PSRR");
129   data = m_psrr;
130   break;
131   case PIT_68230_PADDR:
132   printf("PADDR");
133   data = m_paddr;
134   break;
135   case PIT_68230_PBDDR:
136   printf("PBDDR");
137   data = m_pbddr;
138   break;
139   case PIT_68230_PACR:
140   printf("PACR");
141   data = m_pacr;
142   break;
143   case PIT_68230_PBCR:
144   printf("PBCR");
145   data = m_pbcr;
146   break;
147   case PIT_68230_PADR:
148   printf("PADR");
149   data = m_padr;
150   break;
151   case PIT_68230_PBDR:
152   /* 4.6.2. PORT B DATA REGISTER (PBDR). The port B data register is a holding register for moving data
153153to and from port B pins. The port B data direction register determines whether each pin is an input (zero)
154or an output (one). This register is readable and writable at all times. Depending on the chosen mode/submode,
154or an output (one). This register is readable and writable at all times. Depending on the chosen mode/submode,
155155reading or writing may affect the double-buffered handshake mechanism. The port B data register is not affected
156by the assertion of the RESET pin. PB0-PB7 sits on pins 17-24 on a 48 pin DIP package */
157    printf("PBDR");
158    data = m_pbdr;
159    //    data = (m_pbdr & 0xfc) | 1; // CPU-1 centronics interface expects to see 2 lowest bits equal 1 for printer
160    break;
161  case PIT_68230_PSR:
162    printf("PSR");
163    data = m_psr;
164    //    data = m_psr | 1; // CPU-1 centronics interface expects status to be non zero
165    break;
166  default:
167    printf("unhandled register %02x", offset);
168    data = 0;
169  }
170  printf("\n");
156by the assertion of the RESET pin. PB0-PB7 sits on pins 17-24 on a 48 pin DIP package */
157   printf("PBDR");
158   data = m_pbdr;
159   //    data = (m_pbdr & 0xfc) | 1; // CPU-1 centronics interface expects to see 2 lowest bits equal 1 for printer
160   break;
161   case PIT_68230_PSR:
162   printf("PSR");
163   data = m_psr;
164   //    data = m_psr | 1; // CPU-1 centronics interface expects status to be non zero
165   break;
166   default:
167   printf("unhandled register %02x", offset);
168   data = 0;
169   }
170   printf("\n");
171171
172  return data;
172   return data;
173173}
174
175
trunk/src/emu/machine/68230pit.h
r248551r248552
11// license:BSD-3-Clause
2// copyright-holders:Joakim Larsson Edström
2// copyright-holders:Joakim Larsson Edstr??m
33/**********************************************************************
44
55    Motorola MC68230 PI/T Parallell Interface and Timer
r248551r248552
5656   virtual void device_reset();
5757
5858private:
59        UINT8  m_pgcr;  // Port General Control register
59      UINT8  m_pgcr;  // Port General Control register
6060   UINT8  m_psrr;  // Port Service Request register
6161   UINT8  m_paddr; // Port A Data Direction register
6262   UINT8  m_pbddr; // Port B Data Direction register
trunk/src/emu/machine/atapihle.c
r248551r248552
246246
247247   case IDE_COMMAND_CHECK_POWER_MODE:
248248      m_status = IDE_STATUS_DRDY;
249      m_sector_count = 0xff;      // Power mode: 0x00 = Standby, 0x80 = Idle mode, 0xff = Active mode or Idle mode
249      m_sector_count = 0xff;      // Power mode: 0x00 = Standby, 0x80 = Idle mode, 0xff = Active mode or Idle mode
250250      set_irq(ASSERT_LINE);
251251      break;
252252
trunk/src/emu/machine/nvram.c
r248551r248552
179179#if (defined(__MINGW32__) && (__GNUC__ >= 5))
180180#pragma GCC diagnostic pop
181181#endif
182
trunk/src/emu/machine/pci.c
r248551r248552
905905
906906#if (defined(__MINGW32__) && (__GNUC__ >= 5))
907907#pragma GCC diagnostic pop
908#endif
No newline at end of file
908#endif
trunk/src/emu/machine/saturn.c
r248551r248552
3838      H counter value 0x0ec (236) -> 0xe0
3939      H counter value 0x12c (300) -> 0x100
4040    - Timer 1 seems to count backwards compared to Timer 0 from setting 0x6b onward.
41    - Yabause claims that if VDP2 DISP bit isn't enabled then vblank irqs (hblank too?)
41    - Yabause claims that if VDP2 DISP bit isn't enabled then vblank irqs (hblank too?)
4242      doesn't happen.
4343
4444**************************************************************************************/
trunk/src/emu/machine/smpc.c
r248551r248552
686686      case 0x0a:
687687      case 0x0b:
688688         popmessage ("SMPC: NETLINK %s, contact MAMEdev",(data & 1) ? "off" : "on");
689         break;      case 0x0d:
689         break;      case 0x0d:
690690         if(LOG_SMPC) printf ("SMPC: System Reset\n");
691691         smpc_system_reset();
692692         break;
r248551r248552
943943         res|= 0xc;
944944         break;
945945   }
946   
946
947947   return res;
948948}
949949
trunk/src/emu/machine/stvcd.c
r248551r248552
866866            if(cr4 == 0)
867867               hirqreg |= (CMOK);
868868            else
869               hirqreg |= (CMOK|DRDY);               
869               hirqreg |= (CMOK|DRDY);
870870            status_type = 1;
871871         }
872872         break;
trunk/src/emu/machine/tms6100.c
r248551r248552
201201               /* read bit at address */
202202               /* if (m_variant == TMS6110_IS_M58819)
203203               {
204                  m_data = (m_rom[m_address >> 3] >> (7-(m_address & 0x07))) & 1;
204                   m_data = (m_rom[m_address >> 3] >> (7-(m_address & 0x07))) & 1;
205205               }
206206               else // m_variant == (TMS6110_IS_TMS6100 || TMS6110_IS_TMS6125)
207207               {
208                  */
208                   */
209209               m_data = (m_rom[m_address >> 3] >> (m_address & 0x07)) & 1;
210210               /* } */
211211               m_address++;
trunk/src/emu/machine/wd_fdc.h
r248551r248552
179179   void hlt_w(bool state);
180180
181181   bool enp_r();
182       
182
183183   void index_callback(floppy_image_device *floppy, int state);
184184
185185protected:
trunk/src/emu/mconfig.h
r248551r248552
6262   std::string             m_perfect_cpu_quantum;      // tag of CPU to use for "perfect" scheduling
6363   INT32                   m_watchdog_vblank_count;    // number of VBLANKs until the watchdog kills us
6464   attotime                m_watchdog_time;            // length of time until the watchdog kills us
65   bool               m_force_no_drc;            // whether or not to force DRC off
65   bool                    m_force_no_drc;             // whether or not to force DRC off
6666
6767   // other parameters
6868   const char *            m_default_layout;           // default layout for this machine
trunk/src/emu/netlist/analog/nld_opamps.c
r248551r248552
4242
4343/*
4444 * Type = 0: Impedance changer
45 *         1; Ideal opamp
46 *         2; opamp with first pole
47 *         3: opamp with first pole + output limit
48 *         4: opamp with input stage, first pole + output limit
45 *        1; Ideal opamp
46 *        2; opamp with first pole
47 *        3: opamp with first pole + output limit
48 *        4: opamp with input stage, first pole + output limit
4949 */
5050
5151NETLIB_START(OPAMP)
r248551r248552
141141
142142/*
143143NETLIB_DEVICE_WITH_PARAMS(OPAMPx,
144   NETLIB_NAME(R) m_RP;
145   NETLIB_NAME(C) m_CP;
146   NETLIB_NAME(VCCS) m_G1;
147   NETLIB_NAME(VCVS) m_EBUF;
144    NETLIB_NAME(R) m_RP;
145    NETLIB_NAME(C) m_CP;
146    NETLIB_NAME(VCCS) m_G1;
147    NETLIB_NAME(VCVS) m_EBUF;
148148
149   param_model_t m_model;
150   analog_input_t m_VH;
151   analog_input_t m_VL;
152   analog_input_t m_VREF;
149    param_model_t m_model;
150    analog_input_t m_VH;
151    analog_input_t m_VL;
152    analog_input_t m_VREF;
153153);
154154*/
155155
156156NETLIB_NAMESPACE_DEVICES_END()
157
trunk/src/emu/netlist/devices/net_lib.c
r248551r248552
7272   ENTRY(VCCS,                 VCCS,                   "-")
7373   ENTRY(CCCS,                 CCCS,                   "-")
7474   ENTRY(LVCCS,                LVCCS,                  "-")
75   ENTRY(VS,                   VS,                     "V")
75   ENTRY(VS,                   VS,                     "V")
7676   ENTRY(CS,                   CS,                     "I")
7777   ENTRY(OPAMP,                OPAMP,                  "MODEL")
7878   ENTRY(dummy_input,          DUMMY_INPUT,            "-")
7979   ENTRY(frontier,             FRONTIER_DEV,           "+I,G,Q")   // not intended to be used directly
80   ENTRY(function,             AFUNC,                   "N,FUNC")   // only for macro devices - NO FEEDBACK loops
80   ENTRY(function,             AFUNC,                  "N,FUNC")   // only for macro devices - NO FEEDBACK loops
8181   ENTRY(QBJT_EB,              QBJT_EB,                "MODEL")
8282   ENTRY(QBJT_switch,          QBJT_SW,                "MODEL")
8383   ENTRY(logic_input,          TTL_INPUT,              "IN")
trunk/src/emu/netlist/devices/nld_log.h
r248551r248552
2121#include "../nl_base.h"
2222
2323#define LOG(_name, _I)                                                       \
24      NET_REGISTER_DEV(ÖPG, _name)                                         \
24      NET_REGISTER_DEV(??PG, _name)                                         \
2525      NET_CONNECT(_name, I, _I)
2626
2727NETLIB_NAMESPACE_DEVICES_START()
trunk/src/emu/netlist/devices/nld_system.h
r248551r248552
2424
2525#define LOGIC_INPUT(_name, _v, _family)                                        \
2626      NET_REGISTER_DEV(LOGIC_INPUT, _name)                                   \
27      PARAM(_name.IN, _v)                                          \
27      PARAM(_name.IN, _v)                                                    \
2828      PARAM(_name.FAMILY, _family)
2929
3030#define ANALOG_INPUT(_name, _v)                                                \
r248551r248552
7070#define PARAMETERS(_name)                                                      \
7171      NET_REGISTER_DEV(PARAMETERS, _name)
7272
73#define AFUNC(_name, _N, _F)                                                \
73#define AFUNC(_name, _N, _F)                                                   \
7474      NET_REGISTER_DEV(AFUNC, _name)                                      \
75      PARAM(_name.N, _N)                                          \
75      PARAM(_name.N, _N)                                                     \
7676      PARAM(_name.FUNC, _F)
7777
7878NETLIB_NAMESPACE_DEVICES_START()
trunk/src/emu/netlist/macro/nlm_cd4xxx.c
r248551r248552
3838      s2.A,  /*    A3 |5           10| Y5   */ s3.Q,
3939      s2.B,  /*    Y3 |6            9| A4   */ s3.B,
4040      VDD.I, /*   GND |7            8| Y4   */ s3.A
41            /*       +--------------+      */
41            /*       +--------------+      */
4242   )
4343
4444NETLIST_END()
r248551r248552
7474      s1.Q7,   /*    Q7 |6           11| RESET */ s1.RESET,
7575      s1.Q4,   /*    Q4 |7           10| IP    */ s1.IP,
7676      s1.VSS,  /*   VSS |8            9| Q1    */ s1.Q1
77                /*       +--------------+       */
77               /*       +--------------+       */
7878   )
7979      /*
80       * IP =   (Input pulses)
80       * IP = (Input pulses)
8181       */
8282
8383NETLIST_END()
r248551r248552
117117   DIPPINS(      /*          +--------------+          */
118118      A.R.1,    /*   INOUTA |1     ++    14| VDD      */ A.PS.VDD,
119119      A.R.2,    /*   OUTINA |2           13| CONTROLA */ A.CTL,
120       B.R.1,    /*   OUTINB |3           12| CONTROLD */ D.CTL,
120      B.R.1,    /*   OUTINB |3           12| CONTROLD */ D.CTL,
121121      B.R.2,    /*   INOUTB |4    4066   11| INOUTD   */ D.R.1,
122122      B.CTL,    /* CONTROLB |5           10| OUTIND   */ D.R.2,
123123      C.CTL,    /* CONTROLC |6            9| OUTINC   */ C.R.1,
124124      A.PS.VSS, /*      VSS |7            8| INOUTC   */ C.R.2
125               /*          +--------------+          */
125               /*          +--------------+          */
126126   )
127127NETLIST_END()
128128
r248551r248552
143143   DIPPINS(      /*          +--------------+          */
144144      A.R.1,    /*   INOUTA |1     ++    14| VDD      */ A.PS.VDD,
145145      A.R.2,    /*   OUTINA |2           13| CONTROLA */ A.CTL,
146       B.R.1,    /*   OUTINB |3           12| CONTROLD */ D.CTL,
146      B.R.1,    /*   OUTINB |3           12| CONTROLD */ D.CTL,
147147      B.R.2,    /*   INOUTB |4    4016   11| INOUTD   */ D.R.1,
148148      B.CTL,    /* CONTROLB |5           10| OUTIND   */ D.R.2,
149149      C.CTL,    /* CONTROLC |6            9| OUTINC   */ C.R.1,
150150      A.PS.VSS, /*      VSS |7            8| INOUTC   */ C.R.2
151               /*          +--------------+          */
151               /*          +--------------+          */
152152   )
153153NETLIST_END()
154154
trunk/src/emu/netlist/macro/nlm_opamp.c
r248551r248552
1717      B.PLUS,   /*   |5           10|   */ C.PLUS,
1818      B.MINUS,  /*   |6            9|   */ C.MINUS,
1919      B.OUT,    /*   |7            8|   */ C.OUT
20              /*   +--------------+   */
20               /*   +--------------+   */
2121   )
2222   NET_C(A.GND, B.GND, C.GND, D.GND)
2323   NET_C(A.VCC, B.VCC, C.VCC, D.VCC)
r248551r248552
3333      A.MINUS,  /*   |2            7|   */ B.OUT,
3434      A.PLUS,   /*   |3            6|   */ B.MINUS,
3535      A.GND,    /*   |4            5|   */ B.PLUS
36              /*   +--------------+   */
36               /*   +--------------+   */
3737   )
3838   NET_C(A.GND, B.GND)
3939   NET_C(A.VCC, B.VCC)
trunk/src/emu/netlist/macro/nlm_opamp.h
r248551r248552
99 *  Netlist Macros
1010 * ---------------------------------------------------------------------------*/
1111
12#define MB3614_DIP(_name)                                                    \
12#define MB3614_DIP(_name)                                                      \
1313      NET_REGISTER_DEV(MB3614_DIP, _name)
1414
15#define LM324_DIP(_name)                                                    \
15#define LM324_DIP(_name)                                                       \
1616      NET_REGISTER_DEV(LM324_DIP, _name)
1717
18#define LM358_DIP(_name)                                                    \
18#define LM358_DIP(_name)                                                       \
1919      NET_REGISTER_DEV(LM358_DIP, _name)
2020
2121/* ----------------------------------------------------------------------------
trunk/src/emu/netlist/macro/nlm_other.c
r248551r248552
66
77/*
88 *   MC14584B: Hex Schmitt Trigger
9 *             ON Semiconductor
9 *             ON Semiconductor
1010 *
1111 *          +--------------+
1212 *       A1 |1     ++    14| VCC
r248551r248552
3939      s3.A,  /*    A3 |5           10| Y5   */ s5.Q,
4040      s3.Q,  /*    Y3 |6            9| A4   */ s4.A,
4141      GND.I, /*   GND |7            8| Y4   */ s4.Q
42            /*       +--------------+      */
42            /*       +--------------+      */
4343   )
4444NETLIST_END()
4545
trunk/src/emu/netlist/macro/nlm_other.h
r248551r248552
99 *  Netlist Macros
1010 * ---------------------------------------------------------------------------*/
1111
12#define MC14584B_GATE(_name)                                                   \
12#define MC14584B_GATE(_name)                                                   \
1313      NET_REGISTER_DEV(MC14584B_GATE, _name)
1414
15#define MC14584B_DIP(_name)                                                    \
15#define MC14584B_DIP(_name)                                                    \
1616      NET_REGISTER_DEV(MC14584B_DIP, _name)
1717
1818
trunk/src/emu/netlist/macro/nlm_ttl74xx.c
r248551r248552
66
77/*
88 *   DM7416: Hex Inverting Buffers with
9 *           High Voltage Open-Collector Outputs
9 *           High Voltage Open-Collector Outputs
1010 *
1111 *          +--------------+
1212 *       A1 |1     ++    14| VCC
r248551r248552
3939      s3.A,  /*    A3 |5           10| Y5   */ s5.Q,
4040      s3.Q,  /*    Y3 |6            9| A4   */ s4.A,
4141      GND.I, /*   GND |7            8| Y4   */ s4.Q
42            /*       +--------------+      */
42            /*       +--------------+      */
4343   )
4444NETLIST_END()
4545
trunk/src/emu/netlist/macro/nlm_ttl74xx.h
r248551r248552
99 *  Netlist Macros
1010 * ---------------------------------------------------------------------------*/
1111
12#define TTL_7416_GATE(_name)                                                 \
12#define TTL_7416_GATE(_name)                                                   \
1313      NET_REGISTER_DEV(TTL_7416_GATE, _name)
1414
15#define TTL_7416_DIP(_name)                                                    \
15#define TTL_7416_DIP(_name)                                                    \
1616      NET_REGISTER_DEV(TTL7416_DIP, _name)
1717
1818/* ----------------------------------------------------------------------------
trunk/src/emu/netlist/nl_base.c
r248551r248552
535535
536536   // FIXME: make this working again
537537   //if (term.isType(terminal_t::INPUT) || term.isType(terminal_t::TERMINAL))
538   //   m_terminals.add(name);
538   //  m_terminals.add(name);
539539}
540540
541541ATTR_COLD void device_t::register_terminal(const pstring &name, terminal_t &port)
trunk/src/emu/netlist/nl_base.h
r248551r248552
241241      , _priv)
242242
243243#define NETLIB_LOGIC_FAMILY(_fam)                                               \
244virtual logic_family_desc_t *default_logic_family()                          \
244virtual logic_family_desc_t *default_logic_family()                             \
245245{                                                                               \
246246   return netlist_family_ ## _fam;                                             \
247247}
r248551r248552
394394         VCCS,       // Voltage controlled current source
395395         LVCCS,      // Voltage controlled current source (Current limited)
396396         CCCS,       // Current controlled current source
397         VS,         // Voltage Source
398         CS,         // Current Source
397         VS,         // Voltage Source
398         CS,         // Current Source
399399         GND         // GND device
400400      };
401401
trunk/src/emu/netlist/nl_factory.c
r248551r248552
3434}
3535
3636
37factory_list_t::factory_list_t(   setup_t &setup)
37factory_list_t::factory_list_t( setup_t &setup)
3838: m_setup(setup)
3939{
4040}
trunk/src/emu/netlist/nl_setup.h
r248551r248552
5858      setup.register_source(palloc(netlist::source_proc_t(# _name, &NETLIST_NAME(_name))));
5959
6060#define LOCAL_LIB_ENTRY(_name)                                                 \
61      LOCAL_SOURCE(_name)                                          \
61      LOCAL_SOURCE(_name)                                                    \
6262      setup.register_lib_entry(# _name);
6363
6464#define INCLUDE(_name)                                                         \
trunk/src/emu/netlist/plib/palloc.h
r248551r248552
7979   pfree_raw(s);
8080}
8181
82#define palloc(T)             new(ppool) T
82#define palloc(T)             new(ppool) T
8383#define pfree(_ptr)           pfree_t(_ptr)
8484
8585#if 1
r248551r248552
9494
9595#define ATTR_ALIGN
9696
97#define palloc(T)             global_alloc(T)
97#define palloc(T)             global_alloc(T)
9898#define pfree(_ptr)           global_free(_ptr)
9999
100100#define palloc_array(T, N)    global_alloc_array(T, N)
trunk/src/emu/netlist/plib/pconfig.h
r248551r248552
4040//============================================================
4141
4242// prevent implicit copying
43#define P_PREVENT_COPYING(_name)                \
43#define P_PREVENT_COPYING(_name)                \
4444   private:                                    \
4545      _name(const _name &);                   \
4646      _name &operator=(const _name &);
r248551r248552
234234#if (defined(__MINGW32__) && (__GNUC__ >= 5))
235235#pragma GCC diagnostic pop
236236#endif
237
trunk/src/emu/netlist/plib/plists.h
r248551r248552
657657#if 0
658658   unsigned hash(const pstring &v) const
659659   {
660      /* FowlerNollVo hash - FNV-1 */
660      /* Fowler???Noll???Vo hash - FNV-1 */
661661      const char *string = v.cstr();
662662      unsigned result = 2166136261;
663663      for (UINT8 c = *string++; c != 0; c = *string++)
r248551r248552
671671      /* jenkins one at a time algo */
672672      unsigned result = 0;
673673      const char *string = v.cstr();
674       while (*string)
675       {
676           result += *string;
677           string++;
678           result += (result << 10);
679           result ^= (result >> 6);
680       }
681       result += (result << 3);
682       result ^= (result >> 11);
683       result += (result << 15);
684       return result;
674      while (*string)
675      {
676         result += *string;
677         string++;
678         result += (result << 10);
679         result ^= (result >> 6);
680      }
681      result += (result << 3);
682      result ^= (result >> 11);
683      result += (result << 15);
684      return result;
685685   }
686686#endif
687687#endif
trunk/src/emu/netlist/plib/pstate.c
r248551r248552
7575   m_save.add(p);
7676   state.register_state(*this, stname);
7777}
78
trunk/src/emu/netlist/solver/mat_cr.h
r248551r248552
9292       *
9393       * ==> LUx = r
9494       *
95       * ==> Ux = L⁻¹r = w
95       * ==> Ux = L?????r = w
9696       *
9797       * ==> r = Lw
9898       *
trunk/src/emu/netlist/solver/vector_base.h
r248551r248552
4242}
4343inline double vecmult (const std::size_t n, const double * RESTRICT a1, const double * RESTRICT a2 )
4444{
45
4645   double value = 0.0;
4746   for ( std::size_t i = 0; i < n; i++ )
4847      value = value + a1[i] * a2[i];
trunk/src/emu/netlist/tools/nl_convert.c
r248551r248552
188188      {"M",   "CAP_M(%g)", 1.0e-3 },
189189      {"u",   "CAP_U(%g)", 1.0e-6 }, /* eagle */
190190      {"U",   "CAP_U(%g)", 1.0e-6 },
191      {"μ",   "CAP_U(%g)", 1.0e-6    },
191      {"??",   "CAP_U(%g)", 1.0e-6    },
192192      {"N",   "CAP_N(%g)", 1.0e-9 },
193193      {"P",   "CAP_P(%g)", 1.0e-12},
194194      {"F",   "%ge-15",    1.0e-15},
trunk/src/emu/schedule.c
r248551r248552
993993#if (defined(__MINGW32__) && (__GNUC__ >= 5))
994994#pragma GCC diagnostic pop
995995#endif
996
trunk/src/emu/screen.h
r248551r248552
355355
356356/*!
357357 @brief Configures screen parameters for the given screen.
358
358
359359 @param _pixclock Pixel Clock frequency value
360360 @param _htotal Total number of horizontal pixels, including hblank period.
361361 @param _hbend Horizontal pixel position for HBlank end event, also first pixel where screen rectangle is visible.
r248551r248552
369369
370370/*!
371371 @brief Sets the number of Frames Per Second for this screen
372
372
373373 @param _rate FPS number
374374 @deprecated Please use MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings.
375375 */
r248551r248552
378378
379379/*!
380380 @brief Sets the vblank time of the given screen
381
381
382382 @param _time Time parameter, in attotime value\
383383 @deprecated Please use MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings.
384384 */
r248551r248552
387387
388388/*!
389389 @brief Sets total screen size, including H/V-Blanks
390
390
391391 @param _width Screen horizontal size
392392 @param _height Screen vertical size
393393 @deprecated Please use MCFG_SCREEN_RAW_PARAMS instead. Gives imprecise timings.
r248551r248552
397397
398398/*!
399399 @brief Sets screen visible area
400
400
401401 @param _minx Screen left border
402402 @param _maxx Screen right border, must be in N-1 format
403403 @param _miny Screen top border
trunk/src/emu/sound/c140.c
r248551r248552
134134   /* allocate a pair of buffers to mix into - 1 second's worth should be more than enough */
135135   m_mixer_buffer_left = auto_alloc_array(machine(), INT16, 2 * m_sample_rate);
136136   m_mixer_buffer_right = m_mixer_buffer_left + m_sample_rate;
137   
137
138138   save_item(NAME(m_REG));
139   
139
140140   for (int i = 0; i < C140_MAX_VOICE; i++)
141   {   
141   {
142142      save_item(NAME(m_voi[i].ptoffset), i);
143143      save_item(NAME(m_voi[i].pos), i);
144144      save_item(NAME(m_voi[i].key), i);
trunk/src/emu/sound/discrete.c
r248551r248552
11461146#if (defined(__MINGW32__) && (__GNUC__ >= 5))
11471147#pragma GCC diagnostic pop
11481148#endif
1149
trunk/src/emu/sound/scsp.c
r248551r248552
10511051         */
10521052         logerror("SCSP: Reading from EXTS register %08x\n",addr);
10531053         if(addr == 0xee0)
1054            v =   space.machine().device<cdda_device>("cdda")->get_channel_volume(0);
1054            v = space.machine().device<cdda_device>("cdda")->get_channel_volume(0);
10551055         if(addr == 0xee2)
10561056            v = space.machine().device<cdda_device>("cdda")->get_channel_volume(1);
10571057      }
trunk/src/emu/sound/tms36xx.c
r248551r248552
375375      m_decay[0], m_decay[1], m_decay[2],
376376      m_decay[3], m_decay[4], m_decay[5]));
377377   LOG(("TMS36xx speed         %d\n", m_speed));
378   
378
379379   save_item(NAME(m_octave));
380380   save_item(NAME(m_tune_counter));
381381   save_item(NAME(m_note_counter));
trunk/src/emu/sound/ymf278b.c
r248551r248552
10111011   // Register state for saving
10121012   register_save_state();
10131013
1014   // YMF262 related
1014   // YMF262 related
10151015
10161016   /* stream system initialize */
10171017   int ymf262_clock = clock() / (19/8.0);
trunk/src/emu/video/hd44780.h
r248551r248552
7070   {
7171      CHARSET_HD44780_A00,
7272      CHARSET_KS0066_F05 /*,
73      CHARSET_HD44780_A01,
74      CHARSET_HD44780_A02,
75      CHARSET_KS0066_F00,
76      CHARSET_KS0066_F03,
77      CHARSET_KS0066_F04,
78      CHARSET_KS0066_F06,
79      CHARSET_KS0066_F59
80      */
73        CHARSET_HD44780_A01,
74        CHARSET_HD44780_A02,
75        CHARSET_KS0066_F00,
76        CHARSET_KS0066_F03,
77        CHARSET_KS0066_F04,
78        CHARSET_KS0066_F06,
79        CHARSET_KS0066_F59
80        */
8181   };
8282
8383   void set_charset_type(int type);
trunk/src/emu/video/i82730.c
r248551r248552
1515//  CONSTANTS
1616//**************************************************************************
1717
18#define VERBOSE   1
19#define VERBOSE_COMMANDS   1
20#define VERBOSE_DATASTREAM   0
18#define VERBOSE 1
19#define VERBOSE_COMMANDS    1
20#define VERBOSE_DATASTREAM  0
2121
2222
2323//**************************************************************************
trunk/src/emu/video/i82730.h
r248551r248552
3535//  TYPE DEFINITIONS
3636//**************************************************************************
3737
38typedef device_delegate<void (bitmap_rgb32 &bitmap, UINT16 *data, UINT8 lc,   UINT16 y, int x_count)> i82730_update_row_delegate;
38typedef device_delegate<void (bitmap_rgb32 &bitmap, UINT16 *data, UINT8 lc, UINT16 y, int x_count)> i82730_update_row_delegate;
3939
40#define I82730_UPDATE_ROW(name)   \
40#define I82730_UPDATE_ROW(name) \
4141   void name(bitmap_rgb32 &bitmap, UINT16 *data, UINT8 lc, UINT16 y, int x_count)
4242
4343
trunk/src/emu/video/mb_vcu.c
r248551r248552
191191            3,  resistances_gb, m_weights_b,    3600,   0,
192192            2,  resistances_r,  m_weights_r,    3600,   0);
193193   }
194   
194
195195   save_item(NAME(m_status));
196196   save_pointer(NAME(m_ram), 0x800);
197197   save_pointer(NAME(m_palram), 0x100);
trunk/src/emu/video/rgbsse.h
r248551r248552
349349      add(other);
350350      clamp_to_uint8();
351351   }
352   
352
353353   inline void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other)
354354   {
355355      mul(scale);
r248551r248552
362362   {
363363      rgbaint_t color2(other);
364364      color2.mul(scale2);
365   
365
366366      mul(scale);
367367      add(color2);
368368      sra_imm(8);
trunk/src/emu/video/vooddefs.h
r248551r248552
32093209   INT32 smax, tmax;                                                           \
32103210   UINT32 texbase;                                                             \
32113211   rgb_union c_local;                                                          \
3212                                                                               \
3212                                                            \
32133213   /* determine the S/T/LOD values for this texture */                         \
32143214   if (TEXMODE_ENABLE_PERSPECTIVE(TEXMODE))                                    \
32153215   {                                                                           \
r248551r248552
47434743   double recip = double(1ULL<<(47-39))/valueC;
47444744   double resAD = valueA * recip;
47454745   double resBD = valueB * recip;
4746  log = new_log2(recip);
4747  log += 56<<8;
4748  resA = resAD;
4749  resB = resBD;
4746   log = new_log2(recip);
4747   log += 56<<8;
4748   resA = resAD;
4749   resB = resBD;
47504750}
47514751
47524752
trunk/src/mame/arcade.lst
r248551r248552
4444maketrax        // (c) 1981 Williams, high score table says KRL (fur Kural)
4545maketrxb        // (c) 1981 [Kural] (Williams license)
4646korosuke        // (c) 1981 Kural Electric
47crushrlf      // bootleg
47crushrlf        // bootleg
4848mbrush          // 1981 bootleg
4949paintrlr        // 1981 bootleg
5050crushs          // 1981 bootleg
r248551r248552
339339scobra          // GX316 (c) 1981 Konami
340340scobras         // GX316 (c) 1981 Stern
341341scobrase        // GX316 (c) 1981 Sega
342scobrae         // GX316 (c) 1981 Stern
342scobrae         // GX316 (c) 1981 Stern
343343scobrab         // GX316 (c) 1981 Karateco (bootleg?)
344344suprheli        // bootleg
345345stratgyx        // GX306 (c) 1981 Konami
r248551r248552
684684vautour         // bootleg (Jeutel)
685685falconz         // bootleg
686686vautourz        // bootleg
687vautourza      // bootleg (Jeutal)
687vautourza       // bootleg (Jeutal)
688688griffon         // bootleg (Videotron)
689689nextfase        // bootleg
690690phoenixs        // bootleg (Sonic)
691phoenixass      // bootleg (Assa)
691phoenixass      // bootleg (Assa)
692692avefenix        // bootleg (Video Game)
693693avefenixrf      // bootleg (Recreativos Franco)
694avefenixl      // bootleg (Laguna)
694avefenixl       // bootleg (Laguna)
695695pleiads         // (c) 1981 Tehkan
696696pleiadsb2       // bootleg
697697pleiadbl        // bootleg
r248551r248552
12421242marioj          // (c) 1983 Nintendo
12431243masao           // bootleg
12441244mariobl         // bootleg
1245mmagic         // (c) 1979 Nintendo
1245mmagic          // (c) 1979 Nintendo
12461246dkong3abl       //
12471247pestplce        // bootleg on donkey kong hw
12481248spclforc        // (c) 1985 Senko Industries (Magic Eletronics Inc. license)
r248551r248552
32873287rockmanj        // 22/09/1995 (c) 1995 (Japan)
32883288fcrash          // bootleg of Final Fight
32893289ffightbl        // bootleg
3290ffightbla      // bootleg
3290ffightbla       // bootleg
32913291ganbare         // 11/04/2000 (c) 2000 (Japan)
32923292
32933293
r248551r248552
34543454xmvsfr1         // 10/09/1996 (c) 1996 (Euro)
34553455xmvsfu          // 23/10/1996 (c) 1996 (USA)
34563456xmvsfur1        // 04/10/1996 (c) 1996 (USA)
3457xmvsfur2      // 10/09/1996 (c) 1996 (USA)
3457xmvsfur2        // 10/09/1996 (c) 1996 (USA)
34583458xmvsfj          // 04/10/1996 (c) 1996 (Japan)
34593459xmvsfjr1        // 10/09/1996 (c) 1996 (Japan)
34603460xmvsfjr2        // 09/09/1996 (c) 1996 (Japan)
r248551r248552
45184518turbo           // (c) 1981 Sega
45194519turboa          // (c) 1981 Sega
45204520turbob          // (c) 1981 Sega
4521turboc         // (c) 1981 Sega
4522turbod         // (c) 1981 Sega
4521turboc          // (c) 1981 Sega
4522turbod          // (c) 1981 Sega
45234523turbobl         // bootleg
45244524subroc3d        // (c) 1982 Sega
45254525buckrog         // (c) 1982 Sega
r248551r248552
46974697passshtb        // bootleg
46984698shinoblb        // (c) 1987 (but bootleg)
46994699shinobld        // (c) 1987 (but bootleg)
4700shinoblda      //
4700shinoblda       //
47014701tetrisbl        // (c) 1988 (but bootleg)
47024702beautyb         // (c) 1991 AMT
47034703iqpipe          // (c) 1991 AMT
r248551r248552
57725772            // 2006.09 Sega Network Taisen Mahjong MJ 3 Evolution (Rev A)
57735773            // 2006.10 Quest of D Oukoku no Syugosya Ver.3.00
57745774            // 2006.11 Quest of D Oukoku no Syugosya Ver.3.01
5775mj3evo      // 2007.06 Sega Network Taisen Mahjong MJ 3 Evolution (Rev B)
5775mj3evo      // 2007.06 Sega Network Taisen Mahjong MJ 3 Evolution (Rev B)
57765776            // 2007.11 Quest of D The Battle Kingdom Ver.4.00
57775777            // 2008.01 Quest of D The Battle Kingdom Ver.4.00b
57785778            // 2008.02 Quest of D The Battle Kingdom Ver.4.00c
r248551r248552
60316031midresu         // (c) 1989 Data East USA (US)
60326032midresj         // (c) 1989 Data East Corporation (Japan)
60336033midresb         // bootleg
6034midresbj      // bootleg
6034midresbj        // bootleg
60356035bouldash        // (c) 1990 Data East Corporation (World)
60366036bouldashj       // (c) 1990 Data East Corporation (Japan)
60376037// end of similar hardware
r248551r248552
64816481esckidsj        // GX975 (c) 1991 (Japan)
64826482vendetta        // GX081 (c) 1991 (World)
64836483vendettar       // GX081 (c) 1991 (World)
6484vendettaz      // GX081 (c) 1991 (World)
6484vendettaz       // GX081 (c) 1991 (World)
64856485vendetta2p      // GX081 (c) 1991 (World)
64866486vendetta2peba   // GX081 (c) 1991 (World)
64876487vendetta2pu     // GX081 (c) 1991 (Asia)
r248551r248552
71397139roadblstc       // 136048           (c) 1986, 1987
71407140roadblstcg      // 136048           (c) 1986, 1987
71417141roadblstc1      // 136048           (c) 1986, 1987
7142roadblstgu      // 136048         (c) 1986, 1987
7142roadblstgu      // 136048           (c) 1986, 1987
71437143
71447144// Atari System 2 games
71457145// Paperboy
r248551r248552
82828282blitz           // (c) 1997 Midway Games
82838283blitz11         // (c) 1997 Midway Games
82848284blitz99         // (c) 1998 Midway Games
8285blitz99a      // (c) 1998 Midway Games
8285blitz99a        // (c) 1998 Midway Games
82868286blitz2k         // (c) 1999 Midway Games
82878287hyprdriv        // (c) 1998 Midway Games
82888288
r248551r248552
82978297warfa           // (c) 1999 Atari Games
82988298nbashowt        // (c) 1998 Midway Games
82998299nbanfl          // (c) 1999 Midway Games
8300nbagold      // (c) 2000 Midway Games
8300nbagold     // (c) 2000 Midway Games
83018301gauntdl         // (c) 1999 Midway Games
83028302gauntdl24       // (c) 1999 Midway Games
83038303cartfury        // (c) 2000 Midway Games
r248551r248552
87218721stdragona       // (c) 1989
87228722rodland         // (c) 1990
87238723rodlandj        // (c) 1990 (Japan)
8724rittam      // Prototype or hack of Rod-Land
8724rittam      // Prototype or hack of Rod-Land
87258725rodlandjb       // bootleg
87268726avspirit        // (c) 1991
87278727phantasm        // (c) 1991 (Japan)
r248551r248552
88018801pspikesu        // (c) 1991 Video System Co. (US)
88028802svolly91        // (c) 1991 Video System Co. (Japan)
88038803pspikesb        // bootleg
8804pspikesba      // bootleg
8804pspikesba       // bootleg
88058805spikes91        // bootleg
88068806spikes91b       // bootleg
88078807pspikesc        // bootleg
88088808karatblz        // (c) 1991 Video System Co.
88098809karatblzu       // (c) 1991 Video System Co. (US)
88108810karatblzj       // (c) 1991 Video System / Tecmo (Japan)
8811karatblzbl      // bootleg
8811karatblzbl      // bootleg
88128812turbofrc        // (c) 1991 Video System Co.
88138813aerofgt         // (c) 1992 Video System Co.
88148814aerofgtb        // (c) 1992 Video System Co.
r248551r248552
88658865dreamwld        // (c) 2000 SemiCom
88668866rolcrush        // (c) 1999 Trust
88678867cutefght        // (c) 1998 SemiCom
8868gaialast      // (c) 1999 SemiCom
8868gaialast        // (c) 1999 SemiCom
88698869
88708870// SH2 board
88718871s1945ii         // (c) 1997
r248551r248552
96869686maya            // (c) 1994 Promat
96879687mayaa           // (c) 1994 Promat
96889688mayab           // (c) 1994 Promat
9689mayac         // (c) 1994 Promat
9689mayac           // (c) 1994 Promat
96909690inca            // (c) 199? ????
96919691blktouch        // (c) Yang Gi Co Ltd.
96929692mcnpshnt        // "33" Mahjong Campus Hunting 1990 Dynax
r248551r248552
1068510685pitbossb        // (c) 1983 Merit
1068610686pitbossc        // (c) 1983 Merit
1068710687casino5         // (c) 1984 Merit
10688mroundup      // (c) 1984 Merit
10688mroundup        // (c) 1984 Merit
1068910689trvwzh          // (c) 1985 Merit
1069010690trvwzha         // (c) 1985 Merit
1069110691trvwzhb         // (c) 1985 Merit
r248551r248552
1285512855quizard         // (c) TAB Austria 199?
1285612856quizard_17      // (c) TAB Austria 1996
1285712857quizard_12      // (c) TAB Austria 1996
12858quizard_10      // (c) TAB Austria 1996
12858quizard_10      // (c) TAB Austria 1996
1285912859quizard2        // (c) TAB Austria 1995
1286012860quizard2_22     // (c) TAB Austria 199?
1286112861quizard3        // (c) TAB Austria 1996
trunk/src/mame/audio/seibu.h
r248551r248552
195195   MCFG_CPU_PROGRAM_MAP(seibu3_adpcm_sound_map)                    \
196196   MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
197197
198#define SEIBU_SOUND_SYSTEM_ENCRYPTED_LOW()                     \
199   MCFG_DEVICE_MODIFY("seibu_sound")                        \
200   downcast<seibu_sound_device *>(device)->set_encryption(1);      \
201   MCFG_DEVICE_MODIFY("audiocpu")                           \
198#define SEIBU_SOUND_SYSTEM_ENCRYPTED_LOW()                          \
199   MCFG_DEVICE_MODIFY("seibu_sound")                               \
200   downcast<seibu_sound_device *>(device)->set_encryption(1);      \
201   MCFG_DEVICE_MODIFY("audiocpu")                                  \
202202   MCFG_CPU_DECRYPTED_OPCODES_MAP(seibu_sound_decrypted_opcodes_map)
203203
204#define SEIBU_SOUND_SYSTEM_ENCRYPTED_FULL()                     \
205   MCFG_DEVICE_MODIFY("seibu_sound")                        \
206   downcast<seibu_sound_device *>(device)->set_encryption(2);      \
207   MCFG_DEVICE_MODIFY("audiocpu")                           \
204#define SEIBU_SOUND_SYSTEM_ENCRYPTED_FULL()                         \
205   MCFG_DEVICE_MODIFY("seibu_sound")                               \
206   downcast<seibu_sound_device *>(device)->set_encryption(2);      \
207   MCFG_DEVICE_MODIFY("audiocpu")                                  \
208208   MCFG_CPU_DECRYPTED_OPCODES_MAP(seibu_sound_decrypted_opcodes_map)
209209
210#define SEIBU_SOUND_SYSTEM_ENCRYPTED_CUSTOM()                  \
211   MCFG_DEVICE_MODIFY("seibu_sound")                        \
212   downcast<seibu_sound_device *>(device)->set_encryption(3);      \
213   MCFG_DEVICE_MODIFY("audiocpu")                           \
210#define SEIBU_SOUND_SYSTEM_ENCRYPTED_CUSTOM()                       \
211   MCFG_DEVICE_MODIFY("seibu_sound")                               \
212   downcast<seibu_sound_device *>(device)->set_encryption(3);      \
213   MCFG_DEVICE_MODIFY("audiocpu")                                  \
214214   MCFG_CPU_DECRYPTED_OPCODES_MAP(seibu_sound_decrypted_opcodes_map)
215215
216216#define SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(freq1,freq2)            \
trunk/src/mame/drivers/aerofgt.c
r248551r248552
15211521   MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */
15221522   MCFG_CPU_PROGRAM_MAP(karatblzbl_sound_map)
15231523
1524//   MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
1525//   MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
1524//  MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
1525//  MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
15261526
15271527   /* video hardware */
15281528   MCFG_SCREEN_ADD("screen", RASTER)
r248551r248552
15541554   /* sound hardware */
15551555   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
15561556
1557   // NEC D7759c + YM????
1557   // NEC D7759c + YM????
15581558MACHINE_CONFIG_END
15591559
15601560static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
r248551r248552
24802480   ROM_LOAD16_BYTE( "gfx21.u71",        0x2c0000, 0x020000, CRC(ffd66ea0) SHA1(fc1b2fa27d28a61b381e3d4f15809c740082d07f) )
24812481   ROM_LOAD16_BYTE( "gfx26.u76",        0x2c0001, 0x020000, CRC(7ae76103) SHA1(5c42fbe133cbf600d2150295a70a1541b79706b5) )
24822482   ROM_LOAD16_BYTE( "gfx25.u67",        0x300000, 0x020000, CRC(1195b559) SHA1(2fd00b3360df5f0a762569ab49c445b68568cf2e) )
2483   ROM_LOAD16_BYTE( "gfx30.u72",        0x300001, 0x020000, CRC(7593679f) SHA1(3a6199d1dc60d2c05084fe41c639228613831d99) )
2483   ROM_LOAD16_BYTE( "gfx30.u72",        0x300001, 0x020000, CRC(7593679f) SHA1(3a6199d1dc60d2c05084fe41c639228613831d99) )
24842484
24852485   ROM_REGION( 0x100000, "gfx4", 0 )
24862486   ROM_LOAD16_BYTE( "5.u62",        0x000000, 0x040000, CRC(1ed12174) SHA1(1e4fc511ad644aaf90505f7930957b4adf9f6c2a) )
trunk/src/mame/drivers/aleisttl.c
r248551r248552
77 Chase (aka Chase1) (1976)
88 Deluxe Soccer (1973)
99 Fire Power (1975)                EG-1020-2
10 Fütsball (1975)
10 F??tsball (1975)
1111 Galaxy Raider (1974)
1212 Hesitation (1974)                AL-6500?
1313 Hockey, Soccer, Tennis (1974)
trunk/src/mame/drivers/appoooh.c
r248551r248552
393393void appoooh_state::machine_start()
394394{
395395   membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0xa000, 0x6000);
396   
396
397397   save_item(NAME(m_adpcm_data));
398398   save_item(NAME(m_adpcm_address));
399399}
trunk/src/mame/drivers/arkanoid.c
r248551r248552
13661366
13671367/* ROMs */
13681368/* rom numbering, with guesses:
1369   A75 01   = Z80 code 1/2 v1.0 Japan
1370   A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar
1371   A75 02   = Z80 code 2/2 v1.0 Japan
1372   A75 03   = GFX 1/3
1373   A75 04   = GFX 2/3
1374   A75 05   = GFX 3/3
1375   A75 06   = MC68705P5 MCU code, v1.0 Japan and v1.0 USA/Romstar
1376   A75 07   = PROM red
1377   A75 08   = PROM green
1378   A75 09   = PROM blue
1379   A75 10   = Z80 code 2/2 v1.1 USA/Romstar
1380   A75 11   = Z80 code 2/2 v1.2 Japan (paired with 01-1 v1.1 Japan)
1381   (A75 12 through 17 are unknown, could be another two sets of z80 code plus mc68705p5)
1382   A75 18   = Z80 code v2.0 2/2 USA/Romstar
1383   A75 19   = Z80 code v2.0 1/2 USA/Romstar
1384   A75 20   = MC68705P5 MCU code, v2.0 USA/Romstar
1385   A75 21   = Z80 code v2.0 1/2 Japan
1386   A75 22   = Z80 code v2.0 2/2 Japan
1387   A75 23   = MC68705P5 MCU code, v2.0 Japan
1388   A75 24   = Z80 code v2.1 1/2 Japan
1389   A75 25   = Z80 code v2.1 2/2 Japan
1390   A75 26   = MC68705P5 MCU code, v2.1 Japan
1391   A75 27   = Z80 code 1/2 Tournament
1392   A75 28   = Z80 code 2/2 Tournament
1393   A75 29   = GFX 1/3 Tournament
1394   A75 30   = GFX 2/3 Tournament
1395   A75 31   = GFX 3/3 Tournament
1396   A75 32   = MC68705P5 MCU code, Tournament
1397   A75 33   = PROM red Tournament
1398   A75 34   = PROM green Tournament
1399   A75 35   = PROM blue Tournament
1400   (one of the 21/22/23 or 24/25/26 sets is likely 'world'? or are these really two japan sets?)
1369    A75 01   = Z80 code 1/2 v1.0 Japan
1370    A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar
1371    A75 02   = Z80 code 2/2 v1.0 Japan
1372    A75 03   = GFX 1/3
1373    A75 04   = GFX 2/3
1374    A75 05   = GFX 3/3
1375    A75 06   = MC68705P5 MCU code, v1.0 Japan and v1.0 USA/Romstar
1376    A75 07   = PROM red
1377    A75 08   = PROM green
1378    A75 09   = PROM blue
1379    A75 10   = Z80 code 2/2 v1.1 USA/Romstar
1380    A75 11   = Z80 code 2/2 v1.2 Japan (paired with 01-1 v1.1 Japan)
1381    (A75 12 through 17 are unknown, could be another two sets of z80 code plus mc68705p5)
1382    A75 18   = Z80 code v2.0 2/2 USA/Romstar
1383    A75 19   = Z80 code v2.0 1/2 USA/Romstar
1384    A75 20   = MC68705P5 MCU code, v2.0 USA/Romstar
1385    A75 21   = Z80 code v2.0 1/2 Japan
1386    A75 22   = Z80 code v2.0 2/2 Japan
1387    A75 23   = MC68705P5 MCU code, v2.0 Japan
1388    A75 24   = Z80 code v2.1 1/2 Japan
1389    A75 25   = Z80 code v2.1 2/2 Japan
1390    A75 26   = MC68705P5 MCU code, v2.1 Japan
1391    A75 27   = Z80 code 1/2 Tournament
1392    A75 28   = Z80 code 2/2 Tournament
1393    A75 29   = GFX 1/3 Tournament
1394    A75 30   = GFX 2/3 Tournament
1395    A75 31   = GFX 3/3 Tournament
1396    A75 32   = MC68705P5 MCU code, Tournament
1397    A75 33   = PROM red Tournament
1398    A75 34   = PROM green Tournament
1399    A75 35   = PROM blue Tournament
1400    (one of the 21/22/23 or 24/25/26 sets is likely 'world'? or are these really two japan sets?)
14011401*/
14021402
14031403ROM_START( arkanoid )
trunk/src/mame/drivers/atarisy1.c
r248551r248552
23162316   // set in the first place)
23172317   ROM_LOAD( "135048-1172.d1", 0x000000, 0x000200, CRC(b79d1903) SHA1(8319fab8b39f708457eb1efe47789b26adc61249) )
23182318   ROM_LOAD( "135048-1171.d2",  0x000200, 0x000200, CRC(29248a95) SHA1(c9467d495676d323121c92c6757e73b2ed3fb3d7) )
2319   
2319
23202320   ROM_LOAD( "136048-1174.12d", 0x000000, 0x000200, CRC(db4a4d53) SHA1(c5468f3585ec9bc23c9ee990b3ae3738b0309823) )
23212321   ROM_LOAD( "136048-1173.2d",  0x000200, 0x000200, CRC(c80574af) SHA1(9a3dc83f70e79915ce0db3e6e69b5dcfee3acb6f) )
23222322
trunk/src/mame/drivers/atarisy2.c
r248551r248552
277277{
278278   /*static const int bankoffset[64] =
279279   {
280      12, 8, 4, 0,
281      13, 9, 5, 1,
282      14, 10, 6, 2,
283      15, 11, 7, 3,
284      28, 24, 20, 16,
285      29, 25, 21, 17,
286      30, 26, 22, 18,
287      31, 27, 23, 19,
288      44, 40, 36, 32,
289      45, 41, 37, 33,
290      46, 42, 38, 34,
291      47, 43, 39, 35,
292      60, 56, 52, 48,
293      61, 57, 53, 49,
294      62, 58, 54, 50,
295      63, 59, 55, 51
280       12, 8, 4, 0,
281       13, 9, 5, 1,
282       14, 10, 6, 2,
283       15, 11, 7, 3,
284       28, 24, 20, 16,
285       29, 25, 21, 17,
286       30, 26, 22, 18,
287       31, 27, 23, 19,
288       44, 40, 36, 32,
289       45, 41, 37, 33,
290       46, 42, 38, 34,
291       47, 43, 39, 35,
292       60, 56, 52, 48,
293       61, 57, 53, 49,
294       62, 58, 54, 50,
295       63, 59, 55, 51
296296   };*/
297297
298298   int banknumber = ((data >> 10) & 0x3f) ^ 0x03;
299299   banknumber = BITSWAP16(banknumber, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 1, 0, 3, 2);
300   
300
301301   if (offset)
302302      m_rombank2->set_entry(banknumber);
303303   else
trunk/src/mame/drivers/bmcpokr.c
r248551r248552
622622   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2          ) // NOTE
623623   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT  ) // KEY DOWN
624624   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // PAY
625    PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL        ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, NULL)  // HOPPER
625   PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_SPECIAL        ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, NULL)  // HOPPER
626626   PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW       ) // ACCOUNT
627627   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1       ) PORT_NAME("Reset") // RESET
628628   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN        ) // (unused)
trunk/src/mame/drivers/chihiro.c
r248551r248552
15431543                     usb_ohci_read_endpoint_descriptor(ohcist.hc_regs[HcControlCurrentED]);
15441544                     // only if it is not halted and not to be skipped
15451545                     if (!(ohcist.endpoint_descriptor.h | ohcist.endpoint_descriptor.k)) {
1546                        // compare the Endpoint Descriptor’s TailPointer and NextTransferDescriptor fields.
1546                        // compare the Endpoint Descriptor?s TailPointer and NextTransferDescriptor fields.
15471547                        if (ohcist.endpoint_descriptor.headp != ohcist.endpoint_descriptor.tailp) {
15481548                           UINT32 a, b;
15491549                           // service transfer descriptor
trunk/src/mame/drivers/coolridr.c
r248551r248552
345345   // store the blit params here
346346   UINT32 m_spriteblit[12];
347347   UINT32 m_vregs_address;
348   
348
349349   UINT32 m_clipvals[2][3];
350350   UINT8  m_clipblitterMode[2]; // hack
351351
r248551r248552
27322732
27332733   do{
27342734      cmd = (m_framebuffer_vram[(0+dma_index)/4] & 0xfc000000) >> 24;
2735     
2735
27362736      switch(cmd)
27372737      {
27382738         case 0x00: /* end of list marker */
r248551r248552
30263026   AM_RANGE(0x05000000, 0x05000fff) AM_RAM
30273027   AM_RANGE(0x05200000, 0x052001ff) AM_RAM
30283028   AM_RANGE(0x05300000, 0x0530ffff) AM_RAM AM_SHARE("share3") /*Communication area RAM*/
3029//   AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o
3029//  AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o
30303030   AM_RANGE(0x06000000, 0x060001ff) AM_RAM AM_SHARE("nvram") // backup RAM
30313031   AM_RANGE(0x06100000, 0x06100003) AM_READ_PORT("IN0") AM_WRITE8(lamps_w,0x000000ff)
30323032   AM_RANGE(0x06100004, 0x06100007) AM_READ_PORT("IN1")
r248551r248552
31233123   PORT_DIPNAME( 0x00800000, 0x00800000, DEF_STR( Unknown ) ) \
31243124   PORT_DIPSETTING(    0x00800000, DEF_STR( Off ) ) \
31253125   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) ) \
3126   PORT_BIT( 0xff00ff00, IP_ACTIVE_LOW, IPT_UNUSED ) \
3127
3126   PORT_BIT( 0xff00ff00, IP_ACTIVE_LOW, IPT_UNUSED )
31283127static INPUT_PORTS_START( aquastge )
31293128   DUMMY_INPUT_PORT("IN0")
31303129
31313130   PORT_START("IN1")
3132   PORT_DIPNAME( 0x00000001, 0x00000001, "IN1" )
3133   PORT_DIPSETTING(    0x00000001, DEF_STR( Off ) )
3134   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3135   PORT_DIPNAME( 0x00000002, 0x00000002, DEF_STR( Unknown ) )
3136   PORT_DIPSETTING(    0x00000002, DEF_STR( Off ) )
3137   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3138   PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) )
3139   PORT_DIPSETTING(    0x00000004, DEF_STR( Off ) )
3140   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3141   PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
3142   PORT_DIPSETTING(    0x00000008, DEF_STR( Off ) )
3143   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3144   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
3145   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
3146   PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
3147   PORT_DIPSETTING(    0x00000040, DEF_STR( Off ) )
3148   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3149   PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
3150   PORT_DIPSETTING(    0x00000080, DEF_STR( Off ) )
3151   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3131   PORT_DIPNAME( 0x00000001, 0x00000001, "IN1" )
3132   PORT_DIPSETTING(    0x00000001, DEF_STR( Off ) )
3133   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3134   PORT_DIPNAME( 0x00000002, 0x00000002, DEF_STR( Unknown ) )
3135   PORT_DIPSETTING(    0x00000002, DEF_STR( Off ) )
3136   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3137   PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) )
3138   PORT_DIPSETTING(    0x00000004, DEF_STR( Off ) )
3139   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3140   PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
3141   PORT_DIPSETTING(    0x00000008, DEF_STR( Off ) )
3142   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3143   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
3144   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
3145   PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
3146   PORT_DIPSETTING(    0x00000040, DEF_STR( Off ) )
3147   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
3148   PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
3149   PORT_DIPSETTING(    0x00000080, DEF_STR( Off ) )
3150   PORT_DIPSETTING(    0x00000000, DEF_STR( On ) )
31523151   PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("P1 Coin")
31533152   PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("P2 Coin")
31543153   PORT_SERVICE_NO_TOGGLE( 0x00040000, IP_ACTIVE_LOW )
r248551r248552
31573156   PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("P2 Start")
31583157   PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P2 Service Switch")
31593158   PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED )
3160   PORT_BIT( 0xff00ff00, IP_ACTIVE_LOW, IPT_UNUSED )
3161   
3159   PORT_BIT( 0xff00ff00, IP_ACTIVE_LOW, IPT_UNUSED )
3160
31623161   DUMMY_INPUT_PORT("IN2")
31633162
31643163   DUMMY_INPUT_PORT("IN3")
r248551r248552
39063905      return 0;
39073906   else
39083907   {
3909//      printf("pc %08x\n", pc);
3908//      printf("pc %08x\n", pc);
39103909   }
39113910
39123911   return m_sysh1_workram_h[0xc3fd8/4];
r248551r248552
39333932{
39343933   m_maincpu->space(AS_PROGRAM).install_read_handler(0x60c3fd8, 0x60c3fdb, read32_delegate(FUNC(coolridr_state::aquastge_hack_r), this));
39353934
3936   
39373935
39383936
3937
39393938   m_maincpu->sh2drc_set_options(SH2DRC_FASTEST_OPTIONS);
39403939   m_subcpu->sh2drc_set_options(SH2DRC_FASTEST_OPTIONS);
39413940
r248551r248552
39443943
39453944GAME( 1995, coolridr,    0, coolridr,    coolridr, coolridr_state,    coolridr, ROT0,  "Sega", "Cool Riders",GAME_IMPERFECT_SOUND) // region is set in test mode, this set is for Japan, USA and Export (all regions)
39463945GAME( 1995, aquastge,    0, aquastge,    aquastge, coolridr_state,    aquastge, ROT0,  "Sega", "Aqua Stage",GAME_NOT_WORKING)
3947
trunk/src/mame/drivers/cps2.c
r248551r248552
14941494   ROM_LOAD16_WORD_SWAP( "19x.11m",   0x000000, 0x200000, CRC(d38beef3) SHA1(134e961b926a97cca5e45d3558efb98f6f278e08) )
14951495   ROM_LOAD16_WORD_SWAP( "19x.12m",   0x200000, 0x200000, CRC(d47c96e2) SHA1(3c1b5563f8e7ee1c450b3592fcb319e928caec3c) )
14961496
1497   _19XX_ASIA_KEY   
1497   _19XX_ASIA_KEY
14981498ROM_END
14991499
15001500ROM_START( 19xxar1 )
r248551r248552
26772677   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
26782678   ROM_LOAD16_WORD_SWAP( "dad.11m",   0x000000, 0x200000, CRC(0c499b67) SHA1(a8ebd8a1cd6dece8344b7cb0439d85843fb97616) )
26792679   ROM_LOAD16_WORD_SWAP( "dad.12m",   0x200000, 0x200000, CRC(2f0b5a4e) SHA1(8d1ebbb811aa469b0f0d29d719d2b9af28fb63a2) )
2680   
2680
26812681   DDTOD_HISPANIC_KEY
26822682ROM_END
26832683
r248551r248552
62886288   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
62896289   ROM_LOAD16_WORD_SWAP( "sz2.11m",   0x000000, 0x200000, CRC(aa47a601) SHA1(a4d1ee89c84a3b9db06469bb66e85293b5aa9ac9) )
62906290   ROM_LOAD16_WORD_SWAP( "sz2.12m",   0x200000, 0x200000, CRC(2237bc53) SHA1(96d5693047e4cf1ed10a8ee1905cea267a278e92) )
6291   
6291
62926292   SFA2_WORLD_KEY
62936293ROM_END
62946294
r248551r248552
84888488   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
84898489   ROM_LOAD16_WORD_SWAP( "xmn.11m",   0x000000, 0x200000, CRC(c848a6bc) SHA1(ac8ac564d3c43225822f8bc330eba9f35b24b0a4) )
84908490   ROM_LOAD16_WORD_SWAP( "xmn.12m",   0x200000, 0x200000, CRC(729c188f) SHA1(3279774ad8aebbcf0fc779cdfcbe21044dd192ad) )
8491   
8491
84928492   XMCOTA_JAPAN_KEY
84938493ROM_END
84948494
trunk/src/mame/drivers/ddenlovr.c
r248551r248552
39213921{
39223922   m_prot_val = data;
39233923
3924   set_led_status(machine(), 0, data & 0x01);   // led? 1 in-game, 0 in service mode / while booting
3924   set_led_status(machine(), 0, data & 0x01);  // led? 1 in-game, 0 in service mode / while booting
39253925
3926   coin_counter_w(machine(), 0, data & 0x04);   // coin-out
3927   coin_counter_w(machine(), 1, data & 0x08);   // coin-in
3926   coin_counter_w(machine(), 0, data & 0x04);  // coin-out
3927   coin_counter_w(machine(), 1, data & 0x08);  // coin-in
39283928
39293929   if (data & 0xf2)
39303930      logerror("%04x: warning, coin counter = %02x\n", space.device().safe_pc(), data);
trunk/src/mame/drivers/deadang.c
r248551r248552
166166   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Controller ) ) PORT_DIPLOCATION("SW2:4")
167167   PORT_DIPSETTING(    0x0800, DEF_STR( Trackball ) )
168168   PORT_DIPSETTING(    0x0000, DEF_STR( Joystick ) )
169   
169
170170   PORT_START("TRACKX")
171171   PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(1)
172172
trunk/src/mame/drivers/deco32.c
r248551r248552
36433643{
36443644   deco56_decrypt_gfx(machine(), "gfx1");
36453645   deco56_decrypt_gfx(machine(), "gfx2");
3646   
3646
36473647   save_item(NAME(m_raster_enable));
36483648   save_item(NAME(m_nslasher_sound_irq));
36493649   save_item(NAME(m_irq_source));
r248551r248552
37253725
37263726   memcpy(RAM+0x300000,RAM+0x100000,0x100000);
37273727   memset(RAM+0x100000,0,0x100000);
3728   
3728
37293729   save_item(NAME(m_raster_enable));
37303730   save_item(NAME(m_nslasher_sound_irq));
37313731   save_item(NAME(m_irq_source));
r248551r248552
37523752
37533753   deco56_decrypt_gfx(machine(), "gfx1"); /* 141 */
37543754   deco56_decrypt_gfx(machine(), "gfx2"); /* 141 */
3755   
3755
37563756   save_item(NAME(m_tattass_eprom_bit));
37573757   save_item(NAME(m_lastClock));
37583758   save_item(NAME(m_buffer));
r248551r248552
37833783   deco156_decrypt(machine());
37843784
37853785   soundlatch_setclearedvalue(0xff);
3786   
3786
37873787   save_item(NAME(m_nslasher_sound_irq));
37883788
37893789   /* The board for Night Slashers is very close to the Fighter's History and
trunk/src/mame/drivers/destroyr.c
r248551r248552
476476{
477477   m_dial_timer = timer_alloc(TIMER_DESTROYR_DIAL);
478478   m_frame_timer = timer_alloc(TIMER_DESTROYR_FRAME);
479   
479
480480   save_item(NAME(m_cursor));
481481   save_item(NAME(m_wavemod));
482482   save_item(NAME(m_attract));
trunk/src/mame/drivers/dreamwld.c
r248551r248552
353353      int x0 = 0, x1 = 0;
354354
355355      UINT16* linebase;
356     
357     
358356
357
358
359359      /* layer 0 */
360360      linebase = &m_lineram16[0x000];
361361
r248551r248552
367367         else
368368            /* per-line rowscroll */
369369            x0 = linebase[(i+32)&0xff];
370      }     
370      }
371371
372372      tmptilemap0->set_scrollx(
373373      (i + layer0_scrolly) & 0x3ff,
r248551r248552
408408
409409READ32_MEMBER(dreamwld_state::dreamwld_protdata_r)
410410{
411  //static int count = 0;
411   //static int count = 0;
412412
413413   UINT8 *protdata = memregion("user1")->base();
414414   size_t protsize = memregion("user1")->bytes();
415415   UINT8 dat = protdata[(m_protindex++) % protsize];
416416
417  //printf("protection read %04x %02x\n", count, dat);
418  //count++;
417   //printf("protection read %04x %02x\n", count, dat);
418   //count++;
419419
420420   // real hw returns 00 after end of data, I haven't checked if it's possible to overflow the read counter
421421   // and read out the internal rom.
r248551r248552
12491249
12501250GAME( 1997, baryon,   0,      baryon,   baryon,   driver_device, 0, ROT270, "SemiCom / Tirano",         "Baryon - Future Assault (set 1)", GAME_SUPPORTS_SAVE )
12511251GAME( 1997, baryona,  baryon, baryon,   baryon,   driver_device, 0, ROT270, "SemiCom / Tirano",         "Baryon - Future Assault (set 2)", GAME_SUPPORTS_SAVE )
1252GAME( 1998, cutefght, 0,      dreamwld, cutefght, driver_device, 0, ROT0,   "SemiCom",                  "Cute Fighter", GAME_SUPPORTS_SAVE )
1252GAME( 1998, cutefght, 0,      dreamwld, cutefght, driver_device, 0, ROT0,   "SemiCom",                  "Cute Fighter", GAME_SUPPORTS_SAVE )
12531253GAME( 1999, rolcrush, 0,      baryon,   rolcrush, driver_device, 0, ROT0,   "Trust / SemiCom",          "Rolling Crush (version 1.07.E - 1999/02/11)", GAME_SUPPORTS_SAVE )
12541254GAME( 1999, gaialast, 0,      baryon,   gaialast, driver_device, 0, ROT0,   "SemiCom / XESS",           "Gaia - The Last Choice of Earth", GAME_SUPPORTS_SAVE )
12551255GAME( 2000, dreamwld, 0,      dreamwld, dreamwld, driver_device, 0, ROT0,   "SemiCom",                  "Dream World", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/dynax.c
r248551r248552
48114811MACHINE_CONFIG_END
48124812
48134813static MACHINE_CONFIG_DERIVED( mjembase, hnoridur )
4814   MCFG_CPU_MODIFY("maincpu")   // TMPZ84015
4814   MCFG_CPU_MODIFY("maincpu")  // TMPZ84015
48154815   MCFG_CPU_PROGRAM_MAP(nanajign_mem_map)
48164816   MCFG_CPU_IO_MAP(mjembase_io_map)
48174817   MCFG_CPU_VBLANK_INT_DRIVER("screen", dynax_state,  mjelctrn_vblank_interrupt)   /* IM 2 needs a vector on the data bus */
r248551r248552
54565456
54575457   }
54585458}
5459   
54605459
5460
54615461DRIVER_INIT_MEMBER(dynax_state, maya_common)
54625462{
54635463   /* Address lines scrambling on 1 z80 rom */
trunk/src/mame/drivers/firebeat.c
r248551r248552
227227
228228   switch (reg)
229229   {
230      case 0x78:      // GCU Status
230      case 0x78:      // GCU Status
231231         /* ppd checks bits 0x0041 of the upper halfword on interrupt */
232232         return 0xffff0005;
233233
r248551r248552
255255#endif
256256         break;
257257
258      case 0x14:      // ?
258      case 0x14:      // ?
259259         break;
260260
261      case 0x18:      // ?
261      case 0x18:      // ?
262262         break;
263263
264      case 0x20:      // Framebuffer 0 Origin(?)
264      case 0x20:      // Framebuffer 0 Origin(?)
265265         break;
266266
267      case 0x24:      // Framebuffer 1 Origin(?)
267      case 0x24:      // Framebuffer 1 Origin(?)
268268         break;
269269
270      case 0x28:      // Framebuffer 2 Origin(?)
270      case 0x28:      // Framebuffer 2 Origin(?)
271271         break;
272272
273      case 0x2c:      // Framebuffer 3 Origin(?)
273      case 0x2c:      // Framebuffer 3 Origin(?)
274274         break;
275275
276      case 0x30:      // Framebuffer 0 Dimensions
276      case 0x30:      // Framebuffer 0 Dimensions
277277         if (ACCESSING_BITS_16_31)
278278            m_frame[0].height = (data >> 16) & 0xffff;
279279         if (ACCESSING_BITS_0_15)
280280            m_frame[0].width = data & 0xffff;
281281         break;
282282
283      case 0x34:      // Framebuffer 1 Dimensions
283      case 0x34:      // Framebuffer 1 Dimensions
284284         if (ACCESSING_BITS_16_31)
285285            m_frame[1].height = (data >> 16) & 0xffff;
286286         if (ACCESSING_BITS_0_15)
287287            m_frame[1].width = data & 0xffff;
288288         break;
289289
290      case 0x38:      // Framebuffer 2 Dimensions
290      case 0x38:      // Framebuffer 2 Dimensions
291291         if (ACCESSING_BITS_16_31)
292292            m_frame[2].height = (data >> 16) & 0xffff;
293293         if (ACCESSING_BITS_0_15)
294294            m_frame[2].width = data & 0xffff;
295295         break;
296296
297      case 0x3c:      // Framebuffer 3 Dimensions
297      case 0x3c:      // Framebuffer 3 Dimensions
298298         if (ACCESSING_BITS_16_31)
299299            m_frame[3].height = (data >> 16) & 0xffff;
300300         if (ACCESSING_BITS_0_15)
301301            m_frame[3].width = data & 0xffff;
302302         break;
303303
304      case 0x40:      // Framebuffer 0 Base
304      case 0x40:      // Framebuffer 0 Base
305305         m_frame[0].base = data;
306306#if PRINT_GCU
307307         printf("%s FB0 Base: %08X\n", basetag(), data);
308308#endif
309309         break;
310310
311      case 0x44:      // Framebuffer 1 Base
311      case 0x44:      // Framebuffer 1 Base
312312         m_frame[1].base = data;
313313#if PRINT_GCU
314314         printf("%s FB1 Base: %08X\n", basetag(), data);
315315#endif
316316         break;
317317
318      case 0x48:      // Framebuffer 2 Base
318      case 0x48:      // Framebuffer 2 Base
319319         m_frame[2].base = data;
320320#if PRINT_GCU
321321         printf("%s FB2 Base: %08X\n", basetag(), data);
322322#endif
323323         break;
324324
325      case 0x4c:      // Framebuffer 3 Base
325      case 0x4c:      // Framebuffer 3 Base
326326         m_frame[3].base = data;
327327#if PRINT_GCU
328328         printf("%s FB3 Base: %08X\n", basetag(), data);
329329#endif
330330         break;
331331
332      case 0x5c:      // VRAM Read Address
332      case 0x5c:      // VRAM Read Address
333333         m_vram_read_addr = (data & 0xffffff) / 2;
334334         break;
335335
336      case 0x60:      // VRAM Port 0 Write Address
336      case 0x60:      // VRAM Port 0 Write Address
337337         m_vram_fifo0_addr = (data & 0xffffff) / 2;
338338         break;
339339
340      case 0x68:      // VRAM Port 0/1 Mode
340      case 0x68:      // VRAM Port 0/1 Mode
341341         if (ACCESSING_BITS_16_31)
342342            m_vram_fifo0_mode = data >> 16;
343343         if (ACCESSING_BITS_0_15)
344344            m_vram_fifo1_mode = data & 0xffff;
345345         break;
346346
347      case 0x70:      // VRAM Port 0 Write FIFO
347      case 0x70:      // VRAM Port 0 Write FIFO
348348         if (m_vram_fifo0_mode & 0x100)
349349         {
350350            // write to command fifo
r248551r248552
359359               m_command_fifo0_ptr = 0;
360360            }
361361         }
362         else   
362         else
363363         {
364364            // write to VRAM fifo
365365            m_vram[m_vram_fifo0_addr] = data;
r248551r248552
367367         }
368368         break;
369369
370      case 0x64:      // VRAM Port 1 Write Address
370      case 0x64:      // VRAM Port 1 Write Address
371371         m_vram_fifo1_addr = (data & 0xffffff) / 2;
372372         printf("GCU FIFO1 addr = %08X\n", data);
373373         break;
374374
375      case 0x74:      // VRAM Port 1 Write FIFO
375      case 0x74:      // VRAM Port 1 Write FIFO
376376         printf("GCU FIFO1 write = %08X\n", data);
377377
378378         if (m_vram_fifo1_mode & 0x100)
r248551r248552
388388               m_command_fifo1_ptr = 0;
389389            }
390390         }
391         else   
391         else
392392         {
393393            // write to VRAM fifo
394394            m_vram[m_vram_fifo1_addr] = data;
r248551r248552
409409   int x = 0;
410410   int y = 0;
411411   int width = m_frame[0].width;
412   int height = m_frame[0].height;   
412   int height = m_frame[0].height;
413413
414414   if (width != 0 && height != 0)
415415   {
r248551r248552
430430      int li = ((j+y) * fb_pitch) + x;
431431      UINT32 fbaddr0 = m_frame[0].base + li;
432432      UINT32 fbaddr1 = m_frame[1].base + li;
433//      UINT32 fbaddr2 = m_frame[2].base + li;
434//      UINT32 fbaddr3 = m_frame[3].base + li;
433//      UINT32 fbaddr2 = m_frame[2].base + li;
434//      UINT32 fbaddr3 = m_frame[3].base + li;
435435
436436      for (int i=0; i < width; i++)
437437      {
438438         UINT16 pix0 = vram16[fbaddr0 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
439439         UINT16 pix1 = vram16[fbaddr1 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
440//         UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
441//         UINT16 pix3 = vram16[fbaddr3 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
440//          UINT16 pix2 = vram16[fbaddr2 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
441//          UINT16 pix3 = vram16[fbaddr3 ^ NATIVE_ENDIAN_VALUE_LE_BE(1,0)];
442442
443443         if (pix0 & 0x8000)
444444         {
r248551r248552
451451
452452         fbaddr0++;
453453         fbaddr1++;
454//         fbaddr2++;
455//         fbaddr3++;
454//          fbaddr2++;
455//          fbaddr3++;
456456      }
457457   }
458458
r248551r248552
493493   UINT32 address = cmd[0] & 0xffffff;
494494   int alpha_level = (cmd[2] >> 27) & 0x1f;
495495   bool relative_coords = (cmd[0] & 0x10000000) ? true : false;
496   
496
497497   if (relative_coords)
498498   {
499499      x += m_fb_origin_x;
r248551r248552
522522      int index;
523523      int xinc;
524524      UINT32 fbaddr = ((j+y) * fb_pitch) + x;
525     
525
526526      if (yflip)
527527      {
528528         index = address + ((height - 1 - (v >> 6)) * 1024);
r248551r248552
592592
593593void firebeat_gcu_device::fill_rect(UINT32 *cmd)
594594{
595   // 0x00: xxx----- -------- -------- --------      command (4)
595   // 0x00: xxx----- -------- -------- --------       command (4)
596596   // 0x00: ---x---- -------- -------- --------   0: absolute coordinates
597597   //                                             1: relative coordinates from framebuffer origin
598598   // 0x00: ----xx-- -------- -------- --------   ?
r248551r248552
742742
743743      switch (command)
744744      {
745         case 0:      // NOP?
745         case 0:     // NOP?
746746            break;
747747
748         case 1:      // Execute display list
748         case 1:     // Execute display list
749749            execute_display_list(cmd[0] & 0xffffff);
750750            break;
751751
752         case 2:      // End of display list
752         case 2:     // End of display list
753753            end = true;
754754            break;
755755
756         case 3:      // Framebuffer config
756         case 3:     // Framebuffer config
757757            fb_config(cmd);
758758            break;
759759
760         case 4:      // Fill rectangle
760         case 4:     // Fill rectangle
761761            fill_rect(cmd);
762762            break;
763763
764         case 5:      // Draw object
764         case 5:     // Draw object
765765            draw_object(cmd);
766766            break;
767767
768         case 7:      // Draw 8x8 character (2 bits per pixel)
768         case 7:     // Draw 8x8 character (2 bits per pixel)
769769            draw_character(cmd);
770770            break;
771771
r248551r248552
787787
788788   switch (command)
789789   {
790      case 0:      // NOP?
790      case 0:     // NOP?
791791         break;
792792
793      case 1:      // Execute display list
793      case 1:     // Execute display list
794794         execute_display_list(cmd[0] & 0xffffff);
795795         break;
796796
797      case 2:      // End of display list
797      case 2:     // End of display list
798798         break;
799799
800      case 3:      // Framebuffer config           
800      case 3:     // Framebuffer config
801801         fb_config(cmd);
802802         break;
803803
804      case 4:      // Fill rectangle
804      case 4:     // Fill rectangle
805805         fill_rect(cmd);
806806         break;
807807
808      case 5:      // Draw object
808      case 5:     // Draw object
809809         draw_object(cmd);
810810         break;
811811
812      case 7:      // Draw 8x8 character (2 bits per pixel)
812      case 7:     // Draw 8x8 character (2 bits per pixel)
813813         draw_character(cmd);
814814         break;
815815
r248551r248552
851851   printf("dumping %s\n", filename);
852852   FILE *file = fopen(filename, "wb");
853853   int i;
854   
854
855855   for (i=0; i < 0x2000000/4; i++)
856856   {
857857      fputc((m_vram[i] >> 24) & 0xff, file);
r248551r248552
859859      fputc((m_vram[i] >> 8) & 0xff, file);
860860      fputc((m_vram[i] >> 0) & 0xff, file);
861861   }
862   
862
863863   fclose(file);
864864#endif
865865}
r248551r248552
15941594   {
15951595      r |= m_spu_shared_ram[(offset * 4) + 3] <<  0;
15961596
1597      if (offset == 0xff)      // address 0x3ff clears PPC interrupt
1597      if (offset == 0xff)     // address 0x3ff clears PPC interrupt
15981598      {
15991599         m_maincpu->set_input_line(INPUT_LINE_IRQ3, CLEAR_LINE);
16001600      }
r248551r248552
16211621   {
16221622      m_spu_shared_ram[(offset * 4) + 2] = (data >>  8) & 0xff;
16231623
1624      if (offset == 0xff)      // address 0x3fe triggers M68K interrupt
1624      if (offset == 0xff)     // address 0x3fe triggers M68K interrupt
16251625      {
16261626         m_audiocpu->set_input_line(INPUT_LINE_IRQ4, ASSERT_LINE);
16271627      }
r248551r248552
16371637    IRQ1: ?
16381638
16391639    IRQ2: Timer?
1640   
1641   IRQ4: Dual-port RAM mailbox (when PPC writes to 0x3FE)
1642         Handles commands from PPC (bytes 0x00 and 0x01)
1643   
1644   IRQ6: ATA
1640
1641    IRQ4: Dual-port RAM mailbox (when PPC writes to 0x3FE)
1642          Handles commands from PPC (bytes 0x00 and 0x01)
1643
1644    IRQ6: ATA
16451645*/
16461646
16471647READ16_MEMBER(firebeat_state::m68k_spu_share_r)
r248551r248552
16551655   {
16561656      r |= m_spu_shared_ram[offset];
16571657
1658      if (offset == 0x3fe)         // address 0x3fe clears M68K interrupt
1658      if (offset == 0x3fe)            // address 0x3fe clears M68K interrupt
16591659      {
16601660         m_audiocpu->set_input_line(INPUT_LINE_IRQ4, CLEAR_LINE);
16611661      }
r248551r248552
16721672   {
16731673      m_spu_shared_ram[offset] = data & 0xff;
16741674
1675      if (offset == 0x3ff)         // address 0x3ff triggers PPC interrupt
1675      if (offset == 0x3ff)            // address 0x3ff triggers PPC interrupt
16761676      {
16771677         m_maincpu->set_input_line(INPUT_LINE_IRQ3, ASSERT_LINE);
16781678      }
r248551r248552
16841684   // dipswitches?
16851685
16861686   UINT16 r = 0;
1687   r |= 0x80;      // if set, uses ATA PIO mode, otherwise DMA
1687   r |= 0x80;      // if set, uses ATA PIO mode, otherwise DMA
16881688
16891689   return r;
16901690}
r248551r248552
17601760   AM_RANGE(0x280000, 0x2807ff) AM_READWRITE(m68k_spu_share_r, m68k_spu_share_w)
17611761   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("spu_ata", ata_interface_device, read_cs0, write_cs0)
17621762   AM_RANGE(0x340000, 0x34000f) AM_DEVREADWRITE("spu_ata", ata_interface_device, read_cs1, write_cs1)
1763   AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rf5c400", rf5c400_device, rf5c400_r, rf5c400_w)   
1763   AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rf5c400", rf5c400_device, rf5c400_r, rf5c400_w)
17641764ADDRESS_MAP_END
17651765
17661766/*****************************************************************************/
r248551r248552
25032503// Beatmania III has a different BIOS and SPU program, and they aren't dumped yet
25042504ROM_START( bm37th )
25052505   ROM_REGION32_BE(0x80000, "user1", 0)
2506   ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f))      // boots with KBM BIOS
2506   ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f))     // boots with KBM BIOS
25072507
25082508   ROM_REGION(0xc0, "user2", ROMREGION_ERASE00)    // Security dongle
25092509   ROM_LOAD( "gcb07-jc", 0x000000, 0x0000c0, CRC(16115b6a) SHA1(dcb2a3346973941a946b2cdfd31a5a761f666ca3) )
r248551r248552
25222522
25232523ROM_START( bm3final )
25242524   ROM_REGION32_BE(0x80000, "user1", 0)
2525   ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f))      // boots with KBM BIOS
2525   ROM_LOAD16_WORD_SWAP("974a03.21e", 0x00000, 0x80000, BAD_DUMP CRC(ef9a932d) SHA1(6299d3b9823605e519dbf1f105b59a09197df72f))     // boots with KBM BIOS
25262526
25272527   ROM_REGION(0xc0, "user2", ROMREGION_ERASE00)    // Security dongle
25282528   ROM_LOAD( "gcc01-jc", 0x000000, 0x0000c0, CRC(9c49fed8) SHA1(212b87c1d25763117611ffb2a36ed568d429d2f4) )
trunk/src/mame/drivers/galaxian.c
r248551r248552
65236523
65246524DRIVER_INIT_MEMBER(galaxian_state,scobrae)
65256525{
6526
65276526   UINT8 *rom = memregion("maincpu")->base();
65286527   int offs;
65296528
trunk/src/mame/drivers/gladiatr.c
r248551r248552
994994
995995   membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x6000);
996996   membank("bank2")->configure_entries(0, 2, memregion("audiocpu")->base() + 0x10000, 0xc000);
997   
997
998998   /* make sure bank is valid in cpu-reset */
999999   membank("bank2")->set_entry(0);
10001000}
trunk/src/mame/drivers/gstriker.c
r248551r248552
181181void gstriker_state::machine_start()
182182{
183183   membank("soundbank")->configure_entries(0, 8, memregion("audiocpu")->base(), 0x8000);
184   
184
185185   save_item(NAME(m_dmmy_8f_ret));
186186   save_item(NAME(m_pending_command));
187187}
r248551r248552
10121012
10131013   m_maincpu->space(AS_PROGRAM).install_write_handler(0x20008e, 0x20008f, write16_delegate(FUNC(gstriker_state::twrldc94_prot_reg_w),this));
10141014   m_maincpu->space(AS_PROGRAM).install_read_handler(0x20008e, 0x20008f, read16_delegate(FUNC(gstriker_state::twrldc94_prot_reg_r),this));
1015   
1015
10161016   save_item(NAME(m_mcu_data));
10171017   save_item(NAME(m_prot_reg));
10181018}
trunk/src/mame/drivers/itech8.c
r248551r248552
597597   /* we need to update behind the beam as well */
598598   m_behind_beam_update_timer = timer_alloc(TIMER_BEHIND_BEAM_UPDATE);
599599   m_behind_beam_update_timer->adjust(m_screen->time_until_pos(0), 32);
600   
600
601601   itech8_state::machine_start();
602602}
603603
r248551r248552
605605{
606606   if (membank("bank1"))
607607      membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x4000, 0xc000);
608   
608
609609   m_irq_off_timer = timer_alloc(TIMER_IRQ_OFF);
610610   m_delayed_sound_data_timer = timer_alloc(TIMER_DELAYED_SOUND_DATA);
611611   m_blitter_done_timer = timer_alloc(TIMER_BLITTER_DONE);
r248551r248552
26112611   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0160, 0x0160, write8_delegate(FUNC(itech8_state::grmatch_palette_w),this));
26122612   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0180, 0x0180, write8_delegate(FUNC(itech8_state::grmatch_xscroll_w),this));
26132613   m_maincpu->space(AS_PROGRAM).unmap_write(0x01e0, 0x01ff);
2614   
2614
26152615   save_item(NAME(m_grmatch_palcontrol));
26162616   save_item(NAME(m_grmatch_xscroll));
26172617   save_item(NAME(m_grmatch_palette));
r248551r248552
26232623   m_maincpu->space(AS_PROGRAM).install_read_handler (0x0180, 0x0180, read8_delegate(FUNC(itech8_state::slikshot_z80_r),this));
26242624   m_maincpu->space(AS_PROGRAM).install_read_handler (0x01cf, 0x01cf, read8_delegate(FUNC(itech8_state::slikshot_z80_control_r),this));
26252625   m_maincpu->space(AS_PROGRAM).install_write_handler(0x01cf, 0x01cf, write8_delegate(FUNC(itech8_state::slikshot_z80_control_w),this));
2626   
2626
26272627   m_delayed_z80_control_timer = timer_alloc(TIMER_DELAYED_Z80_CONTROL);
2628   
2628
26292629   save_item(NAME(m_z80_ctrl));
26302630   save_item(NAME(m_z80_port_val));
26312631   save_item(NAME(m_z80_clear_to_send));
trunk/src/mame/drivers/mazerbla.c
r248551r248552
350350WRITE8_MEMBER(mazerbla_state::cfb_rom_bank_sel_w)
351351{
352352   m_gfx_rom_bank = data;
353   
353
354354   membank("bank1")->set_entry(m_gfx_rom_bank);
355355}
356356
r248551r248552
13811381void mazerbla_state::machine_start()
13821382{
13831383   membank("bank1")->configure_entries(0, 256, memregion("sub2")->base() + 0x10000, 0x2000);
1384   
1384
13851385   save_item(NAME(m_vcu_video_reg));
13861386   save_item(NAME(m_vcu_gfx_addr));
13871387   save_item(NAME(m_vcu_gfx_param_addr));
trunk/src/mame/drivers/mcr3.c
r248551r248552
20352035GAMEL(1983, spyhuntp, spyhunt,  mcrsc_csd, spyhunt,  mcr3_state,  spyhunt,  ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", GAME_SUPPORTS_SAVE, layout_spyhunt )
20362036GAME( 1984, crater,   0,        mcrscroll, crater,   mcr3_state, crater,   ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider", GAME_SUPPORTS_SAVE )
20372037GAMEL(1985, turbotag, 0,        mcrsc_csd, turbotag, mcr3_state, turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", GAME_SUPPORTS_SAVE, layout_turbotag )
2038
2038
20392039// very different hardware, probably bootleg despite the license text printed on the PCB, similar to '1942p' in 1942.c.  Probably should be put in separate driver.
20402040// PCB made by Tecfri for Recreativos Franco S.A. in Spain, has Bally Midway logo, and licensing text on the PCB.  Board is dated '85' so seems to be a low-cost rebuild? it is unclear if it made it to market.
20412041GAME (1983, spyhuntpr,spyhunt,  spyhuntpr, spyhuntpr,mcr3_state,  spyhuntpr,ROT90, "Bally Midway (Recreativos Franco S.A. license)", "Spy Hunter (Spain, Tecfri / Recreativos Franco S.A. PCB)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/midyunit.c
r248551r248552
26702670*************************************************************************/
26712671
26722672// same as mkyawdim3, but with its own main program roms
2673ROM_START( mkyawdim4 )                                                                                             
2673ROM_START( mkyawdim4 )
26742674   ROM_REGION( 0x10000, "audiocpu", 0 )    /* sound CPU */
2675   ROM_LOAD( "14.bin", 0x00000, 0x10000, CRC(b58d229e) SHA1(3ed14ef650dfa7f9d460611b19e9233a022cbea6) )
2675   ROM_LOAD( "14.bin", 0x00000, 0x10000, CRC(b58d229e) SHA1(3ed14ef650dfa7f9d460611b19e9233a022cbea6) )
26762676
26772677   ROM_REGION( 0x100000, "oki", 0 )    /* ADPCM */
2678   ROM_LOAD( "15.bin", 0x00000, 0x20000, CRC(921c613d) SHA1(be62b87f195b6347112ab13cc14514d4c88a8b86) )
2678   ROM_LOAD( "15.bin", 0x00000, 0x20000, CRC(921c613d) SHA1(be62b87f195b6347112ab13cc14514d4c88a8b86) )
26792679   ROM_RELOAD(         0x40000, 0x20000 )
26802680   ROM_RELOAD(         0x80000, 0x20000 )
26812681   ROM_RELOAD(         0xc0000, 0x20000 )
2682   ROM_LOAD( "16.bin", 0x20000, 0x20000, CRC(6e68e0b0) SHA1(edb7aa6507452ffa5ce7097e3b1855a69542971c) )
2682   ROM_LOAD( "16.bin", 0x20000, 0x20000, CRC(6e68e0b0) SHA1(edb7aa6507452ffa5ce7097e3b1855a69542971c) )
26832683   ROM_CONTINUE(       0x60000, 0x20000 )
26842684   ROM_CONTINUE(       0xa0000, 0x20000 )
26852685   ROM_CONTINUE(       0xe0000, 0x20000 )
r248551r248552
26872687   ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
26882688   ROM_LOAD16_BYTE( "17.bin", 0x00000, 0x80000, CRC(671b533d) SHA1(20859ceb0635126047216f85a6e35072e14766ad) )
26892689   ROM_LOAD16_BYTE( "18.bin", 0x00001, 0x80000, CRC(4e857747) SHA1(b94c7d5e4356ac6890e6bfaf75c76d94408e5bc5) )
2690//   ROM_LOAD16_BYTE( "17.bin", 0x00000, 0x80000, CRC(b12b3bf2) SHA1(deb7755e8407d9de25124b3fdbc4c834a25d8252) ) // other PCB: mkyawdim3 with mkyawdim main program
2691//   ROM_LOAD16_BYTE( "18.bin", 0x00001, 0x80000, CRC(7a37dc5c) SHA1(c4fc6933d8b990c5c56c65282b1f72b90b5d5435) )
2690//  ROM_LOAD16_BYTE( "17.bin", 0x00000, 0x80000, CRC(b12b3bf2) SHA1(deb7755e8407d9de25124b3fdbc4c834a25d8252) ) // other PCB: mkyawdim3 with mkyawdim main program
2691//  ROM_LOAD16_BYTE( "18.bin", 0x00001, 0x80000, CRC(7a37dc5c) SHA1(c4fc6933d8b990c5c56c65282b1f72b90b5d5435) )
26922692
26932693   ROM_REGION( 0x800000, "gfx1", 0 )
2694   ROM_LOAD( "22.bin", 0x000000, 0x80000, CRC(d17096c4) SHA1(01ef390a372c9d94adf138f9543ebb88b89f4c38) )
2695   ROM_LOAD( "21.bin", 0x080000, 0x80000, CRC(993bc2e4) SHA1(7791edbec2b4b8971a3e790346dd7564ecf16d5c) )
2696   ROM_LOAD( "20.bin", 0x100000, 0x80000, CRC(6fb91ede) SHA1(a3735b49f93b08c44fbc97e2b5aad394628fbe90) )
2697   ROM_LOAD( "19.bin", 0x180000, 0x80000, CRC(ed1ff88a) SHA1(6b090b658ee6148af953bd0c9216f37162b6460f) )
2694   ROM_LOAD( "22.bin", 0x000000, 0x80000, CRC(d17096c4) SHA1(01ef390a372c9d94adf138f9543ebb88b89f4c38) )
2695   ROM_LOAD( "21.bin", 0x080000, 0x80000, CRC(993bc2e4) SHA1(7791edbec2b4b8971a3e790346dd7564ecf16d5c) )
2696   ROM_LOAD( "20.bin", 0x100000, 0x80000, CRC(6fb91ede) SHA1(a3735b49f93b08c44fbc97e2b5aad394628fbe90) )
2697   ROM_LOAD( "19.bin", 0x180000, 0x80000, CRC(ed1ff88a) SHA1(6b090b658ee6148af953bd0c9216f37162b6460f) )
26982698
2699   ROM_LOAD( "26.bin", 0x200000, 0x80000, CRC(a002a155) SHA1(3cf7909e92bcd428063596fc5b9953e0000d6eca) )
2700   ROM_LOAD( "25.bin", 0x280000, 0x80000, CRC(dcee8492) SHA1(a912b74d3b26ebd1b1613cc631080f83ececeaf8) )
2701   ROM_LOAD( "24.bin", 0x300000, 0x80000, CRC(de88caef) SHA1(a7927b504dc56ca5c9048373977fe5743b0a3f0b) )
2702   ROM_LOAD( "23.bin", 0x380000, 0x80000, CRC(37eb01b4) SHA1(06092460bd137e08d0f8df8560942ed877d40e09) )
2699   ROM_LOAD( "26.bin", 0x200000, 0x80000, CRC(a002a155) SHA1(3cf7909e92bcd428063596fc5b9953e0000d6eca) )
2700   ROM_LOAD( "25.bin", 0x280000, 0x80000, CRC(dcee8492) SHA1(a912b74d3b26ebd1b1613cc631080f83ececeaf8) )
2701   ROM_LOAD( "24.bin", 0x300000, 0x80000, CRC(de88caef) SHA1(a7927b504dc56ca5c9048373977fe5743b0a3f0b) )
2702   ROM_LOAD( "23.bin", 0x380000, 0x80000, CRC(37eb01b4) SHA1(06092460bd137e08d0f8df8560942ed877d40e09) )
27032703
2704   ROM_LOAD( "30.bin", 0x400000, 0x80000, CRC(45acaf21) SHA1(5edd36c55f4e5d3c74fb85171728ec0a58284b12) )
2705   ROM_LOAD( "29.bin", 0x480000, 0x80000, CRC(2a6c10a0) SHA1(cc90923c44f2961b945a0fd0f85ecc2ba04af2cb) )
2706   ROM_LOAD( "28.bin", 0x500000, 0x80000, CRC(23308979) SHA1(0b36788624a1cf0d3f4c895be5ba967b8dfcf85e) )
2707   ROM_LOAD( "27.bin", 0x580000, 0x80000, CRC(cafc47bb) SHA1(8610af6e52f7089ff4acd850c53ab8b4119e4445) )
2708ROM_END                                                                                                             
2704   ROM_LOAD( "30.bin", 0x400000, 0x80000, CRC(45acaf21) SHA1(5edd36c55f4e5d3c74fb85171728ec0a58284b12) )
2705   ROM_LOAD( "29.bin", 0x480000, 0x80000, CRC(2a6c10a0) SHA1(cc90923c44f2961b945a0fd0f85ecc2ba04af2cb) )
2706   ROM_LOAD( "28.bin", 0x500000, 0x80000, CRC(23308979) SHA1(0b36788624a1cf0d3f4c895be5ba967b8dfcf85e) )
2707   ROM_LOAD( "27.bin", 0x580000, 0x80000, CRC(cafc47bb) SHA1(8610af6e52f7089ff4acd850c53ab8b4119e4445) )
2708ROM_END
27092709
27102710
27112711
trunk/src/mame/drivers/mmagic.c
r248551r248552
22// copyright-holders:Dirk Best
33/***************************************************************************
44
5    "Monkey Magic" © 1979 Nintendo
5    "Monkey Magic" ?? 1979 Nintendo
66
77
8   Dumping info provided by Andrew Welburn:
8    Dumping info provided by Andrew Welburn:
99
10   TZF-MP  - Main Board
11   TZF-SOU - Sound Board
10    TZF-MP  - Main Board
11    TZF-SOU - Sound Board
1212
13   #   device   Label   PCB      filename
14   -------------------------------------------
15   4   i2708   1AI*   2A      1AI.2A
16   5   i2708   2AI*   3A      2AI.3A
17   6   i2708   3AI*   4A      3AI.4A
18   7   i2708   4AI*   4/5A   4AI.45A
19   8   i2708   5AI*   5A      5AI.5A
13    #   device  Label   PCB     filename
14    -------------------------------------------
15    4   i2708   1AI*    2A      1AI.2A
16    5   i2708   2AI*    3A      2AI.3A
17    6   i2708   3AI*    4A      3AI.4A
18    7   i2708   4AI*    4/5A    4AI.45A
19    8   i2708   5AI*    5A      5AI.5A
2020
21   22   H7641   6H      6HI      6H.6HI
22   23   ?? **   7H      7HI      7H.7HI
23   24   H7641   6J      6JK      6J.6JK
24   25   H7641   6H***   7JK
21    22  H7641   6H      6HI     6H.6HI
22    23  ?? **   7H      7HI     7H.7HI
23    24  H7641   6J      6JK     6J.6JK
24    25  H7641   6H***   7JK
2525
26   * Note that there is a Kana character 'I' in romaji on the end of the labels, not an I.
26    * Note that there is a Kana character 'I' in romaji on the end of the labels, not an I.
2727
28   ** Note this device was plastic and not ceramic, but it was dumped as a Harris 7641 as
29   it is logical that its compatible with the 7641. I can see the other devices all have
30   similar/same Harris markings in the bottom left of the IC obscured by the labels.
28    ** Note this device was plastic and not ceramic, but it was dumped as a Harris 7641 as
29    it is logical that its compatible with the 7641. I can see the other devices all have
30    similar/same Harris markings in the bottom left of the IC obscured by the labels.
3131
32   *** Note that the label for the 7643 PROM at IC25 was almost scraped off, but by its position
33   in the sequence, it has to be 6H. I removed a little more of the label in order to
34   work out what the inking was on it below, turned out to be 'D-2'. the prom at IC22 also
35   looks like it has an inked number under the paper label, just peeking through on one side.
36   Without removing the paper labels entirely, these markings wont be fully known, but were
37   covered for some reason.
32    *** Note that the label for the 7643 PROM at IC25 was almost scraped off, but by its position
33    in the sequence, it has to be 6H. I removed a little more of the label in order to
34    work out what the inking was on it below, turned out to be 'D-2'. the prom at IC22 also
35    looks like it has an inked number under the paper label, just peeking through on one side.
36    Without removing the paper labels entirely, these markings wont be fully known, but were
37    covered for some reason.
3838
39   SPECS:
39    SPECS:
4040
41   - CPU is an NEC D8085A
42   - Crystal is marked 6.1440, but this looks to have been replaced.
43   - X1/X2 clock frequency measured at pins 1 + 2 is 6.14330 mhz
44   - Test point with stable readings is :
45   - TP4 (HS) = 15.9982 khz (Horizontal sync)
46   - TP5 (VS) = 60.5992 hz  (Vertical Sync)
41    - CPU is an NEC D8085A
42    - Crystal is marked 6.1440, but this looks to have been replaced.
43    - X1/X2 clock frequency measured at pins 1 + 2 is 6.14330 mhz
44    - Test point with stable readings is :
45    - TP4 (HS) = 15.9982 khz (Horizontal sync)
46    - TP5 (VS) = 60.5992 hz  (Vertical Sync)
4747
4848***************************************************************************/
4949
r248551r248552
270270
271271static MACHINE_CONFIG_START( mmagic, mmagic_state )
272272   // basic machine hardware
273   MCFG_CPU_ADD("maincpu", I8085A, XTAL_6_144MHz)   // NEC D8085A
273   MCFG_CPU_ADD("maincpu", I8085A, XTAL_6_144MHz)  // NEC D8085A
274274   MCFG_CPU_PROGRAM_MAP(mmagic_mem)
275275   MCFG_CPU_IO_MAP(mmagic_io)
276276
trunk/src/mame/drivers/model3.c
r248551r248552
60626062
60636063#if (defined(__MINGW32__) && (__GNUC__ >= 5))
60646064#pragma GCC diagnostic pop
6065#endif
No newline at end of file
6065#endif
trunk/src/mame/drivers/namcona1.c
r248551r248552
694694   m_maskrom = (UINT16 *)memregion("maskrom")->base();
695695   m_mEnableInterrupts = 0;
696696   m_c140->set_base(m_workram);
697   
697
698698   save_item(NAME(m_mEnableInterrupts));
699699   save_item(NAME(m_count));
700700   save_item(NAME(m_mcu_mailbox));
trunk/src/mame/drivers/naomi.c
r248551r248552
14221422      XC9536 - Xilinx XC9536XL in-system programmable CPLD (PLCC44), stamped JULIE_DEV
14231423      XC2S30 - Xilinx XC2S30 Spartan-II FPGA (TQFP144), Rumble Fish 2 have printed sticker A08
14241424      17S30  - Xilinx 17S30APC OTP Configuration PROM, stamped SXFLS
1425   IC12-IC27 - Fujitsu MBM29DL640E 64M TSOP48 flash ROMs
1425   IC12-IC27 - Fujitsu MBM29DL640E 64M TSOP48 flash ROMs
14261426
14271427
14281428Network Board
r248551r248552
93889388#if (defined(__MINGW32__) && (__GNUC__ >= 5))
93899389#pragma GCC diagnostic pop
93909390#endif
9391
trunk/src/mame/drivers/naughtyb.c
r248551r248552
832832   m_maincpu->space(AS_PROGRAM).install_read_handler(0x9090, 0x9090, read8_delegate(FUNC(naughtyb_state::popflame_protection_r),this));
833833
834834   m_maincpu->space(AS_PROGRAM).install_write_handler(0xb000, 0xb0ff, write8_delegate(FUNC(naughtyb_state::popflame_protection_w),this));
835   
835
836836   save_item(NAME(m_popflame_prot_seed));
837837   save_item(NAME(m_r_index));
838838   save_item(NAME(m_prot_count));
r248551r248552
864864{
865865   /* install questions' handlers  */
866866   m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc000, 0xc002, read8_delegate(FUNC(naughtyb_state::trvmstr_questions_r),this), write8_delegate(FUNC(naughtyb_state::trvmstr_questions_w),this));
867   
867
868868   save_item(NAME(m_question_offset));
869869}
870870
trunk/src/mame/drivers/nbmj9195.c
r248551r248552
3232void nbmj9195_state::machine_start()
3333{
3434   membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base() + 0x8000, 0x8000);
35   
35
3636   save_item(NAME(m_inputport));
3737   save_item(NAME(m_dipswbitsel));
3838   save_item(NAME(m_outcoin_flag));
trunk/src/mame/drivers/nycaptor.c
r248551r248552
743743      membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000);
744744   else
745745      membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
746   
746
747747   save_item(NAME(m_generic_control_reg));
748748   save_item(NAME(m_sound_nmi_enable));
749749   save_item(NAME(m_pending_nmi));
trunk/src/mame/drivers/pcktgal.c
r248551r248552
212212   membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x4000, 0xc000);
213213   membank("bank2")->configure_entries(0, 2, memregion("maincpu")->base() + 0x6000, 0xc000);
214214   membank("bank3")->configure_entries(0, 2, memregion("audiocpu")->base() + 0x10000, 0x4000);
215   
215
216216   save_item(NAME(m_msm5205next));
217217   save_item(NAME(m_toggle));
218218}
trunk/src/mame/drivers/photon2.c
r248551r248552
105105{
106106   m_spectrum_frame_number = 0;
107107   m_spectrum_flash_invert = 0;
108   
108
109109   save_item(NAME(m_spectrum_frame_number));
110110   save_item(NAME(m_spectrum_flash_invert));
111111   save_item(NAME(m_spectrum_port_fe));
r248551r248552
329329{
330330   membank("mainbank")->configure_entries(0, 4, memregion("maincpu")->base(), 0x4000);
331331   membank("mainbank")->set_entry(0);
332   
332
333333   save_item(NAME(m_nmi_enable));
334334}
335335
trunk/src/mame/drivers/poolshrk.c
r248551r248552
4141         pSprite += 4;
4242      }
4343   }
44   
44
4545   save_item(NAME(m_da_latch));
4646}
4747
trunk/src/mame/drivers/rainbow.c
r248551r248552
724724static MACHINE_CONFIG_DERIVED( jumpingi, jumping )
725725   MCFG_CPU_REPLACE("maincpu", M68000, XTAL_16MHz/2)  /* verified on pcb */
726726   MCFG_CPU_PROGRAM_MAP(jumping_map)
727        MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state,  irq4_line_hold)
727      MCFG_CPU_VBLANK_INT_DRIVER("screen", rbisland_state,  irq4_line_hold)
728728MACHINE_CONFIG_END
729729
730730/***************************************************************************
r248551r248552
902902
903903/* red 'Imnoe' PCB */
904904ROM_START( jumpingi )
905        ROM_REGION( 0xa0000, "maincpu", 0 )
906        ROM_LOAD16_BYTE( "05.IC3",         0x00000, 0x20000, CRC(69ac4af4) SHA1(39055573e412e2591f7a68f9fee5919528529544) )
907        ROM_LOAD16_BYTE( "03.IC6",         0x00001, 0x20000, CRC(38975cdc) SHA1(23c02a4574a95904805d5f458c06c77c14d11c14) )
908        ROM_LOAD16_BYTE( "06.IC2",         0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) ) // b22-03.23
909        ROM_LOAD16_BYTE( "04.IC5",         0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) ) // b22-04.24
910        ROM_LOAD16_BYTE( "02",             0x80001, 0x10000, CRC(0810d327) SHA1(fe91ac02e617bde413dc8a20b7cbcaf3e20aeb28) ) /* c-chip substitute */
905      ROM_REGION( 0xa0000, "maincpu", 0 )
906      ROM_LOAD16_BYTE( "05.IC3",         0x00000, 0x20000, CRC(69ac4af4) SHA1(39055573e412e2591f7a68f9fee5919528529544) )
907      ROM_LOAD16_BYTE( "03.IC6",         0x00001, 0x20000, CRC(38975cdc) SHA1(23c02a4574a95904805d5f458c06c77c14d11c14) )
908      ROM_LOAD16_BYTE( "06.IC2",         0x40000, 0x20000, CRC(3ebb0fb8) SHA1(1b41b305623d121255eb70cb992e4d9da13abd82) ) // b22-03.23
909      ROM_LOAD16_BYTE( "04.IC5",         0x40001, 0x20000, CRC(91625e7f) SHA1(765afd973d9b82bb496b04beca284bf2769d6e6f) ) // b22-04.24
910      ROM_LOAD16_BYTE( "02",             0x80001, 0x10000, CRC(0810d327) SHA1(fe91ac02e617bde413dc8a20b7cbcaf3e20aeb28) ) /* c-chip substitute */
911911
912        ROM_REGION( 0x14000, "audiocpu", 0 )
913        ROM_LOAD( "01.IC53",              0x00000, 0x8000, CRC(8527c00e) SHA1(86e3824caca39aca4ca4df63bb4474adacfc4c53) )
914        ROM_CONTINUE(                     0x10000, 0x4000 )
915        ROM_CONTINUE(                     0x0c000, 0x4000 )
912      ROM_REGION( 0x14000, "audiocpu", 0 )
913      ROM_LOAD( "01.IC53",              0x00000, 0x8000, CRC(8527c00e) SHA1(86e3824caca39aca4ca4df63bb4474adacfc4c53) )
914      ROM_CONTINUE(                     0x10000, 0x4000 )
915      ROM_CONTINUE(                     0x0c000, 0x4000 )
916916
917        ROM_REGION( 0x80000, "gfx1", 0 )
918        ROM_LOAD( "13.IC8",              0x00000, 0x10000, CRC(65b76309) SHA1(1e345726e137f4c56d4bf239651c986fd53a16c3) )  /* tiles */
919        ROM_LOAD( "14.IC7",              0x10000, 0x10000, CRC(43a94283) SHA1(d6a05cbc7b996a8e7f1520563f6fada9a59021a4) )
920        ROM_LOAD( "11.IC10",             0x20000, 0x10000, CRC(e61933fb) SHA1(02bc0e1a7a3ce9e15fb83b28ce8fafb0b8d80ebd) )
921        ROM_LOAD( "12.IC9",              0x30000, 0x10000, CRC(ed031eb2) SHA1(905be4d890ff7bb8a4d8ad85b2a11483fb4d67eb) )
922        ROM_LOAD( "09.IC12",             0x40000, 0x10000, CRC(312700ca) SHA1(c79edc9c25f364d0afd79aaa21cfe2fe46044314) )
923        ROM_LOAD( "10.IC11",             0x50000, 0x10000, CRC(de3b0b88) SHA1(14b8871821e4c0abbb9967c5aa282cf4e67884fe) )
924        ROM_LOAD( "07.IC14",             0x60000, 0x10000, CRC(9fdc6c8e) SHA1(ff4e1a98dc982bce2f9d235cac62c7166f477f64) )
925        ROM_LOAD( "08.IC13",             0x70000, 0x10000, CRC(06226492) SHA1(834280ec49e61a0c9c6b6fe2033e1b20bd1bffbf) )
917      ROM_REGION( 0x80000, "gfx1", 0 )
918      ROM_LOAD( "13.IC8",              0x00000, 0x10000, CRC(65b76309) SHA1(1e345726e137f4c56d4bf239651c986fd53a16c3) )  /* tiles */
919      ROM_LOAD( "14.IC7",              0x10000, 0x10000, CRC(43a94283) SHA1(d6a05cbc7b996a8e7f1520563f6fada9a59021a4) )
920      ROM_LOAD( "11.IC10",             0x20000, 0x10000, CRC(e61933fb) SHA1(02bc0e1a7a3ce9e15fb83b28ce8fafb0b8d80ebd) )
921      ROM_LOAD( "12.IC9",              0x30000, 0x10000, CRC(ed031eb2) SHA1(905be4d890ff7bb8a4d8ad85b2a11483fb4d67eb) )
922      ROM_LOAD( "09.IC12",             0x40000, 0x10000, CRC(312700ca) SHA1(c79edc9c25f364d0afd79aaa21cfe2fe46044314) )
923      ROM_LOAD( "10.IC11",             0x50000, 0x10000, CRC(de3b0b88) SHA1(14b8871821e4c0abbb9967c5aa282cf4e67884fe) )
924      ROM_LOAD( "07.IC14",             0x60000, 0x10000, CRC(9fdc6c8e) SHA1(ff4e1a98dc982bce2f9d235cac62c7166f477f64) )
925      ROM_LOAD( "08.IC13",             0x70000, 0x10000, CRC(06226492) SHA1(834280ec49e61a0c9c6b6fe2033e1b20bd1bffbf) )
926926
927        ROM_REGION( 0xa0000, "gfx2", ROMREGION_INVERT )
928        ROM_LOAD( "15.IC62",             0x00000, 0x10000, CRC(8548db6c) SHA1(675cd301259d5ed16098a38ac58b27b5ccd91264) )  /* sprites */
929        ROM_LOAD( "19.IC61",             0x10000, 0x10000, CRC(89b3d8ee) SHA1(8491de6e8292e58b9a8696be15827bcb1ea42845) )
930        ROM_LOAD( "23.IC60",             0x20000, 0x08000, CRC(662a2f1e) SHA1(1c5e8b1f0623e64faf9cd60f9653fc5957191a9b) )
931        ROM_LOAD( "16.IC78",             0x28000, 0x10000, CRC(925865e1) SHA1(457de50bc03e8b949ac7d46ae4188201e87574a8) )
932        ROM_LOAD( "20.IC77",             0x38000, 0x10000, CRC(b09695d1) SHA1(e6d315f9befb7b47f42668d573a1102e52d78aea) )
933        ROM_LOAD( "24.IC76",             0x48000, 0x08000, CRC(41937743) SHA1(890c832a7cf87e6fe749d4824b02d57e10872bdf) )
934        ROM_LOAD( "17.IC93",             0x50000, 0x10000, CRC(f644eeab) SHA1(9d45e9dfb08e8c90b4b10f5dc383fa4732161a81) )
935        ROM_LOAD( "21.IC92",             0x60000, 0x10000, CRC(16e1b0ff) SHA1(1467a317d07a447d01113e6b6b9f5aca30cb0dcb) )
936        ROM_LOAD( "25.IC91",             0x70000, 0x08000, CRC(d886c014) SHA1(9327c332c98a81451e9e0624344d2601ef06e490) )
937        ROM_LOAD( "18.IC121",            0x78000, 0x10000, CRC(93df1e4d) SHA1(b100d265b973254ec9cd44b6c32f62b4bac3b732) )
938        ROM_LOAD( "22.IC120",            0x88000, 0x10000, CRC(7c4e893b) SHA1(eceecb38554157ee24d228a2c722dad750a6a07d) )
939        ROM_LOAD( "26.IC119",            0x98000, 0x08000, CRC(7e1d58d8) SHA1(d586a018c3ec3e6e6a39992170d324361e03c68a) )
927      ROM_REGION( 0xa0000, "gfx2", ROMREGION_INVERT )
928      ROM_LOAD( "15.IC62",             0x00000, 0x10000, CRC(8548db6c) SHA1(675cd301259d5ed16098a38ac58b27b5ccd91264) )  /* sprites */
929      ROM_LOAD( "19.IC61",             0x10000, 0x10000, CRC(89b3d8ee) SHA1(8491de6e8292e58b9a8696be15827bcb1ea42845) )
930      ROM_LOAD( "23.IC60",             0x20000, 0x08000, CRC(662a2f1e) SHA1(1c5e8b1f0623e64faf9cd60f9653fc5957191a9b) )
931      ROM_LOAD( "16.IC78",             0x28000, 0x10000, CRC(925865e1) SHA1(457de50bc03e8b949ac7d46ae4188201e87574a8) )
932      ROM_LOAD( "20.IC77",             0x38000, 0x10000, CRC(b09695d1) SHA1(e6d315f9befb7b47f42668d573a1102e52d78aea) )
933      ROM_LOAD( "24.IC76",             0x48000, 0x08000, CRC(41937743) SHA1(890c832a7cf87e6fe749d4824b02d57e10872bdf) )
934      ROM_LOAD( "17.IC93",             0x50000, 0x10000, CRC(f644eeab) SHA1(9d45e9dfb08e8c90b4b10f5dc383fa4732161a81) )
935      ROM_LOAD( "21.IC92",             0x60000, 0x10000, CRC(16e1b0ff) SHA1(1467a317d07a447d01113e6b6b9f5aca30cb0dcb) )
936      ROM_LOAD( "25.IC91",             0x70000, 0x08000, CRC(d886c014) SHA1(9327c332c98a81451e9e0624344d2601ef06e490) )
937      ROM_LOAD( "18.IC121",            0x78000, 0x10000, CRC(93df1e4d) SHA1(b100d265b973254ec9cd44b6c32f62b4bac3b732) )
938      ROM_LOAD( "22.IC120",            0x88000, 0x10000, CRC(7c4e893b) SHA1(eceecb38554157ee24d228a2c722dad750a6a07d) )
939      ROM_LOAD( "26.IC119",            0x98000, 0x08000, CRC(7e1d58d8) SHA1(d586a018c3ec3e6e6a39992170d324361e03c68a) )
940940
941        ROM_REGION( 0x200, "pals", 0 )
942        ROM_LOAD( "JP2.IC56",            0x000, 0x104, CRC(12e9a7b8) SHA1(a0ce8b6083c9adfcb4bdbca87f63a01f292525f3) ) // PAL16R6A-2CN
943        ROM_LOAD( "JP1.IC13",            0x000, 0x144, CRC(76944f81) SHA1(ab78e4e157ffdc13aea5dc360268b2640e60d19c) ) // PAL20L8A-2CNS
944        ROM_LOAD( "JP3.IC51",            0x000, 0x104, CRC(c1e6cb8f) SHA1(9908e62bb9b806047b7a344bb62334bd696b9fc8) ) // PAL16L8A-2CN z80 address decoder?
941      ROM_REGION( 0x200, "pals", 0 )
942      ROM_LOAD( "JP2.IC56",            0x000, 0x104, CRC(12e9a7b8) SHA1(a0ce8b6083c9adfcb4bdbca87f63a01f292525f3) ) // PAL16R6A-2CN
943      ROM_LOAD( "JP1.IC13",            0x000, 0x144, CRC(76944f81) SHA1(ab78e4e157ffdc13aea5dc360268b2640e60d19c) ) // PAL20L8A-2CNS
944      ROM_LOAD( "JP3.IC51",            0x000, 0x104, CRC(c1e6cb8f) SHA1(9908e62bb9b806047b7a344bb62334bd696b9fc8) ) // PAL16L8A-2CN z80 address decoder?
945945ROM_END
946946
947947DRIVER_INIT_MEMBER(rbisland_state,rbisland)
trunk/src/mame/drivers/sbowling.c
r248551r248552
100100      y = 255-y;
101101      x = 247-x;
102102   }
103   
103
104104   tmpbitmap->pix16(y, x) = col;
105105}
106106
trunk/src/mame/drivers/segas32.c
r248551r248552
24862486   MCFG_RF5C68_ADD("rfsnd", RFC_CLOCK/4)
24872487   MCFG_SOUND_ROUTE(0, "lspeaker", 0.55)
24882488   MCFG_SOUND_ROUTE(1, "rspeaker", 0.55)
2489   
2489
24902490   MCFG_S32COMM_ADD("s32comm")
24912491MACHINE_CONFIG_END
24922492
r248551r248552
25722572   MCFG_SOUND_ADD("sega", MULTIPCM, MASTER_CLOCK/4)
25732573   MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
25742574   MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
2575   
2575
25762576   MCFG_S32COMM_ADD("s32comm")
25772577MACHINE_CONFIG_END
25782578
r248551r248552
52375237   m_system32_prot_vblank = &segas32_state::f1lap_fd1149_vblank;
52385238
52395239   m_sw1_output = &segas32_state::f1lap_sw1_output;
5240     
5240
52415241   m_s32comm->set_linktype(15612); // EPR-15612
52425242}
52435243
r248551r248552
53035303   segas32_common_init(read16_delegate(FUNC(segas32_state::analog_custom_io_r),this), write16_delegate(FUNC(segas32_state::analog_custom_io_w),this));
53045304   m_sw1_output = &segas32_state::radm_sw1_output;
53055305   m_sw2_output = &segas32_state::radr_sw2_output;
5306     
5306
53075307   m_s32comm->set_linktype(14084); // EPR-14084
53085308}
53095309
trunk/src/mame/drivers/segaybd.c
r248551r248552
836836
837837/*
838838static ADDRESS_MAP_START( motor_portmap, AS_IO, 8, segaybd_state )
839   ADDRESS_MAP_UNMAP_HIGH
840   ADDRESS_MAP_GLOBAL_MASK(0xff)
839    ADDRESS_MAP_UNMAP_HIGH
840    ADDRESS_MAP_GLOBAL_MASK(0xff)
841841ADDRESS_MAP_END
842842*/
843843
r248551r248552
14401440   // basic machine hardware
14411441   MCFG_CPU_ADD("motorcpu", Z80, XTAL_16MHz/2 ) // 8 Mhz(guessed)
14421442   MCFG_CPU_PROGRAM_MAP(motor_map)
1443//   MCFG_CPU_IO_MAP(motor_portmap)
1443//  MCFG_CPU_IO_MAP(motor_portmap)
14441444
14451445MACHINE_CONFIG_END
14461446
trunk/src/mame/drivers/silvmil.c
r248551r248552
446446MACHINE_CONFIG_END
447447
448448static MACHINE_CONFIG_DERIVED( puzzlovek, puzzlove )
449        MCFG_DEVICE_REMOVE("ymsnd")
450        MCFG_YM2151_ADD("ymsnd", XTAL_15MHz/4) /* Verified */
451        MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
452        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
449      MCFG_DEVICE_REMOVE("ymsnd")
450      MCFG_YM2151_ADD("ymsnd", XTAL_15MHz/4) /* Verified */
451      MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
452      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
453453MACHINE_CONFIG_END
454454
455455
r248551r248552
587587   tumblepb_gfx1_rearrange();
588588}
589589
590GAME( 1995, silvmil,   0,        silvmil,   silvmil,   silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", GAME_SUPPORTS_SAVE )
591GAME( 1994, puzzlove,   0,        puzzlove,  puzzlove,  silvmil_state, silvmil, ROT0,   "Para", "PuzzLove", GAME_SUPPORTS_SAVE )
592GAME( 1994, puzzlovek,   puzzlove, puzzlovek, puzzlovek, silvmil_state, silvmil, ROT0,   "Para", "PuzzLove (Korea)", GAME_SUPPORTS_SAVE )
590GAME( 1995, silvmil,    0,        silvmil,   silvmil,   silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", GAME_SUPPORTS_SAVE )
591GAME( 1994, puzzlove,   0,        puzzlove,  puzzlove,  silvmil_state, silvmil, ROT0,   "Para", "PuzzLove", GAME_SUPPORTS_SAVE )
592GAME( 1994, puzzlovek,  puzzlove, puzzlovek, puzzlovek, silvmil_state, silvmil, ROT0,   "Para", "PuzzLove (Korea)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/suna8.c
r248551r248552
19181918   MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4)                    /* ? */
19191919   MCFG_CPU_PROGRAM_MAP(rranger_map)
19201920   MCFG_CPU_IO_MAP(rranger_io_map)
1921//   MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
1921//  MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map)
19221922   MCFG_CPU_VBLANK_INT_DRIVER("screen", suna8_state,  irq0_line_hold)  /* IRQ & NMI ! */
19231923
19241924   MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 8)   /* verified on pcb */
trunk/src/mame/drivers/system1.c
r248551r248552
129129
130130834-5583-12 SPATTER (sticker)
131131834-5542 daughter board with 4 eproms (EPR6306, EPR6307, EPR6308, EPR6309)
132834-5540 daughter board with logic ICs
132834-5540 daughter board with logic ICs
133133315-5099 custom Z80 CPU w/security
134134
135135*******************************************************************************
r248551r248552
380380   m_bank1->set_entry(0);
381381
382382   if (m_banked_decrypted_opcodes)
383   {     
383   {
384384      m_bank0d->set_base(m_banked_decrypted_opcodes);
385385      m_bank1d->configure_entries(0, numbanks, m_banked_decrypted_opcodes + 0x10000, 0x4000);
386386      m_bank1d->set_entry(0);
r248551r248552
28212821
28222822ROM_START( spattera )
28232823   ROM_REGION( 0x10000, "maincpu", 0 )
2824   ROM_LOAD( "epr-6597.116",   0x0000, 0x4000, CRC(fb928b9d) SHA1(0a9bede7a147009b9ebb8a0b73681359da665982) ) /* encrypted */
2824   ROM_LOAD( "epr-6597.116",   0x0000, 0x4000, CRC(fb928b9d) SHA1(0a9bede7a147009b9ebb8a0b73681359da665982) ) /* encrypted */
28252825   ROM_LOAD( "epr-6598.109",   0x4000, 0x4000, CRC(5dff037a) SHA1(8e6f6b75a89609ab0498d317c11e6d653343ffbe) ) /* encrypted */
28262826   ROM_LOAD( "epr-6599.96",    0x8000, 0x4000, CRC(7ba9de5b) SHA1(f18542c95e8241433ed995c213924ad1ce03cd5b) )
28272827
trunk/src/mame/drivers/system16.c
r248551r248552
137137   AM_RANGE(0x412000, 0x412fff) AM_RAM AM_SHARE("bg1_tileram")
138138   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
139139   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
140//   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_irq_w)
140//  AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_irq_w)
141141   AM_RANGE(0xC42006, 0xC42007) AM_WRITE(sound_command_irq_w)
142   
142
143143   AM_RANGE(0xC44000, 0xC44001) AM_READNOP
144144   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
145145   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
r248551r248552
21332133
21342134   // 2x YM2203C, one at U57, one at U56
21352135   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
2136//   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
2136//  MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
21372137   MCFG_SOUND_ROUTE(0, "mono", 0.50)
21382138   MCFG_SOUND_ROUTE(1, "mono", 0.50)
21392139   MCFG_SOUND_ROUTE(2, "mono", 0.50)
r248551r248552
21412141
21422142   MCFG_SOUND_ADD("ym2", YM2203, 4000000)
21432143   MCFG_SOUND_ROUTE(0, "mono", 0.50)
2144//   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
2144//  MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
21452145   MCFG_SOUND_ROUTE(1, "mono", 0.50)
21462146   MCFG_SOUND_ROUTE(2, "mono", 0.50)
21472147   MCFG_SOUND_ROUTE(3, "mono", 0.80)
trunk/src/mame/drivers/taitoair.c
r248551r248552
186186/*!
187187 @todo - Framebuffer DMA requires palette switch to be selected dynamically, see at first stage Course Select in Top Landing.
188188         My gut feeling is that 3d poly fill operation actually copies to internal buffer then a DMA op actually do the buffer-to-screen copy, including gradiation ROZ too;
189      - Air Inferno: missing landing monitor camera (blackened);
190      - Air Inferno: missing 3d HUD graphics;
191      - Air Inferno: Expert course has wrong 3d geometry;
192      - Air Inferno: Almost surely crashing during replay has missing smoke effect, looks quite odd atm.
193      - Top Landing: Night stages might have wrong priority for stars-above-sea;
194      - Input limiters / analog thresholds for both games;
189       - Air Inferno: missing landing monitor camera (blackened);
190       - Air Inferno: missing 3d HUD graphics;
191       - Air Inferno: Expert course has wrong 3d geometry;
192       - Air Inferno: Almost surely crashing during replay has missing smoke effect, looks quite odd atm.
193       - Top Landing: Night stages might have wrong priority for stars-above-sea;
194       - Input limiters / analog thresholds for both games;
195195 */
196196
197197#include "emu.h"
r248551r248552
344344}
345345
346346/*!
347   @brief Framebuffer DMA control
348   @regs [0] x--- ---- ---- ---- copy framebuffer to the screen
349         [0] --x- ---- ---- ---- unknown, used on POST test
350        [0] 1001 1111 1111 1111 used by Air Inferno after erase op, erase -> copy?
351        [0] 0001 1111 1111 1111 erase op?
352        [1] xxxx xxxx xxxx xxxx fill value? 0xffff by Top Landing, 0x0000 Air Inferno
353        [2] (unused)
354        [3] both games uses 0xb7, most likely a register setting.
347    @brief Framebuffer DMA control
348    @regs [0] x--- ---- ---- ---- copy framebuffer to the screen
349          [0] --x- ---- ---- ---- unknown, used on POST test
350          [0] 1001 1111 1111 1111 used by Air Inferno after erase op, erase -> copy?
351          [0] 0001 1111 1111 1111 erase op?
352          [1] xxxx xxxx xxxx xxxx fill value? 0xffff by Top Landing, 0x0000 Air Inferno
353          [2] (unused)
354          [3] both games uses 0xb7, most likely a register setting.
355355*/
356356WRITE16_MEMBER(taitoair_state::dma_regs_w)
357357{
trunk/src/mame/drivers/thedealr.c
r248551r248552
44
55    The Dealer (Visco Games)
66
7   Driver by Luca Elia
8   This game runs on Seta Hardware
7    Driver by Luca Elia
8    This game runs on Seta Hardware
99
1010    P0-040A PCB:
1111
r248551r248552
9494{
9595   bitmap.fill(0x1f0, cliprect);
9696
97   m_seta001->set_bg_yoffsets(  0x11+1, -0x10 );   // + is up (down with flip)
97   m_seta001->set_bg_yoffsets(  0x11+1, -0x10 );   // + is up (down with flip)
9898   m_seta001->set_fg_yoffsets( -0x12+1, -0x01 );
9999
100100   m_seta001->draw_sprites(screen, bitmap, cliprect, 0x1000, 1);
r248551r248552
120120
121121void thedealr_state::iox_reset()
122122{
123   m_iox_status   =   0x00;
124   m_iox_ret      =   0x00;
125   m_iox_cmd      =   0xff;
126   m_iox_leds      =   0x00;
127   m_iox_coins      =   0x00;
123   m_iox_status    =   0x00;
124   m_iox_ret       =   0x00;
125   m_iox_cmd       =   0xff;
126   m_iox_leds      =   0x00;
127   m_iox_coins     =   0x00;
128128}
129129
130130MACHINE_RESET_MEMBER(thedealr_state,thedealr)
r248551r248552
150150
151151      switch (m_iox_cmd)
152152      {
153         case 0x20:   // leds
153         case 0x20:  // leds
154154            m_iox_leds = data;
155            set_led_status(machine(), 0, data & 0x01);   // bet
156            set_led_status(machine(), 1, data & 0x02);   // deal
155            set_led_status(machine(), 0, data & 0x01);  // bet
156            set_led_status(machine(), 1, data & 0x02);  // deal
157157            set_led_status(machine(), 2, data & 0x04);
158158            set_led_status(machine(), 3, data & 0x08);
159            set_led_status(machine(), 4, data & 0x10);   // hold 1-5?
159            set_led_status(machine(), 4, data & 0x10);  // hold 1-5?
160160            set_led_status(machine(), 5, data & 0x20);
161161            set_led_status(machine(), 6, data & 0x40);
162162            set_led_status(machine(), 7, data & 0x80);
163163            break;
164164
165         case 0x40:   // coin counters
165         case 0x40:  // coin counters
166166            m_iox_coins = data;
167167            coin_counter_w(machine(), 0, (~data) & 0x02); // coin1 or service coin
168168            coin_counter_w(machine(), 1, (~data) & 0x04); // coupon
r248551r248552
177177            break;
178178      }
179179
180//      popmessage("LED: %02X COIN: %02X", m_iox_leds, m_iox_coins);
180//      popmessage("LED: %02X COIN: %02X", m_iox_leds, m_iox_coins);
181181   }
182182   else
183183   {
r248551r248552
186186
187187      switch (m_iox_cmd)
188188      {
189         case 0x01:   // inputs?
189         case 0x01:  // inputs?
190190         {
191191            UINT16 buttons = ioport("IOX")->read();
192192            m_iox_ret = 0;
r248551r248552
202202            break;
203203         }
204204
205//         case 0x04:   // ? at boot
205//          case 0x04:  // ? at boot
206206
207         case 0x08:   // return iox version
207         case 0x08:  // return iox version
208208            m_iox_ret = 0x54;
209209            m_iox_status |= IOX_OUT_FULL;
210210            break;
211211
212         case 0x20:   // leds
212         case 0x20:  // leds
213213            m_iox_status |= IOX_WAITDATA;
214214            break;
215215
216         case 0x40:   // coin counters
216         case 0x40:  // coin counters
217217            m_iox_status |= IOX_WAITDATA;
218218            break;
219219
220         case 0x80:   // store param?
220         case 0x80:  // store param?
221221            m_iox_status |= IOX_WAITDATA;
222222            break;
223223
224         case 0x81:   // store param?
224         case 0x81:  // store param?
225225            m_iox_status |= IOX_WAITDATA;
226226            break;
227227
228         case 0xff:   // reset
228         case 0xff:  // reset
229229            iox_reset();
230230            break;
231231
r248551r248552
262262   // bit 2 - ? 0 during game
263263   // bit 3 - ? 1 during game
264264   // bit 7 - ? 0 during game
265//   popmessage("UNK %02x", data);
265//  popmessage("UNK %02x", data);
266266}
267267
268268static ADDRESS_MAP_START( thedealr, AS_PROGRAM, 8, thedealr_state )
269269   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
270270
271   AM_RANGE(0x2000, 0x2000) AM_RAM   // w ff at boot (after clearing commram)
271   AM_RANGE(0x2000, 0x2000) AM_RAM // w ff at boot (after clearing commram)
272272
273   AM_RANGE(0x2400, 0x2400) AM_READ(irq_ack_r)   // r = irq ack.
274   AM_RANGE(0x2400, 0x2400) AM_WRITE(unk_w)   // w = ?
273   AM_RANGE(0x2400, 0x2400) AM_READ(irq_ack_r) // r = irq ack.
274   AM_RANGE(0x2400, 0x2400) AM_WRITE(unk_w)    // w = ?
275275
276   AM_RANGE(0x2800, 0x2800) AM_READ_PORT("COINS") AM_WRITENOP   // rw
276   AM_RANGE(0x2800, 0x2800) AM_READ_PORT("COINS") AM_WRITENOP  // rw
277277
278278   AM_RANGE(0x2801, 0x2801) AM_READ_PORT("DSW4")
279279   AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("DSW3")
r248551r248552
281281   AM_RANGE(0x3400, 0x3400) AM_READWRITE(iox_r, iox_w)
282282   AM_RANGE(0x3401, 0x3401) AM_READ(iox_status_r)
283283
284   AM_RANGE(0x3000, 0x3000) AM_RAM   // rw, comm in test mode
285   AM_RANGE(0x3001, 0x3001) AM_RAM   // rw, ""
284   AM_RANGE(0x3000, 0x3000) AM_RAM // rw, comm in test mode
285   AM_RANGE(0x3001, 0x3001) AM_RAM // rw, ""
286286
287287   AM_RANGE(0x3800, 0x3bff) AM_RAM AM_SHARE("commram")
288288
r248551r248552
375375 Switches 7 & 8 control the payout as follows:
376376
377377            Off/Off Off/On  On/Off  On/On   Notes
378          ---------------------------------------------------------------------------------------------
378            ---------------------------------------------------------------------------------------------
379379Jackpot MB   5000    5000    5000    2000   Ryl Flush bonus at Max Bet
380380   Jackpot   2500    2500    2500    1000   Ryl Flush bonus at 5 coins + 500 (or 200) per coin up to Max Bet
381381   Mini JP   1500    1500    1000     500   Str Flush bonus at Max Bet
r248551r248552
444444  3 of a Kind winning hand Jacks or higher enters Fever Mode
445445  You start with a pair of your 3 of a Kind cards & you draw 3 cards each hand.
446446    Jacks through Kings get 5 Fever Mode Draws
447   Aces get 15 Fever Mode Draws
447    Aces get 15 Fever Mode Draws
448448*/
449449   PORT_DIPNAME( 0x20, 0x20, "Fever Mode" ) PORT_DIPLOCATION("SW3:6")
450450   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
r248551r248552
455455   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
456456
457457   PORT_START("DSW4")
458   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:7" )   // X in service mode
459   PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:8" )   // ""
458   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:7" )   // X in service mode
459   PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:8" )   // ""
460460   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:1")
461461   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
462462   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
463   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:2" )   // "Excess switch time" error
463   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:2" )   // "Excess switch time" error
464464   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW4:3" )
465465   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW4:4" )
466466   PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:5" )
r248551r248552
522522static MACHINE_CONFIG_START( thedealr, thedealr_state )
523523
524524   // basic machine hardware
525   MCFG_CPU_ADD("maincpu", R65C02, XTAL_16MHz/8)   // 2 MHz?
525   MCFG_CPU_ADD("maincpu", R65C02, XTAL_16MHz/8)   // 2 MHz?
526526   MCFG_CPU_PROGRAM_MAP(thedealr)
527527   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", thedealr_state, thedealr_interrupt, "screen", 0, 1)
528528
529   MCFG_CPU_ADD("subcpu", R65C02, XTAL_16MHz/8)   // 2 MHz?
529   MCFG_CPU_ADD("subcpu", R65C02, XTAL_16MHz/8)    // 2 MHz?
530530   MCFG_CPU_PROGRAM_MAP(thedealr_sub)
531531   MCFG_CPU_VBLANK_INT_DRIVER("screen", thedealr_state, nmi_line_pulse)
532532
r248551r248552
555555
556556   // sound hardware
557557   MCFG_SPEAKER_STANDARD_MONO("mono")
558   MCFG_SOUND_ADD("aysnd", YM2149, XTAL_16MHz/8)   // 2 MHz?
558   MCFG_SOUND_ADD("aysnd", YM2149, XTAL_16MHz/8)   // 2 MHz?
559559   MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
560560   MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
561561   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
trunk/src/mame/drivers/tnzs.c
r248551r248552
24952495   ROM_LOAD( "b53-15.pal16l8a.subpcb.ic6.jed", 0x00000, 0x01000, NO_DUMP) // on sub pcb
24962496ROM_END
24972497
2498/* tnzs - old style PCB sets
2498/* tnzs - old style PCB sets
24992499The New Zealand Story
25002500Taito, 1988
25012501
trunk/src/mame/drivers/ttchamp.c
r248551r248552
8282
8383   required_device<cpu_device> m_maincpu;
8484   required_device<palette_device> m_palette;
85   
85
8686   UINT16 m_paloff;
8787   UINT16 m_port10;
8888   UINT8 m_rombank;
r248551r248552
155155
156156   m_bakram = auto_alloc_array(machine(), UINT8, 0x100);
157157   machine().device<nvram_device>("backram")->set_base(m_bakram, 0x100);
158   
158
159159   save_item(NAME(m_paloff));
160160   save_item(NAME(m_port10));
161161   save_item(NAME(m_rombank));
trunk/src/mame/drivers/turbo.c
r248551r248552
10851085ROM_START( turbob )
10861086   ROM_REGION( 0x6000, "maincpu", 0 )
10871087   // B revision label on 1st rom, A revision for 2nd / 3rd, 2nd rom was faulty, 3rd rom matched existing set, existing 2nd rom passes rom check.
1088    ROM_LOAD( "epr-1363_t5b.ic76",  0x0000, 0x2000, CRC(f7f28149) SHA1(08aec3edd6d756b14b2f10fe5abd22ac83c79fcc) ) /* CPU module stamped as 834-0128 */
1089    ROM_LOAD( "epr-1364_t5a.ic89",  0x2000, 0x2000, CRC(6a341693) SHA1(428927c4a14bf82225875012c255d25dcffaf2ab) )
1090    ROM_LOAD( "epr-1365_t5a.ic103", 0x4000, 0x2000, CRC(3b6b0dc8) SHA1(3ebfa3f9fabd444ee105591acb6984b6b3523725) )
1088   ROM_LOAD( "epr-1363_t5b.ic76",  0x0000, 0x2000, CRC(f7f28149) SHA1(08aec3edd6d756b14b2f10fe5abd22ac83c79fcc) ) /* CPU module stamped as 834-0128 */
1089   ROM_LOAD( "epr-1364_t5a.ic89",  0x2000, 0x2000, CRC(6a341693) SHA1(428927c4a14bf82225875012c255d25dcffaf2ab) )
1090   ROM_LOAD( "epr-1365_t5a.ic103", 0x4000, 0x2000, CRC(3b6b0dc8) SHA1(3ebfa3f9fabd444ee105591acb6984b6b3523725) )
10911091
10921092   ROM_REGION( 0x20000, "sprites", 0 ) /* sprite data */
10931093   ROM_LOAD( "epr-1246.prom-ic84", 0x00000, 0x2000, CRC(555bfe9a) SHA1(1e56385475eeff044dcd9b44a154991d3efe995e) ) /* level 0 */
r248551r248552
11921192
11931193ROM_START( turbod )
11941194   ROM_REGION( 0x6000, "maincpu", 0 )
1195    // no letter on rom labels, numbered 1363-1365, possibly the original 1363-1365 revision? - service mode still shows the older EPR-1262 through EPR-1264 tho?
1196    ROM_LOAD( "1363.ic76",  0x0000, 0x2000, CRC(b6329a00) SHA1(02ca3d7703607bc0390a14d838fafb01a3e3cdef) ) /* CPU module stamped as 834-0128 */
1195   // no letter on rom labels, numbered 1363-1365, possibly the original 1363-1365 revision? - service mode still shows the older EPR-1262 through EPR-1264 tho?
1196   ROM_LOAD( "1363.ic76",  0x0000, 0x2000, CRC(b6329a00) SHA1(02ca3d7703607bc0390a14d838fafb01a3e3cdef) ) /* CPU module stamped as 834-0128 */
11971197   ROM_LOAD( "1364.ic89",  0x2000, 0x2000, CRC(3192f83b) SHA1(78dabb75e38f5f8331bfc43dce852a4c4397f874) )
11981198   ROM_LOAD( "1365.ic103", 0x4000, 0x2000, CRC(23a3303a) SHA1(bcc4ab9203060b4043d779b7a242abc583093dbb) )
11991199
trunk/src/mame/drivers/vegas.c
r248551r248552
25372537
25382538   DISK_REGION( "ide:0:hdd:image" )
25392539   // various strings from this image
2540   // SHOWTIME REV 2.0
2540   // SHOWTIME REV 2.0
25412541   // BUILD DATE: Apr 25 1999 (diag.exe?)
25422542   // BUILD DATE: Apr 21 1999 (game?)
25432543   DISK_IMAGE( "nbashowt", 0, SHA1(f7c56bc3dcbebc434de58034986179ae01127f87) )
r248551r248552
25552555
25562556   DISK_REGION( "ide:0:hdd:image" )
25572557   // various strings from this image
2558   //NBA SHOWTIME 2.1
2558   //NBA SHOWTIME 2.1
25592559   //BUILD DATE: Sep 22 1999 (diag.exe?)
25602560   //BUILD DATE: Sep 21 1999 (game?)
25612561   DISK_IMAGE( "nbanfl", 0, SHA1(f60c627f85f1bf58f2ea674063736a1e516e7e9e) )
r248551r248552
25682568// it's possible the boot rom and CHD are mismatched here
25692569ROM_START( nbagold )
25702570   ROM_REGION32_LE( 0x80000, "user1", 0 )
2571   ROM_LOAD( "nbagold_jan10_2000.u27", 0x000000, 0x80000, CRC(6768e802) SHA1(d994e3efe14f57e261841134ddd1489fa67d418b) ) // 11:29:11 Jan 10 2000. BIOS FOR NBAGOLD USING BANSHEE / 11:23:58 Jan 10 2000. POST FOR NBAGOLD USING BANSHEE
2571   ROM_LOAD( "nbagold_jan10_2000.u27", 0x000000, 0x80000, CRC(6768e802) SHA1(d994e3efe14f57e261841134ddd1489fa67d418b) ) // 11:29:11 Jan 10 2000. BIOS FOR NBAGOLD USING BANSHEE / 11:23:58 Jan 10 2000. POST FOR NBAGOLD USING BANSHEE
25722572
25732573   DISK_REGION( "ide:0:hdd:image" )
25742574   // various strings from this image
r248551r248552
25782578   //BUILD DATE:Feb 10 2000 (something else?)
25792579   DISK_IMAGE( "nbanfl3", 0,  SHA1(19a51346ce5ae4e06e8dff3eb4bed59ec1ee855f))
25802580   // these both contain the same strings / build dates, same thing with different user data / drive sizes?
2581//   DISK_IMAGE( "nbanfl27", 0, SHA1(da371d27e2fbceec493e2203055e0c1399eaf3b9) )
2582//   DISK_IMAGE( "sportstn", 0, SHA1(9442feefaeb5ae4a090422e937615f8a2d8e8f31) )
2583   
2581//  DISK_IMAGE( "nbanfl27", 0, SHA1(da371d27e2fbceec493e2203055e0c1399eaf3b9) )
2582//  DISK_IMAGE( "sportstn", 0, SHA1(9442feefaeb5ae4a090422e937615f8a2d8e8f31) )
25842583
2584
25852585   ROM_REGION16_LE( 0x10000, "dcs", 0 )    /* Vegas SIO boot ROM */
25862586   ROM_LOAD16_BYTE( "vegassio.bin", 0x000000, 0x8000, CRC(d1470e23) SHA1(f6e8405cfa604528c0224401bc374a6df9caccef) )
25872587
trunk/src/mame/drivers/xyonix.c
r248551r248552
262262
263263   ROM_REGION( 0x10000, "mcu", 0 )
264264   ROM_LOAD( "mc68705p3s.e7", 0x00000, 0x780, BAD_DUMP CRC(f60cdd86) SHA1(e18cc598153b3e108942328ee9c5b9f83b034c41) ) // FIXED BITS (xxxxxx0x)
265   
265
266266   ROM_REGION( 0x10000, "gfx1", 0 )
267267   ROM_LOAD( "xyonix1.bin", 0x00000, 0x08000, CRC(3dfa9596) SHA1(52cdbbe18f83cea7248c29588ea3a18c4bb7984f) )
268268   ROM_LOAD( "xyonix2.bin", 0x08000, 0x08000, CRC(db87343e) SHA1(62bc30cd65b2f8976cd73a0b349a9ccdb3faaad2) )
r248551r248552
274274/* GAME drivers **************************************************************/
275275
276276GAME( 1989, xyonix, 0, xyonix, xyonix, driver_device, 0, ROT0, "Philko", "Xyonix", GAME_SUPPORTS_SAVE )
277   
No newline at end of file
277   
trunk/src/mame/includes/cclimber.h
r248551r248552
2222      m_toprollr_bg_videoram(*this, "bg_videoram"),
2323      m_toprollr_bg_coloram(*this, "bg_coloram"),
2424      m_decrypted_opcodes(*this, "decrypted_opcodes") { }
25     
25
2626   required_device<cpu_device> m_maincpu;
2727   optional_device<cpu_device> m_audiocpu;
2828   required_device<gfxdecode_device> m_gfxdecode;
trunk/src/mame/includes/deco32.h
r248551r248552
116116
117117   // nslasher
118118   DECLARE_WRITE32_MEMBER(nslasher_eeprom_w);
119   
119
120120   // tattass
121121   DECLARE_WRITE32_MEMBER(tattass_control_w);
122122
r248551r248552
205205   UINT32 m_sprite_ctrl;
206206   int m_lightgun_port;
207207   bitmap_rgb32 m_temp_render_bitmap;
208   
208
209209   DECLARE_READ32_MEMBER(lightgun_r);
210210   DECLARE_WRITE32_MEMBER(lightgun_w);
211211   DECLARE_WRITE32_MEMBER(sprite_control_w);
trunk/src/mame/includes/itech8.h
r248551r248552
4040   required_device<tms34061_device> m_tms34061;
4141   required_device<tlc34076_device> m_tlc34076;
4242   required_device<screen_device> m_screen;
43   
43
4444   rectangle m_visarea;
4545
4646   UINT8 m_grom_bank;
r248551r248552
165165                     UINT16 *sens0, UINT16 *sens1, UINT16 *sens2, UINT16 *sens3);
166166   void compute_sensors();
167167   TIMER_CALLBACK_MEMBER( delayed_z80_control_w );
168   
168
169169protected:
170170   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
171171};
trunk/src/mame/includes/micro3d.h
r248551r248552
229229   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
230230private:
231231   // internal state
232//   union
233//   {
234//      struct
235//      {
236//         UINT8 m_vcf;
237//         UINT8 m_vcq;
238//         UINT8 m_vca;
239//         UINT8 m_pan;
240//      };
232//  union
233//  {
234//      struct
235//      {
236//          UINT8 m_vcf;
237//          UINT8 m_vcq;
238//          UINT8 m_vca;
239//          UINT8 m_pan;
240//      };
241241      UINT8 m_dac[4];
242//   };
242//  };
243243
244244   float               m_gain;
245245   UINT32              m_noise_shift;
trunk/src/mame/includes/nbmj9195.h
r248551r248552
3838   required_device<dac_device> m_dac2;
3939   required_device<screen_device> m_screen;
4040   required_device<palette_device> m_palette;
41   
41
4242   optional_shared_ptr<UINT8> m_palette_ptr; //shabdama doesn't use it at least for now
4343
4444   int m_inputport;
trunk/src/mame/includes/pcktgal.h
r248551r248552
3434   DECLARE_WRITE8_MEMBER(adpcm_data_w);
3535   DECLARE_READ8_MEMBER(adpcm_reset_r);
3636   DECLARE_WRITE_LINE_MEMBER(adpcm_int);
37   
37
3838   DECLARE_DRIVER_INIT(pcktgal);
3939   DECLARE_PALETTE_INIT(pcktgal);
4040   virtual void machine_start();
trunk/src/mame/includes/taitoair.h
r248551r248552
7575   INT16 m_eyecoordBuffer[4];  /* homogeneous */
7676
7777   bool m_gradbank;
78   
78
7979   DECLARE_READ16_MEMBER(dsp_m_r);
8080   DECLARE_WRITE16_MEMBER(dsp_m_w);
8181
r248551r248552
130130   void fb_copy_op(void);
131131   void fb_fill_op(void);
132132   void fb_erase_op(void);
133   
133
134134   void fill_slope( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 header, INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 y1, INT32 y2, INT32 *nx1, INT32 *nx2 );
135135   void fill_poly( bitmap_ind16 &bitmap, const rectangle &cliprect, const struct taitoair_poly *q );
136136   int projectEyeCoordToScreen(float* projectionMatrix,const int Res,INT16* eyePoint3d,int type);
trunk/src/mame/machine/awboard.c
r248551r248552
9999 00000000 - 00800000 FMEM1 flash ROM
100100 00800000 - 01000000 FMEM2 flash ROM
101101 01000000 - 02000000 unk, probably mirror of above
102 02000000 - 04000000 MROM1 MROM4 MROM7 MROM10 \               
102 02000000 - 04000000 MROM1 MROM4 MROM7 MROM10 \
103103 04000000 - 06000000 MROM2 MROM5 MROM8 MROM11   banked mask ROMs
104 06000000 - 08000000 MROM3 MROM6 MROM9 MROM12 /               
104 06000000 - 08000000 MROM3 MROM6 MROM9 MROM12 /
105105
106106 Type 3:
107107
r248551r248552
116116
117117 Development:
118118
119 00000000 - 00800000 IC12 \         
119 00000000 - 00800000 IC12 \
120120        .....               flash ROMs
121 07800000 - 08000000 IC27 /         
121 07800000 - 08000000 IC27 /
122122
123
123
124124 In short:
125125
126126     EPR-ROM
trunk/src/mame/machine/dc.c
r248551r248552
732732#if (defined(__MINGW32__) && (__GNUC__ >= 5))
733733#pragma GCC diagnostic pop
734734#endif
735
trunk/src/mame/machine/fd1089.c
r248551r248552
223223
224224fd1089_base_device::fd1089_base_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)
225225   : m68000_device(mconfig, tag, owner, clock, shortname, source),
226     m_decrypted_opcodes(*this, ":fd1089_decrypted_opcodes")
226      m_decrypted_opcodes(*this, ":fd1089_decrypted_opcodes")
227227{
228228   // override the name after the m68000 initializes
229229   m_name.assign(name);
trunk/src/mame/machine/m1comm.c
r248551r248552
330330#ifdef __M1COMM_SIMULATION__
331331void m1comm_device::comm_tick()
332332{
333   if (m_linkenable == 0x01)   
333   if (m_linkenable == 0x01)
334334   {
335335      int frameStart = 0x0010;
336336      int frameOffset = 0x0000;
r248551r248552
568568      }
569569   }
570570}
571#endif
No newline at end of file
571#endif
trunk/src/mame/machine/mc8123.h
r248551r248552
1010// an arbitrary amount of banks at 8000-BFFF.
1111
1212void mc8123_decode(UINT8 *rom, UINT8 *opcodes, const UINT8 *key, int length);
13
trunk/src/mame/machine/pgmcrypt.c
r248551r248552
15081508   int rom_size = 0x200000;
15091509
15101510   for(i=0; i<rom_size/2; i++) {
1511
15121511      UINT16 x = src[i];
15131512
15141513      // not 100% verified
r248551r248552
15261525      src[i] = x;
15271526   }
15281527}
1529
trunk/src/mame/machine/s32comm.c
r248551r248552
1818| |---------------------------------|                                            |
1919| |---------------------------------|  LED     CN? CN?                 CNK       |
2020|--------------------------------------------------------------------------------|
21   Setup:
22      Z80      - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40)
23      MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone]
24      MB89374  - Fujitsu MB89374 Data Link Controller (SDIP42)
25      MB8464   - Fujitsu MB8464 8k x8 SRAM (DIP28)
26      MB8421   - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52)
21    Setup:
22        Z80      - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40)
23        MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone]
24        MB89374  - Fujitsu MB89374 Data Link Controller (SDIP42)
25        MB8464   - Fujitsu MB8464 8k x8 SRAM (DIP28)
26        MB8421   - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52)
2727
28   Board:
29      837-9409   F1 Super Lap
28    Board:
29        837-9409    F1 Super Lap
3030
31   EEPROM:
32      14084.17   Rad Rally
33      15612.17   F1 Super Lap
31    EEPROM:
32        14084.17    Rad Rally
33        15612.17    F1 Super Lap
3434
3535Sega System Multi32 Comm PCB 837-8792-91
3636( http://images.arianchen.de/sega-comm/orunners-front.jpg )
r248551r248552
4949| |---------------------------------|        |---------------------------------| |
5050|                                  CN8 CN9                                       |
5151|--------------------------------------------------------------------------------|
52   Setup:
53      15033.17 - INTEL D27C100 128k x8 EPROM (DIP32, labelled 'EPR-15033')
54      Z80      - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40)
55      MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone]
56      MB89374  - Fujitsu MB89374 Data Link Controller (SDIP42)
57      MB8421   - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52)
58      MB8464A  - Fujitsu MB8464-10LL 8k x8 SRAM (DIP28)
59      315-5611 - Lattice GAL16V8A PAL (DIP20)
60      315-5506 - Lattice GAL16V8A PAL (DIP20)
52    Setup:
53        15033.17 - INTEL D27C100 128k x8 EPROM (DIP32, labelled 'EPR-15033')
54        Z80      - Zilog Z0840004PSC Z80 CPU, running at 4.000MHz (DIP40)
55        MB89237A - Fujitsu MB89237A DMA-Controller (DIP20) [most likely i8237A clone]
56        MB89374  - Fujitsu MB89374 Data Link Controller (SDIP42)
57        MB8421   - Fujitsu MB8421-12LP 2k x8 SRAM (SDIP52)
58        MB8464A  - Fujitsu MB8464-10LL 8k x8 SRAM (DIP28)
59        315-5611 - Lattice GAL16V8A PAL (DIP20)
60        315-5506 - Lattice GAL16V8A PAL (DIP20)
6161
62   Board:
63      837-8792  OutRunners, Stadium Cross
62    Board:
63        837-8792  OutRunners, Stadium Cross
6464
65   EEPROM:
66      15033.17  OutRunners, Stadium Cross
65    EEPROM:
66        15033.17  OutRunners, Stadium Cross
6767*/
6868
6969#include "machine/s32comm.h"
r248551r248552
198198      m_linkalive = 0x00;
199199      m_linkcount = 0x00;
200200      m_linktimer = 0x04; //0x00E8; // 58 fps * 4s
201     
201
202202      comm_tick();
203203   }
204204#endif
r248551r248552
213213{
214214   if (!m_cn)
215215      return;
216     
216
217217   m_fg = data & 0x01;
218218}
219219
r248551r248552
229229void s32comm_device::set_linktype(UINT16 linktype)
230230{
231231   m_linktype = linktype;
232   
232
233233   switch (m_linktype)
234234   {
235235      case 14084:
r248551r248552
268268
269269void s32comm_device::comm_tick_14084()
270270{
271   if (m_linkenable == 0x01)   
271   if (m_linkenable == 0x01)
272272   {
273273      int frameStart = 0x0480;
274274      int frameOffset = 0x0000;
r248551r248552
287287      {
288288         // waiting...
289289         m_shared[4] = 0x00;
290         
290
291291         // check rx socket
292292         if (!m_line_rx.is_open())
293293         {
294294            printf("S32COMM: listen on %s\n", m_localhost);
295295            m_line_rx.open(m_localhost);
296296         }
297         
297
298298         // check tx socket
299299         if (!m_line_tx.is_open())
300300         {
301301            printf("S32COMM: connect to %s\n", m_remotehost);
302302            m_line_tx.open(m_remotehost);
303303         }
304         
304
305305         // if both sockets are there check ring
306306         if ((m_line_rx.is_open()) && (m_line_tx.is_open()))
307307         {
r248551r248552
338338                        m_line_tx.write(m_buffer, dataSize);
339339                     }
340340                  }
341                 
341
342342                  // 0xFE - link size
343343                  else if (idx == 0xFE)
344344                  {
r248551r248552
349349                        // slave and relay forward message
350350                        m_line_tx.write(m_buffer, dataSize);
351351                     }
352                     
352
353353                     // consider it done
354354                     printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount);
355355                     m_linkalive = 0x01;
356                     
356
357357                     // write to shared mem
358358                     m_shared[4] = 0x01;
359359                     m_shared[1] = m_linkid;
r248551r248552
371371                  }
372372                  printf("S32COMM: droped a message...\n");
373373               }
374               
374
375375               if (m_linkalive == 0x00)
376376                  recv = m_line_rx.read(m_buffer, dataSize);
377377               else
378378                  recv = 0;
379379            }
380           
380
381381            // if we are master and link is not yet established
382382            if (isMaster && (m_linkalive == 0x00))
383383            {
r248551r248552
405405                  m_shared[1] = m_linkid;
406406                  m_shared[0] = m_linkcount;
407407               }
408               
408
409409               else if (m_linktimer > 0x02)
410410               {
411411                  // decrease delay timer
r248551r248552
415415               }
416416            }
417417         }
418      }   
418      }
419419
420420      // update "ring buffer" if link established
421421      if (m_linkalive == 0x01)
r248551r248552
470470            }
471471            recv = m_line_rx.read(m_buffer, dataSize);
472472         }
473         
473
474474         // update "ring buffer" if link established
475475         // live relay does not send data
476476         if (m_linkid != 0x00 && m_shared[3] != 0x00)
r248551r248552
486486            // push message to other nodes
487487            m_line_tx.write(m_buffer, dataSize);
488488
489            // master sends some additional status bytes
489            // master sends some additional status bytes
490490            if (isMaster){
491491               m_buffer[0] = 0xF0;
492492               for (int j = 0x00 ; j < frameSize ; j++)
r248551r248552
501501               m_line_tx.write(m_buffer, dataSize);
502502            }
503503         }
504         
504
505505         // clear 03
506506         m_shared[3] = 0x00;
507507      }
508   }   
508   }
509509}
510510
511511void s32comm_device::comm_tick_15033()
512512{
513   if (m_linkenable == 0x01)   
513   if (m_linkenable == 0x01)
514514   {
515515      int frameStartTX = 0x0710;
516516      int frameStartRX = 0x0010;
r248551r248552
540540      {
541541         // waiting...
542542         m_shared[4] = 0x00;
543         
543
544544         // check rx socket
545545         if (!m_line_rx.is_open())
546546         {
547547            printf("S32COMM: listen on %s\n", m_localhost);
548548            m_line_rx.open(m_localhost);
549549         }
550         
550
551551         // check tx socket
552552         if (!m_line_tx.is_open())
553553         {
554554            printf("S32COMM: connect to %s\n", m_remotehost);
555555            m_line_tx.open(m_remotehost);
556556         }
557         
557
558558         // if both sockets are there check ring
559559         if ((m_line_rx.is_open()) && (m_line_tx.is_open()))
560560         {
r248551r248552
591591                        m_line_tx.write(m_buffer, dataSize);
592592                     }
593593                  }
594                 
594
595595                  // 0xFE - link size
596596                  else if (idx == 0xFE)
597597                  {
r248551r248552
602602                        // slave and relay forward message
603603                        m_line_tx.write(m_buffer, dataSize);
604604                     }
605                     
605
606606                     // consider it done
607607                     printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount);
608608                     m_linkalive = 0x01;
609                     
609
610610                     // write to shared mem
611611                     m_shared[4] = 0x01;
612612                     m_shared[1] = m_linkid;
r248551r248552
624624                  }
625625                  printf("S32COMM: droped a message...\n");
626626               }
627               
627
628628               if (m_linkalive == 0x00)
629629                  recv = m_line_rx.read(m_buffer, dataSize);
630630               else
631631                  recv = 0;
632632            }
633           
633
634634            // if we are master and link is not yet established
635635            if (isMaster && (m_linkalive == 0x00))
636636            {
r248551r248552
658658                  m_shared[1] = m_linkid;
659659                  m_shared[0] = m_linkcount;
660660               }
661               
661
662662               else if (m_linktimer > 0x02)
663663               {
664664                  // decrease delay timer
r248551r248552
668668               }
669669            }
670670         }
671      }   
671      }
672672
673673      // update "ring buffer" if link established
674674      if (m_linkalive == 0x01)
r248551r248552
723723            }
724724            recv = m_line_rx.read(m_buffer, dataSize);
725725         }
726         
726
727727         // update "ring buffer" if link established
728728         // live relay does not send data
729729         if (m_linkid != 0x00 && m_shared[3] != 0x00)
r248551r248552
739739            // push message to other nodes
740740            m_line_tx.write(m_buffer, dataSize);
741741
742            // master sends some additional status bytes
742            // master sends some additional status bytes
743743            if (isMaster){
744744               m_buffer[0] = 0xF0;
745745               for (int j = 0x00 ; j < frameSize ; j++)
r248551r248552
757757         // clear 03
758758         m_shared[3] = 0x00;
759759      }
760   }   
760   }
761761}
762762
763763void s32comm_device::comm_tick_15612()
764764{
765   if (m_linkenable == 0x01)   
765   if (m_linkenable == 0x01)
766766   {
767767      int frameStart = 0x0010;
768768      int frameOffset = 0x0000;
r248551r248552
781781      {
782782         // waiting...
783783         m_shared[0] = 0x05;
784         
784
785785         // check rx socket
786786         if (!m_line_rx.is_open())
787787         {
788788            printf("S32COMM: listen on %s\n", m_localhost);
789789            m_line_rx.open(m_localhost);
790790         }
791         
791
792792         // check tx socket
793793         if (!m_line_tx.is_open())
794794         {
795795            printf("S32COMM: connect to %s\n", m_remotehost);
796796            m_line_tx.open(m_remotehost);
797797         }
798         
798
799799         // if both sockets are there check ring
800800         if ((m_line_rx.is_open()) && (m_line_tx.is_open()))
801801         {
r248551r248552
832832                        m_line_tx.write(m_buffer, dataSize);
833833                     }
834834                  }
835                 
835
836836                  // 0xFE - link size
837837                  else if (idx == 0xFE)
838838                  {
r248551r248552
843843                        // slave and relay forward message
844844                        m_line_tx.write(m_buffer, dataSize);
845845                     }
846                     
846
847847                     // consider it done
848848                     printf("S32COMM: link established - id %02x of %02x\n", m_linkid, m_linkcount);
849849                     m_linkalive = 0x01;
850                     
850
851851                     // write to shared mem
852852                     m_shared[0] = 0x01;
853853                     m_shared[2] = m_linkid;
r248551r248552
865865                  }
866866                  printf("S32COMM: droped a message...\n");
867867               }
868               
868
869869               if (m_linkalive == 0x00)
870870                  recv = m_line_rx.read(m_buffer, dataSize);
871871               else
872872                  recv = 0;
873873            }
874           
874
875875            // if we are master and link is not yet established
876876            if (isMaster && (m_linkalive == 0x00))
877877            {
r248551r248552
899899                  m_shared[2] = m_linkid;
900900                  m_shared[3] = m_linkcount;
901901               }
902               
902
903903               else if (m_linktimer > 0x02)
904904               {
905905                  // decrease delay timer
r248551r248552
909909               }
910910            }
911911         }
912      }   
912      }
913913
914914      // update "ring buffer" if link established
915915      if (m_linkalive == 0x01)
r248551r248552
964964            }
965965            recv = m_line_rx.read(m_buffer, dataSize);
966966         }
967         
967
968968         // update "ring buffer" if link established
969969         // live relay does not send data
970970         if (m_linkid != 0x00 && m_shared[4] != 0x00)
r248551r248552
980980            // push message to other nodes
981981            m_line_tx.write(m_buffer, dataSize);
982982
983            // master sends some additional status bytes
983            // master sends some additional status bytes
984984            if (isMaster){
985985               m_buffer[0] = 0xF0;
986986               for (int j = 0x00 ; j < frameSize ; j++)
trunk/src/mame/machine/s32comm.h
r248551r248552
1111
1212#define MCFG_S32COMM_ADD(_tag ) \
1313   MCFG_DEVICE_ADD(_tag, S32COMM, 0)
14   
14
1515//**************************************************************************
1616//  TYPE DEFINITIONS
1717//**************************************************************************
r248551r248552
4545   DECLARE_READ8_MEMBER(fg_r);
4646   DECLARE_WRITE8_MEMBER(fg_w);
4747
48  // IRQ logic - 5 = VINT, 7 = DLC
48   // IRQ logic - 5 = VINT, 7 = DLC
4949   void check_vint_irq();
5050#ifdef __S32COMM_SIMULATION__
5151   void set_linktype(UINT16 linktype);
r248551r248552
5858
5959private:
6060   UINT8 m_shared[0x800];  // 2k shared memory
61   UINT8   m_zfg;                  // z80 flip gate? purpose unknown, bit0 is stored
62   UINT8   m_cn;                     // bit0 is used to enable/disable the comm board
63   UINT8   m_fg;                     // flip gate? purpose unknown, bit0 is stored, bit7 is connected to ZFG bit 0
64   
61   UINT8   m_zfg;                      // z80 flip gate? purpose unknown, bit0 is stored
62   UINT8   m_cn;                           // bit0 is used to enable/disable the comm board
63   UINT8   m_fg;                           // flip gate? purpose unknown, bit0 is stored, bit7 is connected to ZFG bit 0
64
6565   emu_file m_line_rx;    // rx line - can be either differential, simple serial or toslink
6666   emu_file m_line_tx;    // tx line - is differential, simple serial and toslink
6767   char m_localhost[256];
6868   char m_remotehost[256];
6969   UINT8 m_buffer[0x800];
70   
70
7171#ifdef __S32COMM_SIMULATION__
7272   UINT8 m_linkenable;
7373   UINT16 m_linktimer;
r248551r248552
7676   UINT8 m_linkcount;
7777
7878   UINT16 m_linktype;
79   
79
8080   void comm_tick();
81   
81
8282   void comm_tick_14084();
8383   void comm_tick_15033();
8484   void comm_tick_15612();
trunk/src/mame/machine/segacrp2.c
r248551r248552
4848
4949
5050void sega_decode_2(UINT8 *rom, UINT8 *decrypted,
51               const UINT8 xor_table[128],const int swap_table[128])
51               const UINT8 xor_table[128],const int swap_table[128])
5252{
5353   static const UINT8 swaptable[24][4] =
5454   {
trunk/src/mame/machine/segacrp2.h
r248551r248552
22// copyright-holders:Nicola Salmoria
33
44void sega_decode_2(UINT8 *rom, UINT8 *decrypted,
5         const UINT8 xor_table[128],const int swap_table[128]);
5         const UINT8 xor_table[128],const int swap_table[128]);
66
77void sega_decode_317(UINT8 *rom, UINT8 *decrypted, int shift);
trunk/src/mame/mess.lst
r248551r248552
15801580fsa1st
15811581
15821582// Microsoft
1583xbox   
1583xbox
15841584
15851585// NASCOM Microcomputers
15861586nascom1   // 1978 Nascom 1
trunk/src/mame/video/deco32.c
r248551r248552
159159VIDEO_START_MEMBER(deco32_state,captaven)
160160{
161161   m_has_ace_ram=0;
162   
162
163163   deco32_state::video_start();
164164}
165165
r248551r248552
168168   m_dirty_palette = auto_alloc_array(machine(), UINT8, 4096);
169169   m_sprgen->alloc_sprite_bitmap();
170170   m_has_ace_ram=0;
171   
171
172172   save_pointer(NAME(m_dirty_palette), 4096);
173173   deco32_state::video_start();
174174}
r248551r248552
184184   m_sprgen2->alloc_sprite_bitmap();
185185   memset(m_dirty_palette,0,4096);
186186   m_has_ace_ram=1;
187   
187
188188   save_pointer(NAME(m_dirty_palette), 4096);
189189   save_item(NAME(m_ace_ram_dirty));
190190   save_item(NAME(m_spriteram16_2));
191191   save_item(NAME(m_spriteram16_2_buffered));
192   
192
193193   deco32_state::video_start();
194194}
195195
r248551r248552
207207   m_screen->register_screen_bitmap(m_temp_render_bitmap);
208208
209209   memset(m_dirty_palette,0,4096);
210   
210
211211   m_has_ace_ram=0;
212212
213213   save_item(NAME(m_sprite_ctrl));
trunk/src/mame/video/hexion.c
r248551r248552
5151   m_vram[0] = memregion("maincpu")->base() + 0x30000;
5252   m_vram[1] = m_vram[0] + 0x2000;
5353   m_unkram = m_vram[1] + 0x2000;
54   
54
5555   membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x2000);
5656}
5757
trunk/src/mame/video/itech8.c
r248551r248552
149149   /* fetch the GROM base */
150150   m_grom_base = memregion("grom")->base();
151151   m_grom_size = memregion("grom")->bytes();
152   
152
153153   save_item(NAME(m_blitter_data));
154154   save_item(NAME(m_blit_in_progress));
155155   save_item(NAME(m_page_select));
trunk/src/mame/video/namcona1.c
r248551r248552
185185   m_shaperam.resize(0x8000);
186186
187187   m_gfxdecode->gfx(2)->set_source(&m_shaperam[0]);
188   
188
189189   save_item(NAME(m_shaperam));
190190   save_item(NAME(m_palette_is_dirty));
191   
191
192192   machine().save().register_postload(save_prepost_delegate(FUNC(namcona1_state::postload), this));
193193} /* video_start */
194194
trunk/src/mame/video/naughtyb.c
r248551r248552
107107
108108   /* Naughty Boy has a virtual screen twice as large as the visible screen */
109109   m_tmpbitmap.allocate(68*8,28*8,m_screen->format());
110   
110
111111   save_item(NAME(m_cocktail));
112112   save_item(NAME(m_palreg));
113113   save_item(NAME(m_bankreg));
trunk/src/mame/video/nbmj9195.c
r248551r248552
372372{
373373   int width = m_screen->width();
374374   int height = m_screen->height();
375   
375
376376   m_blitter_timer = timer_alloc(TIMER_BLITTER);
377377
378378   m_screen->register_screen_bitmap(m_tmpbitmap[0]);
r248551r248552
381381   m_scanline[0] = m_scanline[1] = SCANLINE_MIN;
382382   m_nb19010_busyflag = 1;
383383   m_gfxdraw_mode = 0;
384   
384
385385   save_item(NAME(m_scrollx));
386386   save_item(NAME(m_scrolly));
387387   save_item(NAME(m_scrollx_raster));
r248551r248552
424424   m_nb19010_busyflag = 1;
425425   m_gfxdraw_mode = 1;
426426   m_screen_refresh = 1;
427   
427
428428   save_item(NAME(m_scrollx));
429429   save_item(NAME(m_scrolly));
430430   save_item(NAME(m_scrollx_raster));
trunk/src/mame/video/segas32.c
r248551r248552
11031103         if (!flipx)
11041104         {
11051105            srcx = cliprect.min_x + xscroll;
1106            srcxstep = 1;           
1106            srcxstep = 1;
11071107         }
11081108         else
1109         {   
1109         {
11101110            srcx = cliprect.max_x + xscroll;
11111111            srcxstep = -1;
11121112         }
trunk/src/mame/video/shadfrce.c
r248551r248552
103103
104104void shadfrce_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offset )
105105{
106
107
108106   /* | ---- ---- hhhf Fe-Y | ---- ---- yyyy yyyy | ---- ---- TTTT TTTT | ---- ---- tttt tttt |
109107      | ---- ---- -pCc cccX | ---- ---- xxxx xxxx | ---- ---- ---- ---- | ---- ---- ---- ---- | */
110108
r248551r248552
125123   int hcount;
126124   while (source >= finish)
127125   {
128
129126      int enable = ((source[0] & 0x0004));
130127
131128      if (enable)
trunk/src/mame/video/starcrus.c
r248551r248552
2626
2727   m_proj1_vid = auto_bitmap_ind16_alloc(machine(), 16, 16);
2828   m_proj2_vid = auto_bitmap_ind16_alloc(machine(), 16, 16);
29   
29
3030   save_item(NAME(m_s1_x));
3131   save_item(NAME(m_s1_y));
3232   save_item(NAME(m_s2_x));
trunk/src/mame/video/taitoair.c
r248551r248552
9696   for (offs = start_offset; offs >= 0; offs -= 0x008 / 2)
9797   {
9898      /*!
99       Starting at a particular sequence, sprite DMA seems to stop there and resume via "something",
99       Starting at a particular sequence, sprite DMA seems to stop there and resume via "something",
100100       effectively drawing any other sprite with better priority in the framebuffer scheme of things.
101       
102       @todo reported sequence for DMA pause flag is 0x0c** 0x0000 0x0000 0x0000.
103             Verify how exactly via HW test. Continuing may be determined by a DMA bit write.
101
102       @todo reported sequence for DMA pause flag is 0x0c** 0x0000 0x0000 0x0000.
103             Verify how exactly via HW test. Continuing may be determined by a DMA bit write.
104104       */
105105      if(m_tc0080vco->sprram_r(space, offs + 0, 0xffff) == 0xc00 ||
106         m_tc0080vco->sprram_r(space, offs + 0, 0xffff) == 0xcff) // Air Inferno
106         m_tc0080vco->sprram_r(space, offs + 0, 0xffff) == 0xcff) // Air Inferno
107107         return offs - 8/2;
108     
108
109109      x0        =  m_tc0080vco->sprram_r(space, offs + 1, 0xffff) & 0x3ff;
110110      y0        =  m_tc0080vco->sprram_r(space, offs + 0, 0xffff) & 0x3ff;
111111      zoomx     = (m_tc0080vco->sprram_r(space, offs + 2, 0xffff) & 0x7f00) >> 8;
r248551r248552
113113      tile_offs = (m_tc0080vco->sprram_r(space, offs + 3, 0xffff) & 0x1fff) << 2;
114114      ysize     = size[(m_tc0080vco->sprram_r(space, offs, 0xffff) & 0x0c00) >> 10];
115115
116     
116
117117      if (tile_offs)
118118      {
119119         /* Convert zoomy value to real value as zoomx */
r248551r248552
198198         }
199199      }
200200   }
201   
201
202202   return 0;
203203}
204204
r248551r248552
401401   cliprect.min_y = 3*16;
402402   cliprect.max_x = m_screen->width() - 1;
403403   cliprect.max_y = m_screen->height() - 1;
404   
404
405405   /* clear screen fb */
406406   m_framebuffer[1]->fill(0, cliprect);
407407   /* copy buffer fb into screen fb (at this stage we are ready to draw) */
r248551r248552
421421   cliprect.min_y = 3*16;
422422   cliprect.max_x = m_screen->width() - 1;
423423   cliprect.max_y = m_screen->height() - 1;
424   
424
425425   m_framebuffer[0]->fill(0, cliprect);
426426   //m_framebuffer[1]->fill(0, cliprect);
427427}
r248551r248552
437437   cliprect.min_y = 3*16;
438438   cliprect.max_x = m_screen->width() - 1;
439439   cliprect.max_y = m_screen->height() - 1;
440   
440
441441   if (m_line_ram[0x3fff])
442442   {
443443      int adr = 0x3fff;
r248551r248552
542542         }
543543         if(m_gradbank == true)
544544            base|= 0x1000;
545         
545
546546         *dest++ = base | (cntr >= 0x83f000 ? 0x3f : (cntr >> 12) & 0x3f);
547           
547
548548         c1b += inc1x;
549549         c2b += inc2x;
550550      }
551551      counter1 += inc1y;
552552      counter2 += inc2y;
553553   }
554     
555554
556555
556
557557   copybitmap_trans(bitmap, *m_framebuffer[1], 0, 0, 0, 0, cliprect, 0);
558558
559559   m_tc0080vco->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0);
560560
561561   sprite_ptr = draw_sprites(bitmap, cliprect);
562562
563   m_tc0080vco->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0);   
564   
563   m_tc0080vco->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0);
564
565565   m_tc0080vco->tilemap_draw(screen, bitmap, cliprect, 2, 0, 0);
566566
567567   draw_sprites(bitmap, cliprect, sprite_ptr);
trunk/src/mame/video/tank8.c
r248551r248552
111111   /* VBLANK starts on scanline #256 and ends on scanline #24 */
112112
113113   m_tilemap->set_scrolly(0, 2 * 24);
114   
114
115115   save_item(NAME(m_collision_index));
116116}
117117
trunk/src/mame/video/vsystem_spr.c
r248551r248552
8585   m_pal_mask = 0x3f;
8686
8787   m_newtilecb =  vsystem_tile_indirection_delegate(FUNC(vsystem_spr_device::tile_callback_noindirect), this);
88   
88
8989   memset(&m_curr_sprite, 0, sizeof(m_curr_sprite));
9090}
9191
r248551r248552
177177{
178178   // bind our handler
179179   m_newtilecb.bind_relative_to(*owner());
180   
180
181181   save_item(NAME(m_pal_base));
182   
182
183183   save_item(NAME(m_curr_sprite.ox));
184184   save_item(NAME(m_curr_sprite.xsize));
185185   save_item(NAME(m_curr_sprite.zoomx));
trunk/src/mess/drivers/apple2.c
r248551r248552
15691569COMP( 1982, maxxi,    apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Polymax",  "Maxxi", GAME_SUPPORTS_SAVE )
15701570COMP( 1982, prav82,   apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Pravetz",           "Pravetz 82", GAME_SUPPORTS_SAVE )
15711571COMP( 1982, ace100,   apple2,   0,        apple2,      apple2p, driver_device,  0,        "Franklin Computer", "Franklin Ace 100", GAME_SUPPORTS_SAVE )
1572COMP( 1982, uniap2en, apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Unitron Eletrônica", "Unitron AP II (in English)", GAME_SUPPORTS_SAVE )
1573COMP( 1982, uniap2pt, apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Unitron Eletrônica", "Unitron AP II (in Brazilian Portuguese)", GAME_SUPPORTS_SAVE )
1572COMP( 1982, uniap2en, apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Unitron Eletr??nica", "Unitron AP II (in English)", GAME_SUPPORTS_SAVE )
1573COMP( 1982, uniap2pt, apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Unitron Eletr??nica", "Unitron AP II (in Brazilian Portuguese)", GAME_SUPPORTS_SAVE )
15741574COMP( 1983, agat7,    apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Agat",              "Agat-7", GAME_NOT_WORKING) // disk controller ROM JSRs to $FCA8 which is a delay on apple II, illegal instruction crash here :(
15751575// reverse font direction -\/
15761576COMP( 1984, ivelultr, apple2,   0,        apple2p,     apple2p, driver_device,  0,        "Ivasim",            "Ivel Ultra", GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/casloopy.c
r248551r248552
420420   AM_RANGE(0x04051000, 0x040511ff) AM_READWRITE16(pal_r, pal_w, 0xffffffff)
421421   AM_RANGE(0x04058000, 0x04058007) AM_READWRITE16(vregs_r, vregs_w, 0xffffffff)
422422   AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM AM_SHARE("vregs") // RGB555 brightness control plus scrolling
423//   AM_RANGE(0x05ffff00, 0x05ffffff) AM_READWRITE16(sh7021_r, sh7021_w, 0xffffffff)
423//  AM_RANGE(0x05ffff00, 0x05ffffff) AM_READWRITE16(sh7021_r, sh7021_w, 0xffffffff)
424424//  AM_RANGE(0x05ffff00, 0x05ffffff) - SH7021 internal i/o
425425   AM_RANGE(0x06000000, 0x061fffff) AM_READ(cart_r)
426426   AM_RANGE(0x07000000, 0x070003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb)
trunk/src/mess/drivers/coleco.c
r248551r248552
354354    Unreleased Brazilian Colecovision clone by Microdigital.
355355
356356    It was never released and the only known prototypes were uncovered by an ex-employee of Microdigital
357    called Cláudio Cassens who donated it to collectors (Eduardo Luccas) in June 2015.
357    called Cl??udio Cassens who donated it to collectors (Eduardo Luccas) in June 2015.
358358    -- Felipe Sanches
359359*/
360360ROM_START (onyx)
trunk/src/mess/drivers/daruma.c
r248551r248552
2323class daruma_state : public driver_device
2424{
2525public:
26    daruma_state(const machine_config &mconfig, device_type type, const char *tag)
27        : driver_device(mconfig, type, tag),
28        m_maincpu(*this, "maincpu"),
26   daruma_state(const machine_config &mconfig, device_type type, const char *tag)
27      : driver_device(mconfig, type, tag),
28      m_maincpu(*this, "maincpu"),
2929      m_speaker(*this, "speaker") { }
3030
31    DECLARE_WRITE8_MEMBER(port_w);
32    DECLARE_READ8_MEMBER(port_r);
31   DECLARE_WRITE8_MEMBER(port_w);
32   DECLARE_READ8_MEMBER(port_r);
3333
3434   DECLARE_READ8_MEMBER(dev0_r);
3535   DECLARE_WRITE8_MEMBER(dev1_w);
3636   DECLARE_WRITE8_MEMBER(dev2_w);
3737   DECLARE_READ8_MEMBER(dev4_r);
38    required_device<cpu_device> m_maincpu;
38   required_device<cpu_device> m_maincpu;
3939   required_device<speaker_sound_device> m_speaker;
40    char port0, port1, port2, port3;
40   char port0, port1, port2, port3;
4141};
4242
4343WRITE8_MEMBER(daruma_state::port_w)
4444{
4545//  printf("port_w: write %02X to PORT (offset=%02X)\n", data, offset);
46    switch(offset)
47    {
48        case MCS51_PORT_P0: port0=data;
49        case MCS51_PORT_P1: port1=data;
50        case MCS51_PORT_P2: port2=data;
51        case MCS51_PORT_P3: port3=data;
52    }
46   switch(offset)
47   {
48      case MCS51_PORT_P0: port0=data;
49      case MCS51_PORT_P1: port1=data;
50      case MCS51_PORT_P2: port2=data;
51      case MCS51_PORT_P3: port3=data;
52   }
5353}
5454
5555READ8_MEMBER(daruma_state::port_r)
5656{
57    switch(offset)
58    {
59        case MCS51_PORT_P0: printf("port_r: read %02X from PORT0\n", port0); return port0;
60        case MCS51_PORT_P1: printf("port_r: read %02X from PORT1\n", port1); return port1;
61        case MCS51_PORT_P2: printf("port_r: read %02X from PORT2\n", port2); return port2;
62        case MCS51_PORT_P3: printf("port_r: read %02X from PORT3\n", port3); return port3;
63    }
64    return 0;
57   switch(offset)
58   {
59      case MCS51_PORT_P0: printf("port_r: read %02X from PORT0\n", port0); return port0;
60      case MCS51_PORT_P1: printf("port_r: read %02X from PORT1\n", port1); return port1;
61      case MCS51_PORT_P2: printf("port_r: read %02X from PORT2\n", port2); return port2;
62      case MCS51_PORT_P3: printf("port_r: read %02X from PORT3\n", port3); return port3;
63   }
64   return 0;
6565}
6666
6767READ8_MEMBER(daruma_state::dev0_r)
6868{
69    return 0xFF;
69   return 0xFF;
7070}
7171
7272READ8_MEMBER(daruma_state::dev4_r)
7373{
74    return ioport("switches")->read();
74   return ioport("switches")->read();
7575}
7676
7777WRITE8_MEMBER(daruma_state::dev1_w)
7878{
79    //while attempting to identify which bit is used for
80    //controlling the buzzer, here's what I heard from each of
81    //the signals on this address:
79   //while attempting to identify which bit is used for
80   //controlling the buzzer, here's what I heard from each of
81   //the signals on this address:
8282
83    //0x80 serial comm.? (noise)
84    //0x20 LED? (3 clicks)
85    //0x10 LED? (1 click)
86    //0x08 serial comm.? click & noise
87    //0x04 LED? (2 clicks)
88    //0x02 motor control or printer heads? (I hear a series of rhythmic pulses)
89    //0x01 LED? (2 clicks)
83   //0x80 serial comm.? (noise)
84   //0x20 LED? (3 clicks)
85   //0x10 LED? (1 click)
86   //0x08 serial comm.? click & noise
87   //0x04 LED? (2 clicks)
88   //0x02 motor control or printer heads? (I hear a series of rhythmic pulses)
89   //0x01 LED? (2 clicks)
9090   m_speaker->level_w(data & 0x02);
9191}
9292
9393WRITE8_MEMBER(daruma_state::dev2_w)
9494{
95    //while attempting to identify which bit is used for
96    //controlling the buzzer, here's what I heard from each of
97    //the signals on this address:
95   //while attempting to identify which bit is used for
96   //controlling the buzzer, here's what I heard from each of
97   //the signals on this address:
9898
99    //0x80: LED? (3 clicks)
100    //0x40: unused?
101    //0x20: unused?
102    //0x10: low freq brief beep followed by a click
103    //0x08: low freq brief noise followed by a click
104    //0x04: low freq brief beep followed by a click
105    //0x02: low freq brief beep followed by a click
106    //0x01: low freq brief noise
99   //0x80: LED? (3 clicks)
100   //0x40: unused?
101   //0x20: unused?
102   //0x10: low freq brief beep followed by a click
103   //0x08: low freq brief noise followed by a click
104   //0x04: low freq brief beep followed by a click
105   //0x02: low freq brief beep followed by a click
106   //0x01: low freq brief noise
107107   //m_speaker->level_w(data & 0x01);
108108}
109109
110110static ADDRESS_MAP_START( mem_prg, AS_PROGRAM, 8, daruma_state )
111    AM_RANGE(0x0000, 0xffff) AM_ROM
111   AM_RANGE(0x0000, 0xffff) AM_ROM
112112ADDRESS_MAP_END
113113
114114static ADDRESS_MAP_START( mem_io, AS_IO, 8, daruma_state )
115    AM_RANGE(0x0000, 0x0000) AM_READ(dev0_r)
116    AM_RANGE(0x1000, 0x1000) AM_WRITE(dev1_w)
115   AM_RANGE(0x0000, 0x0000) AM_READ(dev0_r)
116   AM_RANGE(0x1000, 0x1000) AM_WRITE(dev1_w)
117117//    AM_RANGE(0x2000, 0x2000) AM_WRITE(dev2_w)
118118//    AM_RANGE(0x3000, 0x3000) AM_WRITE(dev3_w)
119    AM_RANGE(0x4000, 0x4000) AM_READ(dev4_r)
120    AM_RANGE(0x8000, 0xffff) AM_RAM /* 32K CMOS SRAM (HYUNDAY hy62256a) */
121    AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READWRITE(port_r, port_w)
119   AM_RANGE(0x4000, 0x4000) AM_READ(dev4_r)
120   AM_RANGE(0x8000, 0xffff) AM_RAM /* 32K CMOS SRAM (HYUNDAY hy62256a) */
121   AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READWRITE(port_r, port_w)
122122ADDRESS_MAP_END
123123
124124//TODO: These buttons and switches are all guesses. We'll need to further investigate this.
125125static INPUT_PORTS_START( daruma )
126    PORT_START("buttons")
127    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper A") PORT_CODE(KEYCODE_A)
128    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper B") PORT_CODE(KEYCODE_B)
126   PORT_START("buttons")
127   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper A") PORT_CODE(KEYCODE_A)
128   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper B") PORT_CODE(KEYCODE_B)
129129
130    PORT_START("switches")
131    PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN)
132    PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN)
133    PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN)
134    PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN)
135    PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN)
136    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN)
137    PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN)
138    PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Limit Switch") PORT_CODE(KEYCODE_S)
130   PORT_START("switches")
131   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN)
132   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN)
133   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN)
134   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN)
135   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN)
136   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN)
137   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN)
138   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Limit Switch") PORT_CODE(KEYCODE_S)
139139
140140INPUT_PORTS_END
141141
142142static MACHINE_CONFIG_START( daruma, daruma_state )
143    /* basic machine hardware */
144    MCFG_CPU_ADD("maincpu", I80C32,11059200) //verified on pcb
145    MCFG_CPU_PROGRAM_MAP(mem_prg)
146    MCFG_CPU_IO_MAP(mem_io)
143   /* basic machine hardware */
144   MCFG_CPU_ADD("maincpu", I80C32,11059200) //verified on pcb
145   MCFG_CPU_PROGRAM_MAP(mem_prg)
146   MCFG_CPU_IO_MAP(mem_io)
147147
148148   /* sound hardware */
149149   MCFG_SPEAKER_STANDARD_MONO("mono")
r248551r248552
161161MACHINE_CONFIG_END
162162
163163ROM_START( ds348 )
164    ROM_REGION( 0x10000, "maincpu", 0 )
165    ROM_LOAD( "daruma_ds348_v1_1.rom",   0x0000, 0x10000, CRC(10bf9036) SHA1(d654a13bc582f5384e759ec6fe5309a642bd8e18) )
164   ROM_REGION( 0x10000, "maincpu", 0 )
165   ROM_LOAD( "daruma_ds348_v1_1.rom",   0x0000, 0x10000, CRC(10bf9036) SHA1(d654a13bc582f5384e759ec6fe5309a642bd8e18) )
166166ROM_END
167167
168168/*    YEAR  NAME   PARENT COMPAT MACHINE  INPUT   INIT              COMPANY           FULLNAME                                 FLAGS */
trunk/src/mess/drivers/force68k.c
r248551r248552
11// license:BSD-3-Clause
2// copyright-holders:Joakim Larsson Edström
2// copyright-holders:Joakim Larsson Edstr??m
33/***************************************************************************
44
55    Force SYS68K CPU-1/CPU-6 VME SBC drivers, initially based on the 68ksbc.c
r248551r248552
77    13/06/2015
88
99 The info found on the links below is for a later revisions of the board I have
10 but I hope it is somewhat compatible so I can get it up and running at least.
10 but I hope it is somewhat compatible so I can get it up and running at least.
1111 My CPU-1 board has proms from 1983 and no rev markings so probably the original.
1212
1313 http://bitsavers.trailing-edge.com/pdf/forceComputers/1988_Force_VMEbus_Products.pdf
r248551r248552
27270C0 041 - 0C0 043 ACIA (P3) Host
28280C0 080 - 0C0 082 ACIA (P4) Terminal
29290C0 101 - 0C0 103 ACIA (P5) Remote device (eg serial printer)
300C0 401 - 0C0 42F RTC
300C0 401 - 0C0 42F RTC
3131OEO 001 - 0E0 035 PI/T (eg centronics printer)
3232OEO 200 - 0E0 2FF FPU
3333OEO 300 - 0E0 300 Reset Off
r248551r248552
5959
606010. The VMEbus
6161---------------
62The implemented VMEbus Interface includes 24 address, 16 data,
62The implemented VMEbus Interface includes 24 address, 16 data,
63636 address modifier and the asynchronous control signals.
64A single level bus arbiter is provided to build multi master
65systems. In addition to the bus arbiter, a separate slave bus
64A single level bus arbiter is provided to build multi master
65systems. In addition to the bus arbiter, a separate slave bus
6666arbitration allows selection of the arbitration level (0-3).
6767
68The address modifier range .,Short 110 Access« can be selected
69via a jumper for variable system generation. The 7 interrupt
70request levels of the VMEbus are fully supported from the
71SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be
68The address modifier range .,Short 110 Access?? can be selected
69via a jumper for variable system generation. The 7 interrupt
70request levels of the VMEbus are fully supported from the
71SYS68K1CPU-1 B/D. For multi-processing, each IRQ signal can be
7272enabled/disabled via a jumper field.
7373
74Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET,
74Additionally, the SYS68K1CPU-1 B/D supports the ACFAIL, SYSRESET,
7575SYSFAIL and SYSCLK signal (16 MHz).
7676
7777
7878    TODO:
79    - Finish 2 x ACIA6850, host and remote interface left, terminal works
79    - Finish 2 x ACIA6850, host and remote interface left, terminal works
8080    - Finish 1 x 68230 Motorola, Parallel Interface / Timer
8181      - Connect Port B to a Centronics printer interface
8282    - Add 1 x Abort Switch
83    - Add configurable serial connector between ACIA:s and
83    - Add configurable serial connector between ACIA:s and
8484      - Real terminal emulator, ie rs232 "socket"
8585      - Debug console
8686    - Add VME bus driver
r248551r248552
9797
9898#define BAUDGEN_CLOCK XTAL_1_8432MHz
9999/*
100 The baudrate on the Force68k CPU-1 to CPU-6 is generated by a
101 Motorola 14411 bitrate generator, the CPU-6 documents matches the circuits
102 that I could find on the CPU-1 board. Here how I calculated the clock for
100 The baudrate on the Force68k CPU-1 to CPU-6 is generated by a
101 Motorola 14411 bitrate generator, the CPU-6 documents matches the circuits
102 that I could find on the CPU-1 board. Here how I calculated the clock for
103103 the factory settings. No need to add selectors until terminal.c supports
104104 configurable baudrates. Fortunality CPU-1 was shipped with 9600N8!
105105
r248551r248552
107107
108108  3 RS232C interfaces, strap selectable baud rate from 110-9600 or 600-19200 baud
109109
110  Default Jumper Settings of B7:
110  Default Jumper Settings of B7:
111111  --------------------------------
112112  GND           10 - 11 RSA input on 14411
113113  F1 on 14411    1 - 20 Baud selector of the terminal port
r248551r248552
117117 The RSB input on the 14411 is kept high always so RSA=0, RSB=1 and a 1.8432MHz crystal
118118 generates 153600 on the F1 output pin which by default strapping is connected to all
119119 three 6850 acias on the board. These can be strapped separatelly to speedup downloads.
120 
120
121121 The selectable outputs from 14411, F1-F16:
122122 X16 RSA=0,RSB=1: 153600, 115200, 76800, 57600, 38400, 28800, 19200, 9600, 4800, 3200, 2153.3, 1758.8, 1200, 921600, 1843000
123123 X64 RSA=1,RSB=1: 614400, 460800, 307200, 230400, 153600, 115200, 76800, 57600, 38400, 28800, 19200, 9600, 4800, 921600, 1843000
r248551r248552
133133public:
134134   force68k_state(const machine_config &mconfig, device_type type, const char *tag) :
135135      driver_device(mconfig, type, tag),
136        //      m_rtc(*this, "rtc")
137        m_maincpu(*this, "maincpu"),
138        m_rtc(*this, "rtc"),
139        m_pit(*this, "pit"),
140        m_aciahost(*this, "aciahost"),
141         m_aciaterm(*this, "aciaterm"),
142          m_aciaremt(*this, "aciaremt")
136         //      m_rtc(*this, "rtc")
137         m_maincpu(*this, "maincpu"),
138         m_rtc(*this, "rtc"),
139         m_pit(*this, "pit"),
140         m_aciahost(*this, "aciahost"),
141         m_aciaterm(*this, "aciaterm"),
142         m_aciaremt(*this, "aciaremt")
143143   {
144144   }
145145
r248551r248552
162162};
163163
164164static ADDRESS_MAP_START(force68k_mem, AS_PROGRAM, 16, force68k_state)
165        ADDRESS_MAP_UNMAP_HIGH
166        AM_RANGE(0x000000, 0x000007) AM_ROM AM_READ(bootvect_r) /* Vectors mapped from System EPROM */
167        AM_RANGE(0x000008, 0x01ffff) AM_RAM /* DRAM */
168        AM_RANGE(0x080000, 0x09ffff) AM_ROM /* System EPROM Area */
169//   AM_RANGE(0x0a0000, 0x0bffff) AM_ROM /* User EPROM Area   */
165      ADDRESS_MAP_UNMAP_HIGH
166      AM_RANGE(0x000000, 0x000007) AM_ROM AM_READ(bootvect_r) /* Vectors mapped from System EPROM */
167      AM_RANGE(0x000008, 0x01ffff) AM_RAM /* DRAM */
168      AM_RANGE(0x080000, 0x09ffff) AM_ROM /* System EPROM Area */
169//  AM_RANGE(0x0a0000, 0x0bffff) AM_ROM /* User EPROM Area   */
170170   AM_RANGE(0x0c0040, 0x0c0041) AM_DEVREADWRITE8("aciahost", acia6850_device, status_r, control_w, 0x00ff)
171171   AM_RANGE(0x0c0042, 0x0c0043) AM_DEVREADWRITE8("aciahost", acia6850_device, data_r, data_w, 0x00ff)
172172   AM_RANGE(0x0c0080, 0x0c0081) AM_DEVREADWRITE8("aciaterm", acia6850_device, status_r, control_w, 0xff00)
173173   AM_RANGE(0x0c0082, 0x0c0083) AM_DEVREADWRITE8("aciaterm", acia6850_device, data_r, data_w, 0xff00)
174174   AM_RANGE(0x0c0100, 0x0c0101) AM_DEVREADWRITE8("aciaremt", acia6850_device, status_r, control_w, 0x00ff)
175175   AM_RANGE(0x0c0102, 0x0c0103) AM_DEVREADWRITE8("aciaremt", acia6850_device, data_r, data_w, 0x00ff)
176        AM_RANGE(0x0c0400, 0x0c042f) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0x00ff)
177        AM_RANGE(0x0e0000, 0x0e0035) AM_DEVREADWRITE8("pit", pit68230_device, data_r, data_w, 0x00ff)
176      AM_RANGE(0x0c0400, 0x0c042f) AM_DEVREADWRITE8("rtc", mm58167_device, read, write, 0x00ff)
177      AM_RANGE(0x0e0000, 0x0e0035) AM_DEVREADWRITE8("pit", pit68230_device, data_r, data_w, 0x00ff)
178178//      AM_RANGE(0x0e0200, 0x0e0380) AM_READWRITE(fpu_r, fpu_w) /* optional FPCP 68881 FPU interface */
179179//      AM_RANGE(0x100000, 0xfeffff) /* VMEbus Rev B addresses (24 bits) */
180180//      AM_RANGE(0xff0000, 0xffffff) /* VMEbus Rev B addresses (16 bits) */
r248551r248552
190190}
191191
192192READ16_MEMBER(force68k_state::bootvect_r)
193{
194        return m_sysrom[offset];
193{
194      return m_sysrom[offset];
195195}
196196
197197WRITE_LINE_MEMBER(force68k_state::write_aciahost_clock)
198{
199        m_aciahost->write_txc(state);
198{
199      m_aciahost->write_txc(state);
200200   m_aciahost->write_rxc(state);
201201}
202202
203203WRITE_LINE_MEMBER(force68k_state::write_aciaterm_clock)
204{
205        m_aciaterm->write_txc(state);
204{
205      m_aciaterm->write_txc(state);
206206   m_aciaterm->write_rxc(state);
207207}
208208
209209WRITE_LINE_MEMBER(force68k_state::write_aciaremt_clock)
210{
211        m_aciaremt->write_txc(state);
210{
211      m_aciaremt->write_txc(state);
212212   m_aciaremt->write_rxc(state);
213213}
214214
215215static MACHINE_CONFIG_START( fccpu1, force68k_state )
216216   /* basic machine hardware */
217   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz / 2)
217   MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz / 2)
218218   MCFG_CPU_PROGRAM_MAP(force68k_mem)
219219
220        /* P3/Host Port config */
220      /* P3/Host Port config */
221221   MCFG_DEVICE_ADD("aciahost", ACIA6850, 0)
222        MCFG_DEVICE_ADD("aciahost_clock", CLOCK, ACIA_CLOCK)
222      MCFG_DEVICE_ADD("aciahost_clock", CLOCK, ACIA_CLOCK)
223223   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciahost_clock))
224224
225        /* P4/Terminal Port config */
225      /* P4/Terminal Port config */
226226   MCFG_DEVICE_ADD("aciaterm", ACIA6850, 0)
227227
228228   MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("rs232trm", rs232_port_device, write_txd))
r248551r248552
232232   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("aciaterm", acia6850_device, write_rxd))
233233   MCFG_RS232_CTS_HANDLER(DEVWRITELINE("aciaterm", acia6850_device, write_cts))
234234
235        MCFG_DEVICE_ADD("aciaterm_clock", CLOCK, ACIA_CLOCK)
235      MCFG_DEVICE_ADD("aciaterm_clock", CLOCK, ACIA_CLOCK)
236236   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciaterm_clock))
237237
238        /* P5/Remote Port config */
238      /* P5/Remote Port config */
239239   MCFG_DEVICE_ADD("aciaremt", ACIA6850, 0)
240240
241241#define PRINTER 0
r248551r248552
246246   MCFG_RS232_PORT_ADD("rs232rmt", default_rs232_devices, "printer")
247247   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("aciaremt", acia6850_device, write_rxd))
248248   MCFG_RS232_CTS_HANDLER(DEVWRITELINE("aciaremt", acia6850_device, write_cts))
249#endif
249#endif
250250
251        MCFG_DEVICE_ADD("aciaremt_clock", CLOCK, ACIA_CLOCK)
251      MCFG_DEVICE_ADD("aciaremt_clock", CLOCK, ACIA_CLOCK)
252252   MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(force68k_state, write_aciaterm_clock))
253253
254254   /* RTC Real Time Clock device */
255255   MCFG_DEVICE_ADD("rtc", MM58167, XTAL_32_768kHz)
256256
257257   /* PIT Parallel Interface and Timer device, assuming strapped for on board clock */
258   MCFG_DEVICE_ADD("pit", PIT68230, XTAL_16MHz / 2)
258   MCFG_DEVICE_ADD("pit", PIT68230, XTAL_16MHz / 2)
259259
260260MACHINE_CONFIG_END
261261
r248551r248552
291291ROM_START( fccpu1 )
292292   ROM_REGION(0x1000000, "maincpu", 0)
293293
294        ROM_LOAD16_BYTE( "fccpu1V1.0L.j8.bin", 0x080001, 0x2000, CRC(3ac6f08f) SHA1(502f6547b508d8732bd68bbbb2402d8c30fefc3b) )
295        ROM_LOAD16_BYTE( "fccpu1V1.0L.j9.bin", 0x080000, 0x2000, CRC(035315fb) SHA1(90dc44d9c25d28428233e6846da6edce2d69e440) )
296/* COMMAND SUMMARY DESCRIPTION (From CPU-1B datasheet, ROMs were dumped
294      ROM_LOAD16_BYTE( "fccpu1V1.0L.j8.bin", 0x080001, 0x2000, CRC(3ac6f08f) SHA1(502f6547b508d8732bd68bbbb2402d8c30fefc3b) )
295      ROM_LOAD16_BYTE( "fccpu1V1.0L.j9.bin", 0x080000, 0x2000, CRC(035315fb) SHA1(90dc44d9c25d28428233e6846da6edce2d69e440) )
296/* COMMAND SUMMARY DESCRIPTION (From CPU-1B datasheet, ROMs were dumped
297297   from a CPU-1 board so some features might be missing or different)
298298---------------------------------------------------------------------------
299299   BF <address1> <address2> <data> <CR>        Block Fill memory - from addr1 through addr2 with data
r248551r248552
309309   GT <address> <CR>                           Exec prog: temporary breakpoint
310310   HE<CR>                                      Help; display monitor commands
311311   LO [n] [;<options] <CR>                     Load Object file
312   MD <address> [<count» <CR>                  Memory Display
313   MM <address> [<data» [;<options» <CR>       Memory Modify
312   MD <address> [<count?? <CR>                  Memory Display
313   MM <address> [<data?? [;<options?? <CR>       Memory Modify
314314   MS <address> <data1 > <data2> < ... <CR>    Memory Set - starting at addr with data 1. data 2 ...
315315   NOBR [<address> ... ] <CR>                  Remove Breakpoint
316316   NOPA <CR>                                   Printer Detach (Centronics on PIT/P2)
r248551r248552
318318   PA <CR>                                     Printer Attach (Centronics on PIT/P2)
319319   PF[n] <CR>                                  Set/display Port Format
320320   RM <CR>                                     Register Modify
321   TM [<exit character» <CR>                   Transparent Mode
321   TM [<exit character?? <CR>                   Transparent Mode
322322   TR [<count] <CR>                            Trace
323323   TT <address> <CR>                           Trace: temporary breakpoint
324324   VE [n] [<string] <CR>                       Verify memory/object file
trunk/src/mess/drivers/hh_sm510.c
r248551r248552
5757{
5858   // zerofill
5959   m_inp_mux = 0;
60//   m_inp_lines = 0;
60//  m_inp_lines = 0;
6161   memset(m_lcd_output_cache, ~0, sizeof(m_lcd_output_cache));
6262
6363   // register for savestates
r248551r248552
149149  Konami Top Gun
150150  * PCB label BH003
151151  * Sharp SM510 under epoxy (die label CMS54C, KMS598)
152 
152
153153  The ROM listing "BH003 Top Gun" from patent US5137277 is identical to the
154154  released version, except for 2 probable bit errors and filler bytes. Unused
155155  pages list data too, of what looks like assembler leftover garbage.
trunk/src/mess/drivers/hp64k.c
r248551r248552
66// ***************************************
77//
88// Documentation used for this driver:
9// [1]   HP, manual 64100-90910, dec 83 rev. - Model 64100A mainframe service manual
9// [1]  HP, manual 64100-90910, dec 83 rev. - Model 64100A mainframe service manual
1010// [2]  HP, manual 64941-90902, apr 83 rev. - Model 64941A Flexible disc (Floppy) drive
1111//                                            controller service manual
1212//
1313// A 64100A system ("mainframe" in HP docs) is built around a 13 slot card cage.
1414// The first 4 slots are reserved for specific card types:
15// J1   I/O card
16// J2   Display and RAM card
17// J3   CPU card
18// J4   Floppy interface card
15// J1   I/O card
16// J2   Display and RAM card
17// J3   CPU card
18// J4   Floppy interface card
1919//
2020// The rest of the slots are for CPU emulators, logic analyzers and so on (i.e. those
2121// cards doing the main functions of a development system).
r248551r248552
3535// CPU card (64100-66521 or 64100-66532)
3636//
3737// This board holds the HP custom CPU with its massive heatsink, the BIOS roms and little else.
38// U30      5061-3011   HP "hybrid" CPU @ 6.25 MHz
38// U30      5061-3011   HP "hybrid" CPU @ 6.25 MHz
3939// U8
4040// U9
4141// U10
r248551r248552
4343// U18
4444// U19
4545// U20
46// U21      2732      16kw of BIOS EPROMs
46// U21      2732        16kw of BIOS EPROMs
4747//
4848// **********
4949// I/O card (64100-66520)
r248551r248552
5959// exponentially decaying envelope (a bell sound) whereas in the emulation it's inside a
6060// simple rectangular envelope.
6161//
62//*U20      HP "PHI"   Custom HP-IB interface microcontroller
63//*U28      i8251      RS232 UART
62//*U20      HP "PHI"    Custom HP-IB interface microcontroller
63//*U28      i8251       RS232 UART
6464//
6565// **********
6666// Display card (64100-66530)
r248551r248552
7272// CRTC is designed to refresh the whole DRAM in parallel. For some mysterious reason the first
7373// display row is always blanked (its 40 words of RAM are even used for the stack!).
7474//
75// U33      i8275      CRT controller
76// U60      2716      Character generator ROM
75// U33      i8275       CRT controller
76// U60      2716        Character generator ROM
7777// U23-U30
78// U38-U45   HM4864      64 kw of DRAM
78// U38-U45  HM4864      64 kw of DRAM
7979//
8080// **********
8181// Floppy I/F card (64941-66501)
r248551r248552
8787// I tried to reverse engineer the FSM by looking at the schematics and applying some sensible
8888// assumptions. Then I did a sort of "clean room" re-implementation. It appears to work correctly.
8989//
90// U4      FD1791A      Floppy disk controller
90// U4       FD1791A     Floppy disk controller
9191//
9292// A brief summary of the reverse-engineered interface of this card follows.
9393//
r248551r248552
162162#define BIT_MASK(n) (1U << (n))
163163
164164// Macros to clear/set single bits
165#define BIT_CLR(w , n)   ((w) &= ~BIT_MASK(n))
166#define BIT_SET(w , n)   ((w) |= BIT_MASK(n))
165#define BIT_CLR(w , n)  ((w) &= ~BIT_MASK(n))
166#define BIT_SET(w , n)  ((w) |= BIT_MASK(n))
167167
168168class hp64k_state : public driver_device
169169{
r248551r248552
256256      UINT8 m_slot_map;
257257
258258      // Floppy I/F
259      UINT8 m_floppy_in_latch_msb;   // U23
260      UINT8 m_floppy_in_latch_lsb;   // U38
261      UINT8 m_floppy_out_latch_msb;   // U22
262      UINT8 m_floppy_out_latch_lsb;   // U37
263      UINT8 m_floppy_if_ctrl;      // U24
259      UINT8 m_floppy_in_latch_msb;    // U23
260      UINT8 m_floppy_in_latch_lsb;    // U38
261      UINT8 m_floppy_out_latch_msb;   // U22
262      UINT8 m_floppy_out_latch_lsb;   // U37
263      UINT8 m_floppy_if_ctrl;     // U24
264264      bool m_floppy_dmaen;
265265      bool m_floppy_dmai;
266266      bool m_floppy_mdci;
r248551r248552
268268      bool m_floppy_drq;
269269      bool m_floppy0_wpt;
270270      bool m_floppy1_wpt;
271      UINT8 m_floppy_drv_ctrl;   // U39
272      UINT8 m_floppy_status;      // U25
271      UINT8 m_floppy_drv_ctrl;    // U39
272      UINT8 m_floppy_status;      // U25
273273
274274      typedef enum {
275275         HP64K_FLPST_IDLE,
r248551r248552
293293static ADDRESS_MAP_START(cpu_io_map , AS_IO , 16 , hp64k_state)
294294      // PA = 0, IC = [0..3]
295295      // Keyboard input
296      AM_RANGE(HP_MAKE_IOADDR(0 , 0) , HP_MAKE_IOADDR(0 , 3))     AM_READ(hp64k_kb_r)
296      AM_RANGE(HP_MAKE_IOADDR(0 , 0) , HP_MAKE_IOADDR(0 , 3))   AM_READ(hp64k_kb_r)
297297      // PA = 2, IC = [0..3]
298298      // Line sync interrupt clear/watchdog reset
299      AM_RANGE(HP_MAKE_IOADDR(2 , 0) , HP_MAKE_IOADDR(2 , 3))     AM_READWRITE(hp64k_deltat_r , hp64k_deltat_w)
299      AM_RANGE(HP_MAKE_IOADDR(2 , 0) , HP_MAKE_IOADDR(2 , 3))   AM_READWRITE(hp64k_deltat_r , hp64k_deltat_w)
300300      // PA = 4, IC = [0..3]
301301      // Floppy I/F
302      AM_RANGE(HP_MAKE_IOADDR(4 , 0) , HP_MAKE_IOADDR(4 , 3))     AM_READWRITE(hp64k_flp_r , hp64k_flp_w)
302      AM_RANGE(HP_MAKE_IOADDR(4 , 0) , HP_MAKE_IOADDR(4 , 3))   AM_READWRITE(hp64k_flp_r , hp64k_flp_w)
303303      // PA = 6, IC = [0..3]
304304      // Read from USART
305      AM_RANGE(HP_MAKE_IOADDR(6 , 0) , HP_MAKE_IOADDR(6 , 3))     AM_READ(hp64k_usart_r)
305      AM_RANGE(HP_MAKE_IOADDR(6 , 0) , HP_MAKE_IOADDR(6 , 3))   AM_READ(hp64k_usart_r)
306306      // PA = 7, IC = 2
307307      // Rear-panel switches
308      AM_RANGE(HP_MAKE_IOADDR(7 , 2) , HP_MAKE_IOADDR(7 , 2))     AM_READ(hp64k_rear_sw_r)
308      AM_RANGE(HP_MAKE_IOADDR(7 , 2) , HP_MAKE_IOADDR(7 , 2))   AM_READ(hp64k_rear_sw_r)
309309      // PA = 9, IC = [0..3]
310310      // Beeper control & interrupt status read
311      AM_RANGE(HP_MAKE_IOADDR(9 , 0) , HP_MAKE_IOADDR(9 , 3))     AM_WRITE(hp64k_beep_w)
311      AM_RANGE(HP_MAKE_IOADDR(9 , 0) , HP_MAKE_IOADDR(9 , 3))   AM_WRITE(hp64k_beep_w)
312312      // PA = 10, IC = [0..3]
313313      // Slot selection
314314      AM_RANGE(HP_MAKE_IOADDR(10 , 0) , HP_MAKE_IOADDR(10 , 3)) AM_WRITE(hp64k_slot_sel_w)
r248551r248552
922922            // column = [0..15]
923923            // row = [0..7]
924924            PORT_START("KEY0")
925            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL)   PORT_CHAR(UCHAR_SHIFT_2)
926            PORT_BIT(BIT_MASK(1)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_A)      PORT_CHAR('a') PORT_CHAR('A')
927            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_W)      PORT_CHAR('w') PORT_CHAR('W')
928            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_E)      PORT_CHAR('e') PORT_CHAR('E')
929            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_R)      PORT_CHAR('r') PORT_CHAR('R')
930            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_T)      PORT_CHAR('t') PORT_CHAR('T')
931            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y)      PORT_CHAR('y') PORT_CHAR('Y')
932            PORT_BIT(BIT_MASK(7)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_U)      PORT_CHAR('u') PORT_CHAR('U')
933            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_I)      PORT_CHAR('i') PORT_CHAR('I')
925            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL)  PORT_CHAR(UCHAR_SHIFT_2)
926            PORT_BIT(BIT_MASK(1)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_A)     PORT_CHAR('a') PORT_CHAR('A')
927            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_W)     PORT_CHAR('w') PORT_CHAR('W')
928            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_E)     PORT_CHAR('e') PORT_CHAR('E')
929            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_R)     PORT_CHAR('r') PORT_CHAR('R')
930            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_T)     PORT_CHAR('t') PORT_CHAR('T')
931            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y)     PORT_CHAR('y') PORT_CHAR('Y')
932            PORT_BIT(BIT_MASK(7)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_U)     PORT_CHAR('u') PORT_CHAR('U')
933            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_I)     PORT_CHAR('i') PORT_CHAR('I')
934934            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_UNUSED)
935935            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_UNUSED)
936936            PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED)
r248551r248552
938938            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_UNUSED)
939939            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_UNUSED)
940940            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_UNUSED)
941            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB)      PORT_CHAR('\t')
942            PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)      PORT_CHAR('q') PORT_CHAR('Q')
941            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB)       PORT_CHAR('\t')
942            PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)     PORT_CHAR('q') PORT_CHAR('Q')
943943            PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_UNUSED)
944944            PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_UNUSED)
945945            PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_UNUSED)
946946            PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED)
947            PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_7)      PORT_CHAR('7') PORT_CHAR('\'')
948            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_8)      PORT_CHAR('8') PORT_CHAR('(')
949            PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_9)      PORT_CHAR('9') PORT_CHAR(')')
950            PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_0)      PORT_CHAR('0')
951            PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS)      PORT_CHAR('-') PORT_CHAR('=')
952            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS)   PORT_CHAR('^') PORT_CHAR('~')
953            PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE)      PORT_CHAR('\\') PORT_CHAR('|')
954            PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE)   PORT_CHAR(8)
947            PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_7)     PORT_CHAR('7') PORT_CHAR('\'')
948            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_8)     PORT_CHAR('8') PORT_CHAR('(')
949            PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_9)     PORT_CHAR('9') PORT_CHAR(')')
950            PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_0)     PORT_CHAR('0')
951            PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS)     PORT_CHAR('-') PORT_CHAR('=')
952            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS)    PORT_CHAR('^') PORT_CHAR('~')
953            PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE)     PORT_CHAR('\\') PORT_CHAR('|')
954            PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
955955            PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_UNUSED)
956956            PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_UNUSED)
957957
958958            PORT_START("KEY1")
959            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_1)      PORT_CHAR('1') PORT_CHAR('!')
960            PORT_BIT(BIT_MASK(1)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_2)      PORT_CHAR('2') PORT_CHAR('"')
961            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_3)      PORT_CHAR('3') PORT_CHAR('#')
962            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_4)      PORT_CHAR('4') PORT_CHAR('$')
963            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_5)      PORT_CHAR('5') PORT_CHAR('%')
964            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_6)      PORT_CHAR('6') PORT_CHAR('&')
959            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_1)     PORT_CHAR('1') PORT_CHAR('!')
960            PORT_BIT(BIT_MASK(1)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_2)     PORT_CHAR('2') PORT_CHAR('"')
961            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_3)     PORT_CHAR('3') PORT_CHAR('#')
962            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_4)     PORT_CHAR('4') PORT_CHAR('$')
963            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_5)     PORT_CHAR('5') PORT_CHAR('%')
964            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_6)     PORT_CHAR('6') PORT_CHAR('&')
965965            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_UNUSED)
966966            PORT_BIT(BIT_MASK(7)  , IP_ACTIVE_HIGH , IPT_UNUSED)
967967            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_UNUSED)
968968            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_UNUSED)
969969            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_UNUSED)
970970            PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED)
971            PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F9)      PORT_NAME("RECALL")
972            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F10)      PORT_NAME("CLRLINE")
973            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F11)      PORT_NAME("CAPS")
974            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F12)      PORT_NAME("RESET")
975            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)      PORT_NAME("SK1")
976            PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)      PORT_NAME("SK2")
971            PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F9)        PORT_NAME("RECALL")
972            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F10)       PORT_NAME("CLRLINE")
973            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F11)       PORT_NAME("CAPS")
974            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F12)       PORT_NAME("RESET")
975            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)        PORT_NAME("SK1")
976            PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)        PORT_NAME("SK2")
977977            PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_UNUSED)
978            PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)      PORT_NAME("SK3")
979            PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F4)      PORT_NAME("SK4")
978            PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)        PORT_NAME("SK3")
979            PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F4)        PORT_NAME("SK4")
980980            PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED)
981981            PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_UNUSED)
982            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F5)      PORT_NAME("SK5")
983            PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F6)      PORT_NAME("SK6")
984            PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F7)      PORT_NAME("SK7")
982            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F5)        PORT_NAME("SK5")
983            PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F6)        PORT_NAME("SK6")
984            PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F7)        PORT_NAME("SK7")
985985            PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_UNUSED)
986            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F8)      PORT_NAME("SK8")
986            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F8)        PORT_NAME("SK8")
987987            PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_UNUSED)
988988            PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_UNUSED)
989989            PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_UNUSED)
990990            PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_UNUSED)
991991
992992            PORT_START("KEY2")
993            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT)   PORT_CHAR(UCHAR_SHIFT_1)
993            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT)    PORT_CHAR(UCHAR_SHIFT_1)
994994            PORT_BIT(BIT_MASK(1)  , IP_ACTIVE_HIGH , IPT_UNUSED)
995            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_S)      PORT_CHAR('s') PORT_CHAR('S')
996            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_D)      PORT_CHAR('d') PORT_CHAR('D')
997            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F)      PORT_CHAR('f') PORT_CHAR('F')
998            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_G)      PORT_CHAR('g') PORT_CHAR('G')
999            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_H)      PORT_CHAR('h') PORT_CHAR('H')
995            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_S)     PORT_CHAR('s') PORT_CHAR('S')
996            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_D)     PORT_CHAR('d') PORT_CHAR('D')
997            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_F)     PORT_CHAR('f') PORT_CHAR('F')
998            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_G)     PORT_CHAR('g') PORT_CHAR('G')
999            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_H)     PORT_CHAR('h') PORT_CHAR('H')
10001000            PORT_BIT(BIT_MASK(7)  , IP_ACTIVE_HIGH , IPT_UNUSED)
10011001            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_UNUSED)
1002            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_O)      PORT_CHAR('o') PORT_CHAR('O')
1003            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_P)      PORT_CHAR('p') PORT_CHAR('P')
1002            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_O)     PORT_CHAR('o') PORT_CHAR('O')
1003            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_P)     PORT_CHAR('p') PORT_CHAR('P')
10041004            PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_UNUSED)
10051005            PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_UNUSED)
10061006            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_UNUSED)
1007            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT)   PORT_NAME("INSCHAR")
1008            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL)      PORT_NAME("DELCHAR")
1007            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT)    PORT_NAME("INSCHAR")
1008            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL)       PORT_NAME("DELCHAR")
10091009            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_UNUSED)
10101010            PORT_BIT(BIT_MASK(17) , IP_ACTIVE_HIGH , IPT_UNUSED)
1011            PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)      PORT_CHAR('z') PORT_CHAR('Z')
1012            PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_X)      PORT_CHAR('x') PORT_CHAR('X')
1013            PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_C)      PORT_CHAR('c') PORT_CHAR('C')
1011            PORT_BIT(BIT_MASK(18) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)     PORT_CHAR('z') PORT_CHAR('Z')
1012            PORT_BIT(BIT_MASK(19) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_X)     PORT_CHAR('x') PORT_CHAR('X')
1013            PORT_BIT(BIT_MASK(20) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_C)     PORT_CHAR('c') PORT_CHAR('C')
10141014            PORT_BIT(BIT_MASK(21) , IP_ACTIVE_HIGH , IPT_UNUSED)
10151015            PORT_BIT(BIT_MASK(22) , IP_ACTIVE_HIGH , IPT_UNUSED)
1016            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_J)      PORT_CHAR('j') PORT_CHAR('J')
1016            PORT_BIT(BIT_MASK(23) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_J)     PORT_CHAR('j') PORT_CHAR('J')
10171017            PORT_BIT(BIT_MASK(24) , IP_ACTIVE_HIGH , IPT_UNUSED)
10181018            PORT_BIT(BIT_MASK(25) , IP_ACTIVE_HIGH , IPT_UNUSED)
1019            PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE)   PORT_CHAR('@') PORT_CHAR('`')
1020            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE)   PORT_CHAR('[') PORT_CHAR('{')
1021            PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2)   PORT_CHAR('_') PORT_CHAR(UCHAR_MAMEKEY(DEL))
1022            PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME)      PORT_NAME("ROLLUP")
1023            PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP)      PORT_CHAR(UCHAR_MAMEKEY(UP))
1024            PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN)      PORT_NAME("NEXTPG")
1019            PORT_BIT(BIT_MASK(26) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`')
1020            PORT_BIT(BIT_MASK(27) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE)    PORT_CHAR('[') PORT_CHAR('{')
1021            PORT_BIT(BIT_MASK(28) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2)    PORT_CHAR('_') PORT_CHAR(UCHAR_MAMEKEY(DEL))
1022            PORT_BIT(BIT_MASK(29) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME)      PORT_NAME("ROLLUP")
1023            PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP)        PORT_CHAR(UCHAR_MAMEKEY(UP))
1024            PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN)      PORT_NAME("NEXTPG")
10251025
10261026            PORT_START("KEY3")
10271027            PORT_BIT(BIT_MASK(0)  , IP_ACTIVE_HIGH , IPT_UNUSED)
r248551r248552
10291029            PORT_BIT(BIT_MASK(2)  , IP_ACTIVE_HIGH , IPT_UNUSED)
10301030            PORT_BIT(BIT_MASK(3)  , IP_ACTIVE_HIGH , IPT_UNUSED)
10311031            PORT_BIT(BIT_MASK(4)  , IP_ACTIVE_HIGH , IPT_UNUSED)
1032            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_V)      PORT_CHAR('v') PORT_CHAR('V')
1033            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_B)      PORT_CHAR('b') PORT_CHAR('B')
1032            PORT_BIT(BIT_MASK(5)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_V)     PORT_CHAR('v') PORT_CHAR('V')
1033            PORT_BIT(BIT_MASK(6)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_B)     PORT_CHAR('b') PORT_CHAR('B')
10341034            PORT_BIT(BIT_MASK(7)  , IP_ACTIVE_HIGH , IPT_UNUSED)
1035            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_K)      PORT_CHAR('k') PORT_CHAR('K')
1036            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_L)      PORT_CHAR('l') PORT_CHAR('L')
1037            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON)      PORT_CHAR(';') PORT_CHAR('+')
1038            PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE)      PORT_CHAR(':') PORT_CHAR('*')
1039            PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH)   PORT_CHAR(']') PORT_CHAR('}')
1040            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER)      PORT_CHAR(13)
1035            PORT_BIT(BIT_MASK(8)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_K)     PORT_CHAR('k') PORT_CHAR('K')
1036            PORT_BIT(BIT_MASK(9)  , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_L)     PORT_CHAR('l') PORT_CHAR('L')
1037            PORT_BIT(BIT_MASK(10) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON)     PORT_CHAR(';') PORT_CHAR('+')
1038            PORT_BIT(BIT_MASK(11) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE)     PORT_CHAR(':') PORT_CHAR('*')
1039            PORT_BIT(BIT_MASK(12) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}')
1040            PORT_BIT(BIT_MASK(13) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER)     PORT_CHAR(13)
10411041            PORT_BIT(BIT_MASK(14) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT)          PORT_CHAR(UCHAR_MAMEKEY(LEFT))
10421042            PORT_BIT(BIT_MASK(15) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT)         PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
10431043            PORT_BIT(BIT_MASK(16) , IP_ACTIVE_HIGH , IPT_UNUSED)
r248551r248552
10571057            PORT_BIT(BIT_MASK(30) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN)          PORT_CHAR(UCHAR_MAMEKEY(DOWN))
10581058            PORT_BIT(BIT_MASK(31) , IP_ACTIVE_HIGH , IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP)          PORT_NAME("PREVPG")
10591059
1060                                PORT_START("rear_sw")
1061                      PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper")
1062                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1063                      PORT_DIPSETTING(0x8000 , DEF_STR(No))
1064                      PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper")
1065                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1066                      PORT_DIPSETTING(0x4000 , DEF_STR(No))
1067                      PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper")
1068                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1069                      PORT_DIPSETTING(0x2000 , DEF_STR(No))
1070                      PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper")
1071                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1072                      PORT_DIPSETTING(0x1000 , DEF_STR(No))
1073                      PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper")
1074                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1075                      PORT_DIPSETTING(0x0800 , DEF_STR(No))
1076                      PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper")
1077                      PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1078                      PORT_DIPSETTING(0x0400 , DEF_STR(No))
1079                      PORT_DIPNAME(0x0018 , 0x0000 , "System source")
1080                      PORT_DIPLOCATION("S1:!7,!6")
1081                      PORT_DIPSETTING(0x0000 , "Sys bus")
1082                      PORT_DIPSETTING(0x0008 , "Local storage-talk only")
1083                      PORT_DIPSETTING(0x0010 , "Local storage-addressable")
1084                      PORT_DIPSETTING(0x0018 , "Performance verification")
1085                      PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)")
1086                      PORT_DIPLOCATION("S1:!2,!1")
1087                      PORT_DIPSETTING(0x0000 , "0")
1088                      PORT_DIPSETTING(0x0100 , "1")
1089                      PORT_DIPSETTING(0x0200 , "2")
1090                      PORT_DIPSETTING(0x0300 , "3")
1091                      PORT_DIPNAME(0x0007 , 0x0000 , "System bus address")
1092                      PORT_DIPLOCATION("S1:!5,!4,!3")
1093                      PORT_DIPSETTING(0x0000 , "0")
1094                      PORT_DIPSETTING(0x0001 , "1")
1095                      PORT_DIPSETTING(0x0002 , "2")
1096                      PORT_DIPSETTING(0x0003 , "3")
1097                      PORT_DIPSETTING(0x0004 , "4")
1098                      PORT_DIPSETTING(0x0005 , "5")
1099                      PORT_DIPSETTING(0x0006 , "6")
1100                      PORT_DIPSETTING(0x0007 , "7")
1101                      PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode")
1102                      PORT_DIPLOCATION("S4 IO:!8")
1103                      PORT_DIPSETTING(0x0000 , "Terminal")
1104                      PORT_DIPSETTING(0x0080 , "Modem")
1060                        PORT_START("rear_sw")
1061                  PORT_DIPNAME(0x8000 , 0x8000 , "E9-6 jumper")
1062                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1063                  PORT_DIPSETTING(0x8000 , DEF_STR(No))
1064                  PORT_DIPNAME(0x4000 , 0x4000 , "E9-5 jumper")
1065                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1066                  PORT_DIPSETTING(0x4000 , DEF_STR(No))
1067                  PORT_DIPNAME(0x2000 , 0x2000 , "E9-4 jumper")
1068                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1069                  PORT_DIPSETTING(0x2000 , DEF_STR(No))
1070                  PORT_DIPNAME(0x1000 , 0x1000 , "E9-3 jumper")
1071                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1072                  PORT_DIPSETTING(0x1000 , DEF_STR(No))
1073                  PORT_DIPNAME(0x0800 , 0x0800 , "E9-2 jumper")
1074                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1075                  PORT_DIPSETTING(0x0800 , DEF_STR(No))
1076                  PORT_DIPNAME(0x0400 , 0x0400 , "E9-1 jumper")
1077                  PORT_DIPSETTING(0x0000 , DEF_STR(Yes))
1078                  PORT_DIPSETTING(0x0400 , DEF_STR(No))
1079                  PORT_DIPNAME(0x0018 , 0x0000 , "System source")
1080                  PORT_DIPLOCATION("S1:!7,!6")
1081                  PORT_DIPSETTING(0x0000 , "Sys bus")
1082                  PORT_DIPSETTING(0x0008 , "Local storage-talk only")
1083                  PORT_DIPSETTING(0x0010 , "Local storage-addressable")
1084                  PORT_DIPSETTING(0x0018 , "Performance verification")
1085                  PORT_DIPNAME(0x0300 , 0x0000 , "Upper bus address (N/U)")
1086                  PORT_DIPLOCATION("S1:!2,!1")
1087                  PORT_DIPSETTING(0x0000 , "0")
1088                  PORT_DIPSETTING(0x0100 , "1")
1089                  PORT_DIPSETTING(0x0200 , "2")
1090                  PORT_DIPSETTING(0x0300 , "3")
1091                  PORT_DIPNAME(0x0007 , 0x0000 , "System bus address")
1092                  PORT_DIPLOCATION("S1:!5,!4,!3")
1093                  PORT_DIPSETTING(0x0000 , "0")
1094                  PORT_DIPSETTING(0x0001 , "1")
1095                  PORT_DIPSETTING(0x0002 , "2")
1096                  PORT_DIPSETTING(0x0003 , "3")
1097                  PORT_DIPSETTING(0x0004 , "4")
1098                  PORT_DIPSETTING(0x0005 , "5")
1099                  PORT_DIPSETTING(0x0006 , "6")
1100                  PORT_DIPSETTING(0x0007 , "7")
1101                  PORT_DIPNAME(0x0080 , 0x0000 , "RS232 mode")
1102                  PORT_DIPLOCATION("S4 IO:!8")
1103                  PORT_DIPSETTING(0x0000 , "Terminal")
1104                  PORT_DIPSETTING(0x0080 , "Modem")
11051105
1106                      PORT_START("rs232_sw")
1107                      PORT_DIPNAME(0xc0 , 0x00 , "Stop bits")
1108                      PORT_DIPLOCATION("S4 IO:!2,!1")
1109                      PORT_DIPSETTING(0x00 , "Invalid")
1110                      PORT_DIPSETTING(0x40 , "1")
1111                      PORT_DIPSETTING(0x80 , "1.5")
1112                      PORT_DIPSETTING(0xc0 , "2")
1113                      PORT_DIPNAME(0x20 , 0x00 , "Parity")
1114                      PORT_DIPLOCATION("S4 IO:!3")
1115                      PORT_DIPSETTING(0x00 , "Odd")
1116                      PORT_DIPSETTING(0x20 , "Even")
1117                      PORT_DIPNAME(0x10 , 0x00 , "Parity enable")
1118                      PORT_DIPLOCATION("S4 IO:!4")
1119                      PORT_DIPSETTING(0x00 , DEF_STR(No))
1120                      PORT_DIPSETTING(0x10 , DEF_STR(Yes))
1121                      PORT_DIPNAME(0x0c , 0x00 , "Char length")
1122                      PORT_DIPLOCATION("S4 IO:!6,!5")
1123                      PORT_DIPSETTING(0x00 , "5")
1124                      PORT_DIPSETTING(0x04 , "6")
1125                      PORT_DIPSETTING(0x08 , "7")
1126                      PORT_DIPSETTING(0x0c , "8")
1127                      PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor")
1128                      PORT_DIPLOCATION("S4 IO:!7")
1129                      PORT_DIPSETTING(0x00 , "1x")
1130                      PORT_DIPSETTING(0x02 , "16x")
1106                  PORT_START("rs232_sw")
1107                  PORT_DIPNAME(0xc0 , 0x00 , "Stop bits")
1108                  PORT_DIPLOCATION("S4 IO:!2,!1")
1109                  PORT_DIPSETTING(0x00 , "Invalid")
1110                  PORT_DIPSETTING(0x40 , "1")
1111                  PORT_DIPSETTING(0x80 , "1.5")
1112                  PORT_DIPSETTING(0xc0 , "2")
1113                  PORT_DIPNAME(0x20 , 0x00 , "Parity")
1114                  PORT_DIPLOCATION("S4 IO:!3")
1115                  PORT_DIPSETTING(0x00 , "Odd")
1116                  PORT_DIPSETTING(0x20 , "Even")
1117                  PORT_DIPNAME(0x10 , 0x00 , "Parity enable")
1118                  PORT_DIPLOCATION("S4 IO:!4")
1119                  PORT_DIPSETTING(0x00 , DEF_STR(No))
1120                  PORT_DIPSETTING(0x10 , DEF_STR(Yes))
1121                  PORT_DIPNAME(0x0c , 0x00 , "Char length")
1122                  PORT_DIPLOCATION("S4 IO:!6,!5")
1123                  PORT_DIPSETTING(0x00 , "5")
1124                  PORT_DIPSETTING(0x04 , "6")
1125                  PORT_DIPSETTING(0x08 , "7")
1126                  PORT_DIPSETTING(0x0c , "8")
1127                  PORT_DIPNAME(0x02 , 0x00 , "Baud rate factor")
1128                  PORT_DIPLOCATION("S4 IO:!7")
1129                  PORT_DIPSETTING(0x00 , "1x")
1130                  PORT_DIPSETTING(0x02 , "16x")
11311131
11321132INPUT_PORTS_END
11331133
11341134static SLOT_INTERFACE_START(hp64k_floppies)
1135                SLOT_INTERFACE("525dd" , FLOPPY_525_DD)
1135            SLOT_INTERFACE("525dd" , FLOPPY_525_DD)
11361136SLOT_INTERFACE_END
11371137
11381138static MACHINE_CONFIG_START(hp64k , hp64k_state)
r248551r248552
11451145            // Actual keyboard refresh rate should be between 1 and 2 kHz
11461146            MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp64k_state , hp64k_kb_scan , attotime::from_hz(100))
11471147
1148                                // Line sync timer. A line frequency of 50 Hz is assumed.
1149                                MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50))
1148                        // Line sync timer. A line frequency of 50 Hz is assumed.
1149                        MCFG_TIMER_DRIVER_ADD_PERIODIC("linesync_timer" , hp64k_state , hp64k_line_sync , attotime::from_hz(50))
11501150
11511151            // Clock = 25 MHz / 9 * (112/114)
11521152            MCFG_DEVICE_ADD("crtc" , I8275 , 2729045)
r248551r248552
11601160            MCFG_SCREEN_REFRESH_RATE(60)
11611161            MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
11621162
1163                      MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4)
1164                      MCFG_WD_FDC_FORCE_READY
1165                      MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w))
1166                      MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w))
1167                      MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats)
1168                      MCFG_SLOT_FIXED(true)
1169                      MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats)
1170                      MCFG_SLOT_FIXED(true)
1163                  MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4)
1164                  MCFG_WD_FDC_FORCE_READY
1165                  MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_intrq_w))
1166                  MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_flp_drq_w))
1167                  MCFG_FLOPPY_DRIVE_ADD("fdc:0" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats)
1168                  MCFG_SLOT_FIXED(true)
1169                  MCFG_FLOPPY_DRIVE_ADD("fdc:1" , hp64k_floppies , "525dd" , floppy_image_device::default_floppy_formats)
1170                  MCFG_SLOT_FIXED(true)
11711171
1172                      MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0)
1173                      MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE)
1174                      MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1))
1175                      // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF
1176                      MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16))
1177                      MCFG_TTL74123_B_PIN_VALUE(1)
1178                      MCFG_TTL74123_CLEAR_PIN_VALUE(1)
1179                      MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy));
1172                  MCFG_DEVICE_ADD("fdc_rdy0" , TTL74123 , 0)
1173                  MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE)
1174                  MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1))
1175                  // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF
1176                  MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16))
1177                  MCFG_TTL74123_B_PIN_VALUE(1)
1178                  MCFG_TTL74123_CLEAR_PIN_VALUE(1)
1179                  MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy0_rdy));
11801180
1181                      MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0)
1182                      MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE)
1183                      MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1))
1184                      MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16))
1185                      MCFG_TTL74123_B_PIN_VALUE(1)
1186                      MCFG_TTL74123_CLEAR_PIN_VALUE(1)
1187                      MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy));
1181                  MCFG_DEVICE_ADD("fdc_rdy1" , TTL74123 , 0)
1182                  MCFG_TTL74123_CONNECTION_TYPE(TTL74123_NOT_GROUNDED_NO_DIODE)
1183                  MCFG_TTL74123_RESISTOR_VALUE(RES_K(68.1))
1184                  MCFG_TTL74123_CAPACITOR_VALUE(CAP_U(16))
1185                  MCFG_TTL74123_B_PIN_VALUE(1)
1186                  MCFG_TTL74123_CLEAR_PIN_VALUE(1)
1187                  MCFG_TTL74123_OUTPUT_CHANGED_CB(WRITE8(hp64k_state , hp64k_floppy1_rdy));
11881188
1189                      MCFG_SPEAKER_STANDARD_MONO("mono")
1190                      MCFG_SOUND_ADD("beeper" , BEEP , 2500)
1191                      MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00)
1189                  MCFG_SPEAKER_STANDARD_MONO("mono")
1190                  MCFG_SOUND_ADD("beeper" , BEEP , 2500)
1191                  MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00)
11921192
1193                      MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off);
1193                  MCFG_TIMER_DRIVER_ADD("beep_timer" , hp64k_state , hp64k_beeper_off);
11941194MACHINE_CONFIG_END
11951195
11961196ROM_START(hp64k)
trunk/src/mess/drivers/i7000.c
r248551r248552
5555public:
5656   i7000_state(const machine_config &mconfig, device_type type, const char *tag)
5757      : driver_device(mconfig, type, tag),
58          m_maincpu(*this, "maincpu"),
59          m_card(*this, "cardslot"),
60          m_gfxdecode(*this, "gfxdecode"),
61          m_videoram(*this, "videoram")
62    { }
58         m_maincpu(*this, "maincpu"),
59         m_card(*this, "cardslot"),
60         m_gfxdecode(*this, "gfxdecode"),
61         m_videoram(*this, "videoram")
62   { }
6363
6464   void video_start();
6565   void machine_start();
r248551r248552
9292{
9393   UINT8 data = 0xff;
9494
95    for (int i=0; i<40*25; i++){
96       m_bg_tilemap->mark_tile_dirty(i);
97    }
95   for (int i=0; i<40*25; i++){
96      m_bg_tilemap->mark_tile_dirty(i);
97   }
9898
9999   if (m_row < 8)
100100   {
r248551r248552
108108/* Input ports */
109109static INPUT_PORTS_START( i7000 )
110110   PORT_START("X0")
111       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
112       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
113       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
114       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC)
115       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
116       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
117       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("!") PORT_CHAR('!')
118       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER)
111      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
112      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
113      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
114      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC)
115      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
116      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
117      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("!") PORT_CHAR('!')
118      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER)
119119
120120   PORT_START("X1")
121       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
122       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
123       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
124       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9D")
125       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
126       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
127       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x8F")
128       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^R DC2") //0x12
121      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
122      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
123      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
124      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9D")
125      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
126      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
127      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x8F")
128      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^R DC2") //0x12
129129
130130   PORT_START("X2")
131       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
132       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("$ ^") PORT_CHAR('$') PORT_CHAR('^')
133       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
134       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
135       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0xA0")
136       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
137       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS)
138       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE)
131      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
132      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("$ ^") PORT_CHAR('$') PORT_CHAR('^')
133      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
134      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
135      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0xA0")
136      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
137      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- _") PORT_CODE(KEYCODE_MINUS)
138      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE)
139139
140140   PORT_START("X3")
141       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
142       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("% +") PORT_CHAR('%') PORT_CHAR('+')
143       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
144       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
145       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9C")
146       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
147       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
148       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CHAR('@')
141      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
142      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("% +") PORT_CHAR('%') PORT_CHAR('+')
143      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
144      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
145      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0x9C")
146      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
147      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
148      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CHAR('@')
149149
150150   PORT_START("X4")
151       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 *") PORT_CODE(KEYCODE_5)
152       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^U NAK") //0x15
153       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
154       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
155       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("| <") PORT_CHAR('<')
156       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", ;") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
157       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
158       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^E ENQ") //0x05
151      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 *") PORT_CODE(KEYCODE_5)
152      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^U NAK") //0x15
153      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
154      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
155      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("| <") PORT_CHAR('<')
156      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", ;") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
157      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
158      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^E ENQ") //0x05
159159
160160   PORT_START("X5")
161       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
162       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^O SI") //0x0F
163       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
164       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
165       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
166       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
167       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CHAR('#')
168       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("{") PORT_CHAR('{')
161      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
162      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^O SI") //0x0F
163      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
164      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
165      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
166      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
167      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#") PORT_CHAR('#')
168      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("{") PORT_CHAR('{')
169169
170170   PORT_START("X6")
171       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
172       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
173       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
174       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
175       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
176       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
177       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^L FF") //0x0C
178       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^T DC4") //0x14
171      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
172      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
173      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
174      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
175      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
176      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
177      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^L FF") //0x0C
178      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^T DC4") //0x14
179179
180180   PORT_START("X7")
181       PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
182       PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
183       PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
184       PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CHAR('>')
185       PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
186       PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
187       PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACEBAR") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
188       PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("}") PORT_CHAR('}')
181      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
182      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
183      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
184      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CHAR('>')
185      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
186      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
187      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACEBAR") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
188      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("}") PORT_CHAR('}')
189189
190190   PORT_START("DSW") /* DP01 */
191       PORT_DIPNAME( 0x80, 0x80, "1")
192       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
193       PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
194       PORT_DIPNAME( 0x40, 0x40, "2")
195       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
196       PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
197       PORT_DIPNAME( 0x20, 0x00, "3")
198       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
199       PORT_DIPSETTING(    0x20, DEF_STR( Yes ) )
200       PORT_DIPNAME( 0x10, 0x10, "4")
201       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
202       PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
203       PORT_DIPNAME( 0x08, 0x08, "5")
204       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
205       PORT_DIPSETTING(    0x08, DEF_STR( Yes ) )
206       PORT_DIPNAME( 0x04, 0x04, "6")
207       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
208       PORT_DIPSETTING(    0x04, DEF_STR( Yes ) )
209       PORT_DIPNAME( 0x02, 0x00, "7")
210       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
211       PORT_DIPSETTING(    0x02, DEF_STR( Yes ) )
212       PORT_DIPNAME( 0x01, 0x01, "8")
213       PORT_DIPSETTING(    0x00, DEF_STR( No ) )
214       PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
191      PORT_DIPNAME( 0x80, 0x80, "1")
192      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
193      PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
194      PORT_DIPNAME( 0x40, 0x40, "2")
195      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
196      PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
197      PORT_DIPNAME( 0x20, 0x00, "3")
198      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
199      PORT_DIPSETTING(    0x20, DEF_STR( Yes ) )
200      PORT_DIPNAME( 0x10, 0x10, "4")
201      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
202      PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
203      PORT_DIPNAME( 0x08, 0x08, "5")
204      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
205      PORT_DIPSETTING(    0x08, DEF_STR( Yes ) )
206      PORT_DIPNAME( 0x04, 0x04, "6")
207      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
208      PORT_DIPSETTING(    0x04, DEF_STR( Yes ) )
209      PORT_DIPNAME( 0x02, 0x00, "7")
210      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
211      PORT_DIPSETTING(    0x02, DEF_STR( Yes ) )
212      PORT_DIPNAME( 0x01, 0x01, "8")
213      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
214      PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
215215INPUT_PORTS_END
216216
217217DRIVER_INIT_MEMBER(i7000_state, i7000)
r248551r248552
238238/*FIXME: we still need to figure out the proper memory map
239239         for the maincpu and where the cartridge slot maps to. */
240240static ADDRESS_MAP_START(i7000_mem, AS_PROGRAM, 8, i7000_state)
241    AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("boot", 0)
242    AM_RANGE(0x2000, 0x2fff) AM_RAM AM_SHARE("videoram")
243    AM_RANGE(0x4000, 0xffff) AM_RAM
241   AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("boot", 0)
242   AM_RANGE(0x2000, 0x2fff) AM_RAM AM_SHARE("videoram")
243   AM_RANGE(0x4000, 0xffff) AM_RAM
244244//  AM_RANGE(0x4000, 0xbfff) AM_ROM AM_REGION("cardslot", 0)
245245ADDRESS_MAP_END
246246
247247static ADDRESS_MAP_START( i7000_io , AS_IO, 8, i7000_state)
248248   ADDRESS_MAP_UNMAP_HIGH
249249   ADDRESS_MAP_GLOBAL_MASK (0xff)
250//   AM_RANGE(0x06, 0x06) AM_WRITE(i7000_io_?_w)
251//   AM_RANGE(0x08, 0x09) AM_WRITE(i7000_io_?_w) //printer perhaps?
252//   AM_RANGE(0x0c, 0x0c) AM_WRITE(i7000_io_?_w) //0x0C and 0x10 may be related to mem page swapping. (self-test "4. PAG")
253//   AM_RANGE(0x10, 0x10) AM_WRITE(i7000_io_?_w)
254//   AM_RANGE(0x14, 0x15) AM_WRITE(i7000_io_?_w)
250//  AM_RANGE(0x06, 0x06) AM_WRITE(i7000_io_?_w)
251//  AM_RANGE(0x08, 0x09) AM_WRITE(i7000_io_?_w) //printer perhaps?
252//  AM_RANGE(0x0c, 0x0c) AM_WRITE(i7000_io_?_w) //0x0C and 0x10 may be related to mem page swapping. (self-test "4. PAG")
253//  AM_RANGE(0x10, 0x10) AM_WRITE(i7000_io_?_w)
254//  AM_RANGE(0x14, 0x15) AM_WRITE(i7000_io_?_w)
255255
256256   AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE("pit8253", pit8253_device, read, write)
257257
258//   AM_RANGE(0x1c, 0x1c) AM_WRITE(i7000_io_printer_data_w) //ASCII data
258//  AM_RANGE(0x1c, 0x1c) AM_WRITE(i7000_io_printer_data_w) //ASCII data
259259   AM_RANGE(0x1d, 0x1d) AM_READ_PORT("DSW")
260//   AM_RANGE(0x1e, 0x1e) AM_READWRITE(i7000_io_printer_status_r, i7000_io_?_w)
261//   AM_RANGE(0x1f, 0x1f) AM_WRITE(i7000_io_printer_strobe_w) //self-test routine writes 0x08 and 0x09 (it seems that bit 0 is the strobe and bit 3 is an enable signal)
262//   AM_RANGE(0x20, 0x21) AM_READWRITE(i7000_io_keyboard_r, i7000_io_keyboard_w)
260//  AM_RANGE(0x1e, 0x1e) AM_READWRITE(i7000_io_printer_status_r, i7000_io_?_w)
261//  AM_RANGE(0x1f, 0x1f) AM_WRITE(i7000_io_printer_strobe_w) //self-test routine writes 0x08 and 0x09 (it seems that bit 0 is the strobe and bit 3 is an enable signal)
262//  AM_RANGE(0x20, 0x21) AM_READWRITE(i7000_io_keyboard_r, i7000_io_keyboard_w)
263263
264264   AM_RANGE( 0x20, 0x20 ) AM_DEVREADWRITE("i8279", i8279_device, data_r, data_w)
265265   AM_RANGE( 0x21, 0x21 ) AM_DEVREADWRITE("i8279", i8279_device, status_r, cmd_w)
266266
267//   AM_RANGE(0x24, 0x24) AM_READ(i7000_io_?_r)
268//   AM_RANGE(0x25, 0x25) AM_WRITE(i7000_io_?_w)
267//  AM_RANGE(0x24, 0x24) AM_READ(i7000_io_?_r)
268//  AM_RANGE(0x25, 0x25) AM_WRITE(i7000_io_?_w)
269269
270//   AM_RANGE(0x28, 0x2d) AM_READWRITE(i7000_io_joystick_r, i7000_io_joystick_w)
270//  AM_RANGE(0x28, 0x2d) AM_READWRITE(i7000_io_joystick_r, i7000_io_joystick_w)
271271
272//   AM_RANGE(0x3b, 0x3b) AM_WRITE(i7000_io_?_w)
273//   AM_RANGE(0x66, 0x67) AM_WRITE(i7000_io_?_w)
274//   AM_RANGE(0xbb, 0xbb) AM_WRITE(i7000_io_?_w) //may be related to page-swapping...
272//  AM_RANGE(0x3b, 0x3b) AM_WRITE(i7000_io_?_w)
273//  AM_RANGE(0x66, 0x67) AM_WRITE(i7000_io_?_w)
274//  AM_RANGE(0xbb, 0xbb) AM_WRITE(i7000_io_?_w) //may be related to page-swapping...
275275ADDRESS_MAP_END
276276
277277DEVICE_IMAGE_LOAD_MEMBER( i7000_state, i7000_card )
r248551r248552
358358   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
359359   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
360360
361    /* Programmable timer */
361   /* Programmable timer */
362362   MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
363//   MCFG_PIT8253_CLK0(XTAL_4MHz / 2) /* TODO: verify on PCB */
364//   MCFG_PIT8253_OUT0_HANDLER(WRITELINE(i7000_state,i7000_pit_out0))
365//   MCFG_PIT8253_CLK1(XTAL_4MHz / 2) /* TODO: verify on PCB */
366//   MCFG_PIT8253_OUT1_HANDLER(WRITELINE(i7000_state,i7000_pit_out1))
363//  MCFG_PIT8253_CLK0(XTAL_4MHz / 2) /* TODO: verify on PCB */
364//  MCFG_PIT8253_OUT0_HANDLER(WRITELINE(i7000_state,i7000_pit_out0))
365//  MCFG_PIT8253_CLK1(XTAL_4MHz / 2) /* TODO: verify on PCB */
366//  MCFG_PIT8253_OUT1_HANDLER(WRITELINE(i7000_state,i7000_pit_out1))
367367   MCFG_PIT8253_CLK2(XTAL_4MHz / 2) /* TODO: verify on PCB */
368368   MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("speaker", speaker_sound_device, level_w))
369369
trunk/src/mess/drivers/icatel.c
r248551r248552
22// copyright-holders: Felipe Sanches
33/***************************************************************************
44
5   icatel - Brazilian public payphone
6   manufactured by icatel http://www.icatel.com.br/
5    icatel - Brazilian public payphone
6    manufactured by icatel http://www.icatel.com.br/
77
8   Partial schematics (drawn based on PCB inspection) available at:
9   https://github.com/garoa/Icatel/blob/master/doc/icatel.pdf
8    Partial schematics (drawn based on PCB inspection) available at:
9    https://github.com/garoa/Icatel/blob/master/doc/icatel.pdf
1010
11   Driver by Felipe Sanches <juca@members.fsf.org>
11    Driver by Felipe Sanches <juca@members.fsf.org>
1212
13   Changelog:
13    Changelog:
1414
15   2014 DEC 14 [Felipe Sanches]:
16   * Initial driver skeleton
15    2014 DEC 14 [Felipe Sanches]:
16    * Initial driver skeleton
1717
1818***************************************************************************/
1919
r248551r248552
8181ADDRESS_MAP_END
8282
8383static ADDRESS_MAP_START(i80c31_data, AS_DATA, 8, icatel_state)
84//   AM_RANGE(0x0056,0x005A) AM_READ(magic_string) /* This is a hack! */
84//  AM_RANGE(0x0056,0x005A) AM_READ(magic_string) /* This is a hack! */
8585ADDRESS_MAP_END
8686
8787DRIVER_INIT_MEMBER( icatel_state, icatel )
r248551r248552
9898
9999READ8_MEMBER(icatel_state::magic_string)
100100{
101//   logerror("read: magic_string, offset=%04X\n", offset);
101//  logerror("read: magic_string, offset=%04X\n", offset);
102102   char mstr[] = "TP-OK";
103103   return mstr[offset%5];
104104}
r248551r248552
108108   switch (offset%4)
109109   {
110110      case 0: return 0xff;
111      case 1:   return 0x7f;
111      case 1: return 0x7f;
112112      case 2: return 0xff;
113113      case 3: return 0xff;
114114   }
r248551r248552
169169READ8_MEMBER(icatel_state::ci15_r)
170170{
171171   /* TODO: Implement-me! */
172//   debugger_break(machine());
173//   logerror("read: ci15\n");
172//  debugger_break(machine());
173//  logerror("read: ci15\n");
174174   return (1 << 3) | (1 << 0);
175175}
176176
trunk/src/mess/drivers/rainbow.c
r248551r248552
11221122
11231123void rainbow_state::hdc_reset()
11241124{
1125//   printf(">> HARD DISC CONTROLLER RESET <<\n");
1125//  printf(">> HARD DISC CONTROLLER RESET <<\n");
11261126   logerror(">> HARD DISC CONTROLLER RESET <<\n");
11271127
11281128   m_hdc->reset(); // NEW HDC
r248551r248552
20252025
20262026      if (m_unit < 2)
20272027      {
2028         data = data | 8; // MOTOR 0 (for A or B) 
2028         data = data | 8; // MOTOR 0 (for A or B)
20292029      }
20302030      else
20312031      {
r248551r248552
23702370// - first generation hardware (introduced May '82) with ROM 04.03.11
23712371// - inability to boot from hard disc (mind the inadequate PSU)
23722372//----------------------------------------------------------------------------------------
2373// AVAILABLE RAM: 64 K on board (versus 128 K on model 'B').
2373// AVAILABLE RAM: 64 K on board (versus 128 K on model 'B').
23742374
23752375// Two compatible memory expansions were sold by DEC:
23762376// (PCIXX-AA) : 64 K (usable on either Rainbow 100-A or 100-B) *
r248551r248552
23792379
23802380// * DEC changed the way signals are handled on J6 (memory connector) later:
23812381//  "Whether a PC100-A or PC100-B memory module is installed on the PC100-B system module
2382//   affects the functions the signals on 5 pins (29, 30, 32, 43, and 47) of the J6 connector
2382//   affects the functions the signals on 5 pins (29, 30, 32, 43, and 47) of the J6 connector
23832383//   will perform." (from 'EK-RB100_TM_001 Addendum for PC100-A_PC100-B Dec.84' page 120).
23842384//----------------------------------------------------------------------------------------
23852385// KNOWN DIFFERENCES TO 100-B:
r248551r248552
23962396// SOCKETED LANGUAGE ROM (E91) with 1 single localization per ROM -
23972397ROM_LOAD("23-092e4-00.bin", 0xFE000, 0x2000, NO_DUMP)  // ROM (FE000-FFFFF) (E91) 8 K - English (?)
23982398// See also MP-01491-00 - PC100A FIELD MAINTENANCE SET. Appendix A of EK-RB100 Rainbow
2399// Technical Manual Addendum f.100A and 100B (Dec.84) lists 15 localizations / part numbers
2399// Technical Manual Addendum f.100A and 100B (Dec.84) lists 15 localizations / part numbers
24002400
2401ROM_REGION(0x1000, "chargen", 0) // [E98] 2732 (4 K) EPROM
2401ROM_REGION(0x1000, "chargen", 0) // [E98] 2732 (4 K) EPROM
24022402ROM_LOAD("23-020e3-00.bin", 0x0000, 0x1000, CRC(1685e452) SHA1(bc299ff1cb74afcededf1a7beb9001188fdcf02f))
24032403ROM_END
24042404
r248551r248552
24102410ROM_START(rainbow)
24112411ROM_REGION(0x100000, "maincpu", 0)
24122412
2413// Note that the 'Field Maintenance Print Set 1984' also lists alternate revision 'A1' with
2413// Note that the 'Field Maintenance Print Set 1984' also lists alternate revision 'A1' with
24142414//              23-063e3-00 (for chargen) and '23-074e5-00' / '23-073e5-00' for E5-01 / E5-02.
24152415
24162416// Part numbers 22E5, 20E5 and 37E3 verified to match revision "B" (FCC ID : A0994Q - PC100 - B).
24172417
2418// BOOT ROM
2419ROM_LOAD("23-022e5-00.bin", 0xf0000, 0x4000, CRC(9d1332b4) SHA1(736306d2a36bd44f95a39b36ebbab211cc8fea6e))
2418// BOOT ROM
2419ROM_LOAD("23-022e5-00.bin", 0xf0000, 0x4000, CRC(9d1332b4) SHA1(736306d2a36bd44f95a39b36ebbab211cc8fea6e))
24202420ROM_RELOAD(0xf4000, 0x4000)
24212421
2422// LANGUAGE ROM
2422// LANGUAGE ROM
24232423ROM_LOAD("23-020e5-00.bin", 0xf8000, 0x4000, CRC(8638712f) SHA1(8269b0d95dc6efbe67d500dac3999df4838625d8)) // German, French, English
24242424//ROM_LOAD( "23-015e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Dutch, French, English
24252425//ROM_LOAD( "23-016e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Finish, Swedish, English
2426//ROM_LOAD( "23-017e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Danish, Norwegian, English
2427//ROM_LOAD( "23-018e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Spanish, Italian, English
2426//ROM_LOAD( "23-017e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Danish, Norwegian, English
2427//ROM_LOAD( "23-018e5-00.bin", 0xf8000, 0x4000, NO_DUMP) // Spanish, Italian, English
24282428ROM_RELOAD(0xfc000, 0x4000)
24292429
24302430// CHARACTER GENERATOR (E3-03)
2431ROM_REGION(0x1000, "chargen", 0)
2431ROM_REGION(0x1000, "chargen", 0)
24322432ROM_LOAD("23-037e3.bin", 0x0000, 0x1000, CRC(1685e452) SHA1(bc299ff1cb74afcededf1a7beb9001188fdcf02f))
24332433ROM_END
24342434
r248551r248552
24432443// A Readme from January 1985 mentions 'recent ROM changes for MASS 11' (a VAX word processor).
24442444// It is *likely* that the sole differences between 5.05 and 5.03 affect terminal emulation.
24452445
2446// FIXME: ROM names are * made up *.
2446// FIXME: ROM names are * made up *.
24472447// Someone who knows the DEC naming conventions should correct them -
24482448ROM_START(rainbow190)
24492449ROM_REGION(0x100000, "maincpu", 0)
r248551r248552
24522452ROM_LOAD("dec190rom1.bin", 0xf8000, 0x4000, CRC(5ce59632) SHA1(d29793f7014c57a4e7cb77bbf6e84f9113635ed2))
24532453
24542454ROM_RELOAD(0xfc000, 0x4000)
2455ROM_REGION(0x1000, "chargen", 0)
2455ROM_REGION(0x1000, "chargen", 0)
24562456ROM_LOAD("chargen.bin", 0x0000, 0x1000, CRC(1685e452) SHA1(bc299ff1cb74afcededf1a7beb9001188fdcf02f))
24572457ROM_END
24582458//----------------------------------------------------------------------------------------
trunk/src/mess/drivers/rambo.c
r248551r248552
1111    http://reprap.org/mediawiki/images/7/75/Rambo1-1-schematic.png
1212
1313    3d printers currently supported by this driver:
14    * Metamáquina 2
14    * Metam??quina 2
1515
1616    3d printers known to use this board:
1717    * TODO: list them all here
r248551r248552
3131class rambo_state : public driver_device
3232{
3333public:
34    rambo_state(const machine_config &mconfig, device_type type, const char *tag)
35        : driver_device(mconfig, type, tag),
36        m_maincpu(*this, "maincpu")
37    {
38    }
34   rambo_state(const machine_config &mconfig, device_type type, const char *tag)
35      : driver_device(mconfig, type, tag),
36      m_maincpu(*this, "maincpu")
37   {
38   }
3939
40    UINT8 m_port_a;
41    UINT8 m_port_b;
42    UINT8 m_port_c;
43    UINT8 m_port_d;
44    UINT8 m_port_e;
45    UINT8 m_port_f;
46    UINT8 m_port_g;
47    UINT8 m_port_h;
48    UINT8 m_port_j;
49    UINT8 m_port_k;
50    UINT8 m_port_l;
51    required_device<avr8_device> m_maincpu;
40   UINT8 m_port_a;
41   UINT8 m_port_b;
42   UINT8 m_port_c;
43   UINT8 m_port_d;
44   UINT8 m_port_e;
45   UINT8 m_port_f;
46   UINT8 m_port_g;
47   UINT8 m_port_h;
48   UINT8 m_port_j;
49   UINT8 m_port_k;
50   UINT8 m_port_l;
51   required_device<avr8_device> m_maincpu;
5252
53    DECLARE_READ8_MEMBER(port_r);
54    DECLARE_WRITE8_MEMBER(port_w);
53   DECLARE_READ8_MEMBER(port_r);
54   DECLARE_WRITE8_MEMBER(port_w);
5555
56    DECLARE_DRIVER_INIT(rambo);
57    virtual void machine_start();
58    virtual void machine_reset();
56   DECLARE_DRIVER_INIT(rambo);
57   virtual void machine_start();
58   virtual void machine_reset();
5959};
6060
6161void rambo_state::machine_start()
r248551r248552
6464
6565READ8_MEMBER(rambo_state::port_r)
6666{
67    switch( offset )
68    {
69        case AVR8_IO_PORTA:
70        {
67   switch( offset )
68   {
69      case AVR8_IO_PORTA:
70      {
7171#if LOG_PORTS
72            printf("[%08X] Port A READ \n", m_maincpu->m_shifted_pc);
72         printf("[%08X] Port A READ \n", m_maincpu->m_shifted_pc);
7373#endif
74            return m_port_a;
75        }
76        default:
77            break;
78    }
79    return 0;
74         return m_port_a;
75      }
76      default:
77         break;
78   }
79   return 0;
8080}
8181
8282WRITE8_MEMBER(rambo_state::port_w)
8383{
84    switch( offset )
85    {
86        case AVR8_IO_PORTA:
87        {
88            if (data == m_port_a) break;
84   switch( offset )
85   {
86      case AVR8_IO_PORTA:
87      {
88         if (data == m_port_a) break;
8989
9090#if LOG_PORTS
91            UINT8 old_port_a = m_port_a;
92            UINT8 changed = data ^ old_port_a;
91         UINT8 old_port_a = m_port_a;
92         UINT8 changed = data ^ old_port_a;
9393#endif
94            m_port_a = data;
95            break;
96        }
97        default:
98            break;
99    }
94         m_port_a = data;
95         break;
96      }
97      default:
98         break;
99   }
100100}
101101
102102/****************************************************\
r248551r248552
104104\****************************************************/
105105
106106static ADDRESS_MAP_START( rambo_prg_map, AS_PROGRAM, 8, rambo_state )
107    AM_RANGE(0x0000, 0x1FFFF) AM_ROM
107   AM_RANGE(0x0000, 0x1FFFF) AM_ROM
108108ADDRESS_MAP_END
109109
110110static ADDRESS_MAP_START( rambo_data_map, AS_DATA, 8, rambo_state )
111    AM_RANGE(0x0200, 0x21FF) AM_RAM  /* ATMEGA2560 Internal SRAM */
111   AM_RANGE(0x0200, 0x21FF) AM_RAM  /* ATMEGA2560 Internal SRAM */
112112ADDRESS_MAP_END
113113
114114static ADDRESS_MAP_START( rambo_io_map, AS_IO, 8, rambo_state )
115    AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w )
115   AM_RANGE(AVR8_IO_PORTA, AVR8_IO_PORTL) AM_READWRITE( port_r, port_w )
116116ADDRESS_MAP_END
117117
118118/****************************************************\
r248551r248552
125125
126126void rambo_state::machine_reset()
127127{
128    m_port_a = 0;
129    m_port_b = 0;
130    m_port_c = 0;
131    m_port_d = 0;
132    m_port_e = 0;
133    m_port_f = 0;
134    m_port_g = 0;
135    m_port_h = 0;
136    m_port_j = 0;
137    m_port_k = 0;
138    m_port_l = 0;
128   m_port_a = 0;
129   m_port_b = 0;
130   m_port_c = 0;
131   m_port_d = 0;
132   m_port_e = 0;
133   m_port_f = 0;
134   m_port_g = 0;
135   m_port_h = 0;
136   m_port_j = 0;
137   m_port_k = 0;
138   m_port_l = 0;
139139}
140140
141141static MACHINE_CONFIG_START( rambo, rambo_state )
142142
143    MCFG_CPU_ADD("maincpu", ATMEGA2560, MASTER_CLOCK)
144    MCFG_CPU_PROGRAM_MAP(rambo_prg_map)
145    MCFG_CPU_DATA_MAP(rambo_data_map)
146    MCFG_CPU_IO_MAP(rambo_io_map)
143   MCFG_CPU_ADD("maincpu", ATMEGA2560, MASTER_CLOCK)
144   MCFG_CPU_PROGRAM_MAP(rambo_prg_map)
145   MCFG_CPU_DATA_MAP(rambo_data_map)
146   MCFG_CPU_IO_MAP(rambo_io_map)
147147
148    MCFG_CPU_AVR8_EEPROM("eeprom")
149    MCFG_CPU_AVR8_LFUSE(0xFF)
150    MCFG_CPU_AVR8_HFUSE(0xDA)
151    MCFG_CPU_AVR8_EFUSE(0xF4)
152    MCFG_CPU_AVR8_LOCK(0x0F)
148   MCFG_CPU_AVR8_EEPROM("eeprom")
149   MCFG_CPU_AVR8_LFUSE(0xFF)
150   MCFG_CPU_AVR8_HFUSE(0xDA)
151   MCFG_CPU_AVR8_EFUSE(0xF4)
152   MCFG_CPU_AVR8_LOCK(0x0F)
153153
154    /*TODO: Add an ATMEGA32U2 for USB-Serial communications */
155    /*TODO: Emulate the AD5206 digipot */
156    /*TODO: Emulate the A4982 stepper motor drivers and instantiate 5 of these here
157            for controlling the X, Y, Z, E1 (and optionally E2) motors */
158    /*TODO: Simulate the heating elements */
159    /*TODO: Implement the thermistor measurements */
154   /*TODO: Add an ATMEGA32U2 for USB-Serial communications */
155   /*TODO: Emulate the AD5206 digipot */
156   /*TODO: Emulate the A4982 stepper motor drivers and instantiate 5 of these here
157           for controlling the X, Y, Z, E1 (and optionally E2) motors */
158   /*TODO: Simulate the heating elements */
159   /*TODO: Implement the thermistor measurements */
160160MACHINE_CONFIG_END
161161
162162ROM_START( metamaq2 )
163    ROM_REGION( 0x20000, "maincpu", 0 )
164    ROM_DEFAULT_BIOS("20131015")
163   ROM_REGION( 0x20000, "maincpu", 0 )
164   ROM_DEFAULT_BIOS("20131015")
165165
166    ROM_SYSTEM_BIOS( 0, "20130619", "June 19th, 2013" )
167    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_19) */
168    ROMX_LOAD("repetier-fw-metamaquina2-2013-06-19.bin", 0x0000, 0x1000e, CRC(4279b178) SHA1(e4d3c9d6421287c980639c2df32d07b754adc8fc), ROM_BIOS(1))
166   ROM_SYSTEM_BIOS( 0, "20130619", "June 19th, 2013" )
167   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_19) */
168   ROMX_LOAD("repetier-fw-metamaquina2-2013-06-19.bin", 0x0000, 0x1000e, CRC(4279b178) SHA1(e4d3c9d6421287c980639c2df32d07b754adc8fc), ROM_BIOS(1))
169169
170    ROM_SYSTEM_BIOS( 1, "20130624", "June 24th, 2013" )
171    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_RC2_RAMBo_rev10e_2013_06_24) */
172    ROMX_LOAD("repetier-fw-metamaquina2-2013-06-24_mm2rc2_rambo_rev10e.bin", 0x0000, 0xcebc, CRC(82400a3c) SHA1(0781ce29406ce69b63edb93d776b9c081bed841e), ROM_BIOS(2))
170   ROM_SYSTEM_BIOS( 1, "20130624", "June 24th, 2013" )
171   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_RC2_RAMBo_rev10e_2013_06_24) */
172   ROMX_LOAD("repetier-fw-metamaquina2-2013-06-24_mm2rc2_rambo_rev10e.bin", 0x0000, 0xcebc, CRC(82400a3c) SHA1(0781ce29406ce69b63edb93d776b9c081bed841e), ROM_BIOS(2))
173173
174    ROM_SYSTEM_BIOS( 2, "20130625", "June 25th, 2013" )
175    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_25) */
176    ROMX_LOAD("repetier-fw-metamaquina2-2013-06-25.bin", 0x0000, 0x10076, CRC(e7e4db38) SHA1(0c307bb0a0ee4e9d38253936e7030d0efb3c1845), ROM_BIOS(3))
174   ROM_SYSTEM_BIOS( 2, "20130625", "June 25th, 2013" )
175   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_06_25) */
176   ROMX_LOAD("repetier-fw-metamaquina2-2013-06-25.bin", 0x0000, 0x10076, CRC(e7e4db38) SHA1(0c307bb0a0ee4e9d38253936e7030d0efb3c1845), ROM_BIOS(3))
177177
178    ROM_SYSTEM_BIOS( 3, "20130709", "July 9th, 2013" )
179    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_09) */
180    ROMX_LOAD("repetier-fw-metamaquina2-2013-07-09.bin", 0x0000, 0x10078, CRC(9a45509f) SHA1(3a2e6516b45cc0ea1aef039335b02208847aaebf), ROM_BIOS(4))
178   ROM_SYSTEM_BIOS( 3, "20130709", "July 9th, 2013" )
179   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_09) */
180   ROMX_LOAD("repetier-fw-metamaquina2-2013-07-09.bin", 0x0000, 0x10078, CRC(9a45509f) SHA1(3a2e6516b45cc0ea1aef039335b02208847aaebf), ROM_BIOS(4))
181181
182    ROM_SYSTEM_BIOS( 4, "20130712", "July 12th, 2013" )
183    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_12) */
184    ROMX_LOAD("repetier-fw-metamaquina2-2013-07-12.bin", 0x0000, 0x10184, CRC(9aeac87c) SHA1(c1441096553c214c12a34da87fa42cc3f0eaf74d), ROM_BIOS(5))
182   ROM_SYSTEM_BIOS( 4, "20130712", "July 12th, 2013" )
183   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_12) */
184   ROMX_LOAD("repetier-fw-metamaquina2-2013-07-12.bin", 0x0000, 0x10184, CRC(9aeac87c) SHA1(c1441096553c214c12a34da87fa42cc3f0eaf74d), ROM_BIOS(5))
185185
186    ROM_SYSTEM_BIOS( 5, "20130717", "July 17th, 2013" )
187    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_17) */
188    ROMX_LOAD("repetier-fw-metamaquina2-2013-07-17.bin", 0x0000, 0x10180, CRC(7c053ed0) SHA1(7abeabcbfdb411b6e681e2d0c9398c40b142f76b), ROM_BIOS(6))
186   ROM_SYSTEM_BIOS( 5, "20130717", "July 17th, 2013" )
187   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_07_17) */
188   ROMX_LOAD("repetier-fw-metamaquina2-2013-07-17.bin", 0x0000, 0x10180, CRC(7c053ed0) SHA1(7abeabcbfdb411b6e681e2d0c9398c40b142f76b), ROM_BIOS(6))
189189
190    ROM_SYSTEM_BIOS( 6, "20130806", "August 6th, 2013" )
191    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_06) */
192    ROMX_LOAD("repetier-fw-metamaquina2-2013-08-06.bin", 0x0000, 0x1017e, CRC(6aaf5a14) SHA1(93cebee8ab9eda9d81e70504b407268a198577f0), ROM_BIOS(7))
190   ROM_SYSTEM_BIOS( 6, "20130806", "August 6th, 2013" )
191   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_06) */
192   ROMX_LOAD("repetier-fw-metamaquina2-2013-08-06.bin", 0x0000, 0x1017e, CRC(6aaf5a14) SHA1(93cebee8ab9eda9d81e70504b407268a198577f0), ROM_BIOS(7))
193193
194    ROM_SYSTEM_BIOS( 7, "20130809", "August 9th, 2013" )
195    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_09) */
196    ROMX_LOAD("repetier-fw-metamaquina2-2013-08-09.bin", 0x0000, 0x1018a, CRC(ee53a011) SHA1(666d09fe69220a172528fe8d1c358e3ddaaa743a), ROM_BIOS(8))
194   ROM_SYSTEM_BIOS( 7, "20130809", "August 9th, 2013" )
195   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_09) */
196   ROMX_LOAD("repetier-fw-metamaquina2-2013-08-09.bin", 0x0000, 0x1018a, CRC(ee53a011) SHA1(666d09fe69220a172528fe8d1c358e3ddaaa743a), ROM_BIOS(8))
197197
198    ROM_SYSTEM_BIOS( 8, "20130822", "August 22nd, 2013" )
199    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_22) */
200    ROMX_LOAD("repetier-fw-metamaquina2-2013-08-22.bin", 0x0000, 0x1018a, CRC(70a5a3c9) SHA1(20e52ea7bf40e71020b815b9fb6385d880677927), ROM_BIOS(9))
198   ROM_SYSTEM_BIOS( 8, "20130822", "August 22nd, 2013" )
199   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_08_22) */
200   ROMX_LOAD("repetier-fw-metamaquina2-2013-08-22.bin", 0x0000, 0x1018a, CRC(70a5a3c9) SHA1(20e52ea7bf40e71020b815b9fb6385d880677927), ROM_BIOS(9))
201201
202    ROM_SYSTEM_BIOS( 9, "20130913", "September 13th, 2013" )
203    /* source code for this one is unavailable as it was an unreleased internal development build */
204    ROMX_LOAD("repetier-fw-metamaquina2-2013-09-13-devel.bin", 0x0000, 0x101bc, CRC(5e7c7933) SHA1(5b9bfe919daf705ad7a9a2de3cf4c51e3338ec47), ROM_BIOS(10))
202   ROM_SYSTEM_BIOS( 9, "20130913", "September 13th, 2013" )
203   /* source code for this one is unavailable as it was an unreleased internal development build */
204   ROMX_LOAD("repetier-fw-metamaquina2-2013-09-13-devel.bin", 0x0000, 0x101bc, CRC(5e7c7933) SHA1(5b9bfe919daf705ad7a9a2de3cf4c51e3338ec47), ROM_BIOS(10))
205205
206    ROM_SYSTEM_BIOS( 10, "20130920", "September 20th, 2013" )
207    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_09_20) */
208    ROMX_LOAD("repetier-fw-metamaquina2-2013-09-20.bin", 0x0000, 0x10384, CRC(48378e58) SHA1(513f0a0c65219875cc467420cc091e3489b58919), ROM_BIOS(11))
206   ROM_SYSTEM_BIOS( 10, "20130920", "September 20th, 2013" )
207   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_09_20) */
208   ROMX_LOAD("repetier-fw-metamaquina2-2013-09-20.bin", 0x0000, 0x10384, CRC(48378e58) SHA1(513f0a0c65219875cc467420cc091e3489b58919), ROM_BIOS(11))
209209
210    ROM_SYSTEM_BIOS( 11, "20131015", "October 15th, 2013" )
211    /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_10_15) */
212    ROMX_LOAD("repetier-fw-metamaquina2-2013-10-15.bin", 0x0000, 0x102c8, CRC(520134bd) SHA1(dfe2251aad06972f237eb4920ce14ccb32da5af0), ROM_BIOS(12))
210   ROM_SYSTEM_BIOS( 11, "20131015", "October 15th, 2013" )
211   /* SOURCE(https://github.com/Metamaquina/Repetier-Firmware/tree/MM2_2013_10_15) */
212   ROMX_LOAD("repetier-fw-metamaquina2-2013-10-15.bin", 0x0000, 0x102c8, CRC(520134bd) SHA1(dfe2251aad06972f237eb4920ce14ccb32da5af0), ROM_BIOS(12))
213213
214    /*Arduino MEGA bootloader */
215    /* This is marked as a BAD_DUMP because we're not sure this is the bootloader we're actually using.
216       This is inherited from the Replicator 1 driver.
217       A proper dump would be good.
218       Also, it is not clear whether there's any difference in the bootloader
219       between the ATMEGA1280 and the ATMEGA2560 MCUs */
220    ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, BAD_DUMP CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) )
214   /*Arduino MEGA bootloader */
215   /* This is marked as a BAD_DUMP because we're not sure this is the bootloader we're actually using.
216      This is inherited from the Replicator 1 driver.
217      A proper dump would be good.
218      Also, it is not clear whether there's any difference in the bootloader
219      between the ATMEGA1280 and the ATMEGA2560 MCUs */
220   ROM_LOAD( "atmegaboot_168_atmega1280.bin", 0x1f000, 0x0f16, BAD_DUMP CRC(c041f8db) SHA1(d995ebf360a264cccacec65f6dc0c2257a3a9224) )
221221
222    /* on-die 4kbyte eeprom */
223    ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF )
222   /* on-die 4kbyte eeprom */
223   ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASEFF )
224224ROM_END
225225
226226/*   YEAR  NAME      PARENT    COMPAT    MACHINE   INPUT   CLASS        INIT         COMPANY           FULLNAME */
trunk/src/mess/drivers/rc759.c
r248551r248552
472472   AM_RANGE(0x056, 0x057) AM_NOP // in reality, access to sound and rtc is a bit more involved
473473   AM_RANGE(0x05a, 0x05b) AM_DEVWRITE8("snd", sn76489a_device, write, 0x00ff)
474474   AM_RANGE(0x05c, 0x05d) AM_READWRITE8(rtc_r, rtc_w, 0x00ff)
475//   AM_RANGE(0x060, 0x06f) AM_WRITE8(crt_control_w, 0x00ff)
475//  AM_RANGE(0x060, 0x06f) AM_WRITE8(crt_control_w, 0x00ff)
476476   AM_RANGE(0x070, 0x077) AM_MIRROR(0x08) AM_DEVREADWRITE8("ppi", i8255_device, read, write, 0x00ff)
477477   AM_RANGE(0x080, 0x0ff) AM_READWRITE8(nvram_r, nvram_w, 0x00ff)
478478//  AM_RANGE(0x100, 0x101) net
r248551r248552
487487//  AM_RANGE(0x28d, 0x28d) external printer control
488488   AM_RANGE(0x28e, 0x28f) AM_READWRITE8(floppy_ack_r, floppy_reserve_w, 0x00ff)
489489   AM_RANGE(0x290, 0x291) AM_WRITE8(floppy_release_w, 0x00ff)
490//   AM_RANGE(0x292, 0x293) AM_READWRITE8(printer_ack_r, printer_reserve_w, 0x00ff)
491//   AM_RANGE(0x294, 0x295) AM_WRITE8(printer_release_w, 0x00ff)
490//  AM_RANGE(0x292, 0x293) AM_READWRITE8(printer_ack_r, printer_reserve_w, 0x00ff)
491//  AM_RANGE(0x294, 0x295) AM_WRITE8(printer_release_w, 0x00ff)
492492   AM_RANGE(0x300, 0x30f) AM_DEVREADWRITE8("isbx", isbx_slot_device, mcs0_r, mcs0_w, 0x00ff)
493493   AM_RANGE(0x310, 0x31f) AM_DEVREADWRITE8("isbx", isbx_slot_device, mcs1_r, mcs1_w, 0x00ff)
494//   AM_RANGE(0x320, 0x321) isbx dma ack
495//   AM_RANGE(0x330, 0x331) isbx tc
494//  AM_RANGE(0x320, 0x321) isbx dma ack
495//  AM_RANGE(0x330, 0x331) isbx tc
496496ADDRESS_MAP_END
497497
498498
r248551r248552
554554   MCFG_I82730_SINT_HANDLER(DEVWRITELINE("pic", pic8259_device, ir4_w))
555555
556556   // keyboard
557    MCFG_DEVICE_ADD("keyb", GENERIC_KEYBOARD, 0)
558    MCFG_GENERIC_KEYBOARD_CB(WRITE8(rc759_state, keyb_put))
557   MCFG_DEVICE_ADD("keyb", GENERIC_KEYBOARD, 0)
558   MCFG_GENERIC_KEYBOARD_CB(WRITE8(rc759_state, keyb_put))
559559
560560   // cassette
561561   MCFG_CASSETTE_ADD("cas")
r248551r248552
584584
585585   // floppy disk controller
586586   MCFG_WD2797_ADD("fdc", 1000000)
587//   MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("pic", pic8259_device, ir0_w))
588//   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq1_w))
587//  MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("pic", pic8259_device, ir0_w))
588//  MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq1_w))
589589
590590   // floppy drives
591591   MCFG_FLOPPY_DRIVE_ADD("fdc:0", rc759_floppies, "hd", floppy_image_device::default_floppy_formats)
trunk/src/mess/drivers/sdk80.c
r248551r248552
2929#include "bus/rs232/rs232.h"
3030//#include "machine/ay31015.h"
3131
32#define I8251A_TAG      "usart"
33#define I8251A_BAUD_TAG   "usart_baud"
34#define RS232_TAG      "rs232"
32#define I8251A_TAG      "usart"
33#define I8251A_BAUD_TAG "usart_baud"
34#define RS232_TAG       "rs232"
3535
3636class sdk80_state : public driver_device
3737{
r248551r248552
145145   /* video hardware */
146146   // 96364 crt controller
147147
148//   MCFG_SCREEN_ADD("screen", RASTER)
149//   MCFG_SCREEN_REFRESH_RATE(60)
148//  MCFG_SCREEN_ADD("screen", RASTER)
149//  MCFG_SCREEN_REFRESH_RATE(60)
150150   /* Video is blanked for 70 out of 262 scanlines per refresh cycle.
151151      Each scanline is composed of 65 character times, 40 of which
152152      are visible, and each character time is 7 dot times; a dot time
153153      is 2 cycles of the fundamental 14.31818 MHz oscillator.  The
154154      total blanking time is about 4450 microseconds. */
155//   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((int) (70 * 65 * 7 * 2 / 14.31818)))
155//  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((int) (70 * 65 * 7 * 2 / 14.31818)))
156156   /* It would be nice if we could implement some sort of display
157157      overscan here. */
158//   MCFG_SCREEN_SIZE(40 * 7, 24 * 8)
159//   MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1)
160//   MCFG_SCREEN_UPDATE_DRIVER(sdk80_state, screen_update)
161//   MCFG_SCREEN_PALETTE("palette")
158//  MCFG_SCREEN_SIZE(40 * 7, 24 * 8)
159//  MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1)
160//  MCFG_SCREEN_UPDATE_DRIVER(sdk80_state, screen_update)
161//  MCFG_SCREEN_PALETTE("palette")
162162
163//   MCFG_GFXDECODE_ADD("gfxdecode", "palette", sdk80)
163//  MCFG_GFXDECODE_ADD("gfxdecode", "palette", sdk80)
164164
165//   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
165//  MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
166166
167167   // Video board UART
168//   MCFG_DEVICE_ADD( "hd6402", AY31015, 0 )
169//   MCFG_AY31015_TX_CLOCK(( XTAL_16MHz / 16 ) / 256)
170//   MCFG_AY31015_RX_CLOCK(( XTAL_16MHz / 16 ) / 256)
171//   MCFG_AY51013_READ_SI_CB(READ8(sdk80_state, nascom1_hd6402_si))
172//   MCFG_AY51013_WRITE_SO_CB(WRITE8(sdk80_state, nascom1_hd6402_so))
168//  MCFG_DEVICE_ADD( "hd6402", AY31015, 0 )
169//  MCFG_AY31015_TX_CLOCK(( XTAL_16MHz / 16 ) / 256)
170//  MCFG_AY31015_RX_CLOCK(( XTAL_16MHz / 16 ) / 256)
171//  MCFG_AY51013_READ_SI_CB(READ8(sdk80_state, nascom1_hd6402_si))
172//  MCFG_AY51013_WRITE_SO_CB(WRITE8(sdk80_state, nascom1_hd6402_so))
173173
174174   /* Devices */
175//   MCFG_DEVICE_ADD("i8279", I8279, 3100000) // based on divider
176//   MCFG_I8279_OUT_IRQ_CB(INPUTLINE("maincpu", I8085_RST55_LINE))   // irq
177//   MCFG_I8279_OUT_SL_CB(WRITE8(sdk80_state, scanlines_w))          // scan SL lines
178//   MCFG_I8279_OUT_DISP_CB(WRITE8(sdk80_state, digit_w))            // display A&B
179//   MCFG_I8279_IN_RL_CB(READ8(sdk80_state, kbd_r))                  // kbd RL lines
180//   MCFG_I8279_IN_SHIFT_CB(VCC)                                     // Shift key
181//   MCFG_I8279_IN_CTRL_CB(VCC)
175//  MCFG_DEVICE_ADD("i8279", I8279, 3100000) // based on divider
176//  MCFG_I8279_OUT_IRQ_CB(INPUTLINE("maincpu", I8085_RST55_LINE))   // irq
177//  MCFG_I8279_OUT_SL_CB(WRITE8(sdk80_state, scanlines_w))          // scan SL lines
178//  MCFG_I8279_OUT_DISP_CB(WRITE8(sdk80_state, digit_w))            // display A&B
179//  MCFG_I8279_IN_RL_CB(READ8(sdk80_state, kbd_r))                  // kbd RL lines
180//  MCFG_I8279_IN_SHIFT_CB(VCC)                                     // Shift key
181//  MCFG_I8279_IN_CTRL_CB(VCC)
182182
183183   //MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
184184   //MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(sdk80_state, kbd_put))
trunk/src/mess/drivers/smc777.c
r248551r248552
613613   AM_RANGE(0x18, 0x19) AM_MIRROR(0xff00) AM_WRITE(mc6845_w)
614614   AM_RANGE(0x1a, 0x1b) AM_MIRROR(0xff00) AM_READWRITE(key_r, key_w)
615615   AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_READWRITE(system_input_r, system_output_w)
616//   AM_RANGE(0x1d, 0x1d) system and control read, printer strobe write
617//   AM_RANGE(0x1e, 0x1f) rs232 irq control
616//  AM_RANGE(0x1d, 0x1d) system and control read, printer strobe write
617//  AM_RANGE(0x1e, 0x1f) rs232 irq control
618618   AM_RANGE(0x20, 0x20) AM_MIRROR(0xff00) AM_READWRITE(display_reg_r, display_reg_w)
619619   AM_RANGE(0x21, 0x21) AM_MIRROR(0xff00) AM_READWRITE(irq_mask_r, irq_mask_w)
620//   AM_RANGE(0x22, 0x22) printer output data
620//  AM_RANGE(0x22, 0x22) printer output data
621621   AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_WRITE(border_col_w)
622//   AM_RANGE(0x24, 0x24) rtc write address
623//   AM_RANGE(0x25, 0x25) rtc read
624//   AM_RANGE(0x26, 0x26) rs232 #1
625//   AM_RANGE(0x28, 0x2c) fdc #2
626//   AM_RANGE(0x2d, 0x2f) rs232 #2
622//  AM_RANGE(0x24, 0x24) rtc write address
623//  AM_RANGE(0x25, 0x25) rtc read
624//  AM_RANGE(0x26, 0x26) rs232 #1
625//  AM_RANGE(0x28, 0x2c) fdc #2
626//  AM_RANGE(0x2d, 0x2f) rs232 #2
627627   AM_RANGE(0x30, 0x33) AM_MIRROR(0xff00) AM_READWRITE(fdc_r, fdc_w)
628628   AM_RANGE(0x34, 0x34) AM_MIRROR(0xff00) AM_READWRITE(fdc_request_r, floppy_select_w)
629//   AM_RANGE(0x35, 0x37) rs232 #3
630//   AM_RANGE(0x38, 0x3b) cache disk unit
631//   AM_RANGE(0x3c, 0x3d) rgb superimposer
632//   AM_RANGE(0x40, 0x47) ieee-488
633//   AM_RANGE(0x48, 0x4f) hdd (winchester)
629//  AM_RANGE(0x35, 0x37) rs232 #3
630//  AM_RANGE(0x38, 0x3b) cache disk unit
631//  AM_RANGE(0x3c, 0x3d) rgb superimposer
632//  AM_RANGE(0x40, 0x47) ieee-488
633//  AM_RANGE(0x48, 0x4f) hdd (winchester)
634634   AM_RANGE(0x51, 0x51) AM_MIRROR(0xff00) AM_READ_PORT("JOY_1P") AM_WRITE(color_mode_w)
635635   AM_RANGE(0x52, 0x52) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_WRITE(ramdac_w)
636636   AM_RANGE(0x53, 0x53) AM_MIRROR(0xff00) AM_DEVWRITE("sn1", sn76489a_device, write)
637//   AM_RANGE(0x54, 0x59) vrt controller
638//   AM_RANGE(0x5a, 0x5b) ram banking
639//   AM_RANGE(0x70, 0x70) auto-start rom
640//   AM_RANGE(0x74, 0x74) ieee-488 rom
641//   AM_RANGE(0x75, 0x75) vrt controller rom
642//   AM_RANGE(0x7e, 0x7f) kanji rom
637//  AM_RANGE(0x54, 0x59) vrt controller
638//  AM_RANGE(0x5a, 0x5b) ram banking
639//  AM_RANGE(0x70, 0x70) auto-start rom
640//  AM_RANGE(0x74, 0x74) ieee-488 rom
641//  AM_RANGE(0x75, 0x75) vrt controller rom
642//  AM_RANGE(0x7e, 0x7f) kanji rom
643643   AM_RANGE(0x80, 0xff) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(fbuf_r, fbuf_w)
644644ADDRESS_MAP_END
645645
trunk/src/mess/drivers/tb303.c
r248551r248552
2828   { }
2929
3030   required_device<timer_device> m_t3_off_timer;
31   
31
3232   UINT8 m_ram[0xc00];
3333   UINT16 m_ram_address;
3434   bool m_ram_ce;
r248551r248552
9797      case 2: hi = 1; break;
9898      case 3: hi = 2; break;
9999   }
100   
100
101101   if (m_ram_ce)
102102   {
103103      // _WE must be high(read mode) for address transitions
r248551r248552
114114   // MCU D,F,E: RAM address
115115   m_port[offset] = data;
116116   refresh_ram();
117   
117
118118   // MCU D,F01: pitch data
119119   //..
120120}
r248551r248552
133133   // MCU I0: RAM _WE
134134   m_ram_we = (data & 1) ? false : true;
135135   refresh_ram();
136   
136
137137   // MCU I1: pitch data latch strobe
138138   // MCU I2: gate signal
139139
r248551r248552
147147{
148148   // 4*4 LED matrix from port G/H:
149149   /*
150      0.0 D204    1.0 D211    2.0 D217    3.0 D205
151      0.1 D206    1.1 D213    2.1 D218    3.1 D207
152      0.2 D208    1.2 D215    2.2 D220    3.2 D210
153      0.3 D209    1.3 D216    2.3 D221    3.3 D212
150       0.0 D204    1.0 D211    2.0 D217    3.0 D205
151       0.1 D206    1.1 D213    2.1 D218    3.1 D207
152       0.2 D208    1.2 D215    2.2 D220    3.2 D210
153       0.3 D209    1.3 D216    2.3 D221    3.3 D212
154154   */
155155   display_matrix(4, 4, m_port[NEC_UCOM4_PORTG], m_port[NEC_UCOM4_PORTH]);
156   
156
157157   // todo: battery led
158158   // todo: 4 more leds(see top-left part)
159159}
r248551r248552
164164   // MCU H: input/led mux
165165   if (offset == NEC_UCOM4_PORTH)
166166      m_inp_mux = data = data ^ 0xf;
167   
167
168168   m_port[offset] = data;
169169   update_leds();
170170}
r248551r248552
253253void tb303_state::machine_start()
254254{
255255   hh_ucom4_state::machine_start();
256   
256
257257   // zerofill
258258   memset(m_ram, 0, sizeof(m_ram));
259259   m_ram_address = 0;
260260   m_ram_ce = false;
261261   m_ram_we = false;
262   
262
263263   // register for savestates
264264   save_item(NAME(m_ram));
265265   save_item(NAME(m_ram_address));
trunk/src/mess/drivers/xbox.c
r248551r248552
22// copyright-holders:?
33/***************************************************************************
44
5   XBOX (c) 2001 Microsoft
5    XBOX (c) 2001 Microsoft
66
7   Skeleton driver
8   
7    Skeleton driver
8
99***************************************************************************/
1010
1111
r248551r248552
6464static ADDRESS_MAP_START(xbox_map, AS_PROGRAM, 32, xbox_state)
6565   AM_RANGE(0x00000000, 0x07ffffff) AM_RAM // 128 megabytes
6666   AM_RANGE(0xf0000000, 0xf0ffffff) AM_RAM
67//   AM_RANGE(0xfd000000, 0xfdffffff) AM_RAM AM_READWRITE(geforce_r, geforce_w)
68//   AM_RANGE(0xfed00000, 0xfed003ff) AM_READWRITE(usbctrl_r, usbctrl_w)
69//   AM_RANGE(0xfe800000, 0xfe85ffff) AM_READWRITE(audio_apu_r, audio_apu_w)
70//   AM_RANGE(0xfec00000, 0xfec001ff) AM_READWRITE(audio_ac93_r, audio_ac93_w)
67//  AM_RANGE(0xfd000000, 0xfdffffff) AM_RAM AM_READWRITE(geforce_r, geforce_w)
68//  AM_RANGE(0xfed00000, 0xfed003ff) AM_READWRITE(usbctrl_r, usbctrl_w)
69//  AM_RANGE(0xfe800000, 0xfe85ffff) AM_READWRITE(audio_apu_r, audio_apu_w)
70//  AM_RANGE(0xfec00000, 0xfec001ff) AM_READWRITE(audio_ac93_r, audio_ac93_w)
7171   AM_RANGE(0xff000000, 0xff07ffff) AM_ROM AM_REGION("bios", 0) AM_MIRROR(0x00f80000)
7272ADDRESS_MAP_END
7373
7474static ADDRESS_MAP_START(xbox_map_io, AS_IO, 32, xbox_state)
75//   AM_RANGE(0x0020, 0x0023) AM_DEVREADWRITE8("pic8259_1", pic8259_device, read, write, 0xffffffff)
76//   AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("pit8254", pit8254_device, read, write, 0xffffffff)
77//   AM_RANGE(0x00a0, 0x00a3) AM_DEVREADWRITE8("pic8259_2", pic8259_device, read, write, 0xffffffff)
78//   AM_RANGE(0x01f0, 0x01f7) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, read_cs0, write_cs0)
79//   AM_RANGE(0x0cf8, 0x0cff) AM_DEVREADWRITE("pcibus", pci_bus_legacy_device, read, write)
80//   AM_RANGE(0x4000, 0x40ff) AM_READWRITE(mediaboard_r, mediaboard_w)
81//   AM_RANGE(0x8000, 0x80ff) AM_READWRITE(dummy_r, dummy_w)
82//   AM_RANGE(0xc000, 0xc0ff) AM_READWRITE(smbus_r, smbus_w)
83//   AM_RANGE(0xff60, 0xff67) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, bmdma_r, bmdma_w)
75//  AM_RANGE(0x0020, 0x0023) AM_DEVREADWRITE8("pic8259_1", pic8259_device, read, write, 0xffffffff)
76//  AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("pit8254", pit8254_device, read, write, 0xffffffff)
77//  AM_RANGE(0x00a0, 0x00a3) AM_DEVREADWRITE8("pic8259_2", pic8259_device, read, write, 0xffffffff)
78//  AM_RANGE(0x01f0, 0x01f7) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, read_cs0, write_cs0)
79//  AM_RANGE(0x0cf8, 0x0cff) AM_DEVREADWRITE("pcibus", pci_bus_legacy_device, read, write)
80//  AM_RANGE(0x4000, 0x40ff) AM_READWRITE(mediaboard_r, mediaboard_w)
81//  AM_RANGE(0x8000, 0x80ff) AM_READWRITE(dummy_r, dummy_w)
82//  AM_RANGE(0xc000, 0xc0ff) AM_READWRITE(smbus_r, smbus_w)
83//  AM_RANGE(0xff60, 0xff67) AM_DEVREADWRITE("ide", bus_master_ide_controller_device, bmdma_r, bmdma_w)
8484ADDRESS_MAP_END
8585
8686static INPUT_PORTS_START( xbox )
r248551r248552
161161   MCFG_CPU_ADD("maincpu", PENTIUM3, 733333333/CPU_DIV) /* Wrong! family 6 model 8 stepping 10 */
162162   MCFG_CPU_PROGRAM_MAP(xbox_map)
163163   MCFG_CPU_IO_MAP(xbox_map_io)
164//   MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(chihiro_state, irq_callback)
164//  MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(chihiro_state, irq_callback)
165165
166166   /* video hardware */
167167   MCFG_SCREEN_ADD("screen", RASTER)
r248551r248552
193193   ROM_REGION( 0x200, "mcpx", 0 )
194194   ROM_LOAD( "mcpx_1_0.bin", 0, 0x200, CRC(f31429fc) SHA1(a9ecbf8896d10db81594923e485862aa3aac7b58) )
195195   ROM_LOAD( "mcpx_1_1.bin", 0, 0x200, CRC(94ce376b) SHA1(6c875f17f773aaec51eb434068bb6c657c4343c0) )
196   
196
197197   ROM_REGION( 0x80000, "bios", 0)
198    ROM_LOAD( "xbox-5530.bin", 0x000000, 0x040000, CRC(9569c4d3) SHA1(40fa73277013be3168135e1768b09623a987ff63) )
199    ROM_LOAD( "xbox-5713.bin", 0x040000, 0x040000, CRC(58fd8173) SHA1(8b7ccc4648ccd78cdb7b65cfca09621eaf2d4238) )
198   ROM_LOAD( "xbox-5530.bin", 0x000000, 0x040000, CRC(9569c4d3) SHA1(40fa73277013be3168135e1768b09623a987ff63) )
199   ROM_LOAD( "xbox-5713.bin", 0x040000, 0x040000, CRC(58fd8173) SHA1(8b7ccc4648ccd78cdb7b65cfca09621eaf2d4238) )
200200   ROM_COPY( "mcpx", 0, 0x7fe00, 0x200 )
201   
202201
202
203203   ROM_REGION( 0x1000000, "tbp", 0 ) // To Be Processed, of course
204204   ROM_LOAD( "3944_1024k.bin", 0x000000, 0x100000, CRC(32a9ecb6) SHA1(67054fc88bda94e33e86f1b19be60efec0724fb6) )
205    ROM_LOAD( "4034_1024k.bin", 0x000000, 0x100000, CRC(0d6fc88f) SHA1(ab676b712204fb1728bf89f9cd541a8f5a64ab97) )
206    ROM_LOAD( "4134_1024k.bin", 0x000000, 0x100000, CRC(49d8055a) SHA1(d46cef771a63dc8024fe36d7ab5b959087ac999f) )
207    ROM_LOAD( "4817_1024k.bin", 0x000000, 0x100000, CRC(3f30863a) SHA1(dc955bd4d3ca71e01214a49e5d0aba615270c03c) )
208    ROM_LOAD( "5101_256k.bin", 0x000000, 0x040000, CRC(e8a9224e) SHA1(5108e1025f48071c07a6823661d708c66dee97a9) )
209    ROM_LOAD( "5838_256k.bin", 0x000000, 0x040000, CRC(5be2413d) SHA1(b9489e883c650b5e5fe2f83a32237dbf74f0e9f1) )
205   ROM_LOAD( "4034_1024k.bin", 0x000000, 0x100000, CRC(0d6fc88f) SHA1(ab676b712204fb1728bf89f9cd541a8f5a64ab97) )
206   ROM_LOAD( "4134_1024k.bin", 0x000000, 0x100000, CRC(49d8055a) SHA1(d46cef771a63dc8024fe36d7ab5b959087ac999f) )
207   ROM_LOAD( "4817_1024k.bin", 0x000000, 0x100000, CRC(3f30863a) SHA1(dc955bd4d3ca71e01214a49e5d0aba615270c03c) )
208   ROM_LOAD( "5101_256k.bin", 0x000000, 0x040000, CRC(e8a9224e) SHA1(5108e1025f48071c07a6823661d708c66dee97a9) )
209   ROM_LOAD( "5838_256k.bin", 0x000000, 0x040000, CRC(5be2413d) SHA1(b9489e883c650b5e5fe2f83a32237dbf74f0e9f1) )
210210ROM_END
211211// See src/emu/gamedrv.h for details
212212// For a game:
trunk/src/mess/layout/tb303.lay
r248551r248552
1515      <bounds left="0" right="100" top="0" bottom="100" />
1616
1717   <!-- 21 LEDs: D201-D221 -->
18     
18
1919      <bezel name="x.0" element="led"><bounds x="1" y="10" width="1" height="1" /></bezel> <!-- d201 -->
2020
2121      <bezel name="x.0" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> <!-- d202 -->
trunk/src/mess/machine/amstrad.c
r248551r248552
20982098      if(m_system_type != SYSTEM_GX4000)
20992099      {
21002100         if(m_fdc)  // if FDC is present (it isn't on a 464)
2101         {   
2101         {
21022102            if ((offset & (1<<7)) == 0)
21032103            {
21042104               unsigned int b8b0 = ((offset & 0x0100) >> (8 - 1)) | (offset & 0x01);
trunk/src/tools/nltool.c
r248551r248552
273273
274274   input_t()
275275   {
276
277276   }
278277   input_t(netlist::netlist_t *netlist, const pstring &line)
279278   {
trunk/src/tools/nlwav.c
r248551r248552
9090private:
9191   struct riff_chunk_t
9292   {
93      char      group_id[4];
94      unsigned   filelen;
95      char      rifftype[4];
93      char        group_id[4];
94      unsigned    filelen;
95      char        rifftype[4];
9696   };
9797
9898   struct riff_format_t
9999   {
100      char      signature[4];
101      unsigned   fmt_length;
102      short      format_tag;
103      short      channels;
104      unsigned   sample_rate;
105      unsigned   bytes_per_second;
106      short       block_align;
107      short      bits_sample;
100      char        signature[4];
101      unsigned    fmt_length;
102      short       format_tag;
103      short       channels;
104      unsigned    sample_rate;
105      unsigned    bytes_per_second;
106      short       block_align;
107      short       bits_sample;
108108   };
109109
110110   struct riff_data_t
111111   {
112      char      signature[4];
113      unsigned   len;
112      char        signature[4];
113      unsigned    len;
114114      // data follows
115115   };
116116
r248551r248552
144144
145145void convert(nlwav_options_t &opts)
146146{
147   
148147   wav_t wo(opts.opt_out(), 48000);
149   
148
150149   FILE *FIN = std::fopen(opts.opt_inp(),"r");
151150   if (FIN==NULL)
152151      throw netlist::fatalerror_e("Error opening input file: %s", opts.opt_inp().cstr());
153   
152
154153   double dt = 1.0 / (double) wo.sample_rate();
155154   double ct = dt;
156155   //double mean = 2.4;
r248551r248552
165164   int n = 0;
166165   //short sample = 0;
167166
168   
167
169168   while(!std::feof(FIN))
170169   {
171170#if 1
r248551r248552
212211         v = 32000.0;
213212      else if (v<-32000.0)
214213         v = -32000.0;
215      sample = v;   
214      sample = v;
216215      //printf("%f %f\n", t, v);
217216#endif
218217   }
r248551r248552
270269}
271270
272271/*
273Der Daten-Abschnitt enthält die Abtastwerte:
274Offset   Länge   Inhalt   Beschreibung
27536 (0x24)   4   'data'   Header-Signatur
27640 (0x28)   4   <length>   Länge des Datenblocks, max. <Dateigröße> − 44
272Der Daten-Abschnitt enth??lt die Abtastwerte:
273Offset  L??nge  Inhalt  Beschreibung
27436 (0x24)   4   'data'  Header-Signatur
27540 (0x28)   4   <length>    L??nge des Datenblocks, max. <Dateigr????e>?????????44
277276
2780 (0x00)   char   4   'RIFF'
2794 (0x04)   unsigned   4   <Dateigröße> − 8
2808 (0x08)   char   4   'WAVE'
2770 (0x00)    char    4   'RIFF'
2784 (0x04)    unsigned    4   <Dateigr????e>?????????8
2798 (0x08)    char    4   'WAVE'
281280
282281Der fmt-Abschnitt (24 Byte) beschreibt das Format der einzelnen Abtastwerte:
283Offset   Länge   Inhalt   Beschreibung
28412 (0x0C)   4   'fmt '   Header-Signatur (folgendes Leerzeichen beachten)
28516 (0x10)   4   <fmt length>   Länge des restlichen fmt-Headers (16 Bytes)
28620 (0x14)   2   <format tag>   Datenformat der Abtastwerte (siehe separate Tabelle weiter unten)
28722 (0x16)   2   <channels>   Anzahl der Kanäle: 1 = mono, 2 = stereo; mittlerweile sind auch mehr als 2 Kanäle (z. B. für Raumklang) möglich.[2]
28824 (0x18)   4   <sample rate>   Samples pro Sekunde je Kanal (z. B. 44100)
28928 (0x1C)   4   <bytes/second>   Abtastrate · Frame-Größe
29032 (0x20)   2   <block align>   Frame-Größe = <Anzahl der Kanäle> · ((<Bits/Sample (eines Kanals)> + 7) / 8)   (Division ohne Rest)
29134 (0x22)   2   <bits/sample>   Anzahl der Datenbits pro Samplewert je Kanal (z. B. 12)
282Offset  L??nge  Inhalt  Beschreibung
28312 (0x0C)   4   'fmt '  Header-Signatur (folgendes Leerzeichen beachten)
28416 (0x10)   4   <fmt length>    L??nge des restlichen fmt-Headers (16 Bytes)
28520 (0x14)   2   <format tag>    Datenformat der Abtastwerte (siehe separate Tabelle weiter unten)
28622 (0x16)   2   <channels>  Anzahl der Kan??le: 1 = mono, 2 = stereo; mittlerweile sind auch mehr als 2 Kan??le (z. B. f??r Raumklang) m??glich.[2]
28724 (0x18)   4   <sample rate>   Samples pro Sekunde je Kanal (z. B. 44100)
28828 (0x1C)   4   <bytes/second>  Abtastrate????????Frame-Gr????e
28932 (0x20)   2   <block align>   Frame-Gr????e = <Anzahl der Kan??le>????????((<Bits/Sample (eines Kanals)>???+???7)???/???8)   (Division ohne Rest)
29034 (0x22)   2   <bits/sample>   Anzahl der Datenbits pro Samplewert je Kanal (z. B. 12)
292291*/
trunk/src/version.c
r248551r248552
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.163"
11#define BARE_BUILD_VERSION "0.164"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team