Analysis model: gpt-5.5 xhigh
Reanimator by RAGE PC - Technical Dissection
Scope
This is a binary and complete-visual-sequence dissection of Reanimator by
RAGE PC, released for MS-DOS at The Party 1995. The official The Party 1995
results list RAGE in third place in the PC demo competition. Demozoo and the
shipped text identify the production as Reanimator.
Public references:
- Demozoo production: https://demozoo.org/productions/7639/
- Demozoo individual records: Digimatic (Sweden), Fajser (Sweden), Foxx (Sweden), and Nadir (Sweden)
- Scene.org final archive: https://archive.scene.org/pub/parties/1995/theparty95/demo/reanim_f.zip
- Scene.org party archive: https://archive.scene.org/pub/parties/1995/theparty95/demo/reanim8r.zip
- Scene.org group mirror: https://archive.scene.org/pub/demos/groups/rage/rage_reanim8r.zip
- The Party 1995 result file: https://archive.scene.org/pub/parties/1995/theparty95/info/results.txt
Verified Production Credits
The complete structured production ledger names four people. Digimatic,
Foxx, and Nadir
are credited for code, with Foxx also credited for graphics; Fajser
is credited for music. Every individual record identifies Sweden. The shipped
text's RAGE PC group credit and the party result support that ledger, but do
not replace the individual checks.
The examined target is the final archive, reanim_f.zip. The group mirror
contains the same final executable and text file; the party archive has a
slightly older executable. Both are PMODE/W v1.21 protected-mode programs. I
flattened the final PMW1 payload and inspected the flat image with targeted
disassembly.
This is not a source reconstruction. The notes below identify loader shape,
runtime services, object-pipeline dataflow, and the main scanline loops, but
they do not fully decode city.key, all raw asset formats, or every face-stream
opcode.
Offset notation:
REANIM8R.EXE+0x...means a file offset in the released executable.flat+0x...means an address in the flattened PMODE/W image.- Plain addresses such as
0x27649refer to the flattened image. A0000,3DAh,3C8h, and3C9hare VGA addresses or ports.
Examined Files
Final archive:
e12d15311090cd87a5dad107e05188e2b4934f42d9a8701228c4b2f38c9f773e reanim_f.zip
76d75fbebd6d8a08ec0263903454a17d85706cf643e15f9b992e871f5de64c3b REANIM8R.EXE
f54b761a0b7bf008a0976aea6d51c89ee575b0a667e266f6fc5a187d8a6b119a REANIM8R.TXT
8a51beb9fe9a48410d1cdc5d28a519ae90d317e7f429803c128efcfb781c361b REANIM8R.EXE.FLAT
Party archive:
c9e9f47af1c6148a498220e6722f1bbe674525d23c6cb479c6b5c4d042619cd3 reanim8r.zip
d77221b067df4fe79db645985d3d1575b867373b38b86e19fb5e43f20f9add71 party REANIM8R.EXE
6bd9c97706f7a5b7c52d50b82c0e3f24fbdc93be5d0ad22cfdea8a0e597a9389 FILE_ID.DIZ
c0412c1a44734ce95e298699c5ebae041ad81164acd03b2286baea2f00555a3b party REANIM8R.EXE.FLAT
Group mirror archive:
c1ff8f2ba0998196dfb72e44c5f784c10526ee1103c847770f1188f0c40900b3 rage_reanim8r.zip
The final archive contains only:
REANIM8R.EXE 4,044,880 bytes
REANIM8R.TXT 508 bytes
The text file says this is the final release, credits RAGE PC, states that the
demo placed third at The Party V in Fredericia, and gives a practical
compatibility hint: if it has problems, try the /o switch and avoid EMS.
Demozoo's individual ledger assigns code to Digimatic, Foxx and Nadir, graphics to Foxx, and music to Fajser. All four individual records identify Sweden.
Competition Placement
The relevant The Party 1995 result section is:
PC DEMO
1 1546 5 Plant & EMF
2 508 4 Jamm
3 448 19 RAGE
That gives the group placement rather than the production title. Demozoo and
the release archive connect the RAGE entry to Reanimator.
Complete Visual Sequence
Demozoo catalogues a 440.32-second full public reference for the final release. This pass selected its video-only stream; no audio format or audio stream was selected, downloaded, decoded or embedded. The temporary source is not a site asset. Each image below is a continuous six-second 400x300, 12 fps excerpt, not a screenshot slideshow.



The opening immediately establishes that this is not merely a succession of flat title cards. It moves a camera through a constructed industrial space, then cuts through composited footage and typography before reaching the skull identity scene.


These two excerpts expose different object paths. The knot retains a hard, recognisable surface while rotating; the blue object changes silhouette and surface relief as it turns.

The moving room clip establishes the animation; this companion frame makes the checker-floor depth, two opening eye spheres, and wall lettering readable at once:


The room demonstrates a whole textured environment, depth-scaled props and animated openings rather than a single object over a backdrop. The reflective organic object then makes a different material path visible through moving highlights.



The late section is a sustained city fly-through. The second excerpt is not a duplicate angle: it records the authored billboard transition while the camera continues past separate building geometry.
Executable Shape
The final executable is an MZ program whose real-mode body is the PMODE/W loader:
file size: 4,044,880 bytes
MZ image size: 9,808 bytes
header size: 64 bytes
relocations: 0
initial CS:IP: 0000:0059
initial SS:SP: 0344:0100
PMODE/W marker: REANIM8R.EXE+0x2650 ("PMW1")
Flattening the PMW1 payload produced:
flat size: 2,001,104 bytes
entry point: 0x00020714
stack pointer: 0x001fa4d0
The party executable has the same MZ/PMODE/W loader shape, the same PMW1
offset, and a close but not identical flat image:
party file size: 4,040,989 bytes
party entry point: 0x00020808
party stack pointer: 0x001f9dd0
The final binary contains the PMODE/W identification string for v1.21 and the Watcom C/C++32 runtime copyright string. That matches the code shape: a Watcom protected-mode program with large C-level setup around hand-tuned inner loops.
The flattener reported unsupported relocation types 8 and one type 6.
Those warnings mean some indirect pointers should be treated cautiously. The
low renderer and object loops discussed below are direct code observations and
do not depend on fully typed relocation metadata.
Runtime Strings And Assets
Important flat-image strings:
0x020715 WATCOM C/C++32 Run-Time system
0x1100a4 Usage: REANIM8R [switches]
0x110128 FPU required message
0x11016c reanim8r.exe
0x110194 darkback.raw
0x1101b0 REANIMATOR (C) 1995,1996 RAGE
0x110204 GUS driver error
0x110225 Music error
0x1102f4 Loader-data-file not found
0x110358 rgpcback.raw
0x110368 fla.raw
0x11037c reaback.raw
0x110394 tunnel.raw
0x1103ac ragebord.raw
0x1103fa p@meltback.raw
0x110484 alfamap.raw
0x110490 ragemap.raw
0x1104b0 marsmaps.raw
0x110600 code.raw
0x11060c gfxmus.raw
0x110624 blobmap.raw
0x11067a ?floor1.raw
0x110687 wall1.raw
0x1106a6 tvset.raw
0x1106b0 ragepic.raw
0x1106bc winbar.raw
0x1106c7 outerw.raw
0x1106d2 outerw1.raw
0x1106de outerbri.raw
0x1106eb house2a.raw
0x1106f7 bridwall.raw
0x110704 pave1.raw
0x11070e sidewalk.raw
0x11071b bridwal1.raw
0x110728 house3a.raw
0x110734 house3b.raw
0x110740 house3c.raw
0x11074c roof.raw
0x110755 house3d.raw
0x110761 house4a.raw
0x11076d house4b.raw
0x110779 ragepc.raw
0x110784 cistern.raw
0x110790 house4c.raw
0x11079c house4d.raw
0x1107a8 theatre.raw
0x1107b4 theatr2.raw
0x1107c0 reani.raw
0x1107ca thearoof.raw
0x1107d7 reani2.raw
0x1107e2 theapol.raw
0x1107ee theapol2.raw
0x1107fb railbrid.raw
0x110808 railtop.raw
0x110814 railbott.raw
0x110821 traifrnt.raw
0x11082e traisky.raw
0x11083a traibdy.raw
0x110846 traibdy2.raw
0x110853 traiwh.raw
0x11085e arrow.raw
0x110868 arrow2.raw
0x110873 arrow3.raw
0x11087e brisup.raw
0x110889 drain.raw
0x110893 pave2.raw
0x11089d railsup.raw
0x1108a9 cinemafl.raw
0x1108b6 cinewal1.raw
0x1108c3 cinewal2.raw
0x1108d0 cinewall.raw
0x1108dd cinewal3.raw
0x1108ea cinewal4.raw
0x1108f7 cinesmfl.raw
0x110904 palette.bin
0x110974 reanimator title text
0x111fb0 MikMod no-sound driver
0x111fec Gravis Ultrasound
0x11204b ULTRASND
0x1121a8 Sound Blaster driver
0x1121fc BLASTER
The resource names are the first important architectural clue. This is not just a sequence of isolated full-screen effects. The asset set strongly suggests a large city/theatre/railway scene, texture maps, palette tables, title/backdrop images, masks, and module/sound support. The code confirms that: there is a general object pipeline, face compiler, sorted painter, and several polygon fillers.
The executable also contains CPU strings for 80386, 80486, Pentium, and Pentium
Pro. The startup messages require an FPU and at least 8 MB of memory. The sound
strings identify MikMod no-sound, Gravis UltraSound, and Sound Blaster paths,
with environment-variable probing through ULTRASND and BLASTER.
High-Level Runtime Shape
The useful low-level code begins around 0x10fc0. The full startup around the
Watcom entry is large and library-heavy, but the demo path has this rough shape:
- PMODE/W enters 32-bit protected mode.
- Watcom runtime initializes memory, stack, and C library state.
- The demo checks CPU/FPU/memory and command-line switches such as
/o. - Sound setup selects no sound, GUS, or Sound Blaster via MikMod-style drivers.
- Resource loading resolves raw image, texture, palette, module, and city data.
- Per-frame code updates transforms/effect state, writes into a 320x200 software framebuffer, waits for retrace, and copies 64,000 bytes to VGA.
The render code uses global buffers rather than passing everything through a clean C object model. Important globals:
0x148e48 pointer to the 320x200 software framebuffer
0x197eb0 pointer/base for transformed 3D vertex records
0x197eb4 pointer/base for compact 3D vector/aux records
0x197eb8 pointer/base for compiled face records
0x197ebc pointer/base for face sort pairs
0x197ecc scene min depth accumulator
0x197ed0 scene max depth accumulator
0x197ed8 projection center x
0x197edc projection center y
0x197fa8 active polygon top scanline
0x197fac active polygon bottom scanline
0x1adc90 clear/copy mode flag
0x1adc94 source pointer for backdrop copy
0x1adc98 clear color byte
0x1adcac visible/compiled face count
0x1adcb0 transformed vertex count
0x1b5ce0 polygon edge/span table
0x1bf950 current camera/render-state pointer
The record layout is partially reconstructed from use:
transformed vertex, 32-byte stride at [0x197eb0]:
+0x00 transformed x
+0x04 transformed y
+0x08 transformed z/depth
+0x0c projected screen x, word
+0x0e projected screen y, word
+0x10 clip/outcode flags
+0x14 optional second transformed x
+0x18 optional second transformed y
+0x1c optional second transformed z
face record, 0xdc-byte stride at [0x197eb8]:
+0x00 vertex count
+0x04 first copied/projected vertex payload
+0xcc material/render descriptor pointer
+0xd0 optional compact aux pointer
+0xd4 depth/sort value
+0xd8 face/object flags pointer
The exact semantic names of every field are inferred, but the strides, buffers, and field offsets are direct observations from address arithmetic.
Framebuffer, Clear, And Flip
0x10fc0: clear or backdrop copy
This helper prepares the 64,000-byte software framebuffer. It has two modes:
10fc3: cmp dword [0x1adc90],0
10fcc: mov al,[0x1adc98]
10fdd: mov edi,[0x148e48]
10fe3: mov ecx,0x3e80
10fe8: rep stosd
...
10fee: mov ecx,0x3e80
10ff3: mov edi,[0x148e48]
10ff9: mov esi,[0x1adc94]
11000: rep movsd
0x3e80 dwords is 16000 * 4 = 64000 bytes. If [0x1adc90] is zero, the
byte in [0x1adc98] is replicated into all four bytes of EAX and the
framebuffer is filled with a flat color. Otherwise the code copies 64,000 bytes
from [0x1adc94] into the framebuffer. That second path is a full-screen
backdrop restore, useful when a part draws moving objects over a pre-rendered or
decompressed background.
0x11006: copy framebuffer to VGA
The visible flip is the simplest possible Mode 13h-style copy:
1100b: mov esi,[0x148e48]
11012: mov edi,0xa0000
11017: mov ecx,0x3e80
1101c: rep movsd
Again the count is 64,000 bytes. There is no page flipping here: the engine renders to system memory, waits for retrace, and copies into VGA A0000.
0x11024: retrace wait
The vertical sync helper uses the standard VGA input-status register at 3DAh:
11025: mov dx,0x3da
11029: in al,dx
1102a: test al,0x8
1102c: jne 0x11029
1102e: in al,dx
1102f: test al,0x8
11031: je 0x1102e
The first loop waits until the current retrace bit clears. The second waits until the next retrace begins. That avoids copying halfway through an already active retrace window.
Trig And Matrix Helpers
Two compact trig-table helpers appear immediately after the VGA copy code:
11038: and ah,0xf
1103b: and eax,0xffff
11040: mov ax,[eax*2+0x113780]
and:
11051: mov gs,[0x115f86]
11057: and eax,0xffff
1105c: mov ebx,[0x115f82]
11062: lea edx,[eax*2]
11069: mov ax,gs:[edx+ebx]
The first is a direct local lookup into a 16-bit table at 0x113780; the second
uses a protected-mode selector and base. Both mask to a 16-bit phase and return
a signed 16-bit table value in AX.
Matrix builders later in the image use fixed-point constants around 0x100 and
table lookups to build rotation rows. The hot vertex loops do not call FPU
instructions; they use integer imul and shifts. The FPU requirement is still
real, but it appears tied to setup, interpolation, camera/state math, and
library code rather than the innermost scanline or transform loops.
Object Transform Loop
0x11074: main fixed-point vertex transform
0x11074 is the main per-object transform routine. It takes a source object
descriptor in EAX and a transform/matrix pointer in EDX. It appends
transformed vertices to the global 32-byte vertex buffer at [0x197eb0],
starting at vertex_count * 32, where the count lives in [0x1adcb0].
The input stream is 16-bit-ish packed coordinate data. A source word value of
0x8000 terminates the stream. The routine has two paths:
- one path transforms a primary vertex stream and an optional second stream;
- one path transforms only the primary stream.
The matrix math is all fixed-point. The repeating pattern is:
dst.x = ((src.x * m00) + (src.y * m01) + (src.z * m02)) >> 8 + tx
dst.y = ((src.x * m10) + (src.y * m11) + (src.z * m12)) >> 8 + ty
dst.z = ((src.x * m20) + (src.y * m21) + (src.z * m22)) >> 8 + tz
The exact source-component packing is awkward because some values are read from
high words and some from signed words, but the arithmetic shape is a 3x3 matrix
multiply plus translation. The >> 8 shift reveals 8.8-ish fixed-point matrix
terms.
The important loop properties:
source sentinel: 0x8000
output stride: 32 bytes
count global: [0x1adcb0]
output base: [0x197eb0]
primary output: +0x00, +0x04, +0x08
secondary output:+0x14, +0x18, +0x1c
The routine writes the updated vertex count back to [0x1adcb0] before
returning. Calls around 0x2356d, 0x23659, and 0x23729 show it sitting
inside a hierarchical object path: those callers prepare transform state, then
append transformed vertices and auxiliary vectors.
0x11284 and 0x11360: compact auxiliary transforms
0x11284 is a companion loop that writes 12-byte transformed triples into the
compact buffer at [0x197eb4]. It uses the same sentinel concept and the same
fixed-point matrix rows, but its output stride is 12 bytes rather than 32. This
looks like transformed normals, control vectors, or auxiliary points used by
face commands.
0x11360 is a reduced variant that writes only one transformed coordinate into
that same compact-buffer stride. This is likely for depth/normal-only cases
where a full transformed triplet is unnecessary.
The practical point is that Reanimator avoids recomputing object-space data inside the polygon loops. It transforms all needed coordinates into shared linear buffers first, then later face-stream code references those buffers.
Projection And Clip Codes
0x25434: perspective projection
0x25434 walks the transformed 32-byte records and computes screen
coordinates:
25458: test byte [ebx+0x10],0x1
2545e: mov edx,[ebx+0x00]
25460: shl edx,8
25468: idiv dword [ebx+0x08]
2546e: add eax,edi
25473: mov [ebx+0x0c],ax
25477: mov eax,edx_for_y
2547c: idiv dword [ebx+0x08]
25481: sub edx,eax
25483: mov [ebx+0x0e],dx
In clearer form:
if (!(flags & 1)) {
screen_x = center_x + ((x << 8) / z);
screen_y = center_y - ((y << 8) / z);
}
The center comes from [0x197ed8] and [0x197edc]. The routine skips vertices
whose low clip flag is already set, which avoids a division by near-plane or
invalid depth.
0x254a8: forced-depth projection
0x254a8 performs the same screen-coordinate calculation, but divides by an
input ESI instead of each vertex's own z. That makes it an orthographic-ish
or forced-projection-plane variant for special cases.
0x25510: frustum outcode
0x25510 takes x, y, and z in registers and returns a bitmask in AL.
The first and last bits are easy to name:
bit 0: z < 0x1e near plane
bit 5: z > far value far plane, from [0x1bf950+0xfc]
The middle bits compare scaled x/y values against constants derived from z:
25519: cmp ebx,0x1e
2551e: mov al,0x1 ; near flag
...
25533: shl edx,0x9 ; y scaled by 512
25536: cmp ecx,edx
2553a: or al,0x2
...
25551: add edx,edx
25553: cmp edx,esi
25557: or al,0x4
...
25572: cmp ecx,edx
25576: or al,0x10
...
25591: cmp edx,edi
25595: or al,0x8
...
2559d: cmp ebx,[state+0xfc]
255a5: or al,0x20
Those are frustum side-plane tests. The constants are formed with multiply-free
lea, shl, add, and sub sequences, so the loop avoids table lookups and
division. 0x255ac applies this to all transformed vertices and stores the
lower five bits at vertex record +0x10.
Face Stream Compiler
0x24de4: command stream to face records
0x24de4 is not a pixel drawer. It is a face/command compiler. It parses a
16-bit command stream ending at opcode 0xffff, gathers transformed vertices,
does visibility checks, and emits 0xdc-byte face records into [0x197eb8].
Observed behavior:
- It reads 16-bit opcodes and indices.
0xffffterminates the stream.- It calls
0x25510repeatedly to compute or combine clip masks. - Several cases compute dot products with transformed normals or points.
- A face becomes visible only if its local visibility flag remains nonzero.
- The visible face count is
[0x1adcac]. - Each accepted face advances the output pointer by
0xdc. - The final face-record base and transformed-vertex base are written back to
[0x197eb8]and[0x197eb0].
The important depth/visibility pattern near the end is:
253f3: cmp dword [esp+0x50],0
253f8: je skip_face
253fa: mov edi,[0x1adcac]
25404: inc edi
25405: add edx,0xdc
2540b: mov [0x1adcac],edi
...
25415: cmp word [ebx],0xffff
25419: jne next_opcode
Several command paths copy projected vertices into the face record at 0x28-byte-per-vertex stride. That 0x28 stride is what the later polygon setup and clipping routines consume.
0x256b0 and 0x255f8: depth sorting
After face compilation, 0x256b0 builds a list of pairs in [0x197ebc]:
sort_pair {
uint32_t face_index;
int32_t depth;
}
It reads each face record's depth at face + 0xd4, writes (index, depth),
then calls 0x339d0, which behaves like a sorting routine. It also updates
scene min/max depth globals at [0x197ecc] and [0x197ed0].
The code has three nearly identical modes selected by byte [0x1bf950+0x28].
The repeated shape strongly suggests different painter ordering policies or
scene modes, not three unrelated algorithms.
0x25a60: sorted face dispatch
0x25a60 walks the sorted face list and dispatches each visible face to a
material-specific draw function:
25a7f: mov eax,[0x197ebc]
25a84: mov eax,[eax+ebp] ; sorted face index
25a8b: imul edi,eax,0xdc
25a96: add edi,[0x197eb8] ; face record
...
25b82: mov eax,[edi+0xcc] ; material/render descriptor
25b8e: push 0
25b98: lea edx,[edi+0x04] ; vertex payload
25b9b: mov ecx,[edi+0xd0] ; aux payload
25ba1: call [esi+0x28] ; render callback
Before the call, it performs a screen-space cross-product/backface test unless a
material flag bypasses it. It also clamps or scales per-vertex texture/light
coordinates against descriptor dimensions at [material+0x18] and
[material+0x1c].
The important architectural point is that face drawing is indirect. The object compiler produces generic face records; material descriptors choose the actual span routine.
Edge Table And Polygon Setup
The polygon code uses an edge table at 0x1b5ce0. Each scanline consumes a
200-byte row (0xc8) in that table, not a compact 200-row array of tiny
records. The row has room for left and right x plus interpolants such as
texture coordinates or intensity.
0x26ec8: clear edge table
The edge clear routine clamps the active scanline range, then seeds left-edge entries with a large positive value:
26efb: shl eax,0x3
26f05: add eax,0x1b5ce0
26f0a: add eax,0xc8
26f0f: mov [eax-0xbc],0x7fff
26f17: mov [eax-0xc8],0x7fff
26f1d: dec edx
26f20: jg 0x26f0a
The active top/bottom globals are then reset:
[0x197fa8] = 0xc7
[0x197fac] = 0
That inverted initial range means later edge insertion can tighten top and bottom as it sees real polygon edges.
0x26f3c: x-only edge insertion
0x26f3c takes an edge with endpoints (x0,y0) and (x1,y1), clips it to
the 0..200 scanline range, computes a fixed-point x step, and updates left and
right x in the edge table.
The inner row update is:
26ff1: mov eax,ecx
26ff3: mov ebp,[edx] ; current left x
26ff5: sar eax,8 ; current edge x
26ff8: cmp eax,ebp
26ffa: jge right_side
26ffd: mov [edx+0x0c],ebp ; old left becomes right
27000: mov [edx],eax ; new left
...
27005: mov [edx+0x0c],eax ; right
27008: add edx,0xc8 ; next scanline row
2700e: add ecx,edi ; x += dxdy
This is the classic triangle-fill setup: each edge updates one scanline row, and the later span loop draws from table left to table right.
0x27760: edge insertion with one extra interpolant
0x27760 extends the x-only edge insertion with an extra value. It writes not
only left/right x, but also per-side interpolant values at row offsets
+0x18 and +0x1c. The flat/gouraud span writer at 0x278ac consumes those
values as intensities.
0x270c8 and related code: multi-attribute edge insertion
The larger setup routines around 0x270c8 carry x plus two additional
attributes through the edge table. They do the same y clipping and dx/dy
division, but also interpolate two values as edges are inserted. The textured
span loop at 0x27649 consumes those as texture coordinates and lookup-table
inputs.
Inner Loop: Textured Span With Remap Table
0x27649: row walker and clipped span setup
This is one of the most important hot loops in the demo. It draws a polygon
from the edge table into the software framebuffer. At entry, the active
scanline range is [0x197fa8]..[0x197fac]. The code computes:
edge_row = 0x1b5ce0 + y * 0xc8
dst_row = framebuffer + y * 320
row_count = bottom - top
The address calculation uses y*256 + y*64, which is y*320:
27626: mov eax,edx
27628: mov ebx,[0x148e48]
2762e: shl eax,8
27631: add eax,ebx
27633: mov ebx,edx
27635: shl ebx,6
27638: add eax,ebx
For each row, it loads left/right x and two interpolants from the edge table:
27670: mov eax,[row+0x10] ; right interpolant A
27673: mov esi,[row+0x0c] ; right x
2767d: mov ebx,[row+0x04] ; left interpolant A
27680: mov ecx,[row+0x08] ; left interpolant B
27683: mov eax,[row+0x14] ; right interpolant B
27686: mov edi,[row+0x00] ; left x
It clips left x against zero. If the span starts off-screen to the left, it
advances both interpolants by the same fraction before setting left = 0:
t = (-left << 8) / (right - left)
u_left += ((u_right - u_left) * t) >> 8
v_left += ((v_right - v_left) * t) >> 8
left = 0
Then it clips right x to 320, computes per-pixel deltas, and enters the span:
du = (u_right - u_left) / original_span_width
dv = (v_right - v_left) / original_span_width
dst = dst_row + clipped_left
0x2770c: texture/remap pixel loop
The exact pixel loop:
2770c: mov edx,ecx
2770e: mov edi,[esp+0x18]
27712: and edx,0xff00
27718: add edi,edx
2771a: mov edx,ebx
2771c: sar edx,8
2771f: movzx edi,byte [edx+edi]
27723: add edi,[esp+0x14]
27727: inc eax
27728: add ecx,ebp
2772a: mov dl,[edi]
2772c: mov edi,[esp+0x1c]
27730: mov [eax-1],dl
27733: add ebx,edi
27735: jmp 0x27705
Interpreted:
while (count-- > 0) {
unsigned row = v & 0xff00;
unsigned col = u >> 8;
unsigned texel = texture[row + col];
*dst++ = remap[texel];
v += dv;
u += du;
}
Register roles in this loop:
EAX destination pointer
ESI/count remaining pixels, tested by the loop wrapper
EBX u fixed-point coordinate
ECX v fixed-point coordinate
EBP dv
[esp+0x1c] du
[esp+0x18] texture base
[esp+0x14] remap/shade table base
The address calculation is a fast 256-wide texture assumption: v & 0xff00
selects a row page, u >> 8 selects a column. The sampled byte is not written
directly. It is used as an index into a remap table, which can represent
lighting, palette translation, alpha-ish material coloring, or any
effect-specific shade map.
This is a very 1995 PC-demo inner loop: one byte texture sample, one byte palette/remap lookup, one byte framebuffer write, with fixed-point coordinate increments and no divides inside the pixel loop.
Inner Loop: Flat Or Gouraud Span
0x278ac: row walker
0x278ac walks the same active scanline range and edge table. It uses
left/right x at row offsets +0x00 and +0x0c, plus two interpolant values at
+0x18 and +0x1c. It clips the span to 0..320 and advances the interpolant
when the left side is clipped.
0x27974: byte intensity span
The inner loop:
27974: mov edx,ebx
27976: sar edx,8
27979: mov [esp],edx
2797c: inc eax
2797d: mov dl,[esp]
27980: add ebx,esi
27982: mov [eax-1],dl
27985: jmp 0x2796d
Interpreted:
while (count-- > 0) {
*dst++ = intensity >> 8;
intensity += dintensity;
}
This is either a flat-color span when dintensity is zero or a simple
Gouraud/ramp span when the endpoints differ. Unlike the textured loop, it does
not sample a texture or shade table. The color byte is the interpolated value.
The pre-loop code divides once per scanline:
dintensity = (right_intensity - left_intensity) / unclipped_span_width
Then the pixel loop is only shift, store, add, and branch.
Inner Loop: Linear Texture Span
0x279bc: packed 16.16 coordinate span
0x279bc is another texture writer. It uses the edge table to gather left/right
x and two endpoint coordinates, clips to the screen, and then packs coordinate
deltas into a 32-bit value.
The forward pixel loop:
27b0e: mov edx,eax
27b10: shr edx,0x10
27b13: mov dl,ah
27b15: mov dl,[esi+edx]
27b18: mov [edi],dl
27b1a: add eax,ebx
27b1c: inc edi
27b1d: dec ecx
27b1e: jne 0x27b0e
Interpreted:
while (count-- > 0) {
unsigned index = ((coord >> 16) & 0xff00) | ((coord >> 8) & 0x00ff);
*dst++ = texture[index];
coord += dcoord;
}
The shr edx,16 followed by mov dl,ah is a compact way to combine one high
byte from the upper coordinate with one high byte from the lower coordinate.
That again creates an 8-bit-by-8-bit texture index, but without a second remap
table. This span is probably for unshaded texture mapping or special affine
effects.
There is also a reverse-direction loop for a negative delta case:
27b55: dec edi
27b56: mov edx,eax
27b58: shr edx,0x10
27b5b: mov dl,ah
27b5d: mov dl,[esi+edx]
27b60: mov [edi],dl
27b62: add eax,ebx
27b64: dec edi
27b65: dec ecx
27b66: jne 0x27b56
That path writes right-to-left. The reason is not fully typed, but the branch condition depends on the sign of one endpoint delta. It may avoid visual cracks or preserve a particular affine stepping convention when the span direction flips.
Clipping Interpolator
The large routine beginning at 0x25c80 is not a final drawer. It clips and
interpolates 0x28-byte vertex payloads. It first evaluates each vertex through a
callback, stores flags or distances in a temporary table at 0x1adb80, then
walks polygon edges and writes either copied vertices or newly interpolated
vertices to an output vertex buffer.
The most revealing inner fragment interpolates selected fields under a bitmask:
25d97: test dl,0x1
25d9c: mov ebx,[ecx]
25d9e: mov eax,[esi]
25da0: sub eax,ebx
25da4: imul ebx,ebp
25da9: sar ebx,0xa
25dac: add eax,ebx
25dae: mov [edi],eax
25db0: sar edx,1
25db2: add ecx,4
25db5: add esi,4
25db8: add edi,4
25dbd: jne 0x25d97
Interpreted:
for each selected 32-bit field:
out = a + (((b - a) * t) >> 10);
The interpolation fraction uses 10 fractional bits (>> 10), while many
screen and texture deltas elsewhere use 8 fractional bits. That difference is
reasonable: polygon clipping benefits from extra precision before scanline
setup quantizes to 8.8-ish values.
What The Engine Is Doing Per Frame
Combining the routines above, a typical 3D frame looks like this:
1. Clear the framebuffer or copy a full-screen backdrop.
2. Reset transformed-vertex and face counters.
3. Build camera/object matrices from trig tables and state.
4. Transform object vertices into [0x197eb0].
5. Transform auxiliary vectors/normals into [0x197eb4].
6. Compute clip codes for transformed vertices.
7. Parse face command streams into visible 0xdc-byte face records.
8. Project vertices to screen coordinates.
9. Sort visible faces by depth.
10. For each sorted face:
a. check material flags and backface state;
b. clip/interpolate polygon payload if required;
c. clear edge table active range;
d. insert polygon edges into 0x1b5ce0 rows;
e. run a material span writer.
11. Wait for vertical retrace.
12. Copy 64,000 bytes from the software framebuffer to A0000.
That explains why the executable is large but the hot loops are tight. The heavy C/runtime/resource code prepares data; the inner loops are direct fixed-point transforms, edge walkers, and byte-per-pixel span stores.
Effect-Level Interpretation
The asset names and renderer point to several classes of parts:
- Title and backdrop parts use full-screen raw images such as
darkback.raw,rgpcback.raw,reaback.raw, andp@meltback.raw. - Tunnel/blob/plasma-like parts are suggested by
tunnel.raw,blobmap.raw,alfamap.raw, and remap-table span code. - The city/theatre/train sequence is strongly suggested by
house*,bridwall,theatre,rail*,trai*,cinemafl, andcinewal*assets, plus the general 3D object pipeline. - The material callbacks and multiple span routines mean the engine can mix flat shaded, interpolated, remapped textured, and directly textured polygons.
The complete authored visual order is now observed, but the analysis does not recover the binary show-script format or all scene graph data. The binary clearly contains title/credit strings and comments by the RAGE members; the deepest reconstructed part remains the renderer. The visual reference now checks the asset-level interpretation: the opening constructed space, mapped objects, material changes, room and long city passage all occur in the final release rather than being inferred from filenames alone.
Why It Is Fancy
Reanimator's sophistication is not in one exotic instruction trick. It is in the amount of system built around practical DOS constraints:
- PMODE/W gives it flat 32-bit memory for a multi-megabyte executable.
- It carries a large raw-asset namespace instead of baking all visuals into tiny procedural code.
- It has a general transformed-vertex buffer and face command compiler.
- It sorts faces and dispatches material-specific callbacks.
- It uses edge tables and affine scanline loops that keep divisions out of the per-pixel path.
- It supports multiple sound backends and a no-sound path.
The inner loops are conventional in the best sense: fixed-point math, linear memory, palette-index bytes, and exact VGA timing. The scale of the city assets and renderer organization is what makes it feel more like a complete animated world than a chain of small effects.
Open Ends
Things not fully reconstructed in this pass:
- The exact
city.keyformat. - The full resource loader and raw compression modes.
- Every face-stream opcode in
0x24de4. - The binary cue structure and its synchronization with the music. The visual order itself is now documented.
- Exact material semantics for every callback at
[material+0x28].
The recovered loops are enough to explain the core renderer: fixed-point object transform, perspective projection, outcode clipping, face compilation, depth sort, edge-table setup, and byte-per-pixel span writing.