Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions homebrew/dialbug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/
__pycache__/
dialbug.wsc
dist/
release/battery-glow-mednafen-proof.wav
release/swansong-final-frame.png
release/swansong-playtest-report.json
release/verification-report.json
release/tracks/
674 changes: 674 additions & 0 deletions homebrew/dialbug/COPYING

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions homebrew/dialbug/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Credits and provenance

- **Dialbug** title, original SD mobile-suit technician direction, interface, native
cartridge player, and five-song score: newly created for this project.
- OpenAI ImageGen: original Dialbug visual-development master, generated from
the archived prompt in `assets/source-art/`; the runtime derivative and exact
interface typography were selected and built specifically for this ROM.
- **Humming Cat** compact sound-driver/data-player concept: DOI Hiroyuki, beta
04, May 12, 2002. It is credited as a technical research reference, not as
Dialbug's name, mascot, artwork, soundtrack, or distributed code.
- Wonderful Toolchain and WonderSwan system libraries: Adrian “asie” Siekierka
and contributors; linked system libraries are zlib-licensed and the GCC
runtime uses the GCC Runtime Library Exception. See `THIRD_PARTY_NOTICES.md`.
- Swan Song desktop playtest engine: its bundled pinned ares backend and Swan
Song contributors, with exact build identity recorded in release evidence.
- Mednafen: independent WonderSwan boot, checksum, and WAV-recording proof.

Humming Cat research reference:
<http://wwgp.qute.co.jp/2002/entry/00073/hcbeta04.lzh>

No Humming Cat binary, compiler, sample song data, name treatment, or mascot art
is included in Dialbug.

Dialbug's project-authored material is released under GPL-3.0-or-later. See
`COPYING` and `release/LICENSE_STATUS.md`.
73 changes: 73 additions & 0 deletions homebrew/dialbug/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2026 Regionally Famous contributors

WONDERFUL_TOOLCHAIN ?= /opt/wonderful
TARGET := wswan/medium
include $(WONDERFUL_TOOLCHAIN)/target/$(TARGET)/makedefs.mk

MAKEFLAGS += --no-builtin-rules

NAME := dialbug
BUILDDIR := build
ELF := $(BUILDDIR)/$(NAME).elf
ELF_STAGE1 := $(BUILDDIR)/$(NAME)_stage1.elf
ROM := $(NAME).wsc

SOURCEDIRS := src
ASSETDIRS := assets/runtime
INCLUDEDIRS := src $(BUILDDIR)/assets
LIBS := -lwse -lwsx -lws
LIBDIRS := $(WF_TARGET_DIR)

INCLUDEFLAGS := $(foreach path,$(INCLUDEDIRS),-I$(path)) \
$(foreach path,$(LIBDIRS),-isystem $(path)/include)
LIBDIRFLAGS := $(foreach path,$(LIBDIRS),-L$(path)/lib)

CFLAGS := -std=gnu11 -Wall -Wextra -Werror \
$(WF_ARCH_CFLAGS) $(INCLUDEFLAGS) \
-ffunction-sections -fdata-sections -fno-common -Os -MMD -MP
LDFLAGS := -T$(WF_LDSCRIPT) $(LIBDIRFLAGS) $(WF_ARCH_LDFLAGS) $(LIBS)

SOURCES_C := $(shell find $(SOURCEDIRS) -name "*.c")
SOURCES_WFPROCESS := $(shell find $(ASSETDIRS) -name "*.lua")
OBJS_ASSETS := $(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_WFPROCESS)))
OBJS_C := $(patsubst %.c,$(BUILDDIR)/%.o,$(SOURCES_C))
OBJS := $(OBJS_ASSETS) $(OBJS_C)

.PHONY: all clean verify package

all: $(ROM)

$(ROM): $(ELF_STAGE1)
@echo " ROM $@"
$(BUILDROM) -c wfconfig.toml -o $@ --output-elf $(ELF) $<

$(ELF_STAGE1): $(OBJS)
@mkdir -p $(@D)
@echo " LD $@"
$(CC) -r -o $@ $(OBJS) $(WF_CRT0) $(LDFLAGS) -lgcc

$(BUILDDIR)/%.o: %.c | $(OBJS_ASSETS)
@mkdir -p $(@D)
@echo " CC $<"
$(CC) $(CFLAGS) -c -o $@ $<

$(BUILDDIR)/%.lua.o: %.lua
@mkdir -p $(@D)
@echo " PROCESS $<"
$(WF)/bin/wf-process -o $(BUILDDIR)/$*.c -t $(TARGET) \
--depfile $(BUILDDIR)/$*.lua.d \
--depfile-target $(BUILDDIR)/$*.lua.o $<
python3 scripts/normalize_wfprocess_c.py $(BUILDDIR)/$*.c
$(CC) $(CFLAGS) -c -o $@ $(BUILDDIR)/$*.c

clean:
$(RM) $(BUILDDIR) $(ROM)

verify: $(ROM)
python3 scripts/verify_release.py

package: verify
python3 scripts/package_release.py

-include $(OBJS:.o=.d)
61 changes: 61 additions & 0 deletions homebrew/dialbug/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Dialbug

Dialbug is a self-contained WonderSwan Color chiptune-player ROM with five
original songs and its own SD mobile-suit-style technician identity. Its
signature parts are amber armor, a split cyan visor, asymmetric tuning antenna,
round tuner core, circuit radiator backpack, and mixer gauntlet. SD proportions
keep the helmet, shoulders, chest, hands, and feet readable at 72×64 pixels.

The player provides four hardware channels, wavetable instruments, channel-3
hardware sweep, channel-4 noise percussion, per-frame envelopes, looping patterns, variable playback
speed, master volume, pause/restart, per-channel mute, and a live mix display.

## Interface art

The high-resolution Dialbug SD master, exact ImageGen prompt, and provenance
record are in `assets/source-art/`. Run
`python3 scripts/build_interface_art.py` to reproducibly reduce the mascot to a
72×64, four-color PNG. Wonderful Toolchain converts it into 9×8 native 2bpp
tiles. Titles, values, meters, and control hints are rendered exactly by ROM
code rather than generated as part of the image.

## Controls

- X-pad left/right: previous/next song
- X-pad up/down: volume up/down
- A: pause or continue
- B: restart the current song
- Start: cycle 50%, 75%, 100%, 125%, and 150% speed
- Y1/Y2/Y3/Y4: mute channels 1/2/3/4

## Build

```sh
source /opt/wonderful/bin/wf-env
python3 scripts/build_interface_art.py
make
```

The output is `dialbug.wsc`.

## Technical provenance

DOI Hiroyuki's 2002 WonderWitch Humming Cat project was a research reference
for the compact VBlank-sequencer/player concept:

- <http://wwgp.qute.co.jp/2002/entry/00073/hcat/>
- <http://wwgp.qute.co.jp/2002/entry/00073/hcbeta04.lzh>

Dialbug does not use the Humming Cat name as its product identity and does not
copy its mascot, player binary, driver binary, or sample song data. The native
cartridge implementation, five-song score, title, mascot, and interface are new
for this project.

## Status

Version 0.1.0 is an emulator-qualified public release under
GPL-3.0-or-later. Its deterministic package includes the ROM, complete
corresponding Dialbug source, license, notices, and hash-bound evidence.

Do not claim physical WonderSwan-family, flash-cartridge, Analogue Pocket, or
Dock compatibility until the hardware checks in `release/` have been completed.
48 changes: 48 additions & 0 deletions homebrew/dialbug/THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Third-party notices

Dialbug is built with Wonderful Toolchain. The public release does not include
the compiler or toolchain installation, but the ROM statically links the
following runtime components.

## Wonderful target-wswan-syslibs

Installed package: `target-wswan-syslibs 0.2.0.r254.d7d97ce-1`

License: zlib

Copyright (c) 2022, 2023, 2024 Adrian "asie" Siekierka

This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use
of this software.

Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject
to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

## Wonderful IA-16 GCC runtime

Installed package: `toolchain-gcc-ia16-elf-gcc-libs
6.3.0.r147159.e7507d1845e-1`

License: `GPL-3.0-or-later WITH GCC-exception-3.1`

The GCC Runtime Library Exception permits eligible compiled programs to use
the GCC runtime without imposing GCC's license on independently written code.
The Dialbug source is independently released under GPL-3.0-or-later. The
exception text and GCC sources are available from the Wonderful Toolchain GCC
package source identified above.

## Build-time asset tools

Wonderful's `wf-process` Lua modules used by this project identify themselves
as MIT-licensed. They run at build time and are not embedded as Lua source in
the distributed ROM.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions homebrew/dialbug/assets/runtime/dialbug.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- SPDX-License-Identifier: GPL-3.0-or-later
-- Copyright (C) 2026 Regionally Famous contributors

local process = require("wf.api.v1.process")
local superfamiconv = require("wf.api.v1.process.tools.superfamiconv")

local files = process.inputs("dialbug-sd-mascot-v5.png")
for _, file in pairs(files) do
local tilemap = superfamiconv.convert_tilemap(
file,
superfamiconv.config()
:mode("wsc"):bpp(2)
:color_zero("#00091e")
:tile_base(0):palette_base(6)
)
process.emit_symbol("gfx_dialbug_mascot", tilemap)
end
16 changes: 16 additions & 0 deletions homebrew/dialbug/assets/source-art/asset-provenance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schema": "dialbug-source-art-provenance-v5",
"asset": "dialbug-sd-mobile-suit-imagegen-v5.png",
"created": "2026-07-18",
"generator": "OpenAI ImageGen built-in tool",
"mode": "edit/reference-guided-generation",
"purpose": "Original SD mobile-suit mascot source art for the Dialbug WonderSwan player",
"sha256": "228164e1875b03bd006ee8c6f64f48f205874facb3fce5f486e7c9cac6d5cf18",
"prompt": "dialbug-sd-mobile-suit-imagegen-v5.prompt.md",
"runtimeDerivative": "../runtime/dialbug-sd-mascot-v5.png",
"originality": {
"kept": ["amber armor", "separate cyan camera eyes", "asymmetric tuning antenna", "round tuner core", "radiator backpack", "three-lamp mixer gauntlet"],
"avoided": ["named Gundam replica", "classic twin V-fin", "red chin", "RX-78 color layout", "franchise weapon or shield", "known faction marks", "cat anatomy"]
},
"notes": "The v4 Dialbug mascot was used only as an identity reference for a targeted tiny-screen readability pass. V5 simplifies the face, antenna, chest core, shoulders, and mixer lights. Retired cat and insect assets were not used as inputs. Exact interface text is rendered by ROM code."
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Dialbug SD mobile-suit source-art prompt

- Generator: OpenAI ImageGen (built-in tool)
- Mode: edit/reference-guided generation
- Use case: original SD mobile-suit production sprite source
- Generated: 2026-07-18
- Master SHA-256: `60ae8d7ef0fe5e1e1e8be7d50adfff38278bbf9ad769f534a3f40f9b525b19f6`

## Prompt

Use case: precise-object-edit

Asset type: production sprite-source illustration for an original SD
mobile-suit mascot in a 72×64-pixel WonderSwan Color interface

Input image: use the most recent tall Dialbug mobile-suit sprite source only as
a character-design reference

Primary request: transform Dialbug into a true SD Gundam-style proportion
system while preserving its original identity; the result should instantly
read as an SD Japanese mobile suit, but it must not be a replica of any existing
Gundam

SD proportion rules: complete robot approximately 2.1 heads tall; enormous
mechanical helmet/head taking nearly half the total height; tiny compact armored
torso; very short stubby upper arms and thighs; oversized simple shoulder blocks
and forearms; small three-finger mechanical mitts; broad chunky lower legs; huge
simple split-toe block feet; sparse purposeful panel lines

Mechanical face: large angular helmet shell, one clean asymmetric tuning-fork
antenna on the left instead of a twin V-fin, strong brow, split cyan camera-eye
visor, compact vented faceplate, small tapered gunmetal chin guard with no red
chin; absolutely no human face

Original Dialbug signatures to preserve: burnt amber armor, midnight gunmetal
frame, bright cyan sensors, round analog tuner-core centered in the tiny chest,
two simplified circuit-radiator backpack plates, forearm mixing-console tool
with three cyan lamps

Pose/composition: one complete SD robot centered on a perfectly flat uniform
solid midnight navy #00091e background, neutral friendly heroic stance, slight
three-quarter turn, both feet and full antenna visible, large within the frame
with minimal padding

Style/medium: authentic late-1980s/1990s SD mecha cel art and sprite-source
design, crisp flat color blocks, hard clean silhouette, simple mechanical
shading, highly readable when reduced to 72×64

Color palette: only midnight navy background, gunmetal inner frame, burnt amber
armor, and electric cyan sensors

Constraints: original design; no exact Gundam head, no classic twin V-fin, no
RX-78 red-blue-yellow-white color layout, no franchise logo, no unit numbers,
no readable text, no watermark, no gun, no shield, no cat or animal anatomy, no
second character

Avoid: tall realistic limbs, complex layered armor, generic humanoid robot,
human mouth or eyes, chibi human face, toy photography, model-kit sprues, battle
scene, UI panels, background objects, floor shadow, glossy 3D, recognizable
named Gundam
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Dialbug SD mobile-suit source-art prompt — v5

Mode: OpenAI ImageGen built-in tool, edit/reference-guided generation.

Reference: the approved Dialbug v4 mascot. The reference establishes character
identity only; the result must remain an original design rather than reproduce
any named licensed mobile suit.

## Prompt

PRECISION CHARACTER REDESIGN / REFERENCE-GUIDED EDIT.

Use the supplied Dialbug image as the identity reference. Create a cleaner v5
of the SAME original mascot for conversion into a 72×64 four-color WonderSwan
sprite.

Preserve these identity invariants:

- Original super-deformed real-robot music mascot named Dialbug; never depict
an existing licensed mobile suit.
- About two heads tall: enormous mechanical helmet/head, tiny compact torso,
stubby limbs, broad block feet.
- Burnt amber armor, dark gunmetal frame, bright cyan optical/music accents,
very dark navy background.
- One asymmetric tuning-fork / antenna blade, a circular chest tuner core,
compact radiator-like backpack shapes, and a right forearm mixer/controller
gauntlet.
- Confident neutral front three-quarter stance, full body visible.

Targeted v5 improvements:

- Shorten and thicken the single asymmetric antenna so it survives at tiny
scale; keep it fully inside the image.
- Make the face unmistakably mechanical and instantly readable: two separate
angular cyan camera-eye shapes under one strong amber brow, a dark gunmetal
central faceplate with a compact vent, no human mouth, no smile, no nose, no
skin.
- Remove the huge cyan forehead panel. A tiny cyan forehead sensor is
acceptable, but cyan must be concentrated in the two eyes, circular chest
core, and exactly three simple indicator lights on the mixer gauntlet.
- Enlarge and simplify the circular chest tuner core.
- Simplify shoulder armor and backpack silhouette. Reduce panel-line noise and
incidental little marks.
- Make the stance slightly more frontal and stable, with clear gaps between
arms, torso, and legs.
- Make the mixer gauntlet a single readable rectangular music-control object
integrated into the right forearm, with exactly three vertically arranged
cyan square lights.
- Keep the left hand as a small mechanical three-finger mitt.
- No weapon, shield, gun, sword, logo, lettering, number, decal, pseudo-text,
cockpit, human pilot, scenery, floor, cast shadow, or extra props.
- Avoid a twin V-fin, red chin, white/blue/red hero palette, or any exact Gundam
franchise silhouette.

Rendering contract:

- Square character-design image, full body centered, about 82% of canvas
height, generous safe padding.
- True crisp pixel-art aesthetic with deliberate chunky clusters and hard
stair-stepped edges.
- Flat graphic color blocking only. Use exactly these visual colors with no
gradients, bloom, texture, glow, atmospheric lighting, transparency, or
antialias softness: deep navy `#00091e` background, gunmetal `#283543`, burnt
amber `#dc760a`, electric cyan `#22cfdc`.
- Quiet solid background, strongest silhouette possible, suitable for
downsampling and strict four-color quantization.
- Polished late-1980s handheld-game SD-mecha character portrait, but fully
original.
Loading