Re: [stella] BAStella Language Reference V0.000000001

Subject: Re: [stella] BAStella Language Reference V0.000000001
From: "Roger Williams" <mer02@xxxxxxxxxxxxx>
Date: Wed, 21 Nov 2001 18:28:49 -0800
From: Erik Mooney <erik@xxxxxxxxxx>

> If successful, I think it would in fact dilute the homebrew scene a bit,
> same as the C compiler dev kit did for the Gameboy homebrew scene.
> But that's not necessarily a bad thing, just as long as Braves4515
> doesn't get wind of this. :)  (Although I'm wondering if he inspired you?)

Heh.  Not really, though he's probably the Worst Case Scenario of how
it would be used.  (Why can I hear Christopher Walken in my head, from
Brainstorm:  They've taken my work and made it a BAD THING!)

> >3. Is anybody interested in using it?
>
> That's the question.  You can do, what, Combat and Adventure with it?
> (Actually, maybe even Gunfight with static reflected PF :) )

Quite a bit more, actually.  In the default kernal you can stretch the ball
and missiles out to full-screen size.  And don't forget the playfield can be
smooth-scrolled vertically.  I can easily imagine doing a vertical
racer. With the reposition kernal (inspired below) you could do a pretty
wizard vertical shooter.  Besides, In Stella's original concept none of this
fancy stuff was anticipated.  And additional kernals could be created
offering multiple objects through flicker (smart or otherwise).  In fact,
since
the default kernals fully reposition objects each frame, dumb flicker
wouldn't even require new interior kernal code, just switching code
to exchange the "real" setups each FRAME.  That option will
probably be in V1.0.

> 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.

> This would also be a great intermediate step between
> basic functionality and full assembly - introducing the concepts of
> rewriting objects during the screen without yet getting bogged down
> in cycle counting.

Yep, the idea definitely bears looking into.  The idea is that whatever
approach is taken, everything must be general-purpose and modular,
quite the opposite of most Stella development.

> >BAStella doesn't create a re-assemblable .asm file, since
> >it would greatly complicate BAStella and DiStella can do that.
> >(I may change my mind on this, as it depends on some nuts and
> >bolts I haven't fully worked out.)
>
> If I were doing the project, I'd probably go this route.  It might be
easier
> to have BAStella generate that instead of essentially writing your own
> assembler as part of the project.  This effectively makes BAStella
> a high-level abstraction of the 6502 and TIA rather than a language in
> its own right.

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.

> > ON exp GOTO label0, label1, label2, label3...
> >
> This can be implemented directly in 6502 assembler with Indirect JMP.
> Just gotta be careful on a bounds check for exp.

Roger goes D'OH!

> >Functions cannot have arguments because of no math
> >stack.
>
> I think you could allow one argument in the accumulator.

Already thought this through in my reply to Glenn.  I'll have to provide
for stacking arguments, hopefully in the regular stack.  So user functions
can have arguments.

> >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 :-)

> >* 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.

--Roger Williams


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


Current Thread