Jump to content

Photo

IntyBASIC compiler v0.5

intybasic compiler intellivision homebrew

144 replies to this topic

#1 nanochess OFFLINE  

nanochess

    River Patroller

  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Thu Feb 27, 2014 7:48 AM

Hi everyone.

 

After a slight pause finally I was able to implement the SCROLL and BORDER statements in IntyBASIC :), also path selection for libraries using a command-line argument.

 

Documentation was added to manual and also SCROLL.BAS to show how to use it. The libraries are slightly accelerated with DZ-Jay contributions and some parts of scrolling code were contributed by intvnut. Myself I've a hard time getting scroll upwards to work without flicker, but it now is fine.

 

Looking forward to a test in real hardware of scroll routines.

 

For the newcomers, IntyBASIC is an integer BASIC language cross-compiler for Intellivision that helps greatly to ease game writing.

 

The original IntyBASIC thread is here http://atariage.com/...basic-compiler/ but I had to start a new one because I cannot edit further the original.

 

Platforms supported: Wind*ws, Mac OS X (32/64 bits) and Linux.

 

Edit: Mar/03/2014. Now added IntyBASIC v0.6 with CONST statement, also corrects a bug in FOR STEP, and added sample for MOB use in SCROLL.BAS

Attached Files



#2 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,798 posts

Posted Thu Feb 27, 2014 8:18 AM

Hi everyone.

 

After a slight pause finally I was able to implement the SCROLL and BORDER statements in IntyBASIC :), also path selection for libraries using a command-line argument.

 

Documentation was added to manual and also SCROLL.BAS to show how to use it. The libraries are slightly accelerated with DZ-Jay contributions and some parts of scrolling code were contributed by intvnut. Myself I've a hard time getting scroll upwards to work without flicker, but it now is fine.

 

Looking forward to a test in real hardware of scroll routines.

 

For the newcomers, IntyBASIC is an integer BASIC language cross-compiler for Intellivision that helps greatly to ease game writing.

 

The original IntyBASIC thread is here http://atariage.com/...basic-compiler/ but I had to start a new one because I cannot edit further the original.

 

Platforms supported: Wind*ws, Mac OS X (32/64 bits) and Linux.

 

That's kinda strange since you're a subscriber.  I think it's time someone suggested a sub-section for IntyBASIC just like batariBASIC. :)



#3 nanochess OFFLINE  

nanochess

    River Patroller

  • Topic Starter
  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Thu Feb 27, 2014 8:21 AM

 

That's kinda strange since you're a subscriber.  I think it's time someone suggested a sub-section for IntyBASIC just like batariBASIC. :)

 

I think it's only editable for a month...

 

Yep, you're right. A subsection for IntyBASIC looks like something useful for future homebrews :)



#4 retroillucid ONLINE  

retroillucid

    Facebook.com/Collectorvision

  • 7,277 posts
  • CollectorVision Games - Publishing Homebrew
  • Location:Montreal, Canada

Posted Thu Feb 27, 2014 2:19 PM

Excellent! Thanks alot for your contribution! :thumbsup:

#5 Jess Ragan OFFLINE  

Jess Ragan

    Phanto of the Opera

  • 9,468 posts
  • Keys and Thank You
  • Location:The Arid Zone

Posted Thu Feb 27, 2014 2:42 PM

Man, I really need to make some software with this thing! Arrgh!

 

Keep on keepin' on, Nanochess. You're making some great progress with IntyBASIC and I can't wait to see the games that will result from it. (Just wish there were better emulators for those games...)



#6 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,001 posts
  • Location:NC

Posted Thu Feb 27, 2014 7:05 PM

intybasic logo.png

 

:P



#7 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,001 posts
  • Location:NC

Posted Fri Feb 28, 2014 1:31 PM

http://intellivision...n.com/intybasic



#8 retroillucid ONLINE  

retroillucid

    Facebook.com/Collectorvision

  • 7,277 posts
  • CollectorVision Games - Publishing Homebrew
  • Location:Montreal, Canada

Posted Fri Feb 28, 2014 5:49 PM

Now, I just need to find (take?) the time to make Smurf Rescue for Intellivision :)
I'm also interested to make Tarzan and Montezuma's Revenge as well

#9 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,001 posts
  • Location:NC

Posted Fri Feb 28, 2014 5:56 PM

Do it!

#10 cmart604 OFFLINE  

cmart604

    Quadrunner

  • 11,000 posts
  • Location:Vancouver

Posted Fri Feb 28, 2014 6:19 PM

Now, I just need to find (take?) the time to make Smurf Rescue for Intellivision :)
I'm also interested to make Tarzan and Montezuma's Revenge as well


Sweet! Do them all! I might be able to help finance those as I'd love to see all the Coleco vapourware for Inty games get made just like you've been doing on the CV

#11 5-11under OFFLINE  

5-11under

    River Patroller

  • 3,140 posts
  • Location:Ontario, Canada

Posted Fri Feb 28, 2014 6:44 PM

Nano, is there a way to make a constant such as...

 

PI = 3

DOWNSCROLL = 4

 

... where the compiler would replace the values for you (and not use RAM, of course)?



#12 Rick Reynolds OFFLINE  

Rick Reynolds

    Dragonstomper

  • 648 posts

Posted Fri Feb 28, 2014 8:44 PM

Wow.  I'm really impressed with what this compiler is enabling people to do.  Any reservation I expressed in Intellivisionaries episode 6 is hereby retracted!  I've seen Basic projects in the past that were lack-luster, so I didn't give this project much thought or investigation when it came out.  But now that I have looked at it a bit it is truly impressive.  Well done!



#13 nanochess OFFLINE  

nanochess

    River Patroller

  • Topic Starter
  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Fri Feb 28, 2014 9:45 PM

Nano, is there a way to make a constant such as...

 

PI = 3

DOWNSCROLL = 4

 

... where the compiler would replace the values for you (and not use RAM, of course)?

 

Your suggestion is excellent! I'll put it in IntyBASIC v0.6 :) :thumbsup:



#14 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 703 posts
  • Location:Japan

Posted Sat Mar 1, 2014 6:23 AM

5-11under, on 01 Mar 2014 - 09:44 AM, said:snapback.png

Nano, is there a way to make a constant such as...

 

PI = 3

DOWNSCROLL = 4

 

... where the compiler would replace the values for you (and not use RAM, of course)?

 

 

Your suggestion is excellent! I'll put it in IntyBASIC v0.6 :) :thumbsup:

I second this request. My IntyBasic programs are full of "magic numbers" now.

It would be much clearer if  I could write "y + XFLIP" instead of "y + $400".

 

Catsfolly



#15 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,709 posts
  • Busy bee!
  • Location:North, England

Posted Sat Mar 1, 2014 12:52 PM

Its coming along nicely but you can claw back 23 16bit RAM words.
 
        ORG $327,$327,"-RWB"
        ;
        ; 16-bits variables
        ;
_scroll_buffer: RMB 20  ; Not used sometimes
So this RAM block (where all the 16bit variables reside) tarts at $327 but the stack finishes 23 locations earlier :-
 
SYSTEM:	ORG $2F0, $2F0, "-RWBN"
STACK:	RMB 32
This code sequence could be optimised a bit more too :-
 
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
To :-
 
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5


#16 nanochess OFFLINE  

nanochess

    River Patroller

  • Topic Starter
  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Sat Mar 1, 2014 1:23 PM

Its coming along nicely but you can claw back 23 16bit RAM words.
 

        ORG $327,$327,"-RWB"
        ;
        ; 16-bits variables
        ;
_scroll_buffer: RMB 20  ; Not used sometimes
So this RAM block (where all the 16bit variables reside) tarts at $327 but the stack finishes 23 locations earlier :-
 
SYSTEM:	ORG $2F0, $2F0, "-RWBN"
STACK:	RMB 32
This code sequence could be optimised a bit more too :-
 
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
To :-
 
        CLRR R0
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5
        MVO@ R0,R5

 

Thanks Mark. The current IntyBASIC architecture puts the 16-bits variables just after the stack, so them grow from $0310 to upper locations.

 

Giving a little less than 23 16-bits variables with scroll and 20 more when not using scroll (the scroll library is only included if SCROLL statement is used)

 

On the other side, I've read in Intellivision docs that one should avoid more than two adjacent instructions that aren't interruptible. MVO is not interruptible.



#17 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,709 posts
  • Busy bee!
  • Location:North, England

Posted Sat Mar 1, 2014 1:28 PM

Thanks Mark. The current IntyBASIC architecture puts the 16-bits variables just after the stack, so them grow from $0310 to upper locations.


Sounds like a good plan.

Giving a little less than 23 16-bits variables with scroll and 20 more when not using scroll (the scroll library is only included if SCROLL statement is used)


You can claw some more back as long as you aren't using the stack much.

On the other side, I've read in Intellivision docs that one should avoid more than two adjacent instructions that aren't interruptible. MVO is not interruptible.


But the code is in the ISR so nothing else can interrupt you and you are in VBLANK time so there will be no visual artefacts ;).

#18 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Sat Mar 1, 2014 3:16 PM

Also, it looks like your ISR is setting up the video display mode and color stack on every VBLANK.  You may be able to get away with setting the video mode on initialization, and updating the color stack only when requested, e.g., perhaps offering a command to set the stack colors.

 

     -dZ.



#19 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 703 posts
  • Location:Japan

Posted Mon Mar 3, 2014 11:01 AM

So, I threw out the balloons and the stretcher (trampoline?) carriers, added in some platforms, and viola, a jumping game (or the beginnings of one, anyway...)

 

jump1.gif

 

 

(Someday I've got learn how to make those "click to animate" things...)

 

 

Catsfolly

 

 

 



#20 cmart604 OFFLINE  

cmart604

    Quadrunner

  • 11,000 posts
  • Location:Vancouver

Posted Mon Mar 3, 2014 11:34 AM

Gah! Don't throw them out, make them both part of a multi game pack like Paddle Party. :)

#21 nanochess OFFLINE  

nanochess

    River Patroller

  • Topic Starter
  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Mon Mar 3, 2014 12:08 PM

So, I threw out the balloons and the stretcher (trampoline?) carriers, added in some platforms, and viola, a jumping game (or the beginnings of one, anyway...)

 

attachicon.gifjump1.gif

 

 

(Someday I've got learn how to make those "click to animate" things...)

 

 

Catsfolly

 

 

 

 

Wow! it looks great! :)



#22 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,422 posts
  • Bitnik
  • Location:Canada

Posted Mon Mar 3, 2014 12:58 PM

Great work, catsfolly!
 
If you make those platforms disappear after hitting them and add in some moving targets, you will pretty much have Winter Bells.
 
There was an excellent demake of Winter Bells for the 2600 called bell hopper, by Tjoppen. It would be cool to see an Inty version.

#23 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,767 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Mon Mar 3, 2014 6:50 PM

So, I threw out the balloons and the stretcher (trampoline?) carriers, added in some platforms, and viola, a jumping game (or the beginnings of one, anyway...)

attachicon.gifjump1.gif


Doodle Jump!! Cool!

(Someday I've got learn how to make those "click to animate" things...)

It's nothing really. When you post an animated GIF image in AA, it will display a preview frame in the thread; you'll have to click it to open the image viewer to play the animation. That's the standard behaviour, even with your own post.

What we do is just type the magic words "

#24 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,001 posts
  • Location:NC

Posted Mon Mar 3, 2014 7:36 PM

So, I threw out the balloons and the stretcher (trampoline?) carriers, added in some platforms, and viola, a jumping game (or the beginnings of one, anyway...)

 

attachicon.gifjump1.gif

 

 

(Someday I've got learn how to make those "click to animate" things...)

 

 

Catsfolly

 

 

 

 

 

The platforming jumping reminds me of this section in Super Metroid for some reason. You have to jump up on these little platforms while making your way to the top (or bottom).

 

 

131222-supermetroid030.gif


Edited by revolutionika, Mon Mar 3, 2014 7:36 PM.


#25 nanochess OFFLINE  

nanochess

    River Patroller

  • Topic Starter
  • 4,559 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Mon Mar 3, 2014 7:53 PM

Well, just updated to IntyBASIC v0.6 with CONST statement support. It can be used this way:

CONST my_constant = $1234
CONST other_constant = 3*7/2

A = my_constant
B = other_constant

CONST should be declared before being used, otherwise IntyBASIC will take reference as non-defined variable.

 

Besides I've solved a bug in FOR STEP that happened if the TO value wasn't exact, like FOR A=1 TO 11 STEP 3

 

Finally I've added an example of MOB offset correction when using with SCROLL, check SCROLL.BAS example







Also tagged with one or more of these keywords: intybasic, compiler, intellivision, homebrew

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users