Jump to content
IGNORED

Programming the 5200


Recommended Posts

I am "teaching myself" with the helps of many, many books and 5200Basic by Jeffry Johnson. I hope to be cool enough to make a good game like Adventure 2, but until then, I will have to figure this stuff out. I blame Andrew Davie for getting me interested in the ATARI programming with his forum "Programming the 2600 for Newbies." I will post my progress of learning as I go...I try to comment my code, but if someone has a question, please ask!!! I will explain what parts I understand. A lot of the next several programs are just tests to figure out how the 5200 will understand certain commands and the results. I am using 5200bas from

 

http://lilly.csoft.net/~jeffryj/5200bas/5200bas.html

 

and De Re Atari from

 

http://www.atariarchives.org/

 

and the emulator Rainbow 95 from

 

http://www.chrislam.co.uk and click on Rainbow at the top

 

you can get the 5200 ROM from

 

http://www.atariage.com/5200/emulation/ind...l?SystemID=5200

 

You can also get TASM from Dan B's 6502 Tech Page under Development Software

 

http://www.atarihq.com/danb/6502.shtml

 

I do welcome comments and suggestions on ways to make things more efficient.

 

My first program is attached... I based it on Zork. You walk thru 6 rooms with the joystick. You are supposed to pick up a key in the Kitchen and the game ends when you walk back to the Bedroom. Everything works except I haven't figured out the numeric keypad part yet. I know how to stop it from continually scrolling, I just want to figure out a better way, probably with the next program. Until then, I hope those of you who have no idea about programming the 5200, and maybe some of those who do, will enjoy this.

 

I cannot add attachments, so the listing will be a respond to this.

Link to comment
Share on other sites

Here is the next step in my 5200 programming adventure...

 

I basically moves a sprite (in the form of a ship) across the screen from right to left until you hit the * or # key. (I dont remember which one I encoded but one or the other works :D )

 

You can see that using labels doesn't work for identifing Sprites, just use the methods on the Command Reference. I pretty much tried everything else.

 

Oh, and there are some funny formatting problems. Especially around the PUT statements... You can't have {SPACES} in the wrong place, or it won't compile right. That only took forever to figure out.

 

Well, here is the code and the .bin file zipped for your enjoyment. I commented a little bit better this time to help understand what I think is happening (because maybe the computer thinks something else is)

 

Oh, and if anyone can suggest a way to slow down the movement from right to left, that would be great...

ship.zip

Link to comment
Share on other sites

Well, here is the start of a game some of you might remember on the Commodore 64 called Final Approach. The objective is to give airplanes heading, altitudes, and airspeeds to get them to either the airfield or the exit.

 

So far I have only designed the playfield, but it has some excellent lessons, like the LOCATE command, redefining the character set, and using a charcter set as graphics.

 

The Ultima games are a perfect example of using character set for its graphics representation. If you look at the approach.chr file, there is a basic explanation on how to define the characters for those who don't know how.

 

Enjoy...

approach.zip

Link to comment
Share on other sites

  • 1 month later...

I know I haven't been working on this for a month, its still on my agenda! Work just got over swamped for a moment, and then I had visitors to the house, but I will be starting back to work on this maybe this weekend, since there will be nothing else to do...

 

Is there some kind of tutorial about 5200BAS for begginers? I couldn't find one.  

 

I think this is as close as you will ever get. If you need me to expand on some concepts, let me know and I will do my best.

Link to comment
Share on other sites

I just finished writing (on paper) the majority of the remaining subroutines. They handle collision detection of all the aircraft with walls, other aircraft, and the ground. I think I discovered a way to process arrays with memory offsets, which is probably the assembly way of doing things. I don't know if its efficent, but when I finally encode it, we will see if it works the way I hope it will work. The next subroutine handles moving the all the aircraft to the next position. The final one, which I probably won't get to until Sunday, will be processing the joystick and keypad input. Then their should be a decent working game. All that will be left is making it difficult with multiple aircraft, adding colors, adding various types of aircraft, and adding sound. I will try and code the subroutines over the next couple days...

Link to comment
Share on other sites

There is a book on Atari computer programming, once you learn that, using it for 5200 shouldnt be difficult, Ive learned a few things from it...wait that is ASM, but im sure there is something for Basic on Atari computers

 

Except that nobody is using basic on Atari computers here. ;)

 

5200Bas is a PC based program that allows you to program for the 5200 using it's (5200Bas) own version of Basic. It then saves it as assembly code (which can then be assembled in TASM). A homebrew author decided to create it to allow people not as familiar (or comfortable) with assembly to still be able to write games.

 

Completely different than programming on an Atari system in Atari Basic.

Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...

I've got a problem with DASM spitting out some errors compiling the hello world example.

 

DASM V2.02, (c)Copyright 1988 Matthew Dillon, All Rights Reserved
unknown mnemonic: '$BC00'
line   29 hello.asm  Unknown Mnemonic
unknown mnemonic: '$BC20'
line   47 hello.asm  Unknown Mnemonic
Unrecoverable error in pass, aborting assembly!

 

I used the /d switch like the FAQ said.

Link to comment
Share on other sites

Well, I got it to compile (sort of) but DASM spits this out and my emulator crashes.

 

DASM V2.02, (c)Copyright 1988 Matthew Dillon, All Rights Reserved
mismatch    SETVECT 401f(r )  pc: 4022
line   49 HEADER.INC Label Mismatch
mismatch    ENDMAIN 4072(r )  pc: 4075
line   11 worm.asm   Label Mismatch
mismatch        CLS 4075(r )  pc: 4078
line    4 WORM.1     Label Mismatch
mismatch      CNEXT 407f(r )  pc: 4082
line    9 WORM.1     Label Mismatch
mismatch        Y2K 4091(r )  pc: 4094
line   22 WORM.1     Label Mismatch
mismatch       Y2K0 40a2(r )  pc: 40a5
line   30 WORM.1     Label Mismatch
mismatch       Y2K1 40a4(r )  pc: 40a7
line   31 WORM.1     Label Mismatch
mismatch       Y2K2 40b0(r )  pc: 40b3
line   37 WORM.1     Label Mismatch
mismatch       Y2K3 40c6(r )  pc: 40c9
line   47 WORM.1     Label Mismatch
mismatch     CLRRAM 40e0(r )  pc: 40e3
line   63 WORM.1     Label Mismatch
mismatch   OPTIONS, 40f0(r )  pc: 40f3
line   75 WORM.1     Label Mismatch

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