Analysis model: gpt-5.5 xhigh

# Karma by Halcyon - Technical Dissection

`Karma` is a 1995 MS-DOS demo by Halcyon, released at Scenario 1995 and
placed third in the PC demo competition. Blitz's executable is a large,
unpacked 16-bit Borland program rather than a protected-mode monolith. Its
engine combines six custom triangle meshes, four ordinary RIX3 screens, a
23-record packed picture bank, a 20-frame low-resolution animation stream,
MIDAS S3M playback, palette interpolation, fixed-point matrix transforms,
stable radix sorting and a paired-pixel affine texture mapper.

Release year: 1995

![Karma's textured mesh renderer in the direct silent run](images/karma-halcyon-mesh.gif?v=deep-20260816)

## Sources And Evidence Boundary

- [Demozoo production record and credits](https://demozoo.org/productions/28489/)
- [Pouet production record](https://www.pouet.net/prod.php?which=2087)
- [Scene.org Halcyon archive](https://files.scene.org/get/demos/groups/halcyon/h_karma.zip)
- Static disassembly of the original, unpacked `KARMA.EXE`
- Independent parsers for every H!V object, every RIX3 screen, `KUVAT`,
  `ANIMAATI` and the complete S3M structure
- Direct DOSBox-X runs with host audio disabled

Demozoo dates the release to 14 October 1995 and records the third-place
Scenario result. The release credits Blitz for code, Croaker for music and
Ember, Placidity and Shrine for graphics. The archive note also says the demo
uses MIDAS. Old personal contact details in the note are not reproduced.

The first conservative 30,000-cycle run and a second dynamic-core run both
reached the same late combined mesh, then stopped crossing a music-position
gate while local geometry continued to move. Both retained a guest Gravis
UltraSound device for the module clock while the host used SDL's dummy audio
driver; no music was audible and no audio was captured or published. A later
Sound Blaster diagnostic returned to DOS but produced only black frames, so it
is excluded from visual and completion evidence.

## Archive Identity And Production Files

The canonical archive is:

```text
5d55202148571c75d6fb34a54e52d149cf5663c254f0539569dc85e0299d55b0  h_karma.zip
```

Its production payload is unusually transparent:

```text
0e6191c19eb5945f89cbb4e7e598032928be71083b8732efe94749cd522967eb  217872  GA.S3M
8d2360cd8973ba298cb7b77e2ead6c5ff93f6f0a31dcd7bc6859878ace5f851a  160000  ANIMAATI
202a71d5be09465c2864f6519c8f04968ec17e6593967a876052f64befa7dd19   64778  FONTTI.SCI
83b0c381e79792582eaef7330879d50f8d789ec651258568a9691ec59f1eb569    1830  HALC.H!V
d157f67f96ebeaabafd9343d9f94d8592f6d57fd801b53e850fe3246ed365ad8    1782  KARMA.H!V
5536e8bb3c84d1291a0fe75848d837dc3adfeb51c63823159339f85639282e9f    4392  PAL1.H!V
d80190106cd547b0c96dedc5337cf316b97f262026a6658a0c3140d3a3599cf2    4392  PAL2.H!V
db6cce801bbb0c81b2ae4b5ebeaad8cbc20d378360b7c7a1b2bba3d186c0504e     246  PALANEN.H!V
39a6f4ae5e7a7161dad998a8ba9ff62d3f4c66300cf771f0c61fc135c4059f33    5190  UUSLOKO.H!V
dbce183f642e4b7570cd25fe18471e2e6dfecd9b5463388953b5d369a8896c0c   64778  VOIDTK3.SCI
8c9fd2c3aed88d7b19e02d851cf1677fc3e0a825951e58cf9255b28caa1c77dd  215852  KUVAT
cde116742665a23c7084f9493215df45f683e8fcea64a3dddf7b15346baa37e4   64778  REPO1.SCX
1523ef7c96deb06f04dcd081bc8c4a568f91955d735e2e8c4a29a385510cf9d2   64778  REPO3.SCX
df433e6949807c7ee2c490b72760ed9acc30be6f6756439158330200220bfafb  114368  KARMA.EXE
```

`SOWHAT.COM`, later Scene.org text and tiny distribution notes are archive
baggage rather than runtime inputs. The executable's literal path set accounts
for every file it actually opens.

## The Executable Is Already A Complete Relocatable MZ

There is no packer layer to mistake for the engine. The physical file size,
MZ declaration and entry point agree exactly:

```c
struct karma_mz {
    uint16_t magic;             // 5A4D
    uint16_t bytes_last_page;   // 00C0
    uint16_t pages;             // 00E0
    uint16_t relocations;       // 059C = 1436
    uint16_t header_paragraphs; // 0169 = 5776 bytes
    uint16_t min_alloc;         // 11D8 paragraphs
    uint16_t max_alloc;         // B1D8 paragraphs
    uint16_t ss;                // 285B
    uint16_t sp;                // 4000
    uint16_t ip;                // 0203
    uint16_t cs;                // 0000
};

declared_size = (0x00e0 - 1) * 512 + 0x00c0; // 114368
load_image    = 114368 - 0x1690;              // 108592
entry_file    = 0x1690 + 0x0000*16 + 0x0203; // 0x1893
```

The 1,436 relocation entries are also intact. Eight hundred and seventeen
target relative segment `143Eh`, the linked Borland runtime; the next largest
clusters target the I/O, MIDAS and demo-unit segments. That distribution is
consistent with Pascal units making far calls through a shared runtime, not a
post-unpack memory image with invented relocation metadata.

Useful segment bases follow the MZ rule directly:

```text
file(segment:offset) = 1690h + segment*10h + offset

00A0:0000 -> 2090h   first show controller/effect unit
00EE:006D -> 25DDh   packed-picture unit
0137:02AF -> 2CAFh   effect unit
01A2:0092 -> 3142h   effect unit
01DD:0890 -> 3CF0h   mesh/effect unit
04C1:02E7 -> 6587h   PALANEN mesh unit
0668:0447 -> 8157h   general H!V/animation unit
```

All offsets below are original-file offsets.

## Startup Builds Six Full-Segment Work Areas

The entry body first checks conventional memory, starts MIDAS, obtains a
module handle and then requests six `FFFFh`-byte heap blocks through the same
Borland allocator. Each returned far pointer is retained separately:

```asm
19E4  push FFFFh
19E6  call far 143E:10CCh
19EB  mov  [40E4h],ax
19EE  mov  [40E6h],dx
19F2  les  di,[40E4h]
19F6  mov  ax,es
19F8  mov  [40DAh],ax

19FB  push FFFFh
19FD  call far 143E:10CCh
1A02  mov  [40E8h],ax
1A05  mov  [40EAh],dx
1A09  les  di,[40E8h]
1A0D  mov  ax,es
1A0F  mov  [40DCh],ax

; four more identical allocations establish 40DEh, 40E0h,
; 40E2h and 40D2h as independently addressable segments
```

The roles become visible at their call sites: decoded pages, current and next
frames, streamed animation data, a texture/source page and lookup tables do
not alias one accidental 64 KiB arena.

The last segment receives a signed quotient table. Startup iterates numerator
`-128..127` and denominator `1..128`, stores two adjacent bytes per entry and
uses an address made from the biased numerator in the high byte:

```asm
1A74  mov  word [40BAh],-128       ; numerator
1A80  mov  word [40B8h],1          ; denominator
1A8C  mov  ax,[40BAh]
1A8F  shl  ax,8
1A92  cwd
1A93  idiv word [40B8h]
1A97  mov  [40BCh],ax

1A9A  mov  cl,[40BCh]
1AA2  mov  ax,[40B8h]
1AA5  dec  ax
1AA6  shl  ax,1
1AAA  mov  ax,[40BAh]
1AAD  add  ax,80h
1AB0  shl  ax,8
1AB5  mov  di,ax
1AB7  pop  es
1AB8  mov  es:[di],cl
```

The edge and span routines later index this table with a signed attribute
difference plus `80h` and a span length. It replaces a divide inside every
scanline setup with one lookup.

## Four RIX3 Files Need No Speculation

Each `.SCI`/`.SCX` file is exactly 64,778 bytes:

```c
struct Rix3Page {
    char     magic[4];      // "RIX3"
    uint16_t width;         // 320
    uint16_t height;        // 200
    uint16_t flags;         // 00AFh
    uint8_t  palette[768];  // 256 RGB triples, VGA 0..63 values
    uint8_t  pixels[64000];
};
```

The decoded pages use 17, 63, 85 and 232 palette indices respectively. The
font sheet is not merely a title image: its glyph row supplies the text
compositor. `REPO1` and `REPO3` are pre-rendered radial fields, while
`VOIDTK3` is the dense typographic texture used behind the portrait sequence.

![The four directly decoded RIX3 resources](images/karma-halcyon-rix-pages.png?v=deep-20260816)

The RIX loader is visible in the first show setup. It seeks past the ten-byte
header, reads `0300h` palette bytes, then reads `FA00h` bytes into a full page:

```asm
1D71  push 0000h
1D73  push 030Ah
1D76  call far 143E:459Dh       ; seek file to 10 + 768

1D80  mov  ax,[40E0h]           ; destination page segment
1D83  push ax
1D84  xor  di,di
1D86  pop  es
1D87  push es
1D88  push di
1D89  push FA00h                ; 64000 bytes
1D8C  xor  ax,ax
1D8E  push ax
1D8F  push ax
1D90  call far 143E:4531h       ; block read
```

## The Opening 4-Bit Expansion Is A Real Inner Loop

The first packed field is 160 by 100 bytes, each source byte holding four-bit
left and right pixels. The loop expands it to 320 by 200 while doubling each
source row vertically. The constants in the code make the dimensions exact:

```asm
1B8C  mov  es,[40DAh]           ; packed source
1B91  mov  ds,[40DCh]           ; expanded destination
1B95  xor  di,di                ; source offset
1B97  xor  si,si                ; destination offset
1B99  mov  dh,64h               ; 100 source rows
1B9B  mov  dl,50h               ; 80 source bytes per half-row

1B9D  mov  al,es:[di]
1BA0  mov  bl,al
1BA2  shr  bl,4
1BA5  add  bl,10h
1BA8  and  al,0Fh
1BAA  add  al,10h
1BAC  mov  ah,bl
1BAE  mov  bh,al
1BB0  mov  [si+2],ax
1BB3  mov  [si],bx
1BB5  mov  [si+142h],ax         ; same pair on next VGA row
1BB9  mov  [si+140h],bx
1BBD  add  si,4
1BC0  inc  di
1BC1  dec  dl
1BC3  jne  1B9Dh
1BC5  add  si,140h
1BC9  dec  dh
1BCB  jne  1B9Bh
```

The apparently odd two-word store order is intentional: high and low nibbles
become two doubled horizontal pixels. Adding `142h`/`140h` writes the same
four pixels one 320-byte scanline lower.

## `KUVAT` Is A 23-Record 4-Bit Picture Bank

The executable carries the complete frame-offset table at file `1A362h`:

```text
000000  008644  017608  026892  036176  046580  054504  067148
076432  085396  095320  103964  114688  118772  129496  138780
144064  153508  162952  172076  180960  192724  201528
```

Every record reaches the next offset by the same identity:

```c
struct KuvatRecord {
    uint16_t nominal_width;
    uint16_t height;
    uint8_t packed_pixels[(nominal_width >> 1) * height];
};

next = current + 4 + (nominal_width >> 1) * height;
```

The dimensions are not uniform. They range from `67x160` to `160x179`, with
the long side commonly fixed at 160. Odd nominal widths are legal because the
renderer deliberately shifts right and emits pairs; the low bit is ignored.

The display routine seeks by the embedded table, reads the two dimensions,
centres the result and expands each byte into palette indices `C8h..D7h`:

```asm
2813  mov  di,[1F08h]           ; selected picture 1..22
2817  shl  di,2
281A  push word [di+0300h]      ; offset high
281E  push word [di+02FEh]      ; offset low
2822  call far 143E:459Dh       ; seek
2837  call far 143E:4531h       ; read nominal width
284C  call far 143E:4531h       ; read height

28D8  mov  ax,[1F0Eh]
28DB  shr  ax,1                 ; packed bytes per row
28F4  mov  ax,[40DAh]
28F7  push ax
28F8  mov  di,[1F14h]
28FD  mov  al,es:[di]
2902  shr  ax,4
2905  add  ax,00C8h
2938  pop  ax
2939  mov  es:[di],al           ; high nibble -> right pixel

293C  mov  ax,[40DAh]
2945  mov  al,es:[di]
2948  and  al,0Fh
294C  add  ax,00C8h
2979  pop  ax
297A  mov  es:[di],al           ; low nibble -> left pixel
297D  inc  word [1F14h]
```

The picture choice is not sequential. Startup builds fourteen non-repeating
random integers drawn from `1..23`. During the part, every module row divisible
by 16 advances through that show list. The selected value is then clamped to
`1..22` before the offset lookup: record zero is unused, records 1 through 22
are addressable, and a raw value of 23 aliases record 22. This is a randomized
fourteen-step selection, not a full 23-record permutation, which explains why
the runtime jumps among portraits, diagrams and landscapes.

![Karma's packed image bank changing on the module clock](images/karma-halcyon-kuvat.gif?v=deep-20260816)

## `ANIMAATI` Is Twenty Streamed 4-Bit Frames

`ANIMAATI` has no per-frame header because its size is the index:

```text
160000 = 20 * 8000
  8000 = 160 * 100 / 2
```

Expanding high and low nibbles produces twenty coherent 160x100 greyscale
frames of a figure moving through an interior. The executable opens the file
once, keeps it live through the effect, and reads exactly `1F40h` bytes into
segment `[40E0h]` every eighth local frame:

```asm
9822  inc  word [3950h]
9826  cmp  word [3950h],8
982B  jne  986Ah

982D  mov  di,B5BCh             ; open Pascal file record
9832  mov  ax,[40E0h]           ; frame destination segment
9835  push ax
9836  xor  di,di
9838  pop  es
9839  push es
983A  push di
983B  push 1F40h                ; 8000 bytes
983E  xor  ax,ax
9840  push ax
9841  push ax
9842  call far 143E:4531h
9847  inc  word [3952h]
984B  cmp  word [3952h],14h     ; twenty frames
9850  jne  9865h
9852  mov  word [3952h],0
9857  ...
9860  call far 143E:459Dh       ; seek back to zero
```

The renderer therefore loops the authored animation rather than relying on
an emulator capture or on a slideshow assembled for this page.

![The streamed 20-frame ANIMAATI sequence](images/karma-halcyon-animaati.gif?v=deep-20260816)

## H!V Is A Six-Byte Header Followed By Plain Triangles

All six object files satisfy one exact format:

```c
struct HivObject {
    uint16_t magic;                  // 0148h: bytes 48 01
    uint16_t vertex_count;
    uint16_t face_count;
    int16_t  vertex[vertex_count][3];
    uint16_t face[face_count][3];
};

file_size = 6 + vertex_count*6 + face_count*6;
```

The loader checks the first byte for `48h`, reads both counts, decrements them
to Pascal-style terminal indices, then performs three word reads per vertex
and per face. The recovered objects are:

```text
object       vertices  faces  signed coordinate bounds (x / y / z)
HALC              158    146  -1400..1400 / -375..375 /       0..0
KARMA             152    144  -1401..1400 / -353..353 /       0..0
PAL1              247    484   -575..575  / -555..554 / -1401..1400
PAL2              247    484   -575..575  / -555..554 / -1401..1400
PALANEN            20     20  -1400..1400 / -318..332 / -1313..1313
UUSLOKO           288    576  -1402..1400 / -445..444 / -1394..1394
```

`HALC` and `KARMA` are flat logo meshes. `PAL1` and `PAL2` share geometry but
can be shaded/textured independently. `PALANEN` is the tiny polyhedral form;
`UUSLOKO` is the dense final object. Every triangle index is within its
declared vertex count.

The generic loader's opening checks are direct:

```asm
38F0  lea  di,[bp-86h]
38F4  push ss
38F5  push di
38F6  push 1
38FA  push 0
38FB  push 0
38FC  call far 143E:4531h       ; read one byte
3901  cmp  byte [bp-86h],48h
3906  je   3925h
        ; otherwise emit "not valid H!V file" and terminate

3925  ...
3936  call far 143E:4531h       ; consume second magic byte
394B  call far 143E:4531h       ; vertex count
3950  dec  word [B526h]
3964  call far 143E:4531h       ; face count
3969  dec  word [B528h]
```

## Matrix Transform Uses The High Word As Fixed-Point Output

The larger object unit constructs a nine-element matrix, then transforms each
signed vertex with three dot products. Each product is accumulated as 32 bits,
doubled once and reduced to the high word:

```asm
9257  mov  di,[3942h]           ; source vertex byte offset
925B  add  di,40F8h
925F  mov  ax,[di]              ; x
9264  mov  si,[di+2]            ; y
9269  mov  di,[di+4]            ; z

926B  mov  [B544h],ax
926E  mov  ax,[B586h]           ; m00
9271  imul word [B544h]
9275  mov  cx,ax
9277  mov  bx,dx
9279  mov  ax,[B588h]           ; m01
927C  imul si
927E  add  cx,ax
9280  adc  bx,dx
9282  mov  ax,[B58Ah]           ; m02
9285  imul di
9287  add  cx,ax
9289  adc  bx,dx
928B  add  cx,cx
928D  adc  bx,bx
928F  mov  [B5B6h],bx           ; transformed x = high word

; the same shape with B58C..B590 and B592..B596 yields y and z
```

In reconstructed form:

```c
out.x = high16(2 * (m00*x + m01*y + m02*z));
out.y = high16(2 * (m10*x + m11*y + m12*z));
out.z = high16(2 * (m20*x + m21*y + m22*z));
```

This is a fixed-point matrix path: no Borland floating-point helper is called
inside the per-vertex dot products.

## Back-Face Test Is A Signed 32-Bit Cross Product

Function `3460h` receives three projected points and evaluates the screen-space
orientation without truncating either multiplication:

```asm
3464  mov  ax,[bp+0Eh]          ; y2
3467  sub  ax,[bp+0Ah]          ; y2-y0
346B  mov  ax,[bp+04h]          ; x0
346E  sub  ax,[bp+08h]          ; x0-x1
3474  imul dx                   ; A=(y2-y0)*(x0-x1)
3476  mov  [bp-06h],ax
3479  mov  [bp-04h],dx

347C  mov  ax,[bp+0Ch]          ; x2
347F  sub  ax,[bp+08h]          ; x2-x1
3483  mov  ax,[bp+06h]          ; y1
3486  sub  ax,[bp+0Ah]          ; y1-y0
348C  imul dx                   ; B=(x2-x1)*(y1-y0)
3494  mov  ax,[bp-06h]
3497  mov  dx,[bp-04h]
349A  sub  ax,[bp-0Ah]
349D  sbb  dx,[bp-08h]          ; signed 32-bit A-B
34A0  cmp  dx,0
```

Only a strictly positive result survives. Degenerate and reverse-wound faces
are removed before sorting and rasterization.

## Visible Faces Are Sorted By A Stable 13-Bit Radix Pass

The face list at `A200h` stores four-byte records with a depth/key word. The
sort routine partitions the array into two scratch lists for each bit from
`0001h` through `1000h`, concatenates zero-bit records before one-bit records,
then advances to the next bit:

```asm
34C3  mov  dx,0001h
34C6  lea  si,[BC50h]           ; zero bucket
34CA  lea  di,[C558h]           ; one bucket
34CE  lea  bx,[A200h]           ; source face records
34D2  mov  cx,[bp+4]

34D5  mov  eax,[bx]
34D8  add  bx,4
34DB  test ax,dx
34DD  jne  34E8h
34DF  mov  [si],eax
34E2  add  si,4
34E5  jmp  34EEh
34E8  mov  [di],eax
34EB  add  di,4
34EE  dec  cx
34EF  jne  34D5h

34FC  mov  si,BC50h
34FF  mov  di,A200h
3507  rep movsd                  ; concatenate zero bucket
350A  mov  si,C558h
3512  rep movsd                  ; concatenate one bucket
3515  shl  dx,1
3517  cmp  dx,2000h
351B  jne  34C6h
```

Thirteen stable passes sort the low 13 bits. The engine pays predictable
linear work per bit instead of using a comparison-heavy quicksort on every
frame.

## Edge Walking Produces X And Two Attributes Per Scanline

The edge routine at `3521h` orders the endpoints by y, calculates a 16.16 x
step with one 32-bit signed divide, and obtains two byte-attribute steps from
the startup quotient table:

```asm
354D  sub  cx,bx                ; dy
3552  add  bx,bx
3554  add  bx,bx
3556  lea  si,[D7C6h+bx]        ; first scanline record
355C  jcxz 35ACh
355E  push ax                   ; x0
355F  sub  dx,ax                ; x1-x0
3563  shl  eax,16
3567  cdq
3569  idiv ecx                  ; dx/dy in 16.16
356C  mov  edx,eax
356F  shr  edx,16

357D  mov  bh,[bp+8]
3580  sub  bh,[bp+0Ah]          ; attribute delta
3587  add  bh,80h
358A  mov  bx,es:[bx]           ; quotient lookup
3592  mov  cs:[0199h],bx        ; patch/add step
```

Each iteration stores a left or right x plus the two interpolants, adds the
fractional x step and propagates its carry into the integer coordinate. Three
calls cover the triangle's three edges after `360Bh` clears the relevant rows
to `8000h` sentinels.

## The Texture Span Emits Two Pixels Per Iteration

The triangle routine clips y to `0..199`, clips x to `0..319`, swaps the two
edge endpoints when necessary, derives per-span texture increments from the
same quotient table and writes to the conventional backbuffer. Its hot path
is explicitly paired:

```asm
37B2  mov  es,[EDBCh]           ; destination page segment
37B6  mov  ds,[BC44h]           ; texture segment
37BA  add  si,di                ; scanline base + left x
37BC  mov  ax,si
37BE  xor  esi,esi
37C1  mov  si,ax                ; ESI keeps destination in low word

37C3  mov  ax,[bp-0Eh]          ; one interpolant step
37C6  mov  cx,[bp-0Eh]
37C9  shl  ecx,24
37CD  mov  cx,[bp-0Ch]          ; second interpolant step
37D0  sar  cx,8
37D3  xor  ebx,ebx
37D6  mov  bx,dx                ; packed source coordinate
37D8  mov  dh,[bp-0Ch]
37DB  shl  edx,16

382E  add  esi,ebp              ; advance destination/fraction state
3831  adc  ebx,ecx              ; advance packed source coordinate
3834  adc  bh,dh
3836  mov  al,[bx]              ; texture sample 0
3838  add  esi,ebp
383B  adc  ebx,ecx
383E  adc  bh,dh
3840  mov  ah,[bx]              ; texture sample 1
3842  mov  es:[si],ax           ; store both pixels
3845  dec  dl
3847  jne  382Eh
```

Separate odd-pixel branches handle left and right remainders. The central
loop has two source reads and one word store for every two pixels; there is no
per-pixel divide and no bounds branch after span setup.

![The paired-pixel texture mapper on the late composite object](images/karma-halcyon-composite.gif?v=deep-20260816)

## The S3M Is Both Soundtrack And Clock

`GA.S3M` parses as a normal Scream Tracker 3 module:

```text
title             gyrdh adblah
orders            34 (32 playable entries, then FF FF)
instruments       23 samples
patterns          22
active channels   9
global volume     64
initial speed     6
initial tempo     157
master byte       30h
```

The order list is:

```text
07 07 08 00 00 01 03 02 02 17 04 05 06 09 11 10 13
12 12 21 12 14 16 18 19 20 20 20 20 05 06 15 FF FF
```

The patterns contain 342 volume slides, 32 retriggers, seven speed commands,
five sample-offset commands, two pattern breaks and one tempo command. Those
are music effects; visual scheduling reads the live MIDAS state separately.

The main body repeatedly calls the module object's virtual update/query
method through `[es:di+28h]`, then reads two words:

```text
[module+08h]  current order
[module+0Ch]  current row
```

The top-level gates are literal:

```asm
1C79  lea  di,[40C6h]
1C7E  les  di,[40CAh]
1C82  call far es:[di+28h]
1C86  les  di,[40C6h]
1C8A  cmp  word es:[di+8],5
1C8F  jae  1C94h                ; leave opening at order 5

1ED9  lea  di,[40C6h]
1EDE  les  di,[40CAh]
1EE2  call far es:[di+28h]
1EE6  les  di,[40C6h]
1EEA  cmp  word es:[di+8],19h
1EEF  jae  1EF4h                ; next boundary at order 25

29C0  lea  di,[40C6h]
29C5  les  di,[40CAh]
29C9  call far es:[di+28h]
29CD  les  di,[40C6h]
29D1  mov  ax,es:[di+8]
29D5  cmp  ax,[bp+6]
29D8  jb   2750h                ; KUVAT caller supplies order 31
```

This is why a run whose music state stops changing can leave a perfectly
animated object on screen forever: local geometry still advances, but the
outer function cannot cross its order threshold.

## Runtime-To-Code Concordance

The direct runs line up with the recovered paths:

```text
runtime state                    code/resource evidence
purple radial opening            REPO RIX pages + nibble expansion + DAC blends
rapid portrait/diagram changes   KUVAT offset table + row%16 selection
flat HALCYON/KARMA forms          zero-z H!V logo geometry
solid polyhedral form             PALANEN, 20 vertices / 20 faces
paired rounded meshes             PAL1/PAL2, 247 vertices / 484 faces each
moving interior footage           ANIMAATI, twenty streamed 8000-byte frames
dense late spiral/composite       UUSLOKO, 288 vertices / 576 faces
continued motion at stalled gate  local matrix loop continues; MIDAS order does not
```

![Karma's radial and typographic transitions](images/karma-halcyon-radial.gif?v=deep-20260816)

## Runtime Capture

The usable media comes from DOSBox-X `2026.01.02`, commit `59915c1`, on 16
August 2026. The second run used `vgaonly`, a dynamic 486 core at `max 95%`,
16 MiB emulated RAM, XMS/EMS/UMB and a classic GUS at port `240h`, IRQ 5, DMA
3. SDL's dummy driver kept the guest timer/player path alive without sending
audio to the host. FFmpeg captured the X11 root at 15 fps as FFV1 video only;
the published GIFs are cropped to the 640x400 DOSBox surface, restored to
native 320x200 and have the stationary X cursor removed.

The timestamps below are capture-stream times, including emulator startup,
not positions claimed from a public video:

```text
about 00:20  radial word field
about 00:42  packed ANIMAATI/interior layer enters
about 01:09  striped geometric tunnel/mesh
about 01:27  KUVAT picture sequence
about 01:45  dotted eye field
about 01:55  diffuse radial transition
about 02:10  late textured sphere/spiral composite begins
```

The dynamic run was retained for 303.381 seconds and stopped manually after
the late composite persisted. The conservative run was retained for 702.267
seconds and behaved the same way. This is a bounded full-sequence observation,
not a claim that the GUS configuration returned normally. The repeated result
and the literal MIDAS order/row tests explain the boundary more narrowly than
calling it a generic emulator crash.

## What The Code Says About Karma

Karma's cohesion comes from reuse at the right level. The effects share a
mode-13h backbuffer, palette interpolators, MIDAS order/row clock, signed
fixed-point matrix machinery, a stable depth sorter and one carefully packed
triangle rasterizer. The separate data files are not an incoherent pile:
RIX3 pages establish palettes and textures, H!V files provide indexed meshes,
`KUVAT` supplies clocked four-bit cut-outs, and `ANIMAATI` is streamed as a
small looping movie.

The most revealing inner loop is the affine span writer. Its lookup-derived
steps, 32-bit carries, paired texture reads and word framebuffer store explain
how a 16-bit Pascal demo can keep several textured objects moving without a
divide at every pixel. The late composite is not a prerendered sequence; it is
the direct result of that mesh, sort, edge and span pipeline.
