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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# The manual example (examples/manual.zig) on Vol. 2 of the Intel SDM:
# Figure 2-1, then ADD's row 80 /0 ib becoming SUB's 80 /5 ib, stepped
# through in the stock player, and exported twice. Built only when the PDF
# is there (-Dmanual).
frames 150
expect deck.waiting true
expect deck.log.len 0
screenshot .zig-cache/manual/page.png
# The page on its paper, the whole of it in view.
expect-pixel .zig-cache/manual/page.png 400 650 255 255 255 255 2
# Onto the figure; the rest of the page greys.
key space
await deck.waiting true
screenshot .zig-cache/manual/figure.png
expect-pixel .zig-cache/manual/figure.png 460 160 255 255 255 255 2
# Each field in turn, tinted: the third is ModR/M.
key space
await deck.waiting true
key space
await deck.waiting true
key space
await deck.waiting true
expect deck.log.len 4
screenshot .zig-cache/manual/modrm.png
expect-pixel .zig-cache/manual/modrm.png 460 160 192 233 242 255 3
expect-pixel .zig-cache/manual/modrm.png 300 160 255 255 255 255 2
# Back a step: Opcode's tint again, ModR/M's gone.
key page_up
expect deck.log.len 3
frames 2
screenshot .zig-cache/manual/opcode.png
expect-pixel .zig-cache/manual/opcode.png 460 160 255 255 255 255 2
expect-pixel .zig-cache/manual/opcode.png 300 160 192 233 242 255 3
key space
await deck.waiting true
key space
await deck.waiting true
key space
await deck.waiting true
key space
await deck.waiting true
# 83 C0 01 written below, where the footnotes were.
key space
await deck.waiting true
screenshot .zig-cache/manual/bytes.png
# Into their fields: ModR/M's label gives way to C0.
key space
await deck.waiting true
screenshot .zig-cache/manual/flown.png
expect-different-screenshot .zig-cache/manual/bytes.png .zig-cache/manual/flown.png 440 140 180 90
# C0 down into its boxes as bits, then split over Mod, Reg and R/M.
key space
await deck.waiting true
screenshot .zig-cache/manual/bits.png
expect-pixel .zig-cache/manual/bits.png 527 185 255 255 255 255 2
key space
await deck.waiting true
screenshot .zig-cache/manual/split.png
expect-different-screenshot .zig-cache/manual/bits.png .zig-cache/manual/split.png 280 420 310 70
expect deck.log.len 11
# Back to the page, filled in: the end of slide 1.
key space
await deck.waiting true
expect deck.log.len 12
expect deck.slide 1
screenshot .zig-cache/manual/end.png
expect-different-screenshot .zig-cache/manual/page.png .zig-cache/manual/end.png 470 260 340 120
# Slide 2: ADD's page, its opcode table out of it.
key space
await deck.waiting true
expect deck.slide 2
expect deck.log.len 13
screenshot .zig-cache/manual/add.png
expect-pixel .zig-cache/manual/add.png 640 300 255 255 255 255 2
# The table, written in row by row.
key space
await deck.waiting true
screenshot .zig-cache/manual/table.png
expect-different-screenshot .zig-cache/manual/add.png .zig-cache/manual/table.png 415 90 445 310
# Onto the row 80 /0 ib, then its opcode cell tinted.
key space
await deck.waiting true
screenshot .zig-cache/manual/row.png
expect-pixel .zig-cache/manual/row.png 230 362 255 255 255 255 2
key space
await deck.waiting true
screenshot .zig-cache/manual/cell.png
expect-pixel .zig-cache/manual/cell.png 230 362 192 233 242 255 3
# The digit after the slash becomes SUB's 5, closer in; back a step is the
# picture before it (the bar under it aside: it shows the time).
key space
await deck.waiting true
expect deck.log.len 17
screenshot .zig-cache/manual/digit.png
expect-different-screenshot .zig-cache/manual/cell.png .zig-cache/manual/digit.png 0 0 1280 680
key page_up
expect deck.log.len 16
frames 2
screenshot .zig-cache/manual/undone.png
expect-same-screenshot .zig-cache/manual/cell.png .zig-cache/manual/undone.png 2 0 0 1280 680
key space
await deck.waiting true
expect deck.log.len 17
# The rest of the row follows, on SUB's page.
key space
await deck.waiting true
screenshot .zig-cache/manual/sub.png
expect-different-screenshot .zig-cache/manual/digit.png .zig-cache/manual/sub.png 0 0 1280 680
# ADD's row over SUB's, what differs marked: the end of the talk.
key space
frames 240
expect deck.log.len 19
expect deck.waiting false
screenshot .zig-cache/manual/rows.png
expect-pixel .zig-cache/manual/rows.png 75 300 251 236 183 255 3
expect-pixel .zig-cache/manual/rows.png 962 357 251 236 183 255 3
# Exported ({a}, {b}: 10 fps, half size), each step held 1.5 s: the same
# frames twice, and the talk moves through them (Figure 2-1 at 4, 20 and
# 34 s; ADD's table being written at 45, its digit morphing at 56.5, the two
# rows at the end, 66).
expect-same-screenshot {a}/000040.png {b}/000040.png
expect-same-screenshot {a}/000200.png {b}/000200.png
expect-same-screenshot {a}/000340.png {b}/000340.png
expect-same-screenshot {a}/000450.png {b}/000450.png
expect-same-screenshot {a}/000565.png {b}/000565.png
expect-same-screenshot {a}/000660.png {b}/000660.png
expect-different-screenshot {a}/000040.png {a}/000200.png
expect-different-screenshot {a}/000200.png {a}/000340.png
expect-different-screenshot {a}/000340.png {a}/000450.png
expect-different-screenshot {a}/000450.png {a}/000565.png
expect-different-screenshot {a}/000565.png {a}/000660.png
|