Ugh! for the Atari Falcon
-------------------------

This is my first and very likely last attempt to use Claude for decompilation of
a commercial game.

Ugh! has a special place in my heart -- it was a video game that a schoolmate
and I played almost every day back in 1993-94. On his 286, without any sound,
just the two of us, screaming at the silent PC. :-)

So when I saw in August 2026 that Krzysztof 'KtZ' Jarzyna / RetroBlitterTeam had
released his Ugh! for the Atari STE, I was delighted. I immediately offered to
make a Falcon version (I have no STE with me here in Australia and playing it on
an emulator would be a travesty) and he was kind enough to give me access to his
GitHub repo and even to prepare some proof-of-concept versions for me.

Then I realised that his version wouldn't please me as much as I'd hoped:

1. It is based on open_ugh, a clean-slate implementation of the game's physics
   and collision rules, so the game doesn't behave the same as the original.

2. It uses dml's AGT, i.e. it is mostly tailored to STE features and it could be
   challenging to add or change something for the Falcon. This quickly proved to
   be exactly the case -- it uses the STE's overscan, for example.

3. Graphics are limited to 16 colours, sound to 12.5 kHz, there is no rain, no
   passwords ...

4. It doesn't contain the team mode! Heresy!!!

Since I was already hooked on the idea of having Ugh! on my Falcon and the "AI
slop wave" was just beginning, I wanted to give it a try, too. In the end it
worked, but it was full of painful lessons.

Development
-----------

I had to restart the whole project twice (!) because when I let Claude loose, it
very quickly started producing total crap. One example: the initial "EGO
Software" screen was apparently made in some kind of animation software on the
Amiga. Since Claude doesn't possess a real brain, it didn't occur to it that it
could just turn it into a few simple fading / animation phases, and it went on
to implement a whole emulation layer of the Amiga's custom chips just to get the
animation right!!! It produced a 30 KB executable just to show the logo.

Another detour was the gradients and, in general, the choice of approach for
displaying more than 16 colours. 4bpp is too few, 5bpp (the Amiga's 32 colours)
is not available and 8bpp seemed too wasteful. In parallel to that I had to
investigate how feasible it is to create Timer B effects ("copper effects") on
the Falcon's VGA. Again, Claude was throwing all sorts of shitty suggestions at
me, but in the end I settled on a pretty nice approach: use 8bpp (256 colours)
even for the gradients, because with a smart allocation of colour slots one can
get away completely without any Timer B effects. Timer B is used only for the
water ripple effect and even that is not done in the way you'd think it is (true
VIDEL hacking there!).

And finally, since I'm a perfectionist, I couldn't settle for a "good enough"
approximation of the Amiga gameplay. I wanted EXACTLY the same gameplay,
graphics and sounds. That took me quite a while and numerous back-and-forths
with Claude. I had to build quite a complex test harness, from both the hardware
and the software point of view, to get this right. A very interesting
experience, and of course I gained a lot of knowledge about the Falcon hardware
this way, because Claude was really not afraid to try hundreds of different
approaches, completely off the books. ;)

Port features
-------------

So, what are you going to get:

- Original gameplay, physics, collisions, graphics, TFMX music and sounds
  (replayed as 16-bit stereo at 49170 Hz)

- 320x271 display at 50 Hz (the original Amiga game tick), both RGB and VGA

  - For a moment I was tempted to use the DOS version's 320x200 assets, which
    would allow me to produce a "proper" VGA/60 Hz version, but that would bring
    another issue: I would need to either mix DOS tiles with the Amiga game
    logic or decompile the DOS version, but then I'd have the same problem
    because its tick is 70 Hz...

  - RGB uses a 352px two-player scoreboard, VGA had to crop it to 320px (this is
    the only limitation of the whole game)

- 50 FPS on a stock 16 MHz Falcon; works on accelerated machines, too.

- Keyboard and Jaguar pad support in addition to classic joystick control;
  ignore instructions.txt, classic arrows + space bar are used (in team mode
  player 1 gets joy1+padA, player 2 joy0+padB+keyboard).

- Fixed an original bug which only accidentally didn't cause a crash on Amiga
  but it definitely caused it on Atari (just before the end sequence!)

- And last but not least: fixed graphics!!! Yes, that's right, the original
  Amiga and DOS games had some animation frames wrong! Look for example at the
  pterodactyl animation when presenting the main characters: you can clearly see
  one stray pixel while it is flying.

Credits
-------

- Original game: EGO Software

- DSP-Paula 2.4: Chris / Aura

- Disassembled game, tools, Atari Falcon port: Claude Opus 5.5

- Supervision, some Falcon routines, playtesting: MiKRO

Miro Kropacek aka MiKRO
29.11.2026, Brisbane / Australia
http://mikro.atari.org
