r/zxspectrum

ZX Spectrum Simulator

This is a rather useless fun project.

The Spectrum was my second computer after the ZX81. With recent advances in AI, writing yet another emulator is boring. So I decided to write a simulator instead.

My simulator implements all of the Spectrum‘s ROM and Basic interpreter, but does not emulate the Z80. That makes it super fast in Basic, but it can not run games.

Instead of a graphics screen, it runs in a terminal window and adapts to the terminal size. You can edit and run Sinclair Basic Programms at 80x45 characters or whatever other terminal size you like.

The repository is here:

https://github.com/MatthiasWM/ZX-spectrum-on-vt100

It’s tested on MacOS, but you have to compile it yourself. If anyone is interested, I can release Mac, Linux, and Windows binaries.

u/MatthiasWM — 4 days ago

Batman The Caped Crusader [1988] a Unique Comic book style Spectrum game

Batman: The Caped Crusader is an arcade adventure which uses a unique style, innovated by Jonathan Smith and Charles Davies, to display the action as though it takes place in a comic book.^([2]) This technique involved having each game location set in its own panel, often with a comic book style caption in the upper-left corner, with inactive panels faded out behind the current active location. This concept was expanded upon by Sega's Comix Zone seven years later.^([3])

The game was split into two independently playable parts in which Batman is faced with two of his most well-known adversaries: "A Bird In The Hand" featuring the Penguin and "A Fete Worse Than Death" which involved the Joker. The gameplay involves Batman using punches and kicks and his batarang (a thrown weapon) in order to fight the villains' henchmen as well as solving puzzles

youtube.com
u/SelfPromotionisgood — 4 days ago

Speccy and coding agents

One of the awesome things about old games is just how small their code and binaries were.

Take Elite, my favorite game of all time. The whole thing fits roughly into 0x5B00 - 0xFFFF — that's 42 KB. And even some of that isn't really game code: there’s the Lenslok code (throw-away stuff), the screen buffer, and simple things like the squares table used for fast multiplication.

The result? A complete Spectrum game image can easily fit into a coding agent's context window.

I’ve been experimenting with the Claude coding agent, and it turns out that:

  • Claude is perfectly capable of reading Z80 machine code directly, without a disassembler.
  • It is possible to make a very precise port of an old ZX Spectrum 48K game, even something as complex as Elite, to a modern programming language and platform.
  • You can untangle the original highly optimized game logic and study long-forgotten secrets and outstanding bugs.
  • With some guidance, you can even improve the original game and bring it closer to modern gaming standards.

Take Elite. I managed to port it to Java, move it to a modern 60 FPS engine, improve the controls and save system, and fix a number of original bugs.

Ever wondered why the police sometimes attacked you even when you were clean?

IT'S A MEMORY OFFSET BUG IN THE ORIGINAL CODE!

The aggressiveness check reads the low byte of your combat rating instead of your legal status, making police attacks essentially random.

And why are firearms useless to trade even though they're banned goods?

Another bug. The price is simply wrong, so I "fixed" it by setting the price directly.

And there is plenty more fun stuff hiding in those 42 KB.

If you want to dive into a modernized classic, you can play my version of Elite online:

https://scf37.me/tools/games/elite

reddit.com
u/Scf37 — 11 days ago

ZX Spectrum Best Joystick?

Hi guys, what’s the best (or your favourite) joystick or controller for your speccy? I have a couple of originals that aren’t the best to say the least, and a Cheatah 125+ (pictured) that works great with C64 but has strange inputs when plugged in to the speccy!

u/AJD_1975 — 13 days ago

50 tips for better Sinclair computing

Managed to hunt down this booklet from my childhood. From Sinclair User #35.

u/invalidcolour — 12 days ago

The port of Flashback is now playable!

TL;DR Now it is actually playable level 1 of the game! You can play it online right away!

Features included:

  • enemies
  • working elevators
  • objects to pick up and use
  • NPCs to interact with
  • doors that open and close

I kept the main character invulnerable for now. The balance might be a bit off at the moment, it's easy to fall from heights, and saving is left out for now.

Disk images for real (or emulated) hardware are also available:

Spectrum +3 / .DSK

Pentagon 128K / .TRD

Enjoy!

u/chvjak — 11 days ago
▲ 10 r/zxspectrum+1 crossposts

Enraptured game testing

Some progress - made some test levels in Tiled, custom importer into the game data. Graphics are very much place-holder, but enough to check mechanics work. Here showing destructable world, player charge, grappling hooks, moving platforms, "dark rooms" with limited visibility around player, flying stages (actually underwater, but same idea) switches to unlock doors etc. Currently working on the real graphics, as these don't really do it justice currently. There are a lot of game mechanics planned, including buying/making weapons, upgrades, augments, looting materials to make specialised tech, rescuing friendly allies, pickups including diaries to move story along, lots of enemy types, secret areas etc. Quite a lot really! The game will include help at any point, boss fights, save/load, achievements etc. There are still bugs, The lift at the end in the video got confused when I dashed across the stop/start button, and I'm sure I'll find a lot more, but it mostly works!

youtube.com
u/r_retrohacking_mod2 — 10 days ago
▲ 7 r/zxspectrum+1 crossposts

gnubg for the zxspectrum

I made a cut-down version of gnubg for the ZX Spectrum, available to play now. It's written jointly with AI: I know some people are against use the use of AI; I totally get that, and think that's a reasonable position. You're invited to ignore the game and the site.

It's available on zxgammon.pages.dev, which includes all the source code, and a playable emulation. The site provides helpful scaffolding -- some pretend "loading" as if from tape, match export after your game/match is over, context-dependent keys to click on -- but there's no cheating here, you can download the .sna or .tap and run it on any ZX Spectrum emulator or even on genuine hardware. The emulator plays at the speed it would on the original hardware, but there's an option to run it at 4x speed if you don't like to wait so long for it to think.

The entire site and source code of the game is released under the GPG.

The app works pretty much like gnubg: the same input features and a neural net (smaller than gnubg's). It does something like filtered 1-ply (what xg would call 2-ply) both for moves and cube decisions. It has only 1 output (equity) unlike gnubg which outputs win/win gammon/win backgammon/lose gammon/lose backgammon.

To keep it playable, I tried to limit thinking time to around 10 seconds, and mostly it's faster than that, and just occasionally a few seconds longer.

The app plays pretty well, around on 3-4 PR for money and 1-pt matches, going to around 4-5 PR for match play. So better than most humans, but some distance from top players. It has more of a personality than most backgammon programs I think.

zxgammon.pages.dev
u/Spirited-Lawyer-7337 — 11 days ago