notaz.gp2x.de
/
cyclone68000.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make Ea* functions easier to work with
[cyclone68000.git]
/
Main.cpp
diff --git
a/Main.cpp
b/Main.cpp
index
1f532a0
..
13efac2
100644
(file)
--- a/
Main.cpp
+++ b/
Main.cpp
@@
-25,8
+25,8
@@
int arm_op_count;
\r
// opcodes often used by games
\r
static const unsigned short hot_opcodes[] = {
\r
\r
// opcodes often used by games
\r
static const unsigned short hot_opcodes[] = {
\r
- 0x670
1
, // beq $3
\r
- 0x660
1
, // bne $3
\r
+ 0x670
2
, // beq $3
\r
+ 0x660
2
, // bne $3
\r
0x51c8, // dbra Dn, $2
\r
0x4a38, // tst.b $0.w
\r
0xd040, // add.w Dn, Dn
\r
0x51c8, // dbra Dn, $2
\r
0x4a38, // tst.b $0.w
\r
0xd040, // add.w Dn, Dn
\r
@@
-34,7
+34,7
@@
static const unsigned short hot_opcodes[] = {
0x0240, // andi.w #$0, D0
\r
0x2038, // move.l $0.w, D0
\r
0xb0b8, // cmp.l $0.w, D0
\r
0x0240, // andi.w #$0, D0
\r
0x2038, // move.l $0.w, D0
\r
0xb0b8, // cmp.l $0.w, D0
\r
- 0x600
1
, // bra $3
\r
+ 0x600
2
, // bra $3
\r
0x30c0, // move.w D0, (A0)+
\r
0x3028, // move.w ($0,A0), D0
\r
0x0c40, // cmpi.w #$0, D0
\r
0x30c0, // move.w D0, (A0)+
\r
0x3028, // move.w ($0,A0), D0
\r
0x0c40, // cmpi.w #$0, D0
\r
@@
-52,7
+52,7
@@
static const unsigned short hot_opcodes[] = {
0xb038, // cmp.b $0.w, D0
\r
0x3039, // move.w $0.l, D0
\r
0x4840, // swap D0
\r
0xb038, // cmp.b $0.w, D0
\r
0x3039, // move.w $0.l, D0
\r
0x4840, // swap D0
\r
- 0x610
1
, // bsr $3
\r
+ 0x610
2
, // bsr $3
\r
0x6100, // bsr $2
\r
0x5e40, // addq.w #7, D0
\r
0x1039, // move.b $0.l, D0
\r
0x6100, // bsr $2
\r
0x5e40, // addq.w #7, D0
\r
0x1039, // move.b $0.l, D0
\r
@@
-64,10
+64,10
@@
static const unsigned short hot_opcodes[] = {
0xc040, // and.w D0, D0
\r
0x3180, // move.w D0, (A0,D0.w)
\r
0x1198, // move.b (A0)+, (A0,D0.w)
\r
0xc040, // and.w D0, D0
\r
0x3180, // move.w D0, (A0,D0.w)
\r
0x1198, // move.b (A0)+, (A0,D0.w)
\r
- 0x650
1
, // bcs $3
\r
+ 0x650
2
, // bcs $3
\r
0x6500, // bcs $2
\r
0x6500, // bcs $2
\r
- 0x640
1
, // bcc $3
\r
- 0x6a0
1
, // bpl $3
\r
+ 0x640
2
, // bcc $3
\r
+ 0x6a0
2
, // bpl $3
\r
0x41f0, // lea (A0,D0.w), A0
\r
0x4a28, // tst.b ($0,A0)
\r
0x0828, // btst #$0, ($0,A0)
\r
0x41f0, // lea (A0,D0.w), A0
\r
0x4a28, // tst.b ($0,A0)
\r
0x0828, // btst #$0, ($0,A0)
\r
@@
-306,7
+306,12
@@
static void PrintFramework()
ot(" bx lr\n");
\r
ltorg();
\r
#else
\r
ot(" bx lr\n");
\r
ltorg();
\r
#else
\r
- ot(";@ do nothing\n");
\r
+ ot(";@ fix final jumptable entries\n");
\r
+ ot(" ldr r12,=CycloneJumpTab\n");
\r
+ ot(" add r12,r12,#0x10000*4\n");
\r
+ ot(" ldr r0,[r12,#-3*4]\n");
\r
+ ot(" str r0,[r12,#-2*4]\n");
\r
+ ot(" str r0,[r12,#-1*4]\n");
\r
ot(" bx lr\n");
\r
#endif
\r
ot("\n");
\r
ot(" bx lr\n");
\r
#endif
\r
ot("\n");
\r
@@
-630,7
+635,7
@@
static void PrintFramework()
ot(" ldr r6,[r7,#0x54]\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#44 ;@ Subtract cycles\n");
\r
ot(" ldr r6,[r7,#0x54]\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#44 ;@ Subtract cycles\n");
\r
- ot(" ldrg
e
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
+ ot(" ldrg
t
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
\r
@@
-842,7
+847,7
@@
static void PrintFramework()
ot(" ldr r6,[r7,#0x54]\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#50 ;@ Subtract cycles\n");
\r
ot(" ldr r6,[r7,#0x54]\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#50 ;@ Subtract cycles\n");
\r
- ot(" ldrg
e
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
+ ot(" ldrg
t
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
#endif
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
#endif
\r
@@
-855,7
+860,7
@@
static void PrintFramework()
ot(" cmp r5,#0\n");
\r
ot(" orr r0,r0,#2 ;@ go to trace mode\n");
\r
ot(" str r0,[r7,#0x58]\n");
\r
ot(" cmp r5,#0\n");
\r
ot(" orr r0,r0,#2 ;@ go to trace mode\n");
\r
ot(" str r0,[r7,#0x58]\n");
\r
- ot(" bl
t
CycloneEnd\n"); // should take care of situation where we come here when already tracing
\r
+ ot(" bl
e
CycloneEnd\n"); // should take care of situation where we come here when already tracing
\r
ot(";@ CheckInterrupt:\n");
\r
ot(" movs r0,r1,lsr #24 ;@ Get IRQ level\n");
\r
ot(" beq CycloneDoTrace\n");
\r
ot(";@ CheckInterrupt:\n");
\r
ot(" movs r0,r1,lsr #24 ;@ Get IRQ level\n");
\r
ot(" beq CycloneDoTrace\n");
\r
@@
-898,13
+903,13
@@
static void PrintFramework()
ot(" bl Exception\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#34 ;@ Subtract cycles\n");
\r
ot(" bl Exception\n");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" subs r5,r5,#34 ;@ Subtract cycles\n");
\r
- ot(" ldrg
e
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
+ ot(" ldrg
t
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
ot("TraceDisabled%s\n", ms?"":":");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" cmp r5,#0\n");
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
ot("TraceDisabled%s\n", ms?"":":");
\r
ot(" ldrh r8,[r4],#2 ;@ Fetch next opcode\n");
\r
ot(" cmp r5,#0\n");
\r
- ot(" ldrg
e
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
+ ot(" ldrg
t
pc,[r6,r8,asl #2] ;@ Jump to opcode handler\n");
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
#endif
\r
ot(" b CycloneEnd\n");
\r
ot("\n");
\r
#endif
\r
@@
-1267,9
+1272,9
@@
static int CycloneMake()
ot(" %s CycloneDoTrace\n",globl);
\r
ot(" %s CycloneJumpTab\n",globl);
\r
ot(" %s Op____\n",globl);
\r
ot(" %s CycloneDoTrace\n",globl);
\r
ot(" %s CycloneJumpTab\n",globl);
\r
ot(" %s Op____\n",globl);
\r
- ot(" %s Op600
1
\n",globl);
\r
- ot(" %s Op660
1
\n",globl);
\r
- ot(" %s Op670
1
\n",globl);
\r
+ ot(" %s Op600
2
\n",globl);
\r
+ ot(" %s Op660
2
\n",globl);
\r
+ ot(" %s Op670
2
\n",globl);
\r
#endif
\r
ot("\n");
\r
ot(ms?"CycloneVer dcd 0x":"CycloneVer: .long 0x");
\r
#endif
\r
ot("\n");
\r
ot(ms?"CycloneVer dcd 0x":"CycloneVer: .long 0x");
\r