Add headings + Split notes that contained material from more than one day
This commit is contained in:
parent
4b35057f78
commit
762e84345d
|
|
@ -1,5 +1,7 @@
|
|||
# Dev notes — 2023-08-12
|
||||
|
||||
## Call stack
|
||||
|
||||
Brainstorming/sketching around subroutines with a return stack...
|
||||
|
||||
; need an instruction for IP → A i guess?
|
||||
|
|
|
|||
|
|
@ -8,9 +8,19 @@
|
|||
2. Highlight the most recent keypress on there
|
||||
- [ ] Notes re: ROM and/or tape loader
|
||||
|
||||
## Program ideas
|
||||
|
||||
- Programming ideas:
|
||||
- Keypad display
|
||||
1. Light pixel corresponding to most recent keypress
|
||||
2. Display character corresponging to most recent keypress
|
||||
- Draw dot at (x, y)
|
||||
- Move dot around display using keypad
|
||||
- Move dot around display using keypad
|
||||
|
||||
## Docs/graphics ideas
|
||||
|
||||
From apple note "2023-07-17 - cardiograph - worksheet for hand-assembling code… + other docs"
|
||||
|
||||
- [ ] docs/graphics: machine code quick ref (ops + short explanations + mnems)
|
||||
- [ ] docs/graphics: assembly quick ref (as above, plus assembler-specific syntax like constants)
|
||||
- [ ] docs/graphics: worksheet for hand-assembling
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# 2023-08-18 — Dev notes
|
||||
|
||||
From "2023-08-18 cardiograph loose thoughts" apple note
|
||||
|
||||
- use binary encoded punch cards for cardiog progs in machine code
|
||||
- try making a microbit based emulator
|
||||
- (microbit + hex keypad)
|
||||
- (machine code monitor like VIP…)
|
||||
- (+ tape input??)
|
||||
- a4 template with full size 80 col card
|
||||
- snake
|
||||
- [/] add simulator todo: 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
|
||||
- readme:
|
||||
- [x] readme: rename (or split up?) mem map / peripherals section
|
||||
- [x] ? readme: put 2 keypad charts side by side (they would fit on my phone)
|
||||
- [/] see paper notes on mem map
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# 2023-08-19
|
||||
|
||||
## ISA quick note
|
||||
|
||||
[/] reconsider ISA order in light of supercat comment here
|
||||
- [Why didn't the 6503 have increment/decrement opcodes for A?](https://retrocomputing.stackexchange.com/questions/13023/why-didnt-the-6502-have-increment-decrement-opcodes-for-a)
|
||||
|
||||
## Assembly pseudo-ops
|
||||
|
||||
- [/] look at use of `*` or `.` in assembly
|
||||
- [What does "jmp *" mean in 6502 assembly?](https://retrocomputing.stackexchange.com/questions/7998/what-does-jmp-mean-in-6502-assembly)
|
||||
|
|
@ -39,39 +39,4 @@ Put differently: it starts executing instructions at the address contained in `$
|
|||
- "Reset (RST): When the 6502's RST input gets pulled low and then brought back high, the 6502 starts its reset process, and gets the address to start executing program instructions from $FFFC-FFFD. Notice it does not start executing at address $FFFC, but reads it to get the beginning address of the routine where it should start executing. That routine will normally have to be in ROM."
|
||||
- [What address does the x86 begin executing at?](https://stackoverflow.com/questions/4004493/what-address-does-the-x86-begin-executing-at)
|
||||
- "The `cs` (code selector) register is set to `0xffff` and `ip` (instruction pointer) is set to `0x0000`."
|
||||
- [Why is the first BIOS instruction located at 0xFFFFFFF0 ("top" of RAM)?](https://superuser.com/questions/988473/why-is-the-first-bios-instruction-located-at-0xfffffff0-top-of-ram) (x86)
|
||||
|
||||
## Imported notes from earlier
|
||||
|
||||
### 2023-08-18 cardiograph loose thoughts
|
||||
|
||||
- use binary encoded punch cards for cardiog progs in machine code
|
||||
- try making a microbit based emulator
|
||||
- (microbit + hex keypad)
|
||||
- (machine code monitor like VIP…)
|
||||
- (+ tape input??)
|
||||
- a4 template with full size 80 col card
|
||||
- snake
|
||||
- [/] add simulator todo: 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
|
||||
- readme:
|
||||
- [x] readme: rename (or split up?) mem map / peripherals section
|
||||
- [x] ? readme: put 2 keypad charts side by side (they would fit on my phone)
|
||||
- [/] see paper notes on mem map
|
||||
|
||||
|
||||
## 2023-08-19
|
||||
|
||||
[/] reconsider ISA order in light of supercat comment here
|
||||
- [Why didn't the 6503 have increment/decrement opcodes for A?](https://retrocomputing.stackexchange.com/questions/13023/why-didnt-the-6502-have-increment-decrement-opcodes-for-a)
|
||||
|
||||
- [/] look at use of `*` or `.` in assembly
|
||||
- [What does "jmp *" mean in 6502 assembly?](https://retrocomputing.stackexchange.com/questions/7998/what-does-jmp-mean-in-6502-assembly)
|
||||
|
||||
|
||||
## 2023-07-17 - cardiograph - worksheet for hand-assembling code… + other docs
|
||||
|
||||
- [ ] docs/graphics: machine code quick ref (ops + short explanations + mnems)
|
||||
- [ ] docs/graphics: assembly quick ref (as above, plus assembler-specific syntax like constants)
|
||||
- [ ] docs/graphics: worksheet for hand-assembling
|
||||
- [Why is the first BIOS instruction located at 0xFFFFFFF0 ("top" of RAM)?](https://superuser.com/questions/988473/why-is-the-first-bios-instruction-located-at-0xfffffff0-top-of-ram) (x86)
|
||||
|
|
@ -1,18 +1,26 @@
|
|||
# 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…
|
||||
|
||||
## Interrupts?
|
||||
|
||||
- interrupts?
|
||||
- for keypad
|
||||
- how do they work on KIM 1 (6502) and VIP (1802, Chip 8)?
|
||||
- chip8 doesnt have interrupts; just “skip if key (not) pressed”
|
||||
- CHIP-8 virtual machine specification
|
||||
- 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:
|
||||
|
||||
|
|
@ -22,7 +30,7 @@ https://en.wikipedia.org/wiki/RCA_1802#DMA_and_load_mode:
|
|||
>
|
||||
> 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
|
||||
|
||||
|
|
|
|||
|
|
@ -137,19 +137,27 @@ the first is maybe clearer as an encoding; more elegant
|
|||
but mayber the second is easier to quickly read off of an LED display?
|
||||
|
||||
|
||||
## From apple notes — "cardiograph 2023-09-31"
|
||||
## Interrupts
|
||||
|
||||
From apple note "cardiograph 2023-09-31"
|
||||
|
||||
- [ ] interrupts…
|
||||
- [ ] for extended system? (“cardiograph+”?)
|
||||
- [ ] how does a big iron machine like a pdp, burroughs, system/360 load program?
|
||||
- [ ] what are the buttons for memory access on a microprocessor trainer like a kim-1, cosmac?
|
||||
|
||||
## Startup
|
||||
|
||||
From apple note "cardiograph 2023-09-31"
|
||||
|
||||
“Typically, a microprocessor will, after a reset or power-on condition, perform a start-up process that usually takes the form of "begin execution of the code that is found starting at a specific address" or "look for a multibyte code at a specific address and jump to the indicated location to begin execution". A system built using that microprocessor will have the permanent ROM occupying these special locations so that the system always begins operating without operator assistance. For example, Intel x86 processors always start by running the instructions beginning at F000:FFF0,[46][47] while for the MOS 6502 processor, initialization begins by reading a two-byte vector address at $FFFD (MS byte) and $FFFC (LS byte) and jumping to that location to run the bootstrap code.[48]”
|
||||
|
||||
→ so i could just have a ROM
|
||||
→ or maybe two possible configurations? because sth more Cosmac-like or Big Iron-like would be fun too
|
||||
|
||||
## From apple notes -- "features to add / extended system"
|
||||
## Extended system
|
||||
|
||||
From apple notes -- "features to add / extended system"
|
||||
|
||||
- convenience instructions
|
||||
- mul
|
||||
|
|
|
|||
|
|
@ -62,14 +62,14 @@ From earlier:
|
|||
- [More musings of computers past: Popular Electronics, the COSMAC ELF | brainwagon](brainwagon.org/2014/07/27/more-musings-of-computers-past-popular-electronics-the-cosmac-elf/)
|
||||
|
||||
|
||||
## Corrections
|
||||
## Startup: correction
|
||||
|
||||
It doesn’t execute “JMP $FF.” It just sets the IP to $FF on reset, and you put a JMP there in ROM.
|
||||
|
||||
- [ ] TODO: update docs elsewhere
|
||||
|
||||
|
||||
## More detailed CPU design + lower-level simulator
|
||||
## Detailed CPU design/low-level simulator
|
||||
|
||||
### Revising ISA
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
- Interrupts and CPU-pin-based general-purpose IO are too far from being relevant to the real goal of this project — forget about 'em
|
||||
|
||||
### Screen memory as a more general-purpose DMA/IO area
|
||||
### Screen memory as DMA area (general-purpose)
|
||||
|
||||
- ...but: it be cool to be able to print a copy of the screen...
|
||||
- You would have a pin for 'DMA request'. When you're ready to write she screen out to the printer, you pull that high, signalling the printer to read from the screen memory, and then pull the pin low again.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
# 2023-09-07 — Dev notes
|
||||
|
||||
## card 7 sept
|
||||
From apple note "card 7 sept"
|
||||
|
||||
XXIIVV — varvara
|
||||
## Peripherals brainstorm
|
||||
|
||||
[XXIIVV — varvara](https://wiki.xxiivv.com/site/varvara.html)
|
||||
|
||||
- i like their standardized IO…
|
||||
|
||||
|
|
@ -28,7 +30,9 @@ XXIIVV — varvara
|
|||
|
||||
- todo: look at uxntal runes and see how they compare to mine
|
||||
|
||||
## Interrupts
|
||||
|
||||
### uxn/varvara design
|
||||
|
||||
https://github.com/DeltaF1/uxn-impl-guide/blob/main/devices.md
|
||||
|
||||
|
|
@ -41,7 +45,9 @@ https://github.com/DeltaF1/uxn-impl-guide/blob/main/devices.md
|
|||
- Q: is this a standard design?
|
||||
- Q: let’s see some examples?
|
||||
|
||||
### Scamp CPU (+ CP/M, 6502...)
|
||||
|
||||
[jes/scamp-cpu: A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.](https://github.com/jes/scamp-cpu)
|
||||
|
||||
[Scamp CPU: A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system | Hacker News](https://news.ycombinator.com/item?id=29408046)
|
||||
|
||||
|
|
@ -59,7 +65,6 @@ https://github.com/DeltaF1/uxn-impl-guide/blob/main/devices.md
|
|||
|
||||
…
|
||||
|
||||
|
||||
> 6502 is a very simple CPU and you can learn all of its instructions in several hours. But as it uses 1- address instructions, the code gets pretty verbose. For example, to add 10 to a variable you will have to write:
|
||||
>
|
||||
> ```
|
||||
|
|
@ -78,23 +83,19 @@ https://github.com/DeltaF1/uxn-impl-guide/blob/main/devices.md
|
|||
> By the way, you can use Python and operator overloading so that the lines above written in Python will generate assembly code when executed. I have used << instead of = in assignment because Python doesn't allow to
|
||||
overload it.
|
||||
|
||||
•••
|
||||
### Apple II
|
||||
|
||||
!! [Keyboard interaction on the Apple II is entirely CPU-dependent, memory-mapped, a... | Hacker News](https://news.ycombinator.com/item?id=20404825)
|
||||
|
||||
### C64
|
||||
|
||||
[How the C64 Keyboard Works | C64 OS](https://c64os.com/post/?p=45)
|
||||
|
||||
|
||||
•••
|
||||
|
||||
[jes/scamp-cpu: A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.](https://github.com/jes/scamp-cpu)
|
||||
|
||||
•••
|
||||
## Reflections
|
||||
|
||||
i still want to understand the uxn approach better, and see if there’s prior art
|
||||
|
||||
•••
|
||||
...
|
||||
|
||||
it seems like not having interrupts is fine
|
||||
|
||||
|
|
@ -104,6 +105,8 @@ and this should really help with the goal of making the simplest CPU possible
|
|||
|
||||
another thing that will help is leaving DMA to some other chip… and having a pin that pauses the CPU (like 1802/6502) should make that easy
|
||||
|
||||
## CPU pinout brainstorm
|
||||
|
||||
which means I think the CPU pinout can just be:
|
||||
|
||||
- power
|
||||
|
|
@ -116,29 +119,31 @@ which means I think the CPU pinout can just be:
|
|||
|
||||
(for later thought: bank-switching requires a memory controller… and how do we want to interface with that?)
|
||||
|
||||
|
||||
•••
|
||||
|
||||
Todo: make index for dev notes
|
||||
|
||||
|
||||
•••
|
||||
### 1802 note
|
||||
|
||||
1802 clear + wait: load, reset, pause, run
|
||||
|
||||
•••
|
||||
## To do
|
||||
|
||||
Todo: make index for dev notes
|
||||
|
||||
## Bank switching
|
||||
|
||||
### Game boy
|
||||
|
||||
[game boy - How does the Gameboy's memory bank switching work? - Retrocomputing Stack Exchange](https://retrocomputing.stackexchange.com/questions/11732/how-does-the-gameboys-memory-bank-switching-work)
|
||||
|
||||
### C64
|
||||
|
||||
[Bank Switching - C64-Wiki](https://www.c64-wiki.com/wiki/Bank_Switching)
|
||||
|
||||
•••
|
||||
## ISA
|
||||
|
||||
consider an ISA with multiple operands?
|
||||
|
||||
good article: https://en.wikipedia.org/wiki/Orthogonal_instruction_set
|
||||
|
||||
## Platforms to think about writing simulators for:
|
||||
## Think about writing simulators for these platforms
|
||||
|
||||
- Web
|
||||
- Meowbit
|
||||
|
|
|
|||
|
|
@ -7,30 +7,30 @@
|
|||
- drop the Overflow flag?
|
||||
- … what flags does uxn have?
|
||||
|
||||
•••
|
||||
|
||||
-
|
||||
## Qs: Reading input
|
||||
|
||||
- what do we do if we want to ask the tape reader (etc.) to read in some data?
|
||||
- is it enough to have that device do polling??
|
||||
- what does uxn do?
|
||||
- networking???
|
||||
- how does the gameboy link cable work?
|
||||
- [emulation - How does the Gameboy Link Cable work? - Retrocomputing Stack Exchange](https://retrocomputing.stackexchange.com/questions/12549/how-does-the-gameboy-link-cable-work)
|
||||
|
||||
## Networking??? - Gameboy link cable
|
||||
|
||||
- how does the gameboy link cable work?
|
||||
- [emulation - How does the Gameboy Link Cable work? - Retrocomputing Stack Exchange](https://retrocomputing.stackexchange.com/questions/12549/how-does-the-gameboy-link-cable-work)
|
||||
|
||||
[Serial Data Transfer (Link Cable) - GbdevWiki](https://gbdev.gg8.se/wiki/articles/Serial_Data_Transfer_(Link_Cable))
|
||||
|
||||
|
||||
gb link cable has 1 gb clocking the other, for synchronization
|
||||
|
||||
program ideas:
|
||||
## Program ideas
|
||||
|
||||
- machine monitor w output to graph display
|
||||
|
||||
•••
|
||||
## Flags
|
||||
|
||||
- reconsider flags… i think i want to drop the overflow flag…
|
||||
|
||||
•••
|
||||
## Other educational machines
|
||||
|
||||
https://en.wikipedia.org/wiki/MIX
|
||||
|
||||
|
|
@ -39,8 +39,22 @@ https://en.wikipedia.org/wiki/DLX
|
|||
|
||||
https://en.wikipedia.org/wiki/MicroBlaze
|
||||
|
||||
! https://en.wikipedia.org/wiki/MikroSim
|
||||
|
||||
_these educational machines seem to never cover actually loading a program into memory / bootstrapping …_
|
||||
|
||||
[freedosproject/toycpu: A simulation of a Minimal instruction set computer](https://github.com/freedosproject/toycpu)
|
||||
|
||||
- great readme opcode reference
|
||||
- this has a front panel! loading!
|
||||
|
||||
|
||||
### LC-3
|
||||
|
||||
https://en.wikipedia.org/wiki/Little_Computer_3
|
||||
|
||||
#### Articles on simulating + LC-3's design
|
||||
|
||||
[Let's build an LC-3 Virtual Machine :: Rodrigo Araujo — Computer Scientist and Software Engineer](https://www.rodrigoaraujo.me/posts/lets-build-an-lc-3-virtual-machine/)
|
||||
|
||||
- nb: section on TRAP
|
||||
|
|
@ -89,45 +103,21 @@ KBDR = keyboard data
|
|||
and those seem to just have regular memory addresses
|
||||
|
||||
https://www.jmeiners.com/lc3-vm/supplies/lc3-ref-card.png
|
||||

|
||||
|
||||
•••
|
||||
|
||||
! https://en.wikipedia.org/wiki/MikroSim
|
||||
|
||||
•••
|
||||
|
||||
these educational machines seem to never cover actually loading a program into memory / bootstrapping ….
|
||||
|
||||
|
||||
•••
|
||||
## "IP" vs "PC"?
|
||||
|
||||
- should i rename IP to PC since that’s what everyone else calls it?
|
||||
|
||||
•••
|
||||
## Misc. references
|
||||
|
||||
[history - Which computers did Donald Knuth "mix" together to get MIX? - Retrocomputing Stack Exchange](https://retrocomputing.stackexchange.com/questions/18117/which-computers-did-donald-knuth-mix-together-to-get-mix)
|
||||
|
||||
•••
|
||||
[How a CPU works: Bare metal C on my RISC-V toy CPU · Florian Noeding's blog](https://florian.noeding.com/posts/risc-v-toy-cpu/cpu-from-scratch/)
|
||||
|
||||
https://edaplayground.com/
|
||||
|
||||
### PDP
|
||||
|
||||
[PDP-10 Arith-Tests](http://pdp10.nocrew.org/docs/instruction-set/Arith-Tests.html)
|
||||
|
||||
•••
|
||||
|
||||
[Learn PDP-11 Assembly Coding Lesson 1 - For absolute beginners! - YouTube](https://www.youtube.com/watch?v=sk5Y26Qb1Ow)
|
||||
|
||||
•••
|
||||
|
||||
[freedosproject/toycpu: A simulation of a Minimal instruction set computer](https://github.com/freedosproject/toycpu)
|
||||
|
||||
- great readme opcode reference
|
||||
- this has a front panel! loading!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[How a CPU works: Bare metal C on my RISC-V toy CPU · Florian Noeding's blog](https://florian.noeding.com/posts/risc-v-toy-cpu/cpu-from-scratch/)
|
||||
|
||||
|
||||
https://edaplayground.com/
|
||||
[Learn PDP-11 Assembly Coding Lesson 1 - For absolute beginners! - YouTube](https://www.youtube.com/watch?v=sk5Y26Qb1Ow)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# 2023-09-11 — Dev notes
|
||||
|
||||
Loading…
Reference in New Issue