Skip to content

rachel-multiverse/rachel-spectrum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rachel ZX Spectrum Edition - Platform #008

For Sir Clive Sinclair's rubber-keyed wonder!

LOAD "" CODE
R Tape loading error, 0:1

Overview

The ZX Spectrum implementation of Rachel - bringing the eternal card game to Britain's most beloved 8-bit computer! This is Platform #008 in the Rachel Multiverse, featuring Z80 assembly, the famous ATTRIBUTE CLASH, rubber keyboard input, and that iconic tape loading screech!

Features

Spectrum-Specific Features:

  • Attribute clash - Each 8x8 block can only have 2 colors!
  • Border effects - Classic rainbow borders during special events
  • BEEPER sound - Making music from a single-bit buzzer
  • UDG graphics - User-defined graphics for card suits
  • Rubber keyboard - Q,A,O,P for movement (no cursor keys!)
  • Tape loading - Complete with loading bars and screeching
  • 48K/128K support - Works on all Spectrum models

Game Features:

  • Full Rachel rules implementation
  • Up to 8 players (memory permitting)
  • All special cards working
  • AI opponents with Z80 efficiency
  • Color-coded cards (red/black) with attribute clash
  • Sound effects via the beeper

Building

Requirements

  • pasmo, z80asm, or sjasmplus assembler
  • FUSE, ZEsarUX, or Spectaculator emulator
  • Real ZX Spectrum (for authentic experience)
  • Tape recorder or DivMMC/DivIDE for loading

Compilation

# Using pasmo
pasmo --tapbas rachel.asm rachel.tap

# Using z80asm
z80asm -b rachel.asm -o rachel.bin
bin2tap rachel.bin rachel.tap

# Using sjasmplus
sjasmplus rachel.asm --raw=rachel.bin

Running

In FUSE Emulator:

fuse rachel.tap
# Then type: LOAD "" CODE
# Or use Tape -> Open -> Quick Load

On Real ZX Spectrum:

  1. Record TAP file to cassette tape
  2. Or use DivMMC/TZXDuino to load from SD card
  3. Type: LOAD "" CODE
  4. Press PLAY on tape deck
  5. Wait for iconic loading sounds...
  6. Experience attribute clash glory!

Controls

The Spectrum has no dedicated cursor keys, so we use:

  • Q: Up
  • A: Down
  • O: Left
  • P: Right
  • M: Select/Play card
  • SPACE: Draw card
  • H: Help
  • R: Rules

Alternative Sinclair joystick:

  • 6,7,8,9: Directions
  • 0: Fire

Graphics System

The Famous Attribute Clash

The Spectrum can display 8 colors at 256×192 resolution, BUT each 8×8 pixel block can only contain 2 colors (INK and PAPER). This creates the legendary "attribute clash" or "color clash" effect.

Card Display (8×8 blocks):
┌────┐
│ A♠ │  <- This entire block must be 2 colors only!
└────┘

Adjacent cards might clash:
[Red ][Black] <- Color bleeding between blocks!

UDG (User Defined Graphics)

We redefine characters A-D as card suits:

  • A: ♥ (Heart)
  • B: ♦ (Diamond)
  • C: ♣ (Club)
  • D: ♠ (Spade)

Sound System

The Spectrum has only a 1-bit beeper, but we can create:

  • Card play: Quick beep
  • Draw card: Lower beep
  • Special card: Two-tone beep
  • Victory: Ascending scale
  • Error: Buzz sound

All generated via OUT commands to port 254!

Memory Map

$0000-$3FFF: ROM (16KB)
$4000-$57FF: Screen display file (6KB)
$5800-$5AFF: Screen attributes (768 bytes)
$5B00-$5BFF: Printer buffer
$5C00-$5CBF: System variables
$5CC0-$5CCA: Reserved
$5CCB-$FF57: Program and data (~35KB on 48K)
$FF58-$FFFF: Reserved/Stack

Rachel loads at: $5B00 (23296)

Technical Details

Z80 vs 6502

This is our first Z80 implementation! Key differences:

  • Z80: 8-bit with 16-bit register pairs
  • More registers: AF, BC, DE, HL, IX, IY, SP, PC
  • Shadow registers: AF', BC', DE', HL' for fast switching
  • Block operations: LDIR, CPIR for memory operations
  • I/O ports: IN/OUT instructions vs memory-mapped

Spectrum Models Supported

  • ZX Spectrum 16K: Too small, sorry!
  • ZX Spectrum 48K: Full support ✓
  • ZX Spectrum 128K: Enhanced with AY sound ✓
  • ZX Spectrum +2/+3: Full compatibility ✓
  • Spectrum Next: Works with enhancements ✓

Loading Screen

We include a classic Spectrum loading screen:

  1. Multicolor loading bars
  2. "Program: rachel" text
  3. Border stripes during load
  4. That distinctive loading sound!
██░░██░░  Program: rachel
░░██░░██  Bytes: 32768
██░░██░░  
SCREEEEECH-beep-beep-SCREECH

Attribute Clash Strategies

Due to color limitations:

  • Cards are drawn with spacing to avoid clash
  • Red/black suits use careful positioning
  • Selection highlights use FLASH attribute
  • Border effects for global state changes

Fun Facts

  • The Spectrum sold 5+ million units
  • "Speccy" was UK's best-selling micro
  • Rubber keyboard was... controversial
  • Games came on cassette tapes
  • Loading could take 5+ minutes
  • Attribute clash became an art style!

Known Issues

  • Attribute clash is a feature, not a bug!
  • Rubber keyboard requires firm presses
  • No hardware sprites (all software rendered)
  • BEEPER sound can be grating
  • Loading from tape is... patient work

Cultural Impact

The Spectrum defined British gaming:

  • Bedroom coders revolution
  • Your Sinclair magazine
  • Jet Set Willy, Manic Miner
  • The Oliver Twins
  • Ultimate Play the Game (later Rare)

Development Notes

This implementation showcases:

  • Z80 assembly programming
  • Working within color constraints
  • Creative use of 1-bit audio
  • Efficient memory usage
  • Classic 8-bit optimization

The Sacred Rules

Full Rachel rules implementation in Z80 assembly, adapted for the Spectrum's unique constraints while maintaining gameplay integrity.

Status

Platform #008 of ∞ complete. 192 platforms to go...

God Save the Speccy!

License

MIT - Because Sir Clive would want it that way.


"LOAD "" CODE"
"R Tape loading error, 0:1"
"RANDOMIZE USR 23296"

ZX Spectrum: Where attribute clash became art.

About

Rachel ZX Spectrum Edition - Platform #008 - Attribute clash and rubber keys!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •