Re: [stella] BAStella Language Reference V0.000000001

Subject: Re: [stella] BAStella Language Reference V0.000000001
From: <erik@xxxxxxxxxx>
Date: Fri, 23 Nov 2001 13:18:59 -0500
11/21/2001 10:28:49 AM, "Roger Williams" <mer02@xxxxxxxxxxxxx> wrote:

>> If you could work it so that BAStella code could run during the
>> kernel, you could do some pretty sophisticated stuff along the lines
>> of Air-Sea Battle or River Raid.  As in, call the five-object kernel and
>> tell it to run for, say, 10 lines, then reposition some objects and
>> call it again.
>
>I don't think it would be wise or very do-able to run compiled code,
>but having a "reposition" kernal type is a definite possibility.  Kernals
>for this thing are a bit different from regular Stella kernals since they
>must be "general purpose."  Very little optimization is possible when
>allowing full language flexibility.

I mean, you don't even have to write a new kernel.  Just provide the
option for the default kernel to be called for a programmer-specified
number of scanlines.  Which I think you have to do anyway to allow
the programmer to set up a screen that uses one of the status/score
type.  The programmer can decide to call the default kernel for say,
ten scanlines, then do his own repositioning, and call it again.  

>If I did have a .asm file generated it would be done in parallel --
>one library for the object code, another for the "source."  After some
>thinking on it today I'm not sure the synchronization would be as big
>a problem as I thought when I posted the spec.  OTOH making them
>hack it the hard way would increase the value of the forced BAStella
>notice, to preserve the value of hand-assembled games.

I'd just generate an .asm file and rely on an assembler to generate the
object code.  If you can distribute a DASM with it, it's all transparent to
the user.

>> >I normally don't like requiring variables to be DIMensioned,
>> >but it's kind of a duh thing here.
>>
>> Every variable should always be declared, in every language. Sometimes
>> the structured-programming guys do have it right. :)
>
>Only if your editor allows multiple windows to be open, so you can kep one
>open to the declarations part of the document :-)

Nah, any good language allows inline declarations.  Although I prefer the
declarations to operate at procedural level (VB style) instead of the
narrowest-enclosing-scope C style.

>> >* Wonk question: Where's the math stack?
>>
>> *Wonk question 1A: How in the world are you going to multiply and divide?
>
>Library subroutines.  I didn't say it would be efficient.

You're talking something like 100-150 cycles for a general-purpose
multiplication routine, using shifts and adds.  Although ISTR someone
posting a good such routine to this list several years ago...?

11/21/2001 12:30:53 PM, "Clay Halliwell" <clay.h@xxxxxxxxxxxxxxxx> wrote:

>As far as the syntax, I've been doing a lot of Javscript lately, so the
>VB-style syntax looks horribly clunky to me. I'd be thrilled with stuff
>like:
>
>new bitmap tankMaze = {yadda yadda yadda};
>screen.create(NTSC, lineheight, style);
>screen.foreground = 126;
>screen.bitmap = tankMaze;
>sprite.p0.setXY(10, 100);
>sprite.p1.setXY(100, 100);
>
>Maybe call it StellaScript.  :-)

Grr.  Give me the BASIC straightforward syntax over "what kind of brace
do I use here?" syntax any day.  And whoever came up with that dumb
semicolon should be beaten.  Line breaks are infinitely more natural to
humans to represent "end of thought".

Just my opinion. :)

----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread