[z88dk-dev] New CRT0s and gray stuff

Bridge to the z88dk-developers mailing list
Post Reply
Stefano Bodrato

[z88dk-dev] New CRT0s and gray stuff

Post by Stefano Bodrato »

At last.. the beta release of my latest work.
(I just understood what "beta release" means: it happens when you are sick of testing your
code and release it "as is" with no further checks... )
More seriously, TI83CRT0 is the most tricky one...

-startup parameter with the TI83CRT0:
1 (or undefined) - ION
2 - VENUS
3 - ZES
4 - ANOVA
5,6,7 - TI EXPLORER, Ashell, SOS (is there any difference?)

#pragma string name <yourname>
can now be used with the TI83; just add the line into your C source code

All the CRT0s automatically include the gray support interrupt when gray.h is included.
Graylib is in a pre-beta status: the only working thing is the "g_page" function (usage:
g_page(0) or g_page(1) to flip between dark gray and light gray; then use the normal graph
commands).

Let me know!
Stefano Bodrato

Post by Stefano Bodrato »

Right, well, I've decided to make your life even harder!

I'm going to kill you !

But we get smaller programs so it's a worth while trade off. The #pragma
string
"command" now outputs an extra defc to the zcc_opt.def so you can tell
that it has been defined, so a zcc_opt.def file will now contain the
block:

IF NEED_name
defm "blah"
defc DEFINED_NEED_name = 1
ENDIF

Which means you can check DEFINED_NEED_name and if set you don't need to
put the string in.

Before further changes: have a look at TI83CRT0, will you? In some case I
had to include "zcc_opt.def" twice and did other tricks.

All the CRT0s automatically include the gray support interrupt when
gray.h is included. Graylib is in a pre-beta status: the only working
thing is the "g_page" function (usage: g_page(0) or g_page(1) to flip
between dark gray and light gray; then use the normal graph
commands).

Okay, could we do something quite nice and put gray.h into graphics.h but
only used if GRAYLIB is defined or something like that? I was thinking it
would be nice to be able to swap between gray and normal with just a flick
of a compile time flag, but that would require a lot of rewriting of the
normal graphics routines.

It alredy should do what you ask ! (well, I hope I've understood you
question)
gray.h declares a #pragma define. TIxxCRT0s include graylibXX.asm and do
different interrupt handling if they find such define; otherwise the run in
the "normal" mode.
If in gray mode, the code size will be <interrupt code>+<768 buffer bytes>
bigger.

The switch is already possible... calling page(0) and tiei.
A new function should help.


But anyway...good stuff - do you want me to put the libstuff into CVS or
not?

Yes, plea!

To all: don't EVEN think to restrict further gray lib code to TI82/83 only !
(there also are TI85 and TI86 and zx, and... and.. and, last but not least
the Z88 :-D )


Stefano



_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Henk Poley

Post by Henk Poley »

About the Ti83p_crt0.asm:

org $9D93 ; TI 83+ (9d95-2)
defw $6DBB ; ION Shell Identifier

should be changed to:

org $9D95

because Bin2Var 'manualy' adds the "$6DBB"...

This is also the cause that the compiles for the Ti-83+ won't run...
Ion just doesn't see them...

Henk Poley

_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Henk Poley

Post by Henk Poley »

At last.. the beta release of my latest work. (I just understood what
"beta release" means: it happens when you are sick of testing your
code and release it "as is" with no further checks... )

<grin> Isn't that production release?

hey, we are not MICROS~1!!!

More seriously, TI83CRT0 is the most tricky one...

Right, well, I've decided to make your life even harder! But we get
smaller programs so it's a worth while trade off. The #pragma string
"command" now outputs an extra defc to the zcc_opt.def so you can tell
that it has been defined, so a zcc_opt.def file will now contain the
block:

IF NEED_name
defm "blah"
defc DEFINED_NEED_name = 1
ENDIF

Which means you can check DEFINED_NEED_name and if set you don't
need to put the string in.

Hmm, may I say that some shells want the string to be at a particular place
(mostly directly after the header), how do you want to do/fix that?

Oh, I've taken a look at the TI83CRT0....
I think I know how you do that...
The "zcc_opt.def" file changes if you define different things? What a
strange way of doing things...

Henk Poley

_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Stefano Bodrato

Post by Stefano Bodrato »

Oh, I've taken a look at the TI83CRT0....
I think I know how you do that...
The "zcc_opt.def" file changes if you define different things? What a
strange way of doing things...

<grin> Nothing quite like conditional assembly - I picked this way because
there might be strings needed at different places in the startup file - I
can probably use it straight away for the z88 actually.

I find it acceptable, and better than conditional assembly.
Just a couple of things:
- an "undefine" command would help; but... well, it works !
- is it a problem if zcc_opt.def is included more times ? (this is the real
problem, I Think).
-ti83crt0_explorer.asm can be removed

and... I don't *really* want to kill you, Dominic. Consider it as an italian
compliment ! :-D



_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
User avatar
dom
Well known member
Posts: 2090
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

On Fri, 9 Mar 2001, Stefano Bodrato wrote:

I find it acceptable, and better than conditional assembly.
Just a couple of things:
- an "undefine" command would help; but... well, it works !

Yup, I hacked one up the same time I did the #pragma string.

- is it a problem if zcc_opt.def is included more times ? (this is the real
problem, I Think).

Not really - everything is protected before IF !DEFINED stuff - the
zcc_opt.def file frequently contains multiple definitions of the same
things so including it multiple times shouldn't be a problem.

-ti83crt0_explorer.asm can be removed

Okay, I'll do that!

and... I don't *really* want to kill you, Dominic. Consider it as an
italian compliment ! :-D

<grin>

d.



_______________________________________________
z88dk-developers mailing list
z88dk-developers@...
http://lists.sourceforge.net/lists/listinfo/z88dk-developers
Post Reply