15

Wiggles and Waves

These files are all from the same morning of March 31, 1996, four days after the last entry's session. This is the last substantial session, as the final session four months later is just some minor tweaks to older files. After doing heavy pixel drawing in the last entry, I return to palette cycling here, playing with two concepts. The first demo is simply vertical bars, with the palette cycling back and forth at top speed to create a vibrating "wiggle" effect. For the second one I believe I was inspired by some effects I had seen on Super Nintendo, although I can't remember which game precisely. I seem to have been working towards something but never got there.
the palette table a[1..64] - a triangle ramp, rotated 3 places per step. Both programs share it verbatim.

WIGGLE.PAS

Vertical stripes, and that is the whole picture: five repeats of indices 1..64 across the screen plus a truncated sixth band of 40. Then the palette does everything. Rotating 3 slots per step for 64 steps moves the table 192 slots (exactly three full bands) and lands it back where it started, at which point the loop runs in reverse. That reversal is what makes it wiggle rather than scroll. There is no delay anywhere and the retrace wait does not work, so on real hardware it rewrote 64 registers and immediately rotated again, the full 128-step cycle in well under a tenth of a second, which is what you are watching. Untick "unthrottled" to slow it down.

NEWWAVE.BAK

The same palette engine, now driving a fan: every line runs from its own point on the top or bottom edge to a single vanishing point at the screen center, with a 20-pixel sine wobble along its length. r runs 0..4, so indices 1..64 repeat five times across the screen and the traveling band appears five times over. The palette blackout is commented out in this version, so on real hardware you watched all 76,800 sines grind out line by line before the effect started. The mirror here is a plain vertical flip.

NEWWAVE.PAS

Three changes, all of them decisions. (1) the r loop is cut to a single pass, so 64 lines are laid down instead of 320, one band, not five, and the fan reads as a shape rather than a texture. (2) the mirror becomes a true 180° rotation (x is flipped as well as y), matching what NEW.PAS arrived at on the 27th. (3) the palette is blacked out during setup and delay(4) is added to the cycle, so it no longer strobes, and you no longer see it draw. Every one of those is the same edit: stop showing the machinery. Four days after NEW.PAS was clearing 172,800 bytes a frame, this writes zero pixels and 64 registers. It is also the last program here written from scratch. Nothing else is saved until 8 August, and that morning produces a year-old demo switched back on plus one more file that is ASCTXT.PAS with a color engine added.

WIGGLE.PAS

1996-03-31 07:58 · 799 bytes

uses crt,jmodex;var b,c,d,q,r:integer;a:array[1..64]of byte;
begin if set_vga_modex(7,360,480,1)=0 then halt(0);clear_vga_screen(0);
for q:=1to 32do a[q]:=(q-1);for q:=33to 64do a[q]:=(64-q);
for q:=1to 64do set_dac_register(q,0,0,0);
for r:=0to 4do for q:=1to 64do draw_line(r*64+q,1,r*64+q,480,q);
for q:=321to 360do draw_line(q,1,q,480,q-320);
repeat repeat until(port[$3da]and 8)=0;repeat until(port[$3da]and 8)<>0;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,0,0,a[q]);b:=a[1];c:=a[2];d:=a[3];
for q:=1to 61do a[q]:=a[q+3];a[64]:=d;a[63]:=c;a[62]:=b;end;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,0,0,a[q]);b:=a[64];c:=a[63];d:=a[62];
for q:=64downto 4do a[q]:=a[q-3];a[1]:=d;a[2]:=c;a[3]:=b;end;
until keypressed;asm mov ah,0;mov al,3;int 16;end;end.
NEWWAVE.BAK

1996-03-31 08:25 · 921 bytes

uses crt,jmodex;var b,c,d,q,r,s,t:integer;a:array[1..64]of byte;
begin if set_vga_modex(7,360,480,1)=0 then halt(0);clear_vga_screen(0);
for q:=1to 32do a[q]:=(q-1);for q:=33to 64do a[q]:=(64-q);
{for q:=1to 64do set_dac_register(q,0,0,0);}

for r:=0to 4do for q:=1to 64do
for s:=1to 240do begin
t:= round((r*64+q+sin(s/90*pi)*20)-((240-s)*(r*64+q-180)/239));
if (t>=0)and(t<=360)then begin set_point(t,s+240,q);set_point(t,241-s,q);end;
end;

repeat repeat until(port[$3da]and 8)=0;repeat until(port[$3da]and 8)<>0;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,0,0,a[q]);b:=a[1];c:=a[2];d:=a[3];
for q:=1to 61do a[q]:=a[q+3];a[64]:=d;a[63]:=c;a[62]:=b;delay(10);end;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,0,0,a[q]);b:=a[64];c:=a[63];d:=a[62];
for q:=64downto 4do a[q]:=a[q-3];a[1]:=d;a[2]:=c;a[3]:=b;delay(10);end;
until keypressed;asm mov ah,0;mov al,3;int 16;end;end.
NEWWAVE.PAS

1996-03-31 08:48 · 928 bytes · The last one written from scratch.

uses crt,jmodex;var b,c,d,q,r,s,t:integer;a:array[1..64]of byte;
begin if set_vga_modex(7,360,480,1)=0 then halt(0);clear_vga_screen(0);
for q:=1to 32do a[q]:=(q-1);for q:=33to 64do a[q]:=(64-q);
for q:=1to 64do set_dac_register(q,0,0,0);

for r:=0to 0do for q:=1to 64do for s:=1to 240do begin
t:=round((r*64+q+sin(s*0.0349)*20)-((240-s)*((r*64+q-180)/240)));
if (t>=0)and(t<=360)then begin set_point(t,s+240,q);set_point(360-t,241-s,q);end;
end;

repeat repeat until(port[$3da]and 8)=0;repeat until(port[$3da]and 8)<>0;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,a[q],0,a[q]);b:=a[1];c:=a[2];d:=a[3];
for q:=1to 61do a[q]:=a[q+3];a[64]:=d;a[63]:=c;a[62]:=b;delay(4);end;
for r:=1to 64do begin
for q:=1to 64do set_dac_register(q,a[q],0,a[q]);b:=a[64];c:=a[63];d:=a[62];
for q:=64downto 4do a[q]:=a[q-3];a[1]:=d;a[2]:=c;a[3]:=b;delay(4);end;
until keypressed;asm mov ah,0;mov al,3;int 16;end;end.