Skip to content
CaPustoPublic

About

A Minesweeper game remake for the Zeal 8-bit Computer

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zealmine

This is a remake of Minesweeper for the Zeal 8-bit OS, written in C for the Z80. It ships as a single keyboard-driven init program that boots straight from the OS disk and stays inside the kernel's 48 KiB init RAM limit.

Version: v0.1.0-rc1

Screenshots

Title screen Game
Title screen Game

Features

  • Classic minesweeper: reveal a cell, flag a mine, chord (reveal neighbors) by pressing an already-open cell
  • Fixed 14x12 board with 30 mines.
  • HUD row: mines left counter, sapper banner, and an MM:SS timer.
  • Keyboard and gamepad controls (arrows/WASD, Z/Space, X, R, Q).
  • Levels are determined by the generated data; the seed value incorporates hardware entropy at the start.

Controls

Action Keys SNES controller
Move the cursor Arrows / W A S D D-pad
Reveal / chord Z / Space B
Flag a mine X A
Restart R R shoulder
Quit (back to the OS) Q L shoulder

Building

Requirements:

Configure a zealenv.sh -style environment that exports the paths above, then:

source zealenv.sh

cmake -S . -B build
cmake --build build -j

The result lands in bin/zealmine.bin. The tile assets are regenerated from the source GIFs and Tiled layouts in assets/ at build time.

Building with ZDE

The Zeal Dev Environment supplies the toolchain and SDK paths. From the project directory, run:

zde cmake

Running

In the reference emulator, with the OS image that carries the disk:

zeal-native --rom path/to/zos/os_with_romdisk.img -u bin/zealmine.bin

The binary can also simply be copied to the SD card and run from the OS shell (note the drive letter, h: is the SD card by default):

h:/zealmine.bin

Real hardware

This game has been tested only under the Zeal 8-bit OS reference emulator — the author does not have a Zeal 8-bit computer at hand. There is no guarantee it works on real hardware (timing, video timing, SD/ROM behaviour and input can all differ), although nothing platform-specific is used beyond the standard SDK APIs. Testing on real hardware is very welcome.

Testing

Host-side unit tests for the field logic:

cc -std=c99 -Wall -Wextra -o test_field tests/test_field.c src/field.c
./test_field

Asset sanity checks live in tools/:

python tools/check_digits.py --zts build/assets/tiles.zts \
    --ztp build/assets/tiles.ztp --header src/zealmine.h
python tools/dump_tiles.py
python tools/preview_title.py -a build/assets

Layout

assets/    board, divider, soldier atlases; Tiled layouts; title GIF
src/       game, renderer, field logic, LZ77 tileset decoder
tools/     asset packing, checks, emulator driver (run_emu.py)
tests/     host C and asset regression tests
docs/      screenshots
bin/       prebuilt release binary (RC1)

License

This project is a non-commercial fan remake created for preservation and educational purposes.

MIT

About

A Minesweeper game remake for the Zeal 8-bit Computer

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages