Previous 15994 Revisions Next

r6043 Monday 12th October, 2009 at 02:55:33 UTC by R. Belmont
m680x0 update with working PMMU (also submitted to MAMEdev)
[src/emu/cpu/m68000]m68000.h m68k_in.c m68kcpu.c m68kcpu.h m68kdasm.c m68kmmu.h*

src/emu/cpu/m68000/m68000.h
r6042r6043
7676CPU_GET_INFO( m68010 );
7777CPU_GET_INFO( m68ec020 );
7878CPU_GET_INFO( m68020 );
79CPU_GET_INFO( m68020pmmu );
7980CPU_GET_INFO( m68ec030 );
8081CPU_GET_INFO( m68030 );
8182CPU_GET_INFO( m68ec040 );
r6042r6043
8889#define CPU_M68010 CPU_GET_INFO_NAME( m68010 )
8990#define CPU_M68EC020 CPU_GET_INFO_NAME( m68ec020 )
9091#define CPU_M68020 CPU_GET_INFO_NAME( m68020 )
92#define CPU_M68020_68851 CPU_GET_INFO_NAME( m68020pmmu )
9193#define CPU_M68EC030 CPU_GET_INFO_NAME( m68ec030 )
9294#define CPU_M68030 CPU_GET_INFO_NAME( m68030 )
9395#define CPU_M68EC040 CPU_GET_INFO_NAME( m68ec040 )
src/emu/cpu/m68000/m68kcpu.h
r6042r6043
33/* ======================================================================== */
44/*
55 *                                  MUSASHI
6 *                                Version 4.0
6 *                                Version 4.5
77 *
88 * A portable Motorola M680x0 processor emulation engine.
99 * Copyright Karl Stenerud.  All rights reserved.
r6042r6043
581581   UINT32 instr_mode;   /* Stores whether we are in instruction mode or group 0/1 exception mode */
582582   UINT32 run_mode;     /* Stores whether we are processing a reset, bus error, address error, or something else */
583583   int    has_pmmu;     /* Indicates if a PMMU available (yes on 030, 040, no on EC030) */
584   int    pmmu_enabled; /* Indicates if the PMMU is enabled */
584585
585586   /* Clocks required for instructions / exceptions */
586587   UINT32 cyc_bcc_notake_b;
r6042r6043
635636   UINT16 save_sr;
636637   UINT8 save_stopped;
637638   UINT8 save_halted;
639
640   /* PMMU registers */
641   UINT32 mmu_crp_aptr, mmu_crp_limit;
642   UINT32 mmu_srp_aptr, mmu_srp_limit;
643   UINT32 mmu_tc;
644   UINT16 mmu_sr;
638645};
639646
640647
src/emu/cpu/m68000/m68kmmu.h
r0r6043
1/*
2    m68kmmu.h - PMMU implementation for 68851/68030/68040
3
4    By R. Belmont
5
6    Copyright Nicola Salmoria and the MAME Team.
7    Visit http://mamedev.org for licensing and usage restrictions.
8*/
9
10/*
11   pmmu_translate_addr: perform 68851/68030-style PMMU address translation
12*/
13INLINE UINT32 pmmu_translate_addr(m68ki_cpu_core *m68k, UINT32 addr_in)
14{
15   UINT32 addr_out, tbl_entry, tbl_entry2, tamode, tbmode;
16   UINT32 root_aptr, root_limit, tofs, is, abits, bbits, cbits;
17   UINT32 resolved, tptr, shift;
18
19   resolved = 0;
20   addr_out = addr_in;
21
22   // if SRP is enabled and we're in supervisor mode, use it
23   if ((m68k->mmu_tc & 0x02000000) && (m68ki_get_sr(m68k) & 0x2000))
24   {
25      root_aptr = m68k->mmu_srp_aptr;
26      root_limit = m68k->mmu_srp_limit;
27   }
28   else   // else use the CRP
29   {
30      root_aptr = m68k->mmu_crp_aptr;
31      root_limit = m68k->mmu_crp_limit;
32   }
33
34   // get initial shift (# of top bits to ignore)
35   is = (m68k->mmu_tc>>16) & 0xf;
36   abits = (m68k->mmu_tc>>12)&0xf;
37   bbits = (m68k->mmu_tc>>8)&0xf;
38   cbits = (m68k->mmu_tc>>4)&0xf;
39
40//   logerror("PMMU: tcr %08x limit %08x aptr %08x is %x abits %d bbits %d cbits %d\n", m68k->mmu_tc, root_limit, root_aptr, is, abits, bbits, cbits);
41
42   // get table A offset
43   tofs = (addr_in<<is)>>(32-abits);
44   
45   // find out what format table A is   
46   switch (root_limit & 3)
47   {
48      case 0:   // invalid, should cause MMU exception
49      case 1:   // page descriptor, should cause direct mapping
50         fatalerror("680x0 PMMU: Unhandled root mode\n");
51         break;
52
53      case 2:   // valid 4 byte descriptors
54         tofs *= 4;
55//         logerror("PMMU: reading table A entry at %08x\n", tofs + (root_aptr & 0xfffffffc));
56         tbl_entry = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc));
57         tamode = tbl_entry & 3;
58//         logerror("PMMU: addr %08x entry %08x mode %x tofs %x\n", addr_in, tbl_entry, tamode, tofs);
59         break;
60
61      case 3: // valid 8 byte descriptors
62         tofs *= 8;
63//         logerror("PMMU: reading table A entries at %08x\n", tofs + (root_aptr & 0xfffffffc));
64         tbl_entry2 = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc));
65         tbl_entry = memory_read_dword_32be(m68k->program, tofs + (root_aptr & 0xfffffffc)+4);
66         tamode = tbl_entry2 & 3;
67//         logerror("PMMU: addr %08x entry %08x entry2 %08x mode %x tofs %x\n", addr_in, tbl_entry, tbl_entry2, tamode, tofs);
68         break;
69   }
70
71   // get table B offset and pointer
72   tofs = (addr_in<<(is+abits))>>(32-bbits);
73   tptr = tbl_entry & 0xfffffff0;
74
75   // find out what format table B is, if any
76   switch (tamode)
77   {
78      case 0: // invalid, should cause MMU exception
79         fatalerror("680x0 PMMU: Unhandled Table A mode %d (addr_in %08x)\n", tamode, addr_in);
80         break;
81     
82      case 2: // 4-byte table B descriptor
83         tofs *= 4;
84//         logerror("PMMU: reading table B entry at %08x\n", tofs + tptr);
85         tbl_entry = memory_read_dword_32be(m68k->program, tofs + tptr);
86         tbmode = tbl_entry & 3;
87//         logerror("PMMU: addr %08x entry %08x mode %x tofs %x\n", addr_in, tbl_entry, tbmode, tofs);
88         break;
89
90      case 3: // 8-byte table B descriptor
91         tofs *= 8;
92//         logerror("PMMU: reading table B entries at %08x\n", tofs + tptr);
93         tbl_entry2 = memory_read_dword_32be(m68k->program, tofs + tptr);
94         tbl_entry = memory_read_dword_32be(m68k->program, tofs + tptr + 4);
95         tbmode = tbl_entry2 & 3;
96//         logerror("PMMU: addr %08x entry %08x entry2 %08x mode %x tofs %x\n", addr_in, tbl_entry, tbl_entry2, tbmode, tofs);
97         break;
98
99      case 1:   // early termination descriptor
100         tbl_entry &= 0xffffff00;
101
102         shift = is+abits;
103         addr_out = ((addr_in<<shift)>>shift) + tbl_entry;
104         resolved = 1;
105         break;
106   }
107
108   // if table A wasn't early-out, continue to process table B
109   if (!resolved)
110   {
111      switch (tbmode)
112      {
113         case 0:   // invalid, should cause MMU exception
114         case 2: // 4-byte table C descriptor
115         case 3: // 8-byte table C descriptor
116            fatalerror("680x0 PMMU: Unhandled Table B mode %d (addr_in %08x)\n", tbmode, addr_in);
117            break;
118
119         case 1: // early termination descriptor
120            tbl_entry &= 0xffffff00;
121
122            shift = is+abits+bbits;
123            addr_out = ((addr_in<<shift)>>shift) + tbl_entry;
124            resolved = 1;
125            break;
126      }
127   }
128
129//   if ((addr_in < 0x40000000) || (addr_in > 0x4fffffff)) printf("PMMU: [%08x] => [%08x]\n", addr_in, addr_out);
130
131   return addr_out;
132}
133
134/*
135
136maincpu at 40804366: called unimplemented instruction f000 (cpgen)
137PMMU: tcr 80f05570 limit 7fff0003 aptr 043ffcc0 is 0
138PMMU: reading table A entries at 043ffce0
139PMMU: addr 4080438a entry 00000000 entry2 7ffffc18 mode 0 aofs 20
140680x0 PMMU: Unhandled Table A mode 0
141
142enable, PS = f
143
144tblA @ 043ffcc0:
145
146043ffcc0 0001fc0a 043ffcb0  =>  00000019 04000019
147043ffcc8 7ffffc18 00000000     
148043ffcd0 7ffffc18 00000000     
149043ffcd8 7ffffc18 00000000     
150043ffce0 7ffffc18 00000000     
151043ffce8 7ffffc18 00000000     
152043ffcf0 7ffffc18 00000000     
153043ffcf8 7ffffc18 00000000     
154043ffd00 7ffffc19 40000000
155043ffd08 7ffffc19 48000000
156043ffd10 7ffffc59 50000000
157043ffd18 7ffffc59 58000000
158043ffd20 7ffffc59 60000000
159043ffd28 7ffffc59 68000000
160043ffd30 7ffffc59 70000000
161043ffd38 7ffffc59 78000000
162043ffd40 7ffffc59 80000000
163043ffd48 7ffffc59 88000000
164043ffd50 7ffffc59 90000000
165043ffd58 7ffffc59 98000000
166043ffd60 7ffffc59 a0000000
167043ffd68 7ffffc59 a8000000
168043ffd70 7ffffc59 b0000000
169043ffd78 7ffffc59 b8000000
170043ffd80 7ffffc59 c0000000
171043ffd88 7ffffc59 c8000000
172043ffd90 7ffffc59 d0000000
173043ffd98 7ffffc59 d8000000
174043ffda0 7ffffc59 e0000000
175043ffda8 7ffffc59 e8000000
176043ffdb0 7ffffc59 f0000000
177043ffdb8 7ffffc59 f8000000
178
179*/
180
src/emu/cpu/m68000/m68kdasm.c
r6042r6043
30273027   // do this after fetching the second PMOVE word so we properly get the 3rd if necessary
30283028   str = get_ea_mode_str_32(g_cpu_ir);
30293029
3030   if ((modes & 0xfde0) == 0x2000)   // PLOAD
3031   {
3032      if (modes & 0x0200)
3033      {
3034          sprintf(g_dasm_str, "pload  #%d, %s", (modes>>10)&7, str);
3035      }
3036      else
3037      {
3038          sprintf(g_dasm_str, "pload  %s, #%d", str, (modes>>10)&7);
3039      }
3040      return;
3041   }
3042
3043   if ((modes & 0xe200) == 0x2000)   // PFLUSHA
3044   {
3045      if (modes & 0x0200)
3046      {
3047          sprintf(g_dasm_str, "pflush %s, %s", g_mmuregs[(modes>>10)&7], str);
3048      }
3049      else
3050      {
3051          sprintf(g_dasm_str, "pflush %s, %s", str, g_mmuregs[(modes>>10)&7]);
3052      }
3053      return;
3054   }
3055
30303056   switch ((modes>>13) & 0x7)
30313057   {
30323058      case 0:   // MC68030/040 form with FD bit
r6042r6043
38033829   return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68040);
38043830}
38053831
3832// f028 2215 0008
38063833
3807
38083834/* ======================================================================== */
38093835/* ============================== END OF FILE ============================= */
38103836/* ======================================================================== */
src/emu/cpu/m68000/m68k_in.c
r6042r6043
79977997
79987998M68KMAKE_OP(pflush, 32, ., .)
79997999{
8000   if ((CPU_TYPE_IS_040_PLUS(m68k->cpu_type)) && (m68k->has_pmmu))
8000   if ((CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) && (m68k->has_pmmu))
80018001   {
8002      // Nothing to do, unless address translation cache is emulated
80038002      logerror("680x0: unhandled PFLUSH\n");
80048003      return;
80058004   }
8006   m68ki_exception_illegal(m68k);
8005   m68ki_exception_1111(m68k);
80078006}
80088007
80098008M68KMAKE_OP(pmove, 32, ., .)
r6042r6043
80118010   UINT16 modes;
80128011   UINT32 ea;
80138012
8014   modes = m68ki_read_imm_16(m68k);
8015   ea = M68KMAKE_GET_EA_AY_32;
8016
80178013   if ((CPU_TYPE_IS_EC020_PLUS(m68k->cpu_type)) && (m68k->has_pmmu))
80188014   {
8019      logerror("680x0: unhandled PMOVE modes %x ea %x\n", modes, ea);
8015      modes = m68ki_read_imm_16(m68k);
8016      ea = M68KMAKE_GET_EA_AY_32;
8017     
8018      if ((modes & 0xfde0) == 0x2000)   // PLOAD
8019      {
8020         logerror("680x0: unhandled PLOAD\n");
8021         return;
8022      }
8023
8024      if ((modes & 0xe200) == 0x2000)   // PFLUSHA
8025      {
8026         logerror("680x0: unhandled PFLUSHA\n");
8027         return;
8028      }
8029
8030      switch ((modes>>13) & 0x7)
8031      {
8032         case 0:   // MC68030/040 form with FD bit
8033         case 2:   // MC68881 form, FD never set
8034            if (modes & 0x200)
8035            {
8036               logerror("680x0: PMOVE from MMU not supported\n");
8037            }
8038            else
8039            {
8040                switch ((modes>>10) & 7)
8041               {
8042                  case 0:   // translation control register
8043                     m68k->mmu_tc = memory_read_word_32be(m68k->program, ea)<<16;
8044                     m68k->mmu_tc |= memory_read_word_32be(m68k->program, ea+2);
8045
8046                     if (m68k->mmu_tc & 0x80000000)
8047                     {
8048                        m68k->pmmu_enabled = 1;
8049                     }
8050                     else
8051                     {
8052                        m68k->pmmu_enabled = 0;
8053                     }
8054                     break;
8055
8056                  case 2:   // supervisor root pointer
8057                     m68k->mmu_srp_limit = memory_read_word_32be(m68k->program, ea)<<16;
8058                     m68k->mmu_srp_limit |= memory_read_word_32be(m68k->program, ea+2);
8059                     m68k->mmu_srp_aptr = memory_read_word_32be(m68k->program, ea+4)<<16;
8060                     m68k->mmu_srp_aptr |= memory_read_word_32be(m68k->program, ea+6);
8061                     break;
8062
8063                  case 3:   // CPU root pointer
8064                     m68k->mmu_crp_limit = memory_read_word_32be(m68k->program, ea)<<16;
8065                     m68k->mmu_crp_limit |= memory_read_word_32be(m68k->program, ea+2);
8066                     m68k->mmu_crp_aptr = memory_read_word_32be(m68k->program, ea+4)<<16;
8067                     m68k->mmu_crp_aptr |= memory_read_word_32be(m68k->program, ea+6);
8068                     break;
8069
8070                  default:
8071                     logerror("680x0: PMOVE to unknown MMU register %x\n", (modes>>10) & 7);
8072                     break;
8073               }
8074            }
8075            break;
8076
8077         case 3:   // MC68030 to/from status reg
8078            if (modes & 0x200)
8079            {
8080               memory_write_word_32be(m68k->program, ea, m68k->mmu_sr);
8081            }
8082            else
8083            {
8084               m68k->mmu_sr = memory_read_word_32be(m68k->program, ea);
8085            }
8086            break;
8087
8088         default:
8089            logerror("680x0: unknown PMOVE mode %x (modes %04x) (PC %x)\n", (modes>>13) & 0x7, modes, m68k->pc);
8090            break;
8091      }
8092
80208093   }
80218094   else
80228095   {
8023      m68ki_exception_illegal(m68k);
8096      m68ki_exception_1111(m68k);
80248097   }
80258098}
80268099
src/emu/cpu/m68000/m68kcpu.c
r6042r6043
55#if 0
66static const char copyright_notice[] =
77"MUSASHI\n"
8"Version 4.10 (2009-09-27)\n"
8"Version 4.5 (2009-10-09)\n"
99"A portable Motorola M680x0 processor emulation engine.\n"
1010"Copyright Karl Stenerud.  All rights reserved.\n"
1111"\n"
r6042r6043
3838#include "m68kfpu.c"
3939#include "debugger.h"
4040
41#include "m68kmmu.h"
42
4143extern void m68040_fpu_op0(m68ki_cpu_core *m68k);
4244extern void m68040_fpu_op1(m68ki_cpu_core *m68k);
4345
r6042r6043
611613   m68ki_jump(m68k, REG_PC);
612614}
613615
616/* translate logical to physical addresses */
617static CPU_TRANSLATE( m68k )
618{
619   m68ki_cpu_core *m68k = get_safe_token(device);
614620
621   /* only applies to the program address space and only does something if the MMU's enabled */
622   if (m68k)
623   {
624      if ((space == ADDRESS_SPACE_PROGRAM) && (m68k->pmmu_enabled))
625      {
626         *address = pmmu_translate_addr(m68k, *address);
627      }
628   }
629   return TRUE;
630}
631
615632/* Execute some instructions until we use up cycles clock cycles */
616633static CPU_EXECUTE( m68k )
617634{
r6042r6043
718735{
719736   m68ki_cpu_core *m68k = get_safe_token(device);
720737
738   /* Disable the PMMU on reset */
739   m68k->pmmu_enabled = 0;
740
721741   /* Clear all stop levels and eat up all remaining cycles */
722742   m68k->stopped = 0;
723743   if (m68k->remaining_cycles > 0)
r6042r6043
890910      case CPUINFO_FCT_DISASSEMBLE:   info->disassemble = CPU_DISASSEMBLE_NAME(m68k);         break;
891911      case CPUINFO_FCT_IMPORT_STATE:   info->import_state = CPU_IMPORT_STATE_NAME(m68k);      break;
892912      case CPUINFO_FCT_EXPORT_STATE:   info->export_state = CPU_EXPORT_STATE_NAME(m68k);      break;
913      case CPUINFO_FCT_TRANSLATE:             info->translate = CPU_TRANSLATE_NAME(m68k);      break;
893914
894915      /* --- the following bits of info are returned as pointers --- */
895916      case CPUINFO_PTR_INSTRUCTION_COUNTER:         info->icount = &m68k->remaining_cycles;   break;
r6042r6043
898919      /* --- the following bits of info are returned as NULL-terminated strings --- */
899920      case DEVINFO_STR_NAME:                     /* set per-core */                  break;
900921      case DEVINFO_STR_FAMILY:               strcpy(info->s, "Motorola 68K");      break;
901      case DEVINFO_STR_VERSION:               strcpy(info->s, "4.00");            break;
922      case DEVINFO_STR_VERSION:               strcpy(info->s, "4.50");            break;
902923      case DEVINFO_STR_SOURCE_FILE:                  strcpy(info->s, __FILE__);            break;
903924      case DEVINFO_STR_CREDITS:               strcpy(info->s, "Copyright Karl Stenerud. All rights reserved. (2.1 fixes HJB)"); break;
904925
r6042r6043
10621083   writelong_d32
10631084};
10641085
1086/* interface for 32-bit data bus with PMMU (68EC020, 68020) */
1087static UINT8 read_byte_32_mmu(const address_space *space, offs_t address)
1088{
1089   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1090   
1091   if (m68k->pmmu_enabled)
1092   {
1093      address = pmmu_translate_addr(m68k, address);
1094   }
10651095
1096   return memory_read_byte_32be(space, address);
1097}
10661098
1099static void write_byte_32_mmu(const address_space *space, offs_t address, UINT8 data)
1100{
1101   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1102   
1103   if (m68k->pmmu_enabled)
1104   {
1105      address = pmmu_translate_addr(m68k, address);
1106   }
10671107
1108   memory_write_byte_32be(space, address, data);
1109}
1110
1111static UINT16 read_immediate_16_mmu(const address_space *space, offs_t address)
1112{
1113   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1114   
1115   if (m68k->pmmu_enabled)
1116   {
1117      address = pmmu_translate_addr(m68k, address);
1118   }
1119
1120   return memory_decrypted_read_word(space, (address) ^ m68k->memory.opcode_xor);
1121}
1122
1123/* potentially misaligned 16-bit reads with a 32-bit data bus (and 24-bit address bus) */
1124static UINT16 readword_d32_mmu(const address_space *space, offs_t address)
1125{
1126   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1127   UINT16 result;
1128
1129   if (m68k->pmmu_enabled)
1130   {
1131      address = pmmu_translate_addr(m68k, address);
1132   }
1133
1134   if (!(address & 1))
1135      return memory_read_word_32be(space, address);
1136   result = memory_read_byte_32be(space, address) << 8;
1137   return result | memory_read_byte_32be(space, address + 1);
1138}
1139
1140/* potentially misaligned 16-bit writes with a 32-bit data bus (and 24-bit address bus) */
1141static void writeword_d32_mmu(const address_space *space, offs_t address, UINT16 data)
1142{
1143   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1144
1145   if (m68k->pmmu_enabled)
1146   {
1147      address = pmmu_translate_addr(m68k, address);
1148   }
1149
1150   if (!(address & 1))
1151   {
1152      memory_write_word_32be(space, address, data);
1153      return;
1154   }
1155   memory_write_byte_32be(space, address, data >> 8);
1156   memory_write_byte_32be(space, address + 1, data);
1157}
1158
1159/* potentially misaligned 32-bit reads with a 32-bit data bus (and 24-bit address bus) */
1160static UINT32 readlong_d32_mmu(const address_space *space, offs_t address)
1161{
1162   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1163   UINT32 result;
1164
1165   if (m68k->pmmu_enabled)
1166   {
1167      address = pmmu_translate_addr(m68k, address);
1168   }
1169
1170   if (!(address & 3))
1171      return memory_read_dword_32be(space, address);
1172   else if (!(address & 1))
1173   {
1174      result = memory_read_word_32be(space, address) << 16;
1175      return result | memory_read_word_32be(space, address + 2);
1176   }
1177   result = memory_read_byte_32be(space, address) << 24;
1178   result |= memory_read_word_32be(space, address + 1) << 8;
1179   return result | memory_read_byte_32be(space, address + 3);
1180}
1181
1182/* potentially misaligned 32-bit writes with a 32-bit data bus (and 24-bit address bus) */
1183static void writelong_d32_mmu(const address_space *space, offs_t address, UINT32 data)
1184{
1185   m68ki_cpu_core *m68k = get_safe_token(space->cpu);
1186
1187   if (m68k->pmmu_enabled)
1188   {
1189      address = pmmu_translate_addr(m68k, address);
1190   }
1191
1192   if (!(address & 3))
1193   {
1194      memory_write_dword_32be(space, address, data);
1195      return;
1196   }
1197   else if (!(address & 1))
1198   {
1199      memory_write_word_32be(space, address, data >> 16);
1200      memory_write_word_32be(space, address + 2, data);
1201      return;
1202   }
1203   memory_write_byte_32be(space, address, data >> 24);
1204   memory_write_word_32be(space, address + 1, data >> 8);
1205   memory_write_byte_32be(space, address + 3, data);
1206}
1207
1208static const m68k_memory_interface interface_d32_mmu =
1209{
1210   WORD_XOR_BE(0),
1211   read_immediate_16_mmu,
1212   read_byte_32_mmu,
1213   readword_d32_mmu,
1214   readlong_d32_mmu,
1215   write_byte_32_mmu,
1216   writeword_d32_mmu,
1217   writelong_d32_mmu
1218};
1219
1220
10681221void m68k_set_reset_callback(const device_config *device, m68k_reset_func callback)
10691222{
10701223   m68ki_cpu_core *m68k = get_safe_token(device);
r6042r6043
13011454   }
13021455}
13031456
1457// 68020 with 68851 PMMU
1458static CPU_INIT( m68020pmmu )
1459{
1460   m68ki_cpu_core *m68k = get_safe_token(device);
13041461
1462   CPU_INIT_CALL(m68020);
1463
1464   m68k->has_pmmu          = 1;
1465   m68k->memory           = interface_d32_mmu;
1466}
1467
1468CPU_GET_INFO( m68020pmmu )
1469{
1470   switch (state)
1471   {
1472      /* --- the following bits of info are returned as pointers to data or functions --- */
1473      case CPUINFO_FCT_INIT:         info->init = CPU_INIT_NAME(m68020pmmu);                  break;
1474
1475      /* --- the following bits of info are returned as NULL-terminated strings --- */
1476      case DEVINFO_STR_NAME:                     strcpy(info->s, "68020, 68851");            break;
1477
1478      default:                              CPU_GET_INFO_CALL(m68020);            break;
1479   }
1480}
1481
13051482/****************************************************************************
13061483 * M680EC20 section
13071484 ****************************************************************************/
r6042r6043
13611538   m68k->cpu_type         = CPU_TYPE_030;
13621539   m68k->state.subtypemask = m68k->cpu_type;
13631540   m68k->dasm_type        = M68K_CPU_TYPE_68030;
1364   m68k->memory           = interface_d32;
1541   m68k->memory           = interface_d32_mmu;
13651542   m68k->sr_mask          = 0xf71f; /* T1 T0 S  M  -- I2 I1 I0 -- -- -- X  N  Z  V  C  */
13661543   m68k->cyc_instruction  = m68ki_cycles[3];
13671544   m68k->cyc_exception    = m68ki_exception_cycle_table[3];
r6042r6043
14801657   m68k->cpu_type         = CPU_TYPE_040;
14811658   m68k->state.subtypemask = m68k->cpu_type;
14821659   m68k->dasm_type        = M68K_CPU_TYPE_68040;
1483   m68k->memory           = interface_d32;
1660   m68k->memory           = interface_d32_mmu;
14841661   m68k->sr_mask          = 0xf71f; /* T1 T0 S  M  -- I2 I1 I0 -- -- -- X  N  Z  V  C  */
14851662   m68k->cyc_instruction  = m68ki_cycles[4];
14861663   m68k->cyc_exception    = m68ki_exception_cycle_table[4];
r6042r6043
15681745   m68k->cyc_movem_l      = 2;
15691746   m68k->cyc_shift        = 0;
15701747   m68k->cyc_reset        = 518;
1571   m68k->has_pmmu          = 1;
1748   m68k->has_pmmu          = 0;
15721749}
15731750
15741751CPU_GET_INFO( m68ec040 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team