Making Time Bandit Smooth on the Atari STE
Taking a 1985 Game Apart With Claude Code to Rebuild Its Display
Time Bandit on the Atari ST moves in jerky 4-pixel hops at an uneven 17 to 50 updates a second. On an STE with 4 MB, it can now scroll the full width of the screen in steady 2-pixel steps, at 50 frames a second.
November 2026
The original ST version and the new STE version side by side,
with the game's attract mode playing.
Watch on YouTube
This article follows how we got there. We took the 1985 disk image apart, worked out how the game draws its screen, and rebuilt that display around the STE's blitter, its 4,096-color palette, and its hardware scrolling. The game's own logic and timing were left untouched. All testing ran in the Hatari emulator with EmuTOS, so nothing here has been tried on real hardware yet.
ZIP file, 4 MB: the patch, its source code, the tools,
and a README.
The game is not included. You need a
Pasti disk image (.stx) of Time Bandit
version 2.0
(how to use it).
How This Was Made: With AI
This project was done with Claude Code, Anthropic's AI coding agent, and it would not have happened without it. From the first look at the disk image to the finished 50 Hz version took a few hours.
The split of the work was simple. I set the goals and made the calls: which STE features to use, removing the side panel, putting the status display underneath, targeting a 4 MB STE, and what to show in the videos. Claude did the hands-on work:
- reading the disk image and decrypting the game
- disassembling and tracing the 68000 code
- writing the new loader and every patch in 68000 assembly
- running the game in Hatari and building the test harnesses
- measuring frame timings and recording screenshots and videos
- finding and fixing its own bugs
Where this article says “we,” it means the two of us. The measurements are Claude's, taken by instrumenting the emulator, not estimates. One warning carries over from that: everything was tested in emulation only.
Why Say It So Openly
In parts of the retro-computing scene and the demoscene, “made with AI” is close to an insult. A game or demo touched by AI is often written off before anyone has looked at it, as cheating, as low effort, or as taking something from the people who learned these machines the hard way. Some of that worry is fair. The scene has always been about craft, about squeezing the hardware by hand and owning every byte you release. Nobody wants that buried under a flood of output nobody understands.
I see it differently. Nothing here replaces the original: the 1985 disk image is untouched, and the game still runs exactly as Dunlevy and Lafnear wrote it. What AI changes is the cost of asking “what if?” A question that once meant weeks of disassembly and hand-written 68000 code can now be tried in an afternoon. That gives us new variants of old games to play with alongside the originals, not instead of them. Every result here was measured and checked, the source is included, and anyone can read exactly what was changed. Used like that, these tools are a wonderful way to experiment with the machines we love, and I'd rather be open about it than pretend otherwise.
The Game
Time Bandit is an overhead maze shooter by Bill Dunlevy and Harry Lafnear. It began on the TRS-80 Model I in 1983 and reached the Atari ST in 1985, published by MichTron (Wikipedia). Lafnear has said it grew out of Konami's arcade game Tutankham and started life as Pharaoh. He puts sales at about 75,000 copies, most of them for the ST.
You play a thief moving between worlds through 16 Timegates. Each world is a scrolling maze where you collect keys, open locks, and reach the exit while monsters close in. Some worlds add text-adventure puzzles, and many nod to other games of the time, such as Pac-Man and Centipede. Each world must be beaten 16 times, a little harder each round.

All 16 lands in the new full-width STE mode. The seventh,
Excalibur, is shown in its text adventure.
On the ST, the one-player screen is a square playfield of 11 × 11 tiles (176 × 176 pixels), with a status panel down the right-hand side. A two-player Duel Mode splits the screen so both players can roam the same worlds at once.
I have written about the game itself before, in Time Bandit: A Love Letter to the Game That Sold the Atari ST.
Why It Stutters
The original redraws the screen about 24 times a second on average, but never at a steady rate. The ST's display refreshes 50 times a second, every 20 ms. We timed 525 screen updates in the game's own demo:
| Refreshes per update | Time on screen | Updates | Share |
|---|---|---|---|
| 1 | 20 ms | 76 | 14% |
| 2 | 40 ms | 338 | 64% |
| 3 | 60 ms | 111 | 21% |
Two things combine to make the motion jerky:
- Coarse steps. The camera and every character move in 4-pixel units, so each update is a visible jump.
- Uneven timing. A frame's work takes 1.84 refreshes on average, so most frames just miss or just make a refresh. A character walking at a steady pace on screen alternates between 4 pixels in 20 ms, 40 ms, or 60 ms. The eye reads this as stutter.
How the Original Works
The game is built for a plain 8 MHz ST, where the CPU does all the drawing.
Loading and Protection
The disk has a normal TOS file system, but the game itself sits
on raw tracks 8 to 79. A boot loader reads those 72 tracks into
memory at $20000, decodes them with an XOR chain,
and jumps in. The code then decrypts most of itself a second
time, about 290 KB from $228D0 to
$6A8DF.
The protection goes further than a disk check:
- Disk check. Track 2 has a deliberately unusual format. The game reads it with the floppy controller's raw Read Track command and looks for a pattern. On a copy, it jumps to a bad address and crashes, and the check is hidden behind the high-score loader.
-
Checksum. A routine sums the code from
$2258Fto$287EC. If anything was changed, it quietly corrupts a pointer, so a patched copy breaks later instead of at once. -
Decoys. Stray writes to exception vectors and
odd data words placed after
rtsinstructions are there to confuse anyone reading a disassembly.
Drawing a Frame
The main loop calls a table of routines once per frame. In order, they are a speed governor, the game logic, the renderer, and a screen swap:
- Governor. A plain busy-wait loop of (6 − v) × 512 passes, where v is the number of lands visited. The game gets faster as you progress, and its pace depends on CPU speed, not the display.
- Tiles. The renderer redraws the whole playfield into a hidden screen from the map, 64 tile numbers per row. Each tile is 16 × 16 pixels in 4 bit planes (128 bytes). The 68000 can't shift graphics cheaply, so the game stores extra copies of the tile set pre-shifted by 4 and 12 pixels. That is why the view can only move in 4-pixel steps.
- Sprites. Every character is a 16 × 16 masked sprite, also placed in 4-pixel units. Three CPU routines handle a sprite spanning two screen words, one clipped at the right edge, and one clipped at the left.
- Swap. The finished screen is shown at the next vertical blank, and the old one becomes the drawing buffer.
Nothing ties the work to the 50 Hz refresh. Whether a frame finishes in one, two, or three refreshes depends on how many tiles and sprites it had to draw, which is where the stutter comes from. Sound runs separately, on a 200 Hz timer interrupt.
What the STE Adds
The STE (1989) has the same 8 MHz 68000 as the ST, but its new chips can take over exactly the jobs that slow Time Bandit down.
| Feature | ST | STE | Used for |
|---|---|---|---|
| Blitter | None | Hardware copier with shifting, masking, and logic operations | Sprites and tiles at any pixel position |
| Palette | 512 colors (3 bits per channel) | 4,096 colors (4 bits per channel) | Smoother shading and recolored lands |
| Screen address | Steps of 256 bytes | Any word, and the video counter can be rewritten mid-frame | Scrolling and switching to the status strip |
Fine scroll (HSCROLL) |
None | Shifts the picture 0 to 15 pixels | Pixel-exact horizontal scrolling |
Line width (LINEWID) |
None | Skips extra words at the end of each line | Showing a window onto a picture wider than the screen |
| Memory | Up to 4 MB on later models, usually 0.5 to 1 MB | Up to 4 MB | Keeping a whole land as one picture |
Together, the screen address, HSCROLL, and
LINEWID let the STE display any 320-pixel-wide
window of a much larger picture. Moving that window costs a few
register writes per frame, however much of the background moves.
The Steps We Took
The original game data is never rewritten on disk. A small new
loader, BANDIT.PRG, loads and decrypts the game,
patches it in memory, and then jumps in. Each improvement is a
switchable patch, controlled by an option byte in the loader. On
a plain ST, the loader still works: it applies only the patches
that ST can run.
1. Taking It Apart
The disk came as a Pasti (.stx) image, which keeps
the protected track's odd format. We read the file system and the
raw tracks, reproduced both decryption stages in Python, and
disassembled the result. The decoy bytes after
rts instructions had to be found and skipped before
the code read cleanly. Once the checksum was understood, we could
patch it out: one changed byte turns its failure branch into an
unconditional one.
2. A Test Bench
Every change was checked two ways:
- In emulation. Hatari 2.4.1 ran the game headless as an STE with EmuTOS 1.4, the open-source replacement for TOS. Its debugger let us set breakpoints, profile, and capture frames and video.
- Byte for byte. A Python harness ran the original routine and the new one side by side in a 68000 emulator (Unicorn), with a model of the blitter. Both had to leave identical bytes on screen: 3,704 sprite cases and 120 tile cases.
3. Blitter Sprites
The three CPU sprite routines were replaced with blitter
versions. Each sprite is drawn in two passes per plane, masking
out the background and then adding the image. The blitter's
shifter places it at any pixel, and its
FXSR/NFSR flags handle the extra source
word a shifted sprite needs. Getting those flags right at the
clipped screen edges took most of the effort.
4. The 4,096-Color Palette
We extracted every palette in the game and moved them to the STE's 12-bit format. Color-cycling effects got smoother in-between steps, and the Timegates, King's Crown, and other lands seen in the demo got new shades the ST couldn't show. Skin tones were warmed slightly. The remaining lands are still on their original colors.
5. Blitter Tiles
The tile renderer's dispatch table was redirected to blitter routines. That cut a frame's work from 1.84 refreshes to 1.52, so far fewer frames spill over into a third refresh.
6. Steady Pacing
The busy-wait governor was replaced with one that counts vertical blanks. A frame is shown exactly two refreshes after the last one, and if it overruns, the count starts again from now, so the game never tries to catch up. Out of 524 frames, 511 now take exactly 2 refreshes: a steady 25 Hz instead of anything from 17 to 50.
7. Hard Disk and Copy Protection
Our copy loads from raw tracks, so a hard-disk version needed a
new loader. It reads the game data from a file,
TBANDIT.DAT, instead of from the tracks. The disk
check is disabled with a single rts at its entry
point. The game now runs from any folder on a hard disk, and the
floppy version runs from a copy.
8. Full Width With Hardware Scrolling
This is the big change, and it needs a 4 MB STE. In one-player games, the loader switches to a new display:
- The whole land as one picture. Each land is drawn once into a picture up to 1,024 × 1,024 pixels. Three copies serve as display buffers, and a fourth clean copy is kept for erasing sprites. That is about 2.2 MB, which is why 4 MB is required.
-
Scrolling for free. The video address,
HSCROLL, andLINEWIDshow a 320 × 176 window onto the picture, 20 × 11 tiles instead of 11 × 11. The side panel is gone. - The game still drives everything. Its render loop still runs, because it updates per-character counters and animation. We skip its tile drawing and make each sprite call record the character's position instead of drawing it.
- Our own sprite pass. Each new picture erases last frame's sprites by blitting from the clean copy, then blits the characters at their pixel positions. Tiles the game changes, such as opened doors or collected keys, are spotted through a shadow copy of the map and redrawn into all four copies.
9. 50 Frames a Second
The game logic still advances at 25 Hz, but the display now changes on every refresh. For each game frame, we build two pictures. The first places the camera and every character halfway between their old and new positions, and the second shows them at their new positions. A small queue tells the vertical-blank interrupt which picture to show and when. Scrolling now moves in even 2-pixel steps, 50 times a second.
10. The Status Strip
The land name, item box, CUBITS, symbols, and rank moved into a 24-line strip under the playfield. They are copied from the game's own panel, which it still draws off-screen. An interrupt (MFP Timer B) fires at line 176 and points the video address at the strip.
Getting that switch clean on every frame took three fixes:
- Glitches at the switch line came from changing the address mid-line. The handler now fires two lines early and waits on the video counter for the exact moment.
- About 50 out of 2,030 switches were still late, delayed by the game's 200 Hz sound interrupt. We wrapped that handler so it runs at a lower priority than the switch, which brought late switches to zero.
- The last glitches came from the blitter holding the bus. Blits now share the bus, and the switch handler pauses the blitter while it works.
Claude also made mistakes along the way, and caught them by measuring. Early on, it wrongly concluded that the game scrolls only in whole tiles, until the measured camera steps showed otherwise. A first recording looked like 4-pixel jumps because the emulator was skipping frames to keep up. Recording with frame-skipping turned off fixed it.
Results
The new one-player mode shows a fresh picture on every refresh, 50 times a second, where the original managed about 24 at uneven intervals. Each column below was measured in Hatari, emulating an STE with 4 MB and EmuTOS 1.4.
| Original | STE blitter + pacing | STE full width | |
|---|---|---|---|
| Playfield | 11 × 11 tiles, side panel | 11 × 11 tiles, side panel | 20 × 11 tiles, strip below |
| Screen updates per second | about 24, uneven | 25, steady | 50, steady |
| Updates taking exactly 2 refreshes | 64% | 98% (511 of 524) | every game step (248 of 248) |
| Scroll step | 4 px | 4 px | 2 px |
| Colors | 512 | 4,096 | 4,096 |
| Machine | Any ST | Any STE | STE with 4 MB |
Across 1,702 recorded frames, the status strip switched cleanly every time. Every scroll step was exactly 2 pixels in all four directions.
Before and After
The same moment in the Timegates, the hub world, on the original game and on the new STE mode. The new view shows nearly twice as much of the world, and the status display moves underneath. The blue sky and deeper reds come from the 4,096-color palette.

Before: the original on an ST. An 11 × 11-tile playfield, the side panel on the right, 512 colors.

After: the new STE mode at the same moment. A 20 × 11-tile playfield, the status strip below, 4,096 colors.

After: King’s Crown in the new mode, one of the lands recolored with the STE palette.
Known Gaps
- The game-over screen and the high-score entry are untested in the new mode.
- When you change land, one picture can briefly mix the old and new maps.
- Two-player Duel Mode keeps the original split screen.
- Only the lands seen in the demo have been recolored.
- Nothing has been tested on real STE hardware or with TOS 1.62.
What has been tested, all of it in Hatari: all 16 lands were entered and played at levels 1A, 1D, 2B, 3C, and 4D, with no crashes, freezes, or display faults. The text adventures were triggered in every land that has them, and they behaved the same as in the plain game. Text-adventure screens and points messages in the play area display normally.
The floppy and hard-disk versions use the same loader. On a plain ST, it applies only the patches that ST can run.
Download and How to Use It
The download is a patch, not the game. To use it, you need a
disk image of the regular Atari ST version of Time Bandit:
version 2.0, as a Pasti image
(.stx). It can be found on
Atarimania.
A script in the ZIP file then builds the STE version from your
disk image.
What You Need
- The ZIP file from this page, unpacked into a folder.
- A disk image of Time Bandit version 2.0 for the Atari ST. It must be version 2.0. The patch changes the game at fixed addresses, so it only fits that one release. Version 2.1 does not work, and neither do cracked or repacked copies.
-
The image type: Pasti (
.stx). This is the type to use, because it keeps the copy-protection track of the original disk. A plain sector dump (.st) of the same original disk is accepted too, but then you only get a.stdisk and the hard-disk files. - Python 3, to run the script once. It needs nothing else.
- An emulator such as Hatari, set up as an STE with 4 MB.
Build Your Copy
- Unpack the ZIP file into a folder.
- Copy your disk image of the original game into that folder. Its name does not matter.
-
In that folder, run the script with the name of your image:
python3 make_ste.py "Time Bandit.stx" -
The script checks that your image is version 2.0 of the game.
If it is, it writes
Time_Bandit_STE.stx(the floppy version),Time_Bandit_STE.st(the same disk as a plain sector dump), andHD/TBANDIT.DAT(the game data for the hard-disk version). If it is not, the script says so and writes nothing. Your own image is only read, never changed.
Play
-
In an emulator: set it up as an STE with 4 MB
and a color monitor, insert
Time_Bandit_STE.stxas drive A, and boot from it. The game starts by itself. -
From a hard disk: copy
BANDIT.PRGandTBANDIT.DATfrom the folderHDinto one folder and runBANDIT.PRG. - The plain game: hold Shift while the game loads to run it without the enhancements.
The ZIP file also holds the source code of the loader and the
patches in 68000 assembly (loader.s,
remake.s), the Python tools for the palettes, the
byte-for-byte checks, and the test runs, and a README with the
options, the measurements, and these instructions in more
detail.
ZIP file, 4 MB: the patch, its source code, the tools,
and a README.
The game is not included. You need a
Pasti disk image (.stx) of Time Bandit
version 2.0
(how to use it).
Sources
- Time Bandit on Wikipedia: release history, gameplay, and Harry Lafnear's account of its origins and sales.
- Everything else (code addresses, timings, screenshots) comes from our own analysis and measurements in Hatari 2.4.1 with EmuTOS 1.4.
Frequently Asked Questions
What does the new version change in Time Bandit?
On an Atari STE with 4 MB, the one-player game scrolls the full width of the screen in steady 2-pixel steps at 50 frames a second. The playfield grows from 11 × 11 to 20 × 11 tiles, the status display moves into a strip below it, and the colors use the STE's 4,096-color palette. The game's own logic and timing are untouched.
Why does the original Time Bandit stutter?
The camera and every character move in 4-pixel units, and a frame's work takes 1.84 screen refreshes on average. Screen updates therefore arrive after one, two, or three refreshes, and the eye reads that uneven timing as stutter.
Is the original game modified?
No. The original game data is never rewritten on disk. A small new loader loads and decrypts the game, patches it in memory, and then starts it. On a plain ST, the loader applies only the patches that ST can run.
Has it been tested on a real Atari STE?
Not yet. All testing ran in the Hatari emulator with EmuTOS, emulating an STE with 4 MB. Nothing has been tried on real STE hardware or with TOS 1.62.
Where can I download the STE version?
From this article, as one ZIP file of 4 MB. It contains the patch, its source code in 68000 assembly, the tools, and a README. The game itself is not included: you need a Pasti disk image (.stx) of Time Bandit version 2.0 for the Atari ST, and a script in the ZIP file builds the STE version from it.
Was this project made with AI?
Yes. It was done with Claude Code, Anthropic's AI coding agent. I set the goals and made the decisions; Claude did the hands-on work, from disassembling the game to writing the patches in 68000 assembly and measuring the results.
Related on This Site
If you would like to know more about the game itself, its worlds, and its history, this is my earlier article about it:
August 2024
Time Bandit
A Love Letter to the Game That Sold the Atari ST
When the Atari ST was introduced it had a stand-out game: Time Bandit by Bill Dunlevy and Harry Lafnear. It was a wonderful action-arcade game with kick-class graphics, puzzles and text adventure elements. In this slice of retro gaming and computer history we dive deep into the colorful time gates, two player action and strange new arcade worlds!
Read more