Previous 199869 Revisions Next

r34095 Sunday 28th December, 2014 at 17:40:13 UTC by Couriersud
Merge branch 'master' of https://github.com/mamedev/mame.git
[hash]gba.xml megadriv.xml n64.xml pc98.xml sol20_cass.xml
[src/emu/bus/abckb]abc99.c
[src/emu/bus/megadrive]md_slot.c rom.c
[src/emu/cpu/arcompact]arcompact.c arcompact.h arcompact_common.h arcompact_execute.c arcompact_make.py arcompactdasm_ops.c
[src/emu/machine]z80dma.c
[src/emu/video]tea1002.c* tea1002.h* video.mak
[src/mame]mame.lst
[src/mame/audio]dkong.c
[src/mame/drivers]cps1.c sbrkout.c sprint2.c
[src/mame/includes]sprint2.h
[src/mess]mess.lst mess.mak
[src/mess/drivers]altos5.c aquarius.c excali64.c leapster.c mc1502.c sdk86.c tispeak.c
[src/mess/includes]aquarius.h
[src/mess/video]aquarius.c

trunk/hash/gba.xml
r242606r242607
2633226332      </part>
2633326333   </software>
2633426334
26335   <software name="overstrm">
26336      <description>Overstorm (Euro, Prototype Demo)</description>
26337      <year>2003</year>
26338      <publisher>Polyzoom</publisher>
26339      <part name="cart" interface="gba_cart">
26340         <dataarea name="rom" size="3470916">
26341            <rom name="overstorm_demo.bin" size="3470916" crc="ee764cf6" sha1="88129a07e9dfb556c38a5c61c6e96fbfb4d23fea" offset="000000" />
26342         </dataarea>
26343      </part>
26344   </software>
26345
2633526346   <software name="ozzydrix">
2633626347      <description>Ozzy &amp; Drix (USA)</description>
2633726348      <year>2003</year>
r242606r242607
2911529126      </part>
2911629127   </software>
2911729128
29129   <software name="revil2d">
29130      <description>Resident Evil 2 (Euro, Prototype Demo)</description>
29131      <year>2000?</year>
29132      <publisher>Raylight Studios</publisher>
29133      <part name="cart" interface="gba_cart">
29134         <dataarea name="rom" size="2908576">
29135            <rom name="re2_tech.bin" size="2908576" crc="26b5cf8b" sha1="a70cf38071f639e783734bc9875ace0ebd2c5180" offset="000000" />
29136         </dataarea>
29137      </part>
29138   </software>
29139
2911829140   <software name="revshinp" cloneof="revshin">
2911929141      <description>The Revenge of Shinobi (Euro, Prototype)</description>
2912029142      <year>2003</year>
trunk/hash/megadriv.xml
r242606r242607
119119         <feature name="u2" value="FANTASTIC DIZZY MD MDFD BB07"/>    <!-- location not really marked on PCB, using u2 for consistency -->
120120         <feature name="left" value="GD74HC00"/>
121121         <feature name="right" value="GD74HC74"/>
122         <dataarea name="rom" width="16" endianness="big" size="2621440">
123            <rom name="cosmic spacehead md mdcs e4f7.u1" size="1048576" crc="cb89e605" sha1="b5bc4a786639d1b8ae6de76f40dbe907b3f0b642" offset="0x000000"/>
124            <rom name="fantastic dizzy md mdfd bb07.u2" size="524288" crc="46447e7a" sha1="b320174d3b43f30b477818a27b4da30462a52003" offset="0x200000"/>
122         <dataarea name="rom" width="16" endianness="big" size="4194304">
123            <rom name="fantastic dizzy md mdfd bb07.u2" size="524288" crc="46447e7a" sha1="b320174d3b43f30b477818a27b4da30462a52003" offset="0x000000"/>
124            <rom name="cosmic spacehead md mdcs e4f7.u1" size="1048576" crc="cb89e605" sha1="b5bc4a786639d1b8ae6de76f40dbe907b3f0b642" offset="0x200000"/>
125125         </dataarea>
126126      </part>
127127   </software>
r242606r242607
96029602      <publisher>Codemasters</publisher>
96039603      <part name="cart" interface="megadriv_cart">
96049604         <feature name="slot" value="rom_cm2in1"/>
9605         <dataarea name="rom" width="16" endianness="big" size="2621440">
9605         <dataarea name="rom" width="16" endianness="big" size="4194304">
96069606            <rom name="mdppf821.bin" size="2097152" crc="32dd8351" sha1="928f46ca87886c6e72d10f7c9db29b09e483bc49" offset="0x000000"/>
96079607            <rom name="mdmm acd3.bin" size="524288" crc="50081a0b" sha1="56a8844c376f2e79e92cf128681fa3fef81c36d6" offset="0x200000"/>
96089608         </dataarea>
r242606r242607
3007830078      </part>
3007930079   </software>
3008030080
30081   <software name="linkdrgn">
30082      <description>Link Dragon</description>
30083      <year>1993</year>
30084      <publisher>Songtly</publisher>
30085      <part name="cart" interface="megadriv_cart">
30086         <dataarea name="rom" width="16" endianness="big" size="262144">
30087            <rom name="link dragon (unl).bin" size="262144" crc="1b86e623" sha1="09e4b59da3344f16ce6173c432c88ee9a12a3561" offset="0x000000"/>
30088         </dataarea>
30089      </part>
30090   </software>
30091
3008130092   <software name="lionkin3a" cloneof="lionkin3">
3008230093      <description>Lion King 3 (Alt?)</description>
3008330094      <year>199?</year>
r242606r242607
3017330184      </part>
3017430185   </software>
3017530186
30187   <software name="tankwar">
30188      <description>Super Tank War</description>
30189      <year>199?</year>
30190      <publisher>Gamtec</publisher>
30191      <part name="cart" interface="megadriv_cart">
30192         <dataarea name="rom" width="16" endianness="big" size="262144">
30193            <rom name="super tank war (unlicensed) [raw dump].bin" size="262144" crc="5e519ea1" sha1="7e00475f99035fb20f624a7fe0d6bb77c7e834b1" offset="0x000000"/>
30194         </dataarea>
30195      </part>
30196   </software>
3017630197
30198
3017730199<!-- Other Dumps to be sorted -->
3017830200
3017930201   <software name="dynoblaz">
trunk/hash/n64.xml
r242606r242607
30843084      </part>
30853085   </software>
30863086
3087   <software name="conkerp" cloneof="conker" supported="no">
3088      <description>Conker's Bad Fur Day (Prototype Debug)</description>
3089      <year>2001?</year>
3090      <publisher>Rare</publisher>
3091      <part name="cart" interface="n64_cart">
3092         <dataarea name="rom" size="67108864">
3093            <rom name="conkers bfd debug_ec.bin" size="67108864" crc="8443ff39" sha1="8b0952b9d13d2f082badfb587a97f2762600cd14" offset="0" />
3094         </dataarea>
3095      </part>
3096   </software>
3097
3098   <software name="conkerd" cloneof="conker" supported="no">
3099      <description>Conker's Bad Fur Day (ECTS Demo)</description>
3100      <year>2001?</year>
3101      <publisher>Rare</publisher>
3102      <part name="cart" interface="n64_cart">
3103         <dataarea name="rom" size="67108864">
3104            <rom name="conkers bfd ects demo_ec.bin" size="67108864" crc="99b3c27a" sha1="3bf1f052ce728ad77971efd4882ec8e18b7bf9a3" offset="0" />
3105         </dataarea>
3106      </part>
3107   </software>
3108
3109<!--
3110Note from marshallh about the dongle present in the Rare proto/demo above
3111"The dongle is a pass-through, except that there is an Altera
3112MAX7000 series CPLD intercepting the AD16 bus. This lets
3113all normal bus transactions through, but in the special case
3114mentioned below, takes control of the bus and gives its own data."
3115
3116We currently don't emulate this, and thus we include also versions where the dongle checks have been
3117patched out (+ a fix for internal checksum)
3118-->
3119
3120   <software name="conkerph" cloneof="conker" supported="no">
3121      <description>Conker's Bad Fur Day (Prototype Debug, Decrypted)</description>
3122      <year>2001?</year>
3123      <publisher>Rare</publisher>
3124      <part name="cart" interface="n64_cart">
3125         <dataarea name="rom" size="67108864">
3126            <rom name="bfd_ntsc_debug_dc.bin" size="67108864" crc="c9822f5c" sha1="6956bd77351a91cdd22af454a8d410a3b9c829f0" offset="0" />
3127         </dataarea>
3128      </part>
3129   </software>
3130
3131   <software name="conkerdh" cloneof="conker" supported="no">
3132      <description>Conker's Bad Fur Day (ECTS Demo, Decrypted)</description>
3133      <year>2001?</year>
3134      <publisher>Rare</publisher>
3135      <part name="cart" interface="n64_cart">
3136         <dataarea name="rom" size="67108864">
3137            <rom name="conker_bfd_ects_dc.bin" size="67108864" crc="af9c5972" sha1="92575eed941324b9cd7d29df61e720b04d8b26cb" offset="0" />
3138         </dataarea>
3139      </part>
3140   </software>
3141
30873142   <software name="crusnexo">
30883143      <description>Cruis'n Exotica (USA)</description>
30893144      <year>2000</year>
r242606r242607
77787833      </part>
77797834   </software>
77807835
7836   <software name="pdarkp" cloneof="pdark">
7837      <description>Perfect Dark (Euro, Prototype Debug)</description>
7838      <year>2000</year>
7839      <publisher>Nintendo</publisher>
7840      <part name="cart" interface="n64_cart">
7841         <dataarea name="rom" size="33554432">
7842            <rom name="perfect dark eur debug.bin" size="33554432" crc="5c6ac287" sha1="278cec1806eb39690cd2a3ae4838cfa8b8e630d2" offset="0" />
7843         </dataarea>
7844      </part>
7845   </software>
7846
7847   <software name="pdarkup" cloneof="pdark" supported="no">
7848      <description>Perfect Dark (USA, Prototype Debug)</description>
7849      <year>2000</year>
7850      <publisher>Nintendo</publisher>
7851      <part name="cart" interface="n64_cart">
7852         <dataarea name="rom" size="67108864">
7853            <rom name="perfect dark ntsc debug_ec.bin" size="67108864" crc="571ca36e" sha1="578eef928e7f93310288ea1e319dc1d00dee51fa" offset="0" />
7854         </dataarea>
7855      </part>
7856   </software>
7857
7858<!--
7859The original cart contained an Altera MAX7000 series CPLD intercepting the AD16 bus, acting as a dongle
7860(see notes about Conker above).
7861We currently don't emulate this, and thus we include also this version where the dongle checks have been
7862patched out (+ a fix for internal checksum)
7863-->
7864   <software name="pdarkuph" cloneof="pdark">
7865      <description>Perfect Dark (USA, Prototype Debug, Decrypted)</description>
7866      <year>2000</year>
7867      <publisher>Nintendo</publisher>
7868      <part name="cart" interface="n64_cart">
7869         <dataarea name="rom" size="33554432">
7870            <rom name="pd_ntsc_debug_dc.bin" size="33554432" crc="0ea2645f" sha1="40c60733840ee68ac60f0c951055c942a2573bfc" offset="0" />
7871         </dataarea>
7872      </part>
7873   </software>
7874
77817875   <software name="pgaeurou" cloneof="pgaeuro">
77827876      <description>PGA European Tour (USA)</description>
77837877      <year>2000</year>
trunk/hash/pc98.xml
r242606r242607
4680546805      </part>
4680646806   </software>
4680746807
46808   <software name="loopyq">
46809      <description>LoopyQ</description>
46810      <year>1992</year>
46811      <publisher>日本ソフテック (Nihon Softec)</publisher>
46812      <info name="alt_title" value="ルービーQ" />
46813      <info name="release" value="19921119" />
46814      <part name="flop1" interface="floppy_5_25">
46815         <dataarea name="flop" size="1261568">
46816            <rom name="loopyq.hdm" size="1261568" crc="5aaf0dc8" sha1="d9720bc05f91354187ff362ceefe43d81234f84d" offset="0" />
46817         </dataarea>
46818      </part>
46819   </software>
46820
4680846821   <software name="lotus123" supported="no">
4680946822      <description>Lotus 1-2-3 (Demo)</description>
4681046823      <year>19??</year>
r242606r242607
4926349276      </part>
4926449277   </software>
4926549278
49279   <software name="ultrasak">
49280      <description>Ultra Sakusen - Kagaku Tokusoutai Shutsugeki Seyo!</description>
49281      <year>1992</year>
49282      <publisher>バンプレスト (Banpresto)</publisher>
49283      <info name="alt_title" value="ウルトラ作戦 科学特捜隊出撃せよ!" />
49284      <info name="release" value="19921208" />
49285      <part name="flop1" interface="floppy_5_25">
49286         <feature name="part_id" value="System Disk"/>
49287         <dataarea name="flop" size="1261568">
49288            <rom name="system.hdm" size="1261568" crc="ad35a329" sha1="db8f34d1b126dad253e44035cf295248dd8c1d1c" offset="0" />
49289         </dataarea>
49290      </part>
49291      <part name="flop2" interface="floppy_5_25">
49292         <feature name="part_id" value="Disk A"/>
49293         <dataarea name="flop" size="1261568">
49294            <rom name="a.hdm" size="1261568" crc="8daf39f0" sha1="53a1f3290b2cd07b72fb42eb970b0120106b76fd" offset="0" />
49295         </dataarea>
49296      </part>
49297      <part name="flop3" interface="floppy_5_25">
49298         <feature name="part_id" value="Disk B"/>
49299         <dataarea name="flop" size="1261568">
49300            <rom name="b.hdm" size="1261568" crc="bc7ebede" sha1="b6cc7d3d18198deb918556eaefb422c3f9311148" offset="0" />
49301         </dataarea>
49302      </part>
49303      <part name="flop4" interface="floppy_5_25">
49304         <feature name="part_id" value="Disk C"/>
49305         <dataarea name="flop" size="1261568">
49306            <rom name="c.hdm" size="1261568" crc="1513def4" sha1="fabc4016c6f38e98a36a6a8b04e9e8b6a21a9599" offset="0" />
49307         </dataarea>
49308      </part>
49309      <part name="flop5" interface="floppy_5_25">
49310         <feature name="part_id" value="Disk D"/>
49311         <dataarea name="flop" size="1261568">
49312            <rom name="d.hdm" size="1261568" crc="dfa1fbd2" sha1="22bbc1bfcbef5807241a3958a3773c959948b209" offset="0" />
49313         </dataarea>
49314      </part>
49315      <part name="flop6" interface="floppy_5_25">
49316         <feature name="part_id" value="Disk E"/>
49317         <dataarea name="flop" size="1261568">
49318            <rom name="e.hdm" size="1261568" crc="553015ef" sha1="085e87a73ccc767ff157e0ef8342fc2dd3a69217" offset="0" />
49319         </dataarea>
49320      </part>
49321      <part name="flop7" interface="floppy_5_25">
49322         <feature name="part_id" value="Disk F"/>
49323         <dataarea name="flop" size="1261568">
49324            <rom name="f.hdm" size="1261568" crc="1e0680ce" sha1="52fb9ecd5edab9c8f653330699849ad075344cbb" offset="0" />
49325         </dataarea>
49326      </part>
49327   </software>
49328
4926649329   <software name="vermiln" supported="no">
4926749330      <description>Vermilion</description>
4926849331      <year>1990</year>
trunk/hash/sol20_cass.xml
r242606r242607
166166   <software name="atc">
167167      <description>Air Traffic Control</description>
168168      <year>1978</year>
169      <publisher>Processor Technology Corporation</publisher>
169      <publisher>Creative Computing Software</publisher>
170170
171171      <part name="cass1" interface="sol20_cass">
172172         <dataarea name="cass" size="2457454">
trunk/src/emu/bus/abckb/abc99.c
r242606r242607
8080//-------------------------------------------------
8181
8282ROM_START( abc99 )
83   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8384   ROM_DEFAULT_BIOS("107268")
8485   ROM_SYSTEM_BIOS( 0, "107268", "107268-17" )
85   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
86
87   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8886   ROMX_LOAD( "107268-17.z3", 0x0000, 0x0800, CRC(2f60cc35) SHA1(ebc6af9cd0a49a0d01698589370e628eebb6221c), ROM_BIOS(1) )
87   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
8988   ROMX_LOAD( "106819-09.z3", 0x0000, 0x1000, CRC(ffe32a71) SHA1(fa2ce8e0216a433f9bbad0bdd6e3dc0b540f03b7), ROM_BIOS(2) ) // ABC 99 6490423-01
9089
9190   ROM_REGION( 0x800, I8035_Z5_TAG, 0 )
trunk/src/emu/bus/megadrive/md_slot.c
r242606r242607
384384      m_type = md_get_pcb_id(slot_name);
385385
386386   // handle mirroring of ROM, unless it's SSF2 or Pier Solar
387   if (m_type != SSF2 && m_type != PSOLAR)
387   if (m_type != SSF2 && m_type != PSOLAR && m_type != CM_2IN1)
388388      m_cart->rom_map_setup(length);
389389
390390   return IMAGE_INIT_PASS;
trunk/src/emu/bus/megadrive/rom.c
r242606r242607
531531 CODEMASTERS 2 IN 1 (RESET BASED)
532532 -------------------------------------------------*/
533533
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x7ffff) + 0x200000)/2)
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x1fffff) + 0x200000)/2)
535535
536536READ16_MEMBER(md_rom_cm2in1_device::read)
537537{
trunk/src/emu/cpu/arcompact/arcompact.c
r242606r242607
2424
2525const device_type ARCA5 = &device_creator<arcompact_device>;
2626
27static ADDRESS_MAP_START( arcompact_auxreg_map, AS_IO, 32, arcompact_device )
28ADDRESS_MAP_END
29
30
2731arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2832   : cpu_device(mconfig, ARCA5, "ARCtangent-A5", tag, owner, clock, "arca5", __FILE__)
2933   , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) // some docs describe these as 'middle endian'?!
34   , m_io_config( "io", ENDIANNESS_LITTLE, 32, 34, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) ) // IO space is 32 bits of dwords, so 34-bits
3035{
3136}
3237
r242606r242607
5964   m_debugger_temp = 0;
6065
6166   m_program = &space(AS_PROGRAM);
67   m_io = &space(AS_IO);
6268
6369   state_add( 0,  "PC", m_debugger_temp).callimport().callexport().formatstr("%08X");
6470
6571   state_add( 0x10,  "STATUS32", m_debugger_temp).callimport().callexport().formatstr("%08X");
72   state_add( 0x11,  "LP_START", m_debugger_temp).callimport().callexport().formatstr("%08X");
73   state_add( 0x12,  "LP_END", m_debugger_temp).callimport().callexport().formatstr("%08X");
6674
6775   state_add(STATE_GENPC, "GENPC", m_debugger_temp).callexport().noshow();
6876
r242606r242607
8896      case 0x10:
8997         m_debugger_temp = m_status32;
9098         break;
99      case 0x11:
100         m_debugger_temp = m_LP_START;
101         break;
102      case 0x12:
103         m_debugger_temp = m_LP_END;
104         break;
91105
92106      case STATE_GENPC:
93107         m_debugger_temp = m_pc;
r242606r242607
116130      case 0x10:
117131         m_status32 = m_debugger_temp;
118132         break;
133      case 0x11:
134         m_LP_START = m_debugger_temp;
135         break;
136      case 0x12:
137         m_LP_END = m_debugger_temp;
138         break;
119139
120140      default:
121141         if ((index >= 0x100) && (index < 0x140))
r242606r242607
137157      m_regs[i] = 0;
138158
139159   m_status32 = 0;
160   m_LP_START = 0;
161   m_LP_END = 0;
162
140163}
141164
165
142166/*****************************************************************************/
167   
143168
144169void arcompact_device::execute_set_input(int irqline, int state)
145170{
trunk/src/emu/cpu/arcompact/arcompact.h
r242606r242607
7777   virtual void execute_set_input(int inputnum, int state);
7878
7979   // device_memory_interface overrides
80   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
80   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
8181
8282   // device_state_interface overrides
8383   virtual void state_import(const device_state_entry &entry);
r242606r242607
160160   ARCOMPACT_RETTYPE arcompact_handle04_0b(OPS_32);
161161   ARCOMPACT_RETTYPE arcompact_handle04_0c(OPS_32);
162162   ARCOMPACT_RETTYPE arcompact_handle04_0d(OPS_32);
163   ARCOMPACT_RETTYPE arcompact_handle04_0e(OPS_32);
163//   ARCOMPACT_RETTYPE arcompact_handle04_0e(OPS_32);
164164//   ARCOMPACT_RETTYPE arcompact_handle04_0f(OPS_32);
165165   ARCOMPACT_RETTYPE arcompact_handle04_10(OPS_32);
166166   ARCOMPACT_RETTYPE arcompact_handle04_11(OPS_32);
167167   ARCOMPACT_RETTYPE arcompact_handle04_12(OPS_32);
168   ARCOMPACT_RETTYPE arcompact_handle04_13(OPS_32);
169   ARCOMPACT_RETTYPE arcompact_handle04_14(OPS_32);
168//   ARCOMPACT_RETTYPE arcompact_handle04_13(OPS_32);
169//   ARCOMPACT_RETTYPE arcompact_handle04_14(OPS_32);
170170//   ARCOMPACT_RETTYPE arcompact_handle04_15(OPS_32);
171171//   ARCOMPACT_RETTYPE arcompact_handle04_16(OPS_32);
172   ARCOMPACT_RETTYPE arcompact_handle04_17(OPS_32);
173   ARCOMPACT_RETTYPE arcompact_handle04_18(OPS_32);
174   ARCOMPACT_RETTYPE arcompact_handle04_19(OPS_32);
172//   ARCOMPACT_RETTYPE arcompact_handle04_17(OPS_32);
173//   ARCOMPACT_RETTYPE arcompact_handle04_18(OPS_32);
174//   ARCOMPACT_RETTYPE arcompact_handle04_19(OPS_32);
175175   ARCOMPACT_RETTYPE arcompact_handle04_1a(OPS_32);
176176   ARCOMPACT_RETTYPE arcompact_handle04_1b(OPS_32);
177177   ARCOMPACT_RETTYPE arcompact_handle04_1c(OPS_32);
r242606r242607
183183   ARCOMPACT_RETTYPE arcompact_handle04_28(OPS_32);
184184   ARCOMPACT_RETTYPE arcompact_handle04_29(OPS_32);
185185   ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
186   ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
186//   ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
187187   ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
188188   ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
189   ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
189//   ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
190190   ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
191191   ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
192192   ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
r242606r242607
773773   ARCOMPACT_HANDLER04_TYPE_PM(04_06);
774774   ARCOMPACT_HANDLER04_TYPE_PM(04_07);
775775   ARCOMPACT_HANDLER04_TYPE_PM(04_0a);
776   ARCOMPACT_HANDLER04_TYPE_PM(04_0e);
776777   ARCOMPACT_HANDLER04_TYPE_PM(04_0f);
778   ARCOMPACT_HANDLER04_TYPE_PM(04_13);
779   ARCOMPACT_HANDLER04_TYPE_PM(04_14);
777780   ARCOMPACT_HANDLER04_TYPE_PM(04_15);
778781   ARCOMPACT_HANDLER04_TYPE_PM(04_16);
782   ARCOMPACT_HANDLER04_TYPE_PM(04_17);   
783   ARCOMPACT_HANDLER04_TYPE_PM(04_18);
784   ARCOMPACT_HANDLER04_TYPE_PM(04_19);   
779785   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
786   ARCOMPACT_HANDLER04_TYPE_PM(04_2b);
780787
788   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02);
781789   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07);
782790   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08);
783791
r242606r242607
786794
787795
788796private:
789   address_space_config m_program_config;
797   const address_space_config m_program_config;
798   const address_space_config m_io_config;
790799
791800   UINT32 m_pc;
792801
793802   address_space *m_program;
803   address_space  *m_io;
804
794805   int m_icount;
795806
796807   UINT32 m_debugger_temp;
r242606r242607
803814   inline void WRITE16(UINT32 address, UINT16 data){    m_program->write_word(address << 1, data); }
804815   inline UINT8 READ8(UINT32 address) { return m_program->read_byte(address << 0); }
805816   inline void WRITE8(UINT32 address, UINT8 data){    m_program->write_byte(address << 0, data); }
817   
818   inline  UINT64 READAUX(UINT64 address) { return m_io->read_dword(address *4); }
819   inline void WRITEAUX(UINT64 address, UINT32 data) { m_io->write_dword(address *4, data); }
806820
821
822   int check_condition(UINT8 condition);
823
807824   UINT32 m_regs[0x40];
808825
809826   int m_delayactive;
r242606r242607
813830//   f  e  d  c| b  a  9  8| 7  6  5  4| 3  2  1  0
814831//  -  -  -  L| Z  N  C  V| U DE AE A2|A1 E2 E1  H
815832   UINT32 m_status32;
833
834   UINT32 m_LP_START;
835   UINT32 m_LP_END;
836
816837};
817838
818839#define V_OVERFLOW_FLAG (0x00000100)
r242606r242607
842863
843864// Condition 0x0c (LE)
844865#define CONDITION_LE ((STATUS32_CHECK_Z) || (STATUS32_CHECK_N && !STATUS32_CHECK_V) ||  (!STATUS32_CHECK_N && STATUS32_CHECK_V)) // Z or (N and /V) or (/N and V)
866#define CONDITION_EQ (STATUS32_CHECK_Z)
867#define CONDITION_CS (STATUS32_CHECK_C)
868#define CONDITION_LT ((STATUS32_CHECK_N && !STATUS32_CHECK_V) || (!STATUS32_CHECK_N && STATUS32_CHECK_V))
869#define CONDITION_MI (STATUS32_CHECK_N)
845870
846871extern const device_type ARCA5;
847872
trunk/src/emu/cpu/arcompact/arcompact_common.h
r242606r242607
1717
1818#define REG_BLINK (0x1f) // r31
1919#define REG_SP (0x1c) // r28
20#define REG_ILINK1 (0x1d) // r29
21#define REG_ILINK2 (0x1e) // r30
22#define REG_LP_COUNT (0x3c) // r60
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242606r242607
3636         m_pc = get_insruction(op);
3737      }
3838
39      // hardware loops
40      if (m_pc == m_LP_END)
41      {
42         if (m_regs[REG_LP_COUNT] != 1)
43         {
44            m_pc = m_LP_START;
45         }
46         m_regs[REG_LP_COUNT]--;
47
48      }
49
3950      m_icount--;
4051   }
4152
r242606r242607
129140#define PC_ALIGNED32 \
130141   (m_pc&0xfffffffc)
131142
143int arcompact_device::check_condition(UINT8 condition)
144{
145   switch (condition & 0x1f)
146   {
147      case 0x00: return 1; // AL
148      case 0x01: return CONDITION_EQ;
149      case 0x02: return !CONDITION_EQ; // NE
150      case 0x03: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
151      case 0x04: return CONDITION_MI; // MI (N)
152      case 0x05: return CONDITION_CS; // CS (Carry Set / Lower than)
153      case 0x06: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
154      case 0x07: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
155      case 0x08: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
156      case 0x09: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
157      case 0x0a: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
158      case 0x0b: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
159      case 0x0c: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
160      case 0x0d: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
161      case 0x0e: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
162      case 0x0f: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
163      case 0x10: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
164      case 0x11: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
165      case 0x12: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
166      case 0x13: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
167      case 0x14: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
168      case 0x15: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
169      case 0x16: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
170      case 0x17: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
171      case 0x18: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
172      case 0x19: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
173      case 0x1a: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
174      case 0x1b: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
175      case 0x1c: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
176      case 0x1d: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
177      case 0x1e: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
178      case 0x1f: fatalerror("unhandled condition check %s", conditions[condition]); return -1;
179   }
132180
181    return -1;
182
183}
184
185
133186ARCOMPACT_RETTYPE arcompact_device::get_insruction(OPS_32)
134187{
135188   UINT8 instruction = ARCOMPACT_OPERATION;
r242606r242607
11011154ARCOMPACT_RETTYPE arcompact_device::arcompact_handle00_00(OPS_32)
11021155{
11031156   int size = 4;
1157
1158   COMMON32_GET_CONDITION
1159
1160   if (!check_condition(condition))
1161      return m_pc + (size>>0);
1162
11041163   // Branch Conditionally
1105   arcompact_log("unimplemented Bcc %08x", op);
1164   // 0000 0sss ssss sss0 SSSS SSSS SSNQ QQQQ
1165   INT32 address = (op & 0x07fe0000) >> 17;
1166   address |= ((op & 0x0000ffc0) >> 6) << 10;
1167   if (address & 0x80000) address = -0x80000 + (address & 0x7ffff);
1168   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
1169
1170   UINT32 realaddress = PC_ALIGNED32 + (address * 2);
1171
1172   if (n)
1173   {
1174      m_delayactive = 1;
1175      m_delayjump = realaddress;
1176      m_delaylinks = 0; // don't link
1177   }
1178   else
1179   {
1180   //   m_regs[REG_BLINK] = m_pc + (size >> 0);  // don't link
1181      return realaddress;
1182   }
1183
1184
11061185   return m_pc + (size>>0);
11071186}
11081187
r242606r242607
14221501   return m_pc + (size>>0);
14231502}
14241503
1425ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRLO"); }
1504ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32) //  register - immediate BRLO
1505{
1506   BR_REGIMM_SETUP
14261507
1508   // BRLO (unsigned operation)
1509   if (b < c)
1510   {
1511      BR_TAKEJUMP
1512   }
1513   
1514   return m_pc + (size>>0);
1515
1516}
1517
14271518ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) // register - immediate BRHS
14281519{
14291520   BR_REGIMM_SETUP
r242606r242607
17611852   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0d], /*"RCMP"*/ 1,0);
17621853}
17631854
1764ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e(OPS_32)
1765{
1766   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0e], /*"RSUB"*/ 0,0);
1767}
17681855
17691856
17701857ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_10(OPS_32) 
r242606r242607
17821869   return arcompact_handle04_helper(PARAMS, opcodes_04[0x12], /*"BXOR"*/ 0,0);
17831870}
17841871
1785ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13(OPS_32) 
1786{
1787   return arcompact_handle04_helper(PARAMS, opcodes_04[0x13], /*"BMSK"*/ 0,0);
1788}
17891872
1790ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14(OPS_32) 
1791{
1792   return arcompact_handle04_helper(PARAMS, opcodes_04[0x14], /*"ADD1"*/ 0,0);
1793}
17941873
17951874
17961875
17971876
1798ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_17(OPS_32) 
1799{
1800   return arcompact_handle04_helper(PARAMS, opcodes_04[0x17], /*"SUB1"*/ 0,0);
1801}
1802
1803ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_18(OPS_32) 
1804{
1805   return arcompact_handle04_helper(PARAMS, opcodes_04[0x18], /*"SUB2"*/ 0,0);
1806}
1807
1808ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_19(OPS_32) 
1809{
1810   return arcompact_handle04_helper(PARAMS, opcodes_04[0x19], /*"SUB3"*/ 0,0);
1811}
1812
18131877ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1a(OPS_32) 
18141878{
18151879   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1a], /*"MPY"*/ 0,0);
r242606r242607
18371901   int got_limm = 0;
18381902
18391903   COMMON32_GET_creg
1904   COMMON32_GET_F
18401905
18411906   if (creg == LIMM_REG)
18421907   {
r242606r242607
18581923      // J.F [ilink1]    0010 0RRR 0010 0000 1RRR 0111 01RR RRRR  (creg = ILINK1, FLAG must be set)
18591924      // J.F [ilink2]    0010 0RRR 0010 0000 1RRR 0111 10RR RRRR  (creg = ILINE2, FLAG must be set)
18601925
1861      arcompact_log("unimplemented J %08x", op);
1926      if (F)
1927      {
1928         if ((creg == REG_ILINK1) || (creg == REG_ILINK2))
1929         {
1930            arcompact_log("1 unimplemented J.F %08x", op);
1931         }
1932         else
1933         {
1934            // should not use .F unless jumping to ILINK1/2
1935            arcompact_fatal ("illegal 1 unimplemented J.F (F should not be set) %08x", op);
1936         }
1937
1938      }
1939      else
1940      {
1941         if ((creg == REG_ILINK1) || (creg == REG_ILINK2))
1942         {
1943            // should only jumping to ILINK1/2 if .F is set
1944            arcompact_fatal("illegal 1 unimplemented J (F not set) %08x", op);
1945         }
1946         else
1947         {
1948           
1949            return m_regs[creg];
1950         }
1951      }
18621952   }
18631953
18641954   return m_pc + (size>>0);
r242606r242607
18691959   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
18701960   // J u6            0010 0RRR 0110 0000 0RRR uuuu uuRR RRRR
18711961   int size = 4;
1872   arcompact_log("unimplemented J %08x", op);
1962   arcompact_log("2 unimplemented J %08x", op);
18731963   return m_pc + (size>>0);
18741964}
18751965
r242606r242607
18781968   // opcode          iiii i--- ppII IIII F--- ssss ssSS SSSS
18791969   // J s12           0010 0RRR 1010 0000 0RRR ssss ssSS SSSS
18801970   int size = 4;
1881   arcompact_log("unimplemented J %08x", op);
1971   arcompact_log("3 unimplemented J %08x", op);
18821972   return m_pc + (size>>0);
18831973}
18841974
18851975
1886ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32)
1976ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32) // Jcc   (no link, no delay)
18871977{
18881978   int size = 4;
1889//   UINT32 limm = 0;
1979   UINT32 limm = 0;
18901980   int got_limm = 0;
18911981
18921982   COMMON32_GET_creg
1983   COMMON32_GET_CONDITION;
1984   COMMON32_GET_F
18931985
1986   UINT32 c = 0;
1987
18941988   if (creg == LIMM_REG)
18951989   {
18961990      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
18971991      // Jcc limm        0010 0RRR 1110 0000 0RRR 1111 100Q QQQQ  [LIUMM]
18981992      if (!got_limm)
18991993      {
1900         //GET_LIMM_32;
1994         GET_LIMM_32;
19011995         size = 8;
19021996      }
19031997
1904      arcompact_log("unimplemented J %08x", op);
1998      c = limm;
1999
19052000   }
19062001   else
19072002   {
19082003      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
19092004      // Jcc [c]         0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
19102005      // no conditional links to ILINK1, ILINK2?
1911      arcompact_log("unimplemented J %08x", op);
2006     
2007      c = m_regs[creg];
19122008   }
2009
2010   if (!check_condition(condition))
2011      return m_pc + (size>>0);
2012
2013   if (!F)
2014   {
2015      // if F isn't set then the destination can't be ILINK1 or ILINK2
2016
2017      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2018      {
2019         arcompact_fatal ("fatal arcompact_handle04_20_p11_m0 J %08x (F not set but ILINK1 or ILINK2 used as dst)", op);
2020      }
2021      else
2022      {
2023         UINT32 realaddress = c;
2024         return realaddress;
2025      }
2026   }
2027
2028   if (F)
2029   {
2030      // if F is set then the destination MUST be ILINK1 or ILINK2
2031
2032      if ((creg == REG_ILINK1) || (creg == REG_ILINK1))
2033      {
2034         arcompact_log("unimplemented arcompact_handle04_20_p11_m0 J %08x (F set)", op);
2035      }
2036      else
2037      {
2038         arcompact_fatal ("fatal arcompact_handle04_20_p11_m0 J %08x (F set but not ILINK1 or ILINK2 used as dst)", op);
2039
2040      }   
2041   }
2042
2043
19132044   return m_pc + (size>>0);
19142045}
19152046
r242606r242607
19182049   // opcode          iiii i--- ppII IIII F--- uuuu uumq qqqq
19192050   // Jcc u6          0010 0RRR 1110 0000 0RRR uuuu uu1Q QQQQ
19202051   int size = 4;
1921   arcompact_log("unimplemented J %08x", op);
2052   arcompact_log("unimplemented arcompact_handle04_20_p11_m1 J %08x (u6)", op);
19222053   return m_pc + (size>>0);
19232054}
19242055
r242606r242607
19452076ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_28(OPS_32) // LPcc (loop setup)
19462077{
19472078   int size = 4;
1948
2079//   COMMON32_GET_breg; // breg is reserved
19492080   COMMON32_GET_p;
1950     
2081
19512082   if (p == 0x00)
19522083   {
2084      arcompact_fatal("<illegal LPcc, p = 0x00)");
19532085   }
19542086   else if (p == 0x01)
19552087   {
2088      arcompact_fatal("<illegal LPcc, p = 0x01)");
19562089   }
19572090   else if (p == 0x02) // Loop unconditional
1958   {
2091   { // 0010 0RRR 1010 1000 0RRR ssss ssSS SSSS
2092      COMMON32_GET_s12
2093      if (S & 0x800) S = -0x800 + (S&0x7ff);
2094
2095      arcompact_fatal("Lp unconditional not supported %d", S);
19592096   }
19602097   else if (p == 0x03) // Loop conditional
1961   {
2098   { // 0010 0RRR 1110 1000 0RRR uuuu uu1Q QQQQ
2099      COMMON32_GET_u6
2100      COMMON32_GET_CONDITION
2101      //arcompact_fatal("Lp conditional %s not supported %d", conditions[condition], u);
2102     
2103      // if the loop condition fails then just jump to after the end of the loop, don't set any registers
2104      if (!check_condition(condition))
2105      {
2106         UINT32 realoffset = PC_ALIGNED32 + (u * 2);
2107         return realoffset;
2108      }
2109      else
2110      {
2111         // otherwise set up the loop positions
2112         m_LP_START = m_pc + (size >> 0);
2113         m_LP_END = PC_ALIGNED32 + (u * 2);
2114         return m_pc + (size>>0);
2115      }
2116
19622117   }
19632118
1964   arcompact_log("unimplemented LPcc %08x", op);
19652119   return m_pc + (size>>0);
19662120
19672121}
r242606r242607
20082162   return m_pc + (size>>0);
20092163}
20102164
2011ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2b(OPS_32)  // Store TO Auxiliary register FROM register
2012{   
2013   int size = 4;
2014//   UINT32 limm = 0;
2015   int got_limm = 0;
20162165
2017   COMMON32_GET_p;
2018   COMMON32_GET_breg;
2019
2020   if (breg == LIMM_REG)
2021   {
2022      //GET_LIMM_32;
2023      size = 8;
2024      got_limm = 1;
2025
2026   }
2027   else
2028   {
2029   }
2030
2031   if (p == 0)
2032   {
2033
2034      COMMON32_GET_creg
2035
2036      if (creg == LIMM_REG)
2037      {
2038         if (!got_limm)
2039         {
2040            //GET_LIMM_32;
2041            size = 8;
2042         }
2043      }
2044      else
2045      {
2046      }
2047   }
2048   else if (p == 1)
2049   {
2050   }
2051   else if (p == 2)
2052   {
2053   }
2054   else if (p == 3)
2055   {
2056   }
2057
2058   arcompact_log("unimplemented SR %08x", op);
2059   return m_pc + (size>>0);
2060}
2061
20622166ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_29(OPS_32)
20632167{
20642168   // leapster bios uses formats for FLAG that are not defined, bug I guess work anyway (P modes 0 / 1)
r242606r242607
21022206}
21032207
21042208
2105#define SETUP_HANDLE04_2f_0x_P00 \
2106   int size = 4; \
2107   UINT32 limm = 0; \
2108   \
2109   COMMON32_GET_breg; \
2110   COMMON32_GET_F; \
2111   COMMON32_GET_creg; \
2112   \
2113   UINT32 c; \
2114   \
2115   if (creg == LIMM_REG) \
2116   { \
2117      GET_LIMM_32; \
2118      size = 8; \
2119      c = limm; \
2120   } \
2121   else \
2122   { \
2123      c = m_regs[creg]; \
2124   } \
2125   /* todo: is the limm, limm syntax valid? (it's pointless.) */ \
2126   /* todo: if breg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */ \
21272209
2128
2129
21302210ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL
21312211ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR
2132ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "LSR"); } // LSR
2212
21332213ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR
21342214ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC
21352215ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB
21362216ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_06(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXW"); } // SEXW
21372217
2138// EXTB
2139ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p00(OPS_32) // note 'b' destination for 04_2f_07_xx group
2140{
2141   SETUP_HANDLE04_2f_0x_P00;
2142   
2143   m_regs[breg] = c & 0x000000ff;
2144   if (F)
2145   {
2146      arcompact_fatal("arcompact_handle04_2f_08_p00 (EXTW) (F set)\n"); // not yet supported
2147   }
21482218
2149   return m_pc + (size >> 0);
2150}
2151
2152ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p01(OPS_32)
2153{
2154   int size = 4;
2155   arcompact_fatal("arcompact_handle04_2f_07_p01 (EXTB)\n");
2156   return m_pc + (size >> 0);
2157}
2158
2159ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p10(OPS_32)
2160{
2161   int size = 4;
2162   arcompact_fatal("illegal 04_2f_07_p10 (EXTB)\n"); // illegal mode because 'S' bits have already been used for opcode select
2163   return m_pc + (size >> 0);
2164}
2165
2166ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p11_m0(OPS_32)
2167{
2168   int size = 4;
2169   arcompact_fatal("arcompact_handle04_2f_07_p11_m0 (EXTB)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2170   return m_pc + (size >> 0);
2171}
2172
2173ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_07_p11_m1(OPS_32)
2174{
2175   int size = 4;
2176   arcompact_fatal("arcompact_handle04_2f_07_p11_m1 (EXTB)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2177   return m_pc + (size >> 0);
2178}
2179
2180// EXTW b <- c  or  EXTW  b <- limm   or EXTW  limm <- c (no result)  or EXTW  limm, limm (invalid?)
2181ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p00(OPS_32) // note 'b' destination for 04_2f_08_xx group
2182{
2183   SETUP_HANDLE04_2f_0x_P00;
2184   
2185   m_regs[breg] = c & 0x0000ffff;
2186   if (F)
2187   {
2188      arcompact_fatal("arcompact_handle04_2f_08_p00 (EXTW) (F set)\n"); // not yet supported
2189   }
2190
2191   return m_pc + (size >> 0);
2192}
2193
2194ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p01(OPS_32)
2195{
2196   int size = 4;
2197   arcompact_fatal("arcompact_handle04_2f_08_p01 (EXTW)\n");
2198   return m_pc + (size >> 0);
2199}
2200
2201ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p10(OPS_32)
2202{
2203   int size = 4;
2204   arcompact_fatal("illegal 04_2f_08_p10 (EXTW)\n"); // illegal mode because 'S' bits have already been used for opcode select
2205   return m_pc + (size >> 0);
2206}
2207
2208ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p11_m0(OPS_32)
2209{
2210   int size = 4;
2211   arcompact_fatal("arcompact_handle04_2f_08_p11_m0 (EXTW)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2212   return m_pc + (size >> 0);
2213}
2214
2215ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_08_p11_m1(OPS_32)
2216{
2217   int size = 4;
2218   arcompact_fatal("arcompact_handle04_2f_08_p11_m1 (EXTW)\n");  // illegal mode because 'Q' bits have already been used for opcode select
2219   return m_pc + (size >> 0);
2220}
2221
2222
22232219ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_09(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ABS"); } // ABS
22242220ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0a(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "NOT"); } // NOT
22252221ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0b(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCL"); } // RLC
r242606r242607
24442440}
24452441
24462442
2447ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_00(OPS_16) // ADD_S c, b,  u3   (note, c destination)
2448{
2449   int u, breg, creg;
24502443
2451   COMMON16_GET_u3;
2452   COMMON16_GET_breg;
2453   COMMON16_GET_creg;
2454
2455   REG_16BIT_RANGE(breg);
2456   REG_16BIT_RANGE(creg);
2457
2458   m_regs[creg] = m_regs[breg] + u;
2459
2460   return m_pc + (2 >> 0);
2461}
2462
2463ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_01(OPS_16)
2464{
2465   return arcompact_handle0d_helper(PARAMS, "SUB_S");
2466}
2467
2468ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_02(OPS_16) // ASL_S c, b asl u3   (note, c destination)
2469{
2470   int u, breg, creg;
2471
2472   COMMON16_GET_u3;
2473   COMMON16_GET_breg;
2474   COMMON16_GET_creg;
2475
2476   REG_16BIT_RANGE(breg);
2477   REG_16BIT_RANGE(creg);
2478
2479   m_regs[creg] = m_regs[breg] << u;
2480
2481   return m_pc + (2 >> 0);
2482}
2483
24842444ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_03(OPS_16)
24852445{
24862446   return arcompact_handle0d_helper(PARAMS, "ASR_S");
r242606r242607
26402600
26412601
26422602// Zero parameters (ZOP)
2643ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { arcompact_log("NOP_S"); return m_pc + (2 >> 0);}
2603ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { /*arcompact_log("NOP_S");*/ return m_pc + (2 >> 0);}
26442604ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_01(OPS_16)  { arcompact_log("UNIMP_S"); return m_pc + (2 >> 0);} // Unimplemented Instruction, same as illegal, but recommended to fill blank space
26452605ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16)  { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);}
26462606ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16)  { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);}
r242606r242607
26702630   return m_pc + (2 >> 0);
26712631}
26722632
2673ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_02(OPS_16) // SUB_S b <- b,c
2674{
2675   int breg, creg;
26762633
2677   COMMON16_GET_breg;
2678   COMMON16_GET_creg;
26792634
2680   REG_16BIT_RANGE(breg);
2681   REG_16BIT_RANGE(creg);
26822635
2683   m_regs[breg] = m_regs[breg] - m_regs[creg];
26842636
2685   return m_pc + (2 >> 0);
2686}
26872637
2688
2689ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_04(OPS_16) // AND_S b <- b, c
2690{
2691   int breg, creg;
2692
2693   COMMON16_GET_breg;
2694   COMMON16_GET_creg;
2695
2696   REG_16BIT_RANGE(breg);
2697   REG_16BIT_RANGE(creg);
2698
2699   m_regs[breg] = m_regs[breg] & m_regs[creg];
2700
2701   return m_pc + (2 >> 0);
2702}
2703
2704ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_05(OPS_16) // OR_S b <- b,c
2705{
2706   int breg, creg;
2707
2708   COMMON16_GET_breg;
2709   COMMON16_GET_creg;
2710
2711   REG_16BIT_RANGE(breg);
2712   REG_16BIT_RANGE(creg);
2713
2714   m_regs[breg] = m_regs[breg] | m_regs[creg];
2715
2716   return m_pc + (2 >> 0);
2717}
2718
2719
27202638ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_06(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "BIC_S",0);  }
2721ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_07(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "XOR_S",0);  }
2639
27222640ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0b(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "TST_S",1);  }
27232641ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "MUL64_S",2);  } // actual destination is special multiply registers
27242642ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXB_S",0); }
27252643ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0e(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXW_S",0); }
27262644
2727ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) // EXTB_S
2728{
2729   int breg, creg;
27302645
2731   COMMON16_GET_breg;
2732   COMMON16_GET_creg;
27332646
2734   REG_16BIT_RANGE(breg);
2735   REG_16BIT_RANGE(creg);
27362647
2737   m_regs[breg] = m_regs[creg] & 0x000000ff;
2738
2739   return m_pc + (2 >> 0);
2740
2741}
2742
2743ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_10(OPS_16) // EXTW_S
2744{
2745   int breg, creg;
2746
2747   COMMON16_GET_breg;
2748   COMMON16_GET_creg;
2749
2750   REG_16BIT_RANGE(breg);
2751   REG_16BIT_RANGE(creg);
2752
2753   m_regs[breg] = m_regs[creg] & 0x0000ffff;
2754
2755   return m_pc + (2 >> 0);
2756}
2757
27582648ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_11(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ABS_S",0);  }
27592649ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_12(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "NOT_S",0);  }
2760ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_13(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "NEG_S",0);  }
2761ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_14(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD1_S",0); }
2762ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_15(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD2_S",0); }
2763ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_16(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ADD3_S",0); }
2764ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_18(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASL_S",0);  }
2765ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_19(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "LSR_S",0);  }
2766ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1a(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR_S",0);  }
27672650
2768ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1b(OPS_16) //  ASL b, c asl 1   (can also be impleneted as b = c + c)
2769{
2770   int breg, creg;
27712651
2772   COMMON16_GET_breg;
2773   COMMON16_GET_creg;
2652ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_18(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASL_S",0);  }
27742653
2775   REG_16BIT_RANGE(breg);
2776   REG_16BIT_RANGE(creg);
2654ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1a(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR_S",0);  }
27772655
2778   m_regs[breg] = m_regs[creg] << 1;
27792656
2780   return m_pc + (2 >> 0);
2781}
2782
27832657ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR1_S",0); }
27842658ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "LSR1_S",0); }
27852659
r242606r242607
32673141
32683142ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_00(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGT_S"); }
32693143ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_01(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGE_S"); }
3270ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_02(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BLT_S"); }
32713144
3145ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_02(OPS_16) // BLT_S
3146{
3147   if (CONDITION_LT)
3148   {
3149      int s = (op & 0x003f) >> 0;   op &= ~0x003f;
3150      if (s & 0x020) s = -0x20 + (s & 0x1f);
3151      UINT32 realaddress = PC_ALIGNED32 + (s * 2);
3152      //m_regs[REG_BLINK] = m_pc + (2 >> 0); // don't link
3153      return realaddress;
3154   }
3155
3156   return m_pc + (2 >> 0);
3157}
3158
32723159ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_03(OPS_16) // BLE_S
32733160{
32743161   if (CONDITION_LE)
trunk/src/emu/cpu/arcompact/arcompact_make.py
r242606r242607
99        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
1010        print >>f, "      else { STATUS32_CLEAR_Z; }"
1111
12def EmitGroup04_Handle_NZC_LSR1_Flags(f, funcname, opname):
13        print >>f, "      if (result & 0x80000000) { STATUS32_SET_N; }"
14        print >>f, "      else { STATUS32_CLEAR_N; }"
15        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
16        print >>f, "      else { STATUS32_CLEAR_Z; }"
17        print >>f, "      if (c == 0x00000001) { STATUS32_SET_C; }"
18        print >>f, "      else { STATUS32_CLEAR_C; }"
19
20def EmitGroup04_Handle_NZCV_ADD_Flags(f, funcname, opname):
21        print >>f, "      if (result & 0x80000000) { STATUS32_SET_N; }"
22        print >>f, "      else { STATUS32_CLEAR_N; }"
23        print >>f, "      if (result == 0x00000000) { STATUS32_SET_Z; }"
24        print >>f, "      else { STATUS32_CLEAR_Z; }"
25        print >>f, "      if ((b & 0x80000000) == (c & 0x80000000))"
26        print >>f, "      {"
27        print >>f, "         if ((result & 0x80000000) != (b & 0x80000000))"
28        print >>f, "         {"
29        print >>f, "            STATUS32_SET_V;"
30        print >>f, "         }"
31        print >>f, "         else"
32        print >>f, "         {"
33        print >>f, "            STATUS32_CLEAR_V;"
34        print >>f, "         }"
35        print >>f, "      }"
36        print >>f, "      if (b < c)"
37        print >>f, "      {"
38        print >>f, "         STATUS32_SET_C;"
39        print >>f, "      }"
40        print >>f, "      else"
41        print >>f, "      {"
42        print >>f, "         STATUS32_CLEAR_C;"
43        print >>f, "      }"
44
45
1246def EmitGroup04_no_Flags(f, funcname, opname):
1347       print >>f, "      // no flag changes"
1448
r242606r242607
3266        flaghandler(f, funcname, opname)
3367        print >>f, "   }"
3468
35def EmitGroup04(f,funcname, opname, opexecute, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
36    # the mode 0x00 handler 
37    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p00(OPS_32)" % (funcname)
38    print >>f, "{"
69def EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
3970    print >>f, "   int size = 4;"
4071   
41    print >>f, "   UINT32 limm = 0;"
42   
43    print >>f, "   int got_limm = 0;"
44    print >>f, "   "
45    print >>f, "   COMMON32_GET_breg;"
46
47    if flagcondition == -1:
48        print >>f, "   COMMON32_GET_F;"
49   
50    print >>f, "   COMMON32_GET_creg;"
51
52    if ignore_a == 0:
53        print >>f, "   COMMON32_GET_areg;"
54    elif ignore_a == 1:
55       print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
56   
57    print >>f, "   "
58   
59    print >>f, "   UINT32 c;"
60    if breg_is_dst_only == 0:
61        print >>f, "   UINT32 b;"
62        print >>f, "   "
63        print >>f, "   if (breg == LIMM_REG)"
64        print >>f, "   {"
65        print >>f, "      GET_LIMM_32;"
66        print >>f, "      size = 8;"
67        print >>f, "      got_limm = 1;"
68        print >>f, "      b = limm;"
69        print >>f, "   }"
70        print >>f, "   else"
71        print >>f, "   {"
72        print >>f, "      b = m_regs[breg];"
73        print >>f, "   }"
74   
75    print >>f, "   "
76    print >>f, "   if (creg == LIMM_REG)"
77    print >>f, "   {"
78    print >>f, "      if (!got_limm)"
79    print >>f, "      {"
80    print >>f, "         GET_LIMM_32;"
81    print >>f, "         size = 8;"
82    print >>f, "      }"
83    print >>f, "      c = limm;"
84    print >>f, "   }"
85    print >>f, "   else"
86    print >>f, "   {"
87    print >>f, "      c = m_regs[creg];"
88    print >>f, "   }"
89    print >>f, "   /* todo: is the limm, limm syntax valid? (it's pointless.) */"
90    print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
91    print >>f, "   %s" % (opexecute)
92    print >>f, "   "
93    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
94    print >>f, "   return m_pc + (size >> 0);"
95    print >>f, "}"
96    print >>f, ""
97    print >>f, ""
98    # the mode 0x01 handler   
99    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p01(OPS_32)" % (funcname)
100    print >>f, "{"
101    print >>f, "   int size = 4;"
102   
10372    if breg_is_dst_only == 0:   
10473        print >>f, "   UINT32 limm = 0;"
10574   
r242606r242607
11584    if ignore_a == 0:
11685        print >>f, "   COMMON32_GET_areg;"
11786    elif ignore_a == 1:
118       print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
119   
87        print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
88    elif ignore_a == 2:
89        print >>f, "     //COMMON32_GET_areg; // areg bits already used as opcode select"
90    elif ignore_a == 3:
91        print >>f, "     //COMMON32_GET_areg; // areg bits already used as condition code select"
12092    print >>f, "   "
12193   
12294    print >>f, "   UINT32 c;"
r242606r242607
140112    print >>f, "    c = u;"
141113    print >>f, "   "
142114    print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
143    print >>f, "   %s" % (opexecute)
144    print >>f, "   "
145    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
146    print >>f, "   return m_pc + (size >> 0);"
147    print >>f, "}"
148    print >>f, ""
149    print >>f, ""
150    # the mode 0x10 handler
151    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p10(OPS_32)" % (funcname)
115
116def EmitGroup04(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
117    # the mode 0x00 handler 
118    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p00(OPS_32)" % (funcname)
152119    print >>f, "{"
153120    print >>f, "   int size = 4;"
154
155    if breg_is_dst_only == 0:
156        print >>f, "   UINT32 limm = 0;"
157121   
158    print >>f, "/*   int got_limm = 0; */"
122    print >>f, "   UINT32 limm = 0;"
123   
124    print >>f, "   int got_limm = 0;"
159125    print >>f, "   "
160126    print >>f, "   COMMON32_GET_breg;"
161127
162    if flagcondition == -1:   
128    if flagcondition == -1:
163129        print >>f, "   COMMON32_GET_F;"
164   
165    print >>f, "   COMMON32_GET_s12;"
166   
167    if ignore_a == 0:   
130       
131    print >>f, "   COMMON32_GET_creg;"
132
133    if ignore_a == 0:
168134        print >>f, "   COMMON32_GET_areg;"
169135    elif ignore_a == 1:
170       print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
136        print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
137    elif ignore_a == 2:
138        print >>f, "     //COMMON32_GET_areg; // areg bits already used as opcode select"
139 
140    print >>f, "   "
171141   
172    print >>f, "   "
173142    print >>f, "   UINT32 c;"
174143    if breg_is_dst_only == 0:
175144        print >>f, "   UINT32 b;"
176145        print >>f, "   "
177        print >>f, "   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */"
178146        print >>f, "   if (breg == LIMM_REG)"
179147        print >>f, "   {"
180148        print >>f, "      GET_LIMM_32;"
181149        print >>f, "      size = 8;"
182        print >>f, "/*      got_limm = 1; */"
150        print >>f, "      got_limm = 1;"
183151        print >>f, "      b = limm;"
184152        print >>f, "   }"
185153        print >>f, "   else"
r242606r242607
187155        print >>f, "      b = m_regs[breg];"
188156        print >>f, "   }"
189157   
190    print >>f, "    "
191    print >>f, "    c = (UINT32)S;"
192158    print >>f, "   "
159    print >>f, "   if (creg == LIMM_REG)"
160    print >>f, "   {"
161    print >>f, "      if (!got_limm)"
162    print >>f, "      {"
163    print >>f, "         GET_LIMM_32;"
164    print >>f, "         size = 8;"
165    print >>f, "      }"
166    print >>f, "      c = limm;"
167    print >>f, "   }"
168    print >>f, "   else"
169    print >>f, "   {"
170    print >>f, "      c = m_regs[creg];"
171    print >>f, "   }"
172    print >>f, "   /* todo: is the limm, limm syntax valid? (it's pointless.) */"
193173    print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
194174    print >>f, "   %s" % (opexecute)
175    print >>f, "   %s" % (opwrite)   
195176    print >>f, "   "
196177    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
197178    print >>f, "   return m_pc + (size >> 0);"
198179    print >>f, "}"
199180    print >>f, ""
200181    print >>f, ""
201    # the mode 0x11 m0 handler   
202    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m0(OPS_32)" % (funcname)
182    # the mode 0x01 handler   
183    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p01(OPS_32)" % (funcname)
203184    print >>f, "{"
204    print >>f, "   int size = 4;"
205    print >>f, "   arcompact_fatal(\"arcompact_handle%s_p11_m0 (%s)\\n\");"  % (funcname, opname)
185    EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler)
186    print >>f, "   %s" % (opexecute)
187    print >>f, "   %s" % (opwrite)   
188    print >>f, "   "
189    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
206190    print >>f, "   return m_pc + (size >> 0);"
207191    print >>f, "}"
208192    print >>f, ""
209    print >>f, ""   
193    print >>f, ""
194    # the mode 0x10 handler
195    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p10(OPS_32)" % (funcname)
196    if ignore_a == 2:
197        print >>f, "{"
198        print >>f, "   int size = 4;"
199        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p10 (ares bits already used as opcode select, can't be used as s12) (%s)\\n\");"  % (funcname, opname)
200        print >>f, "   return m_pc + (size >> 0);"
201        print >>f, "}"
202    else:
203        print >>f, "{"
204        print >>f, "   int size = 4;"
205        if breg_is_dst_only == 0:
206            print >>f, "   UINT32 limm = 0;"
207       
208        print >>f, "/*   int got_limm = 0; */"
209        print >>f, "   "
210        print >>f, "   COMMON32_GET_breg;"
211   
212        if flagcondition == -1:   
213            print >>f, "   COMMON32_GET_F;"
214       
215        print >>f, "   COMMON32_GET_s12;"
216       
217        # areg can't be used here, it's used for s12 bits
218       
219        print >>f, "   "
220        print >>f, "   UINT32 c;"
221        if breg_is_dst_only == 0:
222            print >>f, "   UINT32 b;"
223            print >>f, "   "
224            print >>f, "   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */"
225            print >>f, "   if (breg == LIMM_REG)"
226            print >>f, "   {"
227            print >>f, "      GET_LIMM_32;"
228            print >>f, "      size = 8;"
229            print >>f, "/*      got_limm = 1; */"
230            print >>f, "      b = limm;"
231            print >>f, "   }"
232            print >>f, "   else"
233            print >>f, "   {"
234            print >>f, "      b = m_regs[breg];"
235            print >>f, "   }"
236       
237        print >>f, "    "
238        print >>f, "    c = (UINT32)S;"
239        print >>f, "   "
240        print >>f, "   /* todo: if areg = LIMM then there is no result (but since that register can never be read, I guess it doesn't matter if we store it there anyway?) */"
241        print >>f, "   %s" % (opexecute)
242        print >>f, "   %s" % (opwrite_alt)   
243        print >>f, "   "
244        EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
245        print >>f, "   return m_pc + (size >> 0);"
246        print >>f, "}"
247        print >>f, ""
248        print >>f, ""
249    # the mode 0x11 m0 handler   
250    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m0(OPS_32)" % (funcname)
251    if ignore_a == 2:
252        print >>f, "{"
253        print >>f, "   int size = 4;"
254        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p11_m0 (ares bits already used as opcode select, can't be used as Q condition) (%s)\\n\");"  % (funcname, opname)
255        print >>f, "   return m_pc + (size >> 0);"
256        print >>f, "}"
257    else:
258        print >>f, "{"
259        print >>f, "   int size = 4;"
260        print >>f, "   arcompact_fatal(\"arcompact_handle%s_p11_m0 (%s)\\n\");"  % (funcname, opname)
261        print >>f, "   return m_pc + (size >> 0);"
262        print >>f, "}"
263        print >>f, ""
264        print >>f, ""   
210265    # the mode 0x11 m1 handler   
211266    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m1(OPS_32)" % (funcname)
267    if ignore_a == 2:
268        print >>f, "{"
269        print >>f, "   int size = 4;"
270        print >>f, "   arcompact_fatal(\"illegal arcompact_handle%s_p11_m1 (ares bits already used as opcode select, can't be used as Q condition) (%s)\\n\");"  % (funcname, opname)
271        print >>f, "   return m_pc + (size >> 0);"
272        print >>f, "}"
273    else:
274        print >>f, "{"
275        EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, 3, breg_is_dst_only, flagcondition, flaghandler)
276        print >>f, "   COMMON32_GET_CONDITION;"
277        print >>f, "   if (!check_condition(condition))"
278        print >>f, "      return m_pc + (size>>0);"
279        print >>f, ""     
280        print >>f, "   %s" % (opexecute)
281        print >>f, "   %s" % (opwrite_alt)   
282        print >>f, "   "
283        EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
284        print >>f, "   return m_pc + (size >> 0);"
285        print >>f, "}"
286        print >>f, ""
287        print >>f, ""
288
289
290# xxx_S  c, b, u3  format opcodes (note c is destination)
291def EmitGroup0d(f,funcname, opname, opexecute, opwrite):
292    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)"  % (funcname)
212293    print >>f, "{"
213    print >>f, "   int size = 4;"
214    print >>f, "   arcompact_fatal(\"arcompact_handle%s_p11_m1 (%s)\\n\");"  % (funcname, opname)
215    print >>f, "   return m_pc + (size >> 0);"
294    print >>f, "   int u, breg, creg;"
295    print >>f, ""
296    print >>f, "   COMMON16_GET_u3;"
297    print >>f, "   COMMON16_GET_breg;"
298    print >>f, "   COMMON16_GET_creg;"
299    print >>f, ""
300    print >>f, "   REG_16BIT_RANGE(breg);"
301    print >>f, "   REG_16BIT_RANGE(creg);"
302    print >>f, ""
303    print >>f, "   %s" % (opexecute)
304    print >>f, "   %s" % (opwrite)
305    print >>f, ""
306    print >>f, "   return m_pc + (2 >> 0);"
216307    print >>f, "}"
308
309
310# xxx_S b <- b,c format opcodes
311def EmitGroup0f(f,funcname, opname, opexecute, opwrite):
312    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)"% (funcname)
313    print >>f, "{"
314    print >>f, "   int breg, creg;"
217315    print >>f, ""
316    print >>f, "   COMMON16_GET_breg;"
317    print >>f, "   COMMON16_GET_creg;"
218318    print >>f, ""
319    print >>f, "   REG_16BIT_RANGE(breg);"
320    print >>f, "   REG_16BIT_RANGE(creg);"
321    print >>f, ""
322    print >>f, "   %s" % (opexecute)
323    print >>f, "   %s" % (opwrite)   
324    print >>f, ""
325    print >>f, "   return m_pc + (2 >> 0);"
326    print >>f, "}"
219327
328
220329#  xxx_S b, b, u5 format opcodes
221330def EmitGroup17(f,funcname, opname, opexecute):
222331    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)" % (funcname)
r242606r242607
244353    sys.exit(1)
245354
246355
247EmitGroup04(f, "04_00", "ADD", "UINT32 result = b + c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags )
356EmitGroup04(f, "04_00", "ADD", "UINT32 result = b + c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_Handle_NZCV_ADD_Flags )
248357
249EmitGroup04(f, "04_02", "SUB", "UINT32 result = b - c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
358EmitGroup04(f, "04_02", "SUB", "UINT32 result = b - c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
250359
251EmitGroup04(f, "04_04", "AND", "UINT32 result = b & c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
252EmitGroup04(f, "04_05", "OR",  "UINT32 result = b | c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
253EmitGroup04(f, "04_06", "BIC", "UINT32 result = b & (~c); m_regs[areg] = result;",  0,0, -1, EmitGroup04_unsupported_Flags  )
254EmitGroup04(f, "04_07", "XOR", "UINT32 result = b ^ c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
360EmitGroup04(f, "04_04", "AND",  "UINT32 result = b & c;",                 "if (areg != LIMM_REG) { m_regs[areg] = result; }", "if (breg != LIMM_REG) { m_regs[breg] = result; }", 0,0, -1, EmitGroup04_Handle_NZ_Flags  )
361EmitGroup04(f, "04_05", "OR",   "UINT32 result = b | c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
362EmitGroup04(f, "04_06", "BIC",  "UINT32 result = b & (~c);",              "m_regs[areg] = result;", "m_regs[breg] = result;",  0,0, -1, EmitGroup04_unsupported_Flags  )
363EmitGroup04(f, "04_07", "XOR",  "UINT32 result = b ^ c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
255364
256EmitGroup04(f, "04_0a", "MOV", "UINT32 result = c; m_regs[breg] = result;", 1,1, -1, EmitGroup04_Handle_NZ_Flags  )
365EmitGroup04(f, "04_0a", "MOV", "UINT32 result = c;",                     "m_regs[breg] = result;", "m_regs[breg] = result;", 1,1, -1, EmitGroup04_Handle_NZ_Flags  ) # special case, result always goes to breg
257366
258EmitGroup04(f, "04_0f", "BSET", "UINT32 result = b | (1 << (c & 0x1f)); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
367EmitGroup04(f, "04_0e", "RSUB", "UINT32 result = c - b;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
368EmitGroup04(f, "04_0f", "BSET", "UINT32 result = b | (1 << (c & 0x1f));", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
259369
260EmitGroup04(f, "04_15", "ADD2", "UINT32 result = b + (c << 2); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
261EmitGroup04(f, "04_16", "ADD3", "UINT32 result = b + (c << 3); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
370EmitGroup04(f, "04_13", "BMSK", "UINT32 result = b & ((1<<(c+1))-1);",    "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
262371
263372
264EmitGroup04(f, "05_00", "ASL", "UINT32 result = b << (c&0x1f); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
265EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
373EmitGroup04(f, "04_14", "ADD1", "UINT32 result = b + (c << 1);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
374EmitGroup04(f, "04_15", "ADD2", "UINT32 result = b + (c << 2);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
375EmitGroup04(f, "04_16", "ADD3", "UINT32 result = b + (c << 3);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
376EmitGroup04(f, "04_17", "SUB1", "UINT32 result = b - (c << 1);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
377EmitGroup04(f, "04_18", "SUB2", "UINT32 result = b - (c << 2);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
378EmitGroup04(f, "04_19", "SUB3", "UINT32 result = b - (c << 3);",          "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
266379
380EmitGroup04(f, "04_2b", "SR", "WRITEAUX(c,b);", "", "", 1,0, -1, EmitGroup04_unsupported_Flags  ) # this can't be conditional (todo)
381
382
383
384EmitGroup04(f, "05_00", "ASL", "UINT32 result = b << (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
385EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
386
387# the 04_2f subgroup uses the same encoding, but the areg is already used as sub-opcode select, so any modes relying on areg bits for other reasons (sign, condition) (modes 10, 11m0, 11m1) are illegal.  the destination is also breg not areg
388EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;",          "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags  ) # no alt handler (invalid path)
389EmitGroup04(f, "04_2f_07", "EXTB", "UINT32 result = c & 0x000000ff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
390EmitGroup04(f, "04_2f_08", "EXTW", "UINT32 result = c & 0x0000ffff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
391
392# xxx_S  c, b, u3  format opcodes (note c is destination)
393EmitGroup0d(f, "0d_00", "ADD_S", "UINT32 result = m_regs[breg] + u;",         "m_regs[creg] = result;" )
394EmitGroup0d(f, "0d_01", "SUB_S", "UINT32 result = m_regs[breg] - u;",         "m_regs[creg] = result;" )
395EmitGroup0d(f, "0d_02", "ASL_S", "UINT32 result = m_regs[breg] << u;",        "m_regs[creg] = result;" )
396
397# xxx_S b <- b,c format opcodes  (or in some cases xxx_S b,c)
398EmitGroup0f(f, "0f_02", "SUB_S", "UINT32 result = m_regs[breg] - m_regs[creg];",        "m_regs[breg] = result;" )
399EmitGroup0f(f, "0f_04", "AND_S", "UINT32 result = m_regs[breg] & m_regs[creg];",        "m_regs[breg] = result;" )
400EmitGroup0f(f, "0f_05", "OR_S",  "UINT32 result = m_regs[breg] | m_regs[creg];",        "m_regs[breg] = result;" )
401EmitGroup0f(f, "0f_07", "XOR_S", "UINT32 result = m_regs[breg] ^ m_regs[creg];",        "m_regs[breg] = result;" )
402EmitGroup0f(f, "0f_0f", "EXTB_S","UINT32 result = m_regs[creg] & 0x000000ff;",          "m_regs[breg] = result;" )
403EmitGroup0f(f, "0f_10", "EXTW_S","UINT32 result = m_regs[creg] & 0x0000ffff;",          "m_regs[breg] = result;" )
404EmitGroup0f(f, "0f_13", "NEG_S"," UINT32 result = 0 - m_regs[creg];",                   "m_regs[breg] = result;" )
405
406EmitGroup0f(f, "0f_14", "ADD1_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<1);", "m_regs[breg] = result;" )
407EmitGroup0f(f, "0f_15", "ADD2_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<2);", "m_regs[breg] = result;" )
408EmitGroup0f(f, "0f_16", "ADD3_S"," UINT32 result = m_regs[breg] + (m_regs[creg] <<3);", "m_regs[breg] = result;" )
409
410EmitGroup0f(f, "0f_19", "LSR_S", "UINT32 result = m_regs[breg] >> (m_regs[creg]&0x1f);","m_regs[breg] = result;" )
411EmitGroup0f(f, "0f_1b", "ASL1_S","UINT32 result = m_regs[creg] << 1;",                  "m_regs[breg] = result;" )
412
413
267414#  xxx_S b, b, u5 format opcodes
268415EmitGroup17(f, "17_00", "ASL_S",  "m_regs[breg] = m_regs[breg] << (u&0x1f);" )
269416EmitGroup17(f, "17_01", "LSR_S",  "m_regs[breg] = m_regs[breg] >> (u&0x1f);" )
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242606r242607
129129   // 0000 0sss ssss sss0 SSSS SSSS SSNQ QQQQ
130130   INT32 address = (op & 0x07fe0000) >> 17;
131131   address |= ((op & 0x0000ffc0) >> 6) << 10;
132   if (address & 0x800000) address = -0x800000 + (address & 0x7fffff);
132   if (address & 0x80000) address = -0x80000 + (address & 0x7ffff);
133133   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
134134   COMMON32_GET_CONDITION
135135
r242606r242607
887887   { // 0010 0RRR 1110 1000 0RRR uuuu uu1Q QQQQ
888888      COMMON32_GET_u6
889889      COMMON32_GET_CONDITION
890      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, pc + u*2);
890      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, PC_ALIGNED32 + u*2);
891891
892892      int unused = (op & 0x00000020)>>5;
893893      if (unused==0)    output += sprintf(output, "(unused bit not set)");
trunk/src/emu/machine/z80dma.c
r242606r242607
596596   if(m_read_num_follow == 0) // special case: Legend of Kage on X1 Turbo
597597      res = m_status;
598598   else {
599      assert(m_read_cur_follow < ARRAY_LENGTH(m_read_regs_follow));
600599      res = m_read_regs_follow[m_read_cur_follow];
601600   }
602601
r242606r242607
687686            case COMMAND_READ_STATUS_BYTE:
688687               if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
689688               READ_MASK = 1;
690               assert(m_read_num_follow < ARRAY_LENGTH(m_read_regs_follow));
691               m_read_regs_follow[m_read_num_follow++] = m_status;
689               m_read_regs_follow[0] = m_status;
692690               break;
693691            case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
694692               WR3 &= ~0x20;
trunk/src/emu/video/tea1002.c
r0r242607
1/***************************************************************************
2
3    TEA1002
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    PAL colour encoder and video summer
9
10***************************************************************************/
11
12#include "tea1002.h"
13
14
15//**************************************************************************
16//  CONSTANTS
17//**************************************************************************
18
19const float tea1002_device::m_luminance[] =
20{
21    0, 22.5, 44, 66.5,  8.5, 31, 52.5, 100, // INV = 0
22   75, 52.5, 31,  8.5, 66.5, 44, 22.5, 0    // INV = 1
23};
24
25const int tea1002_device::m_phase[] =
26{
27   0, 103, 241, 167, 347,  61, 283, 0, // INV = 0
28   0, 283,  61, 347, 167, 241, 103, 0  // INV = 1
29};
30
31const int tea1002_device::m_amplitute[] =
32{
33   0, 48, 44, 33, 33, 44, 48, 0, // INV = 0
34   0, 24, 22, 17, 17, 22, 24, 0  // INV = 1
35};
36
37
38//**************************************************************************
39//  DEVICE DEFINITIONS
40//**************************************************************************
41
42const device_type TEA1002 = &device_creator<tea1002_device>;
43
44
45//**************************************************************************
46//  LIVE DEVICE
47//**************************************************************************
48
49//-------------------------------------------------
50//  paula_device - constructor
51//-------------------------------------------------
52
53tea1002_device::tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
54   device_t(mconfig, TEA1002, "TEA1002 PAL colour encoder", tag, owner, clock, "tea1002", __FILE__)
55{
56}
57
58//-------------------------------------------------
59//  device_start - device-specific startup
60//-------------------------------------------------
61
62void tea1002_device::device_start()
63{
64}
65
66
67//**************************************************************************
68//  IMPLEMENTATION
69//**************************************************************************
70
71// this could be done in device_start() and cached, but it's only
72// accessed once at PALETTE_INIT anyway
73rgb_t tea1002_device::color(int index)
74{
75   // calculate yuv
76   double y = m_luminance[index] / 100;
77   double u = cos((m_phase[index] + m_tint) * M_PI / 180) * m_amplitute[index] / 100;
78   double v = sin((m_phase[index] + m_tint) * M_PI / 180) * m_amplitute[index] / 100;
79
80   // and convert to rgb
81   double r = y + v * 1.14;
82   double g = y - u * 0.395 - v * 0.581;
83   double b = y + u * 2.032;
84
85   return rgb_t(rgb_t::clamp(r * 255), rgb_t::clamp(g * 255), rgb_t::clamp(b * 255));
86}
trunk/src/emu/video/tea1002.h
r0r242607
1/***************************************************************************
2
3    TEA1002
4
5    license: MAME, GPL-2.0+
6    copyright-holders: Dirk Best
7
8    PAL colour encoder and video summer
9
10                            _____   _____
11                   INV   1 |*    \_/     | 18  CBLNK
12                     R   2 |             | 17  3,54 MHz
13                     G   3 |             | 16  GND
14                     B   4 |             | 15  CBF
15                _CSYNC   5 |   TEA1002   | 14  8,86 MHz
16       lum. delay line   6 |             | 13  8,86 MHz
17       lum. delay line   7 |             | 12  PAL switch
18   comp. video to mod.   8 |             | 11  chroma band limiting
19 d.c. adj. / colour bar  9 |_____________| 10  Vp
20
21***************************************************************************/
22
23#pragma once
24
25#ifndef __TEA1002_H__
26#define __TEA1002_H__
27
28#include "emu.h"
29
30
31//**************************************************************************
32//  INTERFACE CONFIGURATION MACROS
33//**************************************************************************
34
35#define MCFG_TEA1002_ADD(_tag, _clock) \
36   MCFG_DEVICE_ADD(_tag, TEA1002, _clock)
37
38
39//**************************************************************************
40//  TYPE DEFINITIONS
41//**************************************************************************
42
43// ======================> tea1002_device
44
45class tea1002_device : public device_t
46{
47public:
48   // construction/destruction
49   tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
50
51   rgb_t color(int index);
52
53protected:
54   // device_t overrides
55   virtual void device_start();
56
57private:
58   static const int m_tint = -6; // what is this based on?
59   static const float m_luminance[16];
60   static const int m_phase[16];
61   static const int m_amplitute[16];
62};
63
64// device type definition
65extern const device_type TEA1002;
66
67#endif // __TEA1002_H__
trunk/src/emu/video/video.mak
r242606r242607
483483
484484#-------------------------------------------------
485485#
486#@src/emu/video/tea1002.h,VIDEOS += TEA1002
487#-------------------------------------------------
488
489ifneq ($(filter TEA1002,$(VIDEOS)),)
490VIDEOOBJS += $(VIDEOOBJ)/tea1002.o
491endif
492
493#-------------------------------------------------
494#
486495#@src/emu/video/tlc34076.h,VIDEOS += TLC34076
487496#-------------------------------------------------
488497
trunk/src/mame/audio/dkong.c
r242606r242607
11451145 0: 14 16       ... checkpoint charlie
11461146 1: 14 18       ... checkpoint bravo
11471147 2: 14 1A       ... checkpoint alpha
1148 3: 1C          You'll notice
1148 3: 1C          Use Caution (sounds kinda like 'You'll notice')
11491149 4: 1E 1E       Complete attack mission
11501150 5: 10 10 10    trouble, trouble, trouble
11511151 6: 12 12       all pilots climb up
trunk/src/mame/drivers/cps1.c
r242606r242607
18551855
18561856/* SWB.4, SWB.5 and SWB.6 need to be enabled simultaneously for turbo mode */
18571857static INPUT_PORTS_START( sf2amf )
1858   PORT_INCLUDE( sf2 )
1858   PORT_INCLUDE( sf2hack )
18591859
18601860   PORT_MODIFY("DSWB")
18611861   PORT_DIPNAME( 0x08, 0x08, "Turbo Mode Switch 1 of 3" )   PORT_DIPLOCATION("SW(B):4")
r242606r242607
1166611666GAME( 1992, sf2acc,      sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator!, bootleg, set 1)", GAME_SUPPORTS_SAVE )          // 920313 - based on World version
1166711667GAME( 1992, sf2acca,     sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator!, bootleg, set 2)", GAME_SUPPORTS_SAVE )          // 920313 - based on World version
1166811668GAME( 1992, sf2accp2,    sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Accelerator Pt.II, bootleg)", GAME_SUPPORTS_SAVE )        // 920313 - based on World version
11669GAME( 1992, sf2amf,      sf2ce,    cps1_12MHz, sf2amf,   cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Alpha Magic-F, bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )     // 920313 - based on World version
11669GAME( 1992, sf2amf,      sf2ce,    cps1_12MHz, sf2amf,   cps_state,   sf2hack,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (Alpha Magic-F, bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )     // 920313 - based on World version
1167011670GAME( 1992, sf2amf2,     sf2ce,    cps1_12MHz, sf2hack,  cps_state,   sf2hack,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (L735 Test Rom, bootleg)", GAME_SUPPORTS_SAVE )     // 920313 - based on World version
1167111671GAME( 1992, sf2dkot2,    sf2ce,    cps1_12MHz, sf2,      cps_state,   cps1,     ROT0,   "bootleg", "Street Fighter II': Champion Edition (Double K.O. Turbo II, bootleg)", GAME_SUPPORTS_SAVE ) // 902140 !!! - based on USA version
1167211672GAME( 1992, sf2ceblp,    sf2ce,    cps1_10MHz, sf2,      cps_state,   sf2ceblp, ROT0,   "bootleg", "Street Fighter II': Champion Edition (protected bootleg on non-dash board)", GAME_SUPPORTS_SAVE )          // 920313 - based on USA version
trunk/src/mame/drivers/sbrkout.c
r242606r242607
66
77    Games supported:
88        * Super Breakout
9        * Super Breakout (Canyon and Vertical Breakout, prototype) - built from original source code
9        * Super Breakout (Canyon and Vertical Breakout, prototype)
10      * Super Breakout (Cocktail, prototype)
1011
1112    Known issues:
1213        * none at this time
r242606r242607
5960   UINT8 m_pot_trigger[2];
6061   DECLARE_WRITE8_MEMBER(irq_ack_w);
6162   DECLARE_READ8_MEMBER(switches_r);
63   DECLARE_READ8_MEMBER(sbrkoutct_switches_r);
6264   DECLARE_WRITE8_MEMBER(pot_mask1_w);
6365   DECLARE_WRITE8_MEMBER(pot_mask2_w);
6466   DECLARE_WRITE8_MEMBER(start_1_led_w);
6567   DECLARE_WRITE8_MEMBER(start_2_led_w);
6668   DECLARE_WRITE8_MEMBER(serve_led_w);
69   DECLARE_WRITE8_MEMBER(serve_2_led_w);
6770   DECLARE_WRITE8_MEMBER(coincount_w);
6871   DECLARE_READ8_MEMBER(sync_r);
6972   DECLARE_READ8_MEMBER(sync2_r);
r242606r242607
212215   return result;
213216}
214217
218READ8_MEMBER(sbrkout_state::sbrkoutct_switches_r)
219{
220   UINT8 result = 0xff;
215221
222   switch( offset )
223   {
224      case 0x28: result = ioport("SELECT")->read(); break;
225      case 0x2e: result = ioport("SERVE")->read(); break;
226      case 0x2f: result = ioport("SERVE2")->read(); break;
227      case 0x30: result = (ioport("DIPS")->read() & 0x03) << 6; break;
228      case 0x31: result = (ioport("DIPS")->read() & 0x0c) << 4; break;
229      case 0x32: result = ioport("DIPS")->read() & 0xc0; break;
230      case 0x33: result = (ioport("DIPS")->read() & 0x30) << 2; break;
231      default: logerror("Unknown port read %x\n", offset); break;
232   }
233   return result;
234}
235
216236void sbrkout_state::update_nmi_state()
217237{
218238   if ((m_pot_trigger[0] & ~m_pot_mask[0]) | (m_pot_trigger[1] & ~m_pot_mask[1]))
r242606r242607
275295   output_set_led_value(0, ~offset & 1);
276296}
277297
298WRITE8_MEMBER(sbrkout_state::serve_2_led_w)
299{
300   output_set_led_value(1, ~offset & 1);
301}
278302
279303WRITE8_MEMBER(sbrkout_state::coincount_w)
280304{
r242606r242607
387411   AM_RANGE(0x2800, 0x3fff) AM_ROM
388412ADDRESS_MAP_END
389413
414static ADDRESS_MAP_START( sbrkoutct_main_map, AS_PROGRAM, 8, sbrkout_state )
415   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
416   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x380) AM_RAMBANK("bank1")
417   AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sbrkout_videoram_w) AM_SHARE("videoram")
418   AM_RANGE(0x0800, 0x083f) AM_READ(sbrkoutct_switches_r)
419   AM_RANGE(0x0840, 0x0840) AM_MIRROR(0x003f) AM_READ_PORT("COIN")
420   AM_RANGE(0x0880, 0x0880) AM_MIRROR(0x003f) AM_READ_PORT("START")
421   AM_RANGE(0x08c0, 0x08c0) AM_MIRROR(0x003f) AM_READ_PORT("SERVICE")
422   AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x03ff) AM_READ(sync_r)
423   AM_RANGE(0x0c10, 0x0c11) AM_MIRROR(0x000e) AM_WRITE(serve_led_w)
424   AM_RANGE(0x0c20, 0x0c21) AM_MIRROR(0x000e) AM_WRITE(serve_2_led_w)
425   AM_RANGE(0x0c30, 0x0c31) AM_MIRROR(0x000e) AM_WRITE(start_1_led_w)
426   AM_RANGE(0x0c40, 0x0c41) AM_MIRROR(0x000e) AM_WRITE(start_2_led_w)
427   AM_RANGE(0x0c50, 0x0c51) AM_MIRROR(0x000e) AM_WRITE(pot_mask1_w)
428   AM_RANGE(0x0c60, 0x0c61) AM_MIRROR(0x000e) AM_WRITE(pot_mask2_w)
429   AM_RANGE(0x0c70, 0x0c71) AM_MIRROR(0x000e) AM_WRITE(coincount_w)
430   AM_RANGE(0x0c80, 0x0c80) AM_MIRROR(0x007f) AM_WRITE(watchdog_reset_w)
431   AM_RANGE(0x0e00, 0x0e00) AM_MIRROR(0x007f) AM_WRITE(irq_ack_w)
432   AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x03ff) AM_READ(sync2_r)
433   AM_RANGE(0x2800, 0x3fff) AM_ROM
434ADDRESS_MAP_END
390435
391436
392437/*************************************
r242606r242607
475520   PORT_CONFSETTING(    0x02, "Vertical" )
476521INPUT_PORTS_END
477522
523static INPUT_PORTS_START( sbrkoutct )
524   PORT_INCLUDE(sbrkout)
525
526   PORT_START("SERVE2")
527   PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
528   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
529
530   PORT_MODIFY("SELECT")
531   PORT_CONFNAME(0x80, 0x00, "Game Select" )
532   PORT_CONFSETTING( 0x00,   DEF_STR( Off ) )
533   PORT_CONFSETTING( 0x80, DEF_STR( On ) )
534INPUT_PORTS_END
535
478536/*************************************
479537 *
480538 *  Graphics definitions
r242606r242607
543601MACHINE_CONFIG_END
544602
545603
604static MACHINE_CONFIG_DERIVED(sbrkoutct, sbrkout)
605   MCFG_CPU_MODIFY("maincpu")
606   MCFG_CPU_PROGRAM_MAP(sbrkoutct_main_map)
607MACHINE_CONFIG_END
546608
547609/*************************************
548610 *
r242606r242607
598660   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
599661ROM_END
600662
601ROM_START( sbrkoutc )
663ROM_START( sbrkoutc ) // built from original Atari source code
602664   ROM_REGION( 0x4000, "maincpu", 0 )
603665   ROM_LOAD( "a33443.bin",   0x2800, 0x1800, CRC(bf418976) SHA1(d766e220a284a7b9caf876207e8191aff0497a03) )
604666
r242606r242607
614676   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
615677ROM_END
616678
679ROM_START( sbrkoutct ) // built from original Atari source code
680   ROM_REGION( 0x4000, "maincpu", 0 )
681   ROM_LOAD( "034555-01.c1",   0x2800, 0x0800, CRC(2da82521) SHA1(1f53e549676052647486cea6738c5c7a45133538) )
682   ROM_LOAD( "034556-01.d11",  0x3000, 0x0800, CRC(5a6497ae) SHA1(96c2a136fb1e649e2db17bcb12bdc2a8d250a63e) )
683   ROM_LOAD( "034557-01.ef1",  0x3800, 0x0800, CRC(b6b3b07b) SHA1(c4d2cdcca89c2944afd4a4ed0bb5003b3eca4c7e) )
617684
685   ROM_REGION( 0x0400, "gfx1", 0 )
686   ROM_LOAD( "034559-01.r4",    0x0000, 0x0200, CRC(84368539) SHA1(50b2c3f443346e3a355492ed1f7ec0a8cc6364d4) )
687   ROM_LOAD( "034558-01.p4",    0x0200, 0x0200, CRC(cc0f81f2) SHA1(a2180280991c9cf43f4e941d9ba4fe5654d1af65) )
688
689   ROM_REGION( 0x0020, "gfx2", 0 )
690   ROM_LOAD( "033282.k6",    0x0000, 0x0020, CRC(6228736b) SHA1(bc176261dba11521df19d545ce604f8cc294287a) )
691
692   ROM_REGION( 0x0120, "proms", 0 )
693   ROM_LOAD( "006400.m2",    0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) )    /* sync (not used) */
694   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
695ROM_END
696
618697/*************************************
619698 *
620699 *  Game drivers
621700 *
622701 *************************************/
623702
624GAMEL( 1978, sbrkout, 0, sbrkout, sbrkout, driver_device, 0, ROT270,         "Atari", "Super Breakout (rev 04)", GAME_SUPPORTS_SAVE, layout_sbrkout )
625GAMEL( 1978, sbrkout3, sbrkout, sbrkout, sbrkout, driver_device, 0, ROT270,  "Atari", "Super Breakout (rev 03)", GAME_SUPPORTS_SAVE, layout_sbrkout )
626GAMEL( 1978, sbrkoutc, sbrkout, sbrkout, sbrkoutc, driver_device, 0, ROT270, "Atari", "Super Breakout (Canyon and Vertical Breakout, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
703GAMEL( 1978, sbrkout,   0,       sbrkout,   sbrkout,   driver_device, 0, ROT270, "Atari", "Super Breakout (rev 04)", GAME_SUPPORTS_SAVE, layout_sbrkout )
704GAMEL( 1978, sbrkout3,  sbrkout, sbrkout,   sbrkout,   driver_device, 0, ROT270, "Atari", "Super Breakout (rev 03)", GAME_SUPPORTS_SAVE, layout_sbrkout )
705GAMEL( 1978, sbrkoutc,  sbrkout, sbrkout,   sbrkoutc,  driver_device, 0, ROT270, "Atari", "Super Breakout (Canyon and Vertical Breakout, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
706GAMEL( 1978, sbrkoutct, sbrkout, sbrkoutct, sbrkoutct, driver_device, 0, ROT270, "Atari", "Super Breakout (Cocktail, prototype)", GAME_SUPPORTS_SAVE, layout_sbrkout )
trunk/src/mame/drivers/sprint2.c
r242606r242607
3939   m_game = 3;
4040}
4141
42DRIVER_INIT_MEMBER(sprint2_state,dominos4)
43{
44   m_game = 3;
45   m_maincpu->space(AS_PROGRAM).install_read_port(0x0880, 0x0880, "SELFTTEST");
46   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0c50, 0x0c5f, write8_delegate(FUNC(sprint2_state::dominos4_lamp3_w),this));
47   m_maincpu->space(AS_PROGRAM).install_write_handler(0x0c60, 0x0c6f, write8_delegate(FUNC(sprint2_state::dominos4_lamp4_w),this));
48}
49
4250int sprint2_state::service_mode()
4351{
4452   UINT8 v = ioport("INB")->read();
r242606r242607
234242   set_led_status(machine(), 1, offset & 1);
235243}
236244
245WRITE8_MEMBER(sprint2_state::dominos4_lamp3_w)
246{
247   set_led_status(machine(), 2, offset & 1);
248}
249WRITE8_MEMBER(sprint2_state::dominos4_lamp4_w)
250{
251   set_led_status(machine(), 3, offset & 1);
252}
237253
238254static ADDRESS_MAP_START( sprint2_map, AS_PROGRAM, 8, sprint2_state )
255   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
239256   AM_RANGE(0x0000, 0x03ff) AM_READWRITE(sprint2_wram_r,sprint2_wram_w)
240257   AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sprint2_video_ram_w) AM_SHARE("video_ram")
241258   AM_RANGE(0x0818, 0x081f) AM_READ(sprint2_input_A_r)
r242606r242607
261278   AM_RANGE(0x1400, 0x17ff) AM_READ(sprint2_collision2_r)
262279   AM_RANGE(0x1800, 0x1800) AM_READNOP  /* debugger ROM location? */
263280   AM_RANGE(0x2000, 0x3fff) AM_ROM
264   AM_RANGE(0xe000, 0xffff) AM_ROM
265281ADDRESS_MAP_END
266282
267283
r242606r242607
441457   PORT_ADJUSTER( 50, "R23 - Tone Freq" )
442458INPUT_PORTS_END
443459
460static INPUT_PORTS_START( dominos4 )
461   PORT_INCLUDE(dominos)
444462
463   PORT_MODIFY("INA")   /* input A */
464   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
465   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
466   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
467   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
468   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
469   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
470   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
471   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
472
473   PORT_MODIFY("INB")   /* input A */
474   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(3)
475   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(3)
476   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(3)
477   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(3)
478   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(4)
479   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(4)
480   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(4)
481   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(4)
482
483   PORT_START("SELFTTEST")
484   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
485INPUT_PORTS_END
486
445487static const gfx_layout tile_layout =
446488{
447489   16, 8,
r242606r242607
542584   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
543585MACHINE_CONFIG_END
544586
545
546587ROM_START( sprint1 )
547588   ROM_REGION( 0x10000, "maincpu", 0 )
548589   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
549   ROM_RELOAD(             0xe000, 0x0800 )
550590   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
551   ROM_RELOAD(             0xe800, 0x0800 )
552591   ROM_LOAD( "6442-01.d1", 0x3000, 0x0800, CRC(e9ff0124) SHA1(42fe028e2e595573ccc0821de3bb6970364c585d) )
553   ROM_RELOAD(             0xf000, 0x0800 )
554592   ROM_LOAD( "6443-01.e1", 0x3800, 0x0800, CRC(d6bb00d0) SHA1(cdcd4bb7b32be7a11480d3312fcd8d536e2d0caf) )
555   ROM_RELOAD(             0xf800, 0x0800 )
556593
557594   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
558595   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242606r242607
571608ROM_START( sprint2 )
572609   ROM_REGION( 0x10000, "maincpu", 0 )
573610   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
574   ROM_RELOAD(             0xe000, 0x0800 )
575611   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
576   ROM_RELOAD(             0xe800, 0x0800 )
577612   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
578   ROM_RELOAD(             0xf000, 0x0800 )
579613   ROM_LOAD( "6405.e1",    0x3800, 0x0800, CRC(6c991c80) SHA1(c30a5b340f05dd702c7a186eb62607a48fa19f72) )
580   ROM_RELOAD(             0xf800, 0x0800 )
581614
582615   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
583616   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242606r242607
596629ROM_START( sprint2a )
597630   ROM_REGION( 0x10000, "maincpu", 0 )
598631   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
599   ROM_RELOAD(             0xe000, 0x0800 )
600632   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
601   ROM_RELOAD(             0xe800, 0x0800 )
602633   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
603   ROM_RELOAD(             0xf000, 0x0800 )
604634   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(e80fd249) SHA1(7bcf7dfd72ca83fdd80593eaf392570da1f71298) )
605   ROM_RELOAD(             0xf800, 0x0800 )
606635
607636   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
608637   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242606r242607
621650ROM_START( sprint2h )
622651   ROM_REGION( 0x10000, "maincpu", 0 )
623652   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
624   ROM_RELOAD(             0xe000, 0x0800 )
625653   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
626   ROM_RELOAD(             0xe800, 0x0800 )
627654   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
628   ROM_RELOAD(             0xf000, 0x0800 )
629655   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(6de291f1) SHA1(00c2826011d80ac0784649a7bc156a97c26565fd) ) // sldh
630   ROM_RELOAD(             0xf800, 0x0800 )
631656
632657   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
633658   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242606r242607
646671ROM_START( dominos )
647672   ROM_REGION( 0x10000, "maincpu", 0 )
648673   ROM_LOAD( "7352-02.d1",   0x3000, 0x0800, CRC(738b4413) SHA1(3a90ab25bb5f65504692f97da43f03e21392dcd8) )
649   ROM_RELOAD(               0xf000, 0x0800 )
650674   ROM_LOAD( "7438-02.e1",   0x3800, 0x0800, CRC(c84e54e2) SHA1(383b388a1448a195f28352fc5e4ff1a2af80cc95) )
651   ROM_RELOAD(               0xf800, 0x0800 )
652675
653676   ROM_REGION( 0x200, "gfx1", 0 ) /* tiles */
654677   ROM_LOAD_NIB_HIGH( "7439-01.p4",   0x0000, 0x0200, CRC(4f42fdd6) SHA1(f8ea4b582e26cad37b746174cdc9f1c7ae0819c3) )
r242606r242607
662685   ROM_LOAD( "6401-01.e2", 0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )  /* address */
663686ROM_END
664687
688ROM_START( dominos4 ) // built from original Atari source code
689   ROM_REGION( 0x10000, "maincpu", 0 )
690   ROM_LOAD_NIB_HIGH( "007754-01.l1",   0x3000, 0x0400, CRC(03fae4a9) SHA1(a132bd8bc866e33cdf6b4881064c8d265c2b25f4) )
691   ROM_LOAD_NIB_LOW ( "007755-01.l0",   0x3000, 0x0400, CRC(fa2d0c04) SHA1(fcf618c7089db46d55933d58ea04701af515ad49) )
692   ROM_LOAD_NIB_HIGH( "007756-01.m1",   0x3400, 0x0400, CRC(d2acb1b5) SHA1(ad81eed9dd0a2d5ecfd42daf90825726e64063b3) )
693   ROM_LOAD_NIB_LOW ( "007757-01.m0",   0x3400, 0x0400, CRC(69f2db90) SHA1(a064c840599c4e7cb65670e5480adeb310247f16) )
694   ROM_LOAD_NIB_HIGH( "007758-01.n1",   0x3800, 0x0400, CRC(b49083b4) SHA1(41999e8d3fd6104c42f3a034045f9f9c75d8247a) )
695   ROM_LOAD_NIB_LOW ( "007759-01.n0",   0x3800, 0x0400, CRC(542200c7) SHA1(111f06e942e247b00b9f90fae2986c3c8d9ec8c5) )
696   ROM_LOAD_NIB_HIGH( "007760-01.p1",   0x3c00, 0x0400, CRC(7dc2a7a1) SHA1(9d02572cf689c6476b33226a5358dd1f72c4e61d) )
697   ROM_LOAD_NIB_LOW ( "007761-01.p0",   0x3c00, 0x0400, CRC(04365e0d) SHA1(fefc3c04e55f1aa8c80b1e5e1e403af8698c3530) )
665698
699   ROM_REGION( 0x200, "gfx1", 0 ) /* tiles */
700   ROM_LOAD_NIB_HIGH( "007764-01.p4",   0x0000, 0x0200, CRC(e4332dc0) SHA1(1f16c5b9f9fd7d478fd729cc79968f17746111f4) )
701   ROM_LOAD_NIB_LOW ( "007765-01.r4",   0x0000, 0x0200, CRC(6e4e6c75) SHA1(0fc77fecaa73eac57baf778bc51387c75883aad4) )
702
703   ROM_REGION( 0x200, "gfx2", 0 ) /* sprites, not used */
704   ROM_FILL( 0x0000, 0x0200, 0 )
705
706   ROM_REGION( 0x0120, "proms", 0 )
707   ROM_LOAD( "6400-01.m2", 0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) )  /* SYNC */
708   ROM_LOAD( "6401-01.e2", 0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )  /* address */
709ROM_END
710
666711GAME( 1978, sprint1,  0,       sprint1, sprint1, sprint2_state, sprint1, ROT0, "Atari (Kee Games)", "Sprint 1", 0 )
667712GAME( 1976, sprint2,  sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 1)", 0 )
668713GAME( 1976, sprint2a, sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 2)", 0 )
669714GAME( 1976, sprint2h, sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "hack", "Sprint 2 (color kit, Italy)", GAME_WRONG_COLORS ) // Italian hack, supposedly is color instead of b/w? how?
670715GAME( 1977, dominos,  0,       dominos, dominos, sprint2_state, dominos, ROT0, "Atari", "Dominos", 0 )
716GAME( 1977, dominos4, dominos, dominos, dominos4,sprint2_state, dominos4,ROT0, "Atari", "Dominos 4 (Cocktail)", 0 )
trunk/src/mame/includes/sprint2.h
r242606r242607
5454   DECLARE_WRITE8_MEMBER(sprint2_wram_w);
5555   DECLARE_WRITE8_MEMBER(sprint2_lamp1_w);
5656   DECLARE_WRITE8_MEMBER(sprint2_lamp2_w);
57   DECLARE_WRITE8_MEMBER(dominos4_lamp3_w);
58   DECLARE_WRITE8_MEMBER(dominos4_lamp4_w);
5759   DECLARE_READ8_MEMBER(sprint2_collision1_r);
5860   DECLARE_READ8_MEMBER(sprint2_collision2_r);
5961   DECLARE_WRITE8_MEMBER(sprint2_collision_reset1_w);
r242606r242607
6668   DECLARE_DRIVER_INIT(sprint1);
6769   DECLARE_DRIVER_INIT(sprint2);
6870   DECLARE_DRIVER_INIT(dominos);
71   DECLARE_DRIVER_INIT(dominos4);
6972   TILE_GET_INFO_MEMBER(get_tile_info);
7073   virtual void video_start();
7174   DECLARE_PALETTE_INIT(sprint2);
trunk/src/mame/mame.lst
r242606r242607
68606860sprint4a        // 008716           1977/12 [6502]
68616861nitedrvr        // 006321           1976/10 [6502]
68626862dominos         // 007305           1977/01 [6502]
6863dominos4        // 007754-007765   ??????? [6502]
68636864triplhnt        // 008422-008791    1977/04 [6800]
68646865sprint8         // ??????           1977/05 [6800]
68656866sprint8a        // ??????           1977/05 [6800]
r242606r242607
68866887sbrkout3        // 033442-033452    1978/09 [6502]
68876888sbrkout         // 033453-033455    1978/09 [6502]
68886889sbrkoutc        // unrealeased proto
6890sbrkoutct       // 034555-034559 proto ???? [6502]
68896891atarifb         // 033xxx           1978/10 [6502]
68906892atarifb1        // 033xxx           1978/10 [6502]
68916893atarifb2      // 035330-035350   ???      [6502]
trunk/src/mess/drivers/altos5.c
r242606r242607
221221WRITE8_MEMBER(altos5_state::memory_write_byte)
222222{
223223   address_space& prog_space = m_maincpu->space(AS_PROGRAM);
224   return prog_space.write_byte(offset, data);
224   prog_space.write_byte(offset, data);
225225}
226226
227227READ8_MEMBER(altos5_state::io_read_byte)
r242606r242607
233233WRITE8_MEMBER(altos5_state::io_write_byte)
234234{
235235   address_space& prog_space = m_maincpu->space(AS_IO);
236   return prog_space.write_byte(offset, data);
236   prog_space.write_byte(offset, data);
237237}
238238
239239WRITE_LINE_MEMBER( altos5_state::busreq_w )
trunk/src/mess/drivers/aquarius.c
r242606r242607
357357   MCFG_SCREEN_PALETTE("palette")
358358
359359   MCFG_GFXDECODE_ADD("gfxdecode", "palette", aquarius )
360   MCFG_TEA1002_ADD("encoder", XTAL_8_867238MHz)
360361   MCFG_PALETTE_ADD("palette", 512)
361362   MCFG_PALETTE_INDIRECT_ENTRIES(16)
362363   MCFG_PALETTE_INIT_OWNER(aquarius_state, aquarius)
trunk/src/mess/drivers/excali64.c
r242606r242607
1919
2020ToDo:
2121- Colours are approximate.
22- Disk controller, using the old wd17xx because new wd crashes on loading a disk.
22- Disk controller, works with old wd17xx but crashes on new wd.
2323- Hardware supports 20cm and 13cm floppies, but we only support 13cm as this
2424  is the only software that exists.
2525- The schematic shows the audio counter connected to 2MHz, but this produces
r242606r242607
2929
3030****************************************************************************/
3131
32#define NEWFDC 0
33
34
3235#include "emu.h"
3336#include "cpu/z80/z80.h"
3437#include "video/mc6845.h"
3538#include "machine/i8251.h"
3639#include "bus/rs232/rs232.h"
40//#include "machine/clock.h"
3741#include "machine/pit8253.h"
3842#include "machine/i8255.h"
3943#include "bus/centronics/ctronics.h"
r242606r242607
4347#include "machine/z80dma.h"
4448#include "machine/rescap.h"
4549#include "machine/74123.h"
50#if NEWFDC
51#include "machine/wd_fdc.h"
52#include "formats/excali64_dsk.h"
53#else
4654#include "machine/wd17xx.h"
4755#include "imagedev/flopdrv.h"
4856#include "formats/basicdsk.h"
57#endif
4958
5059class excali64_state : public driver_device
5160{
r242606r242607
6170      , m_u12(*this, "u12")
6271      , m_centronics(*this, "centronics")
6372      , m_fdc(*this, "fdc")
73#if NEWFDC
74      , m_floppy0(*this, "fdc:0")
75      , m_floppy1(*this, "fdc:1")
76#endif
6477   { }
6578
6679   DECLARE_PALETTE_INIT(excali64);
r242606r242607
7386   DECLARE_WRITE8_MEMBER(porte4_w);
7487   DECLARE_READ8_MEMBER(porte8_r);
7588   DECLARE_WRITE8_MEMBER(portec_w);
89#if NEWFDC
90   DECLARE_FLOPPY_FORMATS(floppy_formats);
91#endif
7692   DECLARE_WRITE_LINE_MEMBER(cent_busy_w);
7793   DECLARE_WRITE_LINE_MEMBER(busreq_w);
7894   DECLARE_READ8_MEMBER(memory_read_byte);
r242606r242607
103119   required_device<z80dma_device> m_dma;
104120   required_device<ttl74123_device> m_u12;
105121   required_device<centronics_device> m_centronics;
122#if NEWFDC
123   required_device<wd2793_t> m_fdc;
124   required_device<floppy_connector> m_floppy0;
125   required_device<floppy_connector> m_floppy1;
126#else
106127   required_device<wd2793_device> m_fdc;
128#endif
107129};
108130
109131static ADDRESS_MAP_START(excali64_mem, AS_PROGRAM, 8, excali64_state)
r242606r242607
129151   AM_RANGE(0xe4, 0xe7) AM_WRITE(porte4_w)
130152   AM_RANGE(0xe8, 0xeb) AM_READ(porte8_r)
131153   AM_RANGE(0xec, 0xef) AM_WRITE(portec_w)
154#if NEWFDC
155   AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
156#else
132157   AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("fdc", wd2793_device, read, write)
158#endif
133159ADDRESS_MAP_END
134160
135161
r242606r242607
220246   m_centronics_busy = state;
221247}
222248
249#if NEWFDC
250FLOPPY_FORMATS_MEMBER( excali64_state::floppy_formats )
251   FLOPPY_EXCALI64_FORMAT
252FLOPPY_FORMATS_END
253
254static SLOT_INTERFACE_START( excali64_floppies )
255   SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
256SLOT_INTERFACE_END
257#else
223258static LEGACY_FLOPPY_OPTIONS_START(excali64)
224259   LEGACY_FLOPPY_OPTION(excali64_ds, "raw", "Excalibur 64 DS disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
225260      HEADS([2])
r242606r242607
235270   LEGACY_FLOPPY_OPTIONS_NAME(excali64),
236271   NULL
237272};
273#endif
238274
239275// pulses from port E4 bit 5 restart the 74123. After 3.6 secs without a pulse, the motor gets turned off.
240276WRITE8_MEMBER( excali64_state::motor_w )
241277{
242278   m_motor = BIT(data, 0);
279#if NEWFDC
280   m_floppy1->get_device()->mon_w(!m_motor);
281   m_floppy0->get_device()->mon_w(!m_motor);
282#else
243283   legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(FLOPPY_0);
244284   flop->floppy_mon_w(!m_motor); // motor on
245285   flop = subdevice<legacy_floppy_image_device>(FLOPPY_1);
246286   flop->floppy_mon_w(!m_motor); // motor on
287#endif
247288}
248289
249290READ8_MEMBER( excali64_state::porte8_r )
r242606r242607
253294
254295WRITE8_MEMBER( excali64_state::porte4_w )
255296{
297#if NEWFDC
298   floppy_image_device *floppy = NULL;
299   if (BIT(data, 0))
300      floppy = m_floppy0->get_device();
301
302   if (BIT(data, 1))
303      floppy = m_floppy1->get_device();
304
305   m_fdc->set_floppy(floppy);
306   if (floppy)
307      floppy->ss_w(BIT(data, 4));
308
309#else
256310   if BIT(data, 0)
257311      m_fdc->set_drive(0);
258312
r242606r242607
260314      m_fdc->set_drive(1);
261315
262316   m_fdc->set_side(BIT(data, 4));
317#endif
263318
264319   m_u12->b_w(space,offset, BIT(data, 5)); // motor pulse
265320}
r242606r242607
271326*/
272327WRITE8_MEMBER( excali64_state::portec_w )
273328{
329#if NEWFDC
330   m_fdc->dden_w(BIT(data, 2));
331#else
274332   m_fdc->dden_w(!BIT(data, 2));
333#endif
275334}
276335
277336WRITE_LINE_MEMBER( excali64_state::busreq_w )
r242606r242607
592651
593652   /* Devices */
594653   MCFG_CASSETTE_ADD( "cassette" )
654#if NEWFDC
655   MCFG_WD2793x_ADD("fdc", XTAL_16MHz / 16)
656   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
657   MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", excali64_state::floppy_formats)
658   MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", excali64_state::floppy_formats)
659#else
595660   MCFG_DEVICE_ADD("fdc", WD2793, 0)
596661   MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
597662   MCFG_WD17XX_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
598663   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(excali64_floppy_interface)
599
664#endif
600665   MCFG_DEVICE_ADD("dma", Z80DMA, XTAL_16MHz/4)
601666   MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(excali64_state, busreq_w))
602667   MCFG_Z80DMA_IN_MREQ_CB(READ8(excali64_state, memory_read_byte))
trunk/src/mess/drivers/leapster.c
r242606r242607
284284   AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_MIRROR(0x40000000) // pointers in the bios region seem to be to the 40xxxxxx region, either we mirror there or something (real bios?) is acutally missing
285285   AM_RANGE(0x0180D800, 0x0180D803) AM_READ(leapster_random_r)
286286   AM_RANGE(0x03000000, 0x030007ff) AM_RAM // puts stack here, writes a pointer @ 0x03000000 on startup
287   AM_RANGE(0x3c000000, 0x3c1fffff) AM_RAM // really ram, or has our code execution gone wrong?
287288//   AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present
288289ADDRESS_MAP_END
289290
trunk/src/mess/drivers/mc1502.c
r242606r242607
326326MACHINE_CONFIG_END
327327
328328static MACHINE_CONFIG_DERIVED( pk88, mc1502 )
329   MCFG_CPU_REPLACE("maincpu", I8088, XTAL_16MHz/3)
329   MCFG_CPU_MODIFY("maincpu")
330330   MCFG_CPU_PROGRAM_MAP(pk88_map)
331   MCFG_CPU_IO_MAP(mc1502_io)
332331MACHINE_CONFIG_END
333332
334333
trunk/src/mess/drivers/sdk86.c
r242606r242607
99        22/06/2011 Working [Robbbert]
1010
1111    TODO:
12    Add 8251A for serial
13    Add optional 2x 8255A
12    Add optional 2x 8255A port read/write logging
1413
1514
1615
r242606r242607
1918There is no speaker or storage facility in the standard kit.
2019
2120Download the User Manual to get the operating procedures.
21The user manual is available from: http://www.bitsavers.org/pdf/intel/8086/9800698A_SDK-86_Users_Man_Apr79.pdf
2222
2323ToDo:
2424- Artwork
trunk/src/mess/drivers/tispeak.c
r242606r242607
55  Texas Instruments Speak & Spell hardware
66 
77  (still need to write notes here..)
8 
9  Other stuff on similar hardware:
10  - Language Tutor/Translator
11  - Touch & Tell, but it runs on a TMS1100!
12  - Speak & Spell Compact, Speak & Write (UK version), TMS1100? TMS0980?
13  - Speak & Read
814
915***************************************************************************/
1016
r242606r242607
1824#include "tispeak.lh"
1925
2026// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
21// C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4.
27// In an early 1979 Speak & Spell, C is 68pf, R is a 50kohm trimpot which is set to around 33.6kohm
28// (measured in-circuit). CPUCLK is this osc freq /2, ROMCLK is this osc freq /4.
2229// The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency,
23// which is 640kHz according to the TMS5100 documentation.
30// which is 640kHz for 8KHz according to the TMS5100 documentation.
2431
2532#define MASTER_CLOCK (640000)
2633
r242606r242607
454461
455462ROM_START( snspell )
456463   ROM_REGION( 0x1000, "maincpu", 0 )
457   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
464   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
458465
459466   ROM_REGION( 1246, "maincpu:ipla", 0 )
460467   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
r242606r242607
483490   ROM_LOAD( "cd2350a.vsm", 0x0000, 0x4000, CRC(2adda742) SHA1(3f868ed8284b723c815a30343057e03467c043b5) )
484491ROM_END
485492
486ROM_START( snspellp )
487   ROM_REGION( 0x1000, "maincpu", 0 )
488   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
489
490   ROM_REGION( 1246, "maincpu:ipla", 0 )
491   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
492   ROM_REGION( 2127, "maincpu:mpla", 0 )
493   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0271
494   ROM_REGION( 1246, "maincpu:opla", 0 )
495   ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
496
497   ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
498   ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) )
499   ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) )
500ROM_END
501
502493ROM_START( snspelluk )
503494   ROM_REGION( 0x1000, "maincpu", 0 )
504495   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
r242606r242607
549540
550541ROM_START( snmath )
551542   ROM_REGION( 0x1000, "maincpu", 0 )
552   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have
543   // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
544   // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
545   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
553546
554547   ROM_REGION( 1246, "maincpu:ipla", 0 )
555548   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
556549   ROM_REGION( 2127, "maincpu:mpla", 0 )
557   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
550   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704
558551   ROM_REGION( 1246, "maincpu:opla", 0 )
559   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have
552   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
560553
561554   ROM_REGION( 0x8000, "tms6100", 0 )
562555   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
r242606r242607
582575   ROM_RELOAD(             0x7000, 0x1000 )
583576ROM_END
584577
585ROM_START( snmathp )
586   ROM_REGION( 0x1000, "maincpu", 0 )
587   // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
588   // BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
589   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
590578
591   ROM_REGION( 1246, "maincpu:ipla", 0 )
592   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
593   ROM_REGION( 2127, "maincpu:mpla", 0 )
594   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as cd2704
595   ROM_REGION( 1246, "maincpu:opla", 0 )
596   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
597579
598   ROM_REGION( 0x8000, "tms6100", 0 )
599   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
600   ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) )
601ROM_END
602
603
604
605COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
580COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
606581COMP( 1980, snspella,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
607COMP( 1978, snspellp,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND )
608582COMP( 1978, snspelluk,  snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
609583COMP( 1981, snspelluka, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
610COMP( 1980, ladictee,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work, custom MCU ROM?
584COMP( 1980, ladictee,   snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magnifique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work due to missing CD2702 MCU dump, German version has CD2702 too
611585
612COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
586COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
613587COMP( 1986, snmatha,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
614COMP( 1980, snmathp,    snmath,  0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND )
trunk/src/mess/includes/aquarius.h
r242606r242607
99
1010#include "emu.h"
1111#include "cpu/z80/z80.h"
12#include "video/tea1002.h"
1213#include "imagedev/cassette.h"
1314#include "machine/ram.h"
1415#include "sound/ay8910.h"
r242606r242607
3839         m_y7(*this, "Y7"),
3940         m_gfxdecode(*this, "gfxdecode"),
4041         m_screen(*this, "screen"),
42         m_tea1002(*this, "encoder"),
4143         m_palette(*this, "palette")
4244   { }
4345
r242606r242607
5860   required_ioport m_y7;
5961   required_device<gfxdecode_device> m_gfxdecode;
6062   required_device<screen_device> m_screen;
63   required_device<tea1002_device> m_tea1002;
6164   required_device<palette_device> m_palette;
6265
6366   UINT8 m_scrambler;
trunk/src/mess/mess.lst
r242606r242607
10641064
10651065// TI Speak & Spell
10661066snspell
1067snspellp
10681067snspella
10691068snspelluk
10701069snspelluka
10711070ladictee
10721071snmath
10731072snmatha
1074snmathp
10751073
10761074// Texas Instruments Calculators
10771075tisr16    // 1974 SR-16
trunk/src/mess/mess.mak
r242606r242607
313313VIDEOS += SNES_PPU
314314VIDEOS += STVVDP
315315VIDEOS += T6A04
316VIDEOS += TEA1002
316317#VIDEOS += TLC34076
317318#VIDEOS += TMS34061
318319VIDEOS += TMS3556
trunk/src/mess/video/aquarius.c
r242606r242607
1010#include "includes/aquarius.h"
1111
1212
13
14static const rgb_t aquarius_colors[] =
15{
16   rgb_t::black,                  /* Black */
17   rgb_t(0xff, 0x00, 0x00), /* Red */
18   rgb_t(0x00, 0xff, 0x00), /* Green */
19   rgb_t(0xff, 0xff, 0x00), /* Yellow */
20   rgb_t(0x00, 0x00, 0xff), /* Blue */
21   rgb_t(0x7f, 0x00, 0x7f), /* Violet */
22   rgb_t(0x7f, 0xff, 0xff), /* Light Blue-Green */
23   rgb_t::white,                  /* White */
24   rgb_t(0xc0, 0xc0, 0xc0), /* Light Gray */
25   rgb_t(0x00, 0xff, 0xff), /* Blue-Green */
26   rgb_t(0xff, 0x00, 0xff), /* Magenta */
27   rgb_t(0x00, 0x00, 0x7f), /* Dark Blue */
28   rgb_t(0xff, 0xff, 0x7f), /* Light Yellow */
29   rgb_t(0x7f, 0xff, 0x7f), /* Light Green */
30   rgb_t(0xff, 0x7f, 0x00), /* Orange */
31   rgb_t(0x7f, 0x7f, 0x7f)  /* Dark Gray */
32};
33
3413static const unsigned short aquarius_palette[] =
3514{
3615   0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, 0,
r242606r242607
5635   int i;
5736
5837   for (i = 0; i < 16; i++)
59      m_palette->set_indirect_color(i, aquarius_colors[i]);
38      m_palette->set_indirect_color(i, m_tea1002->color(i));
6039
6140   for (i = 0; i < 512; i++)
6241      m_palette->set_pen_indirect(i, aquarius_palette[i]);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team