Jump to content
IGNORED

Old-School BASIC programming on the Atari 2600


Mr SQL

Recommended Posts

Old-School BASIC programming on the Atari 2600
-------===============================----------

bitd it was tremendous fun writing really short BASIC programs and sharing them in contests, they were easy to type in and fun to learn from. And it was amazing what could be done in 1 line or just a few more; BASIC is hands down the most nutrient dense language ever devised.

 

This years international Old-School BASIC programming contest is now open to Atari 2600 programmers:

The short bouncing ball type-in on walabers thread is an awesome example of old-school BASIC programming like we did it back in the day, and that kind of old school BASIC programming is now available for the VCS!

 

Virtual World BASIC supports old-school BASIC programming mode with no templates or graphical sections, just pure code.

 

Here's my 9-line entry into the programming contest:

 

0 data city 1,4,2,5,3,2,3,1,4,1,1,1,5,2,2,3,1,4,1,4,3,1,4,4,1,1,2,2,3,1,3,4,5,4,4,3,4,5,1,2,4,1,5,2,2,3,1,3,1,1,4,1
1 if g=0 then for j=0 to 7:player1(j)=189:player0(j)=pl(j):next j:BYTErowoffset=120:COLUPF=$84:COLUP0=$b4 else goto 3
2 for j=20 to 71:k=j-20:k=city(k)+14:for i=k to 19:vwpixel(j,i,on):next i,j:player0y=88:player0x=94:COLUP1=$74:y=20
3 COLUBK=0:AUDV0=0:g=1:scrollvirtualworldtoggle=1:BITIndex=BITIndex+1:data pl 0,224,127,231,252,192,128,0:rem bitmap
4 if joy0fire=1 and y>=20 then AUDF0=6:AUDC0=8:AUDV0=15:x=BITIndex+11:y=11:i=88-player0y:i=i/10:y=y+i
5 if y<21 then vwpixel(x,y,bindplayer1):j=y-10:y=y+1:COLUP1=M(j):data M $64,$54,$b4,$a4,$32,$44,$24,$c4,$94,$f4,$54
6 if y<=19 and vwpixel(x,y,poll)>0 then vwpixel(x,y,flip):player1x=0:player1y=0:AUDC0=y:y=20:AUDF0=4:AUDV0=15
7 if BITIndex>71 then BITIndex=0:player0y=player0y-2:rem player flies lower each pass over the smoothly scrolling city
8 if CXP0FB>126 then CXCLR=0:g=0:for i=0 to 255:AUDF0=i:AUDV0=i:COLUBK=$34:next i:rem check collision, restart game

 

Compumate BASIC is also old-school and Atari's BASIC programming cart has some potential, there have been a few interesting examples.

 

Does batari BASIC have an old-school programming mode on the Atari 2600 and if not how many lines does it take to get to the point you can write BASIC?

 

Looking forward to seeing what the creative programmers at Atariage can come up with in 10 lines of vintage BASIC, particularly if you're normally a strict Assembly developer! 8)

 

There's just over a month left to the contest deadline March 26 so get coding and write some cool programs!! :)

 

Share and discuss on this thread or on the Bally BASIC forum (comming soon).

 

Link to comment
Share on other sites

What exactly does "old-school programming mode" mean?

It's like the BASIC of home computers from the 70's and 80's:

 

There are line numbers but no template directives or options to specify, and no GUI designer elements

for drawing bitmapped graphics for the virtual world and the sprites.

 

imo there's a charm to this kind of BASIC because it's just pure code and very retro.

 

For games like StarBlitz I use the GUI designers and those other modern language elements, but it's

interesting to be able to use pure old-school BASIC, particularly for tiny programs.

 

Old-school BASIC bridges the gap when working with old-school resources like old programming books and magazine listings.

Link to comment
Share on other sites

I don't know. With "old school" I would expect to write code for that BASIC Programming cartridge from 1979.

 

You can use the BASIC programming cartridge to enter the contest, but that implementation doesn't much resemble a complete BASIC; agree it's undoubtably old school for having come out in the 70's.

 

The Altair, the Bally Astrocade and the TRS-80 all initially ran a Tiny BASIC implementation in the 70's - that's the most old school BASIC.

 

The Pet and the VIC-20, the Atari 8-bits and 80's TRS-80's all ran a BASIC heavily influenced by Tiny BASIC and are still considered old school/vintage/retro.

 

bB and vwB are both Tiny BASIC implementations which is very old school, but the gui designers for ASCII art bitmaps and the options and directives are all new programming constructs that have no counterpoint in any old school BASIC.

 

These are all cool programming tools, but you can't use them in the BASIC programming contest - just 10 lines of BASIC.

Link to comment
Share on other sites

Just heard back from the contest promoter that for compiled BASIC's the compiler must also run on a legacy platform.

 

There are no BASIC compilers that run on the VCS or legacy platforms though there are macro assemblers (which is also a kind of BASIC, just as BASIC is a kind of macro assembler) so that leaves only the interpreted BASIC programming cart and the Compumate, which has an excellent BASIC and 2K of RAM.

 

It would be interesting to write an Atari 2600 BASIC compiler for a contemporary legacy platform like the Atari 8-bit or the Color Computer :)

Link to comment
Share on other sites

 

Uh...what. It would be difficult to be further from the truth than that. That's like saying a crocodile is a kind of dog, because they both have four legs.

 

Hmm... my BASIC compiler outputs blocks of Assembly statements from BASIC.

 

You're Macro Scripting Language isn't doing anything different is it? ;)

Link to comment
Share on other sites

Just heard back from the contest promoter that for compiled BASIC's the compiler must also run on a legacy platform.

 

 

Here is the promoter. Thanks for the invitation to this thread, Mr SQL.

 

I have never thought, that somebody have the idea to take part with a Tenliner for VCS. But I was fascinated of it and the 9(!) line Blitz plays very well for its 9 lines.

For homecomputer platforms it is not allowed to use a compiler. The program has to run within the build-in interpreter. That's a problem for VCS, there is no native interpreter for this platform (except Atari BASIC programming cartridge). Nevertheless I don't like to disqualify Mr SQL's program, because it matches the spirit of the contest and doesn't break written rules explicitly.

  • Like 2
Link to comment
Share on other sites

 

Here is the promoter. Thanks for the invitation to this thread, Mr SQL.

 

I have never thought, that somebody have the idea to take part with a Tenliner for VCS. But I was fascinated of it and the 9(!) line Blitz plays very well for its 9 lines.

For homecomputer platforms it is not allowed to use a compiler. The program has to run within the build-in interpreter. That's a problem for VCS, there is no native interpreter for this platform (except Atari BASIC programming cartridge). Nevertheless I don't like to disqualify Mr SQL's program, because it matches the spirit of the contest and doesn't break written rules explicitly.

Thanks Bunsen, the 10 liner contest is awesome and inspiring and it was fun to share the code!

 

I got disqualified from these contests in Rainbow Magazine in the 80's for being a professional programmer on account of my software company's ads in the magazine.

 

I still sent them interesting work on pushing the hardware for artifacting and leveraging ideosyncarcies in the display signal to create some really cool effects, and they published it in the contests with an "honorable mention" category (non-compete) so that we could still share it.

 

It would be awesome if you could share mhy 9LineBlitz entry the same way! :)

 

Here's a question for next year:

I am undoubtably using a super-computer to compile the code by 80's standards; the compiler's not retro. How about if the Atari 2600 BASIC compiler ran on a 1980 F board Color Computer or a 1979 Atari 800?

 

I think this should meet the prerequisite retroness and spirit of the competition because we did things like that bitd. Let me know and I might try to build it :)

Link to comment
Share on other sites

 

Here's a question for next year:

I am undoubtably using a super-computer to compile the code by 80's standards; the compiler's not retro. How about if the Atari 2600 BASIC compiler ran on a 1980 F board Color Computer or a 1979 Atari 800?

 

 

That could be confusing :-D: "(Cross) compiling on retro computers is allowed, cross compiling on modern computers is not." But definetely worth a thought to introduce a new category for compiled basic programs.

  • Like 1
Link to comment
Share on other sites

 

That could be confusing :-D: "(Cross) compiling on retro computers is allowed, cross compiling on modern computers is not." But definetely worth a thought to introduce a new category for compiled basic programs.

Very cool! I will look into making a VCS BASIC compiler that runs on a retro computer.

 

Any thoughts on the best retro machine/setup to host the compiler?

Link to comment
Share on other sites

Atari 800 would be cooool

 

Agree I'd been thinking of making a version of my Tiny BASIC that could compile programs for the 400/800, even better if I could make it run on the 800 and generate either 2600 or 400/800 binaries.

 

If I go with the 800 I already have an 800xl computer with one of the good keyboards to code on that a cool collector (atarinut) gave me, and a MyIDE II for IO.

 

The MyIDE II can load retro cart and disk images, but I will need to be careful not to use any tools or utilities that run on the carts internal FPGA during development because that's not retro.

  • Like 1
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...