Previous 199869 Revisions Next

r36782 Sunday 29th March, 2015 at 21:08:49 UTC by Couriersud
Merge branch 'master' of https://github.com/mamedev/mame.git

Conflicts:
  scripts/src/osd/sdl.lua
[/trunk]makefile
[hash]abc80.xml abc80_cass.xml* abc80_flop.xml*
[src/emu/cpu/mips]mips3.c mips3.h mips3drc.c
[src/emu/sound]tms5220.c tms5220.h
[src/mame]mame.lst
[src/mame/drivers]cps2.c hng64.c kinst.c namcos23.c seattle.c vegas.c
[src/mame/machine]cps2crpt.c n64.c
[src/mess/drivers]abc80.c ticalc1x.c

trunk/hash/abc80.xml
r245293r245294
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3<softwarelist name="abc80" description="Luxor ABC 80 diskettes">
4
5   <software name="cpm" supported="no">
6      <description>CP/M BIOS 3.7</description>
7      <year>19??</year>
8      <publisher>Myab</publisher>
9
10      <!-- Datadisc 80 format (8 sectors/track, 256 bytes/sector interleave, sector skew 5: 0 5 2 7 4 1 6 3) -->
11      <part name="flop1" interface="floppy_5_25">
12         <feature name="part_id" value="Side 0"/>
13         <dataarea name="flop" size="81920">
14            <rom name="cpmdisk_myab37_side0.img" size="81920" crc="7065fa91" sha1="f0ca7c2785bd92ed7ede46aaba8b8e2a2d826e47" offset="0" />
15         </dataarea>
16      </part>
17
18      <part name="flop2" interface="floppy_5_25">
19         <feature name="part_id" value="Side 1"/>
20         <dataarea name="flop" size="81920">
21            <rom name="cpmdisk_myab37_side1.img" size="81920" crc="062e88c7" sha1="2d3baa1f225129474839972b9735444120965e08" offset="0" />
22         </dataarea>
23      </part>
24   </software>
25
26   <software name="demo">
27      <description>Demo</description>
28      <year>19??</year>
29      <publisher>Luxor</publisher>
30
31      <part name="flop1" interface="floppy_5_25">
32         <dataarea name="flop" size="82895">
33            <rom name="demo.td0" size="82895" crc="f581ce62" sha1="2e79e7371d767cb689d1e490f8e1c869dc390a03" offset="0" />
34         </dataarea>
35      </part>
36   </software>
37
38   <software name="system10">
39      <description>System disk v1.0</description>
40      <year>19??</year>
41      <publisher>Luxor</publisher>
42
43      <part name="flop1" interface="floppy_5_25">
44         <dataarea name="flop" size="47013">
45            <rom name="system10.td0" size="47013" crc="be80a5ca" sha1="64bea62668e9b2604732810c0704f52f6c8c3f99" offset="0" />
46         </dataarea>
47      </part>
48   </software>
49
50   <software name="dosgen">
51      <description>Dosgen</description>
52      <year>19??</year>
53      <publisher>&lt;unknown&gt;</publisher>
54
55      <part name="flop1" interface="floppy_5_25">
56         <dataarea name="flop" size="10734">
57            <rom name="fd2_dgen.imd" size="10734" crc="4c6ba75f" sha1="bb009d560089bdc0db2ab86634b4226956a96ac2" offset="0" />
58         </dataarea>
59      </part>
60   </software>
61
62   <software name="kundreg">
63      <description>Kundregister</description>
64      <year>19??</year>
65      <publisher>&lt;unknown&gt;</publisher>
66
67      <part name="flop1" interface="floppy_5_25">
68         <dataarea name="flop" size="79143">
69            <rom name="fd2_bifak.imd" size="79143" crc="a741ad5d" sha1="a0cb8cc31a30fcbea258dd5249845819930e60c2" offset="0" />
70         </dataarea>
71      </part>
72   </software>
73
74</softwarelist>
trunk/hash/abc80_cass.xml
r0r245294
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3<softwarelist name="abc80_cass" description="Luxor ABC 80 cassettes">
4
5   <software name="abcdemo">
6      <description>ABCDemo</description>
7      <year>2015</year>
8      <publisher>Genesis Project</publisher>
9
10      <part name="cass1" interface="abc80_cass">
11         <dataarea name="cass" size="10793090">
12            <rom name="genesisproject_abcdemo.wav" size="10793090" crc="7642349f" sha1="a0a808e9c9c5f3ca162ef22869600e1c735846c2" offset="0" />
13         </dataarea>
14      </part>
15   </software>
16
17</softwarelist>
No newline at end of file
trunk/hash/abc80_flop.xml
r0r245294
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3<softwarelist name="abc80_flop" description="Luxor ABC 80 diskettes">
4
5   <software name="cpm" supported="no">
6      <description>CP/M BIOS 3.7</description>
7      <year>19??</year>
8      <publisher>Myab</publisher>
9
10      <!-- Datadisc 80 format (8 sectors/track, 256 bytes/sector interleave, sector skew 5: 0 5 2 7 4 1 6 3) -->
11      <part name="flop1" interface="floppy_5_25">
12         <feature name="part_id" value="Side 0"/>
13         <dataarea name="flop" size="81920">
14            <rom name="cpmdisk_myab37_side0.img" size="81920" crc="7065fa91" sha1="f0ca7c2785bd92ed7ede46aaba8b8e2a2d826e47" offset="0" />
15         </dataarea>
16      </part>
17
18      <part name="flop2" interface="floppy_5_25">
19         <feature name="part_id" value="Side 1"/>
20         <dataarea name="flop" size="81920">
21            <rom name="cpmdisk_myab37_side1.img" size="81920" crc="062e88c7" sha1="2d3baa1f225129474839972b9735444120965e08" offset="0" />
22         </dataarea>
23      </part>
24   </software>
25
26   <software name="demo">
27      <description>Demo</description>
28      <year>19??</year>
29      <publisher>Luxor</publisher>
30
31      <part name="flop1" interface="floppy_5_25">
32         <dataarea name="flop" size="82895">
33            <rom name="demo.td0" size="82895" crc="f581ce62" sha1="2e79e7371d767cb689d1e490f8e1c869dc390a03" offset="0" />
34         </dataarea>
35      </part>
36   </software>
37
38   <software name="system10">
39      <description>System disk v1.0</description>
40      <year>19??</year>
41      <publisher>Luxor</publisher>
42
43      <part name="flop1" interface="floppy_5_25">
44         <dataarea name="flop" size="47013">
45            <rom name="system10.td0" size="47013" crc="be80a5ca" sha1="64bea62668e9b2604732810c0704f52f6c8c3f99" offset="0" />
46         </dataarea>
47      </part>
48   </software>
49
50   <software name="dosgen">
51      <description>Dosgen</description>
52      <year>19??</year>
53      <publisher>&lt;unknown&gt;</publisher>
54
55      <part name="flop1" interface="floppy_5_25">
56         <dataarea name="flop" size="10734">
57            <rom name="fd2_dgen.imd" size="10734" crc="4c6ba75f" sha1="bb009d560089bdc0db2ab86634b4226956a96ac2" offset="0" />
58         </dataarea>
59      </part>
60   </software>
61
62   <software name="kundreg">
63      <description>Kundregister</description>
64      <year>19??</year>
65      <publisher>&lt;unknown&gt;</publisher>
66
67      <part name="flop1" interface="floppy_5_25">
68         <dataarea name="flop" size="79143">
69            <rom name="fd2_bifak.imd" size="79143" crc="a741ad5d" sha1="a0cb8cc31a30fcbea258dd5249845819930e60c2" offset="0" />
70         </dataarea>
71      </part>
72   </software>
73
74   <software name="abcdemo">
75      <description>ABCDemo</description>
76      <year>2015</year>
77      <publisher>Genesis Project</publisher>
78
79      <part name="flop1" interface="floppy_5_25">
80         <dataarea name="flop" size="163840">
81            <rom name="genesisproject_abcdemo.dsk" size="163840" crc="29059d3c" sha1="55b38436a2d3cfe1caf8e35e44775402a1511eec" offset="0" />
82         </dataarea>
83      </part>
84   </software>
85
86</softwarelist>
trunk/makefile
r245293r245294
381381
382382ifeq ($(TARGETOS),macosx)
383383ifneq (,$(findstring 3.,$(CLANG_VERSION)))
384ifeq ($(ARCHITECTURE),x64)
384ifeq ($(ARCHITECTURE),_x64)
385385ARCHITECTURE=_x64_clang
386386else
387387ARCHITECTURE=_x86_clang
r245293r245294
604604   $(SILENT) $(MAKE) --no-print-directory -R -C build/projects/$(SUBDIR)/gmake-osx-clang config=$(CONFIG)32
605605
606606$(GENIE):
607   $(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(OS) -f genie.make
607   $(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make
608608
609609clean:
610610   @echo Cleaning...
611611   -@rm -rf build
612   $(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(OS) -f genie.make clean
612   $(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
613613
614614GEN_FOLDERS :=  \
615615   $(GENDIR) \
r245293r245294
810810
811811$(GENDIR)/%.moc.c: $(SRC)/%.h
812812   $(SILENT) $(MOC) $(MOCINCPATH) $< -o $@
813   
No newline at end of file
813   
trunk/src/emu/cpu/mips/mips3.c
r245293r245294
148148   , m_pfnmask(0)
149149   , m_tlbentries(0)
150150   , m_bigendian(endianness == ENDIANNESS_BIG)
151   , m_byte_xor(m_bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0))
152   , m_word_xor(m_bigendian ? WORD_XOR_BE(0) : WORD_XOR_LE(0))
151153   , c_icache_size(0)
152154   , c_dcache_size(0)
153155   , m_vtlb(NULL)
156   , m_fastram_select(0)
154157   , m_debugger_temp(0)
155158   , m_cache(CACHE_SIZE + sizeof(internal_mips3_state))
156159   , m_drcuml(NULL)
r245293r245294
161164   , m_nocode(NULL)
162165   , m_out_of_cycles(NULL)
163166   , m_tlb_mismatch(NULL)
164   , m_fastram_select(0)
165167   , m_hotspot_select(0)
166168{
167169   memset(m_fpmode, 0, sizeof(m_fpmode));
r245293r245294
996998    TLB HANDLING
997999***************************************************************************/
9981000
999inline int mips3_device::RBYTE(offs_t address, UINT32 *result)
1001bool mips3_device::RBYTE(offs_t address, UINT32 *result)
10001002{
1001   UINT32 tlbval = m_tlb_table[address >> 12];
1003   const UINT32 tlbval = m_tlb_table[address >> 12];
10021004   if (tlbval & VTLB_READ_ALLOWED)
10031005   {
1004      *result = (*m_memory.read_byte)(*m_program, (tlbval & ~0xfff) | (address & 0xfff));
1006      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1007      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1008      {
1009         if (tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1010         {
1011            continue;
1012         }
1013         UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1014         *result = fastbase[tlbaddress ^ m_byte_xor];
1015         return true;
1016      }
1017      *result = (*m_memory.read_byte)(*m_program, tlbaddress);
10051018   }
10061019   else
10071020   {
r245293r245294
10141027         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
10151028      }
10161029      *result = 0;
1017      return 0;
1030      return false;
10181031   }
1019   return 1;
1032   return true;
10201033}
10211034
1022
1023inline int mips3_device::RHALF(offs_t address, UINT32 *result)
1035bool mips3_device::RHALF(offs_t address, UINT32 *result)
10241036{
1025   UINT32 tlbval = m_tlb_table[address >> 12];
1037   const UINT32 tlbval = m_tlb_table[address >> 12];
10261038   if (tlbval & VTLB_READ_ALLOWED)
10271039   {
1028      *result = (*m_memory.read_word)(*m_program, (tlbval & ~0xfff) | (address & 0xfff));
1040      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1041      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1042      {
1043         if (tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1044         {
1045            continue;
1046         }
1047         UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1048         *result = ((UINT16*)fastbase)[(tlbaddress ^ m_word_xor) >> 1];
1049         return true;
1050      }
1051      *result = (*m_memory.read_word)(*m_program, tlbaddress);
10291052   }
10301053   else
10311054   {
r245293r245294
10381061         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
10391062      }
10401063      *result = 0;
1041      return 0;
1064      return false;
10421065   }
1043   return 1;
1066   return true;
10441067}
10451068
1046
1047inline int mips3_device::RWORD(offs_t address, UINT32 *result)
1069bool mips3_device::RWORD(offs_t address, UINT32 *result)
10481070{
1049   UINT32 tlbval = m_tlb_table[address >> 12];
1071   const UINT32 tlbval = m_tlb_table[address >> 12];
10501072   if (tlbval & VTLB_READ_ALLOWED)
10511073   {
1052      *result = (*m_memory.read_dword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff));
1074      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1075      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1076      {
1077         if (tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1078         {
1079            continue;
1080         }
1081         UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1082         *result = ((UINT32*)fastbase)[tlbaddress >> 2];
1083         return true;
1084      }
1085      *result = (*m_memory.read_dword)(*m_program, tlbaddress);
10531086   }
10541087   else
10551088   {
r245293r245294
10621095         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
10631096      }
10641097      *result = 0;
1065      return 0;
1098      return false;
10661099   }
1067   return 1;
1100   return true;
10681101}
10691102
1070
1071inline int mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask)
1103bool mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask)
10721104{
1073   UINT32 tlbval = m_tlb_table[address >> 12];
1105   const UINT32 tlbval = m_tlb_table[address >> 12];
10741106   if (tlbval & VTLB_READ_ALLOWED)
10751107   {
10761108      *result = (*m_memory.read_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask);
r245293r245294
10861118         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
10871119      }
10881120      *result = 0;
1089      return 0;
1121      return false;
10901122   }
1091   return 1;
1123   return true;
10921124}
10931125
1094
1095inline int mips3_device::RDOUBLE(offs_t address, UINT64 *result)
1126bool mips3_device::RDOUBLE(offs_t address, UINT64 *result)
10961127{
1097   UINT32 tlbval = m_tlb_table[address >> 12];
1128   const UINT32 tlbval = m_tlb_table[address >> 12];
10981129   if (tlbval & VTLB_READ_ALLOWED)
10991130   {
11001131      *result = (*m_memory.read_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff));
r245293r245294
11101141         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
11111142      }
11121143      *result = 0;
1113      return 0;
1144      return false;
11141145   }
1115   return 1;
1146   return true;
11161147}
11171148
1118
1119inline int mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask)
1149bool mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask)
11201150{
1121   UINT32 tlbval = m_tlb_table[address >> 12];
1151   const UINT32 tlbval = m_tlb_table[address >> 12];
11221152   if (tlbval & VTLB_READ_ALLOWED)
11231153   {
11241154      *result = (*m_memory.read_qword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask);
r245293r245294
11341164         generate_tlb_exception(EXCEPTION_TLBLOAD_FILL, address);
11351165      }
11361166      *result = 0;
1137      return 0;
1167      return false;
11381168   }
1139   return 1;
1169   return true;
11401170}
11411171
1142
1143inline void mips3_device::WBYTE(offs_t address, UINT8 data)
1172void mips3_device::WBYTE(offs_t address, UINT8 data)
11441173{
1145   UINT32 tlbval = m_tlb_table[address >> 12];
1174   const UINT32 tlbval = m_tlb_table[address >> 12];
11461175   if (tlbval & VTLB_WRITE_ALLOWED)
11471176   {
1148      (*m_memory.write_byte)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
1177      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1178      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1179      {
1180         if (m_fastram[ramnum].readonly == TRUE || tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1181         {
1182            continue;
1183         }
1184         UINT8 *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1185         fastbase[tlbaddress ^ m_byte_xor] = data;
1186         return;
1187      }
1188      (*m_memory.write_byte)(*m_program, tlbaddress, data);
11491189   }
11501190   else
11511191   {
r245293r245294
11641204   }
11651205}
11661206
1167
1168inline void mips3_device::WHALF(offs_t address, UINT16 data)
1207void mips3_device::WHALF(offs_t address, UINT16 data)
11691208{
1170   UINT32 tlbval = m_tlb_table[address >> 12];
1209   const UINT32 tlbval = m_tlb_table[address >> 12];
11711210   if (tlbval & VTLB_WRITE_ALLOWED)
11721211   {
1173      (*m_memory.write_word)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
1212      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1213      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1214      {
1215         if (m_fastram[ramnum].readonly == TRUE || tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1216         {
1217            continue;
1218         }
1219         void *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1220         ((UINT16*)fastbase)[(tlbaddress ^ m_word_xor) >> 1] = data;
1221         return;
1222      }
1223      (*m_memory.write_word)(*m_program, tlbaddress, data);
11741224   }
11751225   else
11761226   {
r245293r245294
11891239   }
11901240}
11911241
1192
1193inline void mips3_device::WWORD(offs_t address, UINT32 data)
1242void mips3_device::WWORD(offs_t address, UINT32 data)
11941243{
1195   UINT32 tlbval = m_tlb_table[address >> 12];
1244   const UINT32 tlbval = m_tlb_table[address >> 12];
11961245   if (tlbval & VTLB_WRITE_ALLOWED)
11971246   {
1198      (*m_memory.write_dword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
1247      const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
1248      for (int ramnum = 0; ramnum < m_fastram_select; ramnum++)
1249      {
1250         if (m_fastram[ramnum].readonly == TRUE || tlbaddress < m_fastram[ramnum].start || tlbaddress > m_fastram[ramnum].end)
1251         {
1252            continue;
1253         }
1254         void *fastbase = (UINT8*)m_fastram[ramnum].base - m_fastram[ramnum].start;
1255         ((UINT32*)fastbase)[tlbaddress >> 2] = data;
1256         return;
1257      }
1258      (*m_memory.write_dword)(*m_program, tlbaddress, data);
11991259   }
12001260   else
12011261   {
r245293r245294
12141274   }
12151275}
12161276
1217
1218inline void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_mask)
1277void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_mask)
12191278{
1220   UINT32 tlbval = m_tlb_table[address >> 12];
1279   const UINT32 tlbval = m_tlb_table[address >> 12];
12211280   if (tlbval & VTLB_WRITE_ALLOWED)
12221281   {
12231282      (*m_memory.write_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data, mem_mask);
r245293r245294
12391298   }
12401299}
12411300
1242
1243inline void mips3_device::WDOUBLE(offs_t address, UINT64 data)
1301void mips3_device::WDOUBLE(offs_t address, UINT64 data)
12441302{
1245   UINT32 tlbval = m_tlb_table[address >> 12];
1246   //printf("%08x: %08x\n", (UINT32)address, (UINT32)tlbval);
1303   const UINT32 tlbval = m_tlb_table[address >> 12];
12471304   if (tlbval & VTLB_WRITE_ALLOWED)
12481305   {
1249      (*m_memory.write_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
1306      (*m_memory.write_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
12501307   }
12511308   else
12521309   {
r245293r245294
12651322   }
12661323}
12671324
1268
1269inline void mips3_device::WDOUBLE_MASKED(offs_t address, UINT64 data, UINT64 mem_mask)
1325void mips3_device::WDOUBLE_MASKED(offs_t address, UINT64 data, UINT64 mem_mask)
12701326{
1271   UINT32 tlbval = m_tlb_table[address >> 12];
1327   const UINT32 tlbval = m_tlb_table[address >> 12];
12721328   if (tlbval & VTLB_WRITE_ALLOWED)
12731329   {
12741330      (*m_memory.write_qword_masked)(*m_program, (tlbval & ~0xfff)  | (address & 0xfff), data, mem_mask);
r245293r245294
12961352    COP0 (SYSTEM) EXECUTION HANDLING
12971353***************************************************************************/
12981354
1299inline UINT64 mips3_device::get_cop0_reg(int idx)
1355UINT64 mips3_device::get_cop0_reg(int idx)
13001356{
13011357   if (idx == COP0_Count)
13021358   {
r245293r245294
13291385   return m_core->cpr[0][idx];
13301386}
13311387
1332inline void mips3_device::set_cop0_reg(int idx, UINT64 val)
1388void mips3_device::set_cop0_reg(int idx, UINT64 val)
13331389{
13341390   switch (idx)
13351391   {
r245293r245294
14061462   m_core->ccr[0][idx] = val;
14071463}
14081464
1409inline void mips3_device::handle_cop0(UINT32 op)
1465void mips3_device::handle_cop0(UINT32 op)
14101466{
14111467   if ((SR & SR_KSU_MASK) != SR_KSU_KERNEL && !(SR & SR_COP0))
14121468   {
r245293r245294
15411597   }
15421598}
15431599
1544inline void mips3_device::handle_cop1_fr0(UINT32 op)
1600void mips3_device::handle_cop1_fr0(UINT32 op)
15451601{
15461602   double dtemp;
15471603
r245293r245294
19001956}
19011957
19021958
1903inline void mips3_device::handle_cop1_fr1(UINT32 op)
1959void mips3_device::handle_cop1_fr1(UINT32 op)
19041960{
19051961   double dtemp;
19061962
r245293r245294
22642320    COP1X (FPU EXTRA) EXECUTION HANDLING
22652321***************************************************************************/
22662322
2267inline void mips3_device::handle_cop1x_fr0(UINT32 op)
2323void mips3_device::handle_cop1x_fr0(UINT32 op)
22682324{
22692325   UINT64 temp64;
22702326   UINT32 temp;
r245293r245294
23422398   }
23432399}
23442400
2345
2346inline void mips3_device::handle_cop1x_fr1(UINT32 op)
2401void mips3_device::handle_cop1x_fr1(UINT32 op)
23472402{
23482403   UINT64 temp64;
23492404   UINT32 temp;
r245293r245294
24472502   m_core->ccr[2][idx] = val;
24482503}
24492504
2450inline void mips3_device::handle_integer_divide_by_zero(UINT32 op)
2505void mips3_device::handle_cop2(UINT32 op)
24512506{
2452   HIVAL64 = (INT32)RSVAL32;
2453   if (m_flavor == MIPS3_TYPE_VR4300)
2454   {
2455      if (RSVAL32 >= 0)
2456      {
2457         LOVAL64 = (INT32)0x7fffffff;
2458      }
2459      else
2460      {
2461         LOVAL64 = (INT32)0x80000001;
2462      }
2463   }
2464   else
2465   {
2466      if (RSVAL32 >= 0)
2467      {
2468         LOVAL64 = -1;
2469      }
2470      else
2471      {
2472         LOVAL64 = 1;
2473      }
2474   }
2475}
2476
2477inline void mips3_device::handle_cop2(UINT32 op)
2478{
24792507   if (!(SR & SR_COP2))
24802508   {
24812509      m_badcop_value = 2;
r245293r245294
25262554    CORE EXECUTION LOOP
25272555***************************************************************************/
25282556
2557void mips3_device::handle_regimm(UINT32 op)
2558{
2559   switch (RTREG)
2560   {
2561      case 0x00:  /* BLTZ */      if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL);                         break;
2562      case 0x01:  /* BGEZ */      if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL);                        break;
2563      case 0x02:  /* BLTZL */     if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4;        break;
2564      case 0x03:  /* BGEZL */     if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4;   break;
2565      case 0x08:  /* TGEI */      if ((INT64)RSVAL64 >= SIMMVAL) generate_exception(EXCEPTION_TRAP, 1);   break;
2566      case 0x09:  /* TGEIU */     if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2567      case 0x0a:  /* TLTI */      if ((INT64)RSVAL64 < SIMMVAL) generate_exception(EXCEPTION_TRAP, 1);    break;
2568      case 0x0b:  /* TLTIU */     if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2569      case 0x0c:  /* TEQI */      if (RSVAL64 == UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2570      case 0x0e:  /* TNEI */      if (RSVAL64 != UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2571      case 0x10:  /* BLTZAL */    if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31);                     break;
2572      case 0x11:  /* BGEZAL */    if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31);                    break;
2573      case 0x12:  /* BLTZALL */   if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4; break;
2574      case 0x13:  /* BGEZALL */   if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4;    break;
2575      default:    /* ??? */       invalid_instruction(op);                                        break;
2576   }
2577}
2578
2579void mips3_device::handle_special(UINT32 op)
2580{
2581   switch (op & 63)
2582   {
2583      case 0x00:  /* SLL */       if (RDREG) RDVAL64 = (INT32)(RTVAL32 << SHIFT);                 break;
2584      case 0x01:  /* MOVF - R5000*/if (RDREG && GET_FCC((op >> 18) & 7) == ((op >> 16) & 1)) RDVAL64 = RSVAL64;   break;
2585      case 0x02:  /* SRL */       if (RDREG) RDVAL64 = (INT32)(RTVAL32 >> SHIFT);                 break;
2586      case 0x03:  /* SRA */       if (RDREG) RDVAL64 = (INT32)RTVAL32 >> SHIFT;                   break;
2587      case 0x04:  /* SLLV */      if (RDREG) RDVAL64 = (INT32)(RTVAL32 << (RSVAL32 & 31));        break;
2588      case 0x06:  /* SRLV */      if (RDREG) RDVAL64 = (INT32)(RTVAL32 >> (RSVAL32 & 31));        break;
2589      case 0x07:  /* SRAV */      if (RDREG) RDVAL64 = (INT32)RTVAL32 >> (RSVAL32 & 31);          break;
2590      case 0x08:  /* JR */        SETPC(RSVAL32);                                                 break;
2591      case 0x09:  /* JALR */      SETPCL(RSVAL32,RDREG);                                          break;
2592      case 0x0a:  /* MOVZ - R5000 */if (RTVAL64 == 0) { if (RDREG) RDVAL64 = RSVAL64; }           break;
2593      case 0x0b:  /* MOVN - R5000 */if (RTVAL64 != 0) { if (RDREG) RDVAL64 = RSVAL64; }           break;
2594      case 0x0c:  /* SYSCALL */   generate_exception(EXCEPTION_SYSCALL, 1);                       break;
2595      case 0x0d:  /* BREAK */     generate_exception(EXCEPTION_BREAK, 1);                         break;
2596      case 0x0f:  /* SYNC */      /* effective no-op */                                           break;
2597      case 0x10:  /* MFHI */      if (RDREG) RDVAL64 = HIVAL64;                                   break;
2598      case 0x11:  /* MTHI */      HIVAL64 = RSVAL64;                                              break;
2599      case 0x12:  /* MFLO */      if (RDREG) RDVAL64 = LOVAL64;                                   break;
2600      case 0x13:  /* MTLO */      LOVAL64 = RSVAL64;                                              break;
2601      case 0x14:  /* DSLLV */     if (RDREG) RDVAL64 = RTVAL64 << (RSVAL32 & 63);                 break;
2602      case 0x16:  /* DSRLV */     if (RDREG) RDVAL64 = RTVAL64 >> (RSVAL32 & 63);                 break;
2603      case 0x17:  /* DSRAV */     if (RDREG) RDVAL64 = (INT64)RTVAL64 >> (RSVAL32 & 63);          break;
2604      case 0x18:  /* MULT */
2605      {
2606         UINT64 temp64 = (INT64)(INT32)RSVAL32 * (INT64)(INT32)RTVAL32;
2607         LOVAL64 = (INT32)temp64;
2608         HIVAL64 = (INT32)(temp64 >> 32);
2609         m_core->icount -= 3;
2610         break;
2611      }
2612      case 0x19:  /* MULTU */
2613      {
2614         UINT64 temp64 = (UINT64)RSVAL32 * (UINT64)RTVAL32;
2615         LOVAL64 = (INT32)temp64;
2616         HIVAL64 = (INT32)(temp64 >> 32);
2617         m_core->icount -= 3;
2618         break;
2619      }
2620      case 0x1a:  /* DIV */
2621         if (RTVAL32)
2622         {
2623            LOVAL64 = (INT32)((INT32)RSVAL32 / (INT32)RTVAL32);
2624            HIVAL64 = (INT32)((INT32)RSVAL32 % (INT32)RTVAL32);
2625         }
2626         m_core->icount -= 35;
2627         break;
2628      case 0x1b:  /* DIVU */
2629         if (RTVAL32)
2630         {
2631            LOVAL64 = (INT32)(RSVAL32 / RTVAL32);
2632            HIVAL64 = (INT32)(RSVAL32 % RTVAL32);
2633         }
2634         m_core->icount -= 35;
2635         break;
2636      case 0x1c:  /* DMULT */
2637      {
2638         UINT64 temp64 = (INT64)RSVAL64 * (INT64)RTVAL64;
2639         LOVAL64 = temp64;
2640         HIVAL64 = (INT64)temp64 >> 63;
2641         m_core->icount -= 7;
2642         break;
2643      }
2644      case 0x1d:  /* DMULTU */
2645      {
2646         UINT64 temp64 = (UINT64)RSVAL64 * (UINT64)RTVAL64;
2647         LOVAL64 = temp64;
2648         HIVAL64 = 0;
2649         m_core->icount -= 7;
2650         break;
2651      }
2652      case 0x1e:  /* DDIV */
2653         if (RTVAL64)
2654         {
2655            LOVAL64 = (INT64)RSVAL64 / (INT64)RTVAL64;
2656            HIVAL64 = (INT64)RSVAL64 % (INT64)RTVAL64;
2657         }
2658         m_core->icount -= 67;
2659         break;
2660      case 0x1f:  /* DDIVU */
2661         if (RTVAL64)
2662         {
2663            LOVAL64 = RSVAL64 / RTVAL64;
2664            HIVAL64 = RSVAL64 % RTVAL64;
2665         }
2666         m_core->icount -= 67;
2667         break;
2668      case 0x20:  /* ADD */
2669         if (ENABLE_OVERFLOWS && RSVAL32 > ~RTVAL32) generate_exception(EXCEPTION_OVERFLOW, 1);
2670         else if (RDREG) RDVAL64 = (INT32)(RSVAL32 + RTVAL32);
2671         break;
2672      case 0x21:  /* ADDU */      if (RDREG) RDVAL64 = (INT32)(RSVAL32 + RTVAL32);                break;
2673      case 0x22:  /* SUB */
2674         if (ENABLE_OVERFLOWS && RSVAL32 < RTVAL32) generate_exception(EXCEPTION_OVERFLOW, 1);
2675         else if (RDREG) RDVAL64 = (INT32)(RSVAL32 - RTVAL32);
2676         break;
2677      case 0x23:  /* SUBU */      if (RDREG) RDVAL64 = (INT32)(RSVAL32 - RTVAL32);                break;
2678      case 0x24:  /* AND */       if (RDREG) RDVAL64 = RSVAL64 & RTVAL64;                         break;
2679      case 0x25:  /* OR */        if (RDREG) RDVAL64 = RSVAL64 | RTVAL64;                         break;
2680      case 0x26:  /* XOR */       if (RDREG) RDVAL64 = RSVAL64 ^ RTVAL64;                         break;
2681      case 0x27:  /* NOR */       if (RDREG) RDVAL64 = ~(RSVAL64 | RTVAL64);                      break;
2682      case 0x2a:  /* SLT */       if (RDREG) RDVAL64 = (INT64)RSVAL64 < (INT64)RTVAL64;           break;
2683      case 0x2b:  /* SLTU */      if (RDREG) RDVAL64 = (UINT64)RSVAL64 < (UINT64)RTVAL64;         break;
2684      case 0x2c:  /* DADD */
2685         if (ENABLE_OVERFLOWS && RSVAL64 > ~RTVAL64) generate_exception(EXCEPTION_OVERFLOW, 1);
2686         else if (RDREG) RDVAL64 = RSVAL64 + RTVAL64;
2687         break;
2688      case 0x2d:  /* DADDU */     if (RDREG) RDVAL64 = RSVAL64 + RTVAL64;                         break;
2689      case 0x2e:  /* DSUB */
2690         if (ENABLE_OVERFLOWS && RSVAL64 < RTVAL64) generate_exception(EXCEPTION_OVERFLOW, 1);
2691         else if (RDREG) RDVAL64 = RSVAL64 - RTVAL64;
2692         break;
2693      case 0x2f:  /* DSUBU */     if (RDREG) RDVAL64 = RSVAL64 - RTVAL64;                         break;
2694      case 0x30:  /* TGE */       if ((INT64)RSVAL64 >= (INT64)RTVAL64) generate_exception(EXCEPTION_TRAP, 1); break;
2695      case 0x31:  /* TGEU */      if (RSVAL64 >= RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2696      case 0x32:  /* TLT */       if ((INT64)RSVAL64 < (INT64)RTVAL64) generate_exception(EXCEPTION_TRAP, 1); break;
2697      case 0x33:  /* TLTU */      if (RSVAL64 < RTVAL64) generate_exception(EXCEPTION_TRAP, 1);   break;
2698      case 0x34:  /* TEQ */       if (RSVAL64 == RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2699      case 0x36:  /* TNE */       if (RSVAL64 != RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2700      case 0x38:  /* DSLL */      if (RDREG) RDVAL64 = RTVAL64 << SHIFT;                          break;
2701      case 0x3a:  /* DSRL */      if (RDREG) RDVAL64 = RTVAL64 >> SHIFT;                          break;
2702      case 0x3b:  /* DSRA */      if (RDREG) RDVAL64 = (INT64)RTVAL64 >> SHIFT;                   break;
2703      case 0x3c:  /* DSLL32 */    if (RDREG) RDVAL64 = RTVAL64 << (SHIFT + 32);                   break;
2704      case 0x3e:  /* DSRL32 */    if (RDREG) RDVAL64 = RTVAL64 >> (SHIFT + 32);                   break;
2705      case 0x3f:  /* DSRA32 */    if (RDREG) RDVAL64 = (INT64)RTVAL64 >> (SHIFT + 32);            break;
2706      default:    /* ??? */       invalid_instruction(op);                                        break;
2707   }
2708}
2709
25292710void mips3_device::execute_run()
25302711{
25312712   if (m_isdrc)
r245293r245294
26022783      switch (op >> 26)
26032784      {
26042785         case 0x00:  /* SPECIAL */
2605            switch (op & 63)
2606            {
2607               case 0x00:  /* SLL */       if (RDREG) RDVAL64 = (INT32)(RTVAL32 << SHIFT);                 break;
2608               case 0x01:  /* MOVF - R5000*/if (RDREG && GET_FCC((op >> 18) & 7) == ((op >> 16) & 1)) RDVAL64 = RSVAL64;   break;
2609               case 0x02:  /* SRL */       if (RDREG) RDVAL64 = (INT32)(RTVAL32 >> SHIFT);                 break;
2610               case 0x03:  /* SRA */       if (RDREG) RDVAL64 = (INT32)RTVAL32 >> SHIFT;                   break;
2611               case 0x04:  /* SLLV */      if (RDREG) RDVAL64 = (INT32)(RTVAL32 << (RSVAL32 & 31));        break;
2612               case 0x06:  /* SRLV */      if (RDREG) RDVAL64 = (INT32)(RTVAL32 >> (RSVAL32 & 31));        break;
2613               case 0x07:  /* SRAV */      if (RDREG) RDVAL64 = (INT32)RTVAL32 >> (RSVAL32 & 31);          break;
2614               case 0x08:  /* JR */        SETPC(RSVAL32);                                                 break;
2615               case 0x09:  /* JALR */      SETPCL(RSVAL32,RDREG);                                          break;
2616               case 0x0a:  /* MOVZ - R5000 */if (RTVAL64 == 0) { if (RDREG) RDVAL64 = RSVAL64; }           break;
2617               case 0x0b:  /* MOVN - R5000 */if (RTVAL64 != 0) { if (RDREG) RDVAL64 = RSVAL64; }           break;
2618               case 0x0c:  /* SYSCALL */   generate_exception(EXCEPTION_SYSCALL, 1);                       break;
2619               case 0x0d:  /* BREAK */     generate_exception(EXCEPTION_BREAK, 1);                         break;
2620               case 0x0f:  /* SYNC */      /* effective no-op */                                           break;
2621               case 0x10:  /* MFHI */      if (RDREG) RDVAL64 = HIVAL64;                                   break;
2622               case 0x11:  /* MTHI */      HIVAL64 = RSVAL64;                                              break;
2623               case 0x12:  /* MFLO */      if (RDREG) RDVAL64 = LOVAL64;                                   break;
2624               case 0x13:  /* MTLO */      LOVAL64 = RSVAL64;                                              break;
2625               case 0x14:  /* DSLLV */     if (RDREG) RDVAL64 = RTVAL64 << (RSVAL32 & 63);                 break;
2626               case 0x16:  /* DSRLV */     if (RDREG) RDVAL64 = RTVAL64 >> (RSVAL32 & 63);                 break;
2627               case 0x17:  /* DSRAV */     if (RDREG) RDVAL64 = (INT64)RTVAL64 >> (RSVAL32 & 63);          break;
2628               case 0x18:  /* MULT */
2629                  temp64 = (INT64)(INT32)RSVAL32 * (INT64)(INT32)RTVAL32;
2630                  LOVAL64 = (INT32)temp64;
2631                  HIVAL64 = (INT32)(temp64 >> 32);
2632                  m_core->icount -= 3;
2633                  break;
2634               case 0x19:  /* MULTU */
2635                  temp64 = (UINT64)RSVAL32 * (UINT64)RTVAL32;
2636                  LOVAL64 = (INT32)temp64;
2637                  HIVAL64 = (INT32)(temp64 >> 32);
2638                  m_core->icount -= 3;
2639                  break;
2640               case 0x1a:  /* DIV */
2641                  if (RTVAL32)
2642                  {
2643                     LOVAL64 = (INT32)((INT32)RSVAL32 / (INT32)RTVAL32);
2644                     HIVAL64 = (INT32)((INT32)RSVAL32 % (INT32)RTVAL32);
2645                  }
2646                  else
2647                  {
2648                     handle_integer_divide_by_zero(op);
2649                  }
2650                  m_core->icount -= 35;
2651                  break;
2652               case 0x1b:  /* DIVU */
2653                  if (RTVAL32)
2654                  {
2655                     LOVAL64 = (INT32)(RSVAL32 / RTVAL32);
2656                     HIVAL64 = (INT32)(RSVAL32 % RTVAL32);
2657                  }
2658                  else
2659                  {
2660                     handle_integer_divide_by_zero(op);
2661                  }
2662                  m_core->icount -= 35;
2663                  break;
2664               case 0x1c:  /* DMULT */
2665                  temp64 = (INT64)RSVAL64 * (INT64)RTVAL64;
2666                  LOVAL64 = temp64;
2667                  HIVAL64 = (INT64)temp64 >> 63;
2668                  m_core->icount -= 7;
2669                  break;
2670               case 0x1d:  /* DMULTU */
2671                  temp64 = (UINT64)RSVAL64 * (UINT64)RTVAL64;
2672                  LOVAL64 = temp64;
2673                  HIVAL64 = 0;
2674                  m_core->icount -= 7;
2675                  break;
2676               case 0x1e:  /* DDIV */
2677                  if (RTVAL64)
2678                  {
2679                     LOVAL64 = (INT64)RSVAL64 / (INT64)RTVAL64;
2680                     HIVAL64 = (INT64)RSVAL64 % (INT64)RTVAL64;
2681                  }
2682                  m_core->icount -= 67;
2683                  break;
2684               case 0x1f:  /* DDIVU */
2685                  if (RTVAL64)
2686                  {
2687                     LOVAL64 = RSVAL64 / RTVAL64;
2688                     HIVAL64 = RSVAL64 % RTVAL64;
2689                  }
2690                  m_core->icount -= 67;
2691                  break;
2692               case 0x20:  /* ADD */
2693                  if (ENABLE_OVERFLOWS && RSVAL32 > ~RTVAL32) generate_exception(EXCEPTION_OVERFLOW, 1);
2694                  else if (RDREG) RDVAL64 = (INT32)(RSVAL32 + RTVAL32);
2695                  break;
2696               case 0x21:  /* ADDU */      if (RDREG) RDVAL64 = (INT32)(RSVAL32 + RTVAL32);                break;
2697               case 0x22:  /* SUB */
2698                  if (ENABLE_OVERFLOWS && RSVAL32 < RTVAL32) generate_exception(EXCEPTION_OVERFLOW, 1);
2699                  else if (RDREG) RDVAL64 = (INT32)(RSVAL32 - RTVAL32);
2700                  break;
2701               case 0x23:  /* SUBU */      if (RDREG) RDVAL64 = (INT32)(RSVAL32 - RTVAL32);                break;
2702               case 0x24:  /* AND */       if (RDREG) RDVAL64 = RSVAL64 & RTVAL64;                         break;
2703               case 0x25:  /* OR */        if (RDREG) RDVAL64 = RSVAL64 | RTVAL64;                         break;
2704               case 0x26:  /* XOR */       if (RDREG) RDVAL64 = RSVAL64 ^ RTVAL64;                         break;
2705               case 0x27:  /* NOR */       if (RDREG) RDVAL64 = ~(RSVAL64 | RTVAL64);                      break;
2706               case 0x2a:  /* SLT */       if (RDREG) RDVAL64 = (INT64)RSVAL64 < (INT64)RTVAL64;           break;
2707               case 0x2b:  /* SLTU */      if (RDREG) RDVAL64 = (UINT64)RSVAL64 < (UINT64)RTVAL64;         break;
2708               case 0x2c:  /* DADD */
2709                  if (ENABLE_OVERFLOWS && RSVAL64 > ~RTVAL64) generate_exception(EXCEPTION_OVERFLOW, 1);
2710                  else if (RDREG) RDVAL64 = RSVAL64 + RTVAL64;
2711                  break;
2712               case 0x2d:  /* DADDU */     if (RDREG) RDVAL64 = RSVAL64 + RTVAL64;                         break;
2713               case 0x2e:  /* DSUB */
2714                  if (ENABLE_OVERFLOWS && RSVAL64 < RTVAL64) generate_exception(EXCEPTION_OVERFLOW, 1);
2715                  else if (RDREG) RDVAL64 = RSVAL64 - RTVAL64;
2716                  break;
2717               case 0x2f:  /* DSUBU */     if (RDREG) RDVAL64 = RSVAL64 - RTVAL64;                         break;
2718               case 0x30:  /* TGE */       if ((INT64)RSVAL64 >= (INT64)RTVAL64) generate_exception(EXCEPTION_TRAP, 1); break;
2719               case 0x31:  /* TGEU */      if (RSVAL64 >= RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2720               case 0x32:  /* TLT */       if ((INT64)RSVAL64 < (INT64)RTVAL64) generate_exception(EXCEPTION_TRAP, 1); break;
2721               case 0x33:  /* TLTU */      if (RSVAL64 < RTVAL64) generate_exception(EXCEPTION_TRAP, 1);   break;
2722               case 0x34:  /* TEQ */       if (RSVAL64 == RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2723               case 0x36:  /* TNE */       if (RSVAL64 != RTVAL64) generate_exception(EXCEPTION_TRAP, 1);  break;
2724               case 0x38:  /* DSLL */      if (RDREG) RDVAL64 = RTVAL64 << SHIFT;                          break;
2725               case 0x3a:  /* DSRL */      if (RDREG) RDVAL64 = RTVAL64 >> SHIFT;                          break;
2726               case 0x3b:  /* DSRA */      if (RDREG) RDVAL64 = (INT64)RTVAL64 >> SHIFT;                   break;
2727               case 0x3c:  /* DSLL32 */    if (RDREG) RDVAL64 = RTVAL64 << (SHIFT + 32);                   break;
2728               case 0x3e:  /* DSRL32 */    if (RDREG) RDVAL64 = RTVAL64 >> (SHIFT + 32);                   break;
2729               case 0x3f:  /* DSRA32 */    if (RDREG) RDVAL64 = (INT64)RTVAL64 >> (SHIFT + 32);            break;
2730               default:    /* ??? */       invalid_instruction(op);                                        break;
2731            }
2786            handle_special(op);
27322787            break;
27332788
27342789         case 0x01:  /* REGIMM */
2735            switch (RTREG)
2736            {
2737               case 0x00:  /* BLTZ */      if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL);                         break;
2738               case 0x01:  /* BGEZ */      if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL);                        break;
2739               case 0x02:  /* BLTZL */     if ((INT64)RSVAL64 < 0) ADDPC(SIMMVAL); else m_core->pc += 4;        break;
2740               case 0x03:  /* BGEZL */     if ((INT64)RSVAL64 >= 0) ADDPC(SIMMVAL); else m_core->pc += 4;   break;
2741               case 0x08:  /* TGEI */      if ((INT64)RSVAL64 >= SIMMVAL) generate_exception(EXCEPTION_TRAP, 1);   break;
2742               case 0x09:  /* TGEIU */     if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2743               case 0x0a:  /* TLTI */      if ((INT64)RSVAL64 < SIMMVAL) generate_exception(EXCEPTION_TRAP, 1);    break;
2744               case 0x0b:  /* TLTIU */     if (RSVAL64 >= UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2745               case 0x0c:  /* TEQI */      if (RSVAL64 == UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2746               case 0x0e:  /* TNEI */      if (RSVAL64 != UIMMVAL) generate_exception(EXCEPTION_TRAP, 1);  break;
2747               case 0x10:  /* BLTZAL */    if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31);                     break;
2748               case 0x11:  /* BGEZAL */    if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31);                    break;
2749               case 0x12:  /* BLTZALL */   if ((INT64)RSVAL64 < 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4; break;
2750               case 0x13:  /* BGEZALL */   if ((INT64)RSVAL64 >= 0) ADDPCL(SIMMVAL,31) else m_core->pc += 4;    break;
2751               default:    /* ??? */       invalid_instruction(op);                                        break;
2752            }
2790            handle_regimm(op);
27532791            break;
27542792
27552793         case 0x02:  /* J */         ABSPC(LIMMVAL);                                                         break;
r245293r245294
28192857         case 0x36:  /* LDC2 */      if (RDOUBLE(SIMMVAL+RSVAL32, &temp64)) set_cop2_reg(RTREG, temp64);     break;
28202858         case 0x37:  /* LD */        if (RDOUBLE(SIMMVAL+RSVAL32, &temp64) && RTREG) RTVAL64 = temp64;       break;
28212859         case 0x38:  /* SC */        if (RWORD(SIMMVAL+RSVAL32, &temp) && RTREG)
2822                        {
2823                           if (temp == m_ll_value)
2824                           {
2825                              WWORD(SIMMVAL+RSVAL32, RTVAL32);
2826                              RTVAL64 = (UINT32)1;
2827                           }
2828                           else
2829                           {
2830                              RTVAL64 = (UINT32)0;
2831                           }
2832                        }
2833                        break;
2860         {
2861            if (temp == m_ll_value)
2862            {
2863               WWORD(SIMMVAL+RSVAL32, RTVAL32);
2864               RTVAL64 = (UINT32)1;
2865            }
2866            else
2867            {
2868               RTVAL64 = (UINT32)0;
2869            }
2870         }
2871         break;
28342872         case 0x39:  /* SWC1 */      WWORD(SIMMVAL+RSVAL32, get_cop1_reg32(RTREG));                          break;
28352873         case 0x3a:  /* SWC2 */      WWORD(SIMMVAL+RSVAL32, get_cop2_reg(RTREG));                            break;
28362874         case 0x3b:  /* SWC3 */      invalid_instruction(op);                                                break;
28372875         case 0x3c:  /* SCD */       if (RDOUBLE(SIMMVAL+RSVAL32, &temp64) && RTREG)
2838                        {
2839                           if (temp64 == m_lld_value)
2840                           {
2841                              WDOUBLE(SIMMVAL+RSVAL32, RTVAL64);
2842                              RTVAL64 = 1;
2843                           }
2844                           else
2845                           {
2846                              RTVAL64 = 0;
2847                           }
2848                        }
2849                        break;
2876         {
2877            if (temp64 == m_lld_value)
2878            {
2879               WDOUBLE(SIMMVAL+RSVAL32, RTVAL64);
2880               RTVAL64 = 1;
2881            }
2882            else
2883            {
2884               RTVAL64 = 0;
2885            }
2886         }
2887         break;
28502888         case 0x3d:  /* SDC1 */      WDOUBLE(SIMMVAL+RSVAL32, get_cop1_reg64(RTREG));                            break;
28512889         case 0x3e:  /* SDC2 */      WDOUBLE(SIMMVAL+RSVAL32, get_cop2_reg(RTREG));                          break;
28522890         case 0x3f:  /* SD */        WDOUBLE(SIMMVAL+RSVAL32, RTVAL64);                                      break;
trunk/src/emu/cpu/mips/mips3.h
r245293r245294
194194   MIPS3_BADVADDR
195195};
196196
197#define MIPS3_MAX_FASTRAM       4
197#define MIPS3_MAX_FASTRAM       3
198198#define MIPS3_MAX_HOTSPOTS      16
199199
200200enum
r245293r245294
296296
297297   TIMER_CALLBACK_MEMBER(compare_int_callback);
298298
299   void add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base);
300
299301   void mips3drc_set_options(UINT32 options);
300   void mips3drc_add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base);
301302   void mips3drc_add_hotspot(offs_t pc, UINT32 opcode, UINT32 cycles);
302303
303304protected:
r245293r245294
326327   virtual UINT32 disasm_max_opcode_bytes() const { return 4; }
327328   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
328329
330
329331private:
330332   struct internal_mips3_state
331333   {
r245293r245294
394396
395397   /* memory accesses */
396398   bool            m_bigendian;
399   UINT32         m_byte_xor;
400   UINT32         m_word_xor;
397401   data_accessors  m_memory;
398402
399403   /* cache memory */
r245293r245294
404408   vtlb_state *    m_vtlb;
405409   mips3_tlb_entry m_tlb[MIPS3_MAX_TLB_ENTRIES];
406410
411   /* fast RAM */
412   UINT32              m_fastram_select;
413   struct
414   {
415      offs_t              start;                      /* start of the RAM block */
416      offs_t              end;                        /* end of the RAM block */
417      UINT8               readonly;                   /* TRUE if read-only */
418      void *              base;                       /* base in memory where the RAM lives */
419   }       m_fastram[MIPS3_MAX_FASTRAM];
420
407421   UINT64 m_debugger_temp;
408422
409423   /* core state */
r245293r245294
442456   uml::code_handle *   m_exception[18/*EXCEPTION_COUNT*/]; /* array of exception handlers */
443457   uml::code_handle *   m_exception_norecover[18/*EXCEPTION_COUNT*/];   /* array of no-recover exception handlers */
444458
445   /* fast RAM */
446   UINT32              m_fastram_select;
447   struct
448   {
449      offs_t              start;                      /* start of the RAM block */
450      offs_t              end;                        /* end of the RAM block */
451      UINT8               readonly;                   /* TRUE if read-only */
452      void *              base;                       /* base in memory where the RAM lives */
453   }       m_fastram[MIPS3_MAX_FASTRAM];
454
455459   /* hotspots */
456460   UINT32              m_hotspot_select;
457461   struct
r245293r245294
477481private:
478482   UINT32 compute_config_register();
479483   UINT32 compute_prid_register();
484
480485   void tlb_map_entry(int tlbindex);
481486   void tlb_write_common(int tlbindex);
482   int RBYTE(offs_t address, UINT32 *result);
483   int RHALF(offs_t address, UINT32 *result);
484   int RWORD(offs_t address, UINT32 *result);
485   int RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask);
486   int RDOUBLE(offs_t address, UINT64 *result);
487   int RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask);
487
488   bool RBYTE(offs_t address, UINT32 *result);
489   bool RHALF(offs_t address, UINT32 *result);
490   bool RWORD(offs_t address, UINT32 *result);
491   bool RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask);
492   bool RDOUBLE(offs_t address, UINT64 *result);
493   bool RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask);
488494   void WBYTE(offs_t address, UINT8 data);
489495   void WHALF(offs_t address, UINT16 data);
490496   void WWORD(offs_t address, UINT32 data);
491497   void WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_mask);
492498   void WDOUBLE(offs_t address, UINT64 data);
493499   void WDOUBLE_MASKED(offs_t address, UINT64 data, UINT64 mem_mask);
500
494501   UINT64 get_cop0_reg(int idx);
495502   void set_cop0_reg(int idx, UINT64 val);
496503   UINT64 get_cop0_creg(int idx);
497504   void set_cop0_creg(int idx, UINT64 val);
498505   void handle_cop0(UINT32 op);
506
499507   UINT32 get_cop1_reg32(int idx);
500508   UINT64 get_cop1_reg64(int idx);
501509   void set_cop1_reg32(int idx, UINT32 val);
r245293r245294
506514   void handle_cop1_fr1(UINT32 op);
507515   void handle_cop1x_fr0(UINT32 op);
508516   void handle_cop1x_fr1(UINT32 op);
517
509518   UINT64 get_cop2_reg(int idx);
510519   void set_cop2_reg(int idx, UINT64 val);
511520   UINT64 get_cop2_creg(int idx);
512521   void set_cop2_creg(int idx, UINT64 val);
513522   void handle_cop2(UINT32 op);
514   void handle_integer_divide_by_zero(UINT32 op);
523
524   void handle_special(UINT32 op);
525   void handle_regimm(UINT32 op);
526
515527   void lwl_be(UINT32 op);
516528   void lwr_be(UINT32 op);
517529   void ldl_be(UINT32 op);
trunk/src/emu/cpu/mips/mips3drc.c
r245293r245294
160160    region
161161-------------------------------------------------*/
162162
163void mips3_device::mips3drc_add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base)
163void mips3_device::add_fastram(offs_t start, offs_t end, UINT8 readonly, void *base)
164164{
165   if (!machine().options().drc()) return;
166165   if (m_fastram_select < ARRAY_LENGTH(m_fastram))
167166   {
168167      m_fastram[m_fastram_select].start = start;
r245293r245294
20542053         return TRUE;
20552054
20562055      case 0x1a:  /* DIV - MIPS I */
2057      {
2058         if (m_drcoptions & MIPS3DRC_ACCURATE_DIVZERO)
2059         {
2060            code_label divzero, done;
2061
2062            UML_CMP(block, R32(RTREG), 0);                                      // cmp     <rtreg>, 0
2063            UML_JMPc(block, COND_E, divzero = compiler->labelnum++);         // jmp     divzero,E
2064
2065            UML_DIVS(block, I0, I1, R32(RSREG), R32(RTREG));                    // divs    i0,i1,<rsreg>,<rtreg>
2066            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2067            UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
2068            UML_JMP(block, done = compiler->labelnum++);                        // jmp     done
2069
2070            UML_LABEL(block, divzero);                                          // divzero:
2071            if (m_flavor != MIPS3_TYPE_VR4300)
2072            {
2073               UML_MOVc(block, COND_L, I0, 0x00000001);                        // mov     i0,0x00000001,L
2074               UML_MOVc(block, COND_GE, I0, 0xffffffff);                       // mov     i0,0xffffffff,GE
2075            }
2076            else
2077            {
2078               UML_MOVc(block, COND_L, I0, 0x80000001);                        // mov     i0,0x80000001,L
2079               UML_MOVc(block, COND_GE, I0, 0x7fffffff);                       // mov     i0,0x7fffffff,GE
2080            }
2081            UML_DSEXT(block, HI64, R32(RSREG), SIZE_DWORD);                     // dsext   hi,<rsreg>,dword
2082            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2083
2084            UML_LABEL(block, done);                                             // done:
2085         }
2086         else
2087         {
2088            UML_DIVS(block, I0, I1, R32(RSREG), R32(RTREG));                    // divs    i0,i1,<rsreg>,<rtreg>
2089            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2090            UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
2091         }
2056         UML_DIVS(block, I0, I1, R32(RSREG), R32(RTREG));                    // divs    i0,i1,<rsreg>,<rtreg>
2057         UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2058         UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
20922059         return TRUE;
2093      }
20942060
20952061      case 0x1b:  /* DIVU - MIPS I */
2096         if (m_drcoptions & MIPS3DRC_ACCURATE_DIVZERO)
2097         {
2098            code_label divzero, done;
2099
2100            UML_CMP(block, R32(RTREG), 0);                                      // cmp     <rtreg>, 0
2101            UML_JMPc(block, COND_E, divzero = compiler->labelnum++);         // jmp     divzero,E
2102
2103            UML_DIVU(block, I0, I1, R32(RSREG), R32(RTREG));                    // divu    i0,i1,<rsreg>,<rtreg>
2104            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2105            UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
2106            UML_JMP(block, done = compiler->labelnum++);                        // jmp     done
2107
2108            UML_LABEL(block, divzero);                                          // divzero:
2109            if (m_flavor != MIPS3_TYPE_VR4300)
2110            {
2111               UML_MOVc(block, COND_L, I0, 0x00000001);                        // mov     i0,0x00000001,L
2112               UML_MOVc(block, COND_GE, I0, 0xffffffff);                       // mov     i0,0xffffffff,GE
2113            }
2114            else
2115            {
2116               UML_MOVc(block, COND_L, I0, 0x80000001);                        // mov     i0,0x80000001,L
2117               UML_MOVc(block, COND_GE, I0, 0x7fffffff);                       // mov     i0,0x7fffffff,GE
2118            }
2119            UML_DSEXT(block, HI64, R32(RSREG), SIZE_DWORD);                     // dsext   hi,<rsreg>,dword
2120            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2121
2122            UML_LABEL(block, done);                                             // done:
2123         }
2124         else
2125         {
2126            UML_DIVU(block, I0, I1, R32(RSREG), R32(RTREG));                    // divu    i0,i1,<rsreg>,<rtreg>
2127            UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2128            UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
2129         }
2062         UML_DIVU(block, I0, I1, R32(RSREG), R32(RTREG));                    // divu    i0,i1,<rsreg>,<rtreg>
2063         UML_DSEXT(block, LO64, I0, SIZE_DWORD);                             // dsext   lo,i0,dword
2064         UML_DSEXT(block, HI64, I1, SIZE_DWORD);                             // dsext   hi,i1,dword
21302065         return TRUE;
21312066
21322067      case 0x1e:  /* DDIV - MIPS III */
trunk/src/emu/sound/tms5220.c
r245293r245294
322322#define TMS5220_IS_CD2501E  TMS5220_IS_5200
323323
324324#define TMS5220_HAS_RATE_CONTROL ((m_variant == TMS5220_IS_5220C) || (m_variant == TMS5220_IS_CD2501ECD))
325#define TMS5220_IS_52xx ((m_variant == TMS5220_IS_5220C) || (m_variant == TMS5220_IS_5200) || (m_variant == TMS5220_IS_5220) || (m_variant == TMS5220_IS_CD2501ECD))
325326
326327static const UINT8 reload_table[4] = { 0, 2, 4, 6 }; //sample count reload for 5220c and cd2501ecd only; 5200 and 5220 always reload with 0; keep in mind this is loaded on IP=0 PC=12 subcycle=1 so it immediately will increment after one sample, effectively being 1,3,5,7 as in the comments above.
327328
r245293r245294
474475#ifdef DEBUG_FIFO
475476         logerror("data_write: Added byte to FIFO (current count=%2d)\n", m_fifo_count);
476477#endif
477         update_status_and_ints();
478         update_fifo_status_and_ints();
478479         if ((m_talk_status == 0) && (m_buffer_low == 0)) // we just unset buffer low with that last write, and talk status *was* zero...
479480         {
480481         int i;
r245293r245294
514515
515516/**********************************************************************************************
516517
517     update_status_and_ints -- check to see if the various flags should be on or off
518     update_fifo_status_and_ints -- check to see if the various flags should be on or off
518519     Description of flags, and their position in the status register:
519520      From the data sheet:
520521        bit D0(bit 7) = TS - Talk Status is active (high) when the VSP is processing speech data.
r245293r245294
535536
536537***********************************************************************************************/
537538
538void tms5220_device::update_status_and_ints()
539void tms5220_device::update_fifo_status_and_ints()
539540{
540   /* update flags and set ints if needed */
541
541   /* update 52xx fifo flags and set ints if needed */
542   if (!TMS5220_IS_52xx) return; // bail out if not a 52xx chip
542543   update_ready_state();
543544
544545   /* BL is set if neither byte 9 nor 8 of the fifo are in use; this
r245293r245294
605606            m_fifo[m_fifo_head] = 0; // zero the newly depleted fifo head byte
606607            m_fifo_head = (m_fifo_head + 1) % FIFO_SIZE;
607608            m_fifo_bits_taken = 0;
608            update_status_and_ints();
609            update_fifo_status_and_ints();
609610         }
610611      }
611612   }
r245293r245294
797798            {
798799               m_talk_status = m_speak_external = 0;
799800               set_interrupt_state(1);
800               update_status_and_ints();
801               update_fifo_status_and_ints();
801802            }
802803
803804         /* in all cases where interpolation would be inhibited, set the inhibit flag; otherwise clear it.
r245293r245294
12501251   }
12511252
12521253   /* update the buffer low state */
1253   update_status_and_ints();
1254   update_fifo_status_and_ints();
12541255}
12551256
12561257/******************************************************************************************
r245293r245294
12791280   else // non-5220C and 5220C in fixed rate mode
12801281   m_IP = reload_table[m_c_variant_rate&0x3];
12811282
1282   update_status_and_ints();
1283   update_fifo_status_and_ints();
12831284   if (!m_talk_status) goto ranout;
12841285
12851286   // attempt to extract the energy index
r245293r245294
12881289   printbits(m_new_frame_energy_idx,m_coeff->energy_bits);
12891290   fprintf(stderr," ");
12901291#endif
1291   update_status_and_ints();
1292   update_fifo_status_and_ints();
12921293   if (!m_talk_status) goto ranout;
12931294   // if the energy index is 0 or 15, we're done
12941295   if ((m_new_frame_energy_idx == 0) || (m_new_frame_energy_idx == 15))
r245293r245294
13081309   printbits(m_new_frame_pitch_idx,m_coeff->pitch_bits);
13091310   fprintf(stderr," ");
13101311#endif
1311   update_status_and_ints();
1312   update_fifo_status_and_ints();
13121313   if (!m_talk_status) goto ranout;
13131314   // if this is a repeat frame, just do nothing, it will reuse the old coefficients
13141315   if (rep_flag)
r245293r245294
13221323      printbits(m_new_frame_k_idx[i],m_coeff->kbits[i]);
13231324      fprintf(stderr," ");
13241325#endif
1325      update_status_and_ints();
1326      update_fifo_status_and_ints();
13261327      if (!m_talk_status) goto ranout;
13271328   }
13281329
r245293r245294
13411342      printbits(m_new_frame_k_idx[i],m_coeff->kbits[i]);
13421343      fprintf(stderr," ");
13431344#endif
1344      update_status_and_ints();
1345      update_fifo_status_and_ints();
13451346      if (!m_talk_status) goto ranout;
13461347   }
13471348#ifdef VERBOSE
r245293r245294
13671368
13681369void tms5220_device::set_interrupt_state(int state)
13691370{
1371   if (!TMS5220_IS_52xx) return; // bail out if not a 52xx chip, since there's no int pin
13701372#ifdef DEBUG_PIN_READS
13711373   logerror("irq pin set to state %d\n", state);
13721374#endif
trunk/src/emu/sound/tms5220.h
r245293r245294
7373private:
7474   void register_for_save_states();
7575   void data_write(int data);
76   void update_status_and_ints();
76   void update_fifo_status_and_ints();
7777   int extract_bits(int count);
7878   int status_read();
7979   int ready_read();
trunk/src/mame/drivers/cps2.c
r245293r245294
67876787
67886788ROM_START( spf2t )
67896789   ROM_REGION(CODE_SIZE, "maincpu", 0 )      /* 68000 code */
6790   ROM_LOAD16_WORD_SWAP( "pzfe.03", 0x000000, 0x80000, CRC(2af51954) SHA1(51f8797918391e772cf3cc27074ed6ca419806bd) )
6791   ROM_LOAD16_WORD_SWAP( "pzf.04",  0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) ) // marked pzfe.04 but same as pzf.04
6792
6793   ROM_REGION( 0xC00000, "gfx", 0 )
6794   ROM_FILL(             0x000000, 0x800000, 0 )
6795   ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
6796   ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
6797   ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
6798   ROMX_LOAD( "pzf.20m", 0x800006, 0x100000, CRC(7f536ff1) SHA1(905b9d62ef7bef47297c7f4a4dd697aed6df38a5) , ROM_GROUPWORD | ROM_SKIP(6) )
6799
6800   ROM_REGION(QSOUND_SIZE, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
6801   ROM_LOAD( "pzf.01",   0x00000, 0x08000, CRC(600fb2a3) SHA1(1fab1c2a23bf6ad8309d29ddbbc29435a8aeea13) )
6802   ROM_CONTINUE(         0x10000, 0x18000 )
6803   ROM_LOAD( "pzf.02",   0x28000, 0x20000, CRC(496076e0) SHA1(1ee4e135140afd0e8e03231e570cd77d140f6367) )
6804
6805   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
6806   ROM_LOAD16_WORD_SWAP( "pzf.11m",   0x000000, 0x200000, CRC(78442743) SHA1(b61190bb586871de6d54af580e3e1d9cc0de0acb) )
6807   ROM_LOAD16_WORD_SWAP( "pzf.12m",   0x200000, 0x200000, CRC(399d2c7b) SHA1(e849dea97b8d16540415c0d9bbc4f9f4eb755ec4) )
6808ROM_END
6809
6810ROM_START( spf2tu )
6811   ROM_REGION(CODE_SIZE, "maincpu", 0 )      /* 68000 code */
67906812   ROM_LOAD16_WORD_SWAP( "pzfu.03a", 0x000000, 0x80000, CRC(346e62ef) SHA1(9db5ea0aac2d459be957f8b6e2e0d18421587d4d) )
67916813   ROM_LOAD16_WORD_SWAP( "pzf.04",   0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
67926814
r245293r245294
68076829   ROM_LOAD16_WORD_SWAP( "pzf.12m",   0x200000, 0x200000, CRC(399d2c7b) SHA1(e849dea97b8d16540415c0d9bbc4f9f4eb755ec4) )
68086830ROM_END
68096831
6832
68106833ROM_START( spf2xj )
68116834   ROM_REGION(CODE_SIZE, "maincpu", 0 )      /* 68000 code */
68126835   ROM_LOAD16_WORD_SWAP( "pzfj.03a", 0x000000, 0x80000, CRC(2070554a) SHA1(fa818e6bd2e11667345d3d8f2397b60802ef72f9) )
r245293r245294
88048827GAME( 1996, sfz2alj,    sfz2al,   cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Zero 2 Alpha (Japan 960805)", GAME_SUPPORTS_SAVE )
88058828GAME( 1996, sfz2alh,    sfz2al,   cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Zero 2 Alpha (Hispanic 960813)", GAME_SUPPORTS_SAVE )
88068829GAME( 1996, sfz2alb,    sfz2al,   cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Zero 2 Alpha (Brazil 960813)", GAME_SUPPORTS_SAVE )
8807GAME( 1996, spf2t,      0,        cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II Turbo (USA 960620)", GAME_SUPPORTS_SAVE )
8830GAME( 1996, spf2t,      0,        cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II Turbo (Euro 960529)", GAME_SUPPORTS_SAVE )
8831GAME( 1996, spf2tu,     spf2t,    cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II Turbo (USA 960620)", GAME_SUPPORTS_SAVE )
88088832GAME( 1996, spf2xj,     spf2t,    cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II X (Japan 960531)", GAME_SUPPORTS_SAVE )
88098833GAME( 1996, spf2ta,     spf2t,    cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II Turbo (Asia 960529)", GAME_SUPPORTS_SAVE )
88108834GAME( 1996, spf2th,     spf2t,    cps2, cps2_2p2b, cps_state, cps2,     ROT0,   "Capcom", "Super Puzzle Fighter II Turbo (Hispanic 960531)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/hng64.c
r245293r245294
14901490   /* set the fastest DRC options */
14911491   m_maincpu->mips3drc_set_options(MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY);
14921492
1493   /* configure fast RAM regions for DRC */
1494   m_maincpu->mips3drc_add_fastram(0x00000000, 0x00ffffff, FALSE, m_mainram);
1495   m_maincpu->mips3drc_add_fastram(0x04000000, 0x05ffffff, TRUE,  m_cart);
1496   m_maincpu->mips3drc_add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
1493   /* configure fast RAM regions */
1494   m_maincpu->add_fastram(0x00000000, 0x00ffffff, FALSE, m_mainram);
1495   m_maincpu->add_fastram(0x04000000, 0x05ffffff, TRUE,  m_cart);
1496   m_maincpu->add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
14971497
14981498   m_comm_rom = memregion("user2")->base();
14991499   m_comm_ram = auto_alloc_array(machine(),UINT8,0x10000);
trunk/src/mame/drivers/kinst.c
r245293r245294
203203   /* set the fastest DRC options */
204204   m_maincpu->mips3drc_set_options(MIPS3DRC_FASTEST_OPTIONS);
205205
206   /* configure fast RAM regions for DRC */
207   m_maincpu->mips3drc_add_fastram(0x08000000, 0x087fffff, FALSE, m_rambase2);
208   m_maincpu->mips3drc_add_fastram(0x00000000, 0x0007ffff, FALSE, m_rambase);
209   m_maincpu->mips3drc_add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
206   /* configure fast RAM regions */
207   m_maincpu->add_fastram(0x08000000, 0x087fffff, FALSE, m_rambase2);
208   m_maincpu->add_fastram(0x00000000, 0x0007ffff, FALSE, m_rambase);
209   m_maincpu->add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
210210}
211211
212212
trunk/src/mame/drivers/namcos23.c
r245293r245294
32233223   m_c361.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos23_state::c361_timer_cb),this));
32243224   m_c361.timer->adjust(attotime::never);
32253225
3226   m_maincpu->mips3drc_add_fastram(0, m_mainram.bytes()-1, FALSE, reinterpret_cast<UINT32 *>(memshare("mainram")->ptr()));
3226   m_maincpu->add_fastram(0, m_mainram.bytes()-1, FALSE, reinterpret_cast<UINT32 *>(memshare("mainram")->ptr()));
32273227}
32283228
32293229
trunk/src/mame/drivers/seattle.c
r245293r245294
566566   /* set the fastest DRC options, but strict verification */
567567   m_maincpu->mips3drc_set_options(MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY);
568568
569   /* configure fast RAM regions for DRC */
570   m_maincpu->mips3drc_add_fastram(0x00000000, 0x007fffff, FALSE, m_rambase);
571   m_maincpu->mips3drc_add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
569   /* configure fast RAM regions */
570   m_maincpu->add_fastram(0x00000000, 0x007fffff, FALSE, m_rambase);
571   m_maincpu->add_fastram(0x1fc00000, 0x1fc7ffff, TRUE,  m_rombase);
572572
573573   /* register for save states */
574574   save_item(NAME(m_galileo.reg));
trunk/src/mame/drivers/vegas.c
r245293r245294
595595   /* set the fastest DRC options, but strict verification */
596596   m_maincpu->mips3drc_set_options(MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY + MIPS3DRC_FLUSH_PC);
597597
598   /* configure fast RAM regions for DRC */
599   m_maincpu->mips3drc_add_fastram(0x00000000, m_rambase.bytes() - 1, FALSE, m_rambase);
600   m_maincpu->mips3drc_add_fastram(0x1fc00000, 0x1fc7ffff, TRUE, m_rombase);
598   /* configure fast RAM regions */
599   m_maincpu->add_fastram(0x00000000, m_rambase.bytes() - 1, FALSE, m_rambase);
600   m_maincpu->add_fastram(0x1fc00000, 0x1fc7ffff, TRUE, m_rombase);
601601
602602   /* register for save states */
603603   save_item(NAME(m_nile_irq_state));
trunk/src/mame/machine/cps2crpt.c
r245293r245294
899899   { "sfz2alj",  { 0x99450c88,0xa00a2c4d }, 0x100000 },    // 0C80 8E73 9110  cmpi.l  #$8E739110,D0
900900   { "sfz2alh",  { 0x95f15b7c,0x200c08c6 }, 0x100000 },    // 0C80 8E73 9110  cmpi.l  #$8E739110,D0
901901   { "sfz2alb",  { 0x73cd4a28,0xff83af1c }, 0x100000 },    // 0C80 8E73 9110  cmpi.l  #$8E739110,D0
902   { "spf2t",    { 0x706a8750,0x7d0fc185 }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0
902   { "spf2t",    { 0xdde26f09,0x55821ee7 }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0   
903   { "spf2tu",   { 0x706a8750,0x7d0fc185 }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0
903904   { "spf2xj",   { 0xb12c835a,0xe90976ff }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0
904905   { "spf2ta",   { 0x9c48e1ab,0xd60f34fb }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0
905906   { "spf2th",   { 0x51ed8cab,0x228f85b6 }, 0x040000 },    // 0C80 3039 9819  cmpi.l  #$30399819,D0
trunk/src/mame/machine/n64.c
r245293r245294
14581458   //pi_status |= 8; // Set INTERRUPT ?? Does this bit exist ??
14591459
14601460   if(update_bm)
1461      dd_update_bm();   
1461      dd_update_bm();
14621462
14631463   signal_rcp_interrupt(PI_INTERRUPT);
14641464
r245293r245294
21892189   {
21902190      if(((dd_track_reg & 0xFFF) == 6) && (dd_start_block == 0))
21912191      {
2192         dd_status_reg &= ~DD_ASIC_STATUS_DREQ;     
2192         dd_status_reg &= ~DD_ASIC_STATUS_DREQ;
21932193      }
21942194      else if(dd_current_reg < SECTORS_PER_BLOCK)
21952195      {
r245293r245294
22392239   sector += (dd_current_reg - 1) * ddZoneSecSize[dd_zone];
22402240
22412241   //logerror("Write Block %d, Sector %d\n", dd_start_block, dd_current_reg - 1);
2242   
2242
22432243   for(int i = 0; i < ddZoneSecSize[dd_zone]/4; i++)
22442244   {
22452245      sector[i*4 + 0] = (dd_sector_data[i] >> 24) & 0xFF;
r245293r245294
24922492         logerror("dd BM Status write\n");
24932493         dd_start_sector = (data >> 16) & 0xFF;
24942494         if(dd_start_sector == 0x00)
2495         {         
2495         {
24962496            dd_start_block = 0;
24972497            dd_current_reg = 0;
24982498         }
24992499         else if (dd_start_sector == 0x5A)
2500         {   
2500         {
25012501            dd_start_block = 1;
25022502            dd_current_reg = 0;
25032503         }
r245293r245294
26202620
26212621   dynamic_cast<mips3_device *>(machine().device("maincpu"))->mips3drc_set_options(MIPS3DRC_COMPATIBLE_OPTIONS);
26222622
2623   /* configure fast RAM regions for DRC */
2624   dynamic_cast<mips3_device *>(machine().device("maincpu"))->mips3drc_add_fastram(0x00000000, 0x007fffff, FALSE, rdram);
2623   /* configure fast RAM regions */
2624   dynamic_cast<mips3_device *>(machine().device("maincpu"))->add_fastram(0x00000000, 0x007fffff, FALSE, rdram);
26252625
26262626   rsp_device *rsp = machine().device<rsp_device>("rsp");
26272627   rsp->rspdrc_set_options(RSPDRC_STRICT_VERIFY);
trunk/src/mame/mame.lst
r245293r245294
34393439sfz2br1         // 04/03/1996 (c) 1996 (Brazil)
34403440sfz2h           // 04/03/1996 (c) 1996 (Hispanic)
34413441sfz2n           // 29/02/1996 (c) 1996 (Oceania)
3442spf2t           // 20/06/1996 (c) 1996 (USA)
3442spf2t           // 29/05/1996 (c) 1996 (Europe)
3443spf2tu          // 20/06/1996 (c) 1996 (USA)
34433444spf2xj          // 31/05/1996 (c) 1996 (Japan)
34443445spf2ta          // 29/05/1996 (c) 1996 (Asia)
34453446spf2th          // 31/05/1996 (c) 1996 (Hispanic)
trunk/src/mess/drivers/abc80.c
r245293r245294
518518
519519   MCFG_CASSETTE_ADD("cassette")
520520   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
521   MCFG_CASSETTE_INTERFACE("abc80_cass")
521522
522523   MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0)
523524   MCFG_ABC80_KEYBOARD_KEYDOWN_CALLBACK(WRITELINE(abc80_state, keydown_w))
r245293r245294
532533   MCFG_RAM_DEFAULT_SIZE("16K")
533534
534535   // software list
535   MCFG_SOFTWARE_LIST_ADD("flop_list", "abc80")
536   MCFG_SOFTWARE_LIST_ADD("cass_list", "abc80_cass")
537   MCFG_SOFTWARE_LIST_ADD("flop_list", "abc80_flop")
536538MACHINE_CONFIG_END
537539
538540
trunk/src/mess/drivers/ticalc1x.c
r245293r245294
946946   ROM_LOAD( "tmc1993nl", 0x0000, 0x0400, CRC(e941316b) SHA1(7e1542045d1e731cea81a639c9ac9e91bb233b15) )
947947
948948   ROM_REGION( 782, "maincpu:ipla", 0 )
949   ROM_LOAD( "tms0970_lilprof78_ipla.pla", 0, 782, BAD_DUMP CRC(05306ef8) SHA1(60a0a3c49ce330bce0c27f15f81d61461d0432ce) ) // not verified
949   ROM_LOAD( "tms0970_lilprof78_ipla.pla", 0, 782, CRC(05306ef8) SHA1(60a0a3c49ce330bce0c27f15f81d61461d0432ce) )
950950   ROM_REGION( 860, "maincpu:mpla", 0 )
951951   ROM_LOAD( "tms0970_lilprof78_mpla.pla", 0, 860, CRC(7f50ab2e) SHA1(bff3be9af0e322986f6e545b567c97d70e135c93) )
952952   ROM_REGION( 352, "maincpu:opla", 0 )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team