[SD] Venus on all Z80 Ti's


[Prev][Next][Index][Thread]

[SD] Venus on all Z80 Ti's




Okay, Tijl Coosemans has already some idea from what I'm up to (I guess).
And probably also people who have subscribed the assembly-86-mailinglist.

[btw, please first read this whole mail, before reacting to parts of it]

I want to create a kernel/shell like Venus (Ti83) which will have
(more-or-less) the same shell header on all Z80 Ti platforms. The
differences are merely because of the (in)ability to start assembly
programs in the same way from the TIOS-prompt. The rest of the header has a
standard format.

Venus-83 (let's give it a more specific name) programs contain a small
BASIC part that just says "send(9prgm0" (plus an enter), the 0 is the Theta
character. prgm0 is just a JP to the kernel (which is located in the stack,
so no extra space is taken). The kernel then looks up which "BASIC" program
was running and moves that to the exec_ram (or whatever you want to name
it), loads the externals/libs, changes some pointers so the TIOS thinks the
BASIC prog has ended and JP's to the code.
On the Ti83+ and Ti86 "asm(prgm0" could be used. And on the Ti82/85 this
would be just "prgm0", where prgm0 is a BASIC program that enables the
'hack', by overwriting the right TIOS pointers so the Venus-kernel gets
executed.

A standard way of handling externals/libs would also be handy, Venus should
setup a set of pointers to the externals/libs you have specified in the
header. For program-variables it should setup a JP to the data inside the
variable, for other vars just a pointer.

The shell header is not the only 'specialty' I want to have. Almost all
shells copy the data from the program-var to a certain area (or apply a
relocation-factor to the code) and move everything back when finished. When
you crash back to the TIOS (via an "ERR:xxx" for example) the OS doesn't
know what to do with that strange 'gap' there, so sooner or later it will
become unstable and crash.
With the 'relocation-factor'-solution you normaly shouldn't have these
problems. I'm not shure if on the Ti85 (the only calc where they have
shells that behave that way) it doesn't crash because of the inability of
the OS to run assembly by itself and thus cleanup some things (maybe these
things [cleanup, etc.] are done by the Ti85 shells, and such create an
unstable environment when that's not done after quiting). BTW: I don't have
a Ti85...

What would be great if we move the entier variable (including sizebytes) to
the exec_ram, so when the program crashes back to the TIOS there won't be
problems because of the wierd 'gap' in memory.

A part of the Venus-kernel can off coarse be kept in another variable (or
directly after the BASIC-part inside the 'starter', prgm0), you could for
example lookup that prog and move it to plotSScreen (or what you name it)
and do the rest from there, so you have a fixed originate.

ROM_CALL() things can be handled via a lib/external.

The main concerns I've already thought of:

- Ti83+ can't run BASIC from Flash from the prompt. Though libs could be
kept in Flash off coarse, and get copied to RAM when needed and removed (so
not archived) afterwards (double names, one in RAM one in Flash, is that
problem?). Venus(-83) doesn't get returned to, we might need to change that
for the Ti83+.

- Ti82 and Ti85 are still basicaly unknown terain for most ROMcalls (like
the needed _insertmem and _deletemem). Experiments with shells like this
have only resulted in failure (I've heard). This might be because of the
TIOS expects the 'starter' (the BASIC prog that enables the 'hack') to be
in the same place as it was before the kernel/shell is run. Maybe a similar
approach as with Venus-83 would be handy, 'manualy' changing the pointers
so the TIOS thinks it has reached the end of the BASIC prog and quits
(returns to the previous).
For the Ti82/85 different kernels for the different ROM version should be
made I think...

- Another *problem* for the Ti82/85 would be that the Venus-program you
need to run is not the 'caller' (since the prgm0 is running when entering
the kernel), so you need to find out where the TIOS stores information
about the previous running BASIC-program.

- Ti86 (and Ti83+SE) has paging, how to handle this (besides the difference
from the program side)?

- People are still being vague about assembly shells for the Ti73...

	Henk Poley <><




Follow-Ups: