Jump to content
IGNORED

IntyBASIC compiler v0.5


nanochess

Recommended Posts

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/forums/topic/221362-intybasic-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

intybasic_compiler_v0.5.zip

intybasic_compiler_v0.6.zip

  • Like 5
Link to comment
Share on other sites

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/forums/topic/221362-intybasic-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. :)

  • Like 2
Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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!

  • Like 1
Link to comment
Share on other sites

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:

  • Like 2
Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

 

post-14916-0-63705700-1393865904.gif

 

 

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

 

 

Catsfolly

 

 

 

  • Like 5
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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 "

Link to comment
Share on other sites

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

 

 

post-19433-0-61573400-1393896990_thumb.gif

Edited by revolutionika
Link to comment
Share on other sites

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

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...