Log inGet started
Package

homebrew.module

Newest version

README.md

pcengine.homebrew

The HuC6280 runtime every shelf HuCard in pcengine.package is built on, the Luau helpers that turn pixel art, palettes, waveforms and note strings into cart data, and build(), which assembles the package's original games (CC0 1.0) into /zero/source/pcengine_roms. Called by hand when a game changes, and by the package tests.

  • Runtime (bank 0, $E000): boot (MMU, RAM/VRAM clear, VDC/VCE/PSG init), IRQ1 handler with a raster-split table (splitTab: line, BXR, BYR per split, applied by RCR interrupts) and vblank work (sprite table upload + SATB DMA, top-segment scroll, music), multitap reader for two pads, VRAM/palette block transfers, text and BCD printing, RNG, a 3-voice wavetable music driver with a drum track (noise hats; sampled DDA kick + snare streamed at 6.99 kHz by the timer interrupt once a game calls ddaInit), tone and noise sound effects.
  • Helpers: H.tile, H.sprite, H.spriteCells, H.rgb/H.hex, H.fontTiles, H.trackAsm("C4:8 E4:8 | G4:16"), H.drumsAsm, H.waveAsm, H.sineAsm, H.assemble(src, {dotclock, width}).
  • Games: nebula.luau (Nebula Storm), tanks.luau (Tank Duel).
local H = require("pcengine.homebrew")
H.build()          -- writes every .pce into /zero/source/pcengine_roms