[comp.sys.apple2] 8bit screen blanker

ART100@psuvm.psu.edu (Andy Tefft) (10/31/90)

Ok, making a little progress here.

I have the routines done that will save the screen status, save
screen info, restore the screen info and status, and bounce the
time around the screen (00:00 if time is not set).

How should I protect this thing in memory? I was going to
have podos allocate me some buffers and relocate into there.
The space taken up there will also include $400 bytes to store
the screen image. I would like to have prodos allocate a buffer
for that and release it when i'm done, but unfortunately
when you call freebuf it releases ALL buffers you got with
a getbuf, including the one the program resides in. There's
a trick in Ken Manly's prodos copy command (Nibble, Dec '85)
which keeps prodos from releasing buffers above a certain
point in memory, but it's nonstandard and I don't want to use it.
Does this bother anyone?

Second thing: any forseeable problems if I just get the time
from the prodos time locations at 49043 (hour) and 49042
(min)? This works with vblclock. Oh i should try it on my //e
which has a versacard in it. Yep, checks out ok.

Third thing: I know the //c has some convoluted and incomprehensible
way you can read the status of the single/double hires softwsitch
($c060 for double, $c05f for single). I have to set this to
single hi-res for this thing to work correctly (don't see why,
but it leaves clock trails on the screen if I don't). Would
it be poor to check the apple keys when the key is pressed to
exit the bllanked screen, and if an apple key is pressed use double
otherwise single hi res?  All the other important modes are switched
automatically.

I'm still figuring out a way to get into the input routine and
time the wait since last keypress. I don't want to re-write
keyin (cause I'm nervous about making it work under 40 and 80
columns both), but I might have to. Any suggestions (besides
"use interrupts!")?

jh4o+@andrew.cmu.edu (Jeffrey T. Hutzelman) (11/01/90)

A couple things...

	First, don't confuse BASIC.SYSTEM (which provides such routines as
GETBUF and FREEBUFS, and is only around when you're in AppleSoft) with
the ProDOS 8 MLI (the operating system iteslf), which is always around. 
The extent of the memory management provided by the MLI is that you can
set bits in the system memory map and no one else is supposed to use it,
but its not enforced.
	There should be no problems getting the time from the P8 global page,
as long as you are sure to call the MLI routine GETTIME first (no
paramters, but I can't remember what the command # is).  This will check
the time and update the global page entry.  There is one problem, in
that the clock driver is allowed to trash part of page 2, and the driver
built into P8 will do so.  So, you might have to save that page in order
to prevent data being entered from being corrupted.
--------------------
Jeffrey Hutzelman			America Online: JeffreyH11
Internet: jh4o+@andrew.cmu.edu		BITNET: JHUTZ@DRYCAS
>> Apple // Forever!!! <<

ART100@psuvm.psu.edu (Andy Tefft) (11/01/90)

In article <cb=r4u600Vp5IilFQP@andrew.cmu.edu>, jh4o+@andrew.cmu.edu (Jeffrey T.
Hutzelman) says:
>
>        First, don't confuse BASIC.SYSTEM (which provides such routines as
>GETBUF and FREEBUFS, and is only around when you're in AppleSoft) with
>the ProDOS 8 MLI (the operating system iteslf), which is always around.

The basic idea here was that the thing could only run under basic.system
since nobody can think of a good way to notice how long a random
program has been sitting there looking at $c000 waiting for a keypress.
If I run under basic.system, I can intercept the keyboard vectors
and rewrite keyin.

cyliao@hardy.u.washington.edu (Chun-Yao Liao) (11/03/90)

mmm... since it will run only with Basic.system, how about this, I remember
that in one of the previous version of basic.system (don't know about the
current one) has a "gap" which is not used.... let me find out he address..
ok, here, $bb4c-$bc79
If the space is to be reserved forever... and the blanker is short enough
to fit... I know it's tight... just if....


cyliao@wam.umd.edu     		o NeXT :  I put main frame power on two chips.
      @epsl.umd.edu		o people: We put main flame power on two guys.
      @bagend.eng.umd.edu       o ::::::::::::::::::::::::::::::::::::::::::::
 xxxxx@xxxxx.xxx.xxx (reserved)	o RC + Apple // + Classic Music + NeXT = cyliao