2.4 KiB
2.4 KiB
To do
Research
- Learn how the C64's PC gets initialized (what is the initial value? how is it set?)
- Review CHIP-8
- read about the spec / ISA
- read these, and add them to the bibliography:
Documentation
- Improve docs for flags register
Design
- Add a flag for bank-switching to the ~zero-page
- Move the initial IP value, to eliminate the gap between it and the keypad pointer
- see paper notes
- Consider adding a VIP-style keypad-based machine code monitor
- reconsider ISA order in light of supercat comment here
- Re-order flags to put Overflow at the end (since it would be nice to be able to easily ignore it when introducing someone to the basics of the CPU)
Assembler
For consideration
- Subroutine stack
- Extended system (secret bonus operations)
Programming
- Write some more complex test programs
- Display (hex) numbers
- Greater than
- Minimal LOGO-ish interpreter for turtle graphics
Run-scripts
- Replace with running
./cpu.jsand./assembler.jsdiretly
Simulator
Assembler
- Return pure machine code when printing to stdout (and not in debug mode)
- Pass asm line thru to cpu to print when debugging
- asm: create a second array that stores every line with code (nor blank or comment only lines) + its line number
- cpu: accept an optional debugging array, print line # and statement
- Validate labels
CPU
-
Add a mode that prints the display as text, but still animates
-
Make single-stepping work with simulated keypad
-
Allow running pre-compiled machine code
I'm thinking of an interface like this...
$ ./cpu.js -mc code.bin $ ./cpu.js code.asm $ ./cpu.js --debug code.asmFull list of flags I want:
-d --debug -s --singlestep -p --prettydisplay -mc --machinecode
Possible under-the-hood improvements
- Do a proper binary version... (or lose the typed arrays?)
- Extract debugging to its own module
- DRY out addition and subtraction