Jump to content

Photo

IntyBASIC compiler


165 replies to this topic

#26 Jess Ragan ONLINE  

Jess Ragan

    Phanto of the Opera

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

Posted Wed Jan 29, 2014 3:20 PM

He's taking donations! I just sent him five bucks for his work on this compiler. Better him than the sadists who developed Dark Souls. >:[



#27 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 4:10 PM

He's taking donations! I just sent him five bucks for his work on this compiler. Better him than the sadists who developed Dark Souls. >:[


Thanks for your donation! :)

#28 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,798 posts

Posted Wed Jan 29, 2014 4:18 PM

Thanks for your donation! :)

 

Where be the links for accepting donations?



#29 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 4:19 PM

Good stuff! Just took a very quick look at one of the demo games final output and I have some suggestions :-

- How about using cart.mac? Its the modern way ;)


The user can change intybasic_prologue.asm to his/her taste.

- Maybe including tighter integration with the sdk1600 library code to make use of printing, memory copy, memory fill, voice etc.


Currently I want to keep it simple and fast. Minimum library required to leave most space possible for user.

- Sound code seems to wait for the ISR to trigger. How about updating it in the ISR instead? That way you can play sounds and "do work" at the same time.


The SOUND statement works immediately. It doesn't wait for ISR.

- Looking at your ISR "display kernel" it'd be an ideal candidate to allow fractional positioning in the game's main loop as I outlined here.


The programmer can use 16-bits variables in his program along with the divide per 16 operator (optimized to logical shift) and the SPRITE statement.

So ISR can be keep simple.

- Move GRAM reprogramming to after the MOBs have been updated. During VBLANK you are allowed to access GRAM/GROM for longer than the STIC's MOB registers (see interrupts.txt in the sdk1600 programming folder for more info).


This is an excellent suggestion.

- Maybe add kernel build options to call the Inty tracker routines, hand controller button handling etc.


Fairly complex. I need to research it.

In particular controller buttons support will have to wait until I've a real Intellivision.

- Any plans to support on cart RAM?


Currently not. Probably this would require arrays enhancement to the language.

Anyways... Its a brilliant addition to the Inty game development tools and I'm looking forward to seeing where you take it.


Thanks! :)

#30 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 4:24 PM

 
Where be the links for accepting donations?


It's my e-mail for Paypal. Check the manual.txt file inside zip.

#31 Jess Ragan ONLINE  

Jess Ragan

    Phanto of the Opera

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

Posted Wed Jan 29, 2014 4:29 PM

Do I have the option to use a different emulator than JZIntv to run compiled software? Because that one is, uh, not very user-friendly. Nostalgia won't run the software at all; it gives me a "configuration error."



#32 intvsteve OFFLINE  

intvsteve

    River Patroller

  • 2,673 posts
  • Location:At the keyboard

Posted Wed Jan 29, 2014 4:32 PM

In know the www.intellivision.us site has an installer you can download tht includes jzIntvGUI, a simple (if dated) front-end for jzIntv. I think there is another fancier one out there, but I can't recall where. IIRC intvdave told me about it.



#33 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 4:34 PM

Do I have the option to use a different emulator than JZIntv to run compiled software? Because that one is, uh, not very user-friendly. Nostalgia won't run the software at all; it gives me a "configuration error."


I only have tested JZIntv but I'll check into this.

#34 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,798 posts

Posted Wed Jan 29, 2014 4:35 PM

Oh baby, you know what I like!

 

Just promise me you won't do what that Martijn Wenting guy did and announce a BASIC compiler without actually releasing one. God, it's been years and I'm STILL pissed about that!

 

I actually bought a Vectrex solely for the purpose of his BASIC compiler.  Not mad at him but pretty disappointed with the situation.



#35 GroovyBee OFFLINE  

GroovyBee

    Games Developer

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

Posted Wed Jan 29, 2014 4:47 PM

The user can change intybasic_prologue.asm to his/her taste.


It also affects how you allocate the RAM you use too.
 

Currently I want to keep it simple and fast. Minimum library required to leave most space possible for user.


You can pick and choose what routines are used from the library.
 

The SOUND statement works immediately. It doesn't wait for ISR.


OK. I was looking at the final *.asm file and didn't look at the original BASIC version.
 

The programmer can use 16-bits variables in his program along with the divide per 16 operator (optimized to logical shift) and the SPRITE statement.


Sure but spriteX=spriteX+1.5 being "magically converted" into
mvi spriteX, r0
addi #$8001, r0
adcr r0
mvo r0, spriteX
Is much more readable to the BASIC coder and you don't have to worry about taking care of the carry before you do the addition.
 

In particular controller buttons support will have to wait until I've a real Intellivision.


No worries.
 

Currently not. Probably this would require arrays enhancement to the language.


Or you could have some sort of command prefix to put them in cart RAM.

#36 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,798 posts

Posted Wed Jan 29, 2014 4:49 PM

Do you have a TV that can except NTSC nanochess?  I'm sure one of us could donate a little something something.



#37 cmart604 ONLINE  

cmart604

    Quadrunner

  • 10,993 posts
  • Location:Vancouver

Posted Wed Jan 29, 2014 4:57 PM

Do you have a TV that can except NTSC nanochess?  I'm sure one of us could donate a little something something.


Yah it's on my to do list :)

#38 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 5:04 PM

Do I have the option to use a different emulator than JZIntv to run compiled software? Because that one is, uh, not very user-friendly. Nostalgia won't run the software at all; it gives me a "configuration error."

 

Just I've checked and Nostalgia 5.0 can run fine the IntyBASIC programs. Copy both game.bin and game.cfg files to your Nostalgia roms folder.

 

Alternatively use the utility bin2rom included with jzintv like this:

bin2rom game.bin

And it will generate an unique game.rom file that is useable by Nostalgia.

 

Do you have a TV that can except NTSC nanochess?  I'm sure one of us could donate a little something something.

 

Yep, I've a NTSC TV. Don't worry. I'll try to get one Intellivision in next months or maybe...

 

Yah it's on my to do list :)

 

...cmart604 Intellivision comes first :). Thanks!



#39 skosh OFFLINE  

skosh

    Moonsweeper

  • 391 posts

Posted Wed Jan 29, 2014 7:09 PM

Nice job Nanochess! 

 

Has anyone tried the samples on the Cuttle cart? 



#40 Jess Ragan ONLINE  

Jess Ragan

    Phanto of the Opera

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

Posted Wed Jan 29, 2014 7:33 PM

Someone had recommended a different build; one with a GUI included. That seemed to get the job done!

 

Anyway, I ran my first program, which looks like this:

starters:
a = rand
cls
print a
goto starters

I thought this would display a stream of random numbers at the top left of the screen (from 0 to 255). Instead, it showed a stream of different characters in different colors. I'm not sure what's going on with that.

 

Also, is there a way to print characters in specific areas of the screen? That way I wouldn't have to keep using CLS.



#41 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 7:48 PM

Nice job Nanochess! 

 

Has anyone tried the samples on the Cuttle cart? 

 

I'm waiting for someone to do that :)

 

Someone had recommended a different build; one with a GUI included. That seemed to get the job done!

 

Anyway, I ran my first program, which looks like this:

starters:
a = rand
cls
print a
goto starters

I thought this would display a stream of random numbers at the top left of the screen (from 0 to 255). Instead, it showed a stream of different characters in different colors. I'm not sure what's going on with that.

 

Also, is there a way to print characters in specific areas of the screen? That way I wouldn't have to keep using CLS.

 

Technically you shouldn't do that because PRINT can overwrite the stack if you exceed the screen.

 

Also PRINT is primitive for game purposes (check game2.bas source code,) it cannot display numbers unless you select the right GROM card. For example:

 

  PRINT (A/8+16)*8+(A AND 7)

 

This way it selects the GROM character (number are in cards 16 to 25) and adds the color.

 

In order to put something at a position in screen (0-239 sequentially starting in top-left,) use this: (string only for clarification)

 

  PRINT AT 0,"A" ' for upper-left corner

  PRINT AT 19,"B" ' for upper-right corner

  PRINT AT 220,"C" ' for bottom-left corner

  PRINT AT 239,"D" ' for bottom-right corner

 

Only for strings you can use COLOR, by example with your random value:

 

  PRINT AT 84 COLOR (A AND 7),"HELLO WORLD"



#42 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,317 posts

Posted Wed Jan 29, 2014 10:23 PM

This is amazing!  Colecovision has C programming and Atari has AtariBASIC.  Intellivision definitely need a BASIC program such as this. 

I got the test program to compile, so I'm all set to learn the basic.  One of my challenge as right now is to make a tileset made and have it displayed.  Also learn the GROM set as well. I will have to PEEK and POKE around to get that working.



#43 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Wed Jan 29, 2014 10:29 PM

This is amazing!  Colecovision has C programming and Atari has AtariBASIC.  Intellivision definitely need a BASIC program such as this. 

I got the test program to compile, so I'm all set to learn the basic.  One of my challenge as right now is to make a tileset made and have it displayed.  Also learn the GROM set as well. I will have to PEEK and POKE around to get that working.

 

There is a dumping GROM program included with jzintv, it generates a grom.txt file will every figure.

 

Check sprites.bas and game2.bas to see how to define tilesets, they are shared by sprites. And then you can use PRINT "/256/257/258" upto /319 (note change slash to inverted slash, I couldn't type it)

 

Check manual for DEFINE statement and PRINT statement with string.

 

I hope to put soon a BASIC sample of tile definition.



#44 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,317 posts

Posted Wed Jan 29, 2014 11:44 PM

main:
cls
wait
PRINT AT 84 COLOR 5,"HELLO WORLD"
PRINT AT 0 COLOR 1, "\69"
for c=1 TO 79
PRINT COLOR 1, c
next c
end:
goto end

IntyBasic.jpg

 

I played around with the PRINT statement a bit. I got the unique tile from the GROM to print.  I also attempt to make it write out all the GROM.  I'm confident that I'll be able to get the unique tiles uploaded soon.  :thumbsup:



#45 ed1475 OFFLINE  

ed1475

    Dragonstomper

  • 714 posts
  • Location:Twin Cities, Minnesota

Posted Thu Jan 30, 2014 3:30 PM

I uploaded a video of the sample programs running from an Intellivision using a Cuttle Cart 3.

 

 



#46 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Thu Jan 30, 2014 4:55 PM

I uploaded a video of the sample programs running from an Intellivision using a Cuttle Cart 3.

 

 

Pretty cool! :) Thanks!



#47 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,798 posts

Posted Thu Jan 30, 2014 5:04 PM

Are the characters coming from the EXEC/GROM?  I wonder how hard it would be to use the Aquarius character set by default.  They've got some pretty sweet glyphs in there :)



#48 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Thu Jan 30, 2014 5:26 PM

Are the characters coming from the EXEC/GROM?  I wonder how hard it would be to use the Aquarius character set by default.  They've got some pretty sweet glyphs in there :)

 

You can use characters from the EXEC/GROM like in game 1, or define they in GRAM like in game 2 :)



#49 skosh OFFLINE  

skosh

    Moonsweeper

  • 391 posts

Posted Thu Jan 30, 2014 5:27 PM

I uploaded a video of the sample programs running from an Intellivision using a Cuttle Cart 3.

 

 

Nice Ed! I'm still trying to track down my Cuttle Cart. When you added it to the cart was there anything special you needed to do? I recall the process of updating the cart to be a bit quirky and using a database to check CRCs values for known carts. With these obviously not being the database I was wondering what was needed. Thanks!



#50 nanochess OFFLINE  

nanochess

    River Patroller

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

Posted Thu Jan 30, 2014 6:40 PM

This is an example IntyBASIC program for creating a title screen using a defined and animated tile, it will be included in future versions of IntyBASIC:

	REM
        REM Animated title screen
        REM Demo for IntyBASIC
        REM by Oscar Toledo G.  http://nanochess.org/
        REM Jan/30/2014
        REM
        WAIT
	DEFINE 0,1,bitmaps0
	WAIT
	CLS
	PRINT COLOR 6
	PRINT AT   4,"\256\256\000\000\256\256\256\000\256\256\256"
	PRINT AT  24,"\256\000\256\000\000\256\000\000\256\000\000"
	PRINT AT  44,"\256\256\000\000\000\256\000\000\256\000\256"
	PRINT AT  64,"\256\000\256\000\000\256\000\000\256\000\256"
	PRINT AT  84,"\256\256\000\000\256\256\256\000\256\256\256"
	
	PRINT AT 122,"\256\256\256\000\256\256\256\000\256\000\256\000\256\256\256"
	PRINT AT 142,"\256\000\000\000\256\000\256\000\256\256\256\000\256\000\000"
	PRINT AT 162,"\256\000\256\000\256\256\256\000\256\256\256\000\256\256\000"
	PRINT AT 182,"\256\000\256\000\256\000\256\000\256\000\256\000\256\000\000"
	PRINT AT 202,"\256\256\256\000\256\000\256\000\256\000\256\000\256\256\256"
loop:
    WAIT
	WAIT
	DEFINE 0,1,bitmaps1
	WAIT
	WAIT
	DEFINE 0,1,bitmaps2
	WAIT
	WAIT
	DEFINE 0,1,bitmaps3
	WAIT
	WAIT
	DEFINE 0,1,bitmaps0
	GOTO loop

bitmaps0:
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "00000000"
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "00000000"

bitmaps1:
	BITMAP "11111110"
	BITMAP "00000000"
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "00000000"
	BITMAP "11111110"
	BITMAP "11111110"

bitmaps2:
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "11101111"
	BITMAP "00000000"
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "00000000"

bitmaps3:
	BITMAP "11101111"
	BITMAP "00000000"
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "11111110"
	BITMAP "00000000"
	BITMAP "11101111"
	BITMAP "11101111"







0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users