1985 · Gremlin Graphics

Tycoon Tex

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

What the code does that the game never says. Tex has to run to get over a break, because at the slowest speed no jump clears one, and the high-score table takes the first digit off a six-figure score.

01 · Secret

Secret: at the slowest speed no break can be jumped

Tex does not move forward while he jumps. Only the pipe moves, carrying the break under him, and at speed 1 it does not carry it far enough.

Speed
Break
lands past the breakfalls inThe number: columns from Tex's left column to the first column that kills

Each try is the game's five raster interrupts on the kit's 6502, as on the How it works page. Tex walks right until set_speed gives the speed chosen, then a break of the size chosen comes next in the pipe's feed, built by the game's build_break. A jump is tried on every frame from when the break's first deadly column is 24 columns ahead until Tex falls in standing; click a square to watch that one. The table counts the frames that work. In plus4emu the same search at speeds 1, 2 and 3, over four breaks at each, gave the same answer: none at speed 1, breaks of one middle at speed 2, of one or two middles at speed 3 (test_tex.js holds this page to it).

move_tex reads left and right only while Tex is on the ground, so a jump goes straight up and down: ten steps, one every second frame, five rows up and five down (start_jump, step_jump). check_hole tests the pipe cell under his left column on every frame he stands. From the frame after up is pressed it is testing a row of the field instead, and 18 frames later he is back on the pipe.

To get over a break the pipe has to carry the cell under him from the column before the break's deadly columns to the one after them. The narrowest break kills on 5 columns, so that is 6 columns, or 48 pixels. The widest kills on 9, so 80 pixels. In 18 frames the pipe moves 36 pixels at speed 1, 54 at speed 2, 72 at speed 3 and 90 at speed 4 (pipe_speeds). At speed 1 nothing can be cleared. At speed 2 only a break of one middle can, from a window of five frames, a tenth of a second. Speed 3 clears one or two middles, and from speed 4 every break clears.

The speed comes from where Tex stands (How it works), so a player has to keep him at column 10 or further right before a three-middle break comes along. The inlay says only that a break must be jumped. The demo walks Tex to column 16, speed 5, before it starts jumping (demo_controls).

02 · Bug

Bug: a six-digit high score loses its first digit

When a better score pushes a score of 100,000 or more down the table, the score that moves down takes the first digit of the one that was below it.

THE TYCOONS! before

after

The game's check_hiscore ($2625) and enter_hiscore on the kit's 6502, over the table as loaded with the top entry's score changed, stopped where name entry begins ($269C); the digit that changed is marked. In plus4emu, with GREMLIN's score poked to 150,000 and a game ended at 200,000, GREMLIN came back at 50,000.

Each entry of hiscore_table is 14 bytes: six digits, seven letters and a 0. enter_hiscore makes room by copying every byte below the new entry 14 bytes further down, from the bottom up, with X counting down from $62. The loop stops as soon as X reaches the new entry's own offset, before it copies the byte there. That byte is the first digit of the entry being pushed down, so the place it moves to keeps the first digit it held before: the old first digit of the next entry down.

As the game loads, every score in the table is below 100,000 and every first digit is 0, so the bug changes nothing. Only a score of six figures beaten by another shows it.

03 · Bug

Bug: a bomb takes less pressure when the last cell is nearly empty

A bomb or a crash explosive that lands on the pipe takes four eighths of a cell off the oil pressure. With fewer than four in the part cell, it takes those and one more.

The game's lose_pressure ($21B1) on the kit's 6502, from 10 whole cells and each part cell from 0 to 7, with the 4 eighths break_pipe takes and the 2 it takes where the pipe is broken already. Run the same way in plus4emu, from $21B1 with A set, it took the same.

The pressure is whole cells in pressure_cells and eighths of the part cell in pressure_fine (How it works). lose_pressure takes the loss off the eighths. When they go below zero it takes a cell and sets the eighths to 7, whatever was left, where adding 8 would have kept the rest of the loss. So a bomb that lands with 1 eighth in the part cell leaves the cell below at 7: 2 eighths lost instead of 4. The main loop's drain takes 1 at a time and comes out right.

04 · Bug

Bug: levels 80 to 99 are easier than 60 to 79

The enemies come back sooner every 20 levels. At level 80 they go back to the slow pace of level 1.

The game's next_level ($3A31) on the kit's 6502, called on the level before, as the game calls it at the end of a level. In plus4emu, levels 20, 40, 60, 80 and 99, entered by poking the level and then $9D, had delays of 100, 58, 1, 128 and 128.

The level is kept in one byte as two decimal digits, binary-coded decimal: level 37 is $37, 0011 0111. next_level takes the enemies' delay from bits 5 and 6 of that byte. For the tens digits 0 to 7 those two bits split the levels into four groups of twenty: neither bit for 1 to 19, bit 5 for 20 to 39, bit 6 for 40 to 59, both for 60 to 79. A tens digit of 8 or 9 sets bit 7 and leaves 5 and 6 clear, so levels 80 to 99 get the delay of levels 1 to 19, 128, straight after the 1 of levels 60 to 79.

The delay is the least time an enemy stays away after it has gone (How it works). At 1 every enemy comes back as soon as the threshold lets its count run; at 128 the arrow and the jet wait at least 128 frames, two and a half seconds.

05 · Secret

Secret: after level 99 comes level 00

The inlay promises 99 levels. Complete the 99th and the game goes on at level 00, then 01, for as long as the pressure lasts.

The game's next_level on the kit's 6502 for each level, through every entry of enemy_pairs for 00. In plus4emu, level 99 completed by poking $9D gave level 00 with the arrow and the crash explosive (mask $09) and threshold $80.

next_level adds 1 to the level in decimal mode, so 99 and 1 make 00, with a carry nothing reads. Nothing in the game tests for a last level. Level 00 is below 4, so its breaks have at most two middles, as on levels 1 to 3. It is not 1, 2 or 3 and it is below 7, so it gets two kinds of enemy at random, as on levels 4 to 6. Then 01 is level 1 again, the jet alone.

06 · Bug

Bug: the sixgun's falling pitch is written to the other voice

The routine that sweeps the sixgun's pitch down writes the top two bits to voice 2's register. Voice 1 keeps its top bits and sweeps from above hearing down to 739 Hz.

Both from the game's shot_sound and tick_shot_sound on the kit's 6502, as on the How it works page. The first wrote what the game wrote in plus4emu, frame by frame. The second has the high bits moved to voice 1's register, $FF12: a guess at what was meant, not the game.

A voice's pitch is a 10-bit value: voice 1's is $FF0E and bits 0 and 1 of $FF12, voice 2's is $FF0F and bits 0 and 1 of $FF10. shot_sound starts voice 1 at $301. Each frame tick_shot_sound takes 8 off the low byte, and when that runs below zero it takes 1 off the high bits it keeps in $DC, 3 then 2. It ORs $DC into $FF10. Voice 1 keeps the 3 it was given, so after the first frame its value is $3F9, 18,473 Hz, and it falls 8 a frame to $369, 739 Hz.

Voice 2 is switched off while the shot plays, so nothing else is heard. A hit sets voice 2's register whole before it plays (hit_sound).

07 · Secret

Secret: the jet flies above the sixgun's reach

The inlay pays 250 for the jet plane's bombs. The jet itself cannot be hit: it flies on rows 8 and 9, and the highest row the sixgun fires along is 14.

Level 1 on the kit's 6502, where the jet is the only enemy: Tex jumps as it comes over and fires at the top of the jump. The bands mark rows 8 and 9, where move_arrow_and_jet flies the jet, and rows 14 to 19, the rows fire_bullet can start a bullet on. Drag to step through the frames.

fire_bullet puts the bullet two rows below Tex's top-left cell, the row of his gun: row 19 when he stands, row 14 at the top of a jump, five rows higher. move_bullet moves it straight right, one column a frame, and bullet_stop marks the right edge of rows 14 to 20 only. The jet's bomb falls from below the jet to the pipe, across the gun's rows, and is worth the most points in the game.

08 · Secret

Secret: a St Albans phone number after the high-score table

Fourteen bytes after THE TYCOONS! spell TEL 0727 34566. The game never shows them.


    

phone_text, from the listing. 0727 was the dialling code for St Albans until 16 April 1995, when it became 01727 (area-codes.org.uk, "01727"; Wikipedia, "PhONEday"; both read 21 October 2026).

The bytes are PETSCII, the same codes as the names in the table, and sit between the table and the first raster interrupt, irq_frame at $1ACC. No instruction in the listing reads them. Whose number it was, the code does not say.