1987 · Thalamus

Delta

This minisite was contributed by chunkypixel, air. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/delta with me to Gold.

An inverted character set, bullets cut out of glyphs, hits found by reading the screen, and a shop that is an attack wave (The attack waves).

01 · Colour from nothing

An inverted character set

Every set bit in Delta's font is drawn black. The colours come from the bits that are clear.

Left: the three star glyphs, $2F, $30 and $31, as the frame is drawn: each is solid but for one clear pixel. Right: the 18 star positions at $100A-$101B, each drawn in all four quarters of the screen, run by a port of stars_update ($1DB9). Checked against the game's code in the kit's 6502 simulator over 600 frames. Colours are the three backgrounds of the recorded frame.

The screen runs in the VIC-II's extended background colour mode ($D011 = $5C). In that mode only 64 glyphs exist, and the top two bits of each character code pick one of four background colours, $D021 to $D024, instead of choosing a glyph. Colour RAM is black everywhere (clear_screen, $0DDD). A set bit is therefore black, and a clear bit shows the background colour the code selects. The blank character $2E is solid, so empty space is black.

A star is one character with a single clear bit. Three layers use the same trick with three codes: $6F, $30 and $B1 point at glyphs $2F, $30 and $31 through three different backgrounds, so each layer has its own colour. To move a layer, the game rotates the one row of its glyph that holds the clear bit (ROL at $1D1C). Every star of that layer slides one pixel left at once. When the bit falls out, it goes back in at the right edge and the six stars of the layer move one column left. The fast layer rotates twice a frame, the middle once, the slow one every second frame. The four background colours step through a six-entry cycle every fourth frame (colour_cycle_step, $1DDD), so the stars change colour as they drift.

02 · Bullets made of type

Every shot is a character

The enemies' shots are cut out of whatever glyph lies under them, and hits are found by reading the screen.

Position in the cell
Underneath

A port of draw_enemy_shot_0 ($25D5): the two glyphs under the shot are ANDed with two columns of the mask table shot_masks at $FF70. Checked against the game's code in the kit's 6502 simulator in 40 cases. Clear bits are drawn in one colour here; on the screen they take the background colour of the shot's character code.

Enemy shots, homing bombs and eight-way bullets are all drawn with characters. An aimed shot is a four-pixel ball that moves one pixel at a time across two cells. The game does not draw the ball. It builds two new glyphs each frame, taking the glyphs under the shot and clearing the ball's bits out of them with one of eight masks. In an inverted font a clear bit is colour, so the ball appears, and a star under it stays visible. The bombs read the same table through patched operands ($28C1, $299C).

Hits by reading the screen

The VIC-II can report when a sprite touches a character ($D01F). Delta never reads that register. Instead:

Sprite against sprite (the ship and the enemies, the rows of rocks, the shop's icons) uses the chip's own collision register $D01E, read in three of the bands.

03 · The corner shop in space

The shop

Some attack waves are made of weapon icons. Fly into a blue one to buy it. Grey ones kill.

Credits
Click an icon to fly into it.

A port of shop_try_buy ($2261), checked against the game's code in the kit's 6502 simulator over all 280 combinations of icon, credits and shop state. Icon 4 bought with 7 credits, and icon 5 touched with 2, were also tried live in VICE.

The shop is not a separate screen. It is an attack group like the others (bit 4 of the wave record's byte 2 marks it), whose sprites are the seven weapon icons, flying through the play area. In stage 1 it is the second group to arrive, about three seconds in. An icon costs its own number in credits. Icons the player can afford are light blue and the rest grey (icons_update, $0808).

Touching an icon that costs more than the credits counts as being shot, and so does touching a second icon in the same shop: one purchase per visit. Buying spends every credit. The price goes, and each credit left over is paid out as 100 points. The bought icon then blinks 14 times along the bottom row, eight frames each, and only then takes effect.

A credit comes from clearing a whole attack group: when a group ends and none of its enemies escaped, most groups add one ($80B5).

IconPriceKept inWhat it does
1 speed1$0F00ship speed 1, 2, 4 or 8 pixels a frame; buying it at the top speed goes back to the slowest
2 fire rate2$0F011, 2 or 3 laser bolts on screen at once (ship_fire, $349A)
3 extra weapon3$0F02each shot also fires one up, one down and one backwards ($3502)
4 double laser4$0F03two more beams, level with the ship and two rows below ($3E88)
5 orbiter5$0F04a satellite circling the ship through 16 positions; it destroys what it touches and is never used up ($3E5E)
6 slow-down6$0F05the attack wave moves and spawns only every second frame (wave_step, $2C22)
7 shield7$0F06absorbs three hits, with 16 frames of safety after each ($3880)

Weapons change the enemies too. Owning the shield brings out the homing bombs, and the double laser and slow-down change how finely they aim (enemy_fire_setup, $9100; enemy fire). Every weapon is lost when the ship dies ($397E).

04 · Enemy fire

Three kinds of fire, paid for from one budget

Enemies fire three ways, all drawn with characters (enemy_fire_decide, $9208): aimed shots that travel along a row, six at most; homing bombs two characters square, two at most; and bullets, the character $ED moving in one of eight directions, seven at most.

Each frame one enemy, taking the seven in turn, may fire. It must be alive, past its entrance and allowed to fire by its wave, and its own counter must have reached the stage's fire rate. New fire is allowed only while the fire already in flight costs less than the stage's budget: a shot counts 5, a bomb 10 and a bullet 1 (every stage's numbers).

Which kind comes depends on the player's weapons (enemy_fire_setup, $9100). Owning the shield brings the homing bombs, and owning the double laser or the slow-down changes how finely the shots are aimed. Buying weapons makes the enemies fire differently.

05 · Controls

Controls

InputWhereEffect
Joystick, either portplayboth ports are read and combined (read_joysticks, $3375)
W, X, A, D, RETURNplay, after F3up, down, left, right, fire (read_keys, $0C40)
F1titleone or two players; turns pass at each death
F3titlejoystick or keyboard
F5titlesound effects or music in play
SPACEtitleshows the three options
RUN/STOPplaypause; fire resumes, T quits to game over (pause_check, $9A30)
RESTOREanywherenothing: the NMI vector points at an RTI at $FFF8

The demo on the title replays 63 recorded joystick bytes from $9F40, one every eight frames. The game points its own joystick read at $0F90 for the demo by patching the instruction (demo_joystick_patch), so the ship flies by the same code as in play.