diff --git a/GAME.md b/GAME.md index dbccc67..63d045d 100644 --- a/GAME.md +++ b/GAME.md @@ -1,4 +1,4 @@ -# GAME.md — *Whack Hare!* +# GAME.md — *Nyuller* A two-player reaction-time duel for the Commodore 64. Two players stand back-to-back, take ten paces, and the first one to hit fire when the diff --git a/README.md b/README.md index a7cb424..69e7939 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ git submodule update --init --recursive ```sh cd src -./build.sh # compile main.c → build/whack_hare.prg (-O1) +./build.sh # compile main.c → build/nyuller.prg (-O1) ./build.sh -e # run in oscar64's built-in emulator (headless, fast) ./build.sh -p # PLAY: launch VICE in background (see build.sh --help) ./build.sh -v # run in VICE x64 (foreground, blocks terminal) diff --git a/src/AGENT_CONTEXT.md b/src/AGENT_CONTEXT.md index 7b39083..008c7d0 100644 --- a/src/AGENT_CONTEXT.md +++ b/src/AGENT_CONTEXT.md @@ -1,6 +1,6 @@ -# Project context for Whack Hare! subagent +# Project context for Nyuller subagent -You are implementing one phase of a C64 game called "Whack Hare!" +You are implementing one phase of a C64 game called "Nyuller." (quick-draw duel between a rabbit and a kid on a scooter, first to 5 wins). You will be given a specific phase task. This document is the context you need to do the work. diff --git a/src/audio.c b/src/audio.c index 758f869..24eeb52 100644 --- a/src/audio.c +++ b/src/audio.c @@ -1,4 +1,4 @@ -// audio.c — SID audio service for the Whack Hare! state machine. +// audio.c — SID audio service for the Nyuller state machine. // // The audio layer is a thin state-driven service. The game's // per-state "enter" actions call audio_state_enter() to set up the diff --git a/src/audio.h b/src/audio.h index 2b45558..70fbf0b 100644 --- a/src/audio.h +++ b/src/audio.h @@ -1,7 +1,7 @@ -#ifndef WHACK_HARE_AUDIO_H -#define WHACK_HARE_AUDIO_H +#ifndef NYULLER_AUDIO_H +#define NYULLER_AUDIO_H -// audio.h — SID audio service for the Whack Hare! state machine. +// audio.h — SID audio service for the Nyuller state machine. // // The audio layer is a thin state-driven service: the game's per-state // "enter" actions call audio_state_enter() to set up the SID for that diff --git a/src/banner.h b/src/banner.h index 3dfbd66..be442fc 100644 --- a/src/banner.h +++ b/src/banner.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_BANNER_H -#define WHACK_HARE_BANNER_H +#ifndef NYULLER_BANNER_H +#define NYULLER_BANNER_H // banner.h — text banner rendering in the multicolor bitmap. // diff --git a/src/build.sh b/src/build.sh index 0e824c6..e8bc26f 100755 --- a/src/build.sh +++ b/src/build.sh @@ -2,7 +2,7 @@ # build.sh — compile and optionally run a single C64 program with Oscar64. # # Usage: -# ./build.sh # compile main.c → build/whack_hare.prg (-O1) +# ./build.sh # compile main.c → build/nyuller.prg (-O1) # ./build.sh -e # run in oscar64's built-in emulator (headless, fast) # ./build.sh -p # PLAY: compile, wrap in .d64, launch VICE x64 detached # ./build.sh -P # PLAY: same as -p but with VICE x64sc (cycle-exact) @@ -17,11 +17,11 @@ # ./build.sh -g # compile with -g (adds source-level debug info) # # Output (in /build/): -# whack_hare.prg — loadable C64 program (run with x64, VICE, or real hw) -# whack_hare.asm — full 6502 listing -# whack_hare.map — region/section/object placement -# whack_hare.lbl — VICE monitor label commands -# whack.d64 — disk image wrapping whack_hare.prg (for VICE autostart) +# nyuller.prg — loadable C64 program (run with x64, VICE, or real hw) +# nyuller.asm — full 6502 listing +# nyuller.map — region/section/object placement +# nyuller.lbl — VICE monitor label commands +# nyuller.d64 — disk image wrapping nyuller.prg (for VICE autostart) # # For the development loop, use -e (oscar64's built-in emulator). It runs # without a display, needs no ROMs, and is faster than VICE. Use -p when @@ -48,8 +48,8 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" OSCAR64_DIR="$ROOT/oscar64" OSCAR64_BIN="$OSCAR64_DIR/bin/oscar64" BUILD_DIR="$ROOT/build" -PRG="$BUILD_DIR/whack_hare.prg" -D64="$BUILD_DIR/whack.d64" +PRG="$BUILD_DIR/nyuller.prg" +D64="$BUILD_DIR/nyuller.d64" mkdir -p "$BUILD_DIR" @@ -58,14 +58,14 @@ if [ "${1:-}" = "--kill" ]; then # pgrep -f uses ERE: + is a quantifier, so the regex must escape it. # x64(sc)? matches both "x64" and "x64sc". The process is launched # with the literal argument string `+confirmonexit`. - pids=$(pgrep -f "x64(sc)? \+confirmonexit.*whack\.d64" 2>/dev/null || true) + pids=$(pgrep -f "x64(sc)? \+confirmonexit.*nyuller\.d64" 2>/dev/null || true) if [ -n "$pids" ]; then echo "killing VICE process(es): $pids" kill $pids 2>/dev/null || true sleep 1 kill -9 $pids 2>/dev/null || true else - echo "no VICE process running (autostart of whack.d64)" + echo "no VICE process running (autostart of nyuller.d64)" fi rm -f "$BUILD_DIR/vice.pid" "$BUILD_DIR/vice.log" exit 0 @@ -132,11 +132,11 @@ build_d64() { echo "error: c1541 not found (needed to build the .d64 wrapper)" >&2 return 1 fi - c1541 -format wh,of d64 "$D64" >/dev/null 2>&1 || true + c1541 -format ny,of d64 "$D64" >/dev/null 2>&1 || true c1541 "$D64" >/dev/null 2>&1 </dev/null </dev/null <&2 fi - echo "running whack_hare in VICE ($EMU_CMD, blocking)" + echo "running nyuller in VICE ($EMU_CMD, blocking)" "$EMU_CMD" +confirmonexit -autostart "$D64" ;; esac @@ -176,9 +176,9 @@ if [ -n "$PLAY_VICE" ]; then fi # If a previous VICE is still running, kill it before launching a # new one — otherwise the two windows will fight for the same - # display and the old one's whack_hare will keep running in the + # display and the old one's nyuller will keep running in the # background. - existing=$(pgrep -f "x64(sc)? \+confirmonexit.*whack\.d64" 2>/dev/null || true) + existing=$(pgrep -f "x64(sc)? \+confirmonexit.*nyuller\.d64" 2>/dev/null || true) if [ -n "$existing" ]; then echo "killing previous VICE process(es): $existing" kill $existing 2>/dev/null || true diff --git a/src/draw.h b/src/draw.h index 59229a6..ccf89dd 100644 --- a/src/draw.h +++ b/src/draw.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_DRAW_H -#define WHACK_HARE_DRAW_H +#ifndef NYULLER_DRAW_H +#define NYULLER_DRAW_H // draw.h — DRAW screen counter rendering. // diff --git a/src/game.c b/src/game.c index 4d9f3b4..c49417c 100644 --- a/src/game.c +++ b/src/game.c @@ -1,4 +1,4 @@ -// game.c — Whack Hare! state machine. +// game.c — Nyuller state machine. // // See game.h for the transition diagram and game_init() / game_step() // documentation. Each state has an "enter" action (set the screen, diff --git a/src/game.h b/src/game.h index aead9dc..1c4536d 100644 --- a/src/game.h +++ b/src/game.h @@ -1,7 +1,7 @@ -#ifndef WHACK_HARE_GAME_H -#define WHACK_HARE_GAME_H +#ifndef NYULLER_GAME_H +#define NYULLER_GAME_H -// game.h — Whack Hare! state machine. +// game.h — Nyuller state machine. // // States (see game.c for the per-state behavior and the transition // diagram from GAME.md §9): diff --git a/src/input.h b/src/input.h index a3c45ff..7dbd184 100644 --- a/src/input.h +++ b/src/input.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_INPUT_H -#define WHACK_HARE_INPUT_H +#ifndef NYULLER_INPUT_H +#define NYULLER_INPUT_H // input_fire(port) — returns 1 if the fire button on the given joystick // port is currently pressed, 0 otherwise. diff --git a/src/main.c b/src/main.c index 31394cf..429fbb2 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -// main.c — Whack Hare! entry point (Phase 5: raster IRQ + idle loop). +// main.c — Nyuller entry point (Phase 5: raster IRQ + idle loop). // // Flow: // 1. memmap_setup() — bank out KERNAL/BASIC/CHAR ROM. diff --git a/src/memmap.h b/src/memmap.h index ed2fd29..5df0085 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_MEMMAP_H -#define WHACK_HARE_MEMMAP_H +#ifndef NYULLER_MEMMAP_H +#define NYULLER_MEMMAP_H #include diff --git a/src/notes.h b/src/notes.h index 539d207..41f28bb 100644 --- a/src/notes.h +++ b/src/notes.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_NOTES_H -#define WHACK_HARE_NOTES_H +#ifndef NYULLER_NOTES_H +#define NYULLER_NOTES_H // notes.h — 16-bit SID frequency values for the musical notes used by // the game. PAL C64 (985248 Hz system clock); see the oscar64 sid.h diff --git a/src/score.h b/src/score.h index f209200..80ee3c1 100644 --- a/src/score.h +++ b/src/score.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_SCORE_H -#define WHACK_HARE_SCORE_H +#ifndef NYULLER_SCORE_H +#define NYULLER_SCORE_H // score.h — score state and rendering for the top-of-screen score bar. // diff --git a/src/screens.h b/src/screens.h index 13a79d6..05969a0 100644 --- a/src/screens.h +++ b/src/screens.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_SCREENS_H -#define WHACK_HARE_SCREENS_H +#ifndef NYULLER_SCREENS_H +#define NYULLER_SCREENS_H // Screen IDs. Pass to show_screen() to switch to a new screen. #define SCREEN_TITLE 0 diff --git a/src/tick.h b/src/tick.h index 2777cd5..936df2d 100644 --- a/src/tick.h +++ b/src/tick.h @@ -1,5 +1,5 @@ -#ifndef WHACK_HARE_TICK_H -#define WHACK_HARE_TICK_H +#ifndef NYULLER_TICK_H +#define NYULLER_TICK_H // tick.h — 50 Hz raster IRQ setup for the game tick. // diff --git a/tasks.md b/tasks.md index 8c4edd7..fe21ea6 100644 --- a/tasks.md +++ b/tasks.md @@ -1,4 +1,4 @@ -# Tasks — Whack Hare! implementation plan +# Tasks — Nyuller implementation plan A phased, testable plan. Each phase ends with a *verify* step that proves the phase works. Each phase is one or more commits. Stop at any @@ -171,7 +171,7 @@ state. - `cd src && ./build.sh -e` displays the title screen in the oscar64 built-in emulator for 5 seconds (or until fire is pressed) then exits. -- (Optional, interactive) `x64 build/whack_hare.prg` in a real +- (Optional, interactive) `x64 build/nyuller.prg` in a real terminal session displays the title screen on real timings. Compare visually to `source_images/screen_title.png`. - The .map file shows our code is in $0900-$1100-ish, well within @@ -304,7 +304,7 @@ random source. **Verify:** - The game still works in the oscar64 built-in emulator (`build.sh -e`). -- (Optional, interactive) Launch `x64sc build/whack_hare.prg` +- (Optional, interactive) Launch `x64sc build/nyuller.prg` in a real terminal to confirm the game runs at cycle-exact PAL timing (50.125 Hz). The state transitions happen on the right raster lines. The 50 Hz tick is rock-solid. @@ -363,7 +363,7 @@ becomes audible. - GAMEOVER: longer fanfare. - The cues are recognizable and feel right (timing, volume). - (Optional, interactive) Run the audio cues under `x64sc - build/whack_hare.prg` in a real terminal to confirm the + build/nyuller.prg` in a real terminal to confirm the SID envelope generator timings are right; the oscar64 emulator is fast but not always bit-accurate on SID timing, and the `x64sc` cycle-exact path is the one that matches real hardware. diff --git a/tools/convert_screens.py b/tools/convert_screens.py index 84700dd..baf18b9 100644 --- a/tools/convert_screens.py +++ b/tools/convert_screens.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Convert a C64 game source PNG into multicolor-bitmap .bin + .attr files. -Phase 1 of the "Whack Hare!" C64 project. See tasks.md for the full spec. +Phase 1 of the "Nyuller" C64 project. See tasks.md for the full spec. The C64 multicolor bitmap mode (VIC-II $D011 BMM=1, $D016 MCM=1) is a 160x200-pixel, 2-bits-per-pixel, 4-colors-per-4x8-cell format. The