Releases: angree/openttd_amiga_68k
Release list
v0.9.2 - language-pack fix (0.9.1 would not start)
OpenTTD 1.0.5 for AmigaOS 68k — v0.9.2 (language-pack fix)
Fixes the "No available language packs" startup failure in 0.9.1. The 0.9.1
archive was packed on Windows with backslash (\) path separators, which are not
path separators on the Amiga — so the .lng files never landed in a lang drawer
and the game refused to start. This archive is packed with normal forward-slash
paths; the language files are included and current, and the game starts normally.
If you downloaded 0.9.1, replace it with this build.
Everything from 0.9.1 is unchanged — the native hand-written AI (cargo and
passenger trains, intra-town buses), the working Borrow/Repay buttons, and the
sensible new-game defaults (2 competitors, £300,000 max loan, Medium competitor
speed, no breakdowns). Requirements unchanged: 68020 minimum, no FPU, AGA /
OCS-ECS / RTG, 24 MB Fast RAM. See README.txt inside the archive.
v0.9.1 - native hand-written AI (trains + buses)
OpenTTD 1.0.5 for AmigaOS 68k — v0.9.1
Working computer opponents. The AI is written by hand, from scratch in native
C++. Neither AI — the old in-engine one nor OpenTTD's newer Squirrel AI — would run on
this 68k port without what would very likely have been catastrophic amounts of work
(Squirrel's AI-suspend mechanism can't unwind on this toolchain), so the opponents are a
purpose-built native state machine instead. Buses and trains work for now: cargo
trains between industries, passenger trains between towns, and local bus routes inside
towns — the AI plans each rail line in full before spending a penny, borrows and repays
sensibly, and paces its expansion by the "construction speed of competitors" difficulty
setting.
Also in this release:
- The in-game finance Borrow / Repay buttons work (they silently did nothing on this
compiler before). - Sensible new-game defaults: 2 competitors, £300,000 max loan, Medium competitor
speed, no breakdowns. - The game hides its own software pointer by default and uses the Amiga system pointer.
- Version stamped in the intro window and the splash.
Requirements unchanged: 68020 minimum, no FPU needed, AGA / OCS-ECS / RTG, 24 MB Fast RAM
(8 MB Fast + 16 MB Z3 works). See README.txt inside the archive.
v0.8.1 - Workbench icon
A Workbench icon, and a launch fix on top of 0.8.0 (music).
- Proper NewIcons colour icon. 0.8.0 had no
.info; this adds a colour Workbench icon (NewIcons format, which is what classic Workbench renders in colour). - 1 MB stack in the icon. A Workbench launch takes its stack from the icon's
do_StackSize; the default ~4 KB hung the game. The icon now carries 1 MB, so it launches straight from Workbench by double-click. (Running from a Shell still works as before.)
Everything else is unchanged from 0.8.0 - same binary, same music. Unpack the drawer, keep splash.dat and the music folder beside openttd.
v0.8.0 - Music
Native music, for the first time.
- Music streamed from disk and played straight through Paula. The tracks are original 22 kHz IMA-ADPCM WAV (generated with Suno AI - no Transport Tycoon music is used or needed), decoded on the fly and played on two of Paula's four hardware channels with gapless double buffering. While music plays, sound effects share the other two channels; they get all four back when it stops. The title theme plays in the menu, the in-game tracks rotate, shuffled by default.
- The base music set is synthesised from the bundled WAV tracks and wired straight to the native player, so no copyrighted
.gmMIDI is needed or shipped. - No breakdowns by default, in every difficulty.
- The Workbench-style top bar is on for a first run.
- Computer opponents are off in this build; the native AI returns in a later release.
Unpack the drawer, keep `splash.dat` and the `music` folder beside `openttd`, and run it from a Shell. 68020 minimum, no FPU required, 24 MB Fast RAM. See README.txt inside.
Full source: the complete diff against OpenTTD 1.0.5 is in `patches/`, the native drivers in `native/`.
v0.7.0 - no FPU required, 68020 minimum
The FPU requirement is gone. 68020 is now the minimum.
Tested working on a bare 68020 and on a 68030 with no coprocessor. A 68LC040
should be fine too. 68040/40 is still what you want for comfort, 68060/50 for
full speed.
What it actually was
Not the maths. printf.
libnix routes the whole printf family through a single function,
__vfprintf_total_size, and in the 68881 build of that library GCC hoists two
double constants and the FPU register save into its prologue:
lea sp@(-92),sp
fmovemx %fp2/%fp4/%fp6,sp@-
fmoved #1e-10,%fp4
fmoved #-0.1,%fp2
All three execute on every call, whatever the format string. OpenTTD formats
strings while building its search paths, before logging exists, so an FPU-less
machine took a Line-F trap (Software Failure #8000000B) at startup with a
zero-byte log.
That empty log is exactly why this took so long to find. Terrain generation is
where the floating point actually lives, so that is where the search kept
going — and it is never reached.
Why "soft-float" builds had not helped
Because -msoft-float never reached the libraries. This toolchain maps
-m68040 onto the 68020+68881 multilib, because a 68040 has an FPU built
in, and -msoft-float does not undo it:
| flags | multilib linked | FPU instructions |
|---|---|---|
-m68040 |
libm020/libm881 |
60 |
-m68040 -msoft-float |
libm020/libm881 |
60 |
-mcpu=68020 -msoft-float |
libm020 |
0 |
The old builds were a hybrid — our code on the soft-float ABI, the C library
from the hard-FPU multilib. That same mismatch is the origin of the
__floatunsidf-returns-in-fp0 bug and of the miscompiled pow() that the
build notes had blamed on soft-float itself. Forcing everything hard-float made
the halves agree, which is why it looked like a fix — and made an FPU
mandatory.
A trap for anyone else on this toolchain: -print-multi-directory reports .
for all three of the above and is useless for telling them apart. The only
honest check is the link trace, m68k-amigaos-g++ <flags> -Wl,-t | grep libm881.
How it was proven
A standalone probe that logs through dos.library Write() only — never
through printf, so the log survives even when printf traps. Same source, same
68030/no-FPU config, one flag difference:
| build | log ends at | result |
|---|---|---|
-m68040 |
about to call snprintf |
Software Failure #8000000B |
-mcpu=68020 -msoft-float |
done - no FPU trap anywhere |
correct output |
It ships as build/probe/t_printf.c.
Everything else
Unchanged from 0.6.0 — AGA, OCS/EHB and RTG screen modes, Paula sound, and the
same known rough edges: window chrome comes out pink and brown in the OCS
modes, the minimap shows wrong colours there, and memory use is still high
because sprite size has not been reduced yet. Half-size graphics remain the
next step.
Still no music, still no networking.
Requirements
68020 minimum, no FPU. 68040/40 recommended, 68060/50 for full speed. AGA,
OCS/ECS, or a Picasso96 / CyberGraphX card. 24 MB. AmigaOS 3.0/3.1.
Installing
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
OpenGFX and OpenSFX are bundled — nothing from the original TTD is needed.
If it runs slowly, switch to a lores mode in Game Options. That is the single
biggest lever you have.
v0.6.0 - OCS modes
OCS screen modes.
- Two new entries in Game Options:
320x256 OCSand352x272 OCS. Real
6-bitplane Extra Half-Brite screens — 64 colours, the upper 32 forced by the
hardware to be half-brightness copies of the lower 32. - Chip RAM for the bitmap drops from 300 KB to 70 KB, and there is a quarter
less chunky-to-planar work per frame. - EHB exists on OCS and ECS as well as AGA, so this is the groundwork for
running on an A500 or A600. - Sprites are reduced to the 64-colour palette once when loaded, never per frame.
- Lores only — the sixth bitplane is the half-brite control, and OCS/ECS
cannot fetch six planes at hires bandwidth. A 640 OCS mode would be refused. - The splash now renders in whatever mode the game opens, so it no longer forces
an 8bpp screen.
One list for everything. AGA, OCS and RTG modes now all live in the Screen
resolution dropdown; the separate EHB toggle is gone. Switching between backends
needs a restart — the choice is saved immediately and the game says so on screen.
Fixed
352x272never actually worked, on AGA either. It exceeds the standard PAL
lores clip, so Intuition refused it withoutSA_Overscan. Nobody had checked.- A failed mode change left the game with no display at all — the screen is
closed before the new one opens, and there was no path back. It now restores
the previous mode. - Mode choices were not saved. The config writes sat after the screen open,
so a failed open discarded the choice. Picking AGA or OCS now also clears the
RTG flag, which is the way back out if you tried a graphics card and want to
leave. - Vertical stripes through text input fields. Not the converter — the 6-plane
c2p assumes pixels below 64, andGfxFillRectwas writing a literal 215 into
every edit box on each caret blink. Those extra bits leaked into the half-brite
plane. - Everything was tinted maroon. The EHB tables had been generated in the TTD
DOS palette while OpenGFX ships the Windows one; the grey ramp is the one range
where they really differ, so the interface reduced into the browns.
Known rough edges
Window chrome still comes out pink and brown rather than grey. The minimap shows
wrong colours — it writes palette values straight into the buffer, bypassing the
drawing primitives. Both are cosmetic and confined to the OCS modes.
The OCS modes cut colours and bitplanes but not sprite size, so they do not yet
lower the 24 MB requirement. Half-size graphics are the next step.
Requirements
Unchanged: 68030 with an FPU minimum, 68040/40 recommended, 68060/50 for full
speed. AGA or a Picasso96 / CyberGraphX card. 24 MB. AmigaOS 3.0/3.1.
Sound effects on by default (-s amiga), -s null for silence. Music is still
not implemented.
Installing
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
OpenGFX and OpenSFX are bundled — nothing from the original TTD is needed. See
LICENCES.txt for what is in the archive and under what terms.
v0.5.0 - Picasso96 / RTG
Picasso96 / RTG support.
- RTG screen modes, 8bpp, from 400x300 upward. They appear below the AGA
modes in Game Options. Works with both Picasso96 and CyberGraphX. - On RTG there is no chunky-to-planar conversion at all. OpenTTD already
renders into a chunky 8bpp buffer, so on an 8bpp RTG screen it goes to the
display essentially unchanged — and c2p is the most expensive thing the driver
does on AGA (117 ms for a full frame on an 040/25). - Machines without a card are unaffected: detection fails safe and falls back to
AGA, logging why. - 640x512 AGA removed — 640x480 already covered it.
Requirements — corrected
24 MB Fast RAM, not the 16 MB previously stated. This is measured, not
estimated: the game will not start on 4 MB Fast + 16 MB Z3, but does on 8 + 16,
leaving about 10 MB free. The executable occupies 4.6 MB once loaded and the
sprite cache another 4 MB.
Stripping the binary would not help, which is worth saying because it looks like
it should: only 0.4 MB of the 5 MB file is symbols and debug information, and
AmigaDOS never makes that resident. The weight is code.
Otherwise unchanged: 68030 with an FPU minimum, 68040/40 recommended,
68060/50 for full speed. AGA or an RTG card, AmigaOS 3.0/3.1.
Sound effects are on by default (-s amiga); -s null for silence. Music is
still not implemented.
Building
The RTG path needs the CyberGraphX developer headers, which are not in this
repository — they are copyright phase5 digital products and we have no
redistribution licence for them. patches/README.md says where to get them and
which two need fixing before GCC 6.5 will accept them. Without them the AGA path
still builds; only RTG is lost.
Installing
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
OpenGFX and OpenSFX are bundled — nothing from the original TTD is needed. See
LICENCES.txt for what is in the archive and under what terms.
v0.4.1 - sound fixes
Small fixes on top of v0.4.0.
- Ambient sounds are capped to 2 of the 4 channels. Wind, jungle and
industry noise can no longer take the whole hardware and drown out
construction and vehicles. - Hard-panned sounds are audible again. Volume used whichever side the
channel happened to sit on, so a sound panned fully the other way got exactly
zero and was silent. - Finished sounds are collected every tick, not only when a new sound is
requested, so channels come back promptly. - The version is on the splash screen, top-right of the picture, so you can
see which build you are running. - The complete source diff is now in the repository (
patches/). 23 files
of ours were only ever in a local build tree; GPL v2 wants the corresponding
source, and now it is there.
Requirements unchanged: 68030 with an FPU minimum, 68040/40 recommended,
68060/50 for full speed. AGA, 16 MB Fast RAM, AmigaOS 3.0/3.1.
Sound effects are on by default (-s amiga); -s null for silence. Music is
still not implemented.
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
OpenGFX and OpenSFX are bundled — nothing from the original TTD is needed. See
LICENCES.txt for what is in the archive and under what terms.
v0.4.0 - it has sound
It has sound now.
Sound effects play through Paula directly. There is no software mixer: each
effect is handed to one of the four hardware audio channels and DMA plays it, so
once a sound has started the CPU does nothing more for it. Volume and panning
are the hardware's own registers rather than arithmetic over samples.
The conversion turns out to be nearly free, which is what makes this worth doing
on a 68030 at all. OpenSFX ships at 44.1 kHz 16-bit; Paula wants 8-bit and tops
out around 28.6 kHz on PAL, so the target rate is 22.05 kHz — exactly half.
Resampling is therefore "take every other sample", the depth change is a shift,
and both happen once per effect before it is cached in Chip RAM. Nothing is
computed per sample at playback time.
The price of that approach is four channels: a fifth simultaneous sound is
dropped rather than mixed. In practice it is rarely noticeable, and it buys a
sound system that costs essentially nothing while playing.
Enable with -s amiga (the default), or -s null for silence. Music is not
implemented yet.
Two things worth knowing if you write Amiga audio code
audio.device is one of the devices where you must use BeginIO() rather than
SendIO() or DoIO() — those clear ADIOF_PERVOL, the flag that says "use the
volume and period I just gave you". Without it every write inherits the
channel's previous volume, which after allocation is zero. The device accepts
everything, reports no error, and plays silence. That one cost a full debugging
round.
And Delay(1) does not block for one tick. Measured against the E-clock it
takes 40.98 ms, not the nominal 20. Durations that looked twice too fast
were a measurement artefact; playback had been correct the whole time. Timed
properly, playback matches the computed values within 5%, and the DMA floor is
real — below period ~124 the hardware clamps rather than going faster.
Requirements
Unchanged: 68030 with an FPU minimum, 68040/40 recommended, 68060/50 for full
speed. AGA, 16 MB Fast RAM, AmigaOS 3.0/3.1. An FPU is genuinely required
despite the -msoft-float build — the double-precision routines are stubs into
mathieeedoubbas.library and the stubs themselves execute FPU instructions.
If it runs too slowly, switch to a lores mode in Game Options: a quarter of the
pixels to convert and no interlace.
Still missing: music, networking, and any RTG path.
Installing
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
Nothing from the original Transport Tycoon Deluxe is needed or included —
OpenGFX and OpenSFX are bundled, so it runs as unpacked. See LICENCES.txt for
what is in the archive and under what terms.
v0.3 - runs on an 030, and the freezes are gone
Runs on a 68030 with an FPU now, not just an 040. The two bugs that made longer
games impossible are gone.
Fixed
Closing a rail line into a loop froze the machine. SmallSet::Remove() in
signal.cpp was miscompiled at -O1 — it read a struct field four bytes past
where it lived, so it never found anything to remove. That is harmless on open
track, where there is nothing to cancel; the moment a line was closed into a
loop, the two ends of the signal-propagation walk could no longer cancel each
other and it circled forever.
Generating a map froze the machine. libgcc's __floatsidf /
__floatunsidf return their result in FPU register fp0, which is the
hard-float convention, while every -msoft-float call site reads d0/d1.
Unsigned-to-double conversion therefore returned register garbage, which reached
max_x in the coastline pass, whose fill loop then never terminated and wrote
far outside the height map. native/openttd/fp_conv.c replaces those routines
with integer-only versions that build the IEEE-754 pattern directly. The
coastline loops are now bounded too, so a recurrence would cost you an ugly
coastline rather than the game.
The screen-resolution dropdown did nothing (settings_gui.cpp at -O1),
and the choice is now written to openttd.cfg immediately, so it survives a
reset rather than only a clean exit.
DELETE closes windows in the intro menu, not just in-game.
The game was briefly unplayable because an internal compiler error had
quietly caused the whole per-frame video driver to be rebuilt unoptimised. Only
the one function that trips the compiler is unoptimised now.
New
- A splash screen at startup. It is loaded from
splash.dat, not linked into
the executable, so the binary does not grow; it converts once and fades
through the palette. - Resolutions are labelled
AGA, ahead of Picasso96/RTG modes joining the same
list later. - On lores screens the menu and the OpenTTD logo no longer overlap.
- Arrow keys scroll the map, and right-drag scrolling no longer dead-ends when
the pointer reaches the edge of the screen.
Requirements
68030 with an FPU minimum. 68040/40 recommended, 68060/50 for full speed.
AGA, 16 MB Fast RAM, AmigaOS 3.0/3.1.
An FPU really is required, despite the binary being built -msoft-float: the
remaining double-precision routines are stubs into mathieeedoubbas.library,
and the stubs themselves execute FPU instructions. No 68LC040, no 68EC030. A
bare 68020 starts and reaches the menu but fails during map generation.
If it runs too slowly, switch to a lores mode in Game Options — a quarter of the
pixels to convert, and no interlace. On an 030 that is the only configuration
with a chance, and generate a small map.
Still missing: sound (there is no AHI driver yet), networking, and any RTG path.
Installing
Unpack anywhere and run openttd from a Shell, keeping splash.dat beside it.
Nothing from the original Transport Tycoon Deluxe is needed or included —
OpenGFX and OpenSFX are bundled, so it runs as unpacked. See LICENCES.txt for
what is in the archive and under what terms.