1
0
Fork 0
mirror of https://github.com/imjasonh/nescript synced 2026-07-08 08:55:38 +00:00

Update future-work.md: mark completed items

13 items moved from backlog to "recently completed":
state dispatch, function calls, break/continue, return, transition,
array indexing, scroll, multiply/divide/modulo, shifts, multi-OAM,
const assignment error, break-outside-loop error, math in linker.

Remaining priority: IR codegen, sprite resolution, include, asset
pipeline wiring, debug mode, error polish, audio, language features.

https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3
This commit is contained in:
Claude 2026-04-12 02:07:50 +00:00
parent 1bbc2bc160
commit 5d2d242520
No known key found for this signature in database

View file

@ -333,15 +333,35 @@ spills to zero-page $02 for comparisons. A proper allocator would:
## Priority Order
### Recently completed (removed from backlog)
These items were documented as future work but have since been implemented:
- **State machine dispatch** — CMP + BNE + JMP trampoline dispatch table,
`current_state` in ZP $03, on_enter/on_exit handlers as JSR targets
- **Function call codegen** — JSR to function labels, ZP $04-$07 param passing,
RTS for returns
- **Break/continue** — loop_stack with JMP to continue/break labels
- **Return** — evaluate expr to A + RTS
- **Transition** — write state index + JMP to main loop
- **Array indexing** — TAX + LDA/STA with ZeroPageX or AbsoluteX
- **Scroll** — PPU $2005 writes (X then Y)
- **Multiply/divide/modulo** — JSR __multiply/__divide with shift-and-add/restoring division
- **Shift left/right** — ASL A / LSR A
- **Multi-OAM sprites** — sequential slot allocation (0-63), reset per frame
- **Const assignment error** — E0203 for assigning to constants
- **Break outside loop error** — E0203 for break/continue without enclosing loop
- **Math routines wired into linker** — gen_multiply/gen_divide included in ROM
### Remaining priority order
For someone picking up this codebase, the recommended order of work:
1. **State machine dispatch** (#5) — makes multi-state games actually work
2. **Function call codegen** (#2, calls/returns) — makes functions actually work
3. **Multi-OAM sprites** (#4) — makes games with >1 sprite possible
4. **Array index codegen** (#2, arrays) — makes array-based games work
5. **IR-based codegen** (#1) — enables optimizer to affect output
6. **Sprite name resolution** (#3) — makes custom graphics work
7. **Include directive** (#6) — enables multi-file projects
8. **Asset pipeline wiring** (#9) — PNG assets compile into ROMs
9. **Error message polish** (#10) — better developer experience
10. **Debug mode** (#7) — runtime debugging support
1. **IR-based codegen** (#1) — enables optimizer to affect output
2. **Sprite name resolution** (#3) — maps sprite names to CHR tile indices
3. **Include directive** (#6) — enables multi-file projects
4. **Asset pipeline wiring** (#9) — PNG assets compile into ROMs
5. **Debug mode** (#7) — runtime debugging support
6. **Error message polish** (#10) — unused error codes, missing validations
7. **Audio** (#12) — SFX/music driver
8. **Language features** (#13) — structs, enums, fixed-point