Re: [stella] BAStella Language Reference V0.000000001

Subject: Re: [stella] BAStella Language Reference V0.000000001
From: Chris Wilkson <ecwilkso@xxxxxxx>
Date: Thu, 22 Nov 2001 03:43:53 -0500 (EST)
On Wed, 21 Nov 2001, Roger Williams wrote:

> > USR() (machine language subroutines)
>
> This creates a problem with the VBLANK timing, which must count
> cycles.  BAStella can use blocks of code of known length but it has
> no way of knowing the timing of code you've written.  (Also, unlike
> the situation with an interpreter, you don't get *that* much of a
> performance increase by writing your own ML, since you're already
> pretty close to the CPU.)

So make it USR(X,Y) where X is the routine number and Y is the cycle count.
This is a good way to introduce cycle counting and piecewise ML programming.
I first learned asm by using PEEKs and POKEs and then by trying to write
a graphics routine on the Coco 2 using USR().  It worked, actually.  (I was
trying to access undocumented graphics modes.)  Of course, the machine did
some *really* crazy things while I was trying to get it to work, but that's
part of the learning process.

> > PEEK()
> > POKE()
>
> The "vector" takes care of this.  RAM from $80 to $FF is addressed
> as !(0) to !(127).  While technically you're not supposed to access
> above VECTOP no bounds checking is done.

I think you should make the TIA registers, or at least a subset of them
PEEK/POKEable.  Again, giving people a way to touch the hardware might
make your job harder, but it lets them experiment closer to the hardware,
which is where we all hope they wind up.  Right?

-Chris

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread