comparison notes/notes.txt @ 2060:f1c2415f4d1d segacd

Move old notes into a subdir and add CDD MCU notes
author Michael Pavone <pavone@retrodev.com>
date Sun, 23 Jan 2022 11:11:07 -0800
parents notes.txt@0ae589d4c3f9
children
comparison
equal deleted inserted replaced
2059:6399a776e981 2060:f1c2415f4d1d
1 cmp.w <ea>, Dn 4(1/0) + <ea> time
2 cmp.l <ea>, Dn 6(1/0) + <ea> time
3 cmp.w #num, Dn 4(1/0) + 4(1/0)
4 cmp.l #num, Dn 6(1/0) + 8(2/0)
5
6 cmpi.w #num, Dn 8(2/0)
7 cmpi.l #num, Dn 14(3/0)
8
9
10 movem
11
12 subtype field (bits 9-11) = 110 or 100 depending on direction
13 bit 8 = 0
14 bit 7 = 1
15 bit 6 = size
16
17
18
19 x86-64 registers in 68K core
20
21 1. native stack pointer
22 2. current cycle count
23 3. target cycle count
24 4. cartridge address
25 5. work ram address
26 6. scratch register
27 7. context pointer (contains 68K registers and memory pointers not in registers)
28 8. status register (maybe, depends on how well I can abuse native x86 status stuff)
29 Rest of registers used for holding 68K registers
30
31 rax = cycle counter
32 bl = N flag
33 bh = V flag
34 rcx = scratch register
35 dl = Z flag
36 dh = C flag
37 rbp = target cycle count
38 rsi = context pointer
39 rdi = scratch register
40 r8 = cartridge address
41 r9 = work ram address
42 r10 = d0
43 r11 = d1
44 r12 = d2
45 r13 = a0
46 r14 = a1
47 r15 = a7
48 rsp = native stack pointer
49
50 68K context:
51 uint8_t flags[5];
52 uint8_t pad??[3]
53 uint32_t dregs[8]; //8 + 4 * reg
54 uint32_t aregs[8]; //40 + 4 * reg
55 .....
56
57 x86-64 registers in Z80 core
58
59 ax = HL
60 bx = BC
61 cx = DE
62 dx = IX
63 ebp = current cycle count
64 rsi = context pointer
65 edi = target cycle count
66 rsp = native stack pointer
67 r8 = IY
68 r9 = SP
69 r10 = A (maybe AF?)
70 r11 = z80 ram address
71 r12 = cartridge address if bank is pointed at ROM
72 r13 = scratch1
73 r14 = scratch2
74 r15 = ?maybe z80 bank register?
75
76