Previous 199869 Revisions Next

r32947 Saturday 25th October, 2014 at 08:33:15 UTC by Miodrag Milanović
Merge branch 'patch-3' of https://github.com/plgDavid/mame into plgDavid-patch-3
[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.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
r241458r241459
55   <software name="280zzap">
66      <description>280 Zzzap / Dodgem</description>
77      <year>1978</year>
8      <publisher>Bally Mfg. Corp.</publisher>
8      <publisher>Bally</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" />
r241458r241459
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>Larry Hanson</publisher>
31      <publisher>&lt;unknown&gt;</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" />
r241458r241459
3939   <software name="amazmaze">
4040      <description>Amazing Maze / Tic-Tac-Toe</description>
4141      <year>1979</year>
42      <publisher>Bally Mfg. Corp.</publisher>
42      <publisher>Bally</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" />
r241458r241459
5050   <software name="artiduel">
5151      <description>Artillery Duel</description>
5252      <year>1982</year>
53      <publisher>Astrocade Inc.</publisher>
53      <publisher>Astrocade</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" />
r241458r241459
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
6194   <software name="artjello" supported="no">
6295      <description>Artillery Duel / O-Jello</description>
6396<!-- <note>This is one of several BASIC conversions sold by Mike White.  It requires cartridge swapping.</note> -->
r241458r241459
73106   <software name="astrobat">
74107      <description>Astro Battle</description>
75108      <year>1979</year>
76      <publisher>Bally Mfg. Corp.</publisher>
109      <publisher>Bally</publisher>
77110      <part name="cart" interface="astrocde_cart">
78111         <dataarea name="rom" size="4096">
79112            <rom name="astrobat.bin" size="4096" crc="0b5298bc" sha1="cdf7a2a8608c3e90d0cc8a4b751276b76de72f8c" offset="0" />
r241458r241459
85118      <description>Bally BASIC</description>
86119<!-- <note>The original release of BASIC used an external 300 baud interface (not emulated) to load and save programs.</note> -->
87120      <year>1978</year>
88      <publisher>Bally Mfg. Corp.</publisher>
121      <publisher>Bally</publisher>
89122      <part name="cart" interface="astrocde_cart">
90123         <dataarea name="rom" size="4096">
91124            <rom name="bbasic.bin" size="4096" crc="90e276aa" sha1="abb85bc19419a1d81c698884f81a53d85806885d" offset="0" />
r241458r241459
97130      <description>Bally BASIC (Astrovision)</description>
98131<!-- <note>The updated release of BASIC used an internal 2000 baud interface (not emulated) to load and save programs.</note> -->
99132      <year>1981</year>
100      <publisher>Astrovision Inc.</publisher>
133      <publisher>Astrovision</publisher>
101134      <part name="cart" interface="astrocde_cart">
102135         <dataarea name="rom" size="4096">
103136            <rom name="astrobas.bin" size="4096" crc="70514687" sha1="a2ac8995a6217b7190aa9b18f49261c0ed3c6b5a" offset="0" />
r241458r241459
108141   <software name="bbasdemo">
109142      <description>Bally BASIC Demo</description>
110143      <year>1978</year>
111      <publisher>Bally Mfg. Corp.</publisher>
144      <publisher>Bally</publisher>
112145      <part name="cart" interface="astrocde_cart">
113146         <dataarea name="rom" size="8192">
114147            <rom name="bbasdemo.bin" size="8192" crc="007e70d5" sha1="6ed1f49e6581ecea5328e3c5f99026afd7f1f7e4" offset="0" />
r241458r241459
142175
143176   <software name="colorbas">
144177      <description>Bally Color BASIC (Prototype)</description>
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> -->
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> -->
146179      <year>19??</year>
147      <publisher>Larry Hanson and Bally Mfg. Corp.</publisher>
180      <publisher>Bally</publisher>
148181      <part name="cart" interface="astrocde_cart">
149182         <dataarea name="rom" size="4096">
150183            <rom name="colorbas.bin" size="4096" crc="e1c30ede" sha1="7b5fa4cd585081c5d51127d32d02a33ed44b5843" offset="0" />
r241458r241459
155188   <software name="ballypin">
156189      <description>Bally Pin</description>
157190      <year>1979</year>
158      <publisher>Bally Mfg. Corp.</publisher>
191      <publisher>Bally</publisher>
159192      <part name="cart" interface="astrocde_cart">
160193         <dataarea name="rom" size="4096">
161194            <rom name="ballypin.bin" size="4096" crc="3f431613" sha1="05b680777aa9639620c790f0590d96416d49bf94" offset="0" />
r241458r241459
178211   <software name="biorhy">
179212      <description>BioRhythm</description>
180213      <year>1981</year>
181      <publisher>Astrovision Inc.</publisher>
214      <publisher>Astrovision</publisher>
182215      <part name="cart" interface="astrocde_cart">
183216         <dataarea name="rom" size="4096">
184217            <rom name="biorhy.bin" size="4096" crc="fc4bd27c" sha1="1ba84a04ea5d7d87c213d978fecc188a4a8517a6" offset="0" />
r241458r241459
189222   <software name="blckjack">
190223      <description>Black Jack / Acey Deucey / Poker</description>
191224      <year>1979</year>
192      <publisher>Bally Mfg. Corp.</publisher>
225      <publisher>Bally</publisher>
193226      <part name="cart" interface="astrocde_cart">
194227         <dataarea name="rom" size="4096">
195228            <rom name="blckjack.bin" size="4096" crc="78d45a11" sha1="7b92e3ad161e31926a730780d1f28015310dd7d7" offset="0" />
r241458r241459
197230      </part>
198231   </software>
199232
200   <software name="brbsic10">
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">
201246      <description>Blue RAM BASIC 1.0</description>
202247      <!-- <note>Requires RAM expansion</note> -->
203248      <year>1980</year>
r241458r241459
209254      </part>
210255   </software>
211256
212   <software name="brbsic11">
257   <software name="brb11">
213258      <description>Blue RAM BASIC 1.1</description>
214259      <!-- <note>Requires RAM expansion</note> -->
215260      <year>1981</year>
r241458r241459
247292   <software name="bowling">
248293      <description>Bowling (Prototype)</description>
249294      <year>198?</year>
250      <publisher>Astrocade Inc.</publisher>
295      <publisher>Astrocade</publisher>
251296      <part name="cart" interface="astrocde_cart">
252297         <dataarea name="rom" size="4096">
253298            <rom name="bowling.bin" size="4096" crc="1f8bc8ba" sha1="de27100803a414989d538ca34fc1b3e122dfac78" offset="0" />
r241458r241459
258303   <software name="brckyard">
259304      <description>Brickyard / Clowns</description>
260305      <year>1978</year>
261      <publisher>Bally Mfg. Corp.</publisher>
306      <publisher>Bally</publisher>
262307      <part name="cart" interface="astrocde_cart">
263308         <dataarea name="rom" size="4096">
264309            <rom name="brckyard.bin" size="4096" crc="28f9e502" sha1="4c1a9efcd4435f6a79dc2212c4d0d17ea753809c" offset="0" />
r241458r241459
292337   <software name="checkers">
293338      <description>Checkers (Prototype)</description>
294339      <year>19??</year>
295      <publisher>Bally Mfg. Corp.</publisher>
340      <publisher>Bally</publisher>
296341      <part name="cart" interface="astrocde_cart">
297342         <dataarea name="rom" size="2048">
298343            <rom name="checkers.bin" size="2048" crc="757bab8f" sha1="9ef927e88e3f799276966b569c2402f6b25be416" offset="0" />
r241458r241459
339384   <software name="colbook">
340385      <description>Coloring Book (Prototype)</description>
341386      <year>198?</year>
342      <publisher>Astrocade Inc.</publisher>
387      <publisher>Astrocade</publisher>
343388      <part name="cart" interface="astrocde_cart">
344389         <dataarea name="rom" size="8192">
345390            <rom name="colbook.bin" size="8192" crc="14f36aba" sha1="41eaaa061ed47996219b70bc0ed7d6a19c4b3c28" offset="0" />
r241458r241459
349394
350395   <software name="conan">
351396      <description>Conan The Barbarian!</description>
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> -->
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> -->
353398      <year>1985</year>
354      <publisher>Astrocade Inc. and Dave Carson Software</publisher>
399      <publisher>Astrocade and Dave Carson Software</publisher>
355400      <part name="cart" interface="astrocde_cart">
356401         <dataarea name="rom" size="8192">
357402            <rom name="conan.bin" size="8192" crc="8a6adbfe" sha1="8b0d3125b805d57b9958b0e7a4f0e9d1a70f6353" offset="0" />
r241458r241459
362407   <software name="conanp" cloneof="conan">
363408      <description>Conan The Barbarian! (Prototype)</description>
364409      <year>1982</year>
365      <publisher>Astrocade Inc.</publisher>
410      <publisher>Astrocade</publisher>
366411      <part name="cart" interface="astrocde_cart">
367412         <dataarea name="rom" size="8192">
368413            <rom name="conanp.bin" size="8192" crc="15b1afea" sha1="bc4f757271fca69e0de3973f43d363c4474e2fb7" offset="0" />
r241458r241459
385430   <software name="cosmicrd">
386431      <description>Cosmic Raiders</description>
387432      <year>1983</year>
388      <publisher>Astrocade Inc.</publisher>
433      <publisher>Astrocade</publisher>
389434      <part name="cart" interface="astrocde_cart">
390435         <dataarea name="rom" size="8192">
391436            <rom name="cosmicrd.bin" size="8192" crc="2a77b3fb" sha1="09ae145e3dbfd132f5130a0cbb508f4fbcf35bee" offset="0" />
r241458r241459
396441   <software name="cosmicrda" cloneof="cosmicrd">
397442      <description>Cosmic Raiders (Proto, Alt)</description>
398443      <year>198?</year>
399      <publisher>Astrocade Inc.</publisher>
444      <publisher>Astrocade</publisher>
400445      <part name="cart" interface="astrocde_cart">
401446         <dataarea name="rom" size="8192">
402447            <rom name="cosmicra.bin" size="8192" crc="869b692e" sha1="b71b81eeaf10b59efb1b51d88b1e758305d5f1e4" offset="0" />
r241458r241459
407452   <software name="cosmicrdb" cloneof="cosmicrd">
408453      <description>Cosmic Raiders (Proto, Alt 2)</description>
409454      <year>198?</year>
410      <publisher>Astrocade Inc.</publisher>
455      <publisher>Astrocade</publisher>
411456      <part name="cart" interface="astrocde_cart">
412457         <dataarea name="rom" size="8192">
413458            <rom name="cosmica2.bin" size="8192" crc="37670f78" sha1="30044130dd3b41295351fa3905d53e26e52b3745" offset="0" />
r241458r241459
419464      <description>Cosmic Raiders (Proto v3.5)</description>
420465<!-- <note>An identical ROM was dumped from a cart labeled version 2.8.</note> -->
421466      <year>198?</year>
422      <publisher>Astrocade Inc.</publisher>
467      <publisher>Astrocade</publisher>
423468      <part name="cart" interface="astrocde_cart">
424469         <dataarea name="rom" size="8192">
425470            <rom name="cosmic35.bin" size="8192" crc="e3d723a0" sha1="337cdffe2260dc6d36d674fa35047cb5a3598bf9" offset="0" />
r241458r241459
430475   <software name="cosmicrd36" cloneof="cosmicrd">
431476      <description>Cosmic Raiders (Proto v3.6)</description>
432477      <year>198?</year>
433      <publisher>Astrocade Inc.</publisher>
478      <publisher>Astrocade</publisher>
434479      <part name="cart" interface="astrocde_cart">
435480         <dataarea name="rom" size="8192">
436481            <rom name="cosmic36.bin" size="8192" crc="00b6fe88" sha1="5a3772b8524361b174c761ef759659b4a63166fa" offset="0" />
r241458r241459
438483      </part>
439484   </software>
440485
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
441497   <software name="dealdemo">
442498      <description>Dealer Demo</description>
443499      <year>1978</year>
444      <publisher>Bally Mfg. Corp.</publisher>
500      <publisher>Bally</publisher>
445501      <part name="cart" interface="astrocde_cart">
446502         <dataarea name="rom" size="4096">
447503            <rom name="dealdemo.bin" size="4096" crc="16b77b44" sha1="302ad18ea17b12a474ebbba1a882d8aad8cf5e94" offset="0" />
r241458r241459
452508   <software name="dogpatch">
453509      <description>Dogpatch</description>
454510      <year>1980</year>
455      <publisher>Bally Mfg. Corp.</publisher>
511      <publisher>Bally</publisher>
456512      <part name="cart" interface="astrocde_cart">
457513         <dataarea name="rom" size="2048">
458514            <rom name="dogpatch.bin" size="2048" crc="77bed6ba" sha1="263e6372392bc37a2228eb455d1477dcd41d9104" offset="0" />
r241458r241459
472528   </software>
473529
474530   <software name="fawn">
475      <description>Fawn Dungeon (Prototype)</description>
531      <description>Fawn Dungeon (Prototype, first version)</description>
476532<!-- <note>Barry McCleave sent two prototype versions of this game to Arcadian editor Bob Fabris, but it was never completed.</note> -->
477533      <year>1981</year>
478534      <publisher>Barry McCleave</publisher>
r241458r241459
484540   </software>
485541
486542   <software name="fawna" cloneof="fawn">
487      <description>Fawn Dungeon (Prototype, Alt)</description>
543      <description>Fawn Dungeon (Prototype, second version)</description>
488544<!-- <note>Barry McCleave sent two prototype versions of this game to Arcadian editor Bob Fabris, but it was never completed.</note> -->
489545      <year>1981</year>
490546      <publisher>Barry McCleave</publisher>
r241458r241459
510566   <software name="football">
511567      <description>Football</description>
512568      <year>1978</year>
513      <publisher>Bally Mfg. Corp.</publisher>
569      <publisher>Bally</publisher>
514570      <part name="cart" interface="astrocde_cart">
515571         <dataarea name="rom" size="4096">
516572            <rom name="football.bin" size="4096" crc="fc8998a9" sha1="1d07b45162fab5497fe0a3d4ccb1b33bfd47177a" offset="0" />
r241458r241459
519575   </software>
520576
521577   <software name="ziggyjx">
522      <description>Fun With Vectors - Ziggy (JX label) (Prototype)</description>
578      <description>Fun With Vectors - Ziggy (Prototype JX label)</description>
523579<!-- <note>This demo comes from a collection of old ROMs released by Richard Degler.</note> -->
524580      <year>1985</year>
525581      <publisher>Richard Degler</publisher>
r241458r241459
531587   </software>
532588
533589   <software name="ziggymo">
534      <description>Fun With Vectors - Ziggy (MO label) (Prototype)</description>
590      <description>Fun With Vectors - Ziggy (Prototype MO label)</description>
535591<!-- <note>This demo comes from a collection of old ROMs released by Richard Degler.</note> -->
536592      <year>1985</year>
537593      <publisher>Richard Degler</publisher>
r241458r241459
545601   <software name="galactic">
546602      <description>Galactic Invasion</description>
547603      <year>1981</year>
548      <publisher>Astrovision Inc.</publisher>
604      <publisher>Astrovision</publisher>
549605      <part name="cart" interface="astrocde_cart">
550606         <dataarea name="rom" size="4096">
551607            <rom name="galactic.bin" size="4096" crc="ba558eb7" sha1="939857d621715b831d558bcb2fd2f0f9e9b37676" offset="0" />
r241458r241459
556612   <software name="galaxian">
557613      <description>Galaxian</description>
558614      <year>1981</year>
559      <publisher>Astrovision Inc.</publisher>
615      <publisher>Astrovision</publisher>
560616      <part name="cart" interface="astrocde_cart">
561617         <dataarea name="rom" size="4096">
562618            <rom name="galaxian.bin" size="4096" crc="d75e9672" sha1="fb13e40c9ebadcb68beb7294a732ecf1b2f2ec30" offset="0" />
r241458r241459
564620      </part>
565621   </software>
566622
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
567656   <software name="grandprx">
568657      <description>Grand Prix</description>
569658      <year>1981</year>
570      <publisher>Astrovision Inc.</publisher>
659      <publisher>Astrovision</publisher>
571660      <part name="cart" interface="astrocde_cart">
572661         <dataarea name="rom" size="4096">
573662            <rom name="grandprx.bin" size="4096" crc="7b3b7b70" sha1="fd133dc402b6ecbcc718ffb895a16e07979ab329" offset="0" />
r241458r241459
636725   <software name="lttrmtch">
637726      <description>Letter Match / Spell 'n Score / Crosswords</description>
638727      <year>1978</year>
639      <publisher>Bally Mfg. Corp.</publisher>
728      <publisher>Bally</publisher>
640729      <part name="cart" interface="astrocde_cart">
641730         <dataarea name="rom" size="4096">
642731            <rom name="lttrmtch.bin" size="4096" crc="2cf68f93" sha1="266f6978b8f9e6bad36dc21031193ca93cd55be4" offset="0" />
r241458r241459
678767      </part>
679768   </software>
680769
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
681781   <software name="matk">
682782      <description>Missile Attack</description>
683783      <!-- <note>Mike White sold a version of ICBM Attack hacked to work with a regular controller.</note> -->
r241458r241459
703803
704804   <software name="muncher">
705805      <description>Muncher</description>
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> -->
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> -->
707807      <year>1983</year>
708      <publisher>Astrocade Inc., Phillip Harris, and Alternative Engineering</publisher>
808      <publisher>Astrocade, Phillip Harris, and Alternative Engineering</publisher>
709809      <part name="cart" interface="astrocde_cart">
710810         <dataarea name="rom" size="8192">
711811            <rom name="muncher.bin" size="8192" crc="e4726657" sha1="02f37ded48b1fb9ba0a2d7e45f5b0a85eaecb1c8" offset="0" />
r241458r241459
715815
716816   <software name="musicmak">
717817      <description>Music Maker</description>
718<!-- <note>While Astrocade Inc. never released Music Maker, it was eventually published by Dave Carson Software, which added its own copyright screen.</note> -->
818<!-- <note>While Astrocade never released Music Maker, it was eventually published by Dave Carson Software, which added its own copyright screen.</note> -->
719819      <year>1985</year>
720      <publisher>Astrocade Inc. and Dave Carson Software</publisher>
820      <publisher>Astrocade and Dave Carson Software</publisher>
721821      <part name="cart" interface="astrocde_cart">
722822         <dataarea name="rom" size="8192">
723823            <rom name="musicmak.bin" size="8192" crc="b242ef84" sha1="8101424ebbc2a31d7e750b6d00f01e657fd97cf8" offset="0" />
r241458r241459
726826   </software>
727827
728828   <software name="musicmakp" cloneof="musicmak">
729      <description>Music Maker v3.7 (Prototype)</description>
829      <description>Music Maker (Prototype v3.7)</description>
730830      <year>1982</year>
731      <publisher>Astrocade Inc.</publisher>
831      <publisher>Astrocade</publisher>
732832      <part name="cart" interface="astrocde_cart">
733833         <dataarea name="rom" size="8192">
734834            <rom name="musicmap.bin" size="8192" crc="a76828d0" sha1="924cecf006f91bf49f2bcc1e14c55646a0ee93ff" offset="0" />
r241458r241459
736836      </part>
737837   </software>
738838
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>
839   <software name="musicmakp2" cloneof="musicmak">
840      <description>Music Maker (Prototype Alt)</description>
841      <year>1982</year>
842      <publisher>Astrocade</publisher>
744843      <part name="cart" interface="astrocde_cart">
745844         <dataarea name="rom" size="8192">
746            <rom name="nodie.bin" size="8192" crc="784b256a" sha1="8dd34f2428a65ac590a26b25904a96e6f04e01d2" offset="0" />
845            <rom name="music maker (1981)(astrocade inc.)(proto).bin" size="7376" crc="cc97a150" sha1="6a35509709497151f4f810a958fc5abf3852afc6" offset="0" />
747846         </dataarea>
748847      </part>
749848   </software>
750849
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>
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>
756855      <part name="cart" interface="astrocde_cart">
757856         <dataarea name="rom" size="8192">
758            <rom name="pacman.bin" size="8192" crc="17363546" sha1="3d0e2b3fc4adfd0297a609bd78eb8b557414ea23" offset="0" />
857            <rom name="nodie.bin" size="8192" crc="784b256a" sha1="8dd34f2428a65ac590a26b25904a96e6f04e01d2" offset="0" />
759858         </dataarea>
760859      </part>
761860   </software>
r241458r241459
784883      </part>
785884   </software>
786885
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
787920   <software name="paperbck">
788921      <description>Paperback Writer (Prototype)</description>
789922      <year>1986</year>
r241458r241459
798931   <software name="pirate">
799932      <description>Pirate's Chase</description>
800933      <year>1982</year>
801      <publisher>Astrocade Inc.</publisher>
934      <publisher>Astrocade</publisher>
802935      <part name="cart" interface="astrocde_cart">
803936         <dataarea name="rom" size="4096">
804937            <rom name="pirate.bin" size="4096" crc="7b1b206a" sha1="3ad79a4381441c7f28479ad6b50c9105ca1ba7e4" offset="0" />
r241458r241459
826959
827960   <software name="rainbow2">
828961      <description>Rainbow v2 (Prototype)</description>
829<!-- <note>This prototype was found in the collection of Arcadian editor Bob Fabris. The first version has not been found.</note> -->
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> -->
830963      <year>19??</year>
831      <publisher>Larry Hanson</publisher>
964      <publisher>Hanson</publisher>
832965      <part name="cart" interface="astrocde_cart">
833966         <dataarea name="rom" size="2048">
834967            <rom name="rainbow2.bin" size="2048" crc="3883484a" sha1="888d0de155b53606466393560119ea355edd11ce" offset="0" />
r241458r241459
839972   <software name="redbaron">
840973      <description>Red Baron / Panzer Attack</description>
841974      <year>1978</year>
842      <publisher>Bally Mfg. Corp.</publisher>
975      <publisher>Bally</publisher>
843976      <part name="cart" interface="astrocde_cart">
844977         <dataarea name="rom" size="4096">
845978            <rom name="redbaron.bin" size="4096" crc="a1c7e129" sha1="e0602c7485f511d6aa29d669967b101de79ddb15" offset="0" />
r241458r241459
8731006   <software name="seawolf">
8741007      <description>Seawolf / Missile</description>
8751008      <year>1978</year>
876      <publisher>Bally Mfg. Corp.</publisher>
1009      <publisher>Bally</publisher>
8771010      <part name="cart" interface="astrocde_cart">
8781011         <dataarea name="rom" size="2048">
8791012            <rom name="seawolf.bin" size="2048" crc="a021735e" sha1="4c2ca46ab5a00dc2eb252ee900b2760b758a2162" offset="0" />
r241458r241459
9421075   <software name="soccerp">
9431076      <description>Soccer (Prototype)</description>
9441077      <year>198?</year>
945      <publisher>Astrocade Inc.</publisher>
1078      <publisher>Astrocade</publisher>
9461079      <part name="cart" interface="astrocde_cart">
9471080         <dataarea name="rom" size="8192">
9481081            <rom name="soccerp.bin" size="8192" crc="7de08d9a" sha1="955b138b4db95e8a7c35ff958724440bd75d5fc2" offset="0" />
r241458r241459
9541087      <description>Soccer (Prototype, Alt)</description>
9551088<!-- <note>Dumped from a cart labeled 'Soccer / Dribbling'.</note> -->
9561089      <year>198?</year>
957      <publisher>Astrocade Inc.</publisher>
1090      <publisher>Astrocade</publisher>
9581091      <part name="cart" interface="astrocde_cart">
9591092         <dataarea name="rom" size="4096">
9601093            <rom name="soccera.bin" size="4096" crc="fd633ca9" sha1="39ac51f18eb6ceb8e1f766f4d13d4c0ed7af1f85" offset="0" />
r241458r241459
9661099      <description>Soccer (Prototype, Alt 2)</description>
9671100<!-- <note>Dumped from a cart labeled 'Soccer 8-5'.</note> -->
9681101      <year>198?</year>
969      <publisher>Astrocade Inc.</publisher>
1102      <publisher>Astrocade</publisher>
9701103      <part name="cart" interface="astrocde_cart">
9711104         <dataarea name="rom" size="8192">
9721105            <rom name="soccera2.bin" size="8192" crc="7c2858dd" sha1="a6fd25d85124e4c3f005f25c067a0b60a7a617c3" offset="0" />
r241458r241459
9771110   <software name="soccera3">
9781111      <description>Soccer (Prototype, Alt 3)</description>
9791112      <year>198?</year>
980      <publisher>Astrocade Inc.</publisher>
1113      <publisher>Astrocade</publisher>
9811114      <part name="cart" interface="astrocde_cart">
9821115         <dataarea name="rom" size="8192">
9831116            <rom name="soccera3.bin" size="8192" crc="5cb41426" sha1="a6cee6a0bc7a7bfe506b1089b431629e8b57dc04" offset="0" />
r241458r241459
9881121   <software name="soccera4">
9891122      <description>Soccer (Prototype, Alt 4)</description>
9901123      <year>198?</year>
991      <publisher>Astrocade Inc.</publisher>
1124      <publisher>Astrocade</publisher>
9921125      <part name="cart" interface="astrocde_cart">
9931126         <dataarea name="rom" size="8192">
9941127            <rom name="soccera4.bin" size="8192" crc="4f5e93d5" sha1="5ea2b708df06b09abd63b58e03229efecb98d464" offset="0" />
r241458r241459
9991132   <software name="solarcnq">
10001133      <description>Solar Conqueror</description>
10011134      <year>1983</year>
1002      <publisher>Astrocade Inc.</publisher>
1135      <publisher>Astrocade</publisher>
10031136      <part name="cart" interface="astrocde_cart">
10041137         <dataarea name="rom" size="8192">
10051138            <rom name="scnquer.bin" size="8192" crc="d15ce025" sha1="3185285687a1b4f643329bea94cba398e1b3ed4b" offset="0" />
r241458r241459
10101143   <software name="solarcnqp28" cloneof="solarcnq">
10111144      <description>Solar Conqueror (Prototype v2.8)</description>
10121145      <year>198?</year>
1013      <publisher>Astrocade Inc.</publisher>
1146      <publisher>Astrocade</publisher>
10141147      <part name="cart" interface="astrocde_cart">
10151148         <dataarea name="rom" size="8192">
10161149            <rom name="scquer28.bin" size="8192" crc="0709b022" sha1="90900ec2c1fb9d476db22fd479400a6315230f9f" offset="0" />
r241458r241459
10211154   <software name="solarcnqp39" cloneof="solarcnq">
10221155      <description>Solar Conqueror (Prototype v3.9)</description>
10231156      <year>198?</year>
1024      <publisher>Astrocade Inc.</publisher>
1157      <publisher>Astrocade</publisher>
10251158      <part name="cart" interface="astrocde_cart">
10261159         <dataarea name="rom" size="8192">
10271160            <rom name="scquer39.bin" size="8192" crc="8612cc7a" sha1="eba87f0296ff0759eb25a094ea98fd05d9eb91b6" offset="0" />
r241458r241459
10331166      <description>Solar Conqueror (Prototype)</description>
10341167<!-- <note>Dumped from a cart labeled 'Solar Conquer CES Chicago 1982'.</note> -->
10351168      <year>1982</year>
1036      <publisher>Astrocade Inc.</publisher>
1169      <publisher>Astrocade</publisher>
10371170      <part name="cart" interface="astrocde_cart">
10381171         <dataarea name="rom" size="8192">
10391172            <rom name="scquerp.bin" size="8192" crc="4a229478" sha1="99139da1e5b8a52251033de6902b537d3f9ab6bc" offset="0" />
r241458r241459
10441177   <software name="songs">
10451178      <description>Songs (Prototype)</description>
10461179      <year>19??</year>
1047      <publisher>Bally Mfg. Corp.</publisher>
1180      <publisher>Bally</publisher>
10481181      <part name="cart" interface="astrocde_cart">
10491182         <dataarea name="rom" size="4096">
10501183            <rom name="songs.bin" size="4096" crc="fe6182b3" sha1="a269b21309b7849b6a3e248417be9316db31e4e6" offset="0" />
r241458r241459
10521185      </part>
10531186   </software>
10541187
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
10551199   <software name="songsu" cloneof="songs">
10561200      <description>Songs (Prototype, Unfinished)</description>
10571201<!-- <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> -->
10581202      <year>19??</year>
1059      <publisher>Bally Mfg. Corp.</publisher>
1203      <publisher>Bally</publisher>
10601204      <part name="cart" interface="astrocde_cart">
10611205         <dataarea name="rom" size="8192">
10621206            <rom name="songsu.bin" size="8192" crc="16326f8c" sha1="c2f980f59367f4ff80c96fc173c83c0b29c1bc8f" offset="0" />
r241458r241459
10671211   <software name="spacefrt">
10681212      <description>Space Fortress</description>
10691213      <year>1981</year>
1070      <publisher>Astrocade Inc.</publisher>
1214      <publisher>Astrocade</publisher>
10711215      <part name="cart" interface="astrocde_cart">
10721216         <dataarea name="rom" size="4096">
10731217            <rom name="spacefrt.bin" size="4096" crc="519cc707" sha1="d1d4527128cad5446cdd4d4f0dfa7194cb50aaef" offset="0" />
r241458r241459
10751219      </part>
10761220   </software>
10771221
1078   <software name="invaders">
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">
10791234      <description>Space Invaders</description>
10801235      <year>1979</year>
1081      <publisher>Bally Mfg. Corp.</publisher>
1236      <publisher>Bally</publisher>
10821237      <part name="cart" interface="astrocde_cart">
10831238         <dataarea name="rom" size="4096">
10841239            <rom name="invaders.bin" size="4096" crc="52964c1f" sha1="aecaa45ed1d74ebf882120da75c006ae502e94c1" offset="0" />
r241458r241459
10861241      </part>
10871242   </software>
10881243
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
10891255   <software name="spedmath">
10901256      <description>Speed Math / Bingo Math</description>
10911257      <year>1978</year>
1092      <publisher>Bally Mfg. Corp.</publisher>
1258      <publisher>Bally</publisher>
10931259      <part name="cart" interface="astrocde_cart">
10941260         <dataarea name="rom" size="2048">
10951261            <rom name="spedmath.bin" size="2048" crc="7d30312a" sha1="8f500f1e2144169bb94214eaa2863dcf6590b926" offset="0" />
r241458r241459
11001266   <software name="starbttl">
11011267      <description>Star Battle</description>
11021268      <year>1979</year>
1103      <publisher>Bally Mfg. Corp.</publisher>
1269      <publisher>Bally</publisher>
11041270      <part name="cart" interface="astrocde_cart">
11051271         <dataarea name="rom" size="2048">
11061272            <rom name="starbttl.bin" size="2048" crc="d54a74c8" sha1="00f8c65ed73f6ce134c1e4e0af7c5aa91a287951" offset="0" />
r241458r241459
11121278      <description>Stweek</description>
11131279<!-- <note>This was an internal tool for developing sound effects.</note> -->
11141280      <year>19??</year>
1115      <publisher>Bally Mfg. Corp.</publisher>
1281      <publisher>Bally</publisher>
11161282      <part name="cart" interface="astrocde_cart">
11171283         <dataarea name="rom" size="2048">
11181284            <rom name="stweek.bin" size="2048" crc="e4f3766a" sha1="a8170dba7126ff6acb56686a46362bb36bebd799" offset="0" />
r241458r241459
11361302      <description>Tests</description>
11371303<!-- <note>This was an internal tool for testing hardware.</note> -->
11381304      <year>19??</year>
1139      <publisher>Bally Mfg. Corp.</publisher>
1305      <publisher>Bally</publisher>
11401306      <part name="cart" interface="astrocde_cart">
11411307         <dataarea name="rom" size="4096">
11421308            <rom name="tests.bin" size="4096" crc="49df19eb" sha1="581f592845ffca65f1336b521d03c57309a6f91c" offset="0" />
r241458r241459
11591325   <software name="wizard">
11601326      <description>The Incredible Wizard</description>
11611327      <year>1982</year>
1162      <publisher>Astrocade Inc.</publisher>
1328      <publisher>Astrocade</publisher>
11631329      <part name="cart" interface="astrocde_cart">
11641330         <dataarea name="rom" size="8192">
11651331            <rom name="wizard.bin" size="8192" crc="1395b130" sha1="da366390c91e24206b5034bc525e98f2a3ce5f86" offset="0" />
r241458r241459
11681334   </software>
11691335
11701336   <software name="wizardp" cloneof="wizard" supported="no">
1171      <description>The Incredible Wizard (Prototype)</description>
1337      <description>The Incredible Wizard (Prototype, Bad Dump)</description>
11721338<!-- <note>This was dumped from a working prototype cart, but the cart was sold before it was realized that the dump was bad.</note> -->
11731339      <year>198?</year>
1174      <publisher>Astrocade Inc.</publisher>
1340      <publisher>Astrocade</publisher>
11751341      <part name="cart" interface="astrocde_cart">
11761342         <dataarea name="rom" size="8192">
11771343            <rom name="wizardp.bin" size="8192" crc="a0cba256" sha1="262c731967b193ece4e1d395e7cb3e8ce9c4fc2c" offset="0" status="baddump"/>
r241458r241459
11821348   <software name="baseball">
11831349      <description>Tornado Baseball / Handball / Hockey / Tennis</description>
11841350      <year>1978</year>
1185      <publisher>Bally Mfg. Corp.</publisher>
1351      <publisher>Bally</publisher>
11861352      <part name="cart" interface="astrocde_cart">
11871353         <dataarea name="rom" size="4096">
11881354            <rom name="baseball.bin" size="4096" crc="5be548cc" sha1="4dda98d6cf257652fd179eca137b69b67e38b8c6" offset="0" />
r241458r241459
12491415      </part>
12501416   </software>
12511417
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
12521429   <software name="yahtgold" supported="no">
12531430      <description>Yahtzee / Golddigger</description>
12541431<!-- <note>This is one of several BASIC conversions sold by Mike White.  It requires cartridge swapping and a RAM expansion.</note> -->
r241458r241459
12621439   </software>
12631440
12641441   <software name="yesternv">
1265      <description>Yesterday (no vibrato) (Prototype)</description>
1442      <description>Yesterday (Prototype, no vibrato)</description>
12661443<!-- <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> -->
12671444      <year>1986</year>
12681445      <publisher>Richard Degler and George Moses</publisher>
r241458r241459
12741451   </software>
12751452
12761453   <software name="yesterv">
1277      <description>Yesterday (with vibrato) (Prototype)</description>
1454      <description>Yesterday (Prototype, with vibrato)</description>
12781455      <year>1986</year>
12791456      <publisher>Richard Degler and George Moses</publisher>
12801457      <part name="cart" interface="astrocde_cart">
r241458r241459
12851462   </software>
12861463
12871464</softwarelist>
1288
1289
trunk/src/emu/bus/astrocde/rom.c
r0r241459
1// license:BSD-3-Clause
2// copyright-holders:etabeta
3/***********************************************************************************************************
4
5
6 Bally Astrocade cart emulation
7
8
9 ***********************************************************************************************************/
10
11
12#include "emu.h"
13#include "rom.h"
14
15
16//-------------------------------------------------
17//  astrocade_rom_device - constructor
18//-------------------------------------------------
19
20const device_type ASTROCADE_ROM_STD = &device_creator<astrocade_rom_device>;
21const device_type ASTROCADE_ROM_256K = &device_creator<astrocade_rom_256k_device>;
22const device_type ASTROCADE_ROM_512K = &device_creator<astrocade_rom_512k_device>;
23
24
25astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
26               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
27                  device_astrocade_cart_interface(mconfig, *this)
28{
29}
30
31astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
32               : device_t(mconfig, ASTROCADE_ROM_STD, "Bally Astrocade Standard Carts", tag, owner, clock, "astrocade_rom", __FILE__),
33                  device_astrocade_cart_interface(mconfig, *this)
34{
35}
36
37astrocade_rom_256k_device::astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
38               : astrocade_rom_device(mconfig, ASTROCADE_ROM_256K, "Bally Astrocade 256K Carts", tag, owner, clock, "astrocade_256k", __FILE__)
39{
40}
41
42astrocade_rom_512k_device::astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43               : astrocade_rom_device(mconfig, ASTROCADE_ROM_512K, "Bally Astrocade 512K Carts", tag, owner, clock, "astrocade_512k", __FILE__)
44{
45}
46
47
48void astrocade_rom_256k_device::device_start()
49{
50   save_item(NAME(m_base_bank));
51}
52
53void astrocade_rom_256k_device::device_reset()
54{
55   m_base_bank = 0;
56}
57
58void astrocade_rom_512k_device::device_start()
59{
60   save_item(NAME(m_base_bank));
61}
62
63void astrocade_rom_512k_device::device_reset()
64{
65   m_base_bank = 0;
66}
67
68
69/*-------------------------------------------------
70 mapper specific handlers
71 -------------------------------------------------*/
72
73READ8_MEMBER(astrocade_rom_device::read_rom)
74{
75   if (offset < m_rom_size)
76      return m_rom[offset];
77   else
78      return 0xff;
79}
80
81READ8_MEMBER(astrocade_rom_256k_device::read_rom)
82{
83   if (offset < 0x1000)   // 0x2000-0x2fff
84      return m_rom[offset + 0x1000 * 0x3f];
85   else if (offset < 0x1fc0)   // 0x3000-0x3fbf
86      return m_rom[(offset & 0xfff) + (0x1000 * m_base_bank)];
87   else   // 0x3fc0-0x3fff
88      return m_base_bank = offset & 0x3f;
89}
90
91READ8_MEMBER(astrocade_rom_512k_device::read_rom)
92{
93   if (offset < 0x1000)   // 0x2000-0x2fff
94      return m_rom[offset + 0x1000 * 0x7f];
95   else if (offset < 0x1f80)   // 0x3000-0x3fbf
96      return m_rom[(offset & 0xfff) + (0x1000 * m_base_bank)];
97   else   // 0x3fc0-0x3fff
98      return m_base_bank = offset & 0x7f;
99}
100
trunk/src/emu/bus/astrocde/rom.h
r0r241459
1// license:BSD-3-Clause
2// copyright-holders:etabeta
3#ifndef __ASTROCADE_ROM_H
4#define __ASTROCADE_ROM_H
5
6#include "slot.h"
7
8
9// ======================> astrocade_rom_device
10
11class astrocade_rom_device : public device_t,
12                  public device_astrocade_cart_interface
13{
14public:
15   // construction/destruction
16   astrocade_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
17   astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
18
19   // device-level overrides
20   virtual void device_start() {}
21   virtual void device_reset() {}
22
23   // reading and writing
24   virtual DECLARE_READ8_MEMBER(read_rom);
25};
26
27// ======================> astrocade_rom_256k_device
28
29class astrocade_rom_256k_device : public astrocade_rom_device
30{
31public:
32   // construction/destruction
33   astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34   
35   virtual void device_start();
36   virtual void device_reset();
37
38   // reading and writing
39   virtual DECLARE_READ8_MEMBER(read_rom);
40   
41private:
42   UINT8 m_base_bank;
43};
44
45// ======================> astrocade_rom_512k_device
46
47class astrocade_rom_512k_device : public astrocade_rom_device
48{
49public:
50   // construction/destruction
51   astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
52   
53   virtual void device_start();
54   virtual void device_reset();
55   
56   // reading and writing
57   virtual DECLARE_READ8_MEMBER(read_rom);
58   
59private:
60   UINT8 m_base_bank;
61};
62
63
64
65
66
67// device type definition
68extern const device_type ASTROCADE_ROM_STD;
69extern const device_type ASTROCADE_ROM_256K;
70extern const device_type ASTROCADE_ROM_512K;
71
72
73#endif
trunk/src/emu/bus/astrocde/slot.c
r0r241459
1// license:BSD-3-Clause
2// copyright-holders:etabeta
3/***********************************************************************************************************
4
5    Bally Astrocade cart emulation
6    (through slot devices)
7
8 ***********************************************************************************************************/
9
10
11#include "emu.h"
12#include "slot.h"
13
14//**************************************************************************
15//  GLOBAL VARIABLES
16//**************************************************************************
17
18const device_type ASTROCADE_CART_SLOT = &device_creator<astrocade_cart_slot_device>;
19
20//**************************************************************************
21//    Astrocade Cartridges Interface
22//**************************************************************************
23
24//-------------------------------------------------
25//  device_astrocade_cart_interface - constructor
26//-------------------------------------------------
27
28device_astrocade_cart_interface::device_astrocade_cart_interface(const machine_config &mconfig, device_t &device)
29   : device_slot_card_interface(mconfig, device),
30      m_rom(NULL),
31      m_rom_size(0)
32{
33}
34
35
36//-------------------------------------------------
37//  ~device_astrocade_cart_interface - destructor
38//-------------------------------------------------
39
40device_astrocade_cart_interface::~device_astrocade_cart_interface()
41{
42}
43
44//-------------------------------------------------
45//  rom_alloc - alloc the space for the cart
46//-------------------------------------------------
47
48void device_astrocade_cart_interface::rom_alloc(UINT32 size, const char *tag)
49{
50   if (m_rom == NULL)
51   {
52      astring tempstring(tag);
53      tempstring.cat(ASTROCADESLOT_ROM_REGION_TAG);
54      m_rom = device().machine().memory().region_alloc(tempstring, size, 1, ENDIANNESS_LITTLE)->base();
55      m_rom_size = size;
56   }
57}
58
59
60//**************************************************************************
61//  LIVE DEVICE
62//**************************************************************************
63
64//-------------------------------------------------
65//  astrocade_cart_slot_device - constructor
66//-------------------------------------------------
67astrocade_cart_slot_device::astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
68                  device_t(mconfig, ASTROCADE_CART_SLOT, "Bally Astrocade Cartridge Slot", tag, owner, clock, "astrocade_cart_slot", __FILE__),
69                  device_image_interface(mconfig, *this),
70                  device_slot_interface(mconfig, *this),
71                  m_type(ASTROCADE_STD)
72{
73}
74
75
76//-------------------------------------------------
77//  astrocade_cart_slot_device - destructor
78//-------------------------------------------------
79
80astrocade_cart_slot_device::~astrocade_cart_slot_device()
81{
82}
83
84//-------------------------------------------------
85//  device_start - device-specific startup
86//-------------------------------------------------
87
88void astrocade_cart_slot_device::device_start()
89{
90   m_cart = dynamic_cast<device_astrocade_cart_interface *>(get_card_device());
91}
92
93//-------------------------------------------------
94//  device_config_complete - perform any
95//  operations now that the configuration is
96//  complete
97//-------------------------------------------------
98
99void astrocade_cart_slot_device::device_config_complete()
100{
101   // set brief and instance name
102   update_names();
103}
104
105
106//-------------------------------------------------
107//  ASTROCADE PCB
108//-------------------------------------------------
109
110struct astrocade_slot
111{
112   int                     pcb_id;
113   const char              *slot_option;
114};
115
116// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it
117static const astrocade_slot slot_list[] =
118{
119   { ASTROCADE_STD,  "rom" },
120   { ASTROCADE_256K, "rom_256k" },
121   { ASTROCADE_512K, "rom_512k" }
122};
123
124static int astrocade_get_pcb_id(const char *slot)
125{
126   for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
127   {
128      if (!core_stricmp(slot_list[i].slot_option, slot))
129         return slot_list[i].pcb_id;
130   }
131
132   return 0;
133}
134
135static const char *astrocade_get_slot(int type)
136{
137   for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
138   {
139      if (slot_list[i].pcb_id == type)
140         return slot_list[i].slot_option;
141   }
142
143   return "std";
144}
145
146
147/*-------------------------------------------------
148 call load
149 -------------------------------------------------*/
150
151bool astrocade_cart_slot_device::call_load()
152{
153   if (m_cart)
154   {
155      UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
156      m_cart->rom_alloc(size, tag());
157
158      if (software_entry() == NULL)
159         fread(m_cart->get_rom_base(), size);
160      else
161         memcpy(m_cart->get_rom_base(), get_software_region("rom"), size);
162
163      if (software_entry() == NULL)
164      {
165         m_type = ASTROCADE_STD;
166
167         if (size == 0x40000)
168            m_type = ASTROCADE_256K;
169         if (size == 0x80000)
170            m_type = ASTROCADE_512K;
171      }
172      else
173      {
174         const char *pcb_name = get_feature("slot");
175         if (pcb_name)
176            m_type = astrocade_get_pcb_id(pcb_name);
177      }
178
179      //printf("Type: %s\n", astrocade_get_slot(m_type));
180
181      return IMAGE_INIT_PASS;
182   }
183
184   return IMAGE_INIT_PASS;
185}
186
187
188/*-------------------------------------------------
189 call softlist load
190 -------------------------------------------------*/
191
192bool astrocade_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry)
193{
194   load_software_part_region(*this, swlist, swname, start_entry);
195   return TRUE;
196}
197
198
199/*-------------------------------------------------
200 get default card software
201 -------------------------------------------------*/
202
203void astrocade_cart_slot_device::get_default_card_software(astring &result)
204{
205   if (open_image_file(mconfig().options()))
206   {
207      const char *slot_string = "rom";
208      UINT32 size = core_fsize(m_file);
209      int type = ASTROCADE_STD;
210     
211      if (size == 0x40000)
212         type = ASTROCADE_256K;
213      if (size == 0x80000)
214         type = ASTROCADE_512K;
215
216      slot_string = astrocade_get_slot(type);
217
218      //printf("type: %s\n", slot_string);
219      clear();
220
221      result.cpy(slot_string);
222      return;
223   }
224
225   software_get_default_slot(result, "rom");
226}
227
228/*-------------------------------------------------
229 read
230 -------------------------------------------------*/
231
232READ8_MEMBER(astrocade_cart_slot_device::read_rom)
233{
234   if (m_cart)
235      return m_cart->read_rom(space, offset);
236   else
237      return 0xff;
238}
239
trunk/src/emu/bus/astrocde/slot.h
r0r241459
1// license:BSD-3-Clause
2// copyright-holders:etabeta
3#ifndef __ASTROCADE_SLOT_H
4#define __ASTROCADE_SLOT_H
5
6/***************************************************************************
7 TYPE DEFINITIONS
8 ***************************************************************************/
9
10
11/* PCB */
12enum
13{
14   ASTROCADE_STD = 0,
15   ASTROCADE_256K,
16   ASTROCADE_512K
17};
18
19
20// ======================> device_astrocade_cart_interface
21
22class device_astrocade_cart_interface : public device_slot_card_interface
23{
24public:
25   // construction/destruction
26   device_astrocade_cart_interface(const machine_config &mconfig, device_t &device);
27   virtual ~device_astrocade_cart_interface();
28
29   // reading and writing
30   virtual DECLARE_READ8_MEMBER(read_rom) { return 0xff; }
31
32   void rom_alloc(UINT32 size, const char *tag);
33   void ram_alloc(UINT32 size);
34   UINT8* get_rom_base() { return m_rom; }
35   UINT32 get_rom_size() { return m_rom_size; }
36
37protected:
38   // internal state
39   UINT8 *m_rom;
40   UINT32 m_rom_size;
41};
42
43
44// ======================> astrocade_cart_slot_device
45
46class astrocade_cart_slot_device : public device_t,
47                        public device_image_interface,
48                        public device_slot_interface
49{
50public:
51   // construction/destruction
52   astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
53   virtual ~astrocade_cart_slot_device();
54
55   // device-level overrides
56   virtual void device_start();
57   virtual void device_config_complete();
58
59   // image-level overrides
60   virtual bool call_load();
61   virtual void call_unload() {}
62   virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry);
63
64   int get_type() { return m_type; }
65
66   virtual iodevice_t image_type() const { return IO_CARTSLOT; }
67   virtual bool is_readable()  const { return 1; }
68   virtual bool is_writeable() const { return 0; }
69   virtual bool is_creatable() const { return 0; }
70   virtual bool must_be_loaded() const { return 0; }
71   virtual bool is_reset_on_load() const { return 1; }
72   virtual const option_guide *create_option_guide() const { return NULL; }
73   virtual const char *image_interface() const { return "astrocde_cart"; }
74   virtual const char *file_extensions() const { return "bin"; }
75
76   // slot interface overrides
77   virtual void get_default_card_software(astring &result);
78
79   // reading and writing
80   virtual DECLARE_READ8_MEMBER(read_rom);
81
82protected:
83
84   int m_type;
85   device_astrocade_cart_interface*       m_cart;
86};
87
88
89
90// device type definition
91extern const device_type ASTROCADE_CART_SLOT;
92
93
94/***************************************************************************
95 DEVICE CONFIGURATION MACROS
96 ***************************************************************************/
97
98#define ASTROCADESLOT_ROM_REGION_TAG ":cart:rom"
99
100#define MCFG_ASTROCADE_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
101   MCFG_DEVICE_ADD(_tag, ASTROCADE_CART_SLOT, 0) \
102   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
103#endif
trunk/src/emu/bus/bus.mak
r241458r241459
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#
125137#@src/emu/bus/bw2/exp.h,BUSES += BW2
126138#-------------------------------------------------
127139
trunk/src/emu/cpu/cp1610/cp1610.h
r241458r241459
3333#define CP1610_RESET        INPUT_LINE_RESET    /* Non-Maskable */
3434#define CP1610_INT_INTR     INPUT_LINE_NMI      /* Non-Maskable */
3535
36
36#define MCFG_CP1610_BEXT_CALLBACK(_read) \
37   downcast<cp1610_cpu_device *>(device)->set_bext_callback(DEVCB_##_read);
38   
39   
3740class cp1610_cpu_device :  public cpu_device
3841{
3942public:
4043   // construction/destruction
4144   cp1610_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
4245
46   template<class _read> void set_bext_callback(_read rd)
47   {
48      m_read_bext.set_callback(rd);
49   }
50   
4351protected:
4452   // device-level overrides
4553   virtual void device_start();
r241458r241459
7987   int     m_mask_interrupts;
8088   address_space *m_program;
8189   int m_icount;
90   
91   devcb_read8 m_read_bext;
8292
8393   void cp1610_illegal();
8494   void cp1610_hlt();
trunk/src/emu/cpu/powerpc/ppc.h
r241458r241459
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    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
162 
163 
164/***************************************************************************
165    PUBLIC FUNCTIONS
166***************************************************************************/
167 
180168#define MCFG_PPC_BUS_FREQUENCY(_frequency) \
181169   ppc_device::set_bus_frequency(*device, _frequency);
182170
r241458r241459
225213public:
226214   // construction/destruction
227215   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);
228224
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
237225   TIMER_CALLBACK_MEMBER(decrementer_int_callback);
238226   TIMER_CALLBACK_MEMBER(ppc4xx_buffered_dma_callback);
239227   TIMER_CALLBACK_MEMBER(ppc4xx_fit_callback);
r241458r241459
491479      UINT8           regs[9];
492480      UINT8           txbuf;
493481      UINT8           rxbuf;
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;
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;
501489   emu_timer *     m_fit_timer;
502490   emu_timer *     m_pit_timer;
503491   emu_timer *     m_wdog_timer;
r241458r241459
515503   UINT64          m_dec_zero_cycles;
516504   emu_timer *     m_decrementer_int_timer;
517505
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;
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;
528516   UINT8 (*m_ppcread8)(address_space &space, offs_t address);
529517   UINT16 (*m_ppcread16)(address_space &space, offs_t address);
530518   UINT32 (*m_ppcread32)(address_space &space, offs_t address);
r241458r241459
763751
764752class ppc4xx_device : public ppc_device
765753{
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
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 
777765   DECLARE_READ8_MEMBER( ppc4xx_spu_r );
778766   DECLARE_WRITE8_MEMBER( ppc4xx_spu_w );
779767
trunk/src/emu/cpu/powerpc/ppccom.c
r241458r241459
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_dcstore_handler(NULL)
221   , m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
222   , m_drcuml(NULL)
223   , m_drcfe(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)
224223   , m_drcoptions(0)
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)
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)
233230//  : ppc_device(mconfig, PPC403, "PPC403", tag, owner, clock, "ppc403", 32?, 64?)
234231//{
235232//}
r241458r241459
12411238    ppccom_dcstore_callback - call the dcstore
12421239    callback if installed
12431240-------------------------------------------------*/
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 
12441250
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
12541251/***************************************************************************
12551252    TLB HANDLING
12561253***************************************************************************/
r241458r241459
20612058
20622059/*-------------------------------------------------
20632060    ppc_set_dcstore_callback - installs a callback
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
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 
20732070void ppc_device::execute_set_input(int inputnum, int state)
20742071{
20752072   switch (inputnum)
r241458r241459
22882285      {
22892286         /* byte transfer */
22902287         case 1:
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));
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));
22992296         break;
23002297
23012298         /* word transfer */
23022299         case 2:
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));
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));
23112308         break;
23122309
23132310         /* dword transfer */
23142311         case 4:
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));
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));
23232320         break;
23242321      }
23252322   }
r241458r241459
23322329      {
23332330         /* byte transfer */
23342331         case 1:
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;
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;
23432340
23442341         /* word transfer */
23452342         case 2:
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;
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;
23542351
23552352         /* dword transfer */
23562353         case 4:
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;
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;
23652362      }
23662363   }
23672364}
r241458r241459
26772674      int operation = (m_spu.regs[SPU4XX_TX_COMMAND] >> 5) & 3;
26782675
26792676      /* if we have data to transmit, do it now */
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;
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;
26882685         m_spu.regs[SPU4XX_LINE_STATUS] &= ~0x02;
26892686      }
26902687
r241458r241459
28232820
28242821/*-------------------------------------------------
28252822    ppc4xx_spu_set_tx_handler - PowerPC 4XX-
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
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 
28352832/*-------------------------------------------------
28362833    ppc4xx_spu_receive_byte - PowerPC 4XX-
28372834    specific serial byte receive
r241458r241459
28442841
28452842/*-------------------------------------------------
28462843    ppc4xx_set_dma_read_handler - PowerPC 4XX-
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
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 
28562853/*-------------------------------------------------
28572854    ppc4xx_set_dma_write_handler - PowerPC 4XX-
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
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 
28672864/*-------------------------------------------------
28682865    ppc4xx_set_dcr_read_handler
28692866-------------------------------------------------*/
trunk/src/mame/drivers/cobra.c
r241458r241459
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
637   DECLARE_READ32_MEMBER(sub_comram_r);
638   DECLARE_WRITE32_MEMBER(sub_comram_w);
639   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   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);
640641   DECLARE_WRITE32_MEMBER(sub_sound_w);
641642   DECLARE_READ32_MEMBER(sub_unk7e_r);
642643   DECLARE_WRITE32_MEMBER(sub_debug_w);
r241458r241459
650651   DECLARE_WRITE16_MEMBER(sub_ata0_w);
651652   DECLARE_READ16_MEMBER(sub_ata1_r);
652653   DECLARE_WRITE16_MEMBER(sub_ata1_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);
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);
659661   DECLARE_WRITE64_MEMBER(gfx_fifo2_w);
660662   DECLARE_WRITE64_MEMBER(gfx_debug_state_w);
661663   DECLARE_READ64_MEMBER(gfx_unk1_r);
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
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 
668673   cobra_renderer *m_renderer;
669674
670675   cobra_fifo *m_gfxfifo_in;
r241458r241459
15961601   UINT32 m2 = (UINT32)(mem_mask);
15971602
15981603   m_comram[page][(offset << 1) + 0] = (w1 & ~m1) | (d1 & m1);
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
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 
16131616static ADDRESS_MAP_START( cobra_main_map, AS_PROGRAM, 64, cobra_state )
16141617   AM_RANGE(0x00000000, 0x003fffff) AM_RAM
16151618   AM_RANGE(0x07c00000, 0x07ffffff) AM_RAM
r241458r241459
18851888}
18861889
18871890WRITE32_MEMBER(cobra_state::sub_psac2_w)
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;
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;
18971900   if (out == NULL)
18981901       out = fopen("sound.bin", "wb");
18991902
19001903   fputc((data >> 24) & 0xff, out);
19011904   fputc((data >> 16) & 0xff, out);
19021905   fputc((data >> 8) & 0xff, out);
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);
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);
19311931#endif
19321932
19331933   const UINT8 *rec_data;
r241458r241459
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}
19481955
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
r241458r241459
29882988      // prc_read always expects a value...
29892989
29902990      m_gfxfifo_out->push(&space.device(), 0);
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
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 
30233021WRITE64_MEMBER(cobra_state::gfx_debug_state_w)
30243022{
30253023   if (ACCESSING_BITS_40_47)
r241458r241459
32603258                        2048,
32613259                        "S2MFIFO",
32623260                        S2MFIFO_VERBOSE != 0,
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);
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);
32753273   m_comram[1] = auto_alloc_array(machine(), UINT32, 0x40000/4);
32763274
32773275   m_comram_page = 0;
trunk/src/mame/drivers/firebeat.c
r241458r241459
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   void init_lights(write32_delegate out1, write32_delegate out2, write32_delegate out3);
263   void init_firebeat();
264   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   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();
265266   DECLARE_WRITE_LINE_MEMBER(sound_irq_callback);
266267   DECLARE_WRITE_LINE_MEMBER(midi_uart_ch0_irq_callback);
267268   DECLARE_WRITE_LINE_MEMBER(midi_uart_ch1_irq_callback);
r241458r241459
19461947      }
19471948   }
19481949
1949   return r;
1950}
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/*****************************************************************************/
19511961
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);
r241458r241459
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(security_w);
1986
1987   set_ibutton(rom);
1988
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 
19891989   init_lights(write32_delegate(), write32_delegate(), write32_delegate());
19901990}
19911991
trunk/src/mame/drivers/hornet.c
r241458r241459
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
409   DECLARE_DRIVER_INIT(hornet);
410   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   DECLARE_WRITE8_MEMBER(jamma_jvs_w);
409 
410   DECLARE_DRIVER_INIT(hornet);
411   DECLARE_DRIVER_INIT(hornet_2board);
411412   virtual void machine_start();
412413   virtual void machine_reset();
413414   DECLARE_MACHINE_RESET(hornet_2board);
r241458r241459
11351136   MCFG_EEPROM_SERIAL_93C46_ADD("lan_eeprom")
11361137MACHINE_CONFIG_END
11371138
1138
1139/*****************************************************************************/
1140
1141static void jamma_jvs_w(device_t *device, UINT8 data)
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)
11421154{
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
r241458r241459
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(jamma_jvs_w);
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(write8_delegate(FUNC(hornet_state::jamma_jvs_w), this));
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;
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/*****************************************************************************/
12941299
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
r241458r241459
167167   DECLARE_WRITE32_MEMBER(yorizori_1c_w);
168168   DECLARE_READ32_MEMBER(yorizori_10_r);
169169
170
171
172170   DECLARE_READ8_MEMBER(qs1000_p1_r);
173171   DECLARE_WRITE8_MEMBER(qs1000_p3_w);
174172   DECLARE_DRIVER_INIT(vamphalf);
r241458r241459
192190   DECLARE_DRIVER_INIT(yorizori);
193191   UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
194192   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);
195196};
196197
197198READ16_MEMBER(vamphalf_state::eeprom_r)
r241458r241459
608609Offset+3
609610-------x xxxxxxxx X offs
610611*/
611static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap)
612void vamphalf_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap)
612613{
613   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
614   gfx_element *gfx = state->m_gfxdecode->gfx(0);
614   gfx_element *gfx = m_gfxdecode->gfx(0);
615615   UINT32 cnt;
616616   int block, offs;
617617   int code,color,x,y,fx,fy;
r241458r241459
622622
623623   for (block=0; block<0x8000; block+=0x800)
624624   {
625      if(state->m_flipscreen)
625      if(m_flipscreen)
626626      {
627627         clip.min_y = 256 - (16-(block/0x800))*16;
628628         clip.max_y = 256 - ((16-(block/0x800))*16)+15;
r241458r241459
644644         offs = (block + cnt) / 2;
645645
646646         // 16bit version
647         if(state->m_tiles != NULL)
647         if(m_tiles != NULL)
648648         {
649            if(state->m_tiles[offs] & 0x0100) continue;
649            if(m_tiles[offs] & 0x0100) continue;
650650
651            code  = state->m_tiles[offs+1];
652            color = (state->m_tiles[offs+2] >> state->m_palshift) & 0x7f;
651            code  = m_tiles[offs+1];
652            color = (m_tiles[offs+2] >> m_palshift) & 0x7f;
653653
654654            // boonggab
655            if(state->m_has_extra_gfx)
655            if(m_has_extra_gfx)
656656            {
657               code  |= ((state->m_tiles[offs+2] & 0x100) << 8);
657               code  |= ((m_tiles[offs+2] & 0x100) << 8);
658658            }
659659
660            x = state->m_tiles[offs+3] & 0x01ff;
661            y = 256 - (state->m_tiles[offs] & 0x00ff);
660            x = m_tiles[offs+3] & 0x01ff;
661            y = 256 - (m_tiles[offs] & 0x00ff);
662662
663            fx = state->m_tiles[offs] & 0x8000;
664            fy = state->m_tiles[offs] & 0x4000;
663            fx = m_tiles[offs] & 0x8000;
664            fy = m_tiles[offs] & 0x4000;
665665         }
666666         // 32bit version
667667         else
668668         {
669669            offs /= 2;
670670
671            if(state->m_tiles32[offs] & 0x01000000) continue;
671            if(m_tiles32[offs] & 0x01000000) continue;
672672
673            code  = state->m_tiles32[offs] & 0xffff;
674            color = ((state->m_tiles32[offs+1] >> state->m_palshift) & 0x7f0000) >> 16;
673            code  = m_tiles32[offs] & 0xffff;
674            color = ((m_tiles32[offs+1] >> m_palshift) & 0x7f0000) >> 16;
675675
676            x = state->m_tiles32[offs+1] & 0x01ff;
677            y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16);
676            x = m_tiles32[offs+1] & 0x01ff;
677            y = 256 - ((m_tiles32[offs] & 0x00ff0000) >> 16);
678678
679            fx = state->m_tiles32[offs] & 0x80000000;
680            fy = state->m_tiles32[offs] & 0x40000000;
679            fx = m_tiles32[offs] & 0x80000000;
680            fy = m_tiles32[offs] & 0x40000000;
681681         }
682682
683         if(state->m_flipscreen)
683         if(m_flipscreen)
684684         {
685685            fx = !fx;
686686            fy = !fy;
r241458r241459
694694   }
695695}
696696
697static void draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap)
697void vamphalf_state::draw_sprites_aoh(screen_device &screen, bitmap_ind16 &bitmap)
698698{
699   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
700   gfx_element *gfx = state->m_gfxdecode->gfx(0);
699   gfx_element *gfx = m_gfxdecode->gfx(0);
701700   UINT32 cnt;
702701   int block, offs;
703702   int code,color,x,y,fx,fy;
r241458r241459
708707
709708   for (block=0; block<0x8000; block+=0x800)
710709   {
711      if(state->m_flipscreen)
710      if(m_flipscreen)
712711      {
713712         clip.min_y = 256 - (16-(block/0x800))*16;
714713         clip.max_y = 256 - ((16-(block/0x800))*16)+15;
r241458r241459
731730         offs = (block + cnt) / 2;
732731         {
733732            offs /= 2;
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;
733            code  = (m_tiles32[offs] & 0xffff) | ((m_tiles32[offs] & 0x3000000) >> 8);
734            color = ((m_tiles32[offs+1] >> m_palshift) & 0x7f0000) >> 16;
736735
737            x = state->m_tiles32[offs+1] & 0x01ff;
738            y = 256 - ((state->m_tiles32[offs] & 0x00ff0000) >> 16);
736            x = m_tiles32[offs+1] & 0x01ff;
737            y = 256 - ((m_tiles32[offs] & 0x00ff0000) >> 16);
739738
740            fx = state->m_tiles32[offs] & 0x4000000;
741            fy = 0; // not used ? or it's state->m_tiles32[offs] & 0x8000000?
739            fx = m_tiles32[offs] & 0x4000000;
740            fy = 0; // not used ? or it's m_tiles32[offs] & 0x8000000?
742741         }
743742
744         if(state->m_flipscreen)
743         if(m_flipscreen)
745744         {
746745            fx = !fx;
747746            fy = !fy;
r241458r241459
756755}
757756
758757
759void vamphalf_handle_flipped_visible_area( screen_device &screen )
758void vamphalf_state::handle_flipped_visible_area( screen_device &screen )
760759{
761   vamphalf_state *state = screen.machine().driver_data<vamphalf_state>();
762760   // are there actually registers to handle this?
763   if(!state->m_flipscreen)
761   if(!m_flipscreen)
764762   {
765763      rectangle visarea;
766764      visarea.set(31, 350, 16, 251);
r241458r241459
777775
778776UINT32 vamphalf_state::screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
779777{
780   vamphalf_handle_flipped_visible_area(screen);
778   handle_flipped_visible_area(screen);
781779   bitmap.fill(0, cliprect);
782780   draw_sprites(screen, bitmap);
783781   return 0;
r241458r241459
785783
786784UINT32 vamphalf_state::screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
787785{
788//  vamphalf_handle_flipped_visible_area(screen); // not on this?
786//  handle_flipped_visible_area(screen); // not on this?
789787   bitmap.fill(0, cliprect);
790788   draw_sprites_aoh(screen, bitmap);
791789   return 0;
trunk/src/mess/drivers/astrocde.c
r241458r241459
1212#include "includes/astrocde.h"
1313#include "machine/ram.h"
1414#include "sound/astrocde.h"
15#include "bus/generic/slot.h"
16#include "bus/generic/carts.h"
15#include "bus/astrocde/slot.h"
16#include "bus/astrocde/rom.h"
1717
1818class astrocde_mess_state : public astrocde_state
1919{
r241458r241459
2323      m_cart(*this, "cartslot")
2424      { }
2525
26   required_device<generic_slot_device> m_cart;
26   required_device<astrocade_cart_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);
r241458r241459
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
254261static MACHINE_CONFIG_START( astrocde, astrocde_mess_state )
255262   /* basic machine hardware */
256263   MCFG_CPU_ADD("maincpu", Z80, ASTROCADE_CLOCK/4)        /* 1.789 MHz */
r241458r241459
279286   MCFG_RAM_DEFAULT_SIZE("32k")
280287
281288   /* cartridge */
282   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "astrocde_cart")
289   MCFG_ASTROCADE_CARTRIDGE_ADD("cartslot", astrocade_cart, NULL)
283290
284291   /* Software lists */
285292   MCFG_SOFTWARE_LIST_ADD("cart_list","astrocde")
r241458r241459
321328MACHINE_START_MEMBER(astrocde_mess_state, astrocde)
322329{
323330   if (m_cart->exists())
324      m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
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));
325332}
326333
327334MACHINE_RESET_MEMBER(astrocde_mess_state, astrocde)
trunk/src/mess/drivers/ti85.c
r241458r241459
11/***************************************************************************
22TI-85 and TI-86 drivers by Krzysztof Strzecha
3TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
34
45Notes:
561. After start TI-85 waits for ON key interrupt, so press ON key to start
r241458r241459
342343   AM_RANGE(0x200000, 0x21BFFF) AM_RAM AM_SHARE("nvram")
343344ADDRESS_MAP_END
344345
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
345352static ADDRESS_MAP_START( ti83p_banked_mem , AS_PROGRAM, 8, ti85_state )
346353   AM_RANGE(0x00000, 0x7ffff) AM_DEVREADWRITE("flash", intelfsh8_device, read, write)
347354   AM_RANGE(0x100000, 0x107fff) AM_RAM AM_SHARE("nvram")
r241458r241459
730737   MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
731738
732739   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti83pse )
733   MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti83pse )
734740   MCFG_DEVICE_REPLACE("flash", FUJITSU_29F160T, 0)
735741
736742   //MCFG_TI83PSERIAL_ADD( "tiserial" )
737743MACHINE_CONFIG_END
738744
739745static MACHINE_CONFIG_DERIVED( ti84p, ti83pse )
740   MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
741   //MCFG_TI83PSERIAL_ADD( "tiserial" )
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)
742760MACHINE_CONFIG_END
743761
762static MACHINE_CONFIG_DERIVED( ti84pse, ti83pse )
763   MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84pse )
764MACHINE_CONFIG_END
744765
745766static MACHINE_CONFIG_DERIVED( ti73, ti83p )
746767   //MCFG_DEVICE_REMOVE( "tiserial" )
r241458r241459
888909ROM_END
889910
890911ROM_START (ti84p)
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) )
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) )
895916ROM_END
896917
897
898918/*    YEAR  NAME        PARENT  COMPAT  MACHINE INPUT   INIT   COMPANY                 FULLNAME                        FLAGS */
899919COMP( 1990, ti81,       0,      0,      ti81,   ti81, driver_device,   0,     "Texas Instruments",    "TI-81",                        GAME_NO_SOUND )
900920COMP( 1992, ti85,       0,      0,      ti85d,  ti85, driver_device,   0,     "Texas Instruments",    "TI-85",                        GAME_NO_SOUND )
r241458r241459
906926COMP( 1999, ti83p,      0,      0,      ti83p,  ti82, driver_device,   0,     "Texas Instruments",    "TI-83 Plus",                   GAME_NO_SOUND )
907927COMP( 2001, ti83pse,    0,      0,      ti83pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-83 Plus Silver Edition", GAME_NO_SOUND )
908928COMP( 2004, ti84p,      0,      0,      ti84p,   ti82, driver_device,   0,   "Texas Instruments",    "TI-84 Plus",                    GAME_NO_SOUND )
909COMP( 2004, ti84pse,    0,      0,      ti83pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-84 Plus Silver Edition", GAME_NO_SOUND )
929COMP( 2004, ti84pse,    0,      0,      ti84pse,   ti82, driver_device,   0,     "Texas Instruments",    "TI-84 Plus Silver Edition", GAME_NO_SOUND )
trunk/src/mess/includes/ti85.h
r241458r241459
1616
1717
1818/* model */
19typedef enum {
19enum ti85_model {
2020   TI81,
2121   TI81v2,
2222   TI82,
r241458r241459
2727   TI83PSE,
2828   TI84P,
2929   TI84PSE
30} ti85_models;
30};
3131
3232typedef struct
3333{
r241458r241459
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
7779   UINT8 m_LCD_memory_base;
7880   UINT8 m_LCD_contrast;
7981   UINT8 m_LCD_status;
r241458r241459
167169   DECLARE_PALETTE_INIT(ti85);
168170   DECLARE_MACHINE_RESET(ti85);
169171   DECLARE_MACHINE_RESET(ti83p);
170   DECLARE_MACHINE_RESET(ti83pse);
171172   DECLARE_PALETTE_INIT(ti82);
172173   DECLARE_MACHINE_START(ti86);
173174   DECLARE_MACHINE_START(ti83p);
174175   DECLARE_MACHINE_START(ti83pse);
176   DECLARE_MACHINE_START(ti84pse);
177   DECLARE_MACHINE_START(ti84p);
178   void ti8xpse_init_common();
179
175180   UINT32 screen_update_ti85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
176181   TIMER_CALLBACK_MEMBER(ti85_timer_callback);
177182   TIMER_CALLBACK_MEMBER(ti83_timer1_callback);
trunk/src/mess/machine/ti85.c
r241458r241459
11/***************************************************************************
22  TI-85 driver by Krzysztof Strzecha
3  TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
34
45  Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
56  I/O ports)
r241458r241459
236237
237238void ti85_state::machine_start()
238239{
240   m_model = TI85;
241
239242   address_space &space = m_maincpu->space(AS_PROGRAM);
240243   m_bios = memregion("bios")->base();
241244
r241458r241459
277280   m_PCR = 0xc0;
278281
279282   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();
285283
286   m_maincpu->set_pc(0x8000);
287}
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    }
288296
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   update_ti83pse_memory();
300   if (m_model == TI83P)
301    {
302        update_ti83p_memory();
303    }
304    else
305    {
306        update_ti83pse_memory();
307    }
301308
302309   m_maincpu->set_pc(0x8000);
303310}
304311
305312MACHINE_START_MEMBER(ti85_state,ti83p)
306313{
314   m_model = TI83P;
307315   //address_space &space = m_maincpu->space(AS_PROGRAM);
308316   //m_bios = memregion("flash")->base();
309317
r241458r241459
326334   m_ti83p_port4 = 1;
327335   m_flash_unlocked = 0;
328336
329   ti85_state::update_ti83p_memory ();
337    ti85_state::update_ti83p_memory();
338   m_maincpu->set_pc(0x8000); //this is a hack due to incomplete memory mapping emulation
330339
340
331341   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
332342   machine().scheduler().timer_pulse(attotime::from_hz(512), timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback),this));
333343
334      /* save states and debugging */
335   save_item(NAME(m_timer_interrupt_mask));
344
345   /* save states and debugging */
346   save_item(NAME(m_timer_interrupt_status));
347    save_item(NAME(m_timer_interrupt_mask));
336348   save_item(NAME(m_ti8x_memory_page_0));
337349   save_item(NAME(m_ti8x_memory_page_1));
338350   save_item(NAME(m_ti8x_memory_page_2));
r241458r241459
340352   save_item(NAME(m_ti83p_port4));
341353}
342354
343MACHINE_START_MEMBER(ti85_state,ti83pse)
355void ti85_state::ti8xpse_init_common()
344356{
345357   //address_space &space = m_maincpu->space(AS_PROGRAM);
346358   //address_space &asic =  ADDRESS_MAP_NAME(ti83p_asic_mem);
r241458r241459
352364   m_ON_interrupt_status = 0;
353365   m_ON_pressed = 0;
354366   m_ti8x_memory_page_0 = 00;//0x7f;
355   m_ti8x_memory_page_1 = 0x7f;
367   m_ti8x_memory_page_1 = (m_model != TI84P ) ? 0x7f : 0x3f ;
356368   m_ti8x_memory_page_2 = 0;
357369   m_ti8x_memory_page_3 = 0;
358370   m_LCD_memory_base = 0;
r241458r241459
365377   m_ti83p_port4 = 1;
366378   m_flash_unlocked = 0;
367379
368   ti85_state::update_ti83p_memory();
369   m_maincpu->set_pc(0x8000);
380   ti85_state::update_ti83pse_memory();
381   m_maincpu->set_pc(0x8000);//same as above, hack to work around incomplete memory mapping emulation
370382
371383
372384   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
r241458r241459
376388   m_crystal_timer2 = timer_alloc(CRYSTAL_TIMER2);
377389   m_crystal_timer3 = timer_alloc(CRYSTAL_TIMER3);
378390
379   /* save states and debugging */
391      /* save states and debugging */
380392   save_item(NAME(m_ctimer_interrupt_status));
381393   save_item(NAME(m_timer_interrupt_status));
382394   save_item(NAME(m_ti8x_memory_page_0));
r241458r241459
386398   save_item(NAME(m_ti83p_port4));
387399}
388400
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
389423MACHINE_START_MEMBER(ti85_state,ti86)
390424{
391425   address_space &space = m_maincpu->space(AS_PROGRAM);
r241458r241459
763797
764798WRITE8_MEMBER(ti85_state::ti83pse_port_0006_w)
765799{
766   m_ti8x_memory_page_1 = data; //& ((data&0x80) ? 0x41 : 0x7f);
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   }
767809   update_ti83pse_memory();
768810}
769811
770812WRITE8_MEMBER(ti85_state::ti83pse_port_0007_w)
771813{
772   m_ti8x_memory_page_2 = data; //& ((data&0x80) ? 0x41 : 0x7f);
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   }
773822   update_ti83pse_memory();
774823}
775824
trunk/src/mess/mess.lst
r241458r241459
10671067ti86      // 1997 TI-86 (Z80 6 MHz)
10681068ti83p    // 1999 TI-83 Plus (Z80 6 MHz)
10691069ti83pse   // 2001 TI-83 Plus Silver Edition
1070//ti84p  // 2004 TI-84 Plus
1070ti84p  // 2004 TI-84 Plus
10711071ti84pse   // 2004 TI-84 Plus Silver Edition
1072//ti84cse // 2013 TI-84 Plus C Silver Edition (color screen)
10721073ti89      // 1998 TI-89
10731074ti92      // 1995 TI-92
10741075ti92p    // 1999 TI-92 Plus
trunk/src/mess/mess.mak
r241458r241459
570570BUSES += ADAMNET
571571BUSES += APF
572572BUSES += ARCADIA
573BUSES += ASTROCADE
573574BUSES += BML3
574575BUSES += BW2
575576BUSES += C64


Previous 199869 Revisions Next


© 1997-2024 The MAME Team