Jump to content

Photo

Some Atari BASIC Questions


14 replies to this topic

#1 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • 530 posts
  • Location:Moberly, Missouri

Posted Tue Jan 3, 2012 1:19 PM

Hi All,

I have been out of practice when it comes to programming in Atari BASIC. As well, I have been trying to discover new ways to produce graphics in Atari BASIC. Is there an easier way to produce graphics in a bit format without having to invoke the PMG of the computer? Is there a way to use portions of assembly to incorporate graphics in a BASIC game program? I am wanting to use real hardware I have on hand (XEGS & a just acquired 810 drive from V61).

Reason why I ask is because I have a game I developed for Windows PCs using DarkBASIC and I would like to try and port it over to the 8-bits. I want to use the best graphic method possible that the machine will allow without going into Assembly too heavily. I know BASIC can do most of what I need, I just need a way to do better graphics. I am including a screenshot of the Windows version to show kind of what I am trying to do. I know the 8-bits won't be able to perform on this level, but if I can make the paddle and blocks more like what is in the image it would help the game. Oh...game will use joystick controllers.

Thanks in advance!

Attached Thumbnails

  • GameScreen.jpg


#2 Synthpopalooza OFFLINE  

Synthpopalooza

    Dragonstomper

  • 990 posts
  • Location:knoxville, TN

Posted Tue Jan 3, 2012 4:20 PM

Well there are several methods available to you, but each with it's own drawbacks and advantages.

1. Using Antic 4 character mode, and using PMG overlays on the bricks. This will give you 4 color by 5 level shading. You would also use missiles for your balls and a DLI on player 0 to create an extra paddle on the bottom.

2. Using Graphics 10 in char mode. With Graphics 10 you can get anywhere from 9 individual colors to 4 colors by 2 level shading. Disadvantages are lower horizontal resolution, and you can't use Player 0 as that is the background color.

3. Using Graphics 9 in char mode, and using PMG overlays on the bricks, combined maybe with color DLI's on the background. You get 16 level shading, plus with PMG overlays you can get 5 colors of bricks per line. I believe you can use priority blending on mode 9 to get the extra colors. Use a DLI again on player 0 to make your paddle on the bottom, Disadvantage is again lower resolution than Antic 4.

4. Using Super IRG ... you basically alter your character set every VBLANK to get 14 colors in ANTIC 4. The disadvantage here is it can get really flickery if you don't choose your colors right, but you can dither to reduce the flicker and create solid color fields. You could also do the character set change on every scanline rather than having to flip the character set on the whole screen.

All of these use Char mode. You can also adapt some of these methods to bitmap mode (Graphics 7, 9, 10, or 15) as well, with varying results.

Edited by Synthpopalooza, Tue Jan 3, 2012 4:21 PM.


#3 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • Topic Starter
  • 530 posts
  • Location:Moberly, Missouri

Posted Tue Jan 3, 2012 7:26 PM

Thanks for the reply Synthpopalooza. I don't have to worry about a ball as this game doesn't have one :D. Once the BASIC code is finished, I plan to convert it to binary using Atari DOS functions to create a stand-alone, self-loading disk. I plan to use Atari DOS' function for saving the program as a binary.

#4 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • Topic Starter
  • 530 posts
  • Location:Moberly, Missouri

Posted Mon Jan 9, 2012 7:45 PM

I also need to add that once the game is complete, I plan to put it in cartridge form as well. So far, I have this much completed:

Working paddle
Joystick controls
Playfield
Player's block changes colors when fire button is pressed
Score & Left text

I still need to complete:

Randomly colored and placed blocks in playfield
Player's block to be placed in playfield
working score
working left
title screen
working start button

The game is using Graphics mode 9 mainly for the amount of colors that can be used. Project is coming along smoothly. However, I've lost or misplaced the source code to the Windows version so I am having to perform the game's logic from scratch again. I will post pics as soon as I get them off my cell phone.

#5 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • Topic Starter
  • 530 posts
  • Location:Moberly, Missouri

Posted Tue Jan 10, 2012 7:04 AM

I can't seem to remember how, but I do remember there is a memory location using POKE that disables the screen saver on Atari 8-bits. Does anyone remember that location?

#6 rdea6 ONLINE  

rdea6

    Stargunner

  • 1,671 posts
  • Location:Arizona USA

Posted Tue Jan 10, 2012 7:06 AM

77

#7 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • Topic Starter
  • 530 posts
  • Location:Moberly, Missouri

Posted Tue Jan 10, 2012 8:42 AM

Thank you, rdea6! That's been buggin' me. I don't know why I couldn't remember it.

#8 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 5,339 posts
  • Ready for some Ramp Rage
  • Location:High Score Club TAKE PART!

Posted Tue Jan 10, 2012 3:51 PM

Just wanted to wish you luck with your programming kamakazi :thumbsup:

You might consider using Turbo BASIC from the off if you haven't done so already ;)

#9 Stephen OFFLINE  

Stephen

    River Patroller

  • 4,784 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Tue Jan 10, 2012 3:55 PM

I can't seem to remember how, but I do remember there is a memory location using POKE that disables the screen saver on Atari 8-bits. Does anyone remember that location?

If I am not mistaken though, you have to continually strobe this register, as it gets updated during the VBI. Just poking to it once will not turn the color cycling off.

#10 Rybags ONLINE  

Rybags

    Quadrunner

  • 12,881 posts
  • Location:Australia

Posted Tue Jan 10, 2012 8:11 PM

Attract mode takes little over 9 minutes NTSC, about 11 minutes PAL.

If your levels expect to take less time, hitting it once per level will be enough. If you have a pause system, then just reset it when pause mode is exited.
If the game uses keyboard for anything, then hitting a key resets it anyway.

Re Basic - if you're using Atari Basic you won't get much joy without needing to resort to Assembler routines. Turbo Basic will give somewhat more leeway.

Edited by Rybags, Tue Jan 10, 2012 8:12 PM.


#11 kamakazi OFFLINE  

kamakazi

    Dragonstomper

  • Topic Starter
  • 530 posts
  • Location:Moberly, Missouri

Posted Wed Jan 11, 2012 10:22 AM

Hmmm...never heard of Turbo BASIC. I stuck with Atari BASIC mainly because it is built in. And I can use Atari DOS to convert to binary when my project is finished. I had done this one years ago when I first obtained a used XEGS with 2 floppy drives and a modem. It also came with one of the books on Atari Archives I think was 101 Microcomputer Games (the yellow one). One of my favorite text games in the book was Bombardment. So I converted it using graphics instead of text. I also strictly used the joystick. If I remember correctly, I used Autoexec to load the binary file created once the project was finished. I couldn't believe the speed difference from a BASIC file and a BINARY file.

Sadly, I'm using a 810 Single Density drive now as all that other Atari stuff I had my ex kept and sold off. So, I'm having to start over but it's been years since I have programmed this way. I'm a little rusty :D But, I'm having fun doing it again.

My only issue is I'm using Graphics Mode 9 and am having to come up with a way to place the score on the screen along side the playfield. I've got the numbers already mapped out and they display OK. I'm not doing so well coming up with a way to keep the score display accurate. I'm trying to use an array for it.

DIM SC(6)

This would allow for all 6 numbers (possible score is 999,999). The thought was that once the ones place hits 10, subtract 10 from it and add one to the tens place and so forth and place the remainder back into the ones place. Good news is that I have managed to get some blocks placed in the playfield at random positions and of random colors (can only be one of 5 colors). Due to the speed of BASIC, however, the game is almost unplayable due to slow responses from the interpreter. I am hoping that this will be eliminated when converted to binary.

#12 Rybags ONLINE  

Rybags

    Quadrunner

  • 12,881 posts
  • Location:Australia

Posted Wed Jan 11, 2012 11:33 AM

Convert to binary?

You mean compile. Saving a Basic program by writing out the memory from Dos won't make it run faster.

For a score display in Gr. 9 you'd be best off with a text line, which would need a DLI to change from normal to GTIA mode.

#13 rdea6 ONLINE  

rdea6

    Stargunner

  • 1,671 posts
  • Location:Arizona USA

Posted Wed Jan 11, 2012 11:43 AM

Attached File  turbobasic.zip   101.18KB   62 downloads

2 versions of Turbo basic
2.0 and 1.5 and one atr has all the document files.

Load with Basic off. Autorun files will load Turbobasic.

@kamakazi
Hmmm...never heard of Turbo BASIC.



#14 Synthpopalooza OFFLINE  

Synthpopalooza

    Dragonstomper

  • 990 posts
  • Location:knoxville, TN

Posted Wed Jan 11, 2012 5:33 PM

There is a command in Turbobasic which will display text in bitmap mode:

TEXT X,Y,"TEXT"

One thing to keep in mind: Characters will display as 8 pixels wide unless you precede the command with POKE 87,8. Doing this method, you can design a custom character set using 2x8 pixels and then write it to the Graphics 9 screen. You will have a 20 column wide character display.

Keep in mind you can also use Graphics 9 from text mode by doing POKE 623,64 while in GRAPHICS 0 and then using a custom character set.

#15 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 5,339 posts
  • Ready for some Ramp Rage
  • Location:High Score Club TAKE PART!

Posted Sun Jan 15, 2012 6:01 PM

You might checkout Page 6 have the Turbo Basic Programmers Kit disks and compiler etc.

I have really useful Turbo Basic enthusiasts guide (Western New York Atari Users Group)
can't find this on atariarchives.org - Is this scanned somewhere?




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users