varmfskii wrote: ↑Wed Jan 24, 2018 3:17 am
Is there somewhere I can find details about the -startup option for the next?
Sorry I'm quite busy atm so I haven't been keeping up. The following is in the context of the newlib.
The startup numbers determine what crt is attached to the compile. The crt is just some initialization code (eg zero bss) and some exit code (eg close open files) but it can also define what drivers (if any) are attached to stdin,stdout,stderr. It's possible for you to decide that yourself at compile time but easy options are pre-made and assigned to some crt numbers.
For the zx spectrum, some of this is briefly explained at the end of this page:
https://github.com/z88dk/z88dk/blob/mas ... loWorld.md
This mentions all the pre-made crts for the zx spectrum except the ones for if2 cartridges (they use the same crts but add "-subtype=if2" to the compile line).
The set for the zx next are still under construction. It inherits from the zx spectrum and adds a few more:
-startup=0 (crt0) spectrum screen
32x24 mode, no control code support
-startup=1 (crt1) spectrum screen
32x24 mode, control codes supported
-startup=4 (crt4) spectrum screen
64x24 mode, no control code support
-startup=5 (crt5) spectrum screen
64x24 mode, control codes supported
-startup=8 (crt8) spectrum screen
fzx proportional fonts, no control code support
-startup=9 (crt9) spectrum screen
fzx proportional fonts, control codes supported
-startup=16 (crt16) timex hi res screen
64x24 mode, no control code support
-startup=20 (crt16) timex hi res screen
128x24 mode, no control code support
-startup=24 (crt24) timex hi res screen
fzx proportional fonts, no control code support
-startup=30 (crt30) spectrum screen
32x24 rom print routine, no scanf much smaller than other crts because the rom is used for output
-startup=31 (crt31)
stdio not supported at all
The startup values can be modified by a subtype determined on the compile line:
-subtype=dot make a regular 8k dot command
adds 0x100 to startup
-subtype=dotx make extended dot command
adds 0x200 to startup
-subtype=dotn make Next dot command
adds 0x300 to startup
(see
https://github.com/z88dk/z88dk/tree/mas ... xn/startup for the actual crt code and what is currently there).
The adds select another crt with the same characteristics. A different crt is needed because dot commands have special requirements that the crt takes care of. So "-startup=30 -subtype=dot" will make a regular dot command using "-startup=30 (crt30) spectrum screen 32x24 rom print routine, no scanf much smaller than other crts because the rom is used for output" as above.
As mentioned, these are pre-set for your convenience but in a compile you can decide what terminals are open - there can be many windows of different sizes. The drivers are also object oriented so you can customize their behaviour by adding a little code too.