diff options
Diffstat (limited to 'design/motion.md')
| -rw-r--r-- | design/motion.md | 106 |
1 files changed, 68 insertions, 38 deletions
diff --git a/design/motion.md b/design/motion.md index a747e9d..9cfaa53 100644 --- a/design/motion.md +++ b/design/motion.md @@ -49,7 +49,8 @@ differently now: - The camera rests at x1.5 as well, and that is its usual scale: a frame of 1195 by 560. At x2 the frame is 896 by 420. It always returns. - Above the working frame there is the map, the same moment with every - panel whole, and in the working frame's corner the minimap. A scene goes + panel whole, and in each pane of the working frame its column of the map, + small, as its minimap. A scene goes between them by `dive` and `surface` (below, "The map and the working frame"). - Down is deeper: a call the narration follows opens its callee's window @@ -817,14 +818,17 @@ the middle third. If they move out of it the frame glides a whole row ### The map and the working frame -The working frame's panels are windows onto the map's columns; the -minimap in its corner is the map at a twentieth, with the windows drawn on -it. Going between the two is the most cinematic move there is, and the -rule for it is the camera's: the viewer never loses where they are. So it -is one continuous move, in which nothing appears and nothing jumps: the -windows rise out of the map and become the panels while the map falls -away into the corner and becomes the minimap, the windows' outlines riding -on it. It is not a camera move on one world (the working frame is not a +The working frame's panels are windows onto the map's columns, and each +pane's minimap is its column, small, with its window drawn on it. Going +between the two is the most cinematic move there is, and the rule for it +is the camera's: the viewer never loses where they are. So it is one +continuous move, in which nothing appears and nothing jumps: the windows +rise out of the map and become the panels, and the column each was a +window on squeezes after it into the pane's strip, the window's outline +riding on it; what no pane takes fades where it is. Each column ends +where its window ends: the eye that followed the window finds its column +beside it. (The corner minimap it replaces made the whole map fall into +one corner, where the eye had to go looking for it.) It is not a camera move on one world (the working frame is not a crop of the map: there the source is over the disassembly, here beside it) and not a `relayout` (that keeps the text's size): every panel has its own path and its own scale. @@ -836,16 +840,18 @@ own path and its own scale. | before | the map is still and the caption that says where we are going has been up 60 f | | 0 to 6 | the windows' outlines go bright | | 6 to 24 | the rest of the map takes the veil, 50% | -| 24 to 96 | each window travels to its panel's place, its scale from a half to whole on its logarithm, `glide`; the panels set off 6 f apart in the frame's reading order (drawing, view, source, registers, disassembly, stack), each drawn over the ones before, so that two crossing are seen to cross. The map, veiled, travels the same 72 f to the minimap's rect (1664, 912, 192 by 108), its scale from a half to a twentieth on its logarithm: continuously, never dropped or hidden on the way | -| 90 to 96 | as it lands, the falling map crossfades into the minimap's own drawing | +| 24 to 96 | each window travels to its panel's place, its scale from a half to whole on its logarithm, `glide`; the panels set off 6 f apart in the frame's reading order (drawing, view, source, registers, disassembly, stack), each drawn over the ones before, so that two crossing are seen to cross. With each, the same 72 f and the same stagger, the rest of its column (the map's panel it is a window on: the file, the 69 instructions, the stack from 16 words above rsp, the region's dump) squeezes into the pane's strip: from its place at half size to the strip's rect, its width and its height each on its logarithm (to 36 of 880; to 4 of 24 a row), its window's outline riding on it. The registers' and the drawing's windows are their panels whole and bring no column | +| 24 to 72 | the map's parts no pane takes (the backtrace, the key, the memory round the pointers, a loupe's panel) fade where they are, veiled | | 72 to 96 | the drawing crossfades from the map's size to the frame's within its box | -| 84 to 102 | the working frame's tags, rules and lanes fade in; the veil on the map lifts as it lands; the clock's count fades in | +| 84 to 102 | each squeezed column crossfades into its strip's strokes (12 f); the working frame's tags, rules and lanes fade in; the clock's count fades in (mock 20) | | 102 to 138 | still | `surface` is the same backwards and a little quicker (the eye already -knows the map): the tags fade (12 f), the panels shrink into their windows -as the minimap grows to fill the frame (72 f, `glide`, the same stagger in -the reverse order), the veil lifts (12 f), 36 f still. +knows the map): the tags fade (12 f) and each strip's strokes become its +column's text, the panels shrink into their windows as each strip unfolds +into the column round its window and the map's other parts fade in where +they are (72 f, `glide`, the same stagger in the reverse order), the veil +lifts (12 f), 36 f still. What is played on the map, and why: @@ -861,10 +867,14 @@ What is played on the map, and why: - **A long run** may stay in the working frame; it surfaces only if it leaves the windows. -In the working frame the minimap is secondary action: its windows glide -with their scrolls (24 f), a mark no window shows `flash`es on it once -(12 f) as it is struck, and every change on it starts 6 f after the -primary onset it follows, never on that frame. A scene that opens on the map establishes it (0 to 48), its +In the working frame each pane's minimap is secondary action: its window +glides with the pane's scroll (24 f); a mark the window does not show +`flash`es on its row in the strip once (12 f) as it is struck; a jump to a +row of the same column farther than the window's height shows there +first, the gold lighting on its new row and the window gliding to it (24 +f) before the pane fades through (12 out, 12 in), so the eye knows where +the pane went before it changes; and every change on a strip starts 6 f +after the primary onset it follows, never on that frame. A scene that opens on the map establishes it (0 to 48), its first caption at 60, dives at 150, and has its first step by 300 (5.0 s). ### Captions, opening, closing @@ -1060,9 +1070,10 @@ whole, from its start to the top's header (rows round what was touched, fieldless ones folded), the tcache as its own panel under it, and the arena (`main_arena`, in libc's data, far from the heap) as a dump by fields: `top`, `last_remainder`, `system_mem`, `flags`, and the bins' -heads. On the minimap those three are where they sit; a strike on one no -window shows (the top's header moving down when the tcache is cut from -it) flashes there. +heads. The view's minimap is the heap's column; a strike on a row its +window does not show (the top's header moving down when the tcache is +cut from it) flashes there, and the tcache's and the arena's panels, which +no pane shows, are the map's alone. **The beats.** Each `free` and the `malloc` that takes the head back are walked; pushes 2 and 3 are a run, which draws no strikes and no arcs and @@ -1114,7 +1125,7 @@ The first free, frame by frame, from its fire: | 18 to 30 | the registers `free` left changed, struck in a wave 2 f apart (`rax`, `rcx` 405, `rdx`, `rsi`, `r8`, `r10`): it was stepped over, so as a `continue` | | 54 to 66, 66 | memory: the chunk's first word armed and struck on its two bytes that changed (`05 04`), 1 f apart, the held corner to come on the first | | 72 to 80 | its second word, the key, its 8 bytes 1 f apart | -| 90 to 102 | the next chunk's header struck on its three bytes that changed (`01 03 00`): the tcache's chunk, cut from the top at this first free; the top's own header has left the window and flashes on the minimap (6 f after) | +| 90 to 102 | the next chunk's header struck on its three bytes that changed (`01 03 00`): the tcache's chunk, cut from the top at this first free; the top's own header has left the window and flashes on the view's minimap (6 f after) | | 102 to 138 | `open`: the loupe on the tcache, over the stack, its stem down the gutter from that row; its two fields framed | | 144, 150 | in the loupe: `num_slots[0]` struck on its one byte (16 to 15), then `entries[0]` on its three (`50 50 40`) | | 162 to 174 | the idea: the `bin`'s box crossfades from dashed to raised, `dummy tcache` to `tcache 0x20`, and the top's box crossfades to its new place and size, `0x20ca0` struck | @@ -1196,7 +1207,7 @@ default, and with it the plain build dies in `__stack_chk_fail` instead of at `ret`), each recorded by instruction from `fill`. The program is [`mock/overflow.c`](mock/overflow.c): `char buf[16]; for (int i = 0; i < 32; i++) buf[i] = 'A';` in a function of its own. Every figure here is -those two recordings' (mocks 26 to 28). +those two recordings' (mocks 26 to 28 and 38). **The program and its frame.** The tracer's tested `targets/overflow.c` (a bound `n`, gcc's layout) keeps `i` and `n` above the buffer at -O0: the @@ -1218,9 +1229,13 @@ second scene. 64 bytes): a header (magic `41b58ab3`, a descriptor `"1 32 16 5 buf:3"`, the pc, the real stack), `buf` at +0x20, a redzone at +0x30; the real stack holds only spills, the saved rbp and the return address, far away. - The two stack panels are scrolled so that `buf` faces `buf`: then plain's - saved rbp faces ASan's redzone, and its return address the redzone's - second word. That facing is the scene. + Each column shows its frame as bytes, eight a row, read by the frame's + own fields ([`hexdump`](README.md#hexdump) `eight`), not as the stack + panel's words: a store here is one byte, and a word going `41`, `4141`, + `414141` would hide both the letter and the field it lands in. The two + are scrolled so that `buf` faces `buf`: then plain's saved rbp faces + ASan's redzone, and its return address the redzone's second word. That + facing is the scene. - *The code.* Line 4's store is one instruction plain (`mov [rbp + rax - 0x10]▮, 0x41`), eight a turn; ASan's turn is seventeen: the address, `shr rax, 3`, the shadow's load at `rax + @@ -1231,8 +1246,17 @@ second scene. `f1 f1 f1 f1 f8 f8 f3 f3`; line 3, which plain has no instruction for, turns `f8 f8` to `00 00` (buf's scope begins). - *The shadow.* One byte for each word of the fake frame, on the word's own - row of the stack panel ([`slot`](README.md#slot)): `f1` four times (the + row of the frame's bytes, before its address: `f1` four times (the header), `00 00` (buf), `f3 f3` (the redzone). +- *The letters.* Each turn stores one byte, `41`, and `buf`'s reading + grows a letter, `"AAAA"`; the `41` beside `A` says what it is. Past + `buf` the letters keep the string's ink in plain's saved rbp and then + its return address, while those fields read what the CPU will: the + saved rbp `→ 7fffffffed41` (i = 16) to `0x4141414141414141` (i = 23); + the return address `→ 401134 main+20`, then `→ 401141 fill+1` (i = 24, + still code), `→ 404141` (25, plain's data page), `0x414141` (26) and + `0x41414141` (27, mock 38), no longer addresses, to `0x4141414141414141` + (31): the crash foretold. - *When they part.* At i = 16: plain's store writes `41` into the saved rbp's low byte (7fffffffed00 becomes 7fffffffed41); ASan's check loads `f3`, `je` is not taken, the partial check (`0 : f3`, signed 0 against @@ -1262,13 +1286,16 @@ loop; inside it each side walks its own rows (README, `pair`). | 1273 | 1651 | Before each store ASan reads buf[i]'s byte of shadow, at (addr >> 3) + 7fff8000. | i = 0, the check, 1333 | ASan's address and check rows walked, 36 f a row, the shadow cell framed as read when its load runs; plain's plaque waits on the row facing them | | 1669 | 2076 | It is 00: the store may go. Both write 'A'; plain in one instruction, ASan in seventeen. | i = 0, the stores, 1729 | both stores strike together (6 f apart, plain first), each side's `i++` | | 2094 | 2736 | Fourteen more turns, at a run: buf fills on both sides. | i = 1 to 14, a run, 2154 | a run: no strikes, no corners; buf's bytes change in place; settled at the end | -| 2754 | 3118 | i = 15, the last byte of buf. Still 00 on ASan's side; still buf on plain's. | i = 15, walked, 2814 | both walked; the last 00 read | -| 3136 | 3528 | i = 16, one past buf. Plain writes 'A' into the saved rbp; ASan reads f3, a redzone. | i = 16, they part, 3196 | the chart below | +| 2754 | 3118 | i = 15, the last byte of buf. Still 00 on ASan's side; still buf on plain's. | i = 15, walked, 2814 | both walked; the last 00 read; each `buf` reads `"AAAAAAAAAAAAAAAA"` across its two rows (mock 26 is the instant before the store) | +| 3136 | 3528 | i = 16, one past buf. Plain writes 41, an 'A', into the saved rbp; ASan reads f3, a redzone. | i = 16, they part, 3196 | the chart below (mock 28) | | 3546 | 3967 | ASan's branch to the store is not taken: it calls the report, which names buf and the write. | the report, 3606 | ASan's partial check and its call walked; its run stops: its registers give way to its stderr, the report's lines, the three the caption names framed | -| 3985 | 4495 | Plain goes on alone: the saved rbp, then the return address, become AAAAAAAA. | i = 17 to 31, a run, 4045 | plain alone at a run; ASan's side holds its last picture; at the run's end the saved rbp and return address settled at `4141414141414141`, `differs` on their rows | -| 4513 | 4903 | The loop ends; pop rbp, then ret to 4141414141414141: the CPU faults. SIGSEGV. | the loop's exit, `pop`, `ret`, 4573 | walked: rbp struck; `ret` faults: the `fault` mark on its row, hazard bands round an ink plaque, `SIGSEGV`; rip stays | +| 3985 | 4320 | Plain goes on alone, a byte a turn: the A's fill the saved rbp. | i = 17 to 23, a run, 4045 | plain alone at a run, 18 f a turn: each turn's byte changes in place (8 f), a letter crossing the saved rbp's bytes one by one, its reading changing with them; settled at `0x4141414141414141`, `differs` on the row; ASan's side holds its last picture | +| 4338 | 4706 | i = 24: the first A reaches the return address. It reads fill+1: still code. | i = 24, walked, 4398 | the store struck on the return address's first byte, `34` to `41`; its reading crossfades from `→ 401134 main+20` to `→ 401141 fill+1` (12 f), still code's ink | +| 4724 | 5060 | Three turns on it is half A's: 41414141, no longer an address. | i = 25 to 27, walked, 72 f a turn, 4784 | each store struck; the reading `→ 404141`, then `0x414141`, then `0x41414141`: the arrow and the ink gone when it stops being an address (mock 38) | +| 5078 | 5366 | The rest at a run: it ends as 4141414141414141. | i = 28 to 31, a run, 5138 | the last four bytes change in place; settled at `0x4141414141414141` | +| 5384 | 5774 | The loop ends; pop rbp, then ret to 4141414141414141: the CPU faults. SIGSEGV. | the loop's exit, `pop`, `ret`, 5444 | walked: rbp struck; `ret` faults: the `fault` mark on its row, hazard bands round an ink plaque, `SIGSEGV`; rip stays | -The cut at 5023, 83.7 s, after 2 s on the two last pictures: a fault on +The cut at 5894, 98.2 s, after 2 s on the two last pictures: a fault on the left, a report on the right. **The step in which they part** (i = 16), from its fire: @@ -1278,8 +1305,8 @@ the left, a report on the right. | 0 to 12 | fire on line 4, both sides' plaques on the turn's first row | | 18 to 66 | plain walks to its store, its rows spread over the time ASan takes to reach its check: ASan's address rows, 12 f each | | 72 to 78 | the two first different rows framed `attention`, one each side: plain's store, ASan's shadow load | -| 84 to 96, 96 | plain: arm, strike the saved rbp's low byte, `00` to `41`; the row's value turns to 7fffffffed41 (`extend`) and its `differs` bar comes in (12 f) | -| 102 to 108 | ASan: the shadow load's cell, `f3`, framed as read, and the load's annotation reads it | +| 84 to 96, 96 | plain: arm, strike the saved rbp's first byte, `00` to `41`, the letter in a string's ink among the pointer's; the field's reading crossfades from `→ 7fffffffed00` to `→ 7fffffffed41` (12 f) and its `differs` bar comes in (12 f) | +| 102 to 108 | ASan: the shadow load's cell, `f3`, framed as read, and the load's annotation reads it; the redzone's bytes beside it stay `00` | | 114 to 126 | ASan: `cmp al, 0`, its values `f3 : 0` and `zf` | | 132 to 150 | ASan: `je` not taken, its row's annotation `not taken`; plain's plaque goes on to `i++` | | 186 to 222 | hold | @@ -1292,7 +1319,10 @@ frame the window shows, each with the 8 application bytes it stands for; which words are a fake frame (ASan's fake stack mapping, the frame's base and size class) and its header decoded (magic, the descriptor's variables with their offsets, sizes and lines, the pc); the red zone under rsp (the -plain build's `buf` and `i` live there); names for ASan's runtime +plain build's `buf` and `i` live there); the frame's fields for its +dump by bytes, by name, offset and size (the debug info's locals; the +saved registers and the return address from the call frame information); +names for ASan's runtime (`__asan_report_store1`, `__asan_stack_malloc_0`); the run's stderr as written, by stop (the report's lines arrive by `write(2, …)`, 18 of them, 1.5 M to 4.7 M instructions after the call: a `continue` to the exit); a @@ -1351,7 +1381,7 @@ that emptiness; nothing else does. A panel's tag and rule come last | 78 | 378 | Code is bytes too. 48 8b 7f 08 is one instruction. | 198 | the code's bytes as a dump row in code's ink; one instruction's bytes framed | | 396 | 796 | Decoded: mov rdi, [rdi + 8]. It came from line 21: each line sits level with its code. | 456 | `decode`, the instruction walked and its neighbours at a run; the source's lines arrive level with their runs: `aligned`, `interleaved` (mock 32) | | 814 | 1160 | rdi pointed at a list node on the heap. Its bytes, and drawn, the node. | 874 | `stack`: the aligned columns become the program column; the heap's dump arrives in the band's right half, then the nodes drawn from it (`establish`) | -| 1178 | 1491 | This is the whole frame. Every view in it is these same bytes. | 1238 | the camera out to x1; the minimap draws itself last: the working frame of mock 9, assembled | +| 1178 | 1491 | This is the whole frame. Every view in it is these same bytes. | 1238 | the camera out to x1; each pane's minimap draws itself last, top down: the working frame of mock 9, assembled | | 1509 | 1809 | And all of it at once: the map. | 1569 | `surface` | Every caption is up its reading time and at most 450 f, leads its step @@ -1435,7 +1465,7 @@ python3 motion.py track VIDEO f139 f158 --color e8c46a # a colour's b scene's layout (a table at the top of the script, keyed by the video's name; add a scene there). Any other name gets the working frame's: the program column, the state column, the caption's text alone (64 to 1464, -906 to 1032, clear of the clock's count), the clock and the minimap. A pixel *moved* if a channel changed by more than +906 to 1032, clear of the clock's count), the clock and the minimap (the corner one, which the videos still have; the per-pane strips want regions of their own here, by split). A pixel *moved* if a channel changed by more than 24 of 255 and is *fading* if by more than 6. The picture is one bar a frame and one strip a region: solid for moving, outlined for fading, holds shaded with their length. The text lists every event with the first and |
