Previous 199869 Revisions Next

r34094 Sunday 28th December, 2014 at 17:36:45 UTC by Couriersud
Fix "-mt" for SDLMAME windows build [Calamity, Couriersud].
[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
[src/osd/sdl]window.c

trunk/hash/gba.xml
r242605r242606
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
2634626335   <software name="ozzydrix">
2634726336      <description>Ozzy &amp; Drix (USA)</description>
2634826337      <year>2003</year>
r242605r242606
2912629115      </part>
2912729116   </software>
2912829117
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
2914029118   <software name="revshinp" cloneof="revshin">
2914129119      <description>The Revenge of Shinobi (Euro, Prototype)</description>
2914229120      <year>2003</year>
trunk/hash/megadriv.xml
r242605r242606
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="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"/>
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"/>
125125         </dataarea>
126126      </part>
127127   </software>
r242605r242606
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="4194304">
9605         <dataarea name="rom" width="16" endianness="big" size="2621440">
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>
r242605r242606
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
3009230081   <software name="lionkin3a" cloneof="lionkin3">
3009330082      <description>Lion King 3 (Alt?)</description>
3009430083      <year>199?</year>
r242605r242606
3018430173      </part>
3018530174   </software>
3018630175
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>
3019730176
30198
3019930177<!-- Other Dumps to be sorted -->
3020030178
3020130179   <software name="dynoblaz">
trunk/hash/n64.xml
r242605r242606
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
31423087   <software name="crusnexo">
31433088      <description>Cruis'n Exotica (USA)</description>
31443089      <year>2000</year>
r242605r242606
78337778      </part>
78347779   </software>
78357780
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
78757781   <software name="pgaeurou" cloneof="pgaeuro">
78767782      <description>PGA European Tour (USA)</description>
78777783      <year>2000</year>
trunk/hash/pc98.xml
r242605r242606
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
4682146808   <software name="lotus123" supported="no">
4682246809      <description>Lotus 1-2-3 (Demo)</description>
4682346810      <year>19??</year>
r242605r242606
4927649263      </part>
4927749264   </software>
4927849265
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
4932949266   <software name="vermiln" supported="no">
4933049267      <description>Vermilion</description>
4933149268      <year>1990</year>
trunk/hash/sol20_cass.xml
r242605r242606
166166   <software name="atc">
167167      <description>Air Traffic Control</description>
168168      <year>1978</year>
169      <publisher>Creative Computing Software</publisher>
169      <publisher>Processor Technology Corporation</publisher>
170170
171171      <part name="cass1" interface="sol20_cass">
172172         <dataarea name="cass" size="2457454">
trunk/src/emu/bus/abckb/abc99.c
r242605r242606
8080//-------------------------------------------------
8181
8282ROM_START( abc99 )
83   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8483   ROM_DEFAULT_BIOS("107268")
8584   ROM_SYSTEM_BIOS( 0, "107268", "107268-17" )
85   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
86
87   ROM_REGION( 0x1000, I8035_Z2_TAG, 0 )
8688   ROMX_LOAD( "107268-17.z3", 0x0000, 0x0800, CRC(2f60cc35) SHA1(ebc6af9cd0a49a0d01698589370e628eebb6221c), ROM_BIOS(1) )
87   ROM_SYSTEM_BIOS( 1, "106819", "106819-09" )
8889   ROMX_LOAD( "106819-09.z3", 0x0000, 0x1000, CRC(ffe32a71) SHA1(fa2ce8e0216a433f9bbad0bdd6e3dc0b540f03b7), ROM_BIOS(2) ) // ABC 99 6490423-01
8990
9091   ROM_REGION( 0x800, I8035_Z5_TAG, 0 )
trunk/src/emu/bus/megadrive/md_slot.c
r242605r242606
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 && m_type != CM_2IN1)
387   if (m_type != SSF2 && m_type != PSOLAR)
388388      m_cart->rom_map_setup(length);
389389
390390   return IMAGE_INIT_PASS;
trunk/src/emu/bus/megadrive/rom.c
r242605r242606
531531 CODEMASTERS 2 IN 1 (RESET BASED)
532532 -------------------------------------------------*/
533533
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x1fffff) + 0x200000)/2)
534#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x7ffff) + 0x200000)/2)
535535
536536READ16_MEMBER(md_rom_cm2in1_device::read)
537537{
trunk/src/emu/cpu/arcompact/arcompact.c
r242605r242606
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
3127arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3228   : cpu_device(mconfig, ARCA5, "ARCtangent-A5", tag, owner, clock, "arca5", __FILE__)
3329   , 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
3530{
3631}
3732
r242605r242606
6459   m_debugger_temp = 0;
6560
6661   m_program = &space(AS_PROGRAM);
67   m_io = &space(AS_IO);
6862
6963   state_add( 0,  "PC", m_debugger_temp).callimport().callexport().formatstr("%08X");
7064
7165   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");
7466
7567   state_add(STATE_GENPC, "GENPC", m_debugger_temp).callexport().noshow();
7668
r242605r242606
9688      case 0x10:
9789         m_debugger_temp = m_status32;
9890         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;
10591
10692      case STATE_GENPC:
10793         m_debugger_temp = m_pc;
r242605r242606
130116      case 0x10:
131117         m_status32 = m_debugger_temp;
132118         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;
139119
140120      default:
141121         if ((index >= 0x100) && (index < 0x140))
r242605r242606
157137      m_regs[i] = 0;
158138
159139   m_status32 = 0;
160   m_LP_START = 0;
161   m_LP_END = 0;
162
163140}
164141
165
166142/*****************************************************************************/
167   
168143
169144void arcompact_device::execute_set_input(int irqline, int state)
170145{
trunk/src/emu/cpu/arcompact/arcompact.h
r242605r242606
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 : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
80   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
8181
8282   // device_state_interface overrides
8383   virtual void state_import(const device_state_entry &entry);
r242605r242606
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);
r242605r242606
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);
r242605r242606
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);
777776   ARCOMPACT_HANDLER04_TYPE_PM(04_0f);
778   ARCOMPACT_HANDLER04_TYPE_PM(04_13);
779   ARCOMPACT_HANDLER04_TYPE_PM(04_14);
780777   ARCOMPACT_HANDLER04_TYPE_PM(04_15);
781778   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);   
785779   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
786   ARCOMPACT_HANDLER04_TYPE_PM(04_2b);
787780
788   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02);
789781   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07);
790782   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08);
791783
r242605r242606
794786
795787
796788private:
797   const address_space_config m_program_config;
798   const address_space_config m_io_config;
789   address_space_config m_program_config;
799790
800791   UINT32 m_pc;
801792
802793   address_space *m_program;
803   address_space  *m_io;
804
805794   int m_icount;
806795
807796   UINT32 m_debugger_temp;
r242605r242606
814803   inline void WRITE16(UINT32 address, UINT16 data){    m_program->write_word(address << 1, data); }
815804   inline UINT8 READ8(UINT32 address) { return m_program->read_byte(address << 0); }
816805   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); }
820806
821
822   int check_condition(UINT8 condition);
823
824807   UINT32 m_regs[0x40];
825808
826809   int m_delayactive;
r242605r242606
830813//   f  e  d  c| b  a  9  8| 7  6  5  4| 3  2  1  0
831814//  -  -  -  L| Z  N  C  V| U DE AE A2|A1 E2 E1  H
832815   UINT32 m_status32;
833
834   UINT32 m_LP_START;
835   UINT32 m_LP_END;
836
837816};
838817
839818#define V_OVERFLOW_FLAG (0x00000100)
r242605r242606
863842
864843// Condition 0x0c (LE)
865844#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)
870845
871846extern const device_type ARCA5;
872847
trunk/src/emu/cpu/arcompact/arcompact_common.h
r242605r242606
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
r242605r242606
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
5039      m_icount--;
5140   }
5241
r242605r242606
140129#define PC_ALIGNED32 \
141130   (m_pc&0xfffffffc)
142131
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   }
180132
181    return -1;
182
183}
184
185
186133ARCOMPACT_RETTYPE arcompact_device::get_insruction(OPS_32)
187134{
188135   UINT8 instruction = ARCOMPACT_OPERATION;
r242605r242606
11541101ARCOMPACT_RETTYPE arcompact_device::arcompact_handle00_00(OPS_32)
11551102{
11561103   int size = 4;
1157
1158   COMMON32_GET_CONDITION
1159
1160   if (!check_condition(condition))
1161      return m_pc + (size>>0);
1162
11631104   // Branch Conditionally
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
1105   arcompact_log("unimplemented Bcc %08x", op);
11851106   return m_pc + (size>>0);
11861107}
11871108
r242605r242606
15011422   return m_pc + (size>>0);
15021423}
15031424
1504ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32) //  register - immediate BRLO
1505{
1506   BR_REGIMM_SETUP
1425ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_04(OPS_32)  { return arcompact_01_01_01_helper(PARAMS, "BRLO"); }
15071426
1508   // BRLO (unsigned operation)
1509   if (b < c)
1510   {
1511      BR_TAKEJUMP
1512   }
1513   
1514   return m_pc + (size>>0);
1515
1516}
1517
15181427ARCOMPACT_RETTYPE arcompact_device::arcompact_handle01_01_01_05(OPS_32) // register - immediate BRHS
15191428{
15201429   BR_REGIMM_SETUP
r242605r242606
18521761   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0d], /*"RCMP"*/ 1,0);
18531762}
18541763
1764ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_0e(OPS_32)
1765{
1766   return arcompact_handle04_helper(PARAMS, opcodes_04[0x0e], /*"RSUB"*/ 0,0);
1767}
18551768
18561769
18571770ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_10(OPS_32) 
r242605r242606
18691782   return arcompact_handle04_helper(PARAMS, opcodes_04[0x12], /*"BXOR"*/ 0,0);
18701783}
18711784
1785ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_13(OPS_32) 
1786{
1787   return arcompact_handle04_helper(PARAMS, opcodes_04[0x13], /*"BMSK"*/ 0,0);
1788}
18721789
1790ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_14(OPS_32) 
1791{
1792   return arcompact_handle04_helper(PARAMS, opcodes_04[0x14], /*"ADD1"*/ 0,0);
1793}
18731794
18741795
18751796
18761797
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
18771813ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_1a(OPS_32) 
18781814{
18791815   return arcompact_handle04_helper(PARAMS, opcodes_04[0x1a], /*"MPY"*/ 0,0);
r242605r242606
19011837   int got_limm = 0;
19021838
19031839   COMMON32_GET_creg
1904   COMMON32_GET_F
19051840
19061841   if (creg == LIMM_REG)
19071842   {
r242605r242606
19231858      // J.F [ilink1]    0010 0RRR 0010 0000 1RRR 0111 01RR RRRR  (creg = ILINK1, FLAG must be set)
19241859      // J.F [ilink2]    0010 0RRR 0010 0000 1RRR 0111 10RR RRRR  (creg = ILINE2, FLAG must be set)
19251860
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      }
1861      arcompact_log("unimplemented J %08x", op);
19521862   }
19531863
19541864   return m_pc + (size>>0);
r242605r242606
19591869   // opcode          iiii i--- ppII IIII F--- uuuu uu-- ----
19601870   // J u6            0010 0RRR 0110 0000 0RRR uuuu uuRR RRRR
19611871   int size = 4;
1962   arcompact_log("2 unimplemented J %08x", op);
1872   arcompact_log("unimplemented J %08x", op);
19631873   return m_pc + (size>>0);
19641874}
19651875
r242605r242606
19681878   // opcode          iiii i--- ppII IIII F--- ssss ssSS SSSS
19691879   // J s12           0010 0RRR 1010 0000 0RRR ssss ssSS SSSS
19701880   int size = 4;
1971   arcompact_log("3 unimplemented J %08x", op);
1881   arcompact_log("unimplemented J %08x", op);
19721882   return m_pc + (size>>0);
19731883}
19741884
19751885
1976ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32) // Jcc   (no link, no delay)
1886ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_32)
19771887{
19781888   int size = 4;
1979   UINT32 limm = 0;
1889//   UINT32 limm = 0;
19801890   int got_limm = 0;
19811891
19821892   COMMON32_GET_creg
1983   COMMON32_GET_CONDITION;
1984   COMMON32_GET_F
19851893
1986   UINT32 c = 0;
1987
19881894   if (creg == LIMM_REG)
19891895   {
19901896      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
19911897      // Jcc limm        0010 0RRR 1110 0000 0RRR 1111 100Q QQQQ  [LIUMM]
19921898      if (!got_limm)
19931899      {
1994         GET_LIMM_32;
1900         //GET_LIMM_32;
19951901         size = 8;
19961902      }
19971903
1998      c = limm;
1999
1904      arcompact_log("unimplemented J %08x", op);
20001905   }
20011906   else
20021907   {
20031908      // opcode          iiii i--- ppII IIII F--- cccc ccmq qqqq
20041909      // Jcc [c]         0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
20051910      // no conditional links to ILINK1, ILINK2?
2006     
2007      c = m_regs[creg];
1911      arcompact_log("unimplemented J %08x", op);
20081912   }
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
20441913   return m_pc + (size>>0);
20451914}
20461915
r242605r242606
20491918   // opcode          iiii i--- ppII IIII F--- uuuu uumq qqqq
20501919   // Jcc u6          0010 0RRR 1110 0000 0RRR uuuu uu1Q QQQQ
20511920   int size = 4;
2052   arcompact_log("unimplemented arcompact_handle04_20_p11_m1 J %08x (u6)", op);
1921   arcompact_log("unimplemented J %08x", op);
20531922   return m_pc + (size>>0);
20541923}
20551924
r242605r242606
20761945ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_28(OPS_32) // LPcc (loop setup)
20771946{
20781947   int size = 4;
2079//   COMMON32_GET_breg; // breg is reserved
1948
20801949   COMMON32_GET_p;
2081
1950     
20821951   if (p == 0x00)
20831952   {
2084      arcompact_fatal("<illegal LPcc, p = 0x00)");
20851953   }
20861954   else if (p == 0x01)
20871955   {
2088      arcompact_fatal("<illegal LPcc, p = 0x01)");
20891956   }
20901957   else if (p == 0x02) // Loop unconditional
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);
1958   {
20961959   }
20971960   else if (p == 0x03) // Loop conditional
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
1961   {
21171962   }
21181963
1964   arcompact_log("unimplemented LPcc %08x", op);
21191965   return m_pc + (size>>0);
21201966
21211967}
r242605r242606
21622008   return m_pc + (size>>0);
21632009}
21642010
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;
21652016
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
21662062ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_29(OPS_32)
21672063{
21682064   // leapster bios uses formats for FLAG that are not defined, bug I guess work anyway (P modes 0 / 1)
r242605r242606
22062102}
22072103
22082104
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?) */ \
22092127
2128
2129
22102130ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL
22112131ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR
2212
2132ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_02(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "LSR"); } // LSR
22132133ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR
22142134ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC
22152135ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB
22162136ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_06(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXW"); } // SEXW
22172137
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   }
22182148
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
22192223ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_09(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ABS"); } // ABS
22202224ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0a(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "NOT"); } // NOT
22212225ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_0b(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCL"); } // RLC
r242605r242606
24402444}
24412445
24422446
2447ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_00(OPS_16) // ADD_S c, b,  u3   (note, c destination)
2448{
2449   int u, breg, creg;
24432450
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
24442484ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0d_03(OPS_16)
24452485{
24462486   return arcompact_handle0d_helper(PARAMS, "ASR_S");
r242605r242606
26002640
26012641
26022642// Zero parameters (ZOP)
2603ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { /*arcompact_log("NOP_S");*/ return m_pc + (2 >> 0);}
2643ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_00(OPS_16)  { arcompact_log("NOP_S"); return m_pc + (2 >> 0);}
26042644ARCOMPACT_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
26052645ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_04(OPS_16)  { arcompact_log("JEQ_S [blink]"); return m_pc + (2 >> 0);}
26062646ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_00_07_05(OPS_16)  { arcompact_log("JNE_S [blink]"); return m_pc + (2 >> 0);}
r242605r242606
26302670   return m_pc + (2 >> 0);
26312671}
26322672
2673ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_02(OPS_16) // SUB_S b <- b,c
2674{
2675   int breg, creg;
26332676
2677   COMMON16_GET_breg;
2678   COMMON16_GET_creg;
26342679
2680   REG_16BIT_RANGE(breg);
2681   REG_16BIT_RANGE(creg);
26352682
2683   m_regs[breg] = m_regs[breg] - m_regs[creg];
26362684
2685   return m_pc + (2 >> 0);
2686}
26372687
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
26382720ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_06(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "BIC_S",0);  }
2639
2721ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_07(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "XOR_S",0);  }
26402722ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0b(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "TST_S",1);  }
26412723ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "MUL64_S",2);  } // actual destination is special multiply registers
26422724ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXB_S",0); }
26432725ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0e(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "SEXW_S",0); }
26442726
2727ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_0f(OPS_16) // EXTB_S
2728{
2729   int breg, creg;
26452730
2731   COMMON16_GET_breg;
2732   COMMON16_GET_creg;
26462733
2734   REG_16BIT_RANGE(breg);
2735   REG_16BIT_RANGE(creg);
26472736
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
26482758ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_11(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ABS_S",0);  }
26492759ARCOMPACT_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);  }
26502767
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;
26512771
2652ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_18(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASL_S",0);  }
2772   COMMON16_GET_breg;
2773   COMMON16_GET_creg;
26532774
2654ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1a(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR_S",0);  }
2775   REG_16BIT_RANGE(breg);
2776   REG_16BIT_RANGE(creg);
26552777
2778   m_regs[breg] = m_regs[creg] << 1;
26562779
2780   return m_pc + (2 >> 0);
2781}
2782
26572783ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1c(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "ASR1_S",0); }
26582784ARCOMPACT_RETTYPE arcompact_device::arcompact_handle0f_1d(OPS_16)  { return arcompact_handle0f_0x_helper(PARAMS, "LSR1_S",0); }
26592785
r242605r242606
31413267
31423268ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_00(OPS_16)  { return arcompact_handle1e_03_0x_helper(PARAMS, "BGT_S"); }
31433269ARCOMPACT_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"); }
31443271
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
31593272ARCOMPACT_RETTYPE arcompact_device::arcompact_handle1e_03_03(OPS_16) // BLE_S
31603273{
31613274   if (CONDITION_LE)
trunk/src/emu/cpu/arcompact/arcompact_make.py
r242605r242606
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
4612def EmitGroup04_no_Flags(f, funcname, opname):
4713       print >>f, "      // no flag changes"
4814
r242605r242606
6632        flaghandler(f, funcname, opname)
6733        print >>f, "   }"
6834
69def EmitGroup04_u5fragment(f,funcname, opname, opexecute, opwrite, opwrite_alt, ignore_a, breg_is_dst_only, flagcondition, flaghandler):
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, "{"
7039    print >>f, "   int size = 4;"
7140   
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   
72103    if breg_is_dst_only == 0:   
73104        print >>f, "   UINT32 limm = 0;"
74105   
r242605r242606
84115    if ignore_a == 0:
85116        print >>f, "   COMMON32_GET_areg;"
86117    elif ignore_a == 1:
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"
118       print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
119   
92120    print >>f, "   "
93121   
94122    print >>f, "   UINT32 c;"
r242605r242606
112140    print >>f, "    c = u;"
113141    print >>f, "   "
114142    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?) */"
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)
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)
119152    print >>f, "{"
120153    print >>f, "   int size = 4;"
154
155    if breg_is_dst_only == 0:
156        print >>f, "   UINT32 limm = 0;"
121157   
122    print >>f, "   UINT32 limm = 0;"
123   
124    print >>f, "   int got_limm = 0;"
158    print >>f, "/*   int got_limm = 0; */"
125159    print >>f, "   "
126160    print >>f, "   COMMON32_GET_breg;"
127161
128    if flagcondition == -1:
162    if flagcondition == -1:   
129163        print >>f, "   COMMON32_GET_F;"
130       
131    print >>f, "   COMMON32_GET_creg;"
132
133    if ignore_a == 0:
164   
165    print >>f, "   COMMON32_GET_s12;"
166   
167    if ignore_a == 0:   
134168        print >>f, "   COMMON32_GET_areg;"
135169    elif ignore_a == 1:
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, "   "
170       print >>f, "     //COMMON32_GET_areg; // areg is reserved / not used"
141171   
172    print >>f, "   "
142173    print >>f, "   UINT32 c;"
143174    if breg_is_dst_only == 0:
144175        print >>f, "   UINT32 b;"
145176        print >>f, "   "
177        print >>f, "   /* is having b as LIMM valid here? LIMM vs. fixed u6 value makes no sense */"
146178        print >>f, "   if (breg == LIMM_REG)"
147179        print >>f, "   {"
148180        print >>f, "      GET_LIMM_32;"
149181        print >>f, "      size = 8;"
150        print >>f, "      got_limm = 1;"
182        print >>f, "/*      got_limm = 1; */"
151183        print >>f, "      b = limm;"
152184        print >>f, "   }"
153185        print >>f, "   else"
r242605r242606
155187        print >>f, "      b = m_regs[breg];"
156188        print >>f, "   }"
157189   
190    print >>f, "    "
191    print >>f, "    c = (UINT32)S;"
158192    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.) */"
173193    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?) */"
174194    print >>f, "   %s" % (opexecute)
175    print >>f, "   %s" % (opwrite)   
176195    print >>f, "   "
177196    EmitGroup04_Flaghandler(f,funcname,opname,flagcondition,flaghandler)
178197    print >>f, "   return m_pc + (size >> 0);"
179198    print >>f, "}"
180199    print >>f, ""
181200    print >>f, ""
182    # the mode 0x01 handler   
183    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p01(OPS_32)" % (funcname)
201    # the mode 0x11 m0 handler   
202    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s_p11_m0(OPS_32)" % (funcname)
184203    print >>f, "{"
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)
204    print >>f, "   int size = 4;"
205    print >>f, "   arcompact_fatal(\"arcompact_handle%s_p11_m0 (%s)\\n\");"  % (funcname, opname)
190206    print >>f, "   return m_pc + (size >> 0);"
191207    print >>f, "}"
192208    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, ""   
209    print >>f, ""   
265210    # the mode 0x11 m1 handler   
266211    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)
293212    print >>f, "{"
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);"
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);"
307216    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;"
315217    print >>f, ""
316    print >>f, "   COMMON16_GET_breg;"
317    print >>f, "   COMMON16_GET_creg;"
318218    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, "}"
327219
328
329220#  xxx_S b, b, u5 format opcodes
330221def EmitGroup17(f,funcname, opname, opexecute):
331222    print >>f, "ARCOMPACT_RETTYPE arcompact_device::arcompact_handle%s(OPS_16)" % (funcname)
r242605r242606
353244    sys.exit(1)
354245
355246
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 )
247EmitGroup04(f, "04_00", "ADD", "UINT32 result = b + c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags )
357248
358EmitGroup04(f, "04_02", "SUB", "UINT32 result = b - c;",                 "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
249EmitGroup04(f, "04_02", "SUB", "UINT32 result = b - c; m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
359250
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  )
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  )
364255
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
256EmitGroup04(f, "04_0a", "MOV", "UINT32 result = c; m_regs[breg] = result;", 1,1, -1, EmitGroup04_Handle_NZ_Flags  )
366257
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  )
258EmitGroup04(f, "04_0f", "BSET", "UINT32 result = b | (1 << (c & 0x1f)); m_regs[areg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
369259
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  )
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  )
371262
372263
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  )
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  )
379266
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
414267#  xxx_S b, b, u5 format opcodes
415268EmitGroup17(f, "17_00", "ASL_S",  "m_regs[breg] = m_regs[breg] << (u&0x1f);" )
416269EmitGroup17(f, "17_01", "LSR_S",  "m_regs[breg] = m_regs[breg] >> (u&0x1f);" )
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242605r242606
129129   // 0000 0sss ssss sss0 SSSS SSSS SSNQ QQQQ
130130   INT32 address = (op & 0x07fe0000) >> 17;
131131   address |= ((op & 0x0000ffc0) >> 6) << 10;
132   if (address & 0x80000) address = -0x80000 + (address & 0x7ffff);
132   if (address & 0x800000) address = -0x800000 + (address & 0x7fffff);
133133   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
134134   COMMON32_GET_CONDITION
135135
r242605r242606
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_ALIGNED32 + u*2);
890      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, pc + 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
r242605r242606
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));
599600      res = m_read_regs_follow[m_read_cur_follow];
600601   }
601602
r242605r242606
686687            case COMMAND_READ_STATUS_BYTE:
687688               if (LOG) logerror("Z80DMA '%s' CMD Read status Byte\n", tag());
688689               READ_MASK = 1;
689               m_read_regs_follow[0] = m_status;
690               assert(m_read_num_follow < ARRAY_LENGTH(m_read_regs_follow));
691               m_read_regs_follow[m_read_num_follow++] = m_status;
690692               break;
691693            case COMMAND_RESET_AND_DISABLE_INTERRUPTS:
692694               WR3 &= ~0x20;
trunk/src/emu/video/tea1002.c
r242605r242606
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
r242605r242606
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
r242605r242606
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#
495486#@src/emu/video/tlc34076.h,VIDEOS += TLC34076
496487#-------------------------------------------------
497488
trunk/src/mame/audio/dkong.c
r242605r242606
11451145 0: 14 16       ... checkpoint charlie
11461146 1: 14 18       ... checkpoint bravo
11471147 2: 14 1A       ... checkpoint alpha
1148 3: 1C          Use Caution (sounds kinda like 'You'll notice')
1148 3: 1C          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
r242605r242606
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( sf2hack )
1858   PORT_INCLUDE( sf2 )
18591859
18601860   PORT_MODIFY("DSWB")
18611861   PORT_DIPNAME( 0x08, 0x08, "Turbo Mode Switch 1 of 3" )   PORT_DIPLOCATION("SW(B):4")
r242605r242606
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,   sf2hack,  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,   cps1,     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
r242605r242606
66
77    Games supported:
88        * Super Breakout
9        * Super Breakout (Canyon and Vertical Breakout, prototype)
10      * Super Breakout (Cocktail, prototype)
9        * Super Breakout (Canyon and Vertical Breakout, prototype) - built from original source code
1110
1211    Known issues:
1312        * none at this time
r242605r242606
6059   UINT8 m_pot_trigger[2];
6160   DECLARE_WRITE8_MEMBER(irq_ack_w);
6261   DECLARE_READ8_MEMBER(switches_r);
63   DECLARE_READ8_MEMBER(sbrkoutct_switches_r);
6462   DECLARE_WRITE8_MEMBER(pot_mask1_w);
6563   DECLARE_WRITE8_MEMBER(pot_mask2_w);
6664   DECLARE_WRITE8_MEMBER(start_1_led_w);
6765   DECLARE_WRITE8_MEMBER(start_2_led_w);
6866   DECLARE_WRITE8_MEMBER(serve_led_w);
69   DECLARE_WRITE8_MEMBER(serve_2_led_w);
7067   DECLARE_WRITE8_MEMBER(coincount_w);
7168   DECLARE_READ8_MEMBER(sync_r);
7269   DECLARE_READ8_MEMBER(sync2_r);
r242605r242606
215212   return result;
216213}
217214
218READ8_MEMBER(sbrkout_state::sbrkoutct_switches_r)
219{
220   UINT8 result = 0xff;
221215
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
236216void sbrkout_state::update_nmi_state()
237217{
238218   if ((m_pot_trigger[0] & ~m_pot_mask[0]) | (m_pot_trigger[1] & ~m_pot_mask[1]))
r242605r242606
295275   output_set_led_value(0, ~offset & 1);
296276}
297277
298WRITE8_MEMBER(sbrkout_state::serve_2_led_w)
299{
300   output_set_led_value(1, ~offset & 1);
301}
302278
303279WRITE8_MEMBER(sbrkout_state::coincount_w)
304280{
r242605r242606
411387   AM_RANGE(0x2800, 0x3fff) AM_ROM
412388ADDRESS_MAP_END
413389
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
435390
436391
437392/*************************************
r242605r242606
520475   PORT_CONFSETTING(    0x02, "Vertical" )
521476INPUT_PORTS_END
522477
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
536478/*************************************
537479 *
538480 *  Graphics definitions
r242605r242606
601543MACHINE_CONFIG_END
602544
603545
604static MACHINE_CONFIG_DERIVED(sbrkoutct, sbrkout)
605   MCFG_CPU_MODIFY("maincpu")
606   MCFG_CPU_PROGRAM_MAP(sbrkoutct_main_map)
607MACHINE_CONFIG_END
608546
609547/*************************************
610548 *
r242605r242606
660598   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
661599ROM_END
662600
663ROM_START( sbrkoutc ) // built from original Atari source code
601ROM_START( sbrkoutc )
664602   ROM_REGION( 0x4000, "maincpu", 0 )
665603   ROM_LOAD( "a33443.bin",   0x2800, 0x1800, CRC(bf418976) SHA1(d766e220a284a7b9caf876207e8191aff0497a03) )
666604
r242605r242606
676614   ROM_LOAD( "006401.e2",    0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )    /* memory mapper */
677615ROM_END
678616
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) )
684617
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
697618/*************************************
698619 *
699620 *  Game drivers
700621 *
701622 *************************************/
702623
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 )
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 )
trunk/src/mame/drivers/sprint2.c
r242605r242606
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
5042int sprint2_state::service_mode()
5143{
5244   UINT8 v = ioport("INB")->read();
r242605r242606
242234   set_led_status(machine(), 1, offset & 1);
243235}
244236
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}
253237
254238static ADDRESS_MAP_START( sprint2_map, AS_PROGRAM, 8, sprint2_state )
255   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
256239   AM_RANGE(0x0000, 0x03ff) AM_READWRITE(sprint2_wram_r,sprint2_wram_w)
257240   AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sprint2_video_ram_w) AM_SHARE("video_ram")
258241   AM_RANGE(0x0818, 0x081f) AM_READ(sprint2_input_A_r)
r242605r242606
278261   AM_RANGE(0x1400, 0x17ff) AM_READ(sprint2_collision2_r)
279262   AM_RANGE(0x1800, 0x1800) AM_READNOP  /* debugger ROM location? */
280263   AM_RANGE(0x2000, 0x3fff) AM_ROM
264   AM_RANGE(0xe000, 0xffff) AM_ROM
281265ADDRESS_MAP_END
282266
283267
r242605r242606
457441   PORT_ADJUSTER( 50, "R23 - Tone Freq" )
458442INPUT_PORTS_END
459443
460static INPUT_PORTS_START( dominos4 )
461   PORT_INCLUDE(dominos)
462444
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
487445static const gfx_layout tile_layout =
488446{
489447   16, 8,
r242605r242606
584542   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
585543MACHINE_CONFIG_END
586544
545
587546ROM_START( sprint1 )
588547   ROM_REGION( 0x10000, "maincpu", 0 )
589548   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
549   ROM_RELOAD(             0xe000, 0x0800 )
590550   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
551   ROM_RELOAD(             0xe800, 0x0800 )
591552   ROM_LOAD( "6442-01.d1", 0x3000, 0x0800, CRC(e9ff0124) SHA1(42fe028e2e595573ccc0821de3bb6970364c585d) )
553   ROM_RELOAD(             0xf000, 0x0800 )
592554   ROM_LOAD( "6443-01.e1", 0x3800, 0x0800, CRC(d6bb00d0) SHA1(cdcd4bb7b32be7a11480d3312fcd8d536e2d0caf) )
555   ROM_RELOAD(             0xf800, 0x0800 )
593556
594557   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
595558   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242605r242606
608571ROM_START( sprint2 )
609572   ROM_REGION( 0x10000, "maincpu", 0 )
610573   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
574   ROM_RELOAD(             0xe000, 0x0800 )
611575   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
576   ROM_RELOAD(             0xe800, 0x0800 )
612577   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
578   ROM_RELOAD(             0xf000, 0x0800 )
613579   ROM_LOAD( "6405.e1",    0x3800, 0x0800, CRC(6c991c80) SHA1(c30a5b340f05dd702c7a186eb62607a48fa19f72) )
580   ROM_RELOAD(             0xf800, 0x0800 )
614581
615582   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
616583   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242605r242606
629596ROM_START( sprint2a )
630597   ROM_REGION( 0x10000, "maincpu", 0 )
631598   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
599   ROM_RELOAD(             0xe000, 0x0800 )
632600   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
601   ROM_RELOAD(             0xe800, 0x0800 )
633602   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
603   ROM_RELOAD(             0xf000, 0x0800 )
634604   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(e80fd249) SHA1(7bcf7dfd72ca83fdd80593eaf392570da1f71298) )
605   ROM_RELOAD(             0xf800, 0x0800 )
635606
636607   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
637608   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242605r242606
650621ROM_START( sprint2h )
651622   ROM_REGION( 0x10000, "maincpu", 0 )
652623   ROM_LOAD( "6290-01.b1", 0x2000, 0x0800, CRC(41fc985e) SHA1(7178846480cbf8d15955ccd987d0b0e902ab9f90) )
624   ROM_RELOAD(             0xe000, 0x0800 )
653625   ROM_LOAD( "6291-01.c1", 0x2800, 0x0800, CRC(07f7a920) SHA1(845f65d2bd290eb295ca6bae2575f27aaa08c0dd) )
626   ROM_RELOAD(             0xe800, 0x0800 )
654627   ROM_LOAD( "6404.d1",    0x3000, 0x0800, CRC(d2878ff6) SHA1(b742a8896c1bf1cfacf48d06908920d88a2c9ea8) )
628   ROM_RELOAD(             0xf000, 0x0800 )
655629   ROM_LOAD( "6405-02.e1", 0x3800, 0x0800, CRC(6de291f1) SHA1(00c2826011d80ac0784649a7bc156a97c26565fd) ) // sldh
630   ROM_RELOAD(             0xf800, 0x0800 )
656631
657632   ROM_REGION( 0x0200, "gfx1", 0 ) /* tiles */
658633   ROM_LOAD_NIB_HIGH( "6396-01.p4", 0x0000, 0x0200, CRC(801b42dd) SHA1(1db58390d803f404253cbf36d562016441ca568d) )
r242605r242606
671646ROM_START( dominos )
672647   ROM_REGION( 0x10000, "maincpu", 0 )
673648   ROM_LOAD( "7352-02.d1",   0x3000, 0x0800, CRC(738b4413) SHA1(3a90ab25bb5f65504692f97da43f03e21392dcd8) )
649   ROM_RELOAD(               0xf000, 0x0800 )
674650   ROM_LOAD( "7438-02.e1",   0x3800, 0x0800, CRC(c84e54e2) SHA1(383b388a1448a195f28352fc5e4ff1a2af80cc95) )
651   ROM_RELOAD(               0xf800, 0x0800 )
675652
676653   ROM_REGION( 0x200, "gfx1", 0 ) /* tiles */
677654   ROM_LOAD_NIB_HIGH( "7439-01.p4",   0x0000, 0x0200, CRC(4f42fdd6) SHA1(f8ea4b582e26cad37b746174cdc9f1c7ae0819c3) )
r242605r242606
685662   ROM_LOAD( "6401-01.e2", 0x0100, 0x0020, CRC(857df8db) SHA1(06313d5bde03220b2bc313d18e50e4bb1d0cfbbb) )  /* address */
686663ROM_END
687664
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) )
698665
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
711666GAME( 1978, sprint1,  0,       sprint1, sprint1, sprint2_state, sprint1, ROT0, "Atari (Kee Games)", "Sprint 1", 0 )
712667GAME( 1976, sprint2,  sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 1)", 0 )
713668GAME( 1976, sprint2a, sprint1, sprint2, sprint2, sprint2_state, sprint2, ROT0, "Atari (Kee Games)", "Sprint 2 (set 2)", 0 )
714669GAME( 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?
715670GAME( 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
r242605r242606
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);
5957   DECLARE_READ8_MEMBER(sprint2_collision1_r);
6058   DECLARE_READ8_MEMBER(sprint2_collision2_r);
6159   DECLARE_WRITE8_MEMBER(sprint2_collision_reset1_w);
r242605r242606
6866   DECLARE_DRIVER_INIT(sprint1);
6967   DECLARE_DRIVER_INIT(sprint2);
7068   DECLARE_DRIVER_INIT(dominos);
71   DECLARE_DRIVER_INIT(dominos4);
7269   TILE_GET_INFO_MEMBER(get_tile_info);
7370   virtual void video_start();
7471   DECLARE_PALETTE_INIT(sprint2);
trunk/src/mame/mame.lst
r242605r242606
68606860sprint4a        // 008716           1977/12 [6502]
68616861nitedrvr        // 006321           1976/10 [6502]
68626862dominos         // 007305           1977/01 [6502]
6863dominos4        // 007754-007765   ??????? [6502]
68646863triplhnt        // 008422-008791    1977/04 [6800]
68656864sprint8         // ??????           1977/05 [6800]
68666865sprint8a        // ??????           1977/05 [6800]
r242605r242606
68876886sbrkout3        // 033442-033452    1978/09 [6502]
68886887sbrkout         // 033453-033455    1978/09 [6502]
68896888sbrkoutc        // unrealeased proto
6890sbrkoutct       // 034555-034559 proto ???? [6502]
68916889atarifb         // 033xxx           1978/10 [6502]
68926890atarifb1        // 033xxx           1978/10 [6502]
68936891atarifb2      // 035330-035350   ???      [6502]
trunk/src/mess/drivers/altos5.c
r242605r242606
221221WRITE8_MEMBER(altos5_state::memory_write_byte)
222222{
223223   address_space& prog_space = m_maincpu->space(AS_PROGRAM);
224   prog_space.write_byte(offset, data);
224   return prog_space.write_byte(offset, data);
225225}
226226
227227READ8_MEMBER(altos5_state::io_read_byte)
r242605r242606
233233WRITE8_MEMBER(altos5_state::io_write_byte)
234234{
235235   address_space& prog_space = m_maincpu->space(AS_IO);
236   prog_space.write_byte(offset, data);
236   return prog_space.write_byte(offset, data);
237237}
238238
239239WRITE_LINE_MEMBER( altos5_state::busreq_w )
trunk/src/mess/drivers/aquarius.c
r242605r242606
357357   MCFG_SCREEN_PALETTE("palette")
358358
359359   MCFG_GFXDECODE_ADD("gfxdecode", "palette", aquarius )
360   MCFG_TEA1002_ADD("encoder", XTAL_8_867238MHz)
361360   MCFG_PALETTE_ADD("palette", 512)
362361   MCFG_PALETTE_INDIRECT_ENTRIES(16)
363362   MCFG_PALETTE_INIT_OWNER(aquarius_state, aquarius)
trunk/src/mess/drivers/excali64.c
r242605r242606
1919
2020ToDo:
2121- Colours are approximate.
22- Disk controller, works with old wd17xx but crashes on new wd.
22- Disk controller, using the old wd17xx because new wd crashes on loading a disk.
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
r242605r242606
2929
3030****************************************************************************/
3131
32#define NEWFDC 0
33
34
3532#include "emu.h"
3633#include "cpu/z80/z80.h"
3734#include "video/mc6845.h"
3835#include "machine/i8251.h"
3936#include "bus/rs232/rs232.h"
40//#include "machine/clock.h"
4137#include "machine/pit8253.h"
4238#include "machine/i8255.h"
4339#include "bus/centronics/ctronics.h"
r242605r242606
4743#include "machine/z80dma.h"
4844#include "machine/rescap.h"
4945#include "machine/74123.h"
50#if NEWFDC
51#include "machine/wd_fdc.h"
52#include "formats/excali64_dsk.h"
53#else
5446#include "machine/wd17xx.h"
5547#include "imagedev/flopdrv.h"
5648#include "formats/basicdsk.h"
57#endif
5849
5950class excali64_state : public driver_device
6051{
r242605r242606
7061      , m_u12(*this, "u12")
7162      , m_centronics(*this, "centronics")
7263      , m_fdc(*this, "fdc")
73#if NEWFDC
74      , m_floppy0(*this, "fdc:0")
75      , m_floppy1(*this, "fdc:1")
76#endif
7764   { }
7865
7966   DECLARE_PALETTE_INIT(excali64);
r242605r242606
8673   DECLARE_WRITE8_MEMBER(porte4_w);
8774   DECLARE_READ8_MEMBER(porte8_r);
8875   DECLARE_WRITE8_MEMBER(portec_w);
89#if NEWFDC
90   DECLARE_FLOPPY_FORMATS(floppy_formats);
91#endif
9276   DECLARE_WRITE_LINE_MEMBER(cent_busy_w);
9377   DECLARE_WRITE_LINE_MEMBER(busreq_w);
9478   DECLARE_READ8_MEMBER(memory_read_byte);
r242605r242606
119103   required_device<z80dma_device> m_dma;
120104   required_device<ttl74123_device> m_u12;
121105   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
127106   required_device<wd2793_device> m_fdc;
128#endif
129107};
130108
131109static ADDRESS_MAP_START(excali64_mem, AS_PROGRAM, 8, excali64_state)
r242605r242606
151129   AM_RANGE(0xe4, 0xe7) AM_WRITE(porte4_w)
152130   AM_RANGE(0xe8, 0xeb) AM_READ(porte8_r)
153131   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
157132   AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("fdc", wd2793_device, read, write)
158#endif
159133ADDRESS_MAP_END
160134
161135
r242605r242606
246220   m_centronics_busy = state;
247221}
248222
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
258223static LEGACY_FLOPPY_OPTIONS_START(excali64)
259224   LEGACY_FLOPPY_OPTION(excali64_ds, "raw", "Excalibur 64 DS disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
260225      HEADS([2])
r242605r242606
270235   LEGACY_FLOPPY_OPTIONS_NAME(excali64),
271236   NULL
272237};
273#endif
274238
275239// pulses from port E4 bit 5 restart the 74123. After 3.6 secs without a pulse, the motor gets turned off.
276240WRITE8_MEMBER( excali64_state::motor_w )
277241{
278242   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
283243   legacy_floppy_image_device *flop = subdevice<legacy_floppy_image_device>(FLOPPY_0);
284244   flop->floppy_mon_w(!m_motor); // motor on
285245   flop = subdevice<legacy_floppy_image_device>(FLOPPY_1);
286246   flop->floppy_mon_w(!m_motor); // motor on
287#endif
288247}
289248
290249READ8_MEMBER( excali64_state::porte8_r )
r242605r242606
294253
295254WRITE8_MEMBER( excali64_state::porte4_w )
296255{
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
310256   if BIT(data, 0)
311257      m_fdc->set_drive(0);
312258
r242605r242606
314260      m_fdc->set_drive(1);
315261
316262   m_fdc->set_side(BIT(data, 4));
317#endif
318263
319264   m_u12->b_w(space,offset, BIT(data, 5)); // motor pulse
320265}
r242605r242606
326271*/
327272WRITE8_MEMBER( excali64_state::portec_w )
328273{
329#if NEWFDC
330   m_fdc->dden_w(BIT(data, 2));
331#else
332274   m_fdc->dden_w(!BIT(data, 2));
333#endif
334275}
335276
336277WRITE_LINE_MEMBER( excali64_state::busreq_w )
r242605r242606
651592
652593   /* Devices */
653594   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
660595   MCFG_DEVICE_ADD("fdc", WD2793, 0)
661596   MCFG_WD17XX_DEFAULT_DRIVE2_TAGS
662597   MCFG_WD17XX_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w))
663598   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(excali64_floppy_interface)
664#endif
599
665600   MCFG_DEVICE_ADD("dma", Z80DMA, XTAL_16MHz/4)
666601   MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(excali64_state, busreq_w))
667602   MCFG_Z80DMA_IN_MREQ_CB(READ8(excali64_state, memory_read_byte))
trunk/src/mess/drivers/leapster.c
r242605r242606
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?
288287//   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
289288ADDRESS_MAP_END
290289
trunk/src/mess/drivers/mc1502.c
r242605r242606
326326MACHINE_CONFIG_END
327327
328328static MACHINE_CONFIG_DERIVED( pk88, mc1502 )
329   MCFG_CPU_MODIFY("maincpu")
329   MCFG_CPU_REPLACE("maincpu", I8088, XTAL_16MHz/3)
330330   MCFG_CPU_PROGRAM_MAP(pk88_map)
331   MCFG_CPU_IO_MAP(mc1502_io)
331332MACHINE_CONFIG_END
332333
333334
trunk/src/mess/drivers/sdk86.c
r242605r242606
99        22/06/2011 Working [Robbbert]
1010
1111    TODO:
12    Add optional 2x 8255A port read/write logging
12    Add 8251A for serial
13    Add optional 2x 8255A
1314
1415
1516
r242605r242606
1819There is no speaker or storage facility in the standard kit.
1920
2021Download 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
r242605r242606
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
148
159***************************************************************************/
1610
r242605r242606
2418#include "tispeak.lh"
2519
2620// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
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.
21// C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4.
2922// The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency,
30// which is 640kHz for 8KHz according to the TMS5100 documentation.
23// which is 640kHz according to the TMS5100 documentation.
3124
3225#define MASTER_CLOCK (640000)
3326
r242605r242606
461454
462455ROM_START( snspell )
463456   ROM_REGION( 0x1000, "maincpu", 0 )
464   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // typed in from patent 4189779, may have errors
457   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
465458
466459   ROM_REGION( 1246, "maincpu:ipla", 0 )
467460   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
r242605r242606
490483   ROM_LOAD( "cd2350a.vsm", 0x0000, 0x4000, CRC(2adda742) SHA1(3f868ed8284b723c815a30343057e03467c043b5) )
491484ROM_END
492485
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
493502ROM_START( snspelluk )
494503   ROM_REGION( 0x1000, "maincpu", 0 )
495504   ROM_LOAD( "us4189779_tmc0271", 0x0000, 0x1000, BAD_DUMP CRC(d3f5a37d) SHA1(f75ab617a6067d4d3a954a9f86126d2089554df8) ) // placeholder, use the one we have
r242605r242606
540549
541550ROM_START( snmath )
542551   ROM_REGION( 0x1000, "maincpu", 0 )
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) )
552   ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // placeholder, use the one we have
546553
547554   ROM_REGION( 1246, "maincpu:ipla", 0 )
548555   ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
549556   ROM_REGION( 2127, "maincpu:mpla", 0 )
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
557   ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // placeholder, use the one we have
551558   ROM_REGION( 1246, "maincpu:opla", 0 )
552   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // "
559   ROM_LOAD( "tms0270_cd2708_opla.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // placeholder, use the one we have
553560
554561   ROM_REGION( 0x8000, "tms6100", 0 )
555562   ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
r242605r242606
575582   ROM_RELOAD(             0x7000, 0x1000 )
576583ROM_END
577584
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) )
578590
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) ) // "
579597
580COMP( 1978, snspell,    0,       0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
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 )
581606COMP( 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 )
582608COMP( 1978, snspelluk,  snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
583609COMP( 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
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
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?
585611
586COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
612COMP( 1980, snmath,     0,       0, snmath,  snmath,  driver_device, 0, "Texas Instruments", "Speak & Math (US set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
587613COMP( 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
r242605r242606
99
1010#include "emu.h"
1111#include "cpu/z80/z80.h"
12#include "video/tea1002.h"
1312#include "imagedev/cassette.h"
1413#include "machine/ram.h"
1514#include "sound/ay8910.h"
r242605r242606
3938         m_y7(*this, "Y7"),
4039         m_gfxdecode(*this, "gfxdecode"),
4140         m_screen(*this, "screen"),
42         m_tea1002(*this, "encoder"),
4341         m_palette(*this, "palette")
4442   { }
4543
r242605r242606
6058   required_ioport m_y7;
6159   required_device<gfxdecode_device> m_gfxdecode;
6260   required_device<screen_device> m_screen;
63   required_device<tea1002_device> m_tea1002;
6461   required_device<palette_device> m_palette;
6562
6663   UINT8 m_scrambler;
trunk/src/mess/mess.lst
r242605r242606
10641064
10651065// TI Speak & Spell
10661066snspell
1067snspellp
10671068snspella
10681069snspelluk
10691070snspelluka
10701071ladictee
10711072snmath
10721073snmatha
1074snmathp
10731075
10741076// Texas Instruments Calculators
10751077tisr16    // 1974 SR-16
trunk/src/mess/mess.mak
r242605r242606
313313VIDEOS += SNES_PPU
314314VIDEOS += STVVDP
315315VIDEOS += T6A04
316VIDEOS += TEA1002
317316#VIDEOS += TLC34076
318317#VIDEOS += TMS34061
319318VIDEOS += TMS3556
trunk/src/mess/video/aquarius.c
r242605r242606
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
1334static const unsigned short aquarius_palette[] =
1435{
1536   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,
r242605r242606
3556   int i;
3657
3758   for (i = 0; i < 16; i++)
38      m_palette->set_indirect_color(i, m_tea1002->color(i));
59      m_palette->set_indirect_color(i, aquarius_colors[i]);
3960
4061   for (i = 0; i < 512; i++)
4162      m_palette->set_pen_indirect(i, aquarius_palette[i]);
trunk/src/osd/sdl/window.c
r242605r242606
654654#endif
655655}
656656
657static OSDWORK_CALLBACK( sdlwindow_update_cursor_state_wt )
658{
659    worker_param *      wp = (worker_param *) param;
660    //sdl_window_info *   window = wp->window;
657661
662    sdlwindow_update_cursor_state(*wp->m_machine, wp->window);
663
664    return NULL;
665}
666
667
658668//============================================================
659669//  sdlwindow_video_window_create
660670//  (main thread)
r242605r242606
961971   ASSERT_MAIN_THREAD();
962972
963973   // adjust the cursor state
964   sdlwindow_update_cursor_state(machine, window);
974   //sdlwindow_update_cursor_state(machine, window);
965975
976    {
977        worker_param wp;
978
979        clear_worker_param(&wp);
980        wp.window = window;
981        wp.m_machine = &machine;
982
983        execute_async(&sdlwindow_update_cursor_state_wt, &wp);
984    }
985
966986   // if we're visible and running and not in the middle of a resize, draw
967987   if (window->target != NULL)
968988   {


Previous 199869 Revisions Next


© 1997-2024 The MAME Team