chip8
A module script.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
new(romBytes: string) → Chip8
| arg | type | description |
|---|---|---|
| romBytes | string |
rand( ) → void
clearDisplay(self: Chip8) → void
| arg | type | description |
|---|---|---|
| self | Chip8 |
setInput(self: Chip8, keys: number) → void
Host input: 16-bit active-high mask, bit n = hex key n.
| arg | type | description |
|---|---|---|
| self | Chip8 | |
| keys | number |
step(self: Chip8) → void
| arg | type | description |
|---|---|---|
| self | Chip8 |
draw(self: Chip8, vx: number, vy: number, n: number) → void
XOR-draw an n-byte sprite at (VX, VY): start position wraps, the drawn rows/columns clip at the display edge, VF reports any 1->0 collision.
| arg | type | description |
|---|---|---|
| self | Chip8 | |
| vx | number | |
| vy | number | |
| n | number |
render(self: Chip8) → void
Expand the display grid into the RGBA framebuffer (2×2 per cell).
| arg | type | description |
|---|---|---|
| self | Chip8 |
runFrame(self: Chip8) → void
One 60 Hz frame: cyclesPerFrame instruction steps, then the timer tick and a framebuffer refresh.
| arg | type | description |
|---|---|---|
| self | Chip8 |
voicesOf(self: Chip8) → void
Audio contract for the host MIDI bridge: one beeper voice while ST > 0.
| arg | type | description |
|---|---|---|
| self | Chip8 |
Chip8 = typeof(setmetatable({} :: { [string]: any }, Chip8))Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.