This is Century Electronics' 1983 arcade game Hunchback, rebuilt for the SAM Coupé in mode 4 (256×192, 16 colours) on its 6 MHz Z80 and SAA1099 sound chip. It plays all 15 arcade screens plus a multi-floor bell tower, and boots from one disk: the Lightning Studios intro, then the Hunchback loading screen, which stays up until the game starts.
- Artwork: every picture comes from the HunchbackFN.mgt graphics disk by Phil "Ramix" Wilson"
- Behaviour: speeds, timings, scoring and sounds were measured from the arcade ROM running in emulators of its two processors, not guessed. Since build 24, the bells and wall colours were also checked by disassembling the arcade code.
- Size: about 5,900 lines of Z80 source, a 57,344-byte game file loaded at 32768, and a Python build that goes from the graphics disk to a bootable .mgt in one command.
Features
Quasimodo crosses the castle battlements screen by screen to ring the bell, then rescues Esmeralda in her tower.
What's in the build
Screens : All 15 arcade screens, then the multi-floor bell tower; after a full round the castle carries on as screens 17 to 31, numbered as the arcade does
Hazards : Fireballs (three-frame flame), arrows from either side, pikemen in the wall, fire pits, gaps, one long swinging rope, the four ropes, the climbing knight
Scoring : Arcade points, including 400 / 300 / 200 / 100 for the rope, and the bonus added in the SCORE box when the bell rings
Bells : One bell joins the rope at the top for each screen; five in a row pay the super bonus, and losing a life empties the rope
Walls : The castle wall changes colour by screen, as on Century's original board: blue, then red from screen 5, then purple, olive and grey-green
Jumping : About 1 s in the air; steer it in mid-air with left and right (not when leaping off a rope)
Attract mode : Title, league table, instructions and a recorded demo, as in the arcade
Main menu : Any key opens it: insert coin, start game, redefine keys, current keys shown
High scores : League table with name entry: 8 letters, 30 s, held keys repeat, a 16×16 box marks the letter
Controls : O / P / SPACE (redefinable), the cursor keys, or a joystick on 6 / 7 / 0 / 9
Faithful to the arcade
The arcade board was emulated alongside the SAM version, so numbers were read off the original rather than estimated.
- Main CPU (Signetics 2650): sprite positions logged frame by frame gave the speeds: fireballs and arrows about 75 pixels a second, a second missile 1.3 s behind the first at about 87, and a jump of about 1 s.
- Sound CPU (Intel 8035): its DAC output gave every effect and tune (see Sound).
- Bells: in the arcade code, every lost life clears the bell count (the routine at 648E in hunchbkd), so five bells take five screens in a row without dying. The SAM version now does the same.
- Wall colours: the Donkey Kong conversion (hunchbkd) keeps one wall colour all game, but Century's original board (hunchbak) sets it from a table by screen number. The build follows the original board: blue for screens 1–4, red 5–8, purple 9–10, olive 11–12, grey-green 13, black 14 and blue for Esmeralda's tower.
- Screen numbers: the arcade counts 1–15, then 16 for the belfry, then 17–31 for the castle every time after. The bell bonus (100 × screen × (10 − k)) now uses those numbers.
- Graphics: the fireball is one sprite at a steady height, and arrows point the way they fly.
- Scoring: the rope points and bonus values follow the ROM.
Where the SAM version departs from the arcade, it's on purpose: steering in mid-air, the main menu and redefinable keys, a long swinging rope that is slightly harder to catch and leave, and a blue wall kept in the belfry (the arcade's table gives black there).
Sound
Every effect and tune is the arcade's own, measured from its sound CPU and replayed on the SAA1099.
- mksnd.py runs an emulated Intel 8035 on the arcade sound ROM and records each command's DAC output.
- Every 1/50 s it takes the pitch and volume of that square wave and turns them into an SAA1099 note and volume.
- For the tunes (start tune, bell, fanfare, extra life, rope notes) it reads the tone at the middle of each 1/50 s, so every note starts on the nearest frame and fades cleanly.
- The game plays these runs from the frame interrupt, so the start tune finishes before play begins.
The sampler experiment
A build also played the arcade's DAC output through Blue Alpha, SAMdac, EDdac and Quazar Surround interfaces, clocked by the MIDI OUT interrupt at about 2,800 Hz. It worked, including a fix found from SimCoupe's source for the MIDI timing, but every arcade sound is a square wave, and at that rate the higher ones picked up off-key tones. The SAA1099 makes the same square waves cleanly, so the sampler options were removed.
Graphics and screen
The game draws in mode 4 with sprites cut straight from the HB SP sprite page and screens built from the HB MU mock-ups.
- Cutting: mkgfx.py reads the graphics disk and writes every sprite, tile and palette as assembler data; nothing was redrawn by hand.
- The climbing knight: his four frames sit on bricks on HB SP, and his armour is the same teal as the mortar. mkgfx.py now fits the brick pattern behind each frame and keeps only what isn't brick or mortar, so he no longer carries bits of mortar up the wall.
- Wall colour: the wall is palette colour 2, set as each screen starts. The SUPER BONUS lettering, the SCORE box figures and the lives icons moved to colour 6, a fixed copy of the blue, so only the wall changes.
- Mirroring: Quasimodo's left-facing frames are made at run time by mirroring the right-facing ones, which saved memory.
- Buffers: the game picks three free page pairs at start-up and draws into them, so nothing flickers.
- Title: the HB Main picture is copied into a buffer, and the figures and hearts are drawn over it.
- Fire pits: the flames are drawn from tiles and masked over the brown 3D side of the wall.
- Designs added during testing: the bordered SCORE box and the brown wedge on black at the top of each gap came from small drawings on Image1.mgt; the fireball and arrows were mirrored to face the way they fly.
Credits
Original game : Hunchback, Century Electronics, 1983
Graphics : Phil "Ramix" Wilson: the HunchbackFN.mgt artwork (loading screen, title, screen mock-ups, sprite page) and the Image1.mgt designs
Intro : Lightning Studios logo and intro, from the Moon Cresta LS3 disk
Arcade reference : MAME ROM sets hunchbkd (Donkey Kong conversion) and hunchbak (Century’s original board)
Conversion code and tools : Written with Claude (Anthropic)
Direction and testing : Phil "Ramix" Wilson, testing on SimCoupe and real hardware.
This is a fan conversion and isn't affiliated with Century Electronics.