}\r
else\r
{\r
- // if (size == 2 && decr && SPLIT_MOVEL_PD) we should do 2xWrite16 here\r
- // (same as in movel.l ?, -(An)), but as this is not likely to be needed and\r
- // we do not want the performance hit, we do single Write32 instead.\r
ot(" ;@ Copy register to memory:\n",1<<size);\r
ot(" ldr r1,[r7,r10] ;@ Load value from Dn/An\n");\r
- EaWrite(6,1,ea,size,0x003f);\r
+#if SPLIT_MOVEL_PD\r
+ if (decr && size==2) { // -(An)\r
+ ot(" add r0,r6,#2\n");\r
+ EaWrite(0,1,ea,1,0x003f,0,0);\r
+ ot(" ldr r1,[r7,r10] ;@ Load value from Dn/An\n");\r
+ ot(" mov r0,r6\n");\r
+ EaWrite(0,1,ea,1,0x003f,1);\r
+ }\r
+ else\r
+#endif\r
+ {\r
+ EaWrite(6,1,ea,size,0x003f);\r
+ }\r
}\r
\r
if (decr==0) ot(" add r6,r6,#%d ;@ Post-increment address\n",1<<size);\r
\r
/*\r
* When this option is enabled Cyclone will do two word writes instead of one\r
- * long write when handling MOVE.L with pre-decrementing destination, as described in\r
- * Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).\r
+ * long write when handling MOVE.L or MOVEM.L with pre-decrementing destination,\r
+ * as described in Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).\r
* Enable this if you are emulating a 16 bit system.\r
*/\r
#define SPLIT_MOVEL_PD 1\r
* MEMHANDLERS_NEED_CYCLES, or else Cyclone will keep reloading the same cycle\r
* count and this will screw timing (if not cause a deadlock).\r
*/\r
-#define MEMHANDLERS_NEED_PC 0\r
+#define MEMHANDLERS_NEED_PC 1\r
#define MEMHANDLERS_NEED_PREV_PC 0\r
#define MEMHANDLERS_NEED_FLAGS 0\r
#define MEMHANDLERS_NEED_CYCLES 1\r
\r
/*\r
* When this option is enabled Cyclone will do two word writes instead of one\r
- * long write when handling MOVE.L with pre-decrementing destination, as described in\r
- * Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).\r
+ * long write when handling MOVE.L or MOVEM.L with pre-decrementing destination,\r
+ * as described in Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).\r
* Enable this if you are emulating a 16 bit system.\r
*/\r
#define SPLIT_MOVEL_PD 1\r
if(register_list & (1 << i))\r
{\r
ea -= 4;\r
+#if 0\r
m68ki_write_32(ea, REG_DA[15-i] ); // notaz Cyclone hack\r
- //m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );\r
- //m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );\r
+#else\r
+ m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );\r
+ m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );\r
+#endif\r
count++;\r
}\r
AY = ea;\r