2.3 KiB
Dev notes — 2023-08-30
IO brainstorming
- more IO? brainstorming…
- input byte - could be used for loading from tape, …
- maybe something like: you set $f0 to 1, then the io controller checks for that 1, and if it sees it, it loads a byte into $f1 and sets $f0 back to 0
- output byte - could be used for printing to a printer; controlling a robot turtle…
- input byte - could be used for loading from tape, …
Interrupts?
- interrupts?
- for keypad
- how do they work on KIM 1 (6502) and VIP (1802, Chip 8)?
- probably/maybe requires new instructions?
- sth like: current IP is stashed at $fd; JMP ($fe) to keypad interrupt routine; jmp ($fd) to return when done ?
CHIP-8
- chip8 doesnt have interrupts; just “skip if key (not) pressed”
- CHIP-8 virtual machine specification
1802
https://en.wikipedia.org/wiki/RCA_1802#DMA_and_load_mode:
The CDP1802 has a simple built-in DMA controller, having two DMA request lines for DMA input and output. The CPU only accesses memory during certain cycles of the multi-step machine cycle, which required between 8 and 16 clock cycles. External hardware could read or write data during these periods without interrupting the processor, a general concept known as cycle stealing.
R0 is used as the DMA address pointer. The starting address of the DMA data would be put in R0 and then pulling the appropriate read or write pin on the CPU low. The CPU responded to the DMA request by incrementing the value in R0, so that the next request automatically stored in the next location in memory. Thus by simply repeatedly triggering the DMA pins, the system would walk through the entire memory.
The DMA controller also provides a special "load mode", which allows loading of memory while the CLEAR and WAIT inputs of the processor are active. This allows a program to be loaded without the need for a ROM-based bootstrap loader. This was used by the COSMAC Elf microcomputer and its successors to load a program from toggle switches or a hexadecimal keypad with no required software and minimal hardware. The user could simply set the switches to the next value, toggle the read, and then move on. There was no need to change the addresses, that was done automatically by the DMA stepping.
COSMAC VIP
VIP manual
- looks like no keyboard interrupts
- see pp 22-25