nes
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(mapper: ?, ppu: ?, apu: ?, pad1: ?, pad2: ?) → void
| arg | type | description |
|---|---|---|
| mapper | ? | |
| ppu | ? | |
| apu | ? | |
| pad1 | ? | |
| pad2 | ? |
read(self: ?, addr: number) → number
| arg | type | description |
|---|---|---|
| self | ? | |
| addr | number |
write(self: ?, addr: number, v: number) → void
| arg | type | description |
|---|---|---|
| self | ? | |
| addr | number | |
| v | number |
new(romBytes: string) → Nes
machine
| arg | type | description |
|---|---|---|
| romBytes | string |
runFrame(self: Nes) → void
Advance one video frame: CPU steps, PPU follows at 3 dots per CPU cycle, APU sequencer at CPU rate.
| arg | type | description |
|---|---|---|
| self | Nes |
setInput(self: Nes, pad1: number, pad2: number?) → void
Host input: one active-high byte per pad in standard read order (bit 0 = A, then B, Select, Start, Up, Down, Left, Right).
| arg | type | description |
|---|---|---|
| self | Nes | |
| pad1 | number | |
| pad2 | number? |
saveRam(self: Nes) → string
battery-backed PRG RAM
| arg | type | description |
|---|---|---|
| self | Nes |
loadRam(self: Nes, bytes: string) → void
| arg | type | description |
|---|---|---|
| self | Nes | |
| bytes | string |
Nes = typeof(setmetatable({} :: { [string]: any }, Nes))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.