[Coco] HDB-DOS, NOS9, Multiple boot files
Willard Goosey
goosey at virgo.sdc.org
Wed Aug 8 04:16:24 EDT 2007
>From: "Chester Patterson" <vchester at setec-cr.com>
>Date: Tue, 7 Aug 2007 21:09:08 -0600
>
>For example: Standard boot term80 w1-7 etc on part 255, term32 no w etc on
>part 254 (for DeskMate, Robot Odyssey and other games), Multivue on part
>253, and so on.
(I'm not sure Robot Odyssey will even run under Level II...)
>The idea being to make the best use of my 512kb for each task AND boot to
>the appropriate TERM that the apps require.
The only one of those that will actually use up all 512K is Multivue,
and even that only if you get lots of stuff going at once. Plus,
gshell's little more than a toy, you'll eventually need real shell
windows anyway.
As far as which /term to use, 2 boot disks were always suffiencent for
me: an all windint boot, and a vdgint+windint boot.
>The only way I can figure on getting each OS9Boot go to the app is to
>customize the sysgo to chx and chd to the appropriate directories I want to
>boot to, and include that sysgo in the OS9Boot. Another idea I had was to
>diddle one sysgo to run startMV, anther startDM, another startRO, etc. Also,
I'm not sure why you want to autostart specific apps like this?
Wouldn't it be more generally useful to just start out with a shell?
Whichever /term you booted?
>I'ld forgotton about Autoex. IIRC, it's just another procedure list or
>executable that sysgo runs prior to startup. Correct?
autoex is a binary module that will be run after startup but before
sysgo spawns a final shell and exits.
>The key seems to be messing around with sysgo and including it in the
>OS9Boot.
Here's my startup, maybe it will provide hints:
* shell+ commands used here
* Echo welcome message
echo * Welcome to NitrOS-9 Level 2 *
echo * on the Color Computer 3 *
* Lock shell and std utils into memory
link shell
load utilpak1
* set bit banger to 2400
xmode /p bau=4
* Start system time from keyboard
*setime </1
*Start system time from smartwatch
setsystim
date -t
lookterm2 $012B5D
*touch /dd/tmp/term_win if /term is 80 col
var.1=foo
if -F /dd/tmp/term_win
then
var.1=windint
control -e
iniz /w1
iniz /w2
display 1b 20 02 00 00 50 18 0a 03 03 > /w1
display 1b 20 02 00 00 50 18 0a 03 03 > /w2
shell i=/w1 &
shell i=/w2 &
cd /dd/sys
merge stdfonts
merge stdpats_2.plus stdpats_4.plus stdpats_16.plus
merge stdptrs
else
setype rh
* shell i=/v1 &
* shell i=/v2 &
fi
On a term80 boot disk, this automatically sets up for multivue
("control -e", merging the fonts, pats, and ptrs), but leaves me with
shells running on /term, /w1, and w2. To actually start multivue, all
I have to do is run gshell.
On a term_vdg boot, it still sets the monitor type and mouse pointer
type, and again, drops to a shell, ready to run carmen, dm3, koronis,
whatever.
Oh yeah, and to use that you'll need lookterm2. Here's the source:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <modes.h>
#define MARK "/dd/tmp/term_win"
main(argc,argv)
char *argv[];
{
int pipe,sin,sout,status,marker;
char line[80];
if((pipe=open("/pipe",3))>0)
{
sin=dup(0);
sout=dup(1);
close(0);
dup(pipe);
close(1);
dup(pipe);
os9fork("ident",8,"-m term\n",1,1,0);
close(0);
dup(sin);
close(1);
dup(sout);
while(readln(pipe,line,80)>0)
{
#ifdef DEBUG
if(argc>1)
writeln(1,line,80);
#endif
if(strncmp(line,"Module CRC:",11)==0)
{
if(strncmp(&(line[13]),argv[1],7)==0)
{
marker=creat(MARK,S_IWRITE); /*unlike the raw asm */
close(marker); /*sys call, C creat dont */
} /*bomb out if file exists */
else
{
if(access(MARK,S_IREAD)==0) /*file does exist*/
{
unlink(MARK); /*delete it*/
}
}
}
}
wait(&status);
}
else
{
writeln(2,"Couldn't open pipe",80);
exit(216);
}
return 0;
}
Umm, ick. I should really clean that up before I blast it over the
entire net. Oh well.
Willard
--
Willard Goosey goosey at sdc.org
Socorro, New Mexico, USA
"I've never been to Contempt! Isn't that somewhere in New Mexico?"
--- Yacko
More information about the Coco
mailing list