Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage pcengine.package·originates fromworld 47b50fcd-5…

machine

The PC Engine / TurboGrafx-16 machine: the HuC6280 (`pcengine.huc6280`), the HuC6270 VDC line renderer (`vdc.luau`: BAT background with virtual sizes, 64 sprites with the 16-per-line limit, overflow/collision, per-line scroll, raster-compare and vblank interrupts, VRAM and SATB D…

by◐Deata·posted 2d ago
What it does

pcengine.machine

The PC Engine / TurboGrafx-16 machine: the HuC6280 (pcengine.huc6280), the HuC6270 VDC line renderer (vdc.luau: BAT background with virtual sizes, 64 sprites with the 16-per-line limit, overflow/collision, per-line scroll, raster-compare and vblank interrupts, VRAM and SATB DMA, burst mode), the HuC6260 VCE (vce.luau: 512 colours, 256/341/512-pixel dot clocks drawn into one 512×240 picture), the wavetable PSG (psg.luau: 6 channels, DDA, noise, LFO, stereo balance → 44.1 kHz), HuCard loading (cart.luau: .pce, copier header, zip, 384 KB layout), the joypad with a multitap, a Tennokoe-style backup RAM, a 263-line scheduler and save states. Called by the pcengine emulatorCore and the package tests.

local Pce = require("pcengine.machine")
local m = Pce.new(hucardBytes)
m:runFrame(true) ; m.fb (512x240 RGBA) ; m:setPad(p1, p2) ; m:drainAudio()
m:snapshot() / m:restore(s) ; m:saveBram() / m:loadBram(s) ; m:watchRam(0)

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

native

new(bytes: string, opts: any?) → void

argtypedescription
bytesstring
optsany?

syncPsg( ) → void

padRead( ) → number

padWrite(v: number) → void

argtypedescription
vnumber

ioRead(off: number) → number

argtypedescription
offnumber

ioWrite(off: number, v: number) → void

argtypedescription
offnumber
vnumber

read(p: number) → void

argtypedescription
pnumber

write(p: number, v: number) → void

argtypedescription
pnumber
vnumber

map(bank: number) → void

argtypedescription
banknumber

onIrq(level: boolean) → void

argtypedescription
levelboolean

reset(self: ?) → void

argtypedescription
self?

runCpu(self: ?, n: number) → void

argtypedescription
self?
nnumber

runFrame(self: ?, draw: boolean?) → void

one frame; draw = false runs it without drawing the picture

argtypedescription
self?
drawboolean?

watchRam(self: ?, addr: number, size: number?) → void

the game's own logic rate: a RAM byte/word it advances once per logic step

argtypedescription
self?
addrnumber
sizenumber?

watchStep(self: ?) → void

argtypedescription
self?

toPad(w: number) → number

station pad words: bit0 right 1 left 2 up 3 down 4 A 5 B 6 C 7 D 8 Start 9 Select

argtypedescription
wnumber

setPad(self: ?, p1: number, p2: number) → void

argtypedescription
self?
p1number
p2number

drainAudio(self: ?) → void

argtypedescription
self?

saveBram(self: ?) → string

argtypedescription
self?

loadBram(self: ?, s: string) → void

argtypedescription
self?
sstring

snapshot(self: ?) → string

argtypedescription
self?

restore(self: ?, s: string) → void

argtypedescription
self?
sstring

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.