From discussions in other threads...
Crystal and clock parameters, baud, and serial i/o pins...
At hub $0+
At hub $4+ with JMP at hub $0 to jump over parameters
At top of hub
What parameters are needed?
Having previously done this in P1 for my OS alone since I/we could not get any traction, let's have another go.
Here are some of the list of parameters that IMHO would be good to have...
* Current clock frequency (long) - same as hub $0 (long) in P1
* Current pll etc setting (long) - similar but expanded from hub $4 (byte) in P1
* RCFAST frequency (long) - initially say 25MHz (Chip to advise best value), and can be changed if determined by software
* HUBFREE pointer (long) - allows allocation of hub for other cogs
- eg using top of hub, then $FFF00 would mean $00000-$FFEFF is usable by program
- eg using bottom of hub, then $00100 would mean $00100-$FFFFF is usable by program
* Serial: cog, mode, TX & RX pins (long)
* Serial: baud (long)
* StdOut: TX mailbox (long)
* StdIn : RX mailbox (long)
* AuxCfg: LF/rows/columns (long) - typical terminal, 0-127 rows of 0-255 columns
* AuxPar: undefined (long)
* AuxOut: TX mailbox (long)
* AuxIn : RX mailbox (long)
* SD: mailbox (2*longs) - typically CMD/buffer/reply/sector
* Cogs stay resident: (long) - (word free) 1=don't reset on reboot
* Date/Time (long) - 6:4:5:5:6:6 for yy:mm:dd:hh:mm:ss
The mailbox concept allows bytes to be passed with byte parameters. If an extended mailbox is required, then a flag is set here together with a pointer to where in hub the bigger mailbox is located. The larger mailbox gets its space using/updating the HUBFREE pointer.