\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op); Cycles=4;\r
+ OpStart(op,sea|tea); Cycles=4;\r
\r
EaCalc(0,0x003f,sea,size);\r
EaRead(0, 1,sea,size,0x003f);\r
use&=~0x0e00; // Also use 1 handler for target ?0-7\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,sea|tea);\r
\r
EaCalc (1,0x003f,sea,0); // Lea\r
EaCalc (0,0x0e00,tea,2,1);\r
case 1:\r
return 1; // no such op in 68000\r
\r
- case 2: case 3:\r
+ case 2: case 3:\r
if (EaCanRead(ea,size)==0) return 1; // See if we can do this opcode:\r
break;\r
}\r
use=OpBase(op);\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,ea);\r
Cycles=12;\r
if (type==0) Cycles=(ea>=8)?8:6;\r
\r
EaRead(0, 0,ea,size,0x003f);\r
OpRegToFlags(type==3);\r
if (type==3) {\r
- SuperChange(op);\r
- CheckInterrupt(op);\r
- }\r
+ SuperChange(op);\r
+ CheckInterrupt(op);\r
+ }\r
}\r
\r
OpEnd();\r
use=OpBase(op);\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op); Cycles=16;\r
+ OpStart(op,ea); Cycles=16;\r
\r
if (size) SuperCheck(op);\r
\r
if (type==5) ot(" eor r0,r1,r10\n");\r
OpRegToFlags(size);\r
if (size) {\r
- SuperChange(op);\r
+ SuperChange(op);\r
CheckInterrupt(op);\r
}\r
\r
use=OpBase(op);\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,ea);\r
\r
ot(" ldr r10,[r7,#0x3c]\n");\r
EaCalc (1,0x003f, ea,0);\r
use=OpBase(op);\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,ea);\r
\r
ot(" stmdb sp!,{r9} ;@ Push r9\n"); // can't just use r12 or lr here, because memhandlers touch them\r
ot(" ldrh r11,[r4],#2 ;@ r11=register mask\n");\r
if(dir) { // er\r
if (ea==0x3a) Cycles=16; // ($nn,PC)\r
else if (ea==0x3b) Cycles=18; // ($nn,pc,Rn)\r
- else Cycles=12;\r
+ else Cycles=12;\r
} else {\r
Cycles=8;\r
}\r
// Find size extension\r
if(op&0x0040) size=2;\r
\r
- OpStart(op);\r
+ OpStart(op,ea);\r
\r
if(dir) { // reg to mem\r
EaCalc(11,0x0e00,0,size); // reg number -> r11\r
EaRead(11,11,0,size,0x0e00); // regval -> r11\r
EaCalc(10,0x0007,ea,size);\r
- if(size==2) { // if operand is long\r
- ot(" mov r1,r11,lsr #24 ;@ first byte\n");\r
- EaWrite(10,1,ea,0,0x0007); // store first byte\r
- ot(" add r10,r10,#2\n");\r
- ot(" mov r1,r11,lsr #16 ;@ second byte\n");\r
- EaWrite(10,1,ea,0,0x0007); // store second byte\r
- ot(" add r10,r10,#2\n");\r
- }\r
- ot(" mov r1,r11,lsr #8 ;@ first or third byte\n");\r
- EaWrite(10,1,ea,0,0x0007);\r
- ot(" add r10,r10,#2\n");\r
- ot(" and r1,r11,#0xff\n");\r
- EaWrite(10,1,ea,0,0x0007);\r
+ if(size==2) { // if operand is long\r
+ ot(" mov r1,r11,lsr #24 ;@ first byte\n");\r
+ EaWrite(10,1,ea,0,0x0007); // store first byte\r
+ ot(" add r10,r10,#2\n");\r
+ ot(" mov r1,r11,lsr #16 ;@ second byte\n");\r
+ EaWrite(10,1,ea,0,0x0007); // store second byte\r
+ ot(" add r10,r10,#2\n");\r
+ }\r
+ ot(" mov r1,r11,lsr #8 ;@ first or third byte\n");\r
+ EaWrite(10,1,ea,0,0x0007);\r
+ ot(" add r10,r10,#2\n");\r
+ ot(" and r1,r11,#0xff\n");\r
+ EaWrite(10,1,ea,0,0x0007);\r
} else { // mem to reg\r
EaCalc(10,0x0007,ea,size,1);\r
EaRead(10,11,ea,0,0x0007,1); // read first byte\r
- ot(" add r10,r10,#2\n");\r
+ ot(" add r10,r10,#2\n");\r
EaRead(10,1,ea,0,0x0007,1); // read second byte\r
- if(size==2) { // if operand is long\r
+ if(size==2) { // if operand is long\r
ot(" orr r11,r11,r1,lsr #8 ;@ second byte\n");\r
- ot(" add r10,r10,#2\n");\r
- EaRead(10,1,ea,0,0x0007,1);\r
+ ot(" add r10,r10,#2\n");\r
+ EaRead(10,1,ea,0,0x0007,1);\r
ot(" orr r11,r11,r1,lsr #16 ;@ third byte\n");\r
- ot(" add r10,r10,#2\n");\r
- EaRead(10,1,ea,0,0x0007,1);\r
+ ot(" add r10,r10,#2\n");\r
+ EaRead(10,1,ea,0,0x0007,1);\r
ot(" orr r0,r11,r1,lsr #24 ;@ fourth byte\n");\r
- } else {\r
+ } else {\r
ot(" orr r0,r11,r1,lsr #8 ;@ second byte\n");\r
- }\r
- // store the result\r
+ }\r
+ // store the result\r
EaCalc(11,0x0e00,0,size,1); // reg number -> r11\r
- EaWrite(11,0,0,size,0x0e00,1);\r
+ EaWrite(11,0,0,size,0x0e00,1);\r
}\r
\r
Cycles=(size==2)?24:16;\r
SuperChange(op);\r
OpRegToFlags(1);\r
\r
- ot("\n");\r
+ ot("\n");\r
\r
- ot(" mov r0,#1\n");\r
- ot(" str r0,[r7,#0x58] ;@ stopped\n");\r
- ot("\n");\r
+ ot(" mov r0,#1\n");\r
+ ot(" str r0,[r7,#0x58] ;@ stopped\n");\r
+ ot("\n");\r
\r
- ot(" mov r5,#0 ;@ eat cycles\n");\r
+ ot(" mov r5,#0 ;@ eat cycles\n");\r
Cycles = 4;\r
- ot("\n");\r
+ ot("\n");\r
}\r
else\r
{\r