Previous 199869 Revisions Next

r32946 Saturday 25th October, 2014 at 01:44:22 UTC by David Viens
Support for the BEXT instruction (part2)

The BEXT instruction is needed for the Unisonic Champion driver which I'm building.
The Intellivision doesn't need it since its EBCA0, EBCA1,EBCA2 and EBCA3 pins are grounded.
The method used was a suggestion from RB
[hash]astrocde.xml
[src/emu/bus]bus.mak
[src/emu/bus/astrocde]rom.c rom.h slot.c slot.h
[src/emu/cpu/cp1610]cp1610.c cp1610.h
[src/emu/cpu/powerpc]ppc.h ppccom.c
[src/mame/drivers]cobra.c firebeat.c hornet.c vamphalf.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]astrocde.c ti85.c
[src/mess/includes]ti85.h
[src/mess/machine]ti85.c

trunk/hash/astrocde.xml
r241457r241458
55   <software name="280zzap">
66      <description>280 Zzzap / Dodgem</description>
77      <year>1978</year>
8      <publisher>Bally</publisher>
8      <publisher>Bally Mfg. Corp.</publisher>
99      <part name="cart" interface="astrocde_cart">
1010         <dataarea name="rom" size="2048">
1111            <rom name="280zzap.bin" size="2048" crc="e4d285e5" sha1="0de670d6f78e3011e84fefc65f70544cdad3320e" offset="0" />
r241457r241458
2828      <description>ADS System Monitor (Prototype)</description>
2929<!-- <note>This prototype was found in the collection of Arcadian editor Bob Fabris.</note> -->
3030      <year>19??</year>
31      <publisher>&lt;unknown&gt;</publisher>
31      <publisher>Larry Hanson</publisher>
3232      <part name="cart" interface="astrocde_cart">
3333         <dataarea name="rom" size="2048">
3434            <rom name="adssm.bin" size="2048" crc="b8d4df61" sha1="93ffa31d308e62a1f0b09f20489bd620a08de37b" offset="0" />
r241457r241458
3939   <software name="amazmaze">
4040      <description>Amazing Maze / Tic-Tac-Toe</description>
4141      <year>1979</year>
42      <publisher>Bally</publisher>
42      <publisher>Bally Mfg. Corp.</publisher>
4343      <part name="cart" interface="astrocde_cart">
4444         <dataarea name="rom" size="2048">
4545            <rom name="amazmaze.bin" size="2048" crc="cd57c485" sha1="8c833f077830db847caad91a3f040ac7ddcd33f8" offset="0" />
r241457r241458
5050   <software name="artiduel">
5151      <description>Artillery Duel</description>
5252      <year>1982</year>
53      <publisher>Astrocade</publisher>
53      <publisher>Astrocade Inc.</publisher>
5454      <part name="cart" interface="astrocde_cart">
5555         <dataarea name="rom" size="4096">
5656            <rom name="artiduel.bin" size="4096" crc="4f372019" sha1="24f6accc59301773e7471a831a5e3312c61694b0" offset="0" />
r241457r241458
5858      </part>
5959   </software>
6060
61   <software name="artiduelp1" cloneof="artiduel">
62      <description>Artillery Duel (Prototype 19820523)</description>
63      <year>1982</year>
64      <publisher>Astrocade</publisher>
65      <part name="cart" interface="astrocde_cart">
66         <dataarea name="rom" size="4096">
67            <rom name="artillery duel (5-23) (1982)(astrocade inc.)(proto).bin" size="4096" crc="2227f488" sha1="e8b9a13b5b712ff5e2269813271777956d69be3c" offset="0" />
68         </dataarea>
69      </part>
70   </software>
71
72   <software name="artiduelp2" cloneof="artiduel">
73      <description>Artillery Duel (Prototype Alt)</description>
74      <year>1982</year>
75      <publisher>Astrocade</publisher>
76      <part name="cart" interface="astrocde_cart">
77         <dataarea name="rom" size="4096">
78            <rom name="artillery duel (1982)(astrocade inc.)(proto).bin" size="4096" crc="53f75720" sha1="376027b2974aa73e523dc0c139f723168a379ece" offset="0" />
79         </dataarea>
80      </part>
81   </software>
82
83   <software name="artiduelp3" cloneof="artiduel">
84      <description>Artillery Duel (Prototype Alt 2)</description>
85      <year>1982</year>
86      <publisher>Astrocade</publisher>
87      <part name="cart" interface="astrocde_cart">
88         <dataarea name="rom" size="2048">
89            <rom name="artillery duel (1982)(astrocade inc.)(proto)[a].bin" size="2048" crc="2521a6ec" sha1="4b02162dd5503e08479929be36de5a6648410310" offset="0" />
90         </dataarea>
91      </part>
92   </software>
93
9461   <software name="artjello" supported="no">
9562      <description>Artillery Duel / O-Jello</description>
9663<!-- <note>This is one of several BASIC conversions sold by Mike White.  It requires cartridge swapping.</note> -->
r241457r241458
10673   <software name="astrobat">
10774      <description>Astro Battle</description>
10875      <year>1979</year>
109      <publisher>Bally</publisher>
76      <publisher>Bally Mfg. Corp.</publisher>
11077      <part name="cart" interface="astrocde_cart">
11178         <dataarea name="rom" size="4096">
11279            <rom name="astrobat.bin" size="4096" crc="0b5298bc" sha1="cdf7a2a8608c3e90d0cc8a4b751276b76de72f8c" offset="0" />
r241457r241458
11885      <description>Bally BASIC</description>
11986<!-- <note>The original release of BASIC used an external 300 baud interface (not emulated) to load and save programs.</note> -->
12087      <year>1978</year>
121      <publisher>Bally</publisher>
88      <publisher>Bally Mfg. Corp.</publisher>
12289      <part name="cart" interface="astrocde_cart">
12390         <dataarea name="rom" size="4096">
12491            <rom name="bbasic.bin" size="4096" crc="90e276aa" sha1="abb85bc19419a1d81c698884f81a53d85806885d" offset="0" />
r241457r241458
13097      <description>Bally BASIC (Astrovision)</description>
13198<!-- <note>The updated release of BASIC used an internal 2000 baud interface (not emulated) to load and save programs.</note> -->
13299      <year>1981</year>
133      <publisher>Astrovision</publisher>
100      <publisher>Astrovision Inc.</publisher>
134101      <part name="cart" interface="astrocde_cart">
135102         <dataarea name="rom" size="4096">
136103            <rom name="astrobas.bin" size="4096" crc="70514687" sha1="a2ac8995a6217b7190aa9b18f49261c0ed3c6b5a" offset="0" />
r241457r241458
141108   <software name="bbasdemo">
142109      <description>Bally BASIC Demo</description>
143110      <year>1978</year>
144      <publisher>Bally</publisher>
111      <publisher>Bally Mfg. Corp.</publisher>
145112      <part name="cart" interface="astrocde_cart">
146113         <dataarea name="rom" size="8192">
147114            <rom name="bbasdemo.bin" size="8192" crc="007e70d5" sha1="6ed1f49e6581ecea5328e3c5f99026afd7f1f7e4" offset="0" />
r241457r241458
175142
176143   <software name="colorbas">
177144      <description>Bally Color BASIC (Prototype)</description>
178<!-- <note>This prototype was sent to Arcadian editor Bob Fabris from Jay Fenton. Support for the 300 baud interface isn't fully enabled in this version.</note> -->
145<!-- <note>This prototype comes from the collection of Arcadian editor Bob Fabris. While the name Color BASIC was sometimes used to refer to what eventually became Hot Rod Bally BASIC by Jay Fenton (eventually sold on tape in limited quantities), this appears to be an unrelated modification of Bally BASIC by Larry Hanson. Support for the 300 baud interface isn't fully enabled in this version.</note> -->
179146      <year>19??</year>
180      <publisher>Bally</publisher>
147      <publisher>Larry Hanson and Bally Mfg. Corp.</publisher>
181148      <part name="cart" interface="astrocde_cart">
182149         <dataarea name="rom" size="4096">
183150            <rom name="colorbas.bin" size="4096" crc="e1c30ede" sha1="7b5fa4cd585081c5d51127d32d02a33ed44b5843" offset="0" />
r241457r241458
188155   <software name="ballypin">
189156      <description>Bally Pin</description>
190157      <year>1979</year>
191      <publisher>Bally</publisher>
158      <publisher>Bally Mfg. Corp.</publisher>
192159      <part name="cart" interface="astrocde_cart">
193160         <dataarea name="rom" size="4096">
194161            <rom name="ballypin.bin" size="4096" crc="3f431613" sha1="05b680777aa9639620c790f0590d96416d49bf94" offset="0" />
r241457r241458
211178   <software name="biorhy">
212179      <description>BioRhythm</description>
213180      <year>1981</year>
214      <publisher>Astrovision</publisher>
181      <publisher>Astrovision Inc.</publisher>
215182      <part name="cart" interface="astrocde_cart">
216183         <dataarea name="rom" size="4096">
217184            <rom name="biorhy.bin" size="4096" crc="fc4bd27c" sha1="1ba84a04ea5d7d87c213d978fecc188a4a8517a6" offset="0" />
r241457r241458
222189   <software name="blckjack">
223190      <description>Black Jack / Acey Deucey / Poker</description>
224191      <year>1979</year>
225      <publisher>Bally</publisher>
192      <publisher>Bally Mfg. Corp.</publisher>
226193      <part name="cart" interface="astrocde_cart">
227194         <dataarea name="rom" size="4096">
228195            <rom name="blckjack.bin" size="4096" crc="78d45a11" sha1="7b92e3ad161e31926a730780d1f28015310dd7d7" offset="0" />
r241457r241458
230197      </part>
231198   </software>
232199
233   <software name="brb10p" cloneof="brb10">
234      <description>Blue RAM BASIC 1.0 (Prototype)</description>
235      <!-- <note>Requires RAM expansion</note> -->
236      <year>1980</year>
237      <publisher>Perkins Engineering</publisher>
238      <part name="cart" interface="astrocde_cart">
239         <dataarea name="rom" size="4096">
240            <rom name="blue ram basic 1.0 (1980)(perkins engineering)(proto)[not playable].bin" size="4096" crc="2fa59f1e" sha1="ef27b8863b05afe58259fdf5755e919699485e4f" offset="0" />
241         </dataarea>
242      </part>
243   </software>
244
245   <software name="brb10">
200   <software name="brbsic10">
246201      <description>Blue RAM BASIC 1.0</description>
247202      <!-- <note>Requires RAM expansion</note> -->
248203      <year>1980</year>
r241457r241458
254209      </part>
255210   </software>
256211
257   <software name="brb11">
212   <software name="brbsic11">
258213      <description>Blue RAM BASIC 1.1</description>
259214      <!-- <note>Requires RAM expansion</note> -->
260215      <year>1981</year>
r241457r241458
292247   <software name="bowling">
293248      <description>Bowling (Prototype)</description>
294249      <year>198?</year>
295      <publisher>Astrocade</publisher>
250      <publisher>Astrocade Inc.</publisher>
296251      <part name="cart" interface="astrocde_cart">
297252         <dataarea name="rom" size="4096">
298253            <rom name="bowling.bin" size="4096" crc="1f8bc8ba" sha1="de27100803a414989d538ca34fc1b3e122dfac78" offset="0" />
r241457r241458
303258   <software name="brckyard">
304259      <description>Brickyard / Clowns</description>
305260      <year>1978</year>
306      <publisher>Bally</publisher>
261      <publisher>Bally Mfg. Corp.</publisher>
307262      <part name="cart" interface="astrocde_cart">
308263         <dataarea name="rom" size="4096">
309264            <rom name="brckyard.bin" size="4096" crc="28f9e502" sha1="4c1a9efcd4435f6a79dc2212c4d0d17ea753809c" offset="0" />
r241457r241458
337292   <software name="checkers">
338293      <description>Checkers (Prototype)</description>
339294      <year>19??</year>
340      <publisher>Bally</publisher>
295      <publisher>Bally Mfg. Corp.</publisher>
341296      <part name="cart" interface="astrocde_cart">
342297         <dataarea name="rom" size="2048">
343298            <rom name="checkers.bin" size="2048" crc="757bab8f" sha1="9ef927e88e3f799276966b569c2402f6b25be416" offset="0" />
r241457r241458
384339   <software name="colbook">
385340      <description>Coloring Book (Prototype)</description>
386341      <year>198?</year>
387      <publisher>Astrocade</publisher>
342      <publisher>Astrocade Inc.</publisher>
388343      <part name="cart" interface="astrocde_cart">
389344         <dataarea name="rom" size="8192">
390345            <rom name="colbook.bin" size="8192" crc="14f36aba" sha1="41eaaa061ed47996219b70bc0ed7d6a19c4b3c28" offset="0" />
r241457r241458
394349
395350   <software name="conan">
396351      <description>Conan The Barbarian!</description>
397<!-- <note>While Astrocade never completed Conan, it was eventually published in incomplete form by Dave Carson Software, which added its own copyright screen.</note> -->
352<!-- <note>While Astrocade Inc. never completed Conan, it was eventually published in incomplete form by Dave Carson Software, which added its own copyright screen.</note> -->
398353      <year>1985</year>
399      <publisher>Astrocade and Dave Carson Software</publisher>
354      <publisher>Astrocade Inc. and Dave Carson Software</publisher>
400355      <part name="cart" interface="astrocde_cart">
401356         <dataarea name="rom" size="8192">
402357            <rom name="conan.bin" size="8192" crc="8a6adbfe" sha1="8b0d3125b805d57b9958b0e7a4f0e9d1a70f6353" offset="0" />
r241457r241458
407362   <software name="conanp" cloneof="conan">
408363      <description>Conan The Barbarian! (Prototype)</description>
409364      <year>1982</year>
410      <publisher>Astrocade</publisher>
365      <publisher>Astrocade Inc.</publisher>
411366      <part name="cart" interface="astrocde_cart">
412367         <dataarea name="rom" size="8192">
413368            <rom name="conanp.bin" size="8192" crc="15b1afea" sha1="bc4f757271fca69e0de3973f43d363c4474e2fb7" offset="0" />
r241457r241458
430385   <software name="cosmicrd">
431386      <description>Cosmic Raiders</description>
432387      <year>1983</year>
433      <publisher>Astrocade</publisher>
388      <publisher>Astrocade Inc.</publisher>
434389      <part name="cart" interface="astrocde_cart">
435390         <dataarea name="rom" size="8192">
436391            <rom name="cosmicrd.bin" size="8192" crc="2a77b3fb" sha1="09ae145e3dbfd132f5130a0cbb508f4fbcf35bee" offset="0" />
r241457r241458
441396   <software name="cosmicrda" cloneof="cosmicrd">
442397      <description>Cosmic Raiders (Proto, Alt)</description>
443398      <year>198?</year>
444      <publisher>Astrocade</publisher>
399      <publisher>Astrocade Inc.</publisher>
445400      <part name="cart" interface="astrocde_cart">
446401         <dataarea name="rom" size="8192">
447402            <rom name="cosmicra.bin" size="8192" crc="869b692e" sha1="b71b81eeaf10b59efb1b51d88b1e758305d5f1e4" offset="0" />
r241457r241458
452407   <software name="cosmicrdb" cloneof="cosmicrd">
453408      <description>Cosmic Raiders (Proto, Alt 2)</description>
454409      <year>198?</year>
455      <publisher>Astrocade</publisher>
410      <publisher>Astrocade Inc.</publisher>
456411      <part name="cart" interface="astrocde_cart">
457412         <dataarea name="rom" size="8192">
458413            <rom name="cosmica2.bin" size="8192" crc="37670f78" sha1="30044130dd3b41295351fa3905d53e26e52b3745" offset="0" />
r241457r241458
464419      <description>Cosmic Raiders (Proto v3.5)</description>
465420<!-- <note>An identical ROM was dumped from a cart labeled version 2.8.</note> -->
466421      <year>198?</year>
467      <publisher>Astrocade</publisher>
422      <publisher>Astrocade Inc.</publisher>
468423      <part name="cart" interface="astrocde_cart">
469424         <dataarea name="rom" size="8192">
470425            <rom name="cosmic35.bin" size="8192" crc="e3d723a0" sha1="337cdffe2260dc6d36d674fa35047cb5a3598bf9" offset="0" />
r241457r241458
475430   <software name="cosmicrd36" cloneof="cosmicrd">
476431      <description>Cosmic Raiders (Proto v3.6)</description>
477432      <year>198?</year>
478      <publisher>Astrocade</publisher>
433      <publisher>Astrocade Inc.</publisher>
479434      <part name="cart" interface="astrocde_cart">
480435         <dataarea name="rom" size="8192">
481436            <rom name="cosmic36.bin" size="8192" crc="00b6fe88" sha1="5a3772b8524361b174c761ef759659b4a63166fa" offset="0" />
r241457r241458
483438      </part>
484439   </software>
485440
486   <software name="cclimber">
487      <description>Crazy Climber</description>
488      <year>2011</year>
489      <publisher>Riff Raff Games</publisher>
490      <part name="cart" interface="astrocde_cart">
491         <dataarea name="rom" size="8192">
492            <rom name="crazy climber (2011)(riff raff games)[ccv054f].bin" size="8187" crc="bf864c44" sha1="3fc71a3061ddc39788920b27ce11d0ea545e3da6" offset="0" />
493         </dataarea>
494      </part>
495   </software>
496
497441   <software name="dealdemo">
498442      <description>Dealer Demo</description>
499443      <year>1978</year>
500      <publisher>Bally</publisher>
444      <publisher>Bally Mfg. Corp.</publisher>
501445      <part name="cart" interface="astrocde_cart">
502446         <dataarea name="rom" size="4096">
503447            <rom name="dealdemo.bin" size="4096" crc="16b77b44" sha1="302ad18ea17b12a474ebbba1a882d8aad8cf5e94" offset="0" />
r241457r241458
508452   <software name="dogpatch">
509453      <description>Dogpatch</description>
510454      <year>1980</year>
511      <publisher>Bally</publisher>
455      <publisher>Bally Mfg. Corp.</publisher>
512456      <part name="cart" interface="astrocde_cart">
513457         <dataarea name="rom" size="2048">
514458            <rom name="dogpatch.bin" size="2048" crc="77bed6ba" sha1="263e6372392bc37a2228eb455d1477dcd41d9104" offset="0" />
r241457r241458
528472   </software>
529473
530474   <software name="fawn">
531      <description>Fawn Dungeon (Prototype, first version)</description>
475      <description>Fawn Dungeon (Prototype)</description>
532476<!-- <note>Barry McCleave sent two prototype versions of this game to Arcadian editor Bob Fabris, but it was never completed.</note> -->
533477      <year>1981</year>
534478      <publisher>Barry McCleave</publisher>
r241457r241458
540484   </software>
541485
542486   <software name="fawna" cloneof="fawn">
543      <description>Fawn Dungeon (Prototype, second version)</description>
487      <description>Fawn Dungeon (Prototype, Alt)</description>
544488<!-- <note>Barry McCleave sent two prototype versions of this game to Arcadian editor Bob Fabris, but it was never completed.</note> -->
545489      <year>1981</year>
546490      <publisher>Barry McCleave</publisher>
r241457r241458
566510   <software name="football">
567511      <description>Football</description>
568512      <year>1978</year>
569      <publisher>Bally</publisher>
513      <publisher>Bally Mfg. Corp.</publisher>
570514      <part name="cart" interface="astrocde_cart">
571515         <dataarea name="rom" size="4096">
572516            <rom name="football.bin" size="4096" crc="fc8998a9" sha1="1d07b45162fab5497fe0a3d4ccb1b33bfd47177a" offset="0" />
r241457r241458
575519   </software>
576520
577521   <software name="ziggyjx">
578      <description>Fun With Vectors - Ziggy (Prototype JX label)</description>
522      <description>Fun With Vectors - Ziggy (JX label) (Prototype)</description>
579523<!-- <note>This demo comes from a collection of old ROMs released by Richard Degler.</note> -->
580524      <year>1985</year>
581525      <publisher>Richard Degler</publisher>
r241457r241458
587531   </software>
588532
589533   <software name="ziggymo">
590      <description>Fun With Vectors - Ziggy (Prototype MO label)</description>
534      <description>Fun With Vectors - Ziggy (MO label) (Prototype)</description>
591535<!-- <note>This demo comes from a collection of old ROMs released by Richard Degler.</note> -->
592536      <year>1985</year>
593537      <publisher>Richard Degler</publisher>
r241457r241458
601545   <software name="galactic">
602546      <description>Galactic Invasion</description>
603547      <year>1981</year>
604      <publisher>Astrovision</publisher>
548      <publisher>Astrovision Inc.</publisher>
605549      <part name="cart" interface="astrocde_cart">
606550         <dataarea name="rom" size="4096">
607551            <rom name="galactic.bin" size="4096" crc="ba558eb7" sha1="939857d621715b831d558bcb2fd2f0f9e9b37676" offset="0" />
r241457r241458
612556   <software name="galaxian">
613557      <description>Galaxian</description>
614558      <year>1981</year>
615      <publisher>Astrovision</publisher>
559      <publisher>Astrovision Inc.</publisher>
616560      <part name="cart" interface="astrocde_cart">
617561         <dataarea name="rom" size="4096">
618562            <rom name="galaxian.bin" size="4096" crc="d75e9672" sha1="fb13e40c9ebadcb68beb7294a732ecf1b2f2ec30" offset="0" />
r241457r241458
620564      </part>
621565   </software>
622566
623   <software name="golddig">
624      <description>Golddigger, Goldrush (Prototype, 19840811))</description>
625      <year>1984</year>
626      <publisher>Dave Carson and Ken Lill</publisher>
627      <part name="cart" interface="astrocde_cart">
628         <dataarea name="rom" size="2048">
629            <rom name="golddigger, goldrush (8-11-84) (1984)(dave carson and ken lill)(proto).bin" size="2048" crc="20755476" sha1="3537ded59d46a539e05a5f178a409346f1673bd9" offset="0" />
630         </dataarea>
631      </part>
632   </software>
633
634   <software name="golddiga" cloneof="golddig">
635      <description>Golddigger, Goldrush (Prototype Alt)</description>
636      <year>198?</year>
637      <publisher>Dave Carson and Ken Lill</publisher>
638      <part name="cart" interface="astrocde_cart">
639         <dataarea name="rom" size="2048">
640            <rom name="golddigger, goldrush (198x)(dave carson and ken lill)(proto).bin" size="2048" crc="994661a1" sha1="ca71326eb5cd243d2240804bb314235d96b45380" offset="0" />
641         </dataarea>
642      </part>
643   </software>
644
645   <software name="golddigb" cloneof="golddig">
646      <description>Golddigger, Goldrush (Prototype Alt 2)</description>
647      <year>198?</year>
648      <publisher>Dave Carson and Ken Lill</publisher>
649      <part name="cart" interface="astrocde_cart">
650         <dataarea name="rom" size="2048">
651            <rom name="golddigger, goldrush (198x)(dave carson and ken lill)(proto)[a].bin" size="2048" crc="face3b05" sha1="a54d2eb5f304fb83ad125560b0e555b0d1beb9ae" offset="0" />
652         </dataarea>
653      </part>
654   </software>
655
656567   <software name="grandprx">
657568      <description>Grand Prix</description>
658569      <year>1981</year>
659      <publisher>Astrovision</publisher>
570      <publisher>Astrovision Inc.</publisher>
660571      <part name="cart" interface="astrocde_cart">
661572         <dataarea name="rom" size="4096">
662573            <rom name="grandprx.bin" size="4096" crc="7b3b7b70" sha1="fd133dc402b6ecbcc718ffb895a16e07979ab329" offset="0" />
r241457r241458
725636   <software name="lttrmtch">
726637      <description>Letter Match / Spell 'n Score / Crosswords</description>
727638      <year>1978</year>
728      <publisher>Bally</publisher>
639      <publisher>Bally Mfg. Corp.</publisher>
729640      <part name="cart" interface="astrocde_cart">
730641         <dataarea name="rom" size="4096">
731642            <rom name="lttrmtch.bin" size="4096" crc="2cf68f93" sha1="266f6978b8f9e6bad36dc21031193ca93cd55be4" offset="0" />
r241457r241458
767678      </part>
768679   </software>
769680
770   <software name="mazemanp" cloneof="mazeman">
771      <description>Mazeman (Prototype)</description>
772      <year>1984</year>
773      <publisher>Dave Carson Software</publisher>
774      <part name="cart" interface="astrocde_cart">
775         <dataarea name="rom" size="4096">
776            <rom name="mazeman (1984)(dave carson software)(proto).bin" size="4096" crc="af649678" sha1="f296ebdfe1a8c4f1dacf06914be1918b92f4d2b3" offset="0" />
777         </dataarea>
778      </part>
779   </software>
780
781681   <software name="matk">
782682      <description>Missile Attack</description>
783683      <!-- <note>Mike White sold a version of ICBM Attack hacked to work with a regular controller.</note> -->
r241457r241458
803703
804704   <software name="muncher">
805705      <description>Muncher</description>
806      <!-- <note>This Pac-Man clone was originally developed by Astrocade, but never released by them due to legal challenges.  Phillip Harris and Alternative Engineering took the prototype, changed the name to Muncher, and manufactured some for sale through the Arcadian newsletter.  More copies were later sold by Esoterica.</note> -->
706      <!-- <note>This Pac-Man clone was originally developed by Astrocade Inc., but never released by them due to legal challenges.  Phillip Harris and Alternative Engineering took the prototype, changed the name to Muncher, and manufactured some for sale through the Arcadian newsletter.  More copies were later sold by Esoterica.</note> -->
807707      <year>1983</year>
808      <publisher>Astrocade, Phillip Harris, and Alternative Engineering</publisher>
708      <publisher>Astrocade Inc., Phillip Harris, and Alternative Engineering</publisher>
809709      <part name="cart" interface="astrocde_cart">
810710         <dataarea name="rom" size="8192">
811711            <rom name="muncher.bin" size="8192" crc="e4726657" sha1="02f37ded48b1fb9ba0a2d7e45f5b0a85eaecb1c8" offset="0" />
r241457r241458
815715
816716   <software name="musicmak">
817717      <description>Music Maker</description>
818<!-- <note>While Astrocade never released Music Maker, it was eventually published by Dave Carson Software, which added its own copyright screen.</note> -->
718<!-- <note>While Astrocade Inc. never released Music Maker, it was eventually published by Dave Carson Software, which added its own copyright screen.</note> -->
819719      <year>1985</year>
820      <publisher>Astrocade and Dave Carson Software</publisher>
720      <publisher>Astrocade Inc. and Dave Carson Software</publisher>
821721      <part name="cart" interface="astrocde_cart">
822722         <dataarea name="rom" size="8192">
823723            <rom name="musicmak.bin" size="8192" crc="b242ef84" sha1="8101424ebbc2a31d7e750b6d00f01e657fd97cf8" offset="0" />
r241457r241458
826726   </software>
827727
828728   <software name="musicmakp" cloneof="musicmak">
829      <description>Music Maker (Prototype v3.7)</description>
729      <description>Music Maker v3.7 (Prototype)</description>
830730      <year>1982</year>
831      <publisher>Astrocade</publisher>
731      <publisher>Astrocade Inc.</publisher>
832732      <part name="cart" interface="astrocde_cart">
833733         <dataarea name="rom" size="8192">
834734            <rom name="musicmap.bin" size="8192" crc="a76828d0" sha1="924cecf006f91bf49f2bcc1e14c55646a0ee93ff" offset="0" />
r241457r241458
836736      </part>
837737   </software>
838738
839   <software name="musicmakp2" cloneof="musicmak">
840      <description>Music Maker (Prototype Alt)</description>
841      <year>1982</year>
842      <publisher>Astrocade</publisher>
739   <software name="nodie">
740      <description>No-Die!</description>
741<!-- <note>Dave Carson detailed how to hack Muncher to give infinite lives in the Arcadian newsletter.  Mike White sold this hacked version as No-Die!.</note> -->
742      <year>1984</year>
743      <publisher>Astrocade Inc., Dave Carson, and Mike White</publisher>
843744      <part name="cart" interface="astrocde_cart">
844745         <dataarea name="rom" size="8192">
845            <rom name="music maker (1981)(astrocade inc.)(proto).bin" size="7376" crc="cc97a150" sha1="6a35509709497151f4f810a958fc5abf3852afc6" offset="0" />
746            <rom name="nodie.bin" size="8192" crc="784b256a" sha1="8dd34f2428a65ac590a26b25904a96e6f04e01d2" offset="0" />
846747         </dataarea>
847748      </part>
848749   </software>
849750
850   <software name="nodie">
851      <description>No-Die!</description>
852<!-- <note>Dave Carson detailed how to hack Muncher to give infinite lives in the Arcadian newsletter.  Mike White sold this hacked version as No-Die!.</note> -->
853      <year>1984</year>
854      <publisher>Astrocade, Dave Carson, and Mike White</publisher>
751   <software name="pacman">
752      <description>Pac-Man (Prototype)</description>
753<!-- <note>This prototype was eventually renamed Muncher and sold through the Arcadian newsletter.</note> -->
754      <year>198?</year>
755      <publisher>Astrocade Inc.</publisher>
855756      <part name="cart" interface="astrocde_cart">
856757         <dataarea name="rom" size="8192">
857            <rom name="nodie.bin" size="8192" crc="784b256a" sha1="8dd34f2428a65ac590a26b25904a96e6f04e01d2" offset="0" />
758            <rom name="pacman.bin" size="8192" crc="17363546" sha1="3d0e2b3fc4adfd0297a609bd78eb8b557414ea23" offset="0" />
858759         </dataarea>
859760      </part>
860761   </software>
r241457r241458
883784      </part>
884785   </software>
885786
886   <software name="pacman">
887      <description>Pac-Man (Prototype)</description>
888<!-- <note>This prototype was eventually renamed Muncher and sold through the Arcadian newsletter.</note> -->
889      <year>198?</year>
890      <publisher>Astrocade</publisher>
891      <part name="cart" interface="astrocde_cart">
892         <dataarea name="rom" size="8192">
893            <rom name="pacman.bin" size="8192" crc="17363546" sha1="3d0e2b3fc4adfd0297a609bd78eb8b557414ea23" offset="0" />
894         </dataarea>
895      </part>
896   </software>
897
898   <software name="pacmana" cloneof="pacman">
899      <description>Pac-Man (Prototype Alt)</description>
900      <year>198?</year>
901      <publisher>Astrocade</publisher>
902      <part name="cart" interface="astrocde_cart">
903         <dataarea name="rom" size="8192">
904            <rom name="pac-man (198x)(astrocade inc.)(proto)[a].bin" size="8192" crc="ca3a67dd" sha1="fc5cd6ec56e0f2d3acf7acfd4dbc560bdf63c768" offset="0" />
905         </dataarea>
906      </part>
907   </software>
908
909   <software name="pacmaze">
910      <description>Pacmaze (Prototype)</description>
911      <year>198?</year>
912      <publisher>Dave Carson Software</publisher>
913      <part name="cart" interface="astrocde_cart">
914         <dataarea name="rom" size="4096">
915            <rom name="pacmaze (198x)(dave carson software)(proto).bin" size="4096" crc="cff3a6cc" sha1="f8d1b6eb9c4e148b76a46bda7ca3e976abeba056" offset="0" />
916         </dataarea>
917      </part>
918   </software>
919
920787   <software name="paperbck">
921788      <description>Paperback Writer (Prototype)</description>
922789      <year>1986</year>
r241457r241458
931798   <software name="pirate">
932799      <description>Pirate's Chase</description>
933800      <year>1982</year>
934      <publisher>Astrocade</publisher>
801      <publisher>Astrocade Inc.</publisher>
935802      <part name="cart" interface="astrocde_cart">
936803         <dataarea name="rom" size="4096">
937804            <rom name="pirate.bin" size="4096" crc="7b1b206a" sha1="3ad79a4381441c7f28479ad6b50c9105ca1ba7e4" offset="0" />
r241457r241458
959826
960827   <software name="rainbow2">
961828      <description>Rainbow v2 (Prototype)</description>
962<!-- <note>This prototype was found in the collection of Arcadian editor Bob Fabris. The full name of the author is unknown, and the first version has not been found.</note> -->
829<!-- <note>This prototype was found in the collection of Arcadian editor Bob Fabris. The first version has not been found.</note> -->
963830      <year>19??</year>
964      <publisher>Hanson</publisher>
831      <publisher>Larry Hanson</publisher>
965832      <part name="cart" interface="astrocde_cart">
966833         <dataarea name="rom" size="2048">
967834            <rom name="rainbow2.bin" size="2048" crc="3883484a" sha1="888d0de155b53606466393560119ea355edd11ce" offset="0" />
r241457r241458
972839   <software name="redbaron">
973840      <description>Red Baron / Panzer Attack</description>
974841      <year>1978</year>
975      <publisher>Bally</publisher>
842      <publisher>Bally Mfg. Corp.</publisher>
976843      <part name="cart" interface="astrocde_cart">
977844         <dataarea name="rom" size="4096">
978845            <rom name="redbaron.bin" size="4096" crc="a1c7e129" sha1="e0602c7485f511d6aa29d669967b101de79ddb15" offset="0" />
r241457r241458
1006873   <software name="seawolf">
1007874      <description>Seawolf / Missile</description>
1008875      <year>1978</year>
1009      <publisher>Bally</publisher>
876      <publisher>Bally Mfg. Corp.</publisher>
1010877      <part name="cart" interface="astrocde_cart">
1011878         <dataarea name="rom" size="2048">
1012879            <rom name="seawolf.bin" size="2048" crc="a021735e" sha1="4c2ca46ab5a00dc2eb252ee900b2760b758a2162" offset="0" />
r241457r241458
1075942   <software name="soccerp">
1076943      <description>Soccer (Prototype)</description>
1077944      <year>198?</year>
1078      <publisher>Astrocade</publisher>
945      <publisher>Astrocade Inc.</publisher>
1079946      <part name="cart" interface="astrocde_cart">
1080947         <dataarea name="rom" size="8192">
1081948            <rom name="soccerp.bin" size="8192" crc="7de08d9a" sha1="955b138b4db95e8a7c35ff958724440bd75d5fc2" offset="0" />
r241457r241458
1087954      <description>Soccer (Prototype, Alt)</description>
1088955<!-- <note>Dumped from a cart labeled 'Soccer / Dribbling'.</note> -->
1089956      <year>198?</year>
1090      <publisher>Astrocade</publisher>
957      <publisher>Astrocade Inc.</publisher>
1091958      <part name="cart" interface="astrocde_cart">
1092959         <dataarea name="rom" size="4096">
1093960            <rom name="soccera.bin" size="4096" crc="fd633ca9" sha1="39ac51f18eb6ceb8e1f766f4d13d4c0ed7af1f85" offset="0" />
r241457r241458
1099966      <description>Soccer (Prototype, Alt 2)</description>
1100967<!-- <note>Dumped from a cart labeled 'Soccer 8-5'.</note> -->
1101968      <year>198?</year>
1102      <publisher>Astrocade</publisher>
969      <publisher>Astrocade Inc.</publisher>
1103970      <part name="cart" interface="astrocde_cart">
1104971         <dataarea name="rom" size="8192">
1105972            <rom name="soccera2.bin" size="8192" crc="7c2858dd" sha1="a6fd25d85124e4c3f005f25c067a0b60a7a617c3" offset="0" />
r241457r241458
1110977   <software name="soccera3">
1111978      <description>Soccer (Prototype, Alt 3)</description>
1112979      <year>198?</year>
1113      <publisher>Astrocade</publisher>
980      <publisher>Astrocade Inc.</publisher>
1114981      <part name="cart" interface="astrocde_cart">
1115982         <dataarea name="rom" size="8192">
1116983            <rom name="soccera3.bin" size="8192" crc="5cb41426" sha1="a6cee6a0bc7a7bfe506b1089b431629e8b57dc04" offset="0" />
r241457r241458
1121988   <software name="soccera4">
1122989      <description>Soccer (Prototype, Alt 4)</description>
1123990      <year>198?</year>
1124      <publisher>Astrocade</publisher>
991      <publisher>Astrocade Inc.</publisher>
1125992      <part name="cart" interface="astrocde_cart">
1126993         <dataarea name="rom" size="8192">
1127994            <rom name="soccera4.bin" size="8192" crc="4f5e93d5" sha1="5ea2b708df06b09abd63b58e03229efecb98d464" offset="0" />
r241457r241458
1132999   <software name="solarcnq">
11331000      <description>Solar Conqueror</description>
11341001      <year>1983</year>
1135      <publisher>Astrocade</publisher>
1002      <publisher>Astrocade Inc.</publisher>
11361003      <part name="cart" interface="astrocde_cart">
11371004         <dataarea name="rom" size="8192">
11381005            <rom name="scnquer.bin" size="8192" crc="d15ce025" sha1="3185285687a1b4f643329bea94cba398e1b3ed4b" offset="0" />
r241457r241458
11431010   <software name="solarcnqp28" cloneof="solarcnq">
11441011      <description>Solar Conqueror (Prototype v2.8)</description>
11451012      <year>198?</year>
1146      <publisher>Astrocade</publisher>
1013      <publisher>Astrocade Inc.</publisher>
11471014      <part name="cart" interface="astrocde_cart">
11481015         <dataarea name="rom" size="8192">
11491016            <rom name="scquer28.bin" size="8192" crc="0709b022" sha1="90900ec2c1fb9d476db22fd479400a6315230f9f" offset="0" />
r241457r241458
11541021   <software name="solarcnqp39" cloneof="solarcnq">
11551022      <description>Solar Conqueror (Prototype v3.9)</description>
11561023      <year>198?</year>
1157      <publisher>Astrocade</publisher>
1024      <publisher>Astrocade Inc.</publisher>
11581025      <part name="cart" interface="astrocde_cart">
11591026         <dataarea name="rom" size="8192">
11601027            <rom name="scquer39.bin" size="8192" crc="8612cc7a" sha1="eba87f0296ff0759eb25a094ea98fd05d9eb91b6" offset="0" />
r241457r241458
11661033      <description>Solar Conqueror (Prototype)</description>
11671034<!-- <note>Dumped from a cart labeled 'Solar Conquer CES Chicago 1982'.</note> -->
11681035      <year>1982</year>
1169      <publisher>Astrocade</publisher>
1036      <publisher>Astrocade Inc.</publisher>
11701037      <part name="cart" interface="astrocde_cart">
11711038         <dataarea name="rom" size="8192">
11721039            <rom name="scquerp.bin" size="8192" crc="4a229478" sha1="99139da1e5b8a52251033de6902b537d3f9ab6bc" offset="0" />
r241457r241458
11771044   <software name="songs">
11781045      <description>Songs (Prototype)</description>
11791046      <year>19??</year>
1180      <publisher>Bally</publisher>
1047      <publisher>Bally Mfg. Corp.</publisher>
11811048      <part name="cart" interface="astrocde_cart">
11821049         <dataarea name="rom" size="4096">
11831050            <rom name="songs.bin" size="4096" crc="fe6182b3" sha1="a269b21309b7849b6a3e248417be9316db31e4e6" offset="0" />
r241457r241458
11851052      </part>
11861053   </software>
11871054
1188   <software name="songsa" cloneof="songs">
1189      <description>Songs (Prototype Alt)</description>
1190      <year>19??</year>
1191      <publisher>Bally</publisher>
1192      <part name="cart" interface="astrocde_cart">
1193         <dataarea name="rom" size="8192">
1194            <rom name="songs (19xx)(bally mfg. corp.)(proto)[a].bin" size="8192" crc="36a3d077" sha1="892720fb69a1d7bb158d857176374c113ab545ca" offset="0" />
1195         </dataarea>
1196      </part>
1197   </software>
1198
11991055   <software name="songsu" cloneof="songs">
12001056      <description>Songs (Prototype, Unfinished)</description>
12011057<!-- <note>This was dumped from a ROM in Richard Degler's collection.  At some point, it's had data from the Blue RAM Utility added to the end of it.</note> -->
12021058      <year>19??</year>
1203      <publisher>Bally</publisher>
1059      <publisher>Bally Mfg. Corp.</publisher>
12041060      <part name="cart" interface="astrocde_cart">
12051061         <dataarea name="rom" size="8192">
12061062            <rom name="songsu.bin" size="8192" crc="16326f8c" sha1="c2f980f59367f4ff80c96fc173c83c0b29c1bc8f" offset="0" />
r241457r241458
12111067   <software name="spacefrt">
12121068      <description>Space Fortress</description>
12131069      <year>1981</year>
1214      <publisher>Astrocade</publisher>
1070      <publisher>Astrocade Inc.</publisher>
12151071      <part name="cart" interface="astrocde_cart">
12161072         <dataarea name="rom" size="4096">
12171073            <rom name="spacefrt.bin" size="4096" crc="519cc707" sha1="d1d4527128cad5446cdd4d4f0dfa7194cb50aaef" offset="0" />
r241457r241458
12191075      </part>
12201076   </software>
12211077
1222   <software name="spacefrtp" cloneof="spacefrt">
1223      <description>Space Fortress (Prototype)</description>
1224      <year>1981</year>
1225      <publisher>Astrocade</publisher>
1226      <part name="cart" interface="astrocde_cart">
1227         <dataarea name="rom" size="2048">
1228            <rom name="space fortress (1981)(astrocade inc.)(proto).bin" size="2048" crc="cf5012bd" sha1="08510e05c81192908bb62330dc825e1f63052584" offset="0" />
1229         </dataarea>
1230      </part>
1231   </software>
1232
1233   <software name="spaceinv">
1078   <software name="invaders">
12341079      <description>Space Invaders</description>
12351080      <year>1979</year>
1236      <publisher>Bally</publisher>
1081      <publisher>Bally Mfg. Corp.</publisher>
12371082      <part name="cart" interface="astrocde_cart">
12381083         <dataarea name="rom" size="4096">
12391084            <rom name="invaders.bin" size="4096" crc="52964c1f" sha1="aecaa45ed1d74ebf882120da75c006ae502e94c1" offset="0" />
r241457r241458
12411086      </part>
12421087   </software>
12431088
1244   <software name="spaceinvp" cloneof="spaceinv">
1245      <description>Space Invaders (Prototype)</description>
1246      <year>197?</year>
1247      <publisher>Bally</publisher>
1248      <part name="cart" interface="astrocde_cart">
1249         <dataarea name="rom" size="2048">
1250            <rom name="space invaders (197x)(bally mfg. corp.)(proto).bin" size="2048" crc="a542f4b2" sha1="46b2396ce3223a8e709a819e674726e6bf0d026e" offset="0" />
1251         </dataarea>
1252      </part>
1253   </software>
1254
12551089   <software name="spedmath">
12561090      <description>Speed Math / Bingo Math</description>
12571091      <year>1978</year>
1258      <publisher>Bally</publisher>
1092      <publisher>Bally Mfg. Corp.</publisher>
12591093      <part name="cart" interface="astrocde_cart">
12601094         <dataarea name="rom" size="2048">
12611095            <rom name="spedmath.bin" size="2048" crc="7d30312a" sha1="8f500f1e2144169bb94214eaa2863dcf6590b926" offset="0" />
r241457r241458
12661100   <software name="starbttl">
12671101      <description>Star Battle</description>
12681102      <year>1979</year>
1269      <publisher>Bally</publisher>
1103      <publisher>Bally Mfg. Corp.</publisher>
12701104      <part name="cart" interface="astrocde_cart">
12711105         <dataarea name="rom" size="2048">
12721106            <rom name="starbttl.bin" size="2048" crc="d54a74c8" sha1="00f8c65ed73f6ce134c1e4e0af7c5aa91a287951" offset="0" />
r241457r241458
12781112      <description>Stweek</description>
12791113<!-- <note>This was an internal tool for developing sound effects.</note> -->
12801114      <year>19??</year>
1281      <publisher>Bally</publisher>
1115      <publisher>Bally Mfg. Corp.</publisher>
12821116      <part name="cart" interface="astrocde_cart">
12831117         <dataarea name="rom" size="2048">
12841118            <rom name="stweek.bin" size="2048" crc="e4f3766a" sha1="a8170dba7126ff6acb56686a46362bb36bebd799" offset="0" />
r241457r241458
13021136      <description>Tests</description>
13031137<!-- <note>This was an internal tool for testing hardware.</note> -->
13041138      <year>19??</year>
1305      <publisher>Bally</publisher>
1139      <publisher>Bally Mfg. Corp.</publisher>
13061140      <part name="cart" interface="astrocde_cart">
13071141         <dataarea name="rom" size="4096">
13081142            <rom name="tests.bin" size="4096" crc="49df19eb" sha1="581f592845ffca65f1336b521d03c57309a6f91c" offset="0" />
r241457r241458
13251159   <software name="wizard">
13261160      <description>The Incredible Wizard</description>
13271161      <year>1982</year>
1328      <publisher>Astrocade</publisher>
1162      <publisher>Astrocade Inc.</publisher>
13291163      <part name="cart" interface="astrocde_cart">
13301164         <dataarea name="rom" size="8192">
13311165            <rom name="wizard.bin" size="8192" crc="1395b130" sha1="da366390c91e24206b5034bc525e98f2a3ce5f86" offset="0" />
r241457r241458
13341168   </software>
13351169
13361170   <software name="wizardp" cloneof="wizard" supported="no">
1337      <description>The Incredible Wizard (Prototype, Bad Dump)</description>
1171      <description>The Incredible Wizard (Prototype)</description>
13381172<!-- <note>This was dumped from a working prototype cart, but the cart was sold before it was realized that the dump was bad.</note> -->
13391173      <year>198?</year>
1340      <publisher>Astrocade</publisher>
1174      <publisher>Astrocade Inc.</publisher>
13411175      <part name="cart" interface="astrocde_cart">
13421176         <dataarea name="rom" size="8192">
13431177            <rom name="wizardp.bin" size="8192" crc="a0cba256" sha1="262c731967b193ece4e1d395e7cb3e8ce9c4fc2c" offset="0" status="baddump"/>
r241457r241458
13481182   <software name="baseball">
13491183      <description>Tornado Baseball / Handball / Hockey / Tennis</description>
13501184      <year>1978</year>
1351      <publisher>Bally</publisher>
1185      <publisher>Bally Mfg. Corp.</publisher>
13521186      <part name="cart" interface="astrocde_cart">
13531187         <dataarea name="rom" size="4096">
13541188            <rom name="baseball.bin" size="4096" crc="5be548cc" sha1="4dda98d6cf257652fd179eca137b69b67e38b8c6" offset="0" />
r241457r241458
14151249      </part>
14161250   </software>
14171251
1418   <software name="war">
1419      <description>War (Second Printing)</description>
1420      <year>2012</year>
1421      <publisher>Riff Raff Games</publisher>
1422      <part name="cart" interface="astrocde_cart">
1423         <dataarea name="rom" size="8192">
1424            <rom name="war (2012)(riff raff games)[second printing].bin" size="7931" crc="c1faf1bf" sha1="bca64e756b1f1c23a6b78d90a14541e44161371b" offset="0" />
1425         </dataarea>
1426      </part>
1427   </software>
1428
14291252   <software name="yahtgold" supported="no">
14301253      <description>Yahtzee / Golddigger</description>
14311254<!-- <note>This is one of several BASIC conversions sold by Mike White.  It requires cartridge swapping and a RAM expansion.</note> -->
r241457r241458
14391262   </software>
14401263
14411264   <software name="yesternv">
1442      <description>Yesterday (Prototype, no vibrato)</description>
1265      <description>Yesterday (no vibrato) (Prototype)</description>
14431266<!-- <note>Of all Richard Degler's adaptations of George Moses' Beatles tape programs, only this one was actually sold in limited quantities.  The version sold hadn't had vibrato added yet, though.</note> -->
14441267      <year>1986</year>
14451268      <publisher>Richard Degler and George Moses</publisher>
r241457r241458
14511274   </software>
14521275
14531276   <software name="yesterv">
1454      <description>Yesterday (Prototype, with vibrato)</description>
1277      <description>Yesterday (with vibrato) (Prototype)</description>
14551278      <year>1986</year>
14561279      <publisher>Richard Degler and George Moses</publisher>
14571280      <part name="cart" interface="astrocde_cart">
r241457r241458
14621285   </software>
14631286
14641287</softwarelist>
1288
1289
trunk/src/emu/bus/bus.mak
r241457r241458
122122
123123#-------------------------------------------------
124124#
125#@src/emu/bus/astrocde/slot.h,BUSES += ASTROCADE
126#-------------------------------------------------
127
128ifneq ($(filter ASTROCADE,$(BUSES)),)
129OBJDIRS += $(BUSOBJ)/astrocde
130BUSOBJS += $(BUSOBJ)/astrocde/slot.o
131BUSOBJS += $(BUSOBJ)/astrocde/rom.o
132endif
133
134
135#-------------------------------------------------
136#
137125#@src/emu/bus/bw2/exp.h,BUSES += BW2
138126#-------------------------------------------------
139127
trunk/src/emu/cpu/cp1610/cp1610.c
r241457r241458
10091009 *  S Z C OV 1 000 s1e e p ppp ppp ppp ppp ppp
10101010 *  - - - -  BEXT ADDR, eeee
10111011 ***************************************************/
1012void cp1610_cpu_device::cp1610_bext(int ext, int dir)
1012 void cp1610_cpu_device::cp1610_bext(int ext, int dir)
10131013{
10141014   UINT16 offset = cp1610_readop(m_r[7]);
10151015   m_r[7]++;
1016   /* TBD */
1017   if (0)
1016   
1017   if (m_read_bext(ext))
10181018   {
10191019      m_r[7] += (offset ^ dir);
10201020      m_icount -= 9;
r241457r241458
33603360
33613361void cp1610_cpu_device::device_start()
33623362{
3363   m_read_bext.resolve_safe(0);
33633364   m_intr_enabled = 0;
33643365   m_reset_pending = 0;
33653366   m_intr_pending = 0;
r241457r241458
34213422cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
34223423   : cpu_device(mconfig, CP1610, "CP1610", tag, owner, clock, "cp1610", __FILE__)
34233424   , m_program_config("program", ENDIANNESS_BIG, 16, 16, -1)
3425   , m_read_bext(*this)
34243426{
34253427}
34263428
trunk/src/emu/cpu/cp1610/cp1610.h
r241457r241458
3333#define CP1610_RESET        INPUT_LINE_RESET    /* Non-Maskable */
3434#define CP1610_INT_INTR     INPUT_LINE_NMI      /* Non-Maskable */
3535
36#define MCFG_CP1610_BEXT_CALLBACK(_read) \
37   downcast<cp1610_cpu_device *>(device)->set_bext_callback(DEVCB_##_read);
38   
39   
36
4037class cp1610_cpu_device :  public cpu_device
4138{
4239public:
4340   // construction/destruction
4441   cp1610_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
4542
46   template<class _read> void set_bext_callback(_read rd)
47   {
48      m_read_bext.set_callback(rd);
49   }
50   
5143protected:
5244   // device-level overrides
5345   virtual void device_start();
r241457r241458
8779   int     m_mask_interrupts;
8880   address_space *m_program;
8981   int m_icount;
90   
91   devcb_read8 m_read_bext;
9282
9383   void cp1610_illegal();
9484   void cp1610_hlt();
trunk/src/emu/cpu/powerpc/ppc.h
r241457r241458
159159#define PPCDRC_COMPATIBLE_OPTIONS   (PPCDRC_STRICT_VERIFY | PPCDRC_FLUSH_PC | PPCDRC_ACCURATE_SINGLES)
160160#define PPCDRC_FASTEST_OPTIONS      (0)
161161
162 
163 
164/***************************************************************************
165    PUBLIC FUNCTIONS
166***************************************************************************/
167 
162
163
164/***************************************************************************
165    STRUCTURES AND TYPEDEFS
166***************************************************************************/
167
168typedef void (*ppc4xx_spu_tx_handler)(device_t *device, UINT8 data);
169
170
171typedef void (*ppc_dcstore_handler)(device_t *device, UINT32 address);
172typedef UINT32 (*ppc4xx_dma_read_handler)(device_t *device, int width);
173typedef void (*ppc4xx_dma_write_handler)(device_t *device, int width, UINT32 data);
174
175
176/***************************************************************************
177    PUBLIC FUNCTIONS
178***************************************************************************/
179
168180#define MCFG_PPC_BUS_FREQUENCY(_frequency) \
169181   ppc_device::set_bus_frequency(*device, _frequency);
170182
r241457r241458
213225public:
214226   // construction/destruction
215227   ppc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int address_bits, int data_bits, powerpc_flavor flavor, UINT32 cap, UINT32 tb_divisor, address_map_constructor internal_map);
216 
217   static void set_bus_frequency(device_t &device, UINT32 bus_frequency) { downcast<ppc_device &>(device).c_bus_frequency = bus_frequency; }
218 
219   void ppc_set_dcstore_callback(write32_delegate callback);
220   
221   void ppcdrc_set_options(UINT32 options);
222   void ppcdrc_add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base);
223   void ppcdrc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles);
224228
229   static void set_bus_frequency(device_t &device, UINT32 bus_frequency) { downcast<ppc_device &>(device).c_bus_frequency = bus_frequency; }
230
231   void ppc_set_dcstore_callback(ppc_dcstore_handler handler);
232
233   void ppcdrc_set_options(UINT32 options);
234   void ppcdrc_add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base);
235   void ppcdrc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles);
236
225237   TIMER_CALLBACK_MEMBER(decrementer_int_callback);
226238   TIMER_CALLBACK_MEMBER(ppc4xx_buffered_dma_callback);
227239   TIMER_CALLBACK_MEMBER(ppc4xx_fit_callback);
r241457r241458
479491      UINT8           regs[9];
480492      UINT8           txbuf;
481493      UINT8           rxbuf;
482      emu_timer *     timer;
483      UINT8           rxbuffer[256];
484      UINT32          rxin, rxout;
485      write8_delegate tx_cb;
486   };
487 
488   ppc4xx_spu_state m_spu;
494      emu_timer *     timer;
495      UINT8           rxbuffer[256];
496      UINT32          rxin, rxout;
497      ppc4xx_spu_tx_handler tx_handler;
498   };
499
500   ppc4xx_spu_state m_spu;
489501   emu_timer *     m_fit_timer;
490502   emu_timer *     m_pit_timer;
491503   emu_timer *     m_wdog_timer;
r241457r241458
503515   UINT64          m_dec_zero_cycles;
504516   emu_timer *     m_decrementer_int_timer;
505517
506   read32_delegate  m_dcr_read_func;
507   write32_delegate m_dcr_write_func;
508 
509   write32_delegate m_dcstore_cb;
510 
511   read32_delegate m_ext_dma_read_cb[4];
512   write32_delegate m_ext_dma_write_cb[4];
513 
514   /* PowerPC function pointers for memory accesses/exceptions */
515   jmp_buf m_exception_jmpbuf;
518   read32_delegate  m_dcr_read_func;
519   write32_delegate m_dcr_write_func;
520
521   ppc_dcstore_handler m_dcstore_handler;
522
523   ppc4xx_dma_read_handler m_ext_dma_read_handler[4];
524   ppc4xx_dma_write_handler m_ext_dma_write_handler[4];
525
526   /* PowerPC function pointers for memory accesses/exceptions */
527   jmp_buf m_exception_jmpbuf;
516528   UINT8 (*m_ppcread8)(address_space &space, offs_t address);
517529   UINT16 (*m_ppcread16)(address_space &space, offs_t address);
518530   UINT32 (*m_ppcread32)(address_space &space, offs_t address);
r241457r241458
751763
752764class ppc4xx_device : public ppc_device
753765{
754public:
755   ppc4xx_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, powerpc_flavor flavor, UINT32 cap, UINT32 tb_divisor);
756 
757   void ppc4xx_spu_set_tx_handler(write8_delegate callback);
758   void ppc4xx_spu_receive_byte(UINT8 byteval);
759 
760   void ppc4xx_set_dma_read_handler(int channel, read32_delegate callback, int rate);
761   void ppc4xx_set_dma_write_handler(int channel, write32_delegate callback, int rate);
762   void ppc4xx_set_dcr_read_handler(read32_delegate dcr_read_func);
763   void ppc4xx_set_dcr_write_handler(write32_delegate dcr_write_func);
764 
766public:
767   ppc4xx_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, powerpc_flavor flavor, UINT32 cap, UINT32 tb_divisor);
768
769   void ppc4xx_spu_set_tx_handler(ppc4xx_spu_tx_handler handler);
770   void ppc4xx_spu_receive_byte(UINT8 byteval);
771
772   void ppc4xx_set_dma_read_handler(int channel, ppc4xx_dma_read_handler handler, int rate);
773   void ppc4xx_set_dma_write_handler(int channel, ppc4xx_dma_write_handler handler, int rate);
774   void ppc4xx_set_dcr_read_handler(read32_delegate dcr_read_func);
775   void ppc4xx_set_dcr_write_handler(write32_delegate dcr_write_func);
776
765777   DECLARE_READ8_MEMBER( ppc4xx_spu_r );
766778   DECLARE_WRITE8_MEMBER( ppc4xx_spu_w );
767779
trunk/src/emu/cpu/powerpc/ppccom.c
r241457r241458
214214   , m_core(NULL)
215215   , m_bus_freq_multiplier(1)
216216   , m_vtlb(NULL)
217   , m_flavor(flavor)
218   , m_cap(cap)
219   , m_tb_divisor(tb_divisor)
220   , m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
221   , m_drcuml(NULL)
222   , m_drcfe(NULL)
217   , m_flavor(flavor)
218   , m_cap(cap)
219   , m_tb_divisor(tb_divisor)
220   , m_dcstore_handler(NULL)
221   , m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
222   , m_drcuml(NULL)
223   , m_drcfe(NULL)
223224   , m_drcoptions(0)
224{
225   m_program_config.m_logaddr_width = 32;
226   m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT;
227}
228 
229//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
225{
226   m_program_config.m_logaddr_width = 32;
227   m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT;
228   memset(m_ext_dma_read_handler, 0, sizeof(m_ext_dma_read_handler));
229   memset(m_ext_dma_write_handler, 0, sizeof(m_ext_dma_write_handler));
230}
231
232//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
230233//  : ppc_device(mconfig, PPC403, "PPC403", tag, owner, clock, "ppc403", 32?, 64?)
231234//{
232235//}
r241457r241458
12381241    ppccom_dcstore_callback - call the dcstore
12391242    callback if installed
12401243-------------------------------------------------*/
1241 
1242void ppc_device::ppccom_dcstore_callback()
1243{
1244   if (!m_dcstore_cb.isnull())
1245   {
1246      m_dcstore_cb(*m_program, m_core->param0, 0, 0xffffffff);
1247   }
1248}
1249 
12501244
1245void ppc_device::ppccom_dcstore_callback()
1246{
1247   if (m_dcstore_handler != NULL)
1248   {
1249      m_dcstore_handler(this, m_core->param0);
1250   }
1251}
1252
1253
12511254/***************************************************************************
12521255    TLB HANDLING
12531256***************************************************************************/
r241457r241458
20582061
20592062/*-------------------------------------------------
20602063    ppc_set_dcstore_callback - installs a callback
2061    for detecting datacache stores with dcbst
2062-------------------------------------------------*/
2063 
2064void ppc_device::ppc_set_dcstore_callback(write32_delegate callback)
2065{
2066   m_dcstore_cb = callback;
2067}
2068 
2069 
2064    for detecting datacache stores with dcbst
2065-------------------------------------------------*/
2066
2067void ppc_device::ppc_set_dcstore_callback(ppc_dcstore_handler handler)
2068{
2069   m_dcstore_handler = handler;
2070}
2071
2072
20702073void ppc_device::execute_set_input(int inputnum, int state)
20712074{
20722075   switch (inputnum)
r241457r241458
22852288      {
22862289         /* byte transfer */
22872290         case 1:
2288         do
2289         {
2290            UINT8 data = 0;
2291            if (!m_ext_dma_read_cb[dmachan].isnull())
2292               data = (m_ext_dma_read_cb[dmachan])(*m_program, 1, 0xffffffff);
2293            m_program->write_byte(dmaregs[DCR4XX_DMADA0], data);
2294            dmaregs[DCR4XX_DMADA0] += destinc;
2295         } while (!ppc4xx_dma_decrement_count(dmachan));
2291         do
2292         {
2293            UINT8 data = 0;
2294            if (m_ext_dma_read_handler[dmachan] != NULL)
2295               data = (*m_ext_dma_read_handler[dmachan])(this, 1);
2296            m_program->write_byte(dmaregs[DCR4XX_DMADA0], data);
2297            dmaregs[DCR4XX_DMADA0] += destinc;
2298         } while (!ppc4xx_dma_decrement_count(dmachan));
22962299         break;
22972300
22982301         /* word transfer */
22992302         case 2:
2300         do
2301         {
2302            UINT16 data = 0;
2303            if (!m_ext_dma_read_cb[dmachan].isnull())
2304               data = (m_ext_dma_read_cb[dmachan])(*m_program, 2, 0xffffffff);
2305            m_program->write_word(dmaregs[DCR4XX_DMADA0], data);
2306            dmaregs[DCR4XX_DMADA0] += destinc;
2307         } while (!ppc4xx_dma_decrement_count(dmachan));
2303         do
2304         {
2305            UINT16 data = 0;
2306            if (m_ext_dma_read_handler[dmachan] != NULL)
2307               data = (*m_ext_dma_read_handler[dmachan])(this, 2);
2308            m_program->write_word(dmaregs[DCR4XX_DMADA0], data);
2309            dmaregs[DCR4XX_DMADA0] += destinc;
2310         } while (!ppc4xx_dma_decrement_count(dmachan));
23082311         break;
23092312
23102313         /* dword transfer */
23112314         case 4:
2312         do
2313         {
2314            UINT32 data = 0;
2315            if (!m_ext_dma_read_cb[dmachan].isnull())
2316               data = (m_ext_dma_read_cb[dmachan])(*m_program, 4, 0xffffffff);
2317            m_program->write_dword(dmaregs[DCR4XX_DMADA0], data);
2318            dmaregs[DCR4XX_DMADA0] += destinc;
2319         } while (!ppc4xx_dma_decrement_count(dmachan));
2315         do
2316         {
2317            UINT32 data = 0;
2318            if (m_ext_dma_read_handler[dmachan] != NULL)
2319               data = (*m_ext_dma_read_handler[dmachan])(this, 4);
2320            m_program->write_dword(dmaregs[DCR4XX_DMADA0], data);
2321            dmaregs[DCR4XX_DMADA0] += destinc;
2322         } while (!ppc4xx_dma_decrement_count(dmachan));
23202323         break;
23212324      }
23222325   }
r241457r241458
23292332      {
23302333         /* byte transfer */
23312334         case 1:
2332         do
2333         {
2334            UINT8 data = m_program->read_byte(dmaregs[DCR4XX_DMADA0]);
2335            if (!m_ext_dma_write_cb[dmachan].isnull())
2336               (m_ext_dma_write_cb[dmachan])(*m_program, 1, data, 0xffffffff);
2337            dmaregs[DCR4XX_DMADA0] += destinc;
2338         } while (!ppc4xx_dma_decrement_count(dmachan));
2339         break;
2335         do
2336         {
2337            UINT8 data = m_program->read_byte(dmaregs[DCR4XX_DMADA0]);
2338            if (m_ext_dma_write_handler[dmachan] != NULL)
2339               (*m_ext_dma_write_handler[dmachan])(this, 1, data);
2340            dmaregs[DCR4XX_DMADA0] += destinc;
2341         } while (!ppc4xx_dma_decrement_count(dmachan));
2342         break;
23402343
23412344         /* word transfer */
23422345         case 2:
2343         do
2344         {
2345            UINT16 data = m_program->read_word(dmaregs[DCR4XX_DMADA0]);
2346            if (!m_ext_dma_write_cb[dmachan].isnull())
2347               (m_ext_dma_write_cb[dmachan])(*m_program, 2, data, 0xffffffff);
2348            dmaregs[DCR4XX_DMADA0] += destinc;
2349         } while (!ppc4xx_dma_decrement_count(dmachan));
2350         break;
2346         do
2347         {
2348            UINT16 data = m_program->read_word(dmaregs[DCR4XX_DMADA0]);
2349            if (m_ext_dma_write_handler[dmachan] != NULL)
2350               (*m_ext_dma_write_handler[dmachan])(this, 2, data);
2351            dmaregs[DCR4XX_DMADA0] += destinc;
2352         } while (!ppc4xx_dma_decrement_count(dmachan));
2353         break;
23512354
23522355         /* dword transfer */
23532356         case 4:
2354         do
2355         {
2356            UINT32 data = m_program->read_dword(dmaregs[DCR4XX_DMADA0]);
2357            if (!m_ext_dma_write_cb[dmachan].isnull())
2358               (m_ext_dma_write_cb[dmachan])(*m_program, 4, data, 0xffffffff);
2359            dmaregs[DCR4XX_DMADA0] += destinc;
2360         } while (!ppc4xx_dma_decrement_count(dmachan));
2361         break;
2357         do
2358         {
2359            UINT32 data = m_program->read_dword(dmaregs[DCR4XX_DMADA0]);
2360            if (m_ext_dma_write_handler[dmachan] != NULL)
2361               (*m_ext_dma_write_handler[dmachan])(this, 4, data);
2362            dmaregs[DCR4XX_DMADA0] += destinc;
2363         } while (!ppc4xx_dma_decrement_count(dmachan));
2364         break;
23622365      }
23632366   }
23642367}
r241457r241458
26742677      int operation = (m_spu.regs[SPU4XX_TX_COMMAND] >> 5) & 3;
26752678
26762679      /* if we have data to transmit, do it now */
2677      if (!(m_spu.regs[SPU4XX_LINE_STATUS] & 0x04))
2678      {
2679         /* if we have a transmit handler, send it that way */
2680         if (!m_spu.tx_cb.isnull())
2681            (m_spu.tx_cb)(*m_program, 0, m_spu.txbuf, 0xff);
2682 
2683         /* indicate that we have moved it to the shift register */
2684         m_spu.regs[SPU4XX_LINE_STATUS] |= 0x04;
2680      if (!(m_spu.regs[SPU4XX_LINE_STATUS] & 0x04))
2681      {
2682         /* if we have a transmit handler, send it that way */
2683         if (m_spu.tx_handler != NULL)
2684            (*m_spu.tx_handler)(this, m_spu.txbuf);
2685
2686         /* indicate that we have moved it to the shift register */
2687         m_spu.regs[SPU4XX_LINE_STATUS] |= 0x04;
26852688         m_spu.regs[SPU4XX_LINE_STATUS] &= ~0x02;
26862689      }
26872690
r241457r241458
28202823
28212824/*-------------------------------------------------
28222825    ppc4xx_spu_set_tx_handler - PowerPC 4XX-
2823    specific TX handler configuration
2824-------------------------------------------------*/
2825 
2826void ppc4xx_device::ppc4xx_spu_set_tx_handler(write8_delegate callback)
2827{
2828   m_spu.tx_cb = callback;
2829}
2830 
2831 
2826    specific TX handler configuration
2827-------------------------------------------------*/
2828
2829void ppc4xx_device::ppc4xx_spu_set_tx_handler(ppc4xx_spu_tx_handler handler)
2830{
2831   m_spu.tx_handler = handler;
2832}
2833
2834
28322835/*-------------------------------------------------
28332836    ppc4xx_spu_receive_byte - PowerPC 4XX-
28342837    specific serial byte receive
r241457r241458
28412844
28422845/*-------------------------------------------------
28432846    ppc4xx_set_dma_read_handler - PowerPC 4XX-
2844    specific external DMA read handler configuration
2845-------------------------------------------------*/
2846 
2847void ppc4xx_device::ppc4xx_set_dma_read_handler(int channel, read32_delegate callback, int rate)
2848{
2849   m_ext_dma_read_cb[channel] = callback;
2850   m_buffered_dma_rate[channel] = rate;
2851}
2852 
2847    specific external DMA read handler configuration
2848-------------------------------------------------*/
2849
2850void ppc4xx_device::ppc4xx_set_dma_read_handler(int channel, ppc4xx_dma_read_handler handler, int rate)
2851{
2852   m_ext_dma_read_handler[channel] = handler;
2853   m_buffered_dma_rate[channel] = rate;
2854}
2855
28532856/*-------------------------------------------------
28542857    ppc4xx_set_dma_write_handler - PowerPC 4XX-
2855    specific external DMA write handler configuration
2856-------------------------------------------------*/
2857 
2858void ppc4xx_device::ppc4xx_set_dma_write_handler(int channel, write32_delegate callback, int rate)
2859{
2860   m_ext_dma_write_cb[channel] = callback;
2861   m_buffered_dma_rate[channel] = rate;
2862}
2863 
2858    specific external DMA write handler configuration
2859-------------------------------------------------*/
2860
2861void ppc4xx_device::ppc4xx_set_dma_write_handler(int channel, ppc4xx_dma_write_handler handler, int rate)
2862{
2863   m_ext_dma_write_handler[channel] = handler;
2864   m_buffered_dma_rate[channel] = rate;
2865}
2866
28642867/*-------------------------------------------------
28652868    ppc4xx_set_dcr_read_handler
28662869-------------------------------------------------*/
trunk/src/mame/drivers/cobra.c
r241457r241458
630630   DECLARE_READ64_MEMBER(main_comram_r);
631631   DECLARE_WRITE64_MEMBER(main_comram_w);
632632   DECLARE_READ64_MEMBER(main_fifo_r);
633   DECLARE_WRITE64_MEMBER(main_fifo_w);
634   DECLARE_READ64_MEMBER(main_mpc106_r);
635   DECLARE_WRITE64_MEMBER(main_mpc106_w);
636   DECLARE_WRITE32_MEMBER(main_cpu_dc_store);
637   
638   DECLARE_READ32_MEMBER(sub_comram_r);
639   DECLARE_WRITE32_MEMBER(sub_comram_w);
640   DECLARE_READ32_MEMBER(sub_sound_r);
633   DECLARE_WRITE64_MEMBER(main_fifo_w);
634   DECLARE_READ64_MEMBER(main_mpc106_r);
635   DECLARE_WRITE64_MEMBER(main_mpc106_w);
636
637   DECLARE_READ32_MEMBER(sub_comram_r);
638   DECLARE_WRITE32_MEMBER(sub_comram_w);
639   DECLARE_READ32_MEMBER(sub_sound_r);
641640   DECLARE_WRITE32_MEMBER(sub_sound_w);
642641   DECLARE_READ32_MEMBER(sub_unk7e_r);
643642   DECLARE_WRITE32_MEMBER(sub_debug_w);
r241457r241458
651650   DECLARE_WRITE16_MEMBER(sub_ata0_w);
652651   DECLARE_READ16_MEMBER(sub_ata1_r);
653652   DECLARE_WRITE16_MEMBER(sub_ata1_w);
654   DECLARE_READ32_MEMBER(sub_psac2_r);
655   DECLARE_WRITE32_MEMBER(sub_psac2_w);
656   DECLARE_WRITE32_MEMBER(sub_psac_palette_w);
657   DECLARE_WRITE32_MEMBER(sub_sound_dma_w);
658 
659   DECLARE_WRITE64_MEMBER(gfx_fifo0_w);
660   DECLARE_WRITE64_MEMBER(gfx_fifo1_w);
653   DECLARE_READ32_MEMBER(sub_psac2_r);
654   DECLARE_WRITE32_MEMBER(sub_psac2_w);
655   DECLARE_WRITE32_MEMBER(sub_psac_palette_w);
656
657   DECLARE_WRITE64_MEMBER(gfx_fifo0_w);
658   DECLARE_WRITE64_MEMBER(gfx_fifo1_w);
661659   DECLARE_WRITE64_MEMBER(gfx_fifo2_w);
662660   DECLARE_WRITE64_MEMBER(gfx_debug_state_w);
663661   DECLARE_READ64_MEMBER(gfx_unk1_r);
664   DECLARE_WRITE64_MEMBER(gfx_unk1_w);
665   DECLARE_READ64_MEMBER(gfx_fifo_r);
666   DECLARE_WRITE64_MEMBER(gfx_buf_w);
667   DECLARE_WRITE32_MEMBER(gfx_cpu_dc_store);
668   
669   DECLARE_WRITE8_MEMBER(sub_jvs_w);
670 
671   DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
672 
662   DECLARE_WRITE64_MEMBER(gfx_unk1_w);
663   DECLARE_READ64_MEMBER(gfx_fifo_r);
664   DECLARE_WRITE64_MEMBER(gfx_buf_w);
665
666   DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
667
673668   cobra_renderer *m_renderer;
674669
675670   cobra_fifo *m_gfxfifo_in;
r241457r241458
16011596   UINT32 m2 = (UINT32)(mem_mask);
16021597
16031598   m_comram[page][(offset << 1) + 0] = (w1 & ~m1) | (d1 & m1);
1604   m_comram[page][(offset << 1) + 1] = (w2 & ~m2) | (d2 & m2);
1605}
1606 
1607WRITE32_MEMBER(cobra_state::main_cpu_dc_store)
1608{
1609   if ((offset & 0xf0000000) == 0xc0000000)
1610   {
1611      // force sync when writing to GFX board main ram
1612      m_maincpu->spin_until_time(attotime::from_usec(80));
1613   }
1614}
1615 
1599   m_comram[page][(offset << 1) + 1] = (w2 & ~m2) | (d2 & m2);
1600}
1601
1602static void main_cpu_dc_store(device_t *device, UINT32 address)
1603{
1604   cobra_state *cobra = device->machine().driver_data<cobra_state>();
1605
1606   if ((address & 0xf0000000) == 0xc0000000)
1607   {
1608      // force sync when writing to GFX board main ram
1609      cobra->m_maincpu->spin_until_time(attotime::from_usec(80));
1610   }
1611}
1612
16161613static ADDRESS_MAP_START( cobra_main_map, AS_PROGRAM, 64, cobra_state )
16171614   AM_RANGE(0x00000000, 0x003fffff) AM_RAM
16181615   AM_RANGE(0x07c00000, 0x07ffffff) AM_RAM
r241457r241458
18881885}
18891886
18901887WRITE32_MEMBER(cobra_state::sub_psac2_w)
1891{
1892}
1893 
1894WRITE32_MEMBER(cobra_state::sub_sound_dma_w)
1895{
1896   //printf("DMA write to unknown: size %d, data %08X\n", address, data);
1897 
1898   /*
1899   static FILE *out;
1888{
1889}
1890
1891static void sub_sound_dma_w(device_t *device, int width, UINT32 data)
1892{
1893   //printf("DMA write to unknown: size %d, data %08X\n", width, data);
1894
1895   /*
1896   static FILE *out;
19001897   if (out == NULL)
19011898       out = fopen("sound.bin", "wb");
19021899
19031900   fputc((data >> 24) & 0xff, out);
19041901   fputc((data >> 16) & 0xff, out);
19051902   fputc((data >> 8) & 0xff, out);
1906   fputc((data >> 0) & 0xff, out);
1907   */
1908 
1909   INT16 ldata = (INT16)(data >> 16);
1910   INT16 rdata = (INT16)(data);
1911 
1912   m_sound_dma_buffer_l[m_sound_dma_ptr] = ldata;
1913   m_sound_dma_buffer_r[m_sound_dma_ptr] = rdata;
1914   m_sound_dma_ptr++;
1915 
1916   if (m_sound_dma_ptr >= DMA_SOUND_BUFFER_SIZE)
1917   {
1918      m_sound_dma_ptr = 0;
1919 
1920      dmadac_transfer(&m_dmadac[0], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_l);
1921      dmadac_transfer(&m_dmadac[1], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_r);
1922   }
1923}
1924 
1925WRITE8_MEMBER(cobra_state::sub_jvs_w)
1926{
1927   cobra_jvs_host *jvs = machine().device<cobra_jvs_host>("cobra_jvs_host");
1928 
1929#if LOG_JVS
1930   printf("sub_jvs_w: %02X\n", data);
1903   fputc((data >> 0) & 0xff, out);
1904   */
1905
1906   cobra_state *cobra = device->machine().driver_data<cobra_state>();
1907
1908   INT16 ldata = (INT16)(data >> 16);
1909   INT16 rdata = (INT16)(data);
1910
1911   cobra->m_sound_dma_buffer_l[cobra->m_sound_dma_ptr] = ldata;
1912   cobra->m_sound_dma_buffer_r[cobra->m_sound_dma_ptr] = rdata;
1913   cobra->m_sound_dma_ptr++;
1914
1915   if (cobra->m_sound_dma_ptr >= DMA_SOUND_BUFFER_SIZE)
1916   {
1917      cobra->m_sound_dma_ptr = 0;
1918
1919      dmadac_transfer(&cobra->m_dmadac[0], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, cobra->m_sound_dma_buffer_l);
1920      dmadac_transfer(&cobra->m_dmadac[1], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, cobra->m_sound_dma_buffer_r);
1921   }
1922}
1923
1924static void sub_jvs_w(device_t *device, UINT8 data)
1925{
1926   cobra_state *cobra = device->machine().driver_data<cobra_state>();
1927   cobra_jvs_host *jvs = downcast<cobra_jvs_host *>(device->machine().device("cobra_jvs_host"));
1928
1929#if LOG_JVS
1930   printf("sub_jvs_w: %02X\n", data);
19311931#endif
19321932
19331933   const UINT8 *rec_data;
r241457r241458
19451945      }
19461946      printf("\n");
19471947#endif
1948 
1949      for (int i=0; i < rec_size; i++)
1950      {
1951         m_subcpu->ppc4xx_spu_receive_byte(rec_data[i]);
1952      }
1953   }
1954}
19551948
1949      for (int i=0; i < rec_size; i++)
1950      {
1951         cobra->m_subcpu->ppc4xx_spu_receive_byte(rec_data[i]);
1952      }
1953   }
1954}
1955
19561956static ADDRESS_MAP_START( cobra_sub_map, AS_PROGRAM, 32, cobra_state )
19571957   AM_RANGE(0x00000000, 0x003fffff) AM_MIRROR(0x80000000) AM_RAM                                           // Main RAM
19581958   AM_RANGE(0x70000000, 0x7003ffff) AM_MIRROR(0x80000000) AM_READWRITE(sub_comram_r, sub_comram_w)         // Double buffered shared RAM between Main and Sub
r241457r241458
29882988      // prc_read always expects a value...
29892989
29902990      m_gfxfifo_out->push(&space.device(), 0);
2991   }
2992}
2993 
2994WRITE32_MEMBER(cobra_state::gfx_cpu_dc_store)
2995{
2996   UINT32 addr = offset >> 24;
2997   if (addr == 0x10 || addr == 0x18 || addr == 0x1e)
2998   {
2999      UINT64 i = (UINT64)(m_gfx_fifo_cache_addr) << 32;
3000      cobra_fifo *fifo_in = m_gfxfifo_in;
3001 
3002      UINT32 a = (offset / 8) & 0xff;
3003 
3004      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+0] >> 32) | i);
3005      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+0] >>  0) | i);
3006      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+1] >> 32) | i);
3007      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+1] >>  0) | i);
3008      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+2] >> 32) | i);
3009      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+2] >>  0) | i);
3010      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+3] >> 32) | i);
3011      fifo_in->push(&space.device(), (UINT32)(m_gfx_fifo_mem[a+3] >>  0) | i);
3012 
3013      m_renderer->gfx_fifo_exec();
3014   }
3015   else
3016   {
3017      logerror("gfx: data cache store at %08X\n", offset);
3018   }
3019}
3020 
2991   }
2992}
2993
2994static void gfx_cpu_dc_store(device_t *device, UINT32 address)
2995{
2996   cobra_state *cobra = device->machine().driver_data<cobra_state>();
2997
2998   UINT32 addr = address >> 24;
2999   if (addr == 0x10 || addr == 0x18 || addr == 0x1e)
3000   {
3001      UINT64 i = (UINT64)(cobra->m_gfx_fifo_cache_addr) << 32;
3002      cobra_fifo *fifo_in = cobra->m_gfxfifo_in;
3003
3004      UINT32 a = (address / 8) & 0xff;
3005
3006      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+0] >> 32) | i);
3007      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+0] >>  0) | i);
3008      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+1] >> 32) | i);
3009      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+1] >>  0) | i);
3010      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+2] >> 32) | i);
3011      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+2] >>  0) | i);
3012      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+3] >> 32) | i);
3013      fifo_in->push(device, (UINT32)(cobra->m_gfx_fifo_mem[a+3] >>  0) | i);
3014
3015      cobra->m_renderer->gfx_fifo_exec();
3016   }
3017   else
3018   {
3019      logerror("gfx: data cache store at %08X\n", address);
3020   }
3021}
3022
30213023WRITE64_MEMBER(cobra_state::gfx_debug_state_w)
30223024{
30233025   if (ACCESSING_BITS_40_47)
r241457r241458
32583260                        2048,
32593261                        "S2MFIFO",
32603262                        S2MFIFO_VERBOSE != 0,
3261                        cobra_fifo::event_delegate(FUNC(cobra_state::s2mfifo_event_callback), this))
3262                        );
3263 
3264   m_maincpu->ppc_set_dcstore_callback(write32_delegate(FUNC(cobra_state::main_cpu_dc_store),this));
3265 
3266   m_gfxcpu->ppc_set_dcstore_callback(write32_delegate(FUNC(cobra_state::gfx_cpu_dc_store), this));
3267 
3268   m_subcpu->ppc4xx_set_dma_write_handler(0, write32_delegate(FUNC(cobra_state::sub_sound_dma_w), this), 44100);
3269   m_subcpu->ppc4xx_spu_set_tx_handler(write8_delegate(FUNC(cobra_state::sub_jvs_w), this));
3270 
3271 
3272   m_comram[0] = auto_alloc_array(machine(), UINT32, 0x40000/4);
3263                        cobra_fifo::event_delegate(FUNC(cobra_state::s2mfifo_event_callback), this))
3264                        );
3265
3266   m_maincpu->ppc_set_dcstore_callback(main_cpu_dc_store);
3267
3268   m_gfxcpu->ppc_set_dcstore_callback(gfx_cpu_dc_store);
3269
3270   m_subcpu->ppc4xx_set_dma_write_handler(0, sub_sound_dma_w, 44100);
3271   m_subcpu->ppc4xx_spu_set_tx_handler(sub_jvs_w);
3272
3273
3274   m_comram[0] = auto_alloc_array(machine(), UINT32, 0x40000/4);
32733275   m_comram[1] = auto_alloc_array(machine(), UINT32, 0x40000/4);
32743276
32753277   m_comram_page = 0;
trunk/src/mame/drivers/firebeat.c
r241457r241458
256256   void gcu_exec_display_list(bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, UINT32 address);
257257   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip);
258258   UINT32 GCU_r(int chip, UINT32 offset, UINT32 mem_mask);
259   void GCU_w(int chip, UINT32 offset, UINT32 data, UINT32 mem_mask);
260   void set_ibutton(UINT8 *data);
261   int ibutton_w(UINT8 data);
262   DECLARE_WRITE8_MEMBER(security_w);
263   void init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3);
264   void init_firebeat();
265   void init_keyboard();
259   void GCU_w(int chip, UINT32 offset, UINT32 data, UINT32 mem_mask);
260   void set_ibutton(UINT8 *data);
261   int ibutton_w(UINT8 data);
262   void init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3);
263   void init_firebeat();
264   void init_keyboard();
266265   DECLARE_WRITE_LINE_MEMBER(sound_irq_callback);
267266   DECLARE_WRITE_LINE_MEMBER(midi_uart_ch0_irq_callback);
268267   DECLARE_WRITE_LINE_MEMBER(midi_uart_ch1_irq_callback);
r241457r241458
19471946      }
19481947   }
19491948
1950   return r;
1951}
1952 
1953WRITE8_MEMBER(firebeat_state::security_w)
1954{
1955   int r = ibutton_w(data);
1956   if (r >= 0)
1957      m_maincpu->ppc4xx_spu_receive_byte(r);
1958}
1959 
1960/*****************************************************************************/
1949   return r;
1950}
19611951
1952static void security_w(device_t *device, UINT8 data)
1953{
1954   firebeat_state *state = device->machine().driver_data<firebeat_state>();
1955   int r = state->ibutton_w(data);
1956   if (r >= 0)
1957      state->m_maincpu->ppc4xx_spu_receive_byte(r);
1958}
1959
1960/*****************************************************************************/
1961
19621962void firebeat_state::init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3)
19631963{
19641964   if(out1.isnull()) out1 = write32_delegate(FUNC(firebeat_state::lamp_output_w),this);
r241457r241458
19791979
19801980   m_extend_board_irq_enable = 0x3f;
19811981   m_extend_board_irq_active = 0x00;
1982 
1983   m_cur_cab_data = cab_data;
1984 
1985   m_maincpu->ppc4xx_spu_set_tx_handler(write8_delegate(FUNC(firebeat_state::security_w), this));
1986 
1987   set_ibutton(rom);
1988 
1982
1983   m_cur_cab_data = cab_data;
1984
1985   m_maincpu->ppc4xx_spu_set_tx_handler(security_w);
1986
1987   set_ibutton(rom);
1988
19891989   init_lights(write32_delegate(), write32_delegate(), write32_delegate());
19901990}
19911991
trunk/src/mame/drivers/hornet.c
r241457r241458
402402   DECLARE_WRITE32_MEMBER(dsp_dataram1_w);
403403   DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_0);
404404   DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_1);
405   DECLARE_WRITE16_MEMBER(soundtimer_en_w);
406   DECLARE_WRITE16_MEMBER(soundtimer_count_w);
407   ADC12138_IPT_CONVERT_CB(adc12138_input_callback);
408   DECLARE_WRITE8_MEMBER(jamma_jvs_w);
409 
410   DECLARE_DRIVER_INIT(hornet);
411   DECLARE_DRIVER_INIT(hornet_2board);
405   DECLARE_WRITE16_MEMBER(soundtimer_en_w);
406   DECLARE_WRITE16_MEMBER(soundtimer_count_w);
407   ADC12138_IPT_CONVERT_CB(adc12138_input_callback);
408
409   DECLARE_DRIVER_INIT(hornet);
410   DECLARE_DRIVER_INIT(hornet_2board);
412411   virtual void machine_start();
413412   virtual void machine_reset();
414413   DECLARE_MACHINE_RESET(hornet_2board);
r241457r241458
11361135   MCFG_EEPROM_SERIAL_93C46_ADD("lan_eeprom")
11371136MACHINE_CONFIG_END
11381137
1139 
1140/*****************************************************************************/
1141 
1142WRITE8_MEMBER(hornet_state::jamma_jvs_w)
1143{
1144   if (m_jvs_sdata_ptr == 0 && data != 0xe0)
1145      return;
1146   m_jvs_sdata[m_jvs_sdata_ptr] = data;
1147   m_jvs_sdata_ptr++;
1148 
1149   if (m_jvs_sdata_ptr >= 3 && m_jvs_sdata_ptr >= 3 + m_jvs_sdata[2])
1150      jamma_jvs_cmd_exec();
1151}
1152 
1153int hornet_state::jvs_encode_data(UINT8 *in, int length)
1138
1139/*****************************************************************************/
1140
1141static void jamma_jvs_w(device_t *device, UINT8 data)
11541142{
1143   hornet_state *state = device->machine().driver_data<hornet_state>();
1144   if (state->m_jvs_sdata_ptr == 0 && data != 0xe0)
1145      return;
1146   state->m_jvs_sdata[state->m_jvs_sdata_ptr] = data;
1147   state->m_jvs_sdata_ptr++;
1148
1149   if (state->m_jvs_sdata_ptr >= 3 && state->m_jvs_sdata_ptr >= 3 + state->m_jvs_sdata[2])
1150      state->jamma_jvs_cmd_exec();
1151}
1152
1153int hornet_state::jvs_encode_data(UINT8 *in, int length)
1154{
11551155   int inptr = 0;
11561156   int sum = 0;
11571157
r241457r241458
12801280
12811281DRIVER_INIT_MEMBER(hornet_state,hornet)
12821282{
1283   m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base());
1284   m_led_reg0 = m_led_reg1 = 0x7f;
1285 
1286   m_maincpu->ppc4xx_spu_set_tx_handler(write8_delegate(FUNC(hornet_state::jamma_jvs_w), this));
1287}
1288 
1289DRIVER_INIT_MEMBER(hornet_state,hornet_2board)
1283   m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base());
1284   m_led_reg0 = m_led_reg1 = 0x7f;
1285
1286   m_maincpu->ppc4xx_spu_set_tx_handler(jamma_jvs_w);
1287}
1288
1289DRIVER_INIT_MEMBER(hornet_state,hornet_2board)
12901290{
12911291   m_konppc->set_cgboard_texture_bank(0, "bank5", memregion("user5")->base());
1292   m_konppc->set_cgboard_texture_bank(1, "bank6", memregion("user5")->base());
1293   m_led_reg0 = m_led_reg1 = 0x7f;
1294 
1295   m_maincpu->ppc4xx_spu_set_tx_handler(write8_delegate(FUNC(hornet_state::jamma_jvs_w), this));
1296}
1297 
1298/*****************************************************************************/
1292   m_konppc->set_cgboard_texture_bank(1, "bank6", memregion("user5")->base());
1293   m_led_reg0 = m_led_reg1 = 0x7f;
12991294
1295   m_maincpu->ppc4xx_spu_set_tx_handler(jamma_jvs_w);
1296}
1297
1298/*****************************************************************************/
1299
13001300ROM_START(sscope)
13011301   ROM_REGION32_BE(0x400000, "user1", 0)   /* PowerPC program */
13021302   ROM_LOAD16_WORD_SWAP("830d01.27p", 0x200000, 0x200000, CRC(de9b3dfa) SHA1(660652a5f745cb04687481c3626d8a43cd169193) )
trunk/src/mame/drivers/vamphalf.c
r241457r241458
167167   DECLARE_WRITE32_MEMBER(yorizori_1c_w);
168168   DECLARE_READ32_MEMBER(yorizori_10_r);
169169
170
171
170172   DECLARE_READ8_MEMBER(qs1000_p1_r);
171173   DECLARE_WRITE8_MEMBER(qs1000_p3_w);
172174   DECLARE_DRIVER_INIT(vamphalf);
r241457r241458
190192   DECLARE_DRIVER_INIT(yorizori);
191193   UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
192194   UINT32 screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
193   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap);
194   void draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap);
195   void handle_flipped_visible_area(screen_device &screen);
196195};
197196
198197READ16_MEMBER(vamphalf_state::eeprom_r)
r241457r241458
609608Offset+3
610609-------x xxxxxxxx X offs
611610*/
612void vamphalf_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap)
611static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap)
613612{
614   gfx_element *gfx = m_gfxdecode->gfx(0);
613   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
614   gfx_element *gfx = state->m_gfxdecode->gfx(0);
615615   UINT32 cnt;
616616   int block, offs;
617617   int code,color,x,y,fx,fy;
r241457r241458
622622
623623   for (block=0; block<0x8000; block+=0x800)
624624   {
625      if(m_flipscreen)
625      if(state->m_flipscreen)
626626      {
627627         clip.min_y = 256 - (16-(block/0x800))*16;
628628         clip.max_y = 256 - ((16-(block/0x800))*16)+15;
r241457r241458
644644         offs = (block + cnt) / 2;
645645
646646         // 16bit version
647         if(m_tiles != NULL)
647         if(state->m_tiles != NULL)
648648         {
649            if(m_tiles[offs] & 0x0100) continue;
649            if(state->m_tiles[offs] & 0x0100) continue;
650650
651            code  = m_tiles[offs+1];
652            color = (m_tiles[offs+2] >> m_palshift) & 0x7f;
651            code  = state->m_tiles[offs+1];
652            color = (state->m_tiles[offs+2] >> state->m_palshift) & 0x7f;
653653
654654            // boonggab
655            if(m_has_extra_gfx)
655            if(state->m_has_extra_gfx)
656656            {
657               code  |= ((m_tiles[offs+2] & 0x100) << 8);
657               code  |= ((state->m_tiles[offs+2] & 0x100) << 8);
658658            }
659659
660            x = m_tiles[offs+3] & 0x01ff;
661            y = 256 - (m_tiles[offs] & 0x00ff);
660            x = state->m_tiles[offs+3] & 0x01ff;
661            y = 256 - (state->m_tiles[offs] & 0x00ff);
662662
663            fx = m_tiles[offs] & 0x8000;
664            fy = m_tiles[offs] & 0x4000;
663            fx = state->m_tiles[offs] & 0x8000;
664            fy = state->m_tiles[offs] & 0x4000;
665665         }
666666         // 32bit version
667667         else
668668         {
669669            offs /= 2;
670670
671            if(m_tiles32[offs] & 0x01000000) continue;
671            if(state->m_tiles32[offs] & 0x01000000) continue;
672672
673            code  = m_tiles32[offs] & 0xffff;
674            color = ((m_tiles32[offs+1] >> m_palshift) & 0x7f0000) >> 16;
673            code  = state->m_tiles32[offs] & 0xffff;
674            color = ((state->m_tiles32[offs+1] >> state->m_palshift) & 0x7f0000) >> 16;
675675
676            x = m_tiles32[offs+1] & 0x01ff;
677            y = 256 - ((m_tiles32[offs] & 0x00ff0000) >> 16);
676            x = state->m_tiles32[offs+1] & 0x01ff;
677            y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16);
678678
679            fx = m_tiles32[offs] & 0x80000000;
680            fy = m_tiles32[offs] & 0x40000000;
679            fx = state->m_tiles32[offs] & 0x80000000;
680            fy = state->m_tiles32[offs] & 0x40000000;
681681         }
682682
683         if(m_flipscreen)
683         if(state->m_flipscreen)
684684         {
685685            fx = !fx;
686686            fy = !fy;
r241457r241458
694694   }
695695}
696696
697void vamphalf_state::draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap)
697static void draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap)
698698{
699   gfx_element *gfx = m_gfxdecode->gfx(0);
699   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
700   gfx_element *gfx = state->m_gfxdecode->gfx(0);
700701   UINT32 cnt;
701702   int block, offs;
702703   int code,color,x,y,fx,fy;
r241457r241458
707708
708709   for (block=0; block<0x8000; block+=0x800)
709710   {
710      if(m_flipscreen)
711      if(state->m_flipscreen)
711712      {
712713         clip.min_y = 256 - (16-(block/0x800))*16;
713714         clip.max_y = 256 - ((16-(block/0x800))*16)+15;
r241457r241458
730731         offs = (block + cnt) / 2;
731732         {
732733            offs /= 2;
733            code  = (m_tiles32[offs] & 0xffff) | ((m_tiles32[offs] & 0x3000000) >> 8);
734            color = ((m_tiles32[offs+1] >> m_palshift) & 0x7f0000) >> 16;
734            code  = (state->m_tiles32[offs] & 0xffff) | ((state->m_tiles32[offs] & 0x3000000) >> 8);
735            color = ((state->m_tiles32[offs+1] >> state->m_palshift) & 0x7f0000) >> 16;
735736
736            x = m_tiles32[offs+1] & 0x01ff;
737            y = 256 - ((m_tiles32[offs] & 0x00ff0000) >> 16);
737            x = state->m_tiles32[offs+1] & 0x01ff;
738            y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16);
738739
739            fx = m_tiles32[offs] & 0x4000000;
740            fy = 0; // not used ? or it's m_tiles32[offs] & 0x8000000?
740            fx = state->m_tiles32[offs] & 0x4000000;
741            fy = 0; // not used ? or it's state->m_tiles32[offs] & 0x8000000?
741742         }
742743
743         if(m_flipscreen)
744         if(state->m_flipscreen)
744745         {
745746            fx = !fx;
746747            fy = !fy;
r241457r241458
755756}
756757
757758
758void vamphalf_state::handle_flipped_visible_area( screen_device &screen )
759void vamphalf_handle_flipped_visible_area( screen_device &screen )
759760{
761   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
760762   // are there actually registers to handle this?
761   if(!m_flipscreen)
763   if(!state->m_flipscreen)
762764   {
763765      rectangle visarea;
764766      visarea.set(31, 350, 16, 251);
r241457r241458
775777
776778UINT32 vamphalf_state::screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
777779{
778   handle_flipped_visible_area(screen);
780   vamphalf_handle_flipped_visible_area(screen);
779781   bitmap.fill(0, cliprect);
780782   draw_sprites(screen, bitmap);
781783   return 0;
r241457r241458
783785
784786UINT32 vamphalf_state::screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
785787{
786//  handle_flipped_visible_area(screen); // not on this?
788//  vamphalf_handle_flipped_visible_area(screen); // not on this?
787789   bitmap.fill(0, cliprect);
788790   draw_sprites_aoh(screen, bitmap);
789791   return 0;
trunk/src/mess/drivers/astrocde.c
r241457r241458
1212#include "includes/astrocde.h"
1313#include "machine/ram.h"
1414#include "sound/astrocde.h"
15#include "bus/astrocde/slot.h"
16#include "bus/astrocde/rom.h"
15#include "bus/generic/slot.h"
16#include "bus/generic/carts.h"
1717
1818class astrocde_mess_state : public astrocde_state
1919{
r241457r241458
2323      m_cart(*this, "cartslot")
2424      { }
2525
26   required_device<astrocade_cart_slot_device> m_cart;
26   required_device<generic_slot_device> m_cart;
2727   void get_ram_expansion_settings(int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end);
2828   DECLARE_MACHINE_START(astrocde);
2929   DECLARE_MACHINE_RESET(astrocde);
r241457r241458
251251 *
252252 *************************************/
253253
254static SLOT_INTERFACE_START(astrocade_cart)
255   SLOT_INTERFACE_INTERNAL("rom",       ASTROCADE_ROM_STD)
256   SLOT_INTERFACE_INTERNAL("rom_256k",  ASTROCADE_ROM_256K)
257   SLOT_INTERFACE_INTERNAL("rom_512k",  ASTROCADE_ROM_512K)
258SLOT_INTERFACE_END
259
260
261254static MACHINE_CONFIG_START( astrocde, astrocde_mess_state )
262255   /* basic machine hardware */
263256   MCFG_CPU_ADD("maincpu", Z80, ASTROCADE_CLOCK/4)        /* 1.789 MHz */
r241457r241458
286279   MCFG_RAM_DEFAULT_SIZE("32k")
287280
288281   /* cartridge */
289   MCFG_ASTROCADE_CARTRIDGE_ADD("cartslot", astrocade_cart, NULL)
282   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "astrocde_cart")
290283
291284   /* Software lists */
292285   MCFG_SOFTWARE_LIST_ADD("cart_list","astrocde")
r241457r241458
328321MACHINE_START_MEMBER(astrocde_mess_state, astrocde)
329322{
330323   if (m_cart->exists())
331      m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(astrocade_cart_slot_device::read_rom),(astrocade_cart_slot_device*)m_cart));
324      m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
332325}
333326
334327MACHINE_RESET_MEMBER(astrocde_mess_state, astrocde)
trunk/src/mess/drivers/ti85.c
r241457r241458
11/***************************************************************************
22TI-85 and TI-86 drivers by Krzysztof Strzecha
3TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
43
54Notes:
651. After start TI-85 waits for ON key interrupt, so press ON key to start
r241457r241458
343342   AM_RANGE(0x200000, 0x21BFFF) AM_RAM AM_SHARE("nvram")
344343ADDRESS_MAP_END
345344
346
347static ADDRESS_MAP_START( ti84p_banked_mem , AS_PROGRAM, 8, ti85_state )
348   AM_RANGE(0x0000, 0xfffff) AM_DEVREADWRITE("flash", intelfsh8_device, read, write)
349   AM_RANGE(0x200000, 0x21BFFF) AM_RAM AM_SHARE("nvram")
350ADDRESS_MAP_END
351
352345static ADDRESS_MAP_START( ti83p_banked_mem , AS_PROGRAM, 8, ti85_state )
353346   AM_RANGE(0x00000, 0x7ffff) AM_DEVREADWRITE("flash", intelfsh8_device, read, write)
354347   AM_RANGE(0x100000, 0x107fff) AM_RAM AM_SHARE("nvram")
r241457r241458
737730   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
738731
739732   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti83pse )
733   MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti83pse )
740734   MCFG_DEVICE_REPLACE("flash", FUJITSU_29F160T, 0)
741735
742736   //MCFG_TI83PSERIAL_ADD( "tiserial" )
743737MACHINE_CONFIG_END
744738
745739static MACHINE_CONFIG_DERIVED( ti84p, ti83pse )
746    MCFG_DEVICE_MODIFY("membank1")
747   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
748
749   MCFG_DEVICE_MODIFY("membank2")
750   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
751
752   MCFG_DEVICE_MODIFY("membank3")
753   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
754
755   MCFG_DEVICE_MODIFY("membank4")
756   MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
757
758   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84p )
759    MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
740   MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
741   //MCFG_TI83PSERIAL_ADD( "tiserial" )
760742MACHINE_CONFIG_END
761743
762static MACHINE_CONFIG_DERIVED( ti84pse, ti83pse )
763   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84pse )
764MACHINE_CONFIG_END
765744
766745static MACHINE_CONFIG_DERIVED( ti73, ti83p )
767746   //MCFG_DEVICE_REMOVE( "tiserial" )
r241457r241458
909888ROM_END
910889
911890ROM_START (ti84p)
912    ROM_REGION (0x100000, "flash",0)
913    ROM_DEFAULT_BIOS("b100v255mp")
914    ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" )
915    ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) )
891   ROM_REGION (0x100000, "flash",0)
892   ROM_DEFAULT_BIOS("v241")
893   ROM_SYSTEM_BIOS( 0, "v241", "V 2.41" )
894   ROMX_LOAD( "ti84v241.bin", 0x00000, 0x100000, CRC(5758db36) SHA1(7daa4f22e9b5dc8a1cc8fd31bceece9fa8b43515), ROM_BIOS(1) )
916895ROM_END
917896
897
918898/*    YEAR  NAME        PARENT  COMPAT  MACHINE INPUT   INIT   COMPANY                 FULLNAME                        FLAGS */
919899COMP( 1990, ti81,       0,      0,      ti81,   ti81, driver_device,   0,     "Texas Instruments",    "TI-81",                        GAME_NO_SOUND )
920900COMP( 1992, ti85,       0,      0,      ti85d,  ti85, driver_device,   0,     "Texas Instruments",    "TI-85",                        GAME_NO_SOUND )
r241457r241458
926906COMP( 1999, ti83p,      0,      0,      ti83p,  ti82, driver_device,   0,     "Texas Instruments",    "TI-83 Plus",                   GAME_NO_SOUND )
927907COMP( 2001, ti83pse,    0,      0,      ti83pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-83 Plus Silver Edition", GAME_NO_SOUND )
928908COMP( 2004, ti84p,      0,      0,      ti84p,   ti82, driver_device,   0,   "Texas Instruments",    "TI-84 Plus",                    GAME_NO_SOUND )
929COMP( 2004, ti84pse,    0,      0,      ti84pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-84 Plus Silver Edition", GAME_NO_SOUND )
909COMP( 2004, ti84pse,    0,      0,      ti83pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-84 Plus Silver Edition", GAME_NO_SOUND )
trunk/src/mess/includes/ti85.h
r241457r241458
1616
1717
1818/* model */
19enum ti85_model {
19typedef enum {
2020   TI81,
2121   TI81v2,
2222   TI82,
r241457r241458
2727   TI83PSE,
2828   TI84P,
2929   TI84PSE
30};
30} ti85_models;
3131
3232typedef struct
3333{
r241457r241458
7474   optional_device<address_map_bank_device> m_membank3;
7575   optional_device<address_map_bank_device> m_membank4;
7676
77   ti85_model m_model;
78
7977   UINT8 m_LCD_memory_base;
8078   UINT8 m_LCD_contrast;
8179   UINT8 m_LCD_status;
r241457r241458
169167   DECLARE_PALETTE_INIT(ti85);
170168   DECLARE_MACHINE_RESET(ti85);
171169   DECLARE_MACHINE_RESET(ti83p);
170   DECLARE_MACHINE_RESET(ti83pse);
172171   DECLARE_PALETTE_INIT(ti82);
173172   DECLARE_MACHINE_START(ti86);
174173   DECLARE_MACHINE_START(ti83p);
175174   DECLARE_MACHINE_START(ti83pse);
176   DECLARE_MACHINE_START(ti84pse);
177   DECLARE_MACHINE_START(ti84p);
178   void ti8xpse_init_common();
179
180175   UINT32 screen_update_ti85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
181176   TIMER_CALLBACK_MEMBER(ti85_timer_callback);
182177   TIMER_CALLBACK_MEMBER(ti83_timer1_callback);
trunk/src/mess/machine/ti85.c
r241457r241458
11/***************************************************************************
22  TI-85 driver by Krzysztof Strzecha
3  TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
43
54  Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
65  I/O ports)
r241457r241458
237236
238237void ti85_state::machine_start()
239238{
240   m_model = TI85;
241
242239   address_space &space = m_maincpu->space(AS_PROGRAM);
243240   m_bios = memregion("bios")->base();
244241
r241457r241458
280277   m_PCR = 0xc0;
281278
282279   m_ti8x_memory_page_0 = 0;//0x1f;
280   m_ti8x_memory_page_1 = 0x1f;
281   m_ti8x_memory_page_2 = 0;
282   m_ti8x_memory_page_3 = 0;
283   m_ti83p_port4 = 1;
284   update_ti83p_memory();
283285
284    if (m_model == TI83P)
285    {
286        m_ti8x_memory_page_1 = 0x1f;
287    }
288    else if (m_model == TI84P)
289    {
290        m_ti8x_memory_page_1 = 0x3f;
291    }
292    else
293    {
294       m_ti8x_memory_page_1 = 0x7f;
295    }
286   m_maincpu->set_pc(0x8000);
287}
296288
289MACHINE_RESET_MEMBER(ti85_state,ti83pse)
290{
291   m_red_out = 0x00;
292   m_white_out = 0x00;
293   m_PCR = 0xc0;
294
295   m_ti8x_memory_page_0 = 0;//0x1f;
296   m_ti8x_memory_page_1 = 0x7f;
297297   m_ti8x_memory_page_2 = 0;
298298   m_ti8x_memory_page_3 = 0;
299299   m_ti83p_port4 = 1;
300   if (m_model == TI83P)
301    {
302        update_ti83p_memory();
303    }
304    else
305    {
306        update_ti83pse_memory();
307    }
300   update_ti83pse_memory();
308301
309302   m_maincpu->set_pc(0x8000);
310303}
311304
312305MACHINE_START_MEMBER(ti85_state,ti83p)
313306{
314   m_model = TI83P;
315307   //address_space &space = m_maincpu->space(AS_PROGRAM);
316308   //m_bios = memregion("flash")->base();
317309
r241457r241458
334326   m_ti83p_port4 = 1;
335327   m_flash_unlocked = 0;
336328
337    ti85_state::update_ti83p_memory();
338   m_maincpu->set_pc(0x8000); //this is a hack due to incomplete memory mapping emulation
329   ti85_state::update_ti83p_memory ();
339330
340
341331   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
342332   machine().scheduler().timer_pulse(attotime::from_hz(512), timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback),this));
343333
344
345   /* save states and debugging */
346   save_item(NAME(m_timer_interrupt_status));
347    save_item(NAME(m_timer_interrupt_mask));
334      /* save states and debugging */
335   save_item(NAME(m_timer_interrupt_mask));
348336   save_item(NAME(m_ti8x_memory_page_0));
349337   save_item(NAME(m_ti8x_memory_page_1));
350338   save_item(NAME(m_ti8x_memory_page_2));
r241457r241458
352340   save_item(NAME(m_ti83p_port4));
353341}
354342
355void ti85_state::ti8xpse_init_common()
343MACHINE_START_MEMBER(ti85_state,ti83pse)
356344{
357345   //address_space &space = m_maincpu->space(AS_PROGRAM);
358346   //address_space &asic =  ADDRESS_MAP_NAME(ti83p_asic_mem);
r241457r241458
364352   m_ON_interrupt_status = 0;
365353   m_ON_pressed = 0;
366354   m_ti8x_memory_page_0 = 00;//0x7f;
367   m_ti8x_memory_page_1 = (m_model != TI84P ) ? 0x7f : 0x3f ;
355   m_ti8x_memory_page_1 = 0x7f;
368356   m_ti8x_memory_page_2 = 0;
369357   m_ti8x_memory_page_3 = 0;
370358   m_LCD_memory_base = 0;
r241457r241458
377365   m_ti83p_port4 = 1;
378366   m_flash_unlocked = 0;
379367
380   ti85_state::update_ti83pse_memory();
381   m_maincpu->set_pc(0x8000);//same as above, hack to work around incomplete memory mapping emulation
368   ti85_state::update_ti83p_memory();
369   m_maincpu->set_pc(0x8000);
382370
383371
384372   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
r241457r241458
388376   m_crystal_timer2 = timer_alloc(CRYSTAL_TIMER2);
389377   m_crystal_timer3 = timer_alloc(CRYSTAL_TIMER3);
390378
391      /* save states and debugging */
379   /* save states and debugging */
392380   save_item(NAME(m_ctimer_interrupt_status));
393381   save_item(NAME(m_timer_interrupt_status));
394382   save_item(NAME(m_ti8x_memory_page_0));
r241457r241458
398386   save_item(NAME(m_ti83p_port4));
399387}
400388
401
402MACHINE_START_MEMBER(ti85_state,ti83pse)
403{
404    m_model = TI84PSE;
405
406    ti8xpse_init_common();
407}
408
409MACHINE_START_MEMBER(ti85_state,ti84pse)
410{
411    m_model = TI83PSE;
412
413    ti8xpse_init_common();
414}
415
416MACHINE_START_MEMBER(ti85_state,ti84p)
417{
418    m_model = TI84P;
419
420   ti8xpse_init_common();
421}
422
423389MACHINE_START_MEMBER(ti85_state,ti86)
424390{
425391   address_space &space = m_maincpu->space(AS_PROGRAM);
r241457r241458
797763
798764WRITE8_MEMBER(ti85_state::ti83pse_port_0006_w)
799765{
800
801   if ((m_model == TI84P) && (data < 0x80))
802   {
803      m_ti8x_memory_page_1 = data & 0x3f;
804   }
805   else
806   {
807      m_ti8x_memory_page_1 = data;
808   }
766   m_ti8x_memory_page_1 = data; //& ((data&0x80) ? 0x41 : 0x7f);
809767   update_ti83pse_memory();
810768}
811769
812770WRITE8_MEMBER(ti85_state::ti83pse_port_0007_w)
813771{
814   if ((m_model == TI84P) && (data < 0x80))
815   {
816      m_ti8x_memory_page_2 = data & 0x3f;
817   }
818   else
819   {
820      m_ti8x_memory_page_2 = data;
821   }
772   m_ti8x_memory_page_2 = data; //& ((data&0x80) ? 0x41 : 0x7f);
822773   update_ti83pse_memory();
823774}
824775
trunk/src/mess/mess.lst
r241457r241458
10671067ti86      // 1997 TI-86 (Z80 6 MHz)
10681068ti83p    // 1999 TI-83 Plus (Z80 6 MHz)
10691069ti83pse   // 2001 TI-83 Plus Silver Edition
1070ti84p  // 2004 TI-84 Plus
1070//ti84p  // 2004 TI-84 Plus
10711071ti84pse   // 2004 TI-84 Plus Silver Edition
1072//ti84cse // 2013 TI-84 Plus C Silver Edition (color screen)
10731072ti89      // 1998 TI-89
10741073ti92      // 1995 TI-92
10751074ti92p    // 1999 TI-92 Plus
trunk/src/mess/mess.mak
r241457r241458
570570BUSES += ADAMNET
571571BUSES += APF
572572BUSES += ARCADIA
573BUSES += ASTROCADE
574573BUSES += BML3
575574BUSES += BW2
576575BUSES += C64


Previous 199869 Revisions Next


© 1997-2024 The MAME Team