-
Notifications
You must be signed in to change notification settings - Fork 0
/
edgeload
65 lines (62 loc) · 1.04 KB
/
edgeload
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
edge loading:
based on "The Complete SPECTRUM ROM DISASSEMBLY" by Logan & O'Hara
0x05e7 LD-EDGE-1
7+21*(4+12)+(4+7)+4=358T
0x05ed LD-SAMPLE
INC B 4T
RET Z 11/5T
LD A,7F 7T
IN A,FE 11T
RRA 4T
RET NC 11/5T
XOR C 4T
AND 20 7T
JR Z,LD-SAMPLE 12/7T
LD A,C 4T
CPL 4T
LD C,A 4T
AND 7 7T
OR 8 7T
OUT FE,A 11T
SCF 4T
RET 10T
0x04d8 SA-LEADER
DJNZ SA-LEADER (B-1)*13+8T
OUT FE,A 11T
XOR 0F 7T
LD B,A4 7T
DEC L 4T
JR NZ,SA-LEADER 12/7T
DEC B 4T
DEC H 4T
JP P,SA-LEADER 10T
LD B,2F 7T
0x04ea SA-SYNC-1
DJNZ SA-SYNC-1 (B-1)*13+8T
OUT FE,A 11T
LD A,0D 7T
LD B,37 7T
0x04f2 SA-SYNC-2
DJNZ SA-SYNC-2 (B-1)*13+8T
OUT FE,A 11T
LD BC,3B0E 10T
EX AF,AF' 4T
LD L,A 4T
JP SA-START 10T // SA-START = 0x0507
0x0511 SA-BIT-2
LD A,C 4T
BIT 7,B 8T
0x0514 SA-BIT-1
DJNZ SA-BIT-1 (B-1)*13+8T
JR NC,SA-OUT 12/7T
LD B,42 7T
0x051A SA-SET
DJNZ SA-SET (B-1)*13+8T
0x051C SA-OUT
OUT FE,A 11T
LD B,3E 7T
JR NZ,SA-BIT-2 12/7T
DEC B 4T
XOR A 4T
INC A 4T
0x0525 SA-8-BITS