blob: f79132798218fce7a67e273837ca225e8840d811 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
cmp.w <ea>, Dn 4(1/0) + <ea> time
cmp.l <ea>, Dn 6(1/0) + <ea> time
cmp.w #num, Dn 4(1/0) + 4(1/0)
cmp.l #num, Dn 6(1/0) + 8(2/0)
cmpi.w #num, Dn 8(2/0)
cmpi.l #num, Dn 14(3/0)
movem
subtype field (bits 9-11) = 110 or 100 depending on direction
bit 8 = 0
bit 7 = 1
bit 6 = size
x86-64 registers in 68K core
1. native stack pointer
2. current cycle count
3. target cycle count
4. cartridge address
5. work ram address
6. scratch register
7. context pointer (contains 68K registers and memory pointers not in registers)
8. status register (maybe, depends on how well I can abuse native x86 status stuff)
Rest of registers used for holding 68K registers
rax = cycle counter
bl = N flag
bh = V flag
rcx = scratch register
dl = Z flag
dh = C flag
rbp = target cycle count
rsi = context pointer
rdi = scratch register
r8 = cartridge address
r9 = work ram address
r10 = d0
r11 = d1
r12 = d2
r13 = a0
r14 = a1
r15 = a7
rsp = native stack pointer
68K context:
uint8_t flags[5];
uint8_t pad??[3]
uint32_t dregs[8]; //8 + 4 * reg
uint32_t aregs[8]; //40 + 4 * reg
.....
x86-64 registers in Z80 core
ax = AF
bx = BC
cx = DE
dx = HL
1. native stack pointer
2. current cycle count
3. target cycle count
|